changeset 12:81796eb60bd0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 33651907e4d5d6672537b80142c022d2b4951e8c
author iuc
date Sun, 05 Aug 2018 05:13:12 -0400
parents 7e8af58c8052
children d5a940112511
files limma_voom.R limma_voom.xml
diffstat 2 files changed, 41 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/limma_voom.R	Mon Jun 11 08:18:25 2018 -0400
+++ b/limma_voom.R	Sun Aug 05 05:13:12 2018 -0400
@@ -166,6 +166,7 @@
     "totReq", "y", 0, "logical",
     "cntReq", "z", 1, "integer",
     "sampleReq", "s", 1, "integer",
+    "filtCounts", "F", 0, "logical",
     "normCounts", "x", 0, "logical",
     "rdaOpt", "r", 0, "logical",
     "lfcReq", "l", 1, "double",
@@ -218,6 +219,12 @@
     haveAnno <- TRUE
 }
 
+if (is.null(opt$filtCounts)) {
+    wantFilt <- FALSE
+} else {
+    wantFilt <- TRUE
+}
+
 if (is.null(opt$normCounts)) {
     wantNorm <- FALSE
 } else {
@@ -364,7 +371,7 @@
     topOut[i] <- makeOut(paste0(deMethod, "_", con, ".tsv"))
     glimmaOut[i] <- makeOut(paste0("glimma_", con, "/MD-Plot.html"))
 }
-
+filtOut <- makeOut(paste0(deMethod, "_filtcounts.tsv"))
 normOut <- makeOut(paste0(deMethod, "_normcounts.tsv"))
 rdaOut <- makeOut(paste0(deMethod, "_analysis.RData"))
 sessionOut <- makeOut("session_info.txt")
@@ -440,6 +447,13 @@
     data$counts <- data$counts[keep, ]
     data$genes <- data$genes[keep, , drop=FALSE]
 
+    if (wantFilt) {
+        print("Outputting filtered counts")
+        filt_counts <- data.frame(data$genes, data$counts)
+        write.table(filt_counts, file=filtOut, row.names=FALSE, sep="\t", quote=FALSE)
+        linkData <- rbind(linkData, data.frame(Label=paste0(deMethod, "_", "filtcounts.tsv"), Link=paste0(deMethod, "_", "filtcounts.tsv"), stringsAsFactors=FALSE))
+    }
+
     # Plot Density
     if ("d" %in% plots) {
         # PNG
--- a/limma_voom.xml	Mon Jun 11 08:18:25 2018 -0400
+++ b/limma_voom.xml	Sun Aug 05 05:13:12 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="limma_voom" name="limma" version="3.34.9.7">
+<tool id="limma_voom" name="limma" version="3.34.9.8">
     <description>
         Perform differential expression with limma-voom or limma-trend
     </description>
@@ -77,6 +77,10 @@
     -P $out.plots
 #end if
 
+#if $out.filtCounts:
+    -F
+#end if
+
 #if $out.normCounts:
     -x
 #end if
@@ -272,6 +276,10 @@
                 <option value="h">Heatmaps (top DE genes) </option>
                 <option value="s">Stripcharts (top DE genes)</option>
             </param>
+            <param name="filtCounts" type="boolean" truevalue="1" falsevalue="0" checked="false"
+                label="Output Filtered Counts Table?"
+                help="Output a file containing the raw filtered counts if Filter Low Counts is selected. Default: No">
+            </param>
             <param name="normCounts" type="boolean" truevalue="1" falsevalue="0" checked="false"
                 label="Output Normalised Counts Table?"
                 help="Output a file containing the normalised counts, these are in log2 counts per million (logCPM). Default: No">
@@ -465,9 +473,10 @@
                 </element>
             </output_collection>
         </test>
-        <!-- Ensure normalised counts file output works-->
+        <!-- Ensure filtered and normalised count outputs works-->
         <test>
             <param name="format" value="matrix" />
+            <param name="filtCounts" value="true" />
             <param name="normCounts" value="true" />
             <param name="counts" value="matrix.txt" />
             <repeat name="rep_factor">
@@ -477,19 +486,31 @@
             <repeat name="rep_contrast">
                 <param name="contrast" value="Mut-WT" />
             </repeat>
+            <param name="filt_select" value="yes" />
+            <param name="format_select" value="counts"/>
+            <param name="cntReq" value="10"/>
+            <param name="count_select" value="sample"/>
+            <param name="cntSampleReq" value="3"/>
             <param name="normalisationOption" value="TMM" />
             <param name="topgenes" value="6" />
-            <output_collection name="outTables" count="2">
+            <output_collection name="outTables" count="3">
                 <element name="limma-voom_Mut-WT" ftype="tabular" >
                     <assert_contents>
                         <has_text_matching expression="GeneID.*logFC.*AveExpr.*t.*P.Value.*adj.P.Val.*B" />
-                        <has_text_matching expression="11304.*0.4573" />
+                        <has_text_matching expression="11304.*0.45.*15.52.*4.94.*7.74.*0.0001.*5.27" />
                     </assert_contents>
                 </element>
                 <element name="limma-voom_normcounts" ftype="tabular" >
                     <assert_contents>
                         <has_text_matching expression="GeneID.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" />
-                        <has_text_matching expression="11304.*15.7545" />
+                        <has_text_matching expression="11304.*15.7.*15.8.*15.6.*15.3.*15.2.*15.2" />
+                    </assert_contents>
+                </element>
+                <element name="limma-voom_filtcounts" ftype="tabular" >
+                    <assert_contents>
+                        <has_text_matching expression="GeneID.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" />
+                        <has_text_matching expression="11304.*361.*397.*346.*356.*312.*337" />
+                        <not_has_text text="11302"/>
                     </assert_contents>
                 </element>
             </output_collection>