changeset 1:b49a4465041d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hmmer3 commit 2c4b4a154e2f07730fdfdaf66a09e1e09ac5efde
author iuc
date Mon, 14 Nov 2016 15:11:16 -0500
parents 216b19e6c317
children 25fa92aa34c0
files hmmscan.xml macros.xml readme.rst tool-data/hmm_database.loc.sample tool_data_table_conf.xml.sample
diffstat 5 files changed, 66 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/hmmscan.xml	Sat Jun 25 15:06:16 2016 -0400
+++ b/hmmscan.xml	Mon Nov 14 15:11:16 2016 -0500
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="hmmer_hmmscan" name="hmmscan" version="@WRAPPER_VERSION@.0">
+<tool id="hmmer_hmmscan" name="hmmscan" version="@WRAPPER_VERSION@.1">
   <description>search sequence(s) against a profile database</description>
   <macros>
     <import>macros.xml</import>
@@ -7,8 +7,10 @@
   <expand macro="requirements"/>
   <expand macro="stdio"/>
   <command><![CDATA[
-## "Press" database
-hmmpress $hmmfile;
+#if $input_hmm_conditional.input_hmm_source == "history":
+    ## "Press" database
+    hmmpress '$input_hmm_conditional.hmmfile' &&
+#end if
 ## Scan
 hmmscan
 
@@ -20,14 +22,16 @@
 @CPU@
 @SEED@
 
-$hmmfile
-$seqfile
-> $output;
-## Remove pressed database. Eventually will be replaced with a dedicated tool/datatype
-rm ${hmmfile}.h3m ${hmmfile}.h3i ${hmmfile}.h3f ${hmmfile}.h3p;
+@INPUTHMMCHOICE@
+'$seqfile'
+> '$output'
+#if $input_hmm_conditional.input_hmm_source == "history":
+    ## Remove pressed database. Eventually will be replaced with a dedicated tool/datatype
+    && rm '${input_hmm_conditional.hmmfile}.h3m' '${input_hmm_conditional.hmmfile}.h3i' '${input_hmm_conditional.hmmfile}.h3f' '${input_hmm_conditional.hmmfile}.h3p';
+#end if
       ]]></command>
   <inputs>
-    <expand macro="input_hmm" />
+    <expand macro="input_hmm_choice" />
     <!-- todo use Galaxy features like data libraries/data tables/??? -->
     <param name="seqfile" type="data" format="fasta" label="Sequence file"/>
     <expand macro="oformat_with_opts"/>
@@ -38,20 +42,21 @@
     <expand macro="seed"/>
   </inputs>
   <outputs>
-    <data format="txt" name="output" label="HMM matches of $seqfile.name in $hmmfile.name"/>
-    <data format="txt" name="tblout" label="Table of per-sequence hits from HMM matches of $seqfile.name in $hmmfile.name">
+    <data format="txt" name="output" label="HMM matches of $seqfile.name against the profile database"/>
+    <data format="txt" name="tblout" label="Table of per-sequence hits from HMM matches of $seqfile.name against the profile database">
       <filter>'tblout' in oformat</filter>
     </data>
-    <data format="txt" name="domtblout" label="Table of per-domain hits from HMM matches of $seqfile.name in $hmmfile.name">
+    <data format="txt" name="domtblout" label="Table of per-domain hits from HMM matches of $seqfile.name against the profile database">
       <filter>'domtblout' in oformat</filter>
     </data>
-    <data format="txt" name="pfamtblout" label="Table of per-sequence/per-domain hits from HMM matches of $seqfile.name in $hmmfile.name">
+    <data format="txt" name="pfamtblout" label="Table of per-sequence/per-domain hits from HMM matches of $seqfile.name against the profile database">
       <filter>'pfamtblout' in oformat</filter>
     </data>
   </outputs>
   <tests>
     <test>
-      <param name="hmmfile" value="MADE1.hmm"/>
+      <param name="input_hmm_conditional|input_hmm_source" value="history"/>
+      <param name="input_hmm_conditional|hmmfile" value="MADE1.hmm"/>
       <param name="seqfile" value="dna_target.fa"/>
       <expand macro="oformat_test" />
       <expand macro="seed_test" />
