Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 1.9.0 #388

Merged
merged 148 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
d596d82
Modify cli.py and planning.py to handle custom_quant_dir command line…
vbrennsteiner Aug 26, 2024
738e8a9
Add shell scripts to /misc which perform distributed search through s…
vbrennsteiner Aug 26, 2024
3ea17e1
add speclib prediction script and option in outer.sh
vbrennsteiner Aug 27, 2024
ecf0f9d
fix syntax error
vbrennsteiner Aug 27, 2024
4943fee
minor changes
vbrennsteiner Aug 27, 2024
f3dac29
change outer.sh to use wrap for speclib prediction AlphaDIA run
vbrennsteiner Aug 27, 2024
ff18c23
modify speclib_config.py to modify config.yaml in place if speclib is…
vbrennsteiner Aug 27, 2024
33957be
modified distributed search scripts with spectral library prediction,…
vbrennsteiner Aug 28, 2024
85ba91b
minor logging change
vbrennsteiner Aug 28, 2024
3075e64
change custom quantification directory handling to TEMP_FOLDER-level …
vbrennsteiner Aug 28, 2024
6b78aef
improved library handlincg in parse_parameters.py: check for .hdf fil…
vbrennsteiner Sep 3, 2024
10995c0
add additional parameters to outer.sh to set first and second search …
vbrennsteiner Sep 11, 2024
f06b9e2
change predicted speclib destination to target folder
vbrennsteiner Sep 11, 2024
c27422d
change speclib_config.py input/output directories
vbrennsteiner Sep 11, 2024
c1ce853
minor changes
vbrennsteiner Sep 11, 2024
2dffe6d
minor changes
vbrennsteiner Sep 11, 2024
f0bd334
minor changes
vbrennsteiner Sep 11, 2024
a6da690
logging directory changed
vbrennsteiner Sep 11, 2024
7c36297
fix folder navigation bug in outer.sh
vbrennsteiner Sep 11, 2024
d22afb9
clean scripts, minor changes
vbrennsteiner Sep 12, 2024
5e6a6eb
move speclib an dlibrary arguments to outer.sh only, config now witho…
vbrennsteiner Sep 12, 2024
2573717
minor fix
vbrennsteiner Sep 12, 2024
5ed0587
minor fixes
vbrennsteiner Sep 12, 2024
ec7b830
summarize distributed search scripts in respective folder
vbrennsteiner Sep 16, 2024
f0bda72
change speclib_config.py to handle variable config filenames
vbrennsteiner Oct 8, 2024
f60384d
change speclib_config.py to handle variable config filenames
vbrennsteiner Oct 8, 2024
cf638a9
Merge remote-tracking branch 'origin/development' into separate_configs
vbrennsteiner Oct 18, 2024
b485fba
add dist search tutorial markdown
vbrennsteiner Oct 24, 2024
671683b
Patch in libtransform.py: replace protein groups 'pg' column with 'ge…
vbrennsteiner Oct 25, 2024
dec9ab3
fix erroneous finishing message in outer.sh
vbrennsteiner Oct 25, 2024
a96b9af
Revert change to 'genes' in libtransform.py --> precursor dataframe n…
vbrennsteiner Nov 4, 2024
b09d0fc
add schematic for distributed search
vbrennsteiner Nov 4, 2024
53df5f2
autofixes for linting
mschwoer Nov 6, 2024
dabb502
Bugfix in parse_parameters.py: avoid crashing if the library_predicti…
vbrennsteiner Nov 7, 2024
d1ac16a
change default cpus from 32 to 12
vbrennsteiner Nov 7, 2024
7a4df58
Adding Setup and user guide to dist_sarch_setup.md, add timestamp to …
vbrennsteiner Nov 7, 2024
160c1c5
Adding Setup and user guide to dist_sarch_setup.md, add timestamp to …
vbrennsteiner Nov 7, 2024
6c90549
ineffective timestamp
vbrennsteiner Nov 8, 2024
3a81090
set log of speclib generation to common log
vbrennsteiner Nov 8, 2024
8912249
modify speclib logging
vbrennsteiner Nov 8, 2024
795b0e7
Move search parameters from outer.sh to search.config to enable easie…
vbrennsteiner Nov 8, 2024
6f8c3bf
add default search.config
vbrennsteiner Nov 8, 2024
24496bf
add exit upon error and printing all print all executed commands to t…
vbrennsteiner Nov 8, 2024
2f7554e
Merge separate_configs into add_search_config to enable reverse merge
vbrennsteiner Nov 8, 2024
44f2c5f
Merge separate_configs into add_search_config to enable reverse merge
vbrennsteiner Nov 8, 2024
dec315e
remove timestamp for predicted library
vbrennsteiner Nov 8, 2024
e5429f6
checking for existing fields in speclib_config.py, removing array fro…
vbrennsteiner Nov 8, 2024
97db894
revert verbosity and failing on error --> unresolved issue with expec…
vbrennsteiner Nov 8, 2024
815223f
add enumeration to processing steps
vbrennsteiner Nov 9, 2024
1d692c9
adding enumeration to subfolders
vbrennsteiner Nov 9, 2024
28fc996
removing empty arrays in speclib prediction & mbr library generation
vbrennsteiner Nov 9, 2024
eaf38cd
add calibration metrics to stats
GeorgWa Nov 10, 2024
b3badf1
fixes and unit tests
GeorgWa Nov 10, 2024
73e3ca7
unittests
GeorgWa Nov 10, 2024
63a771b
add length 1 array explicitly to predicted_speclib and mbr for extend…
vbrennsteiner Nov 11, 2024
b759b21
remove unnecessary comments
vbrennsteiner Nov 11, 2024
0ba5903
remove target directory reset
vbrennsteiner Nov 11, 2024
5d98bc9
remove target directory reset
vbrennsteiner Nov 11, 2024
2053939
parse_parameters.py error to sterr, adding of -u -x to outer.sh
vbrennsteiner Nov 11, 2024
4a25ed0
default project regex in discover_project_files.py
vbrennsteiner Nov 12, 2024
31c7002
add extended documentation to scripts
vbrennsteiner Nov 12, 2024
489c620
change path names to exclude dash at the end, instead writing it expl…
vbrennsteiner Nov 12, 2024
4157ecf
change path names to exclude dash at the end, instead writing it expl…
vbrennsteiner Nov 12, 2024
ef06b51
remove config file matching inside chunk directories, set to config.yaml
vbrennsteiner Nov 12, 2024
089e5b6
minor refactoring
vbrennsteiner Nov 12, 2024
75e700b
removing trailing slashes from config paths
vbrennsteiner Nov 12, 2024
c800ee3
reduce distributed search config files
mschwoer Nov 13, 2024
2f882c5
Merge pull request #366 from MannLabs/more_linting_I
GeorgWa Nov 13, 2024
2a31f7b
Merge pull request #369 from MannLabs/calibration-metrics
GeorgWa Nov 13, 2024
e4671ab
add notes how to debug with vscode
mschwoer Nov 13, 2024
9a0d625
parse_parameters.py to return sbatch array and obviate bash logic
vbrennsteiner Nov 13, 2024
22dc1df
remove sbatch array calculation from bash to python logic
vbrennsteiner Nov 13, 2024
9311358
rename alpharaw.py -> alpharaw_wrapper.py
mschwoer Nov 13, 2024
6c12e72
fix slurm array generation and reporting on number of tasks for a giv…
vbrennsteiner Nov 13, 2024
eae6d23
fix slurm array generation and reporting on number of tasks for a giv…
vbrennsteiner Nov 13, 2024
eaf74fc
introduce RawFileManager
mschwoer Nov 13, 2024
4e30de9
make config private
mschwoer Nov 13, 2024
5ae8438
remove stats.py
mschwoer Nov 13, 2024
d14b472
refactor RawFileManager
mschwoer Nov 13, 2024
539df00
refactor RawFileManager
mschwoer Nov 13, 2024
a215231
fix linting, fix reporting of task array length
vbrennsteiner Nov 13, 2024
0b1a086
remove _get_dia_data_object
mschwoer Nov 13, 2024
40f0fac
add TODO
mschwoer Nov 13, 2024
bdf9a1e
apply linting
vbrennsteiner Nov 13, 2024
3aec4dd
allow to use Config more like a dict
mschwoer Nov 13, 2024
5318ae5
allow to use Config allow loading rawfilemanager from file
mschwoer Nov 13, 2024
4b16958
merged python_dist_search_array into separate_configs and fixed linting
vbrennsteiner Nov 13, 2024
c1a9085
Merge remote-tracking branch 'origin/separate_configs' into separate_…
vbrennsteiner Nov 13, 2024
254d311
fix pickle loading raw_file_manager
mschwoer Nov 13, 2024
8b37386
fix type hints
mschwoer Nov 13, 2024
54db6a6
fix type hints
mschwoer Nov 13, 2024
9256428
add a link to Vs Code instructions
mschwoer Nov 14, 2024
27edc96
Merge pull request #370 from MannLabs/add_debug_instructions
mschwoer Nov 14, 2024
d357780
simplify RawFileManager api
mschwoer Nov 14, 2024
e29d44f
add some comments
mschwoer Nov 14, 2024
3e64886
refactor pickling
mschwoer Nov 13, 2024
b626e19
add stats to output df
mschwoer Nov 13, 2024
525e5ee
renaming
mschwoer Nov 13, 2024
88c92b9
add a comment
mschwoer Nov 13, 2024
576730b
revert changes to logging.ipynb
mschwoer Nov 14, 2024
268d48f
rename output fields
mschwoer Nov 14, 2024
16ef232
add output docu
mschwoer Nov 14, 2024
447c316
refactor stat output writing
mschwoer Nov 14, 2024
7ec9f92
refactor stat output writing
mschwoer Nov 14, 2024
54d48e4
refactor stat output writing
mschwoer Nov 14, 2024
8c78a78
adapt test
mschwoer Nov 14, 2024
a557151
adapt test
mschwoer Nov 14, 2024
cce4fe9
rename .progress folder to quant
mschwoer Nov 13, 2024
bb2c682
rename input parameter to quant-dir
mschwoer Nov 13, 2024
f835043
add a TODO
mschwoer Nov 13, 2024
06aa489
revert accidental commit
mschwoer Nov 13, 2024
1b0a138
formatting
mschwoer Nov 14, 2024
59434aa
linting and tests
GeorgWa Nov 14, 2024
c5522f2
Merge branch 'development' into zero-slice-bug
GeorgWa Nov 14, 2024
20b0e43
fix docstring
GeorgWa Nov 14, 2024
14277ab
fix gradient_length_m
mschwoer Nov 14, 2024
0aedcee
Merge pull request #374 from MannLabs/zero-slice-bug
GeorgWa Nov 14, 2024
8f63862
add distributed search documentation to methods
vbrennsteiner Nov 18, 2024
d7c065c
update formatting of distributed search documentation
vbrennsteiner Nov 18, 2024
65cab0c
change spectral library directory in parse_paramters.py to single sou…
vbrennsteiner Nov 18, 2024
4a6de93
fix colors in notebook
mschwoer Nov 18, 2024
a2f74b9
add check to exit if target_directory is not empty
vbrennsteiner Nov 18, 2024
497e644
add check to exit if target_directory is not empty
vbrennsteiner Nov 18, 2024
8e5cd03
update documentation
vbrennsteiner Nov 18, 2024
8d4360e
improve documentation with example call
vbrennsteiner Nov 18, 2024
dc2c48a
Merge branch 'inplace_speclib' into separate_configs
vbrennsteiner Nov 18, 2024
efbdc97
Merge branch 'separate_configs' into rename_progress_folder
vbrennsteiner Nov 18, 2024
e890c4f
Merge branch 'development' into add_rt_length_to_output
mschwoer Nov 19, 2024
fe8d24a
fix tests
mschwoer Nov 19, 2024
f777949
Merge pull request #372 from MannLabs/add_rt_length_to_output
mschwoer Nov 19, 2024
db55495
Merge pull request #373 from MannLabs/add_rt_length_to_output_II
mschwoer Nov 19, 2024
6512fe6
add keys to minimal config files to support partial configs for first…
vbrennsteiner Nov 19, 2024
2885649
add keys to minimal config files in speclib_config.py
vbrennsteiner Nov 19, 2024
a9ff12a
add default empty dictionary so empty config.yaml files are not read …
vbrennsteiner Nov 19, 2024
365e9eb
Merge branch 'refs/heads/development' into separate_configs
mschwoer Nov 19, 2024
691af65
Merge pull request #364 from MannLabs/separate_configs
vbrennsteiner Nov 19, 2024
0ddf758
alpharaw hdf reader
GeorgWa Nov 21, 2024
bd9d185
Merge pull request #381 from MannLabs/alpharaw-ms-data-base
GeorgWa Nov 22, 2024
6c39918
use right column in search fix #378
GeorgWa Nov 22, 2024
e4c92b6
fix issues in library creation
GeorgWa Nov 22, 2024
018fb0a
remove failure case
GeorgWa Nov 22, 2024
ab5bc78
bug fixes
GeorgWa Nov 25, 2024
3913b0e
Merge pull request #382 from MannLabs/transfer-lib-bug
GeorgWa Nov 26, 2024
82e7612
update and layout docs
GeorgWa Nov 26, 2024
d34d8d5
typos
GeorgWa Nov 26, 2024
c5c3a32
Merge pull request #386 from MannLabs/docs
GeorgWa Nov 26, 2024
e37ea74
Bump version: 1.8.2 → 1.9.0
GeorgWa Nov 26, 2024
d05009a
Merge pull request #387 from MannLabs/release-1.9.0
GeorgWa Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alphadia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!python

