Hi,
IGV is throwing a NullPointerException while retrieving zoom-level data (see below) for a bigwig file that I selected from the "Load from file ..." dialog.
I suspect my problem is with the bedGraphToBigWig utility used to create the file, however it could be an issue with how IGV loads certain bigwig files ...
Ultimately, I would like to generate a compressed coverage track corresponding to an bam alignment, and I am using the often-cited pipeline:
samtools view -b BAMFILE | bedtools genomecov -ibam stdin -split -bg -g CHROMSIZES > BEDGRAPH
sort -k1,1 -k2,2n BEDGRAPH > BEDGRAPH.sorted
bedGraphToBigWig BEDGRAPH.sorted CHROMSIZES BIGWIG
I would appreciate it if you could share any ideas or work-arounds.
Thanks,
- Stu
... details ...
I am running
bedGraphToBigWig test.bedGraph chrom_sizes.txt
test.bw
with the following input file (test.bedGraph),
1 99213343 99213420 1
1 99213555 99213579 1
1 101812951 101813052 1
1 104285951 104285953 1
1 104285953 104285954 3
1 104285954 104285956 4
1 104285956 104285978 5
1 104285978 104285979 3
and a chromosome sizes file (chrom_sizes.txt),
1 135534747
the tool runs without error generating a BigWig file that is well-formed but appears empty, according to bigWigInfo:
> bigWigInfo
test.bw
version: 4
isCompressed: yes
isSwapped: 0
primaryDataSize: 90
zoomLevels: 0
chromCount: 1
basesCovered: 0
mean: nan
min: 0.000000
max: 0.000000
std: nan
and will not load into IGV. To add to the mystery, I can duplicate the original file with bigWigToBedGraph
test.bw test1.bedGraph . This has worked for me countless times before, and even works for the first 5 lines of the bedgraph input file shown above.
This is on a Mac computer running ML with up-to-date software.
ERROR [2013-02-27 18:10:49,973] [IGV.java:1491] [pool-1-thread-5] Error loading tracks
java.lang.NullPointerException
at org.broad.igv.bigwig.BigWigDataSource.getZoomLevelForScale(BigWigDataSource.java:179)
at org.broad.igv.bigwig.BigWigDataSource.initMinMax(BigWigDataSource.java:96)
at org.broad.igv.bigwig.BigWigDataSource.<init>(BigWigDataSource.java:70)
at org.broad.igv.track.TrackLoader.loadBWFile(TrackLoader.java:758)
at org.broad.igv.track.TrackLoader.load(TrackLoader.java:213)
at org.broad.igv.track.TrackLoader.load(TrackLoader.java:101)
at org.broad.igv.ui.IGV.load(IGV.java:1529)
at org.broad.igv.ui.IGV$10.run(IGV.java:1473)
at org.broad.igv.ui.IGV.loadResources(IGV.java:1500)
at org.broad.igv.ui.IGV$4.run(IGV.java:618)
at org.broad.igv.util.LongRunningTask.call(LongRunningTask.java:54)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
INFO [2013-02-27 18:10:49,974] [MessageUtils.java:60] [pool-1-thread-5] Error loading /Users/stu/Research/Pathology/Axin/TanHang/UNMAPPED/tohuman/HS85/SamplesPlusfiltered_thout-1/
test.bw: null