Martin Krzywinski / Genome Sciences Center / Martin Krzywinski / Genome Sciences Center / - contact me Martin Krzywinski / Genome Sciences Center / on Twitter Martin Krzywinski / Genome Sciences Center / - Lumondo Photography Martin Krzywinski / Genome Sciences Center / - Pi Art Martin Krzywinski / Genome Sciences Center / - Hilbertonians - Creatures on the Hilbert Curve
Lips that taste of tears, they say, are the best for kissing.Dorothy Parkerget crankymore quotes

circles: fun

Functional annotation of gene sequences—a visualization workshop. Poznan, Poland. Dec 12, 2015

visualization + design

Martin Krzywinski @MKrzywinski
Cover image for the human genetics special issue. Trends in Genetics October 2012, 28 (10) (lowres, hires, Trends in Genetics)

Creating the Trends in Genetics October 2012 Cover

Lately, I've been making a lot of square things round. So when Rhiannon Macrae, the Editor of Trends in Genetics, requested a Circos-like cover image for the human genetics special edition of the journal, I started drawing circles.

The image was published on the cover of Trends in Genetics human genetics special issue (Trends in Genetics October 2012, 28 (10)).


Circos, Circos tableviewer, Illustrator CS5, and a cup (or two) of Galileo coffee from a Rancilio Epoca.

Other Covers

Circos has appeared on covers of journals and books. Some of the images were designed by me and others were drawn from papers published in the issue.


Martin Krzywinski @MKrzywinski
Cover of Blood, 2 Aug 2012, 120(5). Figure from Egan, J. B., C. X. Shi, et al. (2012). Whole-genome sequencing of multiple myeloma from diagnosis to plasma cell leukemia reveals genomic initiating events, evolution, and clonal tides. Blood 120(5): 1060-1066. (Blood)
Martin Krzywinski @MKrzywinski
Genomics, Aug 2012, 100(2). Figure from Katapadi, V. K., M. Nambiar, et al. (2012). Potential G-quadruplex formation at breakpoint regions of chromosomal translocations in cancer may explain their fragility. Genomics 100(2): 72-80. (Genomics)
Martin Krzywinski @MKrzywinski
Science Translational Medicine, December 2010, 2(61). Figure from Lo, Y. M., K. C. Chan, et al. (2010). Maternal plasma DNA sequencing reveals the genome-wide genetic and mutational profile of the fetus. Sci Transl Med 2(61): 61ra91 (Science Translational Medicine)

Martin Krzywinski @MKrzywinski
EMBO Journal, May 2009, 28(9). Cover design by Martin Krzywinski. (EMBO)
Martin Krzywinski @MKrzywinski
Nature Biotechnology, November 2009, 27(11). Figure from Cho, B. K., K. Zengler, et al. (2009). The transcription unit architecture of the Escherichia coli genome. Nat Biotechnol 27(11): 1043-1049. (Nature Biotechnology)
Martin Krzywinski @MKrzywinski
Genome Research, April 2008, 18(4). Cover design by Ryan Morin (Genome Research)

Martin Krzywinski @MKrzywinski
American Scientist, September/October 2007. Cover design by Martin Krzywinski — how it was done. (American Scientist)


Martin Krzywinski @MKrzywinski
iGenetics, 3rd ed. by Peter Russell (Benjamin Cummings). Cover design by Martin Krzywinski. (iGenetics)
Martin Krzywinski @MKrzywinski
Building Bioinformatics Solutions with Perl, R and MySQL (Oxford University Press). Cover design by Martin Krzywinski. (Building Bioinformatics Solutions)
Martin Krzywinski @MKrzywinski
Designing Universal Knowledge by Gerlinde Schuller (Lars Müller Publishers) (Designing Universal Knowledge)

Martin Krzywinski @MKrzywinski
Chromosomes — art book of film stills, David Cronenberg. Contribution to book design by Martin Krzywinski. (Chromosomes)

source of design

I have a collection of unpublished Circos posters and thought these might be a good starting point. Rhiannon and I narrowed the choice down to the black-and-white design that showed sequenced organisms. We also liked the complex style of a panel of hundreds of Circos images generated with the tableviewer.

