This is a test version of Biostars. For the public version, visit https://www.biostars.org.
my bam file contains both single-end and paired-end. How can I convert bam to fastq so that fastq contains only paired-end reads?

Hi

I have a bam file that contains both single and paired-reads. How can I convert bam to fastq so that fastq contains only paired-end reads?

Thanks

wes

1 answer

filter-in the single ends with samtools view -f 1 in.bam

1 is "read paired" https://broadinstitute.github.io/picard/explain-flags.html

Log in to answer this question.