2024 π Daylatest newsbuy art
Trance opera—Spente le Stellebe dramaticmore quotes
very clickable

visualization + design

Statistics for aneuploidy level `h` = 1  2  3  4  5  6  7  8  9  10 

Tetraploid Genome Coverage Tables

Given a location `x` defined in the context of `h` chromosomes, the probability that position `x` is covered at least `\phi` times is `P_{h,\phi}` and given by $$ P_{h,\phi} = \left( 1 - \sum \frac{1}{k!} \left( \frac{\rho}{h}^k \right) e^{-\rho/h} \right)^h \tag{1} $$

For more details, see Wendl, M.C. and R.K. Wilson. 2008. Aspects of coverage in medical DNA sequencing. BMC Bioinformatics 9: 239.

For a given sequencing redundancy `\rho` (e.g. `\rho`-fold, as determined by the length of the haploid genome) of a tetraploid genome, the fraction of the tetraploid genome represented by at least `\phi` reads is reported by `P_{h,\phi}`. Coverage by fewer than `\phi` reads is reported as `1-P_{h,\phi}`. Coverage by exactly `\phi` reads is `P_{h,\phi} - P_{h,\phi+1}`. Entries for which fractional coverage is `\lt 10^{-5}` are not shown.

A rudimentary Monte Carlo simulation of genome coverage is also available, and is a useful supplement to the exact probabilities shown here.

CUSTOM DEPTH AND PLOIDY To create a table with a specific ploidy (e.g. 12) and haploid-equivalent (see below) depth (e.g. `200 \times`), use
http://mkweb.bcgsc.ca/coverage/?aneuploidy=12&depth=200

EXAMPLE 1

Suppose you carried out 3-fold redundant (`\rho=3`) sequencing of a haploid genome (`h=1`). 95.02% of the genome will be covered by at least one read (`P_{1,1}`) while 22.40% will be covered by exactly 3 reads (`P_{1,3} - P_{1,4}`).

EXAMPLE 2

You are sequencing a sample with a tumor content of 25% and you're interested in the depth of sequencing required to detect heterozygous mutations in the tumor. This scenario is equivalent to an aneuploidy = 8 genome—any given allele is present 8 times. If you sequence at (`\rho=200`), then 95% of the bases will be covered at a depth of at least `\phi = 14` (`P_{8,14} = 0.9494`). If you're satisfied with `\phi = 5` then you only need `\rho = 100` since now `P_{8,5} = 0.9580`.

ANALYTICAL vs STOCHASTIC

View plot that compares analytical vs stochastic results.

HAPLOID vs DIPLOID

View plot that compares 100x and 200x coverage of haploid and diploid genomes.

CODE

Download Perl scripts for analytical (to produce the tables below for any `\rho`) and stochastic coverage calculations.

sequencing redundancy for a tetraploid genome

View table for sequencing redundancy `\rho` = 1 2 3 4 5 6 7 8 9 10 20 25 50 75 100 of a tetraploid genome.

IMPORTANT The redundancy is always calculated using the size of the haploid genome. For example, if we collect 600 Gb of reads, our sequencing redundancy is `600 / 3 = 200 \times`. We've used the length of the haploid genome (3 Gb) in the calculation. If we now apply this `200 \times` sequencing to a diploid genome, our average coverage will not be `200 \times` but slightly less than `100 \times`.

