Personal tools

User:Hisa/cytoscape test: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
         <div id="ont_tree" style="width:100%;height:600px" resize:both;>
         <div id="ont_tree" style="width:100%;height:600px" resize:both;>
             Cytoscape Web will replace the contents of this div with your graph.
             Cytoscape Web will replace the contents of this div with your graph.
        </div>
        <div id="info" style="width:100%;height:100px" resize:both;>
            <p>Click each element</p>
         </div>
         </div>


         <script type="text/javascript" src="/resource_browser/rb_js/cytoscapeweb/js/min/json2.min.js"></script>
         <script type="text/javascript" src="/resource_browser/rb_js/cytoscapeweb/js/min/json2.min.js"></script>
Line 23: Line 21:
                  
                  
                                 var xml = '\
                                 var xml = '\
                <graphml>\
<graphml><key id="label" for="all" attr.name="label" attr.type="string"/><key id="weight" for="node" attr.name="weight" attr.type="double"/><graph edgedefault="directed"><node id="FF:0000024"><data key="label">CD14-positive monocyte</data></node>\
                  <key id="label" for="all" attr.name="label" attr.type="string"/>\
</html>{{#ask:[[is_a::FF:0000024]][[name::+]]|?name|link=none|format=template|template=Smw_graphml|userparam=FF:0000024;is_a|limit=1000}}<html>\
                  <key id="weight" for="node" attr.name="weight" attr.type="double"/>\
</graph></graphml>\
                  <graph edgedefault="directed">\
                    <node id="FF:10490-107B4">\
                        <data key="label">prostate cancer cell line:DU145</data>\
                    </node>\
                    <node id="2"><data key="label">B</data></node>\
                    <edge source="2" target="FF:10490-107B4">\
                        <data key="label">A to B</data>\
                    </edge>\
                    <node id="3">\
                        <data key="label">C</data>\
                    </node>\
                    <edge source="FF:10490-107B4" target="3">\
                        <data key="label">is_a</data>\
                    </edge>\
                  </graph>\
                </graphml>\
                 ';
                 ';
                  
                  
Line 97: Line 79:
                     panZoomControlVisible: false  
                     panZoomControlVisible: false  
                 };
                 };
//vis.layout({ name: 'Tree', options: { orientation : {'bottomToTop'} }});
 
                 vis.draw(draw_options);
                 vis.draw(draw_options);
             };
             };

Latest revision as of 13:52, 28 June 2012

Cytoscape Web will replace the contents of this div with your graph.