{"id":2497,"date":"2018-11-27T19:51:48","date_gmt":"2018-11-27T19:51:48","guid":{"rendered":"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=2497"},"modified":"2025-06-30T10:10:44","modified_gmt":"2025-06-30T09:10:44","slug":"circos-plots-biocircos","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/circos-plots-biocircos\/","title":{"rendered":"Circos Plots &#8211; BioCircos"},"content":{"rendered":"\n<p>BioCircos<sup class='sup-ref-note' id='note-zotero-ref-p2497-r1-o1'><a class='sup-ref-note' href='#zotero-ref-p2497-r1'>1<\/a><\/sup> creates html pages. For example, without any arguments (from the examples):<\/p>\n\n\n\n<p>Installation of the BioCircos package should be according the the Bioconductor installation of <a href=\"https:\/\/pcool.dyndns.org\/index.php\/packages\/\" data-type=\"page\" data-id=\"22\">packages<\/a>.<\/p>\n\n\n\n<p>The plots created with BioCircos will be rendered to html and diplayed in your browser.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fd0a0a\" class=\"has-inline-color\">BiocManager::install('BioCircos')<\/mark><\/em>\n\n<span style=\"color: #ff0000;\"><em>library(BioCircos)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em># https:\/\/cran.r-project.org\/web\/packages\/BioCircos\/vignettes\/BioCircos.html<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>## have a look at the multitrack example at the end!!!<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>BioCircos()<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_1-1024x930.png\" alt=\"\" class=\"wp-image-2817\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_1-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_1-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_1-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_1.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Using hg19<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">BioCircos(genome = \"hg19\", yChr = FALSE, genomeFillColor = \"Reds\", chrPad = 0, <\/span><\/em><em><span style=\"color: #ff0000;\">displayGenomeBorder = FALSE, genomeTicksDisplay = FALSE, genomeLabelDy = 0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_2-1024x930.png\" alt=\"\" class=\"wp-image-2822\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_2-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_2-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_2-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_2.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Custom:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>myGenome = list(\"A\" = 10560, <\/em><\/span><span style=\"color: #ff0000;\"><em>\"B\" = 8808,<\/em><\/span><span style=\"color: #ff0000;\"><em>\"C\" = 12014, <\/em><\/span><span style=\"color: #ff0000;\"><em>\"D\" = 7664,<\/em><\/span><span style=\"color: #ff0000;\"><em>\"E\" = 9403,<\/em><\/span><span style=\"color: #ff0000;\"><em>\"F\" = 8661)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>BioCircos(genome = myGenome, genomeFillColor = c(\"tomato2\", \"darkblue\"), <\/em><\/span><span style=\"color: #ff0000;\"><em>genomeTicksScale = 4e+3)<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_3-1024x930.png\" alt=\"\" class=\"wp-image-2827\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_3-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_3-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_3-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_3.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Text; the following code will display &#8216;Some text&#8217;:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">tracklist = BioCircosTextTrack('myTextTrack', 'Some text', size = \"2em\", opacity = 0.5, <\/span><\/em><em><span style=\"color: #ff0000;\">x = -0.67, y = -0.5)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">BioCircos(tracklist, genomeFillColor = \"PuOr\", <\/span><\/em><em><span style=\"color: #ff0000;\">chrPad = 0, displayGenomeBorder=FALSE, <\/span><\/em><em><span style=\"color: #ff0000;\">genomeTicksLen=2, genomeTicksTextSize = 0, genomeTicksScale=1e+8, <\/span><\/em><em><span style=\"color: #ff0000;\">genomeLabelTextSize=\"9pt\", genomeLabelDy=0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_4-1024x930.png\" alt=\"\" class=\"wp-image-2832\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_4-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_4-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_4-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_4.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Background; to change the background:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">tracklist = BioCircosBackgroundTrack(\"myBackgroundTrack\", minRadius = 0.5, maxRadius = 0.8, <\/span><\/em><em><span style=\"color: #ff0000;\">borderColors = \"#AAAAAA\", borderSize = 0.6, fillColors = \"#FFBBBB\") <\/span><\/em>\n<em><span style=\"color: #ff0000;\">BioCircos(tracklist, genomeFillColor = \"PuOr\", <\/span><\/em><em><span style=\"color: #ff0000;\">chrPad = 0.05, displayGenomeBorder = FALSE,<\/span><\/em><em><span style=\"color: #ff0000;\">genomeTicksDisplay = FALSE, genomeLabelTextSize = \"9pt\", genomeLabelDy = 0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_5-1024x930.png\" alt=\"\" class=\"wp-image-2837\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_5-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_5-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_5-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_5.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>SNP track:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\"># Chromosomes on which the points should be displayed<\/span><\/em>\n<em><span style=\"color: #ff0000;\">points_chromosomes = c('X', '2', '7', '13', '9')<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Coordinates on which the points should be displayed<\/span><\/em>\n<em><span style=\"color: #ff0000;\">points_coordinates = c(102621, 140253678, 98567307, 28937403,20484611)<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Values associated with each point, used as radial coordinate<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># on a scale going to minRadius for the lowest value to maxRadius for # the highest value<\/span><\/em>\n<em><span style=\"color: #ff0000;\">points_values = 0:4<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">tracklist = BioCircosSNPTrack('mySNPTrack', points_chromosomes, points_coordinates,points_values, colors = c(\"tomato2\", \"darkblue\"), minRadius = 0.5, maxRadius = 0.9)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Background are always placed below other tracks<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracklist = tracklist + BioCircosBackgroundTrack(\"myBackgroundTrack\",<\/span><\/em>\n<em><span style=\"color: #ff0000;\">minRadius = 0.5, maxRadius = 0.9, borderColors = \"#AAAAAA\", <\/span><\/em>\n<em><span style=\"color: #ff0000;\">borderSize = 0.6, fillColors = \"#B3E6FF\")<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">BioCircos(tracklist, genomeFillColor = \"PuOr\", <\/span><\/em><em><span style=\"color: #ff0000;\">chrPad = 0.05, displayGenomeBorder = FALSE, yChr = FALSE, <\/span><\/em><em><span style=\"color: #ff0000;\">genomeTicksDisplay = FALSE, genomeLabelTextSize = 18, genomeLabelDy = 0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_6-1024x930.png\" alt=\"\" class=\"wp-image-2842\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_6-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_6-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_6-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_6.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Arc track:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80101\" class=\"has-inline-color\"># Chromosomes on which the arcs should be displayed\narcs_chromosomes = c('X', 'X', '2', '9') \narcs_begin = c(1, 45270560, 140253678, 20484611)\narcs_end = c(155270560, 145270560, 154978472, 42512974)\n\ntracklist = BioCircosArcTrack('myArcTrack', arcs_chromosomes, arcs_begin, arcs_end, minRadius = 1.18, maxRadius = 1.25, opacities = c(0.4, 0.4, 1, 0.8))<\/mark><\/em>\n<span style=\"color: #ff0000;\"><em>BioCircos(tracklist, genomeFillColor = \"PuOr\", <\/em><\/span><span style=\"color: #ff0000;\"><em>chrPad = 0.02, displayGenomeBorder = FALSE, yChr = FALSE, <\/em><\/span><span style=\"color: #ff0000;\"><em>genomeTicksDisplay = FALSE, genomeLabelTextSize = 0)<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_7-1024x930.png\" alt=\"\" class=\"wp-image-2847\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_7-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_7-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_7-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_7.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span style=\"color: #000000;\">Link track<\/span>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em># Chromosomes on which the links should start<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>links_chromosomes_1 = c('X', '2', '9') <\/em><\/span>\n<span style=\"color: #ff0000;\"><em># Chromosomes on which the links should end<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>links_chromosomes_2 = c('3', '18', '9') <\/em><\/span>\n\n<span style=\"color: #ff0000;\"><em>links_pos_1 = c(155270560, 154978472, 42512974)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>links_pos_2 = c(102621477, 140253678, 20484611)<\/em><\/span>\n<span style=\"color: #ff0000;\"><em>links_labels = c(\"Link 1\", \"Link 2\", \"Link 3\")<\/em><\/span>\n\n<span style=\"color: #ff0000;\"><em>tracklist = BioCircosBackgroundTrack(\"myBackgroundTrack\", minRadius = 0, maxRadius = 0.55, borderSize = 0, fillColors = \"#EEFFEE\") <\/em><\/span>\n\n<span style=\"color: #ff0000;\"><em>tracklist = tracklist + BioCircosLinkTrack('myLinkTrack', links_chromosomes_1, links_pos_1, links_pos_1 + 50000000, links_chromosomes_2, links_pos_2, links_pos_2 + 750000, <\/em><\/span>\n<span style=\"color: #ff0000;\"><em>maxRadius = 0.55, labels = links_labels)<\/em><\/span>\n\n<span style=\"color: #ff0000;\"><em>BioCircos(tracklist, genomeFillColor = \"PuOr\", <\/em><\/span><span style=\"color: #ff0000;\"><em>chrPad = 0.02, displayGenomeBorder = FALSE, yChr = FALSE, <\/em><\/span><span style=\"color: #ff0000;\"><em>genomeTicksDisplay = FALSE, genomeLabelTextSize = \"8pt\", genomeLabelDy = 0)<\/em><\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_8-1024x930.png\" alt=\"\" class=\"wp-image-2852\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_8-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_8-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_8-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_8.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span style=\"color: #000000;\">Bar track<\/span>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">library(RColorBrewer)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">library(grDevices)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Define a custom genome<\/span><\/em>\n<em><span style=\"color: #ff0000;\">genomeChr = LETTERS<\/span><\/em>\n<em><span style=\"color: #ff0000;\">lengthChr = 5*1:length(genomeChr)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">names(lengthChr) &lt;- genomeChr<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">tracks = BioCircosTracklist()<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Add one track for each chromosome<\/span><\/em>\n<em><span style=\"color: #ff0000;\">for (i in 1:length(genomeChr)){<\/span><\/em>\n  <em><span style=\"color: #ff0000;\"># Define histogram\/bars to be displayed<\/span><\/em>\n  <em><span style=\"color: #ff0000;\">nbBars = lengthChr&#091;i] - 1<\/span><\/em>\n  <em><span style=\"color: #ff0000;\">barValues = sapply(1:nbBars, function(x) 10 + nbBars%%x)<\/span><\/em>\n  <em><span style=\"color: #ff0000;\">barColor = colorRampPalette(brewer.pal(8, \"YlOrBr\"))(length(genomeChr))&#091;i]<\/span><\/em>\n  <em><span style=\"color: #ff0000;\"># Add a track with bars on the i-th chromosome<\/span><\/em>\n  <em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosBarTrack(paste0(\"bars\", i), chromosome = genomeChr&#091;i], starts = (1:nbBars) - 1, ends = 1:nbBars, values = barValues, color = barColor, range = c(5,75))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">}<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Add background<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosBackgroundTrack(\"bars_background\", <\/span><\/em>\n<em><span style=\"color: #ff0000;\">colors = \"#2222EE\")<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">BioCircos(tracks, genomeFillColor = \"YlOrBr\", genome = as.list(lengthChr), <\/span><\/em><em><span style=\"color: #ff0000;\">genomeTicksDisplay = F, genomeLabelDy = 0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_9-1024x930.png\" alt=\"\" class=\"wp-image-2857\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_9-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_9-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_9-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_9.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span style=\"color: #000000;\">CNV tracks<\/span>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\"># Arcs coordinates<\/span><\/em>\n<em><span style=\"color: #ff0000;\">snvChr = rep(4:9, 3)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">snvStart = c(rep(1,6), rep(40000000,6), rep(100000000,6))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">snvEnd = c(rep(39999999,6), rep(99999999,6), 191154276, 180915260, 171115067, 159138663, 146364022, 141213431)<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Values associated with each point, used as radial coordinate <\/span><\/em>\n<em><span style=\"color: #ff0000;\"># on a scale going to minRadius for the lowest value to maxRadius for # the highest value<\/span><\/em>\n<em><span style=\"color: #ff0000;\">snvValues = (1:18%%5)+1<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Create CNV track<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = BioCircosCNVTrack('cnv_track', as.character(snvChr), snvStart, snvEnd, snvValues, color = \"#CC0000\", range = c(0,6))<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Add background<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosBackgroundTrack(\"arcs_background\", <\/span><\/em>\n<em><span style=\"color: #ff0000;\">colors = \"#2222EE\")<\/span><\/em>\n<em><span style=\"color: #ff0000;\">BioCircos(tracks, genomeFillColor = \"YlOrBr\", genomeTicksDisplay = F, genomeLabelDy = 0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_10-1024x930.png\" alt=\"\" class=\"wp-image-2862\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_10-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_10-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_10-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_10.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Heatmap tracks:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\"># Define a custom genome<\/span><\/em>\n<em><span style=\"color: #ff0000;\">genomeChr = LETTERS&#091;1:10]<\/span><\/em>\n<em><span style=\"color: #ff0000;\">lengthChr = 5*1:length(genomeChr)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">names(lengthChr) &lt;- genomeChr<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Define boxes positions<\/span><\/em>\n<em><span style=\"color: #ff0000;\">boxPositions = unlist(sapply(lengthChr, seq))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">boxChromosomes = rep(genomeChr, lengthChr)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Define values for two heatmap tracks<\/span><\/em>\n<em><span style=\"color: #ff0000;\">boxVal1 = boxPositions %% 13 \/ 13<\/span><\/em>\n<em><span style=\"color: #ff0000;\">boxVal2 = (7 + boxPositions) %% 17 \/ 17<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">tracks = BioCircosHeatmapTrack(\"heatmap1\", boxChromosomes, boxPositions - 1, boxPositions, boxVal1, minRadius = 0.6, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">maxRadius = 0.75)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosHeatmapTrack(\"heatmap1\", boxChromosomes, boxPositions - 1, boxPositions, boxVal2, minRadius = 0.75, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">maxRadius = 0.9, color = c(\"#FFAAAA\", \"#000000\"))<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">BioCircos(tracks, genome = as.list(lengthChr), genomeTicksDisplay = F, genomeLabelDy = 0, <\/span><\/em><em><span style=\"color: #ff0000;\">HEATMAPMouseOverColor = \"#F3C73A\")<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_11-1024x930.png\" alt=\"\" class=\"wp-image-2867\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_11-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_11-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_11-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_11.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Line tracks:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">chrVert = rep(c(1, 3, 5), c(20,10,5))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">posVert = c(249250621*log(c(20:1, 10:1, 5:1), base = 20))<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">tracks = BioCircosLineTrack('LineTrack', as.character(chrVert), posVert, values = cos(posVert))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosLineTrack('LineTrack2', as.character(chrVert+1), 0.95*posVert, values = sin(posVert), <\/span><\/em>\n<em><span style=\"color: #ff0000;\">color = \"#40D4B9\")<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosBackgroundTrack('Bg', <\/span><\/em>\n<em><span style=\"color: #ff0000;\">fillColors = '#FFEEBB', borderSize = 0)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\">BioCircos(tracks, chrPad = 0.05, displayGenomeBorder = FALSE, LINEMouseOutDisplay = FALSE, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">LINEMouseOverTooltipsHtml01 = \"Pretty lines&lt;br\/>COOL!\")<\/span><\/em>\n<\/code><\/pre>\n\n\n\n<p class=\"is-style-text-annotation is-style-text-annotation--1\">When you hover with the mouse over the track, it will display: &#8216;Pretty lines COOL!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_12-1024x930.png\" alt=\"\" class=\"wp-image-2872\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_12-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_12-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_12-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_12.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span style=\"color: #000000;\">Multi-track example<\/span>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\"># Fix random generation for reproducibility<\/span><\/em>\n<em><span style=\"color: #ff0000;\">set.seed(3)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># SNP tracks<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = BioCircosSNPTrack(\"testSNP1\", as.character(rep(1:10,10)), round(runif(100, 1, 135534747)), runif(100, 0, 10), <\/span><\/em>\n<em><span style=\"color: #ff0000;\">colors = \"Spectral\", minRadius = 0.3, maxRadius = 0.45)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosSNPTrack(\"testSNP2\", <\/span><\/em>\n  <em><span style=\"color: #ff0000;\">as.character(rep(1:15,5)), round(runif(75, 1, 102531392)), <\/span><\/em>\n<em><span style=\"color: #ff0000;\">runif(75, 2, 12), colors = c(\"#FF0000\", \"#DD1111\", \"#BB2222\", \"#993333\"), maxRadius = 0.8, range = c(2,12))<\/span><\/em>\n<em><span style=\"color: #ff0000;\"># Overlap point of interest on previous track, fix range to use a <\/span><\/em>\n<em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f40101\" class=\"has-inline-color\">#<\/mark><\/em> <em><span style=\"color: #ff0000;\">similar scale<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosSNPTrack(\"testSNP3\", \"7\", 1, 9, <\/span><\/em>\n  <em><span style=\"color: #ff0000;\">maxRadius = 0.8, size = 6, range = c(2,12))<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Background and text tracks<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosBackgroundTrack(\"testBGtrack1\", minRadius = 0.3, maxRadius = 0.45, borderColors = \"#FFFFFF\", borderSize = 0.6) <\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosBackgroundTrack(\"testBGtrack2\", borderColors = \"#FFFFFF\", fillColor = \"#FFEEEE\", borderSize = 0.6, maxRadius = 0.8)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosTextTrack(\"testText\", 'BioCircos!', <\/span><\/em>\n<em><span style=\"color: #ff0000;\">weight = \"lighter\", x = - 0.17, y = - 0.87)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Arc track<\/span><\/em>\n<em><span style=\"color: #ff0000;\">arcsEnds = round(runif(7, 50000001, 133851895))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">arcsLengths = round(runif(7, 1, 50000000))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosArcTrack(\"fredTestArc\", as.character(sample(1:12, 7, replace=T)),  starts = arcsEnds - arcsLengths, ends = arcsEnds, labels = 1:7, maxRadius = 0.97, minRadius = 0.83)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Link tracks<\/span><\/em>\n<em><span style=\"color: #ff0000;\">linkPos1 = round(runif(5, 1, 50000000))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">linkPos2 = round(runif(5, 1, 50000000))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">chr1 = sample(1:22, 5, replace = T)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">chr2 = sample(1:22, 5, replace = T)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">linkPos3 = round(runif(5, 1, 50000000))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">linkPos4 = round(runif(5, 1, 50000000))<\/span><\/em>\n<em><span style=\"color: #ff0000;\">chr3 = sample(1:22, 5, replace = T)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">chr4 = sample(1:22, 5, replace = T)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosLinkTrack(\"testLink\", gene1Chromosomes = chr1, gene1Starts = linkPos1, gene1Ends = linkPos1+1, gene2Chromosomes = chr2, axisPadding = 6, color = \"#EEEE55\", width = \"0.3em\", <\/span><\/em>\n<em><span style=\"color: #ff0000;\">labels = paste(chr1, chr2, sep = \"*\"), displayLabel = F, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">gene2Starts = linkPos2, gene2Ends = linkPos2+1, maxRadius = 0.42)<\/span><\/em>\n<em><span style=\"color: #ff0000;\">tracks = tracks + BioCircosLinkTrack(\"testLink2\", <\/span><\/em>\n<em><span style=\"color: #ff0000;\">gene1Chromosomes = chr3, gene1Starts = linkPos3, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">gene1Ends = linkPos3+5000000, axisPadding = 6, displayLabel = F,<\/span><\/em>\n<em><span style=\"color: #ff0000;\">color = \"#FF6666\", labels = paste(chr3, chr4, sep = \"-\"), gene2Chromosomes = chr4, gene2Starts = linkPos4, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">gene2Ends = linkPos4+2500000, maxRadius = 0.42)<\/span><\/em>\n\n<em><span style=\"color: #ff0000;\"># Display the BioCircos visualization<\/span><\/em>\n<em><span style=\"color: #ff0000;\">BioCircos(tracks, genomeFillColor = \"Spectral\", yChr = T, chrPad = 0, displayGenomeBorder = F, genomeTicksLen = 3, genomeTicksTextSize = 0, genomeTicksScale = 50000000, genomeLabelTextSize = 18, <\/span><\/em>\n<em><span style=\"color: #ff0000;\">genomeLabelDy = 0)<\/span><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"930\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_13-1024x930.png\" alt=\"\" class=\"wp-image-2877\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_13-1024x930.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_13-300x272.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_13-768x698.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/biocircos_13.png 1156w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>BioCircos creates html pages. For example, without any arguments (from the examples): Installation of the BioCircos package should be according the the Bioconductor installation of packages. The plots created with BioCircos will be rendered to html and diplayed in your browser. Using hg19 Custom: Text; the following code will display &#8216;Some text&#8217;: Background; to change [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-2497","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/2497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=2497"}],"version-history":[{"count":2,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/2497\/revisions"}],"predecessor-version":[{"id":4589,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/2497\/revisions\/4589"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=2497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}