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_server
Commits
fb9dda3a
Commit
fb9dda3a
authored
Jun 17, 2020
by
Carlos GO
Browse files
clean nuc parse
parent
f421e498
Changes
1
Hide whitespace changes
Inline
Side-by-side
pdb2fr3d.py
View file @
fb9dda3a
...
...
@@ -32,12 +32,11 @@ def parse_fr3d(fr3d_path, pdb_path):
chain_1
,
pos_1
,
nuc_1
=
base_1
.
split
(
"_"
)[
1
:]
chain_2
,
pos_2
,
nuc_2
=
base_2
.
split
(
"_"
)[
1
:]
label
=
label
.
upper
().
strip
()[
1
:
-
1
]
print
(
label
,
VALID_EDGES
,
label
in
VALID_EDGES
)
if
label
in
VALID_EDGES
:
label
=
label
[
0
]
+
""
.
join
(
sorted
(
label
[
1
:]))
G
.
add_edge
((
chain_1
,
pos_1
),
(
chain_2
,
pos_2
),
label
=
label
)
nucs
[(
chain_1
,
str
(
pos_1
))]
=
nuc_1
.
strip
()
nucs
[(
chain_2
,
str
(
pos_2
))]
=
nuc_2
.
strip
()
nucs
[(
chain_1
,
str
(
pos_1
))]
=
nuc_1
[
0
]
.
strip
()
nucs
[(
chain_2
,
str
(
pos_2
))]
=
nuc_2
[
0
]
.
strip
()
nx
.
set_node_attributes
(
G
,
nucs
,
'nt'
)
# use BioPython to fill in the backbones
...
...
@@ -92,5 +91,6 @@ def get_graph(pdb_path):
if
__name__
==
"__main__"
:
# get_graph("static/samples/1aju.cif")
get_graph
(
"/home/www/rnabayespairing/static/samples/1aju.cif"
)
# get_graph("/home/www/rnabayespairing/static/samples/1aju.cif")
parse_fr3d
(
"1aju.csv"
,
""
)
pass
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