__version__ = "1.8.2"
__version__ = "1.9.0"
18 changes: 14 additions & 4 deletions alphadia/calibration/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(
float(transform_deviation) if transform_deviation is not None else None
)
self.is_fitted = False
self.metrics = None

def __repr__(self) -> str:
return f"<Calibration {self.name}, is_fitted: {self.is_fitted}>"
Expand Down Expand Up @@ -172,10 +173,12 @@ def fit(self, dataframe: pd.DataFrame, plot: bool = False, **kwargs):
self.function.fit(input_values, target_value)
self.is_fitted = True
except Exception as e:
logging.error(f"Could not fit estimator {self.name}: {e}")
logging.exception(f"Could not fit estimator {self.name}: {e}")
return

if plot is True:
self._save_metrics(dataframe)

if plot:
self.plot(dataframe, **kwargs)

def predict(self, dataframe, inplace=True):
Expand All @@ -200,13 +203,13 @@ def predict(self, dataframe, inplace=True):
logging.warning(
f"{self.name} prediction was skipped as it has not been fitted yet"
)
return
return None

if not set(self.input_columns).issubset(dataframe.columns):
logging.warning(
f"{self.name} calibration was skipped as input column {self.input_columns} not found in dataframe"
)
return
return None

input_values = dataframe[self.input_columns].values

