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
Roman Sarrazin-Gendron
RNABayesPairing2
Commits
0dbcd0f6
Commit
0dbcd0f6
authored
Dec 29, 2020
by
Yixiong Sun
Browse files
Small fixes
parent
c0043541
Changes
3
Hide whitespace changes
Inline
Side-by-side
bayespairing/src/draw_single_graph.py
View file @
0dbcd0f6
...
...
@@ -8,7 +8,7 @@ def draw_graph(g0, title="",node_numbers=False):
elabels
=
{}
pos
=
nx
.
circular_layout
(
g0
)
nodes
=
nx
.
draw_networkx_nodes
(
g0
,
pos
,
nodelist
=
g0
.
nodes
(),
node_color
=
'lightgrey'
,
node_size
=
500
,
linewidth
=
2
,
nodes
=
nx
.
draw_networkx_nodes
(
g0
,
pos
,
nodelist
=
g0
.
nodes
(),
node_color
=
'lightgrey'
,
node_size
=
500
,
linewidth
s
=
2
,
alpha
=
0.99
)
nodes
.
set_edgecolor
(
"black"
)
#for index, i in enumerate(list(g0.nodes(data=True))):
...
...
bayespairing/src/make_BN_from_carnaval.py
View file @
0dbcd0f6
...
...
@@ -45,7 +45,6 @@ def get_pdb_seqs(pdb_list):
def
filter_extra_seqs
(
seqs
):
good_seqs
=
[]
for
seq
in
seqs
:
if
len
(
seq
)
<
3
:
continue
seq
=
""
.
join
(
seq
)
...
...
@@ -251,10 +250,13 @@ def call_makeBN(mod,dataset,left_out, leave_out_seq = False, left_out_seq = "",
excluded
=
left_out
g_list
=
pickle
.
load
(
open
(
"../models/"
+
dataset
+
"_one_of_each_graph.cPickle"
,
'rb'
))
seq_list
=
pickle
.
load
(
open
(
"../models/"
+
dataset
+
"_sequences.pickle"
,
'rb'
))
try
:
motif_seqs
=
seq_list
[
0
][
mod
]
except
:
motif_seqs
=
seq_list
[
mod
]
if
type
(
seq_list
)
==
list
:
motif_seqs
=
seq_list
[
mod
][
0
]
else
:
try
:
motif_seqs
=
seq_list
[
0
][
mod
]
except
:
motif_seqs
=
seq_list
[
mod
]
#print("SEQUENCES",motif_seqs)
#motif_seqs = pickle.load(open("../models/"+dataset + "_sequences.pickle",'rb'))[0][mod]
...
...
bayespairing/test/4GXY.A.1.DESC
View file @
0dbcd0f6
id: 1
Bases: 0_G 1_G 2_A 3_A 4_G 20_C 21_A 22_C 23_C 40_G 41_A 42_C 60_G 61_A 62_G 63_A 64_C
Bases: 0_G 1_G 2_A 3_A 4_G 20_C 21_A 22_C 23_C 40_G 41_A 42_C
59_G
60_G 61_A 62_G 63_A 64_C
( 0_G )--- C/C - --- ( 1_G )
( 1_G )--- C/C - --- ( 2_A )
( 2_A )--- C/C - --- ( 3_A )
...
...
@@ -9,6 +9,7 @@ id: 1
( 22_C )--- C/C - --- ( 23_C )
( 40_G )--- C/C - --- ( 41_A )
( 41_A )--- C/C - --- ( 42_C )
( 59_G )--- C/C - --- ( 60_G )
( 60_G )--- C/C - --- ( 61_A )
( 61_A )--- C/C - --- ( 62_G )
( 62_G )--- C/C - --- ( 63_A )
...
...
@@ -16,6 +17,6 @@ id: 1
( 0_G )--- +/+ c --- ( 64_C )
( 4_G )--- +/+ c --- ( 20_C )
( 23_C )--- +/+ c --- ( 40_G )
( 42_C )--- +/+ c --- (
60
_G )
( 42_C )--- +/+ c --- (
59
_G )
( 3_A )--- 5/5 s --- ( 23_C )
( 4_G )--- 5/5 s --- ( 21_A )
\ No newline at end of file
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