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: 4612,
label: 'Thérèse Malliavin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_3ccf6f5-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=16
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 153569,
label: 'PROJECT: Multi-scale and multi-resolution bio-molecular structure determination by geometric approaches – multiBioStruct',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/multi-scale-and-multi-resolution-bio-molecular-structure-determination-by-geometric-approaches/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612153569,
size: 0.5,
source: 4612,
target: 153569,
});
//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: 153534,
label: 'Georg Daniel Förster',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/01/research_pasteur-georg-daniel-forster-photo-forster-small-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/georg-daniel-forster/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 153569153534,
size: 0.5,
source: 153569,
target: 153534 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1535694612,
size: 0.5,
source: 153569,
target: 4612 });
// 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: 129666,
label: 'PROJECT: Genomic insights into the 2016-2017 cholera epidemic in Yemen',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-figure2_weill_yemen_revision2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/genomic-insights-into-the-2016-2017-cholera-epidemic-in-yemen/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612129666,
size: 0.5,
source: 4612,
target: 129666,
});
//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: 4713,
label: 'Elisabeth Njamkepo Nguemkam',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_photo-elisabeth-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/elisabeth-njamkepo-nguemkam/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1296664713,
size: 0.5,
source: 129666,
target: 4713 });
//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: 8532,
label: 'Jean Rauzier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=8532',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1296668532,
size: 0.5,
source: 129666,
target: 8532 });
//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: 1633,
label: 'Christiane Bouchier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/christiane-bouchier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1296661633,
size: 0.5,
source: 129666,
target: 1633 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1296664612,
size: 0.5,
source: 129666,
target: 4612 });
//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: 4708,
label: 'Francois-Xavier Weill',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-weill-francois-xavier-34recadre-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francois-xavier-weill/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1296664708,
size: 0.5,
source: 129666,
target: 4708 });
//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: 4706,
label: 'Marie-Laure Quilici',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_photo-mlq-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/marie-laure-quilici/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1296664706,
size: 0.5,
source: 129666,
target: 4706 });
// 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: 127212,
label: 'EVENT: Seminar “Open-active and closed-inactive states of the human alpha7 nicotinic receptor: a molecular dynamics perspective”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/seminar-open-active-and-closed-inactive-states-of-the-human-alpha7-nicotinic-receptor-a-molecular-dynamics-perspective/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612127212,
size: 0.5,
source: 4612,
target: 127212,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1272124612,
size: 0.5,
source: 127212,
target: 4612 });
// 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: 112952,
label: 'EVENT: Cross-linking Mass Spectrometry constraint selection and Modeling for protein structure determination',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/cross-linking-mass-spectrometry-constraint-selection-and-modeling-for-protein-structure-determination/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612112952,
size: 0.5,
source: 4612,
target: 112952,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1129524612,
size: 0.5,
source: 112952,
target: 4612 });
// 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: 106865,
label: 'EVENT: Seminar of the Department of Structural Biology and Chemistry',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/seminar-of-the-department-of-structural-biology-and-chemistry/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612106865,
size: 0.5,
source: 4612,
target: 106865,
});
//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: 8206,
label: 'Maya Um',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=8206',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1068658206,
size: 0.5,
source: 106865,
target: 8206 });
//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: 4148,
label: 'Nadia Izadi-Pruneyre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_photo_site-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nadia-izadi-pruneyre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1068654148,
size: 0.5,
source: 106865,
target: 4148 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1068654612,
size: 0.5,
source: 106865,
target: 4612 });
//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: 62876,
label: 'Marcel Hollenstein',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_thrashmanlessthrash-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marcel-hollenstein/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10686562876,
size: 0.5,
source: 106865,
target: 62876 });
// 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: 105204,
label: 'EVENT: C3BI Seminar : MixMD: Mapping Protein Surfaces to Discover Druggable Allosteric Sites',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/c3bi-seminar-mixmd-mapping-protein-surfaces-discover-druggable-allosteric-sites/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612105204,
size: 0.5,
source: 4612,
target: 105204,
});
//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: 1052044717,
size: 0.5,
source: 105204,
target: 4717 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1052044612,
size: 0.5,
source: 105204,
target: 4612 });
//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: 1052044084,
size: 0.5,
source: 105204,
target: 4084 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 25653,
label: 'Olaya Rendueles-Garcia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-photo_olaya2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olaya-rendueles-garcia/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10520425653,
size: 0.5,
source: 105204,
target: 25653 });
// 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: 102187,
label: 'EVENT: C3BI/Dpt.Bio.Structural Seminar – The structural basis of SMS (Short Motif Sequence), mediated communication between proteins: characterization, modeling and manipulation',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/c3bi-dpt-bio-structural-seminar-ora-schueler-furman-structural-basis-sms-short-motif-sequence-mediated-communication-proteins-characterization-modeling-manipulation/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4612102187,
size: 0.5,
source: 4612,
target: 102187,
});
//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: 1021874084,
size: 0.5,
source: 102187,
target: 4084 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1021874612,
size: 0.5,
source: 102187,
target: 4612 });
// 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: 96542,
label: 'PROJECT: Conformational sampling and functional dynamics of histidine kinases',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/conformational-sampling-and-functional-dynamics-of-histidine-kinases/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461296542,
size: 0.5,
source: 4612,
target: 96542,
});
//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: 4627,
label: 'Nathalie Duclert-Savatier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/nathalie-duclert-savatier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 965424627,
size: 0.5,
source: 96542,
target: 4627 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 965424612,
size: 0.5,
source: 96542,
target: 4612 });
// 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: 96425,
label: 'PROJECT: Development of inhibitors targeting the allosteric activation of adenyl cyclases',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/development-of-inhibitors-targeting-the-allosteric-activation-of-key-enzymes-of-pathogens-application-to-adenyl-cyclase-toxins-of-infectious-bacteria/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461296425,
size: 0.5,
source: 4612,
target: 96425,
});
//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: 96427,
label: 'Irène Pitard',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/10/research_pasteur-njkxotc5-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/irene-pitard/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 9642596427,
size: 0.5,
source: 96425,
target: 96427 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 964254612,
size: 0.5,
source: 96425,
target: 4612 });
// 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: 90547,
label: 'EVENT: Carlile Lavor (UNICAMP, Brazil): Distance Geometry and Conformal Clifford Algebra',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/carlile-lavor-unicamp-brazil-distance-geometry-and-conformal-clifford-algebra/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461290547,
size: 0.5,
source: 4612,
target: 90547,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 905474612,
size: 0.5,
source: 90547,
target: 4612 });
// 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: 90038,
label: 'EVENT: Antonio Mucherino (IRISA, University of Rennes 1): Dynamical Distance Geometry and Proteins',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/dynamical-distance-geometry-and-proteins/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461290038,
size: 0.5,
source: 4612,
target: 90038,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 900384612,
size: 0.5,
source: 90038,
target: 4612 });
// 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: 89266,
label: 'EVENT: Computational geometry for the determination of biomolecular structures',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/computational-geometry-for-the-determination-of-biomolecular-structures/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461289266,
size: 0.5,
source: 4612,
target: 89266,
});
//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: 4611,
label: 'Benjamin Bardiaux',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_bardiaux-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/benjamin-bardiaux/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 892664611,
size: 0.5,
source: 89266,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 892664612,
size: 0.5,
source: 89266,
target: 4612 });
//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: 4622,
label: 'Mohamed Machat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4622',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 892664622,
size: 0.5,
source: 89266,
target: 4622 });
// 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: 53665,
label: 'PROJECT: Computational geometry for the determination of biomolecular structures',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_map_2ksl-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/computational-geometry-for-the-determination-of-biomolecular-structures/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461253665,
size: 0.5,
source: 4612,
target: 53665,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4622) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 536654622,
size: 0.5,
source: 53665,
target: 4622 });
//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: 66486,
label: 'Bradley Worley',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=66486',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 5366566486,
size: 0.5,
source: 53665,
target: 66486 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 536654612,
size: 0.5,
source: 53665,
target: 4612 });
// 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: 19832,
label: 'SOFTWARE: ARIA (Ambiguous Restraints for Iterative Assignment)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_logo_aria1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/software/aria-ambiguous-restraints-iterative-assignment/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461219832,
size: 0.5,
source: 4612,
target: 19832,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 198324611,
size: 0.5,
source: 19832,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 198324612,
size: 0.5,
source: 19832,
target: 4612 });
//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: 4623,
label: 'Michael Nilges',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/02/research.pasteur.fr_dsc3513-copy-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/michael-nilges/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 198324623,
size: 0.5,
source: 19832,
target: 4623 });
// 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: 24350,
label: 'TEAM: Functional dynamics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_structural-bioinformatics-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/group-therese-malliavin/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461224350,
size: 0.5,
source: 4612,
target: 24350,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 243504612,
size: 0.5,
source: 24350,
target: 4612 });
// 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: 20687,
label: 'PROJECT: Bip:Bip',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_bipbiplogo2-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/bipbip/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461220687,
size: 0.5,
source: 4612,
target: 20687,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874623,
size: 0.5,
source: 20687,
target: 4623 });
//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: 4615,
label: 'Arnaud Blondel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-id-a_blondel-c-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/arnaud-blondel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874615,
size: 0.5,
source: 20687,
target: 4615 });
//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: 4618,
label: 'Pak-Lee Chau',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/pak-lee-chau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874618,
size: 0.5,
source: 20687,
target: 4618 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874612,
size: 0.5,
source: 20687,
target: 4612 });
//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: 4613,
label: 'Edouard Yeramian',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-edouard-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/edouard-yeramian/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874613,
size: 0.5,
source: 20687,
target: 4613 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874611,
size: 0.5,
source: 20687,
target: 4611 });
//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: 4610,
label: 'Quang Tru Huynh',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/quang-tru-huynh/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874610,
size: 0.5,
source: 20687,
target: 4610 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4627) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874627,
size: 0.5,
source: 20687,
target: 4627 });
//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: 4624,
label: 'Riccardo Pellarin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_myself1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/riccardo-pellarin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874624,
size: 0.5,
source: 20687,
target: 4624 });
//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: 4625,
label: 'Silke Wieninger',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4625',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874625,
size: 0.5,
source: 20687,
target: 4625 });
//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: 4621,
label: 'Mathias Ferber',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4621',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874621,
size: 0.5,
source: 20687,
target: 4621 });
//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: 4616,
label: 'Guillaume Bouvier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/03/research.pasteur.fr_profile_1-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/guillaume-bouvier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874616,
size: 0.5,
source: 20687,
target: 4616 });
//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: 4620,
label: 'Nathan Desdouits',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4620',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874620,
size: 0.5,
source: 20687,
target: 4620 });
//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: 4619,
label: 'Isidro Cortes Ciriano',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4619',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874619,
size: 0.5,
source: 20687,
target: 4619 });
//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: 4617,
label: 'Simeon Carstens',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4617',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874617,
size: 0.5,
source: 20687,
target: 4617 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4622) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874622,
size: 0.5,
source: 20687,
target: 4622 });
//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: 4626,
label: 'Damien Monet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4626',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874626,
size: 0.5,
source: 20687,
target: 4626 });
//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: 4614,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874614,
size: 0.5,
source: 20687,
target: 4614 });
//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: 8205,
label: 'Audrey Legendre',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/audrey-legendre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206878205,
size: 0.5,
source: 20687,
target: 8205 });
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) {
});