Hi there,
EDIT
I filtered my PE reads based on quality. Filtering generated 3 kind of files:
- 1 file with PE of good quality
- 1 file with discarded reads,
- 1 file with orphan PE reads of good quality(unpaired PE).
I concatenated good quality reads, and submitted my reads to BWA to generate a SAM file. So basically, all my reads "look like" PE reads, even though I have unpaired reads.
!EDIT
I would like to convert a BAM/SAM file to FASTQ. The thing is that my BAM file contains Paired-end reads and Single-end reads, and I'd like a tool that will generate 3 files :
- 1 file with paired end reads #1
- 1 file with paired end reads #2
- 1 file with single end reads (unpaired)
I tried Picard and Bam2Fastq but this option doesnt exist. Any idea ?
Thanks
What's so onerous about running samtools view 3 times to split up the .bam into those three groups?
samtools view -bf 64 mixed.bam > read1.bam samtools view -bf 128 mixed.bam > read2.bam samtools view -bF 1 mixed.bam > SE.bam
Then run bam2fastq on each of those files.
Question edited with more details