masster 0.5.24__py3-none-any.whl → 0.5.25__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 CHANGED
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
 
4
- __version__ = "0.5.24"
4
+ __version__ = "0.5.25"
5
5
 
6
6
 
7
7
  def get_version():
masster/study/export.py CHANGED
@@ -1305,10 +1305,34 @@ def export_parquet(self, filename: str | None = None) -> None:
1305
1305
  if self.consensus_df is not None and not self.consensus_df.is_empty():
1306
1306
  consensus_file = f"{filename}_consensus.parquet"
1307
1307
  try:
1308
- self.consensus_df.write_parquet(consensus_file)
1308
+ # Create a copy of consensus_df for parquet export
1309
+ consensus_export_df = self.consensus_df.clone()
1310
+
1311
+ # Handle Object dtype columns that can't be serialized to parquet
1312
+ for col in consensus_export_df.columns:
1313
+ if consensus_export_df[col].dtype == pl.Object:
1314
+ if col == "iso":
1315
+ # Convert numpy arrays to string representation for parquet compatibility
1316
+ # This preserves the data while making it parquet-serializable
1317
+ consensus_export_df = consensus_export_df.with_columns([
1318
+ pl.col("iso").map_elements(
1319
+ lambda x: str(x.tolist()) if x is not None else None,
1320
+ return_dtype=pl.String
1321
+ ).alias("iso")
1322
+ ])
1323
+ else:
1324
+ # For other Object columns, convert to string representation
1325
+ consensus_export_df = consensus_export_df.with_columns([
1326
+ pl.col(col).map_elements(
1327
+ lambda x: str(x) if x is not None else None,
1328
+ return_dtype=pl.String
1329
+ ).alias(col)
1330
+ ])
1331
+
1332
+ consensus_export_df.write_parquet(consensus_file)
1309
1333
  exported_files.append(consensus_file)
1310
1334
  self.logger.debug(
1311
- f"Exported consensus to {consensus_file} ({self.consensus_df.height} rows)",
1335
+ f"Exported consensus to {consensus_file} ({consensus_export_df.height} rows)",
1312
1336
  )
1313
1337
  except Exception as e:
1314
1338
  self.logger.error(f"Error writing consensus parquet file: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: masster
3
- Version: 0.5.24
3
+ Version: 0.5.25
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
@@ -684,7 +684,6 @@ Requires-Dist: alpharaw>=0.4.8
684
684
  Requires-Dist: bokeh>=3.7.3
685
685
  Requires-Dist: cmap>=0.6.2
686
686
  Requires-Dist: datashader>=0.18.1
687
- Requires-Dist: get-gecko-driver>=1.4
688
687
  Requires-Dist: h5py>=3.14.0
689
688
  Requires-Dist: hdbscan>=0.8.40
690
689
  Requires-Dist: holoviews>=1.21.0
@@ -1,5 +1,5 @@
1
1
  masster/__init__.py,sha256=B7zftzdElF2Wb5B7KvkD6TONnMIY-Jxeen3s49dgmzs,1029
2
- masster/_version.py,sha256=koihKimRza_kbnrpmX9DP_9ctG8yI80eHbJh5pY2xPs,257
2
+ masster/_version.py,sha256=1ymsIuIjSvggBFAIWxPqWntiqdxjPZEjAmDJy3vRsLE,257
3
3
  masster/chromatogram.py,sha256=iYpdv8C17zVnlWvOFgAn9ns2uFGiF-GgoYf5QVVAbHs,19319
4
4
  masster/logger.py,sha256=oHEFPH1LzBHbmeP9WFaRZCWyqd14GasJjZMLI8a4O3I,19439
5
5
  masster/spectrum.py,sha256=LlmxrI5MFS3aPrGSdqUSKVY0rJnKeBh3Frdh6a4dPvA,49722
@@ -35,7 +35,7 @@ masster/sample/defaults/get_spectrum_def.py,sha256=o62p31PhGd-LiIkTOzKQhwPtnO2At
35
35
  masster/sample/defaults/sample_def.py,sha256=MWWeEexGG2Ahbs-id4uq2doIgH-Ja96GioXaSl2CxN8,15449
36
36
  masster/study/__init__.py,sha256=55axdFuqRX4aXtJ8ocnhcLB32fNtmmJpCi58moO0r4g,237
37
37
  masster/study/analysis.py,sha256=bf2o_ywvwdPz1mZAHPETCPjWbvhoL9eEl1rLaz46Rp4,82032
38
- masster/study/export.py,sha256=63xP7pPBNsrAKWZP6XnqAyWO4lEfqtqKfO0SafNvzyg,58871
38
+ masster/study/export.py,sha256=oRgM4F4hL3-nBRr_xd4KTin8WoH8QqCJnz3K_S1M14E,60258
39
39
  masster/study/h5.py,sha256=gJRWNQxBTyFKD3qRmEbM24YZ-HdyUk-veYgwQbK0eoE,99104
40
40
  masster/study/helpers.py,sha256=pRcVvGmm6NX-GEvWfYZXZjGc_C0WyklqSQx1PdpYn2E,189694
41
41
  masster/study/id.py,sha256=dTMNdBE7eOQZdFSU0KZwd7vFpqOmNlQnLI0VGW98y8w,89570
@@ -61,8 +61,8 @@ masster/study/defaults/merge_def.py,sha256=99TJtIk7mSoq8NMJMJ4b-cy7gUUixQN69krxt
61
61
  masster/study/defaults/study_def.py,sha256=xXOAcb8hez0woWwA1_T3fcokjiLJkq3hwA3OS6elb6I,15965
62
62
  masster/wizard/__init__.py,sha256=L9G_datyGSFJjrBVklEVpZVLGXzUhDiWobtiygBH8vQ,669
63
63
  masster/wizard/wizard.py,sha256=11utDrZSt7R8D16Sl-NbRKHcgzhQEu8gW_q2V02-Qi0,66483
64
- masster-0.5.24.dist-info/METADATA,sha256=QH2sJUX_6eW2B9eTFg7T7G--9WTbTqzsrT_UQxxPSs0,45970
65
- masster-0.5.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
66
- masster-0.5.24.dist-info/entry_points.txt,sha256=ZHguQ_vPmdbpqq2uGtmEOLJfgP-DQ1T0c07Lxh30wc8,58
67
- masster-0.5.24.dist-info/licenses/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
68
- masster-0.5.24.dist-info/RECORD,,
64
+ masster-0.5.25.dist-info/METADATA,sha256=cs-J_TOWWtYmlrTJPL_XVSLg9iyxNYdGd24C1mE4wIo,45933
65
+ masster-0.5.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
66
+ masster-0.5.25.dist-info/entry_points.txt,sha256=ZHguQ_vPmdbpqq2uGtmEOLJfgP-DQ1T0c07Lxh30wc8,58
67
+ masster-0.5.25.dist-info/licenses/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
68
+ masster-0.5.25.dist-info/RECORD,,