upset_category {MatrixQCvis} | R Documentation |
The function 'upset_category' displays the frequency of measured values per feature with respect to class/sample type to assess difference in occurrences. Internally, the measured values per sample are obtained via the 'measured_category' function: this function will access the number of measured/missing values per category and feature. From this, a binary 'tbl' will be created specifying if the feature is present/missing, which will be given to the 'upset' function from the 'UpSetR' package.
upset_category(se, category = "type", ...)
se |
'SummarizedExperiment', containing the intensity values in 'assay(se)', missing values are encoded by 'NA' |
category |
'character', corresponding to a column in 'colData(se)' |
... |
additional parameters passed to 'measured_category' |
'UpSet' plot
## 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) upset_category(se, category = "type")