view phylogenomics_analysis.xml @ 71:43e5db9461cf draft

Uploaded
author greg
date Mon, 20 Mar 2017 14:29:45 -0400
parents bd26a18387ae
children 7363c4e9423c
line wrap: on
line source

<tool id="plant_tribes_phylogenomics_analysis" name="PhylogenomicsAnalysis" version="0.6.0">
    <description>builds gene family multiple sequence alignments and their corresponding phylogenies</description>
    <requirements>
        <requirement type="package" version="0.6">plant_tribes_phylogenomics_analysis</requirement>
    </requirements>
    <stdio>
        <!-- Anything other than zero is an error -->
        <exit_code range="1:" />
        <exit_code range=":-1" />
        <!-- In case the return code has not been set propery check stderr too -->
        <regex match="Error:" />
        <regex match="Exception:" />
    </stdio>
    <command>
        <![CDATA[
            #if str($options_type.options_type_selector) == 'advanced':
                #set multiple_sequence_alignments_cond = $options_type.multiple_sequence_alignments_cond
                #set multiple_sequence_alignments = $multiple_sequence_alignments_cond.multiple_sequence_alignments
                #if str($multiple_sequence_alignments) == 'yes':
                    #set multiple_sequence_alignments_option_cond = $options_type.multiple_sequence_alignments_cond.multiple_sequence_alignments_option_cond
                    #set multiple_sequence_alignments_option = $multiple_sequence_alignments_option_cond.multiple_sequence_alignments_option
                    #set generate_output_aln = True
                #else:
                    #set generate_output_aln = False
                #end if
                #if str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes':
                    #set generate_output_tree = True
                #else:
                    #set generate_output_tree = False
                #end if
            #else:
                #set generate_output_aln = False
                #set generate_output_tree = False
            #end if

            python $__tool_directory__/phylogenomics_analysis.py
            --num_threads \${GALAXY_SLOTS:-4}
            #set input_format = $input_format_cond.input_format
            #if str($input_format) == 'ptortho':
                --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path'
            #else:
                --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path'
                --orthogroup_fna 'true'
                #set multiple_codon_alignments_cond = $input_format_cond.multiple_codon_alignments_cond
                #set multiple_codon_alignments = $multiple_codon_alignments_cond.multiple_codon_alignments
                #if str($multiple_codon_alignments) == 'yes':
                    --sequence_type $multiple_codon_alignments_cond.sequence_type
                #end if
            #end if
            --config_dir '$scaffold.fields.path'
            --scaffold '$scaffold.fields.path'
            --method $method

            #if str($options_type.options_type_selector) == 'advanced':
                #if str($multiple_sequence_alignments) == 'yes':
                    --alignments_method $multiple_sequence_alignments_option
                    #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
                        --pasta_script_path '$__tool_directory__/run_pasta.py'
                        --pasta_iter_limit $multiple_sequence_alignments_option_cond.pasta_iter_limit
                    #end if
                #end if

                #if str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes':
                    #set tree_inference_cond = $options_type.phylogenetic_trees_cond.tree_inference_cond
                    #set tree_inference_method = $tree_inference_cond.tree_inference
                    --tree_inference $tree_inference_method
                    #if str($tree_inference_method) == 'raxml':
                        #set rooting_order_file_cond = $tree_inference_cond.rooting_order_file_cond
                        #set rooting_order_file = $rooting_order_file_cond.rooting_order_file
                        #if str($rooting_order_file) == 'yes':
                            --rooting_order '$rooting_order_file_cond.rooting_order'
                            # No else block needed here because the default rooting_order
                            # configuration will be used if the --rooting_order flag is missing.
                        #end if
                        --bootstrap_replicates $tree_inference_cond.bootstrap_replicates
                    #end if
                    --max_orthogroup_size $options_type.phylogenetic_trees_cond.max_orthogroup_size
                    --min_orthogroup_size $options_type.phylogenetic_trees_cond.min_orthogroup_size
                #end if

                #if str($options_type.msa_quality_control_options_cond.msa_quality_control_options) == 'yes':
                    #set msa_quality_control_options_cond = $options_type.msa_quality_control_options_cond
                    #set remove_gappy_sequences_cond = $msa_quality_control_options_cond.remove_gappy_sequences_cond
                    #if str($remove_gappy_sequences_cond) == 'yes':
                        #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond
                        --remove_sequences $remove_gappy_sequences_cond.remove_sequences
                        --trim_type $trim_type_cond.trim_type
                        #if str($trim_type_cond.trim_type) == 'gap_trimming':
                            --gap_trimming $trim_type_cond.gap_trimming
                        #end if
                    #end if
                #end if
            #end if

            #if str($input_format) == 'ptortho':
                --output_ptortho '$output_ptortho'
                --output_ptortho_dir '$output_ptortho.files_path'
            #else:
                --output_ptorthocs '$output_ptorthocs'
                --output_ptorthocs_dir '$output_ptorthocs.files_path'
            #end if

            #if $generate_output_aln:
                --output_aln '$output_aln'
                --output_aln_dir '$output_aln.files_path'
            #end if

            #if $generate_output_tree:
                --output_tree '$output_tree'
                --output_tree_dir '$output_tree.files_path'
            #end if
        ]]>
    </command>
    <inputs>
        <conditional name="input_format_cond">
            <param name="input_format" type="select" label="Select type of data to sub sample">
                <option value="ptortho">Precomputed orthologous gene family clusters</option>
                <option value="ptorthocs">Precomputed orthologous gene family clusters with corresponding coding sequences</option>
            </param>
            <when value="ptortho">
                <param name="input_ptortho" format="ptortho" type="data" label="Precomputed orthologous gene family clusters" />
            </when>
            <when value="ptorthocs">
                <param name="input_ptorthocs" format="ptorthocs" type="data" label="Precomputed orthologous gene family clusters with corresponding coding sequences" />
                <conditional name="multiple_codon_alignments_cond">
                    <param name="multiple_codon_alignments" type="select" label="Construct orthogroup multiple codon alignments?">
                        <option value="no" selected="True">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference (dna)">
                            <option value="protein" selected="true">Amino acid based</option>
                            <option value="dna">Nucleotide based</option>
                        </param>
                    </when>
                </conditional>
            </when>
        </conditional>
        <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold">
            <options from_data_table="plant_tribes_scaffolds" />
            <validator type="no_options" message="No PlantTribes scaffolds are available.  Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table." />
        </param>
        <param name="method" type="select" label="Protein clustering method">
            <option value="gfam" selected="true">GFam</option>
            <option value="orthofinder">OrthoFinder</option>
            <option value="orthomcl">OrthoMCL</option>
        </param>
        <conditional name="options_type">
            <param name="options_type_selector" type="select" label="Options Configuration">
                <option value="basic" selected="true">Basic</option>
                <option value="advanced">Advanced</option>
            </param>
            <when value="basic" />
            <when value="advanced">
                <conditional name="multiple_sequence_alignments_cond">
                    <param name="multiple_sequence_alignments" type="select" label="Set multiple sequence alignments options?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <conditional name="multiple_sequence_alignments_option_cond">
                            <param name="multiple_sequence_alignments_option" label="Select method for multiple sequence alignments" type="select"
                                force_select="True">
                                <option value="create_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (MAFFT algorithm)</option>
                                <option value="add_alignments">Add unaligned orthogroup proteins to scaffold backbone multiple sequence alignments (MAFFT algorithm)</option>
                                <option value="pasta_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (PASTA algorithm)</option>
                            </param>
                            <when value="create_alignments" />
                            <when value="add_alignments" />
                            <when value="pasta_alignments">
                                <param name="pasta_iter_limit" type="integer" value="3" min="0" label="Maximum number of iteration that the PASTA algorithm will execute" />
                            </when>
                        </conditional>
                    </when>
                </conditional>
                <conditional name="phylogenetic_trees_cond">
                    <param name="phylogenetic_trees" type="select" label="Set phylogenetic trees options?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <conditional name="tree_inference_cond">
                            <param name="tree_inference" type="select" label="Phylogenetic trees inference method">
                                <option value="raxml" selected="true">RAxML</option>
                                <option value="fasttree">FastTree</option>
                            </param>
                            <when value="raxml">
                                <conditional name="rooting_order_file_cond">
                                    <param name="rooting_order_file" type="select" label="Select rooting order configuration for rooting trees?" help="Select No for the default rooting order configuration which uses the most distant taxon present in the orthogroup">
                                        <option value="no" selected="true">No</option>
                                        <option value="yes">Yes</option>
                                    </param>
                                    <when value="no" />
                                    <when value="yes">
                                        <param name="rooting_order" format="txt" type="data" label="Rooting order configuration for rooting trees" />
                                    </when>
                                </conditional>
                                <param name="bootstrap_replicates" type="integer" value="100" min="0" label="Number of replicates for rapid bootstrap analysis and search for the best-scoring ML tree" />
                            </when>
                            <when value="fasttree" />
                        </conditional>
                        <param name="max_orthogroup_size" type="integer" value="100" min="0" label="Maximum number of sequences in orthogroup alignments" />
                        <param name="min_orthogroup_size" type="integer" value="4" min="0" label="Minimum number of sequences in orthogroup alignments" />
                    </when>
                </conditional>
                <conditional name="msa_quality_control_options_cond">
                    <param name="msa_quality_control_options" type="select" label="Set MSA quality control options?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <conditional name="remove_gappy_sequences_cond">
                            <param name="remove_gappy_sequences" type="select" label="Remove gappy sequences in alignments?">
                                <option value="no" selected="true">No</option>
                                <option value="yes">Yes</option>
                            </param>
                            <when value="no" />
                            <when value="yes">
                                <param name="remove_sequences" type="float" value="0.5" min="0" max="1" label="Remove sequences with gaps of" help="0.5 removes sequences with 50% gaps" />
                                <conditional name="trim_type_cond">
                                    <param name="trim_type" type="select" label="Select process used for gap trimming">
                                        <option value="gap_trimming" selected="true">Nucleotide based </option>
                                        <option value="automated_trimming">Trim alignments using trimAl's ML heuristic trimming approach</option>
                                    </param>
                                    <when value="automated_trimming" />
                                    <when value="gap_trimming">
                                        <param name="gap_trimming" type="float" value="0.1" min="0" max="1.0" label="Remove sites in alignments with gaps of" help="0.1 removes sites with 90% gaps" />
                                    </when>
                                </conditional>
                            </when>
                        </conditional>
                    </when>
                </conditional>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output_ptortho" format="ptortho">
            <filter>input_format_cond['input_format'] == 'ptortho'</filter>
        </data>
        <data name="output_ptorthocs" format="ptorthocs">
            <filter>input_format_cond['input_format'] == 'ptorthocs'</filter>
        </data>
        <data name="output_aln" format="ptalign" label="Multiple alignments using method ${options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments_option_cond']['multiple_sequence_alignments_option']} on ${on_string}">
            <filter>options_type['options_type_selector'] == 'advanced' and options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments'] == 'yes'</filter>
        </data>
        <data name="output_tree" format="pttree" label="Phylogenetic trees on ${on_string}">
            <filter>options_type['options_type_selector'] == 'advanced' and options_type['phylogenetic_trees_cond']['phylogenetic_trees'] == 'yes'</filter>
        </data>
    </outputs>
    <tests>
        <test>
        </test>
    </tests>
    <help>
