Mercurial > repos > iuc > dram_set_database_locations
annotate dram_set_database_locations.py @ 0:6e52f03e612d draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
| author | iuc | 
|---|---|
| date | Thu, 01 Sep 2022 17:16:35 +0000 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| 0 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 1 #!/usr/bin/env python | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 2 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 3 import argparse | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 4 import os | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 5 import subprocess | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 6 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 7 parser = argparse.ArgumentParser() | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 8 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 9 parser.add_argument('--db_version', action='store', dest='db_version', help='Version of DRAM databases') | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 10 parser.add_argument('--skip_uniref', action='store_true', dest='skip_uniref', default=False, help='Flag to Download and process uniref') | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 11 parser.add_argument('--galaxy_data_manager_data_path', action='store', dest='galaxy_data_manager_data_path', help='Absolute Galaxy data manager data path') | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 12 parser.add_argument('--output', action='store', dest='output', help='Output file') | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 13 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 14 args = parser.parse_args() | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 15 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 16 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 17 def get_new_dram_config_entry(db_version, old_entry, new_base_path): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 18 # Example old_entry: | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 19 # KOfam db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/kofam_profiles.hmm | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 20 base_path, file_name = os.path.split(old_entry) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 21 # The new entry must be GALAXY_DATA_MANAGER_DATA_PATH/DRAM/${value}/file_name | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 22 return os.path.join(new_base_path, 'DRAM', db_version, file_name) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 23 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 24 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 25 # At this point the DRAM config will look something like this. | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 26 # Processed search databases | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 27 # KEGG db: None | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 28 # KOfam db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/kofam_profiles.hmm | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 29 # KOfam KO list: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/kofam_ko_list.tsv | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 30 # UniRef db: None | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 31 # Pfam db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/pfam.mmspro | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 32 # dbCAN db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/dbCAN-HMMdb-V10.txt | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 33 # RefSeq Viral db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/refseq_viral.20220707.mmsdb | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 34 # MEROPS peptidase db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/peptidases.20220707.mmsdb | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 35 # VOGDB db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/vog_latest_hmms.txt | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 36 # | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 37 # Descriptions of search database entries | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 38 # Pfam hmm dat: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/Pfam-A.hmm.dat.gz | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 39 # dbCAN family activities: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/CAZyDB.07292021.fam-activities.txt | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 40 # VOG annotations: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/vog_annotations_latest.tsv.gz | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 41 # | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 42 # Description db: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/description_db.sqlite | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 43 # | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 44 # DRAM distillation sheets | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 45 # Genome summary form: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/genome_summary_form.20220707.tsv | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 46 # Module step form: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/module_step_form.20220707.tsv | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 47 # ETC module database: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/etc_mdoule_database.20220707.tsv | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 48 # Function heatmap form: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/function_heatmap_form.20220707.tsv | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 49 # AMG database: /home/galaxies/gvk/jwd/003/3045/working/dataset_4268_files/amg_database.20220707.tsv | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 50 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 51 # Write the current DRAM CONFIG to a file for processing. | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 52 cmd = 'DRAM-setup.py print_config > dram_config.txt' | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 53 subprocess.check_call(cmd, shell=True) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 54 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 55 # Update the database locations that DRAM sets in it's CONFIG | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 56 # to point to the configured GALAXY_DATA_MANAGER_DATA_PATH location | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 57 # for the DRAM databases. | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 58 cmd = 'DRAM-setup.py set_database_locations' | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 59 with open('dram_config.txt', 'r') as fh: | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 60 for line in fh: | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 61 line = line.rstrip('\r\n') | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 62 if line.startswith('KOfam db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 63 cmd = '%s --kofam_hmm_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 64 elif line.startswith('KOfam KO list:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 65 cmd = '%s --kofam_ko_list_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 66 elif line.startswith('UniRef db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 67 if not args.skip_uniref: | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 68 cmd = '%s --uniref_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 69 elif line.startswith('Pfam db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 70 cmd = '%s --pfam_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 71 elif line.startswith('dbCAN db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 72 cmd = '%s --dbcan_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 73 elif line.startswith('RefSeq Viral db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 74 cmd = '%s --viral_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 75 elif line.startswith('MEROPS peptidase db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 76 cmd = '%s --peptidase_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 77 elif line.startswith('VOGDB db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 78 cmd = '%s --vogdb_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 79 elif line.startswith('Pfam hmm dat:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 80 cmd = '%s --pfam_hmm_dat %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 81 elif line.startswith('dbCAN family activities:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 82 cmd = '%s --dbcan_fam_activities %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 83 elif line.startswith('VOG annotations:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 84 cmd = '%s --vog_annotations %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 85 elif line.startswith('Description db:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 86 cmd = '%s --description_db_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 87 elif line.startswith('Genome summary form:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 88 cmd = '%s --genome_summary_form_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 89 elif line.startswith('Module step form:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 90 cmd = '%s --module_step_form_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 91 elif line.startswith('ETC module database:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 92 cmd = '%s --etc_module_database_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 93 elif line.startswith('Function heatmap form:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 94 cmd = '%s --function_heatmap_form_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 95 elif line.startswith('AMG database:'): | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 96 cmd = '%s --amg_database_loc %s' % (cmd, get_new_dram_config_entry(args.db_version, line, args.galaxy_data_manager_data_path)) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 97 cmd = '%s --update_description_db' % cmd | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 98 subprocess.check_call(cmd, shell=True) | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 99 | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 100 # Write the new DRAM CONFIG to a file to the output. | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 101 cmd = 'DRAM-setup.py print_config > %s' % args.output | 
| 
6e52f03e612d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dram commit 52575ece22fcdbb6fc3aa3582ea377075aaa4db1
 iuc parents: diff
changeset | 102 subprocess.check_call(cmd, shell=True) | 
