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
47d9629d
Commit
47d9629d
authored
5 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
Tried to clarify AlignToSEQRES behaviour.
parent
db090055
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/seq/alg/pymod/__init__.py
+16
-14
16 additions, 14 deletions
modules/seq/alg/pymod/__init__.py
with
16 additions
and
14 deletions
modules/seq/alg/pymod/__init__.py
+
16
−
14
View file @
47d9629d
...
...
@@ -3,13 +3,15 @@ from ost.seq.alg.mat import *
def
ValidateSEQRESAlignment
(
aln
,
chain
=
None
):
"""
Checks a sequence aligned to a SEQRES sequence to be free of strand breaks.
Residues divided by gaps are not considered as breakage but may also not be
connected.
Checks if sequence in alignment has same connectivity as residues in chain.
This looks for connected stretches in both the sequence and the chain and
returns False if they don
'
t match. This uses the connectivity of the protein
backbone.
:param aln: Alignment
:param aln: Alignment of two sequences with second one expected to map to
residues in *chain*.
:type aln: :class:`~ost.seq.AlignmentHandle`
:param chain: Source of the sequence
:param chain: Source of the sequence
.
:type chain: :class:`~ost.mol.ChainHandle`
:returns: True if all residues (beside gapped ones) are connected, False
...
...
@@ -66,20 +68,20 @@ def AlignToSEQRES(chain, seqres, try_resnum_first=False, validate=True):
SEQRES. If there are any additional residues in the chain, the function
raises a ValueError.
If
'
try_resnum_first
'
is set, building the alignment following residue numbers
is tried first.
If
'
validate
'
is set (default), the alignment is checked using
:func:`~ost.seq.alg.ValidateSEQRESAlignment`.
:param chain: Source of the sequence
:type chain: :class:`~ost.mol.ChainHandle`
:param seqres: SEQRES sequence
:type seqres: :class:`str`
:param try_resnum_first: Try to align by residue number
:param try_resnum_first: If set to True, this first builds an alignment using
residue numbers and checks if the one-letter-codes
match. If they all match, this alignment is used
(and possibly validated). Otherwise, it displays a
warning and falls back to the connectivity-based
alignment.
:type try_resnum_first: :class:`bool`
:param validate: Validate alignment by
:func:`~ost.seq.alg.ValidateSEQRESAlignment`
:param validate: If set to True, the alignment is additionally checked by
:func:`~ost.seq.alg.ValidateSEQRESAlignment` and raises
a ValueError if the validation failed.
:type validate: :class:`bool`
:returns: The alignment of the residues in the chain and the SEQRES entries.
...
...
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