view extract_barcodes.xml @ 0:c7eeac78cb64 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit 3b54163c4f7daff76fcc589c4a9057bb03904380
author iuc
date Sat, 05 Aug 2017 07:28:39 -0400
parents
children e149f41155e1
line wrap: on
line source

<tool id="qiime_extract_barcodes" name="Format Fastq sequences and barcode data" version="@WRAPPER_VERSION@.0">
    <description>(extract_barcodes)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>extract_barcodes.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
extract_barcodes.py
    --fastq1 '$fastq1'
    --bc1_len '$bc1_len'
    $rev_comp_bc1
    --input_type '$type.input_type'
    #if $type.input_type == 'barcode_paired_end'
        --fastq2 '$type.fastq2'
        $type.rev_comp_bc2
        --bc2_len '$type.bc2_len'
    #elif $type.input_type == 'barcode_paired_stitched'
        $type.switch_bc_order
        #if '$type.bc2_len' != ''
            --bc2_len '$type.bc2_len'
        #end if
    #elif $type.input_type == 'barcode_in_label'
        --char_delineator '$type.char_delineator'
        #if $type.fastq2
            --fastq2 '$type.fastq2'
            $type.rev_comp_bc2
            #if '$type.bc2_len' != ''
                --bc2_len '$type.bc2_len'
            #end if
        #end if
    #end if
    -o extract_barcodes
    #if $mapping_fp
        --mapping_fp '$mapping_fp'
    #end if
    $attempt_read_reorientation
    $disable_header_match
    ]]></command>
    <inputs>
        <param argument="--fastq1" type="data" format="fastq,fastqsanger,fastqsolexa" label="Input fastq filepath" help="This file is considered read 1"/>
        <param argument="--rev_comp_bc1" type="boolean" truevalue="--rev_comp_bc1" falsevalue="" checked="False" label="Reverse complement barcode 1 before writing?"/>
        <param argument="--bc1_len" type="integer" value="6" label="Length, in base pairs, of barcode 1" help="This applies to the –fastq1 file and all options specified by –input_type"/>
        <conditional name="type">
            <param argument="--input_type" type="select" label="Input type">
                <option value="barcode_single_end">barcode_single_end: Input is a single fastq file, that starts with the barcode sequence</option>
                <option value="barcode_paired_end">barcode_paired_end: Input is a pair of fastq files (–fastq1 and –fastq2) that each begin with a barcode sequence (The barcode for fastq1 will be written first, followed by the barcode from fastq2)</option>
                <option value="barcode_paired_stitched">barcode_paired_stitched: Input is a single fastq file that has barcodes at the beginning and end (The barcode from the beginning of the read will be written first followed by the barcode from the end of the read, unless the order is switched with –switch_bc_order)</option>
                <option value="barcode_in_label">barcode_in_label: Input is a one (–fastq1) or two (–fastq2) fastq files with the barcode written in the labels</option>
            </param>
            <when value="barcode_single_end"/>
            <when value="barcode_paired_end">
                <param argument="--fastq2" type="data" format="fastq,fastqsanger,fastqsolexa" label="Input fastq filepath" help="This file is considered read 2"/>
                <param argument="--bc2_len" type="integer" value="6" label="Length, in base pairs, of barcode 2" help="This applies to the –fastq2 file and options 'barcode_paired_end', 'barcode_paired_stitched', and 'barcode_in_label' for the –input_type"/>
                <param argument="--rev_comp_bc2" type="boolean" truevalue="--rev_comp_bc2" falsevalue="" checked="False" label="Reverse complement barcode 2 before writing?"/>
            </when>
            <when value="barcode_paired_stitched">
                <param argument="--switch_bc_order" type="boolean" truevalue="--switch_bc_order" falsevalue="" checked="False" label="Reverse barcode order written?"/>
                <param argument="--bc2_len" type="integer" value="6" optional="true" label="Length, in base pairs, of barcode 2" help="This applies to the –fastq2 file and options 'barcode_paired_end', 'barcode_paired_stitched', and 'barcode_in_label' for the –input_type" />
            </when>
            <when value="barcode_single_end"/>
            <when value="barcode_in_label">
                <param argument="--fastq2" type="data" format="fastq,fastqsanger,fastqsolexa" optional="true" label="Input fastq filepath" help="This file is considered read 2"/>
                <param argument="--bc2_len" type="integer" value="6" optional="true" label="Length, in base pairs, of barcode 2" help="This applies to the –fastq2 file and options 'barcode_paired_end', 'barcode_paired_stitched', and 'barcode_in_label' for the –input_type" />
                <param argument="--rev_comp_bc2" type="boolean" truevalue="--rev_comp_bc2" falsevalue="" checked="False" label="Reverse complement barcode 2 before writing?"/>
                <param argument="--char_delineator" type="text" value=":" label="Character in fastq label that should immediately precede the barcode sequence" help="The length of the barcode is specified by the –bc1_len (and optionally –bc2_len if paired end files are used) parameter"/>
            </when>
        </conditional>
        <param argument="--mapping_fp" type="data" format="txt,tabular,tsv,csv" label="Mapping files" help="NOTE: Must contain a header line indicating SampleID in the first column and BarcodeSequence in the second, LinkerPrimerSequence in the third and a ReversePrimer column before the final Description column. Needed for –attempt_read_orientation option." optional="True"/>
        <param argument="--attempt_read_reorientation" type="boolean" truevalue="--attempt_read_reorientation" falsevalue="" checked="False" label="Attempt to search for the forward and reverse primer in the read and adjust the sequence orientation to match the orientation of the forward primer?" help="An exact match for the forward and reverse complemented versions of the primers are tested for, and sequences are reverse complemented, if necessary, before writing. Sequences without an exact match are written to a separate output fastq file, labeled as _no_primer_match.fastq."/>
        <param argument="--disable_header_match" type="boolean" truevalue="--disable_header_match" falsevalue="" checked="False" label="Suppress header matching between input fastq files?"/>
    </inputs>
    <outputs>
        <data name="reads" format="fastq" from_work_dir="extract_barcodes/reads.fastq" label="${tool.name} on ${on_string}: Reads">
            <filter>type['input_type'] != 'barcode_in_label' and type['input_type'] != 'barcode_paired_end'</filter>
        </data>
        <data name="reads1" format="fastq" from_work_dir="extract_barcodes/reads1.fastq" label="${tool.name} on ${on_string}: Reads 1">
            <filter>type['input_type'] != 'barcode_in_label' and type['input_type'] == 'barcode_paired_end'</filter>
        </data>
        <data name="reads2" format="fastq" from_work_dir="extract_barcodes/reads2.fastq" label="${tool.name} on ${on_string}: Reads 2">
            <filter>type['input_type'] != 'barcode_in_label' and type['input_type'] == 'barcode_paired_end'</filter>
        </data>
        <data name="barcodes" format="fastq" from_work_dir="extract_barcodes/barcodes.fastq" label="${tool.name} on ${on_string}: Barcodes"/>
    </outputs>
    <tests>
        <test>
            <param name="fastq1" value="extract_barcodes/inseqs.fastq"/>
            <param name="bc1_len" value="6"/>
            <param name="rev_comp_bc1" value="--rev_comp_bc1"/>
            <conditional name="type">
                <param name="input_type" value="barcode_single_end"/>
            </conditional>
            <param name="attempt_read_reorientation" value=""/>
            <param name="disable_header_match" value=""/>
            <output name="reads" ftype="fastq" md5="8412379e70122577bc47c32be1410b49"/>
            <output name="barcodes" ftype="fastq" md5="52231eadb6e071e191ba07401e929e65"/>
        </test>
        <test>
            <param name="fastq1" value="extract_barcodes/inseqs_R1.fastq"/>
            <param name="bc1_len" value="6"/>
            <param name="rev_comp_bc1" value=""/>
            <conditional name="type">
                <param name="input_type" value="barcode_paired_end"/>
                <param name="fastq2" value="extract_barcodes/inseqs_R2.fastq"/>
                <param name="bc2_len" value="6"/>
                <param name="rev_comp_bc2" value=""/>
            </conditional>
            <param name="attempt_read_reorientation" value=""/>
            <param name="disable_header_match" value=""/>
            <output name="reads1" ftype="fastq" md5="f675c3eb8a47ec8b757eaac9f51ab846"/>
            <output name="reads2" ftype="fastq" md5="45abf363c68012d28dd45b3c8f94ab6a"/>
            <output name="barcodes" ftype="fastq" md5="dcc2443f9dbea7e8d4801a70e7424e3b"/>
        </test>
        <test>
            <param name="fastq1" value="extract_barcodes/inseqs_R1.fastq"/>
            <param name="bc1_len" value="6"/>
            <param name="rev_comp_bc1" value=""/>
            <conditional name="type">
                <param name="input_type" value="barcode_paired_end"/>
                <param name="fastq2" value="extract_barcodes/inseqs_R2.fastq"/>
                <param name="bc2_len" value="6"/>
                <param name="rev_comp_bc2" value=""/>
            </conditional>
            <param name="mapping_fp" value="extract_barcodes/mapping_data.txt"/>
            <param name="attempt_read_reorientation" value=""/>
            <param name="disable_header_match" value="--disable_header_match"/>
            <output name="reads1" ftype="fastq" md5="f675c3eb8a47ec8b757eaac9f51ab846"/>
            <output name="reads2" ftype="fastq" md5="45abf363c68012d28dd45b3c8f94ab6a"/>
            <output name="barcodes" ftype="fastq" md5="dcc2443f9dbea7e8d4801a70e7424e3b"/>
        </test>
        <test>
            <param name="fastq1" value="extract_barcodes/inseqs_R1.fastq"/>
            <param name="bc1_len" value="6"/>
            <param name="rev_comp_bc1" value=""/>
            <conditional name="type">
                <param name="input_type" value="barcode_paired_stitched"/>
                <param name="switch_bc_order" value=""/>
                <param name="bc2_len" value="8"/>
            </conditional>
            <param name="attempt_read_reorientation" value=""/>
            <param name="disable_header_match" value=""/>
            <output name="reads" ftype="fastq" md5="e04b45af9800402feba548c3e7393bff"/>
            <output name="barcodes" ftype="fastq" md5="9c9d9beacfd5862ba885012501e1f560"/>
        </test>
        <test>
            <param name="fastq1" value="extract_barcodes/inseqs_R1.fastq"/>
            <param name="bc1_len" value="6"/>
            <param name="rev_comp_bc1" value=""/>
            <conditional name="type">
                <param name="input_type" value="barcode_in_label"/>
                <param name="char_delineator" value="#"/>
            </conditional>
            <param name="attempt_read_reorientation" value=""/>
            <param name="disable_header_match" value=""/>
            <output name="barcodes" ftype="fastq" md5="ce4168051264dbfc6d11a2dd75af27ec"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This script is designed to format fastq sequence and barcode data so they are compatible with split_libraries_fastq.py.

A variety of data formats are possible, depending upon how one utilized sequencing primers, designed primer constructs (e.g., partial barcodes on each end of the read), or processed the data (e.g., barcodes were put into the sequence labels rather than the reads). See various input examples below.


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