view combine_metaphlan_humann.xml @ 4:662a334004b4 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/combine_metaphlan2_humann2 commit 57a0433defa3cbc37ab34fbb0ebcfaeb680db8d5
author bgruening
date Sat, 04 Nov 2023 18:59:48 +0000
parents 01ac9954c27f
children
line wrap: on
line source

<tool id="combine_metaphlan_humann" name="Combine MetaPhlAn and HUMAnN outputs" version="0.3.0" profile="22.01">
    <description>to relate genus/species abundances and gene families/pathways abundances</description>
    <requirements>
        <requirement type="package" version="3.10">python</requirement>
    </requirements>
    <xrefs>
        <xref type="bio.tools">combine_metaphlan_and_humann</xref>
    </xrefs>
    <version_command></version_command>
    <command detect_errors="aggressive"><![CDATA[
        python '$__tool_directory__/combine_metaphlan_humann.py'
            --metaphlan_fp '$metaphlan_file'
            --humann_fp '$humann_file'
            --type '$type'   

            #if str($type) == 'gene_families'
                --output_fp '$gene_families_output_file'
            #else
                --output_fp '$pathway_output_file'
            #end if
    ]]></command>
    <inputs>
        <param argument="--metaphlan_file" format="txt,tabular" type="data" label="Input file corresponding to MetaPhlAn output" help="The MetaPhlAn output file contains relative abundance of clades at different taxonomic levels"/>
        <param argument="--humann_file" format="txt,tabular" type="data" label="Input file corresponding to HUMAnN output" help="The HUMAnN output file contains relative abundance of gene families or pathways with corresponding taxonomic stratification"/>
        <param argument='--type' type="select" label="Type of characteristics in HUMAnN file">
            <option value="gene_families" selected="true">Gene families</option>
            <option value="pathways">Pathways</option>
        </param>
    </inputs>
    <outputs>
        <data name="gene_families_output_file" format="tabular"
            label="${tool.name} on ${on_string}: Gene family abundances related to genus/species abundances" >
            <filter>type=="gene_families"</filter>
        </data>
        <data name="pathway_output_file" format="tabular"
            label="${tool.name} on ${on_string}: Pathway abundances related to genus/species abundances" >
            <filter>type=="pathways"</filter>
        </data>
    </outputs>
    <tests>
       	<!-- Using the output of old (i.e. v2) Humann and metaphlan -->
    	<test expect_num_outputs="1">
    		<param name="metaphlan_file" value="metaphlan2_input.txt"/>
    		<param name="humann_file" value="humann2_gene_families_input.tabular"/>
    		<param name='type' value="gene_families"/>
    		<output name="gene_families_output_file">
                <assert_contents>
                    <has_n_columns n="8"/>
                    <has_n_lines n="3043"/>
                    <has_text text="Staphylococcus_epidermidis"/>
                    <has_text text="Putative transposon Tn552 DNA invertase bin3"/>
                    <has_size value="374787"/>
                </assert_contents>
            </output>
    	</test>
    	<test expect_num_outputs="1">
    		 <param name="metaphlan_file" value="metaphlan2_input.txt"/>
    		 <param name="humann_file" value="humann2_pathways_input.tabular"/>
    		 <param name='type' value="pathways"/>
             <output name="pathway_output_file">
                <assert_contents>
                    <has_n_columns n="8"/>
                    <has_n_lines n="1533"/>
                    <has_text text="Rhodobacter_sphaeroides"/>
                    <has_text text="superpathway of acetyl CoA biosynthesis"/>
                    <has_size value="186363"/>
                </assert_contents>
            </output>
    	</test>
    	
    	<!-- Using the output of v3 Humann and v4 metaphlan -->
    	<test expect_num_outputs="1">
    		<param name="metaphlan_file" value="metaphlan4_input.txt"/>
    		<param name="humann_file" value="humann36_gene_families_input.tabular"/>
    		<param name='type' value="gene_families"/>
    		<output name="gene_families_output_file">
                <assert_contents>
                    <has_n_columns n="8"/>
                    <has_n_lines n="2242"/>
                    <has_text text="Acetivibrio_thermocellus"/>
                    <has_size value="213828"/>
                </assert_contents>
            </output>
    	</test>
    	<test expect_num_outputs="1">
    		 <param name="metaphlan_file" value="metaphlan4_input.txt"/>
    		 <param name="humann_file" value="humann36_pathways_input.tabular"/>
    		 <param name='type' value="pathways"/>
             <output name="pathway_output_file">
                <assert_contents>
                    <has_n_columns n="8"/>
                    <has_n_lines n="49"/>
                    <has_text text="Acetivibrio_thermocellus"/>
                    <has_text text="preQ0 biosynthesis"/>
                    <has_size value="6102"/>
                </assert_contents>
            </output>
    	</test>
    </tests>
    <help><![CDATA[
**What it does**

This tool combine MetaPhlAn outputs and HUMANnN outputs.

For each gene families/pathways and the corresponding taxonomic stratification, 
you get relative abundance of this gene family/pathway and the relative abundance 
of corresponding species and genus.
    ]]></help>
    <citations>
        <citation type="doi">10.7554/eLife.65088</citation>
    </citations>
</tool>