view flash.xml @ 3:dce033fd3c80 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/flash commit 22bfb515121a4f18ccfa907b0a18c98028e7064e
author iuc
date Wed, 08 Nov 2017 11:06:11 -0500
parents b48895989d78
children c85bdba47254
line wrap: on
line source

<?xml version="1.0"?>
<tool id="flash" name="FLASH" version="@VERSION@.3">
    <description>adjust length of short reads</description>
    <macros>
        <token name="@VERSION@">1.2.11</token>
    </macros>
    <requirements>
        <requirement type="package" version="@VERSION@">flash</requirement>
    </requirements>
    <version_command>flash --version | head -n 1</version_command>
    <command detect_errors="aggressive">
        <![CDATA[
            flash --threads=\${GALAXY_SLOTS:-1}
                -m $min_overlap
                -M $max_overlap
                -x $max_mismatch_density
                $allow_outies
                #if $layout.select_layout == 'individual':
                    '$layout.forward' '$layout.reverse'
                    #set $input = $layout.forward
                #else:
                    '$layout.reads.forward' '$layout.reads.reverse'
                    #set $input = $layout.reads.forward
                #end if
                #if $input.dataset.extension == 'fastqsanger':
                    -p 33
                #else:
                    -p 64
                #end if

                #if $save_log:
                    > '$log'
                #end if
        ]]>
    </command>
    <inputs>
        <conditional name="layout">
            <param name="select_layout" type="select" label="Input data structure">
                <option value="individual">Individual datasets</option>
                <option value="collection">Paired collection</option>
            </param>
            <when value="individual">
                <param format="fastqsanger,fastqsolexa,fastqillumina" name="forward" type="data" label="Forward reads" />
                <param format="fastqsanger,fastqsolexa,fastqillumina" name="reverse" type="data" label="Reverse reads" />
            </when>
            <when value="collection">
                <param format="fastqsanger,fastqsolexa,fastqillumina" name="reads" type="data_collection" collection_type="paired" label="Paired reads" />
            </when>
        </conditional>
        <param name="min_overlap" argument="--min-overlap" type="integer" optional="true" value="10" label="Minimum overlap" help="The minimum required overlap length between two reads to provide a confident overlap." />
        <param name="max_overlap" argument="--max-overlap" type="integer" optional="true" value="65" label="Maximum overlap" help="Maximum overlap length expected in approximately 90% of read pairs. Overlaps longer than the maximum overlap parameter are still considered as good overlaps, but the mismatch density is calculated over the first max_overlap bases in the overlapped region rather than the entire overlap." />
        <param name="max_mismatch_density" argument="--max-mismatch-density" type="float" optional="true" value="0.25" label="Maximum mismatch density" help="Maximum allowed ratio between the number of mismatched base pairs and the overlap length. Two reads will not be combined with a given overlap if that overlap results in a mismatched base density higher than this value." />
        <param name="allow_outies" argument="--allow-outies" type="boolean" truevalue="--allow-outies" falsevalue="" checked="false" label="Combine read pairs in both orientations" help="FLASH uses the same parameters when trying each orientation. If a read pair can be combined in either orientation, the better-fitting one will be chosen using the same scoring algorithm that FLASH normally uses." />
        <param name="generate_histogram" type="boolean" truevalue="" falsevalue="" checked="false" label="Output a text rendering of the histogram" />
        <param name="save_log" type="boolean" truevalue="" falsevalue="" checked="false" label="Save FLASH log file" />
    </inputs>
    <outputs>
        <data format_source="reads['forward']" name="merged_reads" from_work_dir="out.extendedFrags.fastq" label="${tool.name} on ${on_string}: Merged reads">
            <filter>layout['select_layout'] == 'collection'</filter>
        </data>
        <data format_source="reads['forward']" name="unmerged_reads_f" from_work_dir="out.notCombined_1.fastq" label="${tool.name} on ${on_string}: Unmerged forward reads">
            <filter>layout['select_layout'] == 'collection'</filter>
        </data>
        <data format_source="reads['reverse']" name="unmerged_reads_r" from_work_dir="out.notCombined_2.fastq" label="${tool.name} on ${on_string}: Unmerged reverse reads">
            <filter>layout['select_layout'] == 'collection'</filter>
        </data>
        <data format_source="forward" name="merged_paired_reads" from_work_dir="out.extendedFrags.fastq" label="${tool.name} on ${on_string}: Merged reads">
            <filter>layout['select_layout'] == 'individual'</filter>
        </data>
        <data format_source="forward" name="unmerged_paired_reads_f" from_work_dir="out.notCombined_1.fastq" label="${tool.name} on ${on_string}: Unmerged forward reads">
            <filter>layout['select_layout'] == 'individual'</filter>
        </data>
        <data format_source="reverse" name="unmerged_paired_reads_r" from_work_dir="out.notCombined_2.fastq" label="${tool.name} on ${on_string}: Unmerged reverse reads">
            <filter>layout['select_layout'] == 'individual'</filter>
        </data>
        <data format="tabular" name="hist" from_work_dir="out.hist" label="${tool.name} on ${on_string}: Unmerged reads tabular histogram" />
        <data format="txt" name="log" label="${tool.name} on ${on_string}: Raw Log">
          <filter>raw_log == 'yes'</filter>
        </data>
        <data format="txt" name="histogram" from_work_dir="out.histogram" label="${tool.name} on ${on_string}: Unmerged reads histogram">
            <filter>generate_histogram</filter>
        </data>
        <data format="tabular" name="hist_in" from_work_dir="out.hist.innie" label="${tool.name} on ${on_string}: Unmerged reads tabular histogram (in)">
            <filter>allow_outies</filter>
        </data>
        <data format="tabular" name="hist_out" from_work_dir="out.hist.outie" label="${tool.name} on ${on_string}: Unmerged reads tabular histogram (out)">
            <filter>allow_outies</filter>
        </data>
        <data format="txt" name="histogram_in" from_work_dir="out.histogram.innie" label="${tool.name} on ${on_string}: Unmerged reads histogram (in)">
            <filter>allow_outies and generate_histogram</filter>
        </data>
        <data format="txt" name="histogram_out" from_work_dir="out.histogram.outie" label="${tool.name} on ${on_string}: Unmerged reads histogram (out)">
            <filter>allow_outies and generate_histogram</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="select_layout" value="individual" />
            <param name="forward" value="flash_forward_in1.fastqsanger" ftype="fastqsanger" />
            <param name="reverse" value="flash_reverse_in1.fastqsanger" ftype="fastqsanger" />
            <param name="generate_histogram" value="false" />
            <param name="save_log" value="true" />
            <output name="merged_paired_reads" file="flash_merged_out1.fastqsanger" ftype="fastqsanger" />
            <output name="unmerged_paired_reads_f" file="flash_unmerged_f_out1.fastqsanger" ftype="fastqsanger" />
            <output name="unmerged_paired_reads_r" file="flash_unmerged_r_out1.fastqsanger" ftype="fastqsanger" />
            <output name="hist" file="flash_hist_out1.tabular" />
            <output name="log">
              <assert_contents>
                <has_line_matching expression=".*Percent combined: 3.60%" />
              </assert_contents>
            </output>
        </test>
        <test>
            <param name="select_layout" value="individual" />
            <param name="forward" value="flash_forward_in2.fastqsanger" ftype="fastqsanger" />
            <param name="reverse" value="flash_reverse_in2.fastqsanger" ftype="fastqsanger" />
            <param name="allow_outies" value="true" />
            <param name="generate_histogram" value="true" />
            <param name="save_log" value="true" />            
            <output name="merged_paired_reads" file="flash_merged_out2.fastqsanger" ftype="fastqsanger" />
            <output name="unmerged_paired_reads_f" file="flash_unmerged_f_out2.fastqsanger" ftype="fastqsanger" />
            <output name="unmerged_paired_reads_r" file="flash_unmerged_r_out2.fastqsanger" ftype="fastqsanger" />
            <output name="hist" file="flash_hist_out2.tabular" />
            <output name="histogram" file="flash_hist_out2.txt" />
            <output name="hist_in" file="flash_hist_in_out2.tabular" />
            <output name="histogram_in" file="flash_hist_in_out2.txt" />
            <output name="hist_out" file="flash_hist_out_out2.tabular" />
            <output name="histogram_out" file="flash_hist_out_out2.txt" />
            <output name="log">
              <assert_contents>
                <has_line_matching expression=".*Percent combined: 3.80%" />
              </assert_contents>
            </output>
        </test>
        <test>
            <param name="select_layout" value="collection" />
            <param name="generate_histogram" value="false" />
            <param name="reads">
                <collection type="paired">
                    <element name="forward" value="flash_forward_in3.fastqillumina" ftype="fastqillumina" />
                    <element name="reverse" value="flash_reverse_in3.fastqillumina" ftype="fastqillumina" />
                </collection>
            </param>
            <output name="merged_reads" file="flash_merged_out3.fastqillumina" ftype="fastqillumina" />
            <output name="unmerged_reads_f" file="flash_unmerged_f_out3.fastqillumina" ftype="fastqillumina" />
            <output name="unmerged_reads_r" file="flash_unmerged_r_out3.fastqillumina" ftype="fastqillumina" />
            <output name="hist" file="flash_hist_out3.tabular" />
        </test>
    </tests>
    <help>
<![CDATA[
FLASH (Fast Length Adjustment of SHort reads) is an accurate and fast tool
to merge paired-end reads that were generated from DNA fragments whose
lengths are shorter than twice the length of reads.  Merged read pairs result
in unpaired longer reads, which are generally more desired in genome
assembly and genome analysis processes.

Briefly, the FLASH algorithm considers all possible overlaps at or above a
minimum length between the reads in a pair and chooses the overlap that
results in the lowest mismatch density (proportion of mismatched bases in
the overlapped region).  Ties between multiple overlaps are broken by
considering quality scores at mismatch sites.  When building the merged
sequence, FLASH computes a consensus sequence in the overlapped region.
]]>
    </help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/btr507</citation>
    </citations>
</tool>