Parallelization across tested clusters is achieved using foreach/doMC, so the number of threads that will be used is determined by the cores argument passed to registerDoMC.

differential_splicing(
  counts,
  x,
  confounders = NULL,
  max_cluster_size = 10,
  min_samples_per_intron = 5,
  min_samples_per_group = 4,
  min_coverage = 20,
  timeout = 10,
  robust = F,
  debug = F,
  init = "smart",
  ...
)

Arguments

counts

An [introns] x [samples] matrix of counts. The rownames must be of the form chr:start:end:cluid. If the counts file comes from the leafcutter clustering code this should be the case already.

x

A [samples] numeric vector, should typically be 0s and 1s, although in principle scaling shouldn't matter.

confounders

A [samples] x [confounders] numeric matrix to be controlled for in the GLM. Factors should already have been converted to a 1-of-(K-1) encoding, e.g. using model.matrix (see scripts/leafcutter_ds.R for how to do this). Can be NULL, implying no covariates are controlled for.

max_cluster_size

Don't test clusters with more introns than this

min_samples_per_intron

Ignore introns used (i.e. at least one supporting read) in fewer than n samples

min_samples_per_group

Require this many samples in each group to have at least min_coverage reads

min_coverage

Require min_samples_per_group samples in each group to have at least this many reads

timeout

Maximum time (in seconds) allowed for a single optimization run

robust

Whether to use the robust model (explicitly models outliers). Generally not required/recommended for differential splicing.

debug

If true writes more output

init

One of 'smart' (default) or 'random'. If 'random' you can pass an additional arg "seed" for reproducibility.

Value

A per cluster list of results. Clusters that were not tested will be represented by a string saying why.