This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Annotate columns with chrom start_end

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

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

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

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.

0 answers

No answers yet.

Log in to answer this question.