Skip to content

Commit

Permalink
finished updating interacting_with_viz section
Browse files Browse the repository at this point in the history
  • Loading branch information
cornhundred committed May 3, 2017
1 parent 471565d commit df78700
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
Binary file modified docs/_build_html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build_html/.doctrees/interacting_with_viz.doctree
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/_build_html/_sources/interacting_with_viz.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ For small matrices dimensionality reduction is animated to help the user visuali

Interactive Dendrogram
======================
Clustergrams typically have `dendrogram trees`_ (for both rows and columns) to depict the hierarchy of row and column clusters produced by `hierarchical clustering`_. The height of the branches in the dendrogram depict the distance between clusters. Clustergrammer depicts this hierarchical tree one slice at a time using trapezoids to depict the clusters obtained at a particular slice in the dendrogram. :ref:`clustergrammer_py` calculates hierarchical clustering using `SciPy`_'s hierarchy_ clustering functions (the default linkage type is set to average, see `calc_clust.py`_) and saves ten slices of the dendrogram sampled evenly across the height of the tree.
Clustergrams typically have `dendrogram trees`_ (for both rows and columns) to depict the hierarchy of row and column clusters produced by `hierarchical clustering`_. The height of the branches in the dendrogram depict the distance between clusters. Clustergrammer depicts this hierarchical tree one slice at a time using trapezoids (see below). :ref:`clustergrammer_py` calculates hierarchical clustering using `SciPy`_'s hierarchy_ clustering functions (the default linkage type is set to average, see `calc_clust.py`_) and saves ten slices of the dendrogram sampled evenly across the height of the tree.

**Visualizing Dendrogram Clusters**

Expand All @@ -133,13 +133,13 @@ Dendrogram clusters are depicted as gray trapezoids, which are easy for a user t

**Dendrogrm Cropping**

Each dendrogram cluster has a small triangular crop button (that points towards the cluster) above it that allows users to crop the matrix to only show the rows or columns in this cluster. Clicking on a dendrogram crop button filters out the rows or columns that not in the cluster, resizes the visualization to show the remaining data, and reverses the orientation of the crop button to point outwards. Clicking on the outward facing crop button undoes the cropping and restores the full matrix. For small matrices, this transformation is animated. Dendrogram cropping can be useful for focusing in on a cluster of interest and when used in combination with :ref:`Enrichrgram <enrichrgram>` to import biological information specific to your cluster of genes from `Enrichr`_ (see :ref:`biology_specific_features` for more information).
Each dendrogram cluster has a small triangular crop button above it pointing towards the cluster (see the above images). Clicking the crop button filters out the rows or columns that not in the cluster, resizes the visualization to show the remaining data, and reverses the orientation of the crop button. Clicking on the outward facing crop button undoes the cropping and restores the full matrix. For small matrices, this transformation is animated. Dendrogram cropping can be useful for focusing in on a cluster of interest and when used in combination with :ref:`Enrichrgram <enrichrgram>` to investigate the biological functions specific to a cluster of genes (see :ref:`biology_specific_features` for more information).

.. _interactive_categories:

Interactive Categories
======================
Prior knowledge about our system can be represented as categories in a heatmap. For instance, columns may represent cell lines and our categories may represent their tissue. Overlaying categories on our heatmap can help us understand the relationship between prior knowledge and the structures we find in our data (e.g. clusters). For instance, we may find that columns with the same category (e.g. the same tissue) cluster near each other based on the underlying data (e.g. gene expression) and we can conclude that the prior knowledge agrees with clusters identified in a data-driven manner. Similarly, we can explore how categories are re-distributed when the matrix is :ref:`reordered <row_col_reordering>`. We can also use categories to overlay numerical information (e.g. duration of drug treatment of a cell line) and ask similar questions. Please refer to :ref:`matrix_format_io` for more information on how to encode categories into your data.
Prior knowledge can be represented as categories in a heatmap. For instance, columns can represent cell lines and a category can be used to represent their tissue of origin. Overlaying categories on our heatmap can help us understand the relationship between prior knowledge and the structures we find in our data (e.g. clusters). For instance, we may find that columns with the same category (e.g. the same tissue) cluster near each other based on the underlying data (e.g. gene expression) and we can conclude that the prior knowledge agrees with clusters identified in a data-driven manner. Similarly, we can explore how categories are re-distributed when the matrix is :ref:`reordered <row_col_reordering>`. We can also use categories to overlay numerical information (e.g. duration of drug treatment of a cell line) and ask similar questions. Please refer to :ref:`matrix_format_io` for more information on how to encode categories.

Row or column categories are represented by an extra column or row, respectively, of colored category-cells underneath the row or column labels (see screenshot below). Categories can be of type *string* or *value* (see :ref:`matrix_format_io`): each *string*-type category has a different color, while each value-type category ahas a different opacity. The categories also have titles positioned adjacent to the category-cells.

Expand All @@ -152,7 +152,7 @@ Row or column categories are represented by an extra column or row, respectively

**Interacting with Categories**

Mousing over a category will show the category name in a tooltip and highlight the instances of this category (while also dimming the instances of the other categories) to facilitate visualization of a specific category (see screenshot below). Double-clicking a category-title will reorder the matrix based on this category, which can be useful for getting an overview of all categories. Mousing over a dendrogram cluster will also show a breakdown of the rows/columns in a cluster based on their categories. Users can filter a visualization to only show rows or columns of a particular category by clicking on category while holding down the shift key (and undo this filtering by doing the same).
Mousing over a category will show the category name in a tooltip and highlight the instances of this category (while also dimming the instances of the other categories) to facilitate visualization of a specific category (see screenshot below). Double-clicking a category-title will reorder the matrix based on this category, which can be useful for getting an overview of all categories. Mousing over a dendrogram cluster will also show a breakdown of the rows/columns in a cluster based on their categories (see :ref:`interactive_dendrogram`). Users can also reversibly filter a visualization to only show rows or columns of a particular category by clicking on category while holding down the shift key (and undo this filtering by doing the same).

.. figure:: _static/category_interaction.png
:width: 900px
Expand All @@ -169,7 +169,7 @@ Row categories can be updated using the :ref:`clustergrammer_js_api`, which can

Cropping
========
Users can employ the Brush-Cropping icon in the sidebar to crop the matrix to a region of interest (see screenshot below). To Crop, click the crop icon and then drag the cursor to define your region of interest. Once you stop dragging, the matrix will crop to show only your selected region of interest. Cropping can be undone by clicking the Undo button in the sidebar (which appears after cropping). This can be useful for focusing in on a small region of your overall matrix. Cropping can be used in combination with the :ref:`download` to export a small region of the matrix or in combination with :ref:`Enrichrgram <enrichrgram>` to perform enrichment analysis on a subset of clustered genes.
The Brush-Cropping icon in the sidebar can be used to crop the matrix to a region of interest (see screenshot below). To crop, click the crop icon and then drag the cursor to define your region of interest. Once you stop dragging, the matrix will crop to show only your selected region of interest. Cropping can be undone by clicking the Undo button in the sidebar (which appears after cropping). This can be useful for focusing in on a small region of your overall matrix. Cropping can be used in combination with the :ref:`download` to export a small region of the matrix or in combination with :ref:`Enrichrgram <enrichrgram>` to perform enrichment analysis on a subset of clustered genes.

.. figure:: _static/brush_crop.png
:width: 900px
Expand Down

0 comments on commit df78700

Please sign in to comment.