view fastq_quality_filter.xml @ 6:64e9a6afdd0c draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/fastx_toolkit/fastq_quality_filter commit fd099d17eceaa319fbfe429f4725328d88b18c9f
author iuc
date Thu, 10 Aug 2023 06:53:15 +0000
parents ce9cd02d5b88
children
line wrap: on
line source

<tool id="cshl_fastq_quality_filter" version="1.0.2+galaxy@VERSION_SUFFIX@" profile="22.05" name="Filter by quality">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements">
        <requirement type="package" version="1.0.8">bzip2</requirement>
    </expand>
    <command detect_errors="exit_code"><![CDATA[
@CATS@ fastq_quality_filter
-q $quality
-p $percent
-v
@FQQUAL@
@GZIP@ > '$output'
    ]]></command>

    <inputs>
        <expand macro="fastq_input" />

        <param name="quality" type="integer" value="20" label="Quality cut-off value"/>

        <param name="percent" type="integer" value="90"
            label="Percent of bases in sequence that must have quality equal to / higher than cut-off value" />
    </inputs>
    <outputs>
        <data name="output" format_source="input" metadata_source="input" />
    </outputs>
    <tests>
        <test>
            <!-- Test1:  100% of bases with quality 33 or higher (pretty steep requirement...) -->
            <param name="input" value="fastq_qual_filter1.fastq" ftype="fastqsolexa" />
            <param name="quality" value="33"/>
            <param name="percent" value="100"/>
            <output name="output" ftype="fastqsolexa" file="fastq_qual_filter1a.out" />
        </test>
        <test>
            <!-- Test2:  80% of bases with quality 20 or higher -->
            <param name="input" value="fastq_qual_filter1.fastq" ftype="fastqsolexa"/>
            <param name="quality" value="20"/>
            <param name="percent" value="80"/>
            <output name="output" ftype="fastqsolexa" file="fastq_qual_filter1b.out" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool filters reads based on quality scores.

.. class:: infomark

Using **percent = 100** requires all cycles of all reads to be at least the quality cut-off value.

.. class:: infomark

Using **percent = 50** requires the median quality of the cycles (in each read) to be at least the quality cut-off value.

--------

Quality score distribution (of all cycles) is calculated for each read. If it is lower than the quality cut-off value - the read is discarded.


**Example**::

    @CSHL_4_FC042AGOOII:1:2:214:584
    GACAATAAAC
    +CSHL_4_FC042AGOOII:1:2:214:584
    30 30 30 30 30 30 30 30 20 10

Using **percent = 50** and **cut-off = 30** - This read will not be discarded (the median quality is higher than 30).

Using **percent = 90** and **cut-off = 30** - This read will be discarded (90% of the cycles do no have quality equal to / higher than 30).

Using **percent = 100** and **cut-off = 20** - This read will be discarded (not all cycles have quality equal to / higher than 20).

------

This tool is based on `FASTX-toolkit`__ by Assaf Gordon.

 .. __: http://hannonlab.cshl.edu/fastx_toolkit/
    ]]></help>
    <expand macro="citations" />
<!-- FASTQ-Quality-Filter is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->
</tool>