masster 0.3.18__py3-none-any.whl → 0.3.20__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/__init__.py +2 -0
- masster/_version.py +1 -1
- masster/data/libs/README.md +17 -0
- masster/data/libs/ccm.py +533 -0
- masster/data/libs/central_carbon_README.md +17 -0
- masster/data/libs/central_carbon_metabolites.csv +120 -0
- masster/data/libs/urine.py +333 -0
- masster/data/libs/urine_metabolites.csv +51 -0
- masster/sample/h5.py +1 -1
- masster/sample/helpers.py +3 -7
- masster/sample/lib.py +32 -25
- masster/sample/load.py +9 -3
- masster/sample/plot.py +113 -27
- masster/study/export.py +27 -10
- masster/study/h5.py +58 -40
- masster/study/helpers.py +450 -196
- masster/study/helpers_optimized.py +5 -5
- masster/study/load.py +144 -118
- masster/study/plot.py +691 -277
- masster/study/processing.py +9 -5
- masster/study/study.py +6 -6
- {masster-0.3.18.dist-info → masster-0.3.20.dist-info}/METADATA +1 -1
- {masster-0.3.18.dist-info → masster-0.3.20.dist-info}/RECORD +31 -25
- /masster/data/{examples → wiff}/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.mzML +0 -0
- /masster/data/{examples → wiff}/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.timeseries.data +0 -0
- /masster/data/{examples → wiff}/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff +0 -0
- /masster/data/{examples → wiff}/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff.scan +0 -0
- /masster/data/{examples → wiff}/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff2 +0 -0
- {masster-0.3.18.dist-info → masster-0.3.20.dist-info}/WHEEL +0 -0
- {masster-0.3.18.dist-info → masster-0.3.20.dist-info}/entry_points.txt +0 -0
- {masster-0.3.18.dist-info → masster-0.3.20.dist-info}/licenses/LICENSE +0 -0
masster/study/processing.py
CHANGED
|
@@ -193,9 +193,13 @@ def align(self, **kwargs):
|
|
|
193
193
|
new_cols = [pl.Series("rt", current_rt)]
|
|
194
194
|
|
|
195
195
|
# Update rt_original if corresponding updates were collected
|
|
196
|
-
if
|
|
196
|
+
if "all_update_rt_original" in locals() and all_update_rt_original:
|
|
197
197
|
try:
|
|
198
|
-
current_rt_orig =
|
|
198
|
+
current_rt_orig = (
|
|
199
|
+
self.features_df["rt_original"].to_list()
|
|
200
|
+
if "rt_original" in self.features_df.columns
|
|
201
|
+
else [None] * self.features_df.height
|
|
202
|
+
)
|
|
199
203
|
except Exception:
|
|
200
204
|
current_rt_orig = [None] * self.features_df.height
|
|
201
205
|
|
|
@@ -570,15 +574,15 @@ def merge(self, **kwargs):
|
|
|
570
574
|
min_samples = 1
|
|
571
575
|
if min_samples < 1:
|
|
572
576
|
min_samples = int(min_samples * len(self.samples_df))
|
|
573
|
-
|
|
577
|
+
|
|
574
578
|
# Validate that min_samples doesn't exceed the number of samples
|
|
575
579
|
if min_samples > len(self.samples_df):
|
|
576
580
|
self.logger.warning(
|
|
577
581
|
f"min_samples ({min_samples}) exceeds the number of samples ({len(self.samples_df)}). "
|
|
578
|
-
f"Setting min_samples to {len(self.samples_df)}."
|
|
582
|
+
f"Setting min_samples to {len(self.samples_df)}.",
|
|
579
583
|
)
|
|
580
584
|
min_samples = len(self.samples_df)
|
|
581
|
-
|
|
585
|
+
|
|
582
586
|
# filter out consensus features with less than min_samples features
|
|
583
587
|
l1 = len(self.consensus_df)
|
|
584
588
|
self.consensus_df = self.consensus_df.filter(
|
masster/study/study.py
CHANGED
|
@@ -50,7 +50,6 @@ import os
|
|
|
50
50
|
import sys
|
|
51
51
|
|
|
52
52
|
import polars as pl
|
|
53
|
-
import numpy as np
|
|
54
53
|
|
|
55
54
|
# Study-specific imports
|
|
56
55
|
from masster.study.h5 import _load_study5
|
|
@@ -66,6 +65,8 @@ from masster.study.helpers import compress_ms2
|
|
|
66
65
|
from masster.study.helpers import compress_chrom
|
|
67
66
|
from masster.study.helpers import restore_features
|
|
68
67
|
from masster.study.helpers import restore_chrom
|
|
68
|
+
from masster.study.helpers import restore_ms2
|
|
69
|
+
from masster.study.helpers import decompress
|
|
69
70
|
from masster.study.helpers import fill_reset
|
|
70
71
|
from masster.study.helpers import get_chrom
|
|
71
72
|
from masster.study.helpers import get_sample
|
|
@@ -90,7 +91,6 @@ from masster.study.helpers import features_delete
|
|
|
90
91
|
from masster.study.helpers import consensus_select
|
|
91
92
|
from masster.study.helpers import consensus_filter
|
|
92
93
|
from masster.study.helpers import consensus_delete
|
|
93
|
-
from masster.study.helpers import migrate_map_id_to_index
|
|
94
94
|
from masster.study.load import add
|
|
95
95
|
from masster.study.load import add_sample
|
|
96
96
|
from masster.study.load import _add_samples_batch
|
|
@@ -337,8 +337,6 @@ class Study:
|
|
|
337
337
|
# cache for Sample instances created/loaded by this Study
|
|
338
338
|
self._samples_cache = {}
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
342
340
|
# Attach module functions as class methods
|
|
343
341
|
load = load
|
|
344
342
|
save = save
|
|
@@ -377,6 +375,8 @@ class Study:
|
|
|
377
375
|
compress_chrom = compress_chrom
|
|
378
376
|
restore_features = restore_features
|
|
379
377
|
restore_chrom = restore_chrom
|
|
378
|
+
restore_ms2 = restore_ms2
|
|
379
|
+
decompress = decompress
|
|
380
380
|
fill_reset = fill_reset
|
|
381
381
|
align_reset = align_reset
|
|
382
382
|
set_source = set_source
|
|
@@ -628,13 +628,13 @@ class Study:
|
|
|
628
628
|
try:
|
|
629
629
|
self.features_df = self.features_df.with_columns(pl.col("feature_uid").cast(pl.Int64))
|
|
630
630
|
self.consensus_mapping_df = self.consensus_mapping_df.with_columns(
|
|
631
|
-
pl.col("feature_uid").cast(pl.Int64)
|
|
631
|
+
pl.col("feature_uid").cast(pl.Int64),
|
|
632
632
|
)
|
|
633
633
|
except Exception:
|
|
634
634
|
# If casting to Int64 fails, cast both to string
|
|
635
635
|
self.features_df = self.features_df.with_columns(pl.col("feature_uid").cast(pl.Utf8))
|
|
636
636
|
self.consensus_mapping_df = self.consensus_mapping_df.with_columns(
|
|
637
|
-
pl.col("feature_uid").cast(pl.Utf8)
|
|
637
|
+
pl.col("feature_uid").cast(pl.Utf8),
|
|
638
638
|
)
|
|
639
639
|
|
|
640
640
|
# Use more efficient counting - count non-null chroms only for features in consensus mapping
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
masster/__init__.py,sha256=
|
|
2
|
-
masster/_version.py,sha256=
|
|
1
|
+
masster/__init__.py,sha256=8U4cIteNlYyHDrxWSbB_MsDKCX9tds07SJG8-vh8Oa8,738
|
|
2
|
+
masster/_version.py,sha256=vFHeK1lVnRkJ-mBdglb7C3euLIdzNe-vq8ZrZCuimp0,257
|
|
3
3
|
masster/chromatogram.py,sha256=NgPr1uLGJHjRu6PWZZGOrS3pCl7sye1yQCJjlRi9ZSY,19305
|
|
4
4
|
masster/logger.py,sha256=W50V_uh8RSYwGxDrDFhOuj5jpu2tKJyt_16lMw9kQwA,14755
|
|
5
5
|
masster/spectrum.py,sha256=7wKQes97sI-O2lxrkQnYuoroXFyAWgwSzS4TnjUX8RY,47710
|
|
6
|
-
masster/data/
|
|
7
|
-
masster/data/
|
|
8
|
-
masster/data/
|
|
9
|
-
masster/data/
|
|
10
|
-
masster/data/
|
|
6
|
+
masster/data/libs/README.md,sha256=bjODMSbzAcdKLUFB4tfC3a-yOo-oWwqBfONMMNDYES4,987
|
|
7
|
+
masster/data/libs/ccm.py,sha256=fwkj4gDmsitv_wzcmgk7IcQEBRsbE9E7Nq1nf3VX8P4,18129
|
|
8
|
+
masster/data/libs/central_carbon_README.md,sha256=kse10ijMWdyGv02tK90zQhWzdN6hoXfEjzdezRptt2I,919
|
|
9
|
+
masster/data/libs/central_carbon_metabolites.csv,sha256=heiYADAi6OScPGSp9aX7XhNGOFup6Z97y3phhsPXrzo,10646
|
|
10
|
+
masster/data/libs/urine.py,sha256=HPas5ABPciexFIEM6rV3ok6Lw_eKlqeUTCFA0mebOWk,12873
|
|
11
|
+
masster/data/libs/urine_metabolites.csv,sha256=gdzxTbOxbZTjKlHQDv7aBDgMBJQ9b25TMao9OSgAhKk,1870
|
|
12
|
+
masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.mzML,sha256=3RS_crLN-aoPSacMYaQ45sxszmp_EcQElrg8tiuAQyA,39741920
|
|
13
|
+
masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.timeseries.data,sha256=01vC6m__Qqm2rLvlTMZoeKIKowFvovBTUnrNl8Uav3E,24576
|
|
14
|
+
masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff,sha256=go5N9gAM1rn4PZAVaoCmdteY9f7YGEM9gyPdSmkQ8PE,1447936
|
|
15
|
+
masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff.scan,sha256=ahi1Y3UhAj9Bj4Q2MlbgPekNdkJvMOoMXVOoR6CeIxc,13881220
|
|
16
|
+
masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff2,sha256=TFB0HW4Agkig6yht7FtgjUdbXax8jjKaHpSZSvuU5vs,3252224
|
|
11
17
|
masster/sample/__init__.py,sha256=HL0m1ept0PMAYUCQtDDnkdOS12IFl6oLAq4TZQz83uY,170
|
|
12
|
-
masster/sample/h5.py,sha256=
|
|
13
|
-
masster/sample/helpers.py,sha256=
|
|
14
|
-
masster/sample/lib.py,sha256=
|
|
15
|
-
masster/sample/load.py,sha256=
|
|
18
|
+
masster/sample/h5.py,sha256=ynyHx1SN3F0OYgjhazFfjNseLu48MLV9r-aFIFdfqJE,98038
|
|
19
|
+
masster/sample/helpers.py,sha256=cCla29eTjAhcU5BPQJNr8KZWPD1IKjJj20tx5IrCaWM,36488
|
|
20
|
+
masster/sample/lib.py,sha256=abBEnHjItVCp_20qNT9xGdqBrKX4LL_4z4P6mNQuGRQ,33757
|
|
21
|
+
masster/sample/load.py,sha256=IJTIfg_-UAhBSYRRm2FnZDQv4yqoZCJ3ZQYA0W__iMg,50370
|
|
16
22
|
masster/sample/parameters.py,sha256=Gg2KcuNbV_wZ_Wwv93QlM5J19ji0oSIvZLPV1NoBmq0,4456
|
|
17
|
-
masster/sample/plot.py,sha256=
|
|
23
|
+
masster/sample/plot.py,sha256=ynF4xNs2QPIYGButT-HkrofbYZPeLtyBXo15AOJKH7M,82783
|
|
18
24
|
masster/sample/processing.py,sha256=-H93MEUysA-B9PB4nU31WFjtaU_flqbu2gY35ce4vVs,57827
|
|
19
25
|
masster/sample/quant.py,sha256=tHNjvUFTdehKR31BXBZnVsBxMD9XJHgaltITOjr71uE,7562
|
|
20
26
|
masster/sample/sample.py,sha256=2Hq3mUZHAN8AVw_-1m5v7Jg1-yqF5Pv7AWWBlhEDSXo,17096
|
|
@@ -28,16 +34,16 @@ masster/sample/defaults/find_ms2_def.py,sha256=KTELMAnioGLYbhzAwOgK14TZqboPEvzeB
|
|
|
28
34
|
masster/sample/defaults/get_spectrum_def.py,sha256=o62p31PhGd-LiIkTOzKQhwPtnO2AtQDHcPu-O-YoQPs,11460
|
|
29
35
|
masster/sample/defaults/sample_def.py,sha256=keoXyMyrm_iLgbYqfIbqCpJ3XHBVlNwCNmb5iMQL0iY,14579
|
|
30
36
|
masster/study/__init__.py,sha256=Zspv6U8jFqjkHGYdNdDy1rfUnCSolCzUdgSSg98PRgE,166
|
|
31
|
-
masster/study/export.py,sha256=
|
|
32
|
-
masster/study/h5.py,sha256=
|
|
33
|
-
masster/study/helpers.py,sha256=
|
|
34
|
-
masster/study/helpers_optimized.py,sha256=
|
|
35
|
-
masster/study/load.py,sha256=
|
|
37
|
+
masster/study/export.py,sha256=VywMv0g8Qy_SiWS9V1pw7Q6uYfHGORQ_W9U-iLUciVo,30112
|
|
38
|
+
masster/study/h5.py,sha256=I_yIKWW6zqI_xAq6sJ4uPs3EBWYMTMqiSTdy6VmN04o,72153
|
|
39
|
+
masster/study/helpers.py,sha256=9WuzoNWaTSetkvfFY2y2mK4h8u2L_seAKZfGtBrgFQw,144856
|
|
40
|
+
masster/study/helpers_optimized.py,sha256=5qf6tiLPgsOSna9XVtTrx2B0GJ1wI8ZTrSv8n8MtxNg,13927
|
|
41
|
+
masster/study/load.py,sha256=BhH_dRugsieFvFTZq3jC3W8VHAh2JoGj_swQDnD3gUU,65091
|
|
36
42
|
masster/study/parameters.py,sha256=0elaF7YspTsB7qyajWAbRNL2VfKlGz5GJLifmO8IGkk,3276
|
|
37
|
-
masster/study/plot.py,sha256=
|
|
38
|
-
masster/study/processing.py,sha256=
|
|
43
|
+
masster/study/plot.py,sha256=Lx9BQz3rEZ6qqLQvUX_YsNA4eX4vIWzFW8hxwJRkGMU,94430
|
|
44
|
+
masster/study/processing.py,sha256=Da__6itJBbW4EwhCMBju4jytxgTLsGS8yWDt8S6V-DU,53379
|
|
39
45
|
masster/study/save.py,sha256=YjFEiuiB4OFLVvW_AX4-kgnsbjCWrYZeqF85VNEtbdw,6560
|
|
40
|
-
masster/study/study.py,sha256=
|
|
46
|
+
masster/study/study.py,sha256=3ox8wIFlee_R0wUwV7Jmq3Y49pqpyGBM_XwW5rACM8k,31796
|
|
41
47
|
masster/study/study5_schema.json,sha256=Fwt6U6r1J1BQxwR8ArFv1yN_2Cq1tt3tadS2sQCzjhg,5379
|
|
42
48
|
masster/study/defaults/__init__.py,sha256=m3Z5KXGqsTdh7GjYzZoENERt39yRg0ceVRV1DeCt1P0,610
|
|
43
49
|
masster/study/defaults/align_def.py,sha256=K_6xh7B1vf96maYIBTDZGjyA2zBHEgIP5ASzD9--n2Y,20241
|
|
@@ -50,8 +56,8 @@ masster/study/defaults/integrate_chrom_def.py,sha256=0MNIWGTjty-Zu-NTQsIweuj3UVq
|
|
|
50
56
|
masster/study/defaults/integrate_def.py,sha256=Vf4SAzdBfnsSZ3IRaF0qZvWu3gMDPHdgPfMYoPKeWv8,7246
|
|
51
57
|
masster/study/defaults/merge_def.py,sha256=EBsKE3hsAkTEzN9dpdRD5W3_suTKy_WZ_96rwS0uBuE,8572
|
|
52
58
|
masster/study/defaults/study_def.py,sha256=v2V5i5y288gydhMOM78m8u_GaWC2XdjLM5nJP6e17sI,10476
|
|
53
|
-
masster-0.3.
|
|
54
|
-
masster-0.3.
|
|
55
|
-
masster-0.3.
|
|
56
|
-
masster-0.3.
|
|
57
|
-
masster-0.3.
|
|
59
|
+
masster-0.3.20.dist-info/METADATA,sha256=Kmil3q9BHG7ikwUWKwwEDXuP_3Tw59x3VxpJtkjz5ew,44320
|
|
60
|
+
masster-0.3.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
61
|
+
masster-0.3.20.dist-info/entry_points.txt,sha256=ZHguQ_vPmdbpqq2uGtmEOLJfgP-DQ1T0c07Lxh30wc8,58
|
|
62
|
+
masster-0.3.20.dist-info/licenses/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
|
|
63
|
+
masster-0.3.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|