changeset 5:34ca28db0a5d draft

Uploaded
author greg
date Wed, 30 Aug 2017 13:11:48 -0400
parents 1134528b93cc
children a7867769a706
files .shed.yml gene_family_phylogeny_builder.py gene_family_phylogeny_builder.xml
diffstat 3 files changed, 7 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/.shed.yml	Fri Aug 25 13:01:04 2017 -0400
+++ b/.shed.yml	Wed Aug 30 13:11:48 2017 -0400
@@ -8,7 +8,7 @@
   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
   GeneFamilyAligner tool.
-remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/plant_tribes/gene_family_phylogeny_builder
+remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/phylogenetics/plant_tribes/gene_family_phylogeny_builder
 type: unrestricted
 categories:
 - Phylogenetics
--- a/gene_family_phylogeny_builder.py	Fri Aug 25 13:01:04 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-import argparse
-import os
-
-import utils
-
-OUTPUT_DIR = 'geneFamilyPhylogenies_dir'
-
-parser = argparse.ArgumentParser()
-
-parser.add_argument('--alignment_type', dest='alignment_type', help='Input alignments type produced by the GeneFamilyAligner')
-parser.add_argument('--bootstrap_replicates', dest='bootstrap_replicates', type=int, default=None, help='Number of replicates for rapid bootstrap analysis')
-parser.add_argument('--config_dir', dest='config_dir', help='Directory containing default configuration files')
-parser.add_argument('--max_orthogroup_size', dest='max_orthogroup_size', type=int, help='Maximum number of sequences in orthogroup alignments')
-parser.add_argument('--method', dest='method', help='Protein clustering method')
-parser.add_argument('--min_orthogroup_size', dest='min_orthogroup_size', type=int, help='Minimum number of sequences in orthogroup alignments')
-parser.add_argument('--num_threads', dest='num_threads', type=int, help='Number of threads to use for execution')
-parser.add_argument('--orthogroup_aln', dest='orthogroup_aln', help='Input dataset files_path')
-parser.add_argument('--output_phylip', dest='output_phylip', default=None, help='Output for orthogroup phylip multiple sequence alignments')
-parser.add_argument('--output_phylip_dir', dest='output_phylip_dir', default=None, help='output_phylip.files_path')
-parser.add_argument('--output_tree', dest='output_tree', default=None, help='Output for phylogenetic trees')
-parser.add_argument('--output_tree_dir', dest='output_tree_dir', default=None, help='output_tree.files_path')
-parser.add_argument('--rooting_order', dest='rooting_order', default=None, help='Rooting order configuration for rooting trees')
-parser.add_argument('--scaffold', dest='scaffold', help='Orthogroups or gene families proteins scaffold')
-parser.add_argument('--sequence_type', dest='sequence_type', help='Sequence type used in the phylogenetic inference')
-parser.add_argument('--tree_inference', dest='tree_inference', help='Phylogenetic trees inference method')
-
-args = parser.parse_args()
-
-# Build the command line.
-cmd = 'GeneFamilyPhylogenyBuilder'
-cmd += ' --alignment_type %s' % args.alignment_type
-if args.bootstrap_replicates is not None:
-    cmd += ' --bootstrap_replicates %d' % args.bootstrap_replicates
-cmd += ' --config_dir %s' % args.config_dir
-cmd += ' --max_orthogroup_size %d' % args.max_orthogroup_size
-cmd += ' --method %s' % args.method
-cmd += ' --min_orthogroup_size %d' % args.min_orthogroup_size
-cmd += ' --num_threads %d' % args.num_threads
-cmd += ' --orthogroup_aln %s' % args.orthogroup_aln
-if args.rooting_order is not None:
-    cmd += ' --rooting_order %s' % args.rooting_order
-cmd += ' --scaffold %s' % args.scaffold
-cmd += ' --sequence_type %s' % args.sequence_type
-cmd += ' --tree_inference %s' % args.tree_inference
-
-# Run the command.
-utils.run_command(cmd)
-
-# Handle outputs.
-if args.output_phylip is not None and args.output_phylip_dir is not None:
-    src_output_dir = os.path.join(OUTPUT_DIR, 'phylip_aln')
-    utils.move_directory_files(src_output_dir, args.output_phylip_dir)
-    utils.write_html_output(args.output_phylip, 'Orthogroup phylip multiple sequence alignments', args.output_phylip_dir)
-if args.output_tree is not None and args.output_tree_dir is not None:
-    src_output_dir = os.path.join(OUTPUT_DIR, 'orthogroups_tree')
-    utils.move_directory_files(src_output_dir, args.output_tree_dir, copy=True)
-    utils.write_html_output(args.output_tree, 'Phylogenetic trees', args.output_tree_dir)
--- a/gene_family_phylogeny_builder.xml	Fri Aug 25 13:01:04 2017 -0400
+++ b/gene_family_phylogeny_builder.xml	Wed Aug 30 13:11:48 2017 -0400
@@ -1,4 +1,4 @@
-<tool id="plant_tribes_gene_family_phylogeny_builder" name="GeneFamilyPhylogenyBuilder" version="@WRAPPER_VERSION@.2">
+<tool id="plant_tribes_gene_family_phylogeny_builder" name="GeneFamilyPhylogenyBuilder" version="@WRAPPER_VERSION@.2.1">
     <description>builds phylogenetic trees of aligned orthologous gene family clusters</description>
     <macros>
         <import>macros.xml</import>