Expand Down Expand Up @@ -297,6 +300,13 @@ def deviation(self, dataframe: pd.DataFrame):
axis=1,
)

def _save_metrics(self, dataframe):
deviation = self.deviation(dataframe)
self.metrics = {
"median_accuracy": np.median(np.abs(deviation[:, 1])),
"median_precision": np.median(np.abs(deviation[:, 2])),
}

def ci(self, dataframe, ci: float = 0.95):
"""Calculate the residual deviation at the given confidence interval.

Expand Down
50 changes: 48 additions & 2 deletions alphadia/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
action="append",
default=[],
)

parser.add_argument(
"--config",
"-c",
Expand All @@ -83,7 +82,6 @@
nargs="?",
default=None,
)

parser.add_argument(
"--wsl",
"-w",
Expand All @@ -97,6 +95,13 @@
nargs="?",
default="{}",
)
parser.add_argument(
"--quant-dir",
type=str,
help="Directory to save the quantification results (psm & frag parquet files) to be reused in a distributed search",
nargs="?",
default=None,
)


def parse_config(args: argparse.Namespace) -> dict:
Expand Down Expand Up @@ -167,6 +172,41 @@ def parse_output_directory(args: argparse.Namespace, config: dict) -> str:
return output_directory


def parse_quant_dir(args: argparse.Namespace, config: dict) -> str:
"""Parse custom quant path.
1. Use custom quant path from config file if specified.
2. Use custom quant path from command line if specified.

