masster 0.5.8__py3-none-any.whl → 0.5.9__py3-none-any.whl
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/_version.py +1 -1
- masster/logger.py +58 -43
- masster/sample/h5.py +1 -1
- masster/sample/plot.py +4 -4
- masster/sample/processing.py +3 -3
- masster/sample/save.py +5 -5
- masster/study/h5.py +1 -1
- masster/study/helpers.py +4 -4
- masster/study/id.py +3 -3
- masster/study/merge.py +4 -4
- masster/study/processing.py +2 -2
- {masster-0.5.8.dist-info → masster-0.5.9.dist-info}/METADATA +1 -1
- {masster-0.5.8.dist-info → masster-0.5.9.dist-info}/RECORD +16 -16
- {masster-0.5.8.dist-info → masster-0.5.9.dist-info}/WHEEL +0 -0
- {masster-0.5.8.dist-info → masster-0.5.9.dist-info}/entry_points.txt +0 -0
- {masster-0.5.8.dist-info → masster-0.5.9.dist-info}/licenses/LICENSE +0 -0
masster/_version.py
CHANGED
masster/logger.py
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Simple logger system for masster Study and Sample instances.
|
|
4
4
|
Uses basic Python logging timestamp = dt.strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Universal colors compatible with both dark and light themes
|
|
7
7
|
level_colors = {
|
|
8
|
-
'TRACE': '\x1b[
|
|
9
|
-
'DEBUG': '\x1b[
|
|
10
|
-
'INFO': '\x1b[
|
|
11
|
-
'SUCCESS': '\x1b[
|
|
12
|
-
'WARNING': '\x1b[
|
|
13
|
-
'ERROR': '\x1b[
|
|
14
|
-
'CRITICAL': '\x1b[
|
|
8
|
+
'TRACE': '\x1b[94m', # bright blue (readable on both dark/light)
|
|
9
|
+
'DEBUG': '\x1b[96m', # bright cyan (readable on both dark/light)
|
|
10
|
+
'INFO': '\x1b[90m', # bright black/gray (readable on both dark/light)
|
|
11
|
+
'SUCCESS': '\x1b[92m', # bright green (readable on both dark/light)
|
|
12
|
+
'WARNING': '\x1b[93m', # bright yellow (readable on both dark/light)
|
|
13
|
+
'ERROR': '\x1b[91m', # bright red (readable on both dark/light)
|
|
14
|
+
'CRITICAL': '\x1b[95m', # bright magenta (readable on both dark/light)
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
level_str = record.levelname.ljust(8)complex loguru filtering.
|
|
@@ -102,19 +102,19 @@ class MassterLogger:
|
|
|
102
102
|
dt = datetime.datetime.fromtimestamp(record.created)
|
|
103
103
|
timestamp = dt.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] # Remove last 3 digits for milliseconds
|
|
104
104
|
|
|
105
|
-
#
|
|
105
|
+
# Universal colors compatible with both dark and light themes
|
|
106
106
|
level_colors = {
|
|
107
|
-
"TRACE": "\x1b[
|
|
108
|
-
"DEBUG": "\x1b[
|
|
109
|
-
"INFO": "\x1b[
|
|
110
|
-
"SUCCESS": "\x1b[
|
|
111
|
-
"WARNING": "\x1b[
|
|
112
|
-
"ERROR": "\x1b[
|
|
113
|
-
"CRITICAL": "\x1b[
|
|
107
|
+
"TRACE": "\x1b[94m", # bright blue (readable on both dark/light)
|
|
108
|
+
"DEBUG": "\x1b[96m", # bright cyan (readable on both dark/light)
|
|
109
|
+
"INFO": "\x1b[90m", # bright black/gray (readable on both dark/light)
|
|
110
|
+
"SUCCESS": "\x1b[92m", # bright green (readable on both dark/light)
|
|
111
|
+
"WARNING": "\x1b[93m", # bright yellow (readable on both dark/light)
|
|
112
|
+
"ERROR": "\x1b[91m", # bright red (readable on both dark/light)
|
|
113
|
+
"CRITICAL": "\x1b[95m", # bright magenta (readable on both dark/light)
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
level_str = record.levelname.ljust(8)
|
|
117
|
-
level_color = level_colors.get(record.levelname, "\x1b[
|
|
117
|
+
level_color = level_colors.get(record.levelname, "\x1b[90m") # default to gray instead of white
|
|
118
118
|
label_part = self.label + " | " if self.label else ""
|
|
119
119
|
|
|
120
120
|
# For DEBUG and TRACE levels, add module/location information
|
|
@@ -133,9 +133,9 @@ class MassterLogger:
|
|
|
133
133
|
f"\x1b[90m{module_name}:{func_name}:{line_no}\x1b[0m | " # dim gray for location info
|
|
134
134
|
)
|
|
135
135
|
|
|
136
|
-
#
|
|
136
|
+
# Universal format: timestamp | level | location | label - message
|
|
137
137
|
return (
|
|
138
|
-
f"\x1b[
|
|
138
|
+
f"\x1b[90m{timestamp}\x1b[0m | " # gray timestamp (universal for both themes)
|
|
139
139
|
f"{level_color}{level_str}\x1b[0m | " # colored level
|
|
140
140
|
f"{location_info}" # location info for DEBUG/TRACE
|
|
141
141
|
f"{level_color}{label_part}\x1b[0m" # colored label
|
|
@@ -181,19 +181,19 @@ class MassterLogger:
|
|
|
181
181
|
dt = datetime.datetime.fromtimestamp(record.created)
|
|
182
182
|
timestamp = dt.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
|
|
183
183
|
|
|
184
|
-
#
|
|
184
|
+
# Universal colors compatible with both dark and light themes
|
|
185
185
|
level_colors = {
|
|
186
|
-
"TRACE": "\x1b[
|
|
187
|
-
"DEBUG": "\x1b[
|
|
188
|
-
"INFO": "\x1b[
|
|
189
|
-
"SUCCESS": "\x1b[
|
|
190
|
-
"WARNING": "\x1b[
|
|
191
|
-
"ERROR": "\x1b[
|
|
192
|
-
"CRITICAL": "\x1b[
|
|
186
|
+
"TRACE": "\x1b[94m", # bright blue (readable on both dark/light)
|
|
187
|
+
"DEBUG": "\x1b[96m", # bright cyan (readable on both dark/light)
|
|
188
|
+
"INFO": "\x1b[90m", # bright black/gray (readable on both dark/light)
|
|
189
|
+
"SUCCESS": "\x1b[92m", # bright green (readable on both dark/light)
|
|
190
|
+
"WARNING": "\x1b[93m", # bright yellow (readable on both dark/light)
|
|
191
|
+
"ERROR": "\x1b[91m", # bright red (readable on both dark/light)
|
|
192
|
+
"CRITICAL": "\x1b[95m", # bright magenta (readable on both dark/light)
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
level_str = record.levelname.ljust(8)
|
|
196
|
-
level_color = level_colors.get(record.levelname, "\x1b[
|
|
196
|
+
level_color = level_colors.get(record.levelname, "\x1b[90m") # default to gray instead of white
|
|
197
197
|
label_part = self.label + " | " if self.label else ""
|
|
198
198
|
|
|
199
199
|
# For DEBUG and TRACE levels, add module/location information
|
|
@@ -212,9 +212,9 @@ class MassterLogger:
|
|
|
212
212
|
f"\x1b[90m{module_name}:{func_name}:{line_no}\x1b[0m | " # dim gray for location info
|
|
213
213
|
)
|
|
214
214
|
|
|
215
|
-
#
|
|
215
|
+
# Universal format: timestamp | level | location | label - message
|
|
216
216
|
return (
|
|
217
|
-
f"\x1b[
|
|
217
|
+
f"\x1b[90m{timestamp}\x1b[0m | " # gray timestamp (universal for both themes)
|
|
218
218
|
f"{level_color}{level_str}\x1b[0m | " # colored level
|
|
219
219
|
f"{location_info}" # location info for DEBUG/TRACE
|
|
220
220
|
f"{level_color}{label_part}\x1b[0m" # colored label
|
|
@@ -245,19 +245,19 @@ class MassterLogger:
|
|
|
245
245
|
dt = datetime.datetime.fromtimestamp(record.created)
|
|
246
246
|
timestamp = dt.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
|
|
247
247
|
|
|
248
|
-
#
|
|
248
|
+
# Universal colors compatible with both dark and light themes
|
|
249
249
|
level_colors = {
|
|
250
|
-
"TRACE": "\x1b[
|
|
251
|
-
"DEBUG": "\x1b[
|
|
252
|
-
"INFO": "\x1b[
|
|
253
|
-
"SUCCESS": "\x1b[
|
|
254
|
-
"WARNING": "\x1b[
|
|
255
|
-
"ERROR": "\x1b[
|
|
256
|
-
"CRITICAL": "\x1b[
|
|
250
|
+
"TRACE": "\x1b[94m", # bright blue (readable on both dark/light)
|
|
251
|
+
"DEBUG": "\x1b[96m", # bright cyan (readable on both dark/light)
|
|
252
|
+
"INFO": "\x1b[90m", # bright black/gray (readable on both dark/light)
|
|
253
|
+
"SUCCESS": "\x1b[92m", # bright green (readable on both dark/light)
|
|
254
|
+
"WARNING": "\x1b[93m", # bright yellow (readable on both dark/light)
|
|
255
|
+
"ERROR": "\x1b[91m", # bright red (readable on both dark/light)
|
|
256
|
+
"CRITICAL": "\x1b[95m", # bright magenta (readable on both dark/light)
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
level_str = record.levelname.ljust(8)
|
|
260
|
-
level_color = level_colors.get(record.levelname, "\x1b[
|
|
260
|
+
level_color = level_colors.get(record.levelname, "\x1b[90m") # default to gray instead of white
|
|
261
261
|
label_part = self.label + " | " if self.label else ""
|
|
262
262
|
|
|
263
263
|
# For DEBUG and TRACE levels, add module/location information
|
|
@@ -276,9 +276,9 @@ class MassterLogger:
|
|
|
276
276
|
f"\x1b[90m{module_name}:{func_name}:{line_no}\x1b[0m | " # dim gray for location info
|
|
277
277
|
)
|
|
278
278
|
|
|
279
|
-
#
|
|
279
|
+
# Universal format: timestamp | level | location | label - message
|
|
280
280
|
return (
|
|
281
|
-
f"\x1b[
|
|
281
|
+
f"\x1b[90m{timestamp}\x1b[0m | " # gray timestamp (universal for both themes)
|
|
282
282
|
f"{level_color}{level_str}\x1b[0m | " # colored level
|
|
283
283
|
f"{location_info}" # location info for DEBUG/TRACE
|
|
284
284
|
f"{level_color}{label_part}\x1b[0m" # colored label
|
|
@@ -332,8 +332,22 @@ class MassterLogger:
|
|
|
332
332
|
self.logger_instance.info(message, *args, **kwargs)
|
|
333
333
|
|
|
334
334
|
def success(self, message: str, *args, **kwargs):
|
|
335
|
-
"""Log a SUCCESS level message (
|
|
336
|
-
|
|
335
|
+
"""Log a SUCCESS level message (custom level)."""
|
|
336
|
+
# Create a custom log record with SUCCESS level
|
|
337
|
+
import logging
|
|
338
|
+
|
|
339
|
+
# Create a LogRecord manually with SUCCESS level
|
|
340
|
+
record = self.logger_instance.makeRecord(
|
|
341
|
+
self.logger_instance.name,
|
|
342
|
+
logging.INFO, # Use INFO level for Python's filtering
|
|
343
|
+
"", 0, message, args, None, func="success"
|
|
344
|
+
)
|
|
345
|
+
# Override the levelname for display
|
|
346
|
+
record.levelname = "SUCCESS"
|
|
347
|
+
|
|
348
|
+
# Handle the record directly through our handler
|
|
349
|
+
if self.handler:
|
|
350
|
+
self.handler.handle(record)
|
|
337
351
|
|
|
338
352
|
def warning(self, message: str, *args, **kwargs):
|
|
339
353
|
"""Log a WARNING level message."""
|
|
@@ -372,3 +386,4 @@ class MassterLogger:
|
|
|
372
386
|
|
|
373
387
|
def __repr__(self):
|
|
374
388
|
return f"MassterLogger(type={self.instance_type}, id={self.instance_id}, level={self.level})"
|
|
389
|
+
|
masster/sample/h5.py
CHANGED
|
@@ -295,7 +295,7 @@ def _save_sample5(
|
|
|
295
295
|
|
|
296
296
|
# Store lib and lib_match - removed (no longer saving lib data)
|
|
297
297
|
|
|
298
|
-
self.logger.
|
|
298
|
+
self.logger.success(f"Sample saved to {filename}")
|
|
299
299
|
if save_featurexml:
|
|
300
300
|
# Get or recreate the feature map if needed
|
|
301
301
|
feature_map = self._get_feature_map()
|
masster/sample/plot.py
CHANGED
|
@@ -234,7 +234,7 @@ def _handle_sample_plot_output(self, plot_obj, filename=None, plot_type="bokeh")
|
|
|
234
234
|
from bokeh.io import save
|
|
235
235
|
output_file(filename)
|
|
236
236
|
save(plot_obj)
|
|
237
|
-
self.logger.
|
|
237
|
+
self.logger.success(f"Plot saved to: {abs_filename}")
|
|
238
238
|
elif filename.endswith(".png"):
|
|
239
239
|
try:
|
|
240
240
|
if plot_type == "bokeh":
|
|
@@ -243,7 +243,7 @@ def _handle_sample_plot_output(self, plot_obj, filename=None, plot_type="bokeh")
|
|
|
243
243
|
elif plot_type in ["panel", "holoviews"]:
|
|
244
244
|
import holoviews as hv
|
|
245
245
|
hv.save(plot_obj, filename, fmt="png")
|
|
246
|
-
self.logger.
|
|
246
|
+
self.logger.success(f"Plot saved to: {abs_filename}")
|
|
247
247
|
except Exception:
|
|
248
248
|
# Fall back to HTML if PNG export not available
|
|
249
249
|
html_filename = filename.replace('.png', '.html')
|
|
@@ -268,7 +268,7 @@ def _handle_sample_plot_output(self, plot_obj, filename=None, plot_type="bokeh")
|
|
|
268
268
|
elif plot_type in ["panel", "holoviews"]:
|
|
269
269
|
import holoviews as hv
|
|
270
270
|
hv.save(plot_obj, filename, fmt="pdf")
|
|
271
|
-
self.logger.
|
|
271
|
+
self.logger.success(f"Plot saved to: {abs_filename}")
|
|
272
272
|
except ImportError:
|
|
273
273
|
# Fall back to HTML if PDF export not available
|
|
274
274
|
html_filename = filename.replace('.pdf', '.html')
|
|
@@ -296,7 +296,7 @@ def _handle_sample_plot_output(self, plot_obj, filename=None, plot_type="bokeh")
|
|
|
296
296
|
from bokeh.io import save
|
|
297
297
|
output_file(filename)
|
|
298
298
|
save(plot_obj)
|
|
299
|
-
self.logger.
|
|
299
|
+
self.logger.success(f"Plot saved to: {abs_filename}")
|
|
300
300
|
else:
|
|
301
301
|
# Show in notebook when no filename provided
|
|
302
302
|
if plot_type == "panel":
|
masster/sample/processing.py
CHANGED
|
@@ -796,7 +796,7 @@ def find_features(self, **kwargs):
|
|
|
796
796
|
|
|
797
797
|
self.features_df = df
|
|
798
798
|
#self._features_sync()
|
|
799
|
-
self.logger.
|
|
799
|
+
self.logger.success(f"Feature detection completed. Total features: {len(df)}")
|
|
800
800
|
|
|
801
801
|
# store params
|
|
802
802
|
self.update_history(["find_features"], params.to_dict())
|
|
@@ -1263,7 +1263,7 @@ def find_ms2(self, **kwargs):
|
|
|
1263
1263
|
)
|
|
1264
1264
|
|
|
1265
1265
|
# Log completion
|
|
1266
|
-
self.logger.
|
|
1266
|
+
self.logger.success(
|
|
1267
1267
|
f"MS2 linking completed. Total features with MS2 data: {c}",
|
|
1268
1268
|
)
|
|
1269
1269
|
self.features_df = features_df
|
|
@@ -1425,7 +1425,7 @@ def find_iso(self, rt_tolerance: float = 0.1, **kwargs):
|
|
|
1425
1425
|
|
|
1426
1426
|
# Log results
|
|
1427
1427
|
non_null_count = len([spec for spec in ms1_specs if spec is not None])
|
|
1428
|
-
self.logger.
|
|
1428
|
+
self.logger.success(f"Extracted isotopic distributions for {non_null_count}/{len(ms1_specs)} features.")
|
|
1429
1429
|
|
|
1430
1430
|
# Store parameters in history
|
|
1431
1431
|
params_dict = {"rt_tolerance": rt_tolerance}
|
masster/sample/save.py
CHANGED
|
@@ -148,10 +148,10 @@ def export_features(self, filename="features.csv"):
|
|
|
148
148
|
)
|
|
149
149
|
if filename.lower().endswith((".xls", ".xlsx")):
|
|
150
150
|
clean_df.to_pandas().to_excel(filename, index=False)
|
|
151
|
-
self.logger.
|
|
151
|
+
self.logger.success(f"Features exported to {filename} (Excel format)")
|
|
152
152
|
else:
|
|
153
153
|
clean_df.write_csv(filename)
|
|
154
|
-
self.logger.
|
|
154
|
+
self.logger.success(f"Features exported to {filename}")
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
def export_mgf(
|
|
@@ -649,7 +649,7 @@ def export_mgf(
|
|
|
649
649
|
elif result == "empty_ms2":
|
|
650
650
|
empty_ms2_count += 1
|
|
651
651
|
|
|
652
|
-
self.logger.
|
|
652
|
+
self.logger.success(f"Exported {ms1_spec_used_count} MS1 spectra and {c} MS2 spectra to {filename}")
|
|
653
653
|
if empty_ms2_count > 0:
|
|
654
654
|
self.logger.info(f"Skipped {empty_ms2_count} empty MS2 spectra")
|
|
655
655
|
if ms1_fallback_count > 0:
|
|
@@ -824,7 +824,7 @@ def export_dda_stats(self, filename="stats.csv"):
|
|
|
824
824
|
for line in lines:
|
|
825
825
|
f.write(line + "\n")
|
|
826
826
|
|
|
827
|
-
self.logger.
|
|
827
|
+
self.logger.success(f"DDA statistics exported to {filename}")
|
|
828
828
|
|
|
829
829
|
|
|
830
830
|
def export_xlsx(self, filename="features.xlsx"):
|
|
@@ -877,7 +877,7 @@ def export_xlsx(self, filename="features.xlsx"):
|
|
|
877
877
|
pandas_df = clean_df.to_pandas()
|
|
878
878
|
pandas_df.to_excel(filename, index=False)
|
|
879
879
|
|
|
880
|
-
self.logger.
|
|
880
|
+
self.logger.success(f"Features exported to {filename} (Excel format)")
|
|
881
881
|
self.logger.debug(f"Exported {len(clean_df)} features with {len(exportable_columns)} columns")
|
|
882
882
|
|
|
883
883
|
|
masster/study/h5.py
CHANGED
|
@@ -1738,7 +1738,7 @@ def _save_study5(self, filename):
|
|
|
1738
1738
|
)
|
|
1739
1739
|
pbar.update(1)
|
|
1740
1740
|
|
|
1741
|
-
self.logger.
|
|
1741
|
+
self.logger.success(f"Study saved successfully to {filename}")
|
|
1742
1742
|
self.logger.debug(f"Save completed for {filename}")
|
|
1743
1743
|
self.logger.debug(f"Save completed for {filename}")
|
|
1744
1744
|
|
masster/study/helpers.py
CHANGED
|
@@ -1440,7 +1440,7 @@ def compress(self, features=True, ms2=True, chrom=False, ms2_max=5):
|
|
|
1440
1440
|
self.compress_ms2(max_replicates=ms2_max)
|
|
1441
1441
|
if chrom:
|
|
1442
1442
|
self.compress_chrom()
|
|
1443
|
-
self.logger.
|
|
1443
|
+
self.logger.success("Compression completed")
|
|
1444
1444
|
|
|
1445
1445
|
|
|
1446
1446
|
def compress_features(self):
|
|
@@ -1886,7 +1886,7 @@ def restore_chrom(self, samples=None, mz_tol=0.010, rt_tol=10.0):
|
|
|
1886
1886
|
self.logger.error(f"Failed to gap-fill sample {sample_name}: {e}")
|
|
1887
1887
|
continue
|
|
1888
1888
|
|
|
1889
|
-
self.logger.
|
|
1889
|
+
self.logger.success(f"Phase 2 complete: Gap-filled {filled_count} chromatograms")
|
|
1890
1890
|
|
|
1891
1891
|
# Final summary
|
|
1892
1892
|
final_non_null = self.features_df.filter(pl.col("chrom").is_not_null()).height
|
|
@@ -2051,7 +2051,7 @@ def sample_name_replace(self, replace_dict):
|
|
|
2051
2051
|
pl.Series("sample_name", new_names).alias("sample_name"),
|
|
2052
2052
|
)
|
|
2053
2053
|
|
|
2054
|
-
self.logger.
|
|
2054
|
+
self.logger.success(f"Successfully replaced {replaced_count} sample names")
|
|
2055
2055
|
|
|
2056
2056
|
|
|
2057
2057
|
def sample_name_reset(self):
|
|
@@ -4622,7 +4622,7 @@ def decompress(self, features=True, ms2=True, chrom=True, samples=None, **kwargs
|
|
|
4622
4622
|
|
|
4623
4623
|
self.restore_ms2(samples=samples, **ms2_kwargs)
|
|
4624
4624
|
|
|
4625
|
-
self.logger.
|
|
4625
|
+
self.logger.success("Adaptive decompression completed successfully")
|
|
4626
4626
|
|
|
4627
4627
|
except Exception as e:
|
|
4628
4628
|
self.logger.error(f"Decompression failed: {e}")
|
masster/study/id.py
CHANGED
|
@@ -1093,7 +1093,7 @@ def id_reset(study):
|
|
|
1093
1093
|
del study.history["identify"]
|
|
1094
1094
|
|
|
1095
1095
|
if logger:
|
|
1096
|
-
logger.
|
|
1096
|
+
logger.success("Identification data reset completed")
|
|
1097
1097
|
|
|
1098
1098
|
|
|
1099
1099
|
def lib_reset(study):
|
|
@@ -1198,7 +1198,7 @@ def lib_reset(study):
|
|
|
1198
1198
|
del study.history["lib_to_consensus"]
|
|
1199
1199
|
|
|
1200
1200
|
if logger:
|
|
1201
|
-
logger.
|
|
1201
|
+
logger.success("Library and identification data reset completed")
|
|
1202
1202
|
|
|
1203
1203
|
|
|
1204
1204
|
def _get_adducts(study, adducts_list: list | None = None, **kwargs):
|
|
@@ -1978,4 +1978,4 @@ def lib_to_consensus(study, chrom_fhwm: float = 5.0, mz_tol: float = 0.01, rt_to
|
|
|
1978
1978
|
logger.warning(f"find_ms2 failed: {e}")
|
|
1979
1979
|
|
|
1980
1980
|
if logger:
|
|
1981
|
-
logger.
|
|
1981
|
+
logger.success(f"lib_to_consensus completed: {len(consensus_metadata)} features added")
|
masster/study/merge.py
CHANGED
|
@@ -818,7 +818,7 @@ def _merge_kd_chunked(study, params: merge_defaults, cached_adducts_df=None, cac
|
|
|
818
818
|
serialized_chunk_results.append((chunk_start_idx, consensus_features))
|
|
819
819
|
completed_chunks += 1
|
|
820
820
|
n_samples_in_chunk = len(chunk_data_list[chunk_idx]['chunk_samples_data'])
|
|
821
|
-
study.logger.
|
|
821
|
+
study.logger.success(f"Completed chunk {completed_chunks}/{total_chunks} (samples {chunk_start_idx + 1}-{chunk_start_idx + n_samples_in_chunk})")
|
|
822
822
|
except Exception as exc:
|
|
823
823
|
# Check if this is a BrokenProcessPool exception from Windows multiprocessing issues
|
|
824
824
|
if isinstance(exc, BrokenProcessPool) or "process pool" in str(exc).lower():
|
|
@@ -852,7 +852,7 @@ def _merge_kd_chunked(study, params: merge_defaults, cached_adducts_df=None, cac
|
|
|
852
852
|
serialized_chunk_results.append((chunk_start_idx, consensus_features))
|
|
853
853
|
completed_chunks += 1
|
|
854
854
|
n_samples_in_chunk = len(chunk_data_list[chunk_idx]['chunk_samples_data'])
|
|
855
|
-
study.logger.
|
|
855
|
+
study.logger.success(f"Completed chunk {completed_chunks}/{total_chunks} (samples {chunk_start_idx + 1}-{chunk_start_idx + n_samples_in_chunk})")
|
|
856
856
|
except Exception as exc:
|
|
857
857
|
study.logger.error(f"Chunk {chunk_idx} generated an exception: {exc}")
|
|
858
858
|
raise exc
|
|
@@ -993,7 +993,7 @@ def _merge_qt_chunked(study, params: merge_defaults, cached_adducts_df=None, cac
|
|
|
993
993
|
serialized_chunk_results.append((chunk_start_idx, consensus_features))
|
|
994
994
|
completed_chunks += 1
|
|
995
995
|
n_samples_in_chunk = len(chunk_data_list[chunk_idx]['chunk_samples_data'])
|
|
996
|
-
study.logger.
|
|
996
|
+
study.logger.success(f"Completed chunk {completed_chunks}/{total_chunks} (samples {chunk_start_idx + 1}-{chunk_start_idx + n_samples_in_chunk})")
|
|
997
997
|
except Exception as exc:
|
|
998
998
|
# Check if this is a BrokenProcessPool exception from Windows multiprocessing issues
|
|
999
999
|
if isinstance(exc, BrokenProcessPool) or "process pool" in str(exc).lower():
|
|
@@ -1027,7 +1027,7 @@ def _merge_qt_chunked(study, params: merge_defaults, cached_adducts_df=None, cac
|
|
|
1027
1027
|
serialized_chunk_results.append((chunk_start_idx, consensus_features))
|
|
1028
1028
|
completed_chunks += 1
|
|
1029
1029
|
n_samples_in_chunk = len(chunk_data_list[chunk_idx]['chunk_samples_data'])
|
|
1030
|
-
study.logger.
|
|
1030
|
+
study.logger.success(f"Completed chunk {completed_chunks}/{total_chunks} (samples {chunk_start_idx + 1}-{chunk_start_idx + n_samples_in_chunk})")
|
|
1031
1031
|
except Exception as exc:
|
|
1032
1032
|
study.logger.error(f"Chunk {chunk_idx} generated an exception: {exc}")
|
|
1033
1033
|
raise exc
|
masster/study/processing.py
CHANGED
|
@@ -290,7 +290,7 @@ def filter_consensus(
|
|
|
290
290
|
f"Filtered {after_quality - after_number_samples} entries based on number of samples. Remaining {after_number_samples} entries.",
|
|
291
291
|
)
|
|
292
292
|
|
|
293
|
-
self.logger.
|
|
293
|
+
self.logger.success(f"Filtering completed. {len(cons)} entries remaining.")
|
|
294
294
|
|
|
295
295
|
if inplace:
|
|
296
296
|
self.consensus_df = cons
|
|
@@ -1365,7 +1365,7 @@ def find_iso(self, rt_tol=0.1, mz_tol=0.01, uids=None):
|
|
|
1365
1365
|
# Count how many consensus features have isotope data
|
|
1366
1366
|
iso_count = sum(1 for data in consensus_iso_data.values() if data is not None and len(data) > 0)
|
|
1367
1367
|
|
|
1368
|
-
self.logger.
|
|
1368
|
+
self.logger.success(f"Optimized isotope detection completed. Found isotope patterns for {iso_count}/{len(self.consensus_df)} consensus features.")
|
|
1369
1369
|
|
|
1370
1370
|
|
|
1371
1371
|
def reset_iso(self):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
masster/__init__.py,sha256=ueZ224WPNRRjQEYTaQUol818nwQgJwB93HbEfmtPRmg,1041
|
|
2
|
-
masster/_version.py,sha256=
|
|
2
|
+
masster/_version.py,sha256=bhol39keZ-JZvzEVotG6tOww8JjVuPt66rihFwTiraE,256
|
|
3
3
|
masster/chromatogram.py,sha256=iYpdv8C17zVnlWvOFgAn9ns2uFGiF-GgoYf5QVVAbHs,19319
|
|
4
|
-
masster/logger.py,sha256=
|
|
4
|
+
masster/logger.py,sha256=XT2gUcUIct8LWzTp9n484g5MaB89toT76CGA41oBvfA,18375
|
|
5
5
|
masster/spectrum.py,sha256=TWIgDcl0lveG40cLVZTWGp8-FxMolu-P8EjZyRBtXL4,49850
|
|
6
6
|
masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_DDA_OT_C-MiLUT_QC_dil2_01_20250602151849.sample5,sha256=LdJMF8uLoDm9ixZNHBoOzBH6hX7NGY7vTvqa2Pzetb8,6539174
|
|
7
7
|
masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_DDA_OT_C-MiLUT_QC_dil3_01_20250602150634.sample5,sha256=hWUfslGoOTiQw59jENSBXP4sa6DdkbOi40FJ68ep61Q,6956773
|
|
@@ -20,17 +20,17 @@ masster/lib/__init__.py,sha256=TcePNx3SYZHz6763TL9Sg4gUNXaRWjlrOtyS6vsu-hg,178
|
|
|
20
20
|
masster/lib/lib.py,sha256=SSN06UtiM-hIdjS3eCiIHsJ_8S4YHRGOLGmdPIh-efo,27481
|
|
21
21
|
masster/sample/__init__.py,sha256=HL0m1ept0PMAYUCQtDDnkdOS12IFl6oLAq4TZQz83uY,170
|
|
22
22
|
masster/sample/adducts.py,sha256=nl5KEuat0hvktgar6Ca4PbY8JXt9SD05EeTn0HOKt64,32592
|
|
23
|
-
masster/sample/h5.py,sha256=
|
|
23
|
+
masster/sample/h5.py,sha256=X5VBHBpgJ2FJc9mtCggJ1HSQ3ujRmb1Wnpr9sJ8bGVA,115445
|
|
24
24
|
masster/sample/helpers.py,sha256=27eZFFidr02-DlSi4-eF4bpSk_y-qU3eoFCAOshRO20,42138
|
|
25
25
|
masster/sample/lib.py,sha256=E-j9c3Wd8f9a-H8xj7CAOwlA8KcyXPoFyYm3c8r7LtI,33755
|
|
26
26
|
masster/sample/load.py,sha256=swjRBCoFGni9iPztHIKPVB5ru_xDMVryB_inPXdujTw,51819
|
|
27
27
|
masster/sample/parameters.py,sha256=Gg2KcuNbV_wZ_Wwv93QlM5J19ji0oSIvZLPV1NoBmq0,4456
|
|
28
|
-
masster/sample/plot.py,sha256
|
|
29
|
-
masster/sample/processing.py,sha256=
|
|
28
|
+
masster/sample/plot.py,sha256=3_2SO88uTird4cSlrVAZofuIrxjQDIIAH2l0ESxddB8,86629
|
|
29
|
+
masster/sample/processing.py,sha256=uqa5QeXJSo3b6bg3Xl62vkaDxz09NLAXJekBFrPDe_Q,55924
|
|
30
30
|
masster/sample/quant.py,sha256=tHNjvUFTdehKR31BXBZnVsBxMD9XJHgaltITOjr71uE,7562
|
|
31
31
|
masster/sample/sample.py,sha256=VhQik_ev1liRqGUtbZvV1NOjfFzgfZI1orfQT87gai4,20643
|
|
32
32
|
masster/sample/sample5_schema.json,sha256=H5e2T6rHIDzul2kp_yP-ILUUWUpW08wP2pEQjMR0nSk,3977
|
|
33
|
-
masster/sample/save.py,sha256=
|
|
33
|
+
masster/sample/save.py,sha256=pbiRoWEA2DnhDKmMJncjveNlBqizJLOVRm5cug4ZwyM,38658
|
|
34
34
|
masster/sample/sciex.py,sha256=vnbxsq_qnAQVuzcpziP1o3IC4kM5amGBcPmC2TAuDLw,46319
|
|
35
35
|
masster/sample/defaults/__init__.py,sha256=A09AOP44cxD_oYohyt7XFUho0zndRcrzVD4DUaGnKH4,447
|
|
36
36
|
masster/sample/defaults/find_adducts_def.py,sha256=Bu2KiBJRxD0SAnOPNMm_Nk-6fx6QYoRXjFNGzz-0_o0,13570
|
|
@@ -41,14 +41,14 @@ masster/sample/defaults/sample_def.py,sha256=keoXyMyrm_iLgbYqfIbqCpJ3XHBVlNwCNmb
|
|
|
41
41
|
masster/study/__init__.py,sha256=55axdFuqRX4aXtJ8ocnhcLB32fNtmmJpCi58moO0r4g,237
|
|
42
42
|
masster/study/analysis.py,sha256=L-wXBnGZCLB5UUDrjIdOiMG9zdej3Tw_SftcEmmTukM,84264
|
|
43
43
|
masster/study/export.py,sha256=joFK9jip2UM4lVAvhkdKVeUdNdM4D8uP2WE49IaVJgw,60172
|
|
44
|
-
masster/study/h5.py,sha256=
|
|
45
|
-
masster/study/helpers.py,sha256=
|
|
46
|
-
masster/study/id.py,sha256=
|
|
44
|
+
masster/study/h5.py,sha256=hLp3sd95MRMBwMsLDbC1SXsYKeIlIdUG6-lChTJxuHw,95367
|
|
45
|
+
masster/study/helpers.py,sha256=Y96XJsxo0IuuMh_u1asxJeSjjvR3PUp5RAXIACty8QM,190846
|
|
46
|
+
masster/study/id.py,sha256=heKU309cUsNeFxbWYvqxVIAJLrR1H0YqMgLanLx9Do4,80091
|
|
47
47
|
masster/study/load.py,sha256=7d11294YYEGrSKox3cwvetv2vqcstYT1SnyAhHH5V_Q,107706
|
|
48
|
-
masster/study/merge.py,sha256
|
|
48
|
+
masster/study/merge.py,sha256=_-J29kYu65S9wE5bgxMdsmPcf_VupVxWmjGpqKWJDI0,169513
|
|
49
49
|
masster/study/parameters.py,sha256=bTvmcwX9INxzcrEAmTiFH8qeWVhwkvMTZjuP394pz5o,3279
|
|
50
50
|
masster/study/plot.py,sha256=LEIzoYiUyq1aswh-sw8S-ESvN2DaQKN5l22yLW8gZe8,107647
|
|
51
|
-
masster/study/processing.py,sha256=
|
|
51
|
+
masster/study/processing.py,sha256=8TB6olWoda5ytz7-kSqGXmniYVnMnUj7-J6Szcoc8Fg,58544
|
|
52
52
|
masster/study/save.py,sha256=47AP518epJJ9TjaGGyrLKsMsyjIk8_J4ka7bmsnRtFQ,9268
|
|
53
53
|
masster/study/study.py,sha256=gudugPJk3LOtZh-YsszSRCBDrBG78cexoG0CSM86EPs,38701
|
|
54
54
|
masster/study/study5_schema.json,sha256=0IZxM9VVI0TUlx74BPzJDT44kySi6NZZ6iLR0j8bU_s,7736
|
|
@@ -67,8 +67,8 @@ masster/wizard/README.md,sha256=mL1A3YWJZOefpJ6D0-HqGLkVRmUlOpwyVFdvJBeeoZM,1414
|
|
|
67
67
|
masster/wizard/__init__.py,sha256=a2hcZnHASjfuw1lqZhZnvTR58rc33rRnoGAY_JfvGhI,683
|
|
68
68
|
masster/wizard/example.py,sha256=xEZFTH9UZ8HKOm6s3JL8Js0Uw5ChnISWBHSZCL32vsM,7983
|
|
69
69
|
masster/wizard/wizard.py,sha256=UobIGFZtp1s_9WJlpl6DQ2-pp7flPQ6dlYZJqYE92OM,38131
|
|
70
|
-
masster-0.5.
|
|
71
|
-
masster-0.5.
|
|
72
|
-
masster-0.5.
|
|
73
|
-
masster-0.5.
|
|
74
|
-
masster-0.5.
|
|
70
|
+
masster-0.5.9.dist-info/METADATA,sha256=atBSD9cWS2CByNIoDwdlY3c3oZa_7CRvQmObin496hU,45113
|
|
71
|
+
masster-0.5.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
72
|
+
masster-0.5.9.dist-info/entry_points.txt,sha256=ZHguQ_vPmdbpqq2uGtmEOLJfgP-DQ1T0c07Lxh30wc8,58
|
|
73
|
+
masster-0.5.9.dist-info/licenses/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
|
|
74
|
+
masster-0.5.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|