Whole-genome CNV segments and variant density
Genome graphs represent a revolutionary advancement in genomics, moving beyond linear reference genomes to encompass the vast diversity of genomic variation within populations. These complex data structures integrate multiple genome sequences, enabling more accurate and comprehensive analysis of genetic information. Applications range from improving disease diagnostics to facilitating more effective personalized medicine, as genome graphs provide a richer context for understanding individual genetic differences and their implications for health. This technology offers significant potential for advancing biological and medical research.
<html>
<head>
<!-- Include the CanvasXpress library in your HTML file -->
<link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
<script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
</head>
<body>
<!-- Create a canvas element for the chart with the desired dimensions -->
<div>
<canvas id="canvasId" width="600" height="600"></canvas>
</div>
<!-- Create a script to initialize the chart -->
<script>
// Create the data for the graph
var data = {
"tracks" : [
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "1",
"data" : [
{
"id" : "cnv1",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
49791284.400000006
],
[
49791284.400000006,
112030389.9
],
[
112030389.9,
174269495.39999998
],
[
174269495.39999998,
248956422
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "1",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d1",
"data" : [
43,
50,
46,
32,
11,
21,
39,
49,
48,
37,
18,
15,
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "2",
"data" : [
{
"id" : "cnv2",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
48438705.800000004
],
[
48438705.800000004,
108987088.05
],
[
108987088.05,
169535470.29999998
],
[
169535470.29999998,
242193529
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "2",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d2",
"data" : [
46,
32,
11,
21,
39,
49,
48,
37,
18,
15,
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "3",
"data" : [
{
"id" : "cnv3",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
39659111.800000004
],
[
39659111.800000004,
89233001.55
],
[
89233001.55,
138806891.29999998
],
[
138806891.29999998,
198295559
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "3",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d3",
"data" : [
11,
21,
39,
49,
48,
37,
18,
15,
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "4",
"data" : [
{
"id" : "cnv4",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
38042911.0
],
[
38042911.0,
85596549.75
],
[
85596549.75,
133150188.49999999
],
[
133150188.49999999,
190214555
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "4",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d4",
"data" : [
39,
49,
48,
37,
18,
15,
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "5",
"data" : [
{
"id" : "cnv5",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
36307651.800000004
],
[
36307651.800000004,
81692216.55
],
[
81692216.55,
127076781.3
],
[
127076781.3,
181538259
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "5",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d5",
"data" : [
48,
37,
18,
15,
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "6",
"data" : [
{
"id" : "cnv6",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
34161195.800000004
],
[
34161195.800000004,
76862690.55
],
[
76862690.55,
119564185.3
],
[
119564185.3,
170805979
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "6",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d6",
"data" : [
18,
15,
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "7",
"data" : [
{
"id" : "cnv7",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
31869194.6
],
[
31869194.6,
71705687.85000001
],
[
71705687.85000001,
111542181.1
],
[
111542181.1,
159345973
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "7",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d7",
"data" : [
35,
47,
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21,
39,
49
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "8",
"data" : [
{
"id" : "cnv8",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
29027727.200000003
],
[
29027727.200000003,
65312386.2
],
[
65312386.2,
101597045.19999999
],
[
101597045.19999999,
145138636
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "8",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d8",
"data" : [
50,
41,
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21,
39,
49,
48,
36
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "9",
"data" : [
{
"id" : "cnv9",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
27678943.400000002
],
[
27678943.400000002,
62277622.65
],
[
62277622.65,
96876301.89999999
],
[
96876301.89999999,
138394717
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "9",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d9",
"data" : [
24,
8,
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21,
39,
49,
48,
36,
17,
15
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "10",
"data" : [
{
"id" : "cnv10",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
26759484.400000002
],
[
26759484.400000002,
60208839.9
],
[
60208839.9,
93658195.39999999
],
[
93658195.39999999,
133797422
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "10",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d10",
"data" : [
29,
45,
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21,
39,
49,
48,
36,
17,
15,
35,
47
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "11",
"data" : [
{
"id" : "cnv11",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
27017324.400000002
],
[
27017324.400000002,
60788979.9
],
[
60788979.9,
94560635.39999999
],
[
94560635.39999999,
135086622
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "11",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d11",
"data" : [
50,
44,
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21,
39,
49,
48,
36,
17,
15,
35,
47,
49,
41
]
}
]
},
{
"name" : "CNV",
"type" : "box",
"height" : 10,
"chr" : "12",
"data" : [
{
"id" : "cnv12",
"spectrum" : [
"#2c7bb6",
"#ffffbf",
"#d7191c"
],
"colorBy" : [
2.0,
3.4,
1.1,
2.0
],
"data" : [
[
0,
26655061.8
],
[
26655061.8,
59973889.050000004
],
[
59973889.050000004,
93292716.3
],
[
93292716.3,
133275309
]
]
}
]
},
{
"name" : "Density",
"type" : "bar",
"height" : 20,
"chr" : "12",
"fill" : "rgb(214,39,40)",
"data" : [
{
"id" : "d12",
"data" : [
29,
8,
24,
41,
50,
47,
34,
14,
18,
37,
48,
49,
39,
20,
12,
32,
46,
50,
43,
26,
5,
27,
43,
50,
46,
32,
11,
21,
39,
49,
48,
36,
17,
15,
35,
47,
49,
41,
23,
9
]
}
]
}
]
}
// Create the configuration for the graph
var config = {
"graphType" : "Genome",
"ideogramShowFullChromosome" : true,
"showIdeogram" : true,
"ideogramChromosomeNumber" : "all",
"ideogramLayoutColumns" : 3,
"background" : "rgb(245,245,245)"
}
// Event used to create graph (optional)
var events = false
// Call the CanvasXpress function to create the graph
var cX = new CanvasXpress("canvasId", data, config, events);
</script>
</body>
</html>
library(canvasXpress)
library(jsonlite)
genome <- read_json("https://www.canvasxpress.org/data/r/cX-genome13.json")
canvasXpress(
data=genome,
background="rgb(245,245,245)",
graphType="Genome",
ideogramChromosomeNumber="all",
ideogramLayoutColumns=3,
ideogramShowFullChromosome=TRUE,
showIdeogram=TRUE
)
from canvasxpress.canvas import CanvasXpress
from canvasxpress.plot import show_in_browser
if __name__ == "__main__":
# Define the chart with its data and configuration
chart: CanvasXpress = CanvasXpress(
render_to = "genome13",
data = {
"tracks": [
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "1",
"data": [
{
"id": "cnv1",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 49791284.400000006],
[49791284.400000006, 112030389.9],
[112030389.9, 174269495.39999998],
[174269495.39999998, 248956422]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "1",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d1",
"data": [43, 50, 46, 32, 11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "2",
"data": [
{
"id": "cnv2",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 48438705.800000004],
[48438705.800000004, 108987088.05],
[108987088.05, 169535470.29999998],
[169535470.29999998, 242193529]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "2",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d2",
"data": [46, 32, 11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "3",
"data": [
{
"id": "cnv3",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 39659111.800000004],
[39659111.800000004, 89233001.55],
[89233001.55, 138806891.29999998],
[138806891.29999998, 198295559]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "3",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d3",
"data": [11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "4",
"data": [
{
"id": "cnv4",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 38042911.0],
[38042911.0, 85596549.75],
[85596549.75, 133150188.49999999],
[133150188.49999999, 190214555]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "4",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d4",
"data": [39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "5",
"data": [
{
"id": "cnv5",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 36307651.800000004],
[36307651.800000004, 81692216.55],
[81692216.55, 127076781.3],
[127076781.3, 181538259]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "5",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d5",
"data": [48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "6",
"data": [
{
"id": "cnv6",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 34161195.800000004],
[34161195.800000004, 76862690.55],
[76862690.55, 119564185.3],
[119564185.3, 170805979]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "6",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d6",
"data": [18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "7",
"data": [
{
"id": "cnv7",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 31869194.6],
[31869194.6, 71705687.85000001],
[71705687.85000001, 111542181.1],
[111542181.1, 159345973]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "7",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d7",
"data": [35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "8",
"data": [
{
"id": "cnv8",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 29027727.200000003],
[29027727.200000003, 65312386.2],
[65312386.2, 101597045.19999999],
[101597045.19999999, 145138636]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "8",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d8",
"data": [50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "9",
"data": [
{
"id": "cnv9",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 27678943.400000002],
[27678943.400000002, 62277622.65],
[62277622.65, 96876301.89999999],
[96876301.89999999, 138394717]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "9",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d9",
"data": [24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "10",
"data": [
{
"id": "cnv10",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 26759484.400000002],
[26759484.400000002, 60208839.9],
[60208839.9, 93658195.39999999],
[93658195.39999999, 133797422]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "10",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d10",
"data": [29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "11",
"data": [
{
"id": "cnv11",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 27017324.400000002],
[27017324.400000002, 60788979.9],
[60788979.9, 94560635.39999999],
[94560635.39999999, 135086622]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "11",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d11",
"data": [50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47, 49, 41]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "12",
"data": [
{
"id": "cnv12",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 26655061.8],
[26655061.8, 59973889.050000004],
[59973889.050000004, 93292716.3],
[93292716.3, 133275309]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "12",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d12",
"data": [29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47, 49, 41, 23, 9]
}
]
}
]
},
config = {
"graphType": "Genome",
"ideogramShowFullChromosome": True,
"showIdeogram": True,
"ideogramChromosomeNumber": "all",
"ideogramLayoutColumns": 3,
"background": "rgb(245,245,245)"
},
width = 820,
height = 600
)
# Display the chart in its own Web page
show_in_browser(chart)
from canvasxpress.canvas import CanvasXpress
from canvasxpress.plot import graph
graph(
CanvasXpress(
render_to = "genome13",
data = {
"tracks": [
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "1",
"data": [
{
"id": "cnv1",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 49791284.400000006],
[49791284.400000006, 112030389.9],
[112030389.9, 174269495.39999998],
[174269495.39999998, 248956422]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "1",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d1",
"data": [43, 50, 46, 32, 11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "2",
"data": [
{
"id": "cnv2",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 48438705.800000004],
[48438705.800000004, 108987088.05],
[108987088.05, 169535470.29999998],
[169535470.29999998, 242193529]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "2",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d2",
"data": [46, 32, 11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "3",
"data": [
{
"id": "cnv3",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 39659111.800000004],
[39659111.800000004, 89233001.55],
[89233001.55, 138806891.29999998],
[138806891.29999998, 198295559]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "3",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d3",
"data": [11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "4",
"data": [
{
"id": "cnv4",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 38042911.0],
[38042911.0, 85596549.75],
[85596549.75, 133150188.49999999],
[133150188.49999999, 190214555]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "4",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d4",
"data": [39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "5",
"data": [
{
"id": "cnv5",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 36307651.800000004],
[36307651.800000004, 81692216.55],
[81692216.55, 127076781.3],
[127076781.3, 181538259]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "5",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d5",
"data": [48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "6",
"data": [
{
"id": "cnv6",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 34161195.800000004],
[34161195.800000004, 76862690.55],
[76862690.55, 119564185.3],
[119564185.3, 170805979]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "6",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d6",
"data": [18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "7",
"data": [
{
"id": "cnv7",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 31869194.6],
[31869194.6, 71705687.85000001],
[71705687.85000001, 111542181.1],
[111542181.1, 159345973]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "7",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d7",
"data": [35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "8",
"data": [
{
"id": "cnv8",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 29027727.200000003],
[29027727.200000003, 65312386.2],
[65312386.2, 101597045.19999999],
[101597045.19999999, 145138636]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "8",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d8",
"data": [50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "9",
"data": [
{
"id": "cnv9",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 27678943.400000002],
[27678943.400000002, 62277622.65],
[62277622.65, 96876301.89999999],
[96876301.89999999, 138394717]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "9",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d9",
"data": [24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "10",
"data": [
{
"id": "cnv10",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 26759484.400000002],
[26759484.400000002, 60208839.9],
[60208839.9, 93658195.39999999],
[93658195.39999999, 133797422]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "10",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d10",
"data": [29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "11",
"data": [
{
"id": "cnv11",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 27017324.400000002],
[27017324.400000002, 60788979.9],
[60788979.9, 94560635.39999999],
[94560635.39999999, 135086622]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "11",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d11",
"data": [50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47, 49, 41]
}
]
},
{
"name": "CNV",
"type": "box",
"height": 10,
"chr": "12",
"data": [
{
"id": "cnv12",
"spectrum": ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy": [2.0, 3.4, 1.1, 2.0],
"data": [
[0, 26655061.8],
[26655061.8, 59973889.050000004],
[59973889.050000004, 93292716.3],
[93292716.3, 133275309]
]
}
]
},
{
"name": "Density",
"type": "bar",
"height": 20,
"chr": "12",
"fill": "rgb(214,39,40)",
"data": [
{
"id": "d12",
"data": [29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47, 49, 41, 23, 9]
}
]
}
]
},
config = {
"graphType": "Genome",
"ideogramShowFullChromosome": True,
"showIdeogram": True,
"ideogramChromosomeNumber": "all",
"ideogramLayoutColumns": 3,
"background": "rgb(245,245,245)"
},
width = 820,
height = 600
)
)
using CanvasXpress
canvasxpress(Dict(
"tracks" => [
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "1",
"data" => [
Dict(
"id" => "cnv1",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 49791284.400000006],
[49791284.400000006, 112030389.9],
[112030389.9, 174269495.39999998],
[174269495.39999998, 248956422]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "1",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d1",
"data" => [43, 50, 46, 32, 11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "2",
"data" => [
Dict(
"id" => "cnv2",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 48438705.800000004],
[48438705.800000004, 108987088.05],
[108987088.05, 169535470.29999998],
[169535470.29999998, 242193529]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "2",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d2",
"data" => [46, 32, 11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "3",
"data" => [
Dict(
"id" => "cnv3",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 39659111.800000004],
[39659111.800000004, 89233001.55],
[89233001.55, 138806891.29999998],
[138806891.29999998, 198295559]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "3",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d3",
"data" => [11, 21, 39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "4",
"data" => [
Dict(
"id" => "cnv4",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 38042911.0],
[38042911.0, 85596549.75],
[85596549.75, 133150188.49999999],
[133150188.49999999, 190214555]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "4",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d4",
"data" => [39, 49, 48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "5",
"data" => [
Dict(
"id" => "cnv5",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 36307651.800000004],
[36307651.800000004, 81692216.55],
[81692216.55, 127076781.3],
[127076781.3, 181538259]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "5",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d5",
"data" => [48, 37, 18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "6",
"data" => [
Dict(
"id" => "cnv6",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 34161195.800000004],
[34161195.800000004, 76862690.55],
[76862690.55, 119564185.3],
[119564185.3, 170805979]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "6",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d6",
"data" => [18, 15, 35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "7",
"data" => [
Dict(
"id" => "cnv7",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 31869194.6],
[31869194.6, 71705687.85000001],
[71705687.85000001, 111542181.1],
[111542181.1, 159345973]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "7",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d7",
"data" => [35, 47, 50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "8",
"data" => [
Dict(
"id" => "cnv8",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 29027727.200000003],
[29027727.200000003, 65312386.2],
[65312386.2, 101597045.19999999],
[101597045.19999999, 145138636]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "8",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d8",
"data" => [50, 41, 24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "9",
"data" => [
Dict(
"id" => "cnv9",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 27678943.400000002],
[27678943.400000002, 62277622.65],
[62277622.65, 96876301.89999999],
[96876301.89999999, 138394717]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "9",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d9",
"data" => [24, 8, 29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "10",
"data" => [
Dict(
"id" => "cnv10",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 26759484.400000002],
[26759484.400000002, 60208839.9],
[60208839.9, 93658195.39999999],
[93658195.39999999, 133797422]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "10",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d10",
"data" => [29, 45, 50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "11",
"data" => [
Dict(
"id" => "cnv11",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 27017324.400000002],
[27017324.400000002, 60788979.9],
[60788979.9, 94560635.39999999],
[94560635.39999999, 135086622]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "11",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d11",
"data" => [50, 44, 29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47, 49, 41]
)
]
),
Dict(
"name" => "CNV",
"type" => "box",
"height" => 10,
"chr" => "12",
"data" => [
Dict(
"id" => "cnv12",
"spectrum" => ["#2c7bb6", "#ffffbf", "#d7191c"],
"colorBy" => [2.0, 3.4, 1.1, 2.0],
"data" => [
[0, 26655061.8],
[26655061.8, 59973889.050000004],
[59973889.050000004, 93292716.3],
[93292716.3, 133275309]
]
)
]
),
Dict(
"name" => "Density",
"type" => "bar",
"height" => 20,
"chr" => "12",
"fill" => "rgb(214,39,40)",
"data" => [
Dict(
"id" => "d12",
"data" => [29, 8, 24, 41, 50, 47, 34, 14, 18, 37, 48, 49, 39, 20, 12, 32, 46, 50, 43, 26, 5, 27, 43, 50, 46, 32, 11, 21, 39, 49, 48, 36, 17, 15, 35, 47, 49, 41, 23, 9]
)
]
)
]
);
graphType = "Genome",
ideogramShowFullChromosome = true,
showIdeogram = true,
ideogramChromosomeNumber = "all",
ideogramLayoutColumns = 3,
background = "rgb(245,245,245)"
)













