view make_emperor.xml @ 1:01c5d9754f71 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit a9d1e0debcd357d8080a1c6c5f1d206dd45a7a4d
author iuc
date Fri, 19 May 2017 03:38:18 -0400
parents 4069d17252b8
children f43da0fd602c
line wrap: on
line source

<tool id="qiime_make_emperor" name="Create three-dimensional PCoA plots" version="@WRAPPER_VERSION@.0">
    <description> to be visualized with Emperor</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>make_emperor.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
        make_emperor.py
            --input_coords '$input_coords'
            -o make_emperor
            --map_fp '$map_fp'
            --number_of_axes '$number_of_axes'
            $add_unique_columns
            #if $add_vectors
                --add_vectors '$add_vectors'
            #end if
            #if $color_by
                --color_by '$color_by'
            #end if
            $ignore_missing_samples
            #if str( $summarized_taxa_file.summarized_taxa_file_test )=="true":
                --n_taxa_to_keep '$summarized_taxa_file.n_taxa_to_keep'
                --taxa_fp '$summarized_taxa_file.taxa_fp'
            #end if
            --number_of_segments '$number_of_segments'
            $pct_variation_below_one
            #if str( $add_custom_axes.add_custom_axes_test )=="true":
                --custom_axes '$add_custom_axes.custom_axes'
                #if str( add_custom_axes.missing_custom_axes_values):
                    --missing_custom_axes_value '$missing_custom_axes_value'
                #end if
            #end if

        && mkdir -p '$html_report.files_path'
        && cp -r make_emperor/* '$html_report.files_path'
        && mv '$html_report.files_path/index.html' '$html_report'
    ]]></command>
    <inputs>
        <param argument="--input_coords" type="data" format="txt" label="Filepath of a coordinates file to create a PCoA plot"/>
        <param argument="--map_fp" type="data" format="tabular,txt,tsv" label="Mapping file" />
        <param argument="--number_of_axes" type="integer" value="10" label="Number of axes to be incorporated in the plot" help="Only 3 will be displayed at any given time but this option modifies how many axes you can use for your visualization. Note that Emperor will only use the axes that explain more than 0.5% (this will be shown as 1% in the GUI) of the variability"/>
        <param argument="--add_unique_columns" type="boolean" label="Add to the output categories of the mapping file the columns where all values are different?" truevalue="--add_unique_columns" falsevalue="" checked="false" help="If the result of one of the concatenated fields in --color_by is a column where all values are unique, the resulting column will get removed as well"/>
        <param argument="--add_vectors" type="data" format="txt" label="Comma-sparated category(ies) used to add connecting lines (vectors) between samples" help="The first category specifies the samples that will be connected by the vectors, whilst the second category (optionally) determines the order in which the samples will be connected" optional="true"/>
        <param argument="--color_by" type="data" format="txt" label="Comma-separated list of metadata categories (column headers) to color by in the plots" help="The categories must match the name of a column header in the mapping file exactly. Multiple categories can be listed by comma separating them without spaces. The user can also combine columns in the mapping file by separating the categories by &amp;&amp; without spaces" optional="true"/>
        <param argument="--ignore_missing_samples" type="boolean" label="Overpass the error raised when the coordinates file contains samples that are not present in the mapping file?" truevalue="--ignore_missing_samples" falsevalue="" checked="false" help="Be aware that this is very misleading as the PCoA is accounting for all the samples and removing some samples could lead to erroneous/skewed interpretations"/>
        <conditional name="summarized_taxa_file">
            <!--TODO: change to select -->
            <param name="summarized_taxa_file_test" type="select" label="Add a summarized taxa file?">
                <option value="true">Yes</option>
                <option value="false" selected="true">No</option>
            </param>
            <when value="true">
                <param argument="--taxa_fp" type="data" format="txt" label="Summarized taxa file" help="It is the output of summarize_taxa."/>
                <param argument="--n_taxa_to_keep" type="integer" value="10" label="Number of taxonomic groups to display" help="Passing -1 will cause to display all the taxonomic groups."/>
            </when>
            <when value="false"/>
        </conditional>
        <param argument="--number_of_segments" type="integer" value="8" min="4" max="14" label="Number of segments to generate any spheres" help="This includes the samples, the taxa (biplots), and the confidence intervals (jackknifing). Higher values will result in better quality but can make the plots less responsive, also it will make the resulting SVG images bigger"/>
        <param argument="--pct_variation_below_one" type="boolean" label="Allow the percent variation explained by the axis to be below one?" truevalue="--pct_variation_below_one" falsevalue="" checked="false" help="The default behavior is to multiply by 100 all values if PC1 is &lt; 1.0"/>
        <conditional name="add_custom_axes">
            <!--TODO: change to select -->
            <param name="add_custom_axes_test" type="select" label="Add custom axes?">
                <option value="true">Yes</option>
                <option value="false" selected="true">No</option>
            </param>
            <when value="true">
                <param argument="--custom_axes" type="data" format="txt" label="Comma-separated list of metadata categories to use as custom axes in the plot" help="For instance, if there is a time category and you would like to see the samples plotted on that axis instead of PC1, PC2, etc., you would pass time as the value of this option.  Note: if there is any non-numeric data in the metadata column, an error will be presented "/>
                <param argument="--missing_custom_axes_values" type="data" format="txt" label="Option to override the error shown when the category used in custom axes has non-numeric values in the mapping file" help="The basic format is custom_axis:new_value. For example, if you want to plot in time 0 all the samples that do not have a numeric value in the column Time. you would pass Time:0. Additionally, you can pass this format custom_axis:other_column==value_in_other_column=new_value, with this format you can specify different values (new_value) to use in the substitution based on other column (other_column) value (value_in_other_column). This option could be used in all explicit axes." optional="true"/>
            </when>
            <when value="false"/>
        </conditional>
    </inputs>
    <outputs>
        <data name="html_report" format="html" label="${tool.name} on ${on_string}: Core diversity report"/>
    </outputs>
    <tests>
        <test>
            <param name="input_coords" value="make_emperor/unweighted_unifrac_pc.txt"/>
            <param name="map_fp" value="make_emperor/map.txt"/>
            <param name="number_of_axes" value="10"/>
            <param name="add_unique_columns" value="--add_unique_columns"/>
            <param name="ignore_missing_samples" value=""/>
            <param name="summarized_taxa_file_test" value="false"/>
            <param name="number_of_segments" value="8"/>
            <param name="pct_variation_below_one" value=""/>
            <param name="add_custom_axes_test" value="false"/>
            <output name="html_report">
                <assert_contents>
                    <has_text text="'SampleID','BarcodeSequence','LinkerPrimerSequence','SampleType','year','month','day','subject','days_since_epoch','Description'"/>
                    <has_text text="'p2': ['p2','ACACTGTTCATG','GTGCCAGCMGCCGCGGTAA','L_palm','2008','10','22','1','14174','palm2'],'f1': ['f1','ACACTGTTCATG','GTGCCAGCMGCCGCGGTAA','feces','2008','10','22','1','14174','fecal1'],'f2': ['f2','ACCAGACGATGC','GTGCCAGCMGCCGCGGTAA','feces','2008','10','23','1','14175','fecal2'],'f3': ['f3','ACCAGACGATGC','GTGCCAGCMGCCGCGGTAA','feces','2008','10','23','1','14175','identical sequences to fecal2'],'f4': ['f4','ACCAGACGATGC','GTGCCAGCMGCCGCGGTAA','feces','2008','10','23','1','14175','all sequences identical, map to GG 295053 at 97 percent id'],'t2': ['t2','ATACTATTGCGC','GTGCCAGCMGCCGCGGTAA','Tongue','2008','10','22','1','14174','tongue2'],'not16S.1': ['not16S.1','ATACTATTGCGC','GTGCCAGCMGCCGCGGTAA','Other','2008','10','22','1','14174','randomly generated sequence plus some variants, these should not map to 16S'],'t1': ['t1','AGTGAGAGAAGC','GTGCCAGCMGCCGCGGTAA','Tongue','2008','10','21','1','14173','tongue1, contains one randomly generated sequence'],'p1': ['p1','AACGCACGCTAG','GTGCCAGCMGCCGCGGTAA','L_palm','2008','10','21','1','14173','palm1, contains one randomly generated sequence'] "/>
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="map_fp" value="core_diversity_analyses_map.txt"/>
            <param name="input_coords" value="make_emperor/unweighted_unifrac_pc.txt"/>
            <param name="map_fp" value="make_emperor/map.txt"/>
            <param name="number_of_axes" value="10"/>
            <param name="add_unique_columns" value="--add_unique_columns"/>
            <param name="ignore_missing_samples" value=""/>
            <param name="summarized_taxa_file_test" value="true"/>
            <param name="taxa_fp" value="summarize_taxa/2_L3.txt"/>
            <param name="n_taxa_to_keep" value="10"/>
            <param name="number_of_segments" value="8"/>
            <param name="pct_variation_below_one" value=""/>
            <param name="add_custom_axes_test" value="false"/>
            <output name="html_report">
                <assert_contents>
                    <has_text text="g_taxaPositions['0'] = { 'lineage': 'k__Bacteria;Other;Other', 'x': -0.157018, 'y': 0.066193, 'z': 0.025103, 'radius': 5.000000};"/>
                    <has_text text="g_taxaPositions['1'] = { 'lineage': 'Unclassified;Other;Other', 'x': 0.322810, 'y': -0.140183, 'z': -0.054778, 'radius': 2.647727};"/>
                    <has_text text="g_taxaPositions['2'] = { 'lineage': 'k__Bacteria;p__Proteobacteria;Other', 'x': 0.223596, 'y': 0.168008, 'z': 0.167052, 'radius': 0.500000};"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool calculates alpha diversity, or within-sample diversity, using an
OTU table.

The resulting file(s) is a tab-delimited text file, where the columns correspond
to alpha diversity metrics and the rows correspond to samples and their calculated
diversity measurements. When a folder is given as input (-i), the script processes
every otu table file in the given folder, and creates a corresponding file in the
output directory.

More information about this tool is available on
`QIIME documentation <http://qiime.org/scripts/index.html#emperor-scripts>`_.
    ]]></help>
    <citations>
        <expand macro="citations"/>
    </citations>
</tool>