distSample {MatrixQCvis} | R Documentation |
The function 'distSample' creates a heatmap from a distance matrix created by the function 'distShiny'. The heatmap is annotated by the column specified by the 'label' column in 'colData(se)'.
distSample(d, se, label = "name", title = "raw", ...)
d |
'matrix' containing distances, obtained from 'distShiny' |
se |
'SummarizedExperiment' |
label |
'character', refers to a column in 'colData(se)' |
title |
'character' |
... |
further arguments passed to 'ComplexHeatmap::Heatmap' |
Internal use in 'shinyQC'
'plotly'
## 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) a_i <- imputeAssay(a, method = "MinDet") cD <- data.frame(name = colnames(a_i), type = c(rep("1", 5), rep("2", 5))) rD <- data.frame(spectra = rownames(a_i)) se <- SummarizedExperiment::SummarizedExperiment(assay = a_i, rowData = rD, colData = cD) dist <- distShiny(a_i) distSample(dist, se, label = "type", title = "imputed", show_row_names = TRUE)