An introduction to the statistics behind the most popular genomic data science projects. This is the sixth course in the Genomic Big Data Science Specialization from Johns Hopkins University.

Loading...

From the course by Johns Hopkins University

Statistics for Genomic Data Science

111 ratings

An introduction to the statistics behind the most popular genomic data science projects. This is the sixth course in the Genomic Big Data Science Specialization from Johns Hopkins University.

From the lesson

Module 1

This course is structured to hit the key conceptual ideas of normalization, exploratory analysis, linear modeling, testing, and multiple testing that arise over and over in genomic studies.

- Jeff Leek, PhDAssociate Professor, Biostatistics

Bloomberg School of Public Health

One of the most fundamental concepts in statistics for genomics,

Â or really statistics for anything, is experimental design.

Â So here, we're going to talk about three of the key ideas, variability,

Â replication, and power.

Â So, the first thing to keep in the mind is the central dogma of statistics.

Â So, the central of dogma of statistics states that we have some population that

Â we'd like to measure things about.

Â So, this is the population that we have over here.

Â And we have some, in this case,

Â shapes, and we want to measure the fraction that are a particular color.

Â The way that we do that is that we use probability and

Â sampling to get a smaller subset of these objects, and measure something on them.

Â So, in genomics this might be the population of all people that have

Â a particular cancer.

Â We might sample a subset of them, ideally randomly, but

Â almost never is that the case.

Â And then measure something about them, say, the gene expression profiles or

Â measurements about their genetic variance, or something else.

Â We then want to use that information to make inference about the population.

Â So we want to take statistics and basically,

Â summarize these data that we've collected on this small sample, and

Â see if we can say what's the proportion in the big sample up here.

Â So, what happens is there's a couple of different kinds of variability that

Â get introduced.

Â But the main one that we talk about a lot in statistics is sampling variability.

Â We use probability here to select which samples that we wanted to look at.

Â Now, it could be that set of samples, or in a different case,

Â you might get a whole different set of samples.

Â And so you might get variable estimates of what we think is going to happen in

Â the population.

Â So, it turns out there's three major sources of variability in

Â most genomic measurements.

Â So, the first is phenotype variability.

Â So, almost always in a genomic experiment,

Â at least if you're talking about a genomic experiment in humans.

Â But even in other organisms as well, you want to measure variability, say,

Â between cancers and normals, or between two different levels of output of a crop.

Â So, there's variability in the measurements due to that phenotype.

Â There's also variabilities due to measurement error, and this is a big one.

Â So, the measurement error can either be sort of random measurement error,

Â that sort of happens to every measurement as we go along.

Â It can also be measurement error that's correlated or biased.

Â There are all sorts of reasons why that you might measure things

Â differently between different samples that aren't necessarily down to biology, or

Â the phenotype that you care about.

Â And so that often comes in the form of batch effects or

Â other things like that which we'll talk about later.

Â Finally, there's natural biological variation.

Â This is one of the reasons why a genomics is so exciting, but also so hard.

Â Any two individuals will have variability in their genomic measurements

Â just because they're different people.

Â Not necessarily due to any specific biological difference between them, or

Â due to any measurement error.

Â In fact, you can take the exact same person and

Â measure their genomics repeatedly over time of the same kind of tissue

Â in the same exact way, and you'll get variation from time to time.

Â Because there's natural variability in say, the amount of, that each

Â gene is expressed, or what variants are present in which cells in the body.

Â So that natural variation is something that you have to account for

Â when modeling things with statistics.

Â So, the other thing that you need to keep in mind when you're doing

Â experiments is how are you going to measure those types of variability.

Â So, there's two big type of replicates that people often do in experiments.

Â So, replicates are when you do an experiment, and you want to do it more

Â than one time because there's so much variability in the sample.

Â You want to be able to measure that variability, and make an estimate of how

Â uncertain you are about certain statements that you're making.

Â So, the first kind of replication is technical replication.

Â So, this is where you have some sample, say, it's a sample that you've already

Â collected from somebody, and you're going to run genomic measurements on it.

Â So, what you do is you do some sort of processing of the samples, and

Â you do that processing two separate times.

Â You do the exact same processing, but you just repeat it twice.

Â Then you get what's called technical replicates.

Â So, these are replicates that just replicate the technical part of

Â the process.

Â Now, there are different kinds of technical replicates,

Â because there's obviously multi-step processes that generate these replicates.

Â So, you can have different kinds of technical replicates, but

Â in this case it's always the same biological sample that you're considering.

Â The other kind of replicate, and one that's very important to

Â collect in genomic measurements, is biological replicates.

Â So, this is where you take different people, or different organisms,

Â or different samples from different tissues and you prep them.

Â You, again, prep them the exact same way.

Â But here you're prepping two different samples, and so because you're

