Help interpreting Samtools Flagstat results
2
0
Entering edit mode
10 months ago

Hello! I am trying to process my rna sequence data. I have 30 paired reads that I used STAR to align to the reference genome but when I ran Samtools I received the following output:

samtools flagstat Aligned.sortedByCoord.out.bam 
52737568 + 0 in total (QC-passed reads + QC-failed reads)
6108221 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
52737568 + 0 mapped (100.00% : N/A)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (N/A : N/A)
0 + 0 with itself and mate mapped
0 + 0 singletons (N/A : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)

I'm not entirely sure what this means other than it didn't read the sequences as pairs - so it didn't work? I had no error output from STAR itself, so I'm a little stuck as to what to try next. This is my second run of STAR because I had a similar result the first time and I thought I had no pairs because the reads were named poorly, so STAR essentially didn't know which sequences were each other's pairs (if that makes sense?). After renaming them and running STAR again however, I am left with the above.

If it's helpful here are the bash scripts I submitted.

First:

STAR --runThreadN 12 --runMode alignReads --genomeDir /lustre/project/ref/starindex --sjdbGTFfile /lustre/project/ref/anole_annotation.gtf --readFilesIn "${prefix}_1.fq","${prefix}_2.fq" --outSAMtype BAM SortedByCoordinate --quantMode TranscriptomeSAM

Then, after that finished:

STAR --runThreadN 12 --runMode alignReads --sjdbFileChrStartEnd /lustre/project/ref/starresults/SJ.out.tab --genomeDir /lustre/project/ref/starindex --readFilesIn  "${prefix}_1.fq","${prefix}_2.fq" --outSAMtype BAM SortedByCoordinate --quantMode GeneCounts

When this finished running is when I checked and received the above samtools flagstat output. Any advice would be appreciated, thank you! I'll also clarify if there are any questions.

STAR samtools RNA-seq • 824 views
ADD COMMENT
0
Entering edit mode

Please do not paste screenshots of plain text content, it is counterproductive. You can copy paste the content directly here (using the code formatting option shown below), or use a GitHub Gist if the content volume exceeds allowed length here.

code_formatting

ADD REPLY
0
Entering edit mode

Oh okay sorry! I'll edit without screenshots

ADD REPLY
0
Entering edit mode
10 months ago
aw7 ▴ 340

The output of samtools flagstats is showing that, apart from the 6108221 secondary ones, non of the flags have been set. No pair flags, no unmapped flags, no supplementary or duplicate flags.

This seems like unusual output for an aligner (I have not used STAR myself). If you take a look at the alignments in your output file, do they appear to be properly formed?

ADD COMMENT
0
Entering edit mode
10 months ago

Your command line is wrong. Drop the comma between fastq names, and the software should understand that your files are pairs.

You don't have to run the command twice either. You can put two entries after --quantMode

ADD COMMENT

Login before adding your answer.

Traffic: 2074 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6