MAvalues {MatrixQCvis}R Documentation

Create values (M and A) for MA plot

Description

The function 'MAvalues' will create MA values as input for the function 'MAplot' and 'hoeffDValues'. 'M' and 'A' are specified relative to specified samples which is determined by the 'group' argument. In case of 'group == "all"', all samples (expect the specified one) are taken for the reference calculation. In case of 'group != "all"' will use the samples belonging to the same group given in 'colnames(colData(se))' expect the specified one.

Usage

MAvalues(se, log2 = TRUE, group = c("all", colnames(colData(se))))

Arguments

se

'SummarizedExperiment'

log2

'logical', specifies if values re 'log2' transformed prior to calculating M and A values. If the values are already transformed, 'log2' should be set to 'FALSE'.

group

'character', either '"all"' or one of 'colnames(colData(se))'

Value

'tbl' with columns 'Feature', 'name' (sample name), 'A', 'M' and additional columns of 'colData(se)'

Examples

## create se
set.seed(1)
a <- matrix(rnorm(10000), nrow = 1000, ncol = 10, 
            dimnames = list(1:1000, paste("sample", 1:10)))
a[c(1, 5, 8), 1:5] <- NA
cD <- data.frame(name = colnames(a), type = c(rep("1", 5), rep("2", 5)))
rD <- data.frame(spectra = rownames(a))
se <- SummarizedExperiment(assay = a, rowData = rD, colData = cD)

MAvalues(se, log2 = FALSE, group = "all")


[Package MatrixQCvis version 1.2.0 Index]