masster 0.4.16__tar.gz → 0.4.18__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.
Files changed (96) hide show
  1. {masster-0.4.16 → masster-0.4.18}/PKG-INFO +3 -2
  2. {masster-0.4.16 → masster-0.4.18}/README.md +2 -1
  3. {masster-0.4.16 → masster-0.4.18}/pyproject.toml +1 -1
  4. {masster-0.4.16 → masster-0.4.18}/src/masster/_version.py +1 -1
  5. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/merge_def.py +70 -6
  6. {masster-0.4.16 → masster-0.4.18}/src/masster/study/merge.py +637 -31
  7. {masster-0.4.16 → masster-0.4.18}/src/masster/study/plot.py +15 -1
  8. {masster-0.4.16 → masster-0.4.18}/src/masster/study/processing.py +0 -1
  9. {masster-0.4.16 → masster-0.4.18}/uv.lock +1 -1
  10. {masster-0.4.16 → masster-0.4.18}/.github/workflows/publish.yml +0 -0
  11. {masster-0.4.16 → masster-0.4.18}/.github/workflows/security.yml +0 -0
  12. {masster-0.4.16 → masster-0.4.18}/.github/workflows/test.yml +0 -0
  13. {masster-0.4.16 → masster-0.4.18}/.gitignore +0 -0
  14. {masster-0.4.16 → masster-0.4.18}/.pre-commit-config.yaml +0 -0
  15. {masster-0.4.16 → masster-0.4.18}/LICENSE +0 -0
  16. {masster-0.4.16 → masster-0.4.18}/Makefile +0 -0
  17. {masster-0.4.16 → masster-0.4.18}/TESTING.md +0 -0
  18. {masster-0.4.16 → masster-0.4.18}/demo/example_batch_process.py +0 -0
  19. {masster-0.4.16 → masster-0.4.18}/demo/example_sample_process.py +0 -0
  20. {masster-0.4.16 → masster-0.4.18}/src/masster/__init__.py +0 -0
  21. {masster-0.4.16 → masster-0.4.18}/src/masster/chromatogram.py +0 -0
  22. {masster-0.4.16 → masster-0.4.18}/src/masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_DDA_OT_C-MiLUT_QC_dil2_01_20250602151849.sample5 +0 -0
  23. {masster-0.4.16 → masster-0.4.18}/src/masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_DDA_OT_C-MiLUT_QC_dil3_01_20250602150634.sample5 +0 -0
  24. {masster-0.4.16 → masster-0.4.18}/src/masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_MS1_C-MiLUT_C008_v6_r38_01.sample5 +0 -0
  25. {masster-0.4.16 → masster-0.4.18}/src/masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_MS1_C-MiLUT_C008_v7_r37_01.sample5 +0 -0
  26. {masster-0.4.16 → masster-0.4.18}/src/masster/data/dda/20250530_VH_IQX_KW_RP_HSST3_100mm_12min_pos_v4_MS1_C-MiLUT_C017_v5_r99_01.sample5 +0 -0
  27. {masster-0.4.16 → masster-0.4.18}/src/masster/data/libs/ccm.csv +0 -0
  28. {masster-0.4.16 → masster-0.4.18}/src/masster/data/libs/urine.csv +0 -0
  29. {masster-0.4.16 → masster-0.4.18}/src/masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.timeseries.data +0 -0
  30. {masster-0.4.16 → masster-0.4.18}/src/masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff +0 -0
  31. {masster-0.4.16 → masster-0.4.18}/src/masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff.scan +0 -0
  32. {masster-0.4.16 → masster-0.4.18}/src/masster/data/wiff/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff2 +0 -0
  33. {masster-0.4.16 → masster-0.4.18}/src/masster/lib/__init__.py +0 -0
  34. {masster-0.4.16 → masster-0.4.18}/src/masster/lib/lib.py +0 -0
  35. {masster-0.4.16 → masster-0.4.18}/src/masster/logger.py +0 -0
  36. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/__init__.py +0 -0
  37. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/adducts.py +0 -0
  38. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/defaults/__init__.py +0 -0
  39. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/defaults/find_adducts_def.py +0 -0
  40. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/defaults/find_features_def.py +0 -0
  41. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/defaults/find_ms2_def.py +0 -0
  42. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/defaults/get_spectrum_def.py +0 -0
  43. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/defaults/sample_def.py +0 -0
  44. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/h5.py +0 -0
  45. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/helpers.py +0 -0
  46. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/lib.py +0 -0
  47. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/load.py +0 -0
  48. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/parameters.py +0 -0
  49. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/plot.py +0 -0
  50. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/processing.py +0 -0
  51. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/quant.py +0 -0
  52. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/sample.py +0 -0
  53. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/sample5_schema.json +0 -0
  54. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/save.py +0 -0
  55. {masster-0.4.16 → masster-0.4.18}/src/masster/sample/sciex.py +0 -0
  56. {masster-0.4.16 → masster-0.4.18}/src/masster/spectrum.py +0 -0
  57. {masster-0.4.16 → masster-0.4.18}/src/masster/study/__init__.py +0 -0
  58. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/__init__.py +0 -0
  59. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/align_def.py +0 -0
  60. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/export_def.py +0 -0
  61. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/fill_chrom_def.py +0 -0
  62. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/fill_def.py +0 -0
  63. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/find_consensus_def.py +0 -0
  64. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/find_ms2_def.py +0 -0
  65. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/identify_def.py +0 -0
  66. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/integrate_chrom_def.py +0 -0
  67. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/integrate_def.py +0 -0
  68. {masster-0.4.16 → masster-0.4.18}/src/masster/study/defaults/study_def.py +0 -0
  69. {masster-0.4.16 → masster-0.4.18}/src/masster/study/export.py +0 -0
  70. {masster-0.4.16 → masster-0.4.18}/src/masster/study/h5.py +0 -0
  71. {masster-0.4.16 → masster-0.4.18}/src/masster/study/helpers.py +0 -0
  72. {masster-0.4.16 → masster-0.4.18}/src/masster/study/id.py +0 -0
  73. {masster-0.4.16 → masster-0.4.18}/src/masster/study/load.py +0 -0
  74. {masster-0.4.16 → masster-0.4.18}/src/masster/study/parameters.py +0 -0
  75. {masster-0.4.16 → masster-0.4.18}/src/masster/study/save.py +0 -0
  76. {masster-0.4.16 → masster-0.4.18}/src/masster/study/study.py +0 -0
  77. {masster-0.4.16 → masster-0.4.18}/src/masster/study/study5_schema.json +0 -0
  78. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard/README.md +0 -0
  79. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard/__init__.py +0 -0
  80. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard/example.py +0 -0
  81. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard/test_structure.py +0 -0
  82. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard/test_wizard.py +0 -0
  83. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard/wizard.py +0 -0
  84. {masster-0.4.16 → masster-0.4.18}/src/masster/wizard.py +0 -0
  85. {masster-0.4.16 → masster-0.4.18}/tests/conftest.py +0 -0
  86. {masster-0.4.16 → masster-0.4.18}/tests/test_chromatogram.py +0 -0
  87. {masster-0.4.16 → masster-0.4.18}/tests/test_defaults.py +0 -0
  88. {masster-0.4.16 → masster-0.4.18}/tests/test_imports.py +0 -0
  89. {masster-0.4.16 → masster-0.4.18}/tests/test_integration.py +0 -0
  90. {masster-0.4.16 → masster-0.4.18}/tests/test_logger.py +0 -0
  91. {masster-0.4.16 → masster-0.4.18}/tests/test_parameters.py +0 -0
  92. {masster-0.4.16 → masster-0.4.18}/tests/test_sample.py +0 -0
  93. {masster-0.4.16 → masster-0.4.18}/tests/test_spectrum.py +0 -0
  94. {masster-0.4.16 → masster-0.4.18}/tests/test_study.py +0 -0
  95. {masster-0.4.16 → masster-0.4.18}/tests/test_version.py +0 -0
  96. {masster-0.4.16 → masster-0.4.18}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: masster
