Personal tools

Cytoscape test2: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
 
(25 intermediate revisions by the same user not shown)
Line 6: Line 6:
         </style>
         </style>


         <h1 id="firstHeading" class="firstHeading">FF:10563-108A5</h1>
         <h1 id="firstHeading" class="firstHeading">FF:10717-109I6, TF to Motif to TF network</h1>
 
<p>Mouseover nodes and edges to see attributes.  Motifs are shown in orange, TFs are shown in blue.  Promoter and z-score are attributes of the Motif to TF edges (blue arrow).  TF to Motif edges are shown in orange.</p>
<p>Motifs shown are the top (maximum 30) motifs in the sample.  TFs shown have at least one CAGE promoter with at at least 10 TPM expression (RLE normalized) in the sample.  Edges shown have a z-score of at least 1.5 (based on correlation between motif activity and promoter expression).
</p>
 
         <div id="cytoscapeweb" style="width:800px;height:600px">
         <div id="cytoscapeweb" style="width:800px;height:600px">
             Cytoscape Web will replace the contents of this div with your graph.
             Cytoscape Web will replace the contents of this div with your graph.
Line 20: Line 25:
         <script type="text/javascript" src="/resource_browser/rb_js/cytoscapeweb/js/min/cytoscapeweb.min.js"></script>
         <script type="text/javascript" src="/resource_browser/rb_js/cytoscapeweb/js/min/cytoscapeweb.min.js"></script>


<p>TF to TF network. Motif is an attribute of the source TF node.  Promoter is an attribute of the TF to TF edge.</p>
     
       
         <!-- Load data -->
         <!-- Load data -->
<script type="text/javascript">
<script type="text/javascript">
var request = new XMLHttpRequest();
var request = new XMLHttpRequest();
request.open("GET", "https://fantom5-collaboration.gsc.riken.jp/resource_browser/nwfiles/10563-108A5.gml", false);
request.open("GET", "https://fantom5-collaboration.gsc.riken.jp/resource_browser/nwfiles/10717-109I6_2.graphml", false);
request.send(null);
request.send(null);
xml = request.responseText;
xml = request.responseText;
Line 41: Line 45:
var target = event.target;
var target = event.target;
 
 
var lurl = "https://fantom5-collaboration.gsc.riken.jp/resource_browser/RB_SearchResults?sq="+target.data["id"];
var lurl = "https://fantom5-collaboration.gsc.riken.jp/resource_browser/RB_SearchResults?sq="+target.data["label"];
//window.location = lurl;
window.location = lurl;
alert(lurl);
//alert(lurl);
}
}
Line 49: Line 53:
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 66:
entries: [ { attrValue: "motif", value: "#ff9900" },
entries: [ { attrValue: "motif", value: "#ff9900" },
  { attrValue: "tf", value: "#0099ff" } ]
  { attrValue: "tf", value: "#0099ff" } ]
};
var shapeMapper = {
attrName: "type",
entries: [ { attrValue: "motif", value: "rectangle" },
  { attrValue: "tf", value: "ELLIPSE" } ]
};
};
Line 93: Line 81:
var edgeArrowMapper = {
var edgeArrowMapper = {
attrName: "type",
attrName: "type",
entries: [ { attrValue: "has_motif", value: "T" }, { attrValue: "promotes", value: "delta" } ]
entries: [ { attrValue: "has_motif", value: "arrow" }, { attrValue: "promotes", value: "delta" } ]
};
var edgeTooltipMapper = {
attrName: "type",
entries: [ { attrValue: "has_motif", value: "" }, { attrValue: "promotes", value: "<b>Promoter: ${promoter}</b><br />Z-Score: ${zscore}" } ]
};
};
Line 104: Line 97:
},
},
nodes: {
nodes: {
//tooltipText: "<b>${type}: ${label}</b>",
//label: { passthroughMapper: { attrName: "id" } },
shape: "ellipse",
tooltipText: "<b>${type}: ${label}</b>",
shape: { defaultValue: "ellipse", discreteMapper: shapeMapper },
borderWidth: 1,
borderWidth: 1,
borderColor: "#000000",
borderColor: "#000000",
size: 30,
size: 30,
//color: "#ff9900",
//color: "#ff9900",
//color: { defaultValue: "#ff9900", discreteMapper: colorMapper },
color: { defaultValue: "#ff9900", discreteMapper: colorMapper },
//opacity: 0.8,
//opacity: 0.8,
//opacity: { customMapper: { functionName: "customOpacity" } },
opacity: { customMapper: { functionName: "customOpacity" } },
selectionOpacity: 0.8,
selectionOpacity: 0.8,
hoverOpacity: 0.8,
hoverOpacity: 0.8,
Line 118: Line 112:
},
},
edges: {
edges: {
//width: { passthroughMapper: { attrName: "zscore" } },
width: { defaultValue: 5, passthroughMapper: { attrName: "zscore" } },
//label: { passthroughMapper: { attrName: "promoter" } },
label: { passthroughMapper: { attrName: "promoter" } },
//tooltipText: "<b>Promoter: ${promoter}</b><br />Z-Score: ${zscore}",
//tooltipText: "<b>Promoter: ${promoter}</b><br />Z-Score: ${zscore}",
color: "#011e59",
tooltipText: { defaultValue: "", discreteMapper: edgeTooltipMapper },
//color: { defaultValue: "#011e59", discreteMapper: edgeColorMapper },
//color: "#011e59",
//targetArrowShape: { defaultValue: "delta", discreteMapper: edgeArrowMapper },
color: { defaultValue: "#011e59", discreteMapper: edgeColorMapper },
targetArrowShape: { defaultValue: "delta", discreteMapper: edgeArrowMapper },
sourceArrowShape: "",
sourceArrowShape: "",
labelGlowOpacity: 0.8,
labelGlowOpacity: 0.8,
opacity: 0.8,
//opacity: 0.8,
//opacity: { customMapper: { functionName: "customOpacity" } },
opacity: { customMapper: { functionName: "customOpacity" } },
selectionOpacity: 0.8,
selectionOpacity: 0.8,
hoverOpacity: 0.8,
hoverOpacity: 0.8,
Line 135: Line 130:
// 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);
Line 162: Line 159:
network: xml,
network: xml,
visualStyle: visual_style,
visualStyle: visual_style,
//nodeTooltipsEnabled: true,
nodeTooltipsEnabled: true,
//edgeTooltipsEnabled: true,
edgeTooltipsEnabled: true,
//layout: { name: "ForceDirected", autoStabilize: true, maxTime: 120000, weightAttr: "zscore", weightNorm: "log", gravitation: -500 },
// hide pan zoom
// hide pan zoom
panZoomControlVisible: true
panZoomControlVisible: true

Latest revision as of 12:57, 8 May 2012

FF:10717-109I6, TF to Motif to TF network

Mouseover nodes and edges to see attributes. Motifs are shown in orange, TFs are shown in blue. Promoter and z-score are attributes of the Motif to TF edges (blue arrow). TF to Motif edges are shown in orange.

Motifs shown are the top (maximum 30) motifs in the sample. TFs shown have at least one CAGE promoter with at at least 10 TPM expression (RLE normalized) in the sample. Edges shown have a z-score of at least 1.5 (based on correlation between motif activity and promoter expression).

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