Skip to contents

Get Gene Panel by study ID and sample ID

Usage

get_panel_by_sample(
  study_id = NULL,
  sample_id = NULL,
  sample_study_pairs = 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

sample_id

a vector of sample IDs (character)

sample_study_pairs

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

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{
get_panel_by_sample(study_id = "blca_plasmacytoid_mskcc_2016",
 sample_id = "DS-sig-010-P2",
 base_url = 'www.cbioportal.org/api')
#> # A tibble: 1 × 3
#>   sampleId      studyId                      genePanel
#>   <chr>         <chr>                        <chr>    
#> 1 DS-sig-010-P2 blca_plasmacytoid_mskcc_2016 IMPACT410
 # }