Lookup all available information on what studies a sample ID or patient ID belongs to
Source:R/by_database.R
lookup_id.Rd
This is a general look up function that can take a study ID or patient ID and return what samples exist across entire cBioPortal website (depends on your base URL) that match that ID. It will return which studies include that sample or patient.
Details
This can also be useful to see all samples a particular patient has available across all studies on
cBioPortal (see also get_samples_by_patient()
).
Examples
# \dontrun{
lookup_id <- c("P-0001453-T01-IM3", "P-0000004-T01-IM3", "TCGA-OR-A5JA")
x <- lookup_id(lookup_id = lookup_id, base_url = 'www.cbioportal.org/api')
x
#> # A tibble: 11 × 6
#> uniqueSampleKey uniquePatientKey sampleType sampleId patientId studyId
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 UC0wMDAxNDUzLVQwMS1JT… UC0wMDAxNDUzOmJ… Primary S… P-00014… P-0001453 blca_n…
#> 2 UC0wMDAxNDUzLVQwMS1JT… UC0wMDAxNDUzOm1… Primary S… P-00014… P-0001453 msk_im…
#> 3 UC0wMDAxNDUzLVQwMS1JT… UC0wMDAxNDUzOm1… Primary S… P-00014… P-0001453 msk_me…
#> 4 UC0wMDAxNDUzLVQwMS1JT… UC0wMDAxNDUzOnB… Primary S… P-00014… P-0001453 paired…
#> 5 UC0wMDAxNDUzLVQwMS1JT… UC0wMDAxNDUzOmJ… Primary S… P-00014… P-0001453 bladde…
#> 6 UC0wMDAwMDA0LVQwMS1JT… UC0wMDAwMDA0OmJ… Primary S… P-00000… P-0000004 breast…
#> 7 UC0wMDAwMDA0LVQwMS1JT… UC0wMDAwMDA0Om1… Primary S… P-00000… P-0000004 msk_im…
#> 8 UC0wMDAwMDA0LVQwMS1JT… UC0wMDAwMDA0Om1… Primary S… P-00000… P-0000004 msk_me…
#> 9 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
#> 10 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
#> 11 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
# }