Bhamilton18 Week 8

From LMU BioDB 2017
Jump to: navigation, search

Data Information

Strain Comparison: dHAP4

Individual dataset: dHAP4 Excel File

Powerpoint Slide: dHAP4 Powerpoint Slide

File name: BIOL367_Fall2017_Dahlquist-microarray-data-master_20171017BVH1.zip

Number of replicates/Timepoints: t15, t30. t60 have 4 and t90, t120 have 3

Notebook

To begin, this week we are comparing the dHAP4 data within the Yeast Gene Excel spreadsheet, linked above.

  1. Create a new worksheet, naming it "dHAP4_ANOVA".
  2. 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.
  3. At the top of the first column to the right of your data, create five column headers of the form dHAP4_AvgLogFC_(TIME) where (TIME) is 15, 30, 60, 90 and 120.
    • The other headers will look as follows:
      • dHAP4_AvgLogFC_t15
      • dHAP4_AvgLogFC_t30
      • dHAP4_AvgLogFC_t60
      • dHAP4_AvgLogFC_t90
      • dHAP4_AvgLogFC_t120
  4. In the cell below the dHAP4_AvgLogFC_t15 header, type =AVERAGE(D2:G2)
  5. This will highlight all the data in row 2 associated with dHAP4 and t15, after press the closing parenthesis (shift 0),and press the "enter" key.
    • As noted above, our particular code will look like: =AVERAGE(D2:G2)
  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.
    • The other initial rows will look as follows, then you can complete step (7) on each corner
      • For t30: =AVERAGE(H2:K2)
      • For t60: =AVERAGE(L2:O2)
      • For t90: =AVERAGE(P2:R2)
      • For t120: =AVERAGE(S2:U2)
  9. Now in the first empty column to the right of the dHAP4_AvgLogFC_t120 calculation, create the column header dHAP4_ss_HO.
  10. In the first cell below this header, type =SUMSQ(D2:U2)
  11. This will highlight all the LogFC data in row 2 for dHAP4 (but not the AvgLogFC), press the closing parenthesis (shift 0),and press the "enter" key.
  12. In the next empty column to the right of dHAP4_ss_HO, create the column headers dHAP4_ss_(TIME) as in (3).
    • The headers will look as follows:
      • dHAP4_ss_t15
      • dHAP4_ss_t30
      • dHAP4_ss_t60
      • dHAP4_ss_t90
      • dHAP4_ss_t120
  13. To note there are 3 data points for t90 and t120 therefore beware when selecting cells. And the total number of data points is 18.
  14. In the first cell below the header dHAP4_ss_t15, type =SUMSQ(D2:G2)-COUNTA(D2:G2)*(V2)^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 <D2:G2> is the data range associated with t15.
    • The phrase <V2> is 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.
    • The other initial rows will look as follows, then you can complete step (7) on each corner
      • For t30: =SUMSQ(H2:K2)-COUNTA(H2:K2)*(W2)^2
      • For t60: =SUMSQ(L2:O2)-COUNTA(L2:O2)*(X2)^2
      • For t90: =SUMSQ(P2:R2)-COUNTA(P2:R2)*(Y2)^2
      • For t120: =SUMSQ(S2:U2)-COUNTA(S2:U2)*(Z2)^2
  16. In the first column to the right of dHAP4_ss_t120, create the column header dHAP4_SS_full.
  17. In the first row below this header, type =SUM(AB2:AF2) and hit enter.
    • Where AB2:AF2 is the range of cells containing "ss" for each timepoint
  18. In the next two columns to the right, create the headers dHAP4_Fstat and dHAP4_p-value.
  19. Recall the number of data points from (13): call that total n.
    • In this case our total is 18.
  20. In the first cell of the dHAP4_Fstat column, type ==((18-5)/5)*(AA2-AG2)/AG2 and hit enter.
    • To note, "5" is the number of timepoints, i.e t15, t30, t60, t90 and t120
    • AA2-AG2 represents dHAP4_ss_HO minus dHAP4_SS_full
    • AG2 is the dHAP4_SS_full, once more
    • Copy to the whole column, i.e step (7).
  21. In the first cell below the dHAP4_p-value header, type =FDIST(=FDIST(AH2,5,18-5)) where AH2 is <dHAP4_Fstat> and 18 is the "n" from (13), and once again 5 represents the number of timepoints. 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 dHAP4_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.
    • For this particular section 2558 genes should meet this criteria.

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, dHAP4_Bonferroni_p-value.
  2. Type the equation =AI2*6189, Upon completion of this single computation, use the Step (7) trick to copy the formula throughout the column.
    • AI2 being the dHAP4_p-value for the gene in the second row.
  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 dHAP4_Bonferroni_p-value header: =IF(AJ2>1,1,AJ1). Use the Step (7) trick to copy the formula throughout the column.
    • AJ2 is the "dHAP4_Bonferroni_p-value" which refers to the cell in which the first Bonferroni p value computation was made.

