Chang, Chia-Jung, Chih-Yuan Hsu, Qi Liu, and Yu Shyr. "VICTOR: Validation and Inspection of Cell Type Annotation through Optimal Regression." Computational and Structural Biotechnology Journal (2024). https://www.sciencedirect.com/science/article/pii/S2001037024002873
To ensure that the necessary packages are installed and loaded into your R environment, follow these steps:
Devtools is essential for installing packages directly from GitHub repositories, among other utilities. If it's not already installed, the script below will handle its installation and then load it for you.
if(!require("devtools")) install.packages("devtools"); library(devtools)
VICTOR is a package designed for specific analyses. If it's not present in your R library, the following command will install it from GitHub and then load it. Ensure you have an internet connection for this step.
if(!require("VICTOR")) install_github("Charlene717/VICTOR"); library(VICTOR)
After installing the necessary packages, you will need to load additional packages, load a demo file, and perform operations with VICTOR as follows:
For data manipulation and analysis, we'll be using tidyverse and Seurat. The script below checks for their presence and installs them if they're missing, before loading them into the session.
if(!require("tidyverse")) install.packages("tidyverse"); library(tidyverse)
if(!require("Seurat")) install.packages("Seurat"); library(Seurat)
Load your demo dataset by specifying the path to the .RData file. Replace Path/to/Demo.RData with the actual path to your file.
load("Path/to/Demo.RData")
Configure the VICTOR function by specifying your query and reference Seurat objects, as well as the columns for the actual cell type and annotation.
VICTOR.lt <- VICTOR(seuratObject_Query, seuratObject_Ref,
ActualCellTypeColumn = "Actual_Cell_Type",
AnnotCellTypeColumn = "Annotation")
After running VICTOR, please update your Seurat objects as follows:
Results are in the query's meta.data. Update with
seuratObject_Query <- VICTOR.lt$Query
Model stored in the reference's misc. Update with
seuratObject_Ref <- VICTOR.lt$Reference