Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Louis BECQUEY
/
RNANet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Louis BECQUEY
2020-08-12 04:44:12 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3b5ed451d74419cfdc7bdaa4489364e8b1ae4d78
3b5ed451
1 parent
a4b2c505
solved issue if duplicate nt_resnum at the end of the chain
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
RNAnet.py
RNAnet.py
View file @
3b5ed45
...
...
@@ -273,7 +273,8 @@ class Chain:
if
self
.
mapping
is
not
None
:
self
.
mapping
.
log
(
f
"Shifting nt_resnum numbering because of {n_dup} duplicate residues {df.iloc[i,1]}"
)
if
df
.
iloc
[
i
,
1
]
==
df
.
iloc
[
i
-
1
,
1
]
and
df
.
iloc
[
index_last_dup
+
1
,
1
]
-
1
>
df
.
iloc
[
index_last_dup
,
1
]:
try
:
if
i
>
0
and
index_last_dup
+
1
<
len
(
df
.
index
)
and
df
.
iloc
[
i
,
1
]
==
df
.
iloc
[
i
-
1
,
1
]
and
df
.
iloc
[
index_last_dup
+
1
,
1
]
-
1
>
df
.
iloc
[
index_last_dup
,
1
]:
# The redundant nts are consecutive in the chain (at the begining at least), and there is a gap at the end
if
duplicates
.
iloc
[
n_dup
-
1
,
0
]
-
duplicates
.
iloc
[
0
,
0
]
+
1
==
n_dup
:
...
...
@@ -299,6 +300,12 @@ class Chain:
# Solution : set nt_resnum[i] to nt_resnum[i-1] + 1, and shift the following by 1.
df
.
iloc
[
i
,
1
]
=
1
+
df
.
iloc
[
i
-
1
,
1
]
df
.
iloc
[
i
+
1
:,
1
]
+=
1
except
:
warn
(
f
"Error with parsing of {self.chain_label} duplicate residue numbers. Ignoring it."
)
self
.
delete_me
=
True
self
.
error_messages
=
f
"Error with parsing of duplicate residues numbers."
return
None
# Search for ligands at the end of the selection
# Drop ligands detected as residues by DSSR, by detecting several markers
...
...
Please
register
or
login
to post a comment