Â prepping two different samples, you get two biological replicates.

Â So, biological replicates measure something about biologic variability,

Â not just how variable the machine was in making those measurements.

Â So, it turns out that natural biological variation in biological replicates

Â is a sort of a natural quantity regardless of the technology used.

Â This is a figure from a paper that shows two genes, so

Â here's gene one in column one and gene two in column two.

Â And they're measured with two different technologies.

Â One is with RNA sequencing, and one is with RNA microarray.

Â And so you see that gene one is not very variable regardless of whether

Â you measure it on sequencing, or whether you measure it on microarray.

Â Each of these dots represents 1 individual across 60 individuals.

Â They're the same individuals that were measured with the two technologies.

Â And you can see that the variability of this gene is small regardless of what you

Â use to measure it.

Â Similarly, if you look at this gene, it's highly variable across people

Â regardless of what technology you use to measure it.

Â And so you could see that variability, natural biological variability, is not

Â impacted by the choice of technology that you use to measure it with.

Â So you need to separate those two things when you're designing your experiments.

Â You need to account for how are you going to measure both the biological

Â variability, and the technical variability.

Â So, another thing to keep in mind is how many of these replicates you might

Â want to get.

Â So, if N is the number of measurements,

Â there's a very famous sample size formula which is the number of dollars that

Â you have divided by how much it cost to make each measurement.

Â Now, obviously that's a little bit silly, but

Â it is a formula that gets used [LAUGH] a surprising amount of the time.

Â But there are better ways to calculate how many samples you need.

Â And so, there are typical sample sizes that come in various different kinds of

Â genomics experiments.

Â So, if you're looking at a rare mendelian disorder,

Â so this is a disorder that will be passed on.

Â It's highly penetrant, so

Â everybody that has a genetic variant in a family might get that same disorder.

Â Then, they typically have relatively small sample sizes.

Â This is largely because they're rare.

Â So, it's probably hard to find people that have more than that.

Â Ideally, you'd have a bigger sample size, but that might be all you have.

Â A typical RNA sequencing study, or study that measures gene

Â expression can vary somewhere between 10 biological replicates,

Â and 1,000 biological replicates.

Â 1,000 would be a very big study.

Â 10 would be on the small side, but

Â 10 is just enough where you can really start to measure biological variability.

Â Similarly for most epigenetic studies, like a DNA methylation study, originally

Â they would be relatively small samples sizes, say, 10 or even fewer samples.

Â But now with epigenome association studies or the EWA studies you're seeing

Â up to 1,000 of samples of the DNA methylation being taken.

Â Finally, for a common disease genome-wide association studies.

Â So, these are diseases where there's a genetic variant, but

Â we don't expect it to be perfectly linked with any particular trait.

Â It might be a relatively subtle effect size, we want to measure lots and

Â lots of people.

Â So, there the smallest sample size you might even be able to get away with is

Â 10,000.

Â And now, there are even studies that are being planned or being run with millions

Â of individuals that are being measured for their genetic variability.

Â So, the sample size depends on a couple of different things.

Â It depends on the availability of those samples.

Â It depends on how the variability manifests itself in the genomic data,

Â and it depends on how big a signal that you're going to see.

Â And the key thing to keep in mind is that sequencing technology does not

Â eliminate biological variability.

Â So, there's sort of a rush almost every time that a new genomics technology comes

Â out to run an experiment with even a very small number of samples, and

Â you can get a really high profile paper.

Â But you won't necessarily be able to get reproducible results because you won't

Â be able to measure how uncertain you are about

Â those quantities that you're measuring.

Â So again, keep in mind that you get natural biological variability

Â that corresponds to specific genes that have specific variability regardless of

Â how you measure them.

Â This is actually often ignored.

Â So, here's an example.

Â This is a table that we published in this paper, and

Â this is a table of a large number of early RNA sequencing experiments.

Â And these RNA sequencing experiments were published in very good journals.

Â And they were very interesting from a technological perspective, but as you can

Â see, the number of biological replicates and technical replicates that they have.

Â So, this is the number of technical replicates in this column and the number

Â of biological replicates in this column, is often very small with sometimes one, or

Â two, or three sample of replicates in each of these cases.

Â So, why is having such a small number of replicates a problem?

Â Well, the reason is because you won't have enough power to discover what you're

Â looking for.

Â So, what's power?

Â Power is a statistical term that means the probability

Â that you will discover the real signal if it is there.

Â So, power is a function of a large number of things.

Â It's a function of the signal size.

Â It's a function of how variable your measurements are.

Â It's a function of the number of samples that you've taken.

Â So typically, in a clinical study, say, for example power is set to be 80%.

Â So, you want to get enough samples, so that there's an 80% probability that

Â if there's a real effect of the size you believe will be there,

