├── .gitignore ├── LICENSE ├── MANIFEST ├── README.md ├── _config.yml ├── cytoscape_styles ├── colocalization.json ├── colocalization_style.xml ├── graph_overlap.json ├── heat_prop.json ├── heat_prop_style.xml ├── overlap_style.xml └── visJS_style.xml ├── docs ├── README.md ├── _config.yml ├── colocalization.png ├── graph_overlap.png └── heat_prop.png ├── notebooks ├── autism_prioritization │ ├── gene-report.csv │ └── validate_heat_prop_autism_2.ipynb ├── complex_params_example │ └── visJS2Jupyter_complex_example.ipynb ├── default_params_example │ ├── visJS2Jupyter_basic_example.ipynb │ └── visJS2Jupyter_basic_example_zeppelin.json ├── load_from_mitab_example │ └── load_mitab_data_example.ipynb ├── multigraph_example │ ├── .ipynb_checkpoints │ │ └── multigraph_example-checkpoint.ipynb │ ├── multigraph_example.ipynb │ └── style_file0.html ├── tcga_mutation_example │ ├── .ipynb_checkpoints │ │ └── TCGA_mutation_disease_drug-checkpoint.ipynb │ ├── TCGA_mutation_disease_drug.ipynb │ ├── drugbank.0.json.new │ └── mutation_EL.csv └── url_image_example │ └── url_image_network.ipynb ├── setup.py └── visJS2jupyter ├── __init__.py ├── scipy_heatKernel.py ├── visJS_module.py ├── visJS_module.pyc └── visualizations.py /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | *.pyc 3 | build/* 4 | *.egg-info/* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 UC San Diego Center for Computational Biology & Bioinformatics 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST: -------------------------------------------------------------------------------- 1 | # file GENERATED by distutils, do NOT edit 2 | setup.cfg 3 | setup.py 4 | visJS2jupyter/__init__.py 5 | visJS2jupyter/visJS_module.py 6 | visJS2jupyter/visualizations.py 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # visJS2jupyter 2 | 3 | **Please note** this tool is no longer actively maintained. Users may find ipycytoscape to be a good alternative https://github.com/cytoscape/ipycytoscape 4 | 5 | visJS2jupyter is a tool to bring the interactivity of networks created with vis.js into jupyter notebook cells, authored by members of the [UCSD Center for Computational Biology & Bioinformatics](http://compbio.ucsd.edu) 6 | 7 | There's also an option to get the output in a format compatible with Zeppelin notebook, ready to save as a standalone HTML file, or code to embed in your own HTML. 8 | 9 | For full documentation of the tool, see https://ucsd-ccbb.github.io/visJS2jupyter/ 10 | 11 | #### Please cite our accompanying paper: 12 | Rosenthal, S. B., Len, J., Webster, M., Gary, A., Birmingham, A., & Fisch, K. M. (2017). Interactive network visualization in Jupyter notebooks: visJS2jupyter. Bioinformatics. 13 | 14 | ## Getting Started 15 | 16 | These instructions will get you a copy of the package up and running on your local machine. 17 | 18 | ### Prerequisites 19 | 20 | You must have Jupyter notebook already installed. Visit [here](http://jupyter.org/install.html) for more information. 21 | 22 | Install matplotlib before using visJS2jupyter. Visit [here](http://matplotlib.org/users/installing.html) for more information. 23 | 24 | To use the visualizations module, install [networkX](https://networkx.github.io/) and [py2cytoscape](https://github.com/idekerlab/py2cytoscape): 25 | 26 | ``` 27 | pip install networkx==1.11 28 | pip install py2cytoscape 29 | ``` 30 | 31 | ### Installing 32 | 33 | visJS2jupyter supports both Python 2.7 and 3.4. 34 | 35 | You can install visJS2jupyter using pip: 36 | 37 | ``` 38 | pip install visJS2jupyter 39 | ``` 40 | 41 | In your Jupyter notebook, first import matplotlib: 42 | 43 | ``` 44 | import matplotlib 45 | ``` 46 | 47 | To import visJS_module, use the following: 48 | 49 | ``` 50 | import visJS2jupyter.visJS_module 51 | ``` 52 | 53 | To import visualizations, use the following: 54 | 55 | ``` 56 | import visJS2jupyter.visualizations 57 | ``` 58 | 59 | ## Features and Examples 60 | A simple use example with default parameters may be found here http://bl.ocks.org/m1webste/raw/be7be9d1b2c88e5549cf79b7edbc8444/ . In the example provided, we show how to display a graph created with NetworkX using visJS2jupyter. The networks displayed within Jupyter notebook cells may be dragged, clicked, and hovered on, and zooming is enabled within the window. 61 | 62 | For an example of how more complex styles may be added to a network, see http://bl.ocks.org/brinrosenthal/raw/658325f6e0db7419625a31c883313e9b/. Nodes and edges may be styled with properties available from vis.js networks (see https://visjs.github.io/vis-network/docs/network/ for a list and description of properties). The main function is 'visjs_network', which requires two inputs which describe the nodes and edges in the network- 'nodes_dict', and edges_dict'. The other arguments are optional, and apply general styles to the graph, such as sizes, highlight colors, and physics properties of the graph. 63 | 64 | An interactive use example of visJS2jupyter may be found [here](http://bl.ocks.org/brinrosenthal/raw/89ef33bebbf2d360099029666b1e8bea/) (scroll to the bottom to see the network). In this example, we display the bipartite network composed of diseases in [The Cancer Genome Atlas](http://cancergenome.nih.gov/) and the top 25 most common mutations in each disease. We also overlay information about drugs which target those mutations. Genes which have a drug targeting them are displayed with a bold black outline. The user may hover over each gene to get a list of associated drugs. 65 | 66 | For an example of how to style a multigraph using visJS2jupyter, see https://bl.ocks.org/m1webste/raw/db4aeda3f3e4a8840f08182f2e5d4608/ This notebook demonstrates how to use visJS2jupyter to visualize a NetworkX multigraph inside a jupyter notebook cell. visJS2jupyter can be used to manipulate numerous graph styling parameters (edge width, node color, node spacing, etc.). In this notebook, we exemplify manipulating a small subset of these features. Notibly, we demonstrate how to manipulate node and edge colors for a multigraph based off of node and edge attributes. 67 | 68 | #### Visualizations 69 | Supplementary module, containing frequently used network visualizations 70 | 71 | 1) **draw_graph_overlap** takes in two graphs and displays their overlap. Intersecting nodes are triangles and non-intersecting nodes are either circles or squares, depending on which graph they belong to. An interactive example may be found [here](https://bl.ocks.org/julialen/raw/d21c9d378cb09b5a7181497101996727/). In this example, we graph the union of two networks of 10 nodes each. The user can hover over each node to see the graph it belongs to and the node name. 72 | 73 | 2) **draw_heat_prop** simulates heat propagation on the network initialized from a given set of seed nodes. It takes in a graph and a list of seed nodes. An interactive example may be found [here](https://bl.ocks.org/julialen/raw/82c316048ade650effbff3fd9eaddccd/). 74 | 75 | 3) **draw_colocalization** similarly draws the heat propagation of the graph but with two sets of seed nodes. Another interactive example can be found [here](https://bl.ocks.org/julialen/raw/a82040bdc8b5ba3ca866489db795af74/). 76 | 77 | ## Authors 78 | 79 | * **Brin Rosenthal, PhD** (sbrosenthal@ucsd.edu) 80 | * **Julia Len** (jlen@ucsd.edu) 81 | * **Mikayla Webster** (m1webste@ucsd.edu) 82 | * **Aaron Gary** (agary@ucsd.edu) 83 | * **Kathleen Fisch, PhD** (kfisch@ucsd.edu) 84 | 85 | ## License 86 | 87 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 88 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /cytoscape_styles/colocalization.json: -------------------------------------------------------------------------------- 1 | {"elements": {"nodes": [{"data": {"xpos": 160.24794045597633, "name": "0", "nodeColor": 1.0, "nodeLabel": 0, "ypos": 873.0194898401146, "nodeShape": "triangle", "node_heat": 0.0016404237916285021, "nodeOutline": 2, "nodeTitle": "0
heat = 0.0016404238", "id": "0"}}, {"data": {"xpos": 284.40875430723253, "name": "1", "nodeColor": 0.13082727431701674, "nodeLabel": 1, "ypos": 960.33765250347585, "nodeShape": "triangle", "node_heat": 0.00021461317673500155, "nodeOutline": 2, "nodeTitle": "1
heat = 0.0002146132", "id": "1"}}, {"data": {"xpos": 482.13369692313421, "name": "2", "nodeColor": 0.12601527336878815, "nodeLabel": 2, "ypos": 862.07732967919958, "nodeShape": "triangle", "node_heat": 0.00020671946144904313, "nodeOutline": 2, "nodeTitle": "2
heat = 0.0002067195", "id": "2"}}, {"data": {"xpos": 539.16275286019243, "name": "3", "nodeColor": 0.0080216605933677038, "nodeLabel": 3, "ypos": 999.43541238267414, "nodeShape": "dot", "node_heat": 1.3160068000945692e-05, "nodeOutline": 0, "nodeTitle": "3
heat = 1.31601e-05", "id": "3"}}, {"data": {"xpos": 751.80169317412003, "name": "4", "nodeColor": 0.0026603324347830052, "nodeLabel": 4, "ypos": 941.77125368238853, "nodeShape": "dot", "node_heat": 4.3652239238599136e-06, "nodeOutline": 0, "nodeTitle": "4
heat = 4.3652e-06", "id": "4"}}, {"data": {"xpos": 736.39178196175374, "name": "5", "nodeColor": 0.00054848833796564492, "nodeLabel": 5, "ypos": 711.71558807305325, "nodeShape": "dot", "node_heat": 9.0090706109100958e-07, "nodeOutline": 0, "nodeTitle": "5
heat = 9.009e-07", "id": "5"}}, {"data": {"xpos": 901.31081168320554, "name": "6", "nodeColor": 0.00027556301281376718, "nodeLabel": 6, "ypos": 808.61919531356637, "nodeShape": "dot", "node_heat": 4.531941794321575e-07, "nodeOutline": 0, "nodeTitle": "6
heat = 4.532e-07", "id": "6"}}, {"data": {"xpos": 879.18976873623524, "name": "7", "nodeColor": 8.4684843974497904e-05, "nodeLabel": 7, "ypos": 562.30074720905384, "nodeShape": "dot", "node_heat": 1.4007331031076662e-07, "nodeOutline": 0, "nodeTitle": "7
heat = 1.401e-07", "id": "7"}}, {"data": {"xpos": 945.35224934218581, "name": "8", "nodeColor": 0.00024967109716727697, "nodeLabel": 8, "ypos": 677.31876423558822, "nodeShape": "dot", "node_heat": 4.107204948838025e-07, "nodeOutline": 0, "nodeTitle": "8
heat = 4.107e-07", "id": "8"}}, {"data": {"xpos": 652.85178507385046, "name": "9", "nodeColor": 0.0012703702227793439, "nodeLabel": 9, "ypos": 448.49027488997763, "nodeShape": "dot", "node_heat": 2.0850984463624655e-06, "nodeOutline": 0, "nodeTitle": "9
heat = 2.0851e-06", "id": "9"}}, {"data": {"xpos": 989.55977004666238, "name": "10", "nodeColor": 8.3384726099906993e-05, "nodeLabel": 10, "ypos": 573.41938428911794, "nodeShape": "dot", "node_heat": 1.3794056751819008e-07, "nodeOutline": 0, "nodeTitle": "10
heat = 1.379e-07", "id": "10"}}, {"data": {"xpos": 999.96341150765079, "name": "11", "nodeColor": 6.7510098599503923e-05, "nodeLabel": 11, "ypos": 484.01875126123525, "nodeShape": "dot", "node_heat": 1.1189946920856546e-07, "nodeOutline": 0, "nodeTitle": "11
heat = 1.119e-07", "id": "11"}}, {"data": {"xpos": 998.512703015238, "name": "12", "nodeColor": 5.0483308138034807e-05, "nodeLabel": 12, "ypos": 413.44839272355222, "nodeShape": "dot", "node_heat": 8.3968336695803303e-08, "nodeOutline": 0, "nodeTitle": "12
heat = 8.4e-08", "id": "12"}}, {"data": {"xpos": 975.0525144371353, "name": "13", "nodeColor": 3.3795200945059621e-05, "nodeLabel": 13, "ypos": 343.63551314821063, "nodeShape": "dot", "node_heat": 5.6592787883537517e-08, "nodeOutline": 0, "nodeTitle": "13
heat = 5.66e-08", "id": "13"}}, {"data": {"xpos": 849.61802782159043, "name": "14", "nodeColor": 0.00013430278943053206, "nodeLabel": 14, "ypos": 340.78862702983901, "nodeShape": "dot", "node_heat": 2.2146771125084356e-07, "nodeOutline": 0, "nodeTitle": "14
heat = 2.215e-07", "id": "14"}}, {"data": {"xpos": 919.31980794114861, "name": "15", "nodeColor": 9.1105918318247951e-06, "nodeLabel": 15, "ypos": 472.22384213239377, "nodeShape": "dot", "node_heat": 1.6099596302438519e-08, "nodeOutline": 0, "nodeTitle": "15
heat = 1.61e-08", "id": "15"}}, {"data": {"xpos": 698.88190020975958, "name": "16", "nodeColor": 0.0014936775996397421, "nodeLabel": 16, "ypos": 574.90833260521629, "nodeShape": "dot", "node_heat": 2.4514169224299117e-06, "nodeOutline": 0, "nodeTitle": "16
heat = 2.4514e-06", "id": "16"}}, {"data": {"xpos": 928.43962394734274, "name": "17", "nodeColor": 4.7417859389519487e-06, "nodeLabel": 17, "ypos": 251.26501435094161, "nodeShape": "dot", "node_heat": 8.9329082180043753e-09, "nodeOutline": 0, "nodeTitle": "17
heat = 8.9e-09", "id": "17"}}, {"data": {"xpos": 767.02657759999215, "name": "18", "nodeColor": 0.00015923136750018986, "nodeLabel": 18, "ypos": 353.9019227200917, "nodeShape": "dot", "node_heat": 2.6236111503084587e-07, "nodeOutline": 0, "nodeTitle": "18
heat = 2.624e-07", "id": "18"}}, {"data": {"xpos": 851.90706556755254, "name": "19", "nodeColor": 3.3301204077345691e-06, "nodeLabel": 19, "ypos": 161.82313560992293, "nodeShape": "dot", "node_heat": 6.6171801243652106e-09, "nodeOutline": 0, "nodeTitle": "19
heat = 6.6e-09", "id": "19"}}, {"data": {"xpos": 794.51173316593508, "name": "20", "nodeColor": 2.6521734007875757e-06, "nodeLabel": 20, "ypos": 107.37425231167134, "nodeShape": "dot", "node_heat": 5.5050605073112565e-09, "nodeOutline": 0, "nodeTitle": "20
heat = 5.5e-09", "id": "20"}}, {"data": {"xpos": 723.29863218790024, "name": "21", "nodeColor": 0.0, "nodeLabel": 21, "ypos": 50.449494849172972, "nodeShape": "dot", "node_heat": 1.1543752227383027e-09, "nodeOutline": 0, "nodeTitle": "21
heat = 1.2e-09", "id": "21"}}, {"data": {"xpos": 750.64037407574267, "name": "22", "nodeColor": 2.8970153277104897e-06, "nodeLabel": 22, "ypos": 168.39743363289381, "nodeShape": "dot", "node_heat": 5.9067047467843177e-09, "nodeOutline": 0, "nodeTitle": "22
heat = 5.9e-09", "id": "22"}}, {"data": {"xpos": 629.65495240314203, "name": "23", "nodeColor": 3.2366230063261509e-07, "nodeLabel": 23, "ypos": 10.747419786062508, "nodeShape": "dot", "node_heat": 1.6853181875215209e-09, "nodeOutline": 0, "nodeTitle": "23
heat = 1.7e-09", "id": "23"}}, {"data": {"xpos": 567.55641480733016, "name": "24", "nodeColor": 2.6912672194089748e-06, "nodeLabel": 24, "ypos": 19.762596767525721, "nodeShape": "dot", "node_heat": 5.5691908923544736e-09, "nodeOutline": 0, "nodeTitle": "24
heat = 5.6e-09", "id": "24"}}, {"data": {"xpos": 467.84719509216063, "name": "25", "nodeColor": 9.124052075049999e-06, "nodeLabel": 25, "ypos": 0.0, "nodeShape": "dot", "node_heat": 1.6121676790128079e-08, "nodeOutline": 0, "nodeTitle": "25
heat = 1.61e-08", "id": "25"}}, {"data": {"xpos": 591.49468387164211, "name": "26", "nodeColor": 0.00010387315342944011, "nodeLabel": 26, "ypos": 250.95161934053834, "nodeShape": "dot", "node_heat": 1.7155024751127496e-07, "nodeOutline": 0, "nodeTitle": "26
heat = 1.716e-07", "id": "26"}}, {"data": {"xpos": 286.49702200687415, "name": "27", "nodeColor": 1.6214076602781841e-05, "nodeLabel": 27, "ypos": 53.503208080581935, "nodeShape": "dot", "node_heat": 2.7752313524100385e-08, "nodeOutline": 0, "nodeTitle": "27
heat = 2.78e-08", "id": "27"}}, {"data": {"xpos": 361.26744156911451, "name": "28", "nodeColor": 8.5961297352813988e-05, "nodeLabel": 28, "ypos": 44.914545954110267, "nodeShape": "dot", "node_heat": 1.4216723332795475e-07, "nodeOutline": 0, "nodeTitle": "28
heat = 1.422e-07", "id": "28"}}, {"data": {"xpos": 192.67435858534458, "name": "29", "nodeColor": 0.00024113584836196956, "nodeLabel": 29, "ypos": 103.30799961779964, "nodeShape": "dot", "node_heat": 3.9671907952898723e-07, "nodeOutline": 0, "nodeTitle": "29
heat = 3.967e-07", "id": "29"}}, {"data": {"xpos": 333.64792596476104, "name": "30", "nodeColor": 0.00032930833220935068, "nodeLabel": 30, "ypos": 202.90758145192638, "nodeShape": "dot", "node_heat": 5.4135921801508036e-07, "nodeOutline": 0, "nodeTitle": "30
heat = 5.414e-07", "id": "30"}}, {"data": {"xpos": 90.181447792667839, "name": "31", "nodeColor": 0.0077276395146726011, "nodeLabel": 31, "ypos": 214.58419823162924, "nodeShape": "dot", "node_heat": 1.2677749167624618e-05, "nodeOutline": 0, "nodeTitle": "31
heat = 1.26777e-05", "id": "31"}}, {"data": {"xpos": 220.18677149481888, "name": "32", "nodeColor": 0.044974856309914935, "nodeLabel": 32, "ypos": 404.45248718447698, "nodeShape": "dot", "node_heat": 7.3778926773220691e-05, "nodeOutline": 0, "nodeTitle": "32
heat = 7.37789e-05", "id": "32"}}, {"data": {"xpos": 5.589425687873141, "name": "33", "nodeColor": 0.11237761946200205, "nodeLabel": 33, "ypos": 409.04101735234536, "nodeShape": "dot", "node_heat": 0.00018434794526132558, "nodeOutline": 0, "nodeTitle": "33
heat = 0.0001843479", "id": "33"}}, {"data": {"xpos": 0.0, "name": "34", "nodeColor": 0.80018691735014758, "nodeLabel": 34, "ypos": 567.3794176075337, "nodeShape": "dot", "node_heat": 0.0013126458876303237, "nodeOutline": 0, "nodeTitle": "34
heat = 0.0013126459", "id": "34"}}, {"data": {"xpos": 19.820084089195305, "name": "35", "nodeColor": 0.79925809321805752, "nodeLabel": 35, "ypos": 376.09237463861092, "nodeShape": "square", "node_heat": 0.0013111222234980162, "nodeOutline": 2, "nodeTitle": "35
heat = 0.0013111222", "id": "35"}}, {"data": {"xpos": 29.544560673329705, "name": "36", "nodeColor": 0.12657268182728856, "nodeLabel": 36, "ypos": 616.92506039155899, "nodeShape": "square", "node_heat": 0.00020763384690256369, "nodeOutline": 2, "nodeTitle": "36
heat = 0.0002076338", "id": "36"}}, {"data": {"xpos": 10.265237834242333, "name": "37", "nodeColor": 0.068305946860295993, "nodeLabel": 37, "ypos": 516.03835546015034, "nodeShape": "dot", "node_heat": 0.00011205177586387186, "nodeOutline": 0, "nodeTitle": "37
heat = 0.0001120518", "id": "37"}}, {"data": {"xpos": 168.67443435183046, "name": "38", "nodeColor": 0.011053241898231789, "nodeLabel": 38, "ypos": 815.0496905410098, "nodeShape": "dot", "node_heat": 1.8133142600118573e-05, "nodeOutline": 0, "nodeTitle": "38
heat = 1.81331e-05", "id": "38"}}, {"data": {"xpos": 411.96492749451954, "name": "39", "nodeColor": 0.00037492467489682609, "nodeLabel": 39, "ypos": 991.29444399492684, "nodeShape": "dot", "node_heat": 6.1618929918831815e-07, "nodeOutline": 0, "nodeTitle": "39
heat = 6.162e-07", "id": "39"}}, {"data": {"xpos": 371.12081120640062, "name": "40", "nodeColor": 0.00058670728219302785, "nodeLabel": 40, "ypos": 988.09247354900913, "nodeShape": "dot", "node_heat": 9.6360228237352903e-07, "nodeOutline": 0, "nodeTitle": "40
heat = 9.636e-07", "id": "40"}}, {"data": {"xpos": 580.18776782181078, "name": "41", "nodeColor": 0.00025669019770049818, "nodeLabel": 41, "ypos": 1000.0, "nodeShape": "dot", "node_heat": 4.2223478629165514e-07, "nodeOutline": 0, "nodeTitle": "41
heat = 4.222e-07", "id": "41"}}, {"data": {"xpos": 642.24532689762202, "name": "42", "nodeColor": 0.00027691168622633386, "nodeLabel": 42, "ypos": 943.57733079016703, "nodeShape": "dot", "node_heat": 4.5540657382839349e-07, "nodeOutline": 0, "nodeTitle": "42
heat = 4.554e-07", "id": "42"}}, {"data": {"xpos": 559.82877931056646, "name": "43", "nodeColor": 0.00025893148045505639, "nodeLabel": 43, "ypos": 906.58887608966279, "nodeShape": "dot", "node_heat": 4.259114372587178e-07, "nodeOutline": 0, "nodeTitle": "43
heat = 4.259e-07", "id": "43"}}, {"data": {"xpos": 637.61751785326692, "name": "44", "nodeColor": 0.00031114832922836573, "nodeLabel": 44, "ypos": 676.22713091286971, "nodeShape": "dot", "node_heat": 5.1156913803248558e-07, "nodeOutline": 0, "nodeTitle": "44
heat = 5.116e-07", "id": "44"}}, {"data": {"xpos": 305.29365034590205, "name": "45", "nodeColor": 0.00022322472857746664, "nodeLabel": 45, "ypos": 866.77187262741552, "nodeShape": "dot", "node_heat": 3.6733727317593357e-07, "nodeOutline": 0, "nodeTitle": "45
heat = 3.673e-07", "id": "45"}}, {"data": {"xpos": 302.42727557885013, "name": "46", "nodeColor": 0.00078828424096728344, "nodeLabel": 46, "ypos": 726.49891056812567, "nodeShape": "dot", "node_heat": 1.2942736886954891e-06, "nodeOutline": 0, "nodeTitle": "46
heat = 1.2943e-06", "id": "46"}}, {"data": {"xpos": 123.3657516015749, "name": "47", "nodeColor": 0.0021510874980250451, "nodeLabel": 47, "ypos": 749.80984505807749, "nodeShape": "dot", "node_heat": 3.5298470016955409e-06, "nodeOutline": 0, "nodeTitle": "47
heat = 3.5298e-06", "id": "47"}}, {"data": {"xpos": 62.848367743978841, "name": "48", "nodeColor": 0.017731929512194246, "nodeLabel": 48, "ypos": 735.4736679988971, "nodeShape": "dot", "node_heat": 2.9089012949205678e-05, "nodeOutline": 0, "nodeTitle": "48
heat = 2.9089e-05", "id": "48"}}, {"data": {"xpos": 113.37281899079809, "name": "49", "nodeColor": 0.033890196847360547, "nodeLabel": 49, "ypos": 823.53511831941114, "nodeShape": "dot", "node_heat": 5.5595400464602701e-05, "nodeOutline": 0, "nodeTitle": "49
heat = 5.55954e-05", "id": "49"}}], "edges": [{"data": {"edge_weight": 0.0016404237916285021, "target": "48", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.0016404237916285021, "target": "1", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.0016404237916285021, "target": "2", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.0016404237916285021, "target": "34", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.0016404237916285021, "target": "49", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.00021461317673500155, "target": "49", "source": "1", "edgeColor": 0.13082699299848163}}, {"data": {"edge_weight": 0.00021461317673500155, "target": "2", "source": "1", "edgeColor": 0.13082699299848163}}, {"data": {"edge_weight": 0.00021461317673500155, "target": "3", "source": "1", "edgeColor": 0.13082699299848163}}, {"data": {"edge_weight": 0.00020671946144904313, "target": "3", "source": "2", "edgeColor": 0.12601499049278925}}, {"data": {"edge_weight": 0.00020671946144904313, "target": "4", "source": "2", "edgeColor": 0.12601499049278925}}, {"data": {"edge_weight": 0.00020671946144904313, "target": "16", "source": "2", "edgeColor": 0.12601499049278925}}, {"data": {"edge_weight": 1.3160068000945692e-05, "target": "4", "source": "3", "edgeColor": 0.0080213395272722768}}, {"data": {"edge_weight": 1.3160068000945692e-05, "target": "5", "source": "3", "edgeColor": 0.0080213395272722768}}, {"data": {"edge_weight": 4.3652239238599136e-06, "target": "5", "source": "4", "edgeColor": 0.0026600096334272101}}, {"data": {"edge_weight": 4.3652239238599136e-06, "target": "6", "source": "4", "edgeColor": 0.0026600096334272101}}, {"data": {"edge_weight": 9.0090706109100958e-07, "target": "26", "source": "5", "edgeColor": 0.00054816485308530971}}, {"data": {"edge_weight": 9.0090706109100958e-07, "target": "6", "source": "5", "edgeColor": 0.00054816485308530971}}, {"data": {"edge_weight": 9.0090706109100958e-07, "target": "7", "source": "5", "edgeColor": 0.00054816485308530971}}, {"data": {"edge_weight": 4.531941794321575e-07, "target": "8", "source": "6", "edgeColor": 0.0002752394395977648}}, {"data": {"edge_weight": 4.531941794321575e-07, "target": "7", "source": "6", "edgeColor": 0.0002752394395977648}}, {"data": {"edge_weight": 4.107204948838025e-07, "target": "8", "source": "7", "edgeColor": 0.00024934751557103484}}, {"data": {"edge_weight": 1.4007331031076662e-07, "target": "22", "source": "7", "edgeColor": 8.4361208978408255e-05}}, {"data": {"edge_weight": 2.0850984463624655e-06, "target": "9", "source": "8", "edgeColor": 0.001270046971545036}}, {"data": {"edge_weight": 4.107204948838025e-07, "target": "10", "source": "8", "edgeColor": 0.00024934751557103484}}, {"data": {"edge_weight": 7.3778926773220691e-05, "target": "32", "source": "9", "edgeColor": 0.044974547204179718}}, {"data": {"edge_weight": 2.0850984463624655e-06, "target": "10", "source": "9", "edgeColor": 0.001270046971545036}}, {"data": {"edge_weight": 2.0850984463624655e-06, "target": "11", "source": "9", "edgeColor": 0.001270046971545036}}, {"data": {"edge_weight": 2.0850984463624655e-06, "target": "30", "source": "9", "edgeColor": 0.001270046971545036}}, {"data": {"edge_weight": 1.3794056751819008e-07, "target": "11", "source": "10", "edgeColor": 8.3061090683018071e-05}}, {"data": {"edge_weight": 1.3794056751819008e-07, "target": "12", "source": "10", "edgeColor": 8.3061090683018071e-05}}, {"data": {"edge_weight": 1.1189946920856546e-07, "target": "12", "source": "11", "edgeColor": 6.7186458044594892e-05}}, {"data": {"edge_weight": 1.1189946920856546e-07, "target": "13", "source": "11", "edgeColor": 6.7186458044594892e-05}}, {"data": {"edge_weight": 8.3968336695803303e-08, "target": "13", "source": "12", "edgeColor": 5.015966207219382e-05}}, {"data": {"edge_weight": 2.2146771125084356e-07, "target": "14", "source": "12", "edgeColor": 0.00013397917049390599}}, {"data": {"edge_weight": 2.2146771125084356e-07, "target": "14", "source": "13", "edgeColor": 0.00013397917049390599}}, {"data": {"edge_weight": 5.6592787883537517e-08, "target": "15", "source": "13", "edgeColor": 3.3471549477905713e-05}}, {"data": {"edge_weight": 2.4514169224299117e-06, "target": "16", "source": "14", "edgeColor": 0.0014933544206816368}}, {"data": {"edge_weight": 2.2146771125084356e-07, "target": "26", "source": "14", "edgeColor": 0.00013397917049390599}}, {"data": {"edge_weight": 1.6099596302438519e-08, "target": "17", "source": "15", "edgeColor": 8.7869323751909279e-06}}, {"data": {"edge_weight": 5.1156913803248558e-07, "target": "44", "source": "15", "edgeColor": 0.00031082476752999243}}, {"data": {"edge_weight": 2.4514169224299117e-06, "target": "18", "source": "16", "edgeColor": 0.0014933544206816368}}, {"data": {"edge_weight": 2.6236111503084587e-07, "target": "18", "source": "17", "edgeColor": 0.00015890775663200733}}, {"data": {"edge_weight": 8.9329082180043753e-09, "target": "19", "source": "17", "edgeColor": 4.4181250682998573e-06}}, {"data": {"edge_weight": 2.6236111503084587e-07, "target": "19", "source": "18", "edgeColor": 0.00015890775663200733}}, {"data": {"edge_weight": 2.6236111503084587e-07, "target": "20", "source": "18", "edgeColor": 0.00015890775663200733}}, {"data": {"edge_weight": 5.1156913803248558e-07, "target": "44", "source": "18", "edgeColor": 0.00031082476752999243}}, {"data": {"edge_weight": 6.6171801243652106e-09, "target": "20", "source": "19", "edgeColor": 3.0064590801794165e-06}}, {"data": {"edge_weight": 6.6171801243652106e-09, "target": "21", "source": "19", "edgeColor": 3.0064590801794165e-06}}, {"data": {"edge_weight": 5.5050605073112565e-09, "target": "21", "source": "20", "edgeColor": 2.3285118538064642e-06}}, {"data": {"edge_weight": 5.9067047467843177e-09, "target": "22", "source": "20", "edgeColor": 2.5733538599755052e-06}}, {"data": {"edge_weight": 5.9067047467843177e-09, "target": "22", "source": "21", "edgeColor": 2.5733538599755052e-06}}, {"data": {"edge_weight": 1.6853181875215209e-09, "target": "23", "source": "21", "edgeColor": 0.0}}, {"data": {"edge_weight": 5.9067047467843177e-09, "target": "24", "source": "22", "edgeColor": 2.5733538599755052e-06}}, {"data": {"edge_weight": 5.9067047467843177e-09, "target": "23", "source": "22", "edgeColor": 2.5733538599755052e-06}}, {"data": {"edge_weight": 5.5691908923544736e-09, "target": "24", "source": "23", "edgeColor": 2.3676056850810629e-06}}, {"data": {"edge_weight": 1.6121676790128079e-08, "target": "25", "source": "23", "edgeColor": 8.8003926227727068e-06}}, {"data": {"edge_weight": 1.6121676790128079e-08, "target": "25", "source": "24", "edgeColor": 8.8003926227727068e-06}}, {"data": {"edge_weight": 1.7155024751127496e-07, "target": "26", "source": "24", "edgeColor": 0.00010354952464388486}}, {"data": {"edge_weight": 1.7155024751127496e-07, "target": "26", "source": "25", "edgeColor": 0.00010354952464388486}}, {"data": {"edge_weight": 2.7752313524100385e-08, "target": "27", "source": "25", "edgeColor": 1.5890419445278944e-05}}, {"data": {"edge_weight": 1.7155024751127496e-07, "target": "28", "source": "26", "edgeColor": 0.00010354952464388486}}, {"data": {"edge_weight": 1.4216723332795475e-07, "target": "28", "source": "27", "edgeColor": 8.563766276986432e-05}}, {"data": {"edge_weight": 3.9671907952898723e-07, "target": "29", "source": "27", "edgeColor": 0.00024081226400318831}}, {"data": {"edge_weight": 3.9671907952898723e-07, "target": "29", "source": "28", "edgeColor": 0.00024081226400318831}}, {"data": {"edge_weight": 5.4135921801508036e-07, "target": "30", "source": "28", "edgeColor": 0.0003289847763886876}}, {"data": {"edge_weight": 5.4135921801508036e-07, "target": "30", "source": "29", "edgeColor": 0.0003289847763886876}}, {"data": {"edge_weight": 1.2677749167624618e-05, "target": "31", "source": "29", "edgeColor": 0.0077273183534136043}}, {"data": {"edge_weight": 1.2677749167624618e-05, "target": "31", "source": "30", "edgeColor": 0.0077273183534136043}}, {"data": {"edge_weight": 7.3778926773220691e-05, "target": "32", "source": "31", "edgeColor": 0.044974547204179718}}, {"data": {"edge_weight": 0.00018434794526132558, "target": "33", "source": "31", "edgeColor": 0.11237733217200728}}, {"data": {"edge_weight": 0.0013126458876303237, "target": "34", "source": "32", "edgeColor": 0.80018685267816458}}, {"data": {"edge_weight": 0.00011205177586387186, "target": "37", "source": "32", "edgeColor": 0.068305645305957674}}, {"data": {"edge_weight": 0.0013126458876303237, "target": "34", "source": "33", "edgeColor": 0.80018685267816458}}, {"data": {"edge_weight": 0.0013111222234980162, "target": "35", "source": "33", "edgeColor": 0.79925802824544911}}, {"data": {"edge_weight": 0.0013126458876303237, "target": "35", "source": "34", "edgeColor": 0.80018685267816458}}, {"data": {"edge_weight": 0.0013111222234980162, "target": "36", "source": "35", "edgeColor": 0.79925802824544911}}, {"data": {"edge_weight": 0.0013111222234980162, "target": "37", "source": "35", "edgeColor": 0.79925802824544911}}, {"data": {"edge_weight": 0.00020763384690256369, "target": "37", "source": "36", "edgeColor": 0.12657239913170185}}, {"data": {"edge_weight": 0.00020763384690256369, "target": "38", "source": "36", "edgeColor": 0.12657239913170185}}, {"data": {"edge_weight": 0.00011205177586387186, "target": "38", "source": "37", "edgeColor": 0.068305645305957674}}, {"data": {"edge_weight": 1.8133142600118573e-05, "target": "40", "source": "38", "edgeColor": 0.011052921813345258}}, {"data": {"edge_weight": 1.8133142600118573e-05, "target": "39", "source": "38", "edgeColor": 0.011052921813345258}}, {"data": {"edge_weight": 9.6360228237352903e-07, "target": "40", "source": "39", "edgeColor": 0.0005863838096827282}}, {"data": {"edge_weight": 6.1618929918831815e-07, "target": "41", "source": "39", "edgeColor": 0.00037460113384045826}}, {"data": {"edge_weight": 9.6360228237352903e-07, "target": "41", "source": "40", "edgeColor": 0.0005863838096827282}}, {"data": {"edge_weight": 9.6360228237352903e-07, "target": "42", "source": "40", "edgeColor": 0.0005863838096827282}}, {"data": {"edge_weight": 4.5540657382839349e-07, "target": "42", "source": "41", "edgeColor": 0.00027658811344684635}}, {"data": {"edge_weight": 4.259114372587178e-07, "target": "43", "source": "41", "edgeColor": 0.00025860790185605219}}, {"data": {"edge_weight": 4.5540657382839349e-07, "target": "43", "source": "42", "edgeColor": 0.00027658811344684635}}, {"data": {"edge_weight": 5.1156913803248558e-07, "target": "44", "source": "42", "edgeColor": 0.00031082476752999243}}, {"data": {"edge_weight": 5.1156913803248558e-07, "target": "44", "source": "43", "edgeColor": 0.00031082476752999243}}, {"data": {"edge_weight": 4.259114372587178e-07, "target": "45", "source": "43", "edgeColor": 0.00025860790185605219}}, {"data": {"edge_weight": 1.2942736886954891e-06, "target": "46", "source": "44", "edgeColor": 0.00078796083369986716}}, {"data": {"edge_weight": 1.2942736886954891e-06, "target": "46", "source": "45", "edgeColor": 0.00078796083369986716}}, {"data": {"edge_weight": 3.5298470016955409e-06, "target": "47", "source": "45", "edgeColor": 0.002150764531845809}}, {"data": {"edge_weight": 2.9089012949205678e-05, "target": "48", "source": "46", "edgeColor": 0.017731611588947812}}, {"data": {"edge_weight": 3.5298470016955409e-06, "target": "47", "source": "46", "edgeColor": 0.002150764531845809}}, {"data": {"edge_weight": 2.9089012949205678e-05, "target": "48", "source": "47", "edgeColor": 0.017731611588947812}}, {"data": {"edge_weight": 5.5595400464602701e-05, "target": "49", "source": "47", "edgeColor": 0.033889884153937788}}, {"data": {"edge_weight": 5.5595400464602701e-05, "target": "49", "source": "48", "edgeColor": 0.033889884153937788}}]}, "data": {"name": "watts_strogatz_graph(50,5,0.1)"}} -------------------------------------------------------------------------------- /cytoscape_styles/colocalization_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /cytoscape_styles/heat_prop.json: -------------------------------------------------------------------------------- 1 | {"elements": {"nodes": [{"data": {"xpos": 750.74001065190748, "name": "0", "nodeColor": 1.0, "nodeLabel": 0, "ypos": 129.36758943129715, "nodeShape": "triangle", "node_heat": 0.23932683576088892, "nodeOutline": 2, "nodeTitle": "0
heat = 0.23933", "id": "0"}}, {"data": {"xpos": 670.45891955271668, "name": "1", "nodeColor": 0.98317878461158281, "nodeLabel": 1, "ypos": 36.535757444437301, "nodeShape": "triangle", "node_heat": 0.23530139166323097, "nodeOutline": 2, "nodeTitle": "1
heat = 0.2353", "id": "1"}}, {"data": {"xpos": 555.89201122319162, "name": "2", "nodeColor": 0.97437359370631094, "nodeLabel": 2, "ypos": 25.425965965114305, "nodeShape": "triangle", "node_heat": 0.23319424286690887, "nodeOutline": 2, "nodeTitle": "2
heat = 0.23319", "id": "2"}}, {"data": {"xpos": 383.64549440666019, "name": "3", "nodeColor": 0.27315866535922734, "nodeLabel": 3, "ypos": 30.026587332012667, "nodeShape": "dot", "node_heat": 0.065388205709327948, "nodeOutline": 0, "nodeTitle": "3
heat = 0.06539", "id": "3"}}, {"data": {"xpos": 254.11247562064648, "name": "4", "nodeColor": 0.16735897311884024, "nodeLabel": 4, "ypos": 80.733792836594503, "nodeShape": "dot", "node_heat": 0.040069538964453214, "nodeOutline": 0, "nodeTitle": "4
heat = 0.04007", "id": "4"}}, {"data": {"xpos": 173.3138057415139, "name": "5", "nodeColor": 0.060680057083245233, "nodeLabel": 5, "ypos": 144.71975425408678, "nodeShape": "dot", "node_heat": 0.014540467313915298, "nodeOutline": 0, "nodeTitle": "5
heat = 0.01454", "id": "5"}}, {"data": {"xpos": 85.931273553151826, "name": "6", "nodeColor": 0.030981555453088349, "nodeLabel": 6, "ypos": 264.30475270637925, "nodeShape": "dot", "node_heat": 0.0074333911998599612, "nodeOutline": 0, "nodeTitle": "6
heat = 0.00743", "id": "6"}}, {"data": {"xpos": 65.517453478126939, "name": "7", "nodeColor": 0.014263351426655925, "nodeLabel": 7, "ypos": 340.25688865516958, "nodeShape": "dot", "node_heat": 0.0034325985004225517, "nodeOutline": 0, "nodeTitle": "7
heat = 0.00343", "id": "7"}}, {"data": {"xpos": 0.0, "name": "8", "nodeColor": 0.0058721541033570669, "nodeLabel": 8, "ypos": 483.53659073693507, "nodeShape": "dot", "node_heat": 0.0014245215001948684, "nodeOutline": 0, "nodeTitle": "8
heat = 0.00142", "id": "8"}}, {"data": {"xpos": 194.47573645653199, "name": "9", "nodeColor": 0.012651223650397203, "nodeLabel": 9, "ypos": 462.1512247252092, "nodeShape": "dot", "node_heat": 0.0030468041275569808, "nodeOutline": 0, "nodeTitle": "9
heat = 0.00305", "id": "9"}}, {"data": {"xpos": 23.620269066643257, "name": "10", "nodeColor": 0.0010678869045253809, "nodeLabel": 10, "ypos": 647.34368700793891, "nodeShape": "dot", "node_heat": 0.00027482401445757658, "nodeOutline": 0, "nodeTitle": "10
heat = 0.00027", "id": "10"}}, {"data": {"xpos": 56.038610069863012, "name": "11", "nodeColor": 0.0025055542633561005, "nodeLabel": 11, "ypos": 720.24044986552951, "nodeShape": "dot", "node_heat": 0.00061886868961140711, "nodeOutline": 0, "nodeTitle": "11
heat = 0.00062", "id": "11"}}, {"data": {"xpos": 138.31795248430194, "name": "12", "nodeColor": 0.00073015676042653796, "nodeLabel": 12, "ypos": 828.83416619558454, "nodeShape": "dot", "node_heat": 0.00019400263599166664, "nodeOutline": 0, "nodeTitle": "12
heat = 0.00019", "id": "12"}}, {"data": {"xpos": 159.94771387871157, "name": "13", "nodeColor": 0.0014526905374285218, "nodeLabel": 13, "ypos": 866.46029550821152, "nodeShape": "dot", "node_heat": 0.00036691043491289652, "nodeOutline": 0, "nodeTitle": "13
heat = 0.00037", "id": "13"}}, {"data": {"xpos": 229.54239918342253, "name": "14", "nodeColor": 0.0003854554017825432, "nodeLabel": 14, "ypos": 917.82934931162583, "nodeShape": "dot", "node_heat": 0.00011151299314673849, "nodeOutline": 0, "nodeTitle": "14
heat = 0.00011", "id": "14"}}, {"data": {"xpos": 547.91026501620297, "name": "15", "nodeColor": 0.0, "nodeLabel": 15, "ypos": 1000.0, "nodeShape": "dot", "node_heat": 1.9270599467840781e-05, "nodeOutline": 0, "nodeTitle": "15
heat = 2e-05", "id": "15"}}, {"data": {"xpos": 418.69902799605126, "name": "16", "nodeColor": 0.00019699284241713814, "nodeLabel": 16, "ypos": 993.02526398722216, "nodeShape": "dot", "node_heat": 6.6412476940913616e-05, "nodeOutline": 0, "nodeTitle": "16
heat = 7e-05", "id": "16"}}, {"data": {"xpos": 354.64732546599959, "name": "17", "nodeColor": 0.0002861702747679215, "nodeLabel": 17, "ypos": 969.8802766179499, "nodeShape": "dot", "node_heat": 8.7753311144126941e-05, "nodeOutline": 0, "nodeTitle": "17
heat = 9e-05", "id": "17"}}, {"data": {"xpos": 277.19714116888787, "name": "18", "nodeColor": 0.0014525122633154682, "nodeLabel": 18, "ypos": 791.02173238082639, "nodeShape": "dot", "node_heat": 0.00036686777256897038, "nodeOutline": 0, "nodeTitle": "18
heat = 0.00037", "id": "18"}}, {"data": {"xpos": 289.32135100776856, "name": "19", "nodeColor": 0.0015051970524405205, "nodeLabel": 19, "ypos": 671.11364898369516, "nodeShape": "dot", "node_heat": 0.00037947564117552955, "nodeOutline": 0, "nodeTitle": "19
heat = 0.00038", "id": "19"}}, {"data": {"xpos": 462.54661995213888, "name": "20", "nodeColor": 0.0026849691015232717, "nodeLabel": 20, "ypos": 698.41744887791162, "nodeShape": "dot", "node_heat": 0.00066180401768702328, "nodeOutline": 0, "nodeTitle": "20
heat = 0.00066", "id": "20"}}, {"data": {"xpos": 380.8995973120239, "name": "21", "nodeColor": 0.012767171509701475, "nodeLabel": 21, "ypos": 624.06892843427477, "nodeShape": "dot", "node_heat": 0.003074551327452765, "nodeOutline": 0, "nodeTitle": "21
heat = 0.00307", "id": "21"}}, {"data": {"xpos": 579.78652955568134, "name": "22", "nodeColor": 0.013749259940566175, "nodeLabel": 22, "ypos": 518.46954583767354, "nodeShape": "dot", "node_heat": 0.0033095725186161971, "nodeOutline": 0, "nodeTitle": "22
heat = 0.00331", "id": "22"}}, {"data": {"xpos": 501.71969168025896, "name": "23", "nodeColor": 0.10607452338532464, "nodeLabel": 23, "ypos": 356.52503798483883, "nodeShape": "dot", "node_heat": 0.025403706516468099, "nodeOutline": 0, "nodeTitle": "23
heat = 0.0254", "id": "23"}}, {"data": {"xpos": 553.59028446951311, "name": "24", "nodeColor": 0.012490822250581771, "nodeLabel": 24, "ypos": 192.52402696555222, "nodeShape": "dot", "node_heat": 0.0030084188591186661, "nodeOutline": 0, "nodeTitle": "24
heat = 0.00301", "id": "24"}}, {"data": {"xpos": 494.7189612753765, "name": "25", "nodeColor": 0.0018284032173374, "nodeLabel": 25, "ypos": 0.0, "nodeShape": "dot", "node_heat": 0.00045682132154216252, "nodeOutline": 0, "nodeTitle": "25
heat = 0.00046", "id": "25"}}, {"data": {"xpos": 422.86720283885711, "name": "26", "nodeColor": 0.0019571586350886913, "nodeLabel": 26, "ypos": 12.256512576926054, "nodeShape": "dot", "node_heat": 0.00048763346706556565, "nodeOutline": 0, "nodeTitle": "26
heat = 0.00049", "id": "26"}}, {"data": {"xpos": 293.75543820507374, "name": "27", "nodeColor": 0.00058188159484142148, "nodeLabel": 27, "ypos": 51.041929664256209, "nodeShape": "dot", "node_heat": 0.00015851926714158588, "nodeOutline": 0, "nodeTitle": "27
heat = 0.00016", "id": "27"}}, {"data": {"xpos": 269.73413273988632, "name": "28", "nodeColor": 0.00044196407371502067, "nodeLabel": 28, "ypos": 277.52187948521606, "nodeShape": "dot", "node_heat": 0.00012503594583740521, "nodeOutline": 0, "nodeTitle": "28
heat = 0.00013", "id": "28"}}, {"data": {"xpos": 89.610048819910048, "name": "29", "nodeColor": 6.486566256409694e-05, "nodeLabel": 29, "ypos": 218.396206628366, "nodeShape": "dot", "node_heat": 3.4793443238637163e-05, "nodeOutline": 0, "nodeTitle": "29
heat = 3e-05", "id": "29"}}, {"data": {"xpos": 90.990707950506206, "name": "30", "nodeColor": 0.00013073315302657821, "nodeLabel": 30, "ypos": 416.64800496267054, "nodeShape": "dot", "node_heat": 5.0556032004506679e-05, "nodeOutline": 0, "nodeTitle": "30
heat = 5e-05", "id": "30"}}, {"data": {"xpos": 60.370271763439391, "name": "31", "nodeColor": 0.00020894874601456718, "nodeLabel": 31, "ypos": 538.25394987654374, "nodeShape": "dot", "node_heat": 6.9273615120119038e-05, "nodeOutline": 0, "nodeTitle": "31
heat = 7e-05", "id": "31"}}, {"data": {"xpos": 135.34040050718795, "name": "32", "nodeColor": 0.00077480147605198785, "nodeLabel": 32, "ypos": 693.75487027216832, "nodeShape": "dot", "node_heat": 0.00020468645418531711, "nodeOutline": 0, "nodeTitle": "32
heat = 0.0002", "id": "32"}}, {"data": {"xpos": 308.59651748385392, "name": "33", "nodeColor": 6.6378192942419481e-05, "nodeLabel": 33, "ypos": 929.15698223213974, "nodeShape": "dot", "node_heat": 3.5155403200706212e-05, "nodeOutline": 0, "nodeTitle": "33
heat = 4e-05", "id": "33"}}, {"data": {"xpos": 384.34687292348195, "name": "34", "nodeColor": 0.00011281606070668603, "nodeLabel": 34, "ypos": 908.2508404683133, "nodeShape": "dot", "node_heat": 4.6268336266660884e-05, "nodeOutline": 0, "nodeTitle": "34
heat = 5e-05", "id": "34"}}, {"data": {"xpos": 606.78118917952918, "name": "35", "nodeColor": 0.00021711152678062612, "nodeLabel": 35, "ypos": 957.62195017764247, "nodeShape": "dot", "node_heat": 7.1227030310191085e-05, "nodeOutline": 0, "nodeTitle": "35
heat = 7e-05", "id": "35"}}, {"data": {"xpos": 486.71069869456414, "name": "36", "nodeColor": 0.00028844855657265554, "nodeLabel": 36, "ypos": 932.92293251701858, "nodeShape": "dot", "node_heat": 8.8298521215569403e-05, "nodeOutline": 0, "nodeTitle": "36
heat = 9e-05", "id": "36"}}, {"data": {"xpos": 812.1985530915, "name": "37", "nodeColor": 0.0011366653615874683, "nodeLabel": 37, "ypos": 832.6381623902405, "nodeShape": "dot", "node_heat": 0.00029128321955266406, "nodeOutline": 0, "nodeTitle": "37
heat = 0.00029", "id": "37"}}, {"data": {"xpos": 706.27986689668523, "name": "38", "nodeColor": 0.0017317530850977643, "nodeLabel": 38, "ypos": 805.71148558176992, "nodeShape": "dot", "node_heat": 0.00043369221372336594, "nodeOutline": 0, "nodeTitle": "38
heat = 0.00043", "id": "38"}}, {"data": {"xpos": 932.11630013834758, "name": "39", "nodeColor": 0.0094539981259670596, "nodeLabel": 39, "ypos": 563.05813044361093, "nodeShape": "dot", "node_heat": 0.0022816838720336559, "nodeOutline": 0, "nodeTitle": "39
heat = 0.00228", "id": "39"}}, {"data": {"xpos": 872.00580229791535, "name": "40", "nodeColor": 0.001361990700743481, "nodeLabel": 40, "ypos": 733.2029908067401, "nodeShape": "dot", "node_heat": 0.00034520527783526089, "nodeOutline": 0, "nodeTitle": "40
heat = 0.00035", "id": "40"}}, {"data": {"xpos": 973.1950643985125, "name": "41", "nodeColor": 0.00056064602063020342, "nodeLabel": 41, "ypos": 616.79455329832388, "nodeShape": "dot", "node_heat": 0.00015343743358229461, "nodeOutline": 0, "nodeTitle": "41
heat = 0.00015", "id": "41"}}, {"data": {"xpos": 960.96828789724805, "name": "42", "nodeColor": 0.0011648169114911607, "nodeLabel": 42, "ypos": 669.46552053382447, "nodeShape": "dot", "node_heat": 0.00029802009841563694, "nodeOutline": 0, "nodeTitle": "42
heat = 0.0003", "id": "42"}}, {"data": {"xpos": 990.95007222409856, "name": "43", "nodeColor": 0.0023609962476911551, "nodeLabel": 43, "ypos": 441.78458377160143, "nodeShape": "dot", "node_heat": 0.00058427486285806253, "nodeOutline": 0, "nodeTitle": "43
heat = 0.00058", "id": "43"}}, {"data": {"xpos": 942.8050551936949, "name": "44", "nodeColor": 0.0038373340572026731, "nodeLabel": 44, "ypos": 722.70659682091355, "nodeShape": "dot", "node_heat": 0.00093757366940800974, "nodeOutline": 0, "nodeTitle": "44
heat = 0.00094", "id": "44"}}, {"data": {"xpos": 992.36709679327373, "name": "45", "nodeColor": 0.0097237953788802539, "nodeLabel": 45, "ypos": 484.0180143992967, "nodeShape": "dot", "node_heat": 0.0023462483957155523, "nodeOutline": 0, "nodeTitle": "45
heat = 0.00235", "id": "45"}}, {"data": {"xpos": 991.73002170046971, "name": "46", "nodeColor": 0.020212691745205985, "nodeLabel": 46, "ypos": 539.21347162508027, "nodeShape": "dot", "node_heat": 0.0048563206463714398, "nodeOutline": 0, "nodeTitle": "46
heat = 0.00486", "id": "46"}}, {"data": {"xpos": 939.29096855293108, "name": "47", "nodeColor": 0.050395492822461425, "nodeLabel": 47, "ypos": 277.78942476663985, "nodeShape": "dot", "node_heat": 0.012079293281920955, "nodeOutline": 0, "nodeTitle": "47
heat = 0.01208", "id": "47"}}, {"data": {"xpos": 942.37732481702903, "name": "48", "nodeColor": 0.13960945935448324, "nodeLabel": 48, "ypos": 310.88635194603944, "nodeShape": "dot", "node_heat": 0.033428870391091603, "nodeOutline": 0, "nodeTitle": "48
heat = 0.03343", "id": "48"}}, {"data": {"xpos": 854.33883152424812, "name": "49", "nodeColor": 0.24660569232555529, "nodeLabel": 49, "ypos": 152.03620983201628, "nodeShape": "dot", "node_heat": 0.059033878384843017, "nodeOutline": 0, "nodeTitle": "49
heat = 0.05903", "id": "49"}}], "edges": [{"data": {"edge_weight": 0.23932683576088892, "target": "48", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.23932683576088892, "target": "1", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.23932683576088892, "target": "2", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.23932683576088892, "target": "23", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.23932683576088892, "target": "49", "source": "0", "edgeColor": 1.0}}, {"data": {"edge_weight": 0.23530139166323097, "target": "49", "source": "1", "edgeColor": 0.98317688669421077}}, {"data": {"edge_weight": 0.23530139166323097, "target": "2", "source": "1", "edgeColor": 0.98317688669421077}}, {"data": {"edge_weight": 0.23530139166323097, "target": "3", "source": "1", "edgeColor": 0.98317688669421077}}, {"data": {"edge_weight": 0.23319424286690887, "target": "3", "source": "2", "edgeColor": 0.97437070230990686}}, {"data": {"edge_weight": 0.23319424286690887, "target": "4", "source": "2", "edgeColor": 0.97437070230990686}}, {"data": {"edge_weight": 0.065388205709327948, "target": "4", "source": "3", "edgeColor": 0.27307665673120401}}, {"data": {"edge_weight": 0.065388205709327948, "target": "5", "source": "3", "edgeColor": 0.27307665673120401}}, {"data": {"edge_weight": 0.040069538964453214, "target": "5", "source": "4", "edgeColor": 0.16726502723960068}}, {"data": {"edge_weight": 0.040069538964453214, "target": "6", "source": "4", "edgeColor": 0.16726502723960068}}, {"data": {"edge_weight": 0.014540467313915298, "target": "6", "source": "5", "edgeColor": 0.060574074751032901}}, {"data": {"edge_weight": 0.014540467313915298, "target": "7", "source": "5", "edgeColor": 0.060574074751032901}}, {"data": {"edge_weight": 0.0074333911998599612, "target": "8", "source": "6", "edgeColor": 0.030872222274883978}}, {"data": {"edge_weight": 0.0074333911998599612, "target": "7", "source": "6", "edgeColor": 0.030872222274883978}}, {"data": {"edge_weight": 0.0034325985004225517, "target": "8", "source": "7", "edgeColor": 0.01415213195372686}}, {"data": {"edge_weight": 0.0034325985004225517, "target": "9", "source": "7", "edgeColor": 0.01415213195372686}}, {"data": {"edge_weight": 0.0014245215001948684, "target": "32", "source": "8", "edgeColor": 0.0057599878617906669}}, {"data": {"edge_weight": 0.0014245215001948684, "target": "10", "source": "8", "edgeColor": 0.0057599878617906669}}, {"data": {"edge_weight": 0.025403706516468099, "target": "23", "source": "9", "edgeColor": 0.1059736628558}}, {"data": {"edge_weight": 0.0030468041275569808, "target": "11", "source": "9", "edgeColor": 0.012539822283042453}}, {"data": {"edge_weight": 0.00061886868961140711, "target": "11", "source": "10", "edgeColor": 0.0023930081724046637}}, {"data": {"edge_weight": 0.00027482401445757658, "target": "12", "source": "10", "edgeColor": 0.00095517860330599099}}, {"data": {"edge_weight": 0.00061886868961140711, "target": "12", "source": "11", "edgeColor": 0.0023930081724046637}}, {"data": {"edge_weight": 0.00061886868961140711, "target": "13", "source": "11", "edgeColor": 0.0023930081724046637}}, {"data": {"edge_weight": 0.00019400263599166664, "target": "36", "source": "12", "edgeColor": 0.00061741035352377599}}, {"data": {"edge_weight": 0.00036691043491289652, "target": "13", "source": "12", "edgeColor": 0.0013400256531372686}}, {"data": {"edge_weight": 0.00019400263599166664, "target": "14", "source": "12", "edgeColor": 0.00061741035352377599}}, {"data": {"edge_weight": 0.003074551327452765, "target": "21", "source": "13", "edgeColor": 0.012655783224603347}}, {"data": {"edge_weight": 0.00036691043491289652, "target": "14", "source": "13", "edgeColor": 0.0013400256531372686}}, {"data": {"edge_weight": 0.00011151299314673849, "target": "16", "source": "14", "edgeColor": 0.00027267010264270979}}, {"data": {"edge_weight": 0.00037947564117552955, "target": "19", "source": "14", "edgeColor": 0.0013925380923958026}}, {"data": {"edge_weight": 6.6412476940913616e-05, "target": "16", "source": "15", "edgeColor": 8.4186279274845434e-05}}, {"data": {"edge_weight": 8.7753311144126941e-05, "target": "17", "source": "15", "edgeColor": 0.00017337377340738121}}, {"data": {"edge_weight": 8.7753311144126941e-05, "target": "17", "source": "16", "edgeColor": 0.00017337377340738121}}, {"data": {"edge_weight": 0.00036686777256897038, "target": "18", "source": "16", "edgeColor": 0.0013398473589097627}}, {"data": {"edge_weight": 0.00036686777256897038, "target": "18", "source": "17", "edgeColor": 0.0013398473589097627}}, {"data": {"edge_weight": 0.00037947564117552955, "target": "19", "source": "17", "edgeColor": 0.0013925380923958026}}, {"data": {"edge_weight": 0.00066180401768702328, "target": "20", "source": "18", "edgeColor": 0.0025724432537308629}}, {"data": {"edge_weight": 0.003074551327452765, "target": "21", "source": "18", "edgeColor": 0.012655783224603347}}, {"data": {"edge_weight": 0.00036686777256897038, "target": "31", "source": "18", "edgeColor": 0.0013398473589097627}}, {"data": {"edge_weight": 0.00066180401768702328, "target": "20", "source": "19", "edgeColor": 0.0025724432537308629}}, {"data": {"edge_weight": 0.003074551327452765, "target": "21", "source": "19", "edgeColor": 0.012655783224603347}}, {"data": {"edge_weight": 0.00037947564117552955, "target": "28", "source": "19", "edgeColor": 0.0013925380923958026}}, {"data": {"edge_weight": 0.003074551327452765, "target": "21", "source": "20", "edgeColor": 0.012655783224603347}}, {"data": {"edge_weight": 0.0033095725186161971, "target": "22", "source": "20", "edgeColor": 0.013637982463316987}}, {"data": {"edge_weight": 0.0033095725186161971, "target": "22", "source": "21", "edgeColor": 0.013637982463316987}}, {"data": {"edge_weight": 0.025403706516468099, "target": "23", "source": "21", "edgeColor": 0.1059736628558}}, {"data": {"edge_weight": 0.0033095725186161971, "target": "24", "source": "22", "edgeColor": 0.013637982463316987}}, {"data": {"edge_weight": 0.0033095725186161971, "target": "38", "source": "22", "edgeColor": 0.013637982463316987}}, {"data": {"edge_weight": 0.025403706516468099, "target": "23", "source": "22", "edgeColor": 0.1059736628558}}, {"data": {"edge_weight": 0.025403706516468099, "target": "24", "source": "23", "edgeColor": 0.1059736628558}}, {"data": {"edge_weight": 0.0030084188591186661, "target": "25", "source": "24", "edgeColor": 0.012379402785331228}}, {"data": {"edge_weight": 0.0030084188591186661, "target": "26", "source": "24", "edgeColor": 0.012379402785331228}}, {"data": {"edge_weight": 0.00048763346706556565, "target": "26", "source": "25", "edgeColor": 0.001844550669322292}}, {"data": {"edge_weight": 0.00045682132154216252, "target": "27", "source": "25", "edgeColor": 0.0017157807242530606}}, {"data": {"edge_weight": 0.00048763346706556565, "target": "27", "source": "26", "edgeColor": 0.001844550669322292}}, {"data": {"edge_weight": 0.00048763346706556565, "target": "28", "source": "26", "edgeColor": 0.001844550669322292}}, {"data": {"edge_weight": 0.00015851926714158588, "target": "28", "source": "27", "edgeColor": 0.00046911845823119786}}, {"data": {"edge_weight": 0.00015851926714158588, "target": "29", "source": "27", "edgeColor": 0.00046911845823119786}}, {"data": {"edge_weight": 0.00012503594583740521, "target": "30", "source": "28", "edgeColor": 0.0003291851503802437}}, {"data": {"edge_weight": 5.0556032004506679e-05, "target": "30", "source": "29", "edgeColor": 1.7919113883731898e-05}}, {"data": {"edge_weight": 6.9273615120119038e-05, "target": "31", "source": "29", "edgeColor": 9.614353184240603e-05}}, {"data": {"edge_weight": 0.00020468645418531711, "target": "32", "source": "30", "edgeColor": 0.00066206010635845222}}, {"data": {"edge_weight": 6.9273615120119038e-05, "target": "31", "source": "30", "edgeColor": 9.614353184240603e-05}}, {"data": {"edge_weight": 0.00020468645418531711, "target": "32", "source": "31", "edgeColor": 0.00066206010635845222}}, {"data": {"edge_weight": 0.00020468645418531711, "target": "33", "source": "32", "edgeColor": 0.00066206010635845222}}, {"data": {"edge_weight": 0.00020468645418531711, "target": "34", "source": "32", "edgeColor": 0.00066206010635845222}}, {"data": {"edge_weight": 4.6268336266660884e-05, "target": "34", "source": "33", "edgeColor": 0.0}}, {"data": {"edge_weight": 7.1227030310191085e-05, "target": "35", "source": "33", "edgeColor": 0.00010430723360513864}}, {"data": {"edge_weight": 7.1227030310191085e-05, "target": "35", "source": "34", "edgeColor": 0.00010430723360513864}}, {"data": {"edge_weight": 8.8298521215569403e-05, "target": "36", "source": "34", "edgeColor": 0.00017565231226789361}}, {"data": {"edge_weight": 8.8298521215569403e-05, "target": "36", "source": "35", "edgeColor": 0.00017565231226789361}}, {"data": {"edge_weight": 0.00029128321955266406, "target": "37", "source": "35", "edgeColor": 0.0010239648205581397}}, {"data": {"edge_weight": 0.00043369221372336594, "target": "38", "source": "36", "edgeColor": 0.0016191196870959891}}, {"data": {"edge_weight": 0.00043369221372336594, "target": "38", "source": "37", "edgeColor": 0.0016191196870959891}}, {"data": {"edge_weight": 0.0022816838720336559, "target": "39", "source": "37", "edgeColor": 0.0093422360195262906}}, {"data": {"edge_weight": 0.00043369221372336594, "target": "40", "source": "38", "edgeColor": 0.0016191196870959891}}, {"data": {"edge_weight": 0.0022816838720336559, "target": "40", "source": "39", "edgeColor": 0.0093422360195262906}}, {"data": {"edge_weight": 0.0022816838720336559, "target": "43", "source": "39", "edgeColor": 0.0093422360195262906}}, {"data": {"edge_weight": 0.0048563206463714398, "target": "46", "source": "39", "edgeColor": 0.020102143529144016}}, {"data": {"edge_weight": 0.012079293281920955, "target": "47", "source": "39", "edgeColor": 0.050288350095311928}}, {"data": {"edge_weight": 0.00034520527783526089, "target": "41", "source": "40", "edgeColor": 0.0012493155828994372}}, {"data": {"edge_weight": 0.00034520527783526089, "target": "42", "source": "40", "edgeColor": 0.0012493155828994372}}, {"data": {"edge_weight": 0.00029802009841563694, "target": "42", "source": "41", "edgeColor": 0.0010521195467671333}}, {"data": {"edge_weight": 0.00058427486285806253, "target": "43", "source": "41", "edgeColor": 0.0022484338464337831}}, {"data": {"edge_weight": 0.00058427486285806253, "target": "43", "source": "42", "edgeColor": 0.0022484338464337831}}, {"data": {"edge_weight": 0.00093757366940800974, "target": "44", "source": "42", "edgeColor": 0.0037249382293533984}}, {"data": {"edge_weight": 0.0023462483957155523, "target": "45", "source": "43", "edgeColor": 0.0096120637133369699}}, {"data": {"edge_weight": 0.0023462483957155523, "target": "45", "source": "44", "edgeColor": 0.0096120637133369699}}, {"data": {"edge_weight": 0.0048563206463714398, "target": "46", "source": "44", "edgeColor": 0.020102143529144016}}, {"data": {"edge_weight": 0.0048563206463714398, "target": "46", "source": "45", "edgeColor": 0.020102143529144016}}, {"data": {"edge_weight": 0.012079293281920955, "target": "47", "source": "45", "edgeColor": 0.050288350095311928}}, {"data": {"edge_weight": 0.033428870391091603, "target": "48", "source": "46", "edgeColor": 0.1395123825311935}}, {"data": {"edge_weight": 0.033428870391091603, "target": "48", "source": "47", "edgeColor": 0.1395123825311935}}, {"data": {"edge_weight": 0.059033878384843017, "target": "49", "source": "47", "edgeColor": 0.24652068775772412}}, {"data": {"edge_weight": 0.059033878384843017, "target": "49", "source": "48", "edgeColor": 0.24652068775772412}}]}, "data": {"name": "watts_strogatz_graph(50,4,0.1)"}} -------------------------------------------------------------------------------- /cytoscape_styles/heat_prop_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /cytoscape_styles/overlap_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /cytoscape_styles/visJS_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /docs/colocalization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ucsd-ccbb/visJS2jupyter/c16bcdf5fe0eed156f1a6eb789484945375452ba/docs/colocalization.png -------------------------------------------------------------------------------- /docs/graph_overlap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ucsd-ccbb/visJS2jupyter/c16bcdf5fe0eed156f1a6eb789484945375452ba/docs/graph_overlap.png -------------------------------------------------------------------------------- /docs/heat_prop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ucsd-ccbb/visJS2jupyter/c16bcdf5fe0eed156f1a6eb789484945375452ba/docs/heat_prop.png -------------------------------------------------------------------------------- /notebooks/complex_params_example/visJS2Jupyter_complex_example.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# More complex network styling for visJS2jupyter\n", 8 | "\n", 9 | "------------\n", 10 | "\n", 11 | "Authors: Brin Rosenthal (sbrosenthal@ucsd.edu), Mikayla Webster (m1webste@ucsd.edu), Julia Len (jlen@ucsd.edu)\n", 12 | "\n", 13 | "-----------\n", 14 | "\n" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "## Import packages" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": 1, 27 | "metadata": {}, 28 | "outputs": [ 29 | { 30 | "data": { 31 | "text/plain": [ 32 | "" 33 | ] 34 | }, 35 | "execution_count": 1, 36 | "metadata": {}, 37 | "output_type": "execute_result" 38 | } 39 | ], 40 | "source": [ 41 | "import numpy as np\n", 42 | "from random import randint\n", 43 | "import math\n", 44 | "import matplotlib as mpl\n", 45 | "import networkx as nx\n", 46 | "\n", 47 | "from visJS2jupyter import visJS_module\n", 48 | "reload(visJS_module)" 49 | ] 50 | }, 51 | { 52 | "cell_type": "code", 53 | "execution_count": 2, 54 | "metadata": { 55 | "collapsed": true 56 | }, 57 | "outputs": [], 58 | "source": [ 59 | "# create a simple graph\n", 60 | "G = nx.connected_watts_strogatz_graph(30,5,.2)\n", 61 | "nodes = list(G.nodes()) # type cast to list in order to make compatible with networkx 1.11 and 2.0\n", 62 | "edges = list(G.edges()) # for nx 2.0, returns an \"EdgeView\" object rather than an iterable" 63 | ] 64 | }, 65 | { 66 | "cell_type": "markdown", 67 | "metadata": {}, 68 | "source": [ 69 | "# Map node attributes to visual properties, and style the nodes and edges\n", 70 | "\n", 71 | "- To map node attributes to properties, simply add the property to the graph as a node-attribute, and use the return_node_to_color function" 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": 3, 77 | "metadata": { 78 | "collapsed": true 79 | }, 80 | "outputs": [], 81 | "source": [ 82 | "# add a node attributes to color-code by\n", 83 | "cc = nx.clustering(G)\n", 84 | "degree = dict(G.degree()) # nx 2.0 returns a \"DegreeView\" object. Cast to dict to maintain compatibility with nx 1.11\n", 85 | "bc = nx.betweenness_centrality(G)\n", 86 | "\n", 87 | "nx.set_node_attributes(G, name = 'clustering_coefficient', values = cc) # parameter order for name and values is switched \n", 88 | "nx.set_node_attributes(G, name = 'degree', values = degree) # between networkx 1.11 and 2.0, therefore we must\n", 89 | "nx.set_node_attributes(G, name = 'betweenness_centrality', values = bc) # explicitly pass our arguments \n", 90 | " # (not implicitly through position) " 91 | ] 92 | }, 93 | { 94 | "cell_type": "code", 95 | "execution_count": 4, 96 | "metadata": {}, 97 | "outputs": [], 98 | "source": [ 99 | "# add edge attribute weight\n", 100 | "weights=[randint(0,9) for p in range(len(edges))]\n", 101 | "edge_to_weight = dict(zip(edges, weights))\n", 102 | "nx.set_edge_attributes(G, name = 'weight', values = edge_to_weight)" 103 | ] 104 | }, 105 | { 106 | "cell_type": "code", 107 | "execution_count": 5, 108 | "metadata": { 109 | "collapsed": true 110 | }, 111 | "outputs": [], 112 | "source": [ 113 | "# setting shape of each node using a dictionary\n", 114 | "stars = ['star']*20 # some will be stars\n", 115 | "circles = ['dot']*10 # some will be circles\n", 116 | "shapes = stars + circles\n", 117 | "node_to_shape = dict(zip(nodes, shapes))" 118 | ] 119 | }, 120 | { 121 | "cell_type": "markdown", 122 | "metadata": {}, 123 | "source": [ 124 | "\n", 125 | "### Interactive network\n", 126 | "\n", 127 | "TIP: If you get errors running the following cell, try updating visJS2jupyter (pip install visJS2jupyter --upgrade). This cell is dependent on an update made on March 9th, 2018" 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": 6, 133 | "metadata": {}, 134 | "outputs": [ 135 | { 136 | "data": { 137 | "text/html": [ 138 | " Network | Basic usage" 139 | ], 140 | "text/plain": [ 141 | "" 142 | ] 143 | }, 144 | "execution_count": 6, 145 | "metadata": {}, 146 | "output_type": "execute_result" 147 | } 148 | ], 149 | "source": [ 150 | "# map the betweenness centrality to the node color, using matplotlib spring_r colormap\n", 151 | "node_to_color = visJS_module.return_node_to_color(G,field_to_map='betweenness_centrality',cmap=mpl.cm.spring_r,alpha = 1,\n", 152 | " color_max_frac = .9,color_min_frac = .1, vmin = 0, vmax = 0.08)\n", 153 | "\n", 154 | "# set node initial positions using networkx's spring_layout function\n", 155 | "pos = nx.spring_layout(G)\n", 156 | "\n", 157 | "# per node attributes\n", 158 | "nodes_dict = [{\"id\":n,\n", 159 | " \"color\":node_to_color[n],\n", 160 | " \"degree\":nx.degree(G,n),\n", 161 | " \"node_shape\": node_to_shape[n],\n", 162 | " \"x\":pos[n][0]*700,\n", 163 | " \"y\":pos[n][1]*700} for n in nodes\n", 164 | " ]\n", 165 | "\n", 166 | "# map to indices for source/target in edges\n", 167 | "node_map = dict(zip(nodes,range(len(nodes)))) \n", 168 | "\n", 169 | "# map colors to edges based on degree\n", 170 | "edge_to_color = visJS_module.return_edge_to_color(G,field_to_map='weight',cmap=mpl.cm.jet,alpha = 1.0, color_vals_transform = None,ceil_val=10,\n", 171 | " vmin=0,vmax=5)\n", 172 | "\n", 173 | "# per edge attributes\n", 174 | "edges_dict = [{\"source\":node_map[edges[i][0]], \"target\":node_map[edges[i][1]], \n", 175 | " \"color\":edge_to_color[edges[i]]} for i in range(len(edges))]\n", 176 | "\n", 177 | "# set some network-wide styles\n", 178 | "visJS_module.visjs_network(nodes_dict,edges_dict,\n", 179 | " node_size_multiplier=7,\n", 180 | " node_size_transform = '',\n", 181 | " node_color_highlight_border='red',\n", 182 | " node_color_highlight_background='#D3918B',\n", 183 | " node_color_hover_border='blue',\n", 184 | " node_color_hover_background='#8BADD3',\n", 185 | " node_font_size=25,\n", 186 | " edge_arrow_to=True,\n", 187 | " physics_enabled=True,\n", 188 | " edge_color_highlight='#8A324E',\n", 189 | " edge_color_hover='#8BADD3',\n", 190 | " edge_width=3,\n", 191 | " max_velocity=15,\n", 192 | " min_velocity=1)\n", 193 | "\n" 194 | ] 195 | }, 196 | { 197 | "cell_type": "code", 198 | "execution_count": null, 199 | "metadata": { 200 | "collapsed": true 201 | }, 202 | "outputs": [], 203 | "source": [] 204 | } 205 | ], 206 | "metadata": { 207 | "kernelspec": { 208 | "display_name": "Python 2", 209 | "language": "python", 210 | "name": "python2" 211 | }, 212 | "language_info": { 213 | "codemirror_mode": { 214 | "name": "ipython", 215 | "version": 2 216 | }, 217 | "file_extension": ".py", 218 | "mimetype": "text/x-python", 219 | "name": "python", 220 | "nbconvert_exporter": "python", 221 | "pygments_lexer": "ipython2", 222 | "version": "2.7.14" 223 | } 224 | }, 225 | "nbformat": 4, 226 | "nbformat_minor": 1 227 | } 228 | -------------------------------------------------------------------------------- /notebooks/default_params_example/visJS2Jupyter_basic_example.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Basic use example of visJS2jupyter\n", 8 | "\n", 9 | "------------\n", 10 | "\n", 11 | "Authors: Brin Rosenthal (sbrosenthal@ucsd.edu), Mikayla Webster (m1webste@ucsd.edu), Julia Len (ljen@ucsd.edu)\n", 12 | "\n", 13 | "-----------\n" 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "metadata": {}, 19 | "source": [ 20 | "This notebook has been tested, and should work with both networkx versions 1.11 and 2.1 and both Python 2 and 3" 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "metadata": {}, 26 | "source": [ 27 | "## Import packages" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": 4, 33 | "metadata": {}, 34 | "outputs": [], 35 | "source": [ 36 | "import networkx as nx\n", 37 | "import visJS2jupyter.visJS_module" 38 | ] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "metadata": {}, 43 | "source": [ 44 | "# Draw a simple network with default parameters" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": 7, 50 | "metadata": {}, 51 | "outputs": [], 52 | "source": [ 53 | "G = nx.connected_watts_strogatz_graph(30, 5, 0.2)\n", 54 | "nodes = list(G.nodes()) # must cast to list to maintain compatibility between nx 1.11 and 2.0\n", 55 | "edges = list(G.edges()) # will return an \"EdgeView\" object in nx 2.0" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": 10, 61 | "metadata": {}, 62 | "outputs": [ 63 | { 64 | "data": { 65 | "text/html": [ 66 | " Network | Basic usage" 67 | ], 68 | "text/plain": [ 69 | "" 70 | ] 71 | }, 72 | "execution_count": 10, 73 | "metadata": {}, 74 | "output_type": "execute_result" 75 | } 76 | ], 77 | "source": [ 78 | "# define the initial positions of the nodes using networkx's spring_layout function, and add to the nodes_dict.\n", 79 | "pos = nx.spring_layout(G)\n", 80 | "\n", 81 | "nodes_dict = [{\"id\":n,\n", 82 | " \"x\":pos[n][0]*300,\n", 83 | " \"y\":pos[n][1]*300} for n in nodes]\n", 84 | "\n", 85 | "node_map = dict(zip(nodes,range(len(nodes)))) # map to indices for source/target in edges\n", 86 | "\n", 87 | "edges_dict = [{\"source\":node_map[edges[i][0]], \"target\":node_map[edges[i][1]], \n", 88 | " \"title\":'test'} for i in range(len(edges))]\n", 89 | "\n", 90 | "visJS2jupyter.visJS_module.visjs_network(nodes_dict, edges_dict)" 91 | ] 92 | }, 93 | { 94 | "cell_type": "code", 95 | "execution_count": null, 96 | "metadata": { 97 | "collapsed": true 98 | }, 99 | "outputs": [], 100 | "source": [] 101 | } 102 | ], 103 | "metadata": { 104 | "kernelspec": { 105 | "display_name": "Python 2", 106 | "language": "python", 107 | "name": "python2" 108 | }, 109 | "language_info": { 110 | "codemirror_mode": { 111 | "name": "ipython", 112 | "version": 2 113 | }, 114 | "file_extension": ".py", 115 | "mimetype": "text/x-python", 116 | "name": "python", 117 | "nbconvert_exporter": "python", 118 | "pygments_lexer": "ipython2", 119 | "version": "2.7.14" 120 | } 121 | }, 122 | "nbformat": 4, 123 | "nbformat_minor": 1 124 | } 125 | -------------------------------------------------------------------------------- /notebooks/default_params_example/visJS2Jupyter_basic_example_zeppelin.json: -------------------------------------------------------------------------------- 1 | {"paragraphs":[{"text":"import matplotlib as mpl\nimport networkx as nx\nimport visJS2jupyter.visJS_module\n\nG = nx.connected_watts_strogatz_graph(30,5,.2)\nnodes = list(G.nodes()) # must cast to list to maintain compatibility between nx 1.11 and 2.0\nedges = list(G.edges()) # will return an \"EdgeView\" object in nx 2.0\n\n# define the initial positions of the nodes using networkx's spring_layout function, and add to the nodes_dict.\npos = nx.spring_layout(G)\nnodes_dict = [{\"id\":n,\n \"x\":pos[n][0]*1000,\n \"y\":pos[n][1]*1000} for n in nodes]\nnode_map = dict(zip(nodes,range(len(nodes)))) # map to indices for source/target in edges\n\nedges_dict = [{\"source\":node_map[edges[i][0]], \"target\":node_map[edges[i][1]], \n \"title\":'test'} for i in range(len(edges))]\n\nprint visJS2jupyter.visJS_module.visjs_network(nodes_dict,edges_dict,output=\"zeppelin\")","user":"anonymous","dateUpdated":"2017-12-31T15:39:37+0800","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"python","editOnDblClick":false},"editorMode":"ace/mode/python"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":" \n
\n \n \n \n \n \n \n \n \n \n"}]},"apps":[],"jobName":"paragraph_1514705973715_-260140964","id":"20171231-153933_1111272938","dateCreated":"2017-12-31T15:39:33+0800","dateStarted":"2017-12-31T15:39:37+0800","dateFinished":"2017-12-31T15:39:37+0800","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:1389"},{"user":"anonymous","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"python","editOnDblClick":false},"editorMode":"ace/mode/python"},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1514705977445_-1971287888","id":"20171231-153937_1130383652","dateCreated":"2017-12-31T15:39:37+0800","status":"READY","progressUpdateIntervalMs":500,"$$hashKey":"object:1390"}],"name":"visJS2Jupyter_basic_example","id":"2D5H8B338","angularObjects":{"2CV7CGBV9:shared_process":[],"2CW1V292C:shared_process":[],"2CY7UTQMF:shared_process":[],"2CXCWU8P9:shared_process":[],"2CUU8NPHV:shared_process":[],"2CV6VKPYF:shared_process":[],"2CUNHDUV5:shared_process":[],"2CVA4MDX7:shared_process":[],"2CUZSFCSK:shared_process":[],"2CV8RQAWT:shared_process":[],"2CVJ1PPUN:shared_process":[],"2CXN4J8A7:shared_process":[],"2CVHVHTQB:shared_process":[],"2CXWPKYS7:shared_process":[],"2CXGZYE95:shared_process":[],"2CXAQJY48:shared_process":[],"2CVXA5E8V:shared_process":[],"2CXQMGDNH:shared_process":[],"2CWKPBRHV:shared_process":[]},"config":{"looknfeel":"default","personalizedMode":"false"},"info":{}} -------------------------------------------------------------------------------- /notebooks/multigraph_example/.ipynb_checkpoints/multigraph_example-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Multigraph Network Styling for visJS2jupyter\n", 8 | "\n", 9 | "------------\n", 10 | "\n", 11 | "Authors: Brin Rosenthal (sbrosenthal@ucsd.edu), Mikayla Webster (m1webste@ucsd.edu), Julia Len (jlen@ucsd.edu)\n", 12 | "\n", 13 | "-----------\n", 14 | "\n", 15 | "## Import packages" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "execution_count": 1, 21 | "metadata": { 22 | "collapsed": true 23 | }, 24 | "outputs": [], 25 | "source": [ 26 | "import matplotlib as mpl\n", 27 | "import networkx as nx\n", 28 | "import pandas as pd\n", 29 | "import random\n", 30 | "\n", 31 | "import visJS2jupyter.visJS_module " 32 | ] 33 | }, 34 | { 35 | "cell_type": "markdown", 36 | "metadata": {}, 37 | "source": [ 38 | "We start by creating a randomized, single-edged graph, and convert that to a multigraph" 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": 2, 44 | "metadata": { 45 | "collapsed": false 46 | }, 47 | "outputs": [], 48 | "source": [ 49 | "G = nx.connected_watts_strogatz_graph(30,5,.2)\n", 50 | "G = nx.MultiGraph(G)\n", 51 | "edges = G.edges(keys = True) # for multigraphs every edge has to be represented by a three-tuple (source, target, key)" 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "metadata": {}, 57 | "source": [ 58 | "We duplicate every edge in the graph to make it a true multigraph. \n", 59 | "\n", 60 | "Note: NetworkX does not support duplicate edges with opposite directions. NetworkX will flip any backwards edges you try to add to your graph. For example, if your graph currently contains the edges [(0,1), (1,2)] and you add the edge (1,0) to your graph, your graph will now contain edges [(0,1), (0,1), (1,2)]" 61 | ] 62 | }, 63 | { 64 | "cell_type": "code", 65 | "execution_count": 3, 66 | "metadata": { 67 | "collapsed": false 68 | }, 69 | "outputs": [], 70 | "source": [ 71 | "sources = list(zip(*edges)[0])\n", 72 | "targets = list(zip(*edges)[1])\n", 73 | "backward_edges = list(zip(targets, sources)) # demonstarting adding backwards edges" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 4, 79 | "metadata": { 80 | "collapsed": false, 81 | "scrolled": true 82 | }, 83 | "outputs": [], 84 | "source": [ 85 | "G.add_edges_from(backward_edges)\n", 86 | "edges = list(G.edges(data = True))" 87 | ] 88 | }, 89 | { 90 | "cell_type": "code", 91 | "execution_count": 5, 92 | "metadata": { 93 | "collapsed": false 94 | }, 95 | "outputs": [], 96 | "source": [ 97 | "nodes = list(G.nodes()) # type cast to list in order to make compatible with networkx 1.11 and 2.0\n", 98 | "edges = list(G.edges(keys = True)) # for nx 2.0, returns an \"EdgeView\" object rather than an iterable" 99 | ] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | "## Multigraph Node and Edge Styling\n", 106 | "There is no difference between multigraph and single-edged-graph styling. Just map the node and edge attributes to some visual properties, and style the nodes and edges according to these properties (like usual!)" 107 | ] 108 | }, 109 | { 110 | "cell_type": "code", 111 | "execution_count": 6, 112 | "metadata": { 113 | "collapsed": false 114 | }, 115 | "outputs": [], 116 | "source": [ 117 | "# add some node attributes to color-code by\n", 118 | "degree = dict(G.degree()) # nx 2.0 returns a \"DegreeView\" object. Cast to dict to maintain compatibility with nx 1.11\n", 119 | "bc = nx.betweenness_centrality(G)\n", 120 | "nx.set_node_attributes(G, name = 'degree', values = degree) # between networkx 1.11 and 2.0, therefore we must\n", 121 | "nx.set_node_attributes(G, name = 'betweenness_centrality', values = bc) # explicitly pass our arguments \n", 122 | " # (not implicitly through position)\n", 123 | "\n", 124 | "# add the edge attribute 'weight' to color-code by\n", 125 | "weights = []\n", 126 | "for i in range(len(edges)):\n", 127 | " weights.append(float(random.randint(1,5))) \n", 128 | " \n", 129 | "w_dict = dict(zip(edges, weights))\n", 130 | "nx.set_edge_attributes(G, name = 'weight', values = w_dict)\n" 131 | ] 132 | }, 133 | { 134 | "cell_type": "code", 135 | "execution_count": 7, 136 | "metadata": { 137 | "collapsed": false 138 | }, 139 | "outputs": [], 140 | "source": [ 141 | "# map the betweenness centrality to the node color, using matplotlib spring_r colormap\n", 142 | "node_to_color = visJS_module.return_node_to_color(G,field_to_map='betweenness_centrality',cmap=mpl.cm.spring_r,alpha = 1,\n", 143 | " color_max_frac = .9,color_min_frac = .1)\n", 144 | "\n", 145 | "# map weight to edge color, using default settings\n", 146 | "edge_to_color = visJS_module.return_edge_to_color(G,field_to_map='weight')" 147 | ] 148 | }, 149 | { 150 | "cell_type": "markdown", 151 | "metadata": {}, 152 | "source": [ 153 | "## Interactive network\n", 154 | "\n", 155 | "Note that this example is simply the multigraph version of our \"Complex Parameters\" notebook." 156 | ] 157 | }, 158 | { 159 | "cell_type": "code", 160 | "execution_count": 8, 161 | "metadata": { 162 | "collapsed": false 163 | }, 164 | "outputs": [ 165 | { 166 | "data": { 167 | "text/html": [ 168 | " Network | Basic usage" 169 | ], 170 | "text/plain": [ 171 | "" 172 | ] 173 | }, 174 | "execution_count": 8, 175 | "metadata": {}, 176 | "output_type": "execute_result" 177 | } 178 | ], 179 | "source": [ 180 | "# set node initial positions using networkx's spring_layout function\n", 181 | "pos = nx.spring_layout(G)\n", 182 | "\n", 183 | "nodes_dict = [{\"id\":n,\"color\":node_to_color[n],\n", 184 | " \"degree\":nx.degree(G,n),\n", 185 | " \"x\":pos[n][0]*1000,\n", 186 | " \"y\":pos[n][1]*1000} for n in nodes\n", 187 | " ]\n", 188 | "node_map = dict(zip(nodes,range(len(nodes)))) # map to indices for source/target in edges\n", 189 | "edges_dict = [{\"source\":node_map[edges[i][0]], \"target\":node_map[edges[i][1]], \n", 190 | " \"color\":edge_to_color[(edges[i][0],edges[i][1],edges[i][2])],\"title\":'test'} # remeber (source, target, key)\n", 191 | " for i in range(len(edges))]\n", 192 | "\n", 193 | "# set some network-wide styles\n", 194 | "visJS_module.visjs_network(nodes_dict,edges_dict,\n", 195 | " node_size_multiplier=3,\n", 196 | " node_size_transform = '',\n", 197 | " node_color_highlight_border='red',\n", 198 | " node_color_highlight_background='#D3918B',\n", 199 | " node_color_hover_border='blue',\n", 200 | " node_color_hover_background='#8BADD3',\n", 201 | " node_font_size=25,\n", 202 | " edge_arrow_to=True,\n", 203 | " physics_enabled=True,\n", 204 | " edge_color_highlight='#8A324E',\n", 205 | " edge_color_hover='#8BADD3',\n", 206 | " edge_width=3,\n", 207 | " max_velocity=15,\n", 208 | " min_velocity=1,\n", 209 | " edge_smooth_enabled = True)" 210 | ] 211 | }, 212 | { 213 | "cell_type": "code", 214 | "execution_count": null, 215 | "metadata": { 216 | "collapsed": true 217 | }, 218 | "outputs": [], 219 | "source": [] 220 | } 221 | ], 222 | "metadata": { 223 | "kernelspec": { 224 | "display_name": "Python 2", 225 | "language": "python", 226 | "name": "python2" 227 | }, 228 | "language_info": { 229 | "codemirror_mode": { 230 | "name": "ipython", 231 | "version": 2 232 | }, 233 | "file_extension": ".py", 234 | "mimetype": "text/x-python", 235 | "name": "python", 236 | "nbconvert_exporter": "python", 237 | "pygments_lexer": "ipython2", 238 | "version": "2.7.11" 239 | } 240 | }, 241 | "nbformat": 4, 242 | "nbformat_minor": 0 243 | } 244 | -------------------------------------------------------------------------------- /notebooks/multigraph_example/style_file0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Network | Basic usage 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 |

20 | 21 |

22 | 23 |
24 | 25 | 26 | 251 | 252 | 253 | 254 | 255 | -------------------------------------------------------------------------------- /notebooks/tcga_mutation_example/mutation_EL.csv: -------------------------------------------------------------------------------- 1 | gene1,gene2,weighted_mutation_average 2 | ZFPM1,ACC,2.333333333 3 | MUC5B,ACC,1.622222222 4 | CRIPAK,ACC,1.577777778 5 | GARS,ACC,1.577777778 6 | ZNF517,ACC,1.466666667 7 | PLEC,ACC,1.455555556 8 | LRIG1,ACC,1.377777778 9 | OBSCN,ACC,1.322222222 10 | MUC2,ACC,1.288888889 11 | LACTB,ACC,1.211111111 12 | OPRD1,ACC,1.177777778 13 | USP42,ACC,1.155555556 14 | SOWAHA,ACC,1.155555556 15 | CCDC102A,ACC,1.155555556 16 | DSPP,ACC,1.144444444 17 | TOR3A,ACC,1.111111111 18 | PODXL,ACC,1.066666667 19 | ZNF787,ACC,1.066666667 20 | TRIOBP,ACC,1.033333333 21 | MUC4,ACC,1.011111111 22 | B3GNT6,ACC,1 23 | MUC16,ACC,0.988888889 24 | OTOP1,ACC,0.955555556 25 | TPO,ACC,0.933333333 26 | IRX3,ACC,0.933333333 27 | TTN,BLCA,2.538461538 28 | TP53,BLCA,2.107692308 29 | MUC16,BLCA,1.5 30 | KMT2D,BLCA,1.307692308 31 | ARID1A,BLCA,1.284615385 32 | KDM6A,BLCA,1.069230769 33 | KMT2C,BLCA,0.907692308 34 | SYNE1,BLCA,0.846153846 35 | PIK3CA,BLCA,0.815384615 36 | HMCN1,BLCA,0.792307692 37 | FLG,BLCA,0.769230769 38 | EP300,BLCA,0.707692308 39 | RYR2,BLCA,0.692307692 40 | CDKN1A,BLCA,0.669230769 41 | CSMD3,BLCA,0.669230769 42 | ZFHX4,BLCA,0.646153846 43 | KMT2A,BLCA,0.630769231 44 | PDE4DIP,BLCA,0.615384615 45 | MACF1,BLCA,0.607692308 46 | LRP1B,BLCA,0.6 47 | CREBBP,BLCA,0.6 48 | MUC17,BLCA,0.592307692 49 | AHNAK2,BLCA,0.592307692 50 | SYNE2,BLCA,0.584615385 51 | SPTAN1,BLCA,0.584615385 52 | PIK3CA,BRCA,1.287615148 53 | TP53,BRCA,1.273285568 54 | TTN,BRCA,0.749232344 55 | CDH1,BRCA,0.522006141 56 | GATA3,BRCA,0.420675537 57 | MUC16,BRCA,0.35926305 58 | MAP3K1,BRCA,0.350051177 59 | KMT2C,BRCA,0.332650972 60 | MUC4,BRCA,0.261003071 61 | MUC12,BRCA,0.244626407 62 | RYR2,BRCA,0.205731832 63 | SYNE1,BRCA,0.203684749 64 | FLG,BRCA,0.201637666 65 | USH2A,BRCA,0.198567042 66 | MUC5B,BRCA,0.196519959 67 | RYR3,BRCA,0.18321392 68 | NCOR1,BRCA,0.178096213 69 | SPEN,BRCA,0.170931423 70 | DMD,BRCA,0.170931423 71 | SYNE2,BRCA,0.16888434 72 | HMCN1,BRCA,0.167860798 73 | OBSCN,BRCA,0.165813715 74 | FCGBP,BRCA,0.164790174 75 | HRNR,BRCA,0.164790174 76 | NEB,BRCA,0.160696008 77 | TTN,CESC,1.582474227 78 | PIK3CA,CESC,1.082474227 79 | MUC4,CESC,0.87628866 80 | Unknown,CESC,0.788659794 81 | KMT2C,CESC,0.701030928 82 | MUC16,CESC,0.644329897 83 | SYNE1,CESC,0.582474227 84 | KMT2D,CESC,0.567010309 85 | GPR98,CESC,0.536082474 86 | DST,CESC,0.510309278 87 | RYR2,CESC,0.494845361 88 | EP300,CESC,0.469072165 89 | SYNE2,CESC,0.463917526 90 | MT-ND5,CESC,0.458762887 91 | DMD,CESC,0.453608247 92 | FBXW7,CESC,0.443298969 93 | FLG,CESC,0.43814433 94 | OBSCN,CESC,0.432989691 95 | MUC5B,CESC,0.417525773 96 | MUC12,CESC,0.402061856 97 | USH2A,CESC,0.402061856 98 | NEB,CESC,0.371134021 99 | HMCN1,CESC,0.371134021 100 | ARID1A,CESC,0.365979381 101 | ABCA12,CESC,0.355670103 102 | Unknown,CHOL,2.571428571 103 | MUC4,CHOL,2 104 | TTN,CHOL,1.257142857 105 | PBRM1,CHOL,1.114285714 106 | MT-ND2,CHOL,1.028571429 107 | CDC27,CHOL,0.857142857 108 | KMT2C,CHOL,0.857142857 109 | MUC2,CHOL,0.857142857 110 | BAP1,CHOL,0.828571429 111 | DNAH5,CHOL,0.742857143 112 | ANKRD36C,CHOL,0.714285714 113 | BIRC6,CHOL,0.714285714 114 | EP400,CHOL,0.685714286 115 | ARID1A,CHOL,0.685714286 116 | MUC5B,CHOL,0.685714286 117 | TCHH,CHOL,0.685714286 118 | ABCA13,CHOL,0.657142857 119 | MUC16,CHOL,0.657142857 120 | FRG1B,CHOL,0.657142857 121 | MT-ND1,CHOL,0.628571429 122 | RYR3,CHOL,0.628571429 123 | MT-CO2,CHOL,0.628571429 124 | FMN2,CHOL,0.6 125 | TP53,CHOL,0.6 126 | LRP1B,CHOL,0.571428571 127 | APC,COAD,3.363636364 128 | TP53,COAD,2.071428571 129 | TTN,COAD,1.941558442 130 | KRAS,COAD,1.532467532 131 | SYNE1,COAD,1.155844156 132 | LRP1B,COAD,0.915584416 133 | FAT4,COAD,0.87012987 134 | MUC16,COAD,0.863636364 135 | LRP2,COAD,0.844155844 136 | DNAH5,COAD,0.818181818 137 | FBXW7,COAD,0.792207792 138 | FLG,COAD,0.746753247 139 | DMD,COAD,0.720779221 140 | USH2A,COAD,0.714285714 141 | SDK1,COAD,0.707792208 142 | ANK2,COAD,0.694805195 143 | PIK3CA,COAD,0.675324675 144 | COL6A3,COAD,0.649350649 145 | HMCN1,COAD,0.649350649 146 | RYR2,COAD,0.636363636 147 | CUBN,COAD,0.62987013 148 | PKHD1,COAD,0.62987013 149 | CSMD3,COAD,0.623376623 150 | FAT2,COAD,0.616883117 151 | MDN1,COAD,0.61038961 152 | APC,COADREAD,3.609865471 153 | TP53,COADREAD,2.278026906 154 | KRAS,COADREAD,1.730941704 155 | TTN,COADREAD,1.69058296 156 | SYNE1,COADREAD,1.035874439 157 | LRP1B,COADREAD,0.816143498 158 | MUC16,COADREAD,0.811659193 159 | FAT4,COADREAD,0.802690583 160 | FBXW7,COADREAD,0.713004484 161 | LRP2,COADREAD,0.708520179 162 | DNAH5,COADREAD,0.686098655 163 | FLG,COADREAD,0.650224215 164 | DMD,COADREAD,0.632286996 165 | CSMD3,COADREAD,0.614349776 166 | ANK2,COADREAD,0.614349776 167 | HMCN1,COADREAD,0.605381166 168 | PIK3CA,COADREAD,0.600896861 169 | USH2A,COADREAD,0.591928251 170 | CSMD1,COADREAD,0.587443946 171 | RYR2,COADREAD,0.573991031 172 | FAT2,COADREAD,0.569506726 173 | COL6A3,COADREAD,0.560538117 174 | AMER1,COADREAD,0.542600897 175 | DCHS2,COADREAD,0.538116592 176 | ZFHX4,COADREAD,0.533632287 177 | IGLL5,DLBC,1.604166667 178 | KMT2D,DLBC,1.520833333 179 | MUC4,DLBC,1.354166667 180 | MUC2,DLBC,1.25 181 | B2M,DLBC,1.229166667 182 | BTG2,DLBC,1.1875 183 | MUC16,DLBC,1 184 | TTN,DLBC,0.979166667 185 | FAT4,DLBC,0.979166667 186 | PIM1,DLBC,0.958333333 187 | SYNE1,DLBC,0.9375 188 | MUC5B,DLBC,0.875 189 | BTG1,DLBC,0.854166667 190 | HIST1H1E,DLBC,0.854166667 191 | CARD11,DLBC,0.833333333 192 | FAT1,DLBC,0.75 193 | CSMD3,DLBC,0.729166667 194 | DST,DLBC,0.729166667 195 | TNFAIP3,DLBC,0.6875 196 | PCLO,DLBC,0.6875 197 | MYD88,DLBC,0.6875 198 | TET2,DLBC,0.6875 199 | P2RY8,DLBC,0.666666667 200 | ATM,DLBC,0.666666667 201 | MUC17,DLBC,0.666666667 202 | TP53,ESCA,3.405405405 203 | TTN,ESCA,2.432432432 204 | MUC16,ESCA,1.259459459 205 | SYNE1,ESCA,1.075675676 206 | CSMD3,ESCA,0.940540541 207 | LRP1B,ESCA,0.848648649 208 | HMCN1,ESCA,0.832432432 209 | DNAH5,ESCA,0.816216216 210 | RYR2,ESCA,0.783783784 211 | MT-CO1,ESCA,0.778378378 212 | DST,ESCA,0.767567568 213 | FLG,ESCA,0.762162162 214 | KMT2D,ESCA,0.756756757 215 | MUC4,ESCA,0.740540541 216 | PCLO,ESCA,0.724324324 217 | USH2A,ESCA,0.708108108 218 | CSMD1,ESCA,0.643243243 219 | OBSCN,ESCA,0.632432432 220 | Unknown,ESCA,0.632432432 221 | XIRP2,ESCA,0.605405405 222 | RIMS2,ESCA,0.605405405 223 | FAT4,ESCA,0.605405405 224 | MUC12,ESCA,0.6 225 | SPTA1,ESCA,0.6 226 | MACF1,ESCA,0.6 227 | PTEN,GBM,1.303448276 228 | TTN,GBM,1.182758621 229 | TP53,GBM,1.155172414 230 | EGFR,GBM,1.072413793 231 | MUC16,GBM,0.775862069 232 | FLG,GBM,0.548275862 233 | NF1,GBM,0.489655172 234 | Unknown,GBM,0.465517241 235 | PIK3CA,GBM,0.444827586 236 | PIK3R1,GBM,0.437931034 237 | PCLO,GBM,0.437931034 238 | RYR2,GBM,0.434482759 239 | SPTA1,GBM,0.386206897 240 | MUC17,GBM,0.365517241 241 | RB1,GBM,0.35862069 242 | HMCN1,GBM,0.324137931 243 | AHNAK2,GBM,0.293103448 244 | ATRX,GBM,0.286206897 245 | NBPF10,GBM,0.275862069 246 | USH2A,GBM,0.272413793 247 | PKHD1,GBM,0.265517241 248 | RYR3,GBM,0.265517241 249 | FRG1B,GBM,0.25862069 250 | OBSCN,GBM,0.248275862 251 | LRP2,GBM,0.244827586 252 | IDH1,GBMLGG,1.638888889 253 | TP53,GBMLGG,1.625 254 | ATRX,GBMLGG,1.085069444 255 | TTN,GBMLGG,0.833333333 256 | PTEN,GBMLGG,0.748263889 257 | EGFR,GBMLGG,0.645833333 258 | MUC16,GBMLGG,0.519097222 259 | CIC,GBMLGG,0.434027778 260 | PIK3CA,GBMLGG,0.380208333 261 | NF1,GBMLGG,0.376736111 262 | FLG,GBMLGG,0.342013889 263 | PIK3R1,GBMLGG,0.321180556 264 | RYR2,GBMLGG,0.284722222 265 | PCLO,GBMLGG,0.262152778 266 | MUC17,GBMLGG,0.243055556 267 | Unknown,GBMLGG,0.234375 268 | HMCN1,GBMLGG,0.222222222 269 | NOTCH1,GBMLGG,0.217013889 270 | RB1,GBMLGG,0.201388889 271 | SPTA1,GBMLGG,0.201388889 272 | OBSCN,GBMLGG,0.192708333 273 | APOB,GBMLGG,0.192708333 274 | AHNAK2,GBMLGG,0.189236111 275 | PKHD1,GBMLGG,0.189236111 276 | LRP2,GBMLGG,0.178819444 277 | TP53,HNSC,3.111111111 278 | TTN,HNSC,2.035842294 279 | FAT1,HNSC,1.103942652 280 | CDKN2A,HNSC,1.035842294 281 | CSMD3,HNSC,0.992831541 282 | MUC16,HNSC,0.949820789 283 | LRP1B,HNSC,0.856630824 284 | NOTCH1,HNSC,0.831541219 285 | PIK3CA,HNSC,0.831541219 286 | KMT2D,HNSC,0.792114695 287 | SYNE1,HNSC,0.759856631 288 | FLG,HNSC,0.698924731 289 | DNAH5,HNSC,0.681003584 290 | PCLO,HNSC,0.659498208 291 | USH2A,HNSC,0.591397849 292 | PKHD1L1,HNSC,0.52688172 293 | RYR2,HNSC,0.512544803 294 | SI,HNSC,0.501792115 295 | NSD1,HNSC,0.480286738 296 | DMD,HNSC,0.476702509 297 | MUC17,HNSC,0.47311828 298 | FAM135B,HNSC,0.455197133 299 | COL11A1,HNSC,0.430107527 300 | CUBN,HNSC,0.422939068 301 | NBPF10,HNSC,0.415770609 302 | MUC4,KICH,2.893939394 303 | FRG1B,KICH,2.151515152 304 | MUC6,KICH,1.5 305 | TP53,KICH,1.348484848 306 | MUC16,KICH,1.196969697 307 | MUC2,KICH,1.166666667 308 | ANKRD30BL,KICH,1.075757576 309 | MUC5B,KICH,0.893939394 310 | FRG1,KICH,0.863636364 311 | AHNAK2,KICH,0.787878788 312 | NBPF10,KICH,0.787878788 313 | CDC27,KICH,0.712121212 314 | KMT2C,KICH,0.621212121 315 | PRB2,KICH,0.575757576 316 | MT-ND5,KICH,0.545454545 317 | PABPC1,KICH,0.53030303 318 | PABPC3,KICH,0.515151515 319 | DSPP,KICH,0.515151515 320 | Unknown,KICH,0.5 321 | PRSS3,KICH,0.484848485 322 | TTN,KICH,0.46969697 323 | RBMXL1,KICH,0.46969697 324 | HLA-C,KICH,0.454545455 325 | MT-CYB,KICH,0.439393939 326 | PCDHA8,KICH,0.424242424 327 | VHL,KIPAN,1.372670807 328 | PBRM1,KIPAN,0.939440994 329 | MUC4,KIPAN,0.902173913 330 | TTN,KIPAN,0.678571429 331 | Unknown,KIPAN,0.628881988 332 | MUC16,KIPAN,0.433229814 333 | FRG1B,KIPAN,0.414596273 334 | SETD2,KIPAN,0.389751553 335 | MUC2,KIPAN,0.372670807 336 | KMT2C,KIPAN,0.279503106 337 | MUC6,KIPAN,0.270186335 338 | AHNAK2,KIPAN,0.257763975 339 | MUC5B,KIPAN,0.242236025 340 | TVP23C,KIPAN,0.223602484 341 | KMT2D,KIPAN,0.222049689 342 | DST,KIPAN,0.215838509 343 | TP53,KIPAN,0.201863354 344 | KDM5C,KIPAN,0.198757764 345 | PTEN,KIPAN,0.192546584 346 | MTOR,KIPAN,0.189440994 347 | NEFH,KIPAN,0.183229814 348 | USH2A,KIPAN,0.183229814 349 | ANKRD30BL,KIPAN,0.178571429 350 | PABPC1,KIPAN,0.177018634 351 | HMCN1,KIPAN,0.166149068 352 | VHL,KIRC,2.088729017 353 | PBRM1,KIRC,1.376498801 354 | Unknown,KIRC,0.791366906 355 | MUC4,KIRC,0.762589928 356 | TTN,KIRC,0.695443645 357 | SETD2,KIRC,0.45323741 358 | MUC16,KIRC,0.330935252 359 | KDM5C,KIRC,0.273381295 360 | MTOR,KIRC,0.24940048 361 | BAP1,KIRC,0.215827338 362 | DST,KIRC,0.206235012 363 | USH2A,KIRC,0.191846523 364 | PABPC1,KIRC,0.184652278 365 | AHNAK2,KIRC,0.182254197 366 | PTEN,KIRC,0.177458034 367 | HMCN1,KIRC,0.177458034 368 | KMT2C,KIRC,0.172661871 369 | KMT2D,KIRC,0.158273381 370 | PCLO,KIRC,0.153477218 371 | GPR98,KIRC,0.148681055 372 | SYNE1,KIRC,0.148681055 373 | MUC6,KIRC,0.143884892 374 | LRP1B,KIRC,0.136690647 375 | COL6A6,KIRC,0.136690647 376 | FAT3,KIRC,0.136690647 377 | TVP23C,KIRP,0.869565217 378 | FRG1B,KIRP,0.726708075 379 | TTN,KIRP,0.720496894 380 | MUC2,KIRP,0.683229814 381 | MUC4,KIRP,0.447204969 382 | NEFH,KIRP,0.422360248 383 | KMT2C,KIRP,0.416149068 384 | KMT2D,KIRP,0.397515528 385 | MUC16,KIRP,0.385093168 386 | MUC5B,KIRP,0.378881988 387 | MET,KIRP,0.372670807 388 | FAT1,KIRP,0.366459627 389 | OBSCN,KIRP,0.329192547 390 | SETD2,KIRP,0.329192547 391 | SRCAP,KIRP,0.322981366 392 | CUBN,KIRP,0.279503106 393 | ZNF814,KIRP,0.273291925 394 | KIAA1109,KIRP,0.260869565 395 | ZNF598,KIRP,0.260869565 396 | Unknown,KIRP,0.260869565 397 | SMG1,KIRP,0.254658385 398 | NEB,KIRP,0.254658385 399 | DSPP,KIRP,0.248447205 400 | NF2,KIRP,0.242236025 401 | AHNAK2,KIRP,0.236024845 402 | NPM1,LAML,1.365482234 403 | FLT3,LAML,1.096446701 404 | DNMT3A,LAML,1.040609137 405 | Unknown,LAML,0.944162437 406 | TET2,LAML,0.431472081 407 | IDH2,LAML,0.406091371 408 | IDH1,LAML,0.385786802 409 | RUNX1,LAML,0.375634518 410 | TP53,LAML,0.319796954 411 | CEBPA,LAML,0.30964467 412 | NRAS,LAML,0.304568528 413 | WT1,LAML,0.263959391 414 | PTPN11,LAML,0.182741117 415 | KIT,LAML,0.16751269 416 | KRAS,LAML,0.162436548 417 | U2AF1,LAML,0.162436548 418 | TTN,LAML,0.14213198 419 | SMC3,LAML,0.137055838 420 | SMC1A,LAML,0.131979695 421 | PHF6,LAML,0.126903553 422 | ASXL1,LAML,0.111675127 423 | RAD21,LAML,0.111675127 424 | STAG2,LAML,0.106598985 425 | BRINP3,LAML,0.101522843 426 | PLCE1,LAML,0.081218274 427 | IDH1,LGG,3.090909091 428 | TP53,LGG,2.101398601 429 | ATRX,LGG,1.895104895 430 | CIC,LGG,0.856643357 431 | TTN,LGG,0.479020979 432 | NOTCH1,LGG,0.437062937 433 | FUBP1,LGG,0.34965035 434 | PIK3CA,LGG,0.314685315 435 | NF1,LGG,0.262237762 436 | MUC16,LGG,0.258741259 437 | EGFR,LGG,0.213286713 438 | PIK3R1,LGG,0.202797203 439 | SMARCA4,LGG,0.195804196 440 | ARID1A,LGG,0.195804196 441 | PTEN,LGG,0.185314685 442 | BCOR,LGG,0.171328671 443 | IDH2,LGG,0.167832168 444 | APOB,LGG,0.164335664 445 | ZBTB20,LGG,0.153846154 446 | OBSCN,LGG,0.136363636 447 | RYR2,LGG,0.132867133 448 | FLG,LGG,0.132867133 449 | FAT2,LGG,0.129370629 450 | HMCN1,LGG,0.118881119 451 | MUC17,LGG,0.118881119 452 | TTN,LIHC,1.287878788 453 | TP53,LIHC,1.272727273 454 | CTNNB1,LIHC,1.035353535 455 | MUC16,LIHC,0.873737374 456 | APOB,LIHC,0.590909091 457 | RYR2,LIHC,0.52020202 458 | CSMD3,LIHC,0.464646465 459 | ABCA13,LIHC,0.464646465 460 | OBSCN,LIHC,0.444444444 461 | USH2A,LIHC,0.419191919 462 | PCLO,LIHC,0.409090909 463 | FAT3,LIHC,0.388888889 464 | LRP1B,LIHC,0.383838384 465 | CSMD1,LIHC,0.378787879 466 | ARID1A,LIHC,0.373737374 467 | XIRP2,LIHC,0.373737374 468 | ALB,LIHC,0.373737374 469 | FLG,LIHC,0.368686869 470 | CACNA1E,LIHC,0.358585859 471 | GPR98,LIHC,0.353535354 472 | DST,LIHC,0.353535354 473 | DMD,LIHC,0.333333333 474 | FREM2,LIHC,0.318181818 475 | DNAH6,LIHC,0.318181818 476 | SYNE2,LIHC,0.313131313 477 | TTN,LUAD,2.139130435 478 | TP53,LUAD,1.934782609 479 | MUC16,LUAD,1.708695652 480 | RYR2,LUAD,1.582608696 481 | CSMD3,LUAD,1.52173913 482 | KRAS,LUAD,1.308695652 483 | USH2A,LUAD,1.295652174 484 | LRP1B,LUAD,1.291304348 485 | Unknown,LUAD,1.265217391 486 | ZFHX4,LUAD,1.204347826 487 | FLG,LUAD,1.156521739 488 | SPTA1,LUAD,1.104347826 489 | MUC17,LUAD,0.956521739 490 | FAT3,LUAD,0.934782609 491 | XIRP2,LUAD,0.934782609 492 | PCLO,LUAD,0.895652174 493 | CSMD1,LUAD,0.869565217 494 | ZNF536,LUAD,0.839130435 495 | NAV3,LUAD,0.834782609 496 | KMT2C,LUAD,0.786956522 497 | RP1L1,LUAD,0.782608696 498 | PCDH15,LUAD,0.77826087 499 | PAPPA2,LUAD,0.756521739 500 | GPR112,LUAD,0.756521739 501 | APOB,LUAD,0.743478261 502 | TP53,LUSC,3.280898876 503 | TTN,LUSC,3.162921348 504 | MUC16,LUSC,2.016853933 505 | CSMD3,LUSC,1.988764045 506 | RYR2,LUSC,1.730337079 507 | ZFHX4,LUSC,1.646067416 508 | LRP1B,LUSC,1.612359551 509 | USH2A,LUSC,1.52247191 510 | SYNE1,LUSC,1.303370787 511 | SPTA1,LUSC,1.02247191 512 | RYR3,LUSC,1.011235955 513 | FAM135B,LUSC,0.938202247 514 | FLG,LUSC,0.91011236 515 | NAV3,LUSC,0.91011236 516 | PKHD1L1,LUSC,0.91011236 517 | PKHD1,LUSC,0.904494382 518 | KMT2D,LUSC,0.893258427 519 | XIRP2,LUSC,0.882022472 520 | DNAH11,LUSC,0.865168539 521 | LRP2,LUSC,0.842696629 522 | ERICH3,LUSC,0.842696629 523 | DNAH5,LUSC,0.842696629 524 | HCN1,LUSC,0.825842697 525 | MUC17,LUSC,0.825842697 526 | SI,LUSC,0.820224719 527 | TP53,OV,3.449367089 528 | TTN,OV,0.82278481 529 | Unknown,OV,0.579113924 530 | USH2A,OV,0.272151899 531 | MUC16,OV,0.268987342 532 | CSMD3,OV,0.25 533 | FAT3,OV,0.25 534 | HMCN1,OV,0.25 535 | NF1,OV,0.202531646 536 | AHNAK2,OV,0.199367089 537 | RYR2,OV,0.196202532 538 | MUC17,OV,0.196202532 539 | DST,OV,0.183544304 540 | LRP2,OV,0.17721519 541 | DNAH5,OV,0.17721519 542 | BRCA1,OV,0.170886076 543 | APOB,OV,0.167721519 544 | LRP1B,OV,0.164556962 545 | HYDIN,OV,0.158227848 546 | FAT1,OV,0.158227848 547 | AHNAK,OV,0.158227848 548 | COL6A3,OV,0.155063291 549 | DNAH3,OV,0.155063291 550 | RYR1,OV,0.14556962 551 | MACF1,OV,0.139240506 552 | KRAS,PAAD,3.369863014 553 | TP53,PAAD,2.856164384 554 | RBM4,PAAD,1.698630137 555 | JMY,PAAD,1.520547945 556 | RIOK1,PAAD,1.506849315 557 | LCE2A,PAAD,1.260273973 558 | TTN,PAAD,1.246575342 559 | ZFHX3,PAAD,1.020547945 560 | SMAD4,PAAD,0.97260274 561 | CDKN2A,PAAD,0.952054795 562 | C1QB,PAAD,0.945205479 563 | KMT2D,PAAD,0.842465753 564 | DBR1,PAAD,0.794520548 565 | AP3S1,PAAD,0.753424658 566 | AEBP1,PAAD,0.719178082 567 | AXDND1,PAAD,0.705479452 568 | RBM47,PAAD,0.684931507 569 | RFX1,PAAD,0.664383562 570 | NCOA3,PAAD,0.636986301 571 | MUC16,PAAD,0.609589041 572 | RGPD3,PAAD,0.520547945 573 | IRS4,PAAD,0.465753425 574 | RANBP2,PAAD,0.424657534 575 | ANAPC1,PAAD,0.424657534 576 | SPTA1,PAAD,0.397260274 577 | FRG1B,PCPG,0.888268156 578 | HRAS,PCPG,0.402234637 579 | NF1,PCPG,0.379888268 580 | TTN,PCPG,0.25698324 581 | NBPF10,PCPG,0.25698324 582 | MLLT3,PCPG,0.223463687 583 | ANKRD36C,PCPG,0.217877095 584 | MUC16,PCPG,0.201117318 585 | EPAS1,PCPG,0.17877095 586 | CHEK2,PCPG,0.17877095 587 | POTEC,PCPG,0.17877095 588 | PRG4,PCPG,0.139664804 589 | NUDT11,PCPG,0.139664804 590 | MAML3,PCPG,0.134078212 591 | BCRP7,PCPG,0.134078212 592 | RET,PCPG,0.134078212 593 | RGPD8,PCPG,0.134078212 594 | ANKRD36,PCPG,0.134078212 595 | ABCA13,PCPG,0.134078212 596 | DNM1P47,PCPG,0.12849162 597 | CDC27,PCPG,0.12849162 598 | ATRX,PCPG,0.12849162 599 | NBPF1,PCPG,0.122905028 600 | RP11-156P1.2,PCPG,0.117318436 601 | ZNF844,PCPG,0.111731844 602 | TTN,PRAD,0.481927711 603 | SPOP,PRAD,0.448795181 604 | MUC16,PRAD,0.274096386 605 | TP53,PRAD,0.271084337 606 | MUC17,PRAD,0.228915663 607 | SPTA1,PRAD,0.180722892 608 | KMT2C,PRAD,0.174698795 609 | ATM,PRAD,0.168674699 610 | FOXA1,PRAD,0.165662651 611 | OBSCN,PRAD,0.162650602 612 | KMT2D,PRAD,0.162650602 613 | AHNAK2,PRAD,0.153614458 614 | FAT3,PRAD,0.147590361 615 | CSMD3,PRAD,0.144578313 616 | LRP1B,PRAD,0.138554217 617 | HMCN1,PRAD,0.138554217 618 | AHNAK,PRAD,0.135542169 619 | RP1,PRAD,0.135542169 620 | FAT4,PRAD,0.123493976 621 | FLG,PRAD,0.120481928 622 | PTEN,PRAD,0.11746988 623 | DCHS2,PRAD,0.114457831 624 | SYNE1,PRAD,0.114457831 625 | FLG2,PRAD,0.111445783 626 | GPR98,PRAD,0.111445783 627 | APC,READ,4.15942029 628 | TP53,READ,2.739130435 629 | KRAS,READ,2.173913043 630 | TTN,READ,1.130434783 631 | SYNE1,READ,0.768115942 632 | MUC16,READ,0.695652174 633 | FAT4,READ,0.652173913 634 | LRP1B,READ,0.594202899 635 | CSMD3,READ,0.594202899 636 | CSMD1,READ,0.579710145 637 | AHNAK2,READ,0.536231884 638 | FBXW7,READ,0.536231884 639 | KIAA1804,READ,0.52173913 640 | HMCN1,READ,0.507246377 641 | ZFHX4,READ,0.47826087 642 | ATP10A,READ,0.47826087 643 | FAT2,READ,0.463768116 644 | SMAD4,READ,0.463768116 645 | DNAH10,READ,0.449275362 646 | ANK2,READ,0.434782609 647 | COL12A1,READ,0.434782609 648 | DCHS2,READ,0.434782609 649 | DMD,READ,0.434782609 650 | SETX,READ,0.434782609 651 | FLG,READ,0.434782609 652 | TP53,SARC,1.329365079 653 | ATRX,SARC,0.718253968 654 | TTN,SARC,0.599206349 655 | RB1,SARC,0.436507937 656 | MUC16,SARC,0.432539683 657 | PCLO,SARC,0.353174603 658 | OBSCN,SARC,0.273809524 659 | NRXN1,SARC,0.26984127 660 | USH2A,SARC,0.265873016 661 | MUC4,SARC,0.265873016 662 | MT-CO1,SARC,0.265873016 663 | RNF212,SARC,0.261904762 664 | DNAH8,SARC,0.253968254 665 | MUC5B,SARC,0.25 666 | RYR1,SARC,0.242063492 667 | LRP1B,SARC,0.238095238 668 | MACF1,SARC,0.238095238 669 | MUC17,SARC,0.234126984 670 | MUC12,SARC,0.23015873 671 | GPR98,SARC,0.226190476 672 | DNAH5,SARC,0.226190476 673 | CSMD1,SARC,0.222222222 674 | NCOR2,SARC,0.218253968 675 | FAT1,SARC,0.214285714 676 | NEB,SARC,0.214285714 677 | TTN,SKCM,3.128279883 678 | MUC16,SKCM,2.89212828 679 | Unknown,SKCM,2.580174927 680 | DNAH5,SKCM,2.303206997 681 | BRAF,SKCM,2.04664723 682 | PCLO,SKCM,1.941690962 683 | APOB,SKCM,1.644314869 684 | LRP1B,SKCM,1.635568513 685 | GPR98,SKCM,1.586005831 686 | CSMD1,SKCM,1.586005831 687 | FAT3,SKCM,1.521865889 688 | DNAH7,SKCM,1.504373178 689 | RP1,SKCM,1.486880466 690 | XIRP2,SKCM,1.483965015 691 | ANK3,SKCM,1.481049563 692 | DSCAM,SKCM,1.463556851 693 | CSMD2,SKCM,1.44606414 694 | MGAM,SKCM,1.425655977 695 | MUC17,SKCM,1.408163265 696 | USH2A,SKCM,1.376093294 697 | DNAH3,SKCM,1.370262391 698 | PKHD1L1,SKCM,1.364431487 699 | FAT4,SKCM,1.358600583 700 | FLG,SKCM,1.358600583 701 | DNAH8,SKCM,1.358600583 702 | TTN,STAD,2.574394464 703 | TP53,STAD,1.975778547 704 | MUC16,STAD,1.553633218 705 | ARID1A,STAD,1.467128028 706 | SYNE1,STAD,1.207612457 707 | LRP1B,STAD,1.190311419 708 | FAT4,STAD,1.089965398 709 | CSMD3,STAD,1.069204152 710 | PCLO,STAD,1.031141869 711 | HMCN1,STAD,0.993079585 712 | FLG,STAD,0.979238754 713 | CSMD1,STAD,0.975778547 714 | KMT2D,STAD,0.955017301 715 | OBSCN,STAD,0.948096886 716 | FAT3,STAD,0.889273356 717 | RYR2,STAD,0.871972318 718 | SPTA1,STAD,0.871972318 719 | DNAH5,STAD,0.858131488 720 | RNF43,STAD,0.847750865 721 | ZFHX4,STAD,0.837370242 722 | PIK3CA,STAD,0.785467128 723 | BZRAP1,STAD,0.778546713 724 | PCDH15,STAD,0.764705882 725 | RYR3,STAD,0.761245675 726 | RYR1,STAD,0.757785467 727 | TP53,STES,2.533755274 728 | TTN,STES,2.518987342 729 | MUC16,STES,1.438818565 730 | SYNE1,STES,1.156118143 731 | LRP1B,STES,1.056962025 732 | ARID1A,STES,1.050632911 733 | CSMD3,STES,1.018987342 734 | HMCN1,STES,0.930379747 735 | PCLO,STES,0.911392405 736 | FAT4,STES,0.900843882 737 | FLG,STES,0.894514768 738 | KMT2D,STES,0.877637131 739 | CSMD1,STES,0.845991561 740 | DNAH5,STES,0.841772152 741 | RYR2,STES,0.837552743 742 | OBSCN,STES,0.824894515 743 | FAT3,STES,0.776371308 744 | SPTA1,STES,0.765822785 745 | USH2A,STES,0.715189873 746 | PCDH15,STES,0.687763713 747 | ZFHX4,STES,0.685654008 748 | XIRP2,STES,0.672995781 749 | RYR3,STES,0.670886076 750 | MACF1,STES,0.656118143 751 | RIMS2,STES,0.641350211 752 | Unknown,TGCT,1.570469799 753 | MUC2,TGCT,0.912751678 754 | TVP23C,TGCT,0.738255034 755 | KIT,TGCT,0.67114094 756 | MUC4,TGCT,0.67114094 757 | FRG1B,TGCT,0.617449664 758 | KRAS,TGCT,0.510067114 759 | MUC6,TGCT,0.402684564 760 | TTN,TGCT,0.348993289 761 | CDC27,TGCT,0.342281879 762 | PLEC,TGCT,0.315436242 763 | OBSCN,TGCT,0.315436242 764 | CELSR1,TGCT,0.308724832 765 | NBPF10,TGCT,0.281879195 766 | MUC17,TGCT,0.281879195 767 | LAMA5,TGCT,0.281879195 768 | DDX11,TGCT,0.248322148 769 | DSPP,TGCT,0.241610738 770 | MUC5B,TGCT,0.241610738 771 | FAM186A,TGCT,0.241610738 772 | AHNAK2,TGCT,0.241610738 773 | MT-CYB,TGCT,0.234899329 774 | ANKLE1,TGCT,0.228187919 775 | KMT2C,TGCT,0.228187919 776 | ANKRD11,TGCT,0.228187919 777 | BRAF,THCA,2.402985075 778 | NRAS,THCA,0.338308458 779 | TTN,THCA,0.156716418 780 | MUC16,THCA,0.156716418 781 | TG,THCA,0.141791045 782 | HRAS,THCA,0.139303483 783 | DNAH9,THCA,0.094527363 784 | Unknown,THCA,0.089552239 785 | ZFHX3,THCA,0.082089552 786 | KMT2A,THCA,0.069651741 787 | OTUD4,THCA,0.064676617 788 | MUC5B,THCA,0.059701493 789 | MUC17,THCA,0.059701493 790 | PPM1D,THCA,0.059701493 791 | GPR98,THCA,0.05721393 792 | OBSCN,THCA,0.05721393 793 | PRKDC,THCA,0.054726368 794 | ARID1B,THCA,0.054726368 795 | PKHD1,THCA,0.054726368 796 | JMJD1C,THCA,0.054726368 797 | CSMD2,THCA,0.054726368 798 | BDP1,THCA,0.054726368 799 | LRP1,THCA,0.054726368 800 | CHEK2,THCA,0.052238806 801 | APOB,THCA,0.052238806 802 | PTEN,UCEC,2.955645161 803 | PIK3CA,UCEC,2.108870968 804 | ARID1A,UCEC,1.596774194 805 | TTN,UCEC,1.508064516 806 | Unknown,UCEC,1.427419355 807 | PIK3R1,UCEC,1.407258065 808 | CTNNB1,UCEC,1.209677419 809 | TP53,UCEC,1.173387097 810 | MUC16,UCEC,0.903225806 811 | KRAS,UCEC,0.858870968 812 | CTCF,UCEC,0.834677419 813 | CSMD3,UCEC,0.830645161 814 | ZFHX3,UCEC,0.818548387 815 | MUC5B,UCEC,0.806451613 816 | FAT4,UCEC,0.745967742 817 | RYR2,UCEC,0.741935484 818 | FAT1,UCEC,0.737903226 819 | DST,UCEC,0.701612903 820 | ARHGAP35,UCEC,0.701612903 821 | FAT3,UCEC,0.693548387 822 | OBSCN,UCEC,0.685483871 823 | DMD,UCEC,0.685483871 824 | ZFHX4,UCEC,0.669354839 825 | FBXW7,UCEC,0.649193548 826 | USH2A,UCEC,0.641129032 827 | TP53,UCS,3.666666667 828 | FBXW7,UCS,1.578947368 829 | FRG1B,UCS,1.50877193 830 | PIK3CA,UCS,1.403508772 831 | PPP2R1A,UCS,1.122807018 832 | MUC4,UCS,1.01754386 833 | PTEN,UCS,0.824561404 834 | MT-ND5,UCS,0.771929825 835 | TTN,UCS,0.771929825 836 | CHD4,UCS,0.736842105 837 | MT-CO1,UCS,0.684210526 838 | ARID1A,UCS,0.631578947 839 | MT-CYB,UCS,0.596491228 840 | BAGE2,UCS,0.596491228 841 | NBPF10,UCS,0.526315789 842 | MT-ND2,UCS,0.526315789 843 | LRP1B,UCS,0.526315789 844 | MUC17,UCS,0.49122807 845 | KRAS,UCS,0.49122807 846 | MT-ND4,UCS,0.49122807 847 | FLNA,UCS,0.49122807 848 | MGAM,UCS,0.473684211 849 | PIK3R1,UCS,0.473684211 850 | ZBTB7B,UCS,0.456140351 851 | AHNAK,UCS,0.456140351 852 | GNAQ,UVM,2.0125 853 | GNA11,UVM,1.8 854 | SF3B1,UVM,0.9 855 | BAP1,UVM,0.85 856 | EIF1AX,UVM,0.45 857 | PHF7,UVM,0.3375 858 | TTN,UVM,0.275 859 | MUC16,UVM,0.25 860 | RYR2,UVM,0.2 861 | MYOF,UVM,0.1875 862 | CSMD3,UVM,0.175 863 | MACF1,UVM,0.15 864 | SRSF2,UVM,0.15 865 | PRKDC,UVM,0.15 866 | CYSLTR2,UVM,0.15 867 | PKHD1L1,UVM,0.15 868 | COL14A1,UVM,0.15 869 | PLCB2,UVM,0.1375 870 | SYNE1,UVM,0.1375 871 | PCDHB7,UVM,0.125 872 | MAPKAPK5,UVM,0.125 873 | UBR4,UVM,0.125 874 | NRK,UVM,0.125 875 | SYTL3,UVM,0.125 876 | ARHGEF17,UVM,0.125 -------------------------------------------------------------------------------- /notebooks/url_image_example/url_image_network.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Using a URL image in visJS2jupyter\n", 8 | "\n", 9 | "------------\n", 10 | "\n", 11 | "Authors: Brin Rosenthal (sbrosenthal@ucsd.edu), Mikayla Webster (m1webste@ucsd.edu), Julia Len (jlen@ucsd.edu)\n", 12 | "\n", 13 | "-----------" 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "metadata": {}, 19 | "source": [ 20 | "## Import packages" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": 1, 26 | "metadata": {}, 27 | "outputs": [ 28 | { 29 | "data": { 30 | "text/plain": [ 31 | "" 32 | ] 33 | }, 34 | "execution_count": 1, 35 | "metadata": {}, 36 | "output_type": "execute_result" 37 | } 38 | ], 39 | "source": [ 40 | "import matplotlib as mpl\n", 41 | "import networkx as nx\n", 42 | "import visJS2jupyter.visJS_module as visJS_module\n", 43 | "reload(visJS_module)" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 2, 49 | "metadata": { 50 | "collapsed": true 51 | }, 52 | "outputs": [], 53 | "source": [ 54 | "# create a simple graph\n", 55 | "G = nx.connected_watts_strogatz_graph(30,5,.2)\n", 56 | "nodes = list(G.nodes()) # type cast to list in order to make compatible with networkx 1.11 and 2.0\n", 57 | "edges = list(G.edges()) # for nx 2.0, returns an \"EdgeView\" object rather than an iterable" 58 | ] 59 | }, 60 | { 61 | "cell_type": "markdown", 62 | "metadata": {}, 63 | "source": [ 64 | "# Map node attributes to visual properties, and style the nodes and edges\n", 65 | "\n", 66 | "- To map node attributes to properties, simply add the property to the graph as a node-attribute, and use the return_node_to_color function" 67 | ] 68 | }, 69 | { 70 | "cell_type": "code", 71 | "execution_count": 3, 72 | "metadata": { 73 | "collapsed": true 74 | }, 75 | "outputs": [], 76 | "source": [ 77 | "degree = dict(G.degree())\n", 78 | "nx.set_node_attributes(G, name = 'degree', values = degree) " 79 | ] 80 | }, 81 | { 82 | "cell_type": "markdown", 83 | "metadata": {}, 84 | "source": [ 85 | "\n", 86 | "### Interactive network" 87 | ] 88 | }, 89 | { 90 | "cell_type": "code", 91 | "execution_count": 4, 92 | "metadata": {}, 93 | "outputs": [ 94 | { 95 | "data": { 96 | "text/html": [ 97 | " Network | Basic usage" 98 | ], 99 | "text/plain": [ 100 | "" 101 | ] 102 | }, 103 | "execution_count": 4, 104 | "metadata": {}, 105 | "output_type": "execute_result" 106 | } 107 | ], 108 | "source": [ 109 | "# set node initial positions using networkx's spring_layout function\n", 110 | "pos = nx.spring_layout(G)\n", 111 | "\n", 112 | "# set per-node attributes\n", 113 | "nodes_dict = [{\"id\":n,\n", 114 | " \"degree\":nx.degree(G,n),\n", 115 | " \"node_shape\": 'image', # must set node shape to \"image\"\n", 116 | " \"x\":pos[n][0]*700,\n", 117 | " \"y\":pos[n][1]*700} for n in nodes\n", 118 | " ]\n", 119 | "\n", 120 | "# map to indices for source/target in edges\n", 121 | "node_map = dict(zip(nodes,range(len(nodes))))\n", 122 | "\n", 123 | "# set per-edge attributes\n", 124 | "edges_dict = [{\"source\":node_map[edges[i][0]], \"target\":node_map[edges[i][1]], \n", 125 | " \"color\":\"gray\"} for i in range(len(edges))]\n", 126 | "\n", 127 | "# url iage to use as node shape\n", 128 | "url = 'https://cdn0.iconfinder.com/data/icons/kids-paint/512/hedgehog-512.png'\n", 129 | "\n", 130 | "# set network-wide style parameters\n", 131 | "visJS_module.visjs_network(nodes_dict,edges_dict,\n", 132 | " node_size_multiplier=10,\n", 133 | " node_size_transform = '',\n", 134 | " node_font_size=25,\n", 135 | " edge_arrow_to=True,\n", 136 | " physics_enabled=True,\n", 137 | " edge_color_highlight='#8A324E',\n", 138 | " edge_color_hover='#8BADD3',\n", 139 | " edge_width=3,\n", 140 | " max_velocity=15,\n", 141 | " node_image = url, # specify url here\n", 142 | " min_velocity=1)\n", 143 | "\n" 144 | ] 145 | }, 146 | { 147 | "cell_type": "code", 148 | "execution_count": null, 149 | "metadata": { 150 | "collapsed": true 151 | }, 152 | "outputs": [], 153 | "source": [] 154 | } 155 | ], 156 | "metadata": { 157 | "kernelspec": { 158 | "display_name": "Python 2", 159 | "language": "python", 160 | "name": "python2" 161 | }, 162 | "language_info": { 163 | "codemirror_mode": { 164 | "name": "ipython", 165 | "version": 2 166 | }, 167 | "file_extension": ".py", 168 | "mimetype": "text/x-python", 169 | "name": "python", 170 | "nbconvert_exporter": "python", 171 | "pygments_lexer": "ipython2", 172 | "version": "2.7.14" 173 | } 174 | }, 175 | "nbformat": 4, 176 | "nbformat_minor": 1 177 | } 178 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name = "visJS2jupyter", 5 | packages = ["visJS2jupyter"], 6 | version = "0.1.9.dev0+git", 7 | description= "visJS2jupyter is a tool to bring the interactivity of networks created with vis.js into Jupyter notebook cells", 8 | long_description="0.1.8 update: visJS2jupyter is now compatible with both networkx 1.11 and 2.0. Additionally, igraph is no longer needed to install visJS2jupyter.", 9 | url = "https://github.com/ucsd-ccbb/visJS2jupyter", 10 | author="Brin Rosenthal (sbrosenthal@ucsd.edu), Mikayla Webster (m1webste@ucsd.edu), Aaron Gary (agary@ucsd.edu), Julia Len (jlen@ucsd.edu)", 11 | author_email="sbrosenthal@ucsd.edu", 12 | keywords = ['Jupyter notebook', 'interactive', 'network'], 13 | license = 'MIT', 14 | classifiers=[ 15 | 'License :: OSI Approved :: MIT License', 16 | 'Programming Language :: Python :: 2', 17 | 'Programming Language :: Python :: 3', 18 | ], 19 | install_requires=[ 20 | 'networkx', 'numpy', 'scipy', 'IPython', 'matplotlib' 21 | ] 22 | ) 23 | -------------------------------------------------------------------------------- /visJS2jupyter/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ucsd-ccbb/visJS2jupyter/c16bcdf5fe0eed156f1a6eb789484945375452ba/visJS2jupyter/__init__.py -------------------------------------------------------------------------------- /visJS2jupyter/scipy_heatKernel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | ### Heat Diffusion Kernel; Scipy implemention 4 | ### Used for the "TieDIE" algorithm, Tied Diffusion for Network Discovery 1.1 5 | ### 6 | ### Authors: 7 | ### 8 | ### Evan O. Paull 9 | ### 10 | ### Requirements: 11 | ### 12 | ### numpy 1.7+ (with pre-computed kernels) 13 | ### scipy 0.12+ (for on-the-fly kernel generation) 14 | ### 15 | 16 | import networkx as nx 17 | from numpy import genfromtxt, dot 18 | import sys 19 | import math 20 | from array import array 21 | from scipy.sparse import coo_matrix 22 | from scipy.sparse.linalg import expm 23 | 24 | class SciPYKernel: 25 | 26 | def __init__(self, G): 27 | """ 28 | Input: 29 | 30 | A networkx graph G 31 | 32 | Returns: 33 | 34 | A Kernel object that implements the 'diffuse' method 35 | 36 | """ 37 | 38 | self.labels = {} 39 | # The number of rows and columns for each kernel 40 | self.ncols = {} 41 | self.nrows = {} 42 | 43 | # parse the network, build indexes 44 | num_nodes = len(G.nodes()) 45 | node_order = sorted(G.nodes()) 46 | index2node = {} 47 | node2index = {} 48 | for i in range(0, num_nodes): 49 | index2node[i] = node_order[i] 50 | node2index[node_order[i]] = i 51 | 52 | # undirected node degree dict 53 | node_degrees = G.degree() 54 | 55 | # construct the diagonals 56 | # SCIPY uses row and column indexes to build the matrix 57 | # row and columns are just indexes: the data column stores 58 | # the actual entries of the matrix 59 | row = array('i') 60 | col = array('i') 61 | data = array('f') 62 | # build the diagonals, including the out-degree 63 | for i in range(0, num_nodes): 64 | # diag entries: out degree 65 | degree = 0 66 | if index2node[i] in node_degrees: 67 | degree = node_degrees[index2node[i]] 68 | # append to the end 69 | # array object: first argument is the index, the second is the data value 70 | # append the out-degree to the data array 71 | data.insert(len(data), degree) 72 | # build the diagonals 73 | row.insert(len(row), i) 74 | col.insert(len(col), i) 75 | 76 | # add off-diagonal edges 77 | for i in range(0, num_nodes): 78 | for j in range(0, num_nodes): 79 | if i == j: 80 | continue 81 | # treat the graph as undirected, generate a symmetric matrix 82 | if ((index2node[i], index2node[j]) not in G.edges()) and ((index2node[j], index2node[i]) not in G.edges()): 83 | continue 84 | # append index to i-th row, j-th column 85 | row.insert(len(row), i) 86 | col.insert(len(col), j) 87 | # -1 for laplacian: i.e. the negative of the adjacency matrix 88 | data.insert(len(data), -1) 89 | 90 | # Build the graph laplacian: the CSC matrix provides a sparse matrix format 91 | # that can be exponentiated efficiently 92 | L = coo_matrix((data,(row, col)), shape=(num_nodes,num_nodes)).tocsc() 93 | time_T = -0.1 94 | self.laplacian = L 95 | self.index2node = index2node 96 | # this is the matrix exponentiation calculation. 97 | # Uses the Pade approximiation for accurate approximation. Computationally expensive. 98 | # O(n^2), n= # of features, in memory as well. 99 | self.kernel = expm(time_T*L) 100 | self.labels = node_order 101 | 102 | #self.printLaplacian() 103 | 104 | def getLabels(self): 105 | """ 106 | Return the set of all node/gene labels used by this kernel object 107 | """ 108 | #all_labels = set() 109 | #for label in self.labels: 110 | all_labels = set(self.labels) 111 | 112 | return all_labels 113 | 114 | 115 | def printLaplacian(self): 116 | """ 117 | Debug function 118 | """ 119 | cx = self.laplacian.tocoo() 120 | for i,j,v in zip(cx.row, cx.col, cx.data): 121 | a = self.index2node[i] 122 | b = self.index2node[j] 123 | print ("\t".join([a,b,str(v)])) 124 | 125 | def kernelMultiplyOne(self, vector): 126 | """ 127 | Multiply the specified kernel by the supplied input heat vector. 128 | 129 | Input: 130 | vector: A hash mapping gene labels to floating point values 131 | kernel: a single index for a specific kernel 132 | 133 | Returns: 134 | A hash of diffused heats, indexed by the same names as the 135 | input vector 136 | """ 137 | # Have to convert to ordered array format for the input vector 138 | array = [] 139 | for label in self.labels: 140 | # Input heats may not actually be in the network. 141 | # Check and initialize to zero if not 142 | if label in vector: 143 | array.append(vector[label]) 144 | else: 145 | array.append(0) 146 | 147 | # take the dot product 148 | value = self.kernel*array 149 | 150 | # Convert back to a hash and return diffused heats 151 | return_vec = {} 152 | idx = 0 153 | for label in self.labels: 154 | return_vec[label] = float(value[idx]) 155 | idx += 1 156 | 157 | return return_vec 158 | 159 | def diffuse(self, vector, reverse=False): 160 | """ 161 | Diffuse input heats over the set of kernels, add to this object 162 | 163 | Input: 164 | {'gene1': float(heat1) 165 | 'gene2' : float(heat2) 166 | ... 167 | } 168 | 169 | Returns: 170 | Diffused heat vector 171 | """ 172 | 173 | diffused_vector = self.kernelMultiplyOne(vector) 174 | 175 | return diffused_vector 176 | 177 | 178 | # 179 | # example use and test case: 180 | """ 181 | G = nx.DiGraph() 182 | for line in open('pathway.sif', 'r'): 183 | edge = line.rstrip().split('\t') 184 | G.add_edge(edge[0], edge[2]) 185 | 186 | input_heats = {} 187 | for line in open('upstream.input', 'r'): 188 | data = line.rstrip().split('\t') 189 | input_heats[data[0]] = float(data[1]) 190 | 191 | correct_diffused_heats = {} 192 | for line in open('upstream.diffused', 'r'): 193 | data = line.rstrip().split('\t') 194 | correct_diffused_heats[data[0]] = float(data[1]) 195 | 196 | heat_kernel = SciPYKernel(G) 197 | diffused_heats = heat_kernel.diffuse(input_heats) 198 | 199 | for key in diffused_heats: 200 | diff_percent = abs(diffused_heats[key] - correct_diffused_heats[key])/correct_diffused_heats[key] 201 | if (diff_percent > 0.1): 202 | print ('\t'.join([str(val) for val in [key, diffused_heats[key], correct_diffused_heats[key]]])) 203 | """ -------------------------------------------------------------------------------- /visJS2jupyter/visJS_module.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ucsd-ccbb/visJS2jupyter/c16bcdf5fe0eed156f1a6eb789484945375452ba/visJS2jupyter/visJS_module.pyc --------------------------------------------------------------------------------