Hello,
I am doing RNA-seq analysis.
I will have these steps performed:
hisat2 -p 12 --new-summary --summary-file $OUTPUT.hisat2.summary -x $REF -1 $R1 -2 $R2 -S $OUTPUT.sam
#1-Convert sam to bam
samtools view -bS -o $OUTPUT.bam $OUTPUT.sam
# 2- Sort bam file
samtools sort $OUTPUT.bam -o $OUTPUT.sorted.bam
# 3- Generate index for bam file
samtools index $OUTPUT.sorted.bam
I know that I get number of mapped and unmapped reads with:
samtools view -b -f 2 $OUTPUT.bam > mapped.bam
samtools view -b -F 2 $OUTPUT.bam > unmapped.bam
Can someone please recommend me a code to make a plot like attached?