Learn R Programming

plrs (version 1.12.0)

modify.conf: Modify the configuration (of calls) of the plrs model

Description

This function changes the discrete copy number values for a given gene in order to force a minimum number of observations per state.

Usage

modify.conf(cghcall, min.obs = 3, discard = TRUE)

Arguments

cghcall
Vector of called values
min.obs
Minimum number of observations per state
discard
Logical. Whether discrete states with few observations should be discarded from analysis.

Value

val
Vector of new called values

Details

Consider that the number of observations of a given state is lower than min.obs, then:

- if discard = FALSE, observations are not discarded and a rearrangement of called values is carried out as follows. The "normal" copy number state is taken as a reference. If the minimum number of observations is not obtained, "losses" will be merged to "normals", "gains" to "normals" and "amplifications" to "gains". Note that this modifies the configuration of the model. Thus, after fitting a model using plrs, original and modified data are stored in the resulting plrs-class object, respectively under slots data and mdata.

- if discard = TRUE, states for which the number of observations is lower than min.obs are discarded (replaced by NAs).

Examples

Run this code
called <- sample(c(rep(-1,5),rep(0,15),rep(1,2),rep(2,1)))
table(called)
table(modify.conf(called, min.obs=3))

Run the code above in your browser using DataLab