polymorp-methods: Displays polymorphic sites (base substitutions and indels)...

Description Usage Arguments Value Methods Author(s) See Also Examples

Description

This function displays the polymorphic sites (base substitutions and indels) between the two sequences.

Usage

1
2
## S4 method for signature 'Dna'
polymorp(x,pair,indels="sic")

Arguments

x

an object of class Dna.

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 distance for details.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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")

haplotypes documentation built on Feb. 28, 2020, 5:08 p.m.