changeset 15:9a099b9b6857 draft

Uploaded
author bgruening
date Fri, 11 Oct 2013 16:06:28 -0400
parents 46fd61e9c310
children e2df6fe8b447
files antismash.xml tool_dependencies.xml
diffstat 2 files changed, 81 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/antismash.xml	Thu Oct 10 04:04:57 2013 -0400
+++ b/antismash.xml	Fri Oct 11 16:06:28 2013 -0400
@@ -2,20 +2,20 @@
     <description>and Antibiotics Analysis (antiSMASH)</description>
     <requirements>
         <requirement type="package" version="3.0">hmmer</requirement>
-        <requirement type="package" version="2.3.2">hmmer</requirement>
         <requirement type="package" version="2.2.28">blast+</requirement>
         <requirement type="package" version="3.8.31">muscle</requirement>
         <requirement type="package" version="2.0.2">antismash_python_deps</requirement>
         <requirement type="package" version="2.0.2">antismash</requirement>
     </requirements>
     <command>
+        #import os, glob
+        #set $outputfolder = os.path.join($html.files_path, 'antismash')
+        ln -s $infile #echo 'input_tempfile.' + $infile.ext#;
+        mkdir -p $outputfolder;
         run_antismash.py 
-
-            --input $infile
             --cpus 4
-            ##set $type_list = ','.join([$type for $type in $types])
             --enable $types
-            --input-type nucl
+            --input-type 'nucl'
             $smcogs
             $clusterblast
             $subclusterblast
@@ -23,11 +23,51 @@
             $full_hmmer
             $full_blast
 
-            --pfamdir  $pfam_database.fields.path
+            #if str($pfam_database) != "None":
+                --pfamdir $pfam_database.fields.path
+            #end if
+
+            --disable-embl
+            --outputfolder $outputfolder
+
+
+            #echo 'input_tempfile.' + $infile.ext#
 
             ## leave out the start and end features, it can be easily replaced with Galaxy tools
             ##--from START          Start analysis at nucleotide specified
-            ##--to END  
+            ##--to END
+
+        ;
+        ## shuffling files to create the correct outputs for Galaxy
+        
+        ## html output
+        #if 'html' in $outputs:
+            cp #echo os.path.join($outputfolder, 'index.html')# $html;
+        #end if
+        
+        ## gene clusters
+        #if 'geneclusterprots_tabular' in $outputs:
+            cp #echo os.path.join($outputfolder, 'geneclusters.txt')# $geneclusterprots;
+        #end if
+
+        ##SVG images
+        #if 'archive_svgs' in $outputs:
+            cd #echo os.path.join($outputfolder, 'svg')#;
+            tar cfz $archive_svgs *_all.svg genecluster*;
+        #end if
+
+        ##all files in a archive
+        #if 'archive' in $outputs:
+            cd $outputfolder;
+            tar cf $archive *.zip;
+        #end if
+
+        ## genbank
+        #if 'gb' in $outputs:
+            #for $gb_file in glob.glob( os.path.join($outputfolder, '*.gbk') ):
+                cat $gb_file >> $genbank;
+            #end for
+        #end if
 
     </command>
     <inputs>
@@ -43,7 +83,7 @@
 
         <param name="inclusive" type="boolean" label="Use inclusive algorithm for cluster detection" truevalue="--inclusive" falsevalue="" checked="false" />
 
-        <param name="pfam_database" type="select" label="Pfam database" help="Pfam Covariance models">
+        <param name="pfam_database" type="select" optional="true" label="Pfam database" help="Pfam Covariance models">
             <options from_file="antismash.loc">
               <column name="value" index="0"/>
               <column name="name" index="1"/>
@@ -76,16 +116,37 @@
             <option value="thiopeptide" selected="True">thiopeptides</option>
             <option value="phenazine" selected="True">phenazines</option>
             <option value="phosphonate" selected="True">phosphonates</option>
