Skip to content

Commit

Permalink
fix abca loader
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Sep 25, 2024
1 parent 88fc57d commit 8bd0a33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/datasets/loaders/allen_brain_cell_atlas/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@
del adatas

print("Filtering data", flush=True)
sc.pp.filter_genes(adata, min_cells=1)
sc.pp.filter_cells(adata, min_genes=1)
num_cells_per_gene = adata.layers["counts"].getnnz(axis=0)
num_genes_per_cell = adata.layers["counts"].getnnz(axis=1)
adata = adata[
num_genes_per_cell >= 1,
num_cells_per_gene >= 1
].copy()

print("Processing .obs")
adata.obs = obs.loc[adata.obs.index]
Expand Down

0 comments on commit 8bd0a33

Please sign in to comment.