Skip to content

Commit

Permalink
get up to date with main
Browse files Browse the repository at this point in the history
Merge branch 'main' of https://github.com/karissawhiting/cbioportalR into get-study-id-for-samples

# Conflicts:
#	vignettes/overview-of-workflow.Rmd
  • Loading branch information
karissawhiting committed Dec 14, 2023
2 parents c1964d4 + 74ef3b3 commit 18e7bf3
Show file tree
Hide file tree
Showing 10 changed files with 301 additions and 183 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cbioportalR
Title: Browse and Query Clinical and Genomic Data from cBioPortal
Version: 1.0.1.9002
Version: 1.1.0
Authors@R:
c(person(given = "Karissa",
family = "Whiting",
Expand Down
10 changes: 0 additions & 10 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(.check_for_patient_id)
export(.check_for_study_id)
export(.check_input_pair_df)
export(.get_cbioportal_url)
export(.get_clinical_by_list_item)
export(.get_clinical_pat_by_list_item)
export(.get_data_by_sample)
export(.get_data_by_study)
export(.get_panel_entrez)
export(.guess_study_id)
export(.lookup_hugo)
export(.lookup_profile_name)
export(.lookup_study_name)
export(.resolve_url)
export(available_clinical_attributes)
export(available_gene_panels)
export(available_patients)
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cbioportalR (development version)
# cbioportalR 1.1.0

* Added `available_sample_lists()` function which returns all available sample list IDs for a given study ID
* Added `sample_list_id` argument to `available_samples()` which returns all samples IDs in specific sample list within a study (#53).
* Fixed {cli} errors to make package compatible with {cli} v3.4.1.
* Fixed {cli} errors to make package compatible with {cli} v3.4.1.
* Added CNA segmentation retrieval endpoint accessible via `get_segments_by_sample()` and `get_segments_by_study()`). You can use `get_genomics_by_*(return_segments = TRUE)` as well to access this data.

# cbioportalR 1.0.1
Expand Down
3 changes: 0 additions & 3 deletions R/authenticate.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ test_cbioportal_db <- function() {
#' Pulls the set URL from the internal package environment
#'
#' @return a string indicating the saved URL in the `cbioportal_env` environment or an error if no URL found.
#' @export
#' @author Karissa Whiting, Daniel D. Sjoberg
#' @keywords internal
#' @noRd
Expand All @@ -126,9 +125,7 @@ test_cbioportal_db <- function() {
#' Process and make a best guess of URL string passed to authentication functions
#'
#' @param raw_url The URL passed to a function by a user
#'
#' @return A string with a final URL to be used in the given query.
#' @export
#' @author Karissa Whiting, Daniel D. Sjoberg
#' @keywords internal
#' @noRd
Expand Down
11 changes: 1 addition & 10 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#' @return stop if no arg
#' @keywords internal
#' @noRd
#' @export
#'
.check_for_study_id <- function(study_id) {

Expand All @@ -27,7 +26,6 @@
#' @return stop if no sample_id arg
#' @keywords internal
#' @noRd
#' @export
#'
.check_for_patient_id <- function(patient_id) {
if (is.null(patient_id)) {
Expand All @@ -43,7 +41,6 @@
#' @return A valid `sample_study_pairs` or `patient_study_pairs` data frame. If `input_df` is NULL, it will return NULL.
#' @keywords internal
#' @noRd
#' @export
#'
.check_input_pair_df <- function(input_df) {

Expand Down Expand Up @@ -113,7 +110,6 @@
#' @return a guess at which study_id a user may want to use
#' @keywords internal
#' @noRd
#' @export
#'
.guess_study_id <- function(study_id, resolved_url) {

Expand All @@ -125,7 +121,7 @@
study_id_guess %||% cli::cli_abort("Unable to guess a {.code study_id} for your database.
Please provide a {.code study_id}.")

cli::cli_alert_info("No {.code study_id} provided. Using {.val {study_id_guess}} as default study")
study_id %||% cli::cli_alert_info("No {.code study_id} provided. Using {.val {study_id_guess}} as default study")

return(study_id_guess)
}
Expand All @@ -144,7 +140,6 @@
#' @return find molecular profile name for a specified data type
#' @keywords internal
#' @noRd
#' @export
#'
.lookup_profile_name <- function(data_type, study_id, base_url) {

Expand Down Expand Up @@ -178,7 +173,6 @@
#' @return find study ID for a specified molecular profile
#' @keywords internal
#' @noRd
#' @export
#'
.lookup_study_name <- function(molecular_profile_id, study_id, base_url) {

Expand Down Expand Up @@ -217,7 +211,6 @@
#' @return a dataframe that matches input data frame but with hugoGeneSymbol column
#' @keywords internal
#' @noRd
#' @export
#'
.lookup_hugo <- function(df, base_url) {

Expand Down Expand Up @@ -262,7 +255,6 @@
#' @return a vector of Entrez Gene IDs
#' @keywords internal
#' @noRd
#' @export
#'
.get_panel_entrez <- function(panel_id, base_url) {

Expand All @@ -286,7 +278,6 @@
#' Check if NULL
#'
#' @param x any R object or expression
#'
#' @noRd
#' @keywords internal
#'
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ library(tidyverse)

This package was created to work with both the public [cBioPortal website](https://www.cbioportal.org/), as well as private institutional cBioPortal instances (e.g. MSKCC, GENIE) with appropriate credentials and [authentication].

This package is compatible with cBioPortal v5.0, but is subject to change as [cBioPortal updates are released](https://github.com/cBioPortal/cbioportal/releases). For more information on cBioPortal, see the following publications:
This package is compatible with cBioPortal v5, but is subject to change as [cBioPortal updates are released](https://github.com/cBioPortal/cbioportal/releases). To see if your cBioPortal instance is compatible, look for its version in the footer of the homepage or check `portalVersion` in the output of `YOUR_CBIOPORTAL_INSTANCE/api/info`. For more information on cBioPortal, see the following publications:

- [Gao et al. Sci. Signal. 2013](https://pubmed.ncbi.nlm.nih.gov/23550210/)
- [ Cerami et al. Cancer Discov. 2012](https://aacrjournals.org/cancerdiscovery/article/2/5/401/3246/The-cBio-Cancer-Genomics-Portal-An-Open-Platform)
Expand Down
Loading

0 comments on commit 18e7bf3

Please sign in to comment.