Â that you'll actually be able to do it.

Â But it turns out that all power calculations are a little bit made up,

Â in the sense that you have to guess in advance,

Â how big is the signal going to be?

Â How variable is the data going to be?

Â Often you know a little bit about that from previous studies, but

Â you never know exactly what that's going to be.

Â The real point though is that if you haven't really considered how strong your

Â chances of making a discovery, you won't be able to discover reproducible results.

Â So, higher power is in general better, and

Â it's a good idea to do a power calculation before running your experiment.

Â Because the worst thing in the world is to have run an entire experiment, and

Â then not have enough power to detect anything and to have to cancel

Â the experiment, or to actually have to run it and then you lose the money.

Â Lower powered studies tend not to replicate.

Â In other words, even the things that you discover turn out to often be just due

Â to noise or due to some sort of bias, like the winner's curse where you'd identify

Â things that are the largest effect sizes even if they're not real effects.

Â And so in general, you want to design your study to have high

Â enough power to detect what you're looking for.

Â So, here are a couple of things that,

Â imagine you're just trying to compare two measurements.

Â You're trying to compare the measurements for X and the measurements for Y.

Â Here, we're going to ignore what they are for a minute, and

Â suppose that there is a real difference in the two means.

Â And so the mean of the measurements for X is shown at this blue line, and

Â the mean at the measurements for Y is shown at this red line.

Â And so the goal is to find the difference between these two.

Â So, you can imagine that it'll be easier to find an effect if the blue line and

Â the red line are farther apart from each other.

Â Another thing, it'll be easier to find an effect if the red measure,

Â the measurements for the Y measurements are actually closer together.

Â If they were all very clumped very closely around this red line, and

Â all the blue measurements were clumped very closely around this blue line,

Â they'd also be easier to see.

Â The other thing to keep in mind is imagine you only got two measurements.

Â And imagine for the Y it was just this measurement and that measurement.

Â And for the X it might be say, this measurement and this measurement.

Â Then, this mean would stay the same, but

Â this mean would shift all the way over here.

Â So, it would look like they were closer together than they were.

Â So, again, the number of samples will help you, tell you a lot more about

Â what the actual average is, and whether they're different from each other.

Â So, here's a little quick example.

Â I'm showing you some R code, but you don't need to worry about it too much.

Â It's just to show you that the power is a function of the sample size,

Â the number of samples in each group.

Â The difference between the two groups, the effect size, and

Â the variance, something about the variance.

Â In this case, it's the standard deviation.

Â We'll talk about what all these concepts are later in the class.

Â But just for now, if you think about it just conceptually, if you do

Â the power calculation for a sample size of 10, with a difference of effect of 5,

Â and a standard deviation of 10, you get a power of about 18%.

Â So, you can make that calculation just by plugging these number into

Â the power.t.test functions.

Â You can also do this in the reverse way.

Â So, suppose you want to get to an 80% power,

Â which is that power that people have in clinical trials.

Â And then you know that the effect size is going to be something like 5.

Â And you know that the variance of those sampling variance of those measurements,

Â then you can actually use the power.t.test function

Â to actually get the sample size that you need in each group.

Â Similarly, you can change different parameters in this.

Â So for example, if you know for example that the effect is going to be a positive

Â effect, there's always going to be an effect and then direction of the X

Â measurements, then you can make it just a one-sided calculation.

Â This is often not the case in genomic measurements.

Â We often don't know that one particular gene or

Â variant will go in one direction or the other.

Â But if you do, you can get a slightly higher power.

Â In other words, here, to get an 80% power for

Â a difference of 5 with a standard deviation of 10, you needed 63.8 samples.

Â Here, you only need 50.2 samples.

Â So again, this is a function of a few different key quantities.

Â So, what you can often do, rather than making specific assumptions,

Â is make these sort of power curves.

Â So, here I plotted on the x-axis the difference in the means,

Â the real difference in the means between the two samples.

Â And here I plotted power on the y-axis.

Â And so as the difference in the means becomes either very far apart negative, or

Â very far apart positive,

Â you see an increase in power in each of these two directions.

Â So, it's easier and easier to detect, the probability of detecting the effect gets

Â higher and higher as the difference between the two groups gets higher.

Â The power also gets higher, here the colors represent the sample size.

Â So, black is n=5, blue is n=10, red is n=20.

Â And you can see that there's an increase in power as the sample size increases.

Â It also increases if you know the real standard deviations versus just guessing

Â what they are from previous studies.

Â So in general, you can make these curves and

Â get an idea about what the power is for your study.

Â And you can use that to plan out how many biological and

Â technological replicates you need to get in order to make sure you have a good

Â chance of actually discovering something.

Â Coursera provides universal access to the worldâ€™s best education,
partnering with top universities and organizations to offer courses online.