orderSimilarityMatrix {MetCirc} | R Documentation |
Internal function for shiny application. May also be used outside of shiny to reconstruct figures.
orderSimilarityMatrix(similarityMatrix, spectra, type=c("retentionTime", "mz", "clustering"), group=FALSE)
similarityMatrix |
|
spectra |
|
type |
|
group |
|
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
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)