annotate test-data/out_rscript.txt @ 4:a61a6e62e91f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
author iuc
date Sun, 29 Apr 2018 17:36:42 -0400
parents
children d8a55b5f0de0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
1 # This tool takes in a matrix of feature counts as well as gene annotations and
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
2 # outputs a table of top expressions as well as various plots for differential
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
3 # expression analysis
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
4 #
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
5 # ARGS: htmlPath", "R", 1, "character" -Path to html file linking to other outputs
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
6 # outPath", "o", 1, "character" -Path to folder to write all output to
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
7 # filesPath", "j", 2, "character" -JSON list object if multiple files input
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
8 # matrixPath", "m", 2, "character" -Path to count matrix
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
9 # factFile", "f", 2, "character" -Path to factor information file
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
10 # factInput", "i", 2, "character" -String containing factors if manually input
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
11 # annoPath", "a", 2, "character" -Path to input containing gene annotations
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
12 # contrastData", "C", 1, "character" -String containing contrasts of interest
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
13 # cpmReq", "c", 2, "double" -Float specifying cpm requirement
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
14 # cntReq", "z", 2, "integer" -Integer specifying minimum total count requirement
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
15 # sampleReq", "s", 2, "integer" -Integer specifying cpm requirement
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
16 # normCounts", "x", 0, "logical" -String specifying if normalised counts should be output
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
17 # rdaOpt", "r", 0, "logical" -String specifying if RData should be output
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
18 # lfcReq", "l", 1, "double" -Float specifying the log-fold-change requirement
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
19 # pValReq", "p", 1, "double" -Float specifying the p-value requirement
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
20 # pAdjOpt", "d", 1, "character" -String specifying the p-value adjustment method
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
21 # normOpt", "n", 1, "character" -String specifying type of normalisation used
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
22 # robOpt", "b", 0, "logical" -String specifying if robust options should be used
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
23 # trend", "t", 1, "double" -Float for prior.count if limma-trend is used instead of voom
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
24 # weightOpt", "w", 0, "logical" -String specifying if voomWithQualityWeights should be used
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
25 #
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
26 # OUT:
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
27 # MDS Plot
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
28 # Voom/SA plot
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
29 # MD Plot
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
30 # Expression Table
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
31 # HTML file linking to the ouputs
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
32 # Optional:
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
33 # Normalised counts Table
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
34 # RData file
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
35 #
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
36 #
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
37 # Author: Shian Su - registertonysu@gmail.com - Jan 2014
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
38 # Modified by: Maria Doyle - Jun 2017, Jan 2018
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
39
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
40 # Record starting time
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
41 timeStart <- as.character(Sys.time())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
42
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
43 # Load all required libraries
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
44 library(methods, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
45 library(statmod, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
46 library(splines, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
47 library(edgeR, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
48 library(limma, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
49 library(scales, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
50 library(getopt, quietly=TRUE, warn.conflicts=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
51
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
52 if (packageVersion("limma") < "3.20.1") {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
53 stop("Please update 'limma' to version >= 3.20.1 to run this tool")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
54 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
55
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
56 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
57 ### Function Delcaration
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
58 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
59 # Function to sanitise contrast equations so there are no whitespaces
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
60 # surrounding the arithmetic operators, leading or trailing whitespace
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
61 sanitiseEquation <- function(equation) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
62 equation <- gsub(" *[+] *", "+", equation)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
63 equation <- gsub(" *[-] *", "-", equation)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
64 equation <- gsub(" *[/] *", "/", equation)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
65 equation <- gsub(" *[*] *", "*", equation)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
66 equation <- gsub("^\\s+|\\s+$", "", equation)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
67 return(equation)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
68 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
69
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
70 # Function to sanitise group information
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
71 sanitiseGroups <- function(string) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
72 string <- gsub(" *[,] *", ",", string)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
73 string <- gsub("^\\s+|\\s+$", "", string)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
74 return(string)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
75 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
76
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
77 # Function to change periods to whitespace in a string
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
78 unmake.names <- function(string) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
79 string <- gsub(".", " ", string, fixed=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
80 return(string)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
81 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
82
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
83 # Generate output folder and paths
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
84 makeOut <- function(filename) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
85 return(paste0(opt$outPath, "/", filename))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
86 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
87
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
88 # Generating design information
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
89 pasteListName <- function(string) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
90 return(paste0("factors$", string))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
91 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
92
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
93 # Create cata function: default path set, default seperator empty and appending
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
94 # true by default (Ripped straight from the cat function with altered argument
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
95 # defaults)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
96 cata <- function(..., file = opt$htmlPath, sep = "", fill = FALSE, labels = NULL,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
97 append = TRUE) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
98 if (is.character(file))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
99 if (file == "")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
100 file <- stdout()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
101 else if (substring(file, 1L, 1L) == "|") {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
102 file <- pipe(substring(file, 2L), "w")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
103 on.exit(close(file))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
104 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
105 else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
106 file <- file(file, ifelse(append, "a", "w"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
107 on.exit(close(file))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
108 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
109 .Internal(cat(list(...), file, sep, fill, labels, append))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
110 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
111
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
112 # Function to write code for html head and title
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
113 HtmlHead <- function(title) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
114 cata("<head>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
115 cata("<title>", title, "</title>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
116 cata("</head>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
117 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
118
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
119 # Function to write code for html links
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
120 HtmlLink <- function(address, label=address) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
121 cata("<a href=\"", address, "\" target=\"_blank\">", label, "</a><br />\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
122 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
123
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
124 # Function to write code for html images
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
125 HtmlImage <- function(source, label=source, height=600, width=600) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
126 cata("<img src=\"", source, "\" alt=\"", label, "\" height=\"", height)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
127 cata("\" width=\"", width, "\"/>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
128 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
129
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
130 # Function to write code for html list items
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
131 ListItem <- function(...) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
132 cata("<li>", ..., "</li>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
133 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
134
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
135 TableItem <- function(...) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
136 cata("<td>", ..., "</td>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
137 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
138
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
139 TableHeadItem <- function(...) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
140 cata("<th>", ..., "</th>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
141 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
142
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
143 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
144 ### Input Processing
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
145 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
146
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
147 # Collect arguments from command line
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
148 args <- commandArgs(trailingOnly=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
149
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
150 # Get options, using the spec as defined by the enclosed list.
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
151 # Read the options from the default: commandArgs(TRUE).
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
152 spec <- matrix(c(
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
153 "htmlPath", "R", 1, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
154 "outPath", "o", 1, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
155 "filesPath", "j", 2, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
156 "matrixPath", "m", 2, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
157 "factFile", "f", 2, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
158 "factInput", "i", 2, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
159 "annoPath", "a", 2, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
160 "contrastData", "C", 1, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
161 "cpmReq", "c", 1, "double",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
162 "totReq", "y", 0, "logical",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
163 "cntReq", "z", 1, "integer",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
164 "sampleReq", "s", 1, "integer",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
165 "normCounts", "x", 0, "logical",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
166 "rdaOpt", "r", 0, "logical",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
167 "lfcReq", "l", 1, "double",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
168 "pValReq", "p", 1, "double",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
169 "pAdjOpt", "d", 1, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
170 "normOpt", "n", 1, "character",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
171 "robOpt", "b", 0, "logical",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
172 "trend", "t", 1, "double",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
173 "weightOpt", "w", 0, "logical"),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
174 byrow=TRUE, ncol=4)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
175 opt <- getopt(spec)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
176
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
177
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
178 if (is.null(opt$matrixPath) & is.null(opt$filesPath)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
179 cat("A counts matrix (or a set of counts files) is required.\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
180 q(status=1)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
181 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
182
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
183 if (is.null(opt$cpmReq)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
184 filtCPM <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
185 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
186 filtCPM <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
187 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
188
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
189 if (is.null(opt$cntReq) || is.null(opt$sampleReq)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
190 filtSmpCount <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
191 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
192 filtSmpCount <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
193 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
194
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
195 if (is.null(opt$totReq)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
196 filtTotCount <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
197 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
198 filtTotCount <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
199 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
200
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
201 if (is.null(opt$rdaOpt)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
202 wantRda <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
203 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
204 wantRda <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
205 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
206
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
207 if (is.null(opt$annoPath)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
208 haveAnno <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
209 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
210 haveAnno <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
211 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
212
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
213 if (is.null(opt$normCounts)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
214 wantNorm <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
215 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
216 wantNorm <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
217 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
218
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
219 if (is.null(opt$robOpt)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
220 wantRobust <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
221 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
222 wantRobust <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
223 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
224
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
225 if (is.null(opt$weightOpt)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
226 wantWeight <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
227 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
228 wantWeight <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
229 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
230
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
231 if (is.null(opt$trend)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
232 wantTrend <- FALSE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
233 deMethod <- "limma-voom"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
234 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
235 wantTrend <- TRUE
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
236 deMethod <- "limma-trend"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
237 priorCount <- opt$trend
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
238 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
239
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
240
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
241 if (!is.null(opt$filesPath)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
242 # Process the separate count files (adapted from DESeq2 wrapper)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
243 library("rjson")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
244 parser <- newJSONParser()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
245 parser$addData(opt$filesPath)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
246 factorList <- parser$getObject()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
247 factors <- sapply(factorList, function(x) x[[1]])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
248 filenamesIn <- unname(unlist(factorList[[1]][[2]]))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
249 sampleTable <- data.frame(sample=basename(filenamesIn),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
250 filename=filenamesIn,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
251 row.names=filenamesIn,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
252 stringsAsFactors=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
253 for (factor in factorList) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
254 factorName <- factor[[1]]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
255 sampleTable[[factorName]] <- character(nrow(sampleTable))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
256 lvls <- sapply(factor[[2]], function(x) names(x))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
257 for (i in seq_along(factor[[2]])) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
258 files <- factor[[2]][[i]][[1]]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
259 sampleTable[files,factorName] <- lvls[i]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
260 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
261 sampleTable[[factorName]] <- factor(sampleTable[[factorName]], levels=lvls)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
262 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
263 rownames(sampleTable) <- sampleTable$sample
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
264 rem <- c("sample","filename")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
265 factors <- sampleTable[, !(names(sampleTable) %in% rem), drop=FALSE]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
266
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
267 #read in count files and create single table
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
268 countfiles <- lapply(sampleTable$filename, function(x){read.delim(x, row.names=1)})
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
269 counts <- do.call("cbind", countfiles)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
270
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
271 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
272 # Process the single count matrix
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
273 counts <- read.table(opt$matrixPath, header=TRUE, sep="\t", stringsAsFactors=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
274 row.names(counts) <- counts[, 1]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
275 counts <- counts[ , -1]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
276 countsRows <- nrow(counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
277
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
278 # Process factors
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
279 if (is.null(opt$factInput)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
280 factorData <- read.table(opt$factFile, header=TRUE, sep="\t")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
281 factors <- factorData[, -1, drop=FALSE]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
282 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
283 factors <- unlist(strsplit(opt$factInput, "|", fixed=TRUE))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
284 factorData <- list()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
285 for (fact in factors) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
286 newFact <- unlist(strsplit(fact, split="::"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
287 factorData <- rbind(factorData, newFact)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
288 } # Factors have the form: FACT_NAME::LEVEL,LEVEL,LEVEL,LEVEL,... The first factor is the Primary Factor.
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
289
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
290 # Set the row names to be the name of the factor and delete first row
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
291 row.names(factorData) <- factorData[, 1]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
292 factorData <- factorData[, -1]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
293 factorData <- sapply(factorData, sanitiseGroups)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
294 factorData <- sapply(factorData, strsplit, split=",")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
295 factorData <- sapply(factorData, make.names)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
296 # Transform factor data into data frame of R factor objects
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
297 factors <- data.frame(factorData)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
298 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
299 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
300
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
301 # if annotation file provided
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
302 if (haveAnno) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
303 geneanno <- read.table(opt$annoPath, header=TRUE, sep="\t", stringsAsFactors=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
304 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
305
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
306 #Create output directory
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
307 dir.create(opt$outPath, showWarnings=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
308
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
309 # Split up contrasts seperated by comma into a vector then sanitise
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
310 contrastData <- unlist(strsplit(opt$contrastData, split=","))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
311 contrastData <- sanitiseEquation(contrastData)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
312 contrastData <- gsub(" ", ".", contrastData, fixed=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
313
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
314
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
315 mdsOutPdf <- makeOut("mdsplot_nonorm.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
316 mdsOutPng <- makeOut("mdsplot_nonorm.png")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
317 nmdsOutPdf <- makeOut("mdsplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
318 nmdsOutPng <- makeOut("mdsplot.png")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
319 maOutPdf <- character() # Initialise character vector
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
320 maOutPng <- character()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
321 topOut <- character()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
322 for (i in 1:length(contrastData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
323 maOutPdf[i] <- makeOut(paste0("maplot_", contrastData[i], ".pdf"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
324 maOutPng[i] <- makeOut(paste0("maplot_", contrastData[i], ".png"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
325 topOut[i] <- makeOut(paste0(deMethod, "_", contrastData[i], ".tsv"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
326 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
327 normOut <- makeOut(paste0(deMethod, "_normcounts.tsv"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
328 rdaOut <- makeOut(paste0(deMethod, "_analysis.RData"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
329 sessionOut <- makeOut("session_info.txt")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
330
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
331 # Initialise data for html links and images, data frame with columns Label and
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
332 # Link
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
333 linkData <- data.frame(Label=character(), Link=character(),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
334 stringsAsFactors=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
335 imageData <- data.frame(Label=character(), Link=character(),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
336 stringsAsFactors=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
337
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
338 # Initialise vectors for storage of up/down/neutral regulated counts
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
339 upCount <- numeric()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
340 downCount <- numeric()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
341 flatCount <- numeric()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
342
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
343 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
344 ### Data Processing
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
345 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
346
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
347 # Extract counts and annotation data
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
348 print("Extracting counts")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
349 data <- list()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
350 data$counts <- counts
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
351 if (haveAnno) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
352 # 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:
diff changeset
353 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:
diff changeset
354 data$genes <- annoord
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
355 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
356 data$genes <- data.frame(GeneID=row.names(counts))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
357 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
358
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
359 # If filter crieteria set, filter out genes that do not have a required cpm/counts in a required number of
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
360 # samples. Default is no filtering
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
361 preFilterCount <- nrow(data$counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
362
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
363 if (filtCPM || filtSmpCount || filtTotCount) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
364
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
365 if (filtTotCount) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
366 keep <- rowSums(data$counts) >= opt$cntReq
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
367 } else if (filtSmpCount) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
368 keep <- rowSums(data$counts >= opt$cntReq) >= opt$sampleReq
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
369 } else if (filtCPM) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
370 keep <- rowSums(cpm(data$counts) >= opt$cpmReq) >= opt$sampleReq
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
371 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
372
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
373 data$counts <- data$counts[keep, ]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
374 data$genes <- data$genes[keep, , drop=FALSE]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
375 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
376
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
377 postFilterCount <- nrow(data$counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
378 filteredCount <- preFilterCount-postFilterCount
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
379
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
380 # Creating naming data
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
381 samplenames <- colnames(data$counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
382 sampleanno <- data.frame("sampleID"=samplenames, factors)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
383
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
384
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
385 # Generating the DGEList object "data"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
386 print("Generating DGEList object")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
387 data$samples <- sampleanno
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
388 data$samples$lib.size <- colSums(data$counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
389 data$samples$norm.factors <- 1
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
390 row.names(data$samples) <- colnames(data$counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
391 data <- new("DGEList", data)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
392
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
393 print("Generating Design")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
394 # Name rows of factors according to their sample
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
395 row.names(factors) <- names(data$counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
396 factorList <- sapply(names(factors), pasteListName)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
397 formula <- "~0"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
398 for (i in 1:length(factorList)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
399 formula <- paste(formula,factorList[i], sep="+")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
400 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
401 formula <- formula(formula)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
402 design <- model.matrix(formula)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
403 for (i in 1:length(factorList)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
404 colnames(design) <- gsub(factorList[i], "", colnames(design), fixed=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
405 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
406
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
407 # Calculating normalising factors
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
408 print("Calculating Normalisation Factors")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
409 data <- calcNormFactors(data, method=opt$normOpt)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
410
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
411 # Generate contrasts information
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
412 print("Generating Contrasts")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
413 contrasts <- makeContrasts(contrasts=contrastData, levels=design)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
414
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
415 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
416 ### Data Output
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
417 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
418 # Plot MDS
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
419 print("Generating MDS plot")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
420 labels <- names(counts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
421 png(mdsOutPng, width=600, height=600)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
422 # Currently only using a single factor
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
423 plotMDS(data, labels=labels, col=as.numeric(factors[, 1]), cex=0.8, main="MDS Plot (unnormalised)")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
424 imageData[1, ] <- c("MDS Plot (unnormalised)", "mdsplot_nonorm.png")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
425 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
426
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
427 pdf(mdsOutPdf)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
428 plotMDS(data, labels=labels, cex=0.5)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
429 linkData[1, ] <- c("MDS Plot (unnormalised).pdf", "mdsplot_nonorm.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
430 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
431
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
432 if (wantTrend) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
433 # limma-trend approach
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
434 logCPM <- cpm(data, log=TRUE, prior.count=opt$trend)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
435 fit <- lmFit(logCPM, design)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
436 fit$genes <- data$genes
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
437 fit <- contrasts.fit(fit, contrasts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
438 if (wantRobust) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
439 fit <- eBayes(fit, trend=TRUE, robust=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
440 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
441 fit <- eBayes(fit, trend=TRUE, robust=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
442 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
443 # plot fit with plotSA
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
444 saOutPng <- makeOut("saplot.png")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
445 saOutPdf <- makeOut("saplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
446
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
447 png(saOutPng, width=600, height=600)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
448 plotSA(fit, main="SA Plot")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
449 imgName <- "SA Plot.png"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
450 imgAddr <- "saplot.png"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
451 imageData <- rbind(imageData, c(imgName, imgAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
452 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
453
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
454 pdf(saOutPdf, width=14)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
455 plotSA(fit, main="SA Plot")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
456 linkName <- paste0("SA Plot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
457 linkAddr <- paste0("saplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
458 linkData <- rbind(linkData, c(linkName, linkAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
459 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
460
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
461 plotData <- logCPM
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
462
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
463 # Save normalised counts (log2cpm)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
464 if (wantNorm) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
465 write.table(logCPM, file=normOut, row.names=TRUE, sep="\t", quote=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
466 linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts.tsv"))))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
467 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
468 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
469 # limma-voom approach
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
470 voomOutPdf <- makeOut("voomplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
471 voomOutPng <- makeOut("voomplot.png")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
472
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
473 if (wantWeight) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
474 # Creating voom data object and plot
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
475 png(voomOutPng, width=1000, height=600)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
476 vData <- voomWithQualityWeights(data, design=design, plot=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
477 imgName <- "Voom Plot.png"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
478 imgAddr <- "voomplot.png"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
479 imageData <- rbind(imageData, c(imgName, imgAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
480 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
481
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
482 pdf(voomOutPdf, width=14)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
483 vData <- voomWithQualityWeights(data, design=design, plot=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
484 linkName <- paste0("Voom Plot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
485 linkAddr <- paste0("voomplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
486 linkData <- rbind(linkData, c(linkName, linkAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
487 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
488
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
489 # Generating fit data and top table with weights
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
490 wts <- vData$weights
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
491 voomFit <- lmFit(vData, design, weights=wts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
492
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
493 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
494 # Creating voom data object and plot
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
495 png(voomOutPng, width=600, height=600)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
496 vData <- voom(data, design=design, plot=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
497 imgName <- "Voom Plot"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
498 imgAddr <- "voomplot.png"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
499 imageData <- rbind(imageData, c(imgName, imgAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
500 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
501
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
502 pdf(voomOutPdf)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
503 vData <- voom(data, design=design, plot=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
504 linkName <- paste0("Voom Plot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
505 linkAddr <- paste0("voomplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
506 linkData <- rbind(linkData, c(linkName, linkAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
507 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
508
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
509 # Generate voom fit
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
510 voomFit <- lmFit(vData, design)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
511 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
512
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
513 # Save normalised counts (log2cpm)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
514 if (wantNorm) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
515 norm_counts <- data.frame(vData$genes, vData$E)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
516 write.table(norm_counts, file=normOut, row.names=FALSE, sep="\t", quote=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
517 linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts.tsv"))))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
518 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
519
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
520 # Fit linear model and estimate dispersion with eBayes
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
521 voomFit <- contrasts.fit(voomFit, contrasts)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
522 if (wantRobust) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
523 fit <- eBayes(voomFit, robust=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
524 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
525 fit <- eBayes(voomFit, robust=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
526 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
527 plotData <- vData
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
528 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
529
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
530 print("Generating normalised MDS plot")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
531 png(nmdsOutPng, width=600, height=600)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
532 # Currently only using a single factor
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
533 plotMDS(plotData, labels=labels, col=as.numeric(factors[, 1]), cex=0.8, main="MDS Plot (normalised)")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
534 imgName <- "MDS Plot (normalised)"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
535 imgAddr <- "mdsplot.png"
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
536 imageData <- rbind(imageData, c(imgName, imgAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
537 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
538
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
539 pdf(nmdsOutPdf)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
540 plotMDS(plotData, labels=labels, cex=0.5)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
541 linkName <- paste0("MDS Plot (normalised).pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
542 linkAddr <- paste0("mdsplot.pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
543 linkData <- rbind(linkData, c(linkName, linkAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
544 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
545
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
546
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
547 print("Generating DE results")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
548 status = decideTests(fit, adjust.method=opt$pAdjOpt, p.value=opt$pValReq,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
549 lfc=opt$lfcReq)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
550 sumStatus <- summary(status)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
551
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
552 for (i in 1:length(contrastData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
553 # Collect counts for differential expression
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
554 upCount[i] <- sumStatus["Up", i]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
555 downCount[i] <- sumStatus["Down", i]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
556 flatCount[i] <- sumStatus["NotSig", i]
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
557
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
558 # Write top expressions table
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
559 top <- topTable(fit, coef=i, number=Inf, sort.by="P")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
560 write.table(top, file=topOut[i], row.names=FALSE, sep="\t", quote=FALSE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
561
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
562 linkName <- paste0(deMethod, "_", contrastData[i], ".tsv")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
563 linkAddr <- paste0(deMethod, "_", contrastData[i], ".tsv")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
564 linkData <- rbind(linkData, c(linkName, linkAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
565
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
566 # Plot MA (log ratios vs mean average) using limma package on weighted
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
567 pdf(maOutPdf[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
568 limma::plotMD(fit, status=status, coef=i,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
569 main=paste("MA Plot:", unmake.names(contrastData[i])),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
570 col=alpha(c("firebrick", "blue"), 0.4), values=c("1", "-1"),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
571 xlab="Average Expression", ylab="logFC")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
572
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
573 abline(h=0, col="grey", lty=2)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
574
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
575 linkName <- paste0("MA Plot_", contrastData[i], " (.pdf)")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
576 linkAddr <- paste0("maplot_", contrastData[i], ".pdf")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
577 linkData <- rbind(linkData, c(linkName, linkAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
578 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
579
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
580 png(maOutPng[i], height=600, width=600)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
581 limma::plotMD(fit, status=status, coef=i,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
582 main=paste("MA Plot:", unmake.names(contrastData[i])),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
583 col=alpha(c("firebrick", "blue"), 0.4), values=c("1", "-1"),
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
584 xlab="Average Expression", ylab="logFC")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
585
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
586 abline(h=0, col="grey", lty=2)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
587
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
588 imgName <- paste0("MA Plot_", contrastData[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
589 imgAddr <- paste0("maplot_", contrastData[i], ".png")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
590 imageData <- rbind(imageData, c(imgName, imgAddr))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
591 invisible(dev.off())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
592 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
593 sigDiff <- data.frame(Up=upCount, Flat=flatCount, Down=downCount)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
594 row.names(sigDiff) <- contrastData
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
595
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
596 # Save relevant items as rda object
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
597 if (wantRda) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
598 print("Saving RData")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
599 if (wantWeight) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
600 save(data, status, plotData, labels, factors, wts, fit, top, contrasts,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
601 design,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
602 file=rdaOut, ascii=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
603 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
604 save(data, status, plotData, labels, factors, fit, top, contrasts, design,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
605 file=rdaOut, ascii=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
606 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
607 linkData <- rbind(linkData, c((paste0(deMethod, "_analysis.RData")), (paste0(deMethod, "_analysis.RData"))))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
608 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
609
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
610 # Record session info
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
611 writeLines(capture.output(sessionInfo()), sessionOut)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
612 linkData <- rbind(linkData, c("Session Info", "session_info.txt"))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
613
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
614 # Record ending time and calculate total run time
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
615 timeEnd <- as.character(Sys.time())
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
616 timeTaken <- capture.output(round(difftime(timeEnd,timeStart), digits=3))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
617 timeTaken <- gsub("Time difference of ", "", timeTaken, fixed=TRUE)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
618 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
619 ### HTML Generation
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
620 ################################################################################
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
621
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
622 # Clear file
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
623 cat("", file=opt$htmlPath)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
624
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
625 cata("<html>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
626
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
627 cata("<body>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
628 cata("<h3>Limma Analysis Output:</h3>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
629 cata("Links to PDF copies of plots are in 'Plots' section below />\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
630 if (wantWeight) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
631 HtmlImage(imageData$Link[1], imageData$Label[1], width=1000)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
632 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
633 HtmlImage(imageData$Link[1], imageData$Label[1])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
634 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
635
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
636 for (i in 2:nrow(imageData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
637 HtmlImage(imageData$Link[i], imageData$Label[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
638 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
639
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
640 cata("<h4>Differential Expression Counts:</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
641
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
642 cata("<table border=\"1\" cellpadding=\"4\">\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
643 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
644 TableItem()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
645 for (i in colnames(sigDiff)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
646 TableHeadItem(i)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
647 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
648 cata("</tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
649 for (i in 1:nrow(sigDiff)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
650 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
651 TableHeadItem(unmake.names(row.names(sigDiff)[i]))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
652 for (j in 1:ncol(sigDiff)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
653 TableItem(as.character(sigDiff[i, j]))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
654 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
655 cata("</tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
656 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
657 cata("</table>")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
658
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
659 cata("<h4>Plots:</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
660 for (i in 1:nrow(linkData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
661 if (grepl(".pdf", linkData$Link[i])) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
662 HtmlLink(linkData$Link[i], linkData$Label[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
663 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
664 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
665
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
666 cata("<h4>Tables:</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
667 for (i in 1:nrow(linkData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
668 if (grepl(".tsv", linkData$Link[i])) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
669 HtmlLink(linkData$Link[i], linkData$Label[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
670 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
671 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
672
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
673 if (wantRda) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
674 cata("<h4>R Data Object:</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
675 for (i in 1:nrow(linkData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
676 if (grepl(".RData", linkData$Link[i])) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
677 HtmlLink(linkData$Link[i], linkData$Label[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
678 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
679 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
680 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
681
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
682 cata("<p>Alt-click links to download file.</p>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
683 cata("<p>Click floppy disc icon associated history item to download ")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
684 cata("all files.</p>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
685 cata("<p>.tsv files can be viewed in Excel or any spreadsheet program.</p>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
686
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
687 cata("<h4>Additional Information</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
688 cata("<ul>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
689
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
690 if (filtCPM || filtSmpCount || filtTotCount) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
691 if (filtCPM) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
692 tempStr <- paste("Genes without more than", opt$cmpReq,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
693 "CPM in at least", opt$sampleReq, "samples are insignificant",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
694 "and filtered out.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
695 } else if (filtSmpCount) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
696 tempStr <- paste("Genes without more than", opt$cntReq,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
697 "counts in at least", opt$sampleReq, "samples are insignificant",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
698 "and filtered out.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
699 } else if (filtTotCount) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
700 tempStr <- paste("Genes without more than", opt$cntReq,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
701 "counts, after summing counts for all samples, are insignificant",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
702 "and filtered out.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
703 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
704
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
705 ListItem(tempStr)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
706 filterProp <- round(filteredCount/preFilterCount*100, digits=2)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
707 tempStr <- paste0(filteredCount, " of ", preFilterCount," (", filterProp,
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
708 "%) genes were filtered out for low expression.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
709 ListItem(tempStr)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
710 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
711 ListItem(opt$normOpt, " was the method used to normalise library sizes.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
712 if (wantTrend) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
713 ListItem("The limma-trend method was used.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
714 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
715 ListItem("The limma-voom method was used.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
716 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
717 if (wantWeight) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
718 ListItem("Weights were applied to samples.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
719 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
720 ListItem("Weights were not applied to samples.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
721 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
722 if (wantRobust) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
723 ListItem("eBayes was used with robust settings (robust=TRUE).")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
724 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
725 if (opt$pAdjOpt!="none") {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
726 if (opt$pAdjOpt=="BH" || opt$pAdjOpt=="BY") {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
727 tempStr <- paste0("MA-Plot highlighted genes are significant at FDR ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
728 "of ", opt$pValReq," and exhibit log2-fold-change of at ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
729 "least ", opt$lfcReq, ".")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
730 ListItem(tempStr)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
731 } else if (opt$pAdjOpt=="holm") {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
732 tempStr <- paste0("MA-Plot highlighted genes are significant at adjusted ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
733 "p-value of ", opt$pValReq," by the Holm(1979) ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
734 "method, and exhibit log2-fold-change of at least ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
735 opt$lfcReq, ".")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
736 ListItem(tempStr)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
737 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
738 } else {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
739 tempStr <- paste0("MA-Plot highlighted genes are significant at p-value ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
740 "of ", opt$pValReq," and exhibit log2-fold-change of at ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
741 "least ", opt$lfcReq, ".")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
742 ListItem(tempStr)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
743 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
744 cata("</ul>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
745
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
746 cata("<h4>Summary of experimental data:</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
747
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
748 cata("<p>*CHECK THAT SAMPLES ARE ASSOCIATED WITH CORRECT GROUP(S)*</p>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
749
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
750 cata("<table border=\"1\" cellpadding=\"3\">\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
751 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
752 TableHeadItem("SampleID")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
753 TableHeadItem(names(factors)[1]," (Primary Factor)")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
754
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
755 if (ncol(factors) > 1) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
756 for (i in names(factors)[2:length(names(factors))]) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
757 TableHeadItem(i)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
758 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
759 cata("</tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
760 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
761
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
762 for (i in 1:nrow(factors)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
763 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
764 TableHeadItem(row.names(factors)[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
765 for (j in 1:ncol(factors)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
766 TableItem(as.character(unmake.names(factors[i, j])))
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
767 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
768 cata("</tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
769 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
770 cata("</table>")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
771
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
772 cit <- character()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
773 link <- character()
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
774 link[1] <- paste0("<a href=\"",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
775 "http://www.bioconductor.org/packages/release/bioc/",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
776 "vignettes/limma/inst/doc/usersguide.pdf",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
777 "\">", "limma User's Guide", "</a>.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
778
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
779 link[2] <- paste0("<a href=\"",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
780 "http://www.bioconductor.org/packages/release/bioc/",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
781 "vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
782 "\">", "edgeR User's Guide", "</a>")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
783
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
784 cit[1] <- paste("Please cite the following paper for this tool:")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
785
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
786 cit[2] <- paste("Liu R, Holik AZ, Su S, Jansz N, Chen K, Leong HS, Blewitt ME,",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
787 "Asselin-Labat ML, Smyth GK, Ritchie ME (2015). Why weight? ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
788 "Modelling sample and observational level variability improves power ",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
789 "in RNA-seq analyses. Nucleic Acids Research, 43(15), e97.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
790
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
791 cit[3] <- paste("Please cite the paper below for the limma software itself.",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
792 "Please also try to cite the appropriate methodology articles",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
793 "that describe the statistical methods implemented in limma,",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
794 "depending on which limma functions you are using. The",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
795 "methodology articles are listed in Section 2.1 of the",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
796 link[1],
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
797 "Cite no. 3 only if sample weights were used.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
798 cit[4] <- paste("Smyth GK (2005). Limma: linear models for microarray data.",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
799 "In: 'Bioinformatics and Computational Biology Solutions using",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
800 "R and Bioconductor'. R. Gentleman, V. Carey, S. doit,.",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
801 "Irizarry, W. Huber (eds), Springer, New York, pages 397-420.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
802 cit[5] <- paste("Please cite the first paper for the software itself and the",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
803 "other papers for the various original statistical methods",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
804 "implemented in edgeR. See Section 1.2 in the", link[2],
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
805 "for more detail.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
806 cit[6] <- paste("Robinson MD, McCarthy DJ and Smyth GK (2010). edgeR: a",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
807 "Bioconductor package for differential expression analysis",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
808 "of digital gene expression data. Bioinformatics 26, 139-140")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
809 cit[7] <- paste("Robinson MD and Smyth GK (2007). Moderated statistical tests",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
810 "for assessing differences in tag abundance. Bioinformatics",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
811 "23, 2881-2887")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
812 cit[8] <- paste("Robinson MD and Smyth GK (2008). Small-sample estimation of",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
813 "negative binomial dispersion, with applications to SAGE data.",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
814 "Biostatistics, 9, 321-332")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
815 cit[9] <- paste("McCarthy DJ, Chen Y and Smyth GK (2012). Differential",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
816 "expression analysis of multifactor RNA-Seq experiments with",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
817 "respect to biological variation. Nucleic Acids Research 40,",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
818 "4288-4297")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
819 cit[10] <- paste("Law CW, Chen Y, Shi W, and Smyth GK (2014). Voom:",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
820 "precision weights unlock linear model analysis tools for",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
821 "RNA-seq read counts. Genome Biology 15, R29.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
822 cit[11] <- paste("Ritchie ME, Diyagama D, Neilson J, van Laar R,",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
823 "Dobrovic A, Holloway A and Smyth GK (2006).",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
824 "Empirical array quality weights for microarray data.",
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
825 "BMC Bioinformatics 7, Article 261.")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
826 cata("<h3>Citations</h3>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
827 cata(cit[1], "\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
828 cata("<br>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
829 cata(cit[2], "\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
830
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
831 cata("<h4>limma</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
832 cata(cit[3], "\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
833 cata("<ol>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
834 ListItem(cit[4])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
835 ListItem(cit[10])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
836 ListItem(cit[11])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
837 cata("</ol>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
838
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
839 cata("<h4>edgeR</h4>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
840 cata(cit[5], "\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
841 cata("<ol>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
842 ListItem(cit[6])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
843 ListItem(cit[7])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
844 ListItem(cit[8])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
845 ListItem(cit[9])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
846 cata("</ol>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
847
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
848 cata("<p>Please report problems or suggestions to: su.s@wehi.edu.au</p>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
849
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
850 for (i in 1:nrow(linkData)) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
851 if (grepl("session_info", linkData$Link[i])) {
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
852 HtmlLink(linkData$Link[i], linkData$Label[i])
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
853 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
854 }
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
855
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
856 cata("<table border=\"0\">\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
857 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
858 TableItem("Task started at:"); TableItem(timeStart)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
859 cata("</tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
860 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
861 TableItem("Task ended at:"); TableItem(timeEnd)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
862 cata("</tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
863 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
864 TableItem("Task run time:"); TableItem(timeTaken)
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
865 cata("<tr>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
866 cata("</table>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
867
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
868 cata("</body>\n")
a61a6e62e91f planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 6a458881c0819b75e55e64b3f494679d43bb9ee8
iuc
parents:
diff changeset
869 cata("</html>")