"Connected to TCRD database {} (schema ver {}; data ver {})".format( args['--dbname'], dbi['schema_ver'], dbi['data_ver'])) if not args['--quiet']: print("Connected to TCRD database {} (schema ver {}; data ver {})". format(args['--dbname'], dbi['schema_ver'], dbi['data_ver'])) # for the time being, this has to be done manually because Lars is forcing https # -SLM 20210227 #print("\nDownloading new JensenLab files...") #download_pmscores(args) #download_DISEASES(args) start_time = time.time() print("\nUpdating JensenLab PubMed Text-mining Scores...") # delete existing pmscores rv = dba.del_all_rows('pmscore') if type(rv) == int: print(f" Deleted {rv} rows from pmscore") else: print(f"Error deleting rows from pmscore. Exiting.") exit(1) # set all existing 'JensenLab PubMed Score' TDL Infos to zero # This is so we don't have to redo inserting zero values for proteins with no score rv = dba.upd_pmstdlis_zero() if type(rv) == int: print( f" Reset {rv} 'JensenLab PubMed Score' tdl_info values to zero.") else: print( f"Error updating 'JensenLab PubMed Score' tdl_info values. Exiting." )
dba = DBAdaptor(dba_params) dbi = dba.get_dbinfo() logger.info("Connected to TCRD database {} (schema ver {}; data ver {})".format(args['--dbname'], dbi['schema_ver'], dbi['data_ver'])) if not args['--quiet']: print("Connected to TCRD database {} (schema ver {}; data ver {})".format(args['--dbname'], dbi['schema_ver'], dbi['data_ver'])) print("\nDownloading update files...") download_pmscores(args) download_DISEASES(args) download_mentions(args) download_do(args) start_time = time.time() print("\nUpdating JensenLab PubMed Text-mining Scores...") # delete existing pmscores rv = dba.del_all_rows(pmscore) if type(rv) == int: print(f" Deleted {rv} rows from pmscore") else: print(f"Error deleting rows from pmscore... Exiting.") exit(1) # delete 'JensenLab PubMed Score' TDL Infos rv = dba.del_tdl_infos('JensenLab PubMed Score') if type(rv) == int: print(f" Deleted {rv} 'JensenLab PubMed Score' tdl_info rows") else: print(f"Error deleting 'JensenLab PubMed Score' tdl_info rows. Exiting.") exit(1) # load new pmsores and TDL Infos load_pmscores(args, dba, logger, logfile) # update dataset