-
uh this is a stranger bug. i have methylation data displayed on a QuantitativeTrack. for chr1, zooming into smaller subsections work as expected. for any other non-chr1 chromosome, the track crashes with a TypeError on the second zoom. see video below. the same error is produced when i manually type a chr:start..end coordinate range in the search box (not shown in video). i suspect it's due to the indexing and sorting of chromosome annotations. annotations of my genome and bedGraph (which generated the bigWig) are sorted in numerical order, i.e., chr1, chr2, ..., chr10, chr11, ..., chr20, chr21, ... i'm not sure whether bigWig/bedGraph wants chromosomes to be sorted in alphabetical order (chr1, chr10, chr11, ..., chr2, chr20, chr21, ...). could this be why things are crashing? cheers |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
just to provide additional background: this QuantitativeTrack is reading off a bigWig file via a symlink ( bigWig file was created from a bedGraph file, using UCSC's |
Beta Was this translation helpful? Give feedback.
-
sorry, i found the answer. i'll keep my question & answer up just in case others run into the same problem. my suspicion was correct, the ordering of chromosomes was the problem (biggest hint was chr1 working but anything after that didn't). to solve this: EVERYTHING has to be alphabetically sorted (not numerical sorted).
$ grep '^>' grch38p13_lambda_puc.fa
>chr1
>chr10
>chr11
>chr12
>chr13
>chr14
>chr15
>chr16
>chr17
>chr18
>chr19
>chr2
>chr20
>chr21
>chr22
>chr3
>chr4
>chr5
>chr6
>chr7
>chr8
>chr9
>chrM
>chrX
>chrY
>lambda
>pUC19
$ ~/tools/ucsc_binaries/bigWigToBedGraph N01.filt.bw N01.bedgraph
$ cut -f 1 N01.bedgraph | uniq -c
1376548 chr1
858521 chr10
756010 chr11
716258 chr12
459602 chr13
484205 chr14
527620 chr15
693329 chr16
753032 chr17
371210 chr18
643347 chr19
1242327 chr2
523145 chr20
218337 chr21
361033 chr22
906786 chr3
640107 chr4
767375 chr5
870673 chr6
949635 chr7
775661 chr8
655276 chr9
435 chrM
543 chrX
1674 chrY
2992 lambda
162 pUC19 to create the correctly ordered bigWigs with bedGraphToBigWigs, the chrom.sizes file also has to be sorted alphabetically. i still had errors when this file was sorted numerically. had i RTFM earlier, i would've found out that the bedGraph files have to be generated with
once that's done, the bigWig file is zoomable in chr2 and chr4 (which failed previously). PS also discovered that the TypeError isn't trigged by the second zoom, it's triggered when the genome view is smaller than a certain size (that is somewhat proportional to browser window length). it was about 8 mil bp when my browser was about 1000 px across. |
Beta Was this translation helpful? Give feedback.
-
@lyijin we managed to find a fix for the this.ranges.map bug that you saw, it was released in jbrowse v2.10.3 (was also reported by another user here GMOD/bbi-js#59) |
Beta Was this translation helpful? Give feedback.
sorry, i found the answer. i'll keep my question & answer up just in case others run into the same problem.
my suspicion was correct, the ordering of chromosomes was the problem (biggest hint was chr1 working but anything after that didn't). to solve this: EVERYTHING has to be alphabetically sorted (not numerical sorted).