gypsum
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 1.8.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Depends: httr2, jsonlite, filelock, rappdirs
- Imports: httr2, jsonlite, filelock, rappdirs
- Install:
BiocManager::install("gypsum")
When to Use
- Programmatically downloading files, manifests, and summaries from the gypsum bucket using
saveFile, saveVersion, fetchManifest, and fetchSummary.
- Uploading files to the gypsum backend using the upload sequence:
startUpload, uploadFiles, and completeUpload.
- Creating new versions of existing assets efficiently by deduplicating redundant files using
cloneVersion and prepareDirectoryUpload.
- Validating metadata against the Bioconductor JSON schema prior to upload using
validateMetadata.
- Managing project permissions, probational uploads, and quotas using
setPermissions, approveProbation, and setQuota.
When NOT to Use
- For general-purpose cloud storage interactions (like raw Google Cloud Storage buckets) without an ArtifactDB backend, use packages like
googleCloudStorageR instead.
- For downloading standard Bioconductor package source files or annotation resources, use
BiocManager or AnnotationHub instead.
- For local-only file management and caching without a REST API backend, use
BiocFileCache instead.
Data Requirements
- Input format: File paths, directory structures, or metadata lists formatted according to the ArtifactDB JSON schema.
- Authentication: Requires a GitHub OAuth token for write operations (uploads, deletions, permission changes), set via
setAccessToken. Read operations are public.
- Network: Requires an active internet connection to communicate with the gypsum REST API endpoint.
Key Parameters
- project: Character; the name of the project on the gypsum server.
- asset: Character; the specific asset within the project.
- version: Character; the version string of the asset to upload or download.
- directory: Character; local directory path containing files for upload in
startUpload and uploadFiles.
- destination: Character; local directory path where downloaded files should be saved in
cloneVersion.
- links: Data frame; used in
startUpload to deduplicate redundant files on the backend by linking to existing files.
Best Practices
- Wrap the upload sequence (
uploadFiles, completeUpload) in a tryCatch block and call abortUpload in the error handler to clean up if the upload fails.
- Use
cloneVersion and prepareDirectoryUpload to expedite the creation of new asset versions by linking unmodified files to their counterparts in the previous version.
- Always validate metadata using
validateMetadata against the schema fetched by fetchMetadataSchema to ensure downstream databases can index the files.
- Check the current usage of a project using
fetchUsage and fetchQuota before initiating large uploads to ensure sufficient storage space.
Common Pitfalls
- Unauthorized upload attempts: Attempting to upload or modify assets without setting a valid GitHub token will fail; fix this by authenticating using
setAccessToken or prompting the user.
- Modifying symlinks directly: When using
cloneVersion, modifying a symlinked file directly will alter the linked source; fix this by deleting the symlink and replacing it with a new file before uploading.
- Incomplete uploads: Failing to call
completeUpload after uploadFiles leaves the upload in a pending state; ensure the full upload sequence is executed.
Alternatives
- BiocFileCache: Best for managing local caches of remote files without a dedicated REST API backend.
- AnnotationHub / ExperimentHub: The standard Bioconductor infrastructure for distributing curated annotation and experimental datasets.
Citations
- Lun et al. (2024), "Interface to the gypsum REST API", Bioconductor Manual.
References
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use gypsum. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.
▶ Open gypsum on BioMate →
1---2name: bioconductor-gypsum3description: Client for the gypsum REST API (https://gypsum.artifactdb.com), a cloud-based file store in the ArtifactDB ecosystem. This package provides functions for uploads, downloads, and various adminstrative and management tasks. Check out the docu4---56# gypsum78## Dependencies & Environment910> Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.1112- **Version:** 1.8.0 · **Bioconductor:** 3.23 · **R:** ≥ 4.613- **Depends:** httr2, jsonlite, filelock, rappdirs14- **Imports:** httr2, jsonlite, filelock, rappdirs15- **Install:** `BiocManager::install("gypsum")`1617## When to Use18- Programmatically downloading files, manifests, and summaries from the gypsum bucket using `saveFile`, `saveVersion`, `fetchManifest`, and `fetchSummary`.19- Uploading files to the gypsum backend using the upload sequence: `startUpload`, `uploadFiles`, and `completeUpload`.20- Creating new versions of existing assets efficiently by deduplicating redundant files using `cloneVersion` and `prepareDirectoryUpload`.21- Validating metadata against the Bioconductor JSON schema prior to upload using `validateMetadata`.22- Managing project permissions, probational uploads, and quotas using `setPermissions`, `approveProbation`, and `setQuota`.2324## When NOT to Use25- For general-purpose cloud storage interactions (like raw Google Cloud Storage buckets) without an ArtifactDB backend, use packages like `googleCloudStorageR` instead.26- For downloading standard Bioconductor package source files or annotation resources, use `BiocManager` or `AnnotationHub` instead.27- For local-only file management and caching without a REST API backend, use `BiocFileCache` instead.2829## Data Requirements30- **Input format**: File paths, directory structures, or metadata lists formatted according to the ArtifactDB JSON schema.31- **Authentication**: Requires a GitHub OAuth token for write operations (uploads, deletions, permission changes), set via `setAccessToken`. Read operations are public.32- **Network**: Requires an active internet connection to communicate with the gypsum REST API endpoint.3334## Key Parameters35- **project**: Character; the name of the project on the gypsum server.36- **asset**: Character; the specific asset within the project.37- **version**: Character; the version string of the asset to upload or download.38- **directory**: Character; local directory path containing files for upload in `startUpload` and `uploadFiles`.39- **destination**: Character; local directory path where downloaded files should be saved in `cloneVersion`.40- **links**: Data frame; used in `startUpload` to deduplicate redundant files on the backend by linking to existing files.4142## Best Practices43- Wrap the upload sequence (`uploadFiles`, `completeUpload`) in a `tryCatch` block and call `abortUpload` in the error handler to clean up if the upload fails.44- Use `cloneVersion` and `prepareDirectoryUpload` to expedite the creation of new asset versions by linking unmodified files to their counterparts in the previous version.45- Always validate metadata using `validateMetadata` against the schema fetched by `fetchMetadataSchema` to ensure downstream databases can index the files.46- Check the current usage of a project using `fetchUsage` and `fetchQuota` before initiating large uploads to ensure sufficient storage space.4748## Common Pitfalls49- **Unauthorized upload attempts**: Attempting to upload or modify assets without setting a valid GitHub token will fail; fix this by authenticating using `setAccessToken` or prompting the user.50- **Modifying symlinks directly**: When using `cloneVersion`, modifying a symlinked file directly will alter the linked source; fix this by deleting the symlink and replacing it with a new file before uploading.51- **Incomplete uploads**: Failing to call `completeUpload` after `uploadFiles` leaves the upload in a pending state; ensure the full upload sequence is executed.5253## Alternatives54- **BiocFileCache**: Best for managing local caches of remote files without a dedicated REST API backend.55- **AnnotationHub** / **ExperimentHub**: The standard Bioconductor infrastructure for distributing curated annotation and experimental datasets.5657## Citations58- Lun et al. (2024), "Interface to the gypsum REST API", Bioconductor Manual.5960## References61- Homepage: https://bioconductor.org/packages/gypsum62- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/gypsum/inst/doc/userguide.html6364<!-- biomate-cta -->65---6667## Run this on BioMate6869This skill is the **knowledge layer** — when, why, and how to use `gypsum`. To **run this analysis on your own data** with managed compute, automated QC, and reproducible outputs, use **[BioMate](https://www.biomate.ai?ref=kb&pkg=gypsum)** — free to start.7071▶ **[Open `gypsum` on BioMate →](https://www.biomate.ai?ref=kb&pkg=gypsum)**