Skip to content

Commit

Permalink
Fix the condition according to the changes in v3
Browse files Browse the repository at this point in the history
  • Loading branch information
cakirb committed Jan 4, 2024
1 parent 23bd1f6 commit f7a0a3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sctk/_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def read_cellbender_v3(f,
import scipy.sparse as sp
import pandas as pd
cols = ["cell_probability", "droplet_efficiency"]
if "barcode_indices_for_latents" in f["droplet_latents"]:
if f['droplet_latents']['barcode_indices_for_latents'].shape[0] < n_obs:
bidx = f["droplet_latents"]["barcode_indices_for_latents"][()]
obsdict = {}
for x in cols:
Expand All @@ -263,7 +263,7 @@ def read_cellbender_v3(f,
obsm.fill(np.nan)
obsm[bidx, :] = lge
else:
obsdict = {x: f["matrix"][x] for x in cols}
obsdict = {x: f["droplet_latents"][x] for x in cols}
if latent_gene_encoding:
obsm = f["droplet_latents"]["gene_expression_encoding"][()]
barcodes = np.array(
Expand Down

0 comments on commit f7a0a3b

Please sign in to comment.