--- a/macros.xml	Sat Jun 25 15:06:16 2016 -0400
+++ b/macros.xml	Mon Nov 14 15:11:16 2016 -0500
@@ -391,6 +391,32 @@
     <param name="w_length" label="Window Length"
         help="(--w_length)" optional="True" type="integer" />
   </xml>
+  <token name="@INPUTHMMCHOICE@">
+#if $input_hmm_conditional.input_hmm_source == "history":
+    '$input_hmm_conditional.hmmfile'
+#else:
+    '$input_hmm_conditional.index.fields.db_path'
+#end if
+  </token>
+  <xml name="input_hmm_choice">
+    <conditional name="input_hmm_conditional">
+      <param name="input_hmm_source" type="select" label="Use a built-in HMM model database or own from your history" >
+        <option value="indexed" selected="True">Use a built-in HMM model database</option>
+        <option value="history">Use a HMM database from history</option>
+      </param>
+      <when value="indexed">
+        <param name="index" type="select" label="Select a HMM model database" help="If your database of interest is not listed, contact the Galaxy administrator">
+          <options from_data_table="hmm_database">
+            <filter type="sort_by" column="2"/>
+            <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+          </options>
+        </param>
+      </when>
+      <when value="history">
+        <param name="hmmfile" type="data" label="HMM model" format="hmm2,hmm3"/>
+      </when>  <!-- history -->
+    </conditional>  <!-- input_hmm_conditional -->
+  </xml>
   <xml name="input_hmm">
     <param name="hmmfile" type="data" label="HMM model" format="hmm2,hmm3"/>
   </xml>
@@ -524,7 +550,7 @@
 **Advanced Documentation**
 
 A more detailed look at the internals of the various filter pipelines was
-posted on the `developer's blog <http://selab.janelia.org/people/eddys/blog/?p=508>`__.
+posted on the `developer's blog <https://cryptogenomicon.org/2011/09/19/hmmer3-is-stubborn/>`__.
 The information posted there may be useful to those who are struggling with
 poor-scoring sequences.
 
@@ -1041,7 +1067,7 @@
 Attribution
 -----------
 
-This Galaxy tool relies on HMMER3_ from http://hmmer.janelia.org/
+This Galaxy tool relies on HMMER3_
 Internally the software is cited as:
 
 ::
@@ -1056,7 +1082,7 @@
 documentation is copied from the HMMER3 documentation.
 
 .. _Apache2: http://www.apache.org/licenses/LICENSE-2.0
-.. _HMMER3: http://hmmer.janelia.org/
+.. _HMMER3: http://hmmer.org/
 
 
   ]]></token>
--- a/readme.rst	Sat Jun 25 15:06:16 2016 -0400
+++ b/readme.rst	Mon Nov 14 15:11:16 2016 -0500
@@ -29,6 +29,7 @@
 History
 =======
 
+* v0.1.1    - hmmscan: add the possibility to scan a built-in hmm profile database
 * v0.1      - Initial public release
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/hmm_database.loc.sample	Mon Nov 14 15:11:16 2016 -0500
@@ -0,0 +1,10 @@
+#This is a sample file that enables the hmmer tools to find the HMM databases
+#You will need to create these data files and then create
+#a hmm_database.loc file similar to this one (store it in this directory)
+#that points to the directories in which those files are stored.
+#The hmm_database_indices.loc file has this format (longer white space characters are TAB characters):
+#
+#<unique_build_id>   <display_name>   <file_base_path>
+#
+#So, for example:
+#pfam_a	Pfam-a	/data/db/pfam/Pfam-A.hmm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Mon Nov 14 15:11:16 2016 -0500
@@ -0,0 +1,7 @@
+<tables>
+    <!-- Locations of indexes in the HMM database format -->
+    <table name="hmm_database" comment_char="#">
+        <columns>value, name, db_path</columns>
+        <file path="tool-data/hmm_database.loc" />
+    </table>
+</tables>