diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/RNAmigos.iml b/.idea/RNAmigos.iml
new file mode 100644
index 0000000..8b8c395
--- /dev/null
+++ b/.idea/RNAmigos.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..ab36f53
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..0e421e4
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/data/all_ligs_maccs.p b/data/all_ligs_maccs.p
new file mode 100644
index 0000000..dbcf1a9
Binary files /dev/null and b/data/all_ligs_maccs.p differ
diff --git a/data_processor/binding_pocket_analyse.py b/data_processor/binding_pocket_analyse.py
index 16b17df..34895d3 100644
--- a/data_processor/binding_pocket_analyse.py
+++ b/data_processor/binding_pocket_analyse.py
@@ -40,14 +40,14 @@
def ligand_center(residue):
return np.mean(np.array([atom.coord for atom in residue.get_atoms()]), axis=0)
-def _is_valid_ligand(ligand_residue):
+def is_valid_ligand(ligand_residue):
#no ions
invalids = ['HOH', 'NCO', 'SO4', 'EPE', 'OHX', 'MPD']
if ligand_residue.resname in invalids or len(ligand_residue.resname) != 3:
return False
return True
-def is_valid_ligand(ligand_residue):
+def _is_valid_ligand(ligand_residue):
#no ions
return ligand_residue.resname.strip() == 'MG'
diff --git a/data_processor/build_dataset.py b/data_processor/build_dataset.py
index 869d32c..af9c76e 100644
--- a/data_processor/build_dataset.py
+++ b/data_processor/build_dataset.py
@@ -16,10 +16,10 @@
from tqdm import tqdm
from tools.drawing import rna_draw
-from data_processor.pocket_grid import sample_non_binding_sites
+#from data_processor.pocket_grid import sample_non_binding_sites
from data_processor.rna_classes import *
from data_processor.graph_process import *
-from data_processor.marker_file import *
+#from data_processor.marker_file import *
faces = ['W', 'S', 'H']
orientations = ['C', 'T']
diff --git a/data_processor/graph_process.py b/data_processor/graph_process.py
index b77a4ba..f27b620 100644
--- a/data_processor/graph_process.py
+++ b/data_processor/graph_process.py
@@ -49,16 +49,16 @@ def to_orig(G):
# remove_non_standard_edges(G)
H = nx.Graph()
for n1, n2, d in G.edges(data=True):
- label = symmetric(d['label'])
- if label in valid_edges:
- H.add_edge(n1, n2, label=label)
+ label = symmetric(d['LW'])
+ if label.upper() in valid_edges:
+ H.add_edge(n1, n2, label=label.upper())
#add pdb position and nt to node data
- d_orig = {n:d['nucleotide'].pdb_pos for n,d in G.nodes(data=True)}
+ d_orig = {n: d['nt_resnum'] for n, d in G.nodes(data=True)}
nx.set_node_attributes(H, {n:d_orig[n] for n in H.nodes()}, 'pdb_pos')
- d_orig = {n:d['nucleotide'].nt for n,d in G.nodes(data=True)}
+ d_orig = {n: d['nt_code'] for n, d in G.nodes(data=True)}
nx.set_node_attributes(H, {n:d_orig[n] for n in H.nodes()}, 'nt')
- d_orig = {n:n[0] for n,d in G.nodes(data=True)}
+ d_orig = {n: n.split('.')[1] for n, d in G.nodes(data=True)}
nx.set_node_attributes(H, {n:d_orig[n] for n in H.nodes()}, 'chain')
return H
@@ -123,7 +123,7 @@ def graph_ablations(G, mode):
def find_node(graph, chain, pos):
for n,d in graph.nodes(data=True):
- if (n[0] == chain) and (d['nucleotide'].pdb_pos == str(pos)):
+ if (n.split('.')[1] == chain) and (str(d['nt_resnum']) == str(pos)):
return n
return None
@@ -167,7 +167,7 @@ def dangle_trim(G):
"""
Recursively remove dangling nodes from graph.
"""
- is_backbone = lambda n,G: sum([G[n][nei]['label'] != 'B53' for nei in G.neighbors(n)]) == 0
+ is_backbone = lambda n, G: sum([G[n][nei]['LW'] != 'B53' for nei in G.neighbors(n)]) == 0
degree = lambda i, G, nodelist: np.sum(nx.to_numpy_matrix(G, nodelist=nodelist)[i])
cur_G = G.copy()
while True: