Description Usage Arguments Value
calculate_probability
takes a read and reference of equal length n
, finds the positions of mismatch,
then calculates the joint probability of the read mapping to the reference based on the given phred score.
For a given position in a mapping and P
being the probability of error at that position, the probability
of mapping is 1 - P if the calls are the same, and P/3 if the calls are different.
If there are no mismatches, the joint probability is (1 - P)^n.
1 | calculate_probability(reference, read, phred_score)
|
reference |
The barcode sequence to which |
read |
The read sequence which maps to |
phred_score |
A string of Phred scores. Each character is a representation of the probability that the corresponding base call is an error. |
Returns a scalar joint probability, which is the product of marginal probabilities obtained from
phred_to_prob
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.