Preliminary Exploration of Cytoscape plot and Preliminary Exploration of cytoscape

Source: Internet
Author: User

Preliminary Exploration of Cytoscape plot and Preliminary Exploration of cytoscape

Cytoscape is a js plug-in for network diagrams. It is easy to use and powerful. This is its website: Click to open the link

To use this function, you need to import two files: one is a js file and the other is a css file. Download from the official website.

Here, a function is implemented, that is, retrieving data from the background database, then returning to the front-end to generate a network diagram.

The background action will not be written. In short, the result returned to the front end is a struts2 <s: iterator value = "userlist">, which is first displayed in the div:

<div id="hidden"><s:iterator value="userlist" >         <div align="left" id="a"><s:property value="phe" /></div> <div align="left" id="b"><s:property value="phecui" /></div> <div align="left" id="e"><s:property value="icd" /></div> <div align="left" id="f"><s:property value="mesh" /></div> <div align="left" id="g"><s:property value="hpo" /></div> <div align="left" id="h"><s:property value="symp" /></div> <div align="left" id="i"><s:property value="omim" /></div> <div align="left" id="j"><s:property value="snomed" /></div> <div align="left" id="k"><s:property value="asdpto" /></div> <div align="left" id="l"><s:property value="ovae" /></div> <div align="left" id="m"><s:property value="mp" /></div> <div align="left" id="n"><s:property value="pato" /></div> <div align="left" id="o"><s:property value="bho" /></div> <div align="left" id="p"><s:property value="ctx" /></div> <div align="left" id="q"><s:property value="repo" /></div> <div align="left" id="r"><s:property value="rpo" /></div></s:iterator></div>

Set this part of css to hide this part of div:

#hidden {    display:none;}

In js, the document. getElementById. innerHTML is used to obtain the value of each div, and then transmitted to the json data format of Cytoscape. In this way, the value is passed, and then the edge can be set based on your needs.

In addition, the network chart style can be modified according to the document on the official website. I made a simple graph, which is not very nice:


The data of these points is transmitted from the database to the foreground according to the above method.


Is there any biological drawing software?

Cytoscape, which can be used on the Internet, as well as instructions and special plug-ins, making it easier to draw pictures.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.