test2grp {wrProteo} | R Documentation |
t-test each line of 2 groups of data
Description
test2grp
performs t-test on two groups of data using limma,
this is a custom implementation of moderTest2grp
for proteomics.
The final obkect also includes the results without moderation by limma
(eg BH-FDR in $nonMod.BH
).
Furthermore, there is an option to make use of package ROTS (note, this will increase the time of computatins considerably).
Usage
test2grp(
dat,
questNo,
useCol = NULL,
grp = NULL,
annot = NULL,
ROTSn = 0,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
Arguments
dat |
(matrix or data.frame) main data (may contain NAs) |
questNo |
(integer) specify here which question, ie comparison should be adressed |
useCol |
(integer or character) |
grp |
(character or factor) |
annot |
(matrix or data.frame) |
ROTSn |
(integer) number of iterations ROTS runs (stabilization of reseults may be seen with >300) |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
callFrom |
(character) allow easier tracking of message(s) produced |
Value
This function returns a limma-type S3 object of class 'MArrayLM' (which can be accessed like a list); multiple testing correction types or modified testing by ROTS may get included ('p.value','FDR','BY','lfdr' or 'ROTS.BH')
See Also
moderTest2grp
, pVal2lfdr
, t.test
, ROTS
from the Bioconductor package ROTS
Examples
set.seed(2018); datT8 <- matrix(round(rnorm(800)+3,1), nc=8, dimnames=list(paste(
"li",1:100,sep=""), paste(rep(LETTERS[1:3],c(3,3,2)),letters[18:25],sep="")))
datT8[3:6,1:2] <- datT8[3:6,1:2] +3 # augment lines 3:6 (c-f)
datT8[5:8,5:6] <- datT8[5:8,5:6] +3 # augment lines 5:8 (e-h)
grp8 <- gl(3,3,labels=LETTERS[1:3],length=8)
datL <- list(data=datT8, filt= wrMisc::presenceFilt(datT8,grp=grp8,maxGrpM=1,ratMa=0.8))
testAvB0 <- wrMisc::moderTest2grp(datT8[,1:6], gl(2,3))
testAvB <- test2grp(datL, questNo=1)