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: 144997,
label: 'Biological Resource Center of Institut Pasteur (CRBIP)',
type: 'image',
url: '',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var x_node = Math.cos(2 * 0 * Math.PI / N) * 2;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 2;
N=13
//check if content already exist
x_site = Math.cos(2 * 0 * Math.PI / N) * 2;
y_site = Math.sin(2 * 0 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 149334,
label: 'Federica Palma',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/11/research_pasteur-enfederica-palma-federicapalma-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/federica-palma/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 144997149334,
size: 0.5,
source: 144997,
target: 149334 });
//check if content already exist
x_site = Math.cos(2 * 1 * Math.PI / N) * 2;
y_site = Math.sin(2 * 1 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 4787,
label: 'Mariana Ferrari',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-mariana-ferrari-ferrari-mariana-2957-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/mariana-ferrari/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449974787,
size: 0.5,
source: 144997,
target: 4787 });
//check if content already exist
x_site = Math.cos(2 * 2 * Math.PI / N) * 2;
y_site = Math.sin(2 * 2 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 7759,
label: 'Alexis Criscuolo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_alexiscriscuolo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alexis-criscuolo/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449977759,
size: 0.5,
source: 144997,
target: 7759 });
//check if content already exist
x_site = Math.cos(2 * 3 * Math.PI / N) * 2;
y_site = Math.sin(2 * 3 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 202209,
label: 'Valentine Piquard',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/valentine-piquard/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 144997202209,
size: 0.5,
source: 144997,
target: 202209 });
//check if content already exist
x_site = Math.cos(2 * 4 * Math.PI / N) * 2;
y_site = Math.sin(2 * 4 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 202211,
label: 'Jacques Vanhoutte',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/jacques-vanhoutte/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 144997202211,
size: 0.5,
source: 144997,
target: 202211 });
//check if content already exist
x_site = Math.cos(2 * 5 * Math.PI / N) * 2;
y_site = Math.sin(2 * 5 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 229275,
label: 'Augusto Mantilla Ayala',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/augusto-mantilla-ayala/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 144997229275,
size: 0.5,
source: 144997,
target: 229275 });
//check if content already exist
x_site = Math.cos(2 * 6 * Math.PI / N) * 2;
y_site = Math.sin(2 * 6 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 229109,
label: 'Hanae Chouali',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/07/research_pasteur-enhanae-choualifrhanae-chouali-image-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/hanae-chouali/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 144997229109,
size: 0.5,
source: 144997,
target: 229109 });
//check if content already exist
x_site = Math.cos(2 * 7 * Math.PI / N) * 2;
y_site = Math.sin(2 * 7 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 183185,
label: 'Fay Betsou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/07/research_pasteur-fay-betsou-fay-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fay-betsou/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 144997183185,
size: 0.5,
source: 144997,
target: 183185 });
//check if content already exist
x_site = Math.cos(2 * 8 * Math.PI / N) * 2;
y_site = Math.sin(2 * 8 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 2495,
label: 'Sylvain Brisse',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/03/9c960524567ea360a3_l_2ae2a-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sylvain-brisse/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449972495,
size: 0.5,
source: 144997,
target: 2495 });
//check if content already exist
x_site = Math.cos(2 * 9 * Math.PI / N) * 2;
y_site = Math.sin(2 * 9 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 4282,
label: 'Laurent Debarbieux',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_ld-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laurent-debarbieux/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449974282,
size: 0.5,
source: 144997,
target: 4282 });
//check if content already exist
x_site = Math.cos(2 * 10 * Math.PI / N) * 2;
y_site = Math.sin(2 * 10 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 3957,
label: 'David Bikard',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_photo_cropped-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/david-bikard/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449973957,
size: 0.5,
source: 144997,
target: 3957 });
//check if content already exist
x_site = Math.cos(2 * 11 * Math.PI / N) * 2;
y_site = Math.sin(2 * 11 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 4355,
label: 'Ivo Gomperts Boneca',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-ivo-gomperts-boneca-p9090188-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ivo-gomperts-boneca/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449974355,
size: 0.5,
source: 144997,
target: 4355 });
//check if content already exist
x_site = Math.cos(2 * 12 * Math.PI / N) * 2;
y_site = Math.sin(2 * 12 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 4052,
label: 'Francesca Di Nunzio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/01/research_pasteur-dscf1697-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francesca-di-nunzio/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1449974052,
size: 0.5,
source: 144997,
target: 4052 });
N=5
// update positions
x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
// 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: 191152,
label: 'TEAM: ICAReB-biobank : Integrated Collections for Adaptive Research in Biomedicine',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/icareb-biobank-integrated-collections-for-adaptive-research-in-biomedicine/',
size: 10,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 144997191152,
size: 0.5,
source: 144997,
target: 191152 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 74238,
label: 'Remy Artus',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/04/research.pasteur.fr_artus-r®my-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/remy-artus/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 19115274238,
size: 0.5,
source: 191152,
target: 74238 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 98371,
label: 'Linda Sangari',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/linda-sangari/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 19115298371,
size: 0.5,
source: 191152,
target: 98371 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 181838,
label: 'Sophie Vacant',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/sophie-vacant/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 191152181838,
size: 0.5,
source: 191152,
target: 181838 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 154414,
label: 'Dorian Cheval',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/dorian-cheval/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 191152154414,
size: 0.5,
source: 191152,
target: 154414 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 195359,
label: 'Marine Samson',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/marine-samson/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 191152195359,
size: 0.5,
source: 191152,
target: 195359 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 167546,
label: 'Emmanuel Roux',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/emmanuel-roux/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 191152167546,
size: 0.5,
source: 191152,
target: 167546 });
// 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: 111545,
label: 'TEAM: Collection of the Institut Pasteur (CIP)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/collection-of-the-institut-pasteur-cip/',
size: 10,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 144997111545,
size: 0.5,
source: 144997,
target: 111545 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6984,
label: 'Gogoa Marthe Goly',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_marthe-goly-bis-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gogoa-marthe-goly/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1115456984,
size: 0.5,
source: 111545,
target: 6984 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6986,
label: 'Estelle Mühle',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_20150904_152255-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/estelle-muhle/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1115456986,
size: 0.5,
source: 111545,
target: 6986 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 88898,
label: 'Olivier Chesneau',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/olivier-chesneau/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 11154588898,
size: 0.5,
source: 111545,
target: 88898 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 1633,
label: 'Christiane Bouchier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/christiane-bouchier/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1115451633,
size: 0.5,
source: 111545,
target: 1633 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 146951,
label: 'Gérald Touak',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/fr-gerald-touak/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 111545146951,
size: 0.5,
source: 111545,
target: 146951 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 185174,
label: 'Praveen Rahi',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/praveen-rahi/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 111545185174,
size: 0.5,
source: 111545,
target: 185174 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 221365,
label: 'Margaux Schmitt',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/margaux-schmitt/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 111545221365,
size: 0.5,
source: 111545,
target: 221365 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6980,
label: 'Dominique Clermont',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dominique-clermont-bis-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/dominique-clermont/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1115456980,
size: 0.5,
source: 111545,
target: 6980 });
// 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: 109556,
label: 'TEAM: National Collection of Cultures of Microorganisms',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/08/research_pasteur-cncm_institutpasteur_27853-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/national-collection-of-cultures-of-microorganisms/',
size: 10,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 144997109556,
size: 0.5,
source: 144997,
target: 109556 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6989,
label: 'Sabine Garconnet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/sabine-garconnet/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1095566989,
size: 0.5,
source: 109556,
target: 6989 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 8393,
label: 'Patricia Charles',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_charles-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/patricia-charles/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1095568393,
size: 0.5,
source: 109556,
target: 8393 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 144721,
label: 'Kshanti Africano-Gomez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/07/research_pasteur-cvafricanogomez-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-kshanti-africano-gomez/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 109556144721,
size: 0.5,
source: 109556,
target: 144721 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6817,
label: 'Raquel Hurtado Ortiz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-raquel-hurtado-ortiz-foto-perfil-rho-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/raquel-hurtado-ortiz/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1095566817,
size: 0.5,
source: 109556,
target: 6817 });
// 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: 106070,
label: 'TEAM: Expertise group: GIPhy – Genome Informatics and Phylogenetics',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/hub-giphy/',
size: 10,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 144997106070,
size: 0.5,
source: 144997,
target: 106070 });
//check if content already exist
//link to content
g.edges.push({
id: 106070229109,
size: 0.5,
source: 106070,
target: 229109 });
//check if content already exist
//link to content
g.edges.push({
id: 1060707759,
size: 0.5,
source: 106070,
target: 7759 });
// 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: 29245,
label: 'TEAM: Collection of Cyanobacteria',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_16543-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/collection-of-cyanobacteria/',
size: 10,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 14499729245,
size: 0.5,
source: 144997,
target: 29245 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 208131,
label: 'Eddy Blondet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/09/research_pasteur-eneddy-blondetfreddy-blondet-20240425-140645-e1726575893789-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eddy-blondet/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 29245208131,
size: 0.5,
source: 29245,
target: 208131 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6846,
label: 'Thierry Laurent',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig9-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thierry-laurent/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 292456846,
size: 0.5,
source: 29245,
target: 6846 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 8552,
label: 'Anne Boullie',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ab-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/anne-boullie/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 292458552,
size: 0.5,
source: 29245,
target: 8552 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 200026,
label: 'Aniket Saraf',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/04/research_pasteur-aniket-saraf-aniket-photo-delhi-scaled-e1681306410604-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/aniket-saraf/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 29245200026,
size: 0.5,
source: 29245,
target: 200026 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 230726,
label: 'Yoann Cortier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/11/research_pasteur-yoann-cortier-image-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/yoann-cortier/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 29245230726,
size: 0.5,
source: 29245,
target: 230726 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 8392,
label: 'Sandrine Favre-Rochex',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_favre-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sandrine-favre-rochex/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 292458392,
size: 0.5,
source: 29245,
target: 8392 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6842,
label: 'Marie-Bénédicte Benedic',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-marie-benedicte-benedic-bb-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-benedicte-benedic/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 292456842,
size: 0.5,
source: 29245,
target: 6842 });
//check if content already exist
if (x_node<0){
x_site = x_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
x_site = x_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
if (y_node<0){
y_site = y_node + 0.01*(((Math.random() * 2)-1) - offset_left);
}else{
y_site = y_node + 0.01*(((Math.random() * 2)-1) + offset_left);
}
// adding site
g.nodes.push({
id: 6845,
label: 'Muriel Gugger',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_muriel-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/muriel-gugger/',
x: x_site,
y: y_site,
size: 3,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 292456845,
size: 0.5,
source: 29245,
target: 6845 });
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: 30,
mouseWheelEnabled: false,
font: 'Montserrat',
labelThreshold:25,
borderSize:1,
defaultNodeBorderColor: '#333',
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;
//console.log(n.id);
//console.log(s.graph.nodes(n.id));
});
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: 5,
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) {
});