Basic plots for microarray data analysis in R: Volcano plots and expression plots

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay today I will show you how to plot your microarray data we will go first through the very basics of how to get the data to plot and then I will show you how to do these volcano plots and the expression plot so let's dive into it the first thing that we want to do is to load the libraries and for the plotting we will be using this GG plot to so we go ahead we load those libraries and the first thing that we'll need to do is to upload the data here we are going to use the most simple example where we have two conditions that we want to compare one control and one experimental so we launch that we load the phenotypic data and we also created the expression set so the phenotypic data is stored in this pataa uh file uh and again we have four control samples and three experimental samples we obtain at the end of the day this expression set that this is the values for the intensity of the probes for each of the condition so we have like for this first pro the intensity values for the four control conditions and the three experimental conditions so this is nothing new by the way all the code will be down in the description if you want to look at that and also we have videos dedicated to this part but I just want to introduce the example that we are using the other thing that we are going to do is load The annotation and we'll do it by using this file here that we downloaded from the internet also so again go to the basic video if you want to understand more in detail what is going on here but at the end of the day we have this annotation file where we just have for each Prov ID the Gen name a little description and also what type of RNA is this so then we move ahead to the contrast so we want to have a design where we compare the control with the experimental samples and then we want to fit the model so if we look at the design is as simple as it can be we are comparing the fourth for control samples with the three experimentals and then we fit that model to our expression mat now the last step we want to get the statistics so we do this second fit here and we are going to use this contrast where we control We compare the control with the experimental and then we will create uh old startat tables that contains also the anotation so that um we have everything in one table and in addition we are going to highlight or to indicate why Chans have a Lo change more than one and have a significant adjusted P value that we are going to consider about 0.05 so we run that and we end up with this old stats data frame if we look at that all St data frame we have the probes the annotations and also we have the statistics for every probe and this additional column where we have those probes or genes that have a significant adjusted P value and also have a Lo F change of more than one or less than minus one what we want to do here first is to plot this data and probably the most common way of plotting expression changes is using the volcano plots in these plots we have in the y axis the adjusted P value and in the x-axis we have the lock fold change we are going to use data therefore that is already included in that F stat table so the plotting here is quite straightforward we are going to use ggplot 2 and this is the syntax uh of this Library which is very intuitive we are going to call X the Lo F change and Y minus the log 10 of the adjusted P value we are going to use this gon point to plot just the point and we are going to do some very minimal annotation uh that I'll invite you to expand but essentially when we run this we have our volcano plot again lock fold change x-axis and in the y axis we have the adjusted V value and also we color those that are adjusted P value bigger than 0.05 and lo F change bigger than one so far so good the only thing that this volcano plot lack is the intensity of the probe and although there is not a direct correlation of expression and intensity of the prob is a good proxy to understand how abundantly expressed that transcript is so we'll have to do uh is to go back to the expression Matrix and integrate that data for each prob essentially this is what we are doing with this bit of code here which I will not go into details but essentially what this does is to create this plot table which has again the Pro Set ID the we just are giving here the Gen name as an notation have the lock f chain value and the adjusted P value from the old data frame and it has the expression or mean expression for the control and the experimental samples and with that we can plot the mean intensity of control again experimental and we use it again doing the GG plot this is again very intuitive we have the control again the experimental we have the same type of geometry and what we end up is with a plot where we have the significant points highlighted here in blue and those probes that have genes that are not significantly changing are marked in red so this is the second type of plot it incorporates now expression data it's complementary to the volcano plot because you can sort of infer infert the full change with that we conclude probably all what you need to do for micro analysis we cover the basic we cover how to do quality control we cover how to do multiple comparison batch effects and now we we have cover the plotting of this data for probably the final chapter of this micro Aras I want to use AI tools to do this analysis so in the next video we will have how to do all of this with a GitHub co-pilot so that you can sort of forget a little bit but if you remember the basic you may be able to get the details from copilot so don't forget to watch this video and I will see you next time
Info
Channel: Marcos Morgan
Views: 66
Rating: undefined out of 5
Keywords:
Id: zECTaJfnibM
Channel Id: undefined
Length: 6min 19sec (379 seconds)
Published: Fri Jul 05 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.