-            <option value="others" selected="True">others</option>
+            <option value="other" selected="True">others</option>
+        </param>
+
+        <param name="outputs" type="select" multiple="true" label="Output formats">
+            <option value="geneclusterprots_fasta" selected="True">Gene cluster proteins (FASTA)</option>
+            <option value="geneclusterprots_tabular">Gene cluster proteins (Tabular)</option>
+            <option value="html" selected="True">Interactive summary page (html)</option>
+            <option value="archive_svgs">All clusters as image (compressed)</option>
+            <option value="archive">All files compressed</option>
+            <option value="gb">Annotated genome (GenBank)</option>
         </param>
 
     </inputs>
     <outputs>
-        <data format="fasta" name="geneclusterprots" label="${tool.name} on ${on_string} (Gen Cluster Proteins)" />
-        <data format="tabular" name="zip" label="${tool.name} on ${on_string} (all files compressed)" />
-        <data format="html" name="html" label="${tool.name} on ${on_string} (html report)" />
-        <data name="embl" format="text" label="${tool.name} on ${on_string} EMBL Output Format">
-          <filter>(wg_blast == True or pfam == True)</filter>
+        <data format="fasta" name="geneclusterprots" label="${tool.name} on ${on_string} (Gen Cluster Proteins)">
+          <filter>'geneclusterprots_fasta' in outputs</filter>
+        </data>
+        <data format="fasta" name="geneclusterprots" label="${tool.name} on ${on_string} (Gen Cluster Proteins)">
+          <filter>'geneclusterprots_tabular' in outputs</filter>
+        </data>
+        <data format="gzipped" name="archive" label="${tool.name} on ${on_string} (all files compressed)">
+          <filter>'archive' in outputs</filter>
+        </data>
+        <data format="gzipped" name="archive_svgs" label="${tool.name} on ${on_string} (SVG images)">
+          <filter>'archive_svgs' in outputs</filter>
+        </data>
+        <data format="html" name="html" label="${tool.name} on ${on_string} (html report)">
+          <filter>'html' in outputs</filter>
+        </data>
+        <data name="genbank" format="genbank" label="${tool.name} on ${on_string} (genbank)">
+          <filter>'gb' in outputs</filter>
         </data>
     </outputs>
   <help>
--- a/tool_dependencies.xml	Thu Oct 10 04:04:57 2013 -0400
+++ b/tool_dependencies.xml	Fri Oct 11 16:06:28 2013 -0400
@@ -3,9 +3,6 @@
     <package name="blast+" version="2.2.28">
         <repository changeset_revision="5a449da71d08" name="package_blast_plus_2_2_28" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />
     </package>
-    <package name="hmmer" version="2.3.2">
-        <repository changeset_revision="64510d86d77d" name="package_hmmer_2_3_2" owner="lionelguy" toolshed="http://testtoolshed.g2.bx.psu.edu" />
-    </package>
     <package name="hmmer" version="3.0">
         <repository changeset_revision="a44693e3a2c4" name="package_hmmer_3_0" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />
     </package>
@@ -62,6 +59,11 @@
                     <action type="chmod">
                         <file mode="750">$INSTALL_DIR/run_antismash.py</file>
                     </action>
+                    <!-- AntiSmash has a prerequirement check that is not useful for us, because we
+                        do not offer the option for genprediction and do not install glimmer and Co.
+                        For that reason deactivate the check.
+                    -->
+                    <action type="shell_command">sed -i s/check_prereqs(plugins, options) > 0/True/</action>
                     <action type="download_file">https://bitbucket.org/antismash/antismash2/downloads/clusterblast.tar.gz</action>
                     <action type="shell_command">tar xfvz clusterblast.tar.gz -C $INSTALL_DIR/antismash/generic_modules/clusterblast</action>
                 </actions>
@@ -86,6 +88,7 @@
                 <!-- The $PATH environment variable is only set if one of the above <actions> tags resulted in a successful installation. -->
                 <action type="set_environment">
                     <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR</environment_variable>
+                    <environment_variable action="append_to" name="PYTHONPATH">$INSTALL_DIR</environment_variable>
                 </action>
             </actions_group>
         </install>