suppressPackageStartupMessages(devtools::load_all())
## Loading flowWorkspace
load from local
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
save_gs from local to remote
url <- "s3://mike-h5/test"
save_gs(gs, url)
## Uploading gs ...
## Uploading 63c60e66-779b-4712-ad6e-b9349b965401.gs
## Uploading CytoTrol_CytoTrol_1.fcs.pb
## Uploading CytoTrol_CytoTrol_1.fcs.h5
## Done
## To reload it, use 'load_gs' function
load from remote without downloading h5
gs <- load_gs(url)
## downloading test/63c60e66-779b-4712-ad6e-b9349b965401.gs ...
## downloading test/CytoTrol_CytoTrol_1.fcs.pb ...
h5 path shows it is remote
cs_get_h5_file_path(gs)
## [1] "https://mike-h5.s3.amazonaws.com/test"
second load directly reads from local cache
gs <- load_gs(url)
## loading from local cache:/media/wjiang2/real_home/wjiang2/.cache/BiocFileCache/2ed219e49475_2ed219e49475
save_gs from remote to local
tmp <- tempfile()
save_gs(gs, tmp)
## downloading test/CytoTrol_CytoTrol_1.fcs.h5 ...
## Done
## To reload it, use 'load_gs' function
delete the remote (along with its cache)
delete_gs(url)
## local cache is cleared
## s3://mike-h5/test is deleted