get_1D_mixtures: get_1D_mixtures

Description Usage Arguments Value Examples

View source: R/tailor_methods.R

Description

Computes 1D mixture model for each marker separately, for use in binning step of tailor. It is difficult to find settings which work for all datasets. Therefore, it is recommended to inspect the results with inspect_1D_mixtures, and run get_1D_mixtures_custom for problematic markers.

Usage

1
2
3
4
5
6
7
8
9
get_1D_mixtures(
  data,
  params,
  max_mixture = 3,
  use_ICL = FALSE,
  sample_fraction = 0.05,
  parallel = FALSE,
  verbose = FALSE
)

Arguments

data

A flowSet, flowFrame or a matrix containing events along the rows, markers along columns.

params

A list of markers to use; must be subset of colnames(data).

max_mixture

Will attempt to model each marker as k mixture components, for 1 <= k <= max_mixture. The best k is chosen based on a biased version of the Integrated Complete Likelihood (ICL).

sample_fraction

A number between 0 and 1: the fraction of data points used in the calculation of 1D mixture components, to improve runtime.

parallel

Boolean flag; if true, uses multithreading to process markers in parallel.

verbose

Boolean flag; if true, outputs timing and milestone information.

bias_ICL

Bias the ICL towards more mixture components.

Value

A named list of 1D mixture models, giving mixture proportions, means and variances for each marker.

Examples

1
2
3
4
5
fileName <- system.file("extdata", "sampled_flowset_old.rda",
                        package = "Tailor")
load(fileName)
tailor_params <- flowCore::colnames(fs_old)[c(7:9, 11:22)]
mixtures_1D <- get_1D_mixtures(fs_old, tailor_params)

matei-ionita/Tailor documentation built on Jan. 4, 2021, 11:47 a.m.