annotate edgeR.pl @ 13:6324eefd9e91 draft default tip

Uploaded
author fcaramia
date Tue, 16 Dec 2014 18:24:39 -0500
parents e5fcbabbdea7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
1 #/bin/perl
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
3 use strict;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
4 use warnings;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
5 use Getopt::Std;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
6 use File::Basename;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
7 use File::Path qw(make_path remove_tree);
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
8 $| = 1;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
9
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
10 # Grab and set all options
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
11 my %OPTIONS = (a => "glm", d => "tag", f => "BH", r => 5, u => "movingave");
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
12
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
13 getopts('a:d:e:f:h:lmn:o:r:tu:', \%OPTIONS);
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
14
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
15 die qq(
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
16 Usage: edgeR.pl [OPTIONS] factor::factor1::levels [factor::factor2::levels ...] cp::cont_pred1::values [cp::cont_pred2::values ...] cnt::contrast1 [cnt::contrast2] matrix
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
17
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
18 OPTIONS: -a STR Type Of Analysis [glm, pw, limma] (default: $OPTIONS{a})
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
19 -d STR The dispersion estimate to use for GLM analysis [tag, trend, common] (default: $OPTIONS{d})
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
20 -e STR Path to place additional output files
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
21 -f STR False discovery rate adjustment method [BH, holm, hochberg, hommel, BY, none] (default: $OPTIONS{f})
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
22 -h STR Name of html file for additional files
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
23 -l Output the normalised digital gene expression matrix in log2 format (only applicable when using limma and -n is also specified)
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
24 -m Perform all pairwise comparisons
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
25 -n STR File name to output the normalised digital gene expression matrix (only applicable when usinf glm or limma model)
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
26 -o STR File name to output csv file with results
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
27 -r INT Common Dispersion Rowsum Filter, ony applicable when 1 factor analysis selected (default: $OPTIONS{r})
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
28 -t Estimate Tagwise Disp when performing 1 factor analysis
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
29 -u STR Method for allowing the prior distribution for the dispersion to be abundance- dependent ["movingave", "tricube", "none"] (default: $OPTIONS{u})
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
30
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
31 ) if(!@ARGV);
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
32
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
33 my $matrix = pop @ARGV;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
34
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
35 make_path($OPTIONS{e});
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
36 open(Rcmd,">$OPTIONS{e}/r_script.R") or die "Cannot open $OPTIONS{e}/r_script.R\n\n";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
37 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
38 zz <- file(\"$OPTIONS{e}/r_script.err\", open=\"wt\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
39 sink(zz)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
40 sink(zz, type=\"message\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
41
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
42 library(edgeR)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
43 library(limma)
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
44
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
45 # read in matrix and groups
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
46 toc <- read.table(\"$matrix\", sep=\"\\t\", comment=\"\", as.is=T)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
47 groups <- sapply(toc[1, -1], strsplit, \":\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
48 for(i in 1:length(groups)) { g <- make.names(groups[[i]][2]); names(groups)[i] <- g; groups[[i]] <- groups[[i]][-2] }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
49 colnames(toc) <- make.names(toc[2,])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
50 toc[,1] <- gsub(\",\", \".\", toc[,1])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
51 tagnames <- toc[-(1:2), 1]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
52 rownames(toc) <- toc[,1]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
53 toc <- toc[-(1:2), -1]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
54 for(i in colnames(toc)) toc[, i] <- as.numeric(toc[,i])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
55 norm_factors <- calcNormFactors(as.matrix(toc))
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
56
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
57 pw_tests <- list()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
58 uniq_groups <- unique(names(groups))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
59 for(i in 1:(length(uniq_groups)-1)) for(j in (i+1):length(uniq_groups)) pw_tests[[length(pw_tests)+1]] <- c(uniq_groups[i], uniq_groups[j])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
60 DGE <- DGEList(toc, lib.size=norm_factors*colSums(toc), group=names(groups))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
61 pdf(\"$OPTIONS{e}/MA_plots_normalisation.pdf\", width=14)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
62 for(i in 1:length(pw_tests)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
63 j <- c(which(names(groups) == pw_tests[[i]][1])[1], which(names(groups) == pw_tests[[i]][2])[1])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
64 par(mfrow = c(1, 2))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
65 maPlot(toc[, j[1]], toc[, j[2]], normalize = TRUE, pch = 19, cex = 0.2, ylim = c(-10, 10), main=paste(\"MA Plot\", colnames(toc)[j[1]], \"vs\", colnames(toc)[j[2]]))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
66 grid(col = \"blue\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
67 abline(h = log2(norm_factors[j[2]]), col = \"red\", lwd = 4)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
68 maPlot(DGE\$counts[, j[1]]/DGE\$samples\$lib.size[j[1]], DGE\$counts[, j[2]]/DGE\$samples\$lib.size[j[2]], normalize = FALSE, pch = 19, cex = 0.2, ylim = c(-8, 8), main=paste(\"MA Plot\", colnames(toc)[j[1]], \"vs\", colnames(toc)[j[2]], \"Normalised\"))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
69 grid(col = \"blue\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
70 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
71 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
72 pdf(file=\"$OPTIONS{e}/MDSplot.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
73 plotMDS(DGE, main=\"MDS Plot\", col=as.numeric(factor(names(groups)))+1, xlim=c(-3,3))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
74 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
75 tested <- list()
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
76 ";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
77
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
78 my $all_cont;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
79 my @add_cont;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
80 my @fact;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
81 my @fact_names;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
82 my @cp;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
83 my @cp_names;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
84 if(@ARGV) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
85 foreach my $input (@ARGV) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
86 my @tmp = split "::", $input;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
87 if($tmp[0] eq "factor") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
88 $tmp[1] =~ s/[ \?\(\)\[\]\/\\=+<>:;\"\',\*\^\|\&-]/./g;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
89 push @fact_names, $tmp[1];
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
90 $tmp[2] =~ s/:/\", \"/g;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
91 $tmp[2] = "\"".$tmp[2]."\"";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
92 push @fact, $tmp[2];
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
93 } elsif($tmp[0] eq "cp") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
94 $tmp[1] =~ s/[ \?\(\)\[\]\/\\=+<>:;\"\',\*\^\|\&-]/./g;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
95 push @cp_names, $tmp[1];
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
96 $tmp[2] =~ s/:/, /g;
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
97 push @cp, $tmp[2];
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
98 } elsif($tmp[0] eq "cnt") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
99 push @add_cont, $tmp[1];
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
100 } else {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
101 die("Unknown Input: $input\n");
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
102 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
103 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
104 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
105
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
106 if($OPTIONS{a} eq "pw") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
107 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
108 disp <- estimateCommonDisp(DGE, rowsum.filter=$OPTIONS{r})
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
109 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
110 if(defined $OPTIONS{t}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
111 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
112 disp <- estimateTagwiseDisp(disp, trend=\"$OPTIONS{u}\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
113 pdf(file=\"$OPTIONS{e}/Tagwise_Dispersion_vs_Abundance.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
114 plotBCV(disp, cex=0.4)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
115 abline(h=disp\$common.dispersion, col=\"firebrick\", lwd=3)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
116 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
117 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
118 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
119 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
120 for(i in 1:length(pw_tests)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
121 tested[[i]] <- exactTest(disp, pair=pw_tests[[i]])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
122 names(tested)[i] <- paste(pw_tests[[i]][2], \"-\", pw_tests[[i]][1], sep=\"\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
123 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
124 pdf(file=\"$OPTIONS{e}/Smear_Plots.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
125 for(i in 1:length(pw_tests)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
126 dt <- decideTestsDGE(tested[[i]], p.value=0.05, adjust.method=\"$OPTIONS{f}\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
127 if(sum(dt) > 0) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
128 de_tags <- rownames(disp)[which(dt != 0)]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
129 ttl <- \"Diff. Exp. Genes With adj. Pvalue < 0.05\"
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
130 } else {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
131 de_tags <- rownames(topTags(tested[[i]], n=100)\$table)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
132 ttl <- \"Top 100 tags\"
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
133 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
134
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
135 if(length(dt) < 5000) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
136 pointcex = 0.5
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
137 } else {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
138 pointcex = 0.2
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
139 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
140 plotSmear(disp, pair=pw_tests[[i]], de.tags = de_tags, main = paste(\"Smear Plot\", names(tested)[i]), cex=0.5)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
141 abline(h = c(-1, 1), col = \"blue\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
142 legend(\"topright\", c(\"2 Fold Change\", ttl) , lty=c(1, NA), pch=c(NA, 19), pt.cex=0.5, col=c(\"blue\", \"red\"), bty=\"n\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
143 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
144 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
145 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
146 } elsif($OPTIONS{a} eq "glm") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
147 for(my $fct = 0; $fct <= $#fact_names; $fct++) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
148 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
149 $fact_names[$fct] <- c($fact[$fct])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
150 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
151 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
152 for(my $fct = 0; $fct <= $#cp_names; $fct++) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
153 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
154 $cp_names[$fct] <- c($cp[$fct])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
155 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
156 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
157 my $all_fact = "";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
158 if(@fact_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
159 foreach (@fact_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
160 $all_fact .= " + factor($_)";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
161 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
162 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
163 my $all_cp = "";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
164 if(@cp_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
165 $all_cp = " + ".join(" + ", @cp_names);
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
166 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
167 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
168 group_fact <- factor(names(groups))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
169 design <- model.matrix(~ -1 + group_fact${all_fact}${all_cp})
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
170 colnames(design) <- sub(\"group_fact\", \"\", colnames(design))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
171 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
172 foreach my $fct (@fact_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
173 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
174 colnames(design) <- make.names(sub(\"factor.$fct.\", \"\", colnames(design)))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
175 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
176 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
177 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
178 disp <- estimateGLMCommonDisp(DGE, design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
179 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
180 if($OPTIONS{d} eq "tag" || $OPTIONS{d} eq "trend") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
181 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
182 disp <- estimateGLMTrendedDisp(disp, design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
183 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
184 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
185 if($OPTIONS{d} eq "tag") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
186 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
187 disp <- estimateGLMTagwiseDisp(disp, design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
188 fit <- glmFit(disp, design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
189 pdf(file=\"$OPTIONS{e}/Tagwise_Dispersion_vs_Abundance.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
190 plotBCV(disp, cex=0.4)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
191 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
192 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
193 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
194 if(@add_cont) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
195 $all_cont = "\"".join("\", \"", @add_cont)."\"";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
196 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
197 cont <- c(${all_cont})
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
198 for(i in uniq_groups) cont <- gsub(paste(groups[[i]], \"([^0-9])\", sep=\"\"), paste(i, \"\\\\1\", sep=\"\"), cont)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
199 for(i in uniq_groups) cont <- gsub(paste(groups[[i]], \"\$\", sep=\"\"), i, cont)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
200 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
201 } else {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
202 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
203 cont <- NULL
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
204 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
205 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
206 if(defined $OPTIONS{m}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
207 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
208 for(i in 1:length(pw_tests)) cont <- c(cont, paste(pw_tests[[i]][2], \"-\", pw_tests[[i]][1], sep=\"\"))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
209 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
210 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
211 if(!defined $OPTIONS{m} && !@add_cont){
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
212 die("No Contrasts have been specified, you must at least either select multiple pairwise comparisons or specify a custom contrast\n");
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
213 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
214 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
215 fit <- glmFit(disp, design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
216 cont <- makeContrasts(contrasts=cont, levels=design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
217 for(i in colnames(cont)) tested[[i]] <- glmLRT(fit, contrast=cont[,i])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
218 pdf(file=\"$OPTIONS{e}/Smear_Plots.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
219 for(i in colnames(cont)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
220 dt <- decideTestsDGE(tested[[i]], p.value=0.05, adjust.method=\"$OPTIONS{f}\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
221 if(sum(dt) > 0) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
222 de_tags <- rownames(disp)[which(dt != 0)]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
223 ttl <- \"Diff. Exp. Genes With adj. Pvalue < 0.05\"
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
224 } else {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
225 de_tags <- rownames(topTags(tested[[i]], n=100)\$table)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
226 ttl <- \"Top 100 tags\"
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
227 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
228
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
229 if(length(dt) < 5000) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
230 pointcex = 0.5
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
231 } else {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
232 pointcex = 0.2
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
233 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
234 plotSmear(disp, de.tags = de_tags, main = paste(\"Smear Plot\", i), cex=pointcex)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
235 abline(h = c(-1, 1), col = \"blue\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
236 legend(\"topright\", c(\"2 Fold Change\", ttl) , lty=c(1, NA), pch=c(NA, 19), pt.cex=0.5, col=c(\"blue\", \"red\"), bty=\"n\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
237 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
238 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
239 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
240 if(defined $OPTIONS{n}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
241 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
242 tab <- data.frame(ID=rownames(fit\$fitted.values), fit\$fitted.values, stringsAsFactors=F)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
243 write.table(tab, \"$OPTIONS{n}\", quote=F, sep=\"\\t\", row.names=F)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
244 ";
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
245 }
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
246 } elsif($OPTIONS{a} eq "limma") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
247 for(my $fct = 0; $fct <= $#fact_names; $fct++) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
248 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
249 $fact_names[$fct] <- c($fact[$fct])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
250 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
251 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
252 for(my $fct = 0; $fct <= $#cp_names; $fct++) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
253 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
254 $cp_names[$fct] <- c($cp[$fct])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
255 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
256 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
257 my $all_fact = "";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
258 if(@fact_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
259 foreach (@fact_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
260 $all_fact .= " + factor($_)";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
261 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
262 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
263 my $all_cp = "";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
264 if(@cp_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
265 $all_cp = " + ".join(" + ", @cp_names);
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
266 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
267 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
268 group_fact <- factor(names(groups))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
269 design <- model.matrix(~ -1 + group_fact${all_fact}${all_cp})
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
270 colnames(design) <- sub(\"group_fact\", \"\", colnames(design))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
271 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
272 foreach my $fct (@fact_names) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
273 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
274 colnames(design) <- make.names(sub(\"factor.$fct.\", \"\", colnames(design)))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
275 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
276 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
277 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
278 isexpr <- rowSums(cpm(toc)>1) >= 2
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
279 toc <- toc[isexpr, ]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
280 pdf(file=\"$OPTIONS{e}/LIMMA_voom.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
281 y <- voom(toc, design, plot=TRUE, lib.size=colSums(toc)*norm_factors)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
282 dev.off()
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
283
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
284 pdf(file=\"$OPTIONS{e}/LIMMA_MDS_plot.pdf\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
285 plotMDS(y, labels=colnames(toc), col=as.numeric(factor(names(groups)))+1, gene.selection=\"common\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
286 dev.off()
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
287 fit <- lmFit(y, design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
288 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
289 if(defined $OPTIONS{n}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
290 if(defined $OPTIONS{l}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
291 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
292 tab <- data.frame(ID=rownames(y\$E), y\$E, stringsAsFactors=F)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
293 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
294 } else {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
295 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
296 tab <- data.frame(ID=rownames(y\$E), 2^y\$E, stringsAsFactors=F)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
297 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
298 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
299 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
300 write.table(tab, \"$OPTIONS{n}\", quote=F, sep=\"\\t\", row.names=F)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
301 ";
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
302 }
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
303 if(@add_cont) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
304 $all_cont = "\"".join("\", \"", @add_cont)."\"";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
305 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
306 cont <- c(${all_cont})
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
307 for(i in uniq_groups) cont <- gsub(paste(groups[[i]], \"([^0-9])\", sep=\"\"), paste(i, \"\\\\1\", sep=\"\"), cont)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
308 for(i in uniq_groups) cont <- gsub(paste(groups[[i]], \"\$\", sep=\"\"), i, cont)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
309 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
310 } else {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
311 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
312 cont <- NULL
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
313 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
314 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
315 if(defined $OPTIONS{m}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
316 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
317 for(i in 1:length(pw_tests)) cont <- c(cont, paste(pw_tests[[i]][2], \"-\", pw_tests[[i]][1], sep=\"\"))
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
318 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
319 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
320 if(!defined $OPTIONS{m} && !@add_cont){
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
321 die("No Contrasts have been specified, you must at least either select multiple pairwise comparisons or specify a custom contrast\n");
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
322 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
323 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
324 cont <- makeContrasts(contrasts=cont, levels=design)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
325 fit2 <- contrasts.fit(fit, cont)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
326 fit2 <- eBayes(fit2)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
327 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
328 } else {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
329 die("Anaysis type $OPTIONS{a} not found\n");
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
330
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
331 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
332
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
333 if($OPTIONS{a} ne "limma") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
334 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
335 options(digits = 6)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
336 tab <- NULL
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
337 for(i in names(tested)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
338 tab_tmp <- topTags(tested[[i]], n=Inf, adjust.method=\"$OPTIONS{f}\")[[1]]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
339 colnames(tab_tmp) <- paste(i, colnames(tab_tmp), sep=\":\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
340 tab_tmp <- tab_tmp[tagnames,]
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
341 if(is.null(tab)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
342 tab <- tab_tmp
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
343 } else tab <- cbind(tab, tab_tmp)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
344 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
345 tab <- cbind(Feature=rownames(tab), tab)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
346 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
347 } else {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
348 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
349 tab <- NULL
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
350 options(digits = 6)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
351 for(i in colnames(fit2)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
352 tab_tmp <- topTable(fit2, coef=i, n=Inf, sort.by=\"none\", adjust.method=\"$OPTIONS{f}\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
353 colnames(tab_tmp)[-1] <- paste(i, colnames(tab_tmp)[-1], sep=\":\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
354 if(is.null(tab)) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
355 tab <- tab_tmp
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
356 } else tab <- cbind(tab, tab_tmp[,-1])
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
357 }
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
358 ";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
359 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
360 print Rcmd "
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
361 write.table(tab, \"$OPTIONS{o}\", quote=F, sep=\"\\t\", row.names=F)
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
362 sink(type=\"message\")
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
363 sink()
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
364 ";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
365 close(Rcmd);
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
366 system("R --no-restore --no-save --no-readline < $OPTIONS{e}/r_script.R > $OPTIONS{e}/r_script.out");
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
367
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
368 open(HTML, ">$OPTIONS{h}");
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
369 print HTML "<html><head><title>EdgeR: Empirical analysis of digital gene expression data</title></head><body><h3>EdgeR Additional Files:</h3><p><ul>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
370 print HTML "<li><a href=MA_plots_normalisation.pdf>MA_plots_normalisation.pdf</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
371 print HTML "<li><a href=MDSplot.pdf>MDSplot.pdf</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
372 if($OPTIONS{a} eq "pw") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
373 if(defined $OPTIONS{t}) {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
374 print HTML "<li><a href=Tagwise_Dispersion_vs_Abundance.pdf>Tagwise_Dispersion_vs_Abundance.pdf</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
375 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
376 print HTML "<li><a href=Smear_Plots.pdf>Smear_Plots.pdf</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
377 } elsif($OPTIONS{a} eq "glm" && $OPTIONS{d} eq "tag") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
378 print HTML "<li><a href=Tagwise_Dispersion_vs_Abundance.pdf>Tagwise_Dispersion_vs_Abundance.pdf</a></li>\n";
11
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
379 print HTML "<li><a href=Smear_Plots.pdf>Smear_Plots.pdf</a></li>\n";
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
380 } elsif($OPTIONS{a} eq "glm" && ($OPTIONS{d} eq "trend" || $OPTIONS{d} eq "common")) {
e5fcbabbdea7 Uploaded
fcaramia
parents: 2
diff changeset
381 print HTML "<li><a href=Smear_Plots.pdf>Smear_Plots.pdf</a></li>\n";
2
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
382 } elsif($OPTIONS{a} eq "limma") {
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
383 print HTML "<li><a href=LIMMA_MDS_plot.pdf>LIMMA_MDS_plot.pdf</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
384 print HTML "<li><a href=LIMMA_voom.pdf>LIMMA_voom.pdf</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
385 }
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
386 print HTML "<li><a href=r_script.R>r_script.R</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
387 print HTML "<li><a href=r_script.out>r_script.out</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
388 print HTML "<li><a href=r_script.err>r_script.err</a></li>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
389 print HTML "</ul></p>\n";
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
390 close(HTML);
674c75219f15 Uploaded
fcaramia
parents:
diff changeset
391