diff taxonkit_profile2cami.xml @ 0:0fd79958fac6 draft

planemo upload for repository https://github.com/shenwei356/taxonkit commit 695ea582a8d3bf7845dd4cddbc8b591e4b6c4e82
author iuc
date Fri, 26 Jul 2024 09:26:02 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/taxonkit_profile2cami.xml	Fri Jul 26 09:26:02 2024 +0000
@@ -0,0 +1,111 @@
+<tool id="profile2cami" name="Profile2CAMI" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>Convert metagenomic profile table to CAMI format</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>    
+    <expand macro="biotools"/>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code">
+    <![CDATA[
+        taxonkit profile2cami
+        --data-dir '${taxonomy.fields.path}'
+        --abundance-field '${abundance_field}'
+        --taxid-field '${taxid_field}'
+
+        $percentage
+        $recompute_abd
+        $keep_zero
+        $no_sum_up
+
+        #if $sample_id:
+            -s '${sample_id}'
+        #end if
+        #if $taxonomy_id:
+            -t '${taxonomy_id}'
+        #end if
+        #if $ranks:
+            --show-rank '${ranks}'
+        #end if
+        ${input_file}
+        > '${cami_output}'
+    ]]>
+    </command>
+    <inputs>
+        <param name="input_file" type="data" format="txt" label="Input Profile File" help="A tab-delimited profile file with TaxId and abundance columns." />
+        <param argument="--taxonomy" type="select" label="NCBI taxonomy" help="This NCBI database is used to map human-readable taxon names to TaxId's.">
+            <options from_data_table="ncbi_taxonomy">
+                <validator message="No NCBI database is available" type="no_options"/>
+            </options>
+        </param>
+        <param name="abundance_field" type="integer" value="2" label="Abundance Field Index" help="Field index of abundance in the input data." />
+        <param name="taxid_field" type="integer" value="1" label="TaxId Field Index" help="Field index of TaxId in the input data." />
+        <param name="percentage" type="boolean" value="false" label="Abundance in Percentage" help="Check if the abundance values are in percentage." truevalue="-p" falsevalue=""/>
+        <param name="recompute_abd" type="boolean" value="false" label="Recompute Abundance" help="Check to recompute abundance if some TaxIds are deleted in the current taxonomy version." truevalue="-R" falsevalue=""/>
+        <param name="keep_zero" type="boolean" value="false" label="Keep Zero Abundances" help="Check to keep taxons with abundance of zero." truevalue="-0" falsevalue=""/>
+        <param name="no_sum_up" type="boolean" value="false" label="Do Not Sum Up Abundance" help="Do not sum up abundance from child to parent TaxIds." truevalue="-S" falsevalue="" />
+        <param name="sample_id" type="text" value="" label="Sample ID" help="Optional sample ID to include in the result file." />
+        <param name="taxonomy_id" type="text" value="" label="Taxonomy ID" help="Optional taxonomy ID to include in the result file." />
+        <param name ="ranks" argument="--show-rank" type="select" multiple="true" label="Show Ranks" help="Specify the ranks to show in the result file (default [superkingdom,phylum,class,order,family,genus,species,strain]).">
+            <option value="superkingdom">Superkingdom</option>
+            <option value="phylum">Phylum</option>
+            <option value="class">Class</option>
+            <option value="order">Order</option>
+            <option value="family">Family</option>
+            <option value="genus">Genus</option>
+            <option value="species">Species</option>
+            <option value="strain">Strain</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="cami_output" format="tsv" label="${tool.name} on ${on_string}" />
+    </outputs>
+    <tests>
+        <!-- Test 1: Basic functionality with default parameters -->
+        <test expect_num_outputs="1">
+            <param name="input_file" value="abundance.tsv" ftype="tsv" />
+            <output name="cami_output" file="output1_basic_functionality.tsv" />
+        </test>
+
+        <!-- Test 2: Using percentage flag -->
+        <test expect_num_outputs="1">
+            <param name="input_file" value="abundance.tsv" ftype="tsv" />
+            <param name="percentage" value="true" />
+            <output name="cami_output" file="output2_percentage_flag.tsv" />
+        </test>
+
+        <!-- Test 3: Recomputing abundance with deleted TaxIds -->
+        <test expect_num_outputs="1">
+            <param name="input_file" value="abundance.tsv" ftype="tsv" />
+            <param name="recompute_abd" value="true" />
+            <output name="cami_output" file="output3_recompute_abd.tsv" />
+        </test>
+
+        <!-- Test 4: Profile2Cami with all parameters checked -->
+        <test expect_num_outputs="1">
+            <param name="input_file" value="abundance.tsv" ftype="tsv" />
+            <param name="percentage" value="true" />
+            <param name="recompute_abd" value="true" />
+            <param name="keep_zero" value="true" />
+            <param name="no_sum_up" value="true" />
+            <output name="cami_output" file="output4_all_param.tsv" />
+        </test>
+        </tests>
+        <help>
+        <![CDATA[
+            **What is Profile2CAMI**
+
+            Profile2CAMI is a tool for converting metagenomic profile tables to CAMI format.
+
+            **Inputs**
+
+            - A tab-delimited profile file with TaxId and abundance columns.
+
+            **Outputs**
+
+            - A CAMI formatted file.
+
+            For more information, please refer to the tool's documentation.
+        ]]>
+        </help>
+    <expand macro="citations" />
+</tool>
\ No newline at end of file