Biostar Beta. Not for public use.
Question: Unexpected Bowtie2 behavior with --phred64 and --phred33 flags
0
Entering edit mode

I'm stiil not able to figure out how Bowtie2 deal with different Phred quality encoding. In my recent post: enter link description here

genomax pointed me to use --phred64 flag when using Bowtie2 to map Phred+64 encoded reads. I tried both --phred64 and --phred33 flags to map the same reads to reference. All my reads have the same quality score in each position (just short example):

@Seq=TGCAGCTTGCTGGTCATTGAGTGGAGCTGGGTCTTAGCCTTGAGATGGA
TGCAGCTTGCTGGTCATTGAGTGGAGCTGGGTCTTAGCCTTGAGATGGA
+
fffffffffffffffffffffffffffffffffffffffffffffffff
@Seq=TGCAGCTTGCTGGTCATTGAGTGGAGCTGGGTCTTAGCCTTGAGGTGGA
TGCAGCTTGCTGGTCATTGAGTGGAGCTGGGTCTTAGCCTTGAGGTGGA
+
fffffffffffffffffffffffffffffffffffffffffffffffff

Obiously the reads are Phred+64 encoded. My first command line was:

bowtie2  --very-sensitive --phred64 -x index -U ForAlign.fa.gz -S AlignFullvs_test_64.sam

In the log file i've found:

249631 reads; of these:
  249631 (100.00%) were unpaired; of these:
    6787 (2.72%) aligned 0 times
    199271 (79.83%) aligned exactly 1 time
    43573 (17.45%) aligned >1 times
97.28% overall alignment rate

Further, i used the same command but changed --phred64 to --phred33 flag:

bowtie2  --very-sensitive --phred33 -x index -U ForAlign.fa.gz -S AlignFullvs_test_33.sam

In the log file:

249631 reads; of these:
  249631 (100.00%) were unpaired; of these:
    7132 (2.86%) aligned 0 times
    200810 (80.44%) aligned exactly 1 time
    41689 (16.70%) aligned >1 times
97.14% overall alignment rate

So, as you can see, the overall statistics was almost the same, there were not any errors or at least warnings in both runs. My questions are:

  1. How Bowtie2 can map Phred+64 encoded reads with --phred33 flag without any errors?
    1. Are the both resulted SAM files correct?
ADD COMMENTlink 9 months ago Denis • 70 • updated 9 months ago Devon Ryan 90k
Entering edit mode
1

You can also change the Q scores to phred+33 by using the following program from BBMap suite before mapping:

reformat.sh in=your.fq.gz out=new.fq.gz qin=64 qout=33
ADD REPLYlink 9 months ago
genomax
68k
2
Entering edit mode
  1. The phred scores are only ever used for computing alignment scores in cases where there are mismatches. The alignment score itself will be wrong, but that won't change where the actual resulting alignments are found.
  2. Base qualities in SAM files are defined to be Phred+33, so if you tell bowtie2 the wrong thing the resulting SAM/BAM files will technically be malformed. Whether this is actually a problem is use-case dependent (this is likely only an issue for variant calling).
ADD COMMENTlink 9 months ago Devon Ryan 90k
Entering edit mode
0

Hi Devon Ryan! Many thanks for your reply, it makes things clear. Let me ask just one more question please? I'm wondering how single mismatch with quality "f" (ASCII 102) will be scored in Phred+33 mode?

ADD REPLYlink 9 months ago
Denis
• 70
Entering edit mode
1

It's a mismatch at a high quality base, so it'd be the maximum penalty. This would be the case even if Phred+64 had been used.

ADD REPLYlink 9 months ago
Devon Ryan
90k

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0