view biom_add_metadata.xml @ 3:a3b86937ead6 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/biom_format commit 4ca0a67fd4126f8b2a135b6cb7894042e980b39a"
author iuc
date Sat, 23 Oct 2021 21:29:30 +0000
parents 28ad7ac9c193
children 6ef0b5664c69
line wrap: on
line source

<tool id="biom_add_metadata" name="Add metadata" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>to a BIOM table</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="exit_code">
        <![CDATA[
            biom add-metadata 
                --input-fp '$input_fp'
                --output-fp '$output_fp'
                #if $sample_metadata_fp
                    --sample-metadata-fp '$sample_metadata_fp'
                #end if
                #if $observation_metadata_fp
                    --observation-metadata-fp '$observation_metadata_fp'
                #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_fp" argument="--input-fp" type="data" format="biom1" label="BIOM File"/>
        <param name="sample_metadata_fp" argument="--sample-metadata-fp" type="data" format="tabular" optional="True" label="Sample Metadata Tabular File" />
        <param name="observation_metadata_fp" argument="--observation-metadata-fp" type="data" format="tabular" optional="True" label="Observation Metadata Tabular File"/>
        <param name="sc_separated" argument="--sc-separated" type="text" value="" label="Comma-separated list of the metadata fields to split on semicolons" />
        <param name="sc_pipe_separated" argument="--sc-pipe-separated" type="text" value="" label="Comma-separated list of the metadata fields to split on semicolons and pipes (|)"/>
        <param name="int_fields" argument="--int-fields" type="text" value="" label="Comma-separated list of the metadata fields to cast to integers" />
        <param name="float_fields" argument="--float-fields" type="text" value="" label="Comma-separated list of the metadata fields to cast to floating point numbers" />
        <param name="sample_header" argument="--sample-header" type="text" value="" label="Comma-separated list of the sample metadata field names" />
        <param name="observation_header" argument="--observation-header" type="text" value="" label="Comma-separated list of the observation metadata field names" />
        <param name="output_as_json" argument="--output-as-json" type="boolean" checked="True" truevalue="--output-as-json" falsevalue="" label="Write the output file in JSON format (biom1)" />
    </inputs>
    <outputs>
        <data format="biom1" name="output_fp">
            <change_format>
                <when input="${str( $output_as_json )}" value="" format="h5" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="input_fp" value="input_abundance_1.biom1" ftype="biom1"/>
            <param name="observation_metadata_fp" value="input_taxonomy_1.tabular" ftype="tabular"/>
            <param name="sc_separated" value="taxonomy"/>
            <param name="output_as_json" value="--output-as-json"/>
            <output name="output_fp" 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>