Parameters
----------

args : argparse.Namespace
Command line arguments.

config : dict
Config dictionary.

Returns
-------

quant_dir : str
path to quant directory.
"""

quant_dir = None
if "quant_dir" in config:
quant_dir = (
utils.windows_to_wsl(config["quant_dir"])
if args.wsl
else config["quant_dir"]
)

if args.quant_dir is not None:
quant_dir = utils.windows_to_wsl(args.quant_dir) if args.wsl else args.quant_dir

return quant_dir


def parse_raw_path_list(args: argparse.Namespace, config: dict) -> list:
"""Parse raw file list.
1. Use raw file list from config file if specified.
Expand Down Expand Up @@ -305,6 +345,8 @@ def run(*args, **kwargs):
print("No output directory specified.")
return

quant_dir = parse_quant_dir(args, config)

reporting.init_logging(output_directory)
raw_path_list = parse_raw_path_list(args, config)

Expand All @@ -321,7 +363,10 @@ def run(*args, **kwargs):
for f in fasta_path_list:
logger.progress(f" {f}")

# TODO rename all output_directory, output_folder => output_path, quant_dir->quant_path (except cli parameter)
logger.progress(f"Saving output to: {output_directory}")
if quant_dir is not None:
logger.progress(f"Saving quantification output to {quant_dir=}")

