| DA.ltt2 | R Documentation | 
Apply welch t-test to multiple features and one predictor, and with log transformed relative abundances
DA.ltt2(
  data,
  predictor,
  paired = NULL,
  p.adj = "fdr",
  delta = 0.001,
  testStat = function(case, control) {     log2((mean(exp(case)))/(mean(exp(control))))
    },
  testStat.pair = function(case, control) {     log2(mean((exp(case))/(exp(control))))
    },
  allResults = FALSE,
  ...
)
data | 
 Either a matrix with counts/abundances, OR a   | 
predictor | 
 The predictor of interest. Factor, OR if   | 
paired | 
 For paired/blocked experimental designs. Either a Factor with Subject/Block ID for running paired/blocked analysis, OR if   | 
p.adj | 
 Character. P-value adjustment. Default "fdr". See   | 
delta | 
 Numeric. Pseudocount for log transformation. Default 0.001  | 
testStat | 
 Function. Function for calculating fold change. Should take two vectors as arguments. Default is a log fold change:   | 
testStat.pair | 
 Function. Function for calculating fold change. Should take two vectors as arguments. Default is a log fold change:   | 
allResults | 
 If TRUE will return raw results from the   | 
... | 
 Additional arguments for the   | 
A data.frame with with results.
# Creating random count_table and predictor
set.seed(4)
mat <- matrix(rnbinom(1000, size = 0.1, mu = 500), nrow = 100, ncol = 10)
rownames(mat) <- 1:100
pred <- c(rep("Control", 5), rep("Treatment", 5))
# Running t-test on each feature
res <- DA.ltt2(data = mat, predictor = pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.