Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Larralde
peptides.py
Commits
4908db59
Commit
4908db59
authored
Oct 23, 2021
by
Martin Larralde
Browse files
Fix build of documentation in ReadTheDocs environment
parent
edc1eafd
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/api.rst
View file @
4908db59
API Reference
=============
.. autoclass:: peptides.Peptide
Peptide
-------
.. autoclass:: peptides.Peptide(Sequence[str])
:special-members: __init__
:members:
Descriptors
-----------
.. autoclass:: peptides.BLOSUMIndices
.. autoclass:: peptides.CrucianiProperties
.. autoclass:: peptides.FasgaiVectors
.. autoclass:: peptides.KideraFactors
.. autoclass:: peptides.MSWHIMScores
.. autoclass:: peptides.ProtFPDescriptors
.. autoclass:: peptides.STScales
.. autoclass:: peptides.TScales
.. autoclass:: peptides.VHSEScales
.. autoclass:: peptides.ZScales
docs/conf.py
View file @
4908db59
...
...
@@ -10,6 +10,7 @@ import configparser
import
datetime
import
os
import
sys
import
types
import
re
import
shutil
import
semantic_version
...
...
@@ -25,6 +26,11 @@ docssrc_dir = os.path.dirname(os.path.abspath(__file__))
project_dir
=
os
.
path
.
dirname
(
docssrc_dir
)
sys
.
path
.
insert
(
0
,
project_dir
)
# Mock dynamically generated Python files so that we can build the documentation
# without having build these files first (e.g on ReadTheDocs)
sys
.
modules
[
'peptides.data.tables'
]
=
types
.
ModuleType
(
'peptides.data.tables'
)
sys
.
modules
[
'peptides.data.lut'
]
=
types
.
ModuleType
(
'peptides.data.lut'
)
# -- Sphinx Setup ------------------------------------------------------------
...
...
@@ -37,6 +43,7 @@ def setup(app):
# -- Project information -----------------------------------------------------
import
peptides
# extract the project metadata from the module itself
...
...
peptides/__init__.py
View file @
4908db59
...
...
@@ -117,7 +117,7 @@ class ZScales(typing.NamedTuple):
z5
:
float
class
Peptide
(
object
):
class
Peptide
(
typing
.
Sequence
[
str
]
):
# --- Class constants ----------------------------------------------------
...
...
@@ -150,26 +150,26 @@ class Peptide(object):
organism, or using k-mer shuffling.
Arguments:
length (`int`): The desired length for the generated peptide.
frequencies (`str`): The name of the amino-acid frequency table
to use: either *KingJukes* to use the amino-acid frequencies
for vertebrate organisms reported in King & Jukes (1969),
or *SwissProt2021* to use the amino-acid frequencies in all
the proteins from the January 2021 release of SwissProt.
length (`int`): The desired length for the generated peptide.
frequencies (`str`): The name of the amino-acid frequency table
to use: either *KingJukes* to use the amino-acid frequencies
for vertebrate organisms reported in King & Jukes (1969),
or *SwissProt2021* to use the amino-acid frequencies in all
the proteins from the January 2021 release of SwissProt.
Returns:
`~peptides.Peptide`: A new peptide. The first amino-acid will
always be a Methionine for biological accuracy.
References:
- King, J. L., and T. H. Jukes.
*Non-Darwinian Evolution*.
Science. May 1969;164(3881):788–98.
doi:10.1126/science.164.3881.788. PMID:5767777.
- The UniProt Consortium.
*UniProt: The Universal Protein Knowledgebase in 2021*.
Nucleic Acids Research. Jan 2021;49(D1):D480–89.
doi:10.1093/nar/gkaa1100. PMID:33237286.
- King, J. L., and T. H. Jukes.
*Non-Darwinian Evolution*.
Science. May 1969;164(3881):788–98.
doi:10.1126/science.164.3881.788. PMID:5767777.
- The UniProt Consortium.
*UniProt: The Universal Protein Knowledgebase in 2021*.
Nucleic Acids Research. Jan 2021;49(D1):D480–89.
doi:10.1093/nar/gkaa1100. PMID:33237286.
"""
table
=
tables
.
AA_FREQUENCIES
.
get
(
frequencies
)
...
...
Write
Preview
Supports
Markdown
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