Description Usage Arguments Value Author(s) See Also Examples
Display functions for output from fdr1d and fdr2d, summarizing the output, displaying the proportion of non-differentially expressed genes and extracting the list of top-regulated genes.
1 2 3 4 5 6 |
x, object |
an object of class |
how |
a logical value indicating whether to return only the numerical value of the proportion of non-differentially expressed genes, or a list whose second element indicates whether the proportion was estimated from the data or supplied by the user. |
... |
extra arguments, currently unused |
co |
cutoff for either FDR or fdr |
For summary.fdr.result, a list with the summary items.
For p0, either a numerical value or a list with two elements, depending on the value of parameter how.
For topDE, the genes that have FDR (EOC) or fdr (fdr1d, fdr2d) less or equal than co, sorted by FDR or fdr respectively.
A. Ploner
1 2 3 4 5 6 7 |
fdr1d> # We simulate a small example with 5 percent regulated genes and
fdr1d> # a rather large effect size
fdr1d> set.seed(2000)
fdr1d> xdat = matrix(rnorm(50000), nrow=1000)
fdr1d> xdat[1:25, 1:25] = xdat[1:25, 1:25] - 1
fdr1d> xdat[26:50, 1:25] = xdat[26:50, 1:25] + 1
fdr1d> grp = rep(c("Sample A","Sample B"), c(25,25))
fdr1d> # A default run
fdr1d> res1d = fdr1d(xdat, grp)
Starting permutations...
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Smoothing f
Smoothing f0
fdr1d> res1d[1:20,]
tstat fdr.local
1 -3.113975 0.335791540
2 -4.868530 0.003431084
3 -4.487968 0.010425002
4 -3.891546 0.053973693
5 -2.323968 0.851216914
6 -2.491116 0.762952177
7 -2.896670 0.480957360
8 -4.254195 0.020077681
9 -3.490224 0.148862754
10 -3.465717 0.158940696
11 -2.642704 0.660009077
12 -1.532776 0.961621828
13 -3.805811 0.067690448
14 -4.138912 0.027157138
15 -4.999346 0.002343392
16 -3.724595 0.081769104
17 -4.853666 0.003554674
18 -2.607185 0.684129998
19 -3.639713 0.104617006
20 -4.881803 0.003320721
fdr1d> # Looking at the results
fdr1d> summary(res1d)
tstat fdr.local
Min. :-5.247257 Min. :0.001119
1st Qu.:-0.647769 1st Qu.:0.898033
Median :-0.003438 Median :0.922436
Mean : 0.015693 Mean :0.893575
3rd Qu.: 0.736234 3rd Qu.:0.963255
Max. : 5.125711 Max. :0.999997
fdr1d> plot(res1d)
fdr1d> res1d[res1d$fdr<0.05, ]
tstat fdr.local
2 -4.868530 0.003431084
3 -4.487968 0.010425002
8 -4.254195 0.020077681
14 -4.138912 0.027157138
15 -4.999346 0.002343392
17 -4.853666 0.003554674
20 -4.881803 0.003320721
21 -4.273400 0.019086605
22 -5.247257 0.001118834
23 -4.550108 0.008643556
24 -5.002789 0.002314766
28 4.027545 0.040273525
30 4.274270 0.023911657
37 4.810875 0.007936175
38 5.125711 0.003974942
39 4.883544 0.006712789
41 4.404355 0.018582098
522 4.017566 0.041313958
fdr1d> # Averaging estimates the global FDR for a set of genes
fdr1d> ndx = abs(res1d$tstat) > 3
fdr1d> mean(res1d$fdr[ndx])
[1] 0.08305539
fdr1d> # Extra information
fdr1d> class(res1d)
[1] "fdr1d.result" "fdr.result" "data.frame"
fdr1d> attr(res1d,"param")
$p0
[1] 0.8940461
$p0.est
[1] TRUE
$fdr
[1] 0.001118834 0.002078920 0.003875755 0.007243425 0.013438795 0.024590855
[7] 0.044519927 0.079094181 0.137263651 0.226133753 0.351949198 0.499027821
[13] 0.652328046 0.799082966 0.897959501 0.972767986 0.998122161 0.961163691
[19] 0.963594945 0.955992518 0.922461854 0.922260796 0.897608520 0.889237012
[25] 0.898820447 0.937562887 0.975368914 1.000000000 0.996952535 0.970184577
[31] 0.930043115 0.905927076 0.927723920 0.891151402 0.795338226 0.690028123
[37] 0.580417663 0.468105591 0.356955255 0.244407705 0.155622787 0.097597989
[43] 0.060966312 0.038433261 0.024443133 0.015589456 0.009912109 0.006273998
[49] 0.003974942
$xbreaks
[1] -5.35530881 -5.13920530 -4.92310180 -4.70699829 -4.49089478 -4.27479127
[7] -4.05868776 -3.84258426 -3.62648075 -3.41037724 -3.19427373 -2.97817022
[13] -2.76206672 -2.54596321 -2.32985970 -2.11375619 -1.89765268 -1.68154918
[19] -1.46544567 -1.24934216 -1.03323865 -0.81713514 -0.60103164 -0.38492813
[25] -0.16882462 0.04727889 0.26338240 0.47948590 0.69558941 0.91169292
[31] 1.12779643 1.34389994 1.56000344 1.77610695 1.99221046 2.20831397
[37] 2.42441748 2.64052098 2.85662449 3.07272800 3.28883151 3.50493502
[43] 3.72103852 3.93714203 4.15324554 4.36934905 4.58545256 4.80155606
[49] 5.01765957 5.23376308
tstat fdr.local
Min. :-5.247257 Min. :0.001119
1st Qu.:-0.647769 1st Qu.:0.898033
Median :-0.003438 Median :0.922436
Mean : 0.015693 Mean :0.893575
3rd Qu.: 0.736234 3rd Qu.:0.963255
Max. : 5.125711 Max. :0.999997
[1] 0.8940461
$Value
[1] 0.8940461
$Estimated
[1] TRUE
tstat fdr.local
22 -5.247257 0.001118834
24 -5.002789 0.002314766
15 -4.999346 0.002343392
20 -4.881803 0.003320721
2 -4.868530 0.003431084
17 -4.853666 0.003554674
38 5.125711 0.003974942
39 4.883544 0.006712789
37 4.810875 0.007936175
23 -4.550108 0.008643556
3 -4.487968 0.010425002
41 4.404355 0.018582098
21 -4.273400 0.019086605
8 -4.254195 0.020077681
30 4.274270 0.023911657
14 -4.138912 0.027157138
28 4.027545 0.040273525
522 4.017566 0.041313958
32 3.913886 0.052124732
4 -3.891546 0.053973693
13 -3.805811 0.067690448
35 3.774064 0.070293787
16 -3.724595 0.081769104
31 3.687758 0.084923466
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.