Skip to contents

The proportion of nucleotides that are part of an alignment but not matched to another nucleotide. If you divide it by the percent difference, you obtain the S/I ratio studied by Chen and coll., 2009.

Usage

gapProportion(m)

Arguments

m

A matrix of counts or probabilities for bases of the target genome to be aligned to bases on the query genome. As a convenience it can also receive a list produced by the readTrainFile() function, containing this matrix.

Value

A numeric value between 0 and 1.

Note

This is not a measure of distance. At greater evolutionary divergence, genome alignment becomes increasingly difficult, leaving only the most conserved regions alignable. Consequently, the proportion of gaps tends to decrease.

References

Chen JQ, Wu Y, Yang H, Bergelson J, Kreitman M, Tian D. (2009). Variation in the ratio of nucleotide substitution and indel rates across genomes in mammals and bacteria. Mol Biol Evol. 26(7):1523-31. doi:10.1093/molbev/msp063

Author

Charles Plessy

Examples

gapProportion(exampleSubstitutionMatrix)
#> [1] 0.1397383