Last data update: 2014.03.03

R: Download TCGA data
downloadTCGAR Documentation

Download TCGA data

Description

Enables to download TCGA data from specified dates of releases of concrete Cohorts of cancer types. Pass a name of required dataset to the dataSet parameter. By default the Merged Clinical dataSet is downloaded (value dataSet = 'Merge_Clinical.Level_1') from the newest available date of the release.

Usage

downloadTCGA(cancerTypes, dataSet = "Merge_Clinical.Level_1", destDir,
  date = NULL, untarFile = TRUE, removeTar = TRUE, allDataSets = FALSE)

Arguments

cancerTypes

A character vector containing abbreviations (Cohort code) of types of cancers to download from http://gdac.broadinstitute.org/. For easy access from R check details below.

dataSet

A part of the name of dataSet to be downloaded from http://gdac.broadinstitute.org/runs/. By default the Merged Clinical dataSet is downloaded (value dataSet = 'Merge_Clinical.Level_1'). Available datasets' names can be checked using checkTCGA function.

destDir

A character specifying a directory into which dataSets will be downloaded.

date

A NULL or character specifying from which date dataSets should be downloaded. By default (date = NULL) the newest available date is used. All available dates can be checked on http://gdac.broadinstitute.org/runs/ or by using checkTCGA function. Required format 'YYYY-MM-DD'.

untarFile

Logical - should the downloaded file be untarred. Default is TRUE.

removeTar

Logical - should the downloaded .tar file be removed after untarring. Default is TRUE.

allDataSets

Logical - should download all datasets matching dataSet parameter or only the first one (without FFPE phrase if possible).

Details

All cohort names can be checked using: sub( x = names( infoTCGA() ), '-counts', '' ).

Value

No values. It only downloads files.

Issues

If you have any problems, issues or think that something is missing or is not clear please post an issue on https://github.com/RTCGA/RTCGA/issues.

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

See Also

RTCGA website http://rtcga.github.io/RTCGA/Download.html.

Other RTCGA: RTCGA-package, boxplotTCGA, checkTCGA, convertTCGA, datasetsTCGA, expressionsTCGA, heatmapTCGA, infoTCGA, installTCGA, kmTCGA, mutationsTCGA, pcaTCGA, readTCGA, survivalTCGA, theme_RTCGA

Examples



dir.create( 'hre')

downloadTCGA( cancerTypes = 'ACC', dataSet = 'miR_gene_expression', 
destDir = 'hre', date =  tail( checkTCGA('Dates'), 2 )[1] )

## Not run: 
downloadTCGA( cancerTypes = c('BRCA', 'OV'), destDir = 'hre',
 date = tail( checkTCGA('Dates'), 2 )[1] )

## End(Not run)



Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RTCGA)
Welcome to the RTCGA (version: 1.2.2).
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RTCGA/downloadTCGA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: downloadTCGA
> ### Title: Download TCGA data
> ### Aliases: downloadTCGA
> 
> ### ** Examples
> 
> 
> 
> dir.create( 'hre')
> 
> downloadTCGA( cancerTypes = 'ACC', dataSet = 'miR_gene_expression', 
+ destDir = 'hre', date =  tail( checkTCGA('Dates'), 2 )[1] )
There were more than one datasets matching the dataSet parameter. 
Downloaded only 
gdac.broadinstitute.org_ACC.Merge_mirnaseq__illuminahiseq_mirnaseq__bcgsc_ca__Level_3__miR_gene_expression__data.Level_3.2015110100.0.0.tar.gz

All matches were 

gdac.broadinstitute.org_ACC.Merge_mirnaseq__illuminahiseq_mirnaseq__bcgsc_ca__Level_3__miR_gene_expression__data.Level_3.2015110100.0.0.tar.gz
gdac.broadinstitute.org_ACC.Merge_mirnaseq__illuminahiseq_mirnaseq__bcgsc_ca__Level_3__miR_gene_expression__data.aux.2015110100.0.0.tar.gz
gdac.broadinstitute.org_ACC.Merge_mirnaseq__illuminahiseq_mirnaseq__bcgsc_ca__Level_3__miR_gene_expression__data.mage-tab.2015110100.0.0.tar.gztrying URL 'http://gdac.broadinstitute.org/runs/stddata__2015_11_01/data/ACC/20151101/gdac.broadinstitute.org_ACC.Merge_mirnaseq__illuminahiseq_mirnaseq__bcgsc_ca__Level_3__miR_gene_expression__data.Level_3.2015110100.0.0.tar.gz'
Content type 'application/x-gzip' length 309876 bytes (302 KB)
==================================================
downloaded 302 KB

> 
> ## Not run: 
> ##D downloadTCGA( cancerTypes = c('BRCA', 'OV'), destDir = 'hre',
> ##D  date = tail( checkTCGA('Dates'), 2 )[1] )
> ## End(Not run)
> 
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>