Last data update: 2014.03.03

R: Print Method for Time Course Analysis
print.TCR Documentation

Print Method for Time Course Analysis

Description

methods for the print and summary generics that print relevant results when performing a Time Course Analysis for detecting differentially expressed genes in gene expression data.

Usage

## S3 method for class 'TC'
print(x, ...)

## S3 method for class 'TC'
summary(object, ...)

Arguments

x

an object of class 'TC' as returned by function tc.

object

an object of class 'TC' as returned by function tc.

...

further arguments passed to or from other methods.

Details

With print, at each time point, if the desired FDR level was achieved (i.e. x$astar <= x$alpha), the results are printed for the differentially expressed genes and 10 more rows only. If the desired FDR level was not achieved, only ten rows are displayed.

summary prints a more concise version of the results.

See Also

tc, plot.TC.

Examples

## Time course analysis for 500 genes with 10 treatment 
## replicates and 10 control replicates
tPts <- c("h0", "12h", "24h")
n <- 500; p <- 20; p1 <- 10
Z <- vector("list", 3)
des <- vector("list", 3)
for(tp in 1:3){ des[[tp]] <- c(rep(1, p1), rep(2, (p-p1))) }
mu <- as.matrix(rexp(n, rate=1))
### h0 time point (no diff. expr.)
Z[[1]] <- t(apply(mu, 1, function(mui) rnorm(p, mean=mui, sd=1)))
### h12 time point (diff. expr. begins)
Z[[2]] <- t(apply(mu, 1, function(mui) rnorm(p, mean=mui, sd=1)))
#### Up regulated genes
Z[[2]][1:5,1:p1] <- Z[[2]][1:5,1:p1] + 
    matrix(runif(5*p1, 1, 3), nrow=5)
#### Down regulated genes
Z[[2]][6:15,(p1+1):p] <- Z[[2]][6:15,(p1+1):p] + 
    matrix(runif(10*(p-p1), 1, 2), nrow=10)
### h24 time point (maximum differential expression)
Z[[3]] <- t(apply(mu, 1, function(mui) rnorm(p, mean=mui, sd=1)))
#### 5 up regulated genes
Z[[3]][1:5,1:p1] <- Z[[3]][1:5,1:p1] + 5
#### 10 down regulated genes
Z[[3]][6:15,(p1+1):p] <- Z[[3]][6:15,(p1+1):p] + 4

resTC <- tc(Z, des)
resTC
summary(resTC)
plot(resTC)

## Not run: 
## Phytophthora Infestans Time Course Analysis (takes time...)
dataPI <- phytophthora
desPI <- vector("list", 4)
for(tp in 1:4){ desPI[[tp]] <- c(rep(1, 8), rep(2, 8)) }
resPI <- tc(dataPI, desPI)
resPI
summary(resPI)
plot(resPI)

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(acde)
Loading required package: boot
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/acde/print.TC.Rd_%03d_medium.png", width=480, height=480)
> ### Name: print.TC
> ### Title: Print Method for Time Course Analysis
> ### Aliases: print.TC summary.TC
> 
> ### ** Examples
> 
> ## Time course analysis for 500 genes with 10 treatment 
> ## replicates and 10 control replicates
> tPts <- c("h0", "12h", "24h")
> n <- 500; p <- 20; p1 <- 10
> Z <- vector("list", 3)
> des <- vector("list", 3)
> for(tp in 1:3){ des[[tp]] <- c(rep(1, p1), rep(2, (p-p1))) }
> mu <- as.matrix(rexp(n, rate=1))
> ### h0 time point (no diff. expr.)
> Z[[1]] <- t(apply(mu, 1, function(mui) rnorm(p, mean=mui, sd=1)))
> ### h12 time point (diff. expr. begins)
> Z[[2]] <- t(apply(mu, 1, function(mui) rnorm(p, mean=mui, sd=1)))
> #### Up regulated genes
> Z[[2]][1:5,1:p1] <- Z[[2]][1:5,1:p1] + 
+     matrix(runif(5*p1, 1, 3), nrow=5)
> #### Down regulated genes
> Z[[2]][6:15,(p1+1):p] <- Z[[2]][6:15,(p1+1):p] + 
+     matrix(runif(10*(p-p1), 1, 2), nrow=10)
> ### h24 time point (maximum differential expression)
> Z[[3]] <- t(apply(mu, 1, function(mui) rnorm(p, mean=mui, sd=1)))
> #### 5 up regulated genes
> Z[[3]][1:5,1:p1] <- Z[[3]][1:5,1:p1] + 5
> #### 10 down regulated genes
> Z[[3]][6:15,(p1+1):p] <- Z[[3]][6:15,(p1+1):p] + 4
> 
> resTC <- tc(Z, des)
> resTC

Time course analysis for detecting differentially expressed
genes in microarray data.
 
Inertia ratios (%): 
   t1   t2    t3
 4.39 6.18 14.33

Active timepoint: t3 


TIME POINT: t1.

