Frequently RNA-seq experiments are performed with technical replicates split across flow cell lanes. This generic facilitates quick aggregation of counts across the flow cells.

# S4 method for matrix
aggregateReplicates(object, pattern = "_L\\d+")

# S4 method for DESeqDataSet
aggregateReplicates(object, pattern = "_L\\d+")

Arguments

object

Object.

pattern

Grep pattern to match lane identifiers in sample name.

Value

Object of same class, with pooled technical replicates.

Note

DESeqDataSet is returned using DESeqDataSetFromMatrix().

Examples

# matrix
# NOT RUN { aggregateReplicates(assay(bcb)) # }
# DESeqDataSet
# NOT RUN { aggregateReplicates(dds) # }