Hi. I have an RNA seq data that is reverse-stranded. The library type is ISR. I want to count reads mapping to the genomes. I am new to bioinformatics. Can you check if my code is correct?
Plus strand reads (Read2 mapped to forward strand) ?
PLUS_COUNT=$(samtools view -f 0x80 -F 0x10 "$BAM" "$SEG" | wc -l)
Minus strand reads (Read2 mapped to reverse strand) ?
MINUS_COUNT=$(samtools view -f 0x80 -f 0x10 "$BAM" "$SEG" | wc -l)
Use a standard tool like
featureCounts
as noted here --> RNA-seq analysis