NetSets comes in two forms for usage in web-applications

  • Standalone HTML App

    End-users may simply download the server independent bundle of NetSets app, wherein users can paste edge-lists of choice in pre-designed text-areas and start using the application of NetSets right away in their local machines without the need of internet or any installation requirements.

    The same may also be directly hosted on local or remote servers for broader accessibility across a team/community. This however may not be needed as we provide the fully functional web-app at https://web.rniapps.net/netsets/ for general public access.

    Use this button to download the HTML APP bundle of NetSets DOWNLOAD HTML APP BUNDLE

Following is the simplistic example of how to initialize NetSets using edge-lists:


var edges=[{
        name: 'East',
        data: ["Acidiphilium-Oscillibacter", "Acidiphilium-Sutterella", "Aggregatibacter-Haemophilus", "Akkermansia-Victivallis", "Bacteroides-Parabacteroides", "Bilophila-Megasphaera", "Blautia-Roseburia"]
      }, {
        name: 'West',
        data: ["Actinobacillus-Haemophilus","Actinomyces-Clostridium","Actinomyces-Turicibacter","Alistipes-Bacteroides","Alistipes-Odoribacter","Anaerobiospirillum-Haemophilus","Bacteroides-Klebsiella","Bacteroides-Parabacteroides","Bacteroides-Prevotella","Blautia-Dialister","Blautia-Lachnoclostridium","Blautia-Phascolarctobacterium","Blautia-Roseburia","Blautia-Sutterella"]
      }];

netset({
edgelist: edges
});

Multiple edge lists need to be supplied to NetSets API in the form of following JSON structure (series datatype)

var edges=[{
        name: 'Net1',
        data: ["Acidiphilium-Oscillibacter", "Acidiphilium-Sutterella", "Aggregatibacter-Haemophilus"]
      },{
        name: 'Net2',
        data: ["Akkermansia-Victivallis", "Bacteroides-Escherechia", "Bilophila-Megasphaera", "Blautia-Roseburia"]
      },{
        name: 'Net3',
        data: ["Actinobacillus-Haemophilus","Actinomyces-Clostridium","Actinomyces-Turicibacter","Alistipes-Bacteroides","Alistipes-Odoribacter"]

}];

By default, dash (-) is used as delimiter, which can be customized by specifying in the netset function call as follows

var edge_comma=[{
        name: 'Net1',
        data: ["Acidiphilium,Oscillibacter", "Acidiphilium,Sutterella", "Aggregatibacter,Haemophilus"]
      },{
        name: 'Net2',
        data: ["Akkermansia,Victivallis", "Bacteroides,Escherechia", "Bilophila,Megasphaera", "Blautia,Roseburia"]
      },{
        name: 'Net3',
        data: ["Actinobacillus,Haemophilus","Actinomyces,Clostridium","Actinomyces,Turicibacter","Alistipes,Bacteroides","Alistipes,Odoribacter"]
      }];

netset({
edgelist: edge_comma,
delimiter: ","
});

Given NetSets creates two Venn Diagrams using the edge list, one needs to specify the div IDs in which the corresponding Venn Diagrams need to be rendered. By default, NetSets assumes that Edge Venn should be assigned to edvenn and Node Venn to nodvenn. However, custom divs can be specified for these Venn diagrams as follows:

<div id="Venn_of_Edges"></div>
<div id="Venn_of_Nodes"></div> 

<script>
    netset({
           edgelist: edges_series,
           edgeid: "Venn_of_Edges",
           nodeid: "Venn_of_Nodes"
          })
</script>

NetSets relies on cytoscape API for visualizing the graphs of intersecting or exclusive edges as obtained from Venn Diagram. One needs to specify the div ID in which the corresponding network diagram need to be rendered. By default, NetSets assumes that Network diagram should be assigned to the div with cy ID. However, custom divs can be specified for the network diagram as follows:

<div id="Venn_of_Edges"></div>
<div id="Venn_of_Nodes"></div> 
<div id="networkdiv" style='height:30%'></div>
<script>
    netset({
           edgelist: edges_series,
           edgeid: "Venn_of_Edges",
           nodeid: "Venn_of_Nodes",
           networkid: "networkdiv"
          })
</script>

The default mode of Venn Layout is 'classic'. If an Edwards-Venn diagram display is needed, vennlayout parameter may be set to 'edwards'.

    netset({
           vennlayout: "edwards"
          })

There are many other customization options available in the API as follows

    colors : ["rgb(0,102,0)", "rgb(90,155,212)", "rgb(241,90,96)", "rgb(250,220,91)", "rgb(255,117,0)", "rgb(192,152,83)"], // Color array to be used by NetSets API for the Venn Diagram circles.
    fontfamily : "monospace", //options: Arial, monospace
    shortNumbers : false,     // true, false (replace big numbers with hoverable ? mark)
    displayswitch : false,    // true, false (Switch to hide Venn Circles)
    displayStats : true,      // true, false (Show bars below the Venn?)
    fontsize : '11px',        // any px (Font size for Venn Diagram)
    nodecolor : "#006795",    // any hexcode (Color for Network diagram nodes)
    layout : "breadthfirst",  // any cytoscape layout (layout for network diagram e.g breadthfirst, grid, random, circle,cose,concentric,hierarchical etc.)
    searchedgebox : null,     // Div ID where edge search box should be rendered (by default none)
    edgesearchstat : null,    // Div ID where edge search ouput should be rendered (by default none)
    searchnodebox : null,     // Div ID where node search box should be rendered (by default none)
    nodesearchstat : null    // Div ID where node search output should be rendered (by default none)