Internal function for shiny application. May also be used outside of shiny to reconstruct figures.
orderSimilarityMatrix( similarityMatrix, sps, type = c("retentionTime", "mz", "clustering"), group = FALSE )
orderSimilarityMatrix takes a similarity matrix,
Spectra object (
sps, containing information on m/z and
retention time), and a
character vector as arguments. It will then
reorder rows and columns of the
similarityMatrix object such,
that it orders rows and columns of
similarityMatrix according to
m/z, retention time or clustering in each group.
orderSimilarityMatrix is employed in the
function to create
similarityMatrix objects which will allow to switch
between different types of ordering in between groups (sectors) in the
circos plot. It may be used as well externally, to reproduce plots outside
of the reactive environment (see vignette for a workflow).
orderSimilarityMatrix returns a similarity
matrix with ordered
rownames according to the
Thomas Naake, email@example.com
data("spectra", package = "MetCirc") similarityMat <- Spectra::compareSpectra(sps_tissue[1:10], FUN = MsCoreUtils::ndotproduct, ppm = 10) rownames(similarityMat) <- colnames(similarityMat) <- sps_tissue$name[1:10] ## order according to retention time orderSimilarityMatrix(similarityMatrix = similarityMat, sps = sps_tissue, type = "retentionTime", group = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.