view splitFasta.xml @ 5:733ca84b21ee draft default tip

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/splitfasta commit 31945d5d8c5ebee64ebf29c6ea022fb831f47274"
author rnateam
date Mon, 21 Sep 2020 15:40:14 +0000
parents ae4d5733272f
children
line wrap: on
line source

<tool id="rbc_splitfasta" name="Split Fasta" version="0.4.0">
    <description>files into a collection</description>
    <requirements>
        <requirement type="package" version="1.76">biopython</requirement>
    </requirements>
    <command detect_errors="aggressive">
    <![CDATA[
        #if $splitmode.splitmode_select == "each":
            python $__tool_directory__/split_fasta.py '$inputFile'
        #else if $splitmode.splitmode_select == "chunks":
            python $__tool_directory__/split_fasta.py '$inputFile' $splitmode.num_chunks
        #end if
    ]]></command>
    <inputs>
        <param name="inputFile" type="data" format="fasta" label="Fasta file to split"/>
        <conditional name="splitmode">
            <param name="splitmode_select" type="select" label="Split mode">
                <option value="each">Each sequence in its own dataset</option>
                <option value="chunks">Split into a number of chunks</option>
            </param>
            <when value="chunks">
                <param name="num_chunks" type="integer" value="10" label="Number of chunks to split into" />
            </when>
            <when value="each"/>
        </conditional>
    </inputs>
    <outputs>
        <collection name="splitted_fasta" type="list" label="${tool.name} on ${on_string}">
            <discover_datasets pattern="(?P&lt;designation&gt;.*)" directory="splits" ext="fasta" visible="false"/>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="inputFile" value="sample1.fasta" />
            <param name="splitmode|splitmode_select" value="each" />
            <output_collection name="splitted_fasta" count="3">
                <element name="ID1" file="ID1.fasta" ftype="fasta" />
                <element name="ID2" file="ID2.fasta" ftype="fasta" />
                <element name="ID3" file="ID3.fasta" ftype="fasta" />
            </output_collection>
        </test>
        <test>
            <param name="inputFile" value="sample2.fasta" />
            <param name="splitmode|splitmode_select" value="chunks" />
            <param name="num_chunks" value="4" />
            <output_collection name="splitted_fasta" count="4">
                <element name="part1" file="part1.fasta" ftype="fasta" />
                <element name="part2" file="part2.fasta" ftype="fasta" />
                <element name="part3" file="part3.fasta" ftype="fasta" />
                <element name="part4" file="part4.fasta" ftype="fasta" />
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[
        Takes an input FASTA file and writes entries (i.e. sequences) to separate datasets, which are organized in a dataset collection.
        There are two modes: 1) each sequence is written to its own data set which is named by the ID of the sequence or 2) The file is split into a given number of chunks which are numbered.
    ]]></help>
    <citations>
        <citation type="bibtex">
            @ARTICLE{bgruening_galaxytools,
                Author = {Björn Grüning, Cameron Smith, Torsten Houwaart, Nicola Soranzo, Eric Rasche},
                keywords = {bioinformatics, ngs, galaxy, cheminformatics, rna},
                title = {{Galaxy Tools - A collection of bioinformatics and cheminformatics tools for the Galaxy environment}},
                url = {https://github.com/bgruening/galaxytools}
            }
        </citation>
    </citations>
</tool>