Tessa A. Morris General Microarray Data Analysis

From OpenWetWare

Jump to: navigation, search

Contents

Dahlquist Lab Navigation

Monday (May 18, 2015)

Overview

  • Set up Wiki pages and electronic lab notebook to make research easier in the future.
  • Listen to presentation about summer research goals by Dr. Dahlquist.
  • Within- and Between-chip Normalization
  • Perform Statistical Analysis on each time point (Within Strain ANOVA and p-values)

Purpose

The purpose of today's lab was to normalize the within and between chip data and then perform a statistical analysis on each time point in order to determine if there is anything significant in the data.

Helpful Links from Dr. Dahlquist

Methods

Setup Wiki

Your User Page: Set up your individual user page on this wiki (accessible via your username at the top of the page). Your user page should take the form of a résumé or, in academic circles, a curriculum vitae. Dr. Dahlquist has such pages, both within this wiki (user page) and online in general. You may use those as starting points. As students, your information may be different from ours. OpenWetware automatically fills in your user page with automated content that may not apply to you. You will need to delete any unneeded information from the automated content and add the following:

  1. Name
  2. Contact Information (e-mail address and LMU mail address)
  3. Personal Information: Education, Major, Expected graduation year, Upper division courses taken, Career interests and goals
  4. Independent research projects: Title of project, Mentor's name, Presentation, Publications
  5. Work experience: Position/title, employer, dates, responsibilities
  6. Personal interests/hobbies: What is your favorite aspect of biology and why? What is your favorite aspect of mathematics and why?
Practice your Wiki Skills

The previous sections listed the content that you need to provide on the wiki. In formatting your pages, demonstrate all of the following skills. Find a way to make integrate them naturally into the content (e.g., do not say “Here is an image.” and put just any image on the page).

  1. Every time you edit a page (whether it is a content page or discussion page), enter a meaningful description of your change in the Summary field at the bottom of the editor. This allows other users to easily see (say via the Special:RecentChanges or history pages) what has happened to the page since they last visited it.
  2. Create a new Wiki page: [[new page title]] — When you include a non-existent link in a page (say, your user page), the software can tell that this page doesn't exist and colors it red instead of blue/purple. When you click on the red link, you are then given the option to edit (and thus create) the page.
    • We suggest you practice this by creating your Week 2 journal entry page. The name for the page should be in the format "username Week 2" (i.e., that is the text you put between the square brackets when you link to this page).
  3. Link to a page within our Wiki: [[page title|optional visible label]]
    • Go to the People and link your name to your own user page.
  4. Link to an external Web page: http://address or [http://address visible label]
    • The second form of the link is preferred because it looks neater on the page.
  5. Use headings: === title === (number of equals signs indicates heading level)
    • By convention, start your largest heading with two equals signs. The single equals sign is for the title of the page and is automatically created when you create the page.
  6. Create a bulleted list: *
    • Note that you can create sub-bullets underneath by using multiple asterisks, e.g., **, ***, etc.
  7. Create a numbered list: #
    1. Note that you can create numbered sub-lists by using multiple number signs, e.g., ##, ###, etc.
    2. You can also mix bullets and numbers, e.g., *#, #*, or even #*#, etc.
    3. Do not skip lines between your bulleted or numbered lists, or the wiki will not interpret your syntax correctly.
  8. "Comment out" your Wiki code: <!-- commented-out Wiki text --> When you "comment out" your wiki code, the code will be visible on the Edit page, but will not be visible on the wiki page itself. "Commenting" is a common practice in coding that is used to explain the meaning of the code for someone else reading it. In this situation, commenting can be used to keep a rough draft of a wiki page invisible until you are ready for it to be seen.
  9. Upload an image file: Click Upload file then follow the instructions.
    • Use the image on your page: [[Image:exact-name-of-image-file]]
    • REMEMBER: DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION! We suggest you include an image of yourself that would be suitable for a professional resume.
  10. Upload another type of file (such as .pdf): Click Upload file then follow the instructions.
    • Link to the file you uploaded on your Wiki page: [[Media:exact-name-of-uploaded-file|visible label]]
    • REMEMBER: DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION! We suggest that you include something professional, such as the Word or PDF version of your paper resume, a scientific paper you have written, etc.
  11. Assign one or more categories to your page: [[Category:category name]] This creates an automatic "table of contents" for the wiki. When you click on a category link at the bottom of a page, a new page opens giving you a list of all wiki pages that have been assigned that category.
    • Throughout the course, you will use the category [[Category:BIOL98-04/S15]] for all of the pages you create.
  12. Use the discussion page to make a comment. Wiki etiquette requires that you sign your comments with your "signature": ~~~~ (4 tildes in a row). These tildes get converted automatically, for example, into: Kam D. Dahlquist 15:47, 28 August 2008 (UTC)
    • You can fulfill this by posting your comment on Dr. Dahlquist's user talk page.
  13. Create a template for yourself and use it on your user page. A template is a block of wiki text that you want to use over and over again on various pages. Instead of having to either re-type that content or even copy-and-paste it multiple times, you can simply put the content on a special Template page. You then use code to invoke the template on any other page in which you want that text to appear. There are two steps to creating a Template.
    • Create your template page like you would create any other new wiki page, but using the prefix Template: as part of the page name. For example, your template should be called [[Template:username]].
    • Click on the link and put content on this page that you will want to use over and over again. At the minimum, you should use it to create a set of navigation links that you will use in each week's journal entry. Each week as part of your journal assignment, you will be asked to create a link to your user page, the assignment page, your journal entry page, and the shared journal page, as well as add the category "BIOL368/F14" to your page. If you put these links on your template and then invoke the template on your journal page, this will automatically be taken care of for you. You may also wish to include any other links that you would find useful.
    • Once you have added and saved the content to your Template page, you need to use your template on your user page. To do so, invoke the template by using the following syntax: {{Template:username}} in the place you wish the content of the template page to appear. This will "expand" the template to its full contents on the actual page.
Electronic Lab

For all of the computer work that you do for research, you will keep an electronic laboratory notebook that records all the manipulations you perform on the data, the results you get, and the interpretations of the data. You should name this page with your username and the phrase Electronic Lab Notebook. You can keep one long page, organized by the date that you did the work. It is preferable to copy and paste protocols to this page, and then modify them with the specifics of what you did. The idea behind any lab notebook is that you or someone else can reproduce what you did using only the information contained in your notebook.

File Extensions Note

It is important to make the file extension type visible before starting work with different file types. Before starting work on the computer:

  • Control Panel → Folder Options → View → (Uncheck) Hide Extensions for known file types
Set Google Chrome to Prompt for the Location to Save Downloaded Files
  • Open the Settings window.
    • Click on the link at the bottom of the page that says "Advanced Settings".
    • Check the box that says "Ask where to save each file before downloading".
    • You could also change the default Download location to your Desktop, so that will be the first choice when it prompts you where to save the file.
    • Your settings are automatically saved.
Steps 1-3: Generating Log2 Ratios with GenePix Pro
  • The protocol for gridding and generating the intensity (log2 ratio) data with GenePix Pro 6.1 is found on this page.
  • This protocol will generate a *.gpr file for each chip which is then fed into the normalization protocol below.
Steps 4-5: Within- and Between-chip Normalization

A more detailed protocol can be found on this page.

Installing R 3.1.0 and the limma package

The following protocol was developed to normalize GCAT and Ontario DNA microarray chip data from the Dahlquist lab using the R Statistical Software and the limma package (part of the Bioconductor Project).

  • The normalization procedure has been verified to work with version 3.1.0 of R released in April 2014 (link to download site) and and version 3.20.1 of the limma package ( direct link to download zipped file) on the Windows 7 platform.
    • Note that using other versions of R or the limma package might give different results.
    • Note also that using the 32-bit versus the 64-bit versions of R 3.1.0 will give different results for the normalization out in the 10-13 or 10-14 decimal place. The Dahlquist Lab is standardizing on using the 64-bit version of R.
  • To install R for the first time, download and run the installer from the link above, accepting the default installation.
  • To use the limma package, unzip the file and place the contents into a folder called "limma" in the library directory of the R program. If you accept the default location, that will be C:\Program Files\R\R-3.1.0\library (this will be different on the computers in S120 since you do not have administrator rights).

Running the Normalization Scripts

Within Array Normalization for the Ontario Chips

  • Launch R x64 3.1.0 (make sure you are using the 64-bit version).
  • Change the directory to the folder containing the targets file and the GPR files for the Ontario chips by selecting the menu item File > Change dir... and clicking on the appropriate directory. You will need to click on the + sign to drill down to the right directory. Once you have selected it, click OK.
  • In R, select the menu item File > Source R code..., and select the Ontario_Chip_Within-Array_Normalization_modified_20150514.R script.
    • You will be prompted by an Open dialog for the Ontario targets file. Select the file Ontario_Targets_wt-dCIN5-dGLN3-dHAP4-dHMO1-dSWI4-dZAP1-Spar_20150514.csv and click Open.
    • Wait while R processes your files.

