Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Larralde
peptides.py
Commits
2dfc146c
Commit
2dfc146c
authored
Oct 23, 2021
by
Martin Larralde
Browse files
Add a docstring to the `Peptide.__init__` method
parent
6f01cfbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
peptides/__init__.py
View file @
2dfc146c
...
...
@@ -118,6 +118,13 @@ class ZScales(typing.NamedTuple):
class
Peptide
(
typing
.
Sequence
[
str
]):
"""A sequence of amino acids.
Attributes:
sequence (`str`): The peptide primary sequence, encoded in the IUPAC
one-letter code.
"""
# --- Class constants ----------------------------------------------------
...
...
@@ -196,6 +203,15 @@ class Peptide(typing.Sequence[str]):
# --- Magic methods ------------------------------------------------------
def
__init__
(
self
,
sequence
:
str
)
->
None
:
"""Create a new peptide object with the given sequence.
Arguments:
sequence (`str`): A sequence of amino acids encoded with the
IUPAC one-letter code. Non-standard (*B*, *Z*, *J*) and
unknown (*X*) residues are supported in some methods, but
not all of them.
"""
self
.
sequence
:
str
=
sequence
def
__len__
(
self
)
->
int
:
...
...
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