Description Usage Arguments Details Value Author(s) Examples
View source: R/plottingFunctions.R
Circular plot to visualise similarity.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
groupname |
'character' vector containing "group" and "name" to display, that is a unique identifier of the features, "group" and "name" have to be separated by '"_"' where "group" is the first and "name" is the last element |
linkDf |
'data.frame' containing linked features in each row, has five columns (group1, spectrum1, group2, spectrum2, similarity) |
initialize |
'logical', should plot be initialized? |
featureNames |
'logical', should feature names be displayed? |
cexFeatureNames |
'numeric' size of feature names |
groupSector |
'logical', should groups be displayed with background colours? |
groupName |
'logical', should group names (e.g. compartment names or individual names) be displayed? |
links |
'logical', should links be plotted? |
highlight |
'logical', highlight is set to 'TRUE' |
colour |
'NULL' or 'character', colour defines the colours which are used for plotting, if 'NULL' default colours are used |
transparency |
'numeric', defines the transparency of the colours |
Internal use for 'shinyCircos' or used outside of 'shinyCircos' to reproduce figure
The function will initialize a circlize plot and/or will plot features of a circlize plot.
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 | data("spectra", package = "MetCirc")
similarityMat <- compare_Spectra(spectra_tissue[1:10],
fun = normalizeddotproduct, binSize = 0.01)
## order similarityMat according to retentionTime
simM <- orderSimilarityMatrix(similarityMat, spectra = spectra_tissue[1:10],
type = "retentionTime")
## create link data.frame
linkDf <- createLinkDf(similarityMatrix = simM, spectra = spectra_tissue,
condition = c("SPL", "LIM", "ANT", "STY"), lower = 0.5, upper = 1)
## cut link data.frame (here: only display links between groups)
linkDf_cut <- cutLinkDf(linkDf, type = "inter")
## set circlize paramters
circos.clear()
circos.par(gap.degree = 0, cell.padding = c(0.0, 0, 0.0, 0),
track.margin = c(0.0, 0))
groupname <- c(as.character(linkDf_cut[, "spectrum1"]),
as.character(linkDf_cut[, "spectrum2"]))
groupname <- unique(groupname)
## actual plotting
plotCircos(groupname, linkDf_cut, initialize = TRUE,
featureNames = TRUE, cexFeatureNames = 0.3, groupSector = TRUE,
groupName = FALSE, links = FALSE, highlight = FALSE, colour = NULL,
transparency = 0.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.