This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do I find unmapped reads in my sam file?

Hi,

I want to see why my unmapped reads did not map to the reference - I wanted to pull out a few of the unmapped reads to blast them against the reference. Any idea how I do so? Thanks

sam

hi, i am working on differential gene expression analysis on zebrafish datasets, i am working with GPL 14664 agilent platform but ther is annotation package available. i used limma package and i got results. but how to convert into gene symbols.

1 answer

Use samtools. Just do samtools view -f 4 <bamfile> ..

You can extract all kinds of reads by specifying the flag No. after samtools -f . Get the relevant flags here

so, first turn it into bam, right?

It does not matter if the file is SAM or BAM formatted. Samtools view command is able to read both files. ;)

thanks, that was super helpful! :)

Log in to answer this question.