masster 0.3.10__tar.gz → 0.3.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of masster might be problematic. Click here for more details.
- {masster-0.3.10 → masster-0.3.12}/PKG-INFO +1 -1
- {masster-0.3.10 → masster-0.3.12}/pyproject.toml +1 -1
- masster-0.3.12/src/masster/docs/SCX_API_Documentation.md +0 -0
- masster-0.3.12/src/masster/docs/SCX_DLL_Analysis.md +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/logger.py +92 -78
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/defaults/find_features_def.py +16 -6
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/defaults/sample_def.py +1 -1
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/h5.py +2 -2
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/helpers.py +190 -140
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/load.py +13 -9
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/plot.py +256 -147
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/processing.py +18 -12
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/sample.py +10 -4
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/sample5_schema.json +38 -29
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/save.py +16 -13
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/sciex.py +187 -176
- masster-0.3.12/src/masster/study/defaults/align_def.py +485 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/fill_chrom_def.py +1 -5
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/integrate_chrom_def.py +1 -5
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/study_def.py +2 -2
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/export.py +144 -131
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/h5.py +193 -133
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/helpers.py +757 -246
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/helpers_optimized.py +99 -57
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/load.py +57 -25
- masster-0.3.12/src/masster/study/plot.py +1815 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/processing.py +194 -86
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/save.py +7 -7
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/study.py +154 -89
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/study5_schema.json +15 -15
- {masster-0.3.10 → masster-0.3.12}/uv.lock +504 -446
- masster-0.3.10/src/masster/study/defaults/align_def.py +0 -267
- masster-0.3.10/src/masster/study/plot.py +0 -700
- {masster-0.3.10 → masster-0.3.12}/.github/workflows/publish.yml +0 -0
- {masster-0.3.10 → masster-0.3.12}/.github/workflows/security.yml +0 -0
- {masster-0.3.10 → masster-0.3.12}/.github/workflows/test.yml +0 -0
- {masster-0.3.10 → masster-0.3.12}/.gitignore +0 -0
- {masster-0.3.10 → masster-0.3.12}/.pre-commit-config.yaml +0 -0
- {masster-0.3.10 → masster-0.3.12}/LICENSE +0 -0
- {masster-0.3.10 → masster-0.3.12}/Makefile +0 -0
- {masster-0.3.10 → masster-0.3.12}/README.md +0 -0
- {masster-0.3.10 → masster-0.3.12}/TESTING.md +0 -0
- {masster-0.3.10 → masster-0.3.12}/demo/example_batch_process.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/demo/example_sample_process.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/__init__.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/_version.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/chromatogram.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.featureXML +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.mzML +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.sample5 +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.timeseries.data +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff.scan +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff2 +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/__init__.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/defaults/__init__.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/defaults/find_adducts_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/defaults/find_ms2_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/defaults/get_spectrum_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/lib.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/parameters.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/sample/quant.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/spectrum.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/__init__.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/__init__.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/export_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/fill_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/find_consensus_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/find_ms2_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/integrate_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/defaults/merge_def.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/src/masster/study/parameters.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/conftest.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_chromatogram.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_defaults.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_imports.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_integration.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_logger.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_parameters.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_sample.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_spectrum.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_study.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tests/test_version.py +0 -0
- {masster-0.3.10 → masster-0.3.12}/tox.ini +0 -0
|
File without changes
|
|
File without changes
|
|
@@ -86,40 +86,44 @@ class MassterLogger:
|
|
|
86
86
|
|
|
87
87
|
# Loguru-style colors for different log levels
|
|
88
88
|
level_colors = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
"TRACE": "\x1b[34m", # blue
|
|
90
|
+
"DEBUG": "\x1b[36m", # cyan
|
|
91
|
+
"INFO": "\x1b[37m", # white
|
|
92
|
+
"SUCCESS": "\x1b[32m", # green
|
|
93
|
+
"WARNING": "\x1b[33m", # yellow
|
|
94
|
+
"ERROR": "\x1b[31m", # red
|
|
95
|
+
"CRITICAL": "\x1b[35m", # magenta
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
level_str = record.levelname.ljust(8)
|
|
99
|
-
level_color = level_colors.get(record.levelname,
|
|
99
|
+
level_color = level_colors.get(record.levelname, "\x1b[37m") # default white
|
|
100
100
|
label_part = self.label + " | " if self.label else ""
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
# For DEBUG and TRACE levels, add module/location information
|
|
103
103
|
location_info = ""
|
|
104
|
-
if record.levelname in [
|
|
104
|
+
if record.levelname in ["TRACE"]:
|
|
105
105
|
# Use caller information if available (from extra), otherwise fall back to record info
|
|
106
|
-
if hasattr(record,
|
|
107
|
-
module_name = record.caller_module.split(
|
|
106
|
+
if hasattr(record, "caller_module"):
|
|
107
|
+
module_name = record.caller_module.split(".")[-1] if record.caller_module else "unknown"
|
|
108
108
|
line_no = record.caller_lineno
|
|
109
109
|
func_name = record.caller_funcname
|
|
110
110
|
else:
|
|
111
|
-
module_name = record.module if hasattr(record,
|
|
111
|
+
module_name = record.module if hasattr(record, "module") else "unknown"
|
|
112
112
|
line_no = record.lineno
|
|
113
113
|
func_name = record.funcName
|
|
114
|
-
location_info =
|
|
115
|
-
|
|
114
|
+
location_info = (
|
|
115
|
+
f"\x1b[90m{module_name}:{func_name}:{line_no}\x1b[0m | " # dim gray for location info
|
|
116
|
+
)
|
|
117
|
+
|
|
116
118
|
# Loguru-style format: <white>timestamp</white> | <level>LEVEL</level> | <location> | <cyan>label</cyan> - <level>message</level>
|
|
117
|
-
return (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
return (
|
|
120
|
+
f"\x1b[37m{timestamp}\x1b[0m | " # white timestamp
|
|
121
|
+
f"{level_color}{level_str}\x1b[0m | " # colored level
|
|
122
|
+
f"{location_info}" # location info for DEBUG/TRACE
|
|
123
|
+
f"{level_color}{label_part}\x1b[0m" # colored label
|
|
124
|
+
f"{level_color}{record.getMessage()}\x1b[0m"
|
|
125
|
+
) # colored message
|
|
126
|
+
|
|
123
127
|
self.handler.setFormatter(massterFormatter(self.label))
|
|
124
128
|
self.logger_instance.addHandler(self.handler)
|
|
125
129
|
|
|
@@ -150,40 +154,44 @@ class MassterLogger:
|
|
|
150
154
|
|
|
151
155
|
# Loguru-style colors for different log levels
|
|
152
156
|
level_colors = {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
"TRACE": "\x1b[34m", # blue
|
|
158
|
+
"DEBUG": "\x1b[36m", # cyan
|
|
159
|
+
"INFO": "\x1b[37m", # white
|
|
160
|
+
"SUCCESS": "\x1b[32m", # green
|
|
161
|
+
"WARNING": "\x1b[33m", # yellow
|
|
162
|
+
"ERROR": "\x1b[31m", # red
|
|
163
|
+
"CRITICAL": "\x1b[35m", # magenta
|
|
160
164
|
}
|
|
161
165
|
|
|
162
166
|
level_str = record.levelname.ljust(8)
|
|
163
|
-
level_color = level_colors.get(record.levelname,
|
|
167
|
+
level_color = level_colors.get(record.levelname, "\x1b[37m") # default white
|
|
164
168
|
label_part = self.label + " | " if self.label else ""
|
|
165
|
-
|
|
169
|
+
|
|
166
170
|
# For DEBUG and TRACE levels, add module/location information
|
|
167
171
|
location_info = ""
|
|
168
|
-
if record.levelname in [
|
|
172
|
+
if record.levelname in ["TRACE"]:
|
|
169
173
|
# Use caller information if available (from extra), otherwise fall back to record info
|
|
170
|
-
if hasattr(record,
|
|
171
|
-
module_name = record.caller_module.split(
|
|
174
|
+
if hasattr(record, "caller_module"):
|
|
175
|
+
module_name = record.caller_module.split(".")[-1] if record.caller_module else "unknown"
|
|
172
176
|
line_no = record.caller_lineno
|
|
173
177
|
func_name = record.caller_funcname
|
|
174
178
|
else:
|
|
175
|
-
module_name = record.module if hasattr(record,
|
|
179
|
+
module_name = record.module if hasattr(record, "module") else "unknown"
|
|
176
180
|
line_no = record.lineno
|
|
177
181
|
func_name = record.funcName
|
|
178
|
-
location_info =
|
|
179
|
-
|
|
182
|
+
location_info = (
|
|
183
|
+
f"\x1b[90m{module_name}:{func_name}:{line_no}\x1b[0m | " # dim gray for location info
|
|
184
|
+
)
|
|
185
|
+
|
|
180
186
|
# Loguru-style format: <white>timestamp</white> | <level>LEVEL</level> | <location> | <cyan>label</cyan> - <level>message</level>
|
|
181
|
-
return (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
return (
|
|
188
|
+
f"\x1b[37m{timestamp}\x1b[0m | " # white timestamp
|
|
189
|
+
f"{level_color}{level_str}\x1b[0m | " # colored level
|
|
190
|
+
f"{location_info}" # location info for DEBUG/TRACE
|
|
191
|
+
f"{level_color}{label_part}\x1b[0m" # colored label
|
|
192
|
+
f"{level_color}{record.getMessage()}\x1b[0m"
|
|
193
|
+
) # colored message
|
|
194
|
+
|
|
187
195
|
self.handler.setFormatter(massterFormatter(self.label))
|
|
188
196
|
|
|
189
197
|
def update_sink(self, sink: Any):
|
|
@@ -210,40 +218,44 @@ class MassterLogger:
|
|
|
210
218
|
|
|
211
219
|
# Loguru-style colors for different log levels
|
|
212
220
|
level_colors = {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
221
|
+
"TRACE": "\x1b[34m", # blue
|
|
222
|
+
"DEBUG": "\x1b[36m", # cyan
|
|
223
|
+
"INFO": "\x1b[37m", # white
|
|
224
|
+
"SUCCESS": "\x1b[32m", # green
|
|
225
|
+
"WARNING": "\x1b[33m", # yellow
|
|
226
|
+
"ERROR": "\x1b[31m", # red
|
|
227
|
+
"CRITICAL": "\x1b[35m", # magenta
|
|
220
228
|
}
|
|
221
229
|
|
|
222
230
|
level_str = record.levelname.ljust(8)
|
|
223
|
-
level_color = level_colors.get(record.levelname,
|
|
231
|
+
level_color = level_colors.get(record.levelname, "\x1b[37m") # default white
|
|
224
232
|
label_part = self.label + " | " if self.label else ""
|
|
225
|
-
|
|
233
|
+
|
|
226
234
|
# For DEBUG and TRACE levels, add module/location information
|
|
227
235
|
location_info = ""
|
|
228
|
-
if record.levelname in [
|
|
236
|
+
if record.levelname in ["TRACE"]:
|
|
229
237
|
# Use caller information if available (from extra), otherwise fall back to record info
|
|
230
|
-
if hasattr(record,
|
|
231
|
-
module_name = record.caller_module.split(
|
|
238
|
+
if hasattr(record, "caller_module"):
|
|
239
|
+
module_name = record.caller_module.split(".")[-1] if record.caller_module else "unknown"
|
|
232
240
|
line_no = record.caller_lineno
|
|
233
241
|
func_name = record.caller_funcname
|
|
234
242
|
else:
|
|
235
243
|
module_name = record.module
|
|
236
244
|
line_no = record.lineno
|
|
237
245
|
func_name = record.funcName
|
|
238
|
-
location_info =
|
|
239
|
-
|
|
246
|
+
location_info = (
|
|
247
|
+
f"\x1b[90m{module_name}:{func_name}:{line_no}\x1b[0m | " # dim gray for location info
|
|
248
|
+
)
|
|
249
|
+
|
|
240
250
|
# Loguru-style format: <white>timestamp</white> | <level>LEVEL</level> | <location> | <cyan>label</cyan> - <level>message</level>
|
|
241
|
-
return (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
251
|
+
return (
|
|
252
|
+
f"\x1b[37m{timestamp}\x1b[0m | " # white timestamp
|
|
253
|
+
f"{level_color}{level_str}\x1b[0m | " # colored level
|
|
254
|
+
f"{location_info}" # location info for DEBUG/TRACE
|
|
255
|
+
f"{level_color}{label_part}\x1b[0m" # colored label
|
|
256
|
+
f"{level_color}{record.getMessage()}\x1b[0m"
|
|
257
|
+
) # colored message
|
|
258
|
+
|
|
247
259
|
self.handler.setFormatter(massterFormatter(self.label))
|
|
248
260
|
self.logger_instance.addHandler(self.handler)
|
|
249
261
|
|
|
@@ -252,36 +264,38 @@ class MassterLogger:
|
|
|
252
264
|
"""Log a TRACE level message (mapped to DEBUG)."""
|
|
253
265
|
# Get caller frame information (skip this method and go to actual caller)
|
|
254
266
|
import inspect
|
|
267
|
+
|
|
255
268
|
frame = inspect.currentframe().f_back
|
|
256
|
-
|
|
269
|
+
|
|
257
270
|
# Add caller information as extra parameters
|
|
258
|
-
extra = kwargs.get(
|
|
271
|
+
extra = kwargs.get("extra", {})
|
|
259
272
|
extra.update({
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
273
|
+
"caller_module": frame.f_globals.get("__name__", "unknown"),
|
|
274
|
+
"caller_filename": frame.f_code.co_filename,
|
|
275
|
+
"caller_lineno": frame.f_lineno,
|
|
276
|
+
"caller_funcname": frame.f_code.co_name,
|
|
264
277
|
})
|
|
265
|
-
kwargs[
|
|
266
|
-
|
|
278
|
+
kwargs["extra"] = extra
|
|
279
|
+
|
|
267
280
|
self.logger_instance.debug(message, *args, **kwargs)
|
|
268
281
|
|
|
269
282
|
def debug(self, message: str, *args, **kwargs):
|
|
270
283
|
"""Log a DEBUG level message."""
|
|
271
284
|
# Get caller frame information (skip this method and go to actual caller)
|
|
272
285
|
import inspect
|
|
286
|
+
|
|
273
287
|
frame = inspect.currentframe().f_back
|
|
274
|
-
|
|
288
|
+
|
|
275
289
|
# Add caller information as extra parameters
|
|
276
|
-
extra = kwargs.get(
|
|
290
|
+
extra = kwargs.get("extra", {})
|
|
277
291
|
extra.update({
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
292
|
+
"caller_module": frame.f_globals.get("__name__", "unknown"),
|
|
293
|
+
"caller_filename": frame.f_code.co_filename,
|
|
294
|
+
"caller_lineno": frame.f_lineno,
|
|
295
|
+
"caller_funcname": frame.f_code.co_name,
|
|
282
296
|
})
|
|
283
|
-
kwargs[
|
|
284
|
-
|
|
297
|
+
kwargs["extra"] = extra
|
|
298
|
+
|
|
285
299
|
self.logger_instance.debug(message, *args, **kwargs)
|
|
286
300
|
|
|
287
301
|
def info(self, message: str, *args, **kwargs):
|
|
@@ -52,6 +52,10 @@ class find_features_defaults:
|
|
|
52
52
|
peaks accepted). Typical values range from ~3 (relaxed) to >10
|
|
53
53
|
(stringent). Default: 10.0.
|
|
54
54
|
|
|
55
|
+
- isotope_filtering_model (str):
|
|
56
|
+
Isotope filtering model to use ('metabolites (2% RMS)', 'metabolites (5% RMS)',
|
|
57
|
+
'peptides', 'none'). Default: 'metabolites (5% RMS)'.
|
|
58
|
+
|
|
55
59
|
Use these three parameters together to balance sensitivity and
|
|
56
60
|
specificity for your dataset: tune `chrom_fwhm` to match chromatographic
|
|
57
61
|
peak shapes, set `noise` to a conservative background level for your
|
|
@@ -62,12 +66,12 @@ class find_features_defaults:
|
|
|
62
66
|
isotope handling, post-processing and reporting flags). See individual
|
|
63
67
|
parameter metadata (`_param_metadata`) for allowed ranges and types.
|
|
64
68
|
"""
|
|
65
|
-
|
|
69
|
+
|
|
66
70
|
# Main params
|
|
67
71
|
noise: float = 200.0
|
|
68
72
|
chrom_fwhm: float = 1.0
|
|
69
73
|
chrom_peak_snr: float = 10.0
|
|
70
|
-
|
|
74
|
+
|
|
71
75
|
# Mass Trace Detection parameters
|
|
72
76
|
tol_ppm: float = 30.0
|
|
73
77
|
reestimate_mt_sd: bool = True
|
|
@@ -78,7 +82,7 @@ class find_features_defaults:
|
|
|
78
82
|
|
|
79
83
|
min_trace_length: float = 0.5
|
|
80
84
|
min_trace_length_multiplier: float = 0.2
|
|
81
|
-
max_trace_length: float = -1.0
|
|
85
|
+
max_trace_length: float = -1.0
|
|
82
86
|
|
|
83
87
|
# Elution Peak Detection parameters
|
|
84
88
|
enabled: bool = True
|
|
@@ -108,9 +112,9 @@ class find_features_defaults:
|
|
|
108
112
|
deisotope: bool = True
|
|
109
113
|
deisotope_mz_tol: float = 0.02
|
|
110
114
|
deisotope_rt_tol_factor: float = 0.5 # Will be multiplied by chrom_fwhm
|
|
115
|
+
isotope_filtering_model: str = "metabolites (5% RMS)"
|
|
111
116
|
|
|
112
117
|
# chrom extraction parameters
|
|
113
|
-
|
|
114
118
|
|
|
115
119
|
# Parameter metadata for validation and description
|
|
116
120
|
_param_metadata: dict[str, dict[str, Any]] = field(
|
|
@@ -202,6 +206,12 @@ class find_features_defaults:
|
|
|
202
206
|
"min_value": 0.1,
|
|
203
207
|
"max_value": 2.0,
|
|
204
208
|
},
|
|
209
|
+
"isotope_filtering_model": {
|
|
210
|
+
"dtype": str,
|
|
211
|
+
"description": "Isotope filtering model",
|
|
212
|
+
"default": "metabolites (5% RMS)",
|
|
213
|
+
"allowed_values": ["metabolites (2% RMS)", "metabolites (5% RMS)", "peptides", "none"],
|
|
214
|
+
},
|
|
205
215
|
"threads": {
|
|
206
216
|
"dtype": int,
|
|
207
217
|
"description": "Number of threads to use for parallel processing",
|
|
@@ -228,12 +238,12 @@ class find_features_defaults:
|
|
|
228
238
|
"min_value": 2,
|
|
229
239
|
"max_value": 100,
|
|
230
240
|
},
|
|
231
|
-
|
|
241
|
+
""" "min_fwhm": {
|
|
232
242
|
"dtype": float,
|
|
233
243
|
"description": "Minimum full width at half maximum for peaks (seconds)",
|
|
234
244
|
"min_value": 0.1,
|
|
235
245
|
"max_value": 10.0,
|
|
236
|
-
},
|
|
246
|
+
},"""
|
|
237
247
|
"chrom_fwhm_max": {
|
|
238
248
|
"dtype": float,
|
|
239
249
|
"description": "Maximum full width at half maximum for peaks (seconds)",
|
|
@@ -294,13 +294,13 @@ def _load_sample5(self, filename: str, map: bool = True):
|
|
|
294
294
|
if "metadata" in f:
|
|
295
295
|
metadata_group = f["metadata"]
|
|
296
296
|
self.file_path = decode_metadata_attr(metadata_group.attrs.get("file_path", ""))
|
|
297
|
-
|
|
297
|
+
|
|
298
298
|
# Load file_source if it exists, otherwise set it equal to file_path
|
|
299
299
|
if "file_source" in metadata_group.attrs:
|
|
300
300
|
self.file_source = decode_metadata_attr(metadata_group.attrs.get("file_source", ""))
|
|
301
301
|
else:
|
|
302
302
|
self.file_source = self.file_path
|
|
303
|
-
|
|
303
|
+
|
|
304
304
|
self.file_type = decode_metadata_attr(metadata_group.attrs.get("file_type", ""))
|
|
305
305
|
self.label = decode_metadata_attr(metadata_group.attrs.get("label", ""))
|
|
306
306
|
|