tabix a text file
1
1
Entering edit mode
9.7 years ago
vigprasud ▴ 60

Is there a way to tabix a text file and use it for quick retrieval of records?

I have these fields in a text file

#CHR START STOP GENE

I would like to retrieve the records based on chr:start-pos.

My sample file [sample.txt] has this data

chr1    11873   14361   A
chr1    14469   29370   B
chr1    34610   36081   C
chr1    69090   70008   D
chr1    134772  140566  E
chr1    323891  328581  F
chr1    367658  368597  G

I bgzipped it to get sample.txt.gz file

I tabixed with the following command

tabix -b 1 -e 3 -S 0 -0 sample.txt.gz

and this is the error I encountered

[get_intv] the following line cannot be parsed and skipped: chr1        11873   14361   A
[ti_index_core] the indexes overlap or are out of bounds

Any ideas on how to tabix a text file?

tabix • 5.5k views
ADD COMMENT
7
Entering edit mode
9.7 years ago

'start' is in column 2 , you used -b 1

You'd better use the predefined setting tabix -p bed

ADD COMMENT

Login before adding your answer.

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