M3Drop 0.4.33__tar.gz → 0.4.34__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.33
3
+ Version: 0.4.34
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.33
3
+ Version: 0.4.34
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
@@ -19,14 +19,15 @@ def NBumiPearsonResidualsGPU(
19
19
  output_filename: str
20
20
  ):
21
21
  """
22
- Calculates Pearson residuals. Safe Mode: Multiplier increased to 6.0.
22
+ Calculates Pearson residuals. Safe Mode: Multiplier increased to 10.0.
23
23
  """
24
24
  start_time = time.perf_counter()
25
25
  print(f"FUNCTION: NBumiPearsonResiduals() | FILE: {cleaned_filename}")
26
26
 
27
27
  # --- SAFETY UPDATE ---
28
- # Multiplier 6.0 (Was 4.0): Forces smaller chunks to avoid fragmentation crashes.
29
- chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=6.0, is_dense=True)
28
+ # Multiplier 10.0 (Was 6.0): Accounts for Float64 precision (8 bytes) vs Governor default (4 bytes).
29
+ # 4 matrices * 8 bytes = 32 bytes/cell. Governor 10 * 4 = 40 bytes. Safe buffer established.
30
+ chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=10.0, is_dense=True)
30
31
 
31
32
  # --- Phase 1: Initialization ---
32
33
  print("Phase [1/2]: Initializing parameters and preparing output file...")
@@ -98,7 +99,8 @@ def NBumiPearsonResidualsGPU(
98
99
  pearson_chunk_gpu = (counts_chunk_dense_gpu - mus_chunk_gpu) / denominator_gpu
99
100
 
100
101
  # Write to Disk
101
- out_x[i:end_row, :] = pearson_chunk_gpu.get()
102
+ # [OPTIMIZATION] Cast to float32 on GPU to halve PCIe transfer time
103
+ out_x[i:end_row, :] = pearson_chunk_gpu.astype(cupy.float32).get()
102
104
 
103
105
  # Cleanup
104
106
  del counts_chunk_dense_gpu, counts_chunk_sparse_gpu, mus_chunk_gpu, pearson_chunk_gpu, denominator_gpu
@@ -126,8 +128,8 @@ def NBumiPearsonResidualsApproxGPU(
126
128
  print(f"FUNCTION: NBumiPearsonResidualsApprox() | FILE: {cleaned_filename}")
127
129
 
128
130
  # --- HANDSHAKE ---
129
- # Multiplier 6.0: Same safety logic as Full residuals.
130
- chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=6.0, is_dense=True)
131
+ # Multiplier 10.0: Same safety logic as Full residuals.
132
+ chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=10.0, is_dense=True)
131
133
 
132
134
  # --- Phase 1: Initialization ---
133
135
  print("Phase [1/2]: Initializing parameters and preparing output file...")
@@ -191,7 +193,8 @@ def NBumiPearsonResidualsApproxGPU(
191
193
 
192
194
  pearson_chunk_gpu = (counts_chunk_dense_gpu - mus_chunk_gpu) / denominator_gpu
193
195
 
194
- out_x[i:end_row, :] = pearson_chunk_gpu.get()
196
+ # [OPTIMIZATION] Cast to float32 on GPU to halve PCIe transfer time
197
+ out_x[i:end_row, :] = pearson_chunk_gpu.astype(cupy.float32).get()
195
198
 
196
199
  del counts_chunk_dense_gpu, counts_chunk_sparse_gpu, mus_chunk_gpu, pearson_chunk_gpu, denominator_gpu
197
200
  cupy.get_default_memory_pool().free_all_blocks()
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="M3Drop",
8
- version="0.4.33", # Version bump
8
+ version="0.4.34", # Version bump
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