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: 7856,
label: 'Sophie Novault',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_sn-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=27
// 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: 219427,
label: 'EVENT: High-Dimensional Spectral Unsupervised Tool',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/high-dimensional-spectral-unsupervised-tool/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856219427,
size: 0.5,
source: 7856,
target: 219427,
});
//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: 7855,
label: 'Sandrine Schmutz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dsc76931-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sandrine-schmutz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2194277855,
size: 0.5,
source: 219427,
target: 7855 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2194277856,
size: 0.5,
source: 219427,
target: 7856 });
// 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: 219416,
label: 'EVENT: The Cytometry Platform is pleased to invite you to a BD webinar',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/february-5th-2024-from-2pm-to-3pm/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856219416,
size: 0.5,
source: 7856,
target: 219416,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2194167855,
size: 0.5,
source: 219416,
target: 7855 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2194167856,
size: 0.5,
source: 219416,
target: 7856 });
// 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: 214590,
label: 'NEWS: Easy Panel',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/easy-panel/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856214590,
size: 0.5,
source: 7856,
target: 214590,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2145907856,
size: 0.5,
source: 214590,
target: 7856 });
// 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: 214581,
label: 'TOOL: Easy Panel',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/12/research_pasteur-easy-panel-easypanel-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/tool/easy-panel__trashed/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856214581,
size: 0.5,
source: 7856,
target: 214581,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2145817856,
size: 0.5,
source: 214581,
target: 7856 });
// 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: 192992,
label: 'TOOL: Guidelines for DC preparation and flow cytometry analysis of mouse nonlymphoid tissues',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/12/research_pasteur-guidelines-for-dc-preparation-and-flow-cytometry-analysis-of-mouse-nonlymphoid-tissues-eji5363-fig-0002-m-150x150.png',
page_url: 'https://research.pasteur.fr/en/tool/guidelines-for-dc-preparation-and-flow-cytometry-analysis-of-mouse-nonlymphoid-tissues/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856192992,
size: 0.5,
source: 7856,
target: 192992,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1929927856,
size: 0.5,
source: 192992,
target: 7856 });
// 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: 192986,
label: 'TOOL: Cytometry Information (basic and advanced)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/tool/cytometry-information-basic-and-advanced/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856192986,
size: 0.5,
source: 7856,
target: 192986,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1929867856,
size: 0.5,
source: 192986,
target: 7856 });
// 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: 192978,
label: 'TOOL: Traditional Spectra Viewers and Full Spectrum Viewers',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/12/research_pasteur-traditional-spectra-viewers-and-full-spectrum-viewers-spectre-absorption-des-cones.svg-150x150.png',
page_url: 'https://research.pasteur.fr/en/tool/traditional-spectra-viewers-and-full-spectrum-viewers/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856192978,
size: 0.5,
source: 7856,
target: 192978,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1929787856,
size: 0.5,
source: 192978,
target: 7856 });
// 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: 190874,
label: 'EVENT: OMIQ',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/omiq__trashed/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856190874,
size: 0.5,
source: 7856,
target: 190874,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1908747855,
size: 0.5,
source: 190874,
target: 7855 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1908747856,
size: 0.5,
source: 190874,
target: 7856 });
// 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: 182817,
label: 'PROJECT: The Spectral Cytometry technology',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/the-spectral-cytometry-technology/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856182817,
size: 0.5,
source: 7856,
target: 182817,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1828177855,
size: 0.5,
source: 182817,
target: 7855 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1828177856,
size: 0.5,
source: 182817,
target: 7856 });
// 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: 182107,
label: 'EVENT: Flow Jo PLUGINS webinar',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/06/research_pasteur-flow-jo-plugins-webinar-affiche-flowjo-plugins--2022-vf-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/event/flow-jo-plugins-webinar/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856182107,
size: 0.5,
source: 7856,
target: 182107,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1821077856,
size: 0.5,
source: 182107,
target: 7856 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1821077855,
size: 0.5,
source: 182107,
target: 7855 });
// 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: 180669,
label: 'TOOL: New LIVE/DEAD fixable viability dyes— more colors, more choices – Invitrogen',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/05/research_pasteur-new-livedead-fixable-viability-dyes-more-colors-more-choices-invitrogen-invitrogen-e1652176360953.jpg',
page_url: 'https://research.pasteur.fr/en/tool/new-live-dead-fixable-viability-dyes-more-colors-more-choices-invitrogen/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856180669,
size: 0.5,
source: 7856,
target: 180669,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1806697856,
size: 0.5,
source: 180669,
target: 7856 });
// 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: 178133,
label: 'PROJECT: The Nano Flow Cytometry Pipeline',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/the-nano-flow-cytometry-pipeline/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856178133,
size: 0.5,
source: 7856,
target: 178133,
});
//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: 7854,
label: 'Pierre-Henri Commere',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/pierre-henri-commere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1781337854,
size: 0.5,
source: 178133,
target: 7854 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1781337856,
size: 0.5,
source: 178133,
target: 7856 });
// 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: 175911,
label: 'TOOL: Flow Cytometry protocols – handbook',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/02/research_pasteur-flow-cytometry-protocols-handbook-thermofisher-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/tool/flow-cytometry-protocols-handbook/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856175911,
size: 0.5,
source: 7856,
target: 175911,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1759117856,
size: 0.5,
source: 175911,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 13 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 13 * Math.PI / N) * 10;
g.nodes.push({
id: 175343,
label: 'EVENT: Intro to FlowJo v10-En',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/01/research_pasteur-intro-to-flowjo-v10-fr-fj-22-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/event/intro-to-flowjo-v10-en/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856175343,
size: 0.5,
source: 7856,
target: 175343,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1753437856,
size: 0.5,
source: 175343,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 14 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 14 * Math.PI / N) * 10;
g.nodes.push({
id: 166511,
label: 'NEWS: New Highlighted publication: “Cryptococcus extracellular vesicles properties and their use as vaccine platforms”, Juliana Rizzo et al. JEV, 2021, RNA Biology of Fungal Pathogen team',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/not-a-virus-but-a-fungal-extracellular-vesicle-a-highlighted-publication-from-juliana-rizzo-et-al-jev-2021-rna-biology-of-fungal-pathogen-team/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856166511,
size: 0.5,
source: 7856,
target: 166511,
});
//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: 132763,
label: 'Juliana Rizzo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-ju2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/juliana-rizzo-balancin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 166511132763,
size: 0.5,
source: 166511,
target: 132763 });
//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: 4039,
label: 'Sarah Wong',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-sarah1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sarah-wong/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1665114039,
size: 0.5,
source: 166511,
target: 4039 });
//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: 68441,
label: 'Anastasia Gazi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/08/research.pasteur.fr_adgaz-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anastasia-gazi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 16651168441,
size: 0.5,
source: 166511,
target: 68441 });
//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: 8188,
label: 'Frédérique Moyrand',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_moyrand-150x150.gif',
page_url: 'https://research.pasteur.fr/en/member/frederique-moyrand/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1665118188,
size: 0.5,
source: 166511,
target: 8188 });
//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: 1058,
label: 'Thibault Chaze',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=1058',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1665111058,
size: 0.5,
source: 166511,
target: 1058 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7854) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1665117854,
size: 0.5,
source: 166511,
target: 7854 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1665117856,
size: 0.5,
source: 166511,
target: 7856 });
//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: 1056,
label: 'Mariette Matondo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/Mariette_Matondo-e1424076805247-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/mariette-matondo-bouzanda/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1665111056,
size: 0.5,
source: 166511,
target: 1056 });
//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: 1559,
label: 'Gérard Pehau-Arnaudet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/04/research_pasteur-gpa-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gerard-pehau-arnaudet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1665111559,
size: 0.5,
source: 166511,
target: 1559 });
//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: 118432,
label: 'Matthijn Vos',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/04/research_pasteur-matthijn-vos-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/matthijn-vos/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 166511118432,
size: 0.5,
source: 166511,
target: 118432 });
//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: 4443,
label: 'Vishu Kumar Aimanianda Bopaiah',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/11/research_pasteur-photo-4cm-essai-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/vishu-kumar-aimanianda-bopaiah/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1665114443,
size: 0.5,
source: 166511,
target: 4443 });
//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: 1665114109,
size: 0.5,
source: 166511,
target: 4109 });
// adding node
var x_node = Math.cos(2 * 15 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 15 * Math.PI / N) * 10;
g.nodes.push({
id: 157918,
label: 'TOOL: Cytometry Memory Aid',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/05/research_pasteur-cytometry-memory-aid-1-poster-pfc1red-1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/tool/157918/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856157918,
size: 0.5,
source: 7856,
target: 157918,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1579187856,
size: 0.5,
source: 157918,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 16 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 16 * Math.PI / N) * 10;
g.nodes.push({
id: 160417,
label: 'TOOL: Cytometry Protocols',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/tool/cytometry-protocols/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856160417,
size: 0.5,
source: 7856,
target: 160417,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1604177856,
size: 0.5,
source: 160417,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 17 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 17 * Math.PI / N) * 10;
g.nodes.push({
id: 160395,
label: 'TOOL: Smartphone-Tablets Applications',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/tool/smartphone-tablets-applications/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856160395,
size: 0.5,
source: 7856,
target: 160395,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1603957856,
size: 0.5,
source: 160395,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 18 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 18 * Math.PI / N) * 10;
g.nodes.push({
id: 134894,
label: 'TOOL: Single Cell Phenotyping – Flow Cytometry',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-single-cell-genomics-banc-optique-de-lanalyseur-symphony-a5-copy-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/tool/single-cell-phenotyping-and-sorting/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856134894,
size: 0.5,
source: 7856,
target: 134894,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1348947856,
size: 0.5,
source: 134894,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 19 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 19 * Math.PI / N) * 10;
g.nodes.push({
id: 133728,
label: 'EVENT: Advanced multicolor immunophenotyping & Essential tools for microbiology',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-capturethermo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/event/advanced-multicolor-immunophenotyping-essential-tools-for-microbiology/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856133728,
size: 0.5,
source: 7856,
target: 133728,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1337287856,
size: 0.5,
source: 133728,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 20 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 20 * Math.PI / N) * 10;
g.nodes.push({
id: 121729,
label: 'EVENT: MicroOmiX : Enabling droplet microfluidics technologies',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/microomix-enabling-droplet-microfluidics-technologies/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 7856121729,
size: 0.5,
source: 7856,
target: 121729,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7854) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1217297854,
size: 0.5,
source: 121729,
target: 7854 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1056) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1217291056,
size: 0.5,
source: 121729,
target: 1056 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1217297856,
size: 0.5,
source: 121729,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 21 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 21 * Math.PI / N) * 10;
g.nodes.push({
id: 56224,
label: 'PROJECT: Service & Support',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/service-support/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 785656224,
size: 0.5,
source: 7856,
target: 56224,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 562247856,
size: 0.5,
source: 56224,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 22 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 22 * Math.PI / N) * 10;
g.nodes.push({
id: 51182,
label: 'SOFTWARE: BD FACS Diva software version 8.0',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/software/bd-facs-diva-software/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 785651182,
size: 0.5,
source: 7856,
target: 51182,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 511827856,
size: 0.5,
source: 51182,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 23 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 23 * Math.PI / N) * 10;
g.nodes.push({
id: 50446,
label: 'PROJECT: What is Cytometry',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/what-is-cytometry/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 785650446,
size: 0.5,
source: 7856,
target: 50446,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 504467856,
size: 0.5,
source: 50446,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 24 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 24 * Math.PI / N) * 10;
g.nodes.push({
id: 51668,
label: 'TOOL: Spectrum viewer',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/tool/spectrum-viewer/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 785651668,
size: 0.5,
source: 7856,
target: 51668,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 516687856,
size: 0.5,
source: 51668,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 25 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 25 * Math.PI / N) * 10;
g.nodes.push({
id: 51187,
label: 'SOFTWARE: FlowJo version X',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research_pasteur-flowjo-version-x-fj2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/software/flowjo/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 785651187,
size: 0.5,
source: 7856,
target: 51187,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 511877855,
size: 0.5,
source: 51187,
target: 7855 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7854) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 511877854,
size: 0.5,
source: 51187,
target: 7854 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 511877856,
size: 0.5,
source: 51187,
target: 7856 });
// adding node
var x_node = Math.cos(2 * 26 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 26 * Math.PI / N) * 10;
g.nodes.push({
id: 36902,
label: 'TEAM: Flow Cytometry Platform',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research_pasteur-enflow-cytometry-platformfrplateforme-de-cytometrie-pf-nouvault-a5-flow-cell-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/cytometry/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 785636902,
size: 0.5,
source: 7856,
target: 36902,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 369027855,
size: 0.5,
source: 36902,
target: 7855 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7854) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 369027854,
size: 0.5,
source: 36902,
target: 7854 });
//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: 102167,
label: 'Sebastien Megharba',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-sebastien-megharba-photo-pasteur-scaled-e1649164887421-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sebastien-megharba/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36902102167,
size: 0.5,
source: 36902,
target: 102167 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7856) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 369027856,
size: 0.5,
source: 36902,
target: 7856 });
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) {
});