Within Array Normalization for the GCAT Chips and Between Array Normalization for All Chips

  • These instructions assume that you have just completed the Within Array Normalization for the Ontario Chips in the section above.
  • In R, select the menu item File > Source R code..., and select the Within-Array_Normalization_GCAT_and_Merged_Ontario-GCAT_Between-Chip_Normalization_modified_20150514.R script.
    • You will be prompted by an Open dialog for the GCAT targets file. Select the file GCAT_Targets.csv and click Open.
    • Wait while R processes your files.
  • When the processing has finished, you will find two files called GCAT_and_Ontario_Within_Array_Normalization.csv and GCAT_and_Ontario_Final_Normalized_Data.csv in the same folder.
    • Save these files to LionShare and/or to a flash drive.

Visualizing the Normalized Data

Create MA Plots and Box Plots for the GCAT Chips

Input the following code, line by line, into the main R window. Press the enter key after each block of code.

GCAT.GeneList<-RGG$genes$ID
lg<-log2((RGG$R-RGG$Rb)/(RGG$G-RGG$Gb))
  • If you get a message saying "NaNs produced" this is OK, proceed to the next step.
r0<-length(lg[1,])
rx<-tapply(lg[,1],as.factor(GCAT.GeneList),mean)
r1<-length(rx)
MM<-matrix(nrow=r1,ncol=r0)
for(i in 1:r0) {MM[,i]<-tapply(lg[,i],as.factor(GCAT.GeneList),mean)}
MC<-matrix(nrow=r1,ncol=r0)
for(i in 1:r0) {MC[,i]<-dw[i]*MM[,i]}
MCD<-as.data.frame(MC)
colnames(MCD)<-chips
rownames(MCD)<-gcatID
la<-(1/2*log2((RGG$R-RGG$Rb)*(RGG$G-RGG$Gb)))
  • If you get these Warning messages, it's OK:
1: In (RGG$R - RGG$Rb) * (RGG$G - RGG$Gb) :
NAs produced by integer overflow
2: NaNs produced
r2<-length(la[1,])
ri<-tapply(la[,1],as.factor(GCAT.GeneList),mean)
r3<-length(ri)
AG<-matrix(nrow=r3,ncol=r2)
for(i in 1:r2) {AG[,i]<-tapply(la[,i],as.factor(GCAT.GeneList),mean)}
par(mfrow=c(3,3))
for(i in 1:r2) {plot(AG[,i],MC[,i],main=chips[i],xlab='A',ylab='M',ylim=c(-5,5),xlim=c(0,15))}
browser()
  • Maximize the window in which the graphs have appeared. Save the graphs as a JPEG (File>Save As>JPEG>100% quality...). Once the graphs have been saved, close the window. To continue with the rest of the code, type the letter "c" and press Enter
x0<-tapply(MAG$A[,1],as.factor(MAG$genes$ID),mean)
y0<-length(MAG$A[1,])
x1<-length(x0)
AAG<-matrix(nrow=x1,ncol=y0)
for(i in 1:y0) {AAG[,i]<-tapply(MAG$A[,i],as.factor(MAG$genes$ID),mean)}
par(mfrow=c(3,3))
for(i in 1:y0) {plot(AAG[,i],MG2[,i],main=chips[i],xlab='A',ylab='M',ylim=c(-5,5),xlim=c(0,15))}
browser()
  • Maximize the window in which the graphs have appeared. Save the graphs as a JPEG (File>Save As>JPEG>100% quality...). Once the graphs have been saved, close the window. To continue with the rest of the code, type the letter "c" and press Enter.
par(mfrow=c(1,3))
boxplot(MCD,main="Before Normalization",ylab='Log Fold Change',ylim=c(-5,5),xaxt='n')
axis(1,at=xy.coords(chips)$x,tick=TRUE,labels=FALSE)
text(xy.coords(chips)$x-1,par('usr')[3]-0.6,labels=chips,srt=45,cex=0.9,xpd=TRUE)
boxplot(MG2,main='After Within Array Normalization',ylab='Log Fold Change',ylim=c(-5,5),xaxt='n')
axis(1,at=xy.coords(chips)$x,labels=FALSE)
text(xy.coords(chips)$x-1,par('usr')[3]-0.6,labels=chips,srt=45,cex=0.9,xpd=TRUE)
boxplot(MAD[,Gtop$MasterList],main='After Between Array Normalization',ylab='Log Fold Change',ylim=c(-5,5),xaxt='n')
axis(1, at=xy.coords(chips)$x,labels=FALSE)
text(xy.coords(chips)$x-1,par('usr')[3]-0.6,labels=chips,srt=45,cex=0.9,xpd=TRUE)
  • Maximize the window in which the plots have appeared. You may not want to actually maximize them because you might lose the labels on the x axis, but make them as large as you can. Save the plots as a JPEG (File>Save As>JPEG>100% quality...). Once the graphs have been saved, close the window.

Create MA Plots and Box Plots for the Ontario Chips

Input the following code, line by line, into the main R window. Press the enter key after each block of code.

Ontario.GeneList<-RGO$genes$Name
lr<-log2((RGO$R-RGO$Rb)/(RGO$G-RGO$Gb))
  • Warning message: "NaNs produced" is OK.
z0<-length(lr[1,])
v0<-tapply(lr[,1],as.factor(Ontario.GeneList),mean)
z1<-length(v0)
MT<-matrix(nrow=z1,ncol=z0)
for(i in 1:z0) {MT[,i]<-tapply(lr[,i],as.factor(Ontario.GeneList),mean)}
MI<-matrix(nrow=z1,ncol=z0)
for(i in 1:z0) {MI[,i]<-ds[i]*MT[,i]}
MID<-as.data.frame(MI)
colnames(MID)<-headers
rownames(MID)<-ontID
ln<-(1/2*log2((RGO$R-RGO$Rb)*(RGO$G-RGO$Gb)))
  • Warning messages are OK:
1: In (RGO$R - RGO$Rb) * (RGO$G - RGO$Gb) :
NAs produced by integer overflow
2: NaNs produced
z2<-length(ln[1,])
zi<-tapply(ln[,1],as.factor(Ontario.GeneList),mean)
z3<-length(zi)
AO<-matrix(nrow=z3,ncol=z2)
for(i in 1:z0) {AO[,i]<-tapply(ln[,i],as.factor(Ontario.GeneList),mean)}
strains<-c('wt','dCIN5','dGLN3','dHAP4','dHMO1','dSWI4','dZAP1','Spar')
  • After entering the call browser() below, maximize the window in which the graphs have appeared. Save the graphs as a JPEG (File>Save As>JPEG>100% quality...). Once the graphs have been saved, close the window and press Enter for the next set of graphs to appear.
for (i in 1:length(strains)) {
  st<-strains[i]
  lt<-which(Otargets$Strain %in% st)
  if (st=='wt') {
      par(mfrow=c(3,5))
  } else {
      par(mfrow=c(4,5))
  }
  for (i in lt) {
    plot(AO[,i],MI[,i],main=headers[i],xlab="A",ylab="M",ylim=c(-5,5),xlim=c(0,15))
  }
  browser()
} 
  • To continue generating plots, type the letter c and press enter.
j0<-tapply(MAO$A[,1],as.factor(MAO$genes[,5]),mean)
k0<-length(MAO$A[1,])
j1<-length(j0)
AAO<-matrix(nrow=j1,ncol=k0)
for(i in 1:k0) {AAO[,i]<-tapply(MAO$A[,i],as.factor(MAO$genes[,5]),mean)}
  • Remember, that after entering the call readline('Press Enter to continue'), maximize the window in which the graphs have appeared. Save the graphs as a JPEG (File>Save As>JPEG>100% quality...). Once the graphs have been saved, close the window and press Enter for the next set of graphs to appear.
for (i in 1:length(strains)) {
  st<-strains[i]
  lt<-which(Otargets$Strain %in% st)
  if (st=='wt') {
      par(mfrow=c(3,5))
  } else {
      par(mfrow=c(4,5))
  }
  for (i in lt) {
    plot(AAO[,i],MD2[,i],main=headers[i],xlab="A",ylab="M",ylim=c(-5,5),xlim=c(0,15))
  }
  browser()
}
  • To continue generating plots, type the letter c and press enter.
for (i in 1:length(strains)) {
  par(mfrow=c(1,3))
  st<-strains[i]
  lt<-which(Otargets$Strain %in% st)
  if (st=='wt') {
      xcoord<-xy.coords(lt)$x-1
      fsize<-0.9
  } else {
      xcoord<-xy.coords(lt)$x-1.7
      fsize<-0.8
  }
  boxplot(MID[,lt],main='Before Normalization',ylab='Log Fold Change',ylim=c(-5,5),xaxt='n')
  axis(1,at=xy.coords(lt)$x,labels=FALSE)
  text(xcoord,par('usr')[3]-0.65,labels=headers[lt],srt=45,cex=fsize,xpd=TRUE)
  boxplot(MD2[,lt],main='After Within Array Normalization',ylab='Log Fold Change',ylim=c(-5,5),xaxt='n')
  axis(1,at=xy.coords(lt)$x,labels=FALSE)
  text(xcoord,par('usr')[3]-0.65,labels=headers[lt],srt=45,cex=fsize,xpd=TRUE)
  ft<-Otargets$MasterList[which(Otargets$Strain %in% st)]
  boxplot(MAD[,ft],main='After Between Array Normalization',ylab='Log Fold Change',ylim=c(-5,5),xaxt='n')
  axis(1,at=xy.coords(lt)$x,labels=FALSE)
  text(xcoord,par('usr')[3]-0.65,labels=headers[lt],srt=45,cex=fsize,xpd=TRUE)
  browser()
} 
  • To continue generating plots, type the letter c and press enter.
  • Warnings are OK.
  • Zip the files of the plots together and upload to LionShare with file name 20150518_Microarray_Analysis_TM.zip
    • Also include the output files GCAT_and_Ontario_Final_Normalized_Data and GCAT_and_Ontario_Within_Array_Normalization