Martin Krzywinski @MKrzywinski
An old Circos poster. (zoom)
Martin Krzywinski @MKrzywinski
A panel of images generated from the Circos tableviewer. (zoom)

The idea would be that the foreground would be more artistic and stylized, while the background was more technical and complex. I have thousands of images available from the tableviewer (e.g. huge 15,129 image matrix).

Rhiannon also wanted to include the quote by Henry David Thoreau, "Nature and human life are as various as our several constitutions. Who shall say what prospect life offers to another?" This reminded me of a similar but more tragic line from Shakespeare's Julius Caesar, "How many ages hence shall this our lofty scene be acted over in states unborn and accents yet unknown!"

early comps

In the early comps we played around with the idea of using non-genomics elements in the image, such as coins. We thought that we could use the variety of color and shape of the coins to communicate the idea of genetic diversity. However, after wrestling with how to do this effectively the concept was scrapped — the idea of using coins felt both arcane and arbitrary.

Martin Krzywinski @MKrzywinski
First set of comps. (zoom)

I decided to go with a warm brown color scheme. It's not a color I use a lot of, which makes me think that I should try to do more with it.

Deep brown provides great contrast for saturated colors, though I had to be careful not to make the image look too kitchy with an excess of colour variation. In some of the early comps shown above, two or more different color palettes were used (e.g. grey/red/blue and false color) and this lowered to overall visual cohesion of the image.

