BIOL478/S17:Microarray Data Analysis: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
(→‎Background: removed reference to GenMAPP)
Line 38: Line 38:
#Normalize the ratios on each microarray slide
#Normalize the ratios on each microarray slide
#Normalize the ratios for a set of slides in an experiment
#Normalize the ratios for a set of slides in an experiment
#* Steps 4-5 are performed by using a script written in the R statistical programming language
#* Steps 4-5 are performed by using a script written in the R statistical programming language and have been done for you
#Perform statistical analysis on the ratios
#Perform statistical analysis on the ratios
#Compare individual genes with known data
#Compare individual genes with known data
Line 45: Line 45:
#* We will use software called STEM for clustering
#* We will use software called STEM for clustering
#Mapping onto biological pathways
#Mapping onto biological pathways
#* We will use software called GenMAPP for mapping onto biological pathways
#* We will use STEM for mapping the clusters onto Gene Ontology categories
# Identifying regulatory transcription factors responsible for observed changes in gene expression
# Identifying regulatory transcription factors responsible for observed changes in gene expression



Revision as of 16:36, 18 April 2017

Laboratory 10: Microarray Data Analysis

Wednesday, April 19, Monday, April 24, and Wednesday, April 26


Before We Begin

Viewing File Extensions

  • The Windows 7 operating systems defaults to hiding file extensions. To turn them back on, do the following:
    Folder Options window
    Folder Options window
    1. Go to the Start menu and select "Control Panel".
    2. In the window that appears, search for "Folder Options" in the search field in the upper right hand corner.
    3. Click on "Folder Options" in the main window.
    4. When the Folder Options window appears, click on the View tab.
    5. Uncheck the box for "Hide extensions for known file types".
    6. Click the OK button.