Step 6: Statistical Analysis
  • For the statistical analysis, we will begin with the file "GCAT_and_Ontario_Final_Normalized_Data.csv" that you generated in the previous step.
  • Open this file in Excel and Save As an Excel Workbook *.xlsx. It is a good idea to add your initials and the date (yyyymmdd) to the filename as well.
  • Rename the worksheet with the data "Compiled_Normalized_Data".
    • Type the header "ID" in cell A1.
    • Insert a new column after column A and name it "Standard Name". Column B will contain the common names for the genes on the microarray.
      • Copy the entire column of IDs from Column A.
      • Paste the names into the "Value" field of the ORF List <-> Gene List tool in YEASTRACT. Then, click on the "Transform" button.
      • Select all of the names in the "Gene Name" column of the resulting table.
      • Copy and paste these names into column B of the *.xlsx file. Save your work.
    • Insert a new column on the very left and name it "MasterIndex". We will create a numerical index of genes so that we can always sort them back into the same order.
      • Type a "1" in cell A2 and a "2" in cell A3.
      • Select both cells. Hover your mouse over the bottom-right corner of the selection until it makes a thin black + sign. Double-click on the + sign to fill the entire column with a series of numbers from 1 to 6189 (the number of genes on the microarray).
  • Insert a new worksheet and call it "Rounded_Normalized_Data". We are going to round the normalization results to four decimal places because of slight variations seen in different runs of the normalization script.
    • Copy the first three columns of the "Compiled_Normalized_Data" sheet and paste it into the first three columns of the "Rounded_Normalized_Data" sheet.
    • Copy the first row of the "Compiled_Normalized_Data" sheet and paste it into the first row of the "Rounded_Normalized_Data" sheet.
    • In cell D2, type the equation =ROUND(Compiled_Normalized_Data!D2,4).
    • Copy and paste this equation in the rest of the cells of row 2.
    • Select all of the cells of row 2 and hover your mouse over the bottom right corner of the selection. When the cursor changes to a thin black "plus" sign, double-click on it to paste the equation to all the rows in the worksheet. Save your work.
  • Insert a new worksheet and call it "Master_Sheet".
    • Go back to the "Rounded_Normalized_Data" sheet and Select All and Copy.
    • Click on cell A1 of the "Master_Sheet" worksheet. Select Paste special > Paste values to paste the values, but not the formulas from the previous sheet. Save your work.
    • There will be some #VALUE! errors in cells where there was missing data for genes that existed on the Ontario chips, but not the GCAT chips.
      • Select the menu item Find/Replace and Find all cells with "#VALUE!" and replace them with a single space character. Record how many replacements were made to your electronic lab notebook. Save your work.
  • This will be the starting point for our statistical analysis below.

Within-strain ANOVA

  • The purpose of the witin-stain ANOVA test is to determine if any genes had a gene expression change that was significantly different than zero at any timepoint.
  • Each student in the lab group will be assigned one strain to analyze from this point forward.
    • Anu & Natalie (wt)
    • Tessa & Trixie (dcin5)
    • McGee & Nicole (dgln3)
    • Monica & Grace (dhap4)
    • Wyllie & Dr. D (dswi4)
  1. Create a new worksheet, naming it "dCIN5_ANOVA"
  2. Copy all of the data from the "Master_Sheet" worksheet for your strain and paste it into your new worksheet.
  3. At the top of the first column to the right of your data, create five column headers of the form dCIN5_AvgLogFC_(TIME) where (TIME) is 15, 30, 60, 90, and finally 120.
  4. In the cell below the dCIN5_AvgLogFC_t15 header, type =AVERAGE(
  5. Then highlight all the data in row 2 associated with dCIN5 and t15, press the closing paren key (shift 0),and press the "enter" key.
  6. This cell now contains the average of the log fold change data from the first gene at t=15 minutes.
  7. Click on this cell and position your cursor at the bottom right corner. You should see your cursor change to a thin black plus sign (not a chubby white one). When it does, double click, and the formula will magically be copied to the entire column of 6188 other genes.
  8. Repeat steps (4) through (8) with the t30, t60, t90, and the t120 data.
  9. Now in the first empty column to the right of the dCIN5_AvgLogFC_t120 calculation, create the column header dCIN5_ss_HO.
  10. In the first cell below this header, type =SUMSQ(
  11. Highlight all the LogFC data in row 2 for your dCIN5 (but not the AvgLogFC), press the closing paren key (shift 0),and press the "enter" key.
  12. In the next empty column to the right of dCIN5_ss_HO, create the column headers dCIN5_ss_(TIME) as in (3).
  13. Make a note of how many data points you have at each time point for your strain. For dHAP4, it will be "3", but for the wild type it will be "4" or "5". Count carefully. Also, make a note of the total number of data points. For dHAP4, this number will be 15, but for wt it should be 23 (double-check).
  14. In the first cell below the header dCIN5_ss_t15, type =SUMSQ(<range of cells for logFC_t15>)-<number of data points>*<AvgLogFC_t15>^2 and hit enter.
    • The phrase <range of cells for logFC_t15> should be replaced by the data range associated with t15.
    • The phrase <number of data points> should be replaced by the number of data points for that timepoint (4).
    • The phrase <AvgLogFC_t15> should be replaced by the cell number in which you computed the AvgLogFC for t15, and the "^2" squares that value.
    • Upon completion of this single computation, use the Step (7) trick to copy the formula throughout the column.
  15. Repeat this computation for the t30 through t120 data points. Again, be sure to get the data for each time point, type the right number of data points, and get the average from the appropriate cell for each time point, and copy the formula to the whole column for each computation.
  16. In the first column to the right of dCIN5_ss_t120, create the column header dCIN5_SS_full.
  17. In the first row below this header, type =sum(<range of cells containing "ss" for each timepoint>) and hit enter.
  18. In the next two columns to the right, create the headers dCIN5_Fstat and dCIN5_p-value.
  19. Recall the number of data points from (13): call that total n.
  20. In the first cell of the dCIN5_Fstat column, type =((20-5)/5)*(<dCIN5_ss_HO>-<dCIN5_SS_full>)/<dICN5_SS_full> and hit enter.
    • Replace the phrase dCIN5_ss_HO with the cell designation.
    • Replace the phrase <dCIN5_SS_full> with the cell designation.
    • Copy to the whole column.
  21. In the first cell below the dCIN5_p-value header, type =FDIST(<dCIN5_Fstat>,5,n-5) replacing the phrase <dCIN5_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. Copy to the whole column.
  22. Before we move on to the next step, we will perform a quick sanity check to see if we did all of these computations correctly.
    • Click on cell A1 and click on the Data tab. Select the Filter icon (looks like a funnel). Little drop-down arrows should appear at the top of each column. This will enable us to filter the data according to criteria we set.
    • Click on the drop-down arrow on your dCIN5_p-value column. Select "Number Filters". In the window that appears, set a criterion that will filter your data so that the p value has to be less than 0.05.
    • Excel will now only display the rows that correspond to data meeting that filtering criterion. A number will appear in the lower left hand corner of the window giving you the number of rows that meet that criterion. We will check our results with each other to make sure that the computations were performed correctly.

Calculate the Bonferroni and p value Correction

  1. Now we will perform adjustments to the p value to correct for the multiple testing problem. Label the next two columns to the right with the same label, dCIN5_Bonferroni_p-value.
  2. Type the equation =<dCIN5_p-value>*6189, Upon completion of this single computation, use the Step (10) trick to copy the formula throughout the column.
  3. Replace any corrected p value that is greater than 1 by the number 1 by typing the following formula into the first cell below the second dCIN5_Bonferroni_p-value header: =IF(AL2>1,1,AL2). Use the Step (10) trick to copy the formula throughout the column.

Calculate the Benjamini & Hochberg p value Correction

  1. Insert a new worksheet named "dCIN5_B&H".
  2. Copy and paste the "MasterIndex" and "ID" columns from your previous worksheet into the first two columns of the new worksheet.
  3. For the following, use Paste special > Paste values. Copy your unadjusted p values from your ANOVA worksheet and paste it into Column C.
  4. Select all of columns A, B, and C. Sort by ascending values on Column C. Click the sort button from A to Z on the toolbar, in the window that appears, sort by column C, smallest to largest.
  5. Type the header "Rank" in cell D1. We will create a series of numbers in ascending order from 1 to 6189 in this column. This is the p value rank, smallest to largest. Type "1" into cell D2 and "2" into cell D3. Select both cells A2 and A3. Double-click on the plus sign on the lower right-hand corner of your selection to fill the column with a series of numbers from 1 to 6189.
  6. Now you can calculate the Benjamini and Hochberg p value correction. Type dCIN5_B-H_p-value in cell E1. Type the following formula in cell E2: =(C2*6189)/D2 and press enter. Copy that equation to the entire column.
  7. Type "dCIN5_B-H_p-value" into cell F1.
  8. Type the following formula into cell F2: =IF(E2>1,1,E2) and press enter. Copy that equation to the entire column.
  9. Select columns A through F. Now sort them by your MasterIndex in Column A in ascending order.
  10. Copy column F and use Paste special > Paste values to paste it into the next column on the right of your ANOVA sheet.
  • Upload the .xlsx file that you have just created to LionShare. Send Dr. Dahlquist an e-mail with the link to the file. File name GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx

Sanity Check: Number of genes significantly changed

  • Go to your dCIN5_ANOVA worksheet.
  • Select row 1 (the row with your column headers) and select the menu item Data > Filter > Autofilter (The funnel icon on the Data tab). Little drop-down arrows should appear at the top of each column. This will enable us to filter the data according to criteria we set.
  • Click on the drop-down arrow for the unadjusted p value. Set a criterion that will filter your data so that the p value has to be less than 0.05.
    • How many genes have p < 0.05? and what is the percentage (out of 6189)?
    • How many genes have p < 0.01? and what is the percentage (out of 6189)?
    • How many genes have p < 0.001? and what is the percentage (out of 6189)?
    • How many genes have p < 0.0001? and what is the percentage (out of 6189)?
    • How many genes are p < 0.05 for the Bonferroni-corrected p value? and what is the percentage (out of 6189)?
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)?
  • Comparing results with known data: the expression of the gene NSR1 (ID: YGR159C)is known to be induced by cold shock. Find NSR1 in your dataset. What is its unadjusted, Bonferroni-corrected, and B-H-corrected p values? What is its average Log fold change at each of the timepoints in the experiment? Note that the average Log fold change is what we called "STRAIN)_AvgLogFC_(TIME)" in step 3 of the ANOVA analysis.
  • We will compare the numbers we get between the wild type strain and the other strains studied, organized as a table. Use this sample PowerPoint slide to see how your table should be formatted.

Data & Observations

  • Notes from Presentation
  • Steps 1-3: Generating Log2 Ratios with GenePix Pro were performed previously by the research team.
  • There were 477 replacements of #VALUE! in the transformation of the data (Master_Sheet)
  • Analyzing dCIN5
  • There are four replicates for each timepoint
  • 20 data points; 4 replicates for each of the 5 time points
  • 1995 of 6189 genes had a p-value less than 0.05 for the uncorrected p-value
  • 109 of 6189 genes had a p-value less than 0.05 for the Bonferroni p-value
  • How many genes have p < 0.05? and what is the percentage (out of 6189)?
    • 1995 / 6189 32.23%
  • How many genes have p < 0.01? and what is the percentage (out of 6189)?
    • 1157 / 6189 18.69%
  • How many genes have p < 0.001? and what is the percentage (out of 6189)?
    • 566 / 6189 9.15%
  • How many genes have p < 0.0001? and what is the percentage (out of 6189)?
    • 280 / 6189 4.52%
  • How many genes are p < 0.05 for the Bonferroni-corrected p value? and what is the percentage (out of 6189)?
    • 109 / 6189 1.76%
  • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)?
    • 1117 / 6189 18.05%
  • NSR1:
    • unadjusted p-value: 7.49666059264864E-08
    • Bonferroni-corrected p-value: 0.000463968324079024
    • B-H-corrected p-value: 0.0000386640270065854
    • dCIN5_AvgLogFC_15: 4.046975
    • dCIN5_AvgLogFC_30: 3.39825
    • dCIN5_AvgLogFC_60: 4.2347
    • dCIN5_AvgLogFC_90: -2.8035
    • dCIN5_AvgLogFC_120: -0.948275
  • Name of excel file with all statistics is called GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx, which is on lionshare

