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
1ad2a162
Commit
1ad2a162
authored
Jun 17, 2020
by
Carlos GO
Browse files
pos str
parent
4cf80f1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
pdb2fr3d.py
View file @
1ad2a162
...
...
@@ -36,8 +36,8 @@ def parse_fr3d(fr3d_path, pdb_path):
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
,
pos_1
)]
=
nuc_1
nucs
[(
chain_2
,
pos_2
)]
=
nuc_2
nucs
[(
chain_1
,
str
(
pos_1
)]
=
nuc_1
nucs
[(
chain_2
,
str
(
pos_2
)]
=
nuc_2
nx
.
set_node_attributes
(
G
,
nucs
,
'nt'
)
# use BioPython to fill in the backbones
...
...
@@ -48,8 +48,9 @@ def parse_fr3d(fr3d_path, pdb_path):
for
i
,
residue
in
enumerate
(
reslist
):
if
i
==
0
:
continue
r1
=
(
chain
.
id
,
residue
.
id
[
1
])
r2
=
(
chain
.
id
,
reslist
[
i
-
1
].
id
[
1
])
r1
=
(
chain
.
id
,
str
(
residue
.
id
[
1
]))
r2
=
(
chain
.
id
,
str
(
reslist
[
i
-
1
].
id
[
1
]))
print
(
r1
,
r2
)
try
:
G
[
r1
]
G
[
r2
]
...
...
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