View Single Post
Old 12-14-2011, 05:11 PM   #1
Location: New York

Join Date: Nov 2011
Posts: 19
Unhappy Problem to use Bedtools after filtering uniquely mapped reads with samtools

Hi there,

I've aligned my ChIP-seq data with BWA and filtered for uniquely mapped reads with this command:

samtools view file.bam | grep "XT:A:U" > file.unique.bam

Then I tried to convert the file.unique.bam to .bed file with Bedtools but failed. The command I used is:

bamToBed -i file.unique.bam > file.bed

And I got error message like:

BgzfStream ERROR: read block failed - invalid block header
BamHeader ERROR: could not read magic number
BamReader ERROR: Could not load header data for file.unique.bam

Does anyone have this problem before? How can I solve it?

eilosei is offline   Reply With Quote