choose_denom: Choose denominator

Description Usage Arguments Value

View source: R/choose_denom.R

Description

This function selects the best denominator for an ALR transformation based on which feature has the most consistent proportion across all samples. Currently, only "coefficient of variation" (choose_method "cov") is implemented. Users can supply a "sleuth" object, or alternatively can supply a sample_to_covariates table. It runs a truncated form of sleuth_prep to get raw counts and TPMs to calculate the metric.

Usage

1
2
3
4
choose_denom(obj = NULL, sample_info = NULL, target_mapping = NULL,
  aggregation_column = NULL, gene_mode = FALSE, num_cores = 1,
  num_denoms = 1, denom_var = "tpm", min_value = 5,
  choose_method = "cov", filter_length = TRUE)

Arguments

obj

a sleuth object. This or sample_info must be specified. If both are specified, the sleuth object will take precedence.

sample_info

a sample_to_covariates table that must match sleuth API. see ?sleuth::sleuth_prep for more information

target_mapping

a table that matches each target_id to gene identifiers or other metadata. If aggregation_column is specified, this table must be provided, and it must have aggregation_column as one of its named columns.

aggregation_column

If you plan to examine gene-level information, you must provide an aggregation_column to aggregate transcripts to the gene level. You must provide a target_mapping table with a column whose name is this argument or a sleuth object with that table.

gene_mode

If you plan to examine gene-level information and want to do count aggregation to select a denominator, this must be set to TRUE. Transcript-level selection will be used if FALSE.

num_cores

the number of cores that parallel should use to process samples

num_denoms

the number of features to select for normalization. The default is one.

denom_var

must be one of "est_counts", "tpm", or "scaled_reads_per_base" (for gene-level counts).

min_value

the minimum threshold for the mean of 'denom_var' for the candidate denominator.

choose_method

the metric used to select the denominator. Currently only "cov" is implemented.

filter_length

boolean to filter possible denominators by length. This requires that 'length' is a column in the target_mapping. If TRUE, then all features with a length less than 300 bases is excluded from consideration. This is recommended when modeling TPMs, and is thus TRUE by default since TPMs are modeled by default.

Value

a character vector with one or more denominators for use. If multiple features have ties for the metric of choice, currently all of them are returned so that their geometric mean can be used as the denominator.


warrenmcg/sleuth-ALR documentation built on May 29, 2019, 9:57 a.m.