Description Usage Arguments Details Value Examples
View source: R/calculateStatistics.R
Collapses sample values into their average. If only one value is present due to NA-values in other technical replicates, then that value is used.
1 | reduceTechnicalReplicates(se, techRepColName, sampleColName)
|
se |
Summarized experiment where the assay contains the data to be reduced, and the colData the data frame |
techRepColName |
Technical replicates column name in colData |
sampleColName |
Sample names column name in colData |
Takes a SummarizedExperiment where the data is present as the assay and the colData contains the design conditions. In the design conditions there should be one column with the technical replicate groups and one column containing the sample names
reducedSe Summarized experiment with reduced data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | testData <- as.matrix(data.frame(
c(1,1,1),
c(1,2,1),
c(7,7,7),
c(7,9,7)))
colnames(testData) <- c("a1", "a2", "b1", "b2")
designDf <- data.frame(
sample=c("a1", "a2", "b1", "b2"),
techrep=c("a", "a", "b", "b"))
se <- SummarizedExperiment::SummarizedExperiment(
assay=testData,
colData=designDf
)
statObj <- reduceTechnicalReplicates(se, "techrep", "sample")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.