Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - contact me Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca on Twitter Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Lumondo Photography Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Pi Art Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Hilbertonians - Creatures on the Hilbert Curve
This love's a nameless dream.Cocteau Twinstry to figure it outmore quotes

genomics: not obvious


In Silico Flurries: Computing a world of snow. Scientific American. 23 December 2017


data visualization + art

Genes that make us sick

It is said that for money you can have everything, but you cannot. You can buy food, but not appetite; medicine, but not health; knowledge, but not wisdom; glitter, but not beauty; fun, but not joy; acquaintances, but not friends; servants, but not faithfulness; leisure, but not peace. You can have the husk of everything for money, but not the kernel.
— Arne Garborg

I have recently had the opportunity to contribute to The Objects that Power the Global Economy, a book by Quartz.

The book is about objects that have impact on our world and our lives. "Each chapter of this book examines an object that is driving radical change in the global economy: how we communicate, what we eat, the way we spend our money. The stories are told through global reporting, original photography and illustration by award-winning artists, contributions from business visionaries, data visualization, and interactive features." (Quartz).

where disease hides in the genome

My illustration is of the human genome with a focus on the genes that have been implicated in disease.

We have about 30,000 genes and about half of these play some role in disease.

You can peruse what we know about the connection between genetics and illness at the Online Mendelean Inheritance of Man database. For example, a cursory search for "cancer" results in over 3,500 entries.

It's important to realize that these aren't genes that cause disease—its misregulation and mutations in them that are associated with disease (causality is complicated).

the visualization

The illustration shows the genome as a single line, wound in an Archimedean spiral. Chromosomes 1–22 are shown binned into about 10,000 regions along the spiral. Regions that have genes associated with disease are marked with dots—the size of the dot shows how many such genes are found. Each region corresponds to about 286,000 bases.

We see that in about 73% of the 286 kb regions, there are no genes. In about 18% we see a single gene and in roughly 10% two genes or more.

  regions  genes
    7,321  0
    1,812  1
      556  2
      221  3
       85  4
       93  5+

Winding the genome up in a spiral creates a compact representation. Squishing a line onto a page can be tricky.

Luckily, space filling curves like the Hilbert curve are very efficient at doing this. I've previously shown the genome along a Hilbert curve for a Scientific American Graphic Science page.

the artwork

I show several versions of the illustrations below. In the book, the image is printed on a black background.


 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The human genome is shown as a spiral. Starting at the top with chromosome 1 and proceeding clockwise, each of the 10,087 dots corresponds to 286,000 bases, colored by chromosome. Within each dot, the number of genes in that region implicated in disease is shown by the size of the black circle. Chromosomes X and Y are not shown. (zoom)

 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The human genome is shown as a spiral. Starting at the top with chromosome 1 and proceeding clockwise, each of the 10,087 dots corresponds to 286,000 bases, colored by chromosome. Within each dot, the number of genes in that region implicated in disease is shown by the size of the black circle. Chromosomes X and Y are not shown. (zoom)

 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The human genome is shown as a spiral, starting at the top with chromosome 1 and proceeding clockwise. The spiral is formed by 10,087 segments that correspond to 286,000 bases each. Segments that contain genes implicated in disease are indicated by dots, sized by the number of genes. Chromosomes X and Y are not shown. (zoom)

 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The human genome is shown as a spiral, starting at the top with chromosome 1 and proceeding clockwise. The spiral is formed by 10,087 segments that correspond to 286,000 bases each. Segments that contain genes implicated in disease are indicated by dots, sized by the number of genes. Chromosomes X and Y are not shown. (zoom)

 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The human genome is shown as a spiral, starting at the top with chromosome 1 and proceeding clockwise. The spiral is formed by 10,087 segments that correspond to 286,000 bases each. Segments that contain genes implicated in disease are indicated by dots, sized by the number of genes. Chromosomes X and Y are not shown. (zoom)
VIEW ALL

news + thoughts

Statistics vs Machine Learning

Tue 03-04-2018
We conclude our series on Machine Learning with a comparison of two approaches: classical statistical inference and machine learning. The boundary between them is subject to debate, but important generalizations can be made.

Inference creates a mathematical model of the datageneration process to formalize understanding or test a hypothesis about how the system behaves. Prediction aims at forecasting unobserved outcomes or future behavior. Typically we want to do both and know how biological processes work and what will happen next. Inference and ML are complementary in pointing us to biologically meaningful conclusions.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Statistics vs machine learning. (read)

Statistics asks us to choose a model that incorporates our knowledge of the system, and ML requires us to choose a predictive algorithm by relying on its empirical capabilities. Justification for an inference model typically rests on whether we feel it adequately captures the essence of the system. The choice of pattern-learning algorithms often depends on measures of past performance in similar scenarios.

