Description Usage Arguments Details Value Author(s) Examples
Internal function for shiny application. May also be used outside of shiny to reconstruct figures.
1 2 3 4 5 6 | orderSimilarityMatrix(
similarityMatrix,
spectra,
type = c("retentionTime", "mz", "clustering"),
group = FALSE
)
|
similarityMatrix |
'matrix', 'similarityMatrix' contains pair-wise similarity coefficients which give information about the similarity between precursors |
spectra |
'MSpectra' object containing spectra that are compared in 'similarityMatrix' |
type |
'character', one of "retentionTime", "mz" or "clustering" |
group |
'logical', if TRUE group separated by "_" will be cleaved from rownames/colnames of similarityMatrix and matched against names of spectra, if FALSE rownames/colnames of similarityMatrix are taken as are and matched against names of spectra |
'orderSimilarityMatrix' takes a similarity matrix, spectra (containing information on m/z and retentionTime 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 'shinyCircos' 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).
'matrix', 'orderSimilarityMatrix' returns a similarity matrix with ordered rownames according to the 'character' vector given to order
Thomas Naake, thomasnaake@googlemail.com
1 2 3 4 5 6 | data("spectra", package = "MetCirc")
similarityMat <- compare_Spectra(spectra_tissue[1:10],
fun = normalizeddotproduct, binSize = 0.01)
## order according to retention time
orderSimilarityMatrix(similarityMatrix = similarityMat,
spectra_tissue, type = "retentionTime", group = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.