# HG changeset patch # User jjohnson # Date 1449686995 18000 # Node ID a329eda0cdff7fd16361c9f82f6adad84f79eb02 # Parent 78bcf4ac437cd31fcf1ecb74dcf6b1a83273e999 Uploaded diff -r 78bcf4ac437c -r a329eda0cdff data_manager/data_manager_snpEff_databases.py --- 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: diff -r 78bcf4ac437c -r a329eda0cdff data_manager/data_manager_snpEff_databases.xml --- 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 @@ - + Read the list of available snpEff databases - snpEff + snpEff data_manager_snpEff_databases.py --jar_path \$SNPEFF_JAR_PATH/snpEff.jar "$out_file" diff -r 78bcf4ac437c -r a329eda0cdff data_manager/data_manager_snpEff_download.xml --- 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 @@ - + Download a new database - snpEff + snpEff data_manager_snpEff_download.py --jar_path \$SNPEFF_JAR_PATH/snpEff.jar --config \$SNPEFF_JAR_PATH/snpEff.config diff -r 78bcf4ac437c -r a329eda0cdff repository_dependencies.xml --- 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 @@ - - - - diff -r 78bcf4ac437c -r a329eda0cdff tool_dependencies.xml --- 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 @@ - - + + -