Cwong34 Week 8

From LMU BioDB 2017
Jump to: navigation, search

Data Information

Strain comparison: dSWI4

Individual dataset: Dataset for dSWI4

Filename: BIOL367_Fall2017_Dahlquist-microarray-data-master_20171017_CW.xlsx

Number of replicates for strain: 4

Time points: t30, t60, t90, t120

Electronic Notebook

Experimental Design and Getting Ready

  • In the Excel spreadsheet, there is a worksheet labeled "Master_Sheet".
    • 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 gene identifier from the Saccharomyces Genome Database.
    • The third column contains the Standard Name for each of the genes.
    • Each subsequent column contains the log2 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, "dASH1" for the Δash1 data, etc.). "LogFC" stands for "Log2 Fold Change" which is the Log2 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 wiki, the strain comparison and individual dataset that you will analyze, the filename, the number of replicates for each strain and each time point in your data.
  • NOTE: before beginning any analysis, immediately change the filename so that it contains your initials to distinguish it from other students' work.
  • The first thing you will do is to delete the data columns of the strains that you are not analyzing so that your file contains only the dSWI4 data that you will be working with (to make a smaller and less confusing file).
  • Next you will replace cells that have "NA" in them (which indicates missing data) with an empty cell.
    • Use the keyboard shortcut Control+F to open the "Find" dialog box and select the "Replace" tab.
    • Type "NA" in the Search field and don't type anything in the "Replace" field.
    • Click the button "Replace all" and record the number of replacements made in your electronic lab notebook: 3641.
    • Save early and often throughout this protocol. We are working with a large spreadsheet and glitches do occur.

Part 1: Statistical Analysis Part 1

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

  1. Create a new worksheet, naming it either "dSWI4_ANOVA" as appropriate.
  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 dSWI4 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 dSWI4_AvgLogFC_(TIME) where (TIME) is 30, t60, t90, and t120.
  4. In the cell below the dSWI4_AvgLogFC_t30 header, type =AVERAGE(
  5. Then highlight all the data in row 2 associated with dSWI4 and t30, 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=30 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 t60, t90, and the t120 data.
  9. Now in the first empty column to the right of the dSWI4_AvgLogFC_t120 calculation, create the column header dSWI4_ss_HO.
  10. In the first cell below this header, type =SUMSQ(
  11. Highlight all the LogFC data in row 2 for your dSWI4 (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 dSWI4_ss_HO, create the column headers dSWI4_ss_(TIME) as in (3).
  13. Make a note of how many data points you have at each time point for your strain: 4. Also, make a note of the total number of data points: 16.
  14. In the first cell below the header dSWI4_ss_t30, type =SUMSQ(<range of cells for logFC_t30>)-COUNTA(<range of cells for logFC_t30>)*<AvgLogFC_t30>^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_t30> should be replaced by the data range associated with t30.
    • The phrase <AvgLogFC_t30> should be replaced by the cell number in which you computed the AvgLogFC for t30, 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 t60 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 dSWI4_ss_t120, create the column header dSWI4_SS_full.
  17. In the first row below this header, type =sum(<range of cells containing "ss" for each timepoint>) and hit enter.
  18. In the next two columns to the right, create the headers dSWI4_Fstat and dSWI4_p-value.
  19. Recall the number of data points from (13), which was 16: call that total n.
  20. In the first cell of the dSWI4_Fstat column, type =((n-4)/4)*(<dSWI4_ss_HO>-<dSWI4_SS_full>)/<dSWI4_SS_full> and hit enter.
    • Don't actually type the n but instead use the total number of data points, which is 16.
    • Replace the phrase <dSWI4_ss_HO> with the cell designation, X2.
    • Replace the phrase <dSWI4_SS_full> with the cell designation, AC2.
    • Copy to the whole column.
  21. In the first cell below the dSWI4_p-value header, type =FDIST(<dSWI4_Fstat>,4,n-4) replacing the phrase <dSWI4_Fstat> with the cell designation and the "n" with 16. 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 dSWI4_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: 2802.

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, dSWI4_Bonferroni_p-value.
  2. Type the equation =<dSWI4_p-value>*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 dSWI4_Bonferroni_p-value header: =IF(dSWI4_Bonferroni_p-value>1,1,dSWI4_Bonferroni_p-value), where "dSWI4_Bonferroni_p-value" refers to the cell in which the first Bonferroni p value computation was made: AF2. 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 "dSWI4_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 dSWI4_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 "dSWI4_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 dSWI4_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)? 2802, 45.27%
    • How many genes have p < 0.01? and what is the percentage (out of 6189)? 1842, 29.76%
    • How many genes have p < 0.001? and what is the percentage (out of 6189)? 975, 15.75%
    • How many genes have p < 0.0001? and what is the percentage (out of 6189)? 512, 8.27%
  • 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)? 212, 3.43%
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)? 1874, 30.28%
  • 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.
    • PowerPoint table of dSWI4 values
  • 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 "STRAIN)_AvgLogFC_(TIME)" in step 3 of the ANOVA analysis. Does NSR1 change expression due to cold shock in this experiment?
    • Bonferroni corrected p-value: 0.000740422
    • B&H corrected p-value: 1.64E-07
    • AvgLogFC - t30: 3.252, t60: 3.565, t90: -3.693, t120: -0.847
    • NSR1 does change expression due to cold shock between t60 and t90.
  • 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?
    • Bonferroni corrected p-value for SPT15: 1
    • B&H corrected p-value for SPT15: 0.017649339
    • AvgLogFC - t30: 0.494, t60: 0.468, t90: -1.340, t120: -0.601
    • SPT15 does change expression due to cold shock between t60 and t90.

Summary paragraph

We gathered the relevant data to perform ANOVA tests. These tests gave us p-values, which told us if the data was significant. If the p-value was less than 0.05, then it meant there was a meaningful change in gene expression at that point, considering we're OK with it being by chance less than only 5% of the time. There were 2802 genes (45.27%) that had a p-value less than 0.05. To make the correction more stringent, we calculated the Bonferroni p-value correction, which gave only 212 genes (3.43%) with a p-value less than 0.05. To make the correction less stringent, we calculated the Benjamin & Hochberg p-value correction, which gave 1874 genes (30.28%) that had a p-value less than 0.05.

Acknowledgments

  1. I met with John Lopez, and we worked on our dataset for dSWI4 together.
  2. While I worked with the people noted above, this individual journal entry was completed by me and not copied from another source.

Cwong34 (talk) 16:33, 23 October 2017 (PDT)

References

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

cwong34

BIOL/CMSI 367-01: Biological Databases Fall 2017

Assignments

Journal Entries:

Shared Journals:

Group Project