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: 4685,
label: 'Marie Touchon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_touchon-150x150.jpeg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=16
// 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: 212603,
label: 'NEWS: Chance Favors the Prepared Genomes: Horizontal Transfer Shapes the Emergence of Antibiotic Resistance Mutations in Core Genes.',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/chance-favors-the-prepared-genomes-horizontal-transfer-shapes-the-emergence-of-antibiotic-resistance-mutations-in-core-genes/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4685212603,
size: 0.5,
source: 4685,
target: 212603,
});
//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: 144247,
label: 'Charles Coluzzi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/07/research_pasteur-charles_coluzzi-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/charles-coluzzi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 212603144247,
size: 0.5,
source: 212603,
target: 144247 });
//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: 122106,
label: 'Fanny Mazzamurro',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/02/research_pasteur-fanny-mazzamurro-fanny-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/fanny-mazzamurro/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 212603122106,
size: 0.5,
source: 212603,
target: 122106 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2126034685,
size: 0.5,
source: 212603,
target: 4685 });
//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: 7209,
label: 'Philippe Glaser',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha41-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/philippe-glaser/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2126037209,
size: 0.5,
source: 212603,
target: 7209 });
//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: 4684,
label: 'Eduardo Rocha',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_eduardo_rocha-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eduardo-rocha/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2126034684,
size: 0.5,
source: 212603,
target: 4684 });
// 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: 157759,
label: 'SOFTWARE: CRISPRCasFinder',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/software/crisprcasfinder/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4685157759,
size: 0.5,
source: 4685,
target: 157759,
});
//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: 7709,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1577597709,
size: 0.5,
source: 157759,
target: 7709 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1577594685,
size: 0.5,
source: 157759,
target: 4685 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1577594684,
size: 0.5,
source: 157759,
target: 4684 });
// 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: 157735,
label: 'NEWS: Bacteria have numerous phage–plasmids with conserved phage and variable plasmid genes',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/04/research_pasteur-bacteria-have-numerous-phageplasmids-with-conserved-phage-and-variable-plasmid-genes-p-p-fig1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/bacteria-have-numerous-distinctive-groups-of-phage-plasmids-with-conserved-phage-and-variable-plasmid-gene-repertoires/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4685157735,
size: 0.5,
source: 4685,
target: 157735,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1577354684,
size: 0.5,
source: 157735,
target: 4684 });
//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: 121543,
label: 'Eugen Pfeifer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/02/research_pasteur-profile_picture-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/eugen-pfeifer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 157735121543,
size: 0.5,
source: 157735,
target: 121543 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1577354685,
size: 0.5,
source: 157735,
target: 4685 });
//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: 75259,
label: 'Jorge Moura de Sousa',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/08/research.pasteur.fr_citations-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jorge-moura-de-sousa/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 15773575259,
size: 0.5,
source: 157735,
target: 75259 });
// 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: 139186,
label: 'NEWS: Atypical organizations and epistatic interactions of CRISPRs and cas clusters in genomes and their mobile genetic elements',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/02/research_pasteur-toto-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/news/atypical-organizations-and-epistatic-interactions-of-crisprs-and-cas-clusters-in-genomes-and-their-mobile-genetic-elements/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4685139186,
size: 0.5,
source: 4685,
target: 139186,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1391864684,
size: 0.5,
source: 139186,
target: 4684 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1391864685,
size: 0.5,
source: 139186,
target: 4685 });
// 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: 119159,
label: 'NEWS: Genetic exchanges are more frequent in bacteria encoding capsules',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/01/research_pasteur-hgt-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/our-newest-paper-genetic-exchanges-are-more-frequent-in-bacteria-encoding-capsules/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4685119159,
size: 0.5,
source: 4685,
target: 119159,
});
//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: 25653,
label: 'Olaya Rendueles-Garcia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-photo_olaya2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olaya-rendueles-garcia/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11915925653,
size: 0.5,
source: 119159,
target: 25653 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1191594684,
size: 0.5,
source: 119159,
target: 4684 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 75259) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11915975259,
size: 0.5,
source: 119159,
target: 75259 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1191594685,
size: 0.5,
source: 119159,
target: 4685 });
// 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: 109487,
label: 'NEWS: Parallels between natural and experimental evolution of symbiosis',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/parallels-between-natural-and-experimental-evolution-of-symbiosis/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4685109487,
size: 0.5,
source: 4685,
target: 109487,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1094874685,
size: 0.5,
source: 109487,
target: 4685 });
//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: 8397,
label: 'Camille Clerissi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_untitled1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/camille-clerissi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1094878397,
size: 0.5,
source: 109487,
target: 8397 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1094874684,
size: 0.5,
source: 109487,
target: 4684 });
// 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: 96994,
label: 'NEWS: The treasure troves of bacterial genetic diversity',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/10/research_pasteur-transformation_hgt_hrec_hor-150x150.png',
page_url: 'https://research.pasteur.fr/en/news/the-treasure-troves-of-bacterial-genetic-diversity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468596994,
size: 0.5,
source: 4685,
target: 96994,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 969944684,
size: 0.5,
source: 96994,
target: 4684 });
//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: 4688,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 969944688,
size: 0.5,
source: 96994,
target: 4688 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 969944685,
size: 0.5,
source: 96994,
target: 4685 });
//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: 4690,
label: 'Pedro Couto Oliveira',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4690',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 969944690,
size: 0.5,
source: 96994,
target: 4690 });
// 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: 90460,
label: 'NEWS: Emerging diseases: a highly mutant strain of the Elizabethkingia bacterium caused an outbreak in Wisconsin',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-elizabethkingia_image_cip2017-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/emerging-diseases-a-highly-mutant-strain-of-the-elizabethkingia-bacterium-caused-an-outbreak-in-wisconsin/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468590460,
size: 0.5,
source: 4685,
target: 90460,
});
//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: 53076,
label: 'Amandine Perrin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_untitled4-142x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/amandine-perrin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 9046053076,
size: 0.5,
source: 90460,
target: 53076 });
//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: 63549,
label: 'Elise Larsonneur',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_photo_elise-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/elise-larsonneur/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 9046063549,
size: 0.5,
source: 90460,
target: 63549 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 25653) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 9046025653,
size: 0.5,
source: 90460,
target: 25653 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4688) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 904604688,
size: 0.5,
source: 90460,
target: 4688 });
//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: 4680,
label: 'Perrine Hugon',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4680',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 904604680,
size: 0.5,
source: 90460,
target: 4680 });
//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: 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: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 904606980,
size: 0.5,
source: 90460,
target: 6980 });
//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: 4919,
label: 'Vincent Enouf',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_fdf-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/vincent-enouf/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 904604919,
size: 0.5,
source: 90460,
target: 4919 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 904604684,
size: 0.5,
source: 90460,
target: 4684 });
//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: 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: 904607759,
size: 0.5,
source: 90460,
target: 7759 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 904604685,
size: 0.5,
source: 90460,
target: 4685 });
//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: 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: 904602495,
size: 0.5,
source: 90460,
target: 2495 });
// 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: 77821,
label: 'NEWS: A population biology study of Listeria ushers in a new era in listeriosis surveillance',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/10/research.pasteur.fr_map2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/a-population-biology-study-of-listeria-ushers-in-a-new-era-in-listeriosis-surveillance/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468577821,
size: 0.5,
source: 4685,
target: 77821,
});
//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: 4478,
label: 'Alexandra Moura',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_research.pasteur.fr_photo_serious-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alexandra-moura/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 778214478,
size: 0.5,
source: 77821,
target: 4478 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7759) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 778217759,
size: 0.5,
source: 77821,
target: 7759 });
//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: 4689,
label: 'Mylène Maury',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-portrait-mylenemaury-square1000p-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/mylene-maury/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 778214689,
size: 0.5,
source: 77821,
target: 4689 });
//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: 4468,
label: 'Alexandre Leclercq',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo12-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alexandre-leclercq/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 778214468,
size: 0.5,
source: 77821,
target: 4468 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4919) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 778214919,
size: 0.5,
source: 77821,
target: 4919 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63549) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 7782163549,
size: 0.5,
source: 77821,
target: 63549 });
//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: 6829,
label: 'Louis Jones',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_loulou-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/louis-jones/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 778216829,
size: 0.5,
source: 77821,
target: 6829 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 778214685,
size: 0.5,
source: 77821,
target: 4685 });
//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: 4016,
label: 'Viviane Chenal-Francisque',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_viviane-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/viviane-chenal-francisque/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 778214016,
size: 0.5,
source: 77821,
target: 4016 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 778214684,
size: 0.5,
source: 77821,
target: 4684 });
//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: 4470,
label: 'Marc Lecuit',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-sans-titre-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marc-lecuit/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 778214470,
size: 0.5,
source: 77821,
target: 4470 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2495) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 778212495,
size: 0.5,
source: 77821,
target: 2495 });
// 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: 77953,
label: 'NEWS: Restriction modification systems as regulators of gene transfer',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/10/research.pasteur.fr_rms_3-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/restriction-modification-systems-as-regulators-of-gene-transfer/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468577953,
size: 0.5,
source: 4685,
target: 77953,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 779534684,
size: 0.5,
source: 77953,
target: 4684 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 779534685,
size: 0.5,
source: 77953,
target: 4685 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4690) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 779534690,
size: 0.5,
source: 77953,
target: 4690 });
// 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: 62923,
label: 'NEWS: Listeria: identification of hypervirulent strains with placental and cerebral tropism',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_listeriosis-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/listeriaidentification-of-hypervirulent-strains-with-placental-and-cerebral-tropism/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468562923,
size: 0.5,
source: 4685,
target: 62923,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4689) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629234689,
size: 0.5,
source: 62923,
target: 4689 });
//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: 39580,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6292339580,
size: 0.5,
source: 62923,
target: 39580 });
//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: 6875,
label: 'Caroline Charlier-Woerther',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_pic_room_esppano_sol1_sol1-5.jpeg',
page_url: 'https://research.pasteur.fr/en/member/caroline-charlier-woerther/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 629236875,
size: 0.5,
source: 62923,
target: 6875 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629234685,
size: 0.5,
source: 62923,
target: 4685 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4468) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629234468,
size: 0.5,
source: 62923,
target: 4468 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7759) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629237759,
size: 0.5,
source: 62923,
target: 7759 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629234684,
size: 0.5,
source: 62923,
target: 4684 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2495) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629232495,
size: 0.5,
source: 62923,
target: 2495 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4470) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 629234470,
size: 0.5,
source: 62923,
target: 4470 });
// 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: 53522,
label: 'TOOL: TXSScan – models and profiles for protein secretion systems',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_logo_buen_txsscan-150x150.png',
page_url: 'https://research.pasteur.fr/en/tool/txsscan-models-and-profiles-for-protein-secretion-systems/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468553522,
size: 0.5,
source: 4685,
target: 53522,
});
//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: 6833,
label: 'Bertrand Néron',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_avatar-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/bertrand-neron/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 535226833,
size: 0.5,
source: 53522,
target: 6833 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 535224685,
size: 0.5,
source: 53522,
target: 4685 });
//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: 37634,
label: 'Julien Guglielmini',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research_pasteur-julien-guglielmini-last-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/julien-guglielmini/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 5352237634,
size: 0.5,
source: 53522,
target: 37634 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4688) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 535224688,
size: 0.5,
source: 53522,
target: 4688 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 535224684,
size: 0.5,
source: 53522,
target: 4684 });
// 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: 52938,
label: 'NEWS: GEM paper among the all-time top10 of PLoS Genetics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_untitled-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/gem-paper-among-the-all-time-top10-of-plos-genetics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468552938,
size: 0.5,
source: 4685,
target: 52938,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 529384685,
size: 0.5,
source: 52938,
target: 4685 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 529384684,
size: 0.5,
source: 52938,
target: 4684 });
// 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: 43639,
label: 'PROJECT: ANR Magisbac : Genesis and Maintenance of Bacterial Secondary Chromosomes',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_untitled6-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/magisbac-genesis-and-maintenance-of-bacterial-secondary-chromosomes/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468543639,
size: 0.5,
source: 4685,
target: 43639,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 436394685,
size: 0.5,
source: 43639,
target: 4685 });
//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: 4532,
label: 'Marie-Eve Val',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-marie-eve-val-marie-eve-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-eve-kennedy-val/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 436394532,
size: 0.5,
source: 43639,
target: 4532 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 436394684,
size: 0.5,
source: 43639,
target: 4684 });
//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: 4541,
label: 'Didier Mazel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-didier-mazel-img-6478-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/didier-mazel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 436394541,
size: 0.5,
source: 43639,
target: 4541 });
// 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: 42809,
label: 'PROJECT: ERC-2011-StG EVOMOBILOME',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_erc7-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/erc-2011-stg-evomobilome/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 468542809,
size: 0.5,
source: 4685,
target: 42809,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 428094685,
size: 0.5,
source: 42809,
target: 4685 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 25653) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 4280925653,
size: 0.5,
source: 42809,
target: 25653 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 75259) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 4280975259,
size: 0.5,
source: 42809,
target: 75259 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 428094684,
size: 0.5,
source: 42809,
target: 4684 });
// 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: 6165,
label: 'TEAM: Microbial Evolutionary Genomics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_genomics-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/microbial-evolutionary-genomics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 46856165,
size: 0.5,
source: 4685,
target: 6165,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4685) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 61654685,
size: 0.5,
source: 6165,
target: 4685 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 75259) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 616575259,
size: 0.5,
source: 6165,
target: 75259 });
//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: 4910,
label: 'Bruno Perichon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha32-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/bruno-perichon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 61654910,
size: 0.5,
source: 6165,
target: 4910 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 53076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 616553076,
size: 0.5,
source: 6165,
target: 53076 });
//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: 99732,
label: 'Amandine Nucci',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/02/research_pasteur-screen-shot-2019-02-22-at-3.19.38-pm-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/amandine-nucci/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 616599732,
size: 0.5,
source: 6165,
target: 99732 });
//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: 179500,
label: 'Marie Philippe',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/04/research_pasteur-marie-philippe-photo-marie-identite-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/marie-philippe/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165179500,
size: 0.5,
source: 6165,
target: 179500 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 122106) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6165122106,
size: 0.5,
source: 6165,
target: 122106 });
//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: 187162,
label: 'Manuel Ares arroyo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/09/research_pasteur-manuel-ares-arroyo-mahnbtdl-400x400-1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/manuel-ares-arroyo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165187162,
size: 0.5,
source: 6165,
target: 187162 });
//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: 203338,
label: 'Charles Bernard',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/charles-bernard/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165203338,
size: 0.5,
source: 6165,
target: 203338 });
//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: 187160,
label: 'Eloi Littner',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/09/research_pasteur-eloi-littner-profil-carre-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eloi-littner/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165187160,
size: 0.5,
source: 6165,
target: 187160 });
//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: 203335,
label: 'Julie Le Bris',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/06/research_pasteur-julie-le-bris-48c5f0ea-8e78-424d-a489-524a895b6ab3-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/julie-le-bris/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165203335,
size: 0.5,
source: 6165,
target: 203335 });
//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: 145320,
label: 'Raphaël Laurenceau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-raphael-laurenceau-research-pasteur-raphael-laurenceau-capture-decran-2024-04-18-a-15.20.35-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/raphael-laurenceau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165145320,
size: 0.5,
source: 6165,
target: 145320 });
//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: 231894,
label: 'Yiqing WANG',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/10/research_pasteur-20200630-100813-20200630-100813-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/yiqing-wang/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165231894,
size: 0.5,
source: 6165,
target: 231894 });
//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: 231898,
label: 'Romane Junker',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/10/research_pasteur-enromane-junkerfrromane-junker-img-2187-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/romane-junker/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6165231898,
size: 0.5,
source: 6165,
target: 231898 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4684) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 61654684,
size: 0.5,
source: 6165,
target: 4684 });
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) {
});