replayPlotAdd {MetCirc} | R Documentation |
'replayPlotAdd' plots additional plots on a plot, either plots 'plotCircos' or 'highlight'.
replayPlotAdd( orderMatch = "mz", onCircle = FALSE, linkDf, mz_match, rt_match, clust_match, ind, indMz, indRT, indCluster )
orderMatch |
orderMatch 'character', either '"mz"', '"retentionTime"' or '"clustering"' |
onCircle |
'logical', are coordinates on circle. If FALSE and no features are selected ('length(ind) == 0'), then filled plots are replayed, otherwise highlighted plots are replayed. |
linkDf |
'data.frame' that contains information of linked features for given thresholds |
mz_match |
'character', ordered vector according to m/z |
rt_match |
'character', ordered vector according to retention time |
clust_match |
'character', ordered vector according to clustering |
ind |
'numeric', indices of clicked features |
indMz |
'numeric', indices of clicked features for '"mz"' ordering |
indRT |
'numeric', indices of clicked features for '"retentionTime"' ordering |
indCluster |
'numeric', indices of clicked features for '"clustering"' ordering |
Helper function for 'shinyCircos'.
Depending on 'onCircle' and 'indMz' either returns 'plotCircos' or 'highlight'
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 mz_match <- MetCirc:::typeMatch_link0(similarityMatrix = similarityMat, spectra = spectra_tissue, type = "mz", condition = c("SPL", "LIM", "ANT", "STY")) linkDf <- mz_match[["link0df"]] mz_match <- mz_match[["type_match"]] rt_match <- MetCirc:::typeMatch_link0(similarityMatrix = similarityMat, spectra = spectra_tissue, type = "retentionTime", condition = c("SPL", "LIM", "ANT", "STY")) rt_match <- rt_match[["type_match"]] clust_match <- MetCirc:::typeMatch_link0(similarityMatrix = similarityMat, spectra = spectra_tissue, type = "clustering", condition = c("SPL", "LIM", "ANT", "STY")) clust_match <- clust_match[["type_match"]] circos.initialize(mz_match,##, levels = mz_match), xlim = matrix(rep(c(0,1), length(mz_match)), ncol = 2, byrow = TRUE)) #circos.trackPlotRegion(factor(mz_match, levels = mz_match), ylim = c(0,1)) MetCirc:::replayPlotAdd(orderMatch = "mz", onCircle = FALSE, linkDf = linkDf, mz_match = mz_match, rt_match = rt_match, clust_match = clust_match, ind = 1, indMz = NULL, indRT = NULL, indCluster = NULL)