11 Computations on sequences
11.1 obipairing
Replace the
illuminapairedends
original OBITools
Alignment procedure
obipairing
is introducing a new alignment algorithm compared to the illuminapairedend
command of the OBITools V2
. Nethertheless this new algorithm has been design to produce the same results than the previous, except in very few cases.
The new algorithm is a two-step procedure. First, a FASTN-type algorithm (Lipman and Pearson 1985) identifies the best offset between the two matched readings. This identifies the region of overlap.
In the second step, the matching regions of the two reads are extracted along with a flanking sequence of base pairs. The two subsequences are then aligned using a “one side free end-gap” dynamic programming algorithm. This latter step is only called if at least one mismatch is detected by the FASTP step.
Unless the similarity between the two reads at their overlap region is very low, the addition of the flanking regions in the second step of the alignment ensures the same alignment as if the dynamic programming alignment was performed on the full reads.
The scoring system
In the dynamic programming step, the match and mismatch scores take into account the quality scores of the two aligned nucleotides. By taking these into account, the probability of a true match can be calculated for each aligned base pair.
If we consider a nucleotide read with a quality score , the probability of misreading this base () is :
Thus, when a given nucleotide is observed with the quality score . The probability that is really an is :
Otherwise, is actually one of the three other possible nucleotides (, or ). If we suppose that the three reading error have the same probability :
At each position in an alignment where the two nucleotides and face each other (not a gapped position), the probability of a true match varies depending on whether , an observed match, or , an observed mismatch.
Probability of a true match when
That probability can be divided in two parts. First and have been correctly read. The corresponding probability is :
Secondly, a match can occure if the true nucleotides read as and are not and but identical.
The probability of a true match between and when an observed match :
Probability of a true match when
That probability can be divided in three parts.
- has been correctly read and is a sequencing error and is actually equal to .
- has been correctly read and is a sequencing error and is actually equal to .
- and corresponds to sequencing error but are actually the same base
Consequently :
Probability of a match under the random model
The second considered model is a pure random model where every base is equiprobable, hence having a probability of occurrence of a nucleotide equals . Under that hypothesis
The score is a log ration of likelyhood
Score is define as the logarithm of the ratio between the likelyhood of the observations considering the sequencer error model over tha likelyhood u
11.2 obimultiplex
Replace the
ngsfilter
original OBITools