Bzdok, D., Krzywinski, M. & Altman, N. (2018) Points of Significance: Statistics vs machine learning. Nature Methods 15:233–234.

Background reading

Bzdok, D., Krzywinski, M. & Altman, N. (2017) Points of Significance: Machine learning: a primer. Nature Methods 14:1119–1120.

Bzdok, D., Krzywinski, M. & Altman, N. (2017) Points of Significance: Machine learning: supervised methods. Nature Methods 15:5–6.

...more about the Points of Significance column

Happy 2018 `\pi` Day—Boonies, burbs and boutiques of `\pi`

Wed 14-03-2018

Celebrate `\pi` Day (March 14th) and go to brand new places. Together with Jake Lever, this year we shrink the world and play with road maps.

Streets are seamlessly streets from across the world. Finally, a halva shop on the same block!

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A great 10 km run loop between Istanbul, Copenhagen, San Francisco and Dublin. Stop off for halva, smørrebrød, espresso and a Guinness on the way. (details)

Intriguing and personal patterns of urban development for each city appear in the Boonies, Burbs and Boutiques series.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
In the Boonies, Burbs and Boutiques of `\pi` we draw progressively denser patches using the digit sequence 159 to inform density. (details)

No color—just lines. Lines from Marrakesh, Prague, Istanbul, Nice and other destinations for the mind and the heart.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Roads from cities rearranged according to the digits of `\pi`. (details)

The art is featured in the Pi City on the Scientific American SA Visual blog.

Check out art from previous years: 2013 `\pi` Day and 2014 `\pi` Day, 2015 `\pi` Day, 2016 `\pi` Day and 2017 `\pi` Day.

Machine learning: supervised methods (SVM & kNN)

Thu 18-01-2018
Supervised learning algorithms extract general principles from observed examples guided by a specific prediction objective.

We examine two very common supervised machine learning methods: linear support vector machines (SVM) and k-nearest neighbors (kNN).

SVM is often less computationally demanding than kNN and is easier to interpret, but it can identify only a limited set of patterns. On the other hand, kNN can find very complex patterns, but its output is more challenging to interpret.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Machine learning: supervised methods (SVM & kNN). (read)

We illustrate SVM using a data set in which points fall into two categories, which are separated in SVM by a straight line "margin". SVM can be tuned using a parameter that influences the width and location of the margin, permitting points to fall within the margin or on the wrong side of the margin. We then show how kNN relaxes explicit boundary definitions, such as the straight line in SVM, and how kNN too can be tuned to create more robust classification.

Bzdok, D., Krzywinski, M. & Altman, N. (2018) Points of Significance: Machine learning: a primer. Nature Methods 15:5–6.

Background reading

Bzdok, D., Krzywinski, M. & Altman, N. (2017) Points of Significance: Machine learning: a primer. Nature Methods 14:1119–1120.

...more about the Points of Significance column

Human Versus Machine

Tue 16-01-2018
Balancing subjective design with objective optimization.

In a Nature graphics blog article, I present my process behind designing the stark black-and-white Nature 10 cover.

Nature 10, 18 December 2017

Machine learning: a primer

Thu 18-01-2018
Machine learning extracts patterns from data without explicit instructions.

In this primer, we focus on essential ML principles— a modeling strategy to let the data speak for themselves, to the extent possible.

The benefits of ML arise from its use of a large number of tuning parameters or weights, which control the algorithm’s complexity and are estimated from the data using numerical optimization. Often ML algorithms are motivated by heuristics such as models of interacting neurons or natural evolution—even if the underlying mechanism of the biological system being studied is substantially different. The utility of ML algorithms is typically assessed empirically by how well extracted patterns generalize to new observations.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Machine learning: a primer. (read)

We present a data scenario in which we fit to a model with 5 predictors using polynomials and show what to expect from ML when noise and sample size vary. We also demonstrate the consequences of excluding an important predictor or including a spurious one.

Bzdok, D., Krzywinski, M. & Altman, N. (2017) Points of Significance: Machine learning: a primer. Nature Methods 14:1119–1120.

...more about the Points of Significance column

Snowflake simulation

Tue 16-01-2018
Symmetric, beautiful and unique.

Just in time for the season, I've simulated a snow-pile of snowflakes based on the Gravner-Griffeath model.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A few of the beautiful snowflakes generated by the Gravner-Griffeath model. (explore)

The work is described as a wintertime tale in In Silico Flurries: Computing a world of snow and co-authored with Jake Lever in the Scientific American SA Blog.

Gravner, J. & Griffeath, D. (2007) Modeling Snow Crystal Growth II: A mesoscopic lattice map with plausible dynamics.