Skip to content

Instantly share code, notes, and snippets.

PDBe-KB

Note: this gist is heavily based on materials provided by organizers of the Mining PDBe and PDBe-KB Using a Graph Database workshop.

Why graph DB?

Graph DBs are much more useful for representing unstructured, sparse data and relationships than conventional relational DBs.

Graph is a structure that models pairwise relations between objects:

  • consists of nodes (vertices), edges (relationships) and properties (attributes):
    • nodes represent entities
    • edges encode connections between nodes
@abhik1368
abhik1368 / dbtest.csv
Created November 16, 2022 00:46
molecule_maccs
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 167. in line 1.
DrugBank_ID MACCS
DB07361 ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '0', '0', '0', '1', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '1', '1', '0', '0', '1', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '0', '1', '1', '1', '1', '1', '0', '0', '1', '1', '0', '0', '0', '0', '0', '1', '1', '0', '1', '1', '0', '0', '0', '1', '0', '0', '0', '0', '0', '1', '0', '1', '1', '1', '0', '1', '0', '0', '0', '0', '1', '0', '0', '1', '0', '1', '0', '0', '0', '1', '0', '1', '1', '1', '1', '0', '1', '0', '0', '1', '1', '1', '1', '1', '0']
DB13157 ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abhik1368
abhik1368 / cdk.txt
Created August 21, 2023 00:25
cdk file
CC(C)C(=O)COc1nc(N)nc2[nH]cnc12 ZINC03814457
Nc1nc(OC[C@@H]2CCCO2)c2nc[nH]c2n1 ZINC03814459
Nc1nc(OC[C@H]2CCC(=O)N2)c2nc[nH]c2n1 ZINC03814460
Nc1nc(OCC2CCCCC2)c2nc[nH]c2n1 ZINC00023543
Nc1nc(OC[C@@H]2CC=CCC2)c2nc[nH]c2n1 ZINC03814458
Cn1cnc2c(NCc3ccccc3)nc(NCCO)nc21 ZINC01641925
CC[C@H](CO)Nc1nc(NCc2ccccc2)c2ncn(C(C)C)c2n1 ZINC01649340
COc1ccc(CNc2nc(N(CCO)CCO)nc3c2ncn3C(C)C)cc1 ZINC01487345
Nc1nc(N)c(N=O)c(OCC2CCCCC2)n1 ZINC03814479
COc1ccc2c(c1)/C(=C/c1cnc[nH]1)C(=O)N2 ZINC03814467