view mafft-add.xml @ 16:8e649f27aa0d draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/mafft commit 3d98df472498e1273369d23822d10db14f337443
author bgruening
date Thu, 22 Aug 2024 19:20:24 +0000
parents bf28a8cff401
children
line wrap: on
line source

<tool id="rbc_mafft_add" name="MAFFT add" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>Align a sequence,alignment or fragments to an existing alignment.</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <version_command>mafft --version</version_command>
    <command detect_errors="exit_code">
    <![CDATA[
      sh mk_symlinks.sh &&
      mafft
      #if $sequences.sequenceType == 'singleseq'
        $sequences.preservegap input_dir/sequence
      #elif $sequences.sequenceType == 'frags'
        --addfragments input_dir/sequence
      #elif $sequences.sequenceType == 'group'
        --addprofile input_dir/sequence
      #end if
      $keeplength 
      $mapout 
      $reorder
      input_dir/alignment > '$outputAlignment'
      
      #if $mapout
        && mv input_dir/sequence.map '$outputmap'
      #end if
    ]]>
  </command>
    <configfiles>
        <configfile filename="mk_symlinks.sh"><![CDATA[
mkdir input_dir &&  
ln -s '$inputSequences' input_dir/sequence &&
ln -s '$inputAlignment' input_dir/alignment
    ]]></configfile>
    </configfiles>
    <inputs>
        <param name="inputSequences" type="data" format="fasta" label="Sequences to add to the alignment" help="Amino acid or nucleotide sequences in FASTA format."/>
        <param name="inputAlignment" type="data" format="fasta" label="Alignment" help="Amino acid or nucleotide sequences in aligned FASTA format."/>
        <conditional name="sequences">
            <param name="sequenceType" type="select" label="What do you want to add to the alignment?">
                <option value="singleseq">A single sequence</option>
                <option value="frags" selected="true">Fragments</option>
                <option value="group">An alignment</option>
            </param>
            <when value="singleseq">
                <param name="preservegap" type="select" label="Preserve the original alignment." help="Keep the given alignment unchanged .If not, the aligned letters in the seed alignment are preserved but gaps are not necessarily preserved.">
                    <option value="--add" selected="true">Yes (--add)</option>
                    <option value="--seed">No (--seed)</option>
                </param>
            </when>
            <when value="frags"/>
            <when value="group"/>
        </conditional>
        <param argument="--keeplength" type="boolean" truevalue="--keeplength" falsevalue="" checked="True" label="Keep alignment length" help="The alignment length is unchanged.  Insertions at the additional sequences are deleted"/>
        <param argument="--mapout" type="boolean" truevalue="--mapout" falsevalue="" checked="False" label="Output a correspondance table of position." help="Output a correspondence table of positions, sequence.map, between before and after the calculation.  The mapout option automatically turns on the keeplength option, to keep the numbering of sites in the reference alignment"/>
        <param argument="--reorder" type="boolean" truevalue="" falsevalue="--reorder" checked="True" label="Preserve the original order of sequences."/>
    </inputs>
    <outputs>
        <data format="fasta" name="outputAlignment" label="${tool.name} on ${on_string} : New alignment"/>
        <data name="outputmap" format="tabular" label="${tool.name} on ${on_string} : Correspondance of positions ">
            <filter>map == True</filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="inputSequences" value="add_seq.fa"/>
            <param name="inputAlignment" value="mafft_default.aln"/>
            <param name="sequenceType" value="singleseq"/>
            <param name="preservegap" value="--add"/>
            <param name="keeplength" value="--keeplength"/>
            <param name="mapout" value=""/>
            <output name="outputAlignment" ftype="fasta" file="mafft_add_result.aln"/>
        </test>
    </tests>
    <help>
    <![CDATA[
Add one of more sequences to an existing alignment. The new sequence(s) can be complete, fragments, or another alignement.

- Sequences in new_sequences are ungapped and then aligned to existing_alignment.
- new_sequences is a single multi-FASTA format file.
- existing_alignment is a single multi-FASTA format file.
- Gaps in existing_alignment are preserved by default (--add), but it can be deactivated (--seed). In that case the aligned letters in the seed alignment are preserved but gaps are not necessarily preserved.
- The alignment length may be conserved if the --keeplength option is given. The alignment length is unchanged.  Insertions at the new sequences are deleted.
- --mapout options output a correspondence table of positions, new_sequences.map, between before and after the calculation.  The --mapout option automatically turns on the --keeplength option, to keep the numbering of sites in the reference alignment.
- Omit --reorder to preserve the original sequence order.

    ]]>
  </help>
    <expand macro="citations"/>
</tool>