Skip to content

Instantly share code, notes, and snippets.

View nielshanson's full-sized avatar

Niels Hanson nielshanson

View GitHub Profile
@nielshanson
nielshanson / README.md
Last active August 29, 2015 14:06
Simple Bar Chart

About the plot

Very basic bar chart to get introduced to the d3.js framework. It is parameterized in a fairly standard way with the following parameters:

  • abs_width: absolute width of the graph in pixels
  • abs_height: absolute height of the graph in pixels
  • x_axis_label: String for the x-axis label
  • xaxis_label_room: number of pixels between edge of the graph and bottom x-label
  • num_ticks_x: number of ticks on x axis
@nielshanson
nielshanson / README.md
Last active August 29, 2015 14:17
Bubble Plot

About the plot

Re-orderable bubble plot with one-sided marginal distribution. In the field of Metagenomics Bubble Plots are popular for displaying the taxonomic distribution of a microbial community. This work is heavily inspired heavily by the Les Misérable Co-occurence example designed by Mike Bostock. In this case the csv-matrix can be displayed in its original row-order, or by the row averages. Row averages are being displayed in the margin.

Being displayed is the 16S rRNA gene distribution of William's Lake Long-term Soil Productivity (LTSP) samples taken from four different soil horizons.

Data graciously provided by Mrs. Aria Hahn, UBC Microbiology Ph.D student from the Steven J. Hallam Laboratory.

Usage

@nielshanson
nielshanson / README.md
Last active August 29, 2015 14:17
World Map

About the plot

World map of locations of a selection of environmental metagenoems contained in the Integrated Microbial Genomes System (IMG/M), a genome browsing and annotation platform developed by the U.S. Department of Energy (DOE)-Joint Genome Institute (JGI). Points scaled by sequencing depth and colored based on broad categories of aquatic (blue), terrestrial (green), and air (grey). This work is expands upon the excellent Let's Make a Map tutorial by Mike Bostock, utilizing the Geo Projections and Geo Paths generators build into D3.js. The projection being used is the Kavrayskiy_VII.

Cartographic information is the [50m Admin 0 - Details](http://www.naturalearthdata.com/http//www.naturalear

@nielshanson
nielshanson / README.md
Last active September 18, 2017 16:59
Sunburst

About the plot

This plot is a modification of the Kerry Rodden's Sequences sunburst which has been modified to accomidate a hierarchy instead of patterns of sequences (e.g., web click-through rates). It has also been linked to the Data Tables, a jQuery JavaScript library to display create a paginated table of the datapoints found in each category.

The data being displayed is a classification of 507 publicly-available environmental metagenomes contained in the Integrated Microbial Genomes System (IMG/M) and MG-RAST genomeic annotation servers and data repositories. The data are divided into many categories, but start at Environmental (Aquatic, Terrestrial, Air), Host-associated (Human, Insect Gut), Engineered, and Viruses.

The colors are somewhat complicated as they are mix and match of Cynthia Brewer's ColorBrewer pallets; trying to keep

@nielshanson
nielshanson / README.md
Last active August 29, 2015 14:17
Bubble Tree

About the plot

This plot is a modification of the Mike Bostock's dendrogram to show the taxonomy of multiple samples. Taxonomy in metagenomics are sometimes only partially observed, thus it is often desitrable to comparte the taxonomic distribution of multiple samples at multiple levels of the tree-of-life. This visualization is dynamically expandable and contractable, and recursively calculates counts at the displayed leaves of the tree.

Data being displayed is the 16S rRNA gene distribution of William's Lake Long-term Soil Productivity (LTSP) samples taken from four different soil horizons.

This data was graciously provided by Aria Hahn, UBC Microbiology Ph.D student from the Steven J. Hallam Laboratory.

Usage

@nielshanson
nielshanson / README.md
Last active August 29, 2015 14:17
Heatmap

About the plot

A two-variable heatmap with two-sided marginals and mouseover. Heatmaps are used all over the pace, but in the field of Metagenomics Bubble Plots are popular for displaying the functional information of a microbial community (a loose convention). This work was heavily inspired heavily by the Les Misérable Co-occurence example designed by Mike Bostock. Marginals distributions are automatically calculated on the input csv-matrix.

Being displayed is a functioal screen of the Carbohydrate-Active enZYmes Database (CAZy), a collection of genes and proteins associated with the degradation of various complex carbohydrate sugars. Of particular interest from a material and chemical development perspective is the degradation of Lignin and Cellulose, two of the most abundant polymers