R/download_study.R
download_study.Rd
Download the gene or exon level RangedSummarizedExperiment-class objects provided by the recount project. Alternatively download the counts, metadata or file information for a given SRA study id. You can also download the sample bigWig files or the mean coverage bigWig file.
download_study( project, type = "rse-gene", outdir = project, download = TRUE, version = 2, ... )
project | A character vector with one SRA study id. |
---|---|
type | Specifies which files to download. The options are:
|
outdir | The destination directory for the downloaded file(s).
Alternatively check the |
download | Whether to download the files or just get the download urls. |
version | A single integer specifying which version of the files to
download. Valid options are 1 and 2, as described in
https://jhubiostatistics.shinyapps.io/recount/ under the
documentation tab. Briefly, version 1 are counts based on reduced exons while
version 2 are based on disjoint exons. This argument mostly just matters for
the exon counts. Defaults to version 2 (disjoint exons).
Use |
... | Additional arguments passed to download. |
Returns invisibly the URL(s) for the files that were downloaded.
Check http://stackoverflow.com/a/34383991 if you need to find the effective URLs. For example, http://duffel.rail.bio/recount/DRP000366/bw/mean_DRP000366.bw points to a link from SciServer.
Transcript quantifications are described in Fu et al, bioRxiv, 2018. https://www.biorxiv.org/content/10.1101/247346v2
FANTOM-CAT/recount2 quantifications are described in Imada, Sanchez, et al., bioRxiv, 2019. https://www.biorxiv.org/content/10.1101/659490v1
Leonardo Collado-Torres
## Find the URL to download the RangedSummarizedExperiment for the ## Geuvadis consortium study. url <- download_study("ERP001942", download = FALSE) ## See the actual URL url #> [1] "http://duffel.rail.bio/recount/v2/ERP001942/rse_gene.Rdata" if (FALSE) { ## Download the example data included in the package for study SRP009615 url2 <- download_study("SRP009615") url2 ## Load the data load(file.path("SRP009615", "rse_gene.Rdata")) ## Compare the data library("testthat") expect_equivalent(rse_gene, rse_gene_SRP009615) }