guanchangge / mosaik-aligner

Automatically exported from code.google.com/p/mosaik-aligner
0 stars 0 forks source link

potential issue with ASCII offset and FASTQ files? #87

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use input FASTQ file with ASCII scores with sanger offset value (-Q 33 i 
think), opposed to illumina offset

What is the expected output? What do you see instead?

The resulting SAM file was reporting Q score on bases very low.  I believe they 
this is b/c mosaik is interpreting the FASTQ file with an inappropriate ASCII 
offset.  Perhaps allowing a command line param to specify the ascii offset 
would be a fix?

What version of the product are you using? On what operating system?

seen on both fedora 12 and ubuntu

thanks for the help.

Original issue reported on code.google.com by bbimber@gmail.com on 31 Dec 2010 at 5:33

GoogleCodeExporter commented 8 years ago
Hi there,

We also noticed the bug. In our next release, we'll fix it.

You also can fix it by marking the following lines in 
src/CommonSource/ExternalReadFormats/Fastq.cpp

        //if(!mIsFastqStyleKnown) {
        //      char firstBase = m.Qualities[0];
        //
        //      if(firstBase <= 72) {
        //              mFastqOffset = NORMAL_FASTQ_OFFSET;
        //              mUsingIlluminaStyle = false;
        //      } else {
        //              mFastqOffset = ILLUMINA_FASTQ_OFFSET;
        //              mUsingIlluminaStyle = true;
        //      }
        //
        //      mIsFastqStyleKnown = true;
        //}
        //mFastqOffset = NORMAL_FASTQ_OFFSET;

        //m.Bases.Uppercase();

Best,
Wan-Ping

Original comment by WanPing....@gmail.com on 31 Dec 2010 at 9:23

GoogleCodeExporter commented 8 years ago
Hi,

I'm experiencing the same problem as described in issue 87. I want to modify 
the code as described above, but the last line is not the same (I'm quoting 
from version 1.1.0021), and I'm not entirely certain if I can mark it. And a 
related question, is there going to be a modified version soon?

    // determine the FASTQ style
    if(!mIsFastqStyleKnown) {
        char firstBase = m.Qualities[0];

        if(firstBase <= 72) {
            mFastqOffset = NORMAL_FASTQ_OFFSET;
            mUsingIlluminaStyle = false;
        } else { 
            mFastqOffset = ILLUMINA_FASTQ_OFFSET;
            mUsingIlluminaStyle = true;
        }

        mIsFastqStyleKnown = true;
    }

    m.Bases.Uppercase();
    m.Qualities.Decrement(mFastqOffset);

Original comment by hjmeg...@gmail.com on 1 Mar 2011 at 9:47