view gene_family_aligner.xml @ 8:32587f12102c draft

Uploaded
author greg
date Fri, 22 Jun 2018 08:40:34 -0400
parents 2ac7090847f9
children 1c5a484fc06f
line wrap: on
line source

<tool id="plant_tribes_gene_family_aligner" name="GeneFamilyAligner" version="@WRAPPER_VERSION@.3.0">
    <description>aligns integrated orthologous gene family clusters</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="1.0.3">plant_tribes_gene_family_aligner</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
#set alignment_method = $alignment_method_cond.alignment_method
#set input_dir = 'input_dir'
mkdir $input_dir &&
#for $i in $input:
    #set filename = $i.file_name
    #set name = $i.name
    ln -s $filename $input_dir/$name &&
#end for
export TOOLS_DIR=\$(dirname `which GeneFamilyAligner`) &&
export PASTA_TOOLS_RUNDIR=\$TOOLS_DIR &&
export PASTA_TOOLS_DEVDIR=\$TOOLS_DIR &&
GeneFamilyAligner
--alignment_method $alignment_method
#if str($alignment_method) == 'pasta':
    --pasta_script_path '$__tool_directory__/run_pasta.py'
    --pasta_iter_limit $alignment_method_cond.pasta_iter_limit
#end if
--num_threads \${GALAXY_SLOTS:-4}
--orthogroup_faa '$input_dir'
#if str($codon_alignments) == 'yes':
    --codon_alignments
#end if
#set remove_gappy_sequences = $remove_gappy_sequences_cond.remove_gappy_sequences
#if str($remove_gappy_sequences) == 'yes':
    #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond
    #set trim_type = $trim_type_cond.trim_type
    #if str($trim_type) == 'gap_trimming' and str($trim_type_cond.gap_trimming):
        --gap_trimming $trim_type_cond.gap_trimming
    #else:
        ## str($trim_type) == 'automated_trimming'
        --automated_trimming
    #end if
    #set remove_sequences_with_gaps_cond = $remove_gappy_sequences_cond.remove_sequences_with_gaps_cond
    #set remove_sequences_with_gaps = $remove_sequences_with_gaps_cond.remove_sequences_with_gaps
    #if str($remove_sequences_with_gaps) == 'yes':
        #if str($remove_sequences_with_gaps_cond.remove_sequences_with_gaps_of):
            --remove_sequences $remove_sequences_with_gaps_cond.remove_sequences_with_gaps_of
        #end if
        #if str($remove_sequences_with_gaps_cond.iterative_realignment):
            --iterative_realignment $remove_sequences_with_gaps_cond.iterative_realignment
        #end if
    #end if
#end if
&>gene_family_aligner_log.txt;
if [[ $? -ne 0 ]]; then
    find geneFamilyAlignments_dir -type d -maxdepth 1 -exec cp gene_family_aligner_log.txt {} \;
    exit 1;
