scpdac.tl.predict_labels#
- scpdac.tl.predict_labels(adata, species, *, layer='log1p_norm', device='cpu')#
Predict hierarchical Level-4 cell-type labels for a query dataset.
Routes cells through the root classifier then the matching Level-4 sub-classifier, appending predictions to
adata.obsin place.- Parameters:
adata (
AnnData) – Query data. Log-normalised expression is read fromadata.layers[layer](falling back toadata.Xif the layer is absent). The original object is preserved; a gene-aligned copy is used internally for inference.species (
str) –"human"or"mouse".layer (
str(default:'log1p_norm')) – Layer holding the log-normalised counts ("log1p_norm"by default).device (
str(default:'cpu')) – Torch device for inference.
- Return type:
- Returns:
The input
adatawithobs["predicted_malignant"](Malignant/Non-Malignant) andobs["predicted_celltype"](Level-4 labels).