# HG changeset patch # User greg # Date 1491831368 14400 # Node ID badd2d0f168955fed80614c63061cde059dceff3 # Parent b52d29988df87a330532a622d0288f5cd94bbe8c Uploaded diff -r b52d29988df8 -r badd2d0f1689 .shed.yml --- a/.shed.yml Fri Apr 07 14:37:29 2017 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -name: plant_tribes_gene_family_aligner -owner: greg -description: | - Contains a tool that integrates de novo assembly sequences with scaffold gene family sequences. -homepage_url: https://github.com/dePamphilis/PlantTribes -long_description: | - Contains a tool that tool is one of the PlantTribes collection of automated modular analysis pipelines that - utilize objective classifications of complete protein sequences from sequenced plant genomes to perform - comparative evolutionary studies. This tool aligns gene family sequences. -remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/plant_tribes/gene_family_aligner -type: unrestricted -categories: -- Phylogenetics diff -r b52d29988df8 -r badd2d0f1689 gene_family_aligner.py --- a/gene_family_aligner.py Fri Apr 07 14:37:29 2017 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -#!/usr/bin/env python -import argparse -import os -import subprocess - -import utils - -OUTPUT_DIR = 'geneFamilyAlignments_dir' - -parser = argparse.ArgumentParser() -parser.add_argument('--alignment_method', dest='alignment_method', help='Multiple sequence alignments method') -parser.add_argument('--automated_trimming', dest='automated_trimming', default=None, help="Trims alignments using trimAl's ML heuristic trimming approach") -parser.add_argument('--codon_alignments', dest='codon_alignments', default=None, help="Flag for constructing orthogroup multiple codon alignments") -parser.add_argument('--gap_trimming', dest='gap_trimming', default=None, type=float, help='Remove sites in alignments with gaps of') -parser.add_argument('--iterative_realignment', dest='iterative_realignment', type=int, default=None, help='"Maximum number of iterations') -parser.add_argument('--method', dest='method', help='Protein clustering method') -parser.add_argument('--num_threads', dest='num_threads', type=int, help='Number of threads to use for execution') -parser.add_argument('--orthogroup_faa', dest='orthogroup_faa', help="Directory of input fasta datasets") -parser.add_argument('--output', dest='output', help="Output dataset") -parser.add_argument('--output_dir', dest='output_dir', help="Output dataset file_path directory") -parser.add_argument('--pasta_iter_limit', dest='pasta_iter_limit', type=int, default=None, help='"Maximum number of iteration that the PASTA algorithm will execute') -parser.add_argument('--pasta_script_path', dest='pasta_script_path', default=None, help='Path to script for executing pasta') -parser.add_argument('--remove_sequences', dest='remove_sequences', default=None, type=float, help='Remove sequences with gaps of') -parser.add_argument('--scaffold', dest='scaffold', help='Orthogroups or gene families proteins scaffold') - -args = parser.parse_args() - -# Build the command line. -cmd = 'GeneFamilyAligner' -cmd += ' --orthogroup_faa %s' % args.orthogroup_faa -cmd += ' --scaffold %s' % args.scaffold -cmd += ' --method %s' % args.method -cmd += ' --alignment_method %s' % args.alignment_method -if args.alignment_method == 'pasta': - if args.pasta_script_path is not None: - cmd += ' --pasta_script_path %s' % args.pasta_script_path - if args.pasta_iter_limit is not None: - cmd += ' --pasta_iter_limit %d' % args.pasta_iter_limit -cmd += ' --num_threads %d' % args.num_threads -if args.codon_alignments is not None: - cmd += ' --codon_alignments' -if args.automated_trimming is not None: - cmd += ' --automated_trimming' -if args.gap_trimming is not None: - cmd += ' --gap_trimming %4f' % args.gap_trimming -if args.remove_sequences is not None: - cmd += ' --remove_sequences %4f' % args.remove_sequences -if args.iterative_realignment is not None: - cmd += ' --iterative_realignment %d' % args.iterative_realignment -# Run the command. -proc = subprocess.Popen(args=cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) -rc = proc.wait() -utils.check_execution_errors(rc, proc.stderr) -if args.codon_alignments is None: - src_output_dir = OUTPUT_DIR -else: - src_output_dir = os.path.join(OUTPUT_DIR, 'orthogroups_aln') -utils.move_directory_files(src_output_dir, args.output_dir) -utils.write_html_output(args.output, 'Aligned gene family sequences', args.output_dir) diff -r b52d29988df8 -r badd2d0f1689 gene_family_aligner.xml --- a/gene_family_aligner.xml Fri Apr 07 14:37:29 2017 -0400 +++ b/gene_family_aligner.xml Mon Apr 10 09:36:08 2017 -0400 @@ -1,4 +1,4 @@ - + aligns gene family sequences macros.xml @@ -23,18 +23,11 @@ --num_threads \${GALAXY_SLOTS:-4} #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.codon_alignments) == 'yes': --codon_alignments 'true' - --output '$output_ptorthocs' - --output_dir '$output_ptorthocs.files_path' - #else: - --output '$output_ptortho' - --output_dir '$output_ptortho.files_path' #end if #end if #if str($options_type_cond.options_type) == 'advanced': @@ -57,6 +50,8 @@ #end if #end if #end if + --output '$output' + --output_dir '$output.files_path' ]]> @@ -88,12 +83,7 @@ - - input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'no') - - - input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'yes' - +