This is a test version of Biostars. For the public version, visit https://www.biostars.org.
IGV error: Error reading BBFile header for bw files

I met this error when I try to visualize bw files created by tool bedGraphToBigWig after sorting.The bedgraph files were generated by STAR. The error: "Error loading /Users/weiyanjia/W_T_1.bw: Error reading BBFile header for: /Users/weiyanjia/W_T_1.bw" I am using the lasted version of IGV(2.7.2) and MAC (catalina)

PS: I can load those files to IGV on the Ubuntu system. Any suggestions?

igv bw

What I always try when IGV does something odd is to upgrade IGV itself and the Java runtime to the current version. Please do that and try again. Since it works on Linux it is not the file itself but something system-related.

Thanks! I checked my JAVA version:

java -version java version "13.0.1" 2019-10-15 Java(TM) SE Runtime Environment (build 13.0.1+9) Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

Still not working and not sure what's the problem.

IGV on Mac still can open bw files generated by deeptools but not by tool bedGraphToBigWig.

1 answer

I had this same problem. I would suggest you inspect your bedGraph files you are converting. In my case it ended up being that I accidentally had some of my positions in scientific notation.

cat  foo.bedGraph | grep e
chr19   16435499        16435500        7.58803689331006e-05  
chr20   8e+06   8000001 0.0781845644824858

I traced this back to output from R where I wrote the bedGraph files. Adding the following line to my R script corrected the problem.
options(scipen=999)

Log in to answer this question.