# HG changeset patch # User greg # Date 1507226077 14400 # Node ID 9da5dc4b99ccb943c27db8cb3040401a0a83a50d # Parent b472981ad5c52d431a72f514b240d1cc5cbca438 Uploaded diff -r b472981ad5c5 -r 9da5dc4b99cc .shed.yml --- a/.shed.yml Thu Aug 24 13:04:03 2017 -0400 +++ b/.shed.yml Thu Oct 05 13:54:37 2017 -0400 @@ -9,7 +9,7 @@ utilize objective classifications of complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. It postprocesses de novo assembly transcripts into putative coding sequences and their corresponding amino acid translations, locally assembling targeted gene families. -remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/plant_tribes/assembly_post_processor +remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/phylogenetics/plant_tribes/assembly_post_processor type: unrestricted categories: - Phylogenetics diff -r b472981ad5c5 -r 9da5dc4b99cc assembly_post_processor.py --- a/assembly_post_processor.py Thu Aug 24 13:04:03 2017 -0400 +++ b/assembly_post_processor.py Thu Oct 05 13:54:37 2017 -0400 @@ -13,15 +13,14 @@ parser.add_argument('--gene_family_search', dest='gene_family_search', default=None, help='Targeted gene families') parser.add_argument('--method', dest='method', default=None, help='Protein clustering method') parser.add_argument('--min_length', dest='min_length', type=int, default=0, help='Minimum sequence length') +parser.add_argument('--move_stats', dest='move_stats', default=None, help='Flag to move primary targeted gene families statistics datasets') parser.add_argument('--num_threads', dest='num_threads', type=int, help='Number of processors') -parser.add_argument('--output_pttgf', dest='output_pttgf', default=None, help='Primary targeted gene families dataset') parser.add_argument('--output_cds', dest='output_cds', help='Output transcripts.cds') parser.add_argument('--output_cleaned_cds', dest='output_cleaned_cds', help='Output transcripts.cleaned.cds') parser.add_argument('--output_cleaned_nr_cds', dest='output_cleaned_nr_cds', default=None, help='Output transcripts.cleaned.nr.cds') parser.add_argument('--output_cleaned_nr_pep', dest='output_cleaned_nr_pep', default=None, help='Output transcripts.cleaned.nr.pep') parser.add_argument('--output_cleaned_pep', dest='output_cleaned_pep', help='Output transcripts.cleaned.pep') parser.add_argument('--output_pep', dest='output_pep', help='Output transcripts.pep') -parser.add_argument('--output_pttgf_dir', dest='output_pttgf_dir', default=None, help='Directory hierarchy of targeted gene family datasets') parser.add_argument('--prediction_method', dest='prediction_method', help='Coding regions prediction method') parser.add_argument('--scaffold', dest='scaffold', default=None, help='Gene family scaffold') parser.add_argument('--score_matrices', dest='score_matrices', default=None, help='Scores matrices') @@ -63,7 +62,7 @@ shutil.move(os.path.join(OUTPUT_DIR, 'transcripts.cleaned.nr.pep'), args.output_cleaned_nr_pep) shutil.move(os.path.join(OUTPUT_DIR, 'transcripts.cleaned.pep'), args.output_cleaned_pep) shutil.move(os.path.join(OUTPUT_DIR, 'transcripts.pep'), args.output_pep) -if args.output_pttgf is not None and args.output_pttgf_dir is not None: - src_output_dir = os.path.join(OUTPUT_DIR, 'targeted_gene_families') - utils.move_directory_files(src_output_dir, args.output_pttgf_dir) - utils.write_html_output(args.output_pttgf, 'Targeted gene families', args.output_pttgf_dir) \ No newline at end of file +if args.move_stats is not None: + src_dir = os.path.join(OUTPUT_DIR, 'targeted_gene_families') + dst_dir = os.path.join(OUTPUT_DIR, 'targeted_gene_families_statistics') + shutil.move(os.path.join(src_dir, '*.stats'), dst_dir) \ No newline at end of file diff -r b472981ad5c5 -r 9da5dc4b99cc assembly_post_processor.xml --- a/assembly_post_processor.xml Thu Aug 24 13:04:03 2017 -0400 +++ b/assembly_post_processor.xml Thu Oct 05 13:54:37 2017 -0400 @@ -1,9 +1,11 @@ - + post-processes de novo transcriptome assembly macros.xml - + + plant_tribes_assembly_post_processor + - + + options_type['options_type_selector'] == 'advanced' and options_type['target_gene_family_assembly_cond']['target_gene_family_assembly'] == 'yes' - + + + + options_type['options_type_selector'] == 'advanced' and options_type['target_gene_family_assembly_cond']['target_gene_family_assembly'] == 'yes' + diff -r b472981ad5c5 -r 9da5dc4b99cc macros.xml --- a/macros.xml Thu Aug 24 13:04:03 2017 -0400 +++ b/macros.xml Thu Oct 05 13:54:37 2017 -0400 @@ -1,47 +1,6 @@ 1.0 - - - plant_tribes_assembly_post_processor - - - - - plant_tribes_gene_family_aligner - - - - - plant_tribes_gene_family_classifier - - - - - plant_tribes_gene_family_integrator - - - - - plant_tribes_kaks_analysis - - - - - r-optparse - - - - - plant_tribes_gene_family_phylogeny_builder - - - - - - - - @@ -49,74 +8,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @misc{None, diff -r b472981ad5c5 -r 9da5dc4b99cc utils.py --- a/utils.py Thu Aug 24 13:04:03 2017 -0400 +++ b/utils.py Thu Oct 05 13:54:37 2017 -0400 @@ -27,7 +27,7 @@ return fstderr, fherr, fstdout, fhout -def move_directory_files(source_dir, destination_dir, copy=False): +def move_directory_files(source_dir, destination_dir, copy=False, remove_source_dir=False): source_directory = os.path.abspath(source_dir) destination_directory = os.path.abspath(destination_dir) if not os.path.isdir(destination_directory): @@ -38,6 +38,8 @@ shutil.copy(source_entry, destination_directory) else: shutil.move(source_entry, destination_directory) + if remove_source_dir: + os.rmdir(source_directory) def run_command(cmd):