M3Drop 0.4.47__tar.gz → 0.4.49__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: M3Drop
3
- Version: 0.4.47
3
+ Version: 0.4.49
4
4
  Summary: A Python implementation of the M3Drop single-cell RNA-seq analysis tool.
5
5
  Home-page: https://github.com/PragalvhaSharma/m3DropNew
6
6
  Author: Tallulah Andrews
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: M3Drop
3
- Version: 0.4.47
3
+ Version: 0.4.49
4
4
  Summary: A Python implementation of the M3Drop single-cell RNA-seq analysis tool.
5
5
  Home-page: https://github.com/PragalvhaSharma/m3DropNew
6
6
  Author: Tallulah Andrews
@@ -231,7 +231,8 @@ def NBumiCheckFitFSGPU(
231
231
  p_is_chunk_gpu # Output
232
232
  )
233
233
 
234
- p_is_chunk_gpu = cp.nan_to_num(p_is_chunk_gpu, nan=0.0, posinf=1.0, neginf=0.0)
234
+ # [MEMORY FIX] Use copy=False to prevent doubling memory usage
235
+ cp.nan_to_num(p_is_chunk_gpu, copy=False, nan=0.0, posinf=1.0, neginf=0.0)
235
236
 
236
237
  row_ps_gpu += p_is_chunk_gpu.sum(axis=0)
237
238
  col_ps_gpu[current_row:end_row] = p_is_chunk_gpu.sum(axis=1)
@@ -275,7 +276,7 @@ def NBumiCompareModelsGPU(
275
276
  stats,
276
277
  mask_filename=mask_filename,
277
278
  mode=mode,
278
- manual_target=manual_target,
279
+ manual_target=manual_target,
279
280
  phase_label="Phase [1/3]",
280
281
  desc_label="Fitting Basic Model (Virtual)..."
281
282
  )
@@ -122,9 +122,17 @@ def NBumiPearsonResidualsCombinedCPU(
122
122
  adata_out_approx = anndata.AnnData(obs=adata_in.obs, var=filtered_var)
123
123
  adata_out_approx.write_h5ad(output_filename_approx, compression=None)
124
124
 
125
+ # --- CHUNK SIZE FIX ---
125
126
  # Calculate appropriate H5 storage chunks
126
127
  storage_chunk_rows = int(1_000_000_000 / (ng_filtered * 8))
127
- if storage_chunk_rows < 1: storage_chunk_rows = 1
128
+
129
+ # [CRITICAL FIX] Clamp chunk size to total rows (nc)
130
+ if storage_chunk_rows > nc:
131
+ storage_chunk_rows = nc
132
+
133
+ if storage_chunk_rows < 1:
134
+ storage_chunk_rows = 1
135
+ # ----------------------
128
136
 
129
137
  # Open both files for writing simultaneously
130
138
  with h5py.File(output_filename_full, 'a') as f_full, h5py.File(output_filename_approx, 'a') as f_approx:
@@ -101,8 +101,17 @@ def NBumiPearsonResidualsCombinedGPU(
101
101
  adata_out_approx = anndata.AnnData(obs=adata_in.obs, var=filtered_var)
102
102
  adata_out_approx.write_h5ad(output_filename_approx, compression=None)
103
103
 
104
+ # --- CHUNK SIZE FIX ---
105
+ # Calculate rows needed to fill ~1GB
104
106
  storage_chunk_rows = int(1_000_000_000 / (ng_filtered * 8))
105
- if storage_chunk_rows < 1: storage_chunk_rows = 1
107
+
108
+ # [CRITICAL FIX] Clamp chunk size to total rows (nc)
109
+ if storage_chunk_rows > nc:
110
+ storage_chunk_rows = nc
111
+
112
+ if storage_chunk_rows < 1:
113
+ storage_chunk_rows = 1
114
+ # ----------------------
106
115
 
107
116
  # Open both files for writing simultaneously
108
117
  with h5py.File(output_filename_full, 'a') as f_full, h5py.File(output_filename_approx, 'a') as f_approx:
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="M3Drop", # Name for pip (pip install M3Drop)
8
- version="0.4.47",
8
+ version="0.4.49",
9
9
  author="Tallulah Andrews",
10
10
  author_email="tandrew6@uwo.ca",
11
11
  description="A Python implementation of the M3Drop single-cell RNA-seq analysis tool.",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes