| Title: | Immune Cell Signature Retrieval and Single-Cell Scoring |
|---|---|
| Description: | Provides a literature-derived database of immune cell markers formatted as Gene Matrix Transposed (GMT) files. Users can search immune cell signatures, retrieve marker lists, export GMT files, create custom marker sets, and score gene-by-cell expression matrices with dependency-free rank-based or mean-expression methods. Cell subpopulations are distinguished by their source PMIDs. For the core curation of the lung cell atlas, see Travaglini et al. (2020) <doi:10.1038/s41586-020-2922-4>. For the pan-cancer B cell signatures, see Fitzsimons et al. (2024) <doi:10.1016/j.ccell.2024.09.011>. |
| Authors: | Yingyan Liang [aut, cre], Peng Luo [aut] |
| Maintainer: | Yingyan Liang <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-19 14:02:19 UTC |
| Source: | https://github.com/cran/ImmuneSigR |
Converts a user-defined R list of markers into a standard GMT file format.
Create_Custom_GMT( marker_list, file_name = file.path(tempdir(), "My_Custom_Signatures.gmt") )Create_Custom_GMT( marker_list, file_name = file.path(tempdir(), "My_Custom_Signatures.gmt") )
marker_list |
A list where names are cell types and elements are character vectors of genes. |
file_name |
A character string specifying the output file name. |
Invisibly returns the created GMT file path.
my_markers <- list(Custom_T = c("CD3D", "CD8A"), Custom_B = c("CD19", "MS4A1")) Create_Custom_GMT(my_markers, file_name = file.path(tempdir(), "custom.gmt"))my_markers <- list(Custom_T = c("CD3D", "CD8A"), Custom_B = c("CD19", "MS4A1")) Create_Custom_GMT(my_markers, file_name = file.path(tempdir(), "custom.gmt"))
Copies the internal ImmuneSigR GMT database to a specified local directory.
Export_ImmuneSigR_GMT(out_dir = tempdir(), create_dir = TRUE) Export_GMT(out_dir = tempdir(), create_dir = TRUE)Export_ImmuneSigR_GMT(out_dir = tempdir(), create_dir = TRUE) Export_GMT(out_dir = tempdir(), create_dir = TRUE)
out_dir |
A character string specifying the output directory. Defaults to current working directory. |
create_dir |
Logical. If TRUE, creates |
Invisibly returns the exported GMT file path.
Export_ImmuneSigR_GMT(out_dir = tempdir())Export_ImmuneSigR_GMT(out_dir = tempdir())
Retrieve the marker gene lists for specified immune cell subpopulations.
Get_Markers( cell_type = NULL, ignore_case = TRUE, fixed = FALSE, min_genes = 1, gmt_file = NULL )Get_Markers( cell_type = NULL, ignore_case = TRUE, fixed = FALSE, min_genes = 1, gmt_file = NULL )
cell_type |
A character vector specifying cell type keywords. If NULL, returns the entire database. |
ignore_case |
Logical. If TRUE, matching ignores case. |
fixed |
Logical. If TRUE, treats |
min_genes |
Minimum number of genes required for a returned signature. |
gmt_file |
Optional path to a custom GMT file. |
A list containing the marker genes.
# Get all markers all_markers <- Get_Markers() # Get specific markers t_cell_markers <- Get_Markers("T cell")# Get all markers all_markers <- Get_Markers() # Get specific markers t_cell_markers <- Get_Markers("T cell")
Scores expression matrices directly with dependency-free rank or mean methods.
Score_ImmuneSigR( expr, target_cells = NULL, min_genes = 5, gmt_file = NULL, score_name = "_score", method = c("auto", "rank", "mean"), max_rank = 1500, verbose = TRUE, ... ) Score_CellSigR( expr, target_cells = NULL, min_genes = 5, gmt_file = NULL, score_name = "_score", method = c("auto", "rank", "mean"), max_rank = 1500, verbose = TRUE, ... )Score_ImmuneSigR( expr, target_cells = NULL, min_genes = 5, gmt_file = NULL, score_name = "_score", method = c("auto", "rank", "mean"), max_rank = 1500, verbose = TRUE, ... ) Score_CellSigR( expr, target_cells = NULL, min_genes = 5, gmt_file = NULL, score_name = "_score", method = c("auto", "rank", "mean"), max_rank = 1500, verbose = TRUE, ... )
expr |
An expression matrix or data frame with genes in rows and cells in columns. |
target_cells |
A character vector of target cell subpopulations to score. If NULL, scores all signatures. |
min_genes |
Minimum number of genes required after filtering to genes present in the object. |
gmt_file |
Optional path to a custom GMT file. |
score_name |
Suffix used for generated score columns. |
method |
Scoring method. "rank" is a dependency-free UCell-like rank score; "mean" uses average expression; "auto" uses "rank". |
max_rank |
Maximum rank considered by the rank scoring method. |
verbose |
Logical. If TRUE, prints progress messages. |
... |
Reserved for future extensions. |
A data frame of scores with cells in rows and signatures in columns.
# Create a small toy expression matrix set.seed(1) toy_expr <- matrix(rpois(30, 2), nrow = 3, dimnames = list(c("CD3D", "CD8A", "CD19"), paste0("cell_", 1:10))) # Score the toy matrix (set min_genes = 2 because the toy matrix only has 3 genes) scores <- Score_ImmuneSigR(toy_expr, target_cells = "T cell", min_genes = 2, method = "mean")# Create a small toy expression matrix set.seed(1) toy_expr <- matrix(rpois(30, 2), nrow = 3, dimnames = list(c("CD3D", "CD8A", "CD19"), paste0("cell_", 1:10))) # Score the toy matrix (set min_genes = 2 because the toy matrix only has 3 genes) scores <- Score_ImmuneSigR(toy_expr, target_cells = "T cell", min_genes = 2, method = "mean")
Search for specific immune cell signatures based on metadata such as cell type, literature title, or PMID.
Search_ImmuneSigR( keyword = NULL, search_by = "Cell_Type", ignore_case = TRUE, fixed = FALSE, max_results = Inf, include_markers = FALSE ) Search_CellSigR( keyword = NULL, search_by = "Cell_Type", ignore_case = TRUE, fixed = FALSE, max_results = Inf, include_markers = FALSE )Search_ImmuneSigR( keyword = NULL, search_by = "Cell_Type", ignore_case = TRUE, fixed = FALSE, max_results = Inf, include_markers = FALSE ) Search_CellSigR( keyword = NULL, search_by = "Cell_Type", ignore_case = TRUE, fixed = FALSE, max_results = Inf, include_markers = FALSE )
keyword |
A character string specifying the search term (e.g., "Macrophage"). If NULL, returns all records. |
search_by |
A character string specifying the column to search. Options include "Cell_Type", "Title", "cell_name", "PMID". |
ignore_case |
Logical. If TRUE, matching ignores case. |
fixed |
Logical. If TRUE, treats |
max_results |
Maximum number of rows to return. |
include_markers |
Logical. If TRUE, includes all marker columns from the metadata CSV. |
A data frame containing the search results.
# Search for B cell signatures b_cell_info <- Search_ImmuneSigR(keyword = "B cell", search_by = "Cell_Type")# Search for B cell signatures b_cell_info <- Search_ImmuneSigR(keyword = "B cell", search_by = "Cell_Type")