fi
    ]]></command>
    <inputs>
        <param name="input" format="fasta" type="data_collection" collection_type="list" label="Integrated orthogroup fasta files" />
        <conditional name="alignment_method_cond">
            <param name="alignment_method" type="select" force_select="true" label="Multiple sequence alignment method">
                <option value="mafft" selected="true">MAFFT</option>
                <option value="pasta">PASTA</option>
            </param>
            <when value="mafft" />
            <when value="pasta">
                <param name="pasta_iter_limit" type="integer" value="3" min="1" label="PASTA iteration limit" />
            </when>
        </conditional>
        <param name="codon_alignments" type="select" label="Codon alignments">
            <option value="no" selected="true">No</option>
            <option value="yes">Yes</option>
        </param>
        <conditional name="remove_gappy_sequences_cond">
            <param name="remove_gappy_sequences" type="select" label="Alignment post-processing configuration">
                <option value="no" selected="true">No</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no" />
            <when value="yes">
                <conditional name="trim_type_cond">
                    <param name="trim_type" type="select" label="Trimming method">
                        <option value="gap_trimming" selected="true">Gap score based trimming</option>
                        <option value="automated_trimming">Automated heuristic trimming</option>
                    </param>
                    <when value="gap_trimming">
                        <param name="gap_trimming" type="float" optional="true" min="0" max="1.0" label="Gap score" />
                    </when>
                    <when value="automated_trimming" />
                </conditional>
                <conditional name="remove_sequences_with_gaps_cond">
                    <param name="remove_sequences_with_gaps" type="select" label="Remove sequences">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="remove_sequences_with_gaps_of" type="float" optional="true" min="0" max="1" label="Coverage score" />
                        <param name="iterative_realignment" type="integer" optional="true" min="0" label="Realignment iteration limit" />
                    </when>
                </conditional>
                <param name="output_pristine_alignments" type="select" display="radio" label="Output primary and intermediate alignments?" help="In addition to trimmed/filtered alignments">
                    <option value="no" selected="true">No</option>
                    <option value="yes">Yes</option>
                </param>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <collection name="primary_faa" type="list" label="${tool.name} (primary orthogroup protein alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/orthogroups_aln_faa" format="fasta" />
            <filter>remove_gappy_sequences_cond['remove_gappy_sequences'] == 'no'</filter>
        </collection>
        <collection name="primary_fna" type="list" label="${tool.name} (primary orthogroup codon alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/orthogroups_aln_fna" format="fasta" />
            <filter>codon_alignments == 'yes' and remove_gappy_sequences_cond['remove_gappy_sequences'] == 'no'</filter>
        </collection>
        <collection name="pristine" type="list" label="${tool.name} (intermediate alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/other_orthogroups_aln" format="fasta" />
            <filter>remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['output_pristine_alignments'] == 'yes'</filter>
        </collection>
        <collection name="trimmed_faa" type="list" label="${tool.name} (trimmed orthogroup protein alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/orthogroups_trimmed_aln_faa" format="fasta" />
            <filter>remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'no'</filter>
        </collection>
        <collection name="trimmed_fna" type="list" label="${tool.name} (trimmed orthogroup codon alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/orthogroups_trimmed_aln_fna" format="fasta" />
            <filter>codon_alignments == 'yes' and remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'no'</filter>
        </collection>
        <collection name="filtered_faa" type="list" label="${tool.name} (filtered orthogroup protein alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/orthogroups_filtered_aln_faa" format="fasta" />
            <filter>remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'yes'</filter>
        </collection>
        <collection name="filtered_fna" type="list" label="${tool.name} (filtered orthogroup codon alignments) on ${on_string}">
            <discover_datasets pattern="__name__" directory="geneFamilyAlignments_dir/orthogroups_filtered_aln_fna" format="fasta" />
            <filter>codon_alignments == 'yes' and remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'yes'</filter>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="input">
                <collection type="list">
                    <element name="3722.faa" value="3722.faa"/>
                    <element name="3722.fna" value="3722.fna"/>
                    <element name="38889.faa" value="38889.faa"/>
                    <element name="38889.fna" value="38889.fna"/>
                    <element name="39614.faa" value="39614.faa"/>
                    <element name="39614.fna" value="39614.fna"/>
                </collection>
            </param>
            <param name="codon_alignments" value="yes"/>
            <output_collection name="primary_faa" type="list">
                <element name="3722.faa.aln" file="3722.faa.aln" ftype="fasta"/>
                <element name="38889.faa.aln" file="38889.faa.aln" ftype="fasta"/>
                <element name="39614.faa.aln" file="39614.faa.aln" ftype="fasta"/>
            </output_collection>
            <output_collection name="primary_fna" type="list">
                <element name="3722.fna.aln" file="3722.fna.aln" ftype="fasta"/>
                <element name="38889.fna.aln" file="38889.fna.aln" ftype="fasta"/>
                <element name="39614.fna.aln" file="39614.fna.aln" ftype="fasta"/>
            </output_collection>
        </test>
    </tests>
    <help>
This tool is one of the PlantTribes collection of automated modular analysis pipelines for comparative and evolutionary
analyses of genome-scale gene families and transcriptomes. This tool estimates protein and codon multiple sequence alignments
of integrated orthologous gene family fasta files produced by the GeneFamilyIntegrator tool.

-----

**Required options**

 * **Integrated orthogroup fasta files** - orthogroup fasta files produced by the GeneFamilyIntegrator tool selected from your history.  Depending on how the GeneFamilyClassifier tool was executed, these could either be proteins or proteins and their corresponding coding sequences.

 * **Multiple sequence alignment method** - method for estimating orthogroup multiple sequence alignments.  PlantTribes estimates alignments using either MAFFT's L-INS-i algorithm or the divide and conquer approach implemented in the PASTA pipeline for large alignments.

  - **PASTA iteration limit** - number of PASTA iterations. By default, PASTA performs 3 iterations.

 * **Codon alignments** - select 'Yes' to create codon multiple sequence alignments.  This option requires both protein and their corresponding coding sequence orthogroup fasta files to be present in the GeneFamilyAligner input data that was produced by the GeneFamilyIntegrator.

