sleuth_prep: Constructor for a 'sleuth' object

Description Usage Arguments Value See Also Examples

Description

A sleuth is a group of kallistos. Borrowing this terminology, a 'sleuth' object stores a group of kallisto results, and can then operate on them while accounting for covariates, sequencing depth, technical and biological variance.

Usage

1
2
3
4
sleuth_prep(sample_to_covariates, full_model, filter_fun = basic_filter,
  target_mapping = NULL, max_bootstrap = NULL,
  norm_fun_counts = norm_factors, norm_fun_tpm = norm_factors,
  aggregation_column = NULL, ...)

Arguments

sample_to_covariates

a data.frame which contains a mapping from sample (a column) to some set of experimental conditions or covariates. The column path is also required, which is a character vector where each element points to the corresponding kallisto output directory. The column sample should be in the same order as the corresponding entry in path.

full_model

an R formula which explains the full model (design) of the experiment OR a design matrix. It must be consistent with the data.frame supplied in sample_to_covariates. You can fit multiple covariates by joining them with '+' (see example)

filter_fun

the function to use when filtering.

target_mapping

a data.frame that has at least one column 'target_id' and others that denote the mapping for each target. if it is not NULL, target_mapping is joined with many outputs where it might be useful. For example, you might have columns 'target_id', 'ensembl_gene' and 'entrez_gene' to denote different transcript to gene mappings.

max_bootstrap

maximum number of bootstrap values to read for each transcript.

norm_fun_counts

a function to perform between sample normalization on the estimated counts.

norm_fun_tpm

a function to perform between sample normalization on the TPM

aggregation_column

a string of the column name in target_mapping to aggregate targets

...

additional arguments passed to the filter function

Value

a sleuth object containing all kallisto samples, metadata, and summary statistics

See Also

sleuth_fit to fit a model, sleuth_wt or sleuth_lrt to perform hypothesis testing

Examples

1
2
3
4
5
# Assume we have run kallisto on a set of samples, and have two treatments,
genotype and drug.
colnames(s2c)
# [1] "sample"  "genotype"  "drug"  "path"
so <- sleuth_prep(s2c, ~genotype + drug)

pachterlab/zika documentation built on May 24, 2019, 5:58 p.m.