# HG changeset patch # User greg # Date 1504703918 14400 # Node ID fc829bac606b121b2f1da8d1e88680d86606f9b4 # Parent 7cb6a832af829c36a76f6b32ed8705a1549be017 Uploaded diff -r 7cb6a832af82 -r fc829bac606b .shed.yml --- a/.shed.yml Fri Aug 25 13:00:09 2017 -0400 +++ b/.shed.yml Wed Sep 06 09:18:38 2017 -0400 @@ -7,7 +7,7 @@ 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 +remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/phylogenetics/plant_tribes/gene_family_aligner type: unrestricted categories: - Phylogenetics diff -r 7cb6a832af82 -r fc829bac606b gene_family_aligner.py --- a/gene_family_aligner.py Fri Aug 25 13:00:09 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 = '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 trimAls 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=0, type=float, help='Remove sites in alignments with gaps of') -parser.add_argument('--iterative_realignment', dest='iterative_realignment', type=int, default=0, help='Maximum number of iterations') -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 files_path directory') -parser.add_argument('--output_dataset_collection', dest='output_dataset_collection', default=None, help='Output additional dataset collection of files.') -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=0, type=float, help='Remove sequences with gaps of') - -args = parser.parse_args() - -# Build the command line. -cmd = 'GeneFamilyAligner' -cmd += ' --orthogroup_faa %s' % args.orthogroup_faa -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 > 0: - cmd += ' --gap_trimming %4f' % args.gap_trimming -if args.remove_sequences > 0: - cmd += ' --remove_sequences %4f' % args.remove_sequences -if args.iterative_realignment > 0: - cmd += ' --iterative_realignment %d' % args.iterative_realignment - -# Run the command. -utils.run_command(cmd) - -# Handle outputs. -if args.codon_alignments is None: - src_output_dir = OUTPUT_DIR -else: - src_output_dir = os.path.join(OUTPUT_DIR, 'orthogroups_aln') -if args.output_dataset_collection is not None: - utils.move_directory_files(src_output_dir, args.output_dataset_collection, copy=True) -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 7cb6a832af82 -r fc829bac606b gene_family_aligner.xml --- a/gene_family_aligner.xml Fri Aug 25 13:00:09 2017 -0400 +++ b/gene_family_aligner.xml Wed Sep 06 09:18:38 2017 -0400 @@ -1,4 +1,4 @@ - + aligns integrated orthologous gene family clusters macros.xml @@ -8,15 +8,7 @@ #set input_format = $input_format_cond.input_format #set alignment_method_cond = $input_format_cond.alignment_method_cond #set alignment_method = $alignment_method_cond.alignment_method -#if str($input_format_cond.input_format) == 'ptortho': - #set output_codon_alignments = False -#else if str($input_format_cond.input_format) == 'ptorthocs' and str($input_format_cond.codon_alignments ) == 'no': - #set output_codon_alignments = False -#else: - #set output_codon_alignments = True -#end if - -python '$__tool_directory__/gene_family_aligner.py' +GeneFamilyAligner --alignment_method $alignment_method #if str($alignment_method) == 'pasta': --pasta_script_path '$__tool_directory__/run_pasta.py' @@ -29,7 +21,7 @@ ## 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 + --codon_alignments #end if #end if #set remove_gappy_sequences = $remove_gappy_sequences_cond.remove_gappy_sequences @@ -40,7 +32,7 @@ --gap_trimming $trim_type_cond.gap_trimming #else: ## str($trim_type) == 'automated_trimming' - --automated_trimming true + --automated_trimming #end if #set remove_sequences_with_gaps_cond = $remove_gappy_sequences_cond.remove_sequences_with_gaps_cond #set remove_sequences_with_gaps = $remove_sequences_with_gaps_cond.remove_sequences_with_gaps @@ -51,33 +43,7 @@ #if str($remove_sequences_with_gaps_cond.iterative_realignment): --iterative_realignment $remove_sequences_with_gaps_cond.iterative_realignment #end if - #if $output_codon_alignments: - --output '$output_aln_filtered_ca' - --output_dir '$output_aln_filtered_ca.files_path' - #else: - --output '$output_aln_filtered' - --output_dir '$output_aln_filtered.files_path' - #end if - #else: - #if $output_codon_alignments: - --output '$output_aln_trimmed_ca' - --output_dir '$output_aln_trimmed_ca.files_path' - #else: - --output '$output_aln_trimmed' - --output_dir '$output_aln_trimmed.files_path' - #end if #end if -#else: - #if $output_codon_alignments: - --output '$output_aln_ca' - --output_dir '$output_aln_ca.files_path' - #else: - --output '$output_aln' - --output_dir '$output_aln.files_path' - #end if -#end if -#if str($output_dataset_collection) == 'yes': - --output_dataset_collection dataset_collection #end if ]]> @@ -107,27 +73,25 @@ - - (input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'no')) and remove_gappy_sequences_cond['remove_gappy_sequences'] == 'no' - - - (input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'yes')) and remove_gappy_sequences_cond['remove_gappy_sequences'] == 'no' - - - (input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'no')) and (remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'yes') - - - (input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'yes')) and (remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'yes') - - - (input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'no')) and (remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'no') - - - (input_format_cond['input_format'] == 'ptortho' or (input_format_cond['input_format'] == 'ptorthocs' and input_format_cond['codon_alignments'] == 'yes')) and (remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'no') - - - - output_dataset_collection == 'yes' + + + remove_gappy_sequences_cond['remove_gappy_sequences'] == 'no' + + + + remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'no' + + + + remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'no' + + + + remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'yes' + + + + remove_gappy_sequences_cond['remove_gappy_sequences'] == 'yes' and remove_gappy_sequences_cond['remove_sequences_with_gaps_cond']['remove_sequences_with_gaps'] == 'yes'