It's always a good idea to add variety to design. After all, without any variety we'd be left with a blank page. Ok, so variety is good, but too much variety is very bad, and can make you wish for that blank page again. Think about this: one kind of variety already provides variety! A variety of variety (I run the risk of recursing myself ad infinitum) can not only compete for attention but resonate destructively (that's design-speak for "turn into visual mush").

refining the design

Everyone liked the combination of bright colors and dark background. This is an approach I favour too, which has worked well on other covers.

Martin Krzywinski @MKrzywinski
Experimenting with an organic look. (zoom)

Briefly I experimented with various brush and pencil filters to give the image a more hand-drawn and organic look. Most of the illustrations I generate are very digital — blocks of solid colors and high-contrast shapes — and I thought a departure from this look could work in this case. However, like with the coins, this path didn't produce anything productive.

Martin Krzywinski @MKrzywinski
Refining color palettes. (zoom)

final image elements

Martin Krzywinski @MKrzywinski
The background is created from a matrix of about 1,400 individual Circos images created by the user community using the tableviewer. (zoom)
Martin Krzywinski @MKrzywinski
The main element is a Circos image of a 15 x 15 table, also created with the tableviewer. (zoom)

Martin Krzywinski @MKrzywinski
A watermark made up from elements in a tableviewer image that show aggregate statistics for each row and column. (zoom)
Martin Krzywinski @MKrzywinski
A multi-crop zoom of the main element shown above. This version is colored for punch. (zoom)

Martin Krzywinski @MKrzywinski
Masks showing the locations of smaller vignettes. (zoom)
Martin Krzywinski @MKrzywinski
An 8 x 8 tableviewer image with outlined ribbons. (zoom)

Martin Krzywinski @MKrzywinski
Thoreau quote: Nature and human life are as various as our several constitutions. Who shall say what prospect life offers to another? (zoom)

Martin Krzywinski @MKrzywinski
Background and midground elements. (zoom)
Martin Krzywinski @MKrzywinski
Background and foreground elements. (zoom)

final image

Martin Krzywinski @MKrzywinski
Final image with all the layers. (Trends in Genetics October 2012, 28 (10)) (zoom)

news + thoughts

Play the Bacteria Game

Thu 19-11-2015

Choose your own dust adventure!

Nobody likes dusting but everyone should find dust interesting.

Working with Jeannie Hunnicutt and with Jen Christiansen's art direction, I created this month's Scientific American Graphic Science visualization based on a recent paper The Ecology of microscopic life in household dust.

Martin Krzywinski @MKrzywinski
An analysis of dust reveals how the presence of men, women, dogs and cats affects the variety of bacteria in a household. Appears on Graphic Science page in December 2015 issue of Scientific American.

This was my third information graphic for the Graphic Science page. Unlike the previous ones, it's visually simple and ... interactive. Or, at least, as interactive as a printed page can be.

More of my American Scientific Graphic Science designs

Barberan A et al. (2015) The ecology of microscopic life in household dust. Proc. R. Soc. B 282: 20151139.

Names for 5,092 colors

Tue 03-11-2015

A very large list of named colors generated from combining some of the many lists that already exist (X11, Crayola, Raveling, Resene, wikipedia, xkcd, etc).

Martin Krzywinski @MKrzywinski
Confused? So am I. That's why I made a list.

For each color, coordinates in RGB, HSV, XYZ, Lab and LCH space are given along with the 5 nearest, as measured with ΔE, named neighbours.

I also provide a web service. Simply call this URL with an RGB string.

Simple Linear Regression

Sat 07-11-2015

It is possible to predict the values of unsampled data by using linear regression on correlated sample data.

This month, we begin our column with a quote, shown here in its full context from Box's paper Science and Statistics.

In applying mathematics to subjects such as physics or statistics we make tentative assumptions about the real world which we know are false but which we believe may be useful nonetheless. The physicist knows that particles have mass and yet certain results, approximating what really happens, may be derived from the assumption that they do not. Equally, the statistician knows, for example, that in nature there never was a normal distribution, there never was a straight line, yet with normal and linear assumptions, known to be false, he can often derive results which match, to a useful approximation, those found in the real world.
Box, G. J. Am. Stat. Assoc. 71, 791–799 (1976).

Martin Krzywinski @MKrzywinski
Nature Methods Points of Significance column: Simple Linear Regression. (read)

This column is our first in the series about regression. We show that regression and correlation are related concepts—they both quantify trends—and that the calculations for simple linear regression are essentially the same as for one-way ANOVA.

While correlation provides a measure of a specific kind of association between variables, regression allows us to fit correlated sample data to a model, which can be used to predict the values of unsampled data.

Altman, N. & Krzywinski, M. (2015) Points of Significance: Simple Linear Regression Nature Methods 12:999-1000.

Background reading

Altman, N. & Krzywinski, M. (2015) Points of significance: Association, correlation and causation Nature Methods 12:899-900.

Krzywinski, M. & Altman, N. (2014) Points of significance: Analysis of variance (ANOVA) and blocking. Nature Methods 11:699-700.

...more about the Points of Significance column

Association, correlation and causation

Sat 07-11-2015

Correlation implies association, but not causation. Conversely, causation implies association, but not correlation.

This month, we distinguish between association, correlation and causation.

Association, also called dependence, is a very general relationship: one variable provides information about the other. Correlation, on the other hand, is a specific kind of association: an increasing or decreasing trend. Not all associations are correlations. Moreover, causality can be connected only to association.

Martin Krzywinski @MKrzywinski
Nature Methods Points of Significance column: Association, correlation and causation. (read)

We discuss how correlation can be quantified using correlation coefficients (Pearson, Spearman) and show how spurious corrlations can arise in random data as well as very large independent data sets. For example, per capita cheese consumption is correlated with the number of people who died by becoming tangled in bedsheets.

Altman, N. & Krzywinski, M. (2015) Points of Significance: Association, correlation and causation Nature Methods 12:899-900.

...more about the Points of Significance column

Bayesian networks

Thu 01-10-2015

For making probabilistic inferences, a graph is worth a thousand words.

This month we continue with the theme of Bayesian statistics and look at Bayesian networks, which combine network analysis with Bayesian statistics.

In a Bayesian network, nodes represent entities, such as genes, and the influence that one gene has over another is represented by a edge and probability table (or function). Bayes' Theorem is used to calculate the probability of a state for any entity.

Martin Krzywinski @MKrzywinski
Nature Methods Points of Significance column: Bayesian networks. (read)

In our previous columns about Bayesian statistics, we saw how new information (likelihood) can be incorporated into the probability model (prior) to update our belief of the state of the system (posterior). In the context of a Bayesian network, relationships called conditional dependencies can arise between nodes when information is added to the network. Using a small gene regulation network we show how these dependencies may connect nodes along different paths.

Background reading

Puga, J.L, Krzywinski, M. & Altman, N. (2015) Points of Significance: Bayesian Statistics Nature Methods 12:277-278.

Puga, J.L, Krzywinski, M. & Altman, N. (2015) Points of Significance: Bayes' Theorem Nature Methods 12:277-278.

...more about the Points of Significance column