if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("AnVILBase")
library(AnVILBase)
The AnVILBase
package defines S4 generics for AnVIL packages. The package is
designed to be used in conjunction with either AnVILGCP
or AnVILAz
packages.
The AnVILBase
package is not intended to be used as a standalone package.
The AnVILBase
package defines S4 generics for the AnVIL package. These
include methods for copying, listing, removing, and backing up files in the
cloud. All generics in the package have methods defined for ‘missing’ and ‘ANY’
signatures.
The AnVILBase
package is designed to support packages that work with the AnVIL
cloud platforms. Downstream packages expose Google Cloud Platform (AnVILGCP) and
the Azure Cloud Platform (AnVILAz) application programming interfaces (APIs).
To increase usability, the AnVILBase
package attempts to deduce the user’s
cloud platform from environment variables. This is codified in the
cloud_platform
function:
cloud_platform()
Packages that use the AnVILBase
package can conditionally run tests using the
avplatform_namespace()
function. It will return either AnVILGCP
or AnVILAz
depending on the cloud environment variables that are set. If no environment
variables are set, the function will return ""
.
avplatform_namespace()
## [1] ""
The following generics are defined in the AnVILBase
package:
avcopy()
: Copy a file to and from the cloudavlist()
: List files in the cloud storage locationavremove()
: Remove a file from the cloudavbackup()
: Backup files to the cloudavrestore()
: Restore files from the cloudavstorage()
: Get the storage address in the cloudThe following generics are defined in the AnVILBase
package for tables:
avtable
: Get a table by name from a workspaceavtables
: List tables in the workspace(s)avtable_import
: Upload a table to a workspaceavtable_import_set
: Create a set (grouped) table from an existing tableavtable_delete
: Remove a table from a workspaceavtable_delete_values
: Delete values from a tableThe following generics are defined in the AnVILBase
package for workspaces:
avworkspace
: Set the active workspaceavworkspaces
: List current workspace(s) on AnVILavworkspace_name
: Get the workspace nameavworkspace_namespace
: Get the workspace namespaceNote that the AnVILBase
package also includes helper functions that are
used across AnVIL
cloud platforms. These include functions mainly for working
with the AnVIL
API responses.
The following generics are defined in the AnVILBase
package for workflows:
avworkflow_jobs
: Get the execution status of a workflowThe following generics are defined in the AnVILBase
package for notebooks:
avnotebooks
: List notebooks in the workspaceavnotebooks_localize
: Download notebooks from a cloud to a workspaceavnotebooks_delocalize
: Upload notebooks from a workspace to a cloudsessionInfo()
## R version 4.4.1 (2024-06-14)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.20-bioc/R/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: America/New_York
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] AnVILBase_1.0.0 BiocStyle_2.34.0
##
## loaded via a namespace (and not attached):
## [1] vctrs_0.6.5 httr_1.4.7 cli_3.6.3
## [4] knitr_1.48 rlang_1.1.4 xfun_0.48
## [7] jsonlite_1.8.9 glue_1.8.0 htmltools_0.5.8.1
## [10] sass_0.4.9 fansi_1.0.6 rmarkdown_2.28
## [13] rappdirs_0.3.3 evaluate_1.0.1 jquerylib_0.1.4
## [16] tibble_3.2.1 fastmap_1.2.0 yaml_2.3.10
## [19] lifecycle_1.0.4 httr2_1.0.5 bookdown_0.41
## [22] BiocManager_1.30.25 compiler_4.4.1 pkgconfig_2.0.3
## [25] digest_0.6.37 R6_2.5.1 utf8_1.2.4
## [28] pillar_1.9.0 magrittr_2.0.3 bslib_0.8.0
## [31] tools_4.4.1 cachem_1.1.0