GUIDE
- Left-click and drag the background to move the graph
- Left-click and drag the nodes to reorganize
- Left-click a node to view first level connections
- Double left-click a node to navigate to its page
- Double left-click the background to zoom in
- Right-click the background to zoom out
sigma.utils.pkg('sigma.canvas.nodes');
sigma.canvas.nodes.image = (function() {
var _cache = {},
_loading = {},
_callbacks = {};
// Return the renderer itself:
var renderer = function(node, context, settings) {
var args = arguments,
prefix = settings('prefix') || '',
size = node[prefix + 'size'],
color = node.color || settings('defaultNodeColor'),
url = node.url;
if (_cache[url]) {
context.save();
// Draw the clipping disc:
context.beginPath();
context.arc(
node[prefix + 'x'],
node[prefix + 'y'],
node[prefix + 'size'],
0,
Math.PI * 2,
true
);
context.closePath();
context.clip();
// Draw the image
context.drawImage(
_cache[url],
node[prefix + 'x'] - size,
node[prefix + 'y'] - size,
2 * size,
2 * size
);
// Quit the "clipping mode":
context.restore();
// Draw the border:
context.beginPath();
context.arc(
node[prefix + 'x'],
node[prefix + 'y'],
node[prefix + 'size'],
0,
Math.PI * 2,
true
);
context.lineWidth = 1;
context.strokeStyle = node.color || settings('defaultNodeColor');
context.stroke();
} else {
sigma.canvas.nodes.image.cache(url);
sigma.canvas.nodes.def.apply(
sigma.canvas.nodes,
args
);
}
};
// Let's add a public method to cache images, to make it possible to
// preload images before the initial rendering:
renderer.cache = function(url, callback) {
if (callback)
_callbacks[url] = callback;
if (_loading[url])
return;
var img = new Image();
img.onload = function() {
_loading[url] = false;
_cache[url] = img;
if (_callbacks[url]) {
_callbacks[url].call(this, img);
delete _callbacks[url];
}
};
_loading[url] = true;
img.src = url;
};
return renderer;
})();
var i,
s,
o,
offset_left = 0.5,
N = 1,
E = 40,
C = 5,
d = 0.5,
cs = [],
g = {
nodes: [],
edges: []
};
if (!sigma.classes.graph.hasMethod('neighbors')){
sigma.classes.graph.addMethod('neighbors', function(nodeId) {
var k,
neighbors = {},
index = this.allNeighborsIndex[nodeId] || {};
for (k in index)
neighbors[k] = this.nodesIndex[k];
return neighbors;
});
}
//adding the central node
g.nodes.push({
id: 4832,
label: 'Benno Schwikowski',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_photo-3-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=17
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 235562,
label: 'SOFTWARE: OntoWeaver',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/12/research_pasteur-ontoweaver-skg-1500500-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/software/ontoweaver/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832235562,
size: 0.5,
source: 4832,
target: 235562,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 234138,
label: 'Marko Baric',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/11/research_pasteur-enmarko-baricfrmarko-baric-img-02011-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/marko-baric/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 235562234138,
size: 0.5,
source: 235562,
target: 234138 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2355624832,
size: 0.5,
source: 235562,
target: 4832 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 234141,
label: 'Matthieu Najm',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/matthieu-najm/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 235562234141,
size: 0.5,
source: 235562,
target: 234141 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 158063,
label: 'Johann Dreo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/04/research_pasteur-johann-dreo-img-7846-profil-640px-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/johann-dreo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 235562158063,
size: 0.5,
source: 235562,
target: 158063 });
// adding node
var x_node = Math.cos(2 * 1 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 1 * Math.PI / N) * 10;
g.nodes.push({
id: 234403,
label: 'NEWS: Île-de-France Blanc-Lapierre young researcher prize for CSB interns…',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/news/blanc-lapierre-prize-for-csb-interns/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832234403,
size: 0.5,
source: 4832,
target: 234403,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 234138) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 234403234138,
size: 0.5,
source: 234403,
target: 234138 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 158063) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 234403158063,
size: 0.5,
source: 234403,
target: 158063 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2344034832,
size: 0.5,
source: 234403,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 2 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 2 * Math.PI / N) * 10;
g.nodes.push({
id: 179119,
label: 'PROJECT: DECIDER: artificial intelligence to improve diagnosis and treatment of ovarian cancer',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/04/research_pasteur-endecider-artificial-intelligence-to-improve-diagnosis-and-treatment-of-ovarian-cancer-decider-social-profile-image-wo-slogan-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/decider-artificial-intelligence-to-improve-diagnosis-and-treatment-of-ovarian-cancer/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832179119,
size: 0.5,
source: 4832,
target: 179119,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 158063) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 179119158063,
size: 0.5,
source: 179119,
target: 158063 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 169942,
label: 'Oceane Fourquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/10/research_pasteur-oceane-fourquet-received-10565179785690541-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/oceane-fourquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 179119169942,
size: 0.5,
source: 179119,
target: 169942 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 169931,
label: 'Mara Santarelli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/10/research_pasteur-mara-santarelli-img-7545-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/mara-santarelli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 179119169931,
size: 0.5,
source: 179119,
target: 169931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1791194832,
size: 0.5,
source: 179119,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 3 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 3 * Math.PI / N) * 10;
g.nodes.push({
id: 179112,
label: 'PROJECT: Precision drugs Against Resistance In Subpopulations (PARIS)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/project/precision-drugs-against-resistance-in-subpopulations-paris/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832179112,
size: 0.5,
source: 4832,
target: 179112,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 169931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 179112169931,
size: 0.5,
source: 179112,
target: 169931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1791124832,
size: 0.5,
source: 179112,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 4 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 4 * Math.PI / N) * 10;
g.nodes.push({
id: 170242,
label: 'PROJECT: SLE Map: a consensus map of SLE patients into a low dimensional space',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/project/sle-map-a-consensus-map-of-sle-patients-into-a-low-dimensional-space/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832170242,
size: 0.5,
source: 4832,
target: 170242,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 170262,
label: 'Behnam Yousefi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/11/research_pasteur-behnam-yousefi-behnam-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/behnam-yousefi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 170242170262,
size: 0.5,
source: 170242,
target: 170262 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1702424832,
size: 0.5,
source: 170242,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 5 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 5 * Math.PI / N) * 10;
g.nodes.push({
id: 170012,
label: 'EVENT: Data Analysis for Precision Medicine',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/transys-data-analysis-winter-school/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832170012,
size: 0.5,
source: 4832,
target: 170012,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1700124832,
size: 0.5,
source: 170012,
target: 4832 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 169927,
label: 'Federico Melograna',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/federico-melograna/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 170012169927,
size: 0.5,
source: 170012,
target: 169927 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 170262) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 170012170262,
size: 0.5,
source: 170012,
target: 170262 });
// adding node
var x_node = Math.cos(2 * 6 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 6 * Math.PI / N) * 10;
g.nodes.push({
id: 161193,
label: 'NEWS: DECIDER: artificial intelligence to improve diagnosis and treatment of ovarian cancer',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/news/decider-artificial-intelligence-to-improve-diagnosis-and-treatment-of-ovarian-cancer/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832161193,
size: 0.5,
source: 4832,
target: 161193,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1611934832,
size: 0.5,
source: 161193,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 7 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 7 * Math.PI / N) * 10;
g.nodes.push({
id: 131574,
label: 'PROJECT: New clinical endpoints in primary Sjögren’s Syndrome: an interventional trial based on stratifying patients (NECESSITY)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/project/necessity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832131574,
size: 0.5,
source: 4832,
target: 131574,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1315744832,
size: 0.5,
source: 131574,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 8 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 8 * Math.PI / N) * 10;
g.nodes.push({
id: 105220,
label: 'PROJECT: Comprehensive characterization and effective combinatorial targeting of high-grade serous ovarian cancer via single-cell analysis (HERCULES)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-hercules-logo-2-150x150.png',
page_url: 'https://research.pasteur.fr/fr/project/comprehensive-characterization-effective-combinatorial-targeting-high-grade-serous-ovarian-cancer-via-single-cell-analysis-hercules/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4832105220,
size: 0.5,
source: 4832,
target: 105220,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 126516,
label: 'Emile Zakiev',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/05/research_pasteur-cwcrhvqaqbmlbeylignvig_thumb_2a7e1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/emil-zakiev/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 105220126516,
size: 0.5,
source: 105220,
target: 126516 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1052204832,
size: 0.5,
source: 105220,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 9 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 9 * Math.PI / N) * 10;
g.nodes.push({
id: 95885,
label: 'EVENT: Systems health for precision medicine—Handling Disease Heterogeneity',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/systems-health-for-precision-medicine-kristel-van-steen/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483295885,
size: 0.5,
source: 4832,
target: 95885,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 958854832,
size: 0.5,
source: 95885,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 10 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 10 * Math.PI / N) * 10;
g.nodes.push({
id: 95879,
label: 'EVENT: Regulation of gene activity, in 3D and in sequence space',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/title-t-b-a/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483295879,
size: 0.5,
source: 4832,
target: 95879,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 958794832,
size: 0.5,
source: 95879,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 11 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 11 * Math.PI / N) * 10;
g.nodes.push({
id: 79523,
label: 'SOFTWARE: GRAVITY',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-gravity_3_small-3-150x150.png',
page_url: 'https://research.pasteur.fr/fr/software/gravity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483279523,
size: 0.5,
source: 4832,
target: 79523,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 24536,
label: 'Freddy Cliquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-17637047_1396080250451325_800557458960161845_o-2-e1519724213254-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/freddy-cliquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 7952324536,
size: 0.5,
source: 79523,
target: 24536 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795234832,
size: 0.5,
source: 79523,
target: 4832 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3967,
label: 'Thomas Rolland',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo_tr_small2-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/thomas-rolland/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795233967,
size: 0.5,
source: 79523,
target: 3967 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4404,
label: 'Thomas Kergrohen',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_thomas-kergrohen-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/thomas-kergrohen/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795234404,
size: 0.5,
source: 79523,
target: 4404 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3960,
label: 'Alexandre Mathieu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_mathieua-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/alexandre-mathieu/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795233960,
size: 0.5,
source: 79523,
target: 3960 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3965,
label: 'Guillaume Dumas',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=3965',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795233965,
size: 0.5,
source: 79523,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8360,
label: 'Richard Delorme',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_delorme-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/richard-delorme/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795238360,
size: 0.5,
source: 79523,
target: 8360 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3770,
label: 'Thomas Bourgeron',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_thomas-bourgeron-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/thomas-bourgeron/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795233770,
size: 0.5,
source: 79523,
target: 3770 });
// adding node
var x_node = Math.cos(2 * 12 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 12 * Math.PI / N) * 10;
g.nodes.push({
id: 67407,
label: 'PROJECT: Systems biology of cell infection by the bacterial pathogen Listeria monocytogenes',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_hub-150x150.png',
page_url: 'https://research.pasteur.fr/fr/project/systems-biology-of-cell-infection-by-the-bacterial-pathogen-listeria-monocytogenes/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483267407,
size: 0.5,
source: 4832,
target: 67407,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 674074832,
size: 0.5,
source: 67407,
target: 4832 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 57911,
label: 'Anna Zhukova',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research_pasteur-anna-zhukova-anna2024-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/anna-zhukova/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6740757911,
size: 0.5,
source: 67407,
target: 57911 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4094,
label: 'Javier Pizarro-Cerda',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-javier-pizarro-cerda-javier-pizarro-1300-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/javier-pizarro-cerda/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 674074094,
size: 0.5,
source: 67407,
target: 4094 });
// adding node
var x_node = Math.cos(2 * 13 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 13 * Math.PI / N) * 10;
g.nodes.push({
id: 52867,
label: 'EVENT: Histology informatics: dissecting breast tumour spatial and molecular heterogeneity',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/histology-informatics-dissecting-breast-tumour-spatial-and-molecular-heterogeneity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483252867,
size: 0.5,
source: 4832,
target: 52867,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 528674832,
size: 0.5,
source: 52867,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 14 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 14 * Math.PI / N) * 10;
g.nodes.push({
id: 21582,
label: 'PROGRAM_PROJECT: Milieu Intérieur [LabEx]',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_dsc-tb0313_01-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/program_project/milieu-interieur-labex/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483221582,
size: 0.5,
source: 4832,
target: 21582,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 209100,
label: 'Mercè Guzman Vendrell',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/09/research_pasteur-enmerce-guzman-vendrellfrmerce-guzman-vendrell-mgv-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/merce-guzman-vendrell/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21582209100,
size: 0.5,
source: 21582,
target: 209100 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 7844,
label: 'Darragh Duffy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/02/research_pasteur-duffy_photo-1-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/darragh-duffy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 215827844,
size: 0.5,
source: 21582,
target: 7844 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4715,
label: 'Lluis Quintana-Murci',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_quintana_photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/lluis-quintana-murci/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 215824715,
size: 0.5,
source: 21582,
target: 4715 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3982,
label: 'Philippe Bousso',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photopb-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/philippe-bousso/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 215823982,
size: 0.5,
source: 21582,
target: 3982 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 23974,
label: 'Olivier Lantz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig105-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/epartner/olivier-lantz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2158223974,
size: 0.5,
source: 21582,
target: 23974 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 23983,
label: 'Antoine Toubert',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig108-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/epartner/antoine-toubert/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2158223983,
size: 0.5,
source: 21582,
target: 23983 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 23972,
label: 'Serge Hercberg',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/epartner/serge-hercberg/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2158223972,
size: 0.5,
source: 21582,
target: 23972 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4180,
label: 'James Di Santo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_photojd-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/james-di-santo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 215824180,
size: 0.5,
source: 21582,
target: 4180 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 71912,
label: 'Jacques Fellay',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_jacques-fellay.png',
page_url: 'https://research.pasteur.fr/fr/epartner/jacques-fellay/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2158271912,
size: 0.5,
source: 21582,
target: 71912 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 71909,
label: 'Kalle Astrom',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_kalle-astrom-150x150.png',
page_url: 'https://research.pasteur.fr/fr/epartner/kalle-astrom/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2158271909,
size: 0.5,
source: 21582,
target: 71909 });
// adding node
var x_node = Math.cos(2 * 15 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 15 * Math.PI / N) * 10;
g.nodes.push({
id: 17447,
label: 'SOFTWARE: Cytoscape: Visualization and analysis of omics data in interaction networks',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_cytoscape_logo_512-150x150.png',
page_url: 'https://research.pasteur.fr/fr/software/cytoscape/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 483217447,
size: 0.5,
source: 4832,
target: 17447,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 174474832,
size: 0.5,
source: 17447,
target: 4832 });
// adding node
var x_node = Math.cos(2 * 16 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 16 * Math.PI / N) * 10;
g.nodes.push({
id: 6124,
label: 'TEAM: Biomédecine Computationelle des Systèmes',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_system-biology1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/team/csb/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 48326124,
size: 0.5,
source: 4832,
target: 6124,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 234138) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6124234138,
size: 0.5,
source: 6124,
target: 234138 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 158063) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6124158063,
size: 0.5,
source: 6124,
target: 158063 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 169942) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6124169942,
size: 0.5,
source: 6124,
target: 169942 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 234141) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6124234141,
size: 0.5,
source: 6124,
target: 234141 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 169931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6124169931,
size: 0.5,
source: 6124,
target: 169931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4832) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 61244832,
size: 0.5,
source: 6124,
target: 4832 });
var s = new sigma({
//container: document.getElementById('graph-main'),
graph: g,
renderer: {
// IMPORTANT:
// This works only with the canvas renderer, so the
// renderer type set as "canvas" is necessary here.
container: document.getElementById('graph-main'),
type: 'canvas'
},
settings: {
minNodeSize: 6,
maxNodeSize: 35,
mouseWheelEnabled: false,
font: 'Montserrat',
labelThreshold:25,
borderSize:1,
defaultNodeBorderColor: '#999',
sideMargin:25,
}
});
// We first need to save the original colors of our
// nodes and edges, like this:
s.graph.nodes().forEach(function(n) {
n.originalColor = n.color;
});
s.graph.edges().forEach(function(e) {
e.originalColor = e.color;
});
// When a node is clicked, we check for each node
// if it is a neighbor of the clicked one. If not,
// we set its color as grey, and else, it takes its
// original color.
// We do the same for the edges, and we only keep
// edges that have both extremities colored.
s.bind('clickNode', function(e) {
var nodeId = e.data.node.id,
toKeep = s.graph.neighbors(nodeId);
toKeep[nodeId] = e.data.node;
s.graph.nodes().forEach(function(n) {
if (toKeep[n.id])
n.color = '#35a9f5';
else
n.color = '#dddddd';
});
s.graph.edges().forEach(function(e) {
if (toKeep[e.source] && toKeep[e.target])
e.color = '#35a9f5';
else
e.color = '#dddddd';
});
// Since the data has been modified, we need to
// call the refresh method to make the colors
// update effective.
s.refresh();
});
// When the stage is clicked, we just color each
// node and edge with its original color.
s.bind('clickStage', function(e) {
s.graph.nodes().forEach(function(n) {
n.color = n.originalColor;
});
s.graph.edges().forEach(function(e) {
e.color = e.originalColor;
});
// Same as in the previous event:
s.refresh();
});
s.bind("doubleClickNode", function (e) {
$("#canvas-wrap, .sigma-scene, .sigma-mouse").val();
ajax_load_page( e.data.node.page_url );
});
var c = s.camera;
s.bind("rightClickStage", function (e) {
sigma.misc.animation.camera(c, {
ratio: c.ratio * c.settings('zoomingRatio')
}, {
duration: 200
});
});
// Configure the noverlap layout:
var noverlapListener = s.configNoverlap({
nodeMargin: 10,
scaleNodes: 0.3,
gridSize: 1,
easing: 'quadraticInOut', // animation transition function
duration: 4000 // animation duration. Long here for the purposes of this example only
});
// Bind the events:
noverlapListener.bind('start stop interpolate', function(e) {
//console.log(e.type);
if(e.type === 'start') {
//console.time('noverlap');
}
if(e.type === 'interpolate') {
//console.timeEnd('noverlap');
}
});
// Start the layout:
s.startNoverlap();
//s.refresh();
// Initialize the dragNodes plugin:
var dragListener = sigma.plugins.dragNodes(s, s.renderers[0]);
dragListener.bind('startdrag', function(event) {
});
dragListener.bind('drag', function(event) {
});
dragListener.bind('drop', function(event) {
});
dragListener.bind('dragend', function(event) {
});