Michał Nowotka
ChEMBL Group
EMBL-EBI
SQL is the Fortran of databases - nobody likes it much, the language is ugly and ad hoc, every database supports it, and we all use it.
-- John Levine. Flex & Bison: text processing tools
Retrieve all the compounds which have an IC50 bioactivity value in nM:
MoleculeDictionary.objects.filter(activities__standard_type='IC50',
activities__standard_units='nM')
SELECT DISTINCT md.molregno,
md.chembl_id,
act.standard_type,
act.standard_value,
act.standard_units
FROM activities act,
molecule_dictionary md
WHERE act.molregno = MD.molregno
AND act.standard_type = 'IC50'
AND act.standard_units = 'nM';
python manage.py migrate --source=ora --target=pg
python manage.py reverseEngineer --database=myDB
Questions?