view assembly_post_processor.xml @ 10:4d73965d99a2 draft default tip

"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/phylogenetics/plant_tribes/assembly_post_processor commit 71ba0e157346927bf42b788f552b95a71556b28a"
author greg
date Wed, 09 Jun 2021 20:26:55 +0000
parents 9c72c91d291f
children
line wrap: on
line source

<tool id="plant_tribes_assembly_post_processor" name="AssemblyPostProcessor" version="@WRAPPER_VERSION@.4.0" profile="18.09">
    <description>post-processes de novo transcriptome assembly</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="1.0.4">plant_tribes_assembly_post_processor</requirement>
    </requirements>
    <code file="get_clustering_methods.py"/>
    <command detect_errors="exit_code"><![CDATA[
#set output_dir = 'assemblyPostProcessing_dir'
AssemblyPostProcessor
--transcripts '$input'
--prediction_method 'transdecoder'
#if str($options_type.options_type_selector) == 'advanced':
    #set target_gene_family_assembly_cond = $options_type.target_gene_family_assembly_cond
    #if str($target_gene_family_assembly_cond.target_gene_family_assembly) == 'yes':
        --gene_family_search '$target_gene_family_assembly_cond.orthogroups'
        --scaffold '$target_gene_family_assembly_cond.scaffold.fields.path'
        --method '$target_gene_family_assembly_cond.method'
        --gap_trimming $target_gene_family_assembly_cond.gap_trimming
        #if str($target_gene_family_assembly_cond.min_coverage) != '0.0':
            --min_coverage $target_gene_family_assembly_cond.min_coverage
        #end if
    #end if
    #if str($options_type.strand_specific) == 'yes':
        --strand_specific
    #end if
    #if str($options_type.dereplicate) == 'yes':
        --dereplicate
    #end if
    --min_length $options_type.min_length
#end if
--num_threads \${GALAXY_SLOTS:-4}
&>assembly_post_processor_log.txt;
if [[ $? -ne 0 ]]; then
    cp assembly_post_processor_log.txt '$output_cds';
    cp assembly_post_processor_log.txt '$output_pep';
    cp assembly_post_processor_log.txt '$output_cleaned_cds';
    cp assembly_post_processor_log.txt '$output_cleaned_pep';
    #if str($options_type.options_type_selector) == 'advanced':
        #if str($target_gene_family_assembly_cond.target_gene_family_assembly) == 'yes':
            cp assembly_post_processor_log.txt '$output_targeted_gene_families_stats';
        #end if
        #if str($options_type.dereplicate) == 'yes':
            cp assembly_post_processor_log.txt '$output_cleaned_nr_cds';
            cp assembly_post_processor_log.txt '$output_cleaned_nr_pep';
        #end if
    #end if
    exit 1;
else
    mv $output_dir/transcripts.cds '$output_cds';
    mv $output_dir/transcripts.pep '$output_pep';
    mv $output_dir/transcripts.cleaned.cds '$output_cleaned_cds';
    mv $output_dir/transcripts.cleaned.pep '$output_cleaned_pep';
    #if str($options_type.options_type_selector) == 'advanced':
        #if str($target_gene_family_assembly_cond.target_gene_family_assembly) == 'yes':
            mv $output_dir/targeted_gene_family_assemblies.stats '$output_targeted_gene_families_stats';
        #end if
        #if str($options_type.dereplicate) == 'yes':
            mv $output_dir/transcripts.cleaned.nr.cds '$output_cleaned_nr_cds';
            mv $output_dir/transcripts.cleaned.nr.pep '$output_cleaned_nr_pep';
        #end if
    #end if
fi]]></command>
    <inputs>
        <param name="input" format="fasta" type="data" label="Transcriptome assembly fasta file"/>
        <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="target_gene_family_assembly_cond">
                    <param name="target_gene_family_assembly" type="select" label="Perform targeted gene assembly?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="orthogroups" format="tabular" type="data" label="Targeted gene families"/>
                        <expand macro="param_scaffold"/>
                        <expand macro="param_method"/>
                        <param name="gap_trimming" type="float" value="0.1" min="0" max="1.0" label="Trim alignments"/>
                        <param name="min_coverage" type="float" value="0" min="0" max="1.0" label="Minimum alignment coverage"/>
                    </when>
                </conditional>
                <param name="strand_specific" type="select" label="Strand-specific assembly?">
                    <option value="no" selected="true">No</option>
                    <option value="yes">Yes</option>
                </param>
                <param name="dereplicate" type="select" label="Remove duplicate sequences?">
                    <option value="no" selected="true">No</option>
                    <option value="yes">Yes</option>
                </param>
                <param name="min_length" type="integer" value="200" label="Minimum sequence length"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output_targeted_gene_families_stats" format="tabular" label="Targeted gene families statistics: ${tool.name} on ${on_string}">
            <filter>options_type['options_type_selector'] == 'advanced' and options_type['target_gene_family_assembly_cond']['target_gene_family_assembly'] == 'yes'</filter>
        </data>
        <collection name="output_targeted_gene_families" type="list" label="Targeted gene families: ${tool.name} on ${on_string}">
            <discover_datasets pattern="__name__" directory="assemblyPostProcessing_dir/targeted_gene_family_assemblies" format="fasta" />
            <filter>options_type['options_type_selector'] == 'advanced' and options_type['target_gene_family_assembly_cond']['target_gene_family_assembly'] == 'yes'</filter>
        </collection>
        <data name="output_pep" format="fasta" label="transcripts.pep: ${tool.name} on ${on_string}"/>
        <data name="output_cleaned_pep" format="fasta" label="transcripts.cleaned.pep: ${tool.name} on ${on_string}"/>
        <data name="output_cleaned_nr_pep" format="fasta" label="transcripts.cleaned.nr.pep: ${tool.name} on ${on_string}">
            <filter>options_type['options_type_selector'] == 'advanced' and options_type['dereplicate'] == 'yes'</filter>
        </data>
        <data name="output_cleaned_nr_cds" format="fasta" label="transcripts.cleaned.nr.cds: ${tool.name} on ${on_string}">
            <filter>options_type['options_type_selector'] == 'advanced' and options_type['dereplicate'] == 'yes'</filter>
        </data>
        <data name="output_cleaned_cds" format="fasta" label="transcripts.cleaned.cds: ${tool.name} on ${on_string}"/>
        <data name="output_cds" format="fasta" label="transcripts.cds: ${tool.name} on ${on_string}"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="assembly.fasta" ftype="fasta"/>
            <output name="output_cds" file="transcripts.cds" ftype="fasta"/>
            <output name="output_cleaned_cds" file="transcripts.cleaned.cds" ftype="fasta"/>
            <output name="output_cleaned_pep" file="transcripts.cleaned.pep" ftype="fasta"/>
            <output name="output_pep" file="transcripts.pep" ftype="fasta"/>
        </test>
        <test>
            <param name="input" value="assembly_tgf.fasta" ftype="fasta"/>
            <param name="options_type_selector" value="advanced"/>
            <param name="target_gene_family_assembly" value="yes"/>
            <param name="orthogroups" value="target_orthos.ids"/>
            <param name="method" value="orthomcl"/>
            <param name="dereplicate" value="yes"/>
            <output_collection name="output_targeted_gene_families" type="list">
            </output_collection>
            <output name="output_targeted_gene_families_stats" file="output_targeted_gene_families_stats.tabular" ftype="tabular"/>
            <output name="output_cds" file="transcripts_tgf.cds" ftype="fasta"/>
            <output name="output_cleaned_cds" file="transcripts.cleaned_tgf.cds" ftype="fasta"/>
            <output name="output_cleaned_nr_cds" file="transcripts_tgf.cleaned.nr.cds" ftype="fasta"/>
            <output name="output_cleaned_nr_pep" file="transcripts_tgf.cleaned.nr.pep" ftype="fasta"/>
            <output name="output_cleaned_pep" file="transcripts.cleaned_tgf.pep" ftype="fasta"/>
            <output name="output_pep" file="transcripts_tgf.pep" ftype="fasta"/>
        </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 post-processes de novo