sequencing redundancy 1-fold (`\rho / h = 0.2`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.9976 0.0000 1.0000
1 0.0024 0.9976 0.0024

sequencing redundancy 2-fold (`\rho / h = 0.5`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.9760 0.0000 1.0000
1 0.0239 0.9760 0.0240
2 0.0001 0.9999 0.0001

sequencing redundancy 3-fold (`\rho / h = 0.8`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.9225 0.0000 1.0000
1 0.0766 0.9225 0.0775
2 0.0009 0.9991 0.0009

sequencing redundancy 4-fold (`\rho / h = 1.0`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.8403 0.0000 1.0000
1 0.1548 0.8403 0.1597
2 0.0048 0.9951 0.0049
3 0.0000 1.0000 0.0000

sequencing redundancy 5-fold (`\rho / h = 1.2`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.7408 0.0000 1.0000
1 0.2432 0.7408 0.2592
2 0.0156 0.9841 0.0159
3 0.0003 0.9997 0.0003

sequencing redundancy 6-fold (`\rho / h = 1.5`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.6358 0.0000 1.0000
1 0.3260 0.6358 0.3642
2 0.0369 0.9618 0.0382
3 0.0013 0.9987 0.0013
4 0.0000 1.0000 0.0000

sequencing redundancy 7-fold (`\rho / h = 1.8`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.5340 0.0000 1.0000
1 0.3917 0.5340 0.4660
2 0.0700 0.9257 0.0743
3 0.0042 0.9957 0.0043
4 0.0001 0.9999 0.0001

sequencing redundancy 8-fold (`\rho / h = 2.0`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.4410 0.0000 1.0000
1 0.4345 0.4410 0.5590
2 0.1136 0.8755 0.1245
3 0.0105 0.9891 0.0109
4 0.0004 0.9996 0.0004

sequencing redundancy 9-fold (`\rho / h = 2.2`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.3595 0.0000 1.0000
1 0.4537 0.3595 0.6405
2 0.1635 0.8132 0.1868
3 0.0220 0.9767 0.0233
4 0.0013 0.9987 0.0013
5 0.0000 1.0000 0.0000

sequencing redundancy 10-fold (`\rho / h = 2.5`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.2901 0.0000 1.0000
1 0.4519 0.2901 0.7099
2 0.2147 0.7420 0.2580
3 0.0399 0.9567 0.0433
4 0.0033 0.9965 0.0035
5 0.0001 0.9999 0.0001

sequencing redundancy 20-fold (`\rho / h = 5.0`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.0267 0.0000 1.0000
1 0.1255 0.0267 0.9733
2 0.2607 0.1522 0.8478
3 0.2953 0.4129 0.5871
4 0.1938 0.7082 0.2918
5 0.0762 0.9020 0.0980
6 0.0186 0.9782 0.0218
7 0.0029 0.9968 0.0032
8 0.0003 0.9997 0.0003
9 0.0000 1.0000 0.0000

sequencing redundancy 25-fold (`\rho / h = 6.2`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.0077 0.0000 1.0000
1 0.0471 0.0077 0.9923
2 0.1365 0.0548 0.9452
3 0.2365 0.1913 0.8087
4 0.2608 0.4278 0.5722
5 0.1872 0.6886 0.3114
6 0.0887 0.8758 0.1242
7 0.0282 0.9646 0.0354
8 0.0061 0.9928 0.0072
9 0.0009 0.9990 0.0010
10 0.0001 0.9999 0.0001

sequencing redundancy 50-fold (`\rho / h = 12.5`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
0 0.0000 0.0000 1.0000
1 0.0002 0.0000 1.0000
2 0.0012 0.0002 0.9998
3 0.0048 0.0014 0.9986
4 0.0150 0.0062 0.9938
5 0.0368 0.0212 0.9788
6 0.0733 0.0580 0.9420
7 0.1201 0.1313 0.8687
8 0.1622 0.2514 0.7486
9 0.1797 0.4136 0.5864
10 0.1625 0.5933 0.4067
11 0.1194 0.7559 0.2441
12 0.0712 0.8753 0.1247
13 0.0344 0.9465 0.0535
14 0.0135 0.9808 0.0192
15 0.0043 0.9943 0.0057
16 0.0011 0.9986 0.0014
17 0.0002 0.9997 0.0003
18 0.0000 0.9999 0.0001

sequencing redundancy 75-fold (`\rho / h = 18.8`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
3 0.0000 0.0000 1.0000
4 0.0001 0.0000 1.0000
5 0.0006 0.0002 0.9998
6 0.0017 0.0007 0.9993
7 0.0046 0.0025 0.9975
8 0.0108 0.0071 0.9929
9 0.0222 0.0179 0.9821
10 0.0406 0.0401 0.9599
11 0.0663 0.0808 0.9192
12 0.0963 0.1470 0.8530
13 0.1242 0.2433 0.7567
14 0.1416 0.3676 0.6324
15 0.1419 0.5092 0.4908
16 0.1244 0.6512 0.3488
17 0.0950 0.7756 0.2244
18 0.0630 0.8706 0.1294
19 0.0363 0.9336 0.0664
20 0.0181 0.9699 0.0301
21 0.0078 0.9879 0.0121
22 0.0029 0.9958 0.0042
23 0.0010 0.9987 0.0013
24 0.0003 0.9996 0.0004
25 0.0001 0.9999 0.0001
26 0.0000 1.0000 0.0000

sequencing redundancy 100-fold (`\rho / h = 25.0`)

`\phi` `P_{h,\phi} - P_{h,\phi+1}` `1-P_{h,\phi}` `P_{h,\phi}`
6 0.0000 0.0000 1.0000
7 0.0001 0.0000 1.0000
8 0.0002 0.0001 0.9999
9 0.0006 0.0003 0.9997
10 0.0015 0.0009 0.9991
11 0.0033 0.0023 0.9977
12 0.0069 0.0057 0.9943
13 0.0131 0.0125 0.9875
14 0.0231 0.0256 0.9744
15 0.0375 0.0487 0.9513
16 0.0564 0.0862 0.9138
17 0.0782 0.1427 0.8573
18 0.0996 0.2208 0.7792
19 0.1161 0.3204 0.6796
20 0.1234 0.4365 0.5635
21 0.1191 0.5599 0.4401
22 0.1041 0.6790 0.3210
23 0.0820 0.7831 0.2169
24 0.0581 0.8650 0.1350
25 0.0369 0.9231 0.0769
26 0.0211 0.9600 0.0400
27 0.0108 0.9811 0.0189
28 0.0049 0.9919 0.0081
29 0.0020 0.9969 0.0031
30 0.0008 0.9989 0.0011
31 0.0002 0.9997 0.0003
32 0.0001 0.9999 0.0001
33 0.0000 1.0000 0.0000
news + thoughts

Nasa to send our human genome discs to the Moon

Sat 23-03-2024

We'd like to say a ‘cosmic hello’: mathematics, culture, palaeontology, art and science, and ... human genomes.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
SANCTUARY PROJECT | A cosmic hello of art, science, and genomes. (details)
Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
SANCTUARY PROJECT | Benoit Faiveley, founder of the Sanctuary project gives the Sanctuary disc a visual check at CEA LeQ Grenoble (image: Vincent Thomas). (details)
Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
SANCTUARY PROJECT | Sanctuary team examines the Life disc at INRIA Paris Saclay (image: Benedict Redgrove) (details)

Comparing classifier performance with baselines

Sat 23-03-2024

All animals are equal, but some animals are more equal than others. —George Orwell

This month, we will illustrate the importance of establishing a baseline performance level.

Baselines are typically generated independently for each dataset using very simple models. Their role is to set the minimum level of acceptable performance and help with comparing relative improvements in performance of other models.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Comparing classifier performance with baselines. (read)

Unfortunately, baselines are often overlooked and, in the presence of a class imbalance5, must be established with care.

Megahed, F.M, Chen, Y-J., Jones-Farmer, A., Rigdon, S.E., Krzywinski, M. & Altman, N. (2024) Points of significance: Comparing classifier performance with baselines. Nat. Methods 20.

Happy 2024 π Day—
sunflowers ho!

Sat 09-03-2024

Celebrate π Day (March 14th) and dig into the digit garden. Let's grow something.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2024 π DAY | A garden of 1,000 digits of π. (details)

How Analyzing Cosmic Nothing Might Explain Everything

Thu 18-01-2024

Huge empty areas of the universe called voids could help solve the greatest mysteries in the cosmos.

My graphic accompanying How Analyzing Cosmic Nothing Might Explain Everything in the January 2024 issue of Scientific American depicts the entire Universe in a two-page spread — full of nothing.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
How Analyzing Cosmic Nothing Might Explain Everything. Text by Michael Lemonick (editor), art direction by Jen Christiansen (Senior Graphics Editor), source: SDSS

The graphic uses the latest data from SDSS 12 and is an update to my Superclusters and Voids poster.

Michael Lemonick (editor) explains on the graphic:

“Regions of relatively empty space called cosmic voids are everywhere in the universe, and scientists believe studying their size, shape and spread across the cosmos could help them understand dark matter, dark energy and other big mysteries.

To use voids in this way, astronomers must map these regions in detail—a project that is just beginning.

Shown here are voids discovered by the Sloan Digital Sky Survey (SDSS), along with a selection of 16 previously named voids. Scientists expect voids to be evenly distributed throughout space—the lack of voids in some regions on the globe simply reflects SDSS’s sky coverage.”

voids

Sofia Contarini, Alice Pisani, Nico Hamaus, Federico Marulli Lauro Moscardini & Marco Baldi (2023) Cosmological Constraints from the BOSS DR12 Void Size Function Astrophysical Journal 953:46.

Nico Hamaus, Alice Pisani, Jin-Ah Choi, Guilhem Lavaux, Benjamin D. Wandelt & Jochen Weller (2020) Journal of Cosmology and Astroparticle Physics 2020:023.

Sloan Digital Sky Survey Data Release 12

constellation figures

Alan MacRobert (Sky & Telescope), Paulina Rowicka/Martin Krzywinski (revisions & Microscopium)

stars

Hoffleit & Warren Jr. (1991) The Bright Star Catalog, 5th Revised Edition (Preliminary Version).

cosmology

H0 = 67.4 km/(Mpc·s), Ωm = 0.315, Ωv = 0.685. Planck collaboration Planck 2018 results. VI. Cosmological parameters (2018).

Error in predictor variables

Tue 02-01-2024

It is the mark of an educated mind to rest satisfied with the degree of precision that the nature of the subject admits and not to seek exactness where only an approximation is possible. —Aristotle

In regression, the predictors are (typically) assumed to have known values that are measured without error.

Practically, however, predictors are often measured with error. This has a profound (but predictable) effect on the estimates of relationships among variables – the so-called “error in variables” problem.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Error in predictor variables. (read)

Error in measuring the predictors is often ignored. In this column, we discuss when ignoring this error is harmless and when it can lead to large bias that can leads us to miss important effects.

Altman, N. & Krzywinski, M. (2024) Points of significance: Error in predictor variables. Nat. Methods 20.

Background reading

Altman, N. & Krzywinski, M. (2015) Points of significance: Simple linear regression. Nat. Methods 12:999–1000.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of significance: Logistic regression. Nat. Methods 13:541–542 (2016).

Das, K., Krzywinski, M. & Altman, N. (2019) Points of significance: Quantile regression. Nat. Methods 16:451–452.

Convolutional neural networks

Tue 02-01-2024

Nature uses only the longest threads to weave her patterns, so that each small piece of her fabric reveals the organization of the entire tapestry. – Richard Feynman

Following up on our Neural network primer column, this month we explore a different kind of network architecture: a convolutional network.

The convolutional network replaces the hidden layer of a fully connected network (FCN) with one or more filters (a kind of neuron that looks at the input within a narrow window).

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Convolutional neural networks. (read)

Even through convolutional networks have far fewer neurons that an FCN, they can perform substantially better for certain kinds of problems, such as sequence motif detection.

Derry, A., Krzywinski, M & Altman, N. (2023) Points of significance: Convolutional neural networks. Nature Methods 20:1269–1270.

Background reading

Derry, A., Krzywinski, M. & Altman, N. (2023) Points of significance: Neural network primer. Nature Methods 20:165–167.

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

Martin Krzywinski | contact | Canada's Michael Smith Genome Sciences CentreBC Cancer Research CenterBC CancerPHSA
Google whack “vicissitudinal corporealization”
{ 10.9.234.152 }