# BIOL478/S20:Microarray Data Analysis

Lab 10: DNA microarray analysis

April 20, 22, 27, 29

## Monday, April 20

### Reviewing HW 15

### Getting Ready

We need to make sure that everyone can use Microsoft Excel online.

### Experimental Design

The data used in this exercise is publicly available at the NCBI GEO database in record GSE83656.

- Begin by downloading the Excel file for the wild type strain.
**NOTE: before beginning any analysis, immediately change the filename (Save As...) so that it contains your initials to distinguish it from other students' work.**- In the Excel spreadsheet, there is a worksheet labeled "Master_sheet_wt".
- In this worksheet, each row contains the data for one gene (one spot on the microarray).
- The first column contains the "MasterIndex", which numbers all of the rows sequentially in the worksheet so that we can always use it to sort the genes into the order they were in when we started.
- The second column (labeled "ID") contains the Systematic Name (gene identifier) from the Saccharomyces Genome Database.
- The third column contains the Standard Name for each of the genes.
- Each subsequent column contains the log
_{2}ratio of the red/green fluorescence from each microarray hybridized in the experiment (steps 1-5 above having been performed for you already), for each strain starting with wild type and proceeding in alphabetical order by strain deletion. - Each of the column headings from the data begin with the experiment name ("wt" for wild type
*S. cerevisiae*data, "dCIN5" for the*Δcin5*data, etc.). "LogFC" stands for "Log_{2}Fold Change" which is the Log_{2}red/green ratio. The timepoints are designated as "t" followed by a number in minutes. Replicates are numbered as "-0", "-1", "-2", etc. after the timepoint.- The timepoints are t15, t30, t60 (cold shock at 13°C) and t90 and t120 (cold shock at 13°C followed by 30 or 60 minutes of recovery at 30°C).

**Begin by recording in your Google Doc, the strain that you will analyze, the filename, the number of replicates for each strain and each time point in your data.**

### HW 16 on Google Docs

- Link to Google Doc
- Journal club article is posted on Brightspace.

## Wednesday, April 22

- Journal club 3 (PDF of slides is posted on Brightspace under HW 16).
- We will work on the data analysis listed below during the remainder of the period and see how far we get. We will continue with the analysis on Monday.
- Create a Google Doc to take notes and answer the questions embedded in the protocol. You will be be sharing the Google Doc with me and turning in the Excel workbook to me.
- This analysis will be included in your final lab report. The guidelines for the report will be posted on Monday.

- Homework 17, due Monday, is posted on Brightspace. It is Part 2 of the Potti et al. article, the ethics case study.

### Background

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

- Quantitate the fluorescence signal in each spot
- Calculate the ratio of red/green fluorescence
- Log
_{2}transform the ratios- Steps 1-3 have been performed for you by the GenePix Pro software (which runs the microarray scanner).

- Normalize the ratios on each microarray slide
- Normalize the ratios for a set of slides in an experiment
- Steps 4-5 was performed for you using a script in R, a statistics package (see: Microarray Data Analysis Workflow)
- You will perform the following steps:

- Perform statistical analysis on the ratios
- Compare individual genes with known data
- Steps 6-7 are performed in Microsoft Excel

- Pattern finding algorithms (clustering)
- Map onto biological pathways
- We will use software called STEM for the clustering and mapping
- Ernst, J., & Bar-Joseph, Z. (2006). STEM: a tool for the analysis of short time series gene expression data.
*BMC bioinformatics*,*7*(1), 191. DOI: 10.1093/bioinformatics/bti1022

- Identifying regulatory transcription factors responsible for observed changes in gene expression (YEASTRACT)
- Viewing gene regulatory network in GRNsight

### Statistical Analysis Part 1: ANOVA

The purpose of the within-stain ANOVA test is to determine if any genes had a gene expression change that was significantly different than zero at * any* timepoint.

- Create a new worksheet, naming it "wt_ANOVA".
- Copy all the data from the "Master_sheet_wt" worksheet paste it into your new worksheet. Click on the upper left corner to easily select all the cells in the worksheet.
- At the top of the first column to the right of your data, create five column headers of the form wt_AvgLogFC_(TIME) where (TIME) is replaced by 15, 30, etc.
- In the cell below the wt_AvgLogFC_t15 header, type
`=AVERAGE(`

- Then highlight all the data in row 2 associated with t15, press the closing paren key (shift 0),and press the "enter" key.
- This cell now contains the average of the log fold change data from the first gene at t=15 minutes.
- 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.
- Repeat steps (4) through (8) with the t30, t60, t90, and the t120 data.
- Now in the first empty column to the right of the wt_AvgLogFC_t120 calculation, create the column header wt_ss_HO.
- In the first cell below this header, type
`=SUMSQ(`

- Highlight all the LogFC data in row 2 (but not the AvgLogFC), press the closing paren key (shift 0),and press the "enter" key.
- In the next empty column to the right of wt_ss_HO, create the column headers wt_ss_(TIME) as in (3).
- Make a note of how many data points you have at each time point for your strain. For the wild type it will be "4" or "5". Count carefully. Also, make a note of the total number of data points. For wt it should be 23 (double-check).
- In the first cell below the header wt_ss_t15, type
`=SUMSQ(<range of cells for logFC_t15>)-COUNTA(<range of cells for logFC_t15>)*<AvgLogFC_t15>^2`

and hit enter.- The
`COUNTA`

function counts the number of cells in the specified range that have data in them (i.e., does not count cells with missing values). - The phrase <range of cells for logFC_t15> should be replaced by the data range associated with t15.
- 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.

