Package 'DEFormats'

Title: Differential gene expression data formats converter
Description: Convert between different data formats used by differential gene expression analysis tools.
Authors: Andrzej Oleś
Maintainer: Andrzej Oleś <[email protected]>
License: GPL-3
Version: 1.33.0
Built: 2024-07-12 04:49:00 UTC
Source: https://github.com/bioc/DEFormats

Help Index


Convert to DESeqDataSet

Description

Coerces an object to DESeqDataSet.

Usage

as.DESeqDataSet(x, ...)

## S3 method for class 'DGEList'
as.DESeqDataSet(x, ...)

Arguments

x

an R object

...

additional arguments to be passed to methods

Value

A DESeqDataSet object

Methods (by class)

Author(s)

Andrzej Oleś <[email protected]>, 2016-2023

See Also

as.DGEList

Examples

require("edgeR")

counts = simulateRnaSeqData()
group = rep(c("case", "control"), each = 3)

dge = DGEList(counts = counts, group = group)
dge

as.DESeqDataSet(dge)

Convert to DGEList

Description

Coerces an object to DGEList.

Usage

as.DGEList(x, ...)

## S3 method for class 'DESeqDataSet'
as.DGEList(x, ...)

Arguments

x

an R object

...

additional arguments to be passed to methods

Value

A DGEList object.

Methods (by class)

Author(s)

Andrzej Oleś <[email protected]>, 2016-2023

See Also

as.DESeqDataSet

Examples

require("DESeq2")

se = simulateRnaSeqData(output = "RangedSummarizedExperiment")
se

dds = DESeqDataSet(se, design = ~ condition)   
dds

as.DGEList(dds)

Convert Between Differential Gene Expression Data Formats

Description

DEFormats provides data converters between various formats used by different gene expression analysis packages.

Details

Currently the package supports data conversion between DESeq2 and edgeR, i.e., between DESeqDataSet and DGEList objects, respectively.

Objects can be coerced using the following methods

Author(s)

Andrzej Oleś <[email protected]>, 2016-2023


DGEList Constructor Generic

Description

Creates a DGEList object.

Usage

DGEList(counts, ...)

## S4 method for signature 'RangedSummarizedExperiment'
DGEList(
  counts = new("RangedSummarizedExperiment"),
  lib.size = colData(counts)$lib.size,
  norm.factors = colData(counts)$norm.factors,
  samples = colData(counts),
  group = NULL,
  genes = as.data.frame(rowRanges(counts)),
  remove.zeros = FALSE
)

Arguments

counts

read counts, either a numeric matrix or a RangedSummarizedExperiment object.

...

other arguments are not currently used.

lib.size

numeric vector of library sizes (sequencing depths) for the samples. Defaults to colSums(counts).

norm.factors

numeric vector of normalization factors that modify the library sizes. Defaults to a vector of ones.

samples

data.frame containing sample information, with a row for each sample. This data.frame will be appended to the samples component of the DGEList object.

group

vector or factor giving the experimental group or treatment condition for each sample. Defaults to a single group.

genes

data.frame containing gene annotation.

remove.zeros

logical, whether to remove rows that have 0 total count.

Value

A DGEList object.

Author(s)

Andrzej Oleś <[email protected]>, 2016-2023

Examples

se = simulateRnaSeqData(output = "RangedSummarizedExperiment")

## Initialize a DGEList from a RangedSummarizedExperiment object
DGEList(se)

Simulate Normalization Factors

Description

Simulate gene-specific normalization factors for each sample of an RNA-seq experiment.

Usage

simulateNormFactors(n = 1000L, m = 6L, seed = 0L, ...)

Arguments

n

number of genes

m

number of samples

seed

a single integer value specifying the random number generator seed

...

arguments passed to matrix

Value

A matrix with n rows and m columns containing the normalization factors.

Author(s)

Andrzej Oleś <[email protected]>, 2016-2023

See Also

simulateRnaSeqData

Examples

require("DESeq2")

## normalization factors
se = simulateRnaSeqData(output = "RangedSummarizedExperiment")

dds = DESeqDataSet(se, design = ~ condition)

normalizationFactors(dds) = simulateNormFactors()

Example counts table of RNA-seq data

Description

Simulated expression data of an RNA-seq experiment.

Usage

simulateRnaSeqData(
  output = c("matrix", "RangedSummarizedExperiment"),
  n = 1000,
  m = 6,
  seed = 0L,
  ...
)

Arguments

output

output type

n

number of genes

m

number of samples

seed

a single integer value specifying the random number generator seed

...

arguments passed to makeExampleDESeqDataSet

Details

The count table is generated using the makeExampleDESeqDataSet method from the DESeq2 package.

Value

Depending on the output setting a matrix or an RangedSummarizedExperiment object.

Author(s)

Andrzej Oleś <[email protected]>, 2016-2023

See Also

simulateNormFactors

Examples

## count data matrix
mx = simulateRnaSeqData()
head(mx)

## return an RangedSummarizedExperiment object
se = simulateRnaSeqData(output = "RangedSummarizedExperiment")
se