view validate_mapping_file.xml @ 6:1fe225d38243 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author iuc
date Tue, 30 Oct 2018 19:47:53 -0400
parents 6b784a33f3b3
children d1701fcfd7e5
line wrap: on
line source

<tool id="qiime_validate_mapping_file" name="Check user's metadata mapping file" version="@WRAPPER_VERSION@.0">
    <description> for required data, valid format (validate_mapping_file)</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"/>
        <param argument="--verbose" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Enable printing information to standard out?"/>
        <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" truevalue="" falsevalue="--not_barcoded" checked="true" label="Are barcodes present?" help="BarcodeSequence header is still required in mapping file"/>
        <param argument="--variable_len_barcodes" type="boolean" truevalue="" falsevalue="--variable_len_barcodes" checked="true" label="Are barcodes with variable length?"/>
        <param argument="--disable_primer_check" type="boolean" truevalue="-disable_primer_check" falsevalue="" checked="false" label="Disable checks for primers?" help="LinkerPrimerSequence header is still required in mapping file"/>
        <param argument="--added_demultiplex_field" type="text" optional="true" 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'"/>
        <param argument="--suppress_html" type="boolean" truevalue="-s" falsevalue="" checked="false" label="Disable html file generation?" 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>