index tabulate file to get chrom, pos, ref, alt
1
0
Entering edit mode
15 months ago
damian.loska ▴ 20

Hi,

Is there some tool that allows extracting positions based on 4 columns, not based on 2 columns? Like in tabix, to get coordinates like

chrom=10 pos=1001 ref=A alt=G

I need to firstly exectue:

tabix myTabFile.gz 10:1000-1001

and then I need to iterate and parse the results.

Is there some tool so I could extract the data directly? like

someTools myTabFile.gz 10:1001:G:A

??

Yes, I'm interested in parsing VCF files or some big tables that have columns chrom, pos, ref, alt (like dbNSFP).

Thanks!

tabix coordinates variants indexing • 354 views
ADD COMMENT
0
Entering edit mode
15 months ago

pipe into awk according to your input syntax. Something like

tabix myTabFile.gz 10:1000-1001 | awk '($3=="A" && $4=="G")'
ADD COMMENT
0
Entering edit mode

yeah, but this is still "some parsing" (I use python, pysam... subprocess would be additonal overhead). Hmmm... I'll try to format a file like:

chrom_ref_alt pos the rest of anns

like

10_A_G 1001 DP RD AF
10_T_C 1002 DP RD AF

and then to use tabix...

ADD REPLY

Login before adding your answer.

Traffic: 1069 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