masster 0.4.9__py3-none-any.whl → 0.4.11__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/lib/__init__.py +9 -0
- masster/lib/lib.py +598 -0
- masster/sample/sample5_schema.json +44 -44
- masster/study/h5.py +0 -13
- masster/study/helpers.py +1 -0
- masster/study/plot.py +136 -289
- masster/study/study5_schema.json +149 -149
- {masster-0.4.9.dist-info → masster-0.4.11.dist-info}/METADATA +1 -1
- {masster-0.4.9.dist-info → masster-0.4.11.dist-info}/RECORD +13 -11
- {masster-0.4.9.dist-info → masster-0.4.11.dist-info}/WHEEL +0 -0
- {masster-0.4.9.dist-info → masster-0.4.11.dist-info}/entry_points.txt +0 -0
- {masster-0.4.9.dist-info → masster-0.4.11.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,95 +1,95 @@
|
|
|
1
1
|
{
|
|
2
2
|
"features_df": {
|
|
3
3
|
"columns": {
|
|
4
|
-
"
|
|
5
|
-
"dtype": "pl.Utf8"
|
|
6
|
-
},
|
|
7
|
-
"adduct_charge": {
|
|
8
|
-
"dtype": "pl.Int64"
|
|
9
|
-
},
|
|
10
|
-
"adduct_group": {
|
|
4
|
+
"feature_uid": {
|
|
11
5
|
"dtype": "pl.Int64"
|
|
12
6
|
},
|
|
13
|
-
"
|
|
14
|
-
"dtype": "pl.
|
|
15
|
-
},
|
|
16
|
-
"adduct_mass_shift": {
|
|
17
|
-
"dtype": "pl.Float64"
|
|
7
|
+
"feature_id": {
|
|
8
|
+
"dtype": "pl.Utf8"
|
|
18
9
|
},
|
|
19
|
-
"
|
|
10
|
+
"sample_uid": {
|
|
20
11
|
"dtype": "pl.Int32"
|
|
21
12
|
},
|
|
22
|
-
"
|
|
23
|
-
"dtype": "pl.Object"
|
|
24
|
-
},
|
|
25
|
-
"chrom_area": {
|
|
13
|
+
"mz": {
|
|
26
14
|
"dtype": "pl.Float64"
|
|
27
15
|
},
|
|
28
|
-
"
|
|
16
|
+
"rt": {
|
|
29
17
|
"dtype": "pl.Float64"
|
|
30
18
|
},
|
|
31
|
-
"
|
|
19
|
+
"rt_original": {
|
|
32
20
|
"dtype": "pl.Float64"
|
|
33
21
|
},
|
|
34
|
-
"
|
|
22
|
+
"rt_start": {
|
|
35
23
|
"dtype": "pl.Float64"
|
|
36
24
|
},
|
|
37
|
-
"
|
|
25
|
+
"rt_end": {
|
|
38
26
|
"dtype": "pl.Float64"
|
|
39
27
|
},
|
|
40
|
-
"
|
|
41
|
-
"dtype": "pl.
|
|
28
|
+
"rt_delta": {
|
|
29
|
+
"dtype": "pl.Float64"
|
|
42
30
|
},
|
|
43
|
-
"
|
|
44
|
-
"dtype": "pl.
|
|
31
|
+
"mz_start": {
|
|
32
|
+
"dtype": "pl.Float64"
|
|
45
33
|
},
|
|
46
|
-
"
|
|
47
|
-
"dtype": "pl.
|
|
34
|
+
"mz_end": {
|
|
35
|
+
"dtype": "pl.Float64"
|
|
48
36
|
},
|
|
49
37
|
"inty": {
|
|
50
38
|
"dtype": "pl.Float64"
|
|
51
39
|
},
|
|
40
|
+
"quality": {
|
|
41
|
+
"dtype": "pl.Float64"
|
|
42
|
+
},
|
|
43
|
+
"charge": {
|
|
44
|
+
"dtype": "pl.Int32"
|
|
45
|
+
},
|
|
52
46
|
"iso": {
|
|
53
47
|
"dtype": "pl.Int64"
|
|
54
48
|
},
|
|
55
49
|
"iso_of": {
|
|
56
50
|
"dtype": "pl.Int64"
|
|
57
51
|
},
|
|
58
|
-
"
|
|
59
|
-
"dtype": "pl.
|
|
52
|
+
"adduct": {
|
|
53
|
+
"dtype": "pl.Utf8"
|
|
60
54
|
},
|
|
61
|
-
"
|
|
62
|
-
"dtype": "pl.
|
|
55
|
+
"adduct_charge": {
|
|
56
|
+
"dtype": "pl.Int64"
|
|
63
57
|
},
|
|
64
|
-
"
|
|
58
|
+
"adduct_mass_shift": {
|
|
65
59
|
"dtype": "pl.Float64"
|
|
66
60
|
},
|
|
67
|
-
"
|
|
61
|
+
"adduct_mass_neutral": {
|
|
68
62
|
"dtype": "pl.Float64"
|
|
69
63
|
},
|
|
70
|
-
"
|
|
71
|
-
"dtype": "pl.
|
|
64
|
+
"adduct_group": {
|
|
65
|
+
"dtype": "pl.Int64"
|
|
72
66
|
},
|
|
73
|
-
"
|
|
74
|
-
"dtype": "pl.
|
|
67
|
+
"chrom": {
|
|
68
|
+
"dtype": "pl.Object"
|
|
75
69
|
},
|
|
76
|
-
"
|
|
70
|
+
"filled": {
|
|
71
|
+
"dtype": "pl.Boolean"
|
|
72
|
+
},
|
|
73
|
+
"chrom_area": {
|
|
77
74
|
"dtype": "pl.Float64"
|
|
78
75
|
},
|
|
79
|
-
"
|
|
76
|
+
"chrom_coherence": {
|
|
80
77
|
"dtype": "pl.Float64"
|
|
81
78
|
},
|
|
82
|
-
"
|
|
79
|
+
"chrom_prominence": {
|
|
83
80
|
"dtype": "pl.Float64"
|
|
84
81
|
},
|
|
85
|
-
"
|
|
82
|
+
"chrom_prominence_scaled": {
|
|
86
83
|
"dtype": "pl.Float64"
|
|
87
84
|
},
|
|
88
|
-
"
|
|
85
|
+
"chrom_height_scaled": {
|
|
89
86
|
"dtype": "pl.Float64"
|
|
90
87
|
},
|
|
91
|
-
"
|
|
92
|
-
"dtype": "pl.
|
|
88
|
+
"ms2_scans": {
|
|
89
|
+
"dtype": "pl.Object"
|
|
90
|
+
},
|
|
91
|
+
"ms2_specs": {
|
|
92
|
+
"dtype": "pl.Object"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
},
|
masster/study/h5.py
CHANGED
|
@@ -1686,19 +1686,6 @@ def _load_study5(self, filename=None):
|
|
|
1686
1686
|
# Check if progress bar should be disabled based on log level
|
|
1687
1687
|
tdqm_disable = self.log_level not in ["TRACE", "DEBUG", "INFO"]
|
|
1688
1688
|
|
|
1689
|
-
# Define loading steps for progress tracking
|
|
1690
|
-
loading_steps = [
|
|
1691
|
-
"metadata",
|
|
1692
|
-
"samples_df",
|
|
1693
|
-
"features_df",
|
|
1694
|
-
"consensus_df",
|
|
1695
|
-
"consensus_mapping_df",
|
|
1696
|
-
"consensus_ms2",
|
|
1697
|
-
]
|
|
1698
|
-
|
|
1699
|
-
# Check if progress bar should be disabled based on log level
|
|
1700
|
-
tdqm_disable = self.log_level not in ["TRACE", "DEBUG", "INFO"]
|
|
1701
|
-
|
|
1702
1689
|
with h5py.File(filename, "r") as f:
|
|
1703
1690
|
# Use progress bar to show loading progress
|
|
1704
1691
|
with tqdm(
|
masster/study/helpers.py
CHANGED
|
@@ -780,6 +780,7 @@ def _get_sample_uids(self, samples=None, seed=42):
|
|
|
780
780
|
# choose a random sample of sample_uids
|
|
781
781
|
if len(self.samples_df) > samples:
|
|
782
782
|
np.random.seed(seed) # for reproducibility
|
|
783
|
+
self.logger.info(f"Randomly selected {samples} samples")
|
|
783
784
|
return np.random.choice(
|
|
784
785
|
self.samples_df["sample_uid"].to_list(),
|
|
785
786
|
samples,
|