diff motus_merge.xml @ 0:d20f3b9a59a2 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/mOTUs commit 36fa40d4507065b7240c0a98815a079aba589e25
author bgruening
date Fri, 06 Sep 2024 15:00:49 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/motus_merge.xml	Fri Sep 06 15:00:49 2024 +0000
@@ -0,0 +1,94 @@
+<tool id="mereg_mOTUs_tables" name="Merge" version="@TOOL_VERSION@+galaxy0" profile="21.05">
+    <description>Merge mOTUs aboundance or count tables</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="biotools"/>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        #if $db.db_source == 'cached'
+            #set $DATABASE_DIR=$db.db_cached.fields.path
+        #else
+            #set $database_path = $db.database
+            mkdir database_dir &&
+            tar -xvf '$database_path' -C database_dir/ &&
+            #set $DATABASE_DIR = 'database_dir/db_mOTU' ##the actual DB folder in the archive called db_mOTU
+        #end if
+        echo "Database Directory:" $DATABASE_DIR  &&
+
+        motus merge
+        -db '$DATABASE_DIR'
+        -i '${','.join([str($file) for $file in $files])}'
+        #if $add_profiles
+        -a '$add_profiles'
+        #end if
+        #if $biom_format
+        -o '$output_biom'
+        $biom_format
+        #else
+        -o '$output_txt'
+        #end if
+    ]]></command>
+    <inputs>
+        <param name="files" type="data" format="txt" multiple="true" label="mOTU profiles to merge"/>
+        <param argument="add_profiles" type="text" label="Add pre-computed profiles" help="Add pre-computed profiles from different environmental samples" optional="true"/>
+        <param argument="biom_format" type="boolean" truevalue="-B" falsevalue="" checked="false" label="Output in BIOM format?"/>
+        <conditional name="db">
+            <param name="db_source" type="select" label="mOTUs Database">
+                <option value="cached">Use a pre-installed database</option>
+                <option value="history">Use a database from history</option>
+            </param>
+            <when value="cached">
+                <param name="db_cached" type="select" label="A pre-installed mOTUs databese" help="no pre-installed mOTUs databases are avalable yet">
+                    <options from_data_table="motus_db_versioned">
+                        <filter type="sort_by" column="1"/>
+                        <validator type="no_options" message="No compatible motus database is available"/>
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <param name="database" type="data" format="tar" label="Database from history" help="Custom database or other version of mOTUs database from link: https://zenodo.org/records/5140350"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="output_txt" format="txt" label="${tool.name} on ${on_string}: Merged taxon tables">
+            <filter>not biom_format</filter>
+        </data>
+        <data name="output_biom" format="biom1" label="${tool.name} on ${on_string}: BIOM Output">
+            <filter>biom_format</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="files" value="SAMEA2466887-default.motus,SAMEA2466889-default.motus"/>
+            <param name="biom_format" value="false"/>
+            <conditional name="db">
+                <!-- Local db -->
+                <param name="db_source" value="history"/>
+                <param name="database" location="https://zenodo.org/record/7778108/files/db_mOTU_v3.1.0.tar.gz"/>
+                <!-- <param name="database" value="db_mOTU_v3.1.0.tar.gz"/> -->
+            </conditional>
+            <output name="output_txt" ftype="txt">
+                <assert_contents>
+                    <has_text_matching expression="Enterobacterales sp.*"/>
+                    <has_text_matching expression="Klebsiella michiganensis.*"/>
+                    <has_text_matching expression="Streptococcus sp.*"/>
+                    <has_text_matching expression="Streptococcus pseudopneumoniae.*"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        
+What it does
+============
+
+The mOTUs tool performs taxonomic profiling of metagenomics and metatrancriptomics samples.
+
+mOTUs merge is specifically developed for merging and consolidating taxonomic profiles generated by the mOTU profiler. 
+It facilitates the combination of taxon abundance or count data from multiple samples or datasets into a single output.
+
+    ]]></help>
+    <expand macro="citations"/>
+</tool>