emcncf2: EM estimate of copy number and cellular fraction with clonal...

View source: R/facets-emcncf2.R

emcncf2R Documentation

EM estimate of copy number and cellular fraction with clonal and subclonal cluster structure

Description

Uses genotype mixture model to estimate copy number, cellular fraction, and subclonal structures. \ Uses estimates based on the cnlr.median and mafR as initial values for the EM iteration.

Usage

emcncf2(
  x,
  trace = FALSE,
  unif = FALSE,
  min.nhet = 15,
  maxiter = 10,
  difcf = 0.05,
  maxk = 5,
  eps = 0.001
)

Arguments

x

(list) the output from procSample. This function uses the elements jointseg, out and dipLogR from the output.

trace

(logical) flag to print the EM criteria at every step

unif

(logical) random EM start values of cellular fractions instead of clusteredcncf values

min.nhet

(numeric) minimum number of heterozygote snps in a segment used to call minor cn

maxiter

(numeric) maximum number of EM iterations

difcf

(numeric) the minimal difference between segment cluster specific cellular fraction estimate and clonally constrained estimate for declaring candidate subclonal events

maxk

(numeric) maximum number of clonal and subclonal clusters allowed for the fit

eps

(numeric) the convergence threshold

Value

A list containing:

loglik

loglikelihood value of the fitted model

purity

fraction tumor cells in the tumor sample

ploidy

average total copy number of the tumor cells

dipLogR

estimated logR value of diploid segments

cncf

dataframe consisting of the columns of segmentation output as well as cellular fraction (cf), total (tcn) and lesser (lcn) copy number of each segment and their em counterpart (with .em suffix), and a clonal.cluster indicater with clonal.cluster=1 indicating the clonal cluster and a higher number (2,3, etc..) indicating subclonal clusters.


rptashkin/facets2n documentation built on May 11, 2022, 1:34 p.m.