initializeModelObject {AnaCoDa} | R Documentation |
Model Initialization
Description
initializes the model object.
Usage
initializeModelObject(
parameter,
model = "ROC",
with.phi = FALSE,
fix.observation.noise = FALSE,
rfp.count.column = 1
)
Arguments
parameter |
An object created with |
model |
A string containing the model to run (ROC, FONSE, or PA), has to match parameter object. |
with.phi |
(ROC only) A boolean that determines whether or not to include empirical phi values (expression rates) for the calculations. Default value is FALSE |
fix.observation.noise |
(ROC only) Allows fixing the noise term sepsilon in the observed expression dataset to its initial condition. This value should override the est.hyper=TRUE setting in |
rfp.count.column |
(PA and PANSE only) A number representing the RFP count column to use. Default value is 1. |
Details
initializeModelObject initializes a model. The type of model is determined based on the string passed to the model
argument.
The Parameter object has to match the model that is initialized. E.g. to initialize a ROC model,
it is required that a ROC parameter object is passed to the function.
Value
This function returns the model object created.
Examples
#initializing a model object
genome_file <- system.file("extdata", "genome.fasta", package = "AnaCoDa")
expression_file <- system.file("extdata", "expression.csv", package = "AnaCoDa")
genome <- initializeGenomeObject(file = genome_file,
observed.expression.file = expression_file)
sphi_init <- c(1,1)
numMixtures <- 2
geneAssignment <- c(rep(1,floor(length(genome)/2)),rep(2,ceiling(length(genome)/2)))
parameter <- initializeParameterObject(genome = genome, sphi = sphi_init,
num.mixtures = numMixtures,
gene.assignment = geneAssignment,
mixture.definition = "allUnique")
# initializing a model object assuming we have observed expression (phi)
# values stored in the genome object.
initializeModelObject(parameter = parameter, model = "ROC", with.phi = TRUE)
# initializing a model object ignoring observed expression (phi)
# values stored in the genome object.
initializeModelObject(parameter = parameter, model = "ROC", with.phi = FALSE)