masster 0.3.17__py3-none-any.whl → 0.3.19__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/sample/h5.py +1 -1
- masster/sample/helpers.py +3 -7
- masster/sample/load.py +2 -2
- masster/sample/plot.py +2 -1
- masster/study/export.py +27 -10
- masster/study/h5.py +58 -40
- masster/study/helpers.py +275 -225
- masster/study/helpers_optimized.py +5 -5
- masster/study/load.py +148 -121
- masster/study/plot.py +306 -106
- masster/study/processing.py +9 -5
- masster/study/study.py +2 -6
- {masster-0.3.17.dist-info → masster-0.3.19.dist-info}/METADATA +1 -1
- {masster-0.3.17.dist-info → masster-0.3.19.dist-info}/RECORD +18 -18
- {masster-0.3.17.dist-info → masster-0.3.19.dist-info}/WHEEL +0 -0
- {masster-0.3.17.dist-info → masster-0.3.19.dist-info}/entry_points.txt +0 -0
- {masster-0.3.17.dist-info → masster-0.3.19.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
|
|
@@ -90,7 +89,6 @@ from masster.study.helpers import features_delete
|
|
|
90
89
|
from masster.study.helpers import consensus_select
|
|
91
90
|
from masster.study.helpers import consensus_filter
|
|
92
91
|
from masster.study.helpers import consensus_delete
|
|
93
|
-
from masster.study.helpers import migrate_map_id_to_index
|
|
94
92
|
from masster.study.load import add
|
|
95
93
|
from masster.study.load import add_sample
|
|
96
94
|
from masster.study.load import _add_samples_batch
|
|
@@ -337,8 +335,6 @@ class Study:
|
|
|
337
335
|
# cache for Sample instances created/loaded by this Study
|
|
338
336
|
self._samples_cache = {}
|
|
339
337
|
|
|
340
|
-
|
|
341
|
-
|
|
342
338
|
# Attach module functions as class methods
|
|
343
339
|
load = load
|
|
344
340
|
save = save
|
|
@@ -628,13 +624,13 @@ class Study:
|
|
|
628
624
|
try:
|
|
629
625
|
self.features_df = self.features_df.with_columns(pl.col("feature_uid").cast(pl.Int64))
|
|
630
626
|
self.consensus_mapping_df = self.consensus_mapping_df.with_columns(
|
|
631
|
-
pl.col("feature_uid").cast(pl.Int64)
|
|
627
|
+
pl.col("feature_uid").cast(pl.Int64),
|
|
632
628
|
)
|
|
633
629
|
except Exception:
|
|
634
630
|
# If casting to Int64 fails, cast both to string
|
|
635
631
|
self.features_df = self.features_df.with_columns(pl.col("feature_uid").cast(pl.Utf8))
|
|
636
632
|
self.consensus_mapping_df = self.consensus_mapping_df.with_columns(
|
|
637
|
-
pl.col("feature_uid").cast(pl.Utf8)
|
|
633
|
+
pl.col("feature_uid").cast(pl.Utf8),
|
|
638
634
|
)
|
|
639
635
|
|
|
640
636
|
# Use more efficient counting - count non-null chroms only for features in consensus mapping
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
masster/__init__.py,sha256=G7hbKO8F_o1wFwQlvO25M8JYGka_YSAVU2_O__2rjlI,697
|
|
2
|
-
masster/_version.py,sha256=
|
|
2
|
+
masster/_version.py,sha256=ecq759nZdue8MANCQ4Z6AN_HXLQBHypeqUdvMWoWj_E,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
|
|
@@ -9,12 +9,12 @@ masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005m
|
|
|
9
9
|
masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff.scan,sha256=ahi1Y3UhAj9Bj4Q2MlbgPekNdkJvMOoMXVOoR6CeIxc,13881220
|
|
10
10
|
masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff2,sha256=TFB0HW4Agkig6yht7FtgjUdbXax8jjKaHpSZSvuU5vs,3252224
|
|
11
11
|
masster/sample/__init__.py,sha256=HL0m1ept0PMAYUCQtDDnkdOS12IFl6oLAq4TZQz83uY,170
|
|
12
|
-
masster/sample/h5.py,sha256=
|
|
13
|
-
masster/sample/helpers.py,sha256=
|
|
12
|
+
masster/sample/h5.py,sha256=ynyHx1SN3F0OYgjhazFfjNseLu48MLV9r-aFIFdfqJE,98038
|
|
13
|
+
masster/sample/helpers.py,sha256=cCla29eTjAhcU5BPQJNr8KZWPD1IKjJj20tx5IrCaWM,36488
|
|
14
14
|
masster/sample/lib.py,sha256=l5YdU9TxEWJI0kJxXxrRCxgDDwbzO5zBf1_Qi_HY87w,33556
|
|
15
|
-
masster/sample/load.py,sha256=
|
|
15
|
+
masster/sample/load.py,sha256=J51EzuWc1i4fc2AOXb7vWDHm6D7fvolMJjBG75Py84M,50010
|
|
16
16
|
masster/sample/parameters.py,sha256=Gg2KcuNbV_wZ_Wwv93QlM5J19ji0oSIvZLPV1NoBmq0,4456
|
|
17
|
-
masster/sample/plot.py,sha256=
|
|
17
|
+
masster/sample/plot.py,sha256=QX-i8XL2LcSKv3IsdeVs8ea_Zhg2hp_-IZWt64h3S5o,78435
|
|
18
18
|
masster/sample/processing.py,sha256=-H93MEUysA-B9PB4nU31WFjtaU_flqbu2gY35ce4vVs,57827
|
|
19
19
|
masster/sample/quant.py,sha256=tHNjvUFTdehKR31BXBZnVsBxMD9XJHgaltITOjr71uE,7562
|
|
20
20
|
masster/sample/sample.py,sha256=2Hq3mUZHAN8AVw_-1m5v7Jg1-yqF5Pv7AWWBlhEDSXo,17096
|
|
@@ -28,16 +28,16 @@ masster/sample/defaults/find_ms2_def.py,sha256=KTELMAnioGLYbhzAwOgK14TZqboPEvzeB
|
|
|
28
28
|
masster/sample/defaults/get_spectrum_def.py,sha256=o62p31PhGd-LiIkTOzKQhwPtnO2AtQDHcPu-O-YoQPs,11460
|
|
29
29
|
masster/sample/defaults/sample_def.py,sha256=keoXyMyrm_iLgbYqfIbqCpJ3XHBVlNwCNmb5iMQL0iY,14579
|
|
30
30
|
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=
|
|
31
|
+
masster/study/export.py,sha256=VywMv0g8Qy_SiWS9V1pw7Q6uYfHGORQ_W9U-iLUciVo,30112
|
|
32
|
+
masster/study/h5.py,sha256=I_yIKWW6zqI_xAq6sJ4uPs3EBWYMTMqiSTdy6VmN04o,72153
|
|
33
|
+
masster/study/helpers.py,sha256=KVB5H922qXHAYxklyFhixO0_oc5nZpWqOgjdUeWgBJA,134352
|
|
34
|
+
masster/study/helpers_optimized.py,sha256=5qf6tiLPgsOSna9XVtTrx2B0GJ1wI8ZTrSv8n8MtxNg,13927
|
|
35
|
+
masster/study/load.py,sha256=BhH_dRugsieFvFTZq3jC3W8VHAh2JoGj_swQDnD3gUU,65091
|
|
36
36
|
masster/study/parameters.py,sha256=0elaF7YspTsB7qyajWAbRNL2VfKlGz5GJLifmO8IGkk,3276
|
|
37
|
-
masster/study/plot.py,sha256=
|
|
38
|
-
masster/study/processing.py,sha256=
|
|
37
|
+
masster/study/plot.py,sha256=OK9pZan5802RF-1jswuUNbpv3iAN7e69LiWbqso-eK4,81536
|
|
38
|
+
masster/study/processing.py,sha256=Da__6itJBbW4EwhCMBju4jytxgTLsGS8yWDt8S6V-DU,53379
|
|
39
39
|
masster/study/save.py,sha256=YjFEiuiB4OFLVvW_AX4-kgnsbjCWrYZeqF85VNEtbdw,6560
|
|
40
|
-
masster/study/study.py,sha256=
|
|
40
|
+
masster/study/study.py,sha256=kGVjMin_juvbFY2mB_QzMs57KsK1jLc7RF0s2nWGXcc,31643
|
|
41
41
|
masster/study/study5_schema.json,sha256=Fwt6U6r1J1BQxwR8ArFv1yN_2Cq1tt3tadS2sQCzjhg,5379
|
|
42
42
|
masster/study/defaults/__init__.py,sha256=m3Z5KXGqsTdh7GjYzZoENERt39yRg0ceVRV1DeCt1P0,610
|
|
43
43
|
masster/study/defaults/align_def.py,sha256=K_6xh7B1vf96maYIBTDZGjyA2zBHEgIP5ASzD9--n2Y,20241
|
|
@@ -50,8 +50,8 @@ masster/study/defaults/integrate_chrom_def.py,sha256=0MNIWGTjty-Zu-NTQsIweuj3UVq
|
|
|
50
50
|
masster/study/defaults/integrate_def.py,sha256=Vf4SAzdBfnsSZ3IRaF0qZvWu3gMDPHdgPfMYoPKeWv8,7246
|
|
51
51
|
masster/study/defaults/merge_def.py,sha256=EBsKE3hsAkTEzN9dpdRD5W3_suTKy_WZ_96rwS0uBuE,8572
|
|
52
52
|
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.
|
|
53
|
+
masster-0.3.19.dist-info/METADATA,sha256=4ihK7i4E5_zh-V_jHr5r3o9U9vM5A2uR-P0rKc-npKQ,44320
|
|
54
|
+
masster-0.3.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
55
|
+
masster-0.3.19.dist-info/entry_points.txt,sha256=ZHguQ_vPmdbpqq2uGtmEOLJfgP-DQ1T0c07Lxh30wc8,58
|
|
56
|
+
masster-0.3.19.dist-info/licenses/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
|
|
57
|
+
masster-0.3.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|