Personal tools

Cytoscape test2: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
Line 49: Line 49:
var edges = vis.selected("edges");
var edges = vis.selected("edges");
var nodes = vis.selected("nodes");
var nodes = vis.selected("nodes");
//var container = document.getElementById("TF_list");
 
var html = "<tr><th>TF</th><th>Motif</th></tr>";
//var sel = vis.selected();
for (var i in nodes) {
var data = nodes[i].data;
html += "<tr><td>"+data.id+"</td><td>"+data.motif+"</td></tr>";
}
//($("#nodes_list").innerHTML);
$("#nodes_list").html(html);
html = "<tr><th>Source TF</th><th>Target TF</th><th>Promoter</th><th>Z-Score</th></tr>";
//var sel = vis.selected();
for (var i in edges) {
var data = edges[i].data;
html += "<tr><td>"+data.source+"</td><td>"+data.target+"</td><td>"+data.promoter+"</td><td>"+data.zscore+"</td></tr>";
}
$("#edges_list").html(html);
selected = ((edges.length > 0) || (nodes.length > 0));
selected = ((edges.length > 0) || (nodes.length > 0));
vis.visualStyle(visual_style);
vis.visualStyle(visual_style);
//if ((edges.length > 0) && (nodes.length > 0)) {
// selected = true;
//}
}
}
Line 84: Line 62:
entries: [ { attrValue: "motif", value: "#ff9900" },
entries: [ { attrValue: "motif", value: "#ff9900" },
  { attrValue: "tf", value: "#0099ff" } ]
  { attrValue: "tf", value: "#0099ff" } ]
};
var edgeColorMapper = {
attrName: "type",
entries: [ { attrValue: "has_motif", value: "#ff9900" }, { attrValue: "promotes", value: "#0099ff" } ]
};
var edgeArrowMapper = {
attrName: "type",
entries: [ { attrValue: "has_motif", value: "T" }, { attrValue: "promotes", value: "delta" } ]
};
};
Line 135: Line 103:
// initialization options
// initialization options
var options = {
                var options = {
swfPath: "swf/CytoscapeWeb",
                    // where you have the Cytoscape Web SWF
flashInstallerPath: "swf/playerProductInstall"
                    swfPath: "/resource_browser/rb_js/cytoscapeweb/swf/CytoscapeWeb",
};
                    // where you have the Flash installer SWF
                    flashInstallerPath: "/resource_browser/rb_js/cytoscapeweb/swf/playerProductInstall"
                };
                  
                  
             var vis = new org.cytoscapeweb.Visualization(div_id, options);
             var vis = new org.cytoscapeweb.Visualization(div_id, options);

Revision as of 14:14, 25 April 2012

FF:10563-108A5

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

TF to TF network. Motif is an attribute of the source TF node. Promoter is an attribute of the TF to TF edge.