view fastq_trimmer_by_quality.xml @ 4:8050e091e99b draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/fastq_trimmer_by_quality commit cd1ed08574b749eee2a3f6e6151dbb0c8ca15bbf"
author devteam
date Sun, 01 Mar 2020 07:25:19 -0500
parents c64d534a763c
children
line wrap: on
line source

<tool id="fastq_quality_trimmer" name="FASTQ Quality Trimmer" version="1.1.5" profile="16.04">
    <description>by sliding window</description>
    <requirements>
        <requirement type="package" version="1.1.5">galaxy_sequence_utils</requirement>
    </requirements>
    <command><![CDATA[
gx-fastq-trimmer-by-quality '$input_file' '$output_file' -f '${input_file.extension[len('fastq'):]}' -s $window_size
-t $step_size -e $trim_ends -a $aggregation_action -x $exclude_count -c '$score_comparison' -q $quality_score
#if $keep_zero_length:
    -k
#end if
    ]]></command>
    <inputs>
        <param name="input_file" type="data" format="fastqsanger,fastqcssanger,fastqsanger.gz,fastqcssanger.gz,fastqsanger.bz2,fastqcssanger.bz2" label="FASTQ File"/>
        <param name="keep_zero_length" type="boolean" checked="false" label="Keep reads with zero length"/>
        <param name="trim_ends" type="select" label="Trim ends">
            <option value="53" selected="true">5' and 3'</option>
            <option value="5">5' only</option>
            <option value="3">3' only</option>
        </param>
        <param name="window_size" type="integer" value="1" label="Window size"/>
        <param name="step_size" type="integer" value="1" label="Step size" />
        <param name="exclude_count" type="integer" value="0" label="Maximum number of bases to exclude from the window during aggregation" />
        <param name="aggregation_action" type="select" label="Aggregate action for window">
            <option value="min" selected="true">min score</option>
            <option value="max">max score</option>
            <option value="sum">sum of scores</option>
            <option value="mean">mean of scores</option>
        </param>
        <param name="score_comparison" type="select" label="Trim until aggregate score is">
            <sanitizer>
                <valid initial="none">
                    <add value="&lt;&gt;=!"/> <!-- only allow lt, gt, e, le, ge, ne for this parameter; will be single-quote escaped on commandline -->
                </valid>
            </sanitizer>
            <option value="&gt;">&gt;</option>
            <option value="&gt;=" selected="true">&gt;=</option>
            <option value="==">==</option>
            <option value="!=">!=</option>
            <option value="&lt;">&lt;</option>
            <option value="&lt;=">&lt;=</option>
        </param>
        <param name="quality_score" type="float" value="0" label="Quality score" />
    </inputs>
    <outputs>
        <data name="output_file" format_source="input_file" />
    </outputs>
    <tests>
        <!-- Trim until window size 1 >= 20;both ends -->
        <test>
            <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
            <param name="keep_zero_length" value="false" />
            <param name="trim_ends" value="53"/>
            <param name="window_size" value="1"/>
            <param name="step_size" value="1"/>
            <param name="exclude_count" value="0"/>
            <param name="aggregation_action" value="min"/>
            <param name="score_comparison" value="&gt;="/>
            <param name="quality_score" value="20"/>
            <output name="output_file" file="sanger_full_range_quality_trimmed_out_1.fastqsanger" ftype="fastqsanger" />
        </test>
        <!-- Trim until window size 1 >= 20; 5' end only -->
        <test>
            <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
            <param name="keep_zero_length" value="false" />
            <param name="trim_ends" value="5"/>
            <param name="window_size" value="1"/>
            <param name="step_size" value="1"/>
            <param name="exclude_count" value="0"/>
            <param name="aggregation_action" value="min"/>
            <param name="score_comparison" value="&gt;="/>
            <param name="quality_score" value="20"/>
            <output name="output_file" file="sanger_full_range_quality_trimmed_out_2.fastqsanger" ftype="fastqsanger" />
        </test>
        <!-- Trim until window size 1 >= 20; 3' end only -->
        <test>
            <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
            <param name="keep_zero_length" value="false" />
            <param name="trim_ends" value="3"/>
            <param name="window_size" value="1"/>
            <param name="step_size" value="1"/>
            <param name="exclude_count" value="0"/>
            <param name="aggregation_action" value="min"/>
            <param name="score_comparison" value="&gt;="/>
            <param name="quality_score" value="20"/>
            <output name="output_file" file="sanger_full_range_quality_trimmed_out_3.fastqsanger" ftype="fastqsanger" />
        </test>
        <!-- Trim until window size 2 >= 1;both ends, 1 deviant score -->
        <test>
            <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
            <param name="keep_zero_length" value="false" />
            <param name="trim_ends" value="53"/>
            <param name="window_size" value="2"/>
            <param name="step_size" value="1"/>
            <param name="exclude_count" value="1"/>
            <param name="aggregation_action" value="min"/>
            <param name="score_comparison" value="&gt;="/>
            <param name="quality_score" value="1"/>
            <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
        </test>
        <!-- Trim entire sequences; keep empty reads -->
        <test>
            <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
            <param name="keep_zero_length" value="true" />
            <param name="trim_ends" value="53"/>
            <param name="window_size" value="1"/>
            <param name="step_size" value="1"/>
            <param name="exclude_count" value="0"/>
            <param name="aggregation_action" value="min"/>
            <param name="score_comparison" value="&gt;="/>
            <param name="quality_score" value="999"/>
            <output name="output_file" file="sanger_full_range_empty_reads.fastqsanger" ftype="fastqsanger" />
        </test>
        <!-- Trim entire sequences; discard empty reads -->
        <test>
            <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
            <param name="keep_zero_length" value="false" />
            <param name="trim_ends" value="53"/>
            <param name="window_size" value="1"/>
            <param name="step_size" value="1"/>
            <param name="exclude_count" value="0"/>
            <param name="aggregation_action" value="min"/>
            <param name="score_comparison" value="&gt;="/>
            <param name="quality_score" value="999"/>
            <output name="output_file" file="empty_file.dat" ftype="fastqsanger" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool allows you to trim the ends of reads based upon the aggregate value of quality scores found within a sliding window; a sliding window of size 1 is equivalent to 'simple' trimming of the ends.

The user specifies the aggregating action (min, max, sum, mean) to perform on the quality score values found within the sliding window to be used with the user defined comparison operation and comparison value.

The user can provide a maximum count of bases that can be excluded from the aggregation within the window. When set, this tool will first check the aggregation of the entire window, then after removing 1 value, then after removing 2 values, up to the number declared. Setting this value to be equal to or greater than the window size will cause no trimming to occur.

-----

.. class:: warningmark

Trimming a color space read will cause any adapter base to be lost.
    ]]></help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/btq281</citation>
    </citations>
</tool>