adata_predict¶
- besca.tl.auto_annot.adata_predict(classifier, scaler, adata_pred, adata_orig, threshold=0)[source]¶
predicts on testing set using trained classifier
- Parameters:
test_path (string) – path of test dataset
test_dataset (string) – name of test dataset
adata_orig (AnnData) – Test dataset can also be provided as an anndata object. It is different from adata_pred in that it has not undergone scanorama merging.
classifier (sklearn object) – trained classifier of chosen type
scaler (sklearn.preprocessing.StandardScaler) – scaler fit to training dataset
adata_pred (AnnData) – Preprocessed anndata object containing testing dataset.
threshold (float | default = 0) – value between 0 and 1, used for classifying into unknowns
- Returns:
Original anndata object with annotation added as column
- Return type:
AnnData