plotFingerprint [bwHdrRead] error

657 views
Skip to first unread message

tesa.s...@gmail.com

unread,
Nov 30, 2016, 4:04:15 AM11/30/16
to deepTools
Hi deepTools folks,
Yesterday I though I had successfully installed deeptools using conda.
All the tools I've tried to use so far have worked great. Then I tried using plotFingerprint like this:

 plotFingerprint -b *.bam --labels file.2 input.2 --minMappingQuality 20 --skipZeros  --plotFile fingerprints_2.png --outRawCounts fingerprints_2.tab


and got this error:


[bwHdrRead] There was an error while reading in the header!
Traceback (most recent call last):
  File "/home/NFS/users/t.severson/miniconda2/bin/plotFingerprint", line 11, in <module>
    main(args)
  File "/home/NFS/users/t.severson/miniconda2/lib/python2.7/site-packages/deeptools/plotFingerprint.py", line 362, in main
    num_reads_per_bin = cr.run()
  File "/home/NFS/users/t.severson/miniconda2/lib/python2.7/site-packages/deeptools/countReadsPerBin.py", line 244, in run
    y = pyBigWig.open(x)
RuntimeError: Received an error during file opening!

My bam files have worked for previous tools so I don't think there is a problem with them.
Any clues what is going on?
Thanks,
Tesa

Devon Ryan

unread,
Nov 30, 2016, 4:09:33 AM11/30/16
to tesa.s...@gmail.com, deepTools
Hi Tesa,

This will only happen if, for some reason, a BAM file can't be opened
(it falls back to assuming it's a bigWig file). Please ensure that the
files are indexed, since lacking an index is the most likely cause of
this.

Devon
--
Devon Ryan, Ph.D.
Email: dpr...@dpryan.com
Data Manager/Bioinformatician
Max Planck Institute of Immunobiology and Epigenetics
Stübeweg 51
79108 Freiburg
Germany
> --
> You received this message because you are subscribed to the Google Groups
> "deepTools" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to deeptools+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

tesa.s...@gmail.com

unread,
Nov 30, 2016, 5:28:48 AM11/30/16
to deepTools
Thanks Devon, that was it. My files were indexed, but I re-indexed two and tested on them and it works fine.

Don't know what the index problem was but it's an easy fix.
Cheers,
Tesa

maryamfo...@gmail.com

unread,
Jan 4, 2017, 3:55:38 PM1/4/17
to deepTools

Hi
I got the same error! How did you fix it? How can I find that my bam files are indexed?
Thanks
Maryam

Devon Ryan

unread,
Jan 4, 2017, 4:10:27 PM1/4/17
to maryamfo...@gmail.com, deepTools
If you don't see a .bai file with the same name as the BAM file(s) then
the file isn't indexed (use "samtools index" then).

Devon
--
Devon Ryan, PhD
Bioinformatician / Data manager
Bioinformatics Core Facility
Max Planck Institute for Immunobiology and Epigenetics
Email: dpry...@gmail.com

maryamfo...@gmail.com

unread,
Jan 4, 2017, 4:19:00 PM1/4/17
to deepTools, maryamfo...@gmail.com
thanks a lot for your quick response. I got my bam files from bed file ( using bedtobam software). it did not give me bai files.Is there any software that i got the bai file from bam file?

Devon Ryan

unread,
Jan 4, 2017, 5:52:54 PM1/4/17
to maryamfo...@gmail.com, deepTools
"samtools index", though I have to wonder what you're trying to achieve
starting with BED files, which normally contain things like where there
are peaks.


On 01/04/2017 10:19 PM, maryamfo...@gmail.com wrote:
> thanks a lot for your quick response. I got my bam files from bed file ( using bedtobam software). it did not give me bai files.Is there any software that i got the bai file from bam file?
>
>

maryamfo...@gmail.com

unread,
Jan 5, 2017, 10:42:56 AM1/5/17
to deepTools, maryamfo...@gmail.com
I have three set of peaks from three replicates. I did bedtoolsintersect to get the overlap between them. Then I tried to find the corelation between these three peak set file in the intersection region. So I had one bed file from intersect and three bed files from replicates.
After I got the error , I am thinking about using the bam file of each replicates instead of the peak calling files.
Thanks again for your help
Maryam

maryamfo...@gmail.com

unread,
Jan 5, 2017, 12:42:38 PM1/5/17
to deepTools, maryamfo...@gmail.com
Now I got another error : the software could not recognize my bed file type.
raise RuntimeError('{0} does not seem to be a recognized file type!'.format(self.filename))
RuntimeError: output_intersect_C_3rep_wa_wb.bed does not seem to be a recognized file type!

Devon Ryan

unread,
Jan 6, 2017, 6:55:49 AM1/6/17
to maryamfo...@gmail.com, deepTools
Your BED file has too few columns.
Reply all
Reply to author
Forward
0 new messages