Set Your Browser to Prompt You for the Location to Save your Downloaded Files

  • In Mozilla Firefox, open the Options window.
    • Select the radio button that says "Always ask me where to save files".
    • You could also change the default "Save files to" location to your Desktop, so that will be the first choice when it prompts you where to save the file. (You will have to temporarily deselect the radio button to do this and then reselect it when you are done.
    • Click OK to save your changes.
  • In Google Chrome, 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.

Background

This is a list of steps required to analyze DNA microarray data.

  1. Quantitate the fluorescence signal in each spot
  2. Calculate the ratio of red/green fluorescence
  3. Log2 transform the ratios
    • Steps 1-3 are performed by the GenePix Pro software
  4. Normalize the ratios on each microarray slide
  5. Normalize the ratios for a set of slides in an experiment
    • Steps 4-5 are performed by using a script written in the R statistical programming language and have been done for you
  6. Perform statistical analysis on the ratios
  7. Compare individual genes with known data
    • Steps 6-7 are performed in Microsoft Excel
  8. Pattern finding algorithms (clustering)
    • We will use software called STEM for clustering
  9. Mapping onto biological pathways
    • We will use STEM for mapping the clusters onto Gene Ontology categories
  10. Identifying regulatory transcription factors responsible for observed changes in gene expression

GenePix Pro Protocol (Steps 1-3)

Gridding and Generating Intensity Data

  • Launch GenPix Pro 6.1 (select Analysis Only)
  • On the right hand side of the screen, select the File icon
    • Select File > Open Images
    • Navigate to the folder containing your .tif images
    • Hold down the Control key while clicking to select both the 532 and 635 wavelength files
    • Click on the Open button
  • Use the brightness and contrast sliders on the upper left hand side to adjust your image to see all of the spots
  • You can use the magnifying glass icon to zoom in on an area of the image, and the magnifying glass return icon to go back to the whole chip image
    • Zoom in so that you can see the entire top block of grids on your screen
  • On the right hand side of the screen, select the File icon
    • Select Load Array List
    • Select the file Ontario_Y6.4Kv7.GAL
      • To download this file, right-click on the link and select "Save link as..." from the context menu that appears.
    • Click the Open button
  • Using the icon that has an arrow and a square, drag the grids so that they are approximately aligned with the top block of spots
    • Click on the icon that looks like a compass, or a circle with cross-hairs, and select Find Array, Find All blocks, Align Features
      • Alternately, you can do this in three steps by:
        • Click on the icon that looks like a compass, or a circle with cross-hairs, and select Find Array
        • Click on the icon again, and select Find All Blocks
        • Click on the icon again, and select Align Features in All Blocks
  • On the right hand side of the screen, select the icon that looks like a table of data (it says B, C, R at the top of it)
  • Click on the File icon on the right hand side and select, Save Results As, and save your results as type "GenePix Pro Files (*.gpr)". Save a JPEG image containing all analyzed features.

Generating an Array Quality Report

  • Launch GenePix Pro 6.1 (select Analysis Only)
  • On the right hand side of the screen, select the File icon
  • File > Open Results
  • Select the desired file
  • Select Report tab at the top of the screen
  • On the left side of the screen, under Navigate, select the back arrow or home icon
  • Select Array Quality Control
  • Adjust Vital Statistic Thresholds values to:
Quality Control Limits
Median signal to background > 2.5
Mean of Median background < 500
Median Signal to Noise	> 4
Median % >B + 1 StdDev	> 90
Feature variation < 0.5
Background Variation < 1.2
Features with Saturated pixels	< 3.3%
Not Found < 18%
Bad Features < 7%
  • Select Start
  • Select Show Printable Version
  • File > Print
  • Under Select Printer > Select Adobe PDF
  • Select Print
  • Save on the Desktop
  • Name the file: ChipBarcode#_yyyymmdd
  • The PDF file will either open on its own or you need to open it from the file you saved it to

Looking at the raw data

  • We will look at the raw data for two genes of interest, ASH1 (which should have been deleted in this strain), and NSR1, which is a gene known to be induced by cold shock.
  • Open your results file from the first section of this protocol in Microsoft Excel
  • To find the data for NSR1, first go to the NSR1 page at the Saccharomyces Gene Database to learn what the systematic name (ID) for NSR1 is.
  • Then search for this ID in your Excel spreadsheet
  • This will tell you the block, row, and column where the NSR1 spot occurs and you can look for it in GenePix Pro.
  • Repeat with ASH1 (ASH1 page at the Saccharomyces Gene Database)
  • We are expecting that NSR1 should be expressed and that ASH1 should not because it has been deleted from the yeast genome. Is this the case?


Statistical Analysis (Step 6)

Preparing the Spreadsheet

  • For the statistical analysis, we will begin with the file "GCAT_and_Ontario_Between_Array_Normalization.csv" that you generated in the previous step.
  • Open this file in Excel and Save As an Excel Workbook *.xlsx. 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. Save your work.
  • This will be the starting point for our statistical analysis below.

Modified t test for each timepoint

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. Note that we can only perform the analysis on the wild type strain because we do not have replicates for the Δash1 strain.

  • Insert a new worksheet into your Excel workbook and name it "wt_ttest".
  • Go back to the "Master_Sheet" worksheet for your strain. Copy the first three columns containing the "MasterIndex", "ID", and "Standard Name" from the "Master_Sheet" worksheet for your strain and paste it into your new worksheet. Copy the columns containing the data for your strain and paste it into your new worksheet.
  • 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 wt_<AvgLogFC>_<tx> where you use the appropriate text within the <> and where x is the time. For example, "wt_AvgLogFC_t15".
  • 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. For example, your equation might read

=AVERAGE(C2:F2)

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 <wt>_<Tstat>_<tx> where you use the appropriate text within the <> and where x is the time. For example, "wt_Tstat_t15". 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))

For example, your equation might read:

=AVERAGE(C2:F2)/(STDEV(C2:F2)/SQRT(4))

(NOTE: in this case the number of replicates is 4. Be careful that you are using the correct number of parentheses.) 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 <wt>_<Pval>_<tx> where you use the appropriate text within the <> and where x is the time. For example, "wt_Pval_t15". In the cell below the label, enter the equation:
=TDIST(ABS(cell containing T statistic),degrees of freedom,2)

For example, your equation might read:

=TDIST(ABS(AE2),3,2)

The number of degrees of freedom is the number of replicates minus one. Copy the equation and paste it into all rows in that column.

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, wt_Bonferroni-Pval_tx (do this twice in a row).
  2. Type the equation =<(STRAIN)_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 wt_Bonferroni-Pval_tx header: =IF([cell with p value]>1,1,[cell with p value]). Use the trick to copy the formula throughout the column.

Benjamini & Hochberg Correction

  1. Insert a new worksheet named "wt_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 D, 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 (STRAIN)_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 "STRAIN_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.
  • Save your file to your flash drive (and/or other storage). Give Dr. Dahlquist a copy of the file.

