View Single Post
Old 12-15-2011, 04:57 AM   #2
Senior Member
Location: Berlin

Join Date: Jul 2011
Posts: 156

There are two reasons why it doesn't work:

1. "file.unique.bam" is not in the BAM format (look at "samtools view" for correct usage).
2. You stripped the SAM headers with your grep command.

You might need find a better way of filtering for uniquely mapped reads which preserves the SAM headers, or you add the SAM headers back to the header-stripped SAM file you created with your first command afterwards (look at "samtools view").

Then, convert it to BAM with SAMtools and feed it into BEDTools.
arvid is offline   Reply With Quote