Hi all!
I am trying to convert a BAM file from a paired-end alignment back to Fastq (Read1.fq and Read2.fq).
The BAM file I'm working on actually contains ONLY discordant pairs that have been filtered from the original BAM file (that's because I am interested ONLY in discordant pairs).
I have tried this on my sorted (-n) bam file:
bedtools bamtofastq -i alnSORTED.bam -fq read1.fq -fq2 read2.fq
but I get the following error message:
Query HISEQ:272AJYACXX:2:1110:4931:73600 is marked as paired, but it's mate does not occur next to it in your BAM file. Skipping.
So apparently Bedtools skips the discordant pairs...but I need to work only on them!
Any possible solution?
Thank you in advance!
I am trying to convert a BAM file from a paired-end alignment back to Fastq (Read1.fq and Read2.fq).
The BAM file I'm working on actually contains ONLY discordant pairs that have been filtered from the original BAM file (that's because I am interested ONLY in discordant pairs).
I have tried this on my sorted (-n) bam file:
bedtools bamtofastq -i alnSORTED.bam -fq read1.fq -fq2 read2.fq
but I get the following error message:
Query HISEQ:272AJYACXX:2:1110:4931:73600 is marked as paired, but it's mate does not occur next to it in your BAM file. Skipping.
So apparently Bedtools skips the discordant pairs...but I need to work only on them!
Any possible solution?
Thank you in advance!
Comment