Learn R Programming

haplotypes (version 1.0)

parsimnet-methods: Estimates gene genealogies using statistical parsimony

Description

Function for estimating gene genealogies from DNA sequences or user provided absolute pairwise character difference matrix using statistical parsimony.

Usage

# S4 method for Dna
parsimnet(x,indels="sic",prob=.95)
# S4 method for dist
parsimnet(x,seqlength,prob=.95)
# S4 method for matrix
parsimnet(x,seqlength,prob=.95)

Arguments

x

an object of class Dna, dist, or matrix.

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.

seqlength

an integer of length one giving the sequence length information (number of characters).

prob

a numeric vector of length one between 0 and 1 giving the probability of parsimony as defined in Templeton et al. (1992).

Value

parsimnet returns an object of class Parsimnet.

Methods

signature(x = "Dna")

estimating gene genealogies from DNA sequences.

signature(x = "dist")

estimating gene genealogies from distance matrix (dist object).

signature(x = "matrix")

estimating gene genealogies from distance matrix.

Details

The network estimation method implemented in parsimnet function finds one of the most parsimonious network within the parsimony limit. If algorithm finds more than one best networks, only the minimum spanning network is returned.

References

Templeton, A. R., Crandall, K. A. and Sing, C. F. (1992) A cladistic analysis of phenotypic associations with haplotypes inferred from restriction endonuclease mapping and DNA sequence data. III. Cladogram estimation. Genetics, 132, 619-635.

Paradis, E. (2010) pegas: an R package for population genetics with an integrated-modular approach. Bioinformatics, 26, 419-420.

See Also

network and plot-methods

Examples

Run this code
# NOT RUN {
data("dna.obj")
x<-dna.obj

## Method for signature 'Dna'.
# statistical parsimony with %95 connection limit 
p<-parsimnet(x) 
p
plot(p)

# statistical parsimony with %99 connection limit 
p<-parsimnet(x,prob=.99) 
p
# plot the first network
plot(p,net=1) 

# statistical parsimony with %95 connection limit, indels are coded as missing
p<-parsimnet(x,indels="m")
p
plot(p)


## Method for signature 'dist'.
d<-distance(x)
seqlength<-length(x)
# statistical parsimony with %95 connection limit for 113 character
p<-parsimnet(d,seqlength) 
p
plot(p)


## Method for signature 'matrix'.
d<-as.matrix(distance(x))
seqlength<-length(x)
# statistical parsimony with %95 connection limit for 113 character
p<-parsimnet(d,seqlength)
p
plot(p)

# }

Run the code above in your browser using DataLab