polymorp-methods {haplotypes} | R Documentation |
Displays polymorphic sites (base substitutions and indels) between two sequences
Description
This function displays the polymorphic sites (base substitutions and indels) between the two sequences.
Usage
## S4 method for signature 'Dna'
polymorp(x,pair,indels="sic")
Arguments
x |
an object of class |
pair |
a vector of integers in the range [1,nrow(x)] of length two, specifying sequence pair. |
indels |
the indel coding method to be used. This must be one of "sic", "5th" or "missing". Any unambiguous substring can be given. See |
Value
a list with two components:
indels
:a list of matrices of the indel regions if
indels=="sic"
. The component names of the list gives the position of the indels.subst
:a list of matrices of the base substitutions. If
indels=="5th"
, each gap is treated as a base substitution. The component names of the list gives the position of the base substitutions.
Methods
signature(x = "Dna")
-
Showing base substitutions and indels between the two sequences.
Author(s)
Caner Aktas, caktas.aca@gmail.com
See Also
indelcoder
and subs
Examples
data("dna.obj")
x<-dna.obj
## Showing base substitutions and indels between seq1 and seq6.
# gaps are coded following the simple indel coding method
polymorp(x,c(1,6),indels="s")
# gaps are coded as a fifth state character
polymorp(x,c(1,6),indels="5")
# gaps are treated as missing character
polymorp(x,c(1,6),indels="m")