add_metadata {recount}R Documentation

Add additional curated metadata to a recount rse object

Description

This function appends sample metadata information to a RangedSummarizedExperiment-class from the recount2 project. The sample metadata comes from curated efforts independent from the original recount2 project. Currently the only information comes from the recount_brain project described in more detail at http://lieberinstitute.github.io/recount-brain/.

Usage

add_metadata(rse, source = "recount_brain_v1", is_tcga = FALSE,
  verbose = TRUE)

Arguments

rse

A RangedSummarizedExperiment-class object as downloaded with download_study. If this argument is not specified, the function will return the raw metadata table.

source

A valid source name. The only supported options at this moment are recount_brain_v1 and recount_brain_v2.

is_tcga

Set to TRUE only when rse is from TCGA. Otherwise set to FALSE (default).

verbose

If TRUE it will print a message of where the predictions file is being downloaded to.

Details

If you use the recount_brain data please cite the Razmara et al bioRxiv pre-print available at (TODO update URL once it's available). See citation details with citation('recount').

Value

A RangedSummarizedExperiment-class object with the sample metadata columns appended to the colData() slot. For source = "recount_brain_v1", the metadata columns are described at http://lieberinstitute.github.io/recount-brain/. For source = "recount_brain_v2", the metadata columns are described at http://lieberinstitute.github.io/recount-brain/cross_studies_metadata/cross_studies_metadata.html.

Author(s)

Leonardo Collado-Torres

References

Razmara et al, in prep, 2018.

Examples


## Add the sample metadata to an example rse_gene object
rse_gene <- add_metadata(rse_gene_SRP009615, 'recount_brain_v1')

## Explore the metadata
colData(rse_gene)

## For a list of studies present in recount_brain_v1 check
## http://lieberinstitute.github.io/recount-brain/. Note that it only
## includes studies from SRA, so no TCGA or GTEx (those have great
## sample metadata already available).
## recount_brain_v2 includes GTEx and TCGA brain samples in addition to the
## recount_brain_v1 data.

## Not run: 
## Example project that is present in recount_brain_v2.

## Download and load the data
download_study('ERP001304')
load(file.path('ERP001304', 'rse_gene.Rdata'))

## Add the sample metadata from recount_brain_v2
rse_gene <- add_metadata(rse_gene, source = 'recount_brain_v2')

## Check the metadata
colData(rse_gene)

## End(Not run)

## Obtain all the recount_brain_v2 metadata
recount_brain_v2 <- add_metadata(source = 'recount_brain_v2')


[Package recount version 1.8.2 Index]