loadRecountExperiment: Loading one count table from Recount repository by given...

Description Usage Arguments Value Author(s) Examples

View source: R/load_recount_experiment.R

Description

Load one count table from Recount for a given experiment ID, and optionally merge the counts in order to avoid redundancy between multipl runs per sample.

Usage

1
loadRecountExperiment(recountID, parameters, forceDownload = FALSE, ...)

Arguments

recountID

identifier of one study in ReCount database

parameters

global and specific parameters for the analysis of this recountID

forceDownload=FALSE

by default, the data is downloaded only if it is not found in the studyPath folder. If forceDownload is TRUE, the data will be downloaded irrespective of existing files.

Value

A list containing: the count table, the pheno table, and some additional parameters (study ID, ...).

Author(s)

Jacques van Helden and Mustafa Abuelqumsan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Load required packages
require("RNAseqMVA")
require(yaml)

## Load parameters
project.parameters <- yaml.load_file("misc/00_project_parameters.yml")

## Load counts for a Leukemia dataset
recountID <- "SRP048759"
recountData <- loadRecountExperiment(recountID, parameters = project.parameters$global)

## Check the dimension of the table with counts per run
dim(recountData$result$runs$dataTable)

## Check the number of runs per sample
table(recountData$runPheno$geo_accession)

## Count the number of unique sample IDs in the run-wise description table (runPheno)
message("Number of runs = ", length(recountData$runPheno$geo_accession))
message("Number unique geo_accession values: ", length(unique(sort(recountData$runPheno$geo_accession))))

## Check the dimension of the table with counts per sample
dim(recountData$merged$sampleCounts)

cor(log(recountData$result$runs$dataTable[, recountData$runPheno$geo_accession == "GSM1521620"]+1))

## Test correlation between 8 randomly selected biological replicates (distinct samples)
cor(log(recountData$merged$sampleCounts[, sample(1:ncol(recountData$merged$sampleCounts), size=8)]+1))

elqumsan/RNAseqMVA documentation built on March 10, 2021, 8:10 a.m.