This is a test version of Biostars. For the public version, visit https://www.biostars.org.
counting the unmapped reads

Hi all,

I have a sam file, my supervisor asked me to count the number of unmapped reads, which command I should use?

samtools view -c -F 4 [file.sam] says that input is probably truncated

rna-seq

Your file is corrupt, my friend. As mentioned above, the command is fine.

Are you Iranian, Amir?

2 answers

Hi all,

I have a sam file, my supervisor asked me to count the number of unmapped reads, which command I should use?

samtools view -c -F 4 [file.sam] says that input is probably truncated

The command above would give you the number of mapped reads . if you want to get unmapped reads you should use "-f" not "-F"

samtools view -c -f 4 [file.sam]

Your command is fine, the file isn't. Ask your supervisor to double check that the file isn't corrupt.

Devon,

He's just waiting for the result I can't report any error.

The file is corrupt, you can't give him a reliable result.

ok thank you

If you've downloaded the file from somewhere you can try downloading again.

Log in to answer this question.