view fastx_trimmer.xml @ 4:b98f3fa516a3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/fastx_toolkit/fastx_trimmer commit f3f313cb59922b945ac9587ff718b231d0f8db5c
author iuc
date Fri, 17 Aug 2018 05:06:06 -0400
parents bbb007a39ac2
children 547e8d00f11c
line wrap: on
line source

<tool id="cshl_fastx_trimmer" version="1.0.2" name="Trim sequences">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
@CATS@ fastx_trimmer -v
-f $first
-l $last
-o '$output'
@FQQUAL@

#if $input.is_of_type('fasta.gz', 'fastqsanger.gz', 'fastqsolexa.gz', 'fastqillumina.gz'):
    -z
#end if

    ]]></command>
    <inputs>
        <expand macro="fastx_input" />
        <param name="first" type="integer" value="1" label="First base to keep" />
        <param name="last" type="integer" value="21" label="Last base to keep" />
    </inputs>
    <outputs>
        <data name="output" format_source="input" metadata_source="input" />
    </outputs>
    <tests>
        <test>
            <!-- Trim a FASTA file - remove first four bases (e.g. a barcode) -->
            <param name="input" value="fastx_trimmer1.fasta" />
            <param name="first" value="5"/>
            <param name="last" value="36"/>
            <output name="output" ftype="fasta" file="fastx_trimmer1.out" />
        </test>
        <test>
            <!-- Trim a FASTQ file - remove last 9 bases (e.g. keep only miRNA length sequences) -->
            <param name="input" value="fastx_trimmer2.fastq" ftype="fastqsolexa"/>
            <param name="first" value="1"/>
            <param name="last" value="27"/>
            <output name="output" ftype="fastqsolexa" file="fastx_trimmer2.out" />
        </test>
        <test>
            <!-- Trim a FASTQ.gz file  and output FASTQ.gz -->
            <param name="input" value="fastx_trimmer2.fastq.gz" ftype="fastqsanger.gz"/>
            <param name="first" value="1"/>
            <param name="last" value="27"/>
            <output name="output" ftype="fastqsanger.gz" decompress="true" file="fastx_trimmer2.out.gz" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool trims (cut bases from) sequences in a FASTA/Q file.

--------

**Example**

Input Fasta file (with 36 bases in each sequences)::

    >1-1
    TATGGTCAGAAACCATATGCAGAGCCTGTAGGCACC
    >2-1
    CAGCGAGGCTTTAATGCCATTTGGCTGTAGGCACCA

Trimming with First=1 and Last=21, we get a FASTA file with 21 bases in each sequences (starting from the first base)::

    >1-1
    TATGGTCAGAAACCATATGCA
    >2-1
    CAGCGAGGCTTTAATGCCATT

Trimming with First=6 and Last=10, will generate a FASTA file with 5 bases (bases 6,7,8,9,10) in each sequences::

    >1-1
    TCAGA
    >2-1
    AGGCT

    ------

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

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