diff --git a/NAMESPACE b/NAMESPACE index 07b7339..30160fa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +export(.BEDbase) export(bb_bed_text_search) export(bb_beds_in_bedset) export(bb_example) @@ -9,6 +10,7 @@ export(bb_metadata) export(bb_to_granges) export(bb_to_grangeslist) export(bedbaser) +exportClasses(BEDbase) importFrom(AnVIL,Service) importFrom(BiocFileCache,BiocFileCache) importFrom(BiocFileCache,bfcadd) diff --git a/R/BEDbase-class.R b/R/BEDbase-class.R new file mode 100644 index 0000000..e69de29 diff --git a/R/bedbase-class.R b/R/bedbase-class.R deleted file mode 100644 index eb7fad7..0000000 --- a/R/bedbase-class.R +++ /dev/null @@ -1,9 +0,0 @@ -#' BEDbase class -#' -#' @importFrom methods new -.BEDbase <- setClass( - "BEDbase", - contains = "Service" -) - -.BEDBASE_API_REFERENCE_VERSION <- "0.5.0" diff --git a/R/bedbaser.R b/R/bedbaser.R index 3de9ade..b7eef8a 100644 --- a/R/bedbaser.R +++ b/R/bedbaser.R @@ -1,3 +1,14 @@ +#' BEDbase class +#' +#' @importFrom methods new +#' +#' @export +.BEDbase <- setClass( + "BEDbase", + contains = "Service" +) + + #' @rdname bedbaser #' #' @title An R client for BEDbase @@ -8,7 +19,7 @@ #' #' @details #' -#' The main functions are as follows +#' The convenience functions are as follows #' * `bedbaser::bedbaser()`: API constructor #' * `bedbaser::bb_example()`: Retrieve an example BED file or BEDset #' * `bedbaser::bb_metadata()`: Retrieve metadata for a BED file or BEDset @@ -34,6 +45,7 @@ bedbaser <- function() { Service( service = "BEDbase", host = "api.bedbase.org", + api_reference_version = .BEDBASE_API_REFERENCE_VERSION, authenticate = FALSE, api_url = "https://api.bedbase.org/openapi.json", package = "bedbaser" @@ -41,6 +53,14 @@ bedbaser <- function() { ) } + +## Copied from the AnVIL package +.api_header <- function(api) api@api_header + +.BEDBASE_API_REFERENCE_VERSION <- "0.5.0" + + + #' Get the example BED file or BEDset with metadata #' #' @param api API object of BEDbase created from bedbaser() diff --git a/man/BEDbase-class.Rd b/man/BEDbase-class.Rd index 894d708..7b731c3 100644 --- a/man/BEDbase-class.Rd +++ b/man/BEDbase-class.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bedbase-class.R +% Please edit documentation in R/bedbaser.R \docType{class} \name{BEDbase-class} \alias{BEDbase-class} diff --git a/man/bedbaser.Rd b/man/bedbaser.Rd index 35ff9a4..9ca819d 100644 --- a/man/bedbaser.Rd +++ b/man/bedbaser.Rd @@ -15,7 +15,7 @@ functions for common tasks, including importing a BED id into a \code{GRanges} object and a BEDset id into a \code{GRangesList}. } \details{ -The main functions are as follows +The convenience functions are as follows \itemize{ \item \code{bedbaser::bedbaser()}: API constructor \item \code{bedbaser::bb_example()}: Retrieve an example BED file or BEDset