annotate limma_voom.R @ 2:a330ddf43861 draft

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