Mercurial > repos > iuc > limma_voom
annotate limma_voom.R @ 6:39fa12a6d885 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
author | iuc |
---|---|
date | Tue, 08 May 2018 18:12:40 -0400 |
parents | d8a55b5f0de0 |
children | e6a4ff41af6b |
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 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
25 # volhiOpt", "v", 1, "integer" -Integer specifying number of genes to highlight in volcano plot |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
26 # treatOpt", "T", 0, "logical" -String specifying if TREAT function shuld be used |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
27 # |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
28 # OUT: |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
29 # 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
|
30 # 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
|
31 # MD Plot |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
32 # 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
|
33 # 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
|
34 # Optional: |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
35 # 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
|
36 # 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
|
37 # |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
38 # |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
39 # Author: Shian Su - registertonysu@gmail.com - Jan 2014 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
40 # Modified by: Maria Doyle - Jun 2017, Jan 2018 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
41 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
42 # 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
|
43 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
|
44 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
45 # 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
|
46 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
|
47 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
|
48 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
|
49 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
|
50 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
|
51 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
|
52 library(getopt, 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
|
53 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
54 ################################################################################ |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
55 ### 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
|
56 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
57 # 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
|
58 # 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
|
59 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
|
60 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
|
61 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
|
62 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
|
63 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
|
64 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
|
65 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
|
66 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
67 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
68 # 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
|
69 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
|
70 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
|
71 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
|
72 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
|
73 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
74 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
75 # 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
|
76 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
|
77 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
|
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 # 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
|
82 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
|
83 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
|
84 } |
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 # 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
|
87 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
|
88 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
|
89 } |
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 # 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
|
92 # 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
|
93 # 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
|
94 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
|
95 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
|
96 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
|
97 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
|
98 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
|
99 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
|
100 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
|
101 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
|
102 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
103 else { |
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 <- 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
|
105 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
|
106 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
107 .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
|
108 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
109 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
110 # 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
|
111 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
|
112 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
|
113 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
|
114 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
|
115 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
116 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
117 # 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
|
118 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
|
119 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
|
120 } |
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 # Function to write code for html images |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
123 HtmlImage <- function(source, label=source, height=600, width=600) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
124 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
|
125 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
|
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 list items |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
129 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
|
130 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
|
131 } |
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 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
|
134 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
|
135 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
136 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
137 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
|
138 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
|
139 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
140 |
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 ### Input Processing |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
143 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
144 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
145 # 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
|
146 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
|
147 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
148 # 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
|
149 # 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
|
150 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
|
151 "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
|
152 "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
|
153 "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
|
154 "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
|
155 "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
|
156 "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
|
157 "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
|
158 "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
|
159 "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
|
160 "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
|
161 "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
|
162 "sampleReq", "s", 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
|
163 "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
|
164 "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
|
165 "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
|
166 "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
|
167 "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
|
168 "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
|
169 "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
|
170 "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
|
171 "weightOpt", "w", 0, "logical", |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
172 "volhiOpt", "v", 1, "integer", |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
173 "treatOpt", "T", 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
|
174 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
|
175 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
|
176 |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
177 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
178 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
|
179 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
|
180 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
|
181 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
182 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
183 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
|
184 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
|
185 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
186 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
|
187 } |
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
188 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
189 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
|
190 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
|
191 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
192 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
|
193 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
194 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
195 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
|
196 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
|
197 } 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
|
198 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
|
199 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
200 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
201 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
|
202 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
|
203 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
204 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
|
205 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
206 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
207 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
|
208 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
|
209 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
210 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
|
211 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
212 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
213 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
|
214 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
|
215 } 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
|
216 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
|
217 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
218 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
219 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
|
220 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
|
221 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
222 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
|
223 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
224 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
225 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
|
226 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
|
227 } 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
|
228 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
|
229 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
230 |
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 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
|
232 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
|
233 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
|
234 } 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
|
235 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
|
236 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
|
237 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
|
238 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
239 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
240 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
|
241 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
|
242 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
243 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
|
244 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
245 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
246 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
247 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
|
248 # 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
|
249 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
|
250 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
|
251 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
|
252 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
|
253 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
|
254 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
|
255 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
|
256 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
|
257 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
|
258 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
|
259 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
|
260 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
|
261 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
|
262 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
|
263 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
|
264 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
|
265 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
|
266 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
267 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
|
268 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
269 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
|
270 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
|
271 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
|
272 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
273 #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
|
274 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
|
275 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
|
276 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
277 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
278 # Process the single 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
|
279 counts <- read.table(opt$matrixPath, header=TRUE, sep="\t", 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 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
|
281 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
|
282 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
|
283 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
284 # 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
|
285 if (is.null(opt$factInput)) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
286 factorData <- read.table(opt$factFile, header=TRUE, sep="\t") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
287 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
|
288 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
289 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
|
290 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
|
291 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
|
292 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
|
293 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
|
294 } # 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
|
295 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
296 # 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
|
297 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
|
298 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
|
299 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
|
300 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
|
301 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
|
302 # 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
|
303 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
|
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 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
306 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
307 # 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
|
308 if (haveAnno) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
309 geneanno <- read.table(opt$annoPath, header=TRUE, sep="\t", 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
|
310 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
311 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
312 #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
|
313 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
|
314 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
315 # 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
|
316 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
|
317 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
|
318 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
|
319 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
320 denOutPng <- makeOut("densityplots.png") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
321 denOutPdf <- makeOut("DensityPlots.pdf") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
322 boxOutPng <- makeOut("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
|
323 boxOutPdf <- makeOut("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
|
324 mdsOutPdf <- character() # Initialise character vector |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
325 mdsOutPng <- character() |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
326 for (i in 1:ncol(factors)) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
327 mdsOutPdf[i] <- makeOut(paste0("mdsplot_", names(factors)[i], ".pdf")) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
328 mdsOutPng[i] <- makeOut(paste0("mdsplot_", names(factors)[i], ".png")) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
329 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
330 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
331 mdOutPdf <- character() |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
332 volOutPdf <- character() |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
333 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
|
334 topOut <- character() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
335 for (i in 1:length(contrastData)) { |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
336 mdOutPdf[i] <- makeOut(paste0("mdplot_", contrastData[i], ".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
|
337 volOutPdf[i] <- makeOut(paste0("volplot_", contrastData[i], ".pdf")) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
338 mdvolOutPng[i] <- makeOut(paste0("mdvolplot_", contrastData[i], ".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
|
339 topOut[i] <- makeOut(paste0(deMethod, "_", contrastData[i], ".tsv")) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
340 } |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
341 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
342 normOut <- makeOut(paste0(deMethod, "_normcounts.tsv")) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
343 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
|
344 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
|
345 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
346 # 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
|
347 # Link |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
348 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
|
349 stringsAsFactors=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
350 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
|
351 stringsAsFactors=FALSE) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
352 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
353 # 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
|
354 upCount <- numeric() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
355 downCount <- numeric() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
356 flatCount <- numeric() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
357 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
358 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
359 ### Data Processing |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
360 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
361 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
362 # 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
|
363 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
|
364 data <- list() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
365 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
|
366 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
|
367 # 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
|
368 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
|
369 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
|
370 } else { |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
371 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
|
372 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
373 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
374 # 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
|
375 # 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
|
376 preFilterCount <- nrow(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
|
377 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
378 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
|
379 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
380 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
|
381 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
|
382 } 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
|
383 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
|
384 } else if (filtCPM) { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
385 keep <- rowSums(cpm(data$counts) >= opt$cpmReq) >= 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
|
386 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
387 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
388 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
|
389 data$genes <- data$genes[keep, , 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
|
390 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
391 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
392 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
|
393 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
|
394 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
395 # Creating naming data |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
396 samplenames <- colnames(data$counts) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
397 sampleanno <- data.frame("sampleID"=samplenames, factors) |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
398 |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
399 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
400 # 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
|
401 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
|
402 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
|
403 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
|
404 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
|
405 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
|
406 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
|
407 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
408 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
|
409 # 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
|
410 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
|
411 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
|
412 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
|
413 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
|
414 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
|
415 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
416 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
|
417 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
|
418 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
|
419 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
|
420 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
421 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
422 # 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
|
423 print("Calculating Normalisation Factors") |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
424 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
|
425 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
426 # 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
|
427 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
|
428 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
|
429 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
430 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
431 ### Data Output |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
432 ################################################################################ |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
433 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
434 # Plot Density (if filtering low counts) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
435 if (filtCPM || filtSmpCount || filtTotCount) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
436 nsamples <- ncol(counts) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
437 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
438 # PNG |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
439 png(denOutPng, width=1200, height=600) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
440 par(mfrow=c(1,2), cex.axis=0.8) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
441 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
442 # before filtering |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
443 logcpm <- cpm(counts, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
444 plot(density(logcpm[,1]), col=as.numeric(factors[1, 1]), lwd=2, las=2, main="", xlab="") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
445 title(main="Density Plot: Raw counts", xlab="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
|
446 for (i in 2:nsamples){ |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
447 den <- density(logcpm[,i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
448 lines(den$x, den$y, col=as.numeric(factors[i, 1]), lwd=2) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
449 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
450 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
451 # after filtering |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
452 logcpm <- cpm(data$counts, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
453 plot(density(logcpm[,1]), col=as.numeric(factors[1, 1]), lwd=2, las=2, main="", xlab="") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
454 title(main="Density Plot: Filtered counts", xlab="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
|
455 for (i in 2:nsamples){ |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
456 den <- density(logcpm[,i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
457 lines(den$x, den$y, col=as.numeric(factors[i, 1]), lwd=2) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
458 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
459 legend("topright", samplenames, text.col=as.numeric(factors[, 1]), bty="n") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
460 imgName <- "Densityplots.png" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
461 imgAddr <- "densityplots.png" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
462 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
|
463 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
|
464 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
465 # PDF |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
466 pdf(denOutPdf, width=14) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
467 par(mfrow=c(1,2), cex.axis=0.8) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
468 logcpm <- cpm(counts, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
469 plot(density(logcpm[,1]), col=as.numeric(factors[1, 1]), lwd=2, las=2, main="", xlab="") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
470 title(main="Density Plot: Raw counts", xlab="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
|
471 for (i in 2:nsamples){ |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
472 den <- density(logcpm[,i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
473 lines(den$x, den$y, col=as.numeric(factors[i, 1]), lwd=2) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
474 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
475 logcpm <- cpm(data$counts, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
476 plot(density(logcpm[,1]), col=as.numeric(factors[1, 1]), lwd=2, las=2, main="", xlab="") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
477 title(main="Density Plot: Filtered counts", xlab="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
|
478 for (i in 2:nsamples){ |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
479 den <- density(logcpm[,i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
480 lines(den$x, den$y, col=as.numeric(factors[i, 1]), lwd=2) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
481 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
482 legend("topright", samplenames, text.col=as.numeric(factors[, 1]), bty="n") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
483 linkName <- "DensityPlots.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
484 linkAddr <- "densityplots.pdf" |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
485 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
|
486 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
|
487 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
488 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
489 # Plot Box plots (before and after normalisation) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
490 if (opt$normOpt != "none") { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
491 png(boxOutPng, width=1200, height=600) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
492 par(mfrow=c(1,2), cex.axis=0.8) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
493 logcpm <- cpm(y$counts, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
494 boxplot(logcpm, las=2, col=as.numeric(factors[, 1])) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
495 abline(h=median(logcpm), col=4) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
496 title(main="Box Plot: Unnormalised 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
|
497 lcpm <- cpm(y, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
498 boxplot(lcpm, las=2, col=as.numeric(factors[, 1])) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
499 abline(h=median(lcpm), col=4) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
500 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
|
501 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
|
502 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
|
503 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
|
504 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
|
505 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
506 pdf(boxOutPdf, width=14) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
507 par(mfrow=c(1,2), cex.axis=0.8) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
508 logcpm <- cpm(y$counts, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
509 boxplot(logcpm, las=2, col=as.numeric(factors[, 1])) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
510 abline(h=median(logcpm), col=4) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
511 title(main="Box Plot: Unnormalised 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
|
512 lcpm <- cpm(y, log=TRUE) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
513 boxplot(lcpm, las=2, col=as.numeric(factors[, 1])) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
514 abline(h=median(lcpm), col=4) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
515 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
|
516 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
|
517 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
|
518 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
|
519 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
|
520 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
521 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
522 # 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
|
523 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
|
524 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
|
525 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
526 for (i in 1:ncol(factors)) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
527 png(mdsOutPng[i], width=600, height=600) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
528 plotMDS(y, labels=labels, col=as.numeric(factors[, i]), cex=0.8, main=paste("MDS Plot:", names(factors)[i])) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
529 imgName <- paste0("MDSPlot_", names(factors)[i], ".png") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
530 imgAddr <- paste0("mdsplot_", names(factors)[i], ".png") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
531 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
|
532 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
|
533 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
534 pdf(mdsOutPdf[i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
535 plotMDS(y, labels=labels, col=as.numeric(factors[, i]), cex=0.8, main=paste("MDS Plot:", names(factors)[i])) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
536 linkName <- paste0("MDSPlot_", names(factors)[i], ".pdf") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
537 linkAddr <- paste0("mdsplot_", names(factors)[i], ".pdf") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
538 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
|
539 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
|
540 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
541 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
542 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
|
543 # 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
|
544 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
|
545 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
|
546 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
|
547 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
|
548 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
|
549 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
|
550 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
551 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
|
552 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
553 # 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
|
554 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
|
555 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
|
556 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
557 png(saOutPng, width=600, height=600) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
558 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
|
559 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
|
560 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
|
561 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
|
562 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
|
563 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
564 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
|
565 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
|
566 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
|
567 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
|
568 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
|
569 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
|
570 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
571 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
|
572 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
573 # 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
|
574 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
|
575 write.table(logCPM, file=normOut, row.names=TRUE, sep="\t", quote=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
|
576 linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts.tsv")))) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
577 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
578 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
579 # 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
|
580 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
|
581 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
|
582 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
583 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
|
584 # Creating voom data object and plot |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
585 png(voomOutPng, width=1000, height=600) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
586 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
|
587 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
|
588 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
|
589 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
|
590 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
|
591 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
592 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
|
593 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
|
594 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
|
595 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
|
596 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
|
597 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
|
598 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
599 # 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
|
600 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
|
601 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
|
602 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
603 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
604 # Creating voom data object and plot |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
605 png(voomOutPng, width=600, height=600) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
606 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
|
607 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
|
608 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
|
609 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
|
610 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
|
611 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
612 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
|
613 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
|
614 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
|
615 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
|
616 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
|
617 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
|
618 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
619 # 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
|
620 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
|
621 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
622 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
623 # 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
|
624 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
|
625 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
|
626 write.table(norm_counts, file=normOut, row.names=FALSE, sep="\t", quote=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
|
627 linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts.tsv")))) |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
628 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
629 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
630 # 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
|
631 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
|
632 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
|
633 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
|
634 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
635 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
|
636 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
637 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
|
638 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
639 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
640 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
641 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
|
642 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
643 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
|
644 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
|
645 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
|
646 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
|
647 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
648 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
|
649 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
650 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
651 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
652 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
|
653 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
|
654 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
|
655 |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
656 for (i in 1:length(contrastData)) { |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
657 # 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
|
658 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
|
659 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
|
660 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
|
661 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
662 # 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
|
663 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
|
664 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
|
665 } else{ |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
666 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
|
667 } |
4
a61a6e62e91f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
3
diff
changeset
|
668 write.table(top, file=topOut[i], row.names=FALSE, sep="\t", quote=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
|
669 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
670 linkName <- paste0(deMethod, "_", contrastData[i], ".tsv") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
671 linkAddr <- paste0(deMethod, "_", contrastData[i], ".tsv") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
672 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
|
673 |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
674 # 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
|
675 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
|
676 limma::plotMD(fit, status=status[, i], coef=i, |
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
677 main=paste("MD Plot:", unmake.names(contrastData[i])), |
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
678 hl.col=alpha(c("firebrick", "blue"), 0.4), values=c(1, -1), |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
679 xlab="Average Expression", ylab="logFC") |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
680 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
681 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
|
682 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
683 linkName <- paste0("MDPlot_", contrastData[i], ".pdf") |
5
d8a55b5f0de0
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f0db9544002b02d3ccffb8c983b5c8baef6bacd
iuc
parents:
4
diff
changeset
|
684 linkAddr <- paste0("mdplot_", contrastData[i], ".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
|
685 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
|
686 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
|
687 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
688 # 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
|
689 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
|
690 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
|
691 # 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
|
692 limma::volcanoplot(fit, coef=i, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
693 main=paste("Volcano Plot:", unmake.names(contrastData[i])), |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
694 highlight=opt$volhiOpt, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
695 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
|
696 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
697 limma::volcanoplot(fit, coef=i, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
698 main=paste("Volcano Plot:", unmake.names(contrastData[i])),, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
699 highlight=opt$volhiOpt, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
700 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
|
701 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
702 linkName <- paste0("VolcanoPlot_", contrastData[i], ".pdf") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
703 linkAddr <- paste0("volplot_", contrastData[i], ".pdf") |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
704 linkData <- rbind(linkData, c(linkName, linkAddr)) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
705 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
|
706 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
707 # PNG of MD and Volcano |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
708 png(mdvolOutPng[i], width=1200, height=600) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
709 par(mfrow=c(1, 2), mar=c(5,4,2,2)+0.1, oma=c(0,0,3,0)) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
710 limma::plotMD(fit, status=status[, i], coef=i, main="MD Plot", |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
711 hl.col=alpha(c("firebrick", "blue"), 0.4), values=c(1, -1), |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
712 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
|
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 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
|
715 |
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 # Volcano plots |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
717 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
|
718 # 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
|
719 limma::volcanoplot(fit, coef=i, main="Volcano Plot", |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
720 highlight=opt$volhiOpt, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
721 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
|
722 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
723 limma::volcanoplot(fit, coef=i, main="Volcano Plot", |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
724 highlight=opt$volhiOpt, |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
725 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
|
726 } |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
727 |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
728 imgName <- paste0("MDVolPlot_", contrastData[i]) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
729 imgAddr <- paste0("mdvolplot_", contrastData[i], ".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
|
730 imageData <- rbind(imageData, c(imgName, imgAddr)) |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
731 title(paste0("Contrast: ", unmake.names(contrastData[i])), 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
|
732 invisible(dev.off()) |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
733 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
734 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
|
735 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
|
736 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
737 # 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
|
738 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
|
739 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
|
740 if (wantWeight) { |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
741 save(counts, data, y, status, plotData, labels, factors, wts, fit, top, 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
|
742 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
|
743 } else { |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
744 save(counts, data, y, status, plotData, labels, factors, fit, top, 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
|
745 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
|
746 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
747 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
|
748 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
749 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
750 # 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
|
751 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
|
752 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
|
753 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
754 # 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
|
755 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
|
756 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
|
757 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
|
758 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
759 ### HTML Generation |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
760 ################################################################################ |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
761 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
762 # 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
|
763 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
|
764 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
765 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
|
766 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
767 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
|
768 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
|
769 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
|
770 |
6
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
771 for (i in 1:nrow(imageData)) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
772 if (grepl("density|box|mdvol", imageData$Link[i])) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
773 HtmlImage(imageData$Link[i], imageData$Label[i], width=1200) |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
774 } 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
|
775 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
|
776 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
777 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
|
778 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
779 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
780 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
781 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
|
782 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
783 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
|
784 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
|
785 TableItem() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
786 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
|
787 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
|
788 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
789 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
|
790 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
|
791 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
|
792 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
|
793 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
|
794 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
|
795 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
796 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
|
797 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
798 cata("</table>") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
799 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
800 cata("<h4>Plots:</h4>\n") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
801 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
|
802 if (grepl(".pdf", 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
|
803 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
|
804 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
805 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
806 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
807 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
|
808 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
|
809 if (grepl(".tsv", 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
|
810 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
|
811 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
812 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
813 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
814 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
|
815 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
|
816 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
|
817 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
|
818 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
|
819 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
820 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
821 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
822 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
823 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
|
824 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
|
825 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
|
826 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
|
827 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
828 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
|
829 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
|
830 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
831 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
|
832 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
|
833 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
|
834 "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
|
835 "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
|
836 } 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
|
837 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
|
838 "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
|
839 "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
|
840 } 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
|
841 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
|
842 "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
|
843 "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
|
844 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
845 |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
846 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
|
847 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
|
848 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
|
849 "%) 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
|
850 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
|
851 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
852 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
|
853 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
|
854 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
|
855 } else { |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
856 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
|
857 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
858 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
|
859 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
|
860 } 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
|
861 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
|
862 } |
6
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 (wantTreat) { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
864 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
|
865 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
866 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
|
867 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
|
868 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
|
869 } else { |
39fa12a6d885
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 60cae222b10f43f830936c19298bd723ac47e43d
iuc
parents:
5
diff
changeset
|
870 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
|
871 } |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
872 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
873 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
|
874 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
|
875 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
|
876 "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
|
877 "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
|
878 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
|
879 } 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
|
880 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
|
881 "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
|
882 "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
|
883 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
|
884 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
|
885 } |
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
886 } 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
|
887 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
|
888 "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
|
889 "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
|
890 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
|
891 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
892 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
|
893 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
894 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
|
895 |
1
76d01fe0ec36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 58c05c0ce9334f8b9c800283cfd1f40573546edd
iuc
parents:
0
diff
changeset
|
896 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
|
897 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
898 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
|
899 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
|
900 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
|
901 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
|
902 |
3
38aab66ae5cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 1640914b9812b0482a3cf684f05465f8d9cfdc65
iuc
parents:
2
diff
changeset
|
903 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
|
904 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
|
905 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
|
906 } |
a330ddf43861
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 346319bd01bfd51f02d656e653a93f0bd1e954aa
iuc
parents:
1
diff
changeset
|
907 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
|
908 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
909 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
910 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
|
911 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
|
912 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
|
913 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
|
914 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
|
915 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
916 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
|
917 } |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
918 cata("</table>") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
919 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
920 cit <- character() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
921 link <- character() |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
922 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
|
923 "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
|
924 "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
|
925 "\">", "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
|
926 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
927 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
|
928 "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
|
929 "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
|
930 "\">", "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
|
931 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
932 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
|
933 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
934 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
|
935 "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
|
936 "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
|
937 "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
|
938 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
939 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
|
940 "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
|
941 "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
|
942 "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
|
943 "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
|
944 link[1], |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
945 "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
|
946 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
|
947 "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
|
948 "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
|
949 "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
|
950 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
|
951 "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
|
952 "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
|
953 "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
|
954 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
|
955 "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
|
956 "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
|
957 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
|
958 "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
|
959 "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
|
960 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
|
961 "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
|
962 "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
|
963 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
|
964 "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
|
965 "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
|
966 "4288-4297") |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
967 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
|
968 "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
|
969 "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
|
970 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
|
971 "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
|
972 "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
|
973 "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
|
974 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
|
975 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
|
976 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
|
977 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
|
978 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
979 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
|
980 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
|
981 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
|
982 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
|
983 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
|
984 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
|
985 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
|
986 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
987 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
|
988 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
|
989 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
|
990 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
|
991 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
|
992 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
|
993 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
|
994 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
|
995 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
996 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
|
997 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
998 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
|
999 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
|
1000 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
|
1001 } |
0
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1002 } |
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=\"0\">\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("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
|
1007 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
|
1008 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
|
1009 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
|
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 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
|
1012 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
|
1013 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
|
1014 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
|
1015 |
bdebdea5f6a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 2f34a215c35f08c3666f314a87d235437baa1d21
iuc
parents:
diff
changeset
|
1016 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
|
1017 cata("</html>") |