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: 3965,
label: 'Guillaume Dumas',
type: 'image',
url: '',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=13
// 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: 143260,
label: 'PROJECT: PARIS: Paris Autism Research International Sib-Pair Study',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/06/research_pasteur-paris-paris-autism-research-international-sib-pair-study-research.pasteur.fr-grant-fig1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/paris-paris-autism-research-international-study/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 3965143260,
size: 0.5,
source: 3965,
target: 143260,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3960,
label: 'Alexandre Mathieu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_mathieua-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/alexandre-mathieu/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432603960,
size: 0.5,
source: 143260,
target: 3960 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 24536,
label: 'Freddy Cliquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-17637047_1396080250451325_800557458960161845_o-2-e1519724213254-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/freddy-cliquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 14326024536,
size: 0.5,
source: 143260,
target: 24536 });
//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: 101504,
label: 'Claire Leblond',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-2015_claire_portrait-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/claire-leblond/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 143260101504,
size: 0.5,
source: 143260,
target: 101504 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3967,
label: 'Thomas Rolland',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo_tr_small2-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-rolland/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432603967,
size: 0.5,
source: 143260,
target: 3967 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8360,
label: 'Richard Delorme',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_delorme-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/richard-delorme/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432608360,
size: 0.5,
source: 143260,
target: 8360 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432603965,
size: 0.5,
source: 143260,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3968,
label: 'Roberto Toro',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_toror-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/roberto-toro/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432603968,
size: 0.5,
source: 143260,
target: 3968 });
//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: 4405,
label: 'Simon Malesys',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-pasteur-profile-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/simon-malesys/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432604405,
size: 0.5,
source: 143260,
target: 4405 });
//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: 8362,
label: 'Nathalie Lemiere',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_lemiere-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/nathalie-lemiere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432608362,
size: 0.5,
source: 143260,
target: 8362 });
//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: 156840,
label: 'Anna Maruani',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/anna-maruani/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 143260156840,
size: 0.5,
source: 143260,
target: 156840 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3770,
label: 'Thomas Bourgeron',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_thomas-bourgeron-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-bourgeron/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432603770,
size: 0.5,
source: 143260,
target: 3770 });
// 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: 128772,
label: 'TOOL: GenEvo',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-dna-dark-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/tool/genevo/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 3965128772,
size: 0.5,
source: 3965,
target: 128772,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1287723770,
size: 0.5,
source: 128772,
target: 3770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4405) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1287724405,
size: 0.5,
source: 128772,
target: 4405 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1287723965,
size: 0.5,
source: 128772,
target: 3965 });
// 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: 105613,
label: 'EVENT: NEUROSCIENCE “A cross-species approach to the empathic brain”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/neuroscience-a-cross-species-approach-to-the-empathic-brain-by-prof-christian-keysers/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 3965105613,
size: 0.5,
source: 3965,
target: 105613,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1056133965,
size: 0.5,
source: 105613,
target: 3965 });
// 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: 104018,
label: 'PROJECT: EU-AIMS',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-iu-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/project/eu-aims/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 3965104018,
size: 0.5,
source: 3965,
target: 104018,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 10401824536,
size: 0.5,
source: 104018,
target: 24536 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183965,
size: 0.5,
source: 104018,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 101501,
label: 'Julien Fumey',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-fumey-julien-10-e1528383655738-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/julien-fumey/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 104018101501,
size: 0.5,
source: 104018,
target: 101501 });
//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: 97066,
label: 'Yang-Min Kim',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=97066',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10401897066,
size: 0.5,
source: 104018,
target: 97066 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 104018101504,
size: 0.5,
source: 104018,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4405) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040184405,
size: 0.5,
source: 104018,
target: 4405 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183960,
size: 0.5,
source: 104018,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183967,
size: 0.5,
source: 104018,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040188362,
size: 0.5,
source: 104018,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040188360,
size: 0.5,
source: 104018,
target: 8360 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 78192,
label: 'Olivia Chény',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_dsc0616mod2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivia-cheny/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10401878192,
size: 0.5,
source: 104018,
target: 78192 });
//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: 118549,
label: 'Nathalie Clément',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/12/research_pasteur-nathalie-clement-clement-nathalie-9576-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-nathalie-clement/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 104018118549,
size: 0.5,
source: 104018,
target: 118549 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183770,
size: 0.5,
source: 104018,
target: 3770 });
// 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: 103988,
label: 'NEWS: Experimenting with reproducibility in bioinformatics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-kim_et_al-150x150.png',
page_url: 'https://research.pasteur.fr/en/news/experimenting-reproducibility-bioinformatics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 3965103988,
size: 0.5,
source: 3965,
target: 103988,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 97066) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 10398897066,
size: 0.5,
source: 103988,
target: 97066 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1039883965,
size: 0.5,
source: 103988,
target: 3965 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1039883770,
size: 0.5,
source: 103988,
target: 3770 });
// 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: 24414,
label: 'PROJECT: Background on the genetics of ASD',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_synapseasd-2-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/synaptic-genes-and-asd-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396524414,
size: 0.5,
source: 3965,
target: 24414,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143770,
size: 0.5,
source: 24414,
target: 3770 });
//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: 3969,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143969,
size: 0.5,
source: 24414,
target: 3969 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2441424536,
size: 0.5,
source: 24414,
target: 24536 });
//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: 3964,
label: 'Isabelle Cloëz-Tayarani',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-photo-i.-cloez-tayarani-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/isabelle-cloez-tayarani/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143964,
size: 0.5,
source: 24414,
target: 3964 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143965,
size: 0.5,
source: 24414,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3962,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143962,
size: 0.5,
source: 24414,
target: 3962 });
//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: 3966,
label: 'Allain-Thibeault Ferhat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=3966',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143966,
size: 0.5,
source: 24414,
target: 3966 });
//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: 3973,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143973,
size: 0.5,
source: 24414,
target: 3973 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143960,
size: 0.5,
source: 24414,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143967,
size: 0.5,
source: 24414,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3968) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143968,
size: 0.5,
source: 24414,
target: 3968 });
//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: 56155,
label: 'Aline Vitrac',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=56155',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2441456155,
size: 0.5,
source: 24414,
target: 56155 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101501) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24414101501,
size: 0.5,
source: 24414,
target: 101501 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24414101504,
size: 0.5,
source: 24414,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 97066) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2441497066,
size: 0.5,
source: 24414,
target: 97066 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244148362,
size: 0.5,
source: 24414,
target: 8362 });
//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: 156871,
label: 'Myriam Rachid',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/myriam-rachid/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24414156871,
size: 0.5,
source: 24414,
target: 156871 });
// 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: 79523,
label: 'SOFTWARE: GRAVITY',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-gravity_3_small-3-150x150.png',
page_url: 'https://research.pasteur.fr/en/software/gravity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396579523,
size: 0.5,
source: 3965,
target: 79523,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 7952324536,
size: 0.5,
source: 79523,
target: 24536 });
//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: 4832,
label: 'Benno Schwikowski',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_photo-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/benno-schwikowski/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795234832,
size: 0.5,
source: 79523,
target: 4832 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795233967,
size: 0.5,
source: 79523,
target: 3967 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4404,
label: 'Thomas Kergrohen',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_thomas-kergrohen-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-kergrohen/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 795234404,
size: 0.5,
source: 79523,
target: 4404 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795233960,
size: 0.5,
source: 79523,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795233965,
size: 0.5,
source: 79523,
target: 3965 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795238360,
size: 0.5,
source: 79523,
target: 8360 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795233770,
size: 0.5,
source: 79523,
target: 3770 });
// 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: 79515,
label: 'SOFTWARE: StratiPy',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_stratipy-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/software/stratipy/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396579515,
size: 0.5,
source: 3965,
target: 79515,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795153965,
size: 0.5,
source: 79515,
target: 3965 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 97066) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 7951597066,
size: 0.5,
source: 79515,
target: 97066 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795153770,
size: 0.5,
source: 79515,
target: 3770 });
// 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: 79532,
label: 'PROJECT: SoNeTAA',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_diapositive1-e1425320179535-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/sonetaa/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396579532,
size: 0.5,
source: 3965,
target: 79532,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795323965,
size: 0.5,
source: 79532,
target: 3965 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 795328360,
size: 0.5,
source: 79532,
target: 8360 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 115680,
label: 'Aline Lefebvre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/03/research_pasteur-alinelefebvre-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/fr-aline-lefebvre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 79532115680,
size: 0.5,
source: 79532,
target: 115680 });
//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: 141781,
label: 'Yann Beauxis-Aussalet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=141781',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 79532141781,
size: 0.5,
source: 79532,
target: 141781 });
// 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: 65348,
label: 'PROJECT: Phelan-McDermid Syndrome: from mechanisms to treatments',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_22q13-140x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/phelan-mcdermid-syndrome-from-mechanisms-to-treatments/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396565348,
size: 0.5,
source: 3965,
target: 65348,
});
//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: 8358,
label: 'Anne Claude Tabet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_tabetac-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/anne-claude-tabet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 653488358,
size: 0.5,
source: 65348,
target: 8358 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653488360,
size: 0.5,
source: 65348,
target: 8360 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483960,
size: 0.5,
source: 65348,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483967,
size: 0.5,
source: 65348,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3964) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483964,
size: 0.5,
source: 65348,
target: 3964 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3966) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483966,
size: 0.5,
source: 65348,
target: 3966 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653488362,
size: 0.5,
source: 65348,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3968) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483968,
size: 0.5,
source: 65348,
target: 3968 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483965,
size: 0.5,
source: 65348,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 24427,
label: 'Anita Beggiato',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_beggiato-150x150.png',
page_url: 'https://research.pasteur.fr/en/epartner/anita-beggiato/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6534824427,
size: 0.5,
source: 65348,
target: 24427 });
//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: 24429,
label: 'Frédérique Amsellem',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_frederique_amsellem-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/epartner/frederique-amsellem/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6534824429,
size: 0.5,
source: 65348,
target: 24429 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 65348101504,
size: 0.5,
source: 65348,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156840) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 65348156840,
size: 0.5,
source: 65348,
target: 156840 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156871) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 65348156871,
size: 0.5,
source: 65348,
target: 156871 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483770,
size: 0.5,
source: 65348,
target: 3770 });
// 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: 51036,
label: 'PROJECT: Imaginons la recherche',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_capture-d’écran-2015-10-22-à-20.10.48-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/imaginons-la-recherche/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396551036,
size: 0.5,
source: 3965,
target: 51036,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3968) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 510363968,
size: 0.5,
source: 51036,
target: 3968 });
//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: 7879,
label: 'Philippe Esterre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_esterre.jpg',
page_url: 'https://research.pasteur.fr/en/member/philippe-esterre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510367879,
size: 0.5,
source: 51036,
target: 7879 });
//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/en/member/marie-noelle-ungeheuer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510367878,
size: 0.5,
source: 51036,
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: 3894,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510363894,
size: 0.5,
source: 51036,
target: 3894 });
//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: 4729,
label: 'Marina Caillet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_marina-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marina-caillet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510364729,
size: 0.5,
source: 51036,
target: 4729 });
//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: 7090,
label: 'Mariana Mesel-Lemoine',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/mariana-mesel-lemoine/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510367090,
size: 0.5,
source: 51036,
target: 7090 });
//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: 8258,
label: 'Olivier Schiettekatte',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-olivier-schiettekatte-38-olivier-schiettekatte-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivier-schiettekatte/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510368258,
size: 0.5,
source: 51036,
target: 8258 });
//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: 4568,
label: 'Stéphanie Dabo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-stephanie_dabo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/stephanie-dabo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510364568,
size: 0.5,
source: 51036,
target: 4568 });
//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: 6816,
label: 'Clementine Schilte',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-clementine-schilte-photo-2022-scaled-e1692277761405-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/clementine-schilte/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510366816,
size: 0.5,
source: 51036,
target: 6816 });
//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: 4539,
label: 'Deshmukh Gopaul',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dgopaul-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/deshmukh-gopaul/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510364539,
size: 0.5,
source: 51036,
target: 4539 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 510363965,
size: 0.5,
source: 51036,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8619,
label: 'François Bontems',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_francois_bontems-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francois-bontems/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 510368619,
size: 0.5,
source: 51036,
target: 8619 });
//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: 70641,
label: 'Hélène Da Conceicao',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_photo-profil-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/helene-da-conceicao/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 5103670641,
size: 0.5,
source: 51036,
target: 70641 });
//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: 70644,
label: 'Anne Lassailly-Bondaz',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/anne-lassailly-bondaz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 5103670644,
size: 0.5,
source: 51036,
target: 70644 });
// 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: 24410,
label: 'PROJECT: The serotonin-NAS-melatonin pathway and susceptibility to ASD',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_melatonin-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/the-serotonin-nas-melatonin-pathway-and-susceptibility-to-asd-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396524410,
size: 0.5,
source: 3965,
target: 24410,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103770,
size: 0.5,
source: 24410,
target: 3770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3973) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103973,
size: 0.5,
source: 24410,
target: 3973 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103967,
size: 0.5,
source: 24410,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103965,
size: 0.5,
source: 24410,
target: 3965 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244108362,
size: 0.5,
source: 24410,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103960,
size: 0.5,
source: 24410,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24410101504,
size: 0.5,
source: 24410,
target: 101504 });
// 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: 24409,
label: 'PROJECT: Brain imaging and genetics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_capture-d’écran-2015-09-01-à-16.55.06-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/brain-imaging-and-genetics-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 396524409,
size: 0.5,
source: 3965,
target: 24409,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244093770,
size: 0.5,
source: 24409,
target: 3770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3968) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244093968,
size: 0.5,
source: 24409,
target: 3968 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244093965,
size: 0.5,
source: 24409,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3970,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244093970,
size: 0.5,
source: 24409,
target: 3970 });
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) {
});