masster 0.3.12__tar.gz → 0.3.13__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.12 → masster-0.3.13}/PKG-INFO +1 -1
- {masster-0.3.12 → masster-0.3.13}/pyproject.toml +1 -1
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/load.py +28 -2
- {masster-0.3.12 → masster-0.3.13}/uv.lock +1 -1
- {masster-0.3.12 → masster-0.3.13}/.github/workflows/publish.yml +0 -0
- {masster-0.3.12 → masster-0.3.13}/.github/workflows/security.yml +0 -0
- {masster-0.3.12 → masster-0.3.13}/.github/workflows/test.yml +0 -0
- {masster-0.3.12 → masster-0.3.13}/.gitignore +0 -0
- {masster-0.3.12 → masster-0.3.13}/.pre-commit-config.yaml +0 -0
- {masster-0.3.12 → masster-0.3.13}/LICENSE +0 -0
- {masster-0.3.12 → masster-0.3.13}/Makefile +0 -0
- {masster-0.3.12 → masster-0.3.13}/README.md +0 -0
- {masster-0.3.12 → masster-0.3.13}/TESTING.md +0 -0
- {masster-0.3.12 → masster-0.3.13}/demo/example_batch_process.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/demo/example_sample_process.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/__init__.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/_version.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/chromatogram.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/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.12 → masster-0.3.13}/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.12 → masster-0.3.13}/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.12 → masster-0.3.13}/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.12 → masster-0.3.13}/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.12 → masster-0.3.13}/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.12 → masster-0.3.13}/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.12 → masster-0.3.13}/src/masster/docs/SCX_API_Documentation.md +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/docs/SCX_DLL_Analysis.md +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/logger.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/__init__.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/defaults/__init__.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/defaults/find_adducts_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/defaults/find_features_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/defaults/find_ms2_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/defaults/get_spectrum_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/defaults/sample_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/h5.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/helpers.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/lib.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/load.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/parameters.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/plot.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/processing.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/quant.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/sample.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/sample5_schema.json +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/save.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/sample/sciex.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/spectrum.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/__init__.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/__init__.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/align_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/export_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/fill_chrom_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/fill_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/find_consensus_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/find_ms2_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/integrate_chrom_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/integrate_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/merge_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/defaults/study_def.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/export.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/h5.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/helpers.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/helpers_optimized.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/parameters.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/plot.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/processing.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/save.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/study.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/src/masster/study/study5_schema.json +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/conftest.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_chromatogram.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_defaults.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_imports.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_integration.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_logger.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_parameters.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_sample.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_spectrum.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_study.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tests/test_version.py +0 -0
- {masster-0.3.12 → masster-0.3.13}/tox.ini +0 -0
|
@@ -170,7 +170,7 @@ def add_sample(self, file, type=None, reset=False, adducts=None):
|
|
|
170
170
|
self.logger.error(f"Unsupported file format: {file}")
|
|
171
171
|
return
|
|
172
172
|
if ddaobj.features_df is None and not reset:
|
|
173
|
-
self.logger.
|
|
173
|
+
self.logger.debug(
|
|
174
174
|
f"File {file} will be newly processed.",
|
|
175
175
|
)
|
|
176
176
|
ddaobj.features = None
|
|
@@ -278,8 +278,34 @@ def add_sample(self, file, type=None, reset=False, adducts=None):
|
|
|
278
278
|
).select(
|
|
279
279
|
["feature_uid"] + [col for col in f_df.columns if col != "feature_uid"],
|
|
280
280
|
)
|
|
281
|
-
self.features_df = pl.concat([self.features_df, f_df])
|
|
282
281
|
|
|
282
|
+
# Reorganize f_df columns to match self.features_df column order and schema
|
|
283
|
+
target_columns = self.features_df.columns
|
|
284
|
+
target_schema = self.features_df.schema
|
|
285
|
+
f_df_columns = f_df.columns
|
|
286
|
+
|
|
287
|
+
# Create select expressions for reordering and type casting
|
|
288
|
+
select_exprs = []
|
|
289
|
+
for col in target_columns:
|
|
290
|
+
if col in f_df_columns:
|
|
291
|
+
# Cast to the expected type
|
|
292
|
+
expected_dtype = target_schema[col]
|
|
293
|
+
select_exprs.append(pl.col(col).cast(expected_dtype, strict=False))
|
|
294
|
+
else:
|
|
295
|
+
# Add missing columns with null values of the correct type
|
|
296
|
+
expected_dtype = target_schema[col]
|
|
297
|
+
select_exprs.append(pl.lit(None, dtype=expected_dtype).alias(col))
|
|
298
|
+
|
|
299
|
+
# Add any extra columns from f_df that aren't in target_columns (keep their original types)
|
|
300
|
+
for col in f_df_columns:
|
|
301
|
+
if col not in target_columns:
|
|
302
|
+
select_exprs.append(pl.col(col))
|
|
303
|
+
|
|
304
|
+
# Reorder and type-cast f_df columns
|
|
305
|
+
f_df = f_df.select(select_exprs)
|
|
306
|
+
|
|
307
|
+
self.features_df = pl.concat([self.features_df, f_df])
|
|
308
|
+
|
|
283
309
|
# Ensure features_df column order matches schema
|
|
284
310
|
self._ensure_features_df_schema_order()
|
|
285
311
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|