expand_sra_attributes: Expand SRA attributes

View source: R/expand_sra_attributes.R

expand_sra_attributesR Documentation

Expand SRA attributes

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

expand_sra_attributes(rse)

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


## 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)

LieberInstitute/recount3 documentation built on Dec. 11, 2024, 8:35 p.m.