Skip to contents

Runs HMMCopy on single cell binned counts.

Usage

hmmcopy_singlecell(
  chr,
  start,
  end,
  counts,
  reads,
  ideal = rep(TRUE, length(counts)),
  param = params_sc_hmm(),
  cell_id,
  multiplier = 1,
  verbose = FALSE,
  maxiter = 200,
  n_cutoff = NULL
)

Arguments

chr

Vector of chromosomes

start

Vector of bin start positions

end

Vector of bin end positions

counts

Vector of bin corrected counts. These should ideally be GC corrected counts from gc_cor_modal()

reads

A vector of raw read counts per bin

ideal

A logical vector indicating which bins are ideal for analysis. See is_ideal_bin()

param

A matrix of parameter values in columns for each state in rows. See HMMcopy::HMMsegment() for more information.

cell_id

Cell id

multiplier

Ploidy multiplier

verbose

Print verbose

maxiter

The maximum number of iterations allows for the Maximum-Expectation algorithm, reduce to decrease running time at the expense of robustness.

n_cutoff

Cutoff for the number of bins in a given state for calculating the true_multiplier value. Defaults to 5% of bins.

Value

A list with the following objects:

bincounts

Data frame of bin counts with copy state

modal_seg

Data frame of genome segments

mstats

A single row of cell summary statistics

df_params

Data frame of parameters used for each iteration and state