@@ -16,7 +16,7 @@
     #set bootstrap_replicates = $tree_inference_cond.bootstrap_replicates
 #end if
 
-python '$__tool_directory__/gene_family_phylogeny_builder.py'
+GeneFamilyPhylogenyBuilder
 #if str($input_format) == 'ptalign':
     --orthogroup_aln '$input_format_cond.input_ptalign.extra_files_path'
     --alignment_type aln
@@ -53,16 +53,10 @@
         ## configuration will be used if the --rooting_order flag is missing.
     #end if
     --bootstrap_replicates $bootstrap_replicates
-    --output_phylip '$output_phylip'
-    --output_phylip_dir '$output_phylip.files_path'
 #end if
 --min_orthogroup_size $min_orthogroup_size
 --max_orthogroup_size $max_orthogroup_size
 --num_threads \${GALAXY_SLOTS:-4}
-#if str($output_pttree_dir) == 'yes':
-    --output_tree '$output_tree'
-    --output_tree_dir '$output_tree.files_path'
-#end if
     ]]></command>
     <inputs>
         <conditional name="input_format_cond">
@@ -132,21 +126,15 @@
         </conditional>
         <param name="max_orthogroup_size" type="integer" value="100" min="4" label="Maximum orthogroup size" />
         <param name="min_orthogroup_size" type="integer" value="4" min="4" label="Minimum orthogroup size" />
-        <param name="output_pttree_dir" type="select" label="Output additional directory of phylogenetic tree files?">
-            <option value="no" selected="true">No</option>
-            <option value="yes">Yes</option>
-        </param>
     </inputs>
     <outputs>
-        <collection name="tree" type="list" label="${tool.name} (phylogenetic trees, dataset collection) on ${on_string}">
+        <collection name="tree" type="list" label="${tool.name} (phylogenetic trees) on ${on_string}">
             <discover_datasets pattern="__name__" directory="geneFamilyPhylogenies_dir/orthogroups_tree" format="nhx" />
         </collection>
-        <data name="output_tree" format="pttree" label="${tool.name} (phylogenetic trees, directory) on ${on_string}">
-            <filter>output_pttree_dir == 'yes'</filter>
-        </data>
-        <data name="output_phylip" format="ptphylip" label="${tool.name} (orthogroup phylip multiple sequence alignments) on ${on_string}">
+        <collection name="phylip" type="list" label="${tool.name} (orthogroup phylip multiple sequence alignments) on ${on_string}">
             <filter>tree_inference_cond['tree_inference'] == 'raxml'</filter>
-        </data>
+            <discover_datasets pattern="__name__" directory="geneFamilyPhylogenies_dir/phylip_aln" format="phylip" />
+        </collection>
     </outputs>
     <tests>
         <!-- Test framework does not currently support inputs whose associated extra_files_path contains files to be analyzed.