tme_cluster | R Documentation |
This function is designed to perform TME (Tumor Microenvironment) clustering analysis using the specified input dataset. The function allows for customization of various parameters to conduct clustering analysis, including the selection of features, scaling options, clustering method, and the range of cluster numbers to evaluate.
tme_cluster(
input,
features = NULL,
pattern = NULL,
id = NULL,
scale = TRUE,
method = "kmeans",
min_nc = 2,
max.nc = 6,
print_result = FALSE
)
input |
A data frame containing the input dataset for TME clustering analysis. |
features |
A vector specifying the features (variables) to be used for clustering. Default is NULL, which uses all columns as features. |
pattern |
A regular expression pattern for selecting features based on column names. Default is NULL. |
id |
A character string specifying the column in the input data frame to be used as identifiers. Default is NULL, which uses row names as identifiers. |
scale |
A logical value indicating whether to scale the selected features. Default is TRUE. |
method |
A character string specifying the clustering method to use. Default is "kmeans". |
min_nc |
An integer specifying the minimum number of clusters to evaluate. Default is 2. |
max.nc |
An integer specifying the maximum number of clusters to evaluate. Default is 6. |
Dongqiang Zeng
data("tcga_stad_sig", package = "IOBR")
res <- tme_cluster(input = tcga_stad_sig, features = NULL, pattern = "xCell", id = "ID", method = "kmeans", min_nc = 2, max.nc = 6)
sig_heatmap(input = res, features = colnames(res)[3:ncol(res)], group = "cluster")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.