diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c6d894f79d45193142649411d4416724f5669044..eabe21a1b248c308b80807f04bae46ec8d7cfca2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ ========= 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 diff --git a/docs/conf.py b/docs/conf.py index ca44c9bcc5e81d82749e378151a2708014e2b81f..7485b6de41b1f94d58d0bd86357c0ecdc11a8aa3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 --------------------------------------------------- diff --git a/docs/userguide.rst b/docs/userguide.rst index 3a759d8d4ac320cd1c076e4d78a5caac8e3e6927..bffed9206299fdfd215e7fcfd0705562d3ffd85e 100644 --- a/docs/userguide.rst +++ b/docs/userguide.rst @@ -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. diff --git a/rpg/RapidPeptidesGenerator.py b/rpg/RapidPeptidesGenerator.py index cb22ec6bc35e8becda594b5801a758f8f711691e..4609153c6872baf2c8a111f1e1465b222836c325 100644 --- a/rpg/RapidPeptidesGenerator.py +++ b/rpg/RapidPeptidesGenerator.py @@ -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 diff --git a/rpg/sequence.py b/rpg/sequence.py index 3231134b7dfde2557891ef21bb8837a1909be439..374445c41da526f3303d8be5f5a11b1108ac98a1 100644 --- a/rpg/sequence.py +++ b/rpg/sequence.py @@ -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 diff --git a/setup.py b/setup.py index d68354b6c6da2ee97442cb19efcb388b3e222d16..421933a04eb9d060cd00421ca0d0aa808dbeeae5 100644 --- a/setup.py +++ b/setup.py @@ -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: