A class that represents tumors, thought of as a collection of (sub)clones each with an associated measure as a fraction of all tumor cells.
Tumor(psi, rounds, nu = 100, pcnv = 0.5, norm.contam = FALSE, cnmax = 4)
getClone(tumor, i)
The constructor returns a valid object of the Tumor
class.
a numeric vector containing non-negative values.
an integer; the number of generations through which to evolve the potential clones.
an integer; the expected number of mutations in each clonal generation.
a real number between 0 and 1; the probability of a CNV occuring per generation.
a logical value; should we treat one of the cell populations as normal cells that are "contaminating" the tumor specimen?
an integer, the maximum copy number allowed in the simulated data.
an object of the Tumor
class.
a integer; which clone to extract.
Although objects can be created using new
, the preferred method
is to use the constructor function, Tumor
.
psi
a WeightVector
containing
non-negative values whose sum equals one.
clones
a list, each of whose elements represents a clone.
Convert the
Tumor
object into a simple numeric vector. Never
actually used in this form, since the preferred method is to write
as(WV, "list")
.
Kevin R. Coombes krc@silicovore.com, Mark Zucker zucker.64@buckeyemail.osu.edu
The Tumor
class is used to represent compex tumors, each of
which consists a set of subclones representing different fractional
parts of the tumor. Each clone is characterized by a set of copy
number variants (modeled by the output produced by something like the
DNAcopy
package) and, optionally, a set of sequence
mutations. Each of these genetic events is mapped to a specific
interval or point in the human genome.
In the current implementation, a Tumor
consists of a weight
vector that specifies the fractions of cells for each clone and a list
of clones. At present, each clone is itself a list containing one (if
there are no mutations) or two (if there are both copy number
variants and mutations) data frames. This structure is likely to
change in later versions of the package, since we expect to implement a
full-fledged S4 class to represent clones. So, one should not rely on
the current implementation.
WeightVector
showClass("Tumor")
tumor <- Tumor(c(0.5, 0.3, 0.2), 100)
simpleTumor <- as(tumor, "list")
reformed <- as(simpleTumor, "Tumor")
Run the code above in your browser using DataLab