Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Carlos GO
RNAmigos
Commits
b510bcf1
Commit
b510bcf1
authored
Nov 09, 2018
by
Carlos GO
Browse files
GED readme
parent
5b22353a
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
b510bcf1
...
...
@@ -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
RNAmigos/ged.py
View file @
b510bcf1
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment