# HG changeset patch # User greg # Date 1504113108 14400 # Node ID 34ca28db0a5d55515012958fc31c7f78c1603d44 # Parent 1134528b93cc52b61088c1c94d4c6d47acbed751 Uploaded diff -r 1134528b93cc -r 34ca28db0a5d .shed.yml --- 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 diff -r 1134528b93cc -r 34ca28db0a5d gene_family_phylogeny_builder.py --- 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) diff -r 1134528b93cc -r 34ca28db0a5d gene_family_phylogeny_builder.xml --- 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 @@ - + builds phylogenetic trees of aligned orthologous gene family clusters macros.xml @@ -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 ]]> @@ -132,21 +126,15 @@ - - - - - + - - output_pttree_dir == 'yes' - - + tree_inference_cond['tree_inference'] == 'raxml' - + +