shinyCircos: Interactive visualisation of similarity and navigation of...

View source: R/shinyApp.R

shinyCircosR Documentation

Interactive visualisation of similarity and navigation of MS/MS features

Description

Visualise the similarity of MS/MS features in a reactive context. See Details the vignette for further descriptions on how to use shinyCircos.

Usage

shinyCircos(similarityMatrix, sps, condition, ...)

Arguments

similarityMatrix

matrix, similarityMatrix contains pair-wise similarity coefficients which give information about the similarity between MS/MS features

sps

Spectra, sps will be used to display information about the selected feature and will store information of annotation

condition

character vector, specifies which conditions/samples are displayed

...

further arguments passed to shinyCircos, e.g. cexFeatureNames to pass to plotCircos to set font size in plotCircos of feature names

Details

The function is based on the shiny and circlize package. The user can choose interactively thresholds, type of links (between or within groups), display information about MS/MS features, permanently select MS/MS features and export selected precursors. The Spectra object stores annotation information about the MS/MS features. Names of features within the similarityMatrix have to be found as entries in Spectra. sps$name are used as identifiers and colnames/rownames from similarityMatrix are cleaved by the group identifier (separated by "_"). Annotation information is taken from spectra from the columns "names", "information", "classes" and "adduct" in the slot metadata of spectra. After exiting the application, the annotation will be written to the respective columns in the slot metadata. If one or several of these columns is already present in metadata, the column(s) will be used as the source of annotation information.

Value

character, shinyCircos returns a character vector with the permanently selected precursors and an object with the MSpectra object containing the annotation.

Author(s)

Thomas Naake, thomasnaake@googlemail.com

Examples

data("spectra", package = "MetCirc")
similarityMat <- Spectra::compareSpectra(sps_tissue[1:10],
    FUN = MsCoreUtils::ndotproduct, ppm = 10, m = 0.5, n = 2)
rownames(similarityMat) <- colnames(similarityMat) <- sps_tissue$name[1:10]
## Not run: 
shinyCircos(similarityMatrix = similarityMat,
    sps = sps_tissue, condition = c("SPL", "LIM", "ANT", "STY"))

## End(Not run)


tnaake/MetCirc documentation built on Nov. 3, 2024, 11:16 a.m.