addLong: Time analysis

Description Usage Arguments Details Value See Also Examples

Description

Time analysis of a corObject

Usage

1
2
addLong(obj, dataset, classes, method.dif = "time.point", method.adj = "BH",
 var.t.test = FALSE)

Arguments

obj

corObject

dataset

"miRNA" or "mRNA"

classes

column name of the pheno.miRNA or pheno.mRNA encoding codification of time variable. The column must contain "0" (t_init) and "1" (t_fin), or the specific times. Missing values are also allowed.

method.dif

"time.point" or "linear.regression"

method.adj

Multiple testing correction method used. One of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none" (see p.adjust).

var.t.test

TRUE or FALSE (default). If TRUE, considers equality of variances in a T-test.

Details

If method.dif="time.point", both times are compared using a t-test, time variable should be encoded as kbd"0" (t_init) and "1" (t_fin).

Value

a corObject with a diffexp.miRNA or diffexp.mRNA slot added, where the rownames of the data.frame are the names of the miRNAs or mRNAs. Depending on the selected method, the diffexp is a data.frame with the following columns:

If method.dif="time.point":

If method.dif="linear.regression":

See Also

addDiffexp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
################################
### data special preparation ###
################################

data(miRNA)
data(mRNA)

### simulated phenotypical: 3 samples in 4 time-points, one treatment.

pheno.miRNA<-data.frame(sample=rep(1:3, each=4),
	time=rep(c(1,2,5,9),3),
	time_alt=rep(c(0,NA,NA,1),3))
rownames(pheno.miRNA)<-paste(pheno.miRNA$sample,pheno.miRNA$time,sep="_")

pheno.mRNA<-pheno.miRNA	#same sample distribution

## modify sample names from miRNA and mRNA dataset
colnames(miRNA)<-rownames(pheno.miRNA)
colnames(mRNA)<-rownames(pheno.mRNA)

############################
### start of the example ###
############################

minimal<-new("corObject",dat.miRNA=miRNA,dat.mRNA=mRNA,
	pheno.miRNA=pheno.miRNA,pheno.mRNA=pheno.mRNA)

#### comparing times 1 (t_init) and 9 (t_fin):
minimal.diffexp<-addLong(minimal, "miRNA", classes="time_alt",
 method.dif="time.point")
head(minimal.diffexp@diffexp.miRNA)

#### treated as linear regression:
minimal.diffexp<-addLong(minimal, "miRNA", classes="time",
 method.dif="linear.regression")
head(minimal.diffexp@diffexp.miRNA)

mariavica/mircomb documentation built on Feb. 3, 2020, 2:28 a.m.