# HG changeset patch # User dvanzessen # Date 1563267425 14400 # Node ID 3333d43a58581d694d9cb533f1f96ef154621c77 # Parent 166e1c2b8c35c133457c1ec68ba26d73bbf1edf9 Uploaded diff -r 166e1c2b8c35 -r 3333d43a5858 data_manager/fetch_vep_cache_data.py --- a/data_manager/fetch_vep_cache_data.py Mon Jul 15 09:37:13 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -import argparse -import os -import json -import re -import pprint -import subprocess -import sys - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Use VEP INSTALL.pl to download/process the cache for an assembly") - parser.add_argument("--output-file") - parser.add_argument("--output-dir") - parser.add_argument("--species") - parser.add_argument("--species-type", choices=["ensembl", "refseq", "merged"], default="ensembl") - args = parser.parse_args() - - output_file = args.output_file - output_dir = args.output_dir - - species = args.species - assembly = "" - - if species.startswith("homo_sapiens"): - if species.endswith("37"): - assembly = " --ASSEMBLY GRCh37" - elif species.endswith("38"): - assembly = " --ASSEMBLY GRCh38" - else: - print("Unknown human assembly") - sys.exit(1) - species = "homo_sapiens" - - species_type = args.species_type - if species_type in ["refseq", "merged"]: - species = "{0}_{1}".format(species, species_type) - - with open(output_file) as output_file_handle: - params = json.loads(output_file_handle.read()) - - print(output_file) - print(output_dir) - print(species) - print(species_type) - pprint.pprint(params) - - if not os.path.exists(output_dir): - os.makedirs(output_dir) - - vep_install_cmd = "vep_install --NO_HTSLIB -a alcf --CACHEDIR {0} --SPECIES {1}{2}".format(output_dir, species, assembly) - - print("Running INSTALL.pl") - print(vep_install_cmd) - exit_code = subprocess.call(vep_install_cmd, cwd=output_dir, shell=True) - - print(exit_code) - - output_dict = dict( - data_tables=dict( - vep_cache_data=[{ - "value": species, - "path": output_dir, - "dbkey": args.species, - "type": species_type, - "name": "{0} ({1})".format(args.species, species_type) - }] - ) - ) - with open(output_file, 'w') as output_file_handle: - output_file_handle.write(json.dumps(output_dict)) - sys.exit(exit_code) \ No newline at end of file diff -r 166e1c2b8c35 -r 3333d43a5858 data_manager/fetch_vep_cache_data.xml --- a/data_manager/fetch_vep_cache_data.xml Mon Jul 15 09:37:13 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,185 +0,0 @@ - - - ensembl-vep - perl-dbi - perl-archive-zip - perl-dbd-mysql - - fetching - - -python $__tool_directory__/fetch_vep_cache_data.py ---output-file ${ out_file } ---output-dir ${ out_file.extra_files_path } ---species ${ species } ---species-type ${ species_type } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - There is no help - - diff -r 166e1c2b8c35 -r 3333d43a5858 data_manager_conf.xml --- a/data_manager_conf.xml Mon Jul 15 09:37:13 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - ${path} - ${dbkey}/seq/${path} - - ${GALAXY_DATA_MANAGER_DATA_PATH}/${dbkey}/seq/${path} - - - - - diff -r 166e1c2b8c35 -r 3333d43a5858 tool-data/vep_cache_data.loc.sample --- a/tool-data/vep_cache_data.loc.sample Mon Jul 15 09:37:13 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -# VEP data cache location -# -# unique key of an entry (species_) -# galaxy ref key -# cache type, ensembl, refseq or merged -# display name of the entry -# path to the directory of the cache dir \ No newline at end of file diff -r 166e1c2b8c35 -r 3333d43a5858 tool_data_table_conf.xml.sample --- a/tool_data_table_conf.xml.sample Mon Jul 15 09:37:13 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - value, dbkey, type, name, path - -
-
diff -r 166e1c2b8c35 -r 3333d43a5858 vep.xml --- a/vep.xml Mon Jul 15 09:37:13 2019 -0400 +++ b/vep.xml Tue Jul 16 04:57:05 2019 -0400 @@ -1,19 +1,8 @@ ensembl-vep - perl-dbi - perl-archive-zip - perl-dbd-mysql - - - + + + + + + +