Commit b510bcf1 authored by Carlos GO's avatar Carlos GO
Browse files

GED readme

parent 5b22353a
......@@ -17,3 +17,35 @@ Data used for training, models and binding pocket visualizations available [here
* Networkx 2.1+
* BioPython
## Installing
## Sample Usage
## Building Pocket Graph Dataset
## Pocket Graph Drawing
## Computing GED
For a pair of graphs.
```python
>>> from RNAmigos import ged
>>> G = nx.read_gpickle('../Data/sample_graphs/3ds7_GNG_P.nxpickle')
>>> H = nx.read_gpickle('../Data/sample_graphs/3skt_GNG_L.nxpickle')
>>> graphs = (G, H) #graphs currently need to be pased as single argument for multiprocessing.
>>> aln, (G, H), time = ged(graphs)
>>> aln.cost # get distance
16
>>> aln.source_map #get node mapping
{('B', 8): ('A', 7), ('B', 9): ('A', 8), ('B', 59): ('A', 61), ('B', 7): ('A', 6), ('B', 10): ('A', 9), ('B', 37): ('A', 38), ('B', 60): ('A', 62), ('B', 31): ('A', 32), 'NILL': ('A', 37)}
```
## Graph Embedding
## Fingerprint Prediction
......@@ -94,7 +94,7 @@ def edge_edit_cost(u,v, g1, g2, node, indel_cost=4, sub_cost=1, ss_break_cost=2)
cost = sub_cost
if 'B53' in (l1, l2):
cost = sys.maxsize
if l1 == 'CWW' != l2 'CWW':
if 'CWW' in (l1, l2):
cost = ss_break_cost
elif e1 not in g1.edges and e2 in g2.edges:
#edge insert+ion
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment