extractComb {MatrixQCvis}R Documentation

Obtain the features that are present in a specified set

Description

The function 'extractComb' extracts the features that match a 'combination' depending if the features was measured or missing. The function will return the sets that match the 'combination', thus, the function might be useful when answering questions about which features are measured/missing under certain combinations (e.g. sample types or experimental conditions).

Usage

extractComb(se, combination, measured = TRUE, category = "type")

Arguments

se

'SummarizedExperiment'

combination

'character', refers to factors in 'category'

measured

'logical'

category

'character', corresponding to a column name in 'colData(se)'

Details

The function 'extractComb' uses the 'make_comb_mat' function from 'ComplexHeatmap' package.

Value

'character'

Examples


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

extractComb(se, combination = "2", measured = TRUE, category = "type") 


[Package MatrixQCvis version 1.1.2 Index]