View source: R/IPS_calculation.R
| IPS_calculation | R Documentation |
Calculates Immunophenoscore (IPS) from gene expression data. IPS is a composite score measuring immunophenotype based on four major categories: MHC molecules, immunomodulators, effector cells, and suppressor cells.
IPS_calculation(eset, project = NULL, plot = FALSE)
eset |
Gene expression matrix with official human gene symbols (HGNC) as rownames. Expression values should be log2(TPM+1) or will be transformed if max value > 100. |
project |
Character string for project identifier. Default is NULL. |
plot |
Logical. Whether to generate immunophenogram plots. Default is FALSE. |
Data frame containing:
MHC molecules score
Effector cells score
Suppressor cells score
Checkpoints/Immunomodulators score
Aggregate score (sum of MHC, CP, EC, SC)
Immunophenoscore (0-10 scale)
## Not run:
example_genes <- c(
"HLA-A", "HLA-B", "HLA-C", "CD274", "PDCD1", "CTLA4",
"CD8A", "CD8B", "GZMB", "PRF1", "FOXP3", "IL10"
)
sim_eset <- as.data.frame(matrix(
rnorm(length(example_genes) * 5, mean = 5, sd = 2),
nrow = length(example_genes), ncol = 5
))
rownames(sim_eset) <- example_genes
colnames(sim_eset) <- paste0("Sample", 1:5)
ips_result <- IPS_calculation(eset = sim_eset, project = "Example", plot = FALSE)
if (!is.null(ips_result)) head(ips_result)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.