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.35.0 |
Built: | 2024-11-29 05:10:35 UTC |
Source: | https://github.com/bioc/DEFormats |
Coerces an object to DESeqDataSet.
as.DESeqDataSet(x, ...) ## S3 method for class 'DGEList' as.DESeqDataSet(x, ...)
as.DESeqDataSet(x, ...) ## S3 method for class 'DGEList' as.DESeqDataSet(x, ...)
x |
an R object |
... |
additional arguments to be passed to methods |
A DESeqDataSet
object
as.DESeqDataSet(DGEList)
: Coerce DGEList-class
objects
to DESeqDataSet
.
Andrzej Oleś <[email protected]>, 2016-2023
require("edgeR") counts = simulateRnaSeqData() group = rep(c("case", "control"), each = 3) dge = DGEList(counts = counts, group = group) dge as.DESeqDataSet(dge)
require("edgeR") counts = simulateRnaSeqData() group = rep(c("case", "control"), each = 3) dge = DGEList(counts = counts, group = group) dge as.DESeqDataSet(dge)
Coerces an object to DGEList.
as.DGEList(x, ...) ## S3 method for class 'DESeqDataSet' as.DGEList(x, ...)
as.DGEList(x, ...) ## S3 method for class 'DESeqDataSet' as.DGEList(x, ...)
x |
an R object |
... |
additional arguments to be passed to methods |
A DGEList
object.
as.DGEList(DESeqDataSet)
: Coerce DESeqDataSet
objects to
DGEList-class
.
Andrzej Oleś <[email protected]>, 2016-2023
require("DESeq2") se = simulateRnaSeqData(output = "RangedSummarizedExperiment") se dds = DESeqDataSet(se, design = ~ condition) dds as.DGEList(dds)
require("DESeq2") se = simulateRnaSeqData(output = "RangedSummarizedExperiment") se dds = DESeqDataSet(se, design = ~ condition) dds as.DGEList(dds)
DEFormats provides data converters between various formats used by different gene expression analysis packages.
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
Andrzej Oleś <[email protected]>, 2016-2023
Creates a DGEList object.
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 )
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 )
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 |
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 |
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. |
A DGEList object.
Andrzej Oleś <[email protected]>, 2016-2023
se = simulateRnaSeqData(output = "RangedSummarizedExperiment") ## Initialize a DGEList from a RangedSummarizedExperiment object DGEList(se)
se = simulateRnaSeqData(output = "RangedSummarizedExperiment") ## Initialize a DGEList from a RangedSummarizedExperiment object DGEList(se)
Simulate gene-specific normalization factors for each sample of an RNA-seq experiment.
simulateNormFactors(n = 1000L, m = 6L, seed = 0L, ...)
simulateNormFactors(n = 1000L, m = 6L, seed = 0L, ...)
n |
number of genes |
m |
number of samples |
seed |
a single integer value specifying the random number generator seed |
... |
arguments passed to |
A matrix with n
rows and m
columns containing the
normalization factors.
Andrzej Oleś <[email protected]>, 2016-2023
simulateRnaSeqData
require("DESeq2") ## normalization factors se = simulateRnaSeqData(output = "RangedSummarizedExperiment") dds = DESeqDataSet(se, design = ~ condition) normalizationFactors(dds) = simulateNormFactors()
require("DESeq2") ## normalization factors se = simulateRnaSeqData(output = "RangedSummarizedExperiment") dds = DESeqDataSet(se, design = ~ condition) normalizationFactors(dds) = simulateNormFactors()
Simulated expression data of an RNA-seq experiment.
simulateRnaSeqData( output = c("matrix", "RangedSummarizedExperiment"), n = 1000, m = 6, seed = 0L, ... )
simulateRnaSeqData( output = c("matrix", "RangedSummarizedExperiment"), n = 1000, m = 6, seed = 0L, ... )
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 |
The count table is generated using the
makeExampleDESeqDataSet
method from the DESeq2
package.
Depending on the output
setting a matrix or an
RangedSummarizedExperiment
object.
Andrzej Oleś <[email protected]>, 2016-2023
simulateNormFactors
## count data matrix mx = simulateRnaSeqData() head(mx) ## return an RangedSummarizedExperiment object se = simulateRnaSeqData(output = "RangedSummarizedExperiment") se
## count data matrix mx = simulateRnaSeqData() head(mx) ## return an RangedSummarizedExperiment object se = simulateRnaSeqData(output = "RangedSummarizedExperiment") se