simple_varpart: Use variancePartition to try and understand where the...

View source: R/model_varpartition.R

simple_varpartR Documentation

Use variancePartition to try and understand where the variance lies in a data set.

Description

The arguments and usage of variancePartition are a bit opaque. This function attempts to fill in reasonable values and simplify its invocation.

Usage

simple_varpart(
  expt,
  predictor = NULL,
  factors = c("condition", "batch"),
  chosen_factor = "batch",
  do_fit = FALSE,
  cor_gene = 1,
  cpus = NULL,
  genes = 40,
  parallel = TRUE,
  strict_filter = TRUE,
  mixed = FALSE,
  modify_expt = TRUE
)

Arguments

expt

Some data

predictor

Non-categorical predictor factor with which to begin the model.

factors

Character list of columns in the experiment design to query

chosen_factor

When checking for sane 'batches', what column to extract from the design?

do_fit

Perform a fitting using variancePartition?

cor_gene

Provide a set of genes to look at the correlations, defaults to the first gene.

cpus

Number cpus to use

genes

Number of genes to count.

parallel

Use doParallel?

strict_filter

Perform a strict filtering of the results via median_by_factor and dropping any genes with a 0.

mixed

Used a mixed model?

modify_expt

Add annotation columns with the variance/factor?

Value

List of plots and variance data frames

See Also

[variancePartition] DOI:10.1186/s12859-016-1323-z.


elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.