Skip to contents

Get clinical data by attribute, study ID and patient ID

Usage

get_clinical_by_patient(
  study_id = NULL,
  patient_id = NULL,
  patient_study_pairs = NULL,
  clinical_attribute = NULL,
  base_url = NULL
)

Arguments

study_id

A string indicating the study ID from which to pull data. If no study ID, will guess the study ID based on your URL and inform. Only 1 study ID can be passed. If mutations/cna from more than 1 study needed, see sample_study_pairs

patient_id

a cBioPortal patient_id

patient_study_pairs

A dataframe with columns: patient_id, study_id. Variations in capitalization of column names are accepted. This can be used in place of patient_id, study_id, arguments above if you need to pull samples from several different studies at once. If passed, this will take overwrite patient_id and study_id if they are also passed.

clinical_attribute

one or more clinical attributes for your study. If none provided, will return all attributes available for studies

base_url

The database URL to query If NULL will default to URL set with set_cbioportal_db(<your_db>)

Value

a dataframe of a specific clinical attribute

Examples

# \dontrun{

ex <- tibble::tribble(
~patientID, ~study_id,
"P-0001453", "blca_nmibc_2017",
"P-0002166", "blca_nmibc_2017",
"P-0003238", "blca_nmibc_2017",
"P-0000004", "msk_impact_2017",
"P-0000023", "msk_impact_2017")

x <- get_clinical_by_patient(patient_study_pairs = ex,
 clinical_attribute = NULL, base_url = 'www.cbioportal.org/api')
#> ! No `clinical_attribute` passed. Defaulting to returning
#> all clinical attributes in "blca_nmibc_2017" study
#> ! No `clinical_attribute` passed. Defaulting to returning
#> all clinical attributes in "msk_impact_2017" study
 # }