Survplot_genedata: Survival K-M plot base on expression matrix and design object

Description Usage Arguments Details Author(s) See Also Examples

View source: R/BI_Survplot.genedata.R

Description

Survplot.genedata help draw KM plot base on expression matrix and design object

Usage

1
2
3
4
Survplot_genedata(expr.matrix, design, select, event.status, event.time,
  event.lower = 0, mode = c("median", "maxstat")[2],
  pval.position = NULL, size = 12, save.file = F, show.music = F,
  width = 12, height = 12, names = "love")

Arguments

expr.matrix

expression matrix

design

design object

select

the genes or markers you want to select

event.status

the colname of the status of event.

event.lower

the lower cutoff of event time.Default is 0.

mode

the mode of cut-off strategy for continuous value like gene expression data.Default is mode = "maxstat" provided by maxstat.test.If you want median value as cut-off,you can just set mode = "median"

pval.position

the postion of p value in the plot

size

the size of saved plot

save.file

whether to save pdf for plot.If you select more than 1 genes,it would set save.file = T automatically.

show.music

whether to show music when job was completed.Only available when you select more than 1 genes.

width

the width of saved plot

height

the height of saved plot

event.timethe

colname of the time of event.

part

name of saved pdf file

Details

There are some different between the output of multi- and uni- variate plot.

Author(s)

Weibin Huang<654751191@qq.com>

See Also

maxstat.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
library(lucky);
data("rna.tpm",package = "lucky")
data("rna.design",package = "lucky")

## Muti-variable Plot.here I focus on patients with more follow-up time than 89 days with event.lower = 89
p <- Survplot_genedata(expr.matrix = log2(rna.tpm + 1),
                       design = rna.design,
                       select = c("ENSG00000004478",
                                  "ENSG00000000457"),
                       event.status = "OS.status",
                       event.time = "OS.time",
                       event.lower = 89,
                       mode = c("median","maxstat")[2],
                       pval.position = c(900,1),# x=900,y=1
                       size = 12,
                       save.file = F,
                       show.music = F,
                       width = 12,height = 12,
                       names = "love")

## univariable Plot
p <- Survplot_genedata(expr.matrix = log2(rna.tpm + 1),
                       design = rna.design,
                       select = "ENSG00000004478",
                       event.status = "OS.status",
                       event.time = "OS.time",
                       event.lower = 89,
                       mode = c("median","maxstat")[2],
                       pval.position = c(900,1))

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.