Skip to contents

Function to generate the parameter matrix for HMMcopy::HMMsegment(). Set-up with default values for single-cell analysis.

Usage

params_sc_hmm(
  e = (1 - 1e-06),
  strength = 1000,
  mu = 0:11,
  lambda = 20,
  nu = 2.1,
  kappa = c(100, 100, 700, 100, 25, 25, 25, 25, 25, 25, 25, 25),
  m = mu,
  eta = 50000,
  gamma = 3,
  S = 1
)

Arguments

e

Probability of extending a segment, increase to lengthen segments, decrase to shorten segments. Range: (0, 1)

strength

Strength of initial e suggestion, reducing allows e to change, increasing makes e undefinable. Range: [0, Inf)

mu

Suggested median for copy numbers in state, change to readjust classification of states. Range: (-Inf, Inf)

lambda

Suggested precision (inversed variance) for copy numbers in state, increase to reduce overlap between states. Range: [0, Inf)

nu

Suggested degree of freedom between states, increase to reduce overlap between states. Range: [0, Inf)

kappa

Suggested distribution of states. Should sum to 1. Must be same length as mu.

m

Optimal value for mu, difference from corresponding mu value determines elasticity of the mu value. i.e. Set to identical value as mu if you don't want mu to move much.

eta

Mobility of mu, increase to allow more movement. Range: [0, Inf)

gamma

Prior shape on lambda, gamma distribution. Effects flexibility of lambda.

S

Prior scale on lambda, gamma distribution. Effects flexibility of lambda.

Value

A data frame of parameters for HMMcopy::HMMsegment()

Details

HMMsegment is a two stage algorithm that first runs an Expectation-Maximization algorithm to find the optimal set of parameters based on suggested parameter inputs, and allowed flexibilities. After iteratively finding the optimal parameters, the actual segmentation of the data is conducted with the Viterbi algorithm, finally output segmented states. This is an extension to the hidden Markov model described in Shah et al., 2006.

Parameters are divided into two main categories:

  • Initial parameters: e, mu, lambda, nu, kappa

  • Flexibility parameters: strength, m, eta, gamma, S

Where initial parameters are treated as starting suggestions for the parameter optimization algorithm, and flexibility parameters (hyperparameters) define how much the initial parameters are allowed to deviate during the search for the optimal parameters.

With a good copy number dataset, in theory, given enough flexibility, the algorithm should always find a similar set of optimal parameters regardless of initial parameters (although running times will vary).

If for some reason you wish to manually set the parameters for the final segmentation process, one should tune all flexibility parameters to minimal values. For example, if you wish to increase the length of segments, you could set:


    param$e <- 0.9999999999999999
    param$strength <- 1e30
  

Which suggests that segments should be very long, and gives minimal to non-existant flexibility to your suggestion.

See vignette for diagrammed example:


    vignette("HMMcopy")
  

Examples

param <- params_sc_hmm()