assembled transcripts into putative coding sequences and their corresponding amino acid translations and
optionally assigns transcripts to circumscribed gene families ("orthogroups")[2].  After transcripts have been
assigned to gene families, overlapping contigs can be identified and merged to reduce fragmentation in the
de novo assembly.

-----

**Required options**

 * **Transcriptome assembly fasta file** - either de novo or reference-guided transcriptome assembly fasta file selected from your history.
 * **Coding regions prediction method** - method for finding coding regions within transcripts.  Available methods are TransDecoder[3] and ESTScan[4].

**Other options**

 * **Perform targeted gene assembly?** - selecting 'Yes' enables local assembly of one or more targeted gene families in a specific scaffold.  Scaffolds are defined in PlantTribes as clusters of paralogous/orthologous sequences from a specified set of proteomes[5-7].

   * **Targeted gene families** - select a history item containing a list of targeted orthogroup identifiers corresponding to the gene family classification from a specified scaffold. Gene family identifiers can be obtained from the function annotation table ("Orthogroup ID" field of .summary file) of scaffold data installed into Galaxy via the PlantTribes Scaffolds Download Data Manager tool, and are also available in the PlantTribes "annotation" directory of the scaffold data download.
   * **Gene family scaffold** - one of the PlantTribes gene family scaffolds (installed into Galaxy by the PlantTribes Scaffolds Download Data Manager tool) whose orthogroup(s) are targeted for the localized assembly.
   * **Protein clustering method** - gene family scaffold protein clustering method.  Each PlantTribes scaffold data has up to three sets of clusters - GFam[8] (clusters of consensus domain architecture), OrthoFinder[9] (broadly defined clusters) or OrthoMCL[10] (narrowly defined clusters).  You can also install your own data scaffold created using a different clustering method as long as it conforms to the PlantTribes scaffold data format.
   * **Trim alignments** - trim gene family multiple sequence alignments that include scaffold backbone genes and locally assembled transcripts to remove non-conserved regions (gappy sites)[11].  The trimmed alignments are used in assigning scores to locally assembled transcripts to determine how well they compare to the backbone gene models.  The default setting of 0.1 removes sites that have gaps in 90% or more of the sequences in the multiple sequence alignment.  This option is restricted to the range 0.0 - 1.0.
   * **Minimum alignment coverage** - allowable sequence coverage in the orthogroup trimmed protein multiple sequence alignments.  Selecting transcripts with coverage of at least the average of the backbone orthogroup gene models is recommended.  Details are shown in the targeted gene family assembly statistics history item.

 * **Strand-specific assembly?** - select 'Yes' if transcriptome library sequences were strand-specific.  If 'Yes" is selected, transcripts from the minority strand (antisense) are removed.
 * **Remove duplicate sequences?** - select 'Yes' to remove duplicated and exact subsequences[12].
 * **Minimum sequence length** - set the minimum sequence length of predicted coding regions. The default is 200 bp.

    </help>
    <citations>
        <expand macro="citation1" />
        <citation type="bibtex">
            @article{Honaas2016,
            journal = {PloS one},
            author = {2. Honaas LA, Wafula EK, Wickett NJ, Der JP, Zhang Y, Edger PP, Altman NS, Pires JC, Leebens-Mack JH},
            title = {Selecting superior de novo transcriptome assemblies: lessons learned by leveraging the best plant genome},
            year = {2016},
            volume = {11},
            number = {1},
            pages = {e0146062},}
        </citation>
        <citation type="bibtex">
            @article{Haas2013,
            journal = {Nature Protocols},
            author = {3. Haas BJ, Papanicolaou A, Yassour M, Grabherr M, Blood PD, Bowden J, Couger MB, Eccles D, Li B, Lieber M, MacManes MD},
            title = {De novo transcript sequence reconstruction from RNA-seq using the Trinity platform for reference generation and analysis},
            year = {2013},
            volume = {8},
            number = {8},
            pages = {1494-1512},}
        </citation>
        <citation type="bibtex">
            @article{Huang1999,
            journal = {Genome Research},
            author = {5. Huang X, Madan A},
            title = {CAP3: A DNA sequence assembly program},
            year = {1999},
            volume = {9},
            number = {9},
            pages = {868-877},
            url = {http://seq.cs.iastate.edu/cap3.html},}
        </citation>
        <citation type="bibtex">
            @article{Eddy2009,
            journal = {Genome Inform},
            author = {6. Eddy SR},
            title = {A new generation of homology search tools based on probabilistic inference},
            year = {2009},
            volume = {23},
            number = {1},
            pages = {205-211},}
        </citation>
        <citation type="bibtex">
            @article{Katoh2013,
            journal = {Molecular biology and evolution},
            author = {7. 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{Sasidharan2012,
            journal = {Nucleic Acids Research},
            author = {8. Sasidharan R, Nepusz T, Swarbreck D, Huala E, Paccanaro A},
            title = {GFam: a platform for automatic annotation of gene families},
            year = {2012},
            pages = {gks631},}
        </citation>
        <citation type="bibtex">
            @article{Li2003,
            journal = {Genome Research}
            author = {9. Li L, Stoeckert CJ, Roos DS},
            title = {OrthoMCL: identification of ortholog groups for eukaryotic genomes},
            year = {2003},
            volume = {13},
            number = {9},
            pages = {2178-2189},}
        </citation>
        <citation type="bibtex">
            @article{Emms2015,
            journal = {Genome Biology}
            author = {10. Emms DM, Kelly S},
            title = {OrthoFinder: solving fundamental biases in whole genome comparisons dramatically improves orthogroup inference accuracy},
            year = {2015},
            volume = {16},
            number = {1},
            pages = {157},}
        </citation>
        <citation type="bibtex">
            @article{Capella-Gutierrez2009,
            journal = {Bioinformatics,},
            author = {11. 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{Gremme2013,
            journal = {IEEE/ACM Transactions on Computational Biology and Bioinformatics},
            author = {12. Gremme G, Steinbiss S, Kurtz S},
            title = {GenomeTools: a comprehensive software library for efficient processing of structured genome annotations},
            year = {2013},
            volume = {10},
            number = {3},
            pages = {645-656},}
        </citation>
    </citations>
</tool>