Hi everybody, I'm trying to run this pipeline with bigwif files
computeMatrix reference-point --referencePoint TSS --beforeRegionStartLength 30 --afterRegionStartLength 300 -R transcribed_genes_sort.txt -S BJ_rep1_neg_strand.bw BJ_rep1_pos_strand.bw BJ_rep2_neg_strand.bw BJ_rep2_pos_strand.bw -bl DACblacklist.bed.gz --skipZeros -p 1 -o matrix_TSS.gz
and I get this error
[bwHdrRead] There was an error while reading in the header!
Traceback (most recent call last):
File "/home/projas/.local/bin/computeMatrix", line 11, in <module>
main(args)
File "/home/projas/.local/lib/python3.5/site-packages/deeptools/computeMatrix.py", line 414, in main
hm.computeMatrix(scores_file_list, args.regionsFileName, parameters, blackListFileName=args.blackListFileName, verbose=args.verbose, allArgs=args)
File "/home/projas/.local/lib/python3.5/site-packages/deeptools/heatmapper.py", line 235, in computeMatrix
chromSizes, _ = getScorePerBigWigBin.getChromSizes(score_file_list)
File "/home/projas/.local/lib/python3.5/site-packages/deeptools/getScorePerBigWigBin.py", line 161, in getChromSizes
fh = pyBigWig.open(fname)
RuntimeError: Received an error during file opening!
However, the header of the bigwig files is something like:
chr1 13264 13314 1.8
chr1 13444 13454 3
chr1 13454 13464 4.6
chr1 13464 13474 8.6
Any ideas? Thanks!
Tagging: Devon Ryan
It looks like the bigWig file itself simply got corrupted. Can you recreate or redownload it?
I did but still have the same error :/
This "header" that you showed, how did you obtain this? Is your file truely in bigwig format or is it a bedGraph with a wrong suffix. As always for these kind of questions, please share to full commands for bigwig creation.
what I did was: 1)wig to bigwig:
1)merge lane1 and lane2:
Can you post the bigWigs somewhere? I can take a look then.
Is there any way to send you the files?
In case this is useful for others, I would just like to mention that I had a similar error while using the Python API of deeptools. In my case the cause was that I passed
pathlib.Path
objects for the bigwig files. The solution was to transform them into strings usingstr
.