Skip to contents

Get CNA By Study

Usage

get_cna_by_study(
  study_id = NULL,
  molecular_profile_id = NULL,
  add_hugo = TRUE,
  base_url = NULL
)

Arguments

study_id

A study ID to query mutations. If NULL, guesses study ID based on molecular_profile_id.

molecular_profile_id

a molecular profile to query mutations. If NULL, guesses molecular_profile_id based on study ID.

add_hugo

Logical indicating whether HugoGeneSymbol should be added to your resulting data frame, if not already present in raw API results. Argument is TRUE by default. If FALSE, results will be returned as is (i.e. any existing Hugo Symbol columns in raw results will not be removed).

base_url

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

Value

A dataframe of CNAs

Examples

# \dontrun{
get_cna_by_study(study_id = "prad_msk_2019")
#>  Returning all data for the "prad_msk_2019_cna" molecular profile in the "prad_msk_2019" study
#> # A tibble: 1 × 9
#>   hugoGeneSymbol entrezGeneId uniqueSampleKey                   uniquePatientKey
#>   <chr>                 <int> <chr>                             <chr>           
#> 1 PTEN                   5728 c19DXzM2OTI0TF9QMDAxX2Q6cHJhZF9t… cF9DXzM2OTI0TDp…
#> # ℹ 5 more variables: molecularProfileId <chr>, sampleId <chr>,
#> #   patientId <chr>, studyId <chr>, alteration <int>
get_cna_by_study(molecular_profile_id = "prad_msk_2019_cna")
#>  Returning all data for the "prad_msk_2019_cna" molecular profile in the "prad_msk_2019" study
#> # A tibble: 1 × 9
#>   hugoGeneSymbol entrezGeneId uniqueSampleKey                   uniquePatientKey
#>   <chr>                 <int> <chr>                             <chr>           
#> 1 PTEN                   5728 c19DXzM2OTI0TF9QMDAxX2Q6cHJhZF9t… cF9DXzM2OTI0TDp…
#> # ℹ 5 more variables: molecularProfileId <chr>, sampleId <chr>,
#> #   patientId <chr>, studyId <chr>, alteration <int>
# }