view compare_biom.xml @ 0:43244ad9e7ef draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/picrust commit 95e0878f4cbd9caadffae7b9bcff4c1795f4c739
author iuc
date Sat, 20 Jan 2018 03:31:34 -0500
parents
children 9168545e09df
line wrap: on
line source

<tool id="picrust_compare_biom" name="Compare BIOM tables" version="@WRAPPER_VERSION@.0">
    <description>Compare the accuracy of biom files (expected and observed) either by observations (default) or by samples.</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
        compare_biom.py
            -e '$expected'
            -o '$outfile'
            $not_relative_abundance_scores
            $advanced.normalize
            $advanced.limit_to_observed_observations
            $advanced.limit_to_expected_observations
            $advanced.shuffle_samples

            '$observed'
    ]]></command>
    <inputs>
        <param name="observed" type="data" format="biom1" label="Observed table" help="The observed table of either relative abundance or real counts"/>
        <param name="expected" type="data" format="biom1" label="Expected table" help="The expected table of either relative abundance or real counts"/>
        <param argument="not_relative_abundance_scores" type="boolean" truevalue="--not_relative_abundance_scores" falsevalue="" checked="false" label="Real counts instead of relative abundances?"
               help="Round numbers (instead of taking ceil() which is used for RA) before calculating TP,FP,FN,TN"/>
        <section name="advanced" title="Advanced parameters" expanded="false">
            <param argument="compare_observations" type="boolean" truevalue="--compare_observations" falsevalue="" checked="false" label="Compare observations"
                help="Calculate accuracy values by comparing between observations (instead of between samples)."/>
            <param argument="normalize" type="boolean" truevalue="--normalize" falsevalue="" checked="false" label="Normalize?"
                help="Convert both expected and observed tables to relative abundances (instead of observations)."/>
            <param argument="limit_to_observed_observations" type="boolean" truevalue="--limit_to_observed_observations" falsevalue="" checked="false" label="Limit to observed observations?"
                help="Ignore observations that are not in the observed table."/>
            <param argument="limit_to_expected_observations" type="boolean" truevalue="--limit_to_expected_observations" falsevalue="" checked="false" label="Limit to expected observations?"
                help="Ignore observations that are not in the expected table."/>
            <param argument="shuffle_samples" type="boolean" truevalue="--shuffle_samples" falsevalue="" checked="false" label="Shuffle samples?"
                help="Shuffle samples ids randomly before measuring accuracy."/>
        </section>
    </inputs>
    <outputs>
        <data format="tabular" name="outfile" label="${tool.name} on ${on_string} Comparison summary"/>
    </outputs>
    <tests>
        <test><!-- relative abundance test -->
            <param name="observed" value="observed_ra.biom" ftype="biom1"/>
            <param name="expected" value="expected_ra.biom" ftype="biom1"/>
            <output name="outfile" ftype="tabular">
                <assert_contents>
                    <has_text_matching expression="file\tlabel\taccuracy"/>
                    <has_text text="sample1"/>
                    <has_text text="sample3"/>
                    <has_text text="sample2"/>
                </assert_contents>
            </output>
        </test>
        <test><!-- real counts test -->
            <param name="observed" value="observed.biom" ftype="biom1"/>
            <param name="expected" value="expected.biom" ftype="biom1"/>
            <param name="not_relative_abundance_scores" value="--not_relative_abundance_scores"/>
            <output name="outfile" ftype="tabular">
                <assert_contents>
                    <has_text_matching expression="file\tlabel\taccuracy"/>
                    <has_text text="sample1"/>
                    <has_text text="sample3"/>
                    <has_text text="sample2"/>
                </assert_contents>
            </output>
        </test>
        <test><!-- all other switches test -->
            <param name="observed" value="observed.biom" ftype="biom1"/>
            <param name="expected" value="expected.biom" ftype="biom1"/>
            <param name="not_relative_abundance_scores" value="--not_relative_abundance_scores"/>
            <param name="compare_observations" value="--compare_observations"/>
            <param name="normalize" value="--normalize"/>
            <param name="limit_to_observed_observations" value="--limit_to_observed_observations"/>
            <param name="shuffle_samples" value="--shuffle_samples"/>
            <output name="outfile" ftype="tabular">
                <assert_contents>
                    <has_text_matching expression="file\tlabel\taccuracy"/>
                    <has_text text="sample1"/>
                    <has_text text="sample3"/>
                    <has_text text="sample2"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
<![CDATA[
@PICRUST_OVERVIEW@

**Command Documentation**

Compare an observed table to an expected table using either relative abundance or real counts.

**Input files:**

**Observed table:** A table of observed relative abundances or real counts in .biom format.

**Expected table:** The expected table of relative abundances or real counts in .biom format.

**Output file:** Tab delimited file with various accuracy metrics.

**Optional Parameters:**

*compare observations*

    Calculate accuracy values by comparing between observations (instead of between samples) [default: False]

*normalize*

    Convert both expected and observed tables to relative abundances (instead of observations) [default: False]

*limit to expected observations*

    Ignore observations that are not in the expected table[default: False]

*limit to observed observations*

    Ignore observations that are not in the observed table[default: False]

*shuffle samples*

    Shuffle samples ids randomly before measuring accuracy[default: False]

*not relative abundance scores*

    Round numbers (instead of taking ceil() which is used for RA) before calculating TP,FP,FN,TN [default: False]

]]>
    </help>
    <expand macro="citations"/>
</tool>