Skip to content

Commit

Permalink
Avoid filtering in normalization
Browse files Browse the repository at this point in the history
If cells are filtered in this stage, scran throws an error: 
`error in evaluating the argument 'object' in selecting a method for function 'sizeFactors': 'ncol(x)' is not equal to 'length(clusters)'`
  • Loading branch information
scottgigante authored Jan 19, 2021
1 parent 8f6c652 commit 2ce1cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scIB/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def normalize(adata, min_mean = 0.1, log=True, precluster=True, sparsify=True):
if precluster:
# Preliminary clustering for differentiated normalisation
adata_pp = adata.copy()
sc.pp.normalize_per_cell(adata_pp, counts_per_cell_after=1e6)
sc.pp.normalize_per_cell(adata_pp, counts_per_cell_after=1e6, min_counts=0)
sc.pp.log1p(adata_pp)
sc.pp.pca(adata_pp, n_comps=15, svd_solver='arpack')
sc.pp.neighbors(adata_pp)
Expand Down

0 comments on commit 2ce1cb9

Please sign in to comment.