FLCNA: FLCNA analysis

View source: R/FLCNA.R

FLCNAR Documentation

FLCNA analysis

Description

Simultaneous CNA detection and subclone identification using single cell DNA sequencing data.

Usage

FLCNA(
  tuning = NULL,
  K = NULL,
  lambda = c(5),
  Y,
  N = 100,
  kms.iter = 100,
  kms.nstart = 100,
  adapt.kms = FALSE,
  eps.diff = 1e-05,
  eps.em = 1e-05,
  iter.LQA = 20,
  eps.LQA = 1e-05,
  cutoff = 0.5,
  L = 100,
  model.crit = "bic"
)

Arguments

tuning

A 2-dimensional vector or a matrix with 2 columns, the first column is the number of clusters K and the second column is the tuning parameter \lambda in the penalty term. If this is missing, then K and lambda must be provided.

K

The number of clusters K.

lambda

The tuning parameter \lambda in the penalty term. The default is 5.

Y

A p-dimensional data matrix. Each row is an observation.

N

The maximum number of iterations in the EM algorithm. The default value is 100.

kms.iter

The maximum number of iterations in kmeans algorithm for generating the starting value for the EM algorithm.

kms.nstart

The number of starting values in K-means.

adapt.kms

A indicator of using the cluster means estimated by K-means to calculate the adaptive parameters. The default value is FALSE.

eps.diff

The lower bound of pairwise difference of two mean values. Any value lower than it is treated as 0.

eps.em

The lower bound for the stopping criterion in the EM algorithm.

iter.LQA

The number of iterations in the estimation of cluster means by using the local quadratic approximation (LQA).

eps.LQA

The lower bound for the stopping criterion in the estimation of cluster means.

cutoff

Cutoff value to further control the number of CNAs besed on mean matrix from FL model. Larger cutoff value, less CNAs.

L

Repeat times in the EM algorithm while outputing CNA data, defaults to 100.

model.crit

The criterion used to select the number of clusters K. It is either ‘bic’ for Bayesian Information Criterion or ‘gic’ for Generalized Information Criterion.

Value

This function returns the esimated parameters and some statistics of the optimal model within the given K and \lambda, which is selected by BIC when model.crit = 'bic' or GIC when model.crit = 'gic'.

K.best

The optimal number of clusters.

mu.hat.best

The estimated cluster means in the optimal model.

sigma.hat.best

The estimated covariance in the optimal model.

alpha.hat.best

posterior probabilities in the optimal model.

p.hat.best

The estimated cluster proportions in the optimal model.

s.hat.best

The clustering assignments using the optimal model.

lambda.best

The value of tuning hyperparameter lambda that provide the optimal model.

gic.best

The GIC of the optimal model.

bic.best

The BIC of the optimal model.

llh.best

The log-likelihood of the optimal model.

ct.mu.best

The degrees of freedom in the cluster means of the optimal model.

K

The input k values.

lambda

The input lambda values.

mu.hat

The estimated cluster means for each parameter combination.

sigma.hat

The estimated covariance for each parameter combination.

p.hat

The estimated cluster proportions for each parameter combination.

s.hat = s.hat

The clustering assignments for each parameter combination.

gic

The GIC values for each parameter combination.

bic

The BIC values for each parameter combination.

llh

The log-likelihood values for each parameter combination.

ct.mu

The degrees of freedom in the cluster means for each parameter combination.

Examples

Y <- matrix(rnorm(10000, 0, 0.5),10, 1000)
output <- FLCNA(K = c(1:2), lambda = c(2,3), Y=Y)
output


FeifeiXiaoUSC/FLCNA documentation built on March 29, 2025, 10:48 p.m.