Files Uploaded or Updated

Initial_Statistical_Analysis_Slide_TM.pptx statistical analysis for timepoints in general
GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx (Lionshare) contains Within-strain ANOVA, Bonferroni and p value Correction, and Benjamini & Hochberg p value Correction

Tuesday (May 19, 2015)

Overview

  • Go over questions from day one with class
  • Perform T-test and sanity check
  • Perform between-strain
  • Clustering and GO Term Enrichment with STEM
  • Begin creating input file for GenMPAPP
  • Watch documentary on research fraud (Potti)

Purpose

Determine if there is a significant change in expression at each time point.

Helpful Links from Dr. Dahlquist

Methods

Step 6: Statistical Analysis (continued)

Modified t test for each timepoint

In the analysis above we performed an ANOVA to determine if any genes had a gene expression change that was significantly different than zero at any timepoint. Now we will perform a modified t test to determine if any genes had a gene expression change that was significantly different than zero at each timepoint. You will perform your analysis on the same strain that you did above, adding these calculations to the same Excel workbook.

  • Insert a new worksheet into your Excel workbook and name it "dCIN5_ttest"
  • Go back to the "Master_Sheet" worksheet for your strain, Select All and Copy. Go to your new "dCIN5_ttest" worksheet, click on the upper, left-hand cell (cell A1) and Select "Paste Special" from the Edit menu. A window will open: click on the radio button for "Values" and click OK. This will paste the numerical result into your new worksheet instead of the equation which must make calculations on the fly.
    • There may be some non-numerical values in some of the cells in your worksheet. This is due to errors created when Excel tries to compute an equation on a cell that has no data. We need to go through and remove these error messages before going on to the next step. (This may have been taken care of in a previous step.)
    • Scan through your spreadsheet to find an example of the error message. Then go to the Edit menu and Select Replace. A window will open, type the text you are replacing in the "Find what:" field. In the "Replace with:" field, enter a single space character. Click on the button "Replace All" and record the number of replacements in your lab notebook.
  • Go to the empty columns to the right on your worksheet. Create new column headings in the top cells to label the average log fold changes that you will compute. Name them with the pattern dCIN5_AvgLogFC_tx where x is the time.
  • Compute the average log fold change for the replicates for each timepoint by typing the equation:
=AVERAGE(range of cells in the row for that timepoint)

into the second cell below the column heading. Copy this equation and paste it into the rest of the column.

  • Create the equation for the rest of the timepoints and paste it into their respective columns. Note that you can save yourself some time by completing the first equation for all of the averages and then copy and paste all the columns at once.
  • Go to the empty columns to the right on your worksheet. Create new column headings in the top cells to label the T statistic that you will compute. Name them with the pattern dCIN5_Tstat_tx where x is the time.
  • You will now compute a T statistic that tells you whether the normalized average log fold change is significantly different than 0 (no change in expression). Enter the equation into the second cell below the column heading:
=AVERAGE(range of cells)/(STDEV(range of cells)/SQRT(number of replicates))

Copy the equation and paste it into all rows in that column. Create the equation for the rest of the timepoints and paste it into their respective columns. Note that you can save yourself some time by completing the first equation for all of the T statistics and then copy and paste all the columns at once.

  • Go to the empty columns to the right on your worksheet. Create new column headings in the top cells to label the P value that you will compute. Name them with the pattern dCIN5_Pval_tx where x is the time. In the cell below the label, enter the equation:
=TDIST(ABS(cell containing T statistic),degrees of freedom,2)

The number of degrees of freedom is the number of replicates minus one. The 2 indicates that we are doing a two tailed t-test. Copy the equation and paste it into all rows in that column.

  • As with the ANOVA, we encounter the multiple testing problem here as well.

Bonferroni Correction

  1. Now we will perform adjustments to the p value to correct for the multiple testing problem. Label the columns to the right with the label, dCIN5_Bonferroni-Pval_tx (do this twice in a row).
  2. Type the equation =<dCIN5_Pval_tx>*6189, Upon completion of this single computation, use the trick to copy the formula throughout the column.
  3. Replace any corrected p value that is greater than 1 by the number 1 by typing the following formula into the first cell below the second dCIN5_Bonferroni-Pval_tx header: =IF(r2>1,1,r2). Use the trick to copy the formula throughout the column.

Benjamini & Hochberg Correction

  1. Insert a new worksheet named "dCIN5_ttest_B-H". You will need to perform the procedure below for the p values for each timepoint. Do them individually one at a time to avoid confusion.
  2. Copy and paste the "MasterIndex", "ID", and "Standard Name" columns from your previous worksheet into the first two columns of the new worksheet.
  3. For the following, use Paste special > Paste values. Copy your unadjusted p values from the first timepoint from your ttest worksheet and paste it into Column D.
  4. Select all of columns A, B, C, and D. Sort by ascending values on Column D. Click the sort button from A to Z on the toolbar, in the window that appears, sort by column C, smallest to largest.
  5. Type the header "Rank" in cell E1. We will create a series of numbers in ascending order from 1 to 6189 in this column. This is the p value rank, smallest to largest. Type "1" into cell E2 and "2" into cell E3. Select both cells E2 and E3. Double-click on the plus sign on the lower right-hand corner of your selection to fill the column with a series of numbers from 1 to 6189.
  6. Now you can calculate the Benjamini and Hochberg p value correction. Type dCIN5_B-H_Pval_tx in cell F1. Type the following formula in cell F2: =(D2*6189)/E2 and press enter. Copy that equation to the entire column.
  7. Type "dCIN5_B-H_Pval_tx" into cell G1.
  8. Type the following formula into cell G2: =IF(F2>1,1,F2) and press enter. Copy that equation to the entire column.
  9. Select columns A through G. Now sort them by your MasterIndex in Column A in ascending order.
  10. Copy column G and use Paste special > Paste values to paste it into the next column on the right of your ttest sheet.


