# Alison S King Week 4

## Contents

## Electronic Lab Notebook

### Purpose

The purpose of this assignment is to practice working with large data sets in Excel and to analyze the microarray data using the ANOVA statistical test and p-values.

### Experimental Design/Workflow and Results

In the Excel spreadsheet, there is a worksheet labeled "Master_Sheet_<strain>", where strain refers to the particular strain of yeast. In this worksheet, each row contains the data for one gene (one spot on the microarray). The first column contains the "Master Index", 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 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 this experiment, we will be working with the strain Δzap1, and the data can be found on "Master_Sheet_dZAP1".
- There are 4 replicates of each strain at each of the 5 time points, for a total of 20 recordings per gene.

Each of the column headings from the data begin with the experiment name ("dZAP1" for the *Δzap1* data). "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).

#### Statistical Analysis Part 1 : ANOVA

- Create a new worksheet, naming it "dZAP1_ANOVA".
- Copy the first three columns containing the "MasterIndex", "ID", and "Standard Name" from the "Master_Sheet" worksheet for dZAP1 and paste it into your new worksheet. Copy the columns containing the data for dZAP1 and paste it into your new worksheet.
- At the top of the first column to the right of your data, create five column headers of the form dZAP1_AvgLogFC_(TIME) where (TIME) is t15, t30, t60, t90, t120.
- In the cell below the dZAP1_AvgLogFC_t15 header, type
`=AVERAGE(`

- Then highlight all the data in row 2 associated with dZAP1 and 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 dZAP1_AvgLogFC_t120 calculation, create the column header dZAP1_ss_HO.
- In the first cell below this header, type
`=SUMSQ(`

- Highlight all the LogFC data in row 2 for your dZAP1 (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 dZAP1_ss_HO, create the column headers dZAP1_ss_(TIME) as in (3).
- Make a note of how many data points you have at each time point for your strain (4 for dZAP1). Also, make a note of the total number of data point (20 for dZAP1).
- In the first cell below the header dZAP1_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 dZAP1_ss_t120, create the column header dZAP1_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 dZAP1_Fstat and dZAP1_p-value.
- Recall the number of data points from (13): call that total n (n=20).
- In the first cell of the dZAP1_Fstat column, type
`=((20-5)/5)*(<dZAP1_ss_HO>-<dZAP1_SS_full>)/<dZAP1_SS_full>`

and hit enter.- Note that "5" is the number of timepoints.
- Replace the phrase <dZAP1_ss_HO> with the cell designation.
- Replace the phrase <dZAP1_SS_full> with the cell designation.
- Copy to the whole column.

- In the first cell below the dZAP1_p-value header, type
`=FDIST(<dZAP1_Fstat>,5,20-5)`

replacing the phrase <dZAP1_Fstat> with the cell designation. 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 dZAP1_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.
- Note: 2485 genes had p < 0.05

#### Calculate the Bonferroni and p value Correction

- 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, dZAP1_Bonferroni_p-value.
- Type the equation
`=<dZAP1_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 dZAP1_Bonferroni_p-value header:
`=IF(dZAP1_Bonferroni_p-value>1,1,dZAP1_Bonferroni_p-value)`

, where "dZAP1_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.

#### Calculate the Benjamini & Hochberg p value Correction

- Insert a new worksheet named "dZAP1_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 dZAP1_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 "dZAP1_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.

#### 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 dZAP1_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)?**- 2485 genes had p < 0.05 (40.15%)

**How many genes have p < 0.01? and what is the percentage (out of 6189)?**- 1609 genes had p < 0.01 (26.00%)

**How many genes have p < 0.001? and what is the percentage (out of 6189)?**- 885 genes had p < 0.001 (14.30%)

**How many genes have p < 0.0001? and what is the percentage (out of 6189)?**- 457 genes had p < 0.0001 (7.38%)

- 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)?**- 210 genes had p < 0.05 (3.39%)

**How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)?**- 1767 genes had p < 0.05 (28.55%)

- 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 "dZAP1_AvgLogFC_(TIME)" in step 3 of the ANOVA analysis.*Find*NSR1*in the dZAP1 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?*- Unadjusted p-value: 6.05673E-08
- Bonferroni-corrected p-value: 0.000374851
- B-H-corrected p-value: 1.04125E-05
- average Log fold change at time:
- t15: 3.8996
- t30: 3.7238
- t60: 3.962775
- t90: -2.156
- t120: 0.0542

### Data and Files

All data and files can be found in our BIOL388_Spring2019 Box.

For this week, I have created two files:

- The Excel spreadsheet with statistical data
- The Powerpoint with p-value table

### Scientific Conclusion

The statistical analysis appears to show that our results are statistically significant when looking at the unadjusted p-value; however, when we use the Bonferroni adjustment, our results do not appear to show any variation other than what can reasonably be expected at a p=0.05 confidence level. Thus, we should conclude for now that the cold treatment did not have any effect on the gene expression if we use the Bonferroni adjustment. However, that correction can be very stringent, and so it might be more appropriate to use the Benjamini & Hochberg correction instead. Using this method, we see p-values > 0.05 about 28% of the time, which should be considered statistically significant. Thus, I would conclude with fairly strong confidence that the cold treatment did affect the gene transcription.

### Acknowledgements

My lab partner, Edward Talatala and I texted a couple of times about our general format of the journal and the specific numbers we got for our data. We worked together in class on Tues. Feb. 12, 2019 to finish the ANOVA part of the assignment.

I visited https://guides.nyu.edu/c.php?g=276966&p=1846656 to learn how to cite datasets in APA format.

Except for what is noted above, this individual journal entry was completed by me and not copied from another source.

Alison S King (talk) 18:32, 12 February 2019 (PST)

### References

Dahlquist, K. D. (2019) BIOL388_S19_microarray-data_dZAP1.zip [Data file]. Retrieved from https://lmu.app.box.com/file/396622445352.

Loyola Marymount University (12 February 2019) BIOL388/S19:Week 4. Retrieved from https://openwetware.org/wiki/BIOL388/S19:Week_4 on 12 February 2019.

### Links

Class Page: BIOL388/S19

Assignment Pages:

Shared Journals:

- Class Journal Week 1
- Class Journal Week 2
- Class Journal Week 3
- Class Journal Week 4
- Class Journal Week 5
- Class Journal Week 6
- Class Journal Week 7
- Class Journal Week 8
- Class Journal Week 9
- Class Journal Week 10
- Class Journal Week 11
- Class Journal Week 12
- Class Journal Week 14/15

Individual Journals: