AnaCoDa (version 0.1.0)

initializeModelObject: 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 initializeParameterObject.

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.

fix.observation.noise

(ROC only) Allows to fix the noise in the observed expression dataset to the initial condition. The initial condition for the observed expression noise can be set in the parameter object.

rfp.count.column

(PA and PANSE only) A number representing the RFP count column to use.

Value

This function returns the model object created.

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.

Examples

Run this code
# NOT RUN {
#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 <- sample(1:2, length(genome), replace = TRUE) # random assignment to mixtures
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)

# }

Run the code above in your browser using DataCamp Workspace