DESeq2_tidiers: Tidying methods for DESeq2 DESeqTransform objects

DESeq2_tidiersR Documentation

Tidying methods for DESeq2 DESeqTransform objects

Description

This reshapes a DESeq2 transform object (output from rlog() and varianceStabilizingTransform() functions) into a tidy format.

Usage

## S3 method for class 'DESeqTransform'
tidy(x, colData = FALSE, ...)

Arguments

x

DESeqTransform object

colData

whether colData should be included in the tidied output for those in the DESeqTransform object.

...

extra arguments (not used)

Details

colDat=TRUE adds covariates from colData to the data frame.

Value

the result is a data frame with the columns

gene

gene ID

sample

sample ID

log2Count

transformed normalized counts in this gene in this sample on a log2 scale

If colData = TRUE, it also merges this with the columns present in colData(x).

Note

Unclear what the license for this code might be. It's copied directly from https://gist.github.com/tavareshugo/3973461a7daf8a43e65e3566d5deed14

Author(s)

Hugo Tavares https://gist.github.com/tavareshugo/3973461a7daf8a43e65e3566d5deed14

Examples


# From DESeq2 documentation

if (require("DESeq2")) {
    dds = makeExampleDESeqDataSet(betaSD = 1)

    # vst transform
    vst_norm = varianceStabilizingTransformation(dds)

    # rlog transform
    rlog_norm = rlog(dds)

    tidy(rlog_norm)
    tidy(vst_norm)

    # With design included
    tidy(rlog_norm, colData=TRUE)
    tidy(vst_norm, colData=TRUE)
}


amcdavid/GeneseeBulk documentation built on March 26, 2022, 4:58 a.m.