Get all available clinical data for a specified study
Source:R/by_studies.R
get_clinical_by_study.Rd
Returns all sample-level and patient-level clinical data for a given study
Arguments
- study_id
study ID
- clinical_attribute
one or more clinical attributes for your study. If none provided, will return all attributes available for that study (
available_clinical_attributes(<study_id>)
)- base_url
The database URL to query. If
NULL
will default to URL set withset_cbioportal_db(<your_db>)
Examples
# \dontrun{
get_clinical_by_study(study_id = "acc_tcga",
clinical_attribute = "CANCER_TYPE", base_url = 'www.cbioportal.org/api')
#> # A tibble: 92 × 8
#> uniqueSampleKey uniquePatientKey sampleId patientId studyId
#> <chr> <chr> <chr> <chr> <chr>
#> 1 VENHQS1PUi1BNUoxLTAxOmFjY190Y2dh VENHQS1PUi1BNUox… TCGA-OR… TCGA-OR-… acc_tc…
#> 2 VENHQS1PUi1BNUoyLTAxOmFjY190Y2dh VENHQS1PUi1BNUoy… TCGA-OR… TCGA-OR-… acc_tc…
#> 3 VENHQS1PUi1BNUozLTAxOmFjY190Y2dh VENHQS1PUi1BNUoz… TCGA-OR… TCGA-OR-… acc_tc…
#> 4 VENHQS1PUi1BNUo0LTAxOmFjY190Y2dh VENHQS1PUi1BNUo0… TCGA-OR… TCGA-OR-… acc_tc…
#> 5 VENHQS1PUi1BNUo1LTAxOmFjY190Y2dh VENHQS1PUi1BNUo1… TCGA-OR… TCGA-OR-… acc_tc…
#> 6 VENHQS1PUi1BNUo2LTAxOmFjY190Y2dh VENHQS1PUi1BNUo2… TCGA-OR… TCGA-OR-… acc_tc…
#> 7 VENHQS1PUi1BNUo3LTAxOmFjY190Y2dh VENHQS1PUi1BNUo3… TCGA-OR… TCGA-OR-… acc_tc…
#> 8 VENHQS1PUi1BNUo4LTAxOmFjY190Y2dh VENHQS1PUi1BNUo4… TCGA-OR… TCGA-OR-… acc_tc…
#> 9 VENHQS1PUi1BNUo5LTAxOmFjY190Y2dh VENHQS1PUi1BNUo5… TCGA-OR… TCGA-OR-… acc_tc…
#> 10 VENHQS1PUi1BNUpBLTAxOmFjY190Y2dh VENHQS1PUi1BNUpB… TCGA-OR… TCGA-OR-… acc_tc…
#> # ℹ 82 more rows
#> # ℹ 3 more variables: clinicalAttributeId <chr>, value <chr>, dataLevel <chr>
get_clinical_by_study(study_id = "acc_tcga", base_url = 'www.cbioportal.org/api')
#> ! Sample Level Clinical Data: No `clinical_attribute` passed. Defaulting to returning all clinical attributes in "acc_tcga" study
#> ! Patient Level Clinical Data: No `clinical_attribute` passed. Defaulting to returning all clinical attributes in "acc_tcga" study
#> # A tibble: 6,292 × 7
#> uniquePatientKey patientId studyId clinicalAttributeId value dataLevel
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… AGE 58 PATIENT
#> 2 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… AJCC_PATHOLOGIC_TU… Stag… PATIENT
#> 3 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… ATYPICAL_MITOTIC_F… Atyp… PATIENT
#> 4 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… CAPSULAR_INVASION Inva… PATIENT
#> 5 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… CLIN_M_STAGE M0 PATIENT
#> 6 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… CT_SCAN_PREOP_RESU… [Unk… PATIENT
#> 7 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… CYTOPLASM_PRESENCE… Cyto… PATIENT
#> 8 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… DAYS_TO_INITIAL_PA… 0 PATIENT
#> 9 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… DFS_MONTHS 24.77 PATIENT
#> 10 VENHQS1PUi1BNUoxOmFjY1… TCGA-OR-… acc_tc… DFS_STATUS 1:Re… PATIENT
#> # ℹ 6,282 more rows
#> # ℹ 1 more variable: sampleId <chr>
# }