# HG changeset patch # User greg # Date 1656623223 0 # Node ID c31256419bf6854464168d1d0957aae7745aded4 Uploaded diff -r 000000000000 -r c31256419bf6 .shed.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.shed.yml Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,16 @@ +name: data_manager_dram_database_downloader +owner: iuc +description: DRAM for distilling microbial metabolism to automate the curation of microbiome function +homepage_url: https://github.com/WrightonLabCSU/DRAM +long_description: | + DRAM (Distilled and Refined Annotation of Metabolism) is a tool for annotating metagenomic assembled genomes + and VirSorter identified viral contigs. DRAM annotates MAGs and viral contigs using KEGG (if provided by the + user), UniRef90, PFAM, dbCAN, RefSeq viral, VOGDB and the MEROPS peptidase database as well as custom user + databases. DRAM is run in two stages. First an annotation step to assign database identifiers to gene and then a + distill step to curate these annotations into useful functional categories. Additionally viral contigs are further + analyzed during to identify potential AMGs. This is done via assigning an auxiliary score and flags representing the + confidence that a gene is both metabolic and viral. +remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_dram_database_downloader +type: unrestricted +categories: +- Data Managers diff -r 000000000000 -r c31256419bf6 data_manager/data_manager_dram_download.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/data_manager_dram_download.py Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +import datetime +import json +import os +import subprocess +import sys + +today = datetime.date.today() +with open(sys.argv[1]) as fh: + params = json.load(fh) +target_directory = params['output_data'][0]['extra_files_path'] +os.mkdir(target_directory) +param_dict = params['param_dict'] + +# Now DRAM-setup.py can be called to download the data. +cmd = 'DRAM-setup.py prepare_database --dbcan_version %d --threads %d' % (param_dict['--dbcan_version'], param_dict['--threads']) +if '--skip_uniref' in param_dict: + cmd = '%s --skip_uniref' % cmd +else: + cmd = '%s --uniref_version %d' % param_dict['--uniref_version'] +if '--keep_database_files' in param_dict: + cmd = '%s --keep_database_files' % cmd + +subprocess.check_call(cmd, shell=True) + +# Prepare the metadata for the new data table record. +data_manager_dict = { + 'data_tables': { + 'dram_versioned_databases': [ + { + 'value': today.isoformat(), + 'version': param_dict['dram_db_version'], + 'name': 'DRAM databases version %s' % param_dict['dram_db_version'], + 'path': None + } + ] + } +} + +# Save it to the json results file. +with open(sys.argv[1], 'w') as fh: + json.dump(data_manager_dict, fh, sort_keys=True) diff -r 000000000000 -r c31256419bf6 data_manager/data_manager_dram_download.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/data_manager_dram_download.xml Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,39 @@ + + the annotation files required by the DRAM suite of tools + + 1.3.5 + + + dram + + +python '$__tool_directory__/data_manager_dram_download.py' +'${out_file}' +--skip_uniref +--uniref_version $uniref_version +--dbcan_version $dbcan_version +--keep_database_files +--threads \${GALAXY_SLOTS:-10} + + + + + + + + + + + + + +This tool downloads downloads and processes DRAM databases for annotation and makes them available to +corresponding versions of the DRAM suite of tools. + +See https://github.com/WrightonLabCSU/DRAM/wiki for details about DRAM. + + + 10.1093/nar/gkaa621 + + + diff -r 000000000000 -r c31256419bf6 data_manager_conf.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager_conf.xml Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,20 @@ + + + + + + + + + + dram/${version}/${value} + + ${GALAXY_DATA_MANAGER_DATA_PATH}/dram/${version}/${value}/ + abspath + + + + + + + diff -r 000000000000 -r c31256419bf6 test-data/dram_databases.loc diff -r 000000000000 -r c31256419bf6 tool-data/dram_databases.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/dram_databases.loc.sample Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,3 @@ +## DRAM databases +#Value Version Name Path +#2022-07-04 1.3.5 DRAM annotations (2022-07-04) /depot/data2/galaxy/tool-data/dram_databases/1.3.5/2022-07-04 diff -r 000000000000 -r c31256419bf6 tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,8 @@ + + + + value, version, name, path + +
+
+ diff -r 000000000000 -r c31256419bf6 tool_data_table_conf.xml.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.test Thu Jun 30 21:07:03 2022 +0000 @@ -0,0 +1,7 @@ + + + + value, version, name, path + +
+