Title: | Create and Manipulate BioCompute Objects |
---|---|
Description: | Tools to create, validate, and export BioCompute Objects described in King et al. (2019) <doi:10.17605/osf.io/h59uh>. Users can encode information in data frames, and compose BioCompute Objects from the domains defined by the standard. A checksum validator and a JSON schema validator are provided. This package also supports exporting BioCompute Objects as JSON, PDF, HTML, or 'Word' documents, and exporting to cloud-based platforms. |
Authors: | Soner Koc [aut, cre] |
Maintainer: | Soner Koc <[email protected]> |
License: | AGPL-3 |
Version: | 1.1.1 |
Built: | 2025-03-06 02:47:11 UTC |
Source: | https://github.com/sbg/biocompute |
Compose BioCompute Object - Description Domain (v1.4.2)
compose_description_v1.4.2( keywords = NULL, xref = NULL, platform = list("Seven Bridges Platform"), pipeline_meta = NULL, pipeline_prerequisite = NULL, pipeline_input = NULL, pipeline_output = NULL ) compose_description( keywords = NULL, xref = NULL, platform = list("Seven Bridges Platform"), pipeline_meta = NULL, pipeline_prerequisite = NULL, pipeline_input = NULL, pipeline_output = NULL )
compose_description_v1.4.2( keywords = NULL, xref = NULL, platform = list("Seven Bridges Platform"), pipeline_meta = NULL, pipeline_prerequisite = NULL, pipeline_input = NULL, pipeline_output = NULL ) compose_description( keywords = NULL, xref = NULL, platform = list("Seven Bridges Platform"), pipeline_meta = NULL, pipeline_prerequisite = NULL, pipeline_input = NULL, pipeline_output = NULL )
keywords |
Character vector. A list of keywords to aid in searchability and description of the experiment. |
xref |
Data frame. A list of the databases and/or ontology IDs that are cross-referenced in the BCO. |
platform |
Character string or list. Reference to a particular deployment of an existing platform where this BCO can be reproduced. |
pipeline_meta |
Data frame. Pipeline metadata.
Variables include |
pipeline_prerequisite |
Data frame. Packages or prerequisites
for running the tools used. Variables include |
pipeline_input |
Data frame. Input files for the tools.
Variables include |
pipeline_output |
Data frame. Output files for the tools.
Variables include |
A list of class bco.domain
keywords <- c("HCV1a", "Ledipasvir", "antiviral resistance", "SNP", "amino acid substitutions") xref <- data.frame( "namespace" = c("pubchem.compound", "pubmed", "so", "taxonomy"), "name" = c("PubChem-compound", "PubMed", "Sequence Ontology", "Taxonomy"), "ids" = I(list( "67505836", "26508693", c("SO:000002", "SO:0000694", "SO:0000667", "SO:0000045"), "31646" )), "access_time" = c( as.POSIXct("2017-01-20T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-21T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-22T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-23T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) platform <- "Seven Bridges Platform" pipeline_meta <- data.frame( "step_number" = c("1"), "name" = c("HIVE-hexagon"), "description" = c("Alignment of reads to a set of references"), "version" = c("1.3"), stringsAsFactors = FALSE ) pipeline_prerequisite <- data.frame( "step_number" = rep("1", 5), "name" = c( "Hepatitis C virus genotype 1", "Hepatitis C virus type 1b complete genome", "Hepatitis C virus (isolate JFH-1) genomic RNA", "Hepatitis C virus clone J8CF, complete genome", "Hepatitis C virus S52 polyprotein gene" ), "uri" = c( "https://www.ncbi.nlm.nih.gov/nuccore/22129792", "https://www.ncbi.nlm.nih.gov/nuccore/5420376", "https://www.ncbi.nlm.nih.gov/nuccore/13122261", "https://www.ncbi.nlm.nih.gov/nuccore/386646758", "https://www.ncbi.nlm.nih.gov/nuccore/295311559" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) pipeline_input <- data.frame( "step_number" = rep("1", 2), "uri" = c( "https://example.com/dna.cgi?cmd=objFile&ids=514683", "https://example.com/dna.cgi?cmd=objFile&ids=514682" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) pipeline_output <- data.frame( "step_number" = rep("1", 2), "uri" = c( "https://example.com/data/514769/allCount-aligned.csv", "https://example.com/data/514801/SNPProfile*.csv" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) compose_description( keywords, xref, platform, pipeline_meta, pipeline_prerequisite, pipeline_input, pipeline_output ) %>% convert_json()
keywords <- c("HCV1a", "Ledipasvir", "antiviral resistance", "SNP", "amino acid substitutions") xref <- data.frame( "namespace" = c("pubchem.compound", "pubmed", "so", "taxonomy"), "name" = c("PubChem-compound", "PubMed", "Sequence Ontology", "Taxonomy"), "ids" = I(list( "67505836", "26508693", c("SO:000002", "SO:0000694", "SO:0000667", "SO:0000045"), "31646" )), "access_time" = c( as.POSIXct("2017-01-20T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-21T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-22T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-23T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) platform <- "Seven Bridges Platform" pipeline_meta <- data.frame( "step_number" = c("1"), "name" = c("HIVE-hexagon"), "description" = c("Alignment of reads to a set of references"), "version" = c("1.3"), stringsAsFactors = FALSE ) pipeline_prerequisite <- data.frame( "step_number" = rep("1", 5), "name" = c( "Hepatitis C virus genotype 1", "Hepatitis C virus type 1b complete genome", "Hepatitis C virus (isolate JFH-1) genomic RNA", "Hepatitis C virus clone J8CF, complete genome", "Hepatitis C virus S52 polyprotein gene" ), "uri" = c( "https://www.ncbi.nlm.nih.gov/nuccore/22129792", "https://www.ncbi.nlm.nih.gov/nuccore/5420376", "https://www.ncbi.nlm.nih.gov/nuccore/13122261", "https://www.ncbi.nlm.nih.gov/nuccore/386646758", "https://www.ncbi.nlm.nih.gov/nuccore/295311559" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) pipeline_input <- data.frame( "step_number" = rep("1", 2), "uri" = c( "https://example.com/dna.cgi?cmd=objFile&ids=514683", "https://example.com/dna.cgi?cmd=objFile&ids=514682" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) pipeline_output <- data.frame( "step_number" = rep("1", 2), "uri" = c( "https://example.com/data/514769/allCount-aligned.csv", "https://example.com/data/514801/SNPProfile*.csv" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) compose_description( keywords, xref, platform, pipeline_meta, pipeline_prerequisite, pipeline_input, pipeline_output ) %>% convert_json()
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 (domain definition).
compose_error_v1.4.2(empirical = NULL, algorithmic = NULL) compose_error(empirical = NULL, algorithmic = NULL)
compose_error_v1.4.2(empirical = NULL, algorithmic = NULL) compose_error(empirical = NULL, algorithmic = NULL)
empirical |
Data frame. Variables include |
algorithmic |
Data frame. Variables include |
A list of class bco.domain
empirical <- data.frame( "key" = c("false_negative_alignment_hits", "false_discovery"), "value" = c("<0.0010", "<0.05"), stringsAsFactors = FALSE ) algorithmic <- data.frame( "key" = c("false_positive_mutation_calls", "false_discovery"), "value" = c("<0.00005", "0.005"), stringsAsFactors = FALSE ) compose_error(empirical, algorithmic) %>% convert_json()
empirical <- data.frame( "key" = c("false_negative_alignment_hits", "false_discovery"), "value" = c("<0.0010", "<0.05"), stringsAsFactors = FALSE ) algorithmic <- data.frame( "key" = c("false_positive_mutation_calls", "false_discovery"), "value" = c("<0.00005", "0.005"), stringsAsFactors = FALSE ) compose_error(empirical, algorithmic) %>% convert_json()
Compose BioCompute Object - Execution Domain (v1.4.2)
compose_execution_v1.4.2( script = NULL, script_driver = NULL, software_prerequisites = NULL, external_data_endpoints = NULL, environment_variables = NULL ) compose_execution( script = NULL, script_driver = NULL, software_prerequisites = NULL, external_data_endpoints = NULL, environment_variables = NULL )
compose_execution_v1.4.2( script = NULL, script_driver = NULL, software_prerequisites = NULL, external_data_endpoints = NULL, environment_variables = NULL ) compose_execution( script = NULL, script_driver = NULL, software_prerequisites = NULL, external_data_endpoints = NULL, environment_variables = NULL )
script |
Character string or list. Points to internal or external references to an object that was used to perform computations for this BCO instance. |
script_driver |
Character string. Indicate what kind of executable can be launched in order to perform a sequence of commands described in the script in order to run the pipeline. |
software_prerequisites |
Data frame. The minimal necessary
prerequisites, library, and tool versions needed to successfully
run the script to produce BCO. Variables include
|
external_data_endpoints |
Data frame. The minimal necessary
domain-specific external data source access to successfully
run the script to produce the BCO. Variables include
|
environment_variables |
Data frame. Key-value pairs
useful to configure the execution environment on the
target platform. Variables include |
A list of class bco.domain
script <- "https://example.com/workflows/antiviral_resistance_detection_hive.py" script_driver <- "shell" software_prerequisites <- data.frame( "name" = c("HIVE-hexagon", "HIVE-heptagon"), "version" = c("babajanian.1", "albinoni.2"), "uri" = c( "https://example.com/dna.cgi?cmd=dna-hexagon&cmdMode=-", "https://example.com/dna.cgi?cmd=dna-heptagon&cmdMode=-" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), "sha1_chksum" = c("d60f506cddac09e9e816531e7905ca1ca6641e3c", NA), stringsAsFactors = FALSE ) external_data_endpoints <- data.frame( "name" = c("generic name", "access to ftp server", "access to e-utils web service"), "url" = c( "protocol://domain:port/application/path", "ftp://data.example.com:21/", "https://eutils.ncbi.nlm.nih.gov/entrez/eutils" ), stringsAsFactors = FALSE ) environment_variables <- data.frame( "key" = c("HOSTTYPE", "EDITOR"), "value" = c("x86_64-linux", "vim") ) compose_execution( script, script_driver, software_prerequisites, external_data_endpoints, environment_variables ) %>% convert_json()
script <- "https://example.com/workflows/antiviral_resistance_detection_hive.py" script_driver <- "shell" software_prerequisites <- data.frame( "name" = c("HIVE-hexagon", "HIVE-heptagon"), "version" = c("babajanian.1", "albinoni.2"), "uri" = c( "https://example.com/dna.cgi?cmd=dna-hexagon&cmdMode=-", "https://example.com/dna.cgi?cmd=dna-heptagon&cmdMode=-" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), "sha1_chksum" = c("d60f506cddac09e9e816531e7905ca1ca6641e3c", NA), stringsAsFactors = FALSE ) external_data_endpoints <- data.frame( "name" = c("generic name", "access to ftp server", "access to e-utils web service"), "url" = c( "protocol://domain:port/application/path", "ftp://data.example.com:21/", "https://eutils.ncbi.nlm.nih.gov/entrez/eutils" ), stringsAsFactors = FALSE ) environment_variables <- data.frame( "key" = c("HOSTTYPE", "EDITOR"), "value" = c("x86_64-linux", "vim") ) compose_execution( script, script_driver, software_prerequisites, external_data_endpoints, environment_variables ) %>% convert_json()
Compose BioCompute Object - Extension Domain (v1.4.2)
compose_extension_v1.4.2(fhir = NULL, scm = NULL) compose_extension(fhir = NULL, scm = NULL)
compose_extension_v1.4.2(fhir = NULL, scm = NULL) compose_extension(fhir = NULL, scm = NULL)
fhir |
FHIR extension domain composed by |
scm |
SCM extension domain composed by |
A list of class bco.domain
fhir_endpoint <- "https://fhirtest.uhn.ca/baseDstu3" fhir_version <- "3" fhir_resources <- data.frame( "id" = c("21376", "6288583", "25544", "92440", "4588936"), "resource" = c( "Sequence", "DiagnosticReport", "ProcedureRequest", "Observation", "FamilyMemberHistory" ), stringsAsFactors = FALSE ) fhir <- compose_fhir(fhir_endpoint, fhir_version, fhir_resources) scm_repository <- "https://github.com/example/repo" scm_type <- "git" scm_commit <- "c9ffea0b60fa3bcf8e138af7c99ca141a6b8fb21" scm_path <- "workflow/hive-viral-mutation-detection.cwl" scm_preview <- "https://github.com/example/repo/blob/master/mutation-detection.cwl" scm <- compose_scm(scm_repository, scm_type, scm_commit, scm_path, scm_preview) compose_extension(fhir, scm) %>% convert_json()
fhir_endpoint <- "https://fhirtest.uhn.ca/baseDstu3" fhir_version <- "3" fhir_resources <- data.frame( "id" = c("21376", "6288583", "25544", "92440", "4588936"), "resource" = c( "Sequence", "DiagnosticReport", "ProcedureRequest", "Observation", "FamilyMemberHistory" ), stringsAsFactors = FALSE ) fhir <- compose_fhir(fhir_endpoint, fhir_version, fhir_resources) scm_repository <- "https://github.com/example/repo" scm_type <- "git" scm_commit <- "c9ffea0b60fa3bcf8e138af7c99ca141a6b8fb21" scm_path <- "workflow/hive-viral-mutation-detection.cwl" scm_preview <- "https://github.com/example/repo/blob/master/mutation-detection.cwl" scm <- compose_scm(scm_repository, scm_type, scm_commit, scm_path, scm_preview) compose_extension(fhir, scm) %>% convert_json()
Compose BioCompute Object - FHIR Extension (v1.4.2)
compose_fhir_v1.4.2(endpoint = NULL, version = NULL, resources = NULL) compose_fhir(endpoint = NULL, version = NULL, resources = NULL)
compose_fhir_v1.4.2(endpoint = NULL, version = NULL, resources = NULL) compose_fhir(endpoint = NULL, version = NULL, resources = NULL)
endpoint |
Character string. The URL of the endpoint of the FHIR server containing the resource. |
version |
Character string. The FHIR version used. |
resources |
Data frame with two variables: |
A list of class bco.domain
fhir_endpoint <- "https://fhirtest.uhn.ca/baseDstu3" fhir_version <- "3" fhir_resources <- data.frame( "id" = c("21376", "6288583", "25544", "92440", "4588936"), "resource" = c( "Sequence", "DiagnosticReport", "ProcedureRequest", "Observation", "FamilyMemberHistory" ), stringsAsFactors = FALSE ) compose_fhir(fhir_endpoint, fhir_version, fhir_resources) %>% convert_json()
fhir_endpoint <- "https://fhirtest.uhn.ca/baseDstu3" fhir_version <- "3" fhir_resources <- data.frame( "id" = c("21376", "6288583", "25544", "92440", "4588936"), "resource" = c( "Sequence", "DiagnosticReport", "ProcedureRequest", "Observation", "FamilyMemberHistory" ), stringsAsFactors = FALSE ) compose_fhir(fhir_endpoint, fhir_version, fhir_resources) %>% convert_json()
This domain contains the list of global input and output files created by the computational workflow, excluding the intermediate files.
compose_io_v1.4.2(input = NULL, output = NULL) compose_io(input = NULL, output = NULL)
compose_io_v1.4.2(input = NULL, output = NULL) compose_io(input = NULL, output = NULL)
input |
Data frame. Variables include
|
output |
Data frame. Variables include
|
A list of class bco.domain
input_subdomain <- data.frame( "filename" = c( "Hepatitis C virus genotype 1", "Hepatitis C virus type 1b complete genome" ), "uri" = c( "https://www.ncbi.nlm.nih.gov/nuccore/22129792", "https://www.ncbi.nlm.nih.gov/nuccore/5420376" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) output_subdomain <- data.frame( "mediatype" = c("text/csv", "text/csv"), "uri" = c( "https://example.com/data/514769/dnaAccessionBased.csv", "https://example.com/data/514801/SNPProfile*.csv" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) compose_io(input_subdomain, output_subdomain) %>% convert_json()
input_subdomain <- data.frame( "filename" = c( "Hepatitis C virus genotype 1", "Hepatitis C virus type 1b complete genome" ), "uri" = c( "https://www.ncbi.nlm.nih.gov/nuccore/22129792", "https://www.ncbi.nlm.nih.gov/nuccore/5420376" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) output_subdomain <- data.frame( "mediatype" = c("text/csv", "text/csv"), "uri" = c( "https://example.com/data/514769/dnaAccessionBased.csv", "https://example.com/data/514801/SNPProfile*.csv" ), "access_time" = c( as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-01-24T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ), stringsAsFactors = FALSE ) compose_io(input_subdomain, output_subdomain) %>% convert_json()
Non-default parameters customizing the computational flow which can affect the output of the calculations (domain definition).
compose_parametric_v1.4.2(df = NULL) compose_parametric(df = NULL)
compose_parametric_v1.4.2(df = NULL) compose_parametric(df = NULL)
df |
Data frame. Variables include |
A list of class bco.domain
df_parametric <- data.frame( "param" = c( "seed", "minimum_match_len", "divergence_threshold_percent", "minimum_coverage", "freq_cutoff" ), "value" = c("14", "66", "0.30", "15", "0.10"), "step" = c(1, 1, 1, 2, 2) ) compose_parametric(df_parametric) %>% convert_json()
df_parametric <- data.frame( "param" = c( "seed", "minimum_match_len", "divergence_threshold_percent", "minimum_coverage", "freq_cutoff" ), "value" = c("14", "66", "0.30", "15", "0.10"), "step" = c(1, 1, 1, 2, 2) ) compose_parametric(df_parametric) %>% convert_json()
Compose BioCompute Object - Provenance Domain (v1.4.2)
compose_provenance_v1.4.2( name = NULL, version = NULL, review = NULL, derived_from = NULL, obsolete_after = NULL, embargo = NULL, created = NULL, modified = NULL, contributors = NULL, license = NULL ) compose_provenance( name = NULL, version = NULL, review = NULL, derived_from = NULL, obsolete_after = NULL, embargo = NULL, created = NULL, modified = NULL, contributors = NULL, license = NULL )
compose_provenance_v1.4.2( name = NULL, version = NULL, review = NULL, derived_from = NULL, obsolete_after = NULL, embargo = NULL, created = NULL, modified = NULL, contributors = NULL, license = NULL ) compose_provenance( name = NULL, version = NULL, review = NULL, derived_from = NULL, obsolete_after = NULL, embargo = NULL, created = NULL, modified = NULL, contributors = NULL, license = NULL )
name |
Character string. Name for the BCO. |
version |
Character string. Version of this BCO instance object. Should follow the Semantic Versioning format (MAJOR.MINOR.PATCH). |
review |
Data frame. Reviewer identifiers and descriptions of the status of an object in the review process. |
derived_from |
Character string. Inheritance/derivation description. |
obsolete_after |
Date-time object. Expiration date of the object (optional). |
embargo |
Vector of date-time objects |
created |
Date-time object. Initial creation time of the object. |
modified |
Date-time object. The most recent modification time of the object. |
contributors |
Data frame. Contributor identifiers and descriptions of their contribution types. |
license |
Character string. Licence URL or other licence information (text). |
A list of class bco.domain
name <- "HCV1a ledipasvir resistance SNP detection" version <- "1.0.0" review <- data.frame( "status" = c("approved", "approved"), "reviewer_comment" = c( "Approved by [company name] staff. Waiting for approval from FDA Reviewer", "The revised BCO looks fine" ), "date" = c( as.POSIXct("2017-11-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-12-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "America/Los_Angeles") ), "reviewer_name" = c("Jane Doe", "John Doe"), "reviewer_affiliation" = c("Seven Bridges Genomics", "U.S. Food and Drug Administration"), "reviewer_email" = c("[email protected]", "[email protected]"), "reviewer_contribution" = c("curatedBy", "curatedBy"), "reviewer_orcid" = c("https://orcid.org/0000-0000-0000-0000", NA), stringsAsFactors = FALSE ) derived_from <- "https://github.com/biocompute-objects/BCO_Specification/blob/1.2.1-beta/HCV1a.json" obsolete_after <- as.POSIXct("2018-11-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") embargo <- c( "start_time" = as.POSIXct("2017-10-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), "end_time" = as.POSIXct("2017-11-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ) created <- as.POSIXct("2017-01-20T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") modified <- as.POSIXct("2019-05-10T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") contributors <- data.frame( "name" = c("Jane Doe", "John Doe"), "affiliation" = c("Seven Bridges Genomics", "U.S. Food and Drug Administration"), "email" = c("[email protected]", "[email protected]"), "contribution" = I(list(c("createdBy", "curatedBy"), c("authoredBy"))), "orcid" = c("https://orcid.org/0000-0000-0000-0000", NA), stringsAsFactors = FALSE ) license <- "https://creativecommons.org/licenses/by/4.0/" compose_provenance( name, version, review, derived_from, obsolete_after, embargo, created, modified, contributors, license ) %>% convert_json()
name <- "HCV1a ledipasvir resistance SNP detection" version <- "1.0.0" review <- data.frame( "status" = c("approved", "approved"), "reviewer_comment" = c( "Approved by [company name] staff. Waiting for approval from FDA Reviewer", "The revised BCO looks fine" ), "date" = c( as.POSIXct("2017-11-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), as.POSIXct("2017-12-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "America/Los_Angeles") ), "reviewer_name" = c("Jane Doe", "John Doe"), "reviewer_affiliation" = c("Seven Bridges Genomics", "U.S. Food and Drug Administration"), "reviewer_email" = c("[email protected]", "[email protected]"), "reviewer_contribution" = c("curatedBy", "curatedBy"), "reviewer_orcid" = c("https://orcid.org/0000-0000-0000-0000", NA), stringsAsFactors = FALSE ) derived_from <- "https://github.com/biocompute-objects/BCO_Specification/blob/1.2.1-beta/HCV1a.json" obsolete_after <- as.POSIXct("2018-11-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") embargo <- c( "start_time" = as.POSIXct("2017-10-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST"), "end_time" = as.POSIXct("2017-11-12T12:30:48", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") ) created <- as.POSIXct("2017-01-20T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") modified <- as.POSIXct("2019-05-10T09:40:17", format = "%Y-%m-%dT%H:%M:%S", tz = "EST") contributors <- data.frame( "name" = c("Jane Doe", "John Doe"), "affiliation" = c("Seven Bridges Genomics", "U.S. Food and Drug Administration"), "email" = c("[email protected]", "[email protected]"), "contribution" = I(list(c("createdBy", "curatedBy"), c("authoredBy"))), "orcid" = c("https://orcid.org/0000-0000-0000-0000", NA), stringsAsFactors = FALSE ) license <- "https://creativecommons.org/licenses/by/4.0/" compose_provenance( name, version, review, derived_from, obsolete_after, embargo, created, modified, contributors, license ) %>% convert_json()
Compose BioCompute Object - SCM Extension (v1.4.2)
compose_scm_v1.4.2( scm_repository = NULL, scm_type = c("git", "svn", "hg", "other"), scm_commit = NULL, scm_path = NULL, scm_preview = NULL ) compose_scm( scm_repository = NULL, scm_type = c("git", "svn", "hg", "other"), scm_commit = NULL, scm_path = NULL, scm_preview = NULL )
compose_scm_v1.4.2( scm_repository = NULL, scm_type = c("git", "svn", "hg", "other"), scm_commit = NULL, scm_path = NULL, scm_preview = NULL ) compose_scm( scm_repository = NULL, scm_type = c("git", "svn", "hg", "other"), scm_commit = NULL, scm_path = NULL, scm_preview = NULL )
scm_repository |
Character string. Base URL of the SCM repository. |
scm_type |
Character string. Type of SCM database. Must be one of
|
scm_commit |
Character string. Revision within the SCM repository. Should be a repository-wide commit identifier or name of a tag, but may be a name of a branch. |
scm_path |
Character string. Path from the repository to the
source code referenced. Should not start with |
scm_preview |
Character string. The full URI for the source code referenced by the BioCompute Object. |
A list of class bco.domain
scm_repository <- "https://github.com/example/repo" scm_type <- "git" scm_commit <- "c9ffea0b60fa3bcf8e138af7c99ca141a6b8fb21" scm_path <- "workflow/hive-viral-mutation-detection.cwl" 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()
scm_repository <- "https://github.com/example/repo" scm_type <- "git" scm_commit <- "c9ffea0b60fa3bcf8e138af7c99ca141a6b8fb21" scm_path <- "workflow/hive-viral-mutation-detection.cwl" 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 BioCompute Object - Top Level Fields (v1.4.2)
compose_tlf_v1.4.2( provenance, usability, extension, description, execution, parametric, io, error, object_id = NULL ) compose_tlf( provenance, usability, extension, description, execution, parametric, io, error, object_id = NULL )
compose_tlf_v1.4.2( provenance, usability, extension, description, execution, parametric, io, error, object_id = NULL ) compose_tlf( provenance, usability, extension, description, execution, parametric, io, error, object_id = NULL )
provenance |
Provenance domain |
usability |
Usability domain |
extension |
Extension domain |
description |
Description domain |
execution |
Execution domain |
parametric |
Parametric domain |
io |
I/O domain |
error |
Error domain |
object_id |
BioCompute Object identifier
(definition).
If |
A vector of top level fields
compose_tlf( compose_provenance(), compose_usability(), compose_extension(), compose_description(), compose_execution(), compose_parametric(), compose_io(), compose_error() ) %>% convert_json()
compose_tlf( compose_provenance(), compose_usability(), compose_extension(), compose_description(), compose_execution(), compose_parametric(), compose_io(), compose_error() ) %>% convert_json()
The usability domain (domain definition).
compose_usability_v1.4.2(text = NULL) compose_usability(text = NULL)
compose_usability_v1.4.2(text = NULL) compose_usability(text = NULL)
text |
A character vector of free text values that could improves search-ability, provide specific scientific use cases, and a description of the function of the object. |
A list of class bco.domain
text <- c( paste( "Identify baseline single nucleotide polymorphisms (SNPs)[SO:0000694]", "(insertions)[SO:0000667], and (deletions)[SO:0000045] that correlate", "with reduced (ledipasvir)[pubchem.compound:67505836] antiviral drug", "efficacy in (Hepatitis C virus subtype 1)[taxonomy:31646]" ), paste( "Identify treatment emergent amino acid (substitutions)[SO:1000002]", "that correlate with antiviral drug treatment failure" ), paste( "Determine whether the treatment emergent amino acid", "(substitutions)[SO:1000002] identified correlate with treatment", "failure involving other drugs against the same virus" ) ) text %>% compose_usability() %>% convert_json()
text <- c( paste( "Identify baseline single nucleotide polymorphisms (SNPs)[SO:0000694]", "(insertions)[SO:0000667], and (deletions)[SO:0000045] that correlate", "with reduced (ledipasvir)[pubchem.compound:67505836] antiviral drug", "efficacy in (Hepatitis C virus subtype 1)[taxonomy:31646]" ), paste( "Identify treatment emergent amino acid (substitutions)[SO:1000002]", "that correlate with antiviral drug treatment failure" ), paste( "Determine whether the treatment emergent amino acid", "(substitutions)[SO:1000002] identified correlate with treatment", "failure involving other drugs against the same virus" ) ) text %>% compose_usability() %>% convert_json()
Compose BioCompute Object (v1.4.2)
compose_v1.4.2( tlf, provenance, usability, extension, description, execution, parametric, io, error ) compose( tlf, provenance, usability, extension, description, execution, parametric, io, error )
compose_v1.4.2( tlf, provenance, usability, extension, description, execution, parametric, io, error ) compose( tlf, provenance, usability, extension, description, execution, parametric, io, error )
tlf |
Top level fields |
provenance |
Provenance domain |
usability |
Usability domain |
extension |
Extension domain |
description |
Description domain |
execution |
Execution domain |
parametric |
Parametric domain |
io |
I/O domain |
error |
Error domain |
A list of class bco
tlf <- compose_tlf( compose_provenance(), compose_usability(), compose_extension(), compose_description(), compose_execution(), compose_parametric(), compose_io(), compose_error() ) biocompute::compose( tlf, compose_provenance(), compose_usability(), compose_extension(), compose_description(), compose_execution(), compose_parametric(), compose_io(), compose_error() ) %>% convert_json()
tlf <- compose_tlf( compose_provenance(), compose_usability(), compose_extension(), compose_description(), compose_execution(), compose_parametric(), compose_io(), compose_error() ) biocompute::compose( tlf, compose_provenance(), compose_usability(), compose_extension(), compose_description(), compose_execution(), compose_parametric(), compose_io(), compose_error() ) %>% convert_json()
Convert BioCompute Object or domain to JSON string
convert_json(x, pretty = TRUE, auto_unbox = TRUE, na = "string", ...)
convert_json(x, pretty = TRUE, auto_unbox = TRUE, na = "string", ...)
x |
BioCompute Object or domain |
pretty |
Prettify the JSON string? Default is |
auto_unbox |
Unbox all atomic vectors of length 1? Default is |
na |
How to represent NA values: must be |
... |
Additional parameters for |
JSON string of the BioCompute Object
compose_description() %>% convert_json() generate_example("minimal") %>% convert_json()
compose_description() %>% convert_json() generate_example("minimal") %>% convert_json()
Convert BioCompute Object or domain to YAML string
convert_yaml(x, ...)
convert_yaml(x, ...)
x |
BioCompute Object or domain |
... |
Additional parameters for |
YAML string of the BioCompute Object
compose_description() %>% convert_yaml() %>% cat() generate_example("minimal") %>% convert_yaml() %>% cat()
compose_description() %>% convert_yaml() %>% cat() generate_example("minimal") %>% convert_yaml() %>% cat()
Export BioCompute Object as HTML
export_html(x, file, wrap = FALSE, linewidth = 80, ...)
export_html(x, file, wrap = FALSE, linewidth = 80, ...)
x |
BioCompute Object JSON string from |
file |
HTML output file path |
wrap |
Should the long lines be wrapped? |
linewidth |
Maximum linewidth when |
... |
Additional parameters for |
Path to the output file
## Not run: file_html <- tempfile(fileext = ".html") generate_example("HCV1a") %>% convert_json() %>% export_html(file_html) ## End(Not run)
## Not run: file_html <- tempfile(fileext = ".html") generate_example("HCV1a") %>% convert_json() %>% export_html(file_html) ## End(Not run)
Export BioCompute Object as JSON
export_json(x, file)
export_json(x, file)
x |
BioCompute Object JSON string from |
file |
JSON file path |
Path to the output file
file_json <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(file_json) cat(paste(readLines(file_json), collapse = "\n"))
file_json <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(file_json) cat(paste(readLines(file_json), collapse = "\n"))
Export BioCompute Object as PDF
export_pdf(x, file, wrap = FALSE, linewidth = 80, ...)
export_pdf(x, file, wrap = FALSE, linewidth = 80, ...)
x |
BioCompute Object JSON string from |
file |
PDF output file path |
wrap |
Should the long lines be wrapped? |
linewidth |
Maximum linewidth when |
... |
Additional parameters for |
Path to the output file
## Not run: file_pdf <- tempfile(fileext = ".pdf") generate_example("HCV1a") %>% convert_json() %>% export_pdf(file_pdf) ## End(Not run)
## Not run: file_pdf <- tempfile(fileext = ".pdf") generate_example("HCV1a") %>% convert_json() %>% export_pdf(file_pdf) ## End(Not run)
Export BioCompute Object to Seven Bridges Platforms
export_sevenbridges( file, name = NULL, project = NULL, token = NULL, base_url = "https://api.sbgenomics.com/v2/", overwrite = TRUE )
export_sevenbridges( file, name = NULL, project = NULL, token = NULL, base_url = "https://api.sbgenomics.com/v2/", overwrite = TRUE )
file |
Path to the BCO file. |
name |
Name of the BCO file to create on the platform. Defaults to the name of the input file. |
project |
Project to upload (export) the BCO file to.
Format: |
token |
API auth token for the platform. Generate the token from the platform's Developer Dashboard. |
base_url |
API base URL. Get the base URL from the platform's Developer Dashboard. |
overwrite |
If |
Response of the file upload request
## Not run: file_json <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(file_json) try( export_sevenbridges( file_json, project = "rosalind_franklin/project_name", token = "your_api_auth_token", base_url = "https://cgc-api.sbgenomics.com/v2/" ) ) ## End(Not run)
## Not run: file_json <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(file_json) try( export_sevenbridges( file_json, project = "rosalind_franklin/project_name", token = "your_api_auth_token", base_url = "https://cgc-api.sbgenomics.com/v2/" ) ) ## End(Not run)
Export BioCompute Object as Word document
export_word(x, file, wrap = FALSE, linewidth = 80, ...)
export_word(x, file, wrap = FALSE, linewidth = 80, ...)
x |
BioCompute Object JSON string from |
file |
Word (docx) output file path |
wrap |
Should the long lines be wrapped? |
linewidth |
Maximum linewidth when |
... |
Additional parameters for |
Path to the output file
## Not run: file_docx <- tempfile(fileext = ".docx") generate_example("HCV1a") %>% convert_json() %>% export_word(file_docx) ## End(Not run)
## Not run: file_docx <- tempfile(fileext = ".docx") generate_example("HCV1a") %>% convert_json() %>% export_word(file_docx) ## End(Not run)
Generate example BioCompute Objects
generate_example(type = c("minimal", "HCV1a"))
generate_example(type = c("minimal", "HCV1a"))
type |
Example type. Default is |
Example BioCompute Object
generate_example("minimal") %>% convert_json()
generate_example("minimal") %>% convert_json()
Generate ID for the BioCompute Object
generate_id(platform = c("sevenbridges"))
generate_id(platform = c("sevenbridges"))
platform |
Platform. Default is |
BioCompute Object ID
generate_id()
generate_id()
Is this a BCO object?
is_bco(x)
is_bco(x)
x |
any object |
Logical. TRUE
if it is a BCO object, FALSE
if not.
generate_example("minimal") %>% is_bco()
generate_example("minimal") %>% is_bco()
Is this a domain object?
is_domain(x)
is_domain(x)
x |
any object |
Logical. TRUE
if it is a domain object, FALSE
if not.
is_domain(compose_description())
is_domain(compose_description())
Parse Biocompute Object From JSON File to R Object
read_bco(x, ...)
read_bco(x, ...)
x |
BioCompute Object .json file |
... |
Additional parameters for |
A list of class bco
bco <- tempfile(fileext = ".json") bco <- generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% read_bco()
bco <- tempfile(fileext = ".json") bco <- generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% read_bco()
BioCompute Objects checksum validator (v1.4.2)
validate_checksum_v1.4.2(file) validate_checksum(file)
validate_checksum_v1.4.2(file) validate_checksum(file)
file |
Path to the BCO JSON file |
Logical. TRUE
if the checksum matched, FALSE
if not.
An SHA-256 checksum is calculated and stored in the top level fields when a BioCompute Object is created. In reality, due to the delicate differences in how the data in JSON is represented, parsed, and handled in different languages, there could be false positives in the validation results.
bco <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% validate_checksum()
bco <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% validate_checksum()
BioCompute Objects schema validator (v1.4.2)
validate_schema_v1.4.2(file) validate_schema(file)
validate_schema_v1.4.2(file) validate_schema(file)
file |
Path to the BCO JSON file |
None
JSON schema validators for BCO domains and complete BCO based on jsonvalidate. Refer to the BioCompute Objects Schema for specific JSON schemas.
bco <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% validate_schema()
bco <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% validate_schema()
BioCompute Object specification versions
versions()
versions()
List of current and all available BioCompute Object specification versions supported by the package.
versions()
versions()