Can't create tabix index of the bed file
1
0
Entering edit mode
7 months ago

I've got ATAC-seq fragments file I downloaded from GEO https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM4156599

It doesn't have an index, so I figured I'd create one with tabix. The first error I got was:

[tabix] the compression of 'GSM4156599_brain.atac.fragments.bed.gz' is not BGZF

I fixed that by uncompressing and running bgzip. Now when I run

tabix -p bed GSM4156599_brain.atac.fragments.bed.gz

the output is:

[E::hts_idx_push] Unsorted positions on sequence #1: 3107211 followed by 3107198

tbx_index_build failed: GSM4156599_brain.atac.fragments.bed.gz

I've attached the file https://drive.google.com/file/d/1WkDqWpRQlaEPeiSbChYZCIbSIzVFJ0FX/view?usp=sharing Does something about this bed seem off to you?

Thanks in advance!

samtools tabix bed ATAC-seq • 476 views
ADD COMMENT
2
Entering edit mode
7 months ago
desouzareis.r ▴ 250

Hi,

You should sort the bed before indexing it

wget https://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4156nnn/GSM4156599/suppl/GSM4156599_brain.atac.fragments.bed.gz
sort -k1,1 -k2,2n -k3,3n GSM4156599_brain.atac.fragments.bed >GSM4156599_brain.atac.fragments.sorted.bed
bgzip GSM4156599_brain.atac.fragments.sorted.bed
tabix -p bed GSM4156599_brain.atac.fragments.sorted.bed.gz
ADD COMMENT
0
Entering edit mode

Worked like a charm! Thanks!

ADD REPLY

Login before adding your answer.

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