Skip to content

Commit

Permalink
Merge pull request #1 from sbg/dev
Browse files Browse the repository at this point in the history
Merge dev to master branch
  • Loading branch information
groverj3 authored Oct 21, 2021
2 parents 3d18af6 + 45632ec commit 37e6a16
Show file tree
Hide file tree
Showing 102 changed files with 2,502 additions and 1,112 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store
.Rproj.user
.Rhistory
.RData
.Ruserdata
.DS_store
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: biocompute
Type: Package
Title: Create and Manipulate BioCompute Objects
Version: 1.0.6
Version: 1.1.0
Authors@R: c(
person("Jeffrey", "Grover", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6246-1767")),
person("Soner", "Koc", email = "[email protected]", role = c("aut"), comment = c(ORCID = "0000-0002-0772-6600")),
Expand Down
29 changes: 15 additions & 14 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
export("%>%")
export(compose)
export(compose_description)
export(compose_description_v1.3.0)
export(compose_description_v1.4.2)
export(compose_error)
export(compose_error_v1.3.0)
export(compose_error_v1.4.2)
export(compose_execution)
export(compose_execution_v1.3.0)
export(compose_execution_v1.4.2)
export(compose_extension)
export(compose_extension_v1.3.0)
export(compose_extension_v1.4.2)
export(compose_fhir)
export(compose_fhir_v1.3.0)
export(compose_fhir_v1.4.2)
export(compose_io)
export(compose_io_v1.3.0)
export(compose_io_v1.4.2)
export(compose_parametric)
export(compose_parametric_v1.3.0)
export(compose_parametric_v1.4.2)
export(compose_provenance)
export(compose_provenance_v1.3.0)
export(compose_provenance_v1.4.2)
export(compose_scm)
export(compose_scm_v1.3.0)
export(compose_scm_v1.4.2)
export(compose_tlf)
export(compose_tlf_v1.3.0)
export(compose_tlf_v1.4.2)
export(compose_usability)
export(compose_usability_v1.3.0)
export(compose_v1.3.0)
export(compose_usability_v1.4.2)
export(compose_v1.4.2)
export(convert_json)
export(convert_yaml)
export(export_html)
Expand All @@ -36,10 +36,11 @@ export(generate_example)
export(generate_id)
export(is_bco)
export(is_domain)
export(read_bco)
export(validate_checksum)
export(validate_checksum_v1.3.0)
export(validate_checksum_v1.4.2)
export(validate_schema)
export(validate_schema_v1.3.0)
export(validate_schema_v1.4.2)
export(versions)
importFrom(curl,curl_escape)
importFrom(digest,digest)
Expand Down
9 changes: 5 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# biocompute 1.0.6
# biocompute 1.1.0

## Improvements

- Fixed broken links to BCO specification in documentation
- Update to BCO spec v1.4.2
- Added ability to read BCOs from json.

# biocompute 1.0.5
# biocompute 1.0.6

## Improvements

- Update package maintainer.
- Fixed broken links to BCO specification in documentation.

# biocompute 1.0.4

Expand Down
14 changes: 7 additions & 7 deletions R/compose-description.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' Compose BioCompute Object - Description Domain (v1.3.0)
#' Compose BioCompute Object - Description Domain (v1.4.2)
#'
#' @param keywords Character vector. A list of keywords to aid in
#' searchability and description of the experiment.
#' @param xref Data frame. A list of the databases and/or ontology IDs
#' that are cross-referenced in the BCO.
#' @param platform Character string. Reference to a particular deployment
#' @param platform Character string or list. Reference to a particular deployment
#' of an existing platform where this BCO can be reproduced.
#' @param pipeline_meta Data frame. Pipeline metadata.
#' Variables include \code{step_number}, \code{name}, \code{description},
Expand All @@ -20,7 +20,7 @@
#' @return A list of class \code{bco.domain}
#'
#' @rdname compose_description
#' @export compose_description_v1.3.0
#' @export compose_description_v1.4.2
#'
#' @examples
#' keywords <- c("HCV1a", "Ledipasvir", "antiviral resistance", "SNP", "amino acid substitutions")
Expand Down Expand Up @@ -108,9 +108,9 @@
#' keywords, xref, platform,
#' pipeline_meta, pipeline_prerequisite, pipeline_input, pipeline_output
#' ) %>% convert_json()
compose_description_v1.3.0 <-
compose_description_v1.4.2 <-
function(
keywords = NULL, xref = NULL, platform = "Seven Bridges Platform",
keywords = NULL, xref = NULL, platform = list("Seven Bridges Platform"),
pipeline_meta = NULL, pipeline_prerequisite = NULL,
pipeline_input = NULL, pipeline_output = NULL) {
if (is.null(keywords)) keywords <- character()
Expand Down Expand Up @@ -210,7 +210,7 @@ compose_description_v1.3.0 <-
domain <- list(
"keywords" = keywords,
"xref" = xref_lst,
"platform" = platform,
"platform" = as.list(platform),
"pipeline_steps" = ps_lst
)
class(domain) <- c(class(domain), "bco.domain")
Expand All @@ -220,4 +220,4 @@ compose_description_v1.3.0 <-

#' @rdname compose_description
#' @export compose_description
compose_description <- compose_description_v1.3.0
compose_description <- compose_description_v1.4.2
10 changes: 5 additions & 5 deletions R/compose-error.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' Compose BioCompute Object - Error Domain (v1.3.0)
#' Compose BioCompute Object - Error Domain (v1.4.2)
#'
#' The error domain can be used to determine what range of input
#' returns outputs that are within the tolerance level defined
#' in this subdomain and therefore can be used to optimize algorithm
#' (\href{https://github.com/biocompute-objects/BCO_Specification/blob/1.3.0/error-domain.md}{domain definition}).
#' (\href{https://github.com/biocompute-objects/BCO_Specification/blob/1.4.2/docs/error-domain.md}{domain definition}).
#'
#' @param empirical Data frame. Variables include \code{key} and \code{value}.
#' Each row is one item in the empirical error subdomain.
Expand All @@ -13,7 +13,7 @@
#' @return A list of class \code{bco.domain}
#'
#' @rdname compose_error
#' @export compose_error_v1.3.0
#' @export compose_error_v1.4.2
#'
#' @examples
#' empirical <- data.frame(
Expand All @@ -29,7 +29,7 @@
#' )
#'
#' compose_error(empirical, algorithmic) %>% convert_json()
compose_error_v1.3.0 <- function(empirical = NULL, algorithmic = NULL) {
compose_error_v1.4.2 <- function(empirical = NULL, algorithmic = NULL) {
empirical_lst <- if (!is.null(empirical)) as.list(setNames(as.character(empirical$value), as.character(empirical$key))) else list()
algorithmic_lst <- if (!is.null(algorithmic)) as.list(setNames(as.character(algorithmic$value), as.character(algorithmic$key))) else list()

Expand All @@ -41,4 +41,4 @@ compose_error_v1.3.0 <- function(empirical = NULL, algorithmic = NULL) {

#' @rdname compose_error
#' @export compose_error
compose_error <- compose_error_v1.3.0
compose_error <- compose_error_v1.4.2
12 changes: 6 additions & 6 deletions R/compose-execution.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Compose BioCompute Object - Execution Domain (v1.3.0)
#' Compose BioCompute Object - Execution Domain (v1.4.2)
#'
#' @param script Character string. Points to internal or external
#' @param script Character string or list. Points to internal or external
#' references to an object that was used to perform computations
#' for this BCO instance.
#' @param script_driver Character string. Indicate what kind of
Expand All @@ -26,7 +26,7 @@
#' @importFrom stats setNames
#'
#' @rdname compose_execution
#' @export compose_execution_v1.3.0
#' @export compose_execution_v1.4.2
#'
#' @examples
#' script <- "https://example.com/workflows/antiviral_resistance_detection_hive.py"
Expand Down Expand Up @@ -62,7 +62,7 @@
#' compose_execution(
#' script, script_driver, software_prerequisites, external_data_endpoints, environment_variables
#' ) %>% convert_json()
compose_execution_v1.3.0 <-
compose_execution_v1.4.2 <-
function(
script = NULL, script_driver = NULL, software_prerequisites = NULL,
external_data_endpoints = NULL, environment_variables = NULL) {
Expand Down Expand Up @@ -101,7 +101,7 @@ compose_execution_v1.3.0 <-
}

domain <- list(
"script" = script,
"script" = as.list(script),
"script_driver" = script_driver,
"software_prerequisites" = sp_lst,
"external_data_endpoints" = ede_lst,
Expand All @@ -114,4 +114,4 @@ compose_execution_v1.3.0 <-

#' @rdname compose_execution
#' @export compose_execution
compose_execution <- compose_execution_v1.3.0
compose_execution <- compose_execution_v1.4.2
8 changes: 4 additions & 4 deletions R/compose-extension-fhir.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Compose BioCompute Object - FHIR Extension (v1.3.0)
#' Compose BioCompute Object - FHIR Extension (v1.4.2)
#'
#' @param endpoint Character string. The URL of the endpoint of the
#' FHIR server containing the resource.
Expand All @@ -9,7 +9,7 @@
#' @return A list of class \code{bco.domain}
#'
#' @rdname compose_fhir
#' @export compose_fhir_v1.3.0
#' @export compose_fhir_v1.4.2
#'
#' @examples
#' fhir_endpoint <- "https://fhirtest.uhn.ca/baseDstu3"
Expand All @@ -24,7 +24,7 @@
#' )
#'
#' compose_fhir(fhir_endpoint, fhir_version, fhir_resources) %>% convert_json()
compose_fhir_v1.3.0 <- function(endpoint = NULL, version = NULL, resources = NULL) {
compose_fhir_v1.4.2 <- function(endpoint = NULL, version = NULL, resources = NULL) {
if (!is.null(resources)) {
names(resources)[which(names(resources) == "id")] <- "fhir_id"
names(resources)[which(names(resources) == "resource")] <- "fhir_resource"
Expand All @@ -41,4 +41,4 @@ compose_fhir_v1.3.0 <- function(endpoint = NULL, version = NULL, resources = NUL

#' @rdname compose_fhir
#' @export compose_fhir
compose_fhir <- compose_fhir_v1.3.0
compose_fhir <- compose_fhir_v1.4.2
8 changes: 4 additions & 4 deletions R/compose-extension-scm.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Compose BioCompute Object - SCM Extension (v1.3.0)
#' Compose BioCompute Object - SCM Extension (v1.4.2)
#'
#' @param scm_repository Character string. Base URL of the SCM repository.
#' @param scm_type Character string. Type of SCM database. Must be one of
Expand All @@ -14,7 +14,7 @@
#' @return A list of class \code{bco.domain}
#'
#' @rdname compose_scm
#' @export compose_scm_v1.3.0
#' @export compose_scm_v1.4.2
#'
#' @examples
#' scm_repository <- "https://github.com/example/repo"
Expand All @@ -24,7 +24,7 @@
#' scm_preview <- "https://github.com/example/repo/blob/master/mutation-detection.cwl"
#'
#' compose_scm(scm_repository, scm_type, scm_commit, scm_path, scm_preview) %>% convert_json()
compose_scm_v1.3.0 <-
compose_scm_v1.4.2 <-
function(
scm_repository = NULL, scm_type = c("git", "svn", "hg", "other"),
scm_commit = NULL, scm_path = NULL, scm_preview = NULL) {
Expand All @@ -50,4 +50,4 @@ compose_scm_v1.3.0 <-

#' @rdname compose_scm
#' @export compose_scm
compose_scm <- compose_scm_v1.3.0
compose_scm <- compose_scm_v1.4.2
8 changes: 4 additions & 4 deletions R/compose-extension.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#' Compose BioCompute Object - Extension Domain (v1.3.0)
#' Compose BioCompute Object - Extension Domain (v1.4.2)
#'
#' @param fhir FHIR extension domain composed by \code{\link{compose_fhir}}.
#' @param scm SCM extension domain composed by \code{\link{compose_scm}}.
#'
#' @return A list of class \code{bco.domain}
#'
#' @rdname compose_extension
#' @export compose_extension_v1.3.0
#' @export compose_extension_v1.4.2
#'
#' @examples
#' fhir_endpoint <- "https://fhirtest.uhn.ca/baseDstu3"
Expand All @@ -31,7 +31,7 @@
#' scm <- compose_scm(scm_repository, scm_type, scm_commit, scm_path, scm_preview)
#'
#' compose_extension(fhir, scm) %>% convert_json()
compose_extension_v1.3.0 <- function(fhir = NULL, scm = NULL) {
compose_extension_v1.4.2 <- function(fhir = NULL, scm = NULL) {
if (is.null(fhir)) fhir_lst <- list() else fhir_lst <- fhir
if (is.null(scm)) scm_lst <- list() else scm_lst <- scm

Expand All @@ -46,4 +46,4 @@ compose_extension_v1.3.0 <- function(fhir = NULL, scm = NULL) {

#' @rdname compose_extension
#' @export compose_extension
compose_extension <- compose_extension_v1.3.0
compose_extension <- compose_extension_v1.4.2
8 changes: 4 additions & 4 deletions R/compose-io.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Compose BioCompute Object - Input and Output Domain (v1.3.0)
#' Compose BioCompute Object - Input and Output Domain (v1.4.2)
#'
#' This domain contains the list of global input and output files
#' created by the computational workflow, excluding the intermediate files.
Expand All @@ -13,7 +13,7 @@
#' @return A list of class \code{bco.domain}
#'
#' @rdname compose_io
#' @export compose_io_v1.3.0
#' @export compose_io_v1.4.2
#'
#' @examples
#' input_subdomain <- data.frame(
Expand Down Expand Up @@ -46,7 +46,7 @@
#' )
#'
#' compose_io(input_subdomain, output_subdomain) %>% convert_json()
compose_io_v1.3.0 <- function(input = NULL, output = NULL) {
compose_io_v1.4.2 <- function(input = NULL, output = NULL) {
if (!is.null(input)) {
input$access_time <- as.character(input$access_time, format = "%Y-%m-%dT%H:%M:%S%z")
input_lst <- df2list(input)
Expand Down Expand Up @@ -79,4 +79,4 @@ compose_io_v1.3.0 <- function(input = NULL, output = NULL) {

#' @rdname compose_io
#' @export compose_io
compose_io <- compose_io_v1.3.0
compose_io <- compose_io_v1.4.2
10 changes: 5 additions & 5 deletions R/compose-parametric.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' Compose BioCompute Object - Parametric Domain (v1.3.0)
#' Compose BioCompute Object - Parametric Domain (v1.4.2)
#'
#' Non-default parameters customizing the computational flow
#' which can affect the output of the calculations
#' (\href{https://github.com/biocompute-objects/BCO_Specification/blob/1.3.0/parametric-domain.md}{domain definition}).
#' (\href{https://github.com/biocompute-objects/BCO_Specification/blob/1.4.2/docs/parametric-domain.md}{domain definition}).
#'
#' @param df Data frame. Variables include \code{param} (parameter names),
#' \code{value} (value of the parameters), and \code{step}
Expand All @@ -13,7 +13,7 @@
#' @importFrom jsonlite toJSON
#'
#' @rdname compose_parametric
#' @export compose_parametric_v1.3.0
#' @export compose_parametric_v1.4.2
#'
#' @examples
#' df_parametric <- data.frame(
Expand All @@ -27,7 +27,7 @@
#' )
#'
#' compose_parametric(df_parametric) %>% convert_json()
compose_parametric_v1.3.0 <- function(df = NULL) {
compose_parametric_v1.4.2 <- function(df = NULL) {
if (!is.null(df)) {
# mix types in values under the same key is probably bad practice
# so we consciously choose to be more strict and make everything character
Expand All @@ -47,4 +47,4 @@ compose_parametric_v1.3.0 <- function(df = NULL) {

#' @rdname compose_parametric
#' @export compose_parametric
compose_parametric <- compose_parametric_v1.3.0
compose_parametric <- compose_parametric_v1.4.2
Loading

0 comments on commit 37e6a16

Please sign in to comment.