# HG changeset patch
# User adam-novak
# Date 1371668657 14400
# Node ID 6b6c1a0a452e5d189d3c1c69fcefbfed6227f71c
# Parent 4da9023185a9393d715b553db5b0bd07a2ac95ec
Minor javascript changes, tool help.
diff -r 4da9023185a9 -r 6b6c1a0a452e hexagram/hexagram.js
--- a/hexagram/hexagram.js Thu Jun 13 18:14:40 2013 -0400
+++ b/hexagram/hexagram.js Wed Jun 19 15:04:17 2013 -0400
@@ -1069,6 +1069,17 @@
value_formatted = value;
}
+ // Do some transformations to make the displayed labels make more sense
+ lookup = {
+ n: "Number of non-empty values",
+ positives: "Number of ones"
+ }
+
+ if(lookup[attribute]) {
+ // Replace a boring short name with a useful long name
+ attribute = lookup[attribute];
+ }
+
// Make a spot for it in the container and put it in
var metadata = $("
").addClass("layer-metadata");
metadata.text(attribute + " = " + value_formatted);
@@ -1610,6 +1621,9 @@
// Send all its messages to our reply processor
worker.onmessage = rpc_reply;
+ // Send its error events to our error processor
+ worker.onerror = rpc_error;
+
// Add it to the list of workers
rpc_workers.push(worker);
}
@@ -1681,6 +1695,16 @@
delete rpc_callbacks[message.data.id];
}
+function rpc_error(error) {
+ // Handle an error event from a web worker
+ // See http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.h
+ // tml#errorevent
+
+ complain("Web Worker error: " + error.message);
+ print(error.message + "\n at" + error.filename + " line " + error.lineno +
+ " column " + error.column);
+}
+
function initialize_view() {
// Initialize the global Google Map.
diff -r 4da9023185a9 -r 6b6c1a0a452e hexagram/hexagram.xml
--- a/hexagram/hexagram.xml Thu Jun 13 18:14:40 2013 -0400
+++ b/hexagram/hexagram.xml Wed Jun 19 15:04:17 2013 -0400
@@ -58,7 +58,7 @@
label="Skip calculation of heatmap clumpiness statistics"/>
-
@@ -70,4 +70,36 @@
description="Error in visualization generator (see below)" />
+
+
+Hexagram Visualization
+======================
+
+This tool produces a "hexagram visualization": an interactive Google Maps-based two-dimensional layout of the similarity matrix data, on a hexagonal grid, with the score matrix data represented as different available colorings of the hexagons. This visualization is an HTML web page with associated support files, and appears as the tool's output in your Galaxy history; to open it, click on the eyeball icon.
+
+If, instead of a rich interactive Web application, you get a boring white page with some text on it, you probably have tool output sanitization on. Turn sanitization off in your universe_wsgi.ini, or download the visualization, unzip it, and open the HTML file it contains. If you want to use a downloaded visualization, you will need to open it in a browser other than Chrome (which, for security reasons, does not let local Web pages access local files programmatically).
+
+Input Format
+------------
+
+The tool takes three types of input files:
+
+Similarity Matrix
++++++++++++++++++
+
+The only required input file is a *similarity matrix*, which contains similarity information over a set of "samples" or "signatures". This file is a sparse matrix represented as three tab-delimited columns; the first two columns of each row contain the names of two signatures, and the last column contains a nonzero, non-negative floating-point "similarity" between them. No headers are used. Self-edges are permitted, and self-edges with a similarity of 1 will be added to every node if "Keep unconnected singleton signatures" is checked. The input similarity matrix need not describe a similarity graph that is connected, and similarity need not be transitive in any way.
+
+Score Matrices
+++++++++++++++
+
+You almost certainly want to run the tool with one or more *score matrices*, which specify some attribute data to overlay on the signature hexes once they are arranged. Any number of score matrices can be specified. Each score matrix is a TSV file; the first column contains sample names, and any other columns contain the values of attributes for those samples. Score matrices have a header line, which specifies some (unused) name for the column of sample names, and the name of the attribute described by each column of attribute data.
+
+Attribute data may be continuous (floating-point numbers), categorical (non-negative integers), or binary (0 or 1). The visualizer assumes that each column is the most restrictive type that will fit the data given; a column with all 0.0s and 1.0s will be assumed to be binary, even if the user intended it to represent a continuous value. Categories in categorical columns are assumed to be numbered from 0, even if no 0s appear in the column.
+
+Colormap Configuration File
++++++++++++++++++++++++++++
+
+If you have categorical data to display, you probably want to write a *colormap configuration file* for it. Categorical data is displayed in the visualizer with one color per category; if you want to specify particular colors for each category, or names for each category (instead of the default labels of 0 through n), you need a colormap configuration file. Each line in this file should begin with the name of a categorical attribute, followed by, for each category used in that attribute, the category number, the desired name for the category, and a CSS color (like "white" or "#FFFFFF" or "rgb(255,255,255)) to use to represent that category. Fields on each line are separated by tab characters.
+
+
diff -r 4da9023185a9 -r 6b6c1a0a452e hexagram/tsv.pyc
Binary file hexagram/tsv.pyc has changed