Achieved FDR: 87.6%.

Inertia ratio: %.
tstar: 1.086, pi0: 1, B: 100.
 
Differentially expressed genes:
down-reg.  no-diff.   up-reg. 
       32       437        31 

Results: 
     psi1  psi2 Q-value Diff. expr.
1  -0.982 1.103   0.876     up-reg.
2   3.107 1.143   0.876     up-reg.
3  -2.380 1.191   0.876     up-reg.
4  -3.155 1.514   0.876     up-reg.
5  -1.868 1.107   0.876     up-reg.
6  -1.371 2.149   0.876     up-reg.
7  -1.565 1.089   0.876     up-reg.
8  -0.208 1.527   0.876     up-reg.
9  -1.695 1.489   0.876     up-reg.
10 -0.481 1.254   0.876     up-reg.
...

*More results are available in the objects:
$ac, $qvalues and $dgenes.


TIME POINT: t2.

Achieved FDR: 2.3%.

Inertia ratio: %.
tstar: 2.617, pi0: 1, B: 100.
 
Differentially expressed genes:
down-reg.  no-diff.   up-reg. 
        2       493         5 

Results: 
     psi1   psi2 Q-value Diff. expr.
1   0.799  3.569   0.000     up-reg.
2   0.897  3.503   0.000     up-reg.
3  17.622  3.164   0.010     up-reg.
4   7.648  2.715   0.020     up-reg.
5  -3.646  2.617   0.023     up-reg.
6   0.697 -2.890   0.010   down-reg.
7   0.440 -2.625   0.023   down-reg.
8  -1.955 -2.405   0.063    no-diff.
9   2.093  2.376   0.063    no-diff.
10  1.857  2.319   0.068    no-diff.
11 -0.579 -2.126   0.132    no-diff.
12  1.242 -2.081   0.144    no-diff.
13 -0.438  1.979   0.206    no-diff.
14  2.485 -1.954   0.209    no-diff.
15 -1.309 -1.901   0.235    no-diff.
16  6.027 -1.839   0.261    no-diff.
17 -2.315  1.850   0.261    no-diff.
...

*More results are available in the objects:
$ac, $qvalues and $dgenes.


TIME POINT: t3.

Achieved FDR: 0.1%.

Inertia ratio: %.
tstar: 4.669, pi0: 1, B: 100.
 
Differentially expressed genes:
down-reg.  no-diff.   up-reg. 
       10       485         5 

Results: 
     psi1   psi2 Q-value Diff. expr.
1   5.861  7.093   0.000     up-reg.
2   4.120  7.533   0.000     up-reg.
3  21.156  6.816   0.000     up-reg.
4  12.263  6.915   0.000     up-reg.
5   5.232  7.522   0.000     up-reg.
6  11.114 -6.528   0.000   down-reg.
7   9.656 -5.580   0.000   down-reg.
8   3.924 -6.417   0.000   down-reg.
9   3.244 -6.293   0.000   down-reg.
10  3.198 -6.087   0.000   down-reg.
11  3.850 -6.703   0.000   down-reg.
12  4.045 -4.844   0.001   down-reg.
13  5.099 -4.805   0.001   down-reg.
14  3.091 -4.921   0.001   down-reg.
15  7.978 -4.669   0.001   down-reg.
16 -0.622  1.964   0.278    no-diff.
17  0.258  1.888   0.305    no-diff.
18 -3.008 -1.686   0.447    no-diff.
19  0.333 -1.697   0.447    no-diff.
20  0.242  1.691   0.447    no-diff.
21  4.848  1.661   0.454    no-diff.
22 -2.636 -1.638   0.455    no-diff.
23  1.801 -1.511   0.607    no-diff.
24 11.053 -1.338   0.636    no-diff.
25 -2.438 -1.332   0.636    no-diff.
...

*More results are available in the objects:
$ac, $qvalues and $dgenes.
> summary(resTC)

Time course analysis for detecting differentially
expressed genes in microarray data.
 
Inertia ratios (%): 
   t1   t2    t3
 4.39 6.18 14.33


Active vs complementary time points analysis:

Active timepoint: t3 

Achieved FDR: 0.13 %.

Differentially expressed genes:
down-reg.  no-diff.   up-reg. 
       10       485         5 


Groups conformation through time analysis:

Differentially expressed genes:
 t2 vs t3           
            down-reg. no-diff. up-reg. Sum
  down-reg.         2        0       0   2
  no-diff.          8      484       1 493
  up-reg.           0        1       4   5
  Sum              10      485       5 500
> plot(resTC)
> 
> ## Not run: 
> ##D ## Phytophthora Infestans Time Course Analysis (takes time...)
> ##D dataPI <- phytophthora
> ##D desPI <- vector("list", 4)
> ##D for(tp in 1:4){ desPI[[tp]] <- c(rep(1, 8), rep(2, 8)) }
> ##D resPI <- tc(dataPI, desPI)
> ##D resPI
> ##D summary(resPI)
> ##D plot(resPI)
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>