Skip to content
Snippets Groups Projects
Commit 35a7588a authored by Nicolas  MAILLET's avatar Nicolas MAILLET
Browse files

Adaptive precision for masses

parent d421a6be
No related branches found
No related tags found
No related merge requests found
Pipeline #132414 failed
=========
CHANGELOG
=========
- `2.0.4 <https://gitlab.pasteur.fr/nmaillet/rpg/-/releases/2.0.4>`_
Modify precision of masses:
- 4 digits precision with average masses (default)
- 9 digits precision with monoisotopic masses
- `2.0.3 <https://gitlab.pasteur.fr/nmaillet/rpg/-/releases/2.0.3>`_
Tested on Python 3.12
......
......@@ -26,7 +26,7 @@ author = 'Nicolas Maillet'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '2.0.3'
release = '2.0.4'
# -- General configuration ---------------------------------------------------
......
......@@ -333,7 +333,7 @@ Then, on the next line:
- Peptide sequence
Peptide molecular weight approximation is computed as the addition of average isotopic masses of each amino acid present in the peptide. Then the average isotopic mass of one water molecule is added to it. Molecular weight values are given in Dalton (Da). It does not take into consideration any digestion-induced modifications.
Peptide molecular weight approximation is computed as the addition of average isotopic masses of each amino acid present in the peptide. Then the average isotopic mass of one water molecule is added to it. Molecular weight values are given in Dalton (Da). It does not take into consideration any digestion-induced modifications. Masses are either 4 digits precision (average masses) or 9 digits precision (monoisotopic masses).
The isoelectric point is computed by solving Henderson–Hasselbalch equation using binary search. It is based on Lukasz P. Kozlowski work (http://isoelectric.org/index.html).
......@@ -341,9 +341,9 @@ The default output is in multi-fasta format. The header then summarizes all this
.. code-block:: shell
>Input_0_Asp-N_3_3_419.43738_5.54
>Input_0_Asp-N_3_3_419.4373_5.54
QWS
>Input_1_Asp-N_8_5_742.78688_4.16
>Input_1_Asp-N_8_5_742.7868_4.16
...
we can see that a sequence was directly inputed in **RPG** `(Input)`, the first peptide `(0)` was obtained with `Asp-N` and this enzyme cleaved after the `3rd` amino acid in the original sequence. The peptide has a size of `3` amino acids, a molecular weight estimated at `419.43738` Da and a theoretical isoelectric point of `5.54`. The full sequence is then written `(QWS)`. The output of the remaining peptides follows in the same format.
......
......@@ -29,9 +29,9 @@
necessary functions
"""
__version_info__ = ('2', '0', '3')
__version_info__ = ('2', '0', '4')
__version__ = '.'.join(__version_info__)
__revision_date__ = "2023-12-18"
__revision_date__ = "2024-06-11"
__author__ = "Nicolas Maillet"
import argparse
......
......@@ -69,7 +69,7 @@ class Peptide:
tmp_mass = water_mass
for i in sequence:
tmp_mass += aa_mass[i]
self.mass = round(tmp_mass, 5) # mass of the peptide
self.mass = round(tmp_mass, len(str(aa_mass["A"]).split(".")[1])) # mass of the peptide
self.p_i = self.get_isoelectric_point()
# self representation for print
......
......@@ -36,7 +36,7 @@ setup(
# For a discussion on single-sourcing the version across setup.py and the
# project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='2.0.3', # Required
version='2.0.4', # Required
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment