View source: R/batch_sig_surv_plot.R
batch_sig_surv_plot | R Documentation |
This function generates survival plots for multiple projects based on input data and signature scores.
batch_sig_surv_plot(
input_pdata,
signature,
ID = "ID",
column_of_Project = "ProjectID",
project = NULL,
time = "time",
status = "status",
time_type = "day",
break_month = "auto",
palette = "jama",
cols = NULL,
mini_sig = "score",
save_path = "Multiple-KM-plot",
show_col = TRUE,
fig.type = "pdf"
)
input_pdata |
This parameter represents the input data for the survival analysis. It is expected to be a data frame. |
signature |
This parameter specifies the column name in input_pdata that represents the target signature for survival analysis. |
ID |
This optional parameter represents the column name in input_pdata that contains the unique identifier for each data point. The default value is "ID". |
column_of_Project |
A character string specifying the name of the column representing the project IDs. Default is "ProjectID". |
project |
A character string specifying the project name. Default is NULL. |
time |
A character string specifying the name of the column representing the time variable. Default is "time". |
status |
A character string specifying the name of the column representing the status variable. Default is "status". |
time_type |
A character string specifying the type of time variable. Default is "day".Options are "day" and "month". |
break_month |
A character string specifying the break interval for the time variable. Default is "auto". |
palette |
A character string specifying the color palette to be used for the plots. Default is "jama". |
cols |
A vector specifying custom colors for the plots. Default is NULL. |
mini_sig |
A character string specifying the minimum signature score. Default is "score". |
save_path |
A character string specifying the path where the plots will be saved. Default is "Multiple-KM-plot". |
show_col |
A logical value indicating whether to show colors in the plots. Default is TRUE. |
fig.type |
A character string specifying the file type for saving the plots. Default is "pdf". |
A data frame containing the combined data from all projects after survival analysis.
Dongqiang Zeng
# Loading TCGA-STAD microenvironment signature data
data("sig_stad", package = "IOBR")
# Generating survival plots for multiple projects
sig_stad <- as.data.frame(sig_stad)
result <- batch_sig_surv_plot(input_pdata = sig_stad, signature = "T.cells.CD8", ID = "ID", column_of_Project = "ProjectID", project = NULL,
time = "OS_time", status = "OS_status", time_type = "month", break_month = "auto", palette = "jama",
cols = NULL, mini_sig = "score", save_path = "Multiple-KM-plot", show_col = TRUE, fig.type = "pdf")
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.