Get Copy Number Segmentation Data By Sample ID
Source:R/genomics_by_sample.R
get_segments_by_sample.Rd
Get Copy Number Segmentation Data By Sample ID
Usage
get_segments_by_sample(
sample_id = NULL,
study_id = NULL,
sample_study_pairs = NULL,
base_url = NULL
)
Arguments
- sample_id
a vector of sample IDs (character)
- 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_study_pairs
A dataframe with columns:
sample_id
,study_id
andmolecular_profile_id
(optional). Variations in capitalization of column names are accepted. This can be used in place ofsample_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 overwritesample_id
,study_id
,molecular_profile_id
if also passed.- base_url
The database URL to query If
NULL
will default to URL set withset_cbioportal_db(<your_db>)
Examples
# \dontrun{
set_cbioportal_db("public")
#> ✔ You are successfully connected!
#> ✔ base_url for this R session is now set to "www.cbioportal.org/api"
get_segments_by_sample(sample_id = c("s_C_CAUWT7_P001_d"),
study_id = "prad_msk_2019")
#> The following parameters were used in query:
#> Study ID: "prad_msk_2019"
#> Molecular Profile ID: "Not Applicable"
#> Genes: "All available genes"
#> # A tibble: 47 × 10
#> uniqueSampleKey uniquePatientKey patientId start end segmentMean studyId
#> <chr> <chr> <chr> <int> <int> <dbl> <chr>
#> 1 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 2.49e6 2.47e8 0.0479 prad_m…
#> 2 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 4.72e6 2.43e8 -0.0846 prad_m…
#> 3 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 1.45e6 3.65e7 0.054 prad_m…
#> 4 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 3.70e7 3.85e7 -0.297 prad_m…
#> 5 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 3.95e7 1.94e8 0.0539 prad_m…
#> 6 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 1.40e6 1.90e8 -0.087 prad_m…
#> 7 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 2.19e5 4.43e7 0.0672 prad_m…
#> 8 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 5.27e7 7.51e7 -0.267 prad_m…
#> 9 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 7.59e7 1.80e8 0.0921 prad_m…
#> 10 c19DX0NBVVdUN19… cF9DX0NBVVdUNzp… p_C_CAUW… 3.93e5 3.13e7 -0.121 prad_m…
#> # ℹ 37 more rows
#> # ℹ 3 more variables: sampleId <chr>, chromosome <chr>, numberOfProbes <int>
# }