This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Attaining subset of reads from fastq file that are mapped in alignment

Hello,

I am interested in pulling a subset of reads from a large fastq file that are mapped during an alignment I run. For example, I wish to run an alignment on the large fastq file and make a new smaller fastq file that contains all the reads that mapped in the alignment. I would greatly appreciate any assistance you may offer.

Kind regards,
Blake

fastq alignment

Have you looked at samtools?

1 answer

Check samtools fastq and its option to only include certain reads using flags. Flags are explained here. https://broadinstitute.github.io/picard/explain-flags.html

Log in to answer this question.