diff --git a/CHANGELOG.md b/CHANGELOG.md index 52806b5c..c51eb390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,18 @@ # Changelog for mokapot -## [Unreleased] +## [0.7.2] - 2021-07-16 +### Added +- `--keep_decoys` option to the command line interface. Thanks @jspaezp! +- Notes about setting a random seed to the Python API documentation. (Issue #30) +- Added more information about peptides that couldn't be mapped to proteins. (Issue #29) + +### Fixed +- Loading a saved model with `mokapot.load_model()` would fail because of an + update to Pandas that introduced a new exception. We've updated mokapot + accordingly. + ### Changed -- Updates to unit tests. +- Updates to unit tests. Warnings are now treated as errors for system tests. ## [0.7.1] - 2021-03-22 ### Changed diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst index 021fe0aa..f31d4a74 100644 --- a/docs/source/api/index.rst +++ b/docs/source/api/index.rst @@ -1,3 +1,4 @@ + Python API ========== @@ -22,6 +23,20 @@ Alternatively, PSMs that are already represented in a Finally, custom machine learning models can be created using the :py:class:`mokapot.model.Model` class. +.. note:: + + Set your NumPy random seed to ensure reproducibility: + + .. code-block:: + + import numpy as np + np.random.seed(42) + + In a future release, we will update mokapot to use the `new NumPy random + sampling API + `_. + + .. toctree:: :maxdepth: 1 :hidden: diff --git a/mokapot/picked_protein.py b/mokapot/picked_protein.py index 0f2af318..ed861c00 100644 --- a/mokapot/picked_protein.py +++ b/mokapot/picked_protein.py @@ -88,19 +88,19 @@ def picked_protein( if shared_unmatched: LOGGER.debug("%s", unmatched_prots.loc[~shared, "stripped sequence"]) - if shared_unmatched / len(prots) > 0.10: - raise ValueError( - "Fewer than 90% of all peptides could be matched to proteins. " - "Verify that your digest settings are correct." - ) - LOGGER.warning( "%i out of %i peptides could not be mapped. " - "Check your digest settings.", + "Please check your digest settings.", shared_unmatched, len(prots), ) + if shared_unmatched / len(prots) > 0.10: + raise ValueError( + "Fewer than 90% of all peptides could be matched to proteins. " + "Please verify that your digest settings are correct." + ) + # Verify that reasonable number of decoys were matched. if proteins.has_decoys: num_unmatched_decoys = unmatched_prots[target_column][~shared].sum()