locate_url: Construct the URL to access a particular 'recount3' file

Description Usage Arguments Value See Also Examples

View source: R/locate_url.R

Description

Given an organism of interest, this function constructs the URL for accessing one of the output files from the recount3 project. You can then download the file using file_retrieve().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
locate_url(
  project,
  project_home = project_homes(organism = organism, recount3_url = recount3_url),
  type = c("metadata", "gene", "exon", "jxn", "bw"),
  organism = c("human", "mouse"),
  sample = NULL,
  annotation = annotation_options(organism),
  jxn_format = c("ALL", "UNIQUE"),
  recount3_url = getOption("recount3_url", "http://duffel.rail.bio/recount3")
)

Arguments

project

A character(1) with the ID for a given study.

project_home

A character(1) with the home directory for the project. You can find these using project_homes().

type

A character(1) specifying whether you want to access gene counts, exon counts, exon-exon junctions or base-pair BigWig coverage files (one per sample).

organism

A character(1) specifying which organism you want to download data from. Supported options are "human" or "mouse".

sample

A character() vector with the sample ID(s) you want to download.

annotation

A character(1) specifying which annotation you want to download. Only used when type is either gene or exon.

jxn_format

A character(1) specifying whether the exon-exon junction files are derived from all the reads (ALL) or only the uniquely mapping read counts (UNIQUE). Note that UNIQUE is only available for some projects: GTEx and TCGA for human.

recount3_url

A character(1) specifying the home URL for recount3 or a local directory where you have mirrored recount3.

Value

A character() with the URL(s) for the file(s) of interest.

See Also

Other internal functions for accessing the recount3 data: annotation_ext(), create_rse_manual(), file_retrieve(), locate_url_ann(), 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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
## Example for metadata files from a project from SRA
locate_url(
    "SRP009615",
    "data_sources/sra"
)

## Example for metadata files from a project that is part of a collection
locate_url(
    "ERP110066",
    "collections/geuvadis_smartseq",
    recount3_url = "http://snaptron.cs.jhu.edu/data/temp/recount3"
)

## Example for a BigWig file
locate_url(
    "SRP009615",
    "data_sources/sra",
    "bw",
    "human",
    "SRR387777"
)

## Locate example gene count files
locate_url(
    "SRP009615",
    "data_sources/sra",
    "gene"
)
locate_url(
    "SRP009615",
    "data_sources/sra",
    "gene",
    annotation = "refseq"
)

## Example for a gene count file from a project that is part of a collection
locate_url(
    "ERP110066",
    "collections/geuvadis_smartseq",
    "gene",
    recount3_url = "http://snaptron.cs.jhu.edu/data/temp/recount3"
)

## Locate example junction files
locate_url(
    "SRP009615",
    "data_sources/sra",
    "jxn"
)

## Example for metadata files from a project from SRA
locate_url(
    "ERP001942",
    "data_sources/sra"
)

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