how to download bigwig from recount2?
1
0
Entering edit mode
hyp15 • 0
@hyp15-21655
Last seen 5.2 years ago

Hello,

I am trying to download bigwig files for each sample of RNA-Seq data in GTEx via recount2. I can see bigwig file names defined for each sample (probably for each gene) in the 19th column through the following command. Then, how can I download the actual bigwig files in the column?

> download_study("SRP012682", type = "rse-gene")
> load(file.path("SRP012682", "rse_gene.Rdata"))
> colnames(colData(rse_gene))

Actually, the recount Bioconductor vignette stated that downloadstudy can be set with type="samples" that returns one bigWig file per sample in the study. However, downloadstudy cannot recognize this parameter value. In either way, can you please help me to download GTEx RNA-Seq bigwig files for each sample?

> url <- download_study('SRP012682', type=samples)
Error in type %in% c("rse-gene", "rse-exon", "rse-jx", "rse-tx", "counts-gene",  : 
  'match' requires vector arguments
recount • 1.8k views
ADD COMMENT
1
Entering edit mode
@lcolladotor
Last seen 4 weeks ago
United States

Hi hyp15,

You can download the BigWig files for a study using download_study(project, type = "samples" ). Note that "samples" is quoted, unlike the one you provided in your code above.

So for example this works for downloading all the BigWig sample files for study SRP009615 (took 2 minutes for me).

download_study('SRP009615', type = 'samples')

Note that downloading all the BigWig files will use a lot of disk space (if you download them all it's about 8 TB).

Best, Leonardo

options(width = 120)
sessioninfo::session_info()
- Session info -------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/New_York            
 date     2019-08-15                  

- Packages -----------------------------------------------------------------------------------------------------------
 package              * version   date       lib source        
 acepack                1.4.1     2016-10-29 [1] CRAN (R 3.6.1)
 AnnotationDbi          1.46.0    2019-05-02 [1] Bioconductor  
 assertthat             0.2.1     2019-03-21 [1] CRAN (R 3.6.1)
 backports              1.1.4     2019-04-10 [1] CRAN (R 3.6.0)
 base64enc              0.1-3     2015-07-28 [1] CRAN (R 3.6.0)
 bibtex                 0.4.2     2017-06-30 [1] CRAN (R 3.6.1)
 Biobase              * 2.44.0    2019-05-02 [1] Bioconductor  
 BiocGenerics         * 0.30.0    2019-05-02 [1] Bioconductor  
 BiocParallel         * 1.18.1    2019-08-06 [1] Bioconductor  
 biomaRt                2.40.3    2019-07-17 [1] Bioconductor  
 Biostrings             2.52.0    2019-05-02 [1] Bioconductor  
 bit                    1.1-14    2018-05-29 [1] CRAN (R 3.6.0)
 bit64                  0.9-7     2017-05-08 [1] CRAN (R 3.6.0)
 bitops                 1.0-6     2013-08-17 [1] CRAN (R 3.6.0)
 blob                   1.2.0     2019-07-09 [1] CRAN (R 3.6.1)
 BSgenome               1.52.0    2019-05-02 [1] Bioconductor  
 bumphunter             1.26.0    2019-05-02 [1] Bioconductor  
 checkmate              1.9.4     2019-07-04 [1] CRAN (R 3.6.1)
 cli                    1.1.0     2019-03-19 [1] CRAN (R 3.6.1)
 cluster                2.1.0     2019-06-19 [2] CRAN (R 3.6.1)
 codetools              0.2-16    2018-12-24 [2] CRAN (R 3.6.1)
 colorspace             1.4-1     2019-03-18 [1] CRAN (R 3.6.1)
 crayon                 1.3.4     2017-09-16 [1] CRAN (R 3.6.1)
 data.table             1.12.2    2019-04-07 [1] CRAN (R 3.6.1)
 DBI                    1.0.0     2018-05-02 [1] CRAN (R 3.6.1)
 DelayedArray         * 0.10.0    2019-05-02 [1] Bioconductor  
 derfinder              1.18.3    2019-06-18 [1] Bioconductor  
 derfinderHelper        1.18.1    2019-05-22 [1] Bioconductor  
 digest                 0.6.20    2019-07-04 [1] CRAN (R 3.6.1)
 doRNG                  1.7.1     2018-06-22 [1] CRAN (R 3.6.1)
 downloader             0.4       2015-07-09 [1] CRAN (R 3.6.1)
 dplyr                  0.8.3     2019-07-04 [1] CRAN (R 3.6.1)
 foreach                1.4.7     2019-07-27 [1] CRAN (R 3.6.1)
 foreign                0.8-72    2019-08-02 [2] CRAN (R 3.6.1)
 Formula                1.2-3     2018-05-03 [1] CRAN (R 3.6.0)
 GenomeInfoDb         * 1.20.0    2019-05-02 [1] Bioconductor  
 GenomeInfoDbData       1.2.1     2019-08-13 [1] Bioconductor  
 GenomicAlignments      1.20.1    2019-06-18 [1] Bioconductor  
 GenomicFeatures        1.36.4    2019-07-11 [1] Bioconductor  
 GenomicFiles           1.20.0    2019-05-02 [1] Bioconductor  
 GenomicRanges        * 1.36.0    2019-05-02 [1] Bioconductor  
 GEOquery               2.52.0    2019-05-02 [1] Bioconductor  
 ggplot2                3.2.1     2019-08-10 [1] CRAN (R 3.6.1)
 glue                   1.3.1     2019-03-12 [1] CRAN (R 3.6.1)
 gridExtra              2.3       2017-09-09 [1] CRAN (R 3.6.1)
 gtable                 0.3.0     2019-03-25 [1] CRAN (R 3.6.1)
 Hmisc                  4.2-0     2019-01-26 [1] CRAN (R 3.6.1)
ADD COMMENT
0
Entering edit mode
 hms                    0.5.0     2019-07-09 [1] CRAN (R 3.6.1)
 htmlTable              1.13.1    2019-01-07 [1] CRAN (R 3.6.1)
 htmltools              0.3.6     2017-04-28 [1] CRAN (R 3.6.1)
 htmlwidgets            1.3       2018-09-30 [1] CRAN (R 3.6.1)
 httr                   1.4.1     2019-08-05 [1] CRAN (R 3.6.1)
 IRanges              * 2.18.1    2019-05-31 [1] Bioconductor  
 iterators              1.0.12    2019-07-26 [1] CRAN (R 3.6.1)
 jsonlite               1.6       2018-12-07 [1] CRAN (R 3.6.1)
 knitr                  1.24      2019-08-08 [1] CRAN (R 3.6.1)
 lattice                0.20-38   2018-11-04 [2] CRAN (R 3.6.1)
 latticeExtra           0.6-28    2016-02-09 [1] CRAN (R 3.6.1)
 lazyeval               0.2.2     2019-03-15 [1] CRAN (R 3.6.1)
 limma                  3.40.6    2019-07-26 [1] Bioconductor  
 locfit                 1.5-9.1   2013-04-20 [1] CRAN (R 3.6.1)
 magrittr               1.5       2014-11-22 [1] CRAN (R 3.6.1)
 Matrix                 1.2-17    2019-03-22 [2] CRAN (R 3.6.1)
 matrixStats          * 0.54.0    2018-07-23 [1] CRAN (R 3.6.1)
 memoise                1.1.0     2017-04-21 [1] CRAN (R 3.6.1)
 munsell                0.5.0     2018-06-12 [1] CRAN (R 3.6.1)
 nnet                   7.3-12    2016-02-02 [2] CRAN (R 3.6.1)
 packrat                0.5.0     2018-11-14 [1] CRAN (R 3.6.1)
 pillar                 1.4.2     2019-06-29 [1] CRAN (R 3.6.1)
 pkgconfig              2.0.2     2018-08-16 [1] CRAN (R 3.6.1)
 pkgmaker               0.27      2018-05-25 [1] CRAN (R 3.6.1)
 plyr                   1.8.4     2016-06-08 [1] CRAN (R 3.6.1)
 prettyunits            1.0.2     2015-07-13 [1] CRAN (R 3.6.1)
 progress               1.2.2     2019-05-16 [1] CRAN (R 3.6.1)
 purrr                  0.3.2     2019-03-15 [1] CRAN (R 3.6.1)
 qvalue                 2.16.0    2019-05-02 [1] Bioconductor  
 R6                     2.4.0     2019-02-14 [1] CRAN (R 3.6.1)
 RColorBrewer           1.1-2     2014-12-07 [1] CRAN (R 3.6.0)
 Rcpp                   1.0.2     2019-07-25 [1] CRAN (R 3.6.1)
 RCurl                  1.95-4.12 2019-03-04 [1] CRAN (R 3.6.0)
 readr                  1.3.1     2018-12-21 [1] CRAN (R 3.6.1)
 recount              * 1.10.8    2019-07-01 [1] Bioconductor  
 registry               0.5-1     2019-03-05 [1] CRAN (R 3.6.0)
 rentrez                1.2.2     2019-05-02 [1] CRAN (R 3.6.1)
 reshape2               1.4.3     2017-12-11 [1] CRAN (R 3.6.1)
 rlang                  0.4.0     2019-06-25 [1] CRAN (R 3.6.1)
 rngtools               1.4       2019-07-01 [1] CRAN (R 3.6.1)
 rpart                  4.1-15    2019-04-12 [2] CRAN (R 3.6.1)
 Rsamtools              2.0.0     2019-05-02 [1] Bioconductor  
 RSQLite                2.1.2     2019-07-24 [1] CRAN (R 3.6.1)
 rstudioapi             0.10      2019-03-19 [1] CRAN (R 3.6.1)
 rtracklayer            1.44.2    2019-07-24 [1] Bioconductor  
 S4Vectors            * 0.22.0    2019-05-02 [1] Bioconductor  
 scales                 1.0.0     2018-08-09 [1] CRAN (R 3.6.1)
 sessioninfo            1.1.1     2018-11-05 [1] CRAN (R 3.6.1)
 stringi                1.4.3     2019-03-12 [1] CRAN (R 3.6.0)
 stringr                1.4.0     2019-02-10 [1] CRAN (R 3.6.1)
 SummarizedExperiment * 1.14.1    2019-07-31 [1] Bioconductor  
 survival               2.44-1.1  2019-04-01 [2] CRAN (R 3.6.1)
 tibble                 2.1.3     2019-06-06 [1] CRAN (R 3.6.1)
 tidyr                  0.8.3     2019-03-01 [1] CRAN (R 3.6.1)
 tidyselect             0.2.5     2018-10-11 [1] CRAN (R 3.6.1)
 VariantAnnotation      1.30.1    2019-05-19 [1] Bioconductor  
 vctrs                  0.2.0     2019-07-05 [1] CRAN (R 3.6.1)
 withr                  2.1.2     2018-03-15 [1] CRAN (R 3.6.1)
 xfun                   0.8       2019-06-25 [1] CRAN (R 3.6.1)
 XML                    3.98-1.20 2019-06-06 [1] CRAN (R 3.6.0)
 xml2                   1.2.2     2019-08-09 [1] CRAN (R 3.6.1)
 xtable                 1.8-4     2019-04-21 [1] CRAN (R 3.6.1)
 XVector                0.24.0    2019-05-02 [1] Bioconductor  
 zeallot                0.1.0     2018-01-28 [1] CRAN (R 3.6.1)
 zlibbioc               1.30.0    2019-05-02 [1] Bioconductor  

[1] D:/Documents/R/win-library/3.6
[2] D:/R/R-3.6.1/library
ADD REPLY
0
Entering edit mode
download_study('SRP009615', type = 'samples')
2019-08-15 15:25:04 downloading file SRR387777.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR387777.bw'
Content type 'text/plain; charset=UTF-8' length 94700336 bytes (90.3 MB)
downloaded 90.3 MB

2019-08-15 15:25:15 downloading file SRR387778.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR387778.bw'
Content type 'text/plain; charset=UTF-8' length 107837710 bytes (102.8 MB)
downloaded 102.8 MB

2019-08-15 15:25:28 downloading file SRR387779.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR387779.bw'
Content type 'text/plain; charset=UTF-8' length 97582496 bytes (93.1 MB)
downloaded 93.1 MB

2019-08-15 15:25:38 downloading file SRR387780.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR387780.bw'
Content type 'text/plain; charset=UTF-8' length 95744851 bytes (91.3 MB)
downloaded 91.3 MB

2019-08-15 15:25:50 downloading file SRR389077.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389077.bw'
Content type 'text/plain; charset=UTF-8' length 66256981 bytes (63.2 MB)
downloaded 63.2 MB

2019-08-15 15:25:57 downloading file SRR389078.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389078.bw'
Content type 'text/plain; charset=UTF-8' length 78183706 bytes (74.6 MB)
downloaded 74.6 MB

2019-08-15 15:26:06 downloading file SRR389079.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389079.bw'
Content type 'text/plain; charset=UTF-8' length 127788534 bytes (121.9 MB)
downloaded 121.9 MB

2019-08-15 15:26:20 downloading file SRR389080.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389080.bw'
Content type 'text/plain; charset=UTF-8' length 87858929 bytes (83.8 MB)
downloaded 83.8 MB

2019-08-15 15:26:29 downloading file SRR389081.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389081.bw'
Content type 'text/plain; charset=UTF-8' length 79387326 bytes (75.7 MB)
downloaded 75.7 MB

2019-08-15 15:26:38 downloading file SRR389082.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389082.bw'
Content type 'text/plain; charset=UTF-8' length 63161568 bytes (60.2 MB)
downloaded 60.2 MB

2019-08-15 15:26:46 downloading file SRR389083.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389083.bw'
Content type 'text/plain; charset=UTF-8' length 69695346 bytes (66.5 MB)
downloaded 66.5 MB

2019-08-15 15:26:54 downloading file SRR389084.bw to SRP009615/bw
trying URL 'http://duffel.rail.bio/recount/SRP009615/bw/SRR389084.bw'
Content type 'text/plain; charset=UTF-8' length 67003461 bytes (63.9 MB)
downloaded 63.9 MB


ADD REPLY
0
Entering edit mode

Thank you very much Leonardo Collado Torres!

ADD REPLY
0
Entering edit mode

Hello,

because GTex is that big, how one could for example pick up randomly (or first) 20 brain samples from GTex and download all the corresponding bigwig files for them? (I wrote brain because it looks like it is how recount2 splits GTex into when looking here: https://jhubiostatistics.shinyapps.io/recount/ )

ADD REPLY
0
Entering edit mode

This is a separate question, please post a new question Daniel. Thank you =)

ADD REPLY

Login before adding your answer.

Traffic: 782 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6