This tool is one of the PlantTribes collection of automated modular analysis pipelines that utilize objective classifications of
complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. It performs phylogenomic
analyses by creating multiple sequence alignments and inferred maximum likelihood phylogenies for orthogroups produced by the
**Classify gene sequences into precomputed orthologous gene family clusters** tool.

-----

**Options**

 * **Required**

  - **Select gene family clusters** - Sequences classified into gene family clusters, optionally including corresponding coding sequences.
  - **Orthogroups or gene families proteins scaffold** - PlantTribes scaffolds data.
  - **Protein clustering method** - One of GFam (domain architecture based clustering), OrthoFinder (broadly defined clusters) or OrthoMCL (narrowly defined clusters).  

 * **Multiple sequence alignments**

  - **Select method for multiple sequence alignments** - Method used for setting multiple sequence alignments.
  - **Input sequences include corresponding coding sequences?** - Selecting 'Yes' for this option requires that the selected input data format is 'ptorthocs'.
  - **Construct orthogroup multiple codon alignments?** - Construct orthogroup multiple codon alignments.
  - **Sequence type used in the phylogenetic inference** - Sequence type (dna or amino acid) used in the phylogenetic inference.
  - **Use corresponding coding sequences?** - Selecting 'Yes' for this option requires that the selected input data format is 'ptorthocs' or this tool will produce an error.

 * **Phylogenetic trees**

  - **Phylogenetic trees inference method** - Phylogenetic trees inference method.
  - **Select rooting order configuration for rooting trees??** - If 'No' is selected, trees will be rooted using the most distant taxon present in the orthogroup.
  - **Number of replicates for rapid bootstrap analysis and search for the best-scoring ML tree** - Number of replicates for rapid bootstrap analysis and search for the best-scoring ML tree.
  - **Maximum number of sequences in orthogroup alignments** - Maximum number of sequences in orthogroup alignments.
  - **Minimum number of sequences in orthogroup alignments** - Minimum number of sequences in orthogroup alignments.

 * **MSA quality control**

  - **Remove sequences with gaps of** - Removes gappy sequences in alignments (i.e., 0.5 removes sequences with 50% gaps).
  - **Select process used for gap trimming** - Either nucleotide based trimming or alignments are trimed using using trimAl's ML heuristic trimming approach.
  - **Remove sites in alignments with gaps of** - If the process used for gap trimming is nucleotide based, this is the gap value used when removing gappy sites in alignments (i.e., 0.1 removes sites with 90% gaps).

    </help>
    <citations>
        <citation type="bibtex">
            @misc{None,
            journal = {None},
            author = {1. Wafula EK},
            title = {Manuscript in preparation},
            year = {None},
            url = {https://github.com/dePamphilis/PlantTribes},}
        </citation>
        <citation type="bibtex">
            @article{Mirarab2014,
            journal = {Research in Computational Molecular Biology (RECOMB)},
            author = {2. 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{Salvador2009,
            journal = {Bioinformatics},
            author = {3. Capella-Gutierrez S, Silla-Martinez JM, Gabaldon T},
            title = {trimAl: a tool for automated alignment trimming in large-scale phylogenetic analyses},
            year = {2009},
            url = {http://trimal.cgenomics.org},}
        </citation>
        <citation type="bibtex">
            @article{Stamatakis2014,
            journal = {Bioinformatics},
            author = {4. Stamatakis A},
            title = {RAxML Version 8: A tool for Phylogenetic Analysis and Post-Analysis of Large Phylogenies},
            year = {2014},
            url = {http://sco.h-its.org/exelixis/web/software/raxml/index.html},}
        </citation>
        <citation type="doi">10.1371/journal.pone.0009490</citation>
        <citation type="doi">10.1093/bioinformatics/btw412</citation>
    </citations>
</tool>