hoffmangroup / segway

Application for semi-automated genomic annotation.
http://segway.hoffmanlab.org/
GNU General Public License v2.0
13 stars 7 forks source link

new versions of bedToBigBed fail to convert layered BED files #66

Closed EricR86 closed 8 years ago

EricR86 commented 8 years ago

Original report (BitBucket issue) by Jay Hesselberth (Bitbucket: jayhesselberth, GitHub: jayhesselberth).


I haven't had a lot of time to track down the issue here, and to fix we currently just use the old version specifically for converting layered BED files created by segway. AFAICT the bigBed files created with the old version are rendered fine in the current browser.

# using ucsc v308
jhessel@amc-tesla ~/tmp/segway-identify
$ bedToBigBed segway.layered.bed ~/ref/genomes/hg19/hg19.chrom.sizes segway.layered.bb
pass1 - making usageList (25 chroms): 921 millis
Error line 20 of segway.layered.bed: BED blocks must be in ascending order without overlap. Blocks 0 and 1 overlap.
# using ucsc v130
jhessel@amc-tesla ~/tmp/segway-identify
$ bedToBigBed segway.layered.bed ~/ref/genomes/hg19/hg19.chrom.sizes segway.layered.bb
pass1 - making usageList (25 chroms): 406 millis
pass2 - checking and writing primary data (1070 records, 12 fields): 43990 millis
index write: 0 millis
pass3 - writeReducedOnceReturnReducedTwice: 380 millis
further reductions: 0 millis
EricR86 commented 8 years ago

Original comment by Mickaël Mendez (Bitbucket: Mickael Mendez).


Just ran into the exact same error. In my case it is caused by the following BED12 line that defines two overlapping blocks, both starting at the position 0 (blockStarts field = 0,0) whereas it should be only one block.

chrY    13104553        28819361        7       1000    .       13104553        28819361        102,102,102     2       1,15714808      0,0

The problem is that the layer.py script that converts a segmentation to a layered BED12 file artificially adds 1bp block at the beginning of each BED12 regions if the first segment does not start at the position 0. Instead it should add the 1bp block if the first segment does not start where the BED12 line (run or supercontig) starts.

Fixed in pull request #59

EricR86 commented 8 years ago

Original comment by Michael Hoffman (Bitbucket: hoffman, GitHub: michaelmhoffman).


@mmendez12 there is not enough detail here to understand this.

EricR86 commented 8 years ago

Original comment by Eric Roberts (Bitbucket: ericr86, GitHub: ericr86).


Fixed in pull request #59