getCloudData Download the pregenerated curated data sets from ReUseData cloud bucket
Source:R/getCloudData.R
getCloudData.Rd
getCloudData Download the pregenerated curated data sets from ReUseData cloud bucket
Usage
getCloudData(datahub, outdir = character())
Arguments
- datahub
The
dataHub
object returned fromdataSearch()
with 1 data record available on ReUseData cloud bucket.- outdir
The output directory for the data (and concomitant annotation files) to be downloaded. It is recommended to use a new folder under a shared folder for a new to-be-downloaded data.
Value
Data and concomitant annotation files will be downloaded to
the user-specified folder that is locally searchable with
dataSearch()
.
Examples
outdir <- file.path(tempdir(), "gcpData")
dh <- dataSearch(c("ensembl", "GRCh38"))
dh <- dh[grep("http", dataPaths(dh))]
## download data from google bucket
getCloudData(dh[1], outdir = outdir)
#> Data is downloaded:
#> /tmp/Rtmp7Lq2kA/gcpData/GRCh37_to_GRCh38.chain
## Update local data caching
dataUpdate(outdir) ## no "cloud=TRUE" here, only showing local data cache
#>
#> Updating data record...
#> GRCh37_to_GRCh38.chain added
#> dataHub with 145 records
#> cache path: /home/qhu/.cache/R/ReUseData
#> # dataUpdate() to update the local data cache
#> # dataSearch() to query a specific dataset
#> # Additional information can be retrieved using:
#> # dataNames(), dataParams(), dataNotes(), dataPaths(), dataTag() or mcols()
#>
#> name
#> BFC899 | GRCh37_to_GRCh38.chain
#> BFC1927 | GRCm38_to_NCBIM36.chain
#> BFC2825 | GRCh37_to_GRCh38.chain
#> BFC2826 | outfile.txt
#> BFC2955 | outfile.txt
#> ... ...
#> BFC4627 | knownGene_mm39.sql
#> BFC4628 | knownGene_mm39.txt
#> BFC4629 | refGene_mm39.sql
#> BFC4630 | refGene_mm39.txt
#> BFC4631 | GRCh37_to_GRCh38.chain
#> Path
#> BFC899 /tmp/RtmpMZs31N/gcpData/GRCh37_to_GRCh38.chain
#> BFC1927 /tmp/Rtmp4dXPOh/gcpData/GRCm38_to_NCBIM36.chain
#> BFC2825 /tmp/Rtmp4dXPOh/gcpData/GRCh37_to_GRCh38.chain
#> BFC2826 /tmp/RtmpkdDQm8/working_dir/RtmpjAGUWK/test_SharedData/outfile.txt
#> BFC2955 /tmp/RtmpRwEJgD/working_dir/Rtmpilpixw/test_SharedData/outfile.txt
#> ... ...
#> BFC4627 https://storage.googleapis.com/reusedata/ucsc_database/knownGene...
#> BFC4628 https://storage.googleapis.com/reusedata/ucsc_database/knownGene...
#> BFC4629 https://storage.googleapis.com/reusedata/ucsc_database/refGene_m...
#> BFC4630 https://storage.googleapis.com/reusedata/ucsc_database/refGene_m...
#> BFC4631 /tmp/Rtmp7Lq2kA/gcpData/GRCh37_to_GRCh38.chain
## Now the data is available to use locally
dataSearch(c("ensembl", "GRCh38"))
#> dataHub with 21 records
#> cache path: /home/qhu/.cache/R/ReUseData
#> # dataUpdate() to update the local data cache
#> # dataSearch() to query a specific dataset
#> # Additional information can be retrieved using:
#> # dataNames(), dataParams(), dataNotes(), dataPaths(), dataTag() or mcols()
#>
#> name
#> BFC899 | GRCh37_to_GRCh38.chain
#> BFC2825 | GRCh37_to_GRCh38.chain
#> BFC3341 | GRCh37_to_GRCh38.chain
#> BFC3470 | GRCh37_to_GRCh38.chain
#> BFC3599 | GRCh37_to_GRCh38.chain
#> ... ...
#> BFC4517 | GRCh38_to_NCBI36.chain
#> BFC4519 | NCBI34_to_GRCh38.chain
#> BFC4521 | NCBI35_to_GRCh38.chain
#> BFC4523 | NCBI36_to_GRCh38.chain
#> BFC4631 | GRCh37_to_GRCh38.chain
#> Path
#> BFC899 /tmp/RtmpMZs31N/gcpData/GRCh37_to_GRCh38.chain
#> BFC2825 /tmp/Rtmp4dXPOh/gcpData/GRCh37_to_GRCh38.chain
#> BFC3341 /tmp/RtmpMF39J6/gcpData/GRCh37_to_GRCh38.chain
#> BFC3470 /tmp/Rtmp8mVqnL/gcpData/GRCh37_to_GRCh38.chain
#> BFC3599 /tmp/RtmpKEpli0/gcpData/GRCh37_to_GRCh38.chain
#> ... ...
#> BFC4517 https://storage.googleapis.com/reusedata/ensembl_liftover/GRCh38...
#> BFC4519 https://storage.googleapis.com/reusedata/ensembl_liftover/NCBI34...
#> BFC4521 https://storage.googleapis.com/reusedata/ensembl_liftover/NCBI35...
#> BFC4523 https://storage.googleapis.com/reusedata/ensembl_liftover/NCBI36...
#> BFC4631 /tmp/Rtmp7Lq2kA/gcpData/GRCh37_to_GRCh38.chain