Hello,
I am using PASH 3.0 for aligning the .fastq file against GRCh37 genome (Using PASH is mandatory here). I am using the following command:
pash3 -g Homo_sapiens.GRCh37.66.fa -r input.fastq -o output.sam -3
When I use samtools flagstat to see the no.of read mapped to the genome I get a lot of warnings like: [W::sam_parse1] unrecognized reference name; treated as unmapped
as explained in another Biostar question, this happens whenever you have a read mapping to a chromosome/contig that's not in the header but in my case as can be seen in output.sam file, every chromosome is there in the sam header file. I'm unable to understand why is it still happening!!
The output of
samtools flagstat output.sam
looks like this:
4942996 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 mapped (0.00%:-nan%)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (-nan%:-nan%)
0 + 0 with itself and mate mapped
0 + 0 singletons (-nan%:-nan%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
This is the header of my output.sam file
@HD VN:1.0
@PG ID:pash3 PN:Pash VN:3.01.02
@SQ SN:chrMT dna:chromosome chromosome:GRCh37:MT:1:16569:1 LN:16569
@SQ SN:chrX dna:chromosome chromosome:GRCh37:X:1:155270560:1 LN:155270560
@SQ SN:chrY dna:chromosome chromosome:GRCh37:Y:2649521:59034049:1 LN:59373566
@SQ SN:chr1 dna:chromosome chromosome:GRCh37:1:1:249250621:1 LN:249250621
@SQ SN:chr2 dna:chromosome chromosome:GRCh37:2:1:243199373:1 LN:243199373
@SQ SN:chr3 dna:chromosome chromosome:GRCh37:3:1:198022430:1 LN:198022430
@SQ SN:chr4 dna:chromosome chromosome:GRCh37:4:1:191154276:1 LN:191154276
@SQ SN:chr5 dna:chromosome chromosome:GRCh37:5:1:180915260:1 LN:180915260
@SQ SN:chr6 dna:chromosome chromosome:GRCh37:6:1:171115067:1 LN:171115067
@SQ SN:chr7 dna:chromosome chromosome:GRCh37:7:1:159138663:1 LN:159138663
@SQ SN:chr8 dna:chromosome chromosome:GRCh37:8:1:146364022:1 LN:146364022
@SQ SN:chr9 dna:chromosome chromosome:GRCh37:9:1:141213431:1 LN:141213431
@SQ SN:chr10 dna:chromosome chromosome:GRCh37:10:1:135534747:1 LN:135534747
@SQ SN:chr11 dna:chromosome chromosome:GRCh37:11:1:135006516:1 LN:135006516
@SQ SN:chr12 dna:chromosome chromosome:GRCh37:12:1:133851895:1 LN:133851895
@SQ SN:chr13 dna:chromosome chromosome:GRCh37:13:1:115169878:1 LN:115169878
@SQ SN:chr14 dna:chromosome chromosome:GRCh37:14:1:107349540:1 LN:107349540
@SQ SN:chr15 dna:chromosome chromosome:GRCh37:15:1:102531392:1 LN:102531392
@SQ SN:chr16 dna:chromosome chromosome:GRCh37:16:1:90354753:1 LN:90354753
@SQ SN:chr17 dna:chromosome chromosome:GRCh37:17:1:81195210:1 LN:81195210
@SQ SN:chr18 dna:chromosome chromosome:GRCh37:18:1:78077248:1 LN:78077248
@SQ SN:chr19 dna:chromosome chromosome:GRCh37:19:1:59128983:1 LN:59128983
@SQ SN:chr20 dna:chromosome chromosome:GRCh37:20:1:63025520:1 LN:63025520
@SQ SN:chr21 dna:chromosome chromosome:GRCh37:21:1:48129895:1 LN:48129895
@SQ SN:chr22 dna:chromosome chromosome:GRCh37:22:1:51304566:1 LN:51304566
SRR1917223.2807307 0 chrMT 147 99 50M * 0 0 CATTCTATTATTTATCGCACCTACGTTCAATATTTCAGGCGAACATACTT CCCCCFFFFFFFGGGGGGGGGGHHGHHHHHHGHHHHHHHHGGGGGHHHHH
SRR1917223.4613215 16 chrMT 15 99 50M * 0 0 CACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTC FBCBHGHHBFFGHGEFEEFGHGHGGGCGGGGGGGGGCGFFFFBA3ABBAB
SRR1917223.2209200 16 chrMT 370 99 50M * 0 0 CCTAACACCAGCCTAACCAGATTTCAAATTTTATCTTTTGGCGGTATGCA GHEGGFBEHFFHGGFAFHGHHFDBHGGFGGGGGFGGFEDD?AFFFABABA
Can somebody guide me what am I doing wrong here and how can I overcome the issue. I have tried to use another alignment tool (Bowtie) for the same input.fastq file and when I get alignment statistics by samtools flagstat, I get around 60% of alignment mapped to the genome, so problem is not in the input.fastq file but the PASH 3.0 options. If somebody has faced the same problem then please share your experience. Thank you.
It looks like the chromosome names in the sam alignments only have the first part of the chromosome name that is in the header, the part up to the first space in the chromosome name, samtools is probably looking for a perfect match.