make_contrasts: Make contrasts

Description Usage Arguments Details Value Examples

View source: R/de_analysis.R

Description

'make_contrasts()' computes estimated coefficients and standard errors for a given set of contrasts

Usage

1
make_contrasts(.fit, design_matrix, .condition1, .condition2)

Arguments

.fit

an MArrayLM object or list object. Must contain components 'coefficients' and 'stdev.unscaled'

design_matrix

a design matrix with rows corresponding to samples and columns to coefficients to be estimated

.condition1

the control

.condition2

the experimental

...

the names of the variables which you like to compare

Details

Please refer to contrasts.fit for more information.

Value

a 'list' object of the same class as .fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
counts <- readr::read_delim("data/GSE60450_Lactation-GenewiseCounts.txt", delim = "\t")
meta <- readr::read_delim("data/SampleInfo_Corrected.txt", delim = "\t") %>%
  mutate(FileName = stringr::str_replace(FileName, "\\.", "-"))

id <- as.character(counts$EntrezGeneID)
check_sample_names(counts, c(1,2), meta, FileName) %>%
  purrr::pluck("mod_count") %>%
  filter_genes(., id, "edgeR") %>%
  make_voom(., my_design) %>%
  model_limma() %>%
  make_contrasts(Statuspregnant, Statusvirgin)

latlio/tidyde documentation built on Dec. 21, 2021, 9:40 a.m.