Description Usage Arguments Details Value Author(s) Examples
A function to add links and highlight sectors to an initialised
and plotted circlize
plot with one track.
1 |
groupname |
|
ind |
|
LinkMatrix |
|
colour |
|
transparency |
|
links |
|
Internal use for shinyCircos
or outside of shinyCircos
to reproduce the figure.
The function will update an existing plot by highlighting a specified sector and connected links.
Thomas Naake, thomasnaake@googlemail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## load binnedMSP
data("binnedMSP", package = "MetCirc")
## use only a selection
binnedMSP <- binnedMSP[c(1:20, 29:48, 113:132, 240:259),]
similarityMat <- createSimilarityMatrix(binnedMSP)
## order similarityMat according to retentionTime and update rownames
simM <- createOrderedSimMat(similarityMat, order = "retentionTime")
## create link matrix
linkMat <- createLinkMatrix(similarityMatrix = simM,
threshold_low = 0.95, threshold_high = 1)
## cut link matrix (here: only display links between groups)
linkMat_cut <- cutLinkMatrix(linkMat, type = "inter")
## set circlize parameters
circos.par(gap.degree = 0, cell.padding = c(0.0, 0, 0.0, 0),
track.margin = c(0.0, 0))
groupname <- rownames(simM)
## here: set selectedFeatures arbitrarily
indSelected <- c(2,23,42,62)
selectedFeatures <- groupname[indSelected]
## actual plotting
plotCircos(groupname, linkMat_cut, initialize = TRUE,
featureNames = TRUE, cexFeatureNames = 0.2, groupSector = TRUE,
groupName = FALSE, links = FALSE, highlight = TRUE)
## highlight
highlight(groupname = groupname, ind = indSelected, LinkMatrix =
linkMat_cut, colour = NULL, transparency = 0.4, links = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.