fix pca call in reembeddings (#1793)

This had the wrong dim passed into n_comps,
and so failed when the number of genes was less than 50.
This commit is contained in:
bmccandless
2020-08-25 17:21:39 -07:00
committed by GitHub
parent 0a10b3ec2a
commit ab1b9368a0
+1 -1
View File
@@ -43,7 +43,7 @@ def scanpy_umap(adata, obs_mask=None, pca_options={}, neighbors_options={}, umap
for k in list(adata.uns.keys()):
del adata.uns[k]
sc.pp.pca(adata, zero_center=None, n_comps=min(adata.n_obs - 1, 50), **pca_options)
sc.pp.pca(adata, zero_center=None, n_comps=min(adata.n_vars - 1, 50), **pca_options)
sc.pp.neighbors(adata, **neighbors_options)
sc.tl.umap(adata, **umap_options)