Closed Yuxin-Cui closed 2 years ago
@Yuxin-Cui, what is the format of your adata.X
or adata.raw.X
? You can start from the raw count, and do sc.pp.normalize_total(adata, target_sum = 1e4)
followed by sc.pp.log1p(adata)
. The resulting expression matrix is the expected input for CellTypist.
Thanks for your suggestion. It worked.
When I ran the prediction porcedure below, there was an error message.
predictions = celltypist.annotate(adata, model = 'Immune_All_Low.pkl', majority_voting = True) ValueError: 🛑 Invalid expression matrix, expect log1p normalized expression to 10000 counts per cell
I then tried to normalized the adata, it showed:
adata.raw = sc.pp.log1p(adata, copy=True) WARNING: adata.X seems to be already log-transformed.
Is there any way to fix it?