view validate_mapping_file.xml @ 2:a0d2430136e6 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit e5d24fc90f811c8994ec8b72371ab4100d2c294c
author iuc
date Fri, 19 May 2017 04:08:58 -0400
parents 51ce498c97f4
children 6b784a33f3b3
line wrap: on
line source

<tool id="qiime_validate_mapping_file" name="Validate mapping file" version="@WRAPPER_VERSION@.0">
    <description>to check for required data and format</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>validate_mapping_file.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
        validate_mapping_file.py
            --mapping_fp '$mapping_fp'
            -o validate_mapping_file_output
            $verbose
            --char_replace '$char_replace'
            $not_barcoded
            $variable_len_barcodes
            $disable_primer_check
            #if str($added_demultiplex_field):
                --added_demultiplex_field '$added_demultiplex_field'
            #end if
            $suppress_html

            #if not $suppress_html:
                && mkdir -p '$html_report.files_path'
                && mv validate_mapping_file_output/*.html '$html_report'
                && cp validate_mapping_file_output/overlib.js '$html_report.files_path'
            #end if
    ]]></command>
    <inputs>
       <param argument="--mapping_fp" label="Metadata mapping filepath" type="data" format="tabular,csv,txt" help=""/>
        <param argument="--verbose" type="boolean" label="Enable printing information to standard out?" truevalue="-v" falsevalue="" checked="False"/>
        <param argument="--char_replace" type="text" value="_" label="Default character used to replace invalid characters found in the mapping file" help="Must be a valid character (alphanumeric, period, or underscore)"/>
        <param argument="--not_barcoded" type="boolean" label="Are barcodes present?" truevalue="" falsevalue="--not_barcoded" checked="True" help="BarcodeSequence header is still required in mapping file"/>
        <param argument="--variable_len_barcodes" type="boolean" label="Are barcodes with variable length?" truevalue="" falsevalue="--variable_len_barcodes" checked="True" help=""/>
        <param argument="--disable_primer_check" type="boolean" label="Disable checks for primers?" truevalue="-disable_primer_check" falsevalue="" checked="False" help="LinkerPrimerSequence header is still required in mapping file"/>
        <param argument="--added_demultiplex_field" type="text" label="Field to use in the mapping file as additional demultiplexing (optional)" help="It can be used with or without barcodes.  All combinations of barcodes/primers and these fields must be unique. The fields must contain values that can be parsed from the fasta labels such as 'plate=R_2008_12_09'. In this case, 'plate' would be the column header and 'R_2008_12_09' would be the field data (minus quotes) in the mapping file. To use the run prefix from the fasta label, such as 'FLP3FBN01ELBSX', where 'FLP3FBN01' is generated from the run ID, use 'run_prefix' and set the run prefix to be used as the data under the column header 'run_prefix'" optional="True"/>
        <param argument="--suppress_html" type="boolean" label="Disable html file generation?" truevalue="-s" falsevalue="" checked="False" help="It can be useful for extremely large mapping files"/>
    </inputs>
    <outputs>
        <data name="html_report" format="html" label="${tool.name} on ${on_string}: html report">
            <filter>suppress_html is False</filter>
        </data>
        <data name="log" format="txt" from_work_dir="validate_mapping_file_output/*.log" label="${tool.name} on ${on_string}: log"/>
        <data format="tabular" name="mapping_fp_corrected" from_work_dir="validate_mapping_file_output/*corrected.txt" label="${tool.name} on ${on_string}: corrected map"/>
    </outputs>
    <tests>
        <test>
            <param name="mapping_fp" value="validate_mapping_file/map.tsv"/>
            <param name="verbose" value=""/>
            <param name="char_replace" value="_"/>
            <param name="not_barcoded" value=""/>
            <param name="variable_len_barcodes" value=""/>
            <param name="disable_primer_check" value=""/>
            <param name="suppress_html" value=""/>
            <output name="log" file="validate_mapping_file/log.txt"/>
            <output name="mapping_fp_corrected" file="validate_mapping_file/corrected_map.tabular"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool checks user’s metadata mapping file for required data, valid format

Specifically, it checks that:

    - The BarcodeSequence, LinkerPrimerSequences, and ReversePrimer fields have valid IUPAC DNA characters, and BarcodeSequence characters are non-degenerate (error)
    - The SampleID, BarcodeSequence, LinkerPrimerSequence, and Description headers are present. (error)
    - There are not duplicate header fields (error)
    - There are not duplicate barcodes (error)
    - Barcodes are of the same length.  Suppressed when variable_len_barcode flag is passed (warning)
    - The headers do not contain invalid characters (alphanumeric and underscore only) (warning)
    - The data fields do not contain invalid characters (alphanumeric, underscore, space, and +-%./:,; characters) (warning)
    - SampleID fields are MIENS compliant (only alphanumeric and . characters). (warning)
    - There are no duplicates when the primer and variable length barcodes are appended (error)
    - There are no duplicates when barcodes and added demultiplex fields (-j option) are combined (error)
    - Data fields are not found beyond the Description column (warning)

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