<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Circos with circosJS]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/41326/circos-with-circosjs?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/41326/circos-with-circosjs?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/41326/circos-with-circosjs</guid>
	<pubDate>Mon, 02 Mar 2020 23:29:38 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/41326/circos-with-circosjs</link>
	<title><![CDATA[Circos with circosJS]]></title>
	<description><![CDATA[<code>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/d3/4.11.0/d3.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&#039;https://cdn.rawgit.com/nicgirault/circosJS/v2/dist/circos.js&#039;&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;script&gt;
    let width = $(window).width() - 20,
        height = $(window).height() - 20

    let svg = d3.select(&quot;body&quot;)
        .append(&quot;svg&quot;)
        .attr(&#039;id&#039;, &#039;chart&#039;)
        .attr(&quot;width&quot;, width)
        .attr(&quot;height&quot;, height)

    let instance = new Circos({
        container: &#039;#chart&#039;,
        width: width,
        height: height,
    })

    let layout_data = [
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#8dd3c7&quot;, &quot;label&quot;: &quot;January&quot;, &quot;id&quot;: &quot;january&quot;},
        {&quot;len&quot;: 28, &quot;color&quot;: &quot;#ffffb3&quot;, &quot;label&quot;: &quot;February&quot;, &quot;id&quot;: &quot;february&quot;},
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#bebada&quot;, &quot;label&quot;: &quot;March&quot;, &quot;id&quot;: &quot;march&quot;},
        {&quot;len&quot;: 30, &quot;color&quot;: &quot;#fb8072&quot;, &quot;label&quot;: &quot;April&quot;, &quot;id&quot;: &quot;april&quot;},
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#80b1d3&quot;, &quot;label&quot;: &quot;May&quot;, &quot;id&quot;: &quot;may&quot;},
        {&quot;len&quot;: 30, &quot;color&quot;: &quot;#fdb462&quot;, &quot;label&quot;: &quot;June&quot;, &quot;id&quot;: &quot;june&quot;},
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#b3de69&quot;, &quot;label&quot;: &quot;July&quot;, &quot;id&quot;: &quot;july&quot;},
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#fccde5&quot;, &quot;label&quot;: &quot;August&quot;, &quot;id&quot;: &quot;august&quot;},
        {&quot;len&quot;: 30, &quot;color&quot;: &quot;#d9d9d9&quot;, &quot;label&quot;: &quot;September&quot;, &quot;id&quot;: &quot;september&quot;},
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#bc80bd&quot;, &quot;label&quot;: &quot;October&quot;, &quot;id&quot;: &quot;october&quot;},
        {&quot;len&quot;: 30, &quot;color&quot;: &quot;#ccebc5&quot;, &quot;label&quot;: &quot;November&quot;, &quot;id&quot;: &quot;november&quot;},
        {&quot;len&quot;: 31, &quot;color&quot;: &quot;#ffed6f&quot;, &quot;label&quot;: &quot;December&quot;, &quot;id&quot;: &quot;december&quot;},
  	];


    let layout_data2 = [
	{ source: { id: &#039;january&#039;, start: 1, end: 12 }, target: { id: &#039;april&#039;, start: 18, end: 20 }},
  	{ source: { id: &#039;february&#039;, start: 20, end: 28}, target: { id: &#039;december&#039;, start: 1, end: 13}}
   	];  

    let configuration = {
        innerRadius: 250,
        outerRadius: 300,
        cornerRadius: 10,
        gap: 0.04, // in radian
        labels: {
            display: true,
            position: &#039;center&#039;,
            size: &#039;14px&#039;,
            color: &#039;#000000&#039;,
            radialOffset: 20,
        },
        ticks: {
            display: true,
            color: &#039;grey&#039;,
            spacing: 10000000,
            labels: true,
            labelSpacing: 10,
            labelSuffix: &#039;Mb&#039;,
            labelDenominator: 1000000,
            labelDisplay0: true,
            labelSize: &#039;10px&#039;,
            labelColor: &#039;#000000&#039;,
            labelFont: &#039;default&#039;,
            majorSpacing: 5,
            size: {
                minor: 2,
                major: 5,
            }
        },
        clickCallback: null
    }

    instance.layout(layout_data, configuration)

    instance.render()

&lt;/script&gt;
&lt;/body&gt;


&lt;/html&gt;</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>

</channel>
</rss>