try:
import matplotlib
Expand All @@ -337,6 +382,7 @@ def run(*args, **kwargs):
library_path=library_path,
fasta_path_list=fasta_path_list,
config=config,
quant_path=quant_dir,
)

plan.run()
Expand Down
99 changes: 36 additions & 63 deletions alphadia/data/alpharaw.py → alphadia/data/alpharaw_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
# native imports
import logging
import math
import os

import numba as nb

# third party imports
import numpy as np
import pandas as pd
from alpharaw import mzml as alpharawmzml

# TODO fix: "import resolves to its containing file"
from alpharaw import sciex as alpharawsciex

# alpha family imports
from alpharaw import (
thermo as alpharawthermo,
)
from alpharaw import ms_data_base as alpharaw_ms_data_base
from alpharaw import mzml as alpharaw_mzml
from alpharaw import sciex as alpharaw_sciex
from alpharaw import thermo as alpharaw_thermo

# alphadia imports
from alphadia import utils
from alphadia.data.stats import log_stats

logger = logging.getLogger()

Expand Down Expand Up @@ -252,7 +242,7 @@ def calculate_valid_scans(quad_slices: np.ndarray, cycle: np.ndarray):
return np.array(precursor_idx_list)


class AlphaRaw(alpharawthermo.MSData_Base):
class AlphaRaw(alpharaw_thermo.MSData_Base):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.has_mobility = False
Expand Down Expand Up @@ -318,8 +308,6 @@ def filter_spectra(self, **kwargs):
This function is implemented in the sub-class.
"""

pass

def jitclass(self):
return AlphaRawJIT(
self.cycle,
Expand All @@ -340,28 +328,32 @@ def jitclass(self):
)


class MzML(AlphaRaw, alpharawmzml.MzMLReader):
class AlphaRawBase(AlphaRaw, alpharaw_ms_data_base.MSData_Base):
def __init__(self, raw_file_path: str, process_count: int = 10, **kwargs):
super().__init__(process_count=process_count)
self.load_hdf(raw_file_path)
self.process_alpharaw(**kwargs)


class MzML(AlphaRaw, alpharaw_mzml.MzMLReader):
def __init__(self, raw_file_path: str, process_count: int = 10, **kwargs):
super().__init__(process_count=process_count)
self.load_raw(raw_file_path)
self.process_alpharaw(**kwargs)
log_stats(self.rt_values, self.cycle)


class Sciex(AlphaRaw, alpharawsciex.SciexWiffData):
class Sciex(AlphaRaw, alpharaw_sciex.SciexWiffData):
def __init__(self, raw_file_path: str, process_count: int = 10, **kwargs):
super().__init__(process_count=process_count)
self.load_raw(raw_file_path)
self.process_alpharaw(**kwargs)
log_stats(self.rt_values, self.cycle)


class Thermo(AlphaRaw, alpharawthermo.ThermoRawData):
class Thermo(AlphaRaw, alpharaw_thermo.ThermoRawData):
def __init__(self, raw_file_path: str, process_count: int = 10, **kwargs):
super().__init__(process_count=process_count)
self.load_raw(raw_file_path)
self.process_alpharaw(**kwargs)
log_stats(self.rt_values, self.cycle)

def filter_spectra(self, cv: float = None, astral_ms1: bool = False, **kwargs):
"""
Expand Down Expand Up @@ -460,7 +452,9 @@ def __init__(
self.scan_max_index = scan_max_index
self.frame_max_index = frame_max_index

def get_frame_indices(self, rt_values: np.array, optimize_size: int = 16):
def get_frame_indices(
self, rt_values: np.array, optimize_size: int = 16, min_size: int = 32
):
"""

Convert an interval of two rt values to a frame index interval.
Expand All @@ -474,54 +468,28 @@ def get_frame_indices(self, rt_values: np.array, optimize_size: int = 16):
optimize_size : int, default = 16
To optimize for fft efficiency, we want to extend the precursor cycle to a multiple of 16

min_size : int, default = 32
The minimum number of dia cycles to include

Returns
-------
np.ndarray, shape = (2,), dtype = int64
array of frame indices

"""

if rt_values.shape != (2,):
raise ValueError("rt_values must be a numpy array of shape (2,)")

frame_index = np.zeros(len(rt_values), dtype=np.int64)
for i, rt in enumerate(rt_values):
frame_index[i] = search_sorted_left(self.rt_values, rt)

precursor_cycle_limits = (frame_index + self.zeroth_frame) // self.cycle.shape[
1
]
precursor_cycle_len = precursor_cycle_limits[1] - precursor_cycle_limits[0]

