Learn R Programming

fishplot (version 0.5)

createFishObject: Create a fish object after doing some input validation and data munging

Description

Create a fish object after doing some input validation and data munging

Usage

createFishObject(frac.table, parents, timepoints = NULL, col = NULL,
  clone.labels = NULL, fix.missing.clones = FALSE)

Arguments

frac.table

A numeric matrix containing tumor fraction estimates for all clones at all timepoints

parents

An integer vector specifying parental relationships between clones

timepoints

An numeric vector specifying the timepoints for each column of the matrix

col

A vector of colors to use when plotting each clone

clone.labels

A character vector of names to assign to each clone when plotting a legend

fix.missing.clones

A boolean value, telling whether to "correct" clones that have zero values at timepoints between non-zero values. (the clone must still have been present if it came back). Default FALSE.

Value

A fish object with the relevant slots filled

Examples

Run this code
# NOT RUN {
timepoints=c(0,30,75,150)
frac.table = matrix(
    c(100, 45, 00, 00,
       02, 00, 00, 00,
       02, 00, 02, 01,
       98, 00, 95, 40),
    ncol=length(timepoints))
parents = c(0,1,1,3)
fish = createFishObject(frac.table,parents,timepoints=timepoints)

# }

Run the code above in your browser using DataLab