Description Usage Arguments Details Examples
K-M plots for a specified gene and a specified data set.
1 2 |
dataset |
A data set. The data set used. |
gene_info |
A character or a number. The gene information. Can be either gene name or gene ID. Gene name can be uppercase or lowercase. For example: The gene name can be "S100A8" or "s100a8". |
time |
A character. The survival time variable name in original dataset. |
event |
A character. The event variable name in original dataset. |
receptor |
A logical indicating whether we will use the whole data set or receptor status = TN only. If receptor = TRUE, then use the data with receptor status = TN only; if receptor = FLASE, then use the whole data set. |
criterion |
A number. A criterion that is used to split two groups. Range from 0 to 1. |
title |
A character. The title of the KM plot. |
fontsize |
A number. The font size. The default is 1. |
In this function, it will create a dataset with three variables.
The first column of data set is time variable, the second column is censored or not, the third column is group variable.
The data set is grouped by the p-value of log-rank test.
First: We will order the gene expression.
Second: Divide them as two group for any possibility, the minimal size of each group is 10 percent of total sample size.
Third: Based on the group, we will have the p-values of log-rank test for each possibility
Fourth: Order the p-values from minimal to maximum.
Fifth: The smallest p-value will be the cutoff point. The data will be separated based on that cutoff point. If gene expression is bigger than or equal to the gene expression of cutoff point, then groups 1, otherwise groups 0.
Then it will create a KM plot based on the group.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.