Skip to content

Commit

Permalink
remove genes w/ nan or inf values
Browse files Browse the repository at this point in the history
  • Loading branch information
safiyecelik committed Nov 13, 2023
1 parent cf870cd commit 9279e34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion efaar_benchmarking/data_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ def load_replogle(gene_type: str, data_type: str, data_path: str = "data/") -> s
wget.download(src, data_path + filename)

adata = sc.read_h5ad(data_path + filename)
adata.X = adata.X[:, np.all(~adata.X.isna() & ~np.isinf(adata.X), axis=0)]
adata.X = adata.X[:, np.all(~np.isnan(adata.X) & ~np.isinf(adata.X), axis=0)]
return adata

0 comments on commit 9279e34

Please sign in to comment.