file_retrieve: Download a remote file and cache it to re-use later

Description Usage Arguments Value See Also Examples

View source: R/file_retrieve.R

Description

Download a remote file and cache it to re-use later

Usage

1
2
3
4
5
file_retrieve(
  url,
  bfc = recount3_cache(),
  verbose = getOption("recount3_verbose", TRUE)
)

Arguments

url

A character(1) with the file URL or the actual local path in which case, it won't be cached. If length(url) > 1 , this function will be used recursively.

bfc

A BiocFileCache-class object where the files will be cached to, typically created by recount3_cache().

verbose

A logical(1) indicating whether to show messages with updates.

Value

A character(1) with the path to the cached file.

See Also

Other internal functions for accessing the recount3 data: annotation_ext(), create_rse_manual(), locate_url_ann(), locate_url(), project_homes(), read_counts(), read_metadata()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Download the metadata file for project SRP009615
url_SRP009615_meta <- locate_url(
    "SRP009615",
    "data_sources/sra"
)
local_SRP009615_meta <- file_retrieve(
    url = url_SRP009615_meta
)
local_SRP009615_meta

## Download the gene counts file for project SRP009615
url_SRP009615_gene <- locate_url(
    "SRP009615",
    "data_sources/sra",
    type = "gene"
)
local_SRP009615_gene <- file_retrieve(
    url = url_SRP009615_gene
)
local_SRP009615_gene

recount3 documentation built on Feb. 13, 2021, 2 a.m.