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: 63328,
label: 'Anne Biton',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-img_e2453-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=10
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 220278,
label: 'NEWS: New publication – Smoking changes adaptive immunity with persistent effects',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/new-publication-smoking-changes-adaptive-immunity-with-persistent-effects/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328220278,
size: 0.5,
source: 63328,
target: 220278,
});
//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: 104985,
label: 'Violaine Saint-André',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/04/research_pasteur-portraitcoupe-1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/violaine-saint-andre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 220278104985,
size: 0.5,
source: 220278,
target: 104985 });
//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: 7840,
label: 'Bruno Charbit',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/04/research.pasteur.fr_pic_bc-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/bruno-charbit/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2202787840,
size: 0.5,
source: 220278,
target: 7840 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 22027863328,
size: 0.5,
source: 220278,
target: 63328 });
//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: 47883,
label: 'Céline Posseme',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/12/research.pasteur.fr_celine-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/celine-posseme/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 22027847883,
size: 0.5,
source: 220278,
target: 47883 });
//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: 190145,
label: 'Anthony Bertrand',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/11/research_pasteur-photo-anthonybertrand-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/anthony-bertrand/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 220278190145,
size: 0.5,
source: 220278,
target: 190145 });
//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: 4717,
label: 'Maxime Rotival',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/06/research_pasteur-twitterphotorussia-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/maxime-rotival/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2202784717,
size: 0.5,
source: 220278,
target: 4717 });
//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: 4714,
label: 'Etienne Patin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-etienne-patin-patin-portrait-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/etienne-patin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2202784714,
size: 0.5,
source: 220278,
target: 4714 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4715,
label: 'Lluis Quintana-Murci',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_quintana_photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lluis-quintana-murci/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2202784715,
size: 0.5,
source: 220278,
target: 4715 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 7844,
label: 'Darragh Duffy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/02/research_pasteur-duffy_photo-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/darragh-duffy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2202787844,
size: 0.5,
source: 220278,
target: 7844 });
// 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: 111224,
label: 'COURSE: Introduction to data analysis',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/introduction-to-data-analysis-4/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328111224,
size: 0.5,
source: 63328,
target: 111224,
});
//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: 7848,
label: 'Stéphane Descorps-Declère',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/05/research_pasteur-img_20170804_170423_hdr-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/stephane-descorps-declere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1112247848,
size: 0.5,
source: 111224,
target: 7848 });
//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: 906,
label: 'Marie-Agnès Dillies',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-photomadillies2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-agnes-dillies/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 111224906,
size: 0.5,
source: 111224,
target: 906 });
//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: 79863,
label: 'Gaël Millot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_gael-portrait-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gael-millot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11122479863,
size: 0.5,
source: 111224,
target: 79863 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11122463328,
size: 0.5,
source: 111224,
target: 63328 });
//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: 7762,
label: 'Stevenn Volant',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_stevennvolant-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/stevenn-volant/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1112247762,
size: 0.5,
source: 111224,
target: 7762 });
//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: 80008,
label: 'Quentin Giai Gianetto',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_p10001292_3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/quentin-giai-gianetto/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11122480008,
size: 0.5,
source: 111224,
target: 80008 });
//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: 80011,
label: 'Vincent Guillemot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_vincent-guillemot-1-e1479989507346-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/vincent-guillemot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11122480011,
size: 0.5,
source: 111224,
target: 80011 });
//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: 63337,
label: 'Nicolas Maillet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_690123-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nicolas-maillet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11122463337,
size: 0.5,
source: 111224,
target: 63337 });
//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: 74050,
label: 'Blaise Li',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/07/research.pasteur.fr_blaise-low-resolution-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/blaise-li/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11122474050,
size: 0.5,
source: 111224,
target: 74050 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 57911,
label: 'Anna Zhukova',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research_pasteur-anna-zhukova-anna2024-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anna-zhukova/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11122457911,
size: 0.5,
source: 111224,
target: 57911 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 2237,
label: 'Hugo Varet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/03/IMG_5255-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/hugo-varet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1112242237,
size: 0.5,
source: 111224,
target: 2237 });
//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: 11122453076,
size: 0.5,
source: 111224,
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: 6824,
label: 'Eric Deveaud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_edeveaud-copy-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eric-deveaud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1112246824,
size: 0.5,
source: 111224,
target: 6824 });
//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: 1112246833,
size: 0.5,
source: 111224,
target: 6833 });
// 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: 111196,
label: 'COURSE: Morning session – Introduction to NGS data analysis',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/morning-session-introduction-to-ngs-data-analysis/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328111196,
size: 0.5,
source: 63328,
target: 111196,
});
//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: 57919,
label: 'Claudia Chica',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-img_1035-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/claudia-chica/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11119657919,
size: 0.5,
source: 111196,
target: 57919 });
//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: 57758,
label: 'Frédéric Lemoine',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research_pasteur-frederic-lemoine-lemoine-frederic-26-small-crop-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/frederic-lemoine/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11119657758,
size: 0.5,
source: 111196,
target: 57758 });
//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: 4129,
label: 'Jack Christophe Cossec',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photowebsite2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jack-christophe-cossec/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111964129,
size: 0.5,
source: 111196,
target: 4129 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2237) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1111962237,
size: 0.5,
source: 111196,
target: 2237 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11119663328,
size: 0.5,
source: 111196,
target: 63328 });
//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: 63334,
label: 'Natalia Pietrosemoli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_natphoto-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/natalia-pietrosemoli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11119663334,
size: 0.5,
source: 111196,
target: 63334 });
//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: 4109,
label: 'Guilhem Janbon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/10/research_pasteur-img_0255r-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/guilhem-janbon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111964109,
size: 0.5,
source: 111196,
target: 4109 });
//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: 7760,
label: 'Varun Khanna',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=7760',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111967760,
size: 0.5,
source: 111196,
target: 7760 });
//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: 7763,
label: 'Rachel Torchet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_rachelgrandintorchet-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/rachel-torchet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111967763,
size: 0.5,
source: 111196,
target: 7763 });
//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: 7847,
label: 'Pierre Lechat',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig37-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-lechat/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111967847,
size: 0.5,
source: 111196,
target: 7847 });
//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: 37658,
label: 'Amine Ghozlane',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/06/research_pasteur-20200223_122542-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/amine-ghozlane/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11119637658,
size: 0.5,
source: 111196,
target: 37658 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63337) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11119663337,
size: 0.5,
source: 111196,
target: 63337 });
//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: 4424,
label: 'Axel Cournac',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-axel-cournac-photo6-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/axel-cournac/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111964424,
size: 0.5,
source: 111196,
target: 4424 });
//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: 4423,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111964423,
size: 0.5,
source: 111196,
target: 4423 });
// 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: 111174,
label: 'COURSE: Morning session – Data analysis using R',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/morning-session-data-analysis-using-r/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328111174,
size: 0.5,
source: 63328,
target: 111174,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 906) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 111174906,
size: 0.5,
source: 111174,
target: 906 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7762) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1111747762,
size: 0.5,
source: 111174,
target: 7762 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2237) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1111742237,
size: 0.5,
source: 111174,
target: 2237 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11117463328,
size: 0.5,
source: 111174,
target: 63328 });
//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: 84015,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11117484015,
size: 0.5,
source: 111174,
target: 84015 });
// 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: 111134,
label: 'COURSE: Introduction to Data Analysis',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/introduction-to-data-analysis-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328111134,
size: 0.5,
source: 63328,
target: 111134,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 906) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 111134906,
size: 0.5,
source: 111134,
target: 906 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 80011) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11113480011,
size: 0.5,
source: 111134,
target: 80011 });
//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: 84017,
label: 'Emeline Perthame',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/02/research_pasteur-emeline-perthame-2022-01-13-14.37.20-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/emeline-perthame/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11113484017,
size: 0.5,
source: 111134,
target: 84017 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2237) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1111342237,
size: 0.5,
source: 111134,
target: 2237 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7762) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1111347762,
size: 0.5,
source: 111134,
target: 7762 });
//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: 70981,
label: 'Thomas Obadia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_p1040999_crop-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-obadia/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11113470981,
size: 0.5,
source: 111134,
target: 70981 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 80008) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11113480008,
size: 0.5,
source: 111134,
target: 80008 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11113463328,
size: 0.5,
source: 111134,
target: 63328 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57919) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11113457919,
size: 0.5,
source: 111134,
target: 57919 });
//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: 4084,
label: 'Christophe Becavin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/04/research_pasteur-christophe-becavin-shoot-03_10_18-174-edit-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christophe-becavin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1111344084,
size: 0.5,
source: 111134,
target: 4084 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 79863) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11113479863,
size: 0.5,
source: 111134,
target: 79863 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 104985) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 111134104985,
size: 0.5,
source: 111134,
target: 104985 });
// 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: 111088,
label: 'COURSE: Introduction to Data Analysis',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/introduction-to-data-analysis/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328111088,
size: 0.5,
source: 63328,
target: 111088,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 906) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 111088906,
size: 0.5,
source: 111088,
target: 906 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7848) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1110887848,
size: 0.5,
source: 111088,
target: 7848 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 80011) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108880011,
size: 0.5,
source: 111088,
target: 80011 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 84017) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108884017,
size: 0.5,
source: 111088,
target: 84017 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2237) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1110882237,
size: 0.5,
source: 111088,
target: 2237 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7762) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1110887762,
size: 0.5,
source: 111088,
target: 7762 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 70981) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108870981,
size: 0.5,
source: 111088,
target: 70981 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 79863) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108879863,
size: 0.5,
source: 111088,
target: 79863 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 80008) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108880008,
size: 0.5,
source: 111088,
target: 80008 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108863328,
size: 0.5,
source: 111088,
target: 63328 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 84015) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11108884015,
size: 0.5,
source: 111088,
target: 84015 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4084) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1110884084,
size: 0.5,
source: 111088,
target: 4084 });
// 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: 110826,
label: 'PROJECT: Bioconvert',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/bioconvert/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328110826,
size: 0.5,
source: 63328,
target: 110826,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11082663328,
size: 0.5,
source: 110826,
target: 63328 });
//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: 104972,
label: 'Bryan Brancotte',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-me-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/bryan-brancotte/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 110826104972,
size: 0.5,
source: 110826,
target: 104972 });
//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: 104999,
label: 'Yoann Dufresne',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-profile-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/yoann-dufresne/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 110826104999,
size: 0.5,
source: 110826,
target: 104999 });
//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: 82340,
label: 'Kenzo-Hugo Hillion',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-img_5340-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-kenzo-hugo-hillion/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11082682340,
size: 0.5,
source: 110826,
target: 82340 });
//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: 81431,
label: 'Etienne Kornobis',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/06/research_pasteur-ekornobis-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/etienne-kornobis/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11082681431,
size: 0.5,
source: 110826,
target: 81431 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7847) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1108267847,
size: 0.5,
source: 110826,
target: 7847 });
//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: 57915,
label: 'Rachel Legendre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research_pasteur-rachel-legendre-img-20201028-145758-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/rachel-legendre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11082657915,
size: 0.5,
source: 110826,
target: 57915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11082657758,
size: 0.5,
source: 110826,
target: 57758 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 74050) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11082674050,
size: 0.5,
source: 110826,
target: 74050 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63337) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11082663337,
size: 0.5,
source: 110826,
target: 63337 });
//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: 11082653076,
size: 0.5,
source: 110826,
target: 53076 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7763) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1108267763,
size: 0.5,
source: 110826,
target: 7763 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11082657911,
size: 0.5,
source: 110826,
target: 57911 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 63340,
label: 'Thomas Cokelaer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-portrait-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/thomas-cokelaer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11082663340,
size: 0.5,
source: 110826,
target: 63340 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 6833) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1108266833,
size: 0.5,
source: 110826,
target: 6833 });
// 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: 106067,
label: 'TEAM: Expertise group: GORE – Genome Organization Regulation and Expression',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-enexpertise-group-gore-genome-organization-regulation-and-expressionfrgroupe-dexpertise-teg-transcriptomique-et-epigenomique-figure3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/hub-gore/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328106067,
size: 0.5,
source: 63328,
target: 106067,
});
//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: 4943,
label: 'Adrien Pain',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_dsc_8827_2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/adrien-pain/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1060674943,
size: 0.5,
source: 106067,
target: 4943 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57915) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 10606757915,
size: 0.5,
source: 106067,
target: 57915 });
//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: 152507,
label: 'Victoire Baillet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/01/research_pasteur-victoire-baillet-foo2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/victoire-baillet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 106067152507,
size: 0.5,
source: 106067,
target: 152507 });
//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: 153773,
label: 'Olivier Mirabeau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/02/research_pasteur-olivier-mirabeau-omirabeau-badge-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivier-mirabeau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 106067153773,
size: 0.5,
source: 106067,
target: 153773 });
//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: 187931,
label: 'Stephan Fischer',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/stephan-fischer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 106067187931,
size: 0.5,
source: 106067,
target: 187931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57919) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 10606757919,
size: 0.5,
source: 106067,
target: 57919 });
// 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: 102118,
label: 'PROJECT: MECANICOC',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/mecanicoc/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 63328102118,
size: 0.5,
source: 63328,
target: 102118,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 906) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 102118906,
size: 0.5,
source: 102118,
target: 906 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 10211863328,
size: 0.5,
source: 102118,
target: 63328 });
//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: 4523,
label: 'Morgane Besson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/07/research_pasteur-capture-decran-2017-07-22-a-17.21.36-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/morgane-besson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1021184523,
size: 0.5,
source: 102118,
target: 4523 });
//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: 3793,
label: 'Pierre-Jean Corringer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo_corringer-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-jean-corringer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1021183793,
size: 0.5,
source: 102118,
target: 3793 });
//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: 4077,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1021184077,
size: 0.5,
source: 102118,
target: 4077 });
//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: 3801,
label: 'Uwe Maskos',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_um_1-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/uwe-maskos/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1021183801,
size: 0.5,
source: 102118,
target: 3801 });
// 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: 93379,
label: 'PROJECT: Genomic architecture of normal and pathological human neuroanatomical diversity',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/genomic-architecture-of-normal-and-pathological-human-neuroanatomical-diversity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 6332893379,
size: 0.5,
source: 63328,
target: 93379,
});
//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: 933793968,
size: 0.5,
source: 93379,
target: 3968 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 63328) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 9337963328,
size: 0.5,
source: 93379,
target: 63328 });
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) {
});