Sanity Check

  • We will also perform the "sanity check" as follows:
    • Determine how many genes have a p value < 0.05 at each timepoint.
    • Keeping the "Pval" filter at p < 0.05, How many have an average log fold change of > 0.25 and p < 0.05 at each timepoint? How many have an average log fold change of < -0.25 and p < 0.05 at each timepoint? (These log fold change cut-offs represent about a 20% fold change in expression.)
    • How many genes have B&H corrected p < 0.05?
    • How many genes have a Bonferroni corrected p < 0.05?
    • Update powerpoint named Initial_Statstical_Analysis_Slide_TM

Between-strain ANOVA The detailed description of how this is done can be found on this page. A brief version of the protocol appears below.

  • All two strain comparisons were performed in MATLAB using the script Two_strain_compare_corrected_20140813_3pm.zip (within a zip file):
    • Download the zipped script file, extract it to the folder that contains your Excel file with the worksheet named "Master_Sheet". (The script and Excel file must be in the same folder to work.)
      • There may be issues with the Excel file being to large. Copy the Master_Sheet from GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx and copy it into a new Excel file called Two_Strain_ANOVA_TM_20150519 and delete the column titled "Master List"
    • Launch MATLAB version 2014b.
    • In MATLAB, you will need to navigate to the folder containing the script and the Excel file.
      • Near the top of the page, you will see a a field that contains the path to the working directory. Just to the left of it, there is an icon that looks like a folder opening with a green down arrow. Click on this icon to open a dialog box where you can choose your folder containing the script and Excel file.
      • Once you have selected your folder, the left-hand pane should display the contents of that folder. To open the MATLAB script, you can double-click on it from that pane. The code for the script will appear in the center pane.
  • You will need to make a few edits to the code, depending on which strain comparison you want to make.
    • For the first block of code, the user must input the name of the Excel file (*.xls) to be imported as the variable "filename", the sheet from which the data will be imported as the variable "sheetname", and the two strains that will be compared as the variables "strain1" and "strain2".
      • Also note that this script will not work for any comparison involving dSWI4 because it has been hard-coded to expect 5 timepoints instead of 4.
%% User must input filename, sheetname, and strains for comparison
filename = 'GCAT_and_Ontario_Final_Normalized_Data.xls'; % Name of input file
sheetname  = 'Master_Sheet'; % Name of sheet in input file containing data to analyze
% % If one of the two strains you are working on is the wildtype, keep that
% % wildtype as strain 1.
strain1    = 'wt'; %Here should be wt, dCIN5, dGLN3, dHAP4, dHMO1, dZAP1, or Spar
% % Select strain 2 to be one of the other strains you would like to
% % compare with the first strain.
strain2    = 'dCIN5'; %Here should be wt, dCIN5, dGLN3, dHAP4, dHMO1, dZAP1, or Spar
  • The user does not have to modify any of the code from here on.
  • The next two lines of code ask the user whether or not they would like to see plots for each gene with an unadjusted p-value < 0.05. If the user does want to see these plots, they enter "1". If they would not like to see these plots, the user enters "0". When prompted, enter a "1" to see the plots displayed.
disp('Do you want to view plots for each gene with an unadjusted p-value < 0.05?')
graph = input('If yes, enter "1". If no, enter "0". ');
  • Press 1 to view plots
  • In the output sheet, wt_dCIN5_ANOVA_out_data.xls', list the number of p-values that are less than 0.05 and the B-H p < 0.05
