view biom_add_metadata.xml @ 0:367b1ed91207 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/biom_format commit 01bf97e10e5491ec878cca24495d8125449dfc1e
author iuc
date Tue, 07 Jun 2016 17:25:44 -0400
parents
children 28ad7ac9c193
line wrap: on
line source

<tool id="biom_add_metadata" name="BIOM metadata" version="@VERSION@.0">
    <description>add-metadata</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command>
        <![CDATA[
            biom add-metadata 
                -i "${input_table}"
                -o "${output_table}"
                #if $input_sample_metadata:
                    --sample-metadata-fp "${input_sample_metadata}"
                #end if
                #if $input_observation_metadata:
                    --observation-metadata-fp "${input_observation_metadata}"
                #end if
                #if $sc_separated:
                    --sc-separated "${sc_separated}"
                #end if
                #if $sc_pipe_separated:
                    --sc-pipe-separated "${sc_pipe_separated}"
                #end if
                #if $int_fields:
                    --int-fields "${int_fields}"
                #end if
                #if $float_fields:
                    --float-fields "${float_fields}"
                #end if
                #if $sample_header:
                    --sample-header "${sample_header}"
                #end if
                #if $observation_header:
                    --observation-header "${observation_header}"
                #end if
                ${output_as_json}                
        ]]>
    </command>
    <inputs>
        <param name="input_table" type="data" format="biom1" label="BIOM File" argument="--input-fp"/>
        <param name="input_sample_metadata" type="data" format="tabular" optional="True" label="Sample Metadata Tabular File" argument="--sample-metadata-fp PATH"/>
        <param name="input_observation_metadata" type="data" format="tabular" optional="True" label="Observation Metadata Tabular File" argument="--observation-metadata-fp"/>
        <param name="sc_separated" type="text" value="" label="Comma-separated list of the metadata fields to split on semicolons" argument="--sc-separated"/>
        <param name="sc_pipe_separated" type="text" value="" label="Comma-separated list of the metadata fields to split on semicolons and pipes (|)" argument="--sc-pipe-separated"/>
        <param name="int_fields" type="text" value="" label="Comma-separated list of the metadata fields to cast to integers" argument="--int-fields"/>
        <param name="float_fields" type="text" value="" label="Comma-separated list of the metadata fields to cast to floating point numbers" argument="--float-fields"/>
        <param name="sample_header" type="text" value="" label="Comma-separated list of the sample metadata field names" argument="--sample-header"/>
        <param name="observation_header" type="text" value="" label="Comma-separated list of the observation metadata field names" argument="--observation-header"/>
        <param name="output_as_json" type="boolean" checked="True" truevalue="--output-as-json" falsevalue="" label="Write the output file in JSON format (biom1)" argument="--output-as-json"/>
    </inputs>
    <outputs>
        <data format="biom1" name="output_table">
            <change_format>
                <when input="${str( $output_as_json )}" value="" format="biom2" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="input_table" value="input_abundance_1.biom1" ftype="biom1"/>
            <param name="input_observation_metadata" value="input_taxonomy_1.tabular" ftype="tabular"/>
            <param name="sc_separated" value="taxonomy"/>
            <param name="input_sample_metadata"/>
            <param name="sc_pipe_separated" value=""/>
            <param name="int_fields" value=""/>
            <param name="float_fields" value=""/>
            <param name="sample_header" value=""/>
            <param name="observation_header" value=""/>
            <param name="output_as_json" value="True"/>
            <output name="output_table" file="output_taxonomy_1.biom1.re" ftype="biom1" compare="re_match"/>
        </test>
    </tests>
    <help><![CDATA[

Usage: biom add-metadata [OPTIONS]

  Add metadata to a BIOM table.

  Add sample and/or observation metadata to BIOM-formatted files. See
  examples here: http://biom-format.org/documentation/adding_metadata.html

  Example usage:

  Add sample metadata to a BIOM table:

  $ biom add-metadata -i otu_table.biom -o table_with_sample_metadata.biom
  -m sample_metadata.txt

Options:
  -i, --input-fp PATH             The input BIOM table  [required]
  -o, --output-fp PATH            The output BIOM table  [required]
  -m, --sample-metadata-fp PATH   The sample metadata mapping file (will add
                                  sample metadata to the input BIOM table, if
                                  provided).
  --observation-metadata-fp PATH  The observation metadata mapping file (will
                                  add observation metadata to the input BIOM
                                  table, if provided).
  --sc-separated TEXT             Comma-separated list of the metadata fields
                                  to split on semicolons. This is useful for
                                  hierarchical data such as taxonomy or
                                  functional categories.
  --sc-pipe-separated TEXT        Comma-separated list of the metadata fields
                                  to split on semicolons and pipes ("|"). This
                                  is useful for hierarchical data such as
                                  functional categories with one-to-many
                                  mappings (e.g. x;y;z|x;y;w)).
  --int-fields TEXT               Comma-separated list of the metadata fields
                                  to cast to integers. This is useful for
                                  integer data such as "DaysSinceStart".
  --float-fields TEXT             Comma-separated list of the metadata fields
                                  to cast to floating point numbers. This is
                                  useful for real number data such as "pH".
  --sample-header TEXT            Comma-separated list of the sample metadata
                                  field names. This is useful if a header line
                                  is not provided with the metadata, if you
                                  want to rename the fields, or if you want to
                                  include only the first n fields where n is
                                  the number of entries provided here.
  --observation-header TEXT       Comma-separated list of the observation
                                  metadata field names. This is useful if a
                                  header line is not provided with the
                                  metadata, if you want to rename the fields,
                                  or if you want to include only the first n
                                  fields where n is the number of entries
                                  provided here.
  --output-as-json                Write the output file in JSON format.
  --help                          Show this message and exit.


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