Learn R Programming

TE (version 0.3-0)

MasterGene: Implements the master gene model in Marchani et al (2009)

Description

Implements the master gene model in Marchani et al (2009)

Usage

MasterGene(mismatch, len, r = 0.013, plotFit = FALSE,
  main = sprintf("n = %d", n))

Arguments

mismatch

A vector containing the number of mismatches.

len

A vector containing the length of each element.

r

Mutation rate (substitutions/(million year * site)) used in the calculation.

plotFit

Whether to plot the distribution fits.

main

The title for the plot.

Value

This function returns various parameter estimates described in Marchani et al (2009), containing the following fields. The unit for time is million years ago (mya):

B

The constant insertion rate

q

The constant excision rate

lam

The population growth rate

R

The ratio of the number of elements in class j over class j+1, which is constant by assumption

age1

The age of the system under model 1 (lambda > 1)

age2

The age of the system under model 2 (an initial burst followed by stasis lambda = 1)

Details

For the method implemented see References.

References

Marchani, Elizabeth E., Jinchuan Xing, David J. Witherspoon, Lynn B. Jorde, and Alan R. Rogers. "Estimating the age of retrotransposon subfamilies using maximum likelihood." Genomics 94, no. 1 (2009): 78-82.

Examples

Run this code
# NOT RUN {
# Analyze Gypsy family 24 (Nusif)
data(AetLTR)
dat <- subset(AetLTR, GroupID == 24 & !is.na(Chr))
res2 <- MasterGene(dat$Mismatch, dat$UngapedLen, plotFit=TRUE)
# }

Run the code above in your browser using DataLab