# round up to the next multiple of 16
optimal_len = int(
optimize_size * math.ceil(precursor_cycle_len / optimize_size)
return utils.get_frame_indices(
rt_values=rt_values,
rt_values_array=self.rt_values,
zeroth_frame=self.zeroth_frame,
cycle_len=self.cycle.shape[1],
precursor_cycle_max_index=self.precursor_cycle_max_index,
optimize_size=optimize_size,
min_size=min_size,
)

# by default, we extend the precursor cycle to the right
optimal_cycle_limits = np.array(
[precursor_cycle_limits[0], precursor_cycle_limits[0] + optimal_len],
dtype=np.int64,
)

# if the cycle is too long, we extend it to the left
if optimal_cycle_limits[1] > self.precursor_cycle_max_index:
optimal_cycle_limits[1] = self.precursor_cycle_max_index
optimal_cycle_limits[0] = self.precursor_cycle_max_index - optimal_len

if optimal_cycle_limits[0] < 0:
optimal_cycle_limits[0] = (
0 if self.precursor_cycle_max_index % 2 == 0 else 1
)

# second element is the index of the first whole cycle which should not be used
# precursor_cycle_limits[1] += 1
# convert back to frame indices
frame_limits = optimal_cycle_limits * self.cycle.shape[1] + self.zeroth_frame
return utils.make_slice_1d(frame_limits)

def get_frame_indices_tolerance(
self, rt: float, tolerance: float, optimize_size: int = 16
self, rt: float, tolerance: float, optimize_size: int = 16, min_size: int = 32
):
"""
Determine the frame indices for a given retention time and tolerance.
Expand All @@ -538,6 +506,9 @@ def get_frame_indices_tolerance(
optimize_size : int, default = 16
To optimize for fft efficiency, we want to extend the precursor cycle to a multiple of 16

min_size : int, default = 32
The minimum number of dia cycles to include

Returns
-------
np.ndarray, shape = (1, 3,), dtype = int64
Expand All @@ -547,7 +518,9 @@ def get_frame_indices_tolerance(

rt_limits = np.array([rt - tolerance, rt + tolerance], dtype=np.float32)

return self.get_frame_indices(rt_limits, optimize_size=optimize_size)
return self.get_frame_indices(
rt_limits, optimize_size=optimize_size, min_size=min_size
)

def get_scan_indices(self, mobility_values: np.array, optimize_size: int = 16):
return np.array([[0, 2, 1]], dtype=np.int64)
Expand Down
Loading
Loading