Psql error
Hi @oguitart
When I run the following function:
def fetch_drug_gene_correlations():
cmd = '''
SELECT t1.drug_id, t2.gene_name, t1.estimate, t1.pvalue
FROM gene_drugs t1, genes t2
WHERE t1.gene_id = t2.gene_id
AND t1.pvalue < 0.01
AND t1."mDataType" = 'mRNA'
'''
R = psql.qstring(cmd, db_name)
return R
I get this error:
2019-05-21 08:48:41,180 chemicalchecker.util.config.config.Config [DEBUG ] Loading config from: /aloy/home/mduran/cc_config.json
2019-05-21 08:48:41,258 [ pre-process D2.002 ] [DEBUG ] Running preprocess for dataset D2.002. Saving output in sign0.h5
2019-05-21 08:48:41,258 [ pre-process D2.002 ] [INFO ] Fitting
2019-05-21 08:48:41,258 chemicalchecker.util.config.config.Config [DEBUG ] Loading config from: /aloy/home/mduran/cc_config.json
2019-05-21 08:48:41,674 chemicalchecker.util.config.config.Config [DEBUG ] Loading config from: /aloy/home/mduran/cc_config.json
Traceback (most recent call last):
File "/aloy/home/mduran/myscripts/chemical_checker/package/scripts/preprocess/D2.002/run.py", line 124, in <module>
main(sys.argv[1:])
File "/aloy/home/mduran/myscripts/chemical_checker/package/scripts/preprocess/D2.002/run.py", line 75, in main
R = fetch_drug_gene_correlations()
File "/aloy/home/mduran/myscripts/chemical_checker/package/scripts/preprocess/D2.002/run.py", line 41, in fetch_drug_gene_correlations
R = psql.qstring(cmd, db_name)
File "/aloy/home/mduran/myscripts/chemical_checker/package/chemicalchecker/util/psql/psql.py", line 39, in qstring
con = get_connection(dbname=dbname)
File "/aloy/home/mduran/myscripts/chemical_checker/package/chemicalchecker/util/psql/psql.py", line 24, in get_connection
conn_dict.pop('uniprot_db_version')
KeyError: 'uniprot_db_version'