Hello,
I am trying to query of the rnaSTAR Aligned.sam
output using the SAM flags to re-generate Number of input reads and Uniquely mapped reads number that are reported in Log.final.out
for paired end RNASeq data. But so far, I had no success in getting the exact STAR reported numbers.
As for "Number of input reads", I am using:
samtools view -S -f 2 -F 8 -c Aligned.out.sam
and then dividing this number by two, which seems to be still more than what Log.final.out
has reported. I assume if I can get how this number is calculated, I can then use grep by NH:i:1
tag to get the number of unique reads that STAR reports (unless you know otherwise).
I greatly appreciate your input.
Noushin