3
- Version: 0.4.16
3
+ Version: 0.4.18
4
4
  Summary: Mass spectrometry data analysis package
5
5
  Project-URL: homepage, https://github.com/zamboni-lab/masster
6
6
  Project-URL: repository, https://github.com/zamboni-lab/masster
@@ -767,7 +767,8 @@ study.integrate()
767
767
  # export results
768
768
  study.export_mgf()
769
769
  study.export_mztab()
770
- study.export_consensus()
770
+ study.export_xlsx()
771
+ study.export_parquet()
771
772
 
772
773
  # Save the study to .study5
773
774
  study.save()
@@ -41,7 +41,8 @@ study.integrate()
41
41
  # export results
42
42
  study.export_mgf()
43
43
  study.export_mztab()
44
- study.export_consensus()
44
+ study.export_xlsx()
45
+ study.export_parquet()
45
46
 
46
47
  # Save the study to .study5
47
48
  study.save()
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "masster"
4
- version = "0.4.16"
4
+ version = "0.4.18"
5
5
  description = "Mass spectrometry data analysis package"
6
6
  authors = [
7
7
  { name = "Zamboni Lab" }
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
 
4
- __version__ = "0.4.16"
4
+ __version__ = "0.4.18"
5
5
 
6
6
 
7
7
  def get_version():
@@ -25,24 +25,36 @@ class merge_defaults:
25
25
  link_ms2 (bool): Whether to link MS2 spectra to consensus features. Default is True.
26
26
  """
27
27
 
28
- method: str = "kd"
29
- min_samples: int = 10
28
+ method: str = "qt"
29
+ min_samples: int = 2
30
30
  rt_tol: float = 5.0
31
31
  mz_tol: float = 0.01
32
- chunk_size: int = 300
32
+ chunk_size: int = 500
33
33
  nr_partitions: int = 1000
34
- min_rel_cc_size: float = 0.2
34
+ min_rel_cc_size: float = 0.1
35
35
  max_pairwise_log_fc: float = -1.0
36
36
  max_nr_conflicts: int = 0
37
37
  link_ms2: bool = True
38
+
39
+ # KD-Strict specific parameters
40
+ optimize_rt_tol: bool = False
41
+ rt_tol_range: tuple = (0.5, 4.0)
42
+ rt_tol_steps: int = 7
43
+ secondary_merge_rt_tol: float = 1.0
44
+ secondary_merge_mz_tol: float = 0.005
45
+ min_sample_overlap: float = 0.8
46
+ max_rt_spread: float = 2.0 # Will default to 2x rt_tol
47
+ min_coherence: float = 0.0
38
48
 
39
49
  _param_metadata: dict[str, dict[str, Any]] = field(
40
50
  default_factory=lambda: {
41
51
  "method": {
42
52
  "dtype": str,
43
53
  "description": "Merge method (algorithm) to use",
44
- "default": "kd",
45
- "allowed_values": ["kd", "qt", "kd-nowarp", "chunked"],
54
+ "default": "quality",
55
+ "allowed_values": ["sensitivity", "qt", "nowarp", "chunked", "quality",
56
+ "kd", "kd-nowarp", "kd_nowarp", "kd-strict", "kd_strict",
57
+ "kd_chunked", "kd-chunked", "qt_chunked", "qt-chunked"],
46
58
  },
47
59
  "min_samples": {
48
60
  "dtype": int,
@@ -103,6 +115,58 @@ class merge_defaults:
103
115
  "description": "Whether to link MS2 spectra to consensus features",
104
116
  "default": True,
105
117
  },
118
+ # KD-Strict specific parameters
119
+ "optimize_rt_tol": {
120
+ "dtype": bool,
121
+ "description": "Enable RT tolerance optimization for kd-strict method",
122
+ "default": False,
123
+ },
124
+ "rt_tol_range": {
125
+ "dtype": tuple,
126
+ "description": "RT tolerance range for optimization (min, max) in seconds",
127
+ "default": (0.8, 2.0),
128
+ },
129
+ "rt_tol_steps": {
130
+ "dtype": int,
131
+ "description": "Number of steps for RT tolerance optimization",
132
+ "default": 5,
133
+ "min_value": 3,
134
+ "max_value": 20,
135
+ },
136
+ "secondary_merge_rt_tol": {
137
+ "dtype": float,
138
+ "description": "RT tolerance for secondary clustering in kd-strict (seconds)",
139
+ "default": 0.5,
140
+ "min_value": 0.1,
141
+ "max_value": 5.0,
142
+ },
143
+ "secondary_merge_mz_tol": {
144
+ "dtype": float,
145
+ "description": "m/z tolerance for secondary clustering in kd-strict (Da)",
146
+ "default": 0.005,
147
+ "min_value": 0.001,
148
+ "max_value": 0.1,
149
+ },
150
+ "min_sample_overlap": {
151
+ "dtype": float,
152
+ "description": "Minimum sample overlap ratio for merging features (0.0-1.0)",
153
+ "default": 0.8,
154
+ "min_value": 0.0,
155
+ "max_value": 1.0,
156
+ },
157
+ "max_rt_spread": {
158
+ "dtype": float,
159
+ "description": "Maximum allowed RT spread in seconds (None = 3x rt_tol)",
160
+ "default": None,
161
+ "min_value": 0.1,
162
+ },
163
+ "min_coherence": {
164
+ "dtype": float,
165
+ "description": "Minimum chromatographic coherence score (0.0 = disabled)",
166
+ "default": 0.0,
167
+ "min_value": 0.0,
168
+ "max_value": 1.0,
169
+ },
106
170
  },
107
171
  repr=False,
108
172
  )