**Other options**

 * **Alignment post-processing configuration** - select 'Yes' to enable multiple sequence alignment post-processing configuration options.

  - **Trimming method** - multiple sequence alignment trimming method.  PlantTribes trims alignments using two automated approaches implemented in trimAl.  Gap score based trimming removes alignments sites that do not achieve a user specified gap score.  For example, a setting of 0.1 removes sites that have gaps in 90% or more of the sequences in the multiple sequence alignment.  The automated heuristic trimming approach determines the best automated trimAl method to trim a given alignment as described in the trimAl tutorial `trimAl`_.

    - **Gap score** - the fraction of sequences with gap allowed in an alignment site.  The score is restricted to the range 0.0 - 1.0.  Zero value has no effect.

  - **Remove sequences** - select 'Yes' to remove sequences in multiple sequence alignments that do not achieve a user specified alignment coverage score.  For example, a setting of 0.7 removes sequences with more than 30% gaps in the alignment.  This option requires one of the trimming methods to be set.

    - **Coverage score** - minimum fraction of sites without gaps for a sequence in a multiple sequence alignment.  The score is restricted to the range 0.0 - 1.0.  Zero value has no effect.

    - **Realignment iteration limit** - number of iterations to perform trimming, removal of sequences, and realignment of orthogroup sequences.  Zero value has no effect.

 * **Output primary and intermediate alignments** - selecting 'Yes' will produce a dataset collection of primary and intermediate alignments, the elements of which can be viewed with viaula tools, in addition to the final trimmed and/or filtered alignments dataset collection.

.. _trimAl: http://trimal.cgenomics.org

    </help>
    <citations>
        <expand macro="citation1" />
        <citation type="bibtex">
            @article{Wall2008,
            journal = {Nucleic Acids Research},
            author = {2. Wall PK, Leebens-Mack J, Muller KF, Field D, Altman NS},
            title = {PlantTribes: a gene and gene family resource for comparative genomics in plants},
            year = {2008},
            volume = {36},
            number = {suppl 1},
            pages = {D970-D976},}
        </citation>
        <citation type="bibtex">
            @article{Katoh2013,
            journal = {Molecular biology and evolution},
            author = {3. Katoh K, Standley DM},
            title = {MAFFT multiple sequence alignment software version 7: improvements in performance and usability},
            year = {2013},
            volume = {30},
            number = {4},
            pages = {772-780},}
        </citation>
        <citation type="bibtex">
            @article{Mirarab2014,
            journal = {Research in Computational Molecular Biology (RECOMB)},
            author = {4. Mirarab S, Nguyen N, Warnow T},
            title = {PASTA: Ultra-Large Multiple Sequence Alignment. In R. Sharan (Ed.)},
            year = {2014},
            pages = {177–191},
            url = {https://github.com/smirarab/pasta},}
        </citation>
        <citation type="bibtex">
            @article{Capella-Gutierrez2009,
            journal = {Bioinformatics,},
            author = {5. Capella-Gutierrez S, Silla-Martínez JM, Gabaldón T},
            title = {trimAl: a tool for automated alignment trimming in large-scale phylogenetic analyses},
            year = {2009},
            volume = {25},
            number = {15},
            pages = {1972-1973},}
        </citation>
        <citation type="bibtex">
            @article{Yachdav2016,
            journal = {Bioinformatics,},
            author = {6. Yachdav G, Wilzbach S, Rauscher B, Sheridan R, Sillitoe I, Procter J, Lewis SE, Rost B, Goldberg T},
            title = {MSAViewer: interactive JavaScript visualization of multiple sequence alignments},
            year = {2016},
            volume = {32},
            number = {22},
            pages = {3501-3503},}
        </citation>
        <citation type="bibtex">
            @article{Clamp2004,
            journal = {Bioinformatics,},
            author = {7. Clamp M, Cuff J, Searle SM, Barton GJ},
            title = {The jalview java alignment editor},
            year = {2004},
            volume = {20},
            number = {3},
            pages = {426-427},}
        </citation>
    </citations>
</tool>