Mercurial > repos > iuc > limma_voom
annotate limma_voom.R @ 13:d5a940112511 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
author | iuc |
---|---|
date | Sun, 30 Sep 2018 10:51:29 -0400 |
parents | 81796eb60bd0 |
children | 3133e833b3ce |
rev | line source |
---|---|
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1 # This tool takes in a matrix of feature counts as well as gene annotations and |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
2 # outputs a table of top expressions as well as various plots for differential |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
3 # expression analysis |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
4 # |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
5 # ARGS: htmlPath", "R", 1, "character" -Path to html file linking to other outputs |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
6 # outPath", "o", 1, "character" -Path to folder to write all output to |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
7 # filesPath", "j", 2, "character" -JSON list object if multiple files input |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
8 # matrixPath", "m", 2, "character" -Path to count matrix |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
9 # factFile", "f", 2, "character" -Path to factor information file |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
10 # factInput", "i", 2, "character" -String containing factors if manually input |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
11 # annoPath", "a", 2, "character" -Path to input containing gene annotations |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
12 # contrastData", "C", 1, "character" -String containing contrasts of interest |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
13 # cpmReq", "c", 2, "double" -Float specifying cpm requirement |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
14 # cntReq", "z", 2, "integer" -Integer specifying minimum total count requirement |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
15 # sampleReq", "s", 2, "integer" -Integer specifying cpm requirement |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
16 # normCounts", "x", 0, "logical" -String specifying if normalised counts should be output |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
17 # rdaOpt", "r", 0, "logical" -String specifying if RData should be output |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
18 # lfcReq", "l", 1, "double" -Float specifying the log-fold-change requirement |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
19 # pValReq", "p", 1, "double" -Float specifying the p-value requirement |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
20 # pAdjOpt", "d", 1, "character" -String specifying the p-value adjustment method |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
21 # normOpt", "n", 1, "character" -String specifying type of normalisation used |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
22 # robOpt", "b", 0, "logical" -String specifying if robust options should be used |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
23 # trend", "t", 1, "double" -Float for prior.count if limma-trend is used instead of voom |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
24 # weightOpt", "w", 0, "logical" -String specifying if voomWithQualityWeights should be used |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
25 # topgenes", "G", 1, "integer" -Integer specifying no. of genes to highlight in volcano and heatmap |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
26 # treatOpt", "T", 0, "logical" -String specifying if TREAT function should be used |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
27 # plots, "P", 1, "character" -String specifying additional plots to be created |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
28 # |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
29 # OUT: |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
30 # Density Plots (if filtering) |
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
31 # Box Plots (if normalising) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
32 # MDS Plot |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
33 # Voom/SA plot |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
34 # MD Plot |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
35 # Volcano Plot |
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
36 # Heatmap |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
37 # Expression Table |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
38 # HTML file linking to the ouputs |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
39 # Optional: |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
40 # Normalised counts Table |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
41 # RData file |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
42 # |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
43 # |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
44 # Author: Shian Su - registertonysu@gmail.com - Jan 2014 |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
45 # Modified by: Maria Doyle - Jun 2017, Jan 2018, May 2018 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
46 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
47 # Record starting time |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
48 timeStart <- as.character(Sys.time()) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
49 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
50 # Load all required libraries |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
51 library(methods, quietly=TRUE, warn.conflicts=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
52 library(statmod, quietly=TRUE, warn.conflicts=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
53 library(splines, quietly=TRUE, warn.conflicts=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
54 library(edgeR, quietly=TRUE, warn.conflicts=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
55 library(limma, quietly=TRUE, warn.conflicts=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
56 library(scales, quietly=TRUE, warn.conflicts=FALSE) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
57 library(getopt, quietly=TRUE, warn.conflicts=FALSE) |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
58 library(gplots, quietly=TRUE, warn.conflicts=FALSE) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
59 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
60 ################################################################################ |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
61 ### Function Declaration |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
62 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
63 # Function to sanitise contrast equations so there are no whitespaces |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
64 # surrounding the arithmetic operators, leading or trailing whitespace |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
65 sanitiseEquation <- function(equation) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
66 equation <- gsub(" *[+] *", "+", equation) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
67 equation <- gsub(" *[-] *", "-", equation) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
68 equation <- gsub(" *[/] *", "/", equation) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
69 equation <- gsub(" *[*] *", "*", equation) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
70 equation <- gsub("^\\s+|\\s+$", "", equation) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
71 return(equation) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
72 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
73 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
74 # Function to sanitise group information |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
75 sanitiseGroups <- function(string) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
76 string <- gsub(" *[,] *", ",", string) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
77 string <- gsub("^\\s+|\\s+$", "", string) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
78 return(string) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
79 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
80 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
81 # Function to change periods to whitespace in a string |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
82 unmake.names <- function(string) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
83 string <- gsub(".", " ", string, fixed=TRUE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
84 return(string) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
85 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
86 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
87 # Generate output folder and paths |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
88 makeOut <- function(filename) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
89 return(paste0(opt$outPath, "/", filename)) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
90 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
91 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
92 # Generating design information |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
93 pasteListName <- function(string) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
94 return(paste0("factors$", string)) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
95 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
96 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
97 # Create cata function: default path set, default seperator empty and appending |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
98 # true by default (Ripped straight from the cat function with altered argument |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
99 # defaults) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
100 cata <- function(..., file = opt$htmlPath, sep = "", fill = FALSE, labels = NULL, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
101 append = TRUE) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
102 if (is.character(file)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
103 if (file == "") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
104 file <- stdout() |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
105 else if (substring(file, 1L, 1L) == "|") { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
106 file <- pipe(substring(file, 2L), "w") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
107 on.exit(close(file)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
108 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
109 else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
110 file <- file(file, ifelse(append, "a", "w")) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
111 on.exit(close(file)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
112 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
113 .Internal(cat(list(...), file, sep, fill, labels, append)) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
114 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
115 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
116 # Function to write code for html head and title |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
117 HtmlHead <- function(title) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
118 cata("<head>\n") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
119 cata("<title>", title, "</title>\n") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
120 cata("</head>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
121 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
122 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
123 # Function to write code for html links |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
124 HtmlLink <- function(address, label=address) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
125 cata("<a href=\"", address, "\" target=\"_blank\">", label, "</a><br />\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
126 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
127 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
128 # Function to write code for html images |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
129 HtmlImage <- function(source, label=source, height=500, width=500) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
130 cata("<img src=\"", source, "\" alt=\"", label, "\" height=\"", height) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
131 cata("\" width=\"", width, "\"/>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
132 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
133 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
134 # Function to write code for html list items |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
135 ListItem <- function(...) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
136 cata("<li>", ..., "</li>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
137 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
138 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
139 TableItem <- function(...) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
140 cata("<td>", ..., "</td>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
141 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
142 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
143 TableHeadItem <- function(...) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
144 cata("<th>", ..., "</th>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
145 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
146 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
147 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
148 ### Input Processing |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
149 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
150 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
151 # Collect arguments from command line |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
152 args <- commandArgs(trailingOnly=TRUE) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
153 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
154 # Get options, using the spec as defined by the enclosed list. |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
155 # Read the options from the default: commandArgs(TRUE). |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
156 spec <- matrix(c( |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
157 "htmlPath", "R", 1, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
158 "outPath", "o", 1, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
159 "filesPath", "j", 2, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
160 "matrixPath", "m", 2, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
161 "factFile", "f", 2, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
162 "factInput", "i", 2, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
163 "annoPath", "a", 2, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
164 "contrastData", "C", 1, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
165 "cpmReq", "c", 1, "double", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
166 "totReq", "y", 0, "logical", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
167 "cntReq", "z", 1, "integer", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
168 "sampleReq", "s", 1, "integer", |
12
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
169 "filtCounts", "F", 0, "logical", |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
170 "normCounts", "x", 0, "logical", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
171 "rdaOpt", "r", 0, "logical", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
172 "lfcReq", "l", 1, "double", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
173 "pValReq", "p", 1, "double", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
174 "pAdjOpt", "d", 1, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
175 "normOpt", "n", 1, "character", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
176 "robOpt", "b", 0, "logical", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
177 "trend", "t", 1, "double", |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
178 "weightOpt", "w", 0, "logical", |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
179 "topgenes", "G", 1, "integer", |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
180 "treatOpt", "T", 0, "logical", |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
181 "plots", "P", 1, "character", |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
182 "libinfoOpt", "L", 0, "logical"), |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
183 byrow=TRUE, ncol=4) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
184 opt <- getopt(spec) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
185 |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
186 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
187 if (is.null(opt$matrixPath) & is.null(opt$filesPath)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
188 cat("A counts matrix (or a set of counts files) is required.\n") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
189 q(status=1) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
190 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
191 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
192 if (is.null(opt$cpmReq)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
193 filtCPM <- FALSE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
194 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
195 filtCPM <- TRUE |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
196 } |
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
197 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
198 if (is.null(opt$cntReq) || is.null(opt$sampleReq)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
199 filtSmpCount <- FALSE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
200 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
201 filtSmpCount <- TRUE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
202 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
203 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
204 if (is.null(opt$totReq)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
205 filtTotCount <- FALSE |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
206 } else { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
207 filtTotCount <- TRUE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
208 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
209 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
210 if (is.null(opt$rdaOpt)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
211 wantRda <- FALSE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
212 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
213 wantRda <- TRUE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
214 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
215 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
216 if (is.null(opt$annoPath)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
217 haveAnno <- FALSE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
218 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
219 haveAnno <- TRUE |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
220 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
221 |
12
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
222 if (is.null(opt$filtCounts)) { |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
223 wantFilt <- FALSE |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
224 } else { |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
225 wantFilt <- TRUE |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
226 } |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
227 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
228 if (is.null(opt$normCounts)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
229 wantNorm <- FALSE |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
230 } else { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
231 wantNorm <- TRUE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
232 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
233 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
234 if (is.null(opt$robOpt)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
235 wantRobust <- FALSE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
236 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
237 wantRobust <- TRUE |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
238 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
239 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
240 if (is.null(opt$weightOpt)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
241 wantWeight <- FALSE |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
242 } else { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
243 wantWeight <- TRUE |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
244 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
245 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
246 if (is.null(opt$trend)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
247 wantTrend <- FALSE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
248 deMethod <- "limma-voom" |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
249 } else { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
250 wantTrend <- TRUE |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
251 deMethod <- "limma-trend" |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
252 priorCount <- opt$trend |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
253 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
254 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
255 if (is.null(opt$treatOpt)) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
256 wantTreat <- FALSE |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
257 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
258 wantTreat <- TRUE |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
259 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
260 |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
261 if (is.null(opt$libinfoOpt)) { |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
262 wantLibinfo <- FALSE |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
263 } else { |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
264 wantLibinfo <- TRUE |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
265 } |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
266 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
267 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
268 if (!is.null(opt$filesPath)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
269 # Process the separate count files (adapted from DESeq2 wrapper) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
270 library("rjson") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
271 parser <- newJSONParser() |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
272 parser$addData(opt$filesPath) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
273 factorList <- parser$getObject() |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
274 factors <- sapply(factorList, function(x) x[[1]]) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
275 filenamesIn <- unname(unlist(factorList[[1]][[2]])) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
276 sampleTable <- data.frame(sample=basename(filenamesIn), |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
277 filename=filenamesIn, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
278 row.names=filenamesIn, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
279 stringsAsFactors=FALSE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
280 for (factor in factorList) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
281 factorName <- factor[[1]] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
282 sampleTable[[factorName]] <- character(nrow(sampleTable)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
283 lvls <- sapply(factor[[2]], function(x) names(x)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
284 for (i in seq_along(factor[[2]])) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
285 files <- factor[[2]][[i]][[1]] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
286 sampleTable[files,factorName] <- lvls[i] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
287 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
288 sampleTable[[factorName]] <- factor(sampleTable[[factorName]], levels=lvls) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
289 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
290 rownames(sampleTable) <- sampleTable$sample |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
291 rem <- c("sample","filename") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
292 factors <- sampleTable[, !(names(sampleTable) %in% rem), drop=FALSE] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
293 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
294 #read in count files and create single table |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
295 countfiles <- lapply(sampleTable$filename, function(x){read.delim(x, row.names=1)}) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
296 counts <- do.call("cbind", countfiles) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
297 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
298 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
299 # Process the single count matrix |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
300 counts <- read.table(opt$matrixPath, header=TRUE, sep="\t", strip.white=TRUE, stringsAsFactors=FALSE) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
301 row.names(counts) <- counts[, 1] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
302 counts <- counts[ , -1] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
303 countsRows <- nrow(counts) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
304 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
305 # Process factors |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
306 if (is.null(opt$factInput)) { |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
307 factorData <- read.table(opt$factFile, header=TRUE, sep="\t", strip.white=TRUE) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
308 factors <- factorData[, -1, drop=FALSE] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
309 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
310 factors <- unlist(strsplit(opt$factInput, "|", fixed=TRUE)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
311 factorData <- list() |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
312 for (fact in factors) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
313 newFact <- unlist(strsplit(fact, split="::")) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
314 factorData <- rbind(factorData, newFact) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
315 } # Factors have the form: FACT_NAME::LEVEL,LEVEL,LEVEL,LEVEL,... The first factor is the Primary Factor. |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
316 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
317 # Set the row names to be the name of the factor and delete first row |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
318 row.names(factorData) <- factorData[, 1] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
319 factorData <- factorData[, -1] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
320 factorData <- sapply(factorData, sanitiseGroups) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
321 factorData <- sapply(factorData, strsplit, split=",") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
322 factorData <- sapply(factorData, make.names) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
323 # Transform factor data into data frame of R factor objects |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
324 factors <- data.frame(factorData) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
325 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
326 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
327 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
328 # if annotation file provided |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
329 if (haveAnno) { |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
330 geneanno <- read.table(opt$annoPath, header=TRUE, sep="\t", quote= "", strip.white=TRUE, stringsAsFactors=FALSE) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
331 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
332 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
333 #Create output directory |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
334 dir.create(opt$outPath, showWarnings=FALSE) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
335 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
336 # Split up contrasts seperated by comma into a vector then sanitise |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
337 contrastData <- unlist(strsplit(opt$contrastData, split=",")) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
338 contrastData <- sanitiseEquation(contrastData) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
339 contrastData <- gsub(" ", ".", contrastData, fixed=TRUE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
340 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
341 plots <- character() |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
342 if (!is.null(opt$plots)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
343 plots <- unlist(strsplit(opt$plots, split=",")) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
344 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
345 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
346 denOutPng <- makeOut("densityplots.png") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
347 denOutPdf <- makeOut("densityplots.pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
348 cpmOutPdf <- makeOut("cpmplots.pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
349 boxOutPng <- makeOut("boxplots.png") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
350 boxOutPdf <- makeOut("boxplots.pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
351 mdsscreeOutPng <- makeOut("mdsscree.png") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
352 mdsscreeOutPdf <- makeOut("mdsscree.pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
353 mdsxOutPdf <- makeOut("mdsplot_extra.pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
354 mdsxOutPng <- makeOut("mdsplot_extra.png") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
355 mdsamOutPdf <- makeOut("mdplots_samples.pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
356 mdOutPdf <- character() # Initialise character vector |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
357 volOutPdf <- character() |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
358 heatOutPdf <- character() |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
359 stripOutPdf <- character() |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
360 mdvolOutPng <- character() |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
361 topOut <- character() |
9
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
362 glimmaOut <- character() |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
363 for (i in 1:length(contrastData)) { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
364 con <- contrastData[i] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
365 con <- gsub("\\(|\\)", "", con) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
366 mdOutPdf[i] <- makeOut(paste0("mdplot_", con, ".pdf")) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
367 volOutPdf[i] <- makeOut(paste0("volplot_", con, ".pdf")) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
368 heatOutPdf[i] <- makeOut(paste0("heatmap_", con, ".pdf")) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
369 stripOutPdf[i] <- makeOut(paste0("stripcharts_", con, ".pdf")) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
370 mdvolOutPng[i] <- makeOut(paste0("mdvolplot_", con, ".png")) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
371 topOut[i] <- makeOut(paste0(deMethod, "_", con, ".tsv")) |
9
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
372 glimmaOut[i] <- makeOut(paste0("glimma_", con, "/MD-Plot.html")) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
373 } |
13
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
374 filtOut <- makeOut(paste0(deMethod, "_", "filtcounts")) |
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
375 normOut <- makeOut(paste0(deMethod, "_", "normcounts")) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
376 rdaOut <- makeOut(paste0(deMethod, "_analysis.RData")) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
377 sessionOut <- makeOut("session_info.txt") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
378 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
379 # Initialise data for html links and images, data frame with columns Label and |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
380 # Link |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
381 linkData <- data.frame(Label=character(), Link=character(), |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
382 stringsAsFactors=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
383 imageData <- data.frame(Label=character(), Link=character(), |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
384 stringsAsFactors=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
385 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
386 # Initialise vectors for storage of up/down/neutral regulated counts |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
387 upCount <- numeric() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
388 downCount <- numeric() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
389 flatCount <- numeric() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
390 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
391 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
392 ### Data Processing |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
393 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
394 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
395 # Extract counts and annotation data |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
396 print("Extracting counts") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
397 data <- list() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
398 data$counts <- counts |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
399 if (haveAnno) { |
4
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
400 # order annotation by genes in counts (assumes gene ids are in 1st column of geneanno) |
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
401 annoord <- geneanno[match(row.names(counts), geneanno[,1]), ] |
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
402 data$genes <- annoord |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
403 } else { |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
404 data$genes <- data.frame(GeneID=row.names(counts)) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
405 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
406 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
407 # Creating naming data |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
408 samplenames <- colnames(data$counts) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
409 sampleanno <- data.frame("sampleID"=samplenames, factors) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
410 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
411 # Creating colours for the groups |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
412 cols <- as.numeric(factors[, 1]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
413 col.group <- palette()[cols] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
414 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
415 # If filter crieteria set, filter out genes that do not have a required cpm/counts in a required number of |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
416 # samples. Default is no filtering |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
417 preFilterCount <- nrow(data$counts) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
418 nsamples <- ncol(data$counts) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
419 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
420 if (filtCPM || filtSmpCount || filtTotCount) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
421 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
422 if (filtTotCount) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
423 keep <- rowSums(data$counts) >= opt$cntReq |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
424 } else if (filtSmpCount) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
425 keep <- rowSums(data$counts >= opt$cntReq) >= opt$sampleReq |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
426 } else if (filtCPM) { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
427 myCPM <- cpm(data$counts) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
428 thresh <- myCPM >= opt$cpmReq |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
429 keep <- rowSums(thresh) >= opt$sampleReq |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
430 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
431 if ("c" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
432 # Plot CPM vs raw counts (to check threshold) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
433 pdf(cpmOutPdf, width=6.5, height=10) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
434 par(mfrow=c(3, 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
435 for (i in 1:nsamples) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
436 plot(data$counts[, i], myCPM[, i], xlim=c(0,50), ylim=c(0,3), main=samplenames[i], xlab="Raw counts", ylab="CPM") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
437 abline(v=10, col="red", lty=2, lwd=2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
438 abline(h=opt$cpmReq, col=4) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
439 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
440 linkName <- "CpmPlots.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
441 linkAddr <- "cpmplots.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
442 linkData <- rbind(linkData, data.frame(Label=linkName, Link=linkAddr, stringsAsFactors=FALSE)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
443 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
444 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
445 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
446 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
447 data$counts <- data$counts[keep, ] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
448 data$genes <- data$genes[keep, , drop=FALSE] |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
449 |
12
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
450 if (wantFilt) { |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
451 print("Outputting filtered counts") |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
452 filt_counts <- data.frame(data$genes, data$counts) |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
453 write.table(filt_counts, file=filtOut, row.names=FALSE, sep="\t", quote=FALSE) |
13
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
454 linkData <- rbind(linkData, data.frame(Label=paste0(deMethod, "_", "filtcounts.tsv"), Link=paste0(deMethod, "_", "filtcounts"), stringsAsFactors=FALSE)) |
12
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
455 } |
81796eb60bd0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
iuc
parents:
11
diff
changeset
|
456 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
457 # Plot Density |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
458 if ("d" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
459 # PNG |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
460 png(denOutPng, width=1000, height=500) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
461 par(mfrow=c(1,2), cex.axis=0.8) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
462 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
463 # before filtering |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
464 lcpm1 <- cpm(counts, log=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
465 plot(density(lcpm1[, 1]), col=col.group[1], lwd=2, las=2, main="", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
466 title(main="Density Plot: Raw counts", xlab="Log-cpm") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
467 for (i in 2:nsamples){ |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
468 den <- density(lcpm1[, i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
469 lines(den$x, den$y, col=col.group[i], lwd=2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
470 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
471 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
472 # after filtering |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
473 lcpm2 <- cpm(data$counts, log=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
474 plot(density(lcpm2[,1]), col=col.group[1], lwd=2, las=2, main="", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
475 title(main="Density Plot: Filtered counts", xlab="Log-cpm") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
476 for (i in 2:nsamples){ |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
477 den <- density(lcpm2[, i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
478 lines(den$x, den$y, col=col.group[i], lwd=2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
479 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
480 legend("topright", samplenames, text.col=col.group, bty="n") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
481 imgName <- "Densityplots.png" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
482 imgAddr <- "densityplots.png" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
483 imageData <- rbind(imageData, data.frame(Label=imgName, Link=imgAddr, stringsAsFactors=FALSE)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
484 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
485 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
486 # PDF |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
487 pdf(denOutPdf, width=14) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
488 par(mfrow=c(1,2), cex.axis=0.8) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
489 plot(density(lcpm1[, 1]), col=col.group[1], lwd=2, las=2, main="", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
490 title(main="Density Plot: Raw counts", xlab="Log-cpm") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
491 for (i in 2:nsamples){ |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
492 den <- density(lcpm1[, i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
493 lines(den$x, den$y, col=col.group[i], lwd=2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
494 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
495 plot(density(lcpm2[, 1]), col=col.group[1], lwd=2, las=2, main="", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
496 title(main="Density Plot: Filtered counts", xlab="Log-cpm") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
497 for (i in 2:nsamples){ |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
498 den <- density(lcpm2[, i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
499 lines(den$x, den$y, col=col.group[i], lwd=2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
500 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
501 legend("topright", samplenames, text.col=col.group, bty="n") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
502 linkName <- "DensityPlots.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
503 linkAddr <- "densityplots.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
504 linkData <- rbind(linkData, data.frame(Label=linkName, Link=linkAddr, stringsAsFactors=FALSE)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
505 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
506 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
507 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
508 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
509 postFilterCount <- nrow(data$counts) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
510 filteredCount <- preFilterCount-postFilterCount |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
511 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
512 # Generating the DGEList object "y" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
513 print("Generating DGEList object") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
514 data$samples <- sampleanno |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
515 data$samples$lib.size <- colSums(data$counts) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
516 data$samples$norm.factors <- 1 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
517 row.names(data$samples) <- colnames(data$counts) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
518 y <- new("DGEList", data) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
519 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
520 print("Generating Design") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
521 # Name rows of factors according to their sample |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
522 row.names(factors) <- names(data$counts) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
523 factorList <- sapply(names(factors), pasteListName) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
524 formula <- "~0" |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
525 for (i in 1:length(factorList)) { |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
526 formula <- paste(formula,factorList[i], sep="+") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
527 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
528 formula <- formula(formula) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
529 design <- model.matrix(formula) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
530 for (i in 1:length(factorList)) { |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
531 colnames(design) <- gsub(factorList[i], "", colnames(design), fixed=TRUE) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
532 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
533 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
534 # Calculating normalising factors |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
535 print("Calculating Normalisation Factors") |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
536 logcounts <- y #store for plots |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
537 y <- calcNormFactors(y, method=opt$normOpt) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
538 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
539 # Generate contrasts information |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
540 print("Generating Contrasts") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
541 contrasts <- makeContrasts(contrasts=contrastData, levels=design) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
542 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
543 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
544 ### Data Output |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
545 ################################################################################ |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
546 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
547 # Plot Box plots (before and after normalisation) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
548 if (opt$normOpt != "none" & "b" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
549 png(boxOutPng, width=1000, height=500) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
550 par(mfrow=c(1,2), mar=c(6,4,2,2)+0.1) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
551 labels <- colnames(counts) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
552 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
553 lcpm1 <- cpm(y$counts, log=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
554 boxplot(lcpm1, las=2, col=col.group, xaxt="n", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
555 axis(1, at=seq_along(labels), labels = FALSE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
556 abline(h=median(lcpm1), col=4) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
557 text(x=seq_along(labels), y=par("usr")[3]-1, srt=45, adj=1, labels=labels, xpd=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
558 title(main="Box Plot: Unnormalised counts", ylab="Log-cpm") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
559 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
560 lcpm2 <- cpm(y, log=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
561 boxplot(lcpm2, las=2, col=col.group, xaxt="n", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
562 axis(1, at=seq_along(labels), labels = FALSE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
563 text(x=seq_along(labels), y=par("usr")[3]-1, srt=45, adj=1, labels=labels, xpd=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
564 abline(h=median(lcpm2), col=4) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
565 title(main="Box Plot: Normalised counts", ylab="Log-cpm") |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
566 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
567 imgName <- "Boxplots.png" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
568 imgAddr <- "boxplots.png" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
569 imageData <- rbind(imageData, data.frame(Label=imgName, Link=imgAddr, stringsAsFactors=FALSE)) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
570 invisible(dev.off()) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
571 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
572 pdf(boxOutPdf, width=14) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
573 par(mfrow=c(1,2), mar=c(6,4,2,2)+0.1) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
574 boxplot(lcpm1, las=2, col=col.group, xaxt="n", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
575 axis(1, at=seq_along(labels), labels = FALSE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
576 abline(h=median(lcpm1), col=4) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
577 text(x=seq_along(labels), y=par("usr")[3]-1, srt=45, adj=1, labels=labels, xpd=TRUE) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
578 title(main="Box Plot: Unnormalised counts", ylab="Log-cpm") |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
579 boxplot(lcpm2, las=2, col=col.group, xaxt="n", xlab="") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
580 axis(1, at=seq_along(labels), labels = FALSE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
581 text(x=seq_along(labels), y=par("usr")[3]-1, srt=45, adj=1, labels=labels, xpd=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
582 abline(h=median(lcpm2), col=4) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
583 title(main="Box Plot: Normalised counts", ylab="Log-cpm") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
584 linkName <- "BoxPlots.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
585 linkAddr <- "boxplots.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
586 linkData <- rbind(linkData, data.frame(Label=linkName, Link=linkAddr, stringsAsFactors=FALSE)) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
587 invisible(dev.off()) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
588 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
589 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
590 # Plot MDS |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
591 print("Generating MDS plot") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
592 labels <- names(counts) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
593 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
594 # Scree plot (Variance Explained) code copied from Glimma |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
595 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
596 # get column of matrix |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
597 getCols <- function(x, inds) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
598 x[, inds, drop=FALSE] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
599 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
600 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
601 x <- cpm(y, log=TRUE) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
602 ndim <- nsamples - 1 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
603 nprobes <- nrow(x) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
604 top <- 500 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
605 top <- min(top, nprobes) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
606 cn <- colnames(x) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
607 bad <- rowSums(is.finite(x)) < nsamples |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
608 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
609 if (any(bad)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
610 warning("Rows containing infinite values have been removed") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
611 x <- x[!bad, , drop=FALSE] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
612 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
613 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
614 dd <- matrix(0, nrow=nsamples, ncol=nsamples, dimnames=list(cn, cn)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
615 topindex <- nprobes - top + 1L |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
616 for (i in 2L:(nsamples)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
617 for (j in 1L:(i - 1L)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
618 dists <- (getCols(x, i) - getCols(x, j))^2 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
619 dists <- sort.int(dists, partial = topindex ) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
620 topdist <- dists[topindex:nprobes] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
621 dd[i, j] <- sqrt(mean(topdist)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
622 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
623 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
624 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
625 a1 <- suppressWarnings(cmdscale(as.dist(dd), k=min(ndim, 8), eig=TRUE)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
626 eigen <- data.frame(name = 1:min(ndim, 8), eigen = round(a1$eig[1:min(ndim, 8)]/sum(a1$eig), 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
627 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
628 png(mdsscreeOutPng, width=1000, height=500) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
629 par(mfrow=c(1, 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
630 plotMDS(y, labels=samplenames, col=as.numeric(factors[, 1]), main="MDS Plot: Dims 1 and 2") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
631 barplot(eigen$eigen, names.arg=eigen$name, main = "Scree Plot: Variance Explained", xlab = "Dimension", ylab = "Proportion", las=1) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
632 imgName <- paste0("MDSPlot_", names(factors)[1], ".png") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
633 imgAddr <- "mdsscree.png" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
634 imageData <- rbind(imageData, data.frame(Label=imgName, Link=imgAddr, stringsAsFactors=FALSE)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
635 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
636 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
637 pdf(mdsscreeOutPdf, width=14) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
638 par(mfrow=c(1, 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
639 plotMDS(y, labels=samplenames, col=as.numeric(factors[, 1]), main="MDS Plot: Dims 1 and 2") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
640 barplot(eigen$eigen, names.arg=eigen$name, main = "Scree Plot: Variance Explained", xlab = "Dimension", ylab = "Proportion", las=1) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
641 linkName <- paste0("MDSPlot_", names(factors)[1], ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
642 linkAddr <- "mdsscree.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
643 linkData <- rbind(linkData, data.frame(Label=linkName, Link=linkAddr, stringsAsFactors=FALSE)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
644 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
645 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
646 if ("x" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
647 png(mdsxOutPng, width=1000, height=500) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
648 par(mfrow=c(1, 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
649 for (i in 2:3) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
650 dim1 <- i |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
651 dim2 <- i + 1 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
652 plotMDS(y, dim=c(dim1, dim2), labels=samplenames, col=as.numeric(factors[, 1]), main=paste("MDS Plot: Dims", dim1, "and", dim2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
653 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
654 imgName <- paste0("MDSPlot_extra.png") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
655 imgAddr <- paste0("mdsplot_extra.png") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
656 imageData <- rbind(imageData, data.frame(Label=imgName, Link=imgAddr, stringsAsFactors=FALSE)) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
657 invisible(dev.off()) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
658 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
659 pdf(mdsxOutPdf, width=14) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
660 par(mfrow=c(1, 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
661 for (i in 2:3) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
662 dim1 <- i |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
663 dim2 <- i + 1 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
664 plotMDS(y, dim=c(dim1, dim2), labels=samplenames, col=as.numeric(factors[, 1]), main=paste("MDS Plot: Dims", dim1, "and", dim2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
665 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
666 linkName <- "MDSPlot_extra.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
667 linkAddr <- "mdsplot_extra.pdf" |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
668 linkData <- rbind(linkData, data.frame(Label=linkName, Link=linkAddr, stringsAsFactors=FALSE)) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
669 invisible(dev.off()) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
670 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
671 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
672 if ("m" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
673 # Plot MD plots for individual samples |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
674 print("Generating MD plots for samples") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
675 pdf(mdsamOutPdf, width=6.5, height=10) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
676 par(mfrow=c(3, 2)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
677 for (i in 1:nsamples) { |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
678 if (opt$normOpt != "none") { |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
679 plotMD(logcounts, column=i, main=paste(colnames(logcounts)[i], "(before)")) |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
680 abline(h=0, col="red", lty=2, lwd=2) |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
681 } |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
682 plotMD(y, column=i) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
683 abline(h=0, col="red", lty=2, lwd=2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
684 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
685 linkName <- "MDPlots_Samples.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
686 linkAddr <- "mdplots_samples.pdf" |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
687 linkData <- rbind(linkData, c(linkName, linkAddr)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
688 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
689 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
690 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
691 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
692 if (wantTrend) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
693 # limma-trend approach |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
694 logCPM <- cpm(y, log=TRUE, prior.count=opt$trend) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
695 fit <- lmFit(logCPM, design) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
696 fit$genes <- y$genes |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
697 fit <- contrasts.fit(fit, contrasts) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
698 if (wantRobust) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
699 fit <- eBayes(fit, trend=TRUE, robust=TRUE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
700 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
701 fit <- eBayes(fit, trend=TRUE, robust=FALSE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
702 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
703 # plot fit with plotSA |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
704 saOutPng <- makeOut("saplot.png") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
705 saOutPdf <- makeOut("saplot.pdf") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
706 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
707 png(saOutPng, width=500, height=500) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
708 plotSA(fit, main="SA Plot") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
709 imgName <- "SAPlot.png" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
710 imgAddr <- "saplot.png" |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
711 imageData <- rbind(imageData, c(imgName, imgAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
712 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
713 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
714 pdf(saOutPdf, width=14) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
715 plotSA(fit, main="SA Plot") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
716 linkName <- "SAPlot.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
717 linkAddr <- "saplot.pdf" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
718 linkData <- rbind(linkData, c(linkName, linkAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
719 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
720 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
721 plotData <- logCPM |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
722 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
723 # Save normalised counts (log2cpm) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
724 if (wantNorm) { |
4
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
725 write.table(logCPM, file=normOut, row.names=TRUE, sep="\t", quote=FALSE) |
13
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
726 linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts")))) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
727 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
728 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
729 # limma-voom approach |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
730 voomOutPdf <- makeOut("voomplot.pdf") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
731 voomOutPng <- makeOut("voomplot.png") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
732 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
733 if (wantWeight) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
734 # Creating voom data object and plot |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
735 png(voomOutPng, width=1000, height=500) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
736 vData <- voomWithQualityWeights(y, design=design, plot=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
737 imgName <- "VoomPlot.png" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
738 imgAddr <- "voomplot.png" |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
739 imageData <- rbind(imageData, c(imgName, imgAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
740 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
741 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
742 pdf(voomOutPdf, width=14) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
743 vData <- voomWithQualityWeights(y, design=design, plot=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
744 linkName <- "VoomPlot.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
745 linkAddr <- "voomplot.pdf" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
746 linkData <- rbind(linkData, c(linkName, linkAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
747 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
748 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
749 # Generating fit data and top table with weights |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
750 wts <- vData$weights |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
751 voomFit <- lmFit(vData, design, weights=wts) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
752 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
753 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
754 # Creating voom data object and plot |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
755 png(voomOutPng, width=500, height=500) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
756 vData <- voom(y, design=design, plot=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
757 imgName <- "VoomPlot" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
758 imgAddr <- "voomplot.png" |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
759 imageData <- rbind(imageData, c(imgName, imgAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
760 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
761 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
762 pdf(voomOutPdf) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
763 vData <- voom(y, design=design, plot=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
764 linkName <- "VoomPlot.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
765 linkAddr <- "voomplot.pdf" |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
766 linkData <- rbind(linkData, c(linkName, linkAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
767 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
768 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
769 # Generate voom fit |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
770 voomFit <- lmFit(vData, design) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
771 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
772 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
773 # Save normalised counts (log2cpm) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
774 if (wantNorm) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
775 norm_counts <- data.frame(vData$genes, vData$E) |
4
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
776 write.table(norm_counts, file=normOut, row.names=FALSE, sep="\t", quote=FALSE) |
13
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
777 linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts")))) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
778 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
779 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
780 # Fit linear model and estimate dispersion with eBayes |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
781 voomFit <- contrasts.fit(voomFit, contrasts) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
782 if (wantRobust) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
783 fit <- eBayes(voomFit, robust=TRUE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
784 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
785 fit <- eBayes(voomFit, robust=FALSE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
786 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
787 plotData <- vData |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
788 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
789 |
11
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
790 # Save library size info |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
791 if (wantLibinfo) { |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
792 efflibsize <- round(y$samples$lib.size * y$samples$norm.factors) |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
793 libsizeinfo <- cbind(y$samples, EffectiveLibrarySize=efflibsize) |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
794 libsizeinfo$lib.size <- round(libsizeinfo$lib.size) |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
795 names(libsizeinfo)[names(libsizeinfo)=="sampleID"] <- "SampleID" |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
796 names(libsizeinfo)[names(libsizeinfo)=="lib.size"] <- "LibrarySize" |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
797 names(libsizeinfo)[names(libsizeinfo)=="norm.factors"] <- "NormalisationFactor" |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
798 write.table(libsizeinfo, file="libsizeinfo", row.names=FALSE, sep="\t", quote=FALSE) |
7e8af58c8052
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 4bcbd83574ecf7194f3370aa883a9573563afdbc
iuc
parents:
10
diff
changeset
|
799 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
800 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
801 print("Generating DE results") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
802 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
803 if (wantTreat) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
804 print("Applying TREAT method") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
805 if (wantRobust) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
806 fit <- treat(fit, lfc=opt$lfcReq, robust=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
807 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
808 fit <- treat(fit, lfc=opt$lfcReq, robust=FALSE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
809 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
810 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
811 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
812 status = decideTests(fit, adjust.method=opt$pAdjOpt, p.value=opt$pValReq, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
813 lfc=opt$lfcReq) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
814 sumStatus <- summary(status) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
815 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
816 for (i in 1:length(contrastData)) { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
817 con <- contrastData[i] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
818 con <- gsub("\\(|\\)", "", con) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
819 # Collect counts for differential expression |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
820 upCount[i] <- sumStatus["Up", i] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
821 downCount[i] <- sumStatus["Down", i] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
822 flatCount[i] <- sumStatus["NotSig", i] |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
823 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
824 # Write top expressions table |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
825 if (wantTreat) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
826 top <- topTreat(fit, coef=i, number=Inf, sort.by="P") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
827 } else{ |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
828 top <- topTable(fit, coef=i, number=Inf, sort.by="P") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
829 } |
4
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
830 write.table(top, file=topOut[i], row.names=FALSE, sep="\t", quote=FALSE) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
831 linkName <- paste0(deMethod, "_", con, ".tsv") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
832 linkAddr <- paste0(deMethod, "_", con, ".tsv") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
833 linkData <- rbind(linkData, c(linkName, linkAddr)) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
834 |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
835 # Plot MD (log ratios vs mean average) using limma package on weighted |
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
836 pdf(mdOutPdf[i]) |
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
837 limma::plotMD(fit, status=status[, i], coef=i, |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
838 main=paste("MD Plot:", unmake.names(con)), |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
839 hl.col=alpha(c("firebrick", "blue"), 0.4), values=c(1, -1), |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
840 xlab="Average Expression", ylab="logFC") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
841 abline(h=0, col="grey", lty=2) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
842 linkName <- paste0("MDPlot_", con, ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
843 linkAddr <- paste0("mdplot_", con, ".pdf") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
844 linkData <- rbind(linkData, c(linkName, linkAddr)) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
845 invisible(dev.off()) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
846 |
10
e26047c4562d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit c31767d02eeeda7346bb33ba71ebde9189d7e4a3
iuc
parents:
9
diff
changeset
|
847 # Generate Glimma interactive MD plot and table, requires annotation file (assumes gene labels/symbols in 2nd column) |
9
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
848 if (haveAnno) { |
10
e26047c4562d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit c31767d02eeeda7346bb33ba71ebde9189d7e4a3
iuc
parents:
9
diff
changeset
|
849 # make gene labels unique to handle NAs |
e26047c4562d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit c31767d02eeeda7346bb33ba71ebde9189d7e4a3
iuc
parents:
9
diff
changeset
|
850 geneanno <- y$genes |
e26047c4562d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit c31767d02eeeda7346bb33ba71ebde9189d7e4a3
iuc
parents:
9
diff
changeset
|
851 geneanno[, 2] <- make.unique(geneanno[, 2]) |
e26047c4562d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit c31767d02eeeda7346bb33ba71ebde9189d7e4a3
iuc
parents:
9
diff
changeset
|
852 Glimma::glMDPlot(fit, coef=i, counts=y$counts, anno=geneanno, groups=factors[, 1], |
9
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
853 status=status[, i], sample.cols=col.group, |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
854 main=paste("MD Plot:", unmake.names(con)), side.main=colnames(y$genes)[2], |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
855 folder=paste0("glimma_", unmake.names(con)), launch=FALSE) |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
856 linkName <- paste0("Glimma_MDPlot_", con, ".html") |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
857 linkAddr <- paste0("glimma_", con, "/MD-Plot.html") |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
858 linkData <- rbind(linkData, c(linkName, linkAddr)) |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
859 } |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
860 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
861 # Plot Volcano |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
862 pdf(volOutPdf[i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
863 if (haveAnno) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
864 # labels must be in second column currently |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
865 labels <- fit$genes[, 2] |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
866 } else { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
867 labels <- fit$genes$GeneID |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
868 } |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
869 limma::volcanoplot(fit, coef=i, |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
870 main=paste("Volcano Plot:", unmake.names(con)), |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
871 highlight=opt$topgenes, |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
872 names=labels) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
873 linkName <- paste0("VolcanoPlot_", con, ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
874 linkAddr <- paste0("volplot_", con, ".pdf") |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
875 linkData <- rbind(linkData, c(linkName, linkAddr)) |
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
876 invisible(dev.off()) |
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
877 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
878 # PNG of MD and Volcano |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
879 png(mdvolOutPng[i], width=1000, height=500) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
880 par(mfrow=c(1, 2), mar=c(5,4,2,2)+0.1, oma=c(0,0,3,0)) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
881 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
882 # MD plot |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
883 limma::plotMD(fit, status=status[, i], coef=i, main="MD Plot", |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
884 hl.col=alpha(c("firebrick", "blue"), 0.4), values=c(1, -1), |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
885 xlab="Average Expression", ylab="logFC") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
886 abline(h=0, col="grey", lty=2) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
887 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
888 # Volcano |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
889 if (haveAnno) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
890 # labels must be in second column currently |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
891 limma::volcanoplot(fit, coef=i, main="Volcano Plot", |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
892 highlight=opt$topgenes, |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
893 names=fit$genes[, 2]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
894 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
895 limma::volcanoplot(fit, coef=i, main="Volcano Plot", |
7
e6a4ff41af6b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit cf399638ebca4250bcc15f468238a9964de97b33
iuc
parents:
6
diff
changeset
|
896 highlight=opt$topgenes, |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
897 names=fit$genes$GeneID) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
898 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
899 |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
900 imgName <- paste0("MDVolPlot_", con) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
901 imgAddr <- paste0("mdvolplot_", con, ".png") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
902 imageData <- rbind(imageData, c(imgName, imgAddr)) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
903 title(paste0("Contrast: ", unmake.names(con)), outer=TRUE, cex.main=1.5) |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
904 invisible(dev.off()) |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
905 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
906 if ("h" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
907 # Plot Heatmap |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
908 topgenes <- rownames(top[1:opt$topgenes, ]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
909 if (wantTrend) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
910 topexp <- plotData[topgenes, ] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
911 } else { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
912 topexp <- plotData$E[topgenes, ] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
913 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
914 pdf(heatOutPdf[i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
915 mycol <- colorpanel(1000,"blue","white","red") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
916 if (haveAnno) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
917 # labels must be in second column currently |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
918 labels <- top[topgenes, 2] |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
919 } else { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
920 labels <- rownames(topexp) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
921 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
922 heatmap.2(topexp, scale="row", Colv=FALSE, Rowv=FALSE, dendrogram="none", |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
923 main=paste("Contrast:", unmake.names(con), "\nTop", opt$topgenes, "genes by adj.P.Val"), |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
924 trace="none", density.info="none", lhei=c(2,10), margin=c(8, 6), labRow=labels, cexRow=0.7, srtCol=45, |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
925 col=mycol, ColSideColors=col.group) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
926 linkName <- paste0("Heatmap_", con, ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
927 linkAddr <- paste0("heatmap_", con, ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
928 linkData <- rbind(linkData, c(linkName, linkAddr)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
929 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
930 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
931 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
932 if ("s" %in% plots) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
933 # Plot Stripcharts of top genes |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
934 pdf(stripOutPdf[i], title=paste("Contrast:", unmake.names(con))) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
935 par(mfrow = c(3,2), cex.main=0.8, cex.axis=0.8) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
936 cols <- unique(col.group) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
937 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
938 for (j in 1:length(topgenes)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
939 lfc <- round(top[topgenes[j], "logFC"], 2) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
940 pval <- round(top[topgenes[j], "adj.P.Val"], 5) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
941 if (wantTrend) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
942 stripchart(plotData[topgenes[j], ] ~ factors[, 1], vertical=TRUE, las=2, pch=16, cex=0.8, cex.lab=0.8, col=cols, |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
943 method="jitter", ylab="Normalised log2 expression", main=paste0(labels[j], "\nlogFC=", lfc, ", adj.P.Val=", pval)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
944 } else { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
945 stripchart(plotData$E[topgenes[j], ] ~ factors[, 1], vertical=TRUE, las=2, pch=16, cex=0.8, cex.lab=0.8, col=cols, |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
946 method="jitter", ylab="Normalised log2 expression", main=paste0(labels[j], "\nlogFC=", lfc, ", adj.P.Val=", pval)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
947 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
948 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
949 linkName <- paste0("Stripcharts_", con, ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
950 linkAddr <- paste0("stripcharts_", con, ".pdf") |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
951 linkData <- rbind(linkData, c(linkName, linkAddr)) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
952 invisible(dev.off()) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
953 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
954 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
955 sigDiff <- data.frame(Up=upCount, Flat=flatCount, Down=downCount) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
956 row.names(sigDiff) <- contrastData |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
957 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
958 # Save relevant items as rda object |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
959 if (wantRda) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
960 print("Saving RData") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
961 if (wantWeight) { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
962 save(counts, data, y, status, plotData, labels, factors, wts, fit, top, contrastData, contrasts, design, |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
963 file=rdaOut, ascii=TRUE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
964 } else { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
965 save(counts, data, y, status, plotData, labels, factors, fit, top, contrastData, contrasts, design, |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
966 file=rdaOut, ascii=TRUE) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
967 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
968 linkData <- rbind(linkData, c((paste0(deMethod, "_analysis.RData")), (paste0(deMethod, "_analysis.RData")))) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
969 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
970 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
971 # Record session info |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
972 writeLines(capture.output(sessionInfo()), sessionOut) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
973 linkData <- rbind(linkData, c("Session Info", "session_info.txt")) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
974 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
975 # Record ending time and calculate total run time |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
976 timeEnd <- as.character(Sys.time()) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
977 timeTaken <- capture.output(round(difftime(timeEnd,timeStart), digits=3)) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
978 timeTaken <- gsub("Time difference of ", "", timeTaken, fixed=TRUE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
979 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
980 ### HTML Generation |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
981 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
982 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
983 # Clear file |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
984 cat("", file=opt$htmlPath) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
985 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
986 cata("<html>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
987 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
988 cata("<body>\n") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
989 cata("<h3>Limma Analysis Output:</h3>\n") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
990 cata("Links to PDF copies of plots are in 'Plots' section below <br />\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
991 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
992 for (i in 1:nrow(imageData)) { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
993 if (grepl("density|box|mds|mdvol", imageData$Link[i])) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
994 HtmlImage(imageData$Link[i], imageData$Label[i], width=1000) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
995 } else if (wantWeight) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
996 HtmlImage(imageData$Link[i], imageData$Label[i], width=1000) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
997 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
998 HtmlImage(imageData$Link[i], imageData$Label[i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
999 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1000 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1001 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1002 cata("<h4>Differential Expression Counts:</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1003 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1004 cata("<table border=\"1\" cellpadding=\"4\">\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1005 cata("<tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1006 TableItem() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1007 for (i in colnames(sigDiff)) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1008 TableHeadItem(i) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1009 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1010 cata("</tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1011 for (i in 1:nrow(sigDiff)) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1012 cata("<tr>\n") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1013 TableHeadItem(unmake.names(row.names(sigDiff)[i])) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1014 for (j in 1:ncol(sigDiff)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1015 TableItem(as.character(sigDiff[i, j])) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1016 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1017 cata("</tr>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1018 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1019 cata("</table>") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1020 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1021 cata("<h4>Plots:</h4>\n") |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1022 #PDFs |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1023 for (i in 1:nrow(linkData)) { |
8
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1024 if (grepl("density|cpm|boxplot|mds|mdplots|voomplot|saplot", linkData$Link[i])) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1025 HtmlLink(linkData$Link[i], linkData$Label[i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1026 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1027 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1028 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1029 for (i in 1:nrow(linkData)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1030 if (grepl("mdplot_", linkData$Link[i])) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1031 HtmlLink(linkData$Link[i], linkData$Label[i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1032 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1033 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1034 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1035 for (i in 1:nrow(linkData)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1036 if (grepl("volplot", linkData$Link[i])) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1037 HtmlLink(linkData$Link[i], linkData$Label[i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1038 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1039 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1040 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1041 for (i in 1:nrow(linkData)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1042 if (grepl("heatmap", linkData$Link[i])) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1043 HtmlLink(linkData$Link[i], linkData$Label[i]) |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1044 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1045 } |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1046 |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1047 for (i in 1:nrow(linkData)) { |
00a42b66e522
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 48125e8638453668f889a67791421f14d3ebe623
iuc
parents:
7
diff
changeset
|
1048 if (grepl("stripcharts", linkData$Link[i])) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1049 HtmlLink(linkData$Link[i], linkData$Label[i]) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1050 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1051 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1052 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1053 cata("<h4>Tables:</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1054 for (i in 1:nrow(linkData)) { |
13
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
1055 if (grepl("counts$", linkData$Link[i])) { |
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
1056 HtmlLink(linkData$Link[i], linkData$Label[i]) |
d5a940112511
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
iuc
parents:
12
diff
changeset
|
1057 } else if (grepl(".tsv", linkData$Link[i])) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1058 HtmlLink(linkData$Link[i], linkData$Label[i]) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1059 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1060 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1061 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1062 if (wantRda) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1063 cata("<h4>R Data Object:</h4>\n") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1064 for (i in 1:nrow(linkData)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1065 if (grepl(".RData", linkData$Link[i])) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1066 HtmlLink(linkData$Link[i], linkData$Label[i]) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1067 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1068 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1069 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1070 |
9
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1071 cata("<h4>Glimma Interactive Results:</h4>\n") |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1072 for (i in 1:nrow(linkData)) { |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1073 if (grepl("glimma", linkData$Link[i])) { |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1074 HtmlLink(linkData$Link[i], linkData$Label[i]) |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1075 } |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1076 } |
4255881bebb1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f8052ab47b789da5ea47feb48e1b8e08b5fc1e0
iuc
parents:
8
diff
changeset
|
1077 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1078 cata("<p>Alt-click links to download file.</p>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1079 cata("<p>Click floppy disc icon associated history item to download ") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1080 cata("all files.</p>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1081 cata("<p>.tsv files can be viewed in Excel or any spreadsheet program.</p>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1082 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1083 cata("<h4>Additional Information</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1084 cata("<ul>\n") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1085 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1086 if (filtCPM || filtSmpCount || filtTotCount) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1087 if (filtCPM) { |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
1088 tempStr <- paste("Genes without more than", opt$cpmReq, |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1089 "CPM in at least", opt$sampleReq, "samples are insignificant", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1090 "and filtered out.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1091 } else if (filtSmpCount) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1092 tempStr <- paste("Genes without more than", opt$cntReq, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1093 "counts in at least", opt$sampleReq, "samples are insignificant", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1094 "and filtered out.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1095 } else if (filtTotCount) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1096 tempStr <- paste("Genes without more than", opt$cntReq, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1097 "counts, after summing counts for all samples, are insignificant", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1098 "and filtered out.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1099 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1100 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1101 ListItem(tempStr) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1102 filterProp <- round(filteredCount/preFilterCount*100, digits=2) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1103 tempStr <- paste0(filteredCount, " of ", preFilterCount," (", filterProp, |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1104 "%) genes were filtered out for low expression.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1105 ListItem(tempStr) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1106 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1107 ListItem(opt$normOpt, " was the method used to normalise library sizes.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1108 if (wantTrend) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1109 ListItem("The limma-trend method was used.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1110 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1111 ListItem("The limma-voom method was used.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1112 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1113 if (wantWeight) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1114 ListItem("Weights were applied to samples.") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1115 } else { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1116 ListItem("Weights were not applied to samples.") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1117 } |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1118 if (wantTreat) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1119 ListItem(paste("Testing significance relative to a fold-change threshold (TREAT) was performed using a threshold of log2 =", opt$lfcReq, "at FDR of", opt$pValReq, ".")) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1120 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1121 if (wantRobust) { |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1122 if (wantTreat) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1123 ListItem("TREAT was used with robust settings (robust=TRUE).") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1124 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1125 ListItem("eBayes was used with robust settings (robust=TRUE).") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
1126 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1127 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1128 if (opt$pAdjOpt!="none") { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1129 if (opt$pAdjOpt=="BH" || opt$pAdjOpt=="BY") { |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
1130 tempStr <- paste0("MD Plot highlighted genes are significant at FDR ", |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1131 "of ", opt$pValReq," and exhibit log2-fold-change of at ", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1132 "least ", opt$lfcReq, ".") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1133 ListItem(tempStr) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1134 } else if (opt$pAdjOpt=="holm") { |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
1135 tempStr <- paste0("MD Plot highlighted genes are significant at adjusted ", |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1136 "p-value of ", opt$pValReq," by the Holm(1979) ", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1137 "method, and exhibit log2-fold-change of at least ", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1138 opt$lfcReq, ".") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1139 ListItem(tempStr) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1140 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1141 } else { |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
1142 tempStr <- paste0("MD Plot highlighted genes are significant at p-value ", |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1143 "of ", opt$pValReq," and exhibit log2-fold-change of at ", |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1144 "least ", opt$lfcReq, ".") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1145 ListItem(tempStr) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1146 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1147 cata("</ul>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1148 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1149 cata("<h4>Summary of experimental data:</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1150 |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
1151 cata("<p>*CHECK THAT SAMPLES ARE ASSOCIATED WITH CORRECT GROUP(S)*</p>\n") |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1152 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1153 cata("<table border=\"1\" cellpadding=\"3\">\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1154 cata("<tr>\n") |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
1155 TableHeadItem("SampleID") |
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
1156 TableHeadItem(names(factors)[1]," (Primary Factor)") |
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
1157 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1158 if (ncol(factors) > 1) { |
2
a330ddf43861
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 346319bd01bfd51f02d656e653a93f0bd1e954aa
iuc
parents:
1
diff
changeset
|
1159 for (i in names(factors)[2:length(names(factors))]) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1160 TableHeadItem(i) |
2
a330ddf43861
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 346319bd01bfd51f02d656e653a93f0bd1e954aa
iuc
parents:
1
diff
changeset
|
1161 } |
a330ddf43861
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 346319bd01bfd51f02d656e653a93f0bd1e954aa
iuc
parents:
1
diff
changeset
|
1162 cata("</tr>\n") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1163 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1164 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1165 for (i in 1:nrow(factors)) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1166 cata("<tr>\n") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1167 TableHeadItem(row.names(factors)[i]) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1168 for (j in 1:ncol(factors)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1169 TableItem(as.character(unmake.names(factors[i, j]))) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1170 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1171 cata("</tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1172 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1173 cata("</table>") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1174 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1175 cit <- character() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1176 link <- character() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1177 link[1] <- paste0("<a href=\"", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1178 "http://www.bioconductor.org/packages/release/bioc/", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1179 "vignettes/limma/inst/doc/usersguide.pdf", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1180 "\">", "limma User's Guide", "</a>.") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1181 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1182 link[2] <- paste0("<a href=\"", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1183 "http://www.bioconductor.org/packages/release/bioc/", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1184 "vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1185 "\">", "edgeR User's Guide", "</a>") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1186 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1187 cit[1] <- paste("Please cite the following paper for this tool:") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1188 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1189 cit[2] <- paste("Liu R, Holik AZ, Su S, Jansz N, Chen K, Leong HS, Blewitt ME,", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1190 "Asselin-Labat ML, Smyth GK, Ritchie ME (2015). Why weight? ", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1191 "Modelling sample and observational level variability improves power ", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1192 "in RNA-seq analyses. Nucleic Acids Research, 43(15), e97.") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1193 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1194 cit[3] <- paste("Please cite the paper below for the limma software itself.", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1195 "Please also try to cite the appropriate methodology articles", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1196 "that describe the statistical methods implemented in limma,", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1197 "depending on which limma functions you are using. The", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1198 "methodology articles are listed in Section 2.1 of the", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1199 link[1], |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1200 "Cite no. 3 only if sample weights were used.") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1201 cit[4] <- paste("Smyth GK (2005). Limma: linear models for microarray data.", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1202 "In: 'Bioinformatics and Computational Biology Solutions using", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1203 "R and Bioconductor'. R. Gentleman, V. Carey, S. doit,.", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1204 "Irizarry, W. Huber (eds), Springer, New York, pages 397-420.") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1205 cit[5] <- paste("Please cite the first paper for the software itself and the", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1206 "other papers for the various original statistical methods", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1207 "implemented in edgeR. See Section 1.2 in the", link[2], |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1208 "for more detail.") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1209 cit[6] <- paste("Robinson MD, McCarthy DJ and Smyth GK (2010). edgeR: a", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1210 "Bioconductor package for differential expression analysis", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1211 "of digital gene expression data. Bioinformatics 26, 139-140") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1212 cit[7] <- paste("Robinson MD and Smyth GK (2007). Moderated statistical tests", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1213 "for assessing differences in tag abundance. Bioinformatics", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1214 "23, 2881-2887") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1215 cit[8] <- paste("Robinson MD and Smyth GK (2008). Small-sample estimation of", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1216 "negative binomial dispersion, with applications to SAGE data.", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1217 "Biostatistics, 9, 321-332") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1218 cit[9] <- paste("McCarthy DJ, Chen Y and Smyth GK (2012). Differential", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1219 "expression analysis of multifactor RNA-Seq experiments with", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1220 "respect to biological variation. Nucleic Acids Research 40,", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1221 "4288-4297") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1222 cit[10] <- paste("Law CW, Chen Y, Shi W, and Smyth GK (2014). Voom:", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1223 "precision weights unlock linear model analysis tools for", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1224 "RNA-seq read counts. Genome Biology 15, R29.") |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1225 cit[11] <- paste("Ritchie ME, Diyagama D, Neilson J, van Laar R,", |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1226 "Dobrovic A, Holloway A and Smyth GK (2006).", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1227 "Empirical array quality weights for microarray data.", |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1228 "BMC Bioinformatics 7, Article 261.") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1229 cata("<h3>Citations</h3>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1230 cata(cit[1], "\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1231 cata("<br>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1232 cata(cit[2], "\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1233 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1234 cata("<h4>limma</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1235 cata(cit[3], "\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1236 cata("<ol>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1237 ListItem(cit[4]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1238 ListItem(cit[10]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1239 ListItem(cit[11]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1240 cata("</ol>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1241 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1242 cata("<h4>edgeR</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1243 cata(cit[5], "\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1244 cata("<ol>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1245 ListItem(cit[6]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1246 ListItem(cit[7]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1247 ListItem(cit[8]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1248 ListItem(cit[9]) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1249 cata("</ol>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1250 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1251 cata("<p>Please report problems or suggestions to: su.s@wehi.edu.au</p>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1252 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1253 for (i in 1:nrow(linkData)) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1254 if (grepl("session_info", linkData$Link[i])) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1255 HtmlLink(linkData$Link[i], linkData$Label[i]) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
1256 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1257 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1258 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1259 cata("<table border=\"0\">\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1260 cata("<tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1261 TableItem("Task started at:"); TableItem(timeStart) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1262 cata("</tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1263 cata("<tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1264 TableItem("Task ended at:"); TableItem(timeEnd) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1265 cata("</tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1266 cata("<tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1267 TableItem("Task run time:"); TableItem(timeTaken) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1268 cata("<tr>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1269 cata("</table>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1270 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1271 cata("</body>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1272 cata("</html>") |