Skip to content

Commit

Permalink
Modified clinical information
Browse files Browse the repository at this point in the history
  • Loading branch information
longfei8533 committed Dec 18, 2019
1 parent 749e90e commit 26c01b7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions inst/shinyapp/modules/modules-survival-analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,14 @@ sur_get <- function(TCGA_cohort, gene) {
XenaGenerate() %>%
XenaQuery() %>%
XenaDownload() %>%
XenaPrepare()
XenaPrepare()

cli <- merge(cli[[grep("survival.txt.gz",names(cli))]],
cli[[grep("clinicalMatrix",names(cli))]],
by.x="sample",
by.y="sampleID",
all=FALSE) %>%
dplyr::rename(sampleID=sample)

if(!("pathologic_stage") %in% names(cli) ){
cli$pathologic_stage=NA
Expand Down Expand Up @@ -173,7 +180,8 @@ sur_get <- function(TCGA_cohort, gene) {
) %>%
left_join(cli, by = "sampleID") %>%
dplyr::filter(sample_type == names(which.max(table(sample_type))),
!is.na(OS)) %>%
!is.na(OS),
!is.na(OS.time)) %>%
dplyr::select(sampleID, gene_expression,
time = OS.time, status = OS,
gender, age = age_at_initial_pathologic_diagnosis,
Expand Down

0 comments on commit 26c01b7

Please sign in to comment.