diff cmpress.xml @ 9:1d74ed49cf41 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/infernal commit 09c1d4ab75f5cd057ed57bf694217f0e355f785e
author bgruening
date Mon, 11 Nov 2024 10:27:19 +0000
parents c9e29ac5d099
children
line wrap: on
line diff
--- a/cmpress.xml	Thu Sep 23 19:38:58 2021 +0000
+++ b/cmpress.xml	Mon Nov 11 10:27:19 2024 +0000
@@ -1,47 +1,27 @@
-<tool id="infernal_cmpress" name="cmpress" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
+<tool id="infernal_cmpress" name="cmpress" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0">
     <description> Prepare a covariance model database for cmscan</description>
     <macros>
         <import>macros.xml</import>
     </macros>
+    <expand macro="xrefs"/>
     <expand macro="requirements" />
     <expand macro="stdio" />
-    <expand macro="xrefs"/>
-    <command>
+    <command detect_errors="aggressive">
 <![CDATA[
-    ## CM file from the history or stored as database on disc
+    mkdir -p ./cm_model &&
     #if str($cm_opts.cm_opts_selector) == "db":
-        cmfile_path='$cm_opts.database.fields.path'
+        ln -s '$cm_opts.database.fields.path' ./cm_model/
     #else:
-        ##'$cm_opts.cmfile'
-        cmfile_path='$cmfile'
+        ln -s '$cmfile' ./cm_model/
     #end if
     &&
-    cmpress -F "\$cmfile_path" &&
-    ##cmpress creates four files in the same directory of the cm file
-    cd `dirname "\$cmfile_path"` &&
-    tar -cvf '$outfile' `basename "\$cmfile_path"`.i1*
+    cmpress -F ./cm_model/* &&
+    cd ./cm_model/ &&
+    tar -cvf '$outfile' *.i1f *.i1i *.i1m *.i1p
 ]]>
     </command>
     <inputs>
-        <conditional name="cm_opts">
-            <param name="cm_opts_selector" type="select" label="Subject covariance models &lt;cmdb&gt; ">
-                <option value="db" >Locally installed covariance models</option>
-                <option value="histdb" selected="True">Covariance model from your history</option>
-            </param>
-            <when value="db">
-                <param name="database" type="select" label="Covariance models">
-                    <options from_file="infernal.loc">
-                        <column name="value" index="0"/>
-                        <column name="name" index="1"/>
-                        <column name="path" index="2"/>
-                    </options>
-                </param>
-            </when>
-            <when value="histdb">
-                <param name="cmfile" type="data" format="cm" label="Covariance models file from the history."/>
-            </when>
-        </conditional>
-
+        <expand macro="DB" />
     </inputs>
     <outputs>
         <data format="tar" name="outfile" label="cmpress on ${on_string}"/>
@@ -58,7 +38,16 @@
             </assert_stdout>
 
         </test>
+        <test>
+            <conditional name="cm_opts">
+                <param name="cm_opts_selector" value="db"/>
+                <param name="database" value="cmpress_input_minifam.cm"/>
+            </conditional>
+            <assert_stdout>
+                    <has_text text="Working...    done."/>
+            </assert_stdout>
 
+        </test>
     </tests>
     <help>
 <![CDATA[
@@ -86,4 +75,4 @@
     <expand macro="citations" />
 
 
-</tool>
+</tool>
\ No newline at end of file