distSample {MatrixQCvis}R Documentation

Create a heatmap using distance information between samples

Description

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)'.

Usage

distSample(d, se, label = "name", title = "raw", ...)

Arguments

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'

Details

Internal use in 'shinyQC'

Value

'plotly'

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)
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)


[Package MatrixQCvis version 1.2.4 Index]