view BlastAlign.xml @ 5:0d2da4c020dc draft

planemo upload for repository https://github.com/abims-sbr/adaptsearch commit df6ba874c5e5f0cde12c9253b5c192e4a35f2280
author abims-sbr
date Thu, 18 Jan 2018 08:13:26 -0500
parents 9eb5bb56bf41
children e0bea88bb09f
line wrap: on
line source

<tool name="BlastAlign" id="blastalign" version="2.1">

    <description>
        Align the nucleic acid sequences using BLASTN
    </description>

    <macros>
        <import>macros.xml</import>
    </macros>

    <requirements>
        <expand macro="python_required" />
        <requirement type="package" version="1.4">blastalign</requirement>
    </requirements>

    <stdio>
        <exit_code range="1:" level="fatal" />
    </stdio>

    <command><![CDATA[
        ln -s '$input' '$input.element_identifier'".fasta" &&

        BlastAlign -i '$input.element_identifier'".fasta"
        -m $advanced_option.m
        #if $advanced_option.r != ""
            -r $advanced_option.r
        #end if
        #if $advanced_option.x != ""
            -x $advanced_option.x
        #end if
        -n $advanced_option.n
        #if $advanced_option.s != 0
            -s $advanced_option.s
        #end if
        &&
        ln -s '$input.element_identifier'".fasta.phy" out.phy &&
        ln -s '$input.element_identifier'".fasta.nxs" out.nxs
        #if $fasta_out.value == True
            && python $__tool_directory__/scripts/S01_phylip2fasta.py out.phy out.fasta
        #end if

    ]]></command>
    <inputs>
        <param name="input" type="data" format="fasta" label="Choose your file" help="A fasta file with nucleotides sequences" />

        <section name="advanced_option" title="Blast advanced options" expanded="True">
            <param argument="-m" type="integer" value="95" min="0" max="100" label="Proportion of gaps allowed in any one sequence in the final alignement" help="default = 95, i.e. only removing sequences with extremely short matches" />
            <param argument="-r" type="text" area="True" size="1x20" label="Choose a reference sequence" help="default is to search for best candidate (if entered, the sequence will be extracted, written to a separate file, and blasted against the original input file)"/>
            <param argument="-x" type="text" area="True" size="5x25" label="Choose the sequences to be excluded from this analysis" help="name of comma-separated sequences " />
            <param argument="-n" type="boolean" checked="true" truevalue="T" falsevalue="F" label="Retain original names in output files" help="option F is to output the 15 character name abbreviations (stripped of potentially problematic characters) that is used in the program" />
            <param argument="-s" type="integer" value="0" min="0" label="Number of sequences to be used in initial search for reference sequence" help="default (= 0) is to find the reference sequence by blasting all sequences against all sequences, only randomly subsampling when it thinks the blast output file might be too large" />
        </section>

        <param name="fasta_out" type="boolean" checked="true" label="Do you want to convert the output phylip in fasta format ? " />
    </inputs>

    <outputs>
        <!-- visible="true" ? -->
        <data format="phylip" name="phy" from_work_dir="out.phy" label="Alignment of ${input.name} in phylip" />
        <data format="nexus" name="nxs" from_work_dir="out.nxs" label="Alignment of ${input.name} in nexus" />
        <data format="fasta" name="fasta" from_work_dir="out.fasta" label="Alignment of ${input.name} in fasta" />
            <filter>fasta_out == True</filter>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="input" ftype="fasta" value="inputs/locus1_sp2.fasta" />
            <section name="advanced_option">
                <param name="m" value="95" />
                <param name="r" value="" />
                <param name="x" value="" />
                <param name="n" value="False" />
                <param name="s" value="0" />
            </section>
            <param name="fasta_out" value="True" />
            <output name="phy" value="outputs/locus1_sp2.phy" />
            <output name="nxs" value="outputs/locus1_sp2.nxs" />
            <output name="fasta" value="outputs/locus1_sp2.fasta" />
        </test>
        <test>
            <param name="input" ftype="fasta" value="inputs/locus1_sp3.fasta" />
            <section name="advanced_option">
                <param name="m" value="95" />
                <param name="r" value="" />
                <param name="x" value="" />
                <param name="n" value="False" />
                <param name="s" value="0" />
            </section>
            <param name="fasta_out" value="True" />
            <output name="phy" value="outputs/locus1_sp3.phy" />
            <output name="nxs" value="outputs/locus1_sp3.nxs" />
            <output name="fasta" value="outputs/locus1_sp3.fasta" />
        </test>
        <test>
            <param name="input" ftype="fasta" value="inputs/locus3_sp2.fasta" />
            <section name="advanced_option">
                <param name="m" value="95" />
                <param name="r" value="" />
                <param name="x" value="" />
                <param name="n" value="False" />
                <param name="s" value="0" />
            </section>
            <param name="fasta_out" value="False" />
            <output name="phy" value="outputs/locus3_sp2.phy" />
            <output name="nxs" value="outputs/locus3_sp2.nxs" />
        </test>
    </tests>

    <help>
    <![CDATA[

. class:: infomark

**Authors**  BlastAlign has been written by Robert Belshaw and Aris Katzourakis. The scripts of this tool have been written by Eric Fontanillas.

.. class:: infomark

**Galaxy integration** Julie Baffard and ABiMS Team.

Contact support.abims@sb-roscoff.fr for any questions or concerns about the Galaxy implementation of this tool.

--------

**Description**

BlastAlign takes a set of nucleic sequences in a file in fasta format and returns a multiple alignment (in Nexus and Phylip formats) using BLAST+. This Galaxy implementation works with dataset collections, which allows multiple parallels runs of BlastAlign at once on many files.

--------

**Parameters**

The choice of several parameters for the blast is possible.

**-m : Proportion of gaps allowed in any one sequence in the final alignement**
    integer (between 0 and 100).
    By default : 95%, i.e. only removes sequences with extremely short matches.
    We find 50 the most useful.

**-r : Name of reference sequence**
    text.
    Default is searching for best candidate.
    If entered, the sequence will be extracted, written to a separate file, and blasted against the original input file.
  
 **-x : Name of sequences to be excluded from the analysis**
    text.
    names must be comma-separated.

 **-n**
    If checked : retain original names in output files.
    If not checked : output the 15 character name abbreviations (stripped of potentially problematic characters) that is used in the tool.
    Default : checked.

**-s : Number of sequences to be used in initial search for reference sequence**
    integer (between 0 and total number of sequences).
    Default : 0
    Default is finding the reference sequence by blasting all sequences against all sequences, only randomly subsampling when it thinks the blast output file might be too large.

--------

**Outputs**
 
    - 'Alignment_{input.name}_phylip' :
        the aligned sequences in Phylip format.

    - 'Alignment_{input.name}_nexus' :
       the aligned sequences in Nexus format.

    - 'Alignment_{input_file}_fasta' :
        the aligned sequences in Fasta format if the option "fasta format" is checked.

---------

Changelog
---------

**Version 2.1 - 17/01/2018**

  - Applied some bugfixes and minor improvments

**Version 2.0 - 21/04/2017**

 - NEW: BlastAlign will now be launched on one file at once. Although, it will manage a Dataset Collection to deal with numerous files.

**Version 1.0 - 13/04/2017**

 - TEST: Add funtional test with planemo
 - IMPROVEMENT: Use conda dependencies for blastalign, blast-legacy, perl, python

    ]]>

    </help>

    <expand macro="citations" />

</tool>