Mercurial > repos > jjohnson > data_manager_snpeff
changeset 6:a329eda0cdff draft default tip
Uploaded
author | jjohnson |
---|---|
date | Wed, 09 Dec 2015 13:49:55 -0500 |
parents | 78bcf4ac437c |
children | |
files | data_manager/data_manager_snpEff_databases.py data_manager/data_manager_snpEff_databases.xml data_manager/data_manager_snpEff_download.xml repository_dependencies.xml tool_dependencies.xml |
diffstat | 5 files changed, 9 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/data_manager_snpEff_databases.py Tue Jan 13 12:54:20 2015 -0600 +++ b/data_manager/data_manager_snpEff_databases.py Wed Dec 09 13:49:55 2015 -0500 @@ -18,28 +18,6 @@ sys.stderr.write(msg) sys.exit(1) -def getSnpeffVersion(jar_path): - snpeff_version = 'SnpEff ?.?' - (snpEff_dir,snpEff_jar) = os.path.split(jar_path) - stderr_path = 'snpeff.err' - stderr_fh = open(stderr_path,'w') - args = [ 'java','-jar', ] - args.append( snpEff_jar ) - args.append( '-h' ) - proc = subprocess.Popen( args=args, shell=False, cwd=snpEff_dir, stderr=stderr_fh.fileno() ) - return_code = proc.wait() - if return_code != 255: - sys.exit( return_code ) - stderr_fh.close() - fh = open(stderr_path,'r') - for line in fh: - m = re.match('^[Ss]npEff version (SnpEff)\s*(\d+\.\d+).*$',line) - if m: - snpeff_version = m.groups()[0] + m.groups()[1] - break - fh.close() - return snpeff_version - def fetch_databases(data_manager_dict, target_directory, jar_path): (snpEff_dir,snpEff_jar) = os.path.split(jar_path) if not os.path.exists(target_directory): @@ -57,10 +35,9 @@ if return_code: sys.exit( return_code ) databases_output.close() - snpeff_version = getSnpeffVersion(jar_path) try: data_manager_dict['data_tables'] = data_manager_dict.get( 'data_tables', {} ) - data_manager_dict['data_tables']['snpeffv_databases'] = data_manager_dict['data_tables'].get( 'snpeffv_databases', [] ) + data_manager_dict['data_tables']['snpeff4_databases'] = data_manager_dict['data_tables'].get( 'snpeff4_databases', [] ) data_table_entries = [] fh = open(databases_path,'r') for i,line in enumerate(fh): @@ -73,9 +50,8 @@ if genome_version == '30c2c903' or fields[1].strip() == 'TestCase' or fields[1].strip().startswith('Test_'): continue description = fields[1].strip() + ' : ' + genome_version - key = snpeff_version + '_' + genome_version - data_table_entries.append(dict(key=key, version=snpeff_version, value=genome_version, name=description)) - data_manager_dict['data_tables']['snpeffv_databases'] = data_table_entries + data_table_entries.append(dict(value=genome_version, name=description)) + data_manager_dict['data_tables']['snpeff4_databases'] = data_table_entries except Exception, e: stop_err( 'Error parsing %s %s\n' % (config,str( e )) ) else:
--- a/data_manager/data_manager_snpEff_databases.xml Tue Jan 13 12:54:20 2015 -0600 +++ b/data_manager/data_manager_snpEff_databases.xml Wed Dec 09 13:49:55 2015 -0500 @@ -1,7 +1,7 @@ -<tool id="data_manager_snpeff_databases" name="SnpEff Databases" version="4.0" tool_type="manage_data"> +<tool id="data_manager_snpeff_databases" name="SnpEff Databases" version="4.1.0" tool_type="manage_data"> <description>Read the list of available snpEff databases</description> <requirements> - <requirement type="package" version="4.0">snpEff</requirement> + <requirement type="package" version="4.1">snpEff</requirement> </requirements> <command interpreter="python"> data_manager_snpEff_databases.py --jar_path \$SNPEFF_JAR_PATH/snpEff.jar "$out_file"
--- a/data_manager/data_manager_snpEff_download.xml Tue Jan 13 12:54:20 2015 -0600 +++ b/data_manager/data_manager_snpEff_download.xml Wed Dec 09 13:49:55 2015 -0500 @@ -1,7 +1,7 @@ -<tool id="data_manager_snpeff_download" name="SnpEff Download" version="4.0" tool_type="manage_data"> +<tool id="data_manager_snpeff_download" name="SnpEff Download" version="4.1.0" tool_type="manage_data"> <description>Download a new database</description> <requirements> - <requirement type="package" version="4.0">snpEff</requirement> + <requirement type="package" version="4.1">snpEff</requirement> </requirements> <command interpreter="python"> data_manager_snpEff_download.py --jar_path \$SNPEFF_JAR_PATH/snpEff.jar --config \$SNPEFF_JAR_PATH/snpEff.config
--- a/repository_dependencies.xml Tue Jan 13 12:54:20 2015 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -<?xml version="1.0"?> -<repositories description="This requires the SnpEff datatype definitions."> - <repository name="snpeff_datatypes" owner="jjohnson" changeset_revision="9efd0d32fe8a" toolshed="http://testtoolshed.g2.bx.psu.edu/" /> -</repositories>
--- a/tool_dependencies.xml Tue Jan 13 12:54:20 2015 -0600 +++ b/tool_dependencies.xml Wed Dec 09 13:49:55 2015 -0500 @@ -1,7 +1,6 @@ <?xml version="1.0"?> <tool_dependency> - <package name="snpEff" version="4.0"> - <repository name="package_snpeff_4_0" owner="jjohnson" changeset_revision="4ac635fc1781" toolshed="http://testtoolshed.g2.bx.psu.edu/" /> + <package name="snpEff" version="4.1"> + <repository changeset_revision="02a5e07a4121" name="package_snpeff_4_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> </package> </tool_dependency> -