diff dexseq.xml @ 2:6e8b61c54ff3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit 0a56599c36b4968095ec5a3cb589f94fb139466c
author iuc
date Sun, 28 Jan 2018 04:04:39 -0500
parents f1c406f9554c
children 251393b72616
line wrap: on
line diff
--- a/dexseq.xml	Sun Jan 29 06:59:35 2017 -0500
+++ b/dexseq.xml	Sun Jan 28 04:04:39 2018 -0500
@@ -1,10 +1,12 @@
-<tool id="dexseq" name="DEXSeq" version="1.20.1">
+<tool id="dexseq" name="DEXSeq" version="@VERSION@.0">
     <description>Determines differential exon usage from count tables</description>
-    <requirements>
-        <requirement type="package" version="1.20.1">bioconductor-dexseq</requirement>
+     <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements">
         <requirement type="package" version="1.20.0">r-getopt</requirement>
         <requirement type="package" version="0.2.15">r-rjson</requirement>
-    </requirements>
+    </expand>
     <code file="dexseq_helper.py" />
     <stdio>
         <regex match="Execution halted"
@@ -24,50 +26,45 @@
             level="fatal"
             description="Error in the R script." />
     </stdio>
-    <version_command>
-    <![CDATA[
-        echo $(R --version | grep version | grep -v GNU)", DEXSeq version" $(R --vanilla --slave -e "library(DEXSeq); cat(sessionInfo()\$otherPkgs\$DEXSeq\$Version)" 2> /dev/null | grep -v -i "WARNING: ")" (depends on DESeq2 "$(R --vanilla --slave -e "library(DESeq2); cat(sessionInfo()\$otherPkgs\$DESeq2\$Version)" 2> /dev/null | grep -v -i "WARNING: ")")"
-    ]]>
-    </version_command>
-    <command>
-    <![CDATA[
-        mkdir ./html_out &&
-        #import json
-        Rscript '$__tool_directory__/dexseq.R'
-            -o '$dexseq_out'
-            -p \${GALAXY_SLOTS:-4}
-            #set $temp_factor_names = list()
-            #for $factor in $rep_factorName:
-                #set $temp_factor = list()
-                #set $count_files1 = list()
-                #for $file in $factor.countFiles1:
-                    $count_files1.append(str($file))
-                #end for
-                $temp_factor.append( {str($factor.factorLevel1): $count_files1} )
+    <version_command><![CDATA[
+echo $(R --version | grep version | grep -v GNU)", DEXSeq version" $(R --vanilla --slave -e "library(DEXSeq); cat(sessionInfo()\$otherPkgs\$DEXSeq\$Version)" 2> /dev/null | grep -v -i "WARNING: ")" (depends on DESeq2 "$(R --vanilla --slave -e "library(DESeq2); cat(sessionInfo()\$otherPkgs\$DESeq2\$Version)" 2> /dev/null | grep -v -i "WARNING: ")")"
+    ]]></version_command>
+    <command><![CDATA[
+ mkdir ./html_out &&
+ #import json
+ Rscript '$__tool_directory__/dexseq.R'
+     -o '$dexseq_out'
+     -p \${GALAXY_SLOTS:-4}
+     #set $temp_factor_names = list()
+     #for $factor in $rep_factorName:
+         #set $temp_factor = list()
+         #set $count_files1 = list()
+         #for $file in $factor.countFiles1:
+             $count_files1.append(str($file))
+         #end for
+         $temp_factor.append( {str($factor.factorLevel1): $count_files1} )
 
-                #set $count_files2 = list()
-                #for $file in $factor.countFiles2:
-                    $count_files2.append(str($file))
-                #end for
-                $temp_factor.append( {str($factor.factorLevel2): $count_files2} )
-                $temp_factor_names.append([str($factor.factorName), $temp_factor])
-            #end for
-            -f '#echo json.dumps(temp_factor_names)#'
-            -a $gtf
-            -c $fdr_cutoff
+         #set $count_files2 = list()
+         #for $file in $factor.countFiles2:
+             $count_files2.append(str($file))
+         #end for
+         $temp_factor.append( {str($factor.factorLevel2): $count_files2} )
+         $temp_factor_names.append([str($factor.factorName), $temp_factor])
+     #end for
+     -f '#echo json.dumps(temp_factor_names)#'
+     -a $gtf
+     -c $fdr_cutoff
 
-            #if $report:
-                -r ./html_out
-                &&
-                mkdir '$htmlreport.extra_files_path'
-                &&
-                cp ./html_out/testForDEU.html $htmlreport
-                &&
-                cp -r ./html_out/* '$htmlreport.extra_files_path'
-            #end if
-
-    ]]>
-    </command>
+     #if $report:
+         -r ./html_out
+         &&
+         mkdir '$htmlreport.extra_files_path'
+         &&
+         cp ./html_out/testForDEU.html $htmlreport
+         &&
+         cp -r ./html_out/* '$htmlreport.extra_files_path'
+     #end if
+    ]]></command>
     <inputs>
         <param name="gtf" type="data" format="gtf,gff" label="GTF file created from DEXSeq-Count tool"/>
         <repeat name="rep_factorName" title="Factor" min="1">
@@ -105,7 +102,36 @@
         </data>
     </outputs>
     <tests>
-        <test>
+        <!-- Ensure default output works-->
+        <test expect_num_outputs="1">
+            <param name="gtf" value="dexseq.gtf" ftype="gtf"/>
+            <repeat name="rep_factorName">
+                <param name="factorName" value="condition"/>
+                <param name="factorLevel1" value="knockdown"/>
+                <param name="countFiles1" value="treated1fb.txt,treated2fb.txt,treated3fb.txt" ftype="tabular"/>
+                <param name="factorLevel2" value="control"/>
+                <param name="countFiles2" value="untreated1fb.txt,untreated2fb.txt,untreated3fb.txt,untreated4fb.txt" ftype="tabular"/>
+            </repeat>
+            <param name="report" value="False"/>
+            <param name="fdr_cutoff" value="1"/>
+            <output name="dexseq_out" file="dexseq_result.tabular" ftype="tabular"/>
+        </test>
+        <!-- Ensure report works-->
+        <test expect_num_outputs="2">
+            <param name="gtf" value="dexseq.gtf" ftype="gtf"/>
+            <repeat name="rep_factorName">
+                <param name="factorName" value="Treatment"/>
+                <param name="factorLevel1" value="knockdown"/>
+                <param name="countFiles1" value="treated1fb.txt,treated2fb.txt,treated3fb.txt" ftype="tabular"/>
+                <param name="factorLevel2" value="control"/>
+                <param name="countFiles2" value="untreated1fb.txt,untreated2fb.txt,untreated3fb.txt,untreated4fb.txt" ftype="tabular"/>
+            </repeat>
+            <param name="report" value="True"/>
+            <param name="fdr_cutoff" value="1"/>
+            <output name="dexseq_out" file="dexseq_result.tabular" ftype="tabular"/>
+        </test>
+        <!-- Ensure two factors works-->
+        <test expect_num_outputs="1">
             <param name="gtf" value="dexseq.gtf" ftype="gtf"/>
             <repeat name="rep_factorName">
                 <param name="factorName" value="condition"/>
@@ -123,11 +149,10 @@
             </repeat>
             <param name="report" value="False"/>
             <param name="fdr_cutoff" value="0.05"/>
-            <output name="dexseq_out" file="dexseq_result.tabular" ftype="tabular"/>
+            <output name="dexseq_out" file="dexseq_result_2fact.tabular" ftype="tabular"/>
         </test>
     </tests>
-    <help>
-    <![CDATA[
+    <help><![CDATA[
 .. class:: infomark
 
 **What it does**
@@ -139,7 +164,7 @@
 
 DEXSeq_ takes count tables generated from the dexseq_count as input. Count tables must be generated for each sample individually.
 DEXSeq_ is capable of handling multiple factors that effect your experiment. The first factor you input is considered as the primary
-factor that affects gene expressions. Primary factor should always be named as 'condition'. You also input several secondary factors that might
+factor that affects gene expressions. You also input several secondary factors that might
 influence your experiment. But the final output will be changes in genes due to primary factor in presence of secondary factors. Each factor has two levels/states.
 You need to select appropriate count table from your history for each factor level.
 
@@ -186,8 +211,7 @@
 
 
 .. _DEXSeq: http://master.bioconductor.org/packages/release/bioc/html/DEXSeq.html
-    ]]>
-    </help>
+    ]]></help>
     <citations>
         <citation type="doi">10.1101/gr.133744.111</citation>
     </citations>