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: 4775,
label: 'Carla Saleh',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha68-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=15
// 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: 224718,
label: 'EVENT: Adapting to Change: Emerging Infectious Diseases in a Shifting Climate',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/ibeid-congress-24/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775224718,
size: 0.5,
source: 4775,
target: 224718,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2247184775,
size: 0.5,
source: 224718,
target: 4775 });
//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: 3949,
label: 'Philippe Bastin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_philippe_bastin-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/philippe-bastin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2247183949,
size: 0.5,
source: 224718,
target: 3949 });
//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: 203306,
label: 'Cyril Renassia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/06/research_pasteur-cyril-renassia-photo-cv-2023-cropped-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/cyril-renassia/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 224718203306,
size: 0.5,
source: 224718,
target: 203306 });
//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: 4255,
label: 'Anna-Bella Failloux',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_ab-failloux3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anna-bella-failloux/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2247184255,
size: 0.5,
source: 224718,
target: 4255 });
//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: 4765,
label: 'Etienne Simon-Loriere',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_e.simon-loriere_1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/etienne-simon-loriere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2247184765,
size: 0.5,
source: 224718,
target: 4765 });
//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: 4058,
label: 'Chetan Chitnis',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_chitnis_photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/chetan-chitnis/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2247184058,
size: 0.5,
source: 224718,
target: 4058 });
//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: 23955,
label: 'Nadine Cerf-Bensussan',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/epartner/nadine-cerf-bensussan/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 22471823955,
size: 0.5,
source: 224718,
target: 23955 });
//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: 4087,
label: 'Mélanie Hamon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_p1010312-version-2-4-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/melanie-hamon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2247184087,
size: 0.5,
source: 224718,
target: 4087 });
// 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: 224344,
label: 'NEWS: IBEID Labex Day 24',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/ibeid-labex-day-24/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775224344,
size: 0.5,
source: 4775,
target: 224344,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2243444775,
size: 0.5,
source: 224344,
target: 4775 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3949) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2243443949,
size: 0.5,
source: 224344,
target: 3949 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 203306) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 224344203306,
size: 0.5,
source: 224344,
target: 203306 });
// 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: 224340,
label: 'EVENT: IBEID Labex Day 24',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/labex-day-24/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775224340,
size: 0.5,
source: 4775,
target: 224340,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 203306) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 224340203306,
size: 0.5,
source: 224340,
target: 203306 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3949) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2243403949,
size: 0.5,
source: 224340,
target: 3949 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2243404775,
size: 0.5,
source: 224340,
target: 4775 });
// 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: 218172,
label: 'PROJECT: Étude du rôle de gènes viraux dans la transmission des arbovirus par les moustiques : HB4EIMA (2023-007)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/etude-du-role-de-genes-viraux-dans-la-transmission-des-arbovirus-par-les-moustiques-hb4eima-2023-007/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775218172,
size: 0.5,
source: 4775,
target: 218172,
});
//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: 200933,
label: 'Magdalena Stroksztejn',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/magdalena-stroksztejn/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 218172200933,
size: 0.5,
source: 218172,
target: 200933 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2181724775,
size: 0.5,
source: 218172,
target: 4775 });
//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: 8600,
label: 'Hélène Laude',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/10/research_pasteur-photo_helene_laude-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/helene-laude/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2181728600,
size: 0.5,
source: 218172,
target: 8600 });
// 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: 131072,
label: 'PROJECT: PREventing EMerging Pahtogenic Threats (PREEMPT) (DARPA)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/08/research_pasteur-darpa-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/preventing-emerging-pahtogenic-threats-preempt-darpa/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775131072,
size: 0.5,
source: 4775,
target: 131072,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4255) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1310724255,
size: 0.5,
source: 131072,
target: 4255 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1310724775,
size: 0.5,
source: 131072,
target: 4775 });
// 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: 112703,
label: 'EVENT: Virology seminar: “An Introduction to the bioinformatics analysis of Nanopore sequencing – With Questions and Answers Session”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/virology-seminar-an-introduction-to-the-bioinformatics-analysis-of-nanopore-sequencing-with-question-answers-session/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775112703,
size: 0.5,
source: 4775,
target: 112703,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1127034775,
size: 0.5,
source: 112703,
target: 4775 });
// 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: 111602,
label: 'EVENT: Virology department seminar : “Parallel ClickSeq and Nanopore deep-sequencing characterizes the emergence and evolution of defective viral genomes”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/virology-department-seminar-parallel-clickseq-and-nanopore-deep-sequencing-characterizes-the-emergence-and-evolution-of-defective-viral-genomes-with-andrew-l-routh/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775111602,
size: 0.5,
source: 4775,
target: 111602,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1116024775,
size: 0.5,
source: 111602,
target: 4775 });
// 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: 105943,
label: 'EVENT: “Collateral damage during dengue virus infection: Making sense of DNA by cGAS” with Sebastian Aguirre -Virology department seminar',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/collateral-damage-during-dengue-virus-infection-making-sense-of-dna-by-cgas-with-sebastian-aguirre-virology-department-seminar/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775105943,
size: 0.5,
source: 4775,
target: 105943,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1059434775,
size: 0.5,
source: 105943,
target: 4775 });
//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: 4952,
label: 'Gonzalo Moratorio',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4952',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1059434952,
size: 0.5,
source: 105943,
target: 4952 });
// 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: 100703,
label: 'NEWS: Hot off the press: DENV host factors identified by innovative transcriptomics approach',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/12/research_pasteur-fig2a-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/hot-off-press-dengue-virus-host-factors-identified-innovative-transcriptomics-approach/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4775100703,
size: 0.5,
source: 4775,
target: 100703,
});
//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: 4438,
label: 'Louis Lambrechts',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-louis-lambrechts-dsc6143-cropped-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/louis-lambrechts/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1007034438,
size: 0.5,
source: 100703,
target: 4438 });
//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: 4440,
label: 'Vincent Raquin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_vincent-150x150.gif',
page_url: 'https://research.pasteur.fr/en/member/vincent-raquin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1007034440,
size: 0.5,
source: 100703,
target: 4440 });
//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: 7721,
label: 'Isabelle Conclois',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_conclois-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/isabelle-conclois/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1007037721,
size: 0.5,
source: 100703,
target: 7721 });
//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: 62643,
label: 'Sarah Merkling',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_img_1465-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/sarah-merkling/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10070362643,
size: 0.5,
source: 100703,
target: 62643 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1007034775,
size: 0.5,
source: 100703,
target: 4775 });
//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: 4777,
label: 'Lionel Frangeul',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha77-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lionel-frangeul/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1007034777,
size: 0.5,
source: 100703,
target: 4777 });
//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: 100703906,
size: 0.5,
source: 100703,
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: 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: 1007032237,
size: 0.5,
source: 100703,
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: 8628,
label: 'Valérie Dorey',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha75-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/valerie-dorey/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1007038628,
size: 0.5,
source: 100703,
target: 8628 });
// 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: 42026,
label: 'PROJECT: ERC-2013-CoG 615220-“RNAiMMUNITY”-Dynamics of the RNAi mediated antiviral immunity',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_erc-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/erc-2013-cog-615220-rnaimmunity-dynamics-of-the-rnai-mediated-antiviral-immunity/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 477542026,
size: 0.5,
source: 4775,
target: 42026,
});
//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: 8627,
label: 'Hervé Blanc',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha76-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/herve-blanc/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420268627,
size: 0.5,
source: 42026,
target: 8627 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8628) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420268628,
size: 0.5,
source: 42026,
target: 8628 });
//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: 4773,
label: 'Vanesa Mongelli',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4773',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420264773,
size: 0.5,
source: 42026,
target: 4773 });
//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: 4770,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420264770,
size: 0.5,
source: 42026,
target: 4770 });
//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: 4771,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420264771,
size: 0.5,
source: 42026,
target: 4771 });
//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: 4772,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420264772,
size: 0.5,
source: 42026,
target: 4772 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4777) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420264777,
size: 0.5,
source: 42026,
target: 4777 });
//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: 4774,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420264774,
size: 0.5,
source: 42026,
target: 4774 });
//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: 4776,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420264776,
size: 0.5,
source: 42026,
target: 4776 });
//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: 8396,
label: 'Brigitte Bidault',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha78-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/brigitte-bidault/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 420268396,
size: 0.5,
source: 42026,
target: 8396 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420264775,
size: 0.5,
source: 42026,
target: 4775 });
// 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: 42015,
label: 'PROJECT: ERC-StG 242703-“Antiviral RNAi”- RNAi mediated viral immunity in insects',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_erc-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/erc-stg-242703-antiviral-rnai-rnai-mediated-viral-immunity-in-insects/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 477542015,
size: 0.5,
source: 4775,
target: 42015,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8627) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420158627,
size: 0.5,
source: 42015,
target: 8627 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8628) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420158628,
size: 0.5,
source: 42015,
target: 8628 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4773) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154773,
size: 0.5,
source: 42015,
target: 4773 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154770,
size: 0.5,
source: 42015,
target: 4770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4771) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154771,
size: 0.5,
source: 42015,
target: 4771 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4772) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154772,
size: 0.5,
source: 42015,
target: 4772 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4777) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154777,
size: 0.5,
source: 42015,
target: 4777 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4774) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154774,
size: 0.5,
source: 42015,
target: 4774 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4776) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154776,
size: 0.5,
source: 42015,
target: 4776 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8396) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420158396,
size: 0.5,
source: 42015,
target: 8396 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 420154775,
size: 0.5,
source: 42015,
target: 4775 });
// 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: 39169,
label: 'PROJECT: Functional characterization of mosquito genes involved in dengue virus transmission identified by RNA-seq at the individual midgut level',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_deseqplot-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/functional-characterization-of-mosquito-genes-involved-in-dengue-virus-transmission-identified-by-rna-seq-at-the-individual-midgut-level/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 477539169,
size: 0.5,
source: 4775,
target: 39169,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 391694775,
size: 0.5,
source: 39169,
target: 4775 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4777) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 391694777,
size: 0.5,
source: 39169,
target: 4777 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4440) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 391694440,
size: 0.5,
source: 39169,
target: 4440 });
//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: 39169906,
size: 0.5,
source: 39169,
target: 906 });
//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: 391692237,
size: 0.5,
source: 39169,
target: 2237 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 62643) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 3916962643,
size: 0.5,
source: 39169,
target: 62643 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4438) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 391694438,
size: 0.5,
source: 39169,
target: 4438 });
// 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: 14686,
label: 'PROGRAM_PROJECT: LabEx IBEID – Integrative Biology of Emerging Infectious Diseases',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_labex-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/program_project/integrative-biology-of-emerging-infectious-diseases/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 477514686,
size: 0.5,
source: 4775,
target: 14686,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 203306) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 14686203306,
size: 0.5,
source: 14686,
target: 203306 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3949) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 146863949,
size: 0.5,
source: 14686,
target: 3949 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 146864775,
size: 0.5,
source: 14686,
target: 4775 });
// 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: 20261,
label: 'PROJECT: The Lab Project',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_fly-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/20261/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 477520261,
size: 0.5,
source: 4775,
target: 20261,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614775,
size: 0.5,
source: 20261,
target: 4775 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8396) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202618396,
size: 0.5,
source: 20261,
target: 8396 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8627) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202618627,
size: 0.5,
source: 20261,
target: 8627 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8628) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202618628,
size: 0.5,
source: 20261,
target: 8628 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4777) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614777,
size: 0.5,
source: 20261,
target: 4777 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614770,
size: 0.5,
source: 20261,
target: 4770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4771) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614771,
size: 0.5,
source: 20261,
target: 4771 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4772) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614772,
size: 0.5,
source: 20261,
target: 4772 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4773) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614773,
size: 0.5,
source: 20261,
target: 4773 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4774) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614774,
size: 0.5,
source: 20261,
target: 4774 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4776) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 202614776,
size: 0.5,
source: 20261,
target: 4776 });
// 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: 6225,
label: 'TEAM: Viruses and RNA Interference',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_i02257-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/viruses-and-rna-interference/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 47756225,
size: 0.5,
source: 4775,
target: 6225,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8627) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62258627,
size: 0.5,
source: 6225,
target: 8627 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8628) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62258628,
size: 0.5,
source: 6225,
target: 8628 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4777) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62254777,
size: 0.5,
source: 6225,
target: 4777 });
//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: 123659,
label: 'Cassandra Koh',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/03/research_pasteur-cassandra-koh-koh-cassandra-1705-2-e1708108581324-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/cassandra-koh/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225123659,
size: 0.5,
source: 6225,
target: 123659 });
//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: 177763,
label: 'Ottavia Romoli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/03/research_pasteur-romoli-ottavia-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ottavia-romoli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225177763,
size: 0.5,
source: 6225,
target: 177763 });
//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: 177766,
label: 'Annabelle Henrion Lacritick',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/03/research_pasteur-annabelle-henrion-lacritick-853x1024-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/annabelle-henrion-lacritik/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225177766,
size: 0.5,
source: 6225,
target: 177766 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 179500,
label: 'Marie Philippe',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/04/research_pasteur-marie-philippe-photo-marie-identite-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/marie-philippe/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225179500,
size: 0.5,
source: 6225,
target: 179500 });
//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: 194966,
label: 'Inès Partouche',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/ines-partouche/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225194966,
size: 0.5,
source: 6225,
target: 194966 });
//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: 194968,
label: 'Mauro Castello Sanjuan',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/mauro-castello-sanjuan/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225194968,
size: 0.5,
source: 6225,
target: 194968 });
//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: 214701,
label: 'Alexandros Belavilas Trovas',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/alexandros-belavilas-trovas/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225214701,
size: 0.5,
source: 6225,
target: 214701 });
//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: 214714,
label: 'Eugenia Soledad Bardossy',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/eugenia-soledad-bardossy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225214714,
size: 0.5,
source: 6225,
target: 214714 });
//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: 234931,
label: 'Ruben Gonzalez Miguelez',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/ruben-gonzales-miguelez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6225234931,
size: 0.5,
source: 6225,
target: 234931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4775) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62254775,
size: 0.5,
source: 6225,
target: 4775 });
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) {
});