view gene_family_aligner.xml @ 11:1c5a484fc06f draft default tip

planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/phylogenetics/plant_tribes/gene_family_aligner commit f7690d10e0515911ee00455806e457bc53f145c7-dirty
author greg
date Thu, 13 Jun 2024 11:54:31 +0000
parents 32587f12102c
children
line wrap: on
line source

<tool id="plant_tribes_gene_family_aligner" name="GeneFamilyAligner" version="@TOOL_VERSION@.4.0+galaxy0">
    <description>aligns integrated orthologous gene family clusters</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="1.0.4">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 expect_num_outputs="2">
            <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" ftype="fasta">
                    <assert_contents>
                        <has_text text=">gnl_Glyma1.01_PACid_16266208"/>
                        <has_text text=">gnl_Vitvi12X_PACid_17827068"/>
                        <has_text text=">gnl_Selmo1.0_PACid_15401289"/>
                        <has_text text=">gnl_Orysa6.0_PACid_16864430"/>
                        <has_text text=">contig_7"/>
                    </assert_contents>
                </element>
                <element name="38889.faa.aln" ftype="fasta">
                    <assert_contents>
                        <has_text text=">gnl_Mimgu1.0_PACid_17675619"/>
                        <has_text text=">gnl_Solly2.3_Solyc06g053200.2.1"/>
                        <has_text text=">gnl_Mimgu1.0_PACid_17675619"/>
                        <has_text text=">gnl_Solly2.3_Solyc06g053200.2.1"/>
                        <has_text text=">contig_2"/>
                    </assert_contents>
                </element>
                <element name="39614.faa.aln" ftype="fasta">
                    <assert_contents>
                        <has_text text=">gnl_Orysa6.0_PACid_16878968"/>
                        <has_text text=">gnl_Phoda3.0_PDK_30s1023721g001"/>
                        <has_text text=">gnl_Orysa6.0_PACid_16878968"/>
                        <has_text text=">gnl_Phoda3.0_PDK_30s1023721g001"/>
                        <has_text text=">contig_3"/>
                    </assert_contents>
                </element>
            </output_collection>
            <output_collection name="primary_fna" type="list">
                <element name="3722.fna.aln" ftype="fasta">
                    <assert_contents>
                        <has_text text=">gnl_Glyma1.01_PACid_16266208"/>
                        <has_text text=">gnl_Glyma1.01_PACid_16266209"/>
                        <has_text text=">gnl_Glyma1.01_PACid_16266210"/>
                        <has_text text=">gnl_Glyma1.01_PACid_16301083"/>
                        <has_text text=">contig_7"/>
                    </assert_contents>
                </element>
                <element name="38889.fna.aln" ftype="fasta">
                    <assert_contents>
                        <has_text text=">gnl_Mimgu1.0_PACid_17675619"/>
                        <has_text text=">gnl_Solly2.3_Solyc06g053200.2.1"/>
                        <has_text text=">gnl_Mimgu1.0_PACid_17675619"/>
                        <has_text text=">gnl_Solly2.3_Solyc06g053200.2.1"/>
                        <has_text text=">contig_2"/>
                    </assert_contents>
                </element>
                <element name="39614.fna.aln" ftype="fasta">
                    <assert_contents>
                        <has_text text=">gnl_Orysa6.0_PACid_16878968"/>
                        <has_text text=">gnl_Phoda3.0_PDK_30s1023721g001"/>
                        <has_text text=">gnl_Orysa6.0_PACid_16878968"/>
                        <has_text text=">gnl_Phoda3.0_PDK_30s1023721g001"/>
                        <has_text text=">contig_3"/>
                    </assert_contents>
                </element>
            </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>
        <citation type="doi">10.3389/fpls.2022.1011199</citation>
        <citation type="doi">10.1371/journal.pone.0146062</citation>
        <citation type="doi">10.1038/nprot.2013.084</citation>
        <citation type="doi">10.1101/gr.9.9.868</citation>
        <citation type="doi">10.1142/9781848165632_0019</citation>
        <citation type="doi">10.1093/molbev/mst010</citation>
        <citation type="doi">10.1093/nar/gks631</citation>
        <citation type="doi">10.1101/gr.1224503</citation>
        <citation type="doi">10.1186/s13059-015-0721-2</citation>
        <citation type="doi">10.1093/bioinformatics/btp348</citation>
        <citation type="doi">10.1109/TCBB.2013.68</citation>
    </citations>
</tool>