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: 4644,
label: 'Xavier Montagutelli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-xavier-montagutelli-xm-web-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=15
// 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: 210646,
label: 'EVENT: Genomes and Genetics department seminar: Clare Smith (Duke University, Durham, USA); Thursday 18 April @11:00am ; Auditorium François Jacob',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/joint-genomes-and-genetics-microbiology-departments-seminar-clare-smith-duke-university-durham-usa-host-vs-pathogen-discovering-genetic-drivers-of-diverse-tuberculosis-outcomes-thurs/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644210646,
size: 0.5,
source: 4644,
target: 210646,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2106464644,
size: 0.5,
source: 210646,
target: 4644 });
// 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: 204059,
label: 'PROJECT: INTRANZIGEANT: Integrated study of Zika virus transmission to identify genetic mechanisms and new antiviral targets',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/06/research_pasteur-intranzigeant-150x150.png',
page_url: 'https://research.pasteur.fr/fr/project/intranzigeant-integrated-study-of-zika-virus-transmission-to-identify-genetic-mechanisms-and-new-antiviral-targets/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644204059,
size: 0.5,
source: 4644,
target: 204059,
});
//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: 160592,
label: 'Shiho Torii',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/06/research_pasteur-shiho-torii-torii-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/shiho-torii/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 204059160592,
size: 0.5,
source: 204059,
target: 160592 });
//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: 156018,
label: 'Morgane Lavina',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/03/research_pasteur-morgane-lavina-img-20210322-131553-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/morgane-lavina-2/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 204059156018,
size: 0.5,
source: 204059,
target: 156018 });
//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: 214168,
label: 'Caroline Manet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/06/research_pasteur-manet-caroline-9118bis-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/caroline-manet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 204059214168,
size: 0.5,
source: 204059,
target: 214168 });
//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: 4438,
label: 'Louis Lambrechts',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-louis-lambrechts-dsc6143-cropped-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/louis-lambrechts/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2040594438,
size: 0.5,
source: 204059,
target: 4438 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2040594644,
size: 0.5,
source: 204059,
target: 4644 });
// 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: 182338,
label: 'NEWS: New publication – Potent Human Broadly SARS-CoV-2 Neutralizing IgA and IgG Antibodies Effective Against Omicron BA.1 and BA.2',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/news/new-publication-potent-human-broadly-sars-cov-2-neutralizing-iga-and-igg-antibodies-effective-against-omicron-ba-1-and-ba-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644182338,
size: 0.5,
source: 4644,
target: 182338,
});
//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: 83681,
label: 'Cyril Planchais',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_cyril-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/cyril-planchais/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233883681,
size: 0.5,
source: 182338,
target: 83681 });
//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: 116577,
label: 'Ignacio Fernandez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/11/research_pasteur-img_4481-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/fr-ignacio-fernandez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338116577,
size: 0.5,
source: 182338,
target: 116577 });
//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: 4817,
label: 'Timothée Bruel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/09/research_pasteur-photo2-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/timothee-bruel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384817,
size: 0.5,
source: 182338,
target: 4817 });
//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: 42508,
label: 'Guilherme Dias de Melo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research_pasteur-guilherme-dias-de-melo-photo-pour-profil-prix-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/guilherme-dias-de-melo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233842508,
size: 0.5,
source: 182338,
target: 42508 });
//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: 8357,
label: 'Matthieu Prot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_372261-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/matthieu-prot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823388357,
size: 0.5,
source: 182338,
target: 8357 });
//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: 121828,
label: 'Maxime Beretta',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=121828',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338121828,
size: 0.5,
source: 182338,
target: 121828 });
//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: 56127,
label: 'Pablo Guardado-Calvo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research_pasteur-pablo-guardado-calvo-1670697779326-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/pablo-guardado-calvo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233856127,
size: 0.5,
source: 182338,
target: 56127 });
//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: 95622,
label: 'Jérémy Dufloo',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=95622',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233895622,
size: 0.5,
source: 182338,
target: 95622 });
//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: 93674,
label: 'Luis Molinos-Albert',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=93674',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233893674,
size: 0.5,
source: 182338,
target: 93674 });
//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: 4727,
label: 'Marija Backovic',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-marija-backovic-img-3538-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/marija-backovic/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384727,
size: 0.5,
source: 182338,
target: 4727 });
//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: 139594,
label: 'Jeanne Chiaravalli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/02/research_pasteur-mdizoduw-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/jeanne-chiaravalli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338139594,
size: 0.5,
source: 182338,
target: 139594 });
//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: 91407,
label: 'Emilie Giraud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/06/research_pasteur-emilie-de-la-llave-giraud-lrrieuh--400x400-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/emilie-giraud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233891407,
size: 0.5,
source: 182338,
target: 91407 });
//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: 145954,
label: 'Laurine Conquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-laurine-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/laurine-conquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338145954,
size: 0.5,
source: 182338,
target: 145954 });
//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: 134005,
label: 'Delphine Planas',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-delphine_planas-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/delphine-planas/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338134005,
size: 0.5,
source: 182338,
target: 134005 });
//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: 3940,
label: 'Isabelle Staropoli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_image-32-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/isabelle-staropoli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823383940,
size: 0.5,
source: 182338,
target: 3940 });
//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: 21458,
label: 'Florence Guivel-Benhassine',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-flo-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/florence-guivel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233821458,
size: 0.5,
source: 182338,
target: 21458 });
//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: 4578,
label: 'Thierry Hieu',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4578',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384578,
size: 0.5,
source: 182338,
target: 4578 });
//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: 99492,
label: 'Mikaël Boullé',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/mikael-boulle/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233899492,
size: 0.5,
source: 182338,
target: 99492 });
//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: 7878,
label: 'Marie-Noelle Ungeheuer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_43070-e1437491181428-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/marie-noelle-ungeheuer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823387878,
size: 0.5,
source: 182338,
target: 7878 });
//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: 4051,
label: 'Pierre Charneau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig10-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/pierre-charneau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384051,
size: 0.5,
source: 182338,
target: 4051 });
//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: 4920,
label: 'Sylvie van Der Werf',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/07/research_pasteur-photo_sylvie-vdw1-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/sylvie-van-der-werf/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384920,
size: 0.5,
source: 182338,
target: 4920 });
//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: 7850,
label: 'Fabrice Agou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_image010-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/fabrice-agou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823387850,
size: 0.5,
source: 182338,
target: 7850 });
//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: 4765,
label: 'Etienne Simon-Loriere',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_e.simon-loriere_1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/etienne-simon-loriere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384765,
size: 0.5,
source: 182338,
target: 4765 });
//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: 3977,
label: 'Hervé Bourhy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig50-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/herve-bourhy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823383977,
size: 0.5,
source: 182338,
target: 3977 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1823384644,
size: 0.5,
source: 182338,
target: 4644 });
//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: 4724,
label: 'Félix Rey',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-enfelix-a-reyfrfelix-rey-portrait-felixrey-1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/felix-rey/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384724,
size: 0.5,
source: 182338,
target: 4724 });
//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: 4821,
label: 'Olivier Schwartz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo-o.schwartz-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/olivier-schwartz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384821,
size: 0.5,
source: 182338,
target: 4821 });
//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: 4575,
label: 'Hugo Mouquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/05/research_pasteur-mouquet_id-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/hugo-mouquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384575,
size: 0.5,
source: 182338,
target: 4575 });
// 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: 168123,
label: 'PROJECT: Mouse models for COVID-19',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/09/research_pasteur-enmouse-models-for-covid-19-projet-covid-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/mouse-models-for-covid-19/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644168123,
size: 0.5,
source: 4644,
target: 168123,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8357) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1681238357,
size: 0.5,
source: 168123,
target: 8357 });
//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: 4642,
label: 'Jean Jaubert',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_jaubert-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/jean-jaubert/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1681234642,
size: 0.5,
source: 168123,
target: 4642 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 145954) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 168123145954,
size: 0.5,
source: 168123,
target: 145954 });
//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: 109786,
label: 'Laurine Levillayer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-laurine_levillayer-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/laurine-levillayer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 168123109786,
size: 0.5,
source: 168123,
target: 109786 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1681234644,
size: 0.5,
source: 168123,
target: 4644 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4765) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1681234765,
size: 0.5,
source: 168123,
target: 4765 });
// 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: 146402,
label: 'PROJECT: Collaborative Cross initiatives',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/09/research_pasteur-collaborative-cross-initiatives-cc-principe-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/collaborative-cross-initiatives/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644146402,
size: 0.5,
source: 4644,
target: 146402,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1464024644,
size: 0.5,
source: 146402,
target: 4644 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4642) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1464024642,
size: 0.5,
source: 146402,
target: 4642 });
// 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: 146400,
label: 'PROJECT: Host genetic susceptibility to Salmonelloses',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/09/research_pasteur-host-genetic-susceptibility-to-salmonelloses-salmonella-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/host-genetic-susceptibility-to-salmonelloses/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644146400,
size: 0.5,
source: 4644,
target: 146400,
});
//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: 4647,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1464004647,
size: 0.5,
source: 146400,
target: 4647 });
//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: 145959,
label: 'Anaïs Cazals',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-20191216_202741-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/anais-cazals/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 146400145959,
size: 0.5,
source: 146400,
target: 145959 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 145954) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 146400145954,
size: 0.5,
source: 146400,
target: 145954 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1464004644,
size: 0.5,
source: 146400,
target: 4644 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4642) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1464004642,
size: 0.5,
source: 146400,
target: 4642 });
// 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: 146320,
label: 'EVENT: 33rd International Mammalian Genome Conference',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/09/research_pasteur-33rd-international-mammalian-genome-conference-logo-imgc33-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/event/33rd-international-mammalian-genome-conference/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644146320,
size: 0.5,
source: 4644,
target: 146320,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1463204644,
size: 0.5,
source: 146320,
target: 4644 });
// 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: 146299,
label: 'PROJECT: Host genetic susceptibility to Zika virus',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/09/research_pasteur-host-genetic-susceptibility-to-zika-virus-zika-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/host-genetic-susceptibility-to-zika-virus/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644146299,
size: 0.5,
source: 4644,
target: 146299,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 145954) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 146299145954,
size: 0.5,
source: 146299,
target: 145954 });
//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: 145964,
label: 'Marie Bourdon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-marie-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/marie-bourdon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 146299145964,
size: 0.5,
source: 146299,
target: 145964 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4765) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1462994765,
size: 0.5,
source: 146299,
target: 4765 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8357) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1462998357,
size: 0.5,
source: 146299,
target: 8357 });
//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: 4732,
label: 'Marie Flamand',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_marie_flamand-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/marie-flamand/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1462994732,
size: 0.5,
source: 146299,
target: 4732 });
//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: 4764,
label: 'Anavaj Sakuntabhai',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_l1000961-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/anavaj-sakuntabhai/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1462994764,
size: 0.5,
source: 146299,
target: 4764 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 214168) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 146299214168,
size: 0.5,
source: 146299,
target: 214168 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1462994644,
size: 0.5,
source: 146299,
target: 4644 });
// 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: 145023,
label: 'PROGRAM_PROJECT: Pasteur International Center for Research on Emerging Infectious Diseases',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-pasteur-international-center-for-research-on-emerging-infectious-diseases-logo-picreid-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/program_project/pasteur-international-center-for-research-on-emerging-infectious-diseases/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4644145023,
size: 0.5,
source: 4644,
target: 145023,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4764) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1450234764,
size: 0.5,
source: 145023,
target: 4764 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4765) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1450234765,
size: 0.5,
source: 145023,
target: 4765 });
// 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: 90653,
label: 'TEAM: Génétique de la Souris',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-enmouse-geneticsfrgenetique-de-la-souris-illustration-mouse-genetics-v2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/team/mouse-genetics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 464490653,
size: 0.5,
source: 4644,
target: 90653,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4642) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 906534642,
size: 0.5,
source: 90653,
target: 4642 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 145954) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 90653145954,
size: 0.5,
source: 90653,
target: 145954 });
//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: 168120,
label: 'Lucie Dupuis',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/lucie-dupuis/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 90653168120,
size: 0.5,
source: 90653,
target: 168120 });
//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: 205500,
label: 'Gaetano Calcagno',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/07/research_pasteur-gaetano-calcagno-unnamed-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/gaetano-calcagno/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 90653205500,
size: 0.5,
source: 90653,
target: 205500 });
//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: 205502,
label: 'Aurélia Vigot',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/aurelia-vigot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 90653205502,
size: 0.5,
source: 90653,
target: 205502 });
//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: 7799,
label: 'Laurence Boutout',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_laurence-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/laurence-boutout/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 906537799,
size: 0.5,
source: 90653,
target: 7799 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 214168) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 90653214168,
size: 0.5,
source: 90653,
target: 214168 });
//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: 89828,
label: 'Ewa Pasquereau-Kotula',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/09/research_pasteur-ewa-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/ewa-pasquereau-kotula/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 9065389828,
size: 0.5,
source: 90653,
target: 89828 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 906534644,
size: 0.5,
source: 90653,
target: 4644 });
// 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: 71597,
label: 'EVENT: Seminaire conjoint du departement d’immunologie et departement de biologie du développement & cellules souches',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/seminaire-conjoint-du-departement-dimmunologie-et-departement-de-biologie-du-developpement-cellules-souches/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 464471597,
size: 0.5,
source: 4644,
target: 71597,
});
//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: 4171,
label: 'Caroline Demangel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-caroline-demangel-id-caro2-2018-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/caroline-demangel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 715974171,
size: 0.5,
source: 71597,
target: 4171 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 715974644,
size: 0.5,
source: 71597,
target: 4644 });
// 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: 58969,
label: 'COURSE: Mouse Genetics for Disease Modelling Course',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/course/mouse-genetics-course/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 464458969,
size: 0.5,
source: 4644,
target: 58969,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 589694644,
size: 0.5,
source: 58969,
target: 4644 });
//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: 4637,
label: 'Michel Cohen-Tannoudji',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_dsc8515-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/michel-cohen-tannoudji/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 589694637,
size: 0.5,
source: 58969,
target: 4637 });
// 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: 48777,
label: 'NEWS: Club des Belles Souris',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/news/club-des-belles-souris/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 464448777,
size: 0.5,
source: 4644,
target: 48777,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4637) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 487774637,
size: 0.5,
source: 48777,
target: 4637 });
//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: 4639,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 487774639,
size: 0.5,
source: 48777,
target: 4639 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 487774644,
size: 0.5,
source: 48777,
target: 4644 });
// 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: 40777,
label: 'PROJECT: Pathogenicity and resistance to Rift Valley Fever virus.',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research_pasteur-pathogenicity-and-resistance-to-rift-valley-fever-virus-rift-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/pathogenicity-and-resistance-to-rift-valley-fever-virus/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 464440777,
size: 0.5,
source: 4644,
target: 40777,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4644) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 407774644,
size: 0.5,
source: 40777,
target: 4644 });
//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: 4638,
label: 'Denis Houzelstein',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_denis_1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/denis-houzelstein/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 407774638,
size: 0.5,
source: 40777,
target: 4638 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4732) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 407774732,
size: 0.5,
source: 40777,
target: 4732 });
//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: 41813,
label: 'Eliette Bonnefoy, INSERM UMR-S1007',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/epartner/eliette-bonnefoy-inserm-umr-s1007-universite-paris-descartes-sorbonne-paris-cite-paris-france/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 4077741813,
size: 0.5,
source: 40777,
target: 41813 });
// 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: 14686,
label: 'PROGRAM_PROJECT: Labex IBEID – Integrative Biology of Emerging Infectious Diseases',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_labex-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/program_project/integrative-biology-of-emerging-infectious-diseases/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 464414686,
size: 0.5,
source: 4644,
target: 14686,
});
//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: 203306,
label: 'Cyril Renassia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/06/research_pasteur-cyril-renassia-photo-cv-2023-cropped-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/cyril-renassia/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 14686203306,
size: 0.5,
source: 14686,
target: 203306 });
//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: 3949,
label: 'Philippe Bastin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_philippe_bastin-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/philippe-bastin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 146863949,
size: 0.5,
source: 14686,
target: 3949 });
//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: 4775,
label: 'Carla Saleh',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha68-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/carla-saleh/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 146864775,
size: 0.5,
source: 14686,
target: 4775 });
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) {
});