Learn R Programming

rphast (version 1.6.9)

mod.backgd.tm: Adjust tree model background frequencies while maintaining reversibility

Description

Adjust tree model background frequencies while maintaining reversibility

Usage

mod.backgd.tm(tm, new.backgd = NULL, gc = NULL)

Arguments

tm

An object of type tm

new.backgd

A numeric vector of length 4 giving the background frequencies of A,C,G,T

gc

(Alternative to new.backgd) A numeric value giving the GC content, which is used to calculate new background frequencies. Assumes freq(C)==freq(G)==gc/2, and freq(A)==freq(T)==(1-gc)/2

Examples

Run this code
# NOT RUN {
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
filename <- "rev.mod"
unzip(exampleArchive, filename)
tm <- read.tm(filename)

# change background frequencies to new value, adjusting rate matrix
mod.backgd.tm(tm, c(0.25, 0.25, 0.25, 0.25))

# change background frequencies so that GC content is 0.6
mod.backgd.tm(tm, gc=0.6)

unlink(filename)
# }

Run the code above in your browser using DataLab