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

117 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 2

This week we will cover preprocessing, linear modeling, and batch effects.

- Jeff Leek, PhDAssociate Professor, Biostatistics

Bloomberg School of Public Health

So batch effects can either be a technological artifact like

Â we saw in the previous lecture, or they could even be biological confounders.

Â So one place that that comes up often is in genetics.

Â So I'm going to, again,

Â set up my graphical parameters like I usually do in all these videos.

Â And then I'm going to load the libraries that we need in particular, the SNP stats

Â package is the one that we're going to be talking about a lot here.

Â And so, now I'm going to look at some genetic data.

Â And so, I'm going to load that data from the SNP stats package.

Â I'm going to look at just the data from a set of controls here.

Â So I'm going to just subset down to the set of controls dataset.

Â And so this is basically a set of data that

Â consists of controls, from different populations here.

Â So we want to see,

Â if there's a relationship between population in this genetic data.

Â And so just to make the computations go faster,

Â I'm going to actually just take a subset of these data, so

Â I'm going to do every tenth value, I'm going to take.

Â And so now I'm just going to take a subset that are both controls, so

Â they don't have any disease association,

Â as well as they're the ones that are the every tenth one, so that it's not too big.

Â So the dataset is a manageable size.

Â So the first thing that I can do is I'm basically going to calculate

Â the principal components, and you can do that for genetic data,

Â using some commands from the SNP stats package.

Â So the first thing that you need to do is calculate

Â a particular linear algebra multiplication.

Â And so you can do that, with the command XXT.

Â So this is an intermediate calculation to the PCA that we're not going into the math

Â details to worry about too much.

Â But then the next step is to do the eigen d composition of that calculation.

Â And then, the PC's are going to be the eigenvectors that come out of that.

Â So I've got the eigenvectors here, I'm going to take the first five.

Â Those are the ones we're going to look at.

Â So now I've have this PC's matrix.

Â And so each column of this is one of the PC's that we might want to look at.

Â So the next thing that I'm going to do is look at what population they come from.

Â So I'm going to take the data from the subjects and I'm going to subset to just

Â the controls, and I'm going to take out the stratum variable, and that's going to

Â be the population stratification variable that we're going to look at.

Â So I'm going to take that dataset, I'm going to take only the control samples and

Â I'm going to take out the stratum variable.

Â And so, I have this pop variable, which tells me which population they come from.

Â And so then, what I can do is I can plot the first principle component

Â versus the second principle component.

Â And I can color it by population, and then, we can see

Â if there's any relationship between population and these principal components.

Â And so in this case, there is a strong relationship between PC1 and

Â the populations.

Â Remember, the population is the color here.

Â And so, I can add a legend to the plot to make it a little easier to see.

Â So you can see that the European samples over here are very different from

Â the Asian samples on the first principal component.

Â So this is often the case in genetic data,

Â that we have a major effect on the genetic state are due to the population.

Â Now, if the disease that you're interested in is also associated with population,

Â it could be a confounder.

Â So the typical way that people deal with this is by using just direct

Â principle component analysis, and PC's for the adjustment.

Â The reason being that the signal is often weak enough in genetic association

Â studies that it's not likely to be captured by the PC's.

Â And so you can just remove the PC's without being too worried about

Â removing the

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