Mercurial > repos > greg > gene_family_integrator
changeset 26:b91bf5a51d38 draft
Uploaded
author | greg |
---|---|
date | Wed, 04 Oct 2017 11:08:10 -0400 |
parents | 47db4f99b31f |
children | 346dc0d9af6f |
files | .shed.yml gene_family_integrator.py gene_family_integrator.xml macros.xml |
diffstat | 4 files changed, 21 insertions(+), 94 deletions(-) [+] |
line wrap: on
line diff
--- a/.shed.yml Thu Aug 24 13:28:08 2017 -0400 +++ b/.shed.yml Wed Oct 04 11:08:10 2017 -0400 @@ -8,7 +8,7 @@ utilize objective classifications of complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. This tool integrates classified post processed de novo transcriptome assembly sequences with the scaffold gene family sequences. -remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/plant_tribes/gene_family_integrator +remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/phylogenetics/plant_tribes/gene_family_integrator type: unrestricted categories: - Phylogenetics
--- a/gene_family_integrator.py Thu Aug 24 13:28:08 2017 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -#!/usr/bin/env python -import argparse -import os - -import utils - -OUTPUT_DIR = 'integratedGeneFamilies_dir' - -parser = argparse.ArgumentParser() -parser.add_argument('--orthogroup_faa', dest='orthogroup_faa', help='Directory of input fasta datasets') -parser.add_argument('--scaffold', dest='scaffold', help='Orthogroups or gene families proteins scaffold') -parser.add_argument('--method', dest='method', help='Protein clustering method') -parser.add_argument('--orthogroup_fna', dest='orthogroup_fna', default=None, help='Use correspong coding sequences') -parser.add_argument('--output', dest='output', help='Output dataset') -parser.add_argument('--output_dir', dest='output_dir', help='Output dataset file_path directory') - -args = parser.parse_args() - -# Build the command line. -cmd = 'GeneFamilyIntegrator' -cmd += ' --orthogroup_faa %s' % args.orthogroup_faa -cmd += ' --scaffold %s' % args.scaffold -cmd += ' --method %s' % args.method -if args.orthogroup_fna is not None: - cmd += ' --orthogroup_fna' - -# Run the command. -utils.run_command(cmd) - -# Handle outputs. -utils.move_directory_files(os.path.join(OUTPUT_DIR, 'orthogroups_fasta'), args.output_dir) -utils.write_html_output(args.output, 'Integrated gene family sequences', args.output_dir)
--- a/gene_family_integrator.xml Thu Aug 24 13:28:08 2017 -0400 +++ b/gene_family_integrator.xml Wed Oct 04 11:08:10 2017 -0400 @@ -1,64 +1,31 @@ -<tool id="plant_tribes_gene_family_integrator" name="GeneFamilyIntegrator" version="@WRAPPER_VERSION@.2"> +<tool id="plant_tribes_gene_family_integrator" name="GeneFamilyIntegrator" version="@WRAPPER_VERSION@.3.0"> <description>integrates gene models in pre-computed orthologous gene family clusters with classified gene coding sequences</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements_gene_family_integrator" /> <command detect_errors="exit_code"><![CDATA[ -#set input_format = $input_format_cond.input_format -#set scaffold = $input_format_cond.scaffold -#set method = $input_format_cond.method - -python '$__tool_directory__/gene_family_integrator.py' +#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 +GeneFamilyIntegrator +--orthogroup_fasta '$input_dir' --scaffold '$scaffold.fields.path' --method $method -#if str($input_format) == 'ptortho': - --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path' - --output '$output_ptortho' - --output_dir '$output_ptortho.files_path' -#else: - ## str($input_format) == 'ptorthocs' - --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path' - #if str($input_format_cond.orthogroup_fna) == 'yes': - --orthogroup_fna true - --output '$output_ptorthocs' - --output_dir '$output_ptorthocs.files_path' - #else: - --output '$output_ptortho' - --output_dir '$output_ptortho.files_path' - #end if -#end if ]]></command> <inputs> - <conditional name="input_format_cond"> - <param name="input_format" type="select" label="Classified orthogroup fasta files"> - <option value="ptortho">Proteins orthogroup fasta files</option> - <option value="ptorthocs">Protein and coding sequences orthogroup fasta files</option> - </param> - <when value="ptortho"> - <param name="input_ptortho" format="ptortho" type="data" label="Proteins orthogroup fasta files"> - <validator type="empty_extra_files_path" /> - </param> - <expand macro="param_scaffold" /> - <expand macro="param_method" /> - </when> - <when value="ptorthocs"> - <param name="input_ptorthocs" format="ptorthocs" type="data" label="Protein and coding sequences orthogroup fasta files"> - <validator type="empty_extra_files_path" /> - </param> - <expand macro="param_scaffold" /> - <expand macro="param_method" /> - <expand macro="param_orthogroup_fna" /> - </when> - </conditional> + <param name="input" format="fasta" type="data_collection" collection_type="list" label="Proteins orthogroup fasta files" /> + <expand macro="param_scaffold" /> + <expand macro="param_method" /> </inputs> <outputs> - <data name="output_ptortho" format="ptortho" label="${tool.name} (integrated gene family clusters) on ${on_string}"> - <filter>input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['orthogroup_fna'] == 'no')</filter> - </data> - <data name="output_ptorthocs" format="ptorthocs" label="${tool.name} (integrated gene family clusters) on ${on_string}"> - <filter>input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['orthogroup_fna'] == 'yes'</filter> - </data> + <collection name="output" type="list" label="${tool.name} (integrated gene family clusters) on ${on_string}"> + <discover_datasets pattern="__name__" directory="integratedGeneFamilies_dir" format="fasta" /> + </collection> </outputs> <tests> <!-- Test framework does not currently support inputs whose associated extra_files_path contains files to be analyzed.
--- a/macros.xml Thu Aug 24 13:28:08 2017 -0400 +++ b/macros.xml Wed Oct 04 11:08:10 2017 -0400 @@ -55,24 +55,12 @@ <option value="advanced">Advanced</option> </param> </xml> - <xml name="param_orthogroup_fna"> - <param name="orthogroup_fna" type="select" label="Orthogroups coding sequences"> - <option value="yes" selected="true">Yes</option> - <option value="no">No</option> - </param> - </xml> <xml name="param_scaffold"> <param name="scaffold" type="select" label="Gene family 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> </xml> - <xml name="param_sequence_type"> - <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> - </xml> <xml name="cond_alignment_method"> <conditional name="alignment_method_cond"> <param name="alignment_method" type="select" force_select="true" label="Multiple sequence alignment method"> @@ -114,6 +102,10 @@ <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 non-filtered, non-trimmed alignemnts?" help="In addition to trimmed/filtered alignments"> + <option value="no" selected="true">No</option> + <option value="yes">Yes</option> + </param> </when> </conditional> </xml>