Simonwro120 Week 8

From LMU BioDB 2017
Jump to: navigation, search

Microarray Assignment

Modified Assignment Steps/Electronic Notebook

Statistical Data Analysis Part 1

  1. Create a new worksheet, naming it dCIN5_ANOVA".
  2. Copy the first three columns containing the "MasterIndex", "ID", and "Standard Name" from the "Master_Sheet" worksheet for the strain dCIN5 and paste it into your new worksheet. Copy the columns containing the data for dCIN5 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 120.
  4. In the cell below the dCIN5_AvgLogFC_t15 header, type =AVERAGE(D2:G2) and hit enter.
  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(D2:W2)
  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 dCIN5, there are 4 data points for each time point. There are 20 total data points.
  14. In the first cell below the header dCIN5_ss_t15, type =SUMSQ(D2:G2)-COUNTA(D2:G2)*X2^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).
    • 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(AD2:AH2) 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): 20.
  20. In the first cell of the dCIN5_Fstat column, type =((20-5)/5)*(AC2-AI2>)/AI2 and hit enter.
    • Copy to the whole column.
  21. In the first cell below the dCIN5_p-value header, type =FDIST(AJ2,5,20-5). 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 =AK2*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_ANOVA_B-H".
  2. Copy and paste the "MasterIndex", "ID", and "Standard Name" columns from your previous worksheet into the first three 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 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 dCIN5_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.
  7. Type "dCIN5_B-H_p-value" 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 ANOVA sheet.
  • Zip and upload the .xlsx file that you have just created to the wiki.

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 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)?
      • 2290 genes have p < 0.05. The percentage out of 6189 is 37%.
    • How many genes have p < 0.01? and what is the percentage (out of 6189)?
      • 1380 genes have p < 0.01. The percentage is 22%.
    • How many genes have p < 0.001? and what is the percentage (out of 6189)?
      • 691 genes have p < 0.001. The percentage is 11%.
    • How many genes have p < 0.0001? and what is the percentage (out of 6189)?
      • 358 genes have p < 0.0001. The percentage is 6%.
  • 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)?
      • 151 genes are p < 0.05. The percentage is 2%.
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)?
      • 1453 genes are p < 0.05. The percentage is 23%.
  • 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.
  • 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. Upload your slide to the wiki.
    • Note that since the wild type data is being analyzed by one of the groups in the class, it will be sufficient for this week to supply just the data for your strain. We will do the comparison with wild type at a later date.
  • 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 time points in the experiment? Does NSR1 change expression due to cold shock in this experiment?
    • Unadjusted p-value: 6.37596E-08
    • Bonferroni-corrected: 0.000394608
    • B-H corrected: 2.19227E-05
    • AvgLogFC t15: 4.070048368
    • AvgLogFC t30: 3.611460213
    • AvgLogFC t60: 4.298496857
    • AvgLogFC t90: -2.900930452
    • AvgLogFC t120: -0.931494963
    • The NSR1 gene does change expression due to cold shock in the dCIN5 experiment.
  • For fun, find "your favorite gene" (from your web page) in the 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? Does your favorite gene change expression due to cold shock in this experiment?

(My favorite gene info)

    • My favorite gene is SPT15
    • Unadjusted p-value: 0.010214264
    • Bonferroni-corrected: 1
    • B-H corrected: 0.045511938
    • AvgLogFC t15: 2.529437391
    • AvgLogFC t30: 0.685719402
    • AvgLogFC t60: 1.171702893
    • AvgLogFC t90: -0.761564308
    • AvgLogFC t120: -0.177686995
    • SPT15 does seem to change gene expression due to cold shock.

Summary Paragraph

  • In our experiment, we studied data related to the gene expression of yeast genes when exposed to a "cold shock" treatment after deleting gene CIN5. The data analysis consisted of 5 time points (t-15, t-30, t-60, t-90, t-120) which all corresponded to different temperatures. the first temperatures reflect gene expression during the cold shock, the latter ones reflect the recovery. The data shows the "Log Fold Change" for the expression of each gene at each time point. Using this data, my group was able to calculate the p-values for each gene. Once we finished this, we found the Bonferroni corrected and B-H corrected p-values. After some analysis, my group partner and I decided that the Bonferroni correction gave the most strict results. We drew this conclusion because only 151 genes, which is 2% of the total, had a p-value of less than 0.05. This was compared to the B-H value after the adjustment. The values showed 1453 genes, which is 23% of the total, that had a p-value of less than 0.05. We then compared unadjusted p-values of 2290 genes, which is 37%of the total, who had p-values of less than 0.05, and then compared them to a gene which is known to change expression during cold shock: NSR1. Our groups data shows that the NSR1 strain did happen to respond to cold shock of our strain (dCIN5). My group member and I also looked at our genes. My favorite gene was SPT15 which did not seem to change gene expression in response to the cold shock of our strain dCIN5.

Acknowledgements

  1. I worked with my homework partner, Mary Balducci, on this assignment. We worked together in class and compared results for our formulas in Excel. We also spoke outside of class to compare what we were doing to make sure we were both getting the same results for the same strain, dCIN5. We met once more to double check our laboratory notebook modifications and discuss the summary paragraph the day before class.
  2. I'd also like to acknowledge the help both Dondi and Dr. Dahlquist gave in reference to navigating the excel software in an efficient way.
  3. While I worked with the people noted above, this individual journal entry was completed by me and not copied from another source.

Signature: Simonwro120 (talk) 02:17, 23 October 2017 (PDT)

References

LMU BioDB 2017. (2017). Week 8. Retrieved October 19, 2017, from https://xmlpipedb.cs.lmu.edu/biodb/fall2017/index.php/Week_8

List of Assignments

Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12 Week 13 Week 14 Week 15

List of Journal Entries

Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12 Week 13 Week 14 Week 15

List of Shared Journals

Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12 Week 13 Week 14 Week 15 [Category:Journal Entry]