View source: R/MMRFVariant_functions.R
MMRFVariant_SurvivalKM | R Documentation |
Creates a KM survival plot from MMRF-RG patient clinical data using survival library. It uses the fields D_PT_deathdy, D_PT_PRIMARYREASON and D_PT_lstalive columns for groups.
MMRFVariant_SurvivalKM(
patient,
trt,
variant.ann,
list.variant,
FilterBy = "treatment",
legend = "Legend",
labels = NULL,
xlim = NULL,
main = "Kaplan-Meier Survival Curve",
ylab = "Probability of survival",
xlab = "Time since diagnosis (days)",
filename = "survival.pdf",
color = NULL,
height = 8,
width = 12,
dpi = 300,
pvalue = TRUE,
conf.range = TRUE
)
patient |
is the data.frame of the patient clinical data downloaded from MMRF-Commpass Researcher Gateway (i.e. MMRF_CoMMpass_IA15_PER_PATIENT file) and imported into environment. | |||||||||||||||
trt |
is the data.frame of the patient clinical data (i.e. treatment-response) downloaded from MMRF-Commpass Researcher Gateway (i.e. MMRF_CoMMpass_IA15_STAND_ALONE_TRTRESP file) and imported into environment. | |||||||||||||||
variant.ann |
is the data.frame of the annotated variants downloaded from MMRF-Commpass Researcher Gateway (i.e. MMRF_CoMMpass_IA15a_All_Canonical_Variants file) and imported into environment. | |||||||||||||||
FilterBy |
Column with groups to plot. This is a mandatory field. Example:
| |||||||||||||||
legend |
Legend title of the figure | |||||||||||||||
labels |
labels of the plot | |||||||||||||||
xlim |
x axis limits e.g. xlim = c(0, 1000). Present narrower X axis, but not affect survival estimates. | |||||||||||||||
main |
main title of the plot | |||||||||||||||
ylab |
y axis text of the plot | |||||||||||||||
xlab |
x axis text of the plot | |||||||||||||||
filename |
The name of the pdf file. | |||||||||||||||
color |
Define the colors/Pallete for lines. | |||||||||||||||
height |
Image height | |||||||||||||||
width |
Image width | |||||||||||||||
dpi |
Figure quality | |||||||||||||||
pvalue |
show p-value of log-rank test | |||||||||||||||
conf.range |
show confidence intervals for point estimates of survival curves. | |||||||||||||||
Listvariant |
is the list of the variants to analyze. | |||||||||||||||
expand |
show or not an expanded plot |
Survival plot
patient <- data.frame(public_id=c("MMRF_0000","MMRF_0001",
"MMRF_0002","MMRF_0003",
"MMRF_0004","MMRF_0005",
"MMRF_0006","MMRF_0007",
"MMRF_0008","MMRF_0009"),
D_PT_PRIMARYREASON = c("Death",NA,NA,"Death","Death",
"Death","NA","NA","Death","Death"),
D_PT_deathdy = c(NA,NA,2226,172,NA,NA,1328,681,786,NA),
D_PT_lstalive = c(250,356,NA,NA,1814,223,NA,NA,NA,1450),
DEMOG_GENDER = c(rep(1,5),rep(2,5)), #2 stands for female, 1 standas for male#'
DEMOG_ETHNICITY=c(rep("Hispanic or Latino",5),rep("Not Hispanic or Latino",5)),
D_PT_issstage_char=c(rep("Stage III",3),rep("Stage II",2),rep("Stage I",5))
)
trt<- data.frame(public_id=c("MMRF_0000","MMRF_0001",
"MMRF_0002","MMRF_0003",
"MMRF_0004","MMRF_0005",
"MMRF_0006","MMRF_0007",
"MMRF_0008","MMRF_0009"),
trtclass=c(rep("Bortezomib-based",2),rep("IMIDs-based",5),rep("combined bortezomib/IMIDs-based",3)),
bestresp=c(rep("Partial Responsed",5),rep("Very Good Partial Response",5))
)
surv1<-MMRFVariant_SurvivalKM(patient,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.