Annotate columns with chrom start_end
0
0
Entering edit mode
7.3 years ago

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

csv • 1.6k views
ADD COMMENT
1
Entering edit mode

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...

Plenty of free courses/tutorials/... online available.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 :)))

ADD REPLY
0
Entering edit mode

comment or mark as answered your previous questions: How to merge two csv tables ; vcf split by columns ...

ADD REPLY
0
Entering edit mode

and the logic is quite similar to your previous question : How to merge two csv tables

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

cristina_sabiers , please do what Pierre's comment above (C: Annotate columns with chrom start_end) advises you to. Thank you.

ADD REPLY
0
Entering edit mode

my god I suck at programming XD

ADD REPLY

Login before adding your answer.

Traffic: 2701 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6