canopy.sample.cluster: MCMC sampling in tree space with pre-clustering of SNAs

Description Usage Arguments Value Author(s) Examples

View source: R/canopy.sample.cluster.R

Description

To sample the posterior trees with pre-clustering step of SNAs. Major function of Canopy.

Usage

1
2
3
    canopy.sample.cluster(R, X, sna_cluster, WM, Wm, epsilonM, epsilonm, C=NULL,
                  Y, K, numchain, max.simrun, min.simrun, writeskip, projectname,
                  cell.line=NULL, plot.likelihood=NULL)

Arguments

R

alternative allele read depth matrix

X

total read depth matrix

sna_cluster

cluster assignment for each mutation from the EM Binomial clustering algorithm

WM

observed major copy number matrix

Wm

observed minor copy number matrix

epsilonM

observed standard deviation of major copy number (scalar input is transformed into matrix)

epsilonm

observed standard deviation of minor copy number (scalar input is transformed into matrix)

C

CNA and CNA-region overlapping matrix, only needed if overlapping CNAs are used as input

Y

SNA and CNA-region overlapping matrix

K

number of subclones (vector)

numchain

number of MCMC chains with random initiations

max.simrun

maximum number of simutation iterations for each chain

min.simrun

minimum number of simutation iterations for each chain

writeskip

interval to store sampled trees

projectname

name of project

cell.line

default to be FALSE, TRUE if input sample is cell line (no normal cell contamination)

plot.likelihood

default to be TRUE, posterior likelihood plot generated for check of convergence and selection of burnin and thinning in canopy.post

Value

List of sampleed trees in subtree space with different number of subclones; plot of posterior likelihoods in each subtree space generated (pdf format).

Author(s)

Yuchao Jiang [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    data(MDA231)
    R = MDA231$R; X = MDA231$X
    WM = MDA231$WM; Wm = MDA231$Wm
    epsilonM = MDA231$epsilonM; epsilonm = MDA231$epsilonm
    C = MDA231$C
    Y = MDA231$Y
    K = 3:6
    numchain = 20
    projectname = 'MDA231'
    # sampchain = canopy.sample.cluster(R = R, X = X, sna_cluster=c(1,2,3,4),
    #             WM = WM, Wm = Wm, epsilonM = epsilonM, 
    #             epsilonm = epsilonm, C = C, Y = Y, K = K, numchain = numchain, 
    #             max.simrun = 50000, min.simrun = 10000, writeskip = 200, 
    #             projectname = projectname, cell.line = TRUE, plot.likelihood = TRUE)

Example output

Loading required package: ape
Loading required package: fields
Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.2-0 (2018-06-19) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package: 'spam'

The following objects are masked from 'package:base':

    backsolve, forwardsolve

Loading required package: maps
See www.image.ucar.edu/~nychka/Fields for
 a vignette and other supplements. 
Loading required package: pheatmap
Loading required package: scatterplot3d

Canopy documentation built on Dec. 23, 2017, 5:09 p.m.