Sanity Check: Number of genes significantly changed

  • We will also perform the "sanity check" as follows:
  • Go to your wt_ttest 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 for t60. 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)?
  • Determine how many genes have a p value < 0.05 at each of the other timepoints (t15, t30, t90, t120).
  • When we use a p value cut-off of p < 0.05, what we are saying is that you would have seen a gene expression change that deviates this far from zero by chance less than 5% of the time.
  • We have just performed 6189 hypothesis tests. Another way to state what we are seeing with p < 0.05 is that we would expect to see this a gene expression change for at least one of the timepoints by chance in about 5% of our tests, or 309 times. Since we have more than 309 genes that pass this cut off, we know that some genes are significantly changed. However, we don't know which ones. To apply a more stringent criterion to our p values, we performed the Bonferroni and Benjamini and Hochberg corrections to these unadjusted p values. The Bonferroni correction is very stringent. The Benjamini-Hochberg correction is less stringent. To see this relationship, filter your data to determine the following:
    • How many genes are p < 0.05 for the Bonferroni-corrected p value at each timepoint? and what is the percentage (out of 6189)?
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value at each timepoint? and what is the percentage (out of 6189)?
  • In summary, the p value cut-off should not be thought of as some magical number at which data becomes "significant". Instead, it is a moveable confidence level. If we want to be very confident of our data, use a small p value cut-off. If we are OK with being less confident about a gene expression change and want to include more genes in our analysis, we can use a larger p value cut-off.
  • There is one last thing to do: 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.)
  • Use this sample PowerPoint slide to see how your table should be formatted.

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 Log fold change at each of the timepoints in the experiment and 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?

Clustering and GO Term Enrichment with stem (steps 7-8)

  1. Prepare your microarray data file for loading into STEM.
    • Insert a new worksheet into your Excel workbook, and name it "wt_stem".
    • Select all of the data from your "wt_ttest" worksheet and Paste special > paste values into your "wt_stem" worksheet.
    • In addition, paste in the Δash1 data from the "Master_Sheet" worksheet, immediately to the right of the wt data.
      • 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".
      • You are now going to filter the data in such a way so that we can remove the "least significant" genes from the clustering analysis (if we keep them, the program will just be clustering noise.) Filter the data on the B-H corrected p value for t15 to be > 0.05 (that's greater than in this case). Then filter the B-H corrected p value for t30, t60, t90, and t120 to be > 0.05, without removing the filter from t15. This will select all genes that did not have a significant change in expression any any timepoint in the experiment.
        • 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.
      • Now copy the columns named "SPOT" and "ID" to a new worksheet called "dASH1_stem".
      • Copy all of the Δash1 data from the "wt_stem" worksheet over to the "dAHS1_stem" worksheet.
      • Back in the "wt_stem" worksheet, 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.).
      • In the "dASH1_stem" worksheet, 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 the wt_stem worksheet as Text (Tab-delimited) (*.txt). Include "wt" and "stem" in the filename to distinguish it from your other file. Click OK to the warnings. Use Save As to save the dASH1_stem worksheet as Text (Tab-delimited) (*.txt). Include "dASH1" and "stem" in the filename to distinguish it from your other files. Click OK to the warnings and close your file.
        • Note that we are going to run stem twice, once on the wt data and once on the Δash1 data.
  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. 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.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. We will do the wild type data first and then come back and do the Δash1 data later.
      • 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.
      • 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!
    3. Repeat this for the Δash1 data.
  5. Analyzing and Interpreting STEM Results
    1. Which profiles were shared by the two strains and which ones were different?
    2. Each person in the class will select one profile for further analysis; either profile #45 or profile #22, which were the same for the two strains. Answer the following for both the wild type and Δash1 data:
      • Why did you select this profile? In other words, why was it interesting to you?
      • How many genes belong to this profile for each of the strains?
      • How many genes were expected to belong to this profile for each of the strains?
      • What is the p value for the enrichment of genes in this profile for each of the strains? 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 for each of the strains?
      • Select 10 Gene Ontology terms from your filtered list (either p < 0.05 or corrected p < 0.05).
        • You can either:
          • Choose the same 10 terms that are in common between strains (if you can find any).
          • Choose 10 terms that are different between the strains (5 or so from each).
          • Choose some that are the same (if you can find any) 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 ASH1 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.