gcap.plotKMcurve | R Documentation |
Draw K-M Curve for fCNA Survival Comparison by Sample or Cytoband or Gene
gcap.plotKMcurve( fCNA, surv_data, mat = NULL, ID = NULL, focus = c("fCNA", "circular", "all"), palette = c("grey", "#0066CC", "#CC0033"), class_col = "class", ending_time = NULL, ... )
fCNA |
a fCNA object. |
surv_data |
survival data, eithor a 3-column
|
mat |
a gene/cytoband-by-sample matrix like |
ID |
a list of gene or cytoband IDs. |
focus |
focal amplication type you focus on. Typically used when the |
palette |
plot color palette. |
class_col |
column name in |
ending_time |
survival analysis ending time. If a numeric ending is typed, all survival data longer than the ending time will be rewritten. |
... |
other parameters passing to |
a plot.
gcap.plotProfile for plot landscape of fCNA, gcap::fCNA for building object.
library(gcap) if (require("survminer") && require("IDConverter")) { data("ascn") data = ascn # Create fake data set.seed(1234) data$sample = sample(LETTERS[1:10], nrow(data), replace = TRUE) rv = gcap.ASCNworkflow(data, outdir = tempdir(), model = "XGB11") rv$convertGeneID() surv_data = data.frame( sample = rv$sample_summary$sample, time = 3000 * abs(rnorm(nrow(rv$sample_summary))), status = sample(c(0, 1), nrow(rv$sample_summary), replace = TRUE) ) p = gcap.plotKMcurve(rv, surv_data) p p2 = gcap.plotKMcurve(rv, surv_data, ID = "MYC", mat = rv$getGeneSummary(return_mat = TRUE) ) p2 }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.