music + dance + projected visualsmarvel at perfect timingmore quotes

# making poetry out of spam is fun

EMBO Practical Course: Bioinformatics and Genome Analysis, 5–17 June 2017.

# visualization + design

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)).

## Tools

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.

### Journals

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)
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)
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)

EMBO Journal, May 2009, 28(9). Cover design by Martin Krzywinski. (EMBO)
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)
Genome Research, April 2008, 18(4). Cover design by Ryan Morin (Genome Research)

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

### Books

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

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.

An old Circos poster. (zoom)
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.

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.

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.

Refining color palettes. (zoom)

## final image elements

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

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

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

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

Background and midground elements. (zoom)
Background and foreground elements. (zoom)

## final image

Final image with all the layers. (Trends in Genetics October 2012, 28 (10)) (zoom)
VIEW ALL

# Essentials of Data Visualization—8-part video series

Mon 16-01-2017

In collaboration with the Phil Poronnik and Kim Bell-Anderson at the University of Sydney, I'm delighted to share with you our 8-part video series project about thinking about drawing data and communicating science.

Essentials of Data Visualization: Thinking about drawing data and communicating science.

We've created 8 videos, each focusing on a different essential idea in data visualization: encoding, shapes, color, uncertainty, design, drawing missing or unobserved data, labels and process.

The videos were designed as teaching materials. Each video comes with a slide deck and exercises.

# P values and the search for significance

Mon 16-01-2017
Little P value
What are you trying to say
Of significance?
—Steve Ziliak

We've written about P values before and warned readers about common misconceptions about them, which are so rife that the American Statistical Association itself has a long statement about them.

This month is our first of a two-part article about P values. Here we look at 'P value hacking' and 'data dredging', which are questionable practices that invalidate the correct interpretation of P values.

Nature Methods Points of Significance column: P values and the search for significance. (read)

We also illustrate how P values can lead us astray by asking "What is the smallest P value we can expect if the null hypothesis is true but we have done many tests, either explicitly or implicitly?"

Incidentally, this is our first column in which the standfirst is a haiku.

Altman, N. & Krzywinski, M. (2017) Points of Significance: P values and the search for significance. Nature Methods 14:3–4.

Krzywinski, M. & Altman, N. (2013) Points of significance: Significance, P values and t–tests. Nature Methods 10:1041–1042.

# Intuitive Design

Thu 03-11-2016

Appeal to intuition when designing with value judgments in mind.

Figure clarity and concision are improved when the selection of shapes and colors is grounded in the Gestalt principles, which describe how we visually perceive and organize information.

One of the Gestalt principles tells us that the magenta and green shapes will be perceived as as two groups, overriding the fact that the shapes within the group might be different. What the principle does not tell us is how the reader is likely to value each group. (read)

The Gestalt principles are value free. For example, they tell us how we group objects but do not speak to any meaning that we might intuitively infer from visual characteristics.

Nature Methods Points of View column: Intuitive Design. (read)

This month, we discuss how appealing to such intuitions—related to shapes, colors and spatial orientation— can help us add information to a figure as well as anticipate and encourage useful interpretations.

Krzywinski, M. (2016) Points of View: Intuitive Design. Nature Methods 13:895.

# Regularization

Fri 04-11-2016

Constraining the magnitude of parameters of a model can control its complexity.

This month we continue our discussion about model selection and evaluation and address how to choose a model that avoids both overfitting and underfitting.

Ideally, we want to avoid having either an underfitted model, which is usually a poor fit to the training data, or an overfitted model, which is a good fit to the training data but not to new data.

Nature Methods Points of Significance column: Regularization (read)

Regularization is a process that penalizes the magnitude of model parameters. This is done by not only minimizing the SSE, $\mathrm{SSE} = \sum_i (y_i - \hat{y}_i)^2$, as is done normally in a fit, but adding to this minimized quantity the sum of the mode's squared parameters, $\mathrm{SSE} + \lambda \sum_i \hat{\beta}^2_i$.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Regularization. Nature Methods 13:803-804.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Model Selection and Overfitting. Nature Methods 13:703-704.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Classifier evaluation. Nature Methods 13:603-604.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Logistic regression. Nature Methods 13:541-542.

# Model Selection and Overfitting

Fri 04-11-2016

With four parameters I can fit an elephant and with five I can make him wiggle his trunk. —John von Neumann.

By increasing the complexity of a model, it is easy to make it fit to data perfectly. Does this mean that the model is perfectly suitable? No.

When a model has a relatively large number of parameters, it is likely to be influenced by the noise in the data, which varies across observations, as much as any underlying trend, which remains the same. Such a model is overfitted—it matches training data well but does not generalize to new observations.

Nature Methods Points of Significance column: Model Selection and Overfitting (read)

We discuss the use of training, validation and testing data sets and how they can be used, with methods such as cross-validation, to avoid overfitting.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Model Selection and Overfitting. Nature Methods 13:703-704.