Step 7-8: Clustering and GO Term Enrichment with stem
  1. Prepare your microarray data file for loading into STEM.
    • Insert a new worksheet into your Excel workbook, and name it "dCIN5_stem".
    • Select all of the data from your "dCIN5_ANOVA" worksheet and Paste special > paste values into your "dCIN5_stem" worksheet.
      • Your leftmost column should have the column header "MasterIndex". Rename this column to "SPOT". Column B should be named "ID". Rename this column to "Gene Symbol". Delete the column named "StandardName".
      • Filter the data on the B-H corrected p value to be > 0.05 (that's greater than or equal to in this case).
        • Once the data has been filtered, select all of the rows (except for your header row) and delete the rows by right-clicking and choosing "Delete Row" from the context menu. Undo the filter. This ensures that we will cluster only the genes with a "significant" change in expression and not the noise.
      • Delete all of the data columns EXCEPT for the Average Log Fold change columns for each timepoint (for example, wt_AvgLogFC_t15, etc.).
      • Rename the data columns with just the time and units (for example, 15m, 30m, etc.).
      • Save your work. Then use Save As to save this spreadsheet as Text (Tab-delimited) (*.txt). Click OK to the warnings and close your file.
        • Note that you should turn on the file extensions if you have not already done so.
  2. Now download and extract the STEM software. Click here to go to the STEM web site.
    • Click on the download link, register, and download the stem.zip file to your Desktop.
    • Unzip the file. In Seaver 120, you can right click on the file icon and select the menu item 7-zip > Extract Here.
    • This will create a folder called stem. Inside the folder, double-click on the stem.cmd or the stem.jar to launch the STEM program.
  3. Running STEM
    1. In section 1 (Expression Data Info) of the the main STEM interface window, click on the Browse... button to navigate to and select your file.
      • Click on the radio button No normalization/add 0.
      • Check the box next to Spot IDs included in the data file.
    2. In section 2 (Gene Info) of the main STEM interface window, select Saccharomyces cerevisiae (SGD), from the drop-down menu for Gene Annotation Source. Select No cross references, from the Cross Reference Source drop-down menu. Select No Gene Locations from the Gene Location Source drop-down menu.
    3. In section 3 (Options) of the main STEM interface window, make sure that the Clustering Method says "STEM Clustering Method" and do not change the defaults for Maximum Number of Model Profiles or Maximum Unit Change in Model Profiles between Time Points.
    4. In section 4 (Execute) click on the yellow Execute button to run STEM.
  4. Viewing and Saving STEM Results
    1. A new window will open called "All STEM Profiles (1)". Each box corresponds to a model expression profile. Colored profiles have a statistically significant number of genes assigned; they are arranged in order from most to least significant p value. Profiles with the same color belong to the same cluster of profiles. The number in each box is simply an ID number for the profile.
      • Click on the button that says "Interface Options...". At the bottom of the Interface Options window that appears below where it says "X-axis scale should be:", click on the radio button that says "Based on real time". Then close the Interface Options window.
      • Take a screenshot of this window (on a PC, simultaneously press the Alt and PrintScreen buttons to save the view in the active window to the clipboard) and paste it into a PowerPoint presentation to save your figures.
    2. Click on each of the SIGNIFICANT profiles (the colored ones) to open a window showing a more detailed plot containing all of the genes in that profile.
      • Take a screenshot of each of the individual profile windows and save the images in your PowerPoint presentation.
      • At the bottom of each profile window, there are two yellow buttons "Profile Gene Table" and "Profile GO Table". For each of the profiles, click on the "Profile Gene Table" button to see the list of genes belonging to the profile. In the window that appears, click on the "Save Table" button and save the file to your desktop. Make your filename descriptive of the contents, e.g. "wt_profile#_genelist.txt", where you replace the number symbol with the actual profile number.
        • Upload these files to LionShare and e-mail a link to Dr. Dahlquist called STEM_Results_TM_20150519.zip (It will be easier to zip all the files together and upload them as one file).
      • For each of the significant profiles, click on the "Profile GO Table" to see the list of Gene Ontology terms belonging to the profile. In the window that appears, click on the "Save Table" button and save the file to your desktop. Make your filename descriptive of the contents, e.g. "wt_profile#_GOlist.txt", where you use "wt", "dGLN3", etc. to indicate the dataset and where you replace the number symbol with the actual profile number. At this point you have saved all of the primary data from the STEM software and it's time to interpret the results!
  5. Analyzing and Interpreting STEM Results
    1. Select one of the profiles you saved in the previous step for further intepretation of the data. I suggest that you choose one that has a pattern of up- or down-regulated genes at the early (first three) timepoints. You and your partner will choose the same profile so that you can compare your results between the two strains. Answer the following:
      • Why did you select this profile? In other words, why was it interesting to you?
      • How many genes belong to this profile?
      • How many genes were expected to belong to this profile?
      • What is the p value for the enrichment of genes in this profile? Bear in mind that we just finished computing p values to determine whether each individual gene had a significant change in gene expression at each time point. This p value determines whether the number of genes that show this particular expression profile across the time points is significantly more than expected.
      • Open the GO list file you saved for this profile in Excel. This list shows all of the Gene Ontology terms that are associated with genes that fit this profile. Select the third row and then choose from the menu Data > Filter > Autofilter. Filter on the "p-value" column to show only GO terms that have a p value of < 0.05. How many GO terms are associated with this profile at p < 0.05? The GO list also has a column called "Corrected p-value". This correction is needed because the software has performed thousands of significance tests. Filter on the "Corrected p-value" column to show only GO terms that have a corrected p value of < 0.05. How many GO terms are associated with this profile with a corrected p value < 0.05?
      • Select 10 Gene Ontology terms from your filtered list (either p < 0.05 or corrected p < 0.05).
        • Since you and your partner are going to compare the results from each strain for the same cluster, you can either:
          • Choose the same 10 terms that are in common between strains.
          • Choose 10 terms that are different between the strains (5 or so from each).
          • Choose some that are the same and some that are different.
        • Look up the definitions for each of the terms at http://geneontology.org. For your final lab report, you will discuss the biological interpretation of these GO terms. In other words, why does the cell react to cold shock by changing the expression of genes associated with these GO terms? Also, what does this have to do with HAP4 being deleted?
        • To easily look up the definitions, go to http://geneontology.org.
        • Copy and paste the GO ID (e.g. GO:0044848) into the search field at the upper left of the page called "Search GO Data".
        • In the results page, click on the button that says "Link to detailed information about <term>, in this case "biological phase"".
        • The definition will be on the next results page, e.g. here.
Step 9: GenMAPP & MAPPFinder

Preparing the Input File for GenMAPP

  • Insert a new worksheet and name it dCIN5_GenMAPP.
  • Go back to the "ANOVA" worksheet for your strain and Select All and Copy.
  • Go to your new sheet and click on cell A1 and select Paste Special, click on the Values radio button, and click OK.
    • Delete the columns containing the "ss" calculations, tstats and Fstats, just retaining the individual log fold change data, the average log fold change data, and p value. For the Bonferroni and B&H p values, just keep one column where we replaced all values > 1 with 1 and add the work ANOVA
  • Now go to your "dCIN5_ttest" worksheet. Copy just the columns containing the P values for the individual timepoints and Paste special > Paste values into your GenMAPP worksheet to the right of the previous data. For the Bonferroni and B&H p values, just keep one column where we replaced all values > 1 with 1.
  • Reorganize sheet: replicate time points; ANOVA p-value, Bonferroni p-value, then B-H p-value; then for each time point AvgLogFC, p-value, Bonferroni, B-H (put all of these columns for each time point - can be made easier by color coding)
  • Select all of the columns containing Fold Changes. Right click and select Format Cells. Under the number tab, select 2 decimal places. Click OK.
  • Select all of the columns containing P values. Select the menu item Format Cells. Under the number tab, select 4 decimal places. Click OK.
  • We will now format this file for use with GenMAPP.
    • Currently, the "MasterIndex" column is the first column in the worksheet. We need the "ID" column to be the first column. Select Column B and Cut. Right-click on Cell A1 and select "Insert cut cells". This will reverse the position of the columns.
    • Insert a new empty column in Column B. Type "SystemCode" in the first cell and "D" in the second cell of this column. Use our trick to fill this entire column with "D".
    • Make sure to save this work as your .xlsx file. Now save this worksheet as a tab-delimited text file for use with GenMAPP in the next section.


Data & Observations

  • Uncorrected p-value (p < 0.05 and average log fold change of > 0.25 for each time point)
    • t15: 705 / 6189
    • t30: 391 / 6189
    • t60: 662 / 6189
    • t90: 295 / 6189
    • t120: 189 / 6189
  • Uncorrected p-value (p < 0.05 and average log fold change of < -0.25 for each time point)
    • t15: 683 / 6189
    • t30: 358 / 6189
    • t60: 584 / 6189
    • t90: 335 / 6189
    • t120: 160 / 6189
  • Uncorrected p-value (p < 0.05 for each time point)
    • t15: 1393 / 6189
    • t30: 756 / 6189
    • t60: 1250 / 6189
    • t90: 634 / 6189
    • t120: 351 / 6189
  • B&H (p < 0.05 for each time point)
    • t15: 0 / 6189
    • t30: 0 / 6189
    • t60: 1 / 6189
    • t90: 0 / 6189
    • t120: 0 / 6189
  • Bonferroni (p < 0.05 for each time point)
    • t15: 0 / 6189
    • t30: 0 / 6189
    • t60: 0 / 6189
    • t90: 0 / 6189
    • t120: 0 / 6189
  • T-test information was added to the powerpoint
  • Matlab software was being updated so the Between-strain ANOVA could not be performed
  • Gene Oncology website was down so Step 7-8: Clustering and GO Term Enrichment with stem could not be performed so go to Step 9: GenMAPP & MAPPFinder
  • Matlab problem was fixed so after finishing Preparing the Input File for GenMAPP (Part of Step 9) save the excel file and then go back to Between-strain ANOVA (Part of Step 6)
  • Gene Oncology began working again so go back to Step 7-8: Clustering and GO Term Enrichment with stem before running Matlab
    • Deciding which profile to study is the bulk of the discussion. Move onto the Between-strain ANOVA (Part of Step 6) to crunch more numbers before selecting a profile
  • Between-strain ANOVA output for wt vs. dCIN5
    • p-value < 0.05 563 / 6189
    • B-H p-value < 0.05 4 / 6189

Files Uploaded or Updated

STEM_Results_TM_20150519.zip (Lionshare) contains the results of the STEM analysis including a powerpoint with the images of the significant profiles, as well as, the GO Table and Gene List for each significant profile Updated:
Initial_Statistical_Analysis_Slide_TM.pptx all of the statistical analysis
GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx (Lionshare) where the modified t test, Bonferroni Correction, Benjamini & Hochberg Correction for each timepoint were added as well as sheets for the Between-strain ANOVA and the microarray data file for loading into STEM

  • Two_Strain_ANOVA_TM_20150519 new Excel file for the Between-strain ANOVA to prevent Excel from crashing which was added to a folder called Between_Strain_ANOVA_TM_20150519.zip, containing the Matlab script two_strain_compare_corrected_20140813_3pm.m and the output files wt_dCIN5_ANOVA_out_data.xls and wt_dCIN5_out_data.mat

Wednesday (May 20, 2015)

Overview

  • Finish creating the input and running GenMAPP & MAPPFinder
  • Investigate potential stains to study
  • Joint group meeting (12:00-2:00)

Purpose

Run GenMAPP & MAPPFinder in order to investigate potential strains that may have a significant role in cold shock response

Helpful Links from Dr. Dahlquist

Methods

Step 9: GenMAPP & MAPPFinder (continued)

Preparing the Input File for GenMAPP (continued)

  • Copy sheet "dCIN5_GenMAPP" from GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx and copy into a new workbook titled dCIN5_GenMAPP_20150520_TM.xlsx
  • From the Matlab output sheet from the Between Strain ANOVA, wt_dCIN5_ANOVA_out_data.xls copy the columns containing the p-value (column S) and the B-H p-value (column V) and paste into the dCIN5_GenMAPP_20150520_TM.xlsx
  • In dCIN5_GenMAPP_20150520_TM.xlsx the order of the columns should be:
    • ID
    • System Code "D"
    • Master Index
    • Standard Name
    • Individual logFC data
    • Within strain ANOVA p-value, Bonferroni p-value, B-H p-value
    • For all tx: AvgLogFCtx, Pvaltx, Bonferronitx, B-Htx (where x is the time i.e. 15, 30, 60, 90, 120)
    • wt_v_dCIN5_Pval (from wt_dCIN5_ANOVA_out_data.xls)
    • wt_v_dCIN5_B-H-Pval (from wt_dCIN5_ANOVA_out_data.xls)
  • Format the cell number so any of the p-values (uncorrected, Bonferroni, or B-H) have 4 places after the decimal and the LogFold (including average) have 2
  • Save as Excel and Text (Tab delimited) (*.txt) file

Running GenMAPP'

Each time you launch GenMAPP, you need to make sure that the correct Gene Database (.gdb) is loaded.

  • Look in the lower left-hand corner of the window to see which Gene Database has been selected.
  • If you need to change the Gene Database, select Data > Choose Gene Database. Navigate to the directory C:\GenMAPP 2 Data\Gene Databases and choose the correct one for your species.
  • For the exercise today, if the yeast Gene Database is not present on your computer, you will need to download it. Click this link to download the yeast Gene Database.
  • Unzip the file and save it, Sc-Std_20060526.gdb, to the folder C:\GenMAPP 2 Data\Gene Databases.

GenMAPP Expression Dataset Manager Procedure

  • Launch the GenMAPP Program. Check to make sure the correct Gene Database is loaded.
  • Select the Data menu from the main Drafting Board window and choose Expression Dataset Manager from the drop-down list. The Expression Dataset Manager window will open.
  • Select New Dataset from the Expression Datasets menu. Select the tab-delimited text file that you formatted for GenMAPP (.txt) in the procedure above from the file dialog box that appears.
  • The Data Type Specification window will appear. GenMAPP is expecting that you are providing numerical data. If any of your columns has text (character) data, check the box next to the field (column) name.
    • The column StandardName has text data in it, but none of the rest do.
  • Allow the Expression Dataset Manager to convert your data.
    • This may take a few minutes depending on the size of the dataset and the computer’s memory and processor speed. When the process is complete, the converted dataset will be active in the Expression Dataset Manager window and the file will be saved in the same folder the raw data file was in, named the same except with a .gex extension; for example, MyExperiment.gex.
    • A message may appear saying that the Expression Dataset Manager could not convert one or more lines of data. Lines that generate an error during the conversion of a raw data file are not added to the Expression Dataset. Instead, an exception file is created. The exception file is given the same name as your raw data file with .EX before the extension (e.g., MyExperiment.EX.txt). The exception file will contain all of your raw data, with the addition of a column named ~Error~. This column contains either error messages or, if the program finds no errors, a single space character.
      • Record the number of errors in your lab notebook.
  • Customize the new Expression Dataset by creating new Color Sets which contain the instructions to GenMAPP for displaying data on MAPPs.
    • Color Sets contain the instructions to GenMAPP for displaying data from an Expression Dataset on MAPPs. Create a Color Set by filling in the following different fields in the Color Set area of the Expression Dataset Manager: a name for the Color Set, the gene value, and the criteria that determine how a gene object is colored on the MAPP. Enter a name in the Color Set Name field that is 20 characters or fewer. You will have one Color Set per strain per time point.
    • The Gene Value is the data displayed next to the gene box on a MAPP. Select the column of data to be used as the Gene Value from the drop down list or select [none]. We will use "Avg_LogFC_" for the the appropriate time point.
    • Activate the Criteria Builder by clicking the New button.
    • Enter a name for the criterion in the Label in Legend field.
    • Choose a color for the criterion by left-clicking on the Color box. Choose a color from the Color window that appears and click OK.
    • State the criterion for color-coding a gene in the Criterion field.
      • A criterion is stated with relationships such as "this column greater than this value" or "that column less than or equal to that value". Individual relationships can be combined using as many ANDs and ORs as needed. A typical relationship is
      • The Ops (operators) list contains the relational operators that may be used in the criteria: equals ( = ) greater than ( > ), less than ( < ), greater than or equal to

( >= ), less than or equal to ( <= ), is not equal to ( <> ). To choose an operator from the list, click on the symbol. It will appear at the location of the insertion bar (cursor) in the Criterion box. The Criteria Builder automatically surrounds the operators with spaces.

  • After completing a new criterion, add the criterion entry (label, criterion, and color) to the Criteria List by clicking the Add button.
    • For the yeast dataset, you will create two criterion for each Color Set. "Increased" will be [<strain>_Avg_LogFC_<timepoint>] > 0.25 AND [<strain>Pval_<timepoint>] < 0.05 and "Decreased will be [<strain>_Avg_LogFC_<timepoint>] < -0.25 AND [<strain>Pval_<timepoint>] < 0.05. Make sure that the increased and decreased average log fold change values match the timepoint of the Color Set.
    • You may continue to add criteria to the Color Set by using the previous steps.
  • Save after completing the criterion for each timeset by selecting Save from the Expression Dataset menu
  • You will also create two ColorSets to view the ANOVA p values for both strains, with criteria for viewing the unadjusted, Bonferroni-corrected, and B&H corrected p values. Organize from more stringent to least stringent (Bonferroni, B&H, then unadjusted).
  • Create a ColorSet for wt vs. dCIN5 (B&H and unadjusted)
  • Exit the Expression Dataset Manager to view the Color Sets on a MAPP. Choose Exit from the Expression Dataset menu or click the close box in the upper right hand corner of the window.
  • Upload your .gex file to Lionshare and share it with Dr. Dahlquist. E-mail the link to the file to Dr. Dahlquist.
  • Dr. Dahlquist will provide a set of MAPPs with which to view your Expression Dataset.
    • Links to a zipped archive of MAPPs and an Expression Dataset have been e-mailed to your lion e-mail accounts.
  • Click here to download a zipped set of MAPPs with which to view your Expression Dataset.
Step 10: YEASTRACT

Using YEASTRACT to Infer which Transcription Factors Regulate a Cluster of Genes

In the previous analysis using STEM, we found a number of gene expression profiles (aka clusters) which grouped genes based on similarity of gene expression changes over time. The implication is that these genes share the same expression pattern because they are regulated by the same (or the same set) of transcription factors. We will explore this using the YEASTRACT database.

  1. Open the gene list in Excel for the one of the significant profiles from your stem analysis. Choose a cluster with a clear cold shock/recovery up/down or down/up pattern. You should also choose one of the largest clusters.
    • Copy the list of gene IDs onto your clipboard.
  2. Launch a web browser and go to the YEASTRACT database.
    • On the left panel of the window, click on the link to Rank by TF.
    • Paste your list of genes from your cluster into the box labeled ORFs/Genes.
    • Check the box for Check for all TFs.
    • Accept the defaults for the Regulations Filter (Documented, DNA binding plus expression evidence)
    • Do not apply a filter for "Filter Documented Regulations by environmental condition".
    • Rank genes by TF using: The % of genes in the list and in YEASTRACT regulated by each TF.
    • Click the Search button.
  3. Answer the following questions:
    • In the results window that appears, the p values colored green are considered "significant", the ones colored yellow are considered "borderline significant" and the ones colored pink are considered "not significant". How many transcription factors are green or "significant"?
    • List the "significant" transcription factors on your wiki page, along with the corresponding "% in user set", "% in YEASTRACT", and "p value".
      • Are CIN5, GLN3, HAP4, HMO1, SWI4, and ZAP1 on the list?
  4. For the mathematical model that we will build, we need to define a gene regulatory network of transcription factors that regulate other transcription factors. We can use YEASTRACT to assist us with creating the network. We want to generate a network with approximately 15-30 transcription factors in it.
    • You need to select from this list of "significant" transcription factors, which ones you will use to run the model. You will use these transcription factors and add CIN5, GLN3, HAP4, HMO1, SWI4, and ZAP1 if they are not in your list. Explain in your electronic notebook how you decided on which transcription factors to include. Record the list and your justification in your electronic lab notebook.
    • Go back to the YEASTRACT database and follow the link to Generate Regulation Matrix.
    • Copy and paste the list of transcription factors you identified (plus CIN5, HAP4, GLN3, HMO1, SWI4, and ZAP1) into both the "Transcription factors" field and the "Target ORF/Genes" field.
    • We are going to generate several regulation matrices, with different "Regulations Filter" options.
      • For the first one, accept the defaults: "Documented", "DNA binding plus expression evidence"
      • Click the "Generate" button.
      • In the results window that appears, click on the link to the "Regulation matrix (Semicolon Separated Values (CSV) file)" that appears and save it to your Desktop. Rename this file with a meaningful name so that you can distinguish it from the other files you will generate.
      • Repeat these steps to generate a second regulation matrix, this time applying the Regulations Filter "Documented", "Only DNA binding evidence".
      • Repeat these steps a third time to generate a third regulation matrix, this time applying the Regulations Filter "Documented", DNA binding and expression evidence".

Visualizing Your Gene Regulatory Networks with GRNsight

We will analyze the regulatory matrix files you generated above in Microsoft Excel and visualize them using GRNsight to determine which one will be appropriate to pursue further in the modeling.

  1. First we need to properly format the output files from YEASTRACT. You will repeat these steps for each of the three files you generated above.
    • Open the file in Excel. It will not open properly in Excel because a semicolon was used as the column delimiter instead of a comma. To fix this, Select the entire Column A. Then go to the "Data" tab and select "Text to columns". In the Wizard that appears, select "Delimited" and click "Next". In the next window, select "Semicolon", and click "Next". In the next window, leave the data format at "General", and click "Finish". This should now look like a table with the names of the transcription factors across the top and down the first column and all of the zeros and ones distributed throughout the rows and columns. This is called an "adjacency matrix." If there is a "1" in the cell, that means there is a connection between the trancription factor in that row with that column.
    • Save this file in Microsoft Excel workbook format (.xlsx).
    • Check to see that all of the transcription factors in the matrix are connected to at least one of the other transcription factors by making sure that there is at least one "1" in a row or column for that transcription factor. If a factor is not connected to any other factor, delete its row and column from the matrix. Make sure that you still have somewhere between 15 and 30 transcription factors in your network after this pruning.
      • Only delete the transcription factor if there are all zeros in its column AND all zeros in its row. You may find visualizing the matrix in GRNsight (below) can help you find these easily.
    • For this adjacency matrix to be usable in GRNmap (the modeling software) and GRNsight (the visualization software), we need to transpose the matrix. Insert a new worksheet into your Excel file and name it "network". Go back to the previous sheet and select the entire matrix and copy it. Go to you new worksheet and click on the A1 cell in the upper left. Select "Paste special" from the "Home" tab. In the window that appears, check the box for "Transpose". This will paste your data with the columns transposed to rows and vice versa. This is necessary because we want the transcription factors that are the "regulatORS" across the top and the "regulatEES" along the side.
    • The labels for the genes in the columns and rows need to match. Thus, delete the "p" from each of the gene names in the columns. Adjust the case of the labels to make them all upper case.
    • In cell A1, copy and paste the text "rows genes affected/cols genes controlling".
  2. Now we will visualize what these gene regulatory networks look like with the GRNsight software.
    • Go to the GRNsight home page (you can either use the version on the home page or the beta version.
    • Select the menu item File > Open and select one of the regulation matrix .xlsx file that has the "network" worksheet in it that you formatted above. If the file has been formatted properly, GRNsight should automatically create a graph of your network. Move the nodes (genes) around until you get a layout that you like and take a screenshot of the results. Paste it into your PowerPoint presentation. Repeat with the other two regulation matrix files. You will want to arrange the genes in the same order for each screenshot so that the graphs can be easily compared.

Data & Observations

  • When GenMapp was run there were 97 errors detected. This is due to the fact that the database used for S. cerevisiae was last updated in 2006. (Some genes are missing)
  • Upload .txt file and .gex (a Microsoft access file) to Lionshare)
  • Potential new strains to investigate (dCIN5 and wt)
    • Δino2: unadjusted p-value for within strain ANOVA; decreased expression at t90 SCORE:1,0
    • Δopi1: nothing significant to report SCORE:0,0
    • Δyap1: unadjusted p-value for two strain ANOVA SCORE:0,2
    • Δarg80: nothing significant to report SCORE:0,0
    • Δrsf2: nothing significant to report SCORE:0,0
    • Δrtg3: unadjusted p-value for two strain ANOVA; decreased expression at t15 SCORE:2
    • Δtbf1: nothing significant to report SCORE:0,0
    • Δyhp1: nothing significant to report SCORE:0,0
    • Δyox1: unadjusted p-value for within strain ANOVA; decreased expression at t15, increased expression at t90 SCORE:1,0
    • Δphd1: nothing significant to report SCORE:0,0
    • Δnrg1: unadjusted p-value for two strain ANOVA; B&H p-value for within strain ANOVA; decreased expression at t30, increased expression at t90 SCORE:1,2
  • General notes and observations
    • Within strain ANOVA had five transcriptional regulators that were significant using the Bonferroni p-value
      • EDS1, ESF2, MIG3, REI1, URC2
    • Two Strain ANOVA only showed genes that had significant (p <0.05) unadjusted p-values, no significant B&H; there were 32 genes highlighted
  • Compiled list of all scores Strain Voting
  • Looking at profiles using Yeastract
    • Profile 0: none
    • Profile 2: none
    • Profile 7: none
    • Profile 9: 2 (not enough to generate a worthwile regulation matrix)
    • Profile 38: 1 (not enough to generate a worthwile regulation matrix)
    • Profile 45:
    • Profile 22:

Files Uploaded or Updated

  • Updated Initial_Statistical_Analysis_Slide_TM.pptx to include STEM results and brief titles for each slide
  • Created a GenMAPP input sheet, dCIN5_GenMAPP_20150520_TM.xlsx from GCAT_and_Ontario_Final_Normalized_Data_20150518_TM.xlsx and wt_dCIN5_ANOVA_out_data.xls
  • Uploaded GenMapp data to Lionshare: dCIN5_GenMAPP_20150520_TM.xlsx, dCIN5_GenMAPP_20150520_TM.txt, dCIN5_GenMAPP_20150520_TM.EX.txt, dCIN5_GenMAPP_20150520_TM.ldb and dCIN5_GenMAPP_20150520_TM.gex in folder titled GenMAPP

Tuesday (May 26, 2015)

Overview

  • Finish visualizing gene regulatory networks with GRNsight and use to chose a network to study
  • Create an input sheet to use when running the model in Matlab
  • Test the 16 different options of the input sheet on a differnece page: GRNmap Test Inputs

Purpose

Helpful Links from Dr. Dahlquist

Methods

Step 11: GRNmap

Create the Input Excel Workbook for the Model

  1. Your file will be similar to the file "21-genes_50-edges_Dahlquist-data_Sigmoid_estimation.xls", but with your expression data and network. You should download this file, change the name, and edit it to include your data. Make sure to give it a meaningful filename that includes your last name or initials. Click this link to download the sample file from the GRNmap GitHub repository.)
  2. The first thing you need to do is determine the transcription factors that you are including in your network. You are going to use the "transposed" Regulation Matrix that you generated from YEASTRACT in the previous section.
    • Copy the transposed matrix from your "network" sheet and paste it into the worksheets called "network" and "network_weights".
    • Note that the transcription factor names have to be in the same order and same format across the top row and first column. CIN5 does not match Cin5p, so the latter will need to be changed to CIN5 if you have not already done so.
    • It may be easier for you if you put the transcription factors in alphabetical order (using the sort feature in Excel), but whether you leave your list the same as it is from the YEASTRACT assignment or in alphabetical order, make sure it is the same order for all of the worksheets.
  3. The next worksheet to edit is the one called "degradation_rates".
    • Paste your list of transcription factors from your "network" sheet into the column named "StandardName". You will need to look up the "SystematicName" of your genes. YEASTRACT has a feature that will allow you to paste your list of standard names in to retrieve the systematic names here.
    • Next, you will need to look up the degradation rates for your list of transcription factors. These rates have been calculated from protein half-life data from a paper by Belle et al. (2006). Look up the rates for your transcription factors from this file and include them in your "degradation_rates" worksheet.
    • If a transcription factor does not appear in the file above, use the value "0.027182242" for the degradation rate.
  4. The next worksheet to edit is the one called "production_rates".
    • Paste the "SystematicName" and "StandardName" columns from your "degradation_rates" sheet into the "production_rates" sheet.
    • The initial guesses for the production rates we are using for the model are two times the degradation rate. Compute these values from your degradation rates and paste the values into the column titled "ProductionRate".
  5. Next you will input the expression data for the wild type strain and the other strain your partner is using (dcin5, dgln3, dhap4, dhmo1, dzap1, or spar; note that we can't use dswi4 because it only has 2 cold shock timepoints). You need to include only the data for the genes in your network, in the same order as they appear in the other worksheets.
    • Put the wild type data in the sheet called "wt".
    • The sample spreadsheet has a worksheet named "dcin5". Change this name to match the strain you are using (listed above). The instructions below should be followed for each strain sheet.
    • Paste the SystematicName and StandardName columns from one of your previous sheets into this one.
    • This data in this sheet is the Log Fold Changes for each replicate and each timepoint you computed above. We are only going to use the cold shock timepoints for the modeling. Thus your column headings for the data should be "15", "30", and "60". There will be multiple columns for each timepoint (typically 4) to represent the replicate data, but they will all have the same name. For example, you may have four columns with the header "15".
    • Copy and paste the data from your spreadsheet into this one. You need to include only the data for the genes in your network. Make sure that the genes are in the same order as in the other sheets.
  6. The "optimization_parameters" worksheet should have the following values:
    • fix_b to 1
    • fix_P to 0
    • iestimate to 1
    • alpha to 0.01
    • kk_max should be 1
    • MaxIter and MaxFunEval should be 1e08 (one hundred million in plain English)
    • TolFun and TolX should be 1e-6
    • Sigmoid should be 1
    • igraph should be 1
    • simtime should be 0 5 <...fill by steps of 5...> 60, each number in a different cell.
    • For the parameter "time" (Cell A13), replace what is in the sample file with "15", "30", and "60", since these are the timepoints we have in our data.
    • For the parameter "Strain" (Cell A14), replace "dcin5" with the name of the second strain you are using, making sure that the capitalizaiton and spelling is the same as what you named the worksheet containing that strain's expression data.
  7. For the parameter "Deletion", leave the zero in cell B15. In cell C15, put a number corresponding to the position in the list of gene names that the gene that was deleted appears. In the sample file, CIN5 is number 3 in the list of 4 genes.
    • For the parameter "simtime", you perform the forward simulation of the expression in five minute increments from 0 to 60 minutes. Thus, this row should read: "simtime", "0", "5", "10", ..., "60".
  8. The last sheet you will need to modify is called "network_b".
    • Paste in the list of standard names for your transcription factors from one of your previous sheets. Note that this sheet does not have a column for the systematic name.
    • Cell A1 in the sample files has the text "rows genes affected/cols genes controlling". I believe you can either have this text in cell A1 or "StandardName".
    • The "threshold" value for each gene should be "0".
  9. When you have completed the modifications to your file, upload it to LionShare and send Dr. Dahlquist an e-mail with a link to the file.

Appendix: Full explanation of the "optimization_parameters" sheet

  • alpha: Penalty term weighting (from an L-curve analysis)
  • kk_max: Number of times to re-run the optimization loop: in some cases re-starting the optimization loop can improve performance of the estimation.
  • MaxIter: Number of times MATLAB iterates through the optimization scheme. If this is set too low, MATLAB will stop before the parameters are optimized.
  • TolFun: How different two least squares evaluations should be before it says it's not making any improvement
  • MaxFunEval: maximum number of times it will evaluate the least squares cost
  • TolX: How close successive least squares cost evaluations should be before MATLAB determines that it is not making any improvement.
  • Sigmoid: =1 if sigmoidal model, =0 if Michaelis-Menten model
  • iestimate: =1 if want to estimate parameters and =0 if the user wants to do just one forward run
  • iGraphs: =1 to output graphs; =0 to not output graphs
  • fix_P: =1 if the user does not want to estimate the production rate, P, parameter, use initial guess and never change; =0 to estimate
  • fix_b: =1 if the user does not want to estimate the b parameter, use initial guess and never change; =0 to estimate
  • time: A row containing a list of the time points when the data was collected experimentally. Should correspond to the timepoint column headers in the expression sheets.
  • Strain: A row containing a list of all of the strains for which there is expression data in the workbook. Should correspond to the names of the sheets for each strain.
  • Sheet: A row where each entry is the order number of the sheet (left to right) that corresponds to the list of strains above.
  • Deletion: Gives the index of the gene in the network sheet that has been deleted in each strain listed above. For example, if data has been provided for the CIN5 deletion strain, then give the index number from the network sheet corresponding to CIN5.
  • simtime: A list of times for which the forward simulation should be evaluated.

Running GRNmap

Method, Data, and Observations for Running GRNmap are explained Here

Data & Observations
  • Profile 45 was chosen to run because it contained an optimal number of edges and was the most significant profile.
Personal tools