Skip to contents

Get sample IDs for a given set of patient IDs

Usage

get_samples_by_patient(patient_id = NULL, study_id = NULL, base_url = NULL)

Arguments

patient_id

A character string of sample IDs to query

study_id

A character string indicating which study ID should be searched. Only 1 study allowed. If NULL, we will guess a default study ID based on your database URL.

base_url

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

Value

A dataframe of patient IDs and corresponding sample IDs. If patient has multiple samples, there will be multiple rows per patient.

Examples

# \dontrun{
get_samples_by_patient(patient_id = c("P-0000034", "P-0000036"))
#>  No `study_id` provided. Using "msk_impact_2017" as default study
#>   patientId          sampleId          sampleType         studyId
#> 1 P-0000034 P-0000034-T01-IM3 Primary Solid Tumor msk_impact_2017
#> 2 P-0000036 P-0000036-T01-IM3 Primary Solid Tumor msk_impact_2017
# }