florian-huber: Thanks Juriaan for the review!
diff --git a/.zenodo.json b/.zenodo.json
index 41fa3ac7..74921c46 100644
--- a/.zenodo.json
+++ b/.zenodo.json
@@ -54,6 +54,11 @@
          "affiliation": "University of Glasgow", 
          "name": "Villanueva Castilla, Efrain Manuel", 
          "orcid": "0000-0001-7665-3575"
+      },
+      {
+         "affiliation": "University of Glasgow", 
+         "name": "Ashouritaklimi, Kianoosh", 
+         "orcid": "0000-0001-6317-3193"
       }
    ], 
    "description": "Python library for fuzzy comparison of mass spectrum data and other Python objects", 
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c5a1e00..d675c629 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Added
+
+- Four new peak filtering functions [#119](https://github.com/matchms/matchms/pull/119)
+
 ## [0.5.2] - 2020-08-26
 
 ### Changed
diff --git a/CITATION.cff b/CITATION.cff
index 0f91c432..f0f93b30 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -58,6 +58,11 @@ authors:
     family-names: Villanueva Castilla
     given-names: Efrain Manuel
     orcid: "https://orcid.org/0000-0001-7665-3575"
+  -
+    affiliation: "University of Glasgow"
+    family-names: Ashouritaklimi
+    given-names: Kianoosh
+    orcid: "https://orcid.org/0000-0001-6317-3193"
 
 cff-version: "1.1.0"
 keywords:
diff --git a/matchms/filtering/__init__.py b/matchms/filtering/__init__.py
index 7f07a986..c57911f3 100644
--- a/matchms/filtering/__init__.py
+++ b/matchms/filtering/__init__.py
@@ -57,8 +57,12 @@ from .make_charge_scalar import make_charge_scalar
 from .make_ionmode_lowercase import make_ionmode_lowercase
 from .normalize_intensities import normalize_intensities
 from .reduce_to_number_of_peaks import reduce_to_number_of_peaks
+from .remove_peaks_around_precursor_mz import remove_peaks_around_precursor_mz
+from .remove_peaks_outside_top_k import remove_peaks_outside_top_k
 from .repair_inchi_inchikey_smiles import repair_inchi_inchikey_smiles
 from .require_minimum_number_of_peaks import require_minimum_number_of_peaks
+from .require_minimum_of_high_peaks import require_minimum_of_high_peaks
+from .require_precursor_below_mz import require_precursor_below_mz
 from .select_by_intensity import select_by_intensity
 from .select_by_mz import select_by_mz
 from .select_by_relative_intensity import select_by_relative_intensity
@@ -88,8 +92,12 @@ __all__ = [
     "make_ionmode_lowercase",
     "normalize_intensities",
     "reduce_to_number_of_peaks",
+    "remove_peaks_around_precursor_mz",
+    "remove_peaks_outside_top_k",
     "repair_inchi_inchikey_smiles",
     "require_minimum_number_of_peaks",
+    "require_minimum_of_high_peaks",
+    "require_precursor_below_mz",
     "select_by_intensity",
     "select_by_mz",
     "select_by_relative_intensity",
diff --git a/matchms/filtering/remove_peaks_around_precursor_mz.py b/matchms/filtering/remove_peaks_around_precursor_mz.py
new file mode 100644
index 00000000..cfd94f06
--- /dev/null
+++ b/matchms/filtering/remove_peaks_around_precursor_mz.py
@@ -0,0 +1,35 @@
+import numpy
+from ..Spikes import Spikes
+from ..typing import SpectrumType
+
+
+def remove_peaks_around_precursor_mz(spectrum_in: SpectrumType, mz_tolerance: float = 17) -> SpectrumType:
+
+    """Remove peaks that are within mz_tolerance (in Da) of
+       the precursor mz, exlcuding the precursor peak.
+
+    Parameters
+    ----------
+    spectrum_in:
+        Input spectrum.
+    mz_tolerance:
+        Tolerance of mz values that are not allowed to lie
+        within the precursor mz. Default is 17 Da.
+    """
+    if spectrum_in is None:
+        return None
+
+    spectrum = spectrum_in.clone()
+
+    precursor_mz = spectrum.get("precursor_mz", None)
+    assert precursor_mz is not None, "Precursor mz absent."
+    assert isinstance(precursor_mz, (float, int)), ("Expected 'precursor_mz' to be a scalar number.",
+                                                    "Consider applying 'add_precursor_mz' filter first.")
+    assert mz_tolerance >= 0, "mz_tolerance must be a positive scalar."
+
+    mzs, intensities = spectrum.peaks
+    peaks_to_remove = ((numpy.abs(precursor_mz-mzs) <= mz_tolerance) & (mzs != precursor_mz))
+    new_mzs, new_intensities = mzs[~peaks_to_remove], intensities[~peaks_to_remove]
+    spectrum.peaks = Spikes(mz=new_mzs, intensities=new_intensities)
+
+    return spectrum
diff --git a/matchms/filtering/remove_peaks_outside_top_k.py b/matchms/filtering/remove_peaks_outside_top_k.py
new file mode 100644
index 00000000..b1715d18
--- /dev/null
+++ b/matchms/filtering/remove_peaks_outside_top_k.py
@@ -0,0 +1,44 @@
+import numpy
+from ..Spikes import Spikes
+from ..typing import SpectrumType
+
+
+def remove_peaks_outside_top_k(spectrum_in: SpectrumType, k: int = 6,
+                               mz_window: float = 50) -> SpectrumType:
+
+    """Remove all peaks which are not within *mz_window* of at least one
+       of the *k* highest intensity peaks of the spectrum.
+
+    Parameters
+    ----------
+    spectrum_in:
+        Input spectrum.
+    k:
+        The number of most intense peaks to compare to. Default is 6.
+    mz_window:
+        Window of mz values (in Da) that are allowed to lie within
+        the top k peaks. Default is 50 Da.
+    """
+    if spectrum_in is None:
+        return None
+
+    spectrum = spectrum_in.clone()
+
+    assert k >= 1, "k must be a positive nonzero integer."
+    assert mz_window >= 0, "mz_window must be a positive scalar."
+    mzs, intensities = spectrum.peaks
+    top_k = intensities.argsort()[::-1][0:k]
+    k_ordered_mzs = mzs[top_k]
+    indices = [i for i in range(len(mzs)) if i not in top_k]
+    keep_idx = top_k.tolist()
+    for i in indices:
+
+        compare = abs(mzs[i]-k_ordered_mzs) <= mz_window
+        if numpy.any(compare):
+            keep_idx.append(i)
+
+    keep_idx.sort()
+    new_mzs, new_intensities = mzs[keep_idx], intensities[keep_idx]
+    spectrum.peaks = Spikes(mz=new_mzs, intensities=new_intensities)
+
+    return spectrum
diff --git a/matchms/filtering/require_minimum_of_high_peaks.py b/matchms/filtering/require_minimum_of_high_peaks.py
new file mode 100644
index 00000000..47000ee8
--- /dev/null
+++ b/matchms/filtering/require_minimum_of_high_peaks.py
@@ -0,0 +1,34 @@
+from ..typing import SpectrumType
+from .select_by_relative_intensity import select_by_relative_intensity
+
+
+def require_minimum_of_high_peaks(spectrum_in: SpectrumType, no_peaks: int = 5,
+                                  intensity_percent: float = 2.0) -> SpectrumType:
+
+    """Returns None if the number of peaks with relative intensity
+       above or equal to intensity_percent is less than no_peaks.
+
+    Parameters
+    ----------
+    spectrum_in:
+        Input spectrum.
+    no_peaks:
+        Minimum number of peaks allowed to have relative intensity
+        above intensity_percent. Less peaks will return none.
+        Default is 5.
+    intensity_percent:
+        Minimum relative intensity (as a percentage between 0-100) for
+        peaks that are searched. Default is 2
+    """
+    if spectrum_in is None:
+        return None
+
+    spectrum = spectrum_in.clone()
+
+    assert no_peaks >= 1, "no_peaks must be a positive nonzero integer."
+    assert 0 <= intensity_percent <= 100, "intensity_percent must be a scalar between 0-100."
+    intensities_above_p = select_by_relative_intensity(spectrum, intensity_from=intensity_percent/100, intensity_to=1.0)
+    if len(intensities_above_p.peaks) < no_peaks:
+        return None
+
+    return spectrum
diff --git a/matchms/filtering/require_precursor_below_mz.py b/matchms/filtering/require_precursor_below_mz.py
new file mode 100644
index 00000000..45e0f92c
--- /dev/null
+++ b/matchms/filtering/require_precursor_below_mz.py
@@ -0,0 +1,31 @@
+from ..typing import SpectrumType
+
+
+def require_precursor_below_mz(spectrum_in: SpectrumType, max_mz: float = 1000) -> SpectrumType:
+
+    """Returns None if the precursor_mz of a spectrum is above
+       max_mz.
+
+    Parameters
+    ----------
+    spectrum_in:
+        Input spectrum.
+    max_mz:
+        Maximum mz value for the precursor mz of a spectrum.
+        All precursor mz values greater or equal to this
+        will return none. Default is 1000.
+    """
+    if spectrum_in is None:
+        return None
+
+    spectrum = spectrum_in.clone()
+
+    precursor_mz = spectrum.get("precursor_mz", None)
+    assert precursor_mz is not None, "Precursor mz absent."
+    assert isinstance(precursor_mz, (float, int)), ("Expected 'precursor_mz' to be a scalar number.",
+                                                    "Consider applying 'add_precursor_mz' filter first.")
+    assert max_mz >= 0, "max_mz must be a positive scalar."
+    if precursor_mz >= max_mz:
+        return None
+
+    return spectrum

don't load data from file in unit test
(copied from https://github.com/matchms/matchms/pull/73#pullrequestreview-388954200)

data file should be single spectrum since it supposed to bring to light a single error. Ideally, the datafile has only the minimum set of properties to be useful. We may not even need a data file, we could instantiate a Spectrum for this (fewer moving parts is better). For example like I did here https://github.com/matchms/matchms/blob/9fb639f43f0cf1fa242e2e5cdf0eb5e5efa0f7e7/tests/test_normalize_intensities.py#L8-L16


diff --git a/tests/test_remove_peaks_around_precursor_mz.py b/tests/test_remove_peaks_around_precursor_mz.py
new file mode 100644
index 00000000..816d2f3b
--- /dev/null
+++ b/tests/test_remove_peaks_around_precursor_mz.py
@@ -0,0 +1,73 @@
+import numpy
+import pytest
+from matchms import Spectrum
+from matchms.filtering import remove_peaks_around_precursor_mz
+
+
+def test_remove_peaks_around_precursor_mz_no_params():
+    """Using defaults with precursor mz present."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+    spectrum_in.set("precursor_mz", 60.)
+
+    spectrum = remove_peaks_around_precursor_mz(spectrum_in)
+
+    assert spectrum == spectrum_in, "Expected no changes."
+
+
+def test_remove_peaks_around_precursor_mz_tolerance_20():
+    """Set mz_tolerance to 20."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+    spectrum_in.set("precursor_mz", 60.)
+
+    spectrum = remove_peaks_around_precursor_mz(spectrum_in, mz_tolerance=20)
+
+    assert len(spectrum.peaks) == 3, "Expected 3 peaks to remain."
+    assert spectrum.peaks.mz.tolist() == [10., 20., 30.], "Expected different peaks to remain."
+
+
+def test_if_spectrum_is_cloned():
+    """Test if filter is correctly cloning the input spectrum."""
+    mz = numpy.array([], dtype="float")
+    intensities = numpy.array([], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+    spectrum_in.set("precursor_mz", 1.)
+
+    spectrum = remove_peaks_around_precursor_mz(spectrum_in)
+    spectrum.set("testfield", "test")
+
+    assert not spectrum_in.get("testfield"), "Expected input spectrum to remain unchanged."
+
+
+def test_remove_peaks_around_precursor_without_precursor_mz():
+    """Test if correct assert error is raised for missing precursor-mz."""
+    spectrum_in = Spectrum(mz=numpy.array([10, 20, 30, 40], dtype="float"),
+                           intensities=numpy.array([0, 1, 10, 100], dtype="float"),
+                           metadata={})
+
+    with pytest.raises(AssertionError) as msg:
+        _ = remove_peaks_around_precursor_mz(spectrum_in)
+
+    assert str(msg.value) == "Precursor mz absent.", "Expected different error message."
+
+
+def test_remove_peaks_around_precursor_with_wrong_precursor_mz():
+    """Test if correct assert error is raised for precursor-mz as string."""
+    spectrum_in = Spectrum(mz=numpy.array([10, 20, 30, 40], dtype="float"),
+                           intensities=numpy.array([0, 1, 10, 100], dtype="float"),
+                           metadata={"precursor_mz": "445.0"})
+
+    with pytest.raises(AssertionError) as msg:
+        _ = remove_peaks_around_precursor_mz(spectrum_in)
+
+    assert "Expected 'precursor_mz' to be a scalar number." in str(msg.value)
+
+
+def test_with_input_none():
+    """Test if input spectrum is None."""
+    spectrum_in = None
+    spectrum = remove_peaks_around_precursor_mz(spectrum_in)
+    assert spectrum is None
diff --git a/tests/test_remove_peaks_outside_top_k.py b/tests/test_remove_peaks_outside_top_k.py
new file mode 100644
index 00000000..f4cf2283
--- /dev/null
+++ b/tests/test_remove_peaks_outside_top_k.py
@@ -0,0 +1,93 @@
+import numpy
+from matchms import Spectrum
+from matchms.filtering import remove_peaks_outside_top_k
+
+
+def test_remove_peaks_outside_top_k_no_params():
+    """No parameters provided."""
+    mz = numpy.array([1, 25, 60, 70, 80, 90, 100, 110], dtype="float")
+    intensities = numpy.array([10, 25, 50, 75, 100, 125, 150, 175], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in)
+
+    assert len(spectrum.peaks) == 7, "Expected 7 peaks to remain."
+    assert spectrum.peaks.mz.tolist() == [25., 60., 70., 80., 90., 100., 110.], "Expected different peaks to remain."
+
+
+def test_remove_peaks_outside_top_k_no_params_peaks_less_than_k():
+    """Check case when the number of peaks is less than k with default parameters."""
+    mz = numpy.array([1, 25, 60, 70, 80], dtype="float")
+    intensities = numpy.array([10, 25, 50, 75, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in)
+
+    assert spectrum == spectrum_in, "Expected no changes as the number of peaks (5) is less than k (6)."
+
+
+def test_remove_peaks_outside_top_k_no_params_peaks_equal_to_k():
+    """Check case when the number of peaks is equal to k with default parameters."""
+    mz = numpy.array([1, 25, 60, 70, 80, 90], dtype="float")
+    intensities = numpy.array([10, 25, 50, 75, 100, 125], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in)
+
+    assert spectrum == spectrum_in, "Expected no changes as the number of peaks (6) is equal to k (6)."
+
+
+def test_remove_peaks_outside_top_k_no_params_check_sorting():
+    """Check sorting of mzs and intensities with default parameters."""
+    mz = numpy.array([100, 270, 300, 400, 500, 600, 700, 710, 720, 1000], dtype="float")
+    intensities = numpy.array([100, 200, 50, 175, 10, 125, 150, 75, 25, 1], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in)
+
+    assert len(spectrum.peaks) == 8, "Expected 8 peaks to remain."
+    assert spectrum.peaks.mz.tolist() == [100., 270., 300., 400., 600., 700., 710., 720.], "Expected different mzs to remain."
+    assert spectrum.peaks.intensities.tolist() == [100., 200., 50., 175., 125., 150., 75., 25.], "Expected different intensities to remain."
+
+
+def test_remove_peaks_outside_top_k_3():
+    """Set k to 3."""
+    mz = numpy.array([1, 20, 30, 50, 55, 90, 100, 110], dtype="float")
+    intensities = numpy.array([10, 25, 50, 75, 100, 125, 150, 175], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in, k=3)
+
+    assert len(spectrum.peaks) == 5, "Expected 5 peaks to remain."
+    assert spectrum.peaks.mz.tolist() == [50., 55., 90., 100., 110.], "Expected different peaks to remain."
+
+
+def test_remove_peaks_outside_top_k_mz_window_10():
+    """Set mz_window to 10."""
+    mz = numpy.array([1, 10, 30, 40, 50, 60, 70, 80], dtype="float")
+    intensities = numpy.array([10, 25, 50, 75, 100, 125, 150, 175], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in, mz_window=10)
+
+    assert len(spectrum.peaks) == 6, "Expected 6 peaks to remain."
+    assert spectrum.peaks.mz.tolist() == [30., 40., 50., 60., 70., 80.], "Expected different peaks to remain."
+
+
+def test_if_spectrum_is_cloned():
+    """Test if filter is correctly cloning the input spectrum."""
+    mz = numpy.array([], dtype="float")
+    intensities = numpy.array([], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = remove_peaks_outside_top_k(spectrum_in)
+    spectrum.set("testfield", "test")
+
+    assert not spectrum_in.get("testfield"), "Expected input spectrum to remain unchanged."
+
+
+def test_with_input_none():
+    """Test if input spectrum is None."""
+    spectrum_in = None
+    spectrum = remove_peaks_outside_top_k(spectrum_in)
+    assert spectrum is None
diff --git a/tests/test_require_minimum_of_high_peaks.py b/tests/test_require_minimum_of_high_peaks.py
new file mode 100644
index 00000000..a27796ed
--- /dev/null
+++ b/tests/test_require_minimum_of_high_peaks.py
@@ -0,0 +1,55 @@
+import numpy
+from matchms import Spectrum
+from matchms.filtering import require_minimum_of_high_peaks
+
+
+def test_require_minimum_of_high_peaks_no_params():
+    """No parameters provided."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = require_minimum_of_high_peaks(spectrum_in)
+
+    assert spectrum is None, "Expected None as the number of peaks (4) is less than the default of 5 for no_peaks."
+
+
+def test_require_minimum_of_high_peaks_no_peaks_2():
+    """Set no_peaks to 2."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = require_minimum_of_high_peaks(spectrum_in, no_peaks=2)
+
+    assert spectrum == spectrum_in, "Expected no changes."
+
+
+def test_require_minimum_of_high_peaks_intensity_percent_10():
+    """Set intensity_percent to 10."""
+    mz = numpy.array([10, 20, 30, 40, 50, 60, 70], dtype="float")
+    intensities = numpy.array([0, 1, 10, 25, 50, 75, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = require_minimum_of_high_peaks(spectrum_in, intensity_percent=10)
+
+    assert spectrum == spectrum_in, "Expected no changes."
+
+
+def test_if_spectrum_is_cloned():
+    """Test if filter is correctly cloning the input spectrum."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+
+    spectrum = require_minimum_of_high_peaks(spectrum_in, no_peaks=2)
+    spectrum.set("testfield", "test")
+
+    assert not spectrum_in.get("testfield"), "Expected input spectrum to remain unchanged."
+
+
+def test_with_input_none():
+    """Test if input spectrum is None."""
+    spectrum_in = None
+    spectrum = require_minimum_of_high_peaks(spectrum_in)
+    assert spectrum is None
diff --git a/tests/test_require_precursor_below_mz.py b/tests/test_require_precursor_below_mz.py
new file mode 100644
index 00000000..8180bd63
--- /dev/null
+++ b/tests/test_require_precursor_below_mz.py
@@ -0,0 +1,72 @@
+import numpy
+import pytest
+from matchms import Spectrum
+from matchms.filtering import require_precursor_below_mz
+
+
+def test_require_precursor_below_mz_no_params():
+    """Using default parameterse with precursor mz present."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+    spectrum_in.set("precursor_mz", 60.)
+
+    spectrum = require_precursor_below_mz(spectrum_in)
+
+    assert spectrum == spectrum_in, "Expected no changes."
+
+
+def test_require_precursor_below_mz_max_50():
+    """Set max_mz to 50."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+    spectrum_in.set("precursor_mz", 60.)
+
+    spectrum = require_precursor_below_mz(spectrum_in, max_mz=50)
+
+    assert spectrum is None, "Expected spectrum to be None."
+
+
+def test_if_spectrum_is_cloned():
+    """Test if filter is correctly cloning the input spectrum."""
+    mz = numpy.array([10, 20, 30, 40], dtype="float")
+    intensities = numpy.array([0, 1, 10, 100], dtype="float")
+    spectrum_in = Spectrum(mz=mz, intensities=intensities)
+    spectrum_in.set("precursor_mz", 1.)
+
+    spectrum = require_precursor_below_mz(spectrum_in)
+    spectrum.set("testfield", "test")
+
+    assert not spectrum_in.get("testfield"), "Expected input spectrum to remain unchanged."
+
+
+def test_require_precursor_below_without_precursor_mz():
+    """Test if correct assert error is raised for missing precursor-mz."""
+    spectrum_in = Spectrum(mz=numpy.array([10, 20, 30, 40], dtype="float"),
+                           intensities=numpy.array([0, 1, 10, 100], dtype="float"),
+                           metadata={})
+
+    with pytest.raises(AssertionError) as msg:
+        _ = require_precursor_below_mz(spectrum_in)
+
+    assert str(msg.value) == "Precursor mz absent.", "Expected different error message."
+
+
+def test_require_precursor_below_with_wrong_precursor_mz():
+    """Test if correct assert error is raised for precursor-mz as string."""
+    spectrum_in = Spectrum(mz=numpy.array([10, 20, 30, 40], dtype="float"),
+                           intensities=numpy.array([0, 1, 10, 100], dtype="float"),
+                           metadata={"precursor_mz": "445.0"})
+
+    with pytest.raises(AssertionError) as msg:
+        _ = require_precursor_below_mz(spectrum_in)
+
+    assert "Expected 'precursor_mz' to be a scalar number." in str(msg.value)
+
+
+def test_with_input_none():
+    """Test if input spectrum is None."""
+    spectrum_in = None
+    spectrum = require_precursor_below_mz(spectrum_in)
+    assert spectrum is None

conda/environment.yml
pip install -e .
parse_log_pytest
environment.yml
pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
Bottleneck @ file:///home/conda/feedstock_root/build_artifacts/bottleneck_1656803757560/work
Brotli @ file:///home/conda/feedstock_root/build_artifacts/brotli-split_1648883617327/work
certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1725278078093/work/certifi
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1728479282467/work
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1635519461629/work
exceptiongroup==1.2.2
fonttools @ file:///home/conda/feedstock_root/build_artifacts/fonttools_1666389892786/work
gensim @ file:///home/conda/feedstock_root/build_artifacts/gensim_1653483196026/work
greenlet @ file:///home/conda/feedstock_root/build_artifacts/greenlet_1661444174803/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1726459485162/work
importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1653252814274/work
iniconfig==2.0.0
kiwisolver @ file:///home/conda/feedstock_root/build_artifacts/kiwisolver_1657953088445/work
llvmlite==0.39.1
lxml @ file:///home/conda/feedstock_root/build_artifacts/lxml_1656759367847/work
-e git+https://github.com/matchms/matchms.git@d0d147672b68480b907f6bed9880e5a472736663#egg=matchms
matplotlib @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-suite_1661439848456/work
numba @ file:///home/conda/feedstock_root/build_artifacts/numba_1665771418417/work
numexpr @ file:///home/conda/feedstock_root/build_artifacts/numexpr_1658076415990/work
numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1649806299270/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1696202382185/work
pandas==1.3.5
Pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1660385854171/work
pluggy==1.2.0
ply @ file:///home/conda/feedstock_root/build_artifacts/ply_1712242996588/work
pycairo==1.21.0
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1724616129934/work
PyQt5==5.15.7
PyQt5-sip==12.11.0
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1648857264451/work
pyteomics==4.7.5
pytest==7.4.4
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1709299778482/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1726055524169/work
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1648757092905/work
reportlab==3.5.68
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1716354486713/work
scipy @ file:///home/conda/feedstock_root/build_artifacts/scipy_1637806658031/work
sip @ file:///home/conda/feedstock_root/build_artifacts/sip_1665592359543/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
smart_open @ file:///home/conda/feedstock_root/build_artifacts/smart_open_1728143129233/work/dist
SQLAlchemy @ file:///home/conda/feedstock_root/build_artifacts/sqlalchemy_1665944338818/work
toml @ file:///home/conda/feedstock_root/build_artifacts/toml_1604308577558/work
tomli==2.0.1
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1656937818679/work
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1688315532570/work
unicodedata2 @ file:///home/conda/feedstock_root/build_artifacts/unicodedata2_1649111917568/work
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1708239446578/work
wrapt @ file:///home/conda/feedstock_root/build_artifacts/wrapt_1651495229974/work
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1677313463193/work

name: matchms
channels:
  - defaults
  - bioconda
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - alsa-lib=1.2.8=h166bdaf_0
  - attr=2.5.1=h166bdaf_1
  - boost=1.78.0=py37h48bf904_0
  - boost-cpp=1.78.0=h5adbc97_2
  - bottleneck=1.3.5=py37hda87dfa_0
  - brotli=1.1.0=hb9d3cd8_2
  - brotli-bin=1.1.0=hb9d3cd8_2
  - brotli-python=1.0.9=py37hd23a5d3_7
  - bzip2=1.0.8=h4bc722e_7
  - ca-certificates=2025.1.31=hbcca054_0
  - cairo=1.16.0=ha61ee94_1012
  - certifi=2024.8.30=pyhd8ed1ab_0
  - charset-normalizer=3.4.0=pyhd8ed1ab_0
  - cycler=0.11.0=pyhd8ed1ab_0
  - dbus=1.13.6=h5008d03_3
  - expat=2.6.4=h5888daf_0
  - fftw=3.3.10=nompi_hf1063bd_110
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=h77eed37_3
  - fontconfig=2.15.0=h7e30c49_1
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - fonttools=4.38.0=py37h540881e_0
  - freetype=2.13.3=h48d6fc4_0
  - gensim=4.2.0=py37hfb7772e_0
  - gettext=0.23.1=h5888daf_0
  - gettext-tools=0.23.1=h5888daf_0
  - glib=2.84.0=h07242d1_0
  - glib-tools=2.84.0=h4833e2c_0
  - graphite2=1.3.13=h59595ed_1003
  - greenlet=1.1.3=py37hd23a5d3_0
  - gst-plugins-base=1.22.0=h4243ec0_2
  - gstreamer=1.22.0=h25f0c4b_2
  - gstreamer-orc=0.4.41=h17648ed_0
  - harfbuzz=6.0.0=h8e241bc_0
  - icu=70.1=h27087fc_0
  - idna=3.10=pyhd8ed1ab_0
  - importlib-metadata=4.11.4=py37h89c1867_0
  - jack=1.9.22=h11f4161_0
  - jpeg=9e=h0b41bf4_3
  - keyutils=1.6.1=h166bdaf_0
  - kiwisolver=1.4.4=py37h7cecad7_0
  - krb5=1.20.1=h81ceb04_0
  - lame=3.100=h166bdaf_1003
  - lcms2=2.14=h6ed2654_0
  - ld_impl_linux-64=2.43=h712a8e2_4
  - lerc=4.0.0=h27087fc_0
  - libasprintf=0.23.1=h8e693c7_0
  - libasprintf-devel=0.23.1=h8e693c7_0
  - libblas=3.9.0=20_linux64_openblas
  - libbrotlicommon=1.1.0=hb9d3cd8_2
  - libbrotlidec=1.1.0=hb9d3cd8_2
  - libbrotlienc=1.1.0=hb9d3cd8_2
  - libcap=2.67=he9d0100_0
  - libcblas=3.9.0=20_linux64_openblas
  - libclang=15.0.7=default_h127d8a8_5
  - libclang13=15.0.7=default_h5d6823c_5
  - libcups=2.3.3=h36d4200_3
  - libdb=6.2.32=h9c3ff4c_0
  - libdeflate=1.14=h166bdaf_0
  - libedit=3.1.20250104=pl5321h7949ede_0
  - libevent=2.1.10=h28343ad_4
  - libexpat=2.6.4=h5888daf_0
  - libffi=3.4.6=h2dba641_0
  - libflac=1.4.3=h59595ed_0
  - libgcc=14.2.0=h767d61c_2
  - libgcc-ng=14.2.0=h69a702a_2
  - libgcrypt=1.11.0=ha770c72_2
  - libgcrypt-devel=1.11.0=hb9d3cd8_2
  - libgcrypt-lib=1.11.0=hb9d3cd8_2
  - libgcrypt-tools=1.11.0=hb9d3cd8_2
  - libgettextpo=0.23.1=h5888daf_0
  - libgettextpo-devel=0.23.1=h5888daf_0
  - libgfortran=14.2.0=h69a702a_2
  - libgfortran-ng=14.2.0=h69a702a_2
  - libgfortran5=14.2.0=hf1ad2bd_2
  - libglib=2.84.0=h2ff4ddf_0
  - libgomp=14.2.0=h767d61c_2
  - libgpg-error=1.51=hbd13f7d_1
  - libiconv=1.18=h4ce23a2_1
  - liblapack=3.9.0=20_linux64_openblas
  - libllvm11=11.1.0=he0ac6c6_5
  - libllvm15=15.0.7=hadd5161_1
  - libltdl=2.4.3a=h5888daf_0
  - liblzma=5.6.4=hb9d3cd8_0
  - liblzma-devel=5.6.4=hb9d3cd8_0
  - libnsl=2.0.1=hd590300_0
  - libogg=1.3.5=h4ab18f5_0
  - libopenblas=0.3.25=pthreads_h413a1c8_0
  - libopus=1.3.1=h7f98852_1
  - libpng=1.6.47=h943b412_0
  - libpq=15.3=hbcd7760_1
  - libsndfile=1.2.2=hc60ed4a_1
  - libsqlite=3.49.1=hee588c1_2
  - libstdcxx=14.2.0=h8f9b012_2
  - libstdcxx-ng=14.2.0=h4852527_2
  - libsystemd0=253=h8c4010b_1
  - libtiff=4.4.0=h82bc61c_5
  - libtool=2.5.4=h5888daf_0
  - libudev1=253=h0b41bf4_1
  - libuuid=2.38.1=h0b41bf4_0
  - libvorbis=1.3.7=h9c3ff4c_0
  - libwebp-base=1.5.0=h851e524_0
  - libxcb=1.13=h7f98852_1004
  - libxkbcommon=1.5.0=h79f4944_1
  - libxml2=2.10.3=hca2bb57_4
  - libxslt=1.1.37=h873f0b0_0
  - libzlib=1.3.1=hb9d3cd8_2
  - llvmlite=0.39.1=py37h0761922_0
  - lxml=4.9.1=py37h540881e_0
  - lz4-c=1.9.4=hcb278e6_0
  - matplotlib=3.5.3=py37h89c1867_2
  - matplotlib-base=3.5.3=py37hf395dca_2
  - mpg123=1.32.9=hc50e24c_0
  - munkres=1.0.7=py_1
  - mysql-common=8.0.33=hf1915f5_6
  - mysql-libs=8.0.33=hca2cd23_6
  - ncurses=6.5=h2d0b736_3
  - nomkl=1.0=h5ca1d4c_0
  - nspr=4.36=h5888daf_0
  - nss=3.110=h159eef7_0
  - numba=0.56.3=py37hf081915_0
  - numexpr=2.8.3=py37h85a3170_100
  - numpy=1.21.6=py37h976b520_0
  - openjpeg=2.5.0=h7d73246_1
  - openssl=3.1.8=h7b32b05_0
  - packaging=23.2=pyhd8ed1ab_0
  - pandas=1.3.5=py37h8c16a72_0
  - pcre2=10.44=hba22ea6_2
  - pillow=9.2.0=py37h850a105_2
  - pip=24.0=pyhd8ed1ab_0
  - pixman=0.44.2=h29eaf8c_0
  - ply=3.11=pyhd8ed1ab_2
  - pthread-stubs=0.4=hb9d3cd8_1002
  - pulseaudio=16.1=hcb278e6_3
  - pulseaudio-client=16.1=h5195f5e_3
  - pulseaudio-daemon=16.1=ha8d29e2_3
  - pycairo=1.21.0=py37h0afab05_1
  - pyparsing=3.1.4=pyhd8ed1ab_0
  - pyqt=5.15.7=py37hf30b843_1
  - pyqt5-sip=12.11.0=py37hd23a5d3_1
  - pysocks=1.7.1=py37h89c1867_5
  - pyteomics=4.7.5=pyh7e72e81_0
  - python=3.7.12=hf930737_100_cpython
  - python-dateutil=2.9.0=pyhd8ed1ab_0
  - python_abi=3.7=4_cp37m
  - pytz=2024.2=pyhd8ed1ab_0
  - pyyaml=6.0=py37h540881e_4
  - qt-main=5.15.8=h5d23da1_6
  - rdkit=2022.09.1=py37h97e29ec_1
  - readline=8.2=h8c095d6_2
  - reportlab=3.5.68=py37h69800bb_1
  - requests=2.32.2=pyhd8ed1ab_0
  - scipy=1.7.3=py37hf2a6cf1_0
  - setuptools=69.0.3=pyhd8ed1ab_0
  - sip=6.7.2=py37hd23a5d3_0
  - six=1.16.0=pyh6c4a22f_0
  - smart_open=7.0.5=pyhd8ed1ab_1
  - sqlalchemy=1.4.42=py37h540881e_0
  - sqlite=3.49.1=h9eae976_2
  - tk=8.6.13=noxft_h4845f30_101
  - toml=0.10.2=pyhd8ed1ab_0
  - tornado=6.2=py37h540881e_0
  - typing-extensions=4.7.1=hd8ed1ab_0
  - typing_extensions=4.7.1=pyha770c72_0
  - unicodedata2=14.0.0=py37h540881e_1
  - urllib3=2.2.1=pyhd8ed1ab_0
  - wheel=0.42.0=pyhd8ed1ab_0
  - wrapt=1.14.1=py37h540881e_0
  - xcb-util=0.4.0=h516909a_0
  - xcb-util-image=0.4.0=h166bdaf_0
  - xcb-util-keysyms=0.4.0=h516909a_0
  - xcb-util-renderutil=0.3.9=h166bdaf_0
  - xcb-util-wm=0.4.1=h516909a_0
  - xkeyboard-config=2.38=h0b41bf4_0
  - xorg-kbproto=1.0.7=hb9d3cd8_1003
  - xorg-libice=1.1.2=hb9d3cd8_0
  - xorg-libsm=1.2.6=he73a12e_0
  - xorg-libx11=1.8.4=h0b41bf4_0
  - xorg-libxau=1.0.12=hb9d3cd8_0
  - xorg-libxdmcp=1.1.5=hb9d3cd8_0
  - xorg-libxext=1.3.4=h0b41bf4_2
  - xorg-libxrender=0.9.10=h7f98852_1003
  - xorg-renderproto=0.11.1=hb9d3cd8_1003
  - xorg-xextproto=7.3.0=hb9d3cd8_1004
  - xorg-xproto=7.0.31=hb9d3cd8_1008
  - xz=5.6.4=hbcc6ac9_0
  - xz-gpl-tools=5.6.4=hbcc6ac9_0
  - xz-tools=5.6.4=hb9d3cd8_0
  - yaml=0.2.5=h7f98852_2
  - zipp=3.15.0=pyhd8ed1ab_0
  - zstd=1.5.7=hb8e6e7a_2
  - pip:
      - exceptiongroup==1.2.2
      - iniconfig==2.0.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - tomli==2.0.1
prefix: /opt/conda/envs/matchms

tests/test_remove_peaks_around_precursor_mz.py::test_remove_peaks_around_precursor_mz_no_params tests/test_remove_peaks_around_precursor_mz.py::test_remove_peaks_around_precursor_mz_tolerance_20 tests/test_remove_peaks_around_precursor_mz.py::test_if_spectrum_is_cloned tests/test_remove_peaks_around_precursor_mz.py::test_remove_peaks_around_precursor_without_precursor_mz tests/test_remove_peaks_around_precursor_mz.py::test_remove_peaks_around_precursor_with_wrong_precursor_mz tests/test_remove_peaks_around_precursor_mz.py::test_with_input_none tests/test_remove_peaks_outside_top_k.py::test_remove_peaks_outside_top_k_no_params tests/test_remove_peaks_outside_top_k.py::test_remove_peaks_outside_top_k_no_params_peaks_less_than_k tests/test_remove_peaks_outside_top_k.py::test_remove_peaks_outside_top_k_no_params_peaks_equal_to_k tests/test_remove_peaks_outside_top_k.py::test_remove_peaks_outside_top_k_no_params_check_sorting tests/test_remove_peaks_outside_top_k.py::test_remove_peaks_outside_top_k_3 tests/test_remove_peaks_outside_top_k.py::test_remove_peaks_outside_top_k_mz_window_10 tests/test_remove_peaks_outside_top_k.py::test_if_spectrum_is_cloned tests/test_remove_peaks_outside_top_k.py::test_with_input_none tests/test_require_minimum_of_high_peaks.py::test_require_minimum_of_high_peaks_no_params tests/test_require_minimum_of_high_peaks.py::test_require_minimum_of_high_peaks_no_peaks_2 tests/test_require_minimum_of_high_peaks.py::test_require_minimum_of_high_peaks_intensity_percent_10 tests/test_require_minimum_of_high_peaks.py::test_if_spectrum_is_cloned tests/test_require_minimum_of_high_peaks.py::test_with_input_none tests/test_require_precursor_below_mz.py::test_require_precursor_below_mz_no_params tests/test_require_precursor_below_mz.py::test_require_precursor_below_mz_max_50 tests/test_require_precursor_below_mz.py::test_if_spectrum_is_cloned tests/test_require_precursor_below_mz.py::test_require_precursor_below_without_precursor_mz tests/test_require_precursor_below_mz.py::test_require_precursor_below_with_wrong_precursor_mz tests/test_require_precursor_below_mz.py::test_with_input_none
CITATION.cff matchms/filtering/require_precursor_below_mz.py matchms/filtering/require_minimum_of_high_peaks.py matchms/filtering/remove_peaks_around_precursor_mz.py CHANGELOG.md matchms/filtering/__init__.py .zenodo.json matchms/filtering/remove_peaks_outside_top_k.py
CITATION.cff matchms/filtering/require_precursor_below_mz.py matchms/filtering/require_minimum_of_high_peaks.py matchms/filtering/remove_peaks_around_precursor_mz.py CHANGELOG.md matchms/filtering/__init__.py .zenodo.json matchms/filtering/remove_peaks_outside_top_k.py