parsimnet-methods {haplotypes}R Documentation

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 signature 'Dna'
parsimnet(x,indels="sic",prob=.95)
## S4 method for signature 'dist'
parsimnet(x,seqlength,prob=.95)
## S4 method for signature '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 in the range [0.01, 0.99] giving the probability of parsimony as defined in Templeton et al. (1992). In order to set maximum connection steps to Inf (to connect all the haplotypes in a single network), set the probability to NULL.

Details

The network estimation methods implemented in parsimnet function finds one of the most parsimonious network (or sub-networks if connection between haplotypes exceeds the parsimony limit). This is an implemetation of the TCS method proposed in Templeton et al. (1992) and Clement et al. (2002).parsimnet function generates an unambiguous haplotype network without loops. If more than one best networks found (results in ambiguous connections), only a network with the lowest average all-pairs distance is returned. Loops may occur only if they are present in initial haplotype distance matrix.

Value

S4 methods for signature 'Dna', 'matrix' or 'dist' 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.

Note

Duplicate names in the final distance matrices in slot d are renamed without warning. An internal function .TempletonProb is taken from package pegas version 0.6 without any modification, authors Emmanuel Paradis, Klaus Schliep.

Author(s)

Caner Aktas, caktas.aca@gmail.com.

References

Clement, M., Q. Snell, P. Walker, D. Posada, and K. A. Crandall (2002) TCS: Estimating Gene Genealogies in First IEEE International Workshop on High Performance Computational Biology (HiCOMB)

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.

See Also

network, plot-methods and pieplot-methods

Examples

	
## Not run: 
data("dna.obj")
x<-dna.obj

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

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

## statistical parsimony with 99
#indels are coded as missing
p<-parsimnet(x,indels="m",prob=.99)
p
plot(p)


# statistical parsimony without connection limit.
p<-parsimnet(x,prob=NULL) 
p
plot(p)


# plot the first network
plot(p,net=1)

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

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


## End(Not run)

[Package haplotypes version 1.1.3.1 Index]