Entering edit mode
8.0 years ago
cristina_sabiers
▴
110
One day when I will have the time and money I will pay for python lessons, course or whatever...I think is quiet important to learn that language to work as you want...
atm I just need something quiet easy. I know I can annotate with bcftools bed files on my vcf files, but in this case I want to add info on my csv files
I got this uniprot info (I just put an example)
CHR START END ACTIVE SITE
chr1 1257123 1257126 Glycyl thioester intermediate.
chr1 1309145 1309148 Nucleophile.
chr1 1633785 1633788 active site_212-212.
chr1 1704267 1704270 Proton acceptor.
chr1 2172118 2172121 Proton acceptor.
and I would like to add the third column to this csv file
CHR POS
chr1 1257123
chr1 1309146
chr1 1633787
chr1 1704269
chr1 2172118
so the result would be
CHR POS ACTIVE SITE
chr1 1257123 Glycyl thioester intermediate
chr1 1309146 Nucleophile.
chr1 1633787 active site_212-212.
chr1 1704269 Proton acceptor.
chr1 2172118 Proton acceptor.
I know, probably is something really silly for all of you...
Is any tool make this job???
Thanks
Plenty of free courses/tutorials/... online available.
Dear Cristina,
see this post, it may be useful
Extracting Info From A Column Of Vcf File?
or this one:
A: fetch particular columns from csv files
Im not so sure if they will help me so much, from what I read and undertsand is not what Im looking for (or maybe Im total stupid and dont see it XD )
Anyhow Thanks a lot!
the first one will be usefull for something else I was looking for :)))
comment or mark as answered your previous questions: How to merge two csv tables ; vcf split by columns ...
and the logic is quite similar to your previous question : How to merge two csv tables
yes I know at end what I want to do is merge down two tables,
but in this case I have a column with START and END position, my variable (POS) depends on two values not just one like in the other cases, which was just to merge by same values (gene names for example).
I will look more deep try find out. Thanks.
csvtk --tabs join -f 2-3,2 a.csv b.csv > c.csv
tried with this but asume must be st else...tomorrow will try more...now time to sleep
cristina_sabiers , please do what Pierre's comment above (C: Annotate columns with chrom start_end) advises you to. Thank you.
my god I suck at programming XD