PredictCells.RdProjects query cells into a previously learned embedding space and assigns predicted cell type labels using K-nearest neighbors.
PredictCells(
dataset_name,
data_dir,
test_data_dir,
test_data,
model_dir,
model_date,
device,
cluster_column,
lr,
margin,
bs,
epoch,
knn_k,
output_dim,
dropout_prob,
activation_function
)Character. Name of training dataset.
Character. Path to reference data directory.
Character. Path to query dataset directory.
Character. Name of query dataset.
Character. Path to saved model directory.
Character. Timestamp identifying trained model. YYYY-MM-DD
Character. "cpu" or "cuda".
Character. Column containing cluster labels.
Numeric. Learning rate.
Numeric. Margin for contrastive loss.
Integer. Batch size.
Integer. Number of epochs.
Integer. Number of neighbors for KNN classification.
Integer. Embedding dimension.
Numeric. Dropout probability.
Character. Activation function.
Invisibly returns NULL. Prediction results are written to disk.
This function loads a trained CellFuse model and applies it to a query dataset
The query dataset must:
Contain the same markers used during training
Have rows corresponding to individual cells
Predicted labels and embeddings are saved to the output directory.
if (FALSE) { # \dontrun{
PredictCells(
dataset_name = "CyTOF",
data_dir = "Reference_Data/",
test_data_dir = "Query_Data/",
model_dir = "Predicted_Data/Saved_model"
)
} # }