- The
- 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.
- In the first column to the right of wt_ss_t120, create the column header wt_SS_full.
- In the first row below this header, type
`=sum(<range of cells containing "ss" for each timepoint>)`

and hit enter. - In the next two columns to the right, create the headers wt_Fstat and wt_p-value.
- Recall the number of data points from (13): call that total n.
- In the first cell of the wt_Fstat column, type
`=((n-5)/5)*(<wt_ss_HO>-<wt_SS_full>)/<wt_SS_full>`

and hit enter.- Don't actually type the n but instead use the number from (13). Also note that "5" is the number of timepoints.
- Replace the phrase wt_ss_HO with the cell designation.
- Replace the phrase <wt_SS_full> with the cell designation.
- Copy to the whole column.

- In the first cell below the wt_p-value header, type
`=FDIST(<wt_Fstat>,5,n-5)`

replacing the phrase <wt_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. . Copy to the whole column. - 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 wt_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.
- Be sure to undo any filters that you have applied before making any additional calculations.

**Upload the .xlsx file that you have just created to Box and share it with Dr. Dahlquist.**

### Calculate the Bonferroni and p value Correction

*Note: Be sure to undo any filters that you have applied before continuing with the next steps.*

- 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, wt_Bonferroni_p-value.
- Type the equation
`=<wt_p-value>*6189`

, Upon completion of this single computation, use the Step (10) trick to copy the formula throughout the column. - 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_p-value header:
`=IF(<wt_Bonferroni_p-value>1,1,<wt_Bonferroni_p-value>)`

, where "wt_Bonferroni_p-value" refers to the cell in which the first Bonferroni p value computation was made. Use the Step (10) trick to copy the formula throughout the column.

**Upload the .xlsx file that you have just created to Box and share it with Dr. Dahlquist.**

### Calculate the Benjamini & Hochberg p value Correction

- Insert a new worksheet named "wt_ANOVA_B-H".
- Copy and paste the "MasterIndex", "ID", and "Standard Name" columns from your previous worksheet into the first two columns of the new worksheet.
- For the following, use Paste special > Paste values. Copy your unadjusted p values from your ANOVA worksheet and paste it into Column D.
- 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.
- 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.
- Now you can calculate the Benjamini and Hochberg p value correction. Type wt_B-H_p-value in cell F1. Type the following formula in cell F2:
`=(D2*6189)/E2`

and press enter. Copy that equation to the entire column. - Type "wt_B-H_p-value" into cell G1.
- Type the following formula into cell G2:
`=IF(F2>1,1,F2)`

and press enter. Copy that equation to the entire column. - Select columns A through G. Now sort them by your MasterIndex in Column A in ascending order.
- Copy column G 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 Box and share it with Dr. Dahlquist.**

### Sanity Check: Number of genes significantly changed

Before we move on to further analysis of the data, we want to perform a more extensive sanity check to make sure that we performed our data analysis correctly. We are going to find out the number of genes that are significantly changed at various p value cut-offs.

- Go to your wt_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)?**- Create a new worksheet in your workbook to record the answers to these questions. Then you can write a formula in Excel to automatically calculate the percentage for you.

- 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? 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)?**

- 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.
- Comparing results with known data: the expression of the gene
*NSR1*(ID: YGR159C)is known to be induced by cold shock.Note that the average Log fold change is what we called "STRAIN)_AvgLogFC_(TIME)" in step 3 of the ANOVA analysis. Does*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?**NSR1*change expression due to cold shock in this experiment? - We were going to study the
*RGM1*deletion strain. Find the gene*RGM1*in your data (ID: YMR182C)Does**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?***RGM1*change expression due to cold shock in this experiment?

## Monday, April 27

### Clustering and GO Term Enrichment with stem

Instructions are found on the Google Doc.

## Wednesday, April 29

### 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.

- 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.

- 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
apply a filter for "Filter Documented Regulations by environmental condition".**not** - Rank genes by TF using: The % of genes in the list and in YEASTRACT regulated by each TF.
- Click the
*Search*button.

- On the left panel of the window, click on the link to
- 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"?** **Copy the table of results from the web page and paste it into a new worksheet in your Excel workbook to preserve the results.****Upload the Excel file to Box.****Is RGM1 on the list? If so, what is its "% in user set", "% in YEASTRACT", and "p value".**

- 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".
- 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-20 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 RGM1 if it is 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. Each group member will select a different network (they can have some overlapping transcription factors, but some should also be different).
- 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 RGM1) into both the "Transcription factors" field and the "Target ORF/Genes" field.
- We are going to use the "Regulations Filter" options of "Documented", "
**Only**DNA binding 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.

### 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.

- First we need to properly format the output files from YEASTRACT.
- 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).
- 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".
- Finally, for ease of working with the adjacency matrix in Excel, we want to alphabatize the gene labels both across the top and side.
- Select the area of the entire adjacency matrix.
- Click the Data tab and click the custom sort button.
- Sort Column A alphabetically, being sure to exclude the header row.
- Now sort row 1 from left to right, excluding cell A1. In the Custom Sort window, click on the options button and select sort left to right, excluding column 1.

- Name the worksheet containing your organized adjacency matrix "network" and Save.

- Now we will visualize what these gene regulatory networks look like with the GRNsight software.
- Go to the GRNsight home page.
- Select the menu item File > Open and select 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. You can click the "Grid Layout" button to arrange the nodes in a grid, or you can click and drag 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.
- If you have nodes (genes) floating around in the display that are not connected to any other nodes, we need to delete them from the network for the modeling to work properly. Go back to the Excel workbook and network sheet and delete both the row and column with the floating gene's name. Then re-upload the edited file to GRNsight to visualize it. Use this final version for your report.