expand_sra_attributes: Expand SRA attributes

Description Usage Arguments Details Value Author(s) Examples

View source: R/expand_sra_attributes.R

Description

This function expands the SRA attributes stored in sra.sample_attributes variable in the colData() slot of a RangedSummarizedExperiment-class produced by create_rse().

Usage

1

Arguments

rse

A RangedSummarizedExperiment-class object created by create_rse() or create_rse_manual().

Details

Note that this function will work on projects available from SRA only. Furthermore, SRA attributes are project-specific. Thus, if you use this function in more than one RSE object, you won't be able to combine them easily with cbind() and will need to manually merge the colData() slots from your set of RSE files before being able to run cbind().

Value

A RangedSummarizedExperiment-class object with expanded metadata columns.

Author(s)

Andrew E Jaffe modified by Leonardo Collado-Torres.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Find all available human projects
human_projects <- available_projects()

## Find the project you are interested in
proj_info <- subset(
    human_projects,
    project == "SRP009615" & project_type == "data_sources"
)

## Create a RSE object at the gene level
rse_gene_SRP009615 <- create_rse(proj_info)

## Expand the SRA attributes (see details for more information)
rse_gene_SRP009615 <- expand_sra_attributes(rse_gene_SRP009615)

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