This is a test version of Biostars. For the public version, visit https://www.biostars.org.
All reads from the bam file

Hi, Is there any way to get mapped and unmapped reads from a bam file (from Star aligner )? I need to look for gene coordinates.

bam sam samtools

1 answer

You can simply process BAM file with samtools to separate the reads: How To Filter Mapped Reads With Samtools and combine this with samtools fastq to get fastq formatted reads.

or

use following option for STAR.

outReadsUnmapped                None
                                Fastx   ... output in separate fasta/fastq files, Unmapped.out.mate1/2

Log in to answer this question.