Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
0d6c6b87
Commit
0d6c6b87
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
Revert "make AttachView stricter"
parent
dbfa3edc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/seq/base/doc/seq.rst
+0
-6
0 additions, 6 deletions
modules/seq/base/doc/seq.rst
modules/seq/base/src/impl/sequence_impl.cc
+3
-19
3 additions, 19 deletions
modules/seq/base/src/impl/sequence_impl.cc
with
3 additions
and
25 deletions
modules/seq/base/doc/seq.rst
+
0
−
6
View file @
0d6c6b87
...
@@ -322,12 +322,6 @@ an alignment:
...
@@ -322,12 +322,6 @@ an alignment:
Attach the given view to the sequence at index `seq_index`.
Attach the given view to the sequence at index `seq_index`.
The method now checks for agreement of the one letter code in the structure
and the character in the sequence. If there is a mismatch, AttachView throws
an IntegrityError telling you where in the sequence the problem was
detected. The one letter code of the residue and the character in the
sequence agree, if either one of the is X or they are identical.
.. method:: Cut(start, end)
.. method:: Cut(start, end)
Removes the columns in the half-closed interval `start`, `end` from the
Removes the columns in the half-closed interval `start`, `end` from the
...
...
This diff is collapsed.
Click to expand it.
modules/seq/base/src/impl/sequence_impl.cc
+
3
−
19
View file @
0d6c6b87
...
@@ -233,26 +233,10 @@ mol::EntityView SequenceImpl::GetAttachedView() const
...
@@ -233,26 +233,10 @@ mol::EntityView SequenceImpl::GetAttachedView() const
void
SequenceImpl
::
AttachView
(
const
mol
::
EntityView
&
view
)
void
SequenceImpl
::
AttachView
(
const
mol
::
EntityView
&
view
)
{
{
static
const
char
*
msg_1
=
"Expected 1 chain, but %d chains found"
;
static
const
char
*
msg
=
"Expected 1 chain, but %d chains found"
;
if
(
view
.
IsValid
()
&&
view
.
GetChainCount
()
!=
1
)
{
throw
IntegrityError
(
str
(
format
(
msg_1
)
%
view
.
GetChainCount
()));
}
attached_view_
=
view
;
attached_view_
=
view
;
if
(
!
attached_view_
.
IsValid
())
{
if
(
view
.
IsValid
()
&&
attached_view_
.
GetChainCount
()
!=
1
)
{
return
;
throw
IntegrityError
(
str
(
format
(
msg
)
%
attached_view_
.
GetChainCount
()));
}
for
(
size_t
i
=
0
;
i
<
seq_string_
.
size
();
++
i
)
{
if
(
mol
::
ResidueView
res
=
this
->
GetResidue
(
i
))
{
char
olc1
=
res
.
GetOneLetterCode
();
char
olc2
=
seq_string_
[
i
];
if
(
olc1
!=
'X'
&&
olc2
!=
'X'
&&
olc1
!=
olc2
)
{
std
::
stringstream
ss
;
ss
<<
"One letter code of residue and sequence does not agree "
"at position "
<<
i
<<
" in sequence ("
<<
res
.
GetOneLetterCode
()
<<
"!="
<<
seq_string_
[
i
]
<<
")"
;
throw
IntegrityError
(
ss
.
str
());
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment