Skip to content

Instantly share code, notes, and snippets.

@tiagochst
Created August 30, 2016 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagochst/cfa384297ff0950a6489e3f4b296ecd7 to your computer and use it in GitHub Desktop.
Save tiagochst/cfa384297ff0950a6489e3f4b296ecd7 to your computer and use it in GitHub Desktop.
explaining clinical data
clin.query <- GDCquery(project = "TCGA-BLCA",
data.category = "Clinical")
GDCdownload(clin.query)
clinical.patient <- GDCprepare_clinic(clin.query, clinical.info = "patient")
clinical.patient.followup <- GDCprepare_clinic(clin.query, clinical.info = "follow_up")
clinical.index <- GDCquery_clinic("TCGA-BLCA")
# verify
> clinical.patient[grepl("a5c0",clinical.patient$patient_id, ignore.case = T),c("vital_status","days_to_death","days_to_last_followup")]
vital_status days_to_death days_to_last_followup
60 Alive 209
> clinical.patient.followup[grepl("a5c0",clinical.patient.followup$bcr_followup_barcode, ignore.case = T),c("vital_status","days_to_death","days_to_last_followup")]
vital_status days_to_death days_to_last_followup
61 Alive 407
62 Dead 550
> clinical.index[grepl("a5c0",clinical.index$submitter_id, ignore.case = T),c("vital_status","days_to_death","days_to_last_follow_up")]
vital_status days_to_death days_to_last_follow_up
197 dead 550 407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment