view filtlong.xml @ 4:1f296803dfa3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/filtlong commit 865e706efac79fdec1a115d82d8974cafb30058e
author iuc
date Wed, 01 Nov 2023 08:35:30 +0000
parents 41b2ad601cf0
children
line wrap: on
line source

<tool id="filtlong" name="filtlong" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>Filtering long reads by quality</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools" />
    <expand macro="requirements"/>
    <version_command>filtlong --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
filtlong
    #if $output_thresholds.target_bases:
        --target_bases '$output_thresholds.target_bases'
    #end if
    #if $output_thresholds.keep_percent:
        --keep_percent '$output_thresholds.keep_percent'
    #end if
    #if $output_thresholds.min_length:
        --min_length '$output_thresholds.min_length'
    #end if
    #if $output_thresholds.min_mean_q:
        --min_mean_q '$output_thresholds.min_mean_q'
    #end if
    #if $output_thresholds.min_window_q:
        --min_window_q '$output_thresholds.min_window_q'
    #end if
    #if $output_thresholds.max_length:
        --max_length '$output_thresholds.max_length' 
    #end if
    #if $external_references.assembly:
        --assembly '$external_references.assembly'
    #end if
    #if $external_references.illumina_1:
        --illumina_1 '$external_references.illumina_1'
    #end if
    #if $external_references.illumina_2:
        --illumina_2 '$external_references.illumina_2'
    #end if
    --length_weight '$score_weights.length_weight'
    --mean_q_weight '$score_weights.mean_q_weight'
    --window_q_weight '$score_weights.window_q_weight'
    $read_manipulation.trim
    #if $read_manipulation.split:
        --split '$read_manipulation.split'
    #end if
    #if $other.window_size:
        --window_size '$other.window_size'
    #end if
    '$input_file' > output.fastq
    ]]></command>
    <inputs>
        <param name="input_file" type="data" format="fastqsanger,fastqsanger.gz" label="Input FASTQ" help="FASTQ of input reads"/>
        <section name="output_thresholds" title="Output thresholds">
            <param argument="--target_bases" type="integer" min="0" optional="True" label="Total bases" help="Keep only the best reads up to this many total bases"/>
            <param argument="--keep_percent" type="float" min="0" max="100" optional="True" label="Keep percentage" help="Keep only this percentage of the best reads (measured by bases)"/>
            <param argument="--max_length" type="integer" min="0" optional="True" label="Max. length" help="Maximum length threshold"/>
            <param argument="--min_length" type="integer" min="0" optional="True" label="Min. length" help="Minimum length threshold"/>
            <param argument="--min_mean_q" type="float" min="0" optional="True" label="Min. mean quality" help="Minimum mean quality threshold"/>
            <param argument="--min_window_q" type="float" min="0" optional="True" label="Min. window quality" help="Minimum window quality threshold"/>
        </section>
        <section name="external_references" title="External references">
            <param argument="--assembly" type="data" format="fasta,fasta.gz" optional="True" label="Reference assembly" help="Reference assembly in FASTA format"/>
            <param argument="--illumina_1" type="data" format="fastqsanger,fastqsanger.gz" optional="True" label="Reference Illumina read" help="Reference Illumina reads in FASTQ format"/>
            <param argument="--illumina_2" type="data" format="fastqsanger,fastqsanger.gz" optional="True" label="Reference Illumina read" help="Reference Illumina reads in FASTQ format"/>
        </section>
        <section name="score_weights" title="Score weights">
            <param argument="--length_weight" type="float" min="0" value="1" optional="True" label="Weight length score" help="Weight given to the length score (default: 1)"/>
            <param argument="--mean_q_weight" type="float" min="0" value="1" optional="True" label="Weight mean quality" help="Weight given to the mean quality score (default: 1)"/>
            <param argument="--window_q_weight" type="float" min="0" value="1" optional="True" label="Weight window quality" help="Weight given to the window quality score (default: 1)"/>
        </section>
        <section name="read_manipulation" title="Read manipulation">
            <param argument="--trim" type="boolean" checked="false" truevalue="--trim" falsevalue="" label="Trim non-k-mer-matching" help="Trim non-k-mer-matching bases from start/end of reads"/>
            <param argument="--split" type="integer" min="0" optional="True" label="Split at nr. of bases" help="split reads at this many (or more) consecutive non-k-mer-matching bases"/>
        </section>
        <section name="other" title="Other">
            <param argument="--window_size" type="integer" min="0" value="250" optional="True" label="Sliding window size" help="size of sliding window used when measuring window quality (default: 250)"/>
        </section>
    </inputs>
    <outputs>
        <data name="outfile" format="fastqsanger" from_work_dir="output.fastq" label="${tool.name} on ${on_string}: Filtered FASTQ"/>
    </outputs>
    <tests>
        <test>
            <param name="input_file" ftype="fastqsanger" value="test.fastq.gz"/>
            <param name="min_length" value="1000"/>
            <param name="keep_percent" value="50"/>
            <param name="target_bases" value="500000000"/>
            <output name="outfile" ftype="fastqsanger" file="output.fastq"/>
        </test>
        <test>
            <param name="input_file" ftype="fastqsanger" value="test.fastq.gz"/>
            <param name="assembly" ftype="fasta.gz" value="test_reference.fasta.gz"/>
            <param name="illumina_1" ftype="fastqsanger.gz" value="test_reference_1.fastq.gz"/>
            <param name="illumina_2" ftype="fastqsanger.gz" value="test_reference_2.fastq.gz"/>
            <param name="min_length" value="1000"/>
            <param name="keep_percent" value="90"/>
            <param name="target_bases" value="500000000"/>
            <param name="trim" value="True"/>
            <param name="split" value="500"/>
            <output name="outfile" ftype="fastqsanger" file="output_reference.fastq"/>
        </test>
        <test>
            <param name="input_file" ftype="fastqsanger" value="test.fastq.gz"/>
            <param name="max_length" value="5000"/>
            <output name="outfile" ftype="fastqsanger" file="output_max_length.fastq"/>
        </test>
    </tests>
    <help><![CDATA[
Filtlong is a tool for filtering long reads by quality. It can take a set of long reads and produce a smaller, better subset. It uses both read length (longer is better) and read identity (higher is better) when choosing which reads pass the filter.
    ]]></help>
    <citations>
        <citation type="bibtex">
            @misc{rrwick2017,
                author = {Wick, Ryan},
                year = {2017},
                title = {Filtlong},
                publisher = {GitHub},
                journal = {GitHub repository},
                url = {https://github.com/rrwick/Filtlong},
            }
        </citation>
    </citations>
</tool>