Calculate the Benjamini & Hochberg p value Correction

  1. Insert a new worksheet named "dHAP4_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 dHAP4_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 "dHAP4_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.
  • Current File is uploaded on Bhamilton18 Week 8 assignment page.

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 the dHAP4_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)?
      • 2558 and 41.331% were <0.05.
    • How many genes have p < 0.01? and what is the percentage (out of 6189)?
      • 1647 and 26.612% were <0.01.
    • How many genes have p < 0.001? and what is the percentage (out of 6189)?
      • 778 and 12.571% were <0.001.
    • How many genes have p < 0.0001? and what is the percentage (out of 6189)?
      • 308 and 4.977% were <0.0001.
  • 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)?
      • 90 and 1.454% were <0.05
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)?
      • 1827 and 29.520% were <0.05.
  • 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 timepoints in the experiment? Note that the average Log fold change is what we called "dHAP4_AvgLogFC_(TIME)" in step 3 of the ANOVA analysis. Does NSR1 change expression due to cold shock in this experiment?
  • NSR1
    • Unadjusted: 0.016363683
    • Bonferroni-corrected:101.274831
    • B-H corrected: 0.05355623
    • dHAP4_AvgLogFC_t15:2.699471708
    • dHAP4_AvgLogFC_t30:3.25079714
    • dHAP4_AvgLogFC_t60:3.519976668
    • dHAP4_AvgLogFC_t90:-1.1005673
    • dHAP4_AvgLogFC_t120:-1.797694577
  • Looking at the Average Log fold it appears that NSR1 experiences an increase from the beginning to middle of the experiment and then a drastic decrease by the end.
  • 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?
  • ATP1: AKA My Favorite Gene
    • Unadjusted: 0.187431493
    • Bonferroni-corrected:1160.01351
    • B-H corrected: 0.311747786
    • dHAP4_AvgLogFC_t15:-0.340939368
    • dHAP4_AvgLogFC_t30:-0.637395494
    • dHAP4_AvgLogFC_t60:-0.360868251
    • dHAP4_AvgLogFC_t90:-0.63201057
    • dHAP4_AvgLogFC_t120:1.038421855
  • Once again examining the Average Fold the ATP1 gene appears slightly decreasing in gene expression, and maintains a small change between time periods. However, by the end of the experiment, in t120, ATP1 quickly increases.

Summary Paragraph

Focusing on the dHAP4 data, we performed a series of statistical analysis to explore the impact of cold shock on Yeast Genes. Looking at the genes at different timepoints we are able to deduce which genes drastically/significantly change to the cold temperatures. Utilizing the unadjusted p-values, Benjamini & Hochberg corrected p-values and Bonferroni-corrected p-values we can explore strict versus lenient criteria placed on the values of the genes. We can deduce from the values how confident we are with our answers. For example having to focus on 4.9% of the data as appose to 41% is much more manageable. Overall, we explored different techniques and basic Excel formulas to see the best practices of interpreting data and how to adjust, filter and refine searches.

Acknowledgments

  1. I worked with my partner Nicole Kalcic this week. We messaged each other with questions as well as met in person.
  2. My excel work was based off of data given to me by Dr. Dahlqvist and Dr. Dionisio.
  3. All instructions came from the Week 8 instructions and were altered to fit my personal gene, dHAP4.
  4. While I worked with the people noted above, this individual journal entry was completed by me and not copied from another source.

References

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


Category Links
User Page Blair Hamilton
Weekly Assignments Bhamilton18 Week 2Bhamilton18 Week 3Bhamilton18 Week 4Animal QTLBhamilton18 Week 6Bhamilton18 Week 7Bhamilton18 Week 8Bhamilton18 Week 9Bhamilton18 Week 10Bhamilton18 Week 11Bhamilton18 Week 12Bhamilton18 Week 14Bhamilton18 Week 15
Weekly Assignment
Instructions
Week 1Week 2Week 3Week 4Week 5Week 6Week 7Week 8Week 9Week 10Week 11Week 12Week 14Week 15
Class Journals Class Journal Week 1Class Journal Week 2Class Journal Week 3Class Journal Week 4Class Journal Week 5Class Journal Week 6Class Journal Week 7Class Journal Week 8Class Journal Week 9Class Journal Week 10
Final Project Lights, Camera, InterACTION!Lights, Camera, InterACTION! Deliverables