MMRFanalyzeGDC_survival: Creates survival analysis

Description Usage Arguments Value Examples

View source: R/MMRFmethylation.R

Description

Creates a survival plot from MMRF patient clinical data using survival library. It uses the fields days_to_death and vital, plus a columns for groups.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
MMRFanalyzeGDC_survival(
  clin.mm,
  clusterCol = NULL,
  legend = "Legend",
  labels = NULL,
  risk.table = TRUE,
  xlim = NULL,
  main = "Kaplan-Meier Overall Survival Curves",
  ylab = "Probability of survival",
  xlab = "Time since diagnosis (days)",
  filename = "survival.pdf",
  color = NULL,
  height = 8,
  width = 12,
  dpi = 300,
  pvalue = TRUE,
  conf.int = TRUE,
  barcode = NULL
)

Arguments

clin.mm

MMRF Clinical patient with the information days_to_death

clusterCol

Column with groups to plot. This is a mandatory field, the caption will be based in this column

legend

Legend title of the figure

labels

labels of the plot

risk.table

show or not the risk table

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.int

show confidence intervals for point estimates of survival curves.

Value

Survival plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 # clin.mm<-MMRFqueryGDC_clinic(type = "clinical")
 clin.mm <- data.frame(
      vital_status = c("alive","alive","alive","dead","alive",
                       "alive","dead","alive","dead","alive"),
      days_to_death = c(NA,NA,NA,172,NA,NA,3472,NA,786,NA),
      days_to_last_follow_up = c(3011,965,718,NA,1914,423,NA,5,656,1417),
      gender = c(rep("male",5),rep("female",5))
 )
MMRFanalyzeGDC_survival(clin.mm, clusterCol="gender")
MMRFanalyzeGDC_survival(clin.mm, clusterCol="gender", xlim = 1000)
MMRFanalyzeGDC_survival(clin.mm,
                       clusterCol="gender",
                       risk.table = FALSE,
                       conf.int = FALSE,
                       color = c("pink","blue"))
MMRFanalyzeGDC_survival(clin.mm,
                        clusterCol="gender",
                        risk.table = FALSE,
                        xlim = c(100,1000),
                        conf.int = FALSE,
                        color = c("Dark2"))

MarzyUnicz/MMRFBiolinks documentation built on May 28, 2020, 4:08 a.m.