Imacarae Week 8
Jump to navigation
Jump to search
Contents
Purpose
- With the ANOVA test, it is to determine if any genes had a gene expression change that was significantly different than zero at any timepoint.
- With the sanity checks, it is to ensure that the data analysis was performed correctly.
- To learn to run the data with STEM.
Methods and Results
Statistical Analysis Part 1: ANOVA
- We created a new worksheet, naming it "dCIN5_ANOVA".
- We copied the first three columns containing the "MasterIndex", "ID", and "Standard Name" from the "Master_Sheet" worksheet for our strain and paste it into your the worksheet.
- At the top of the first column to the right of the data, we created five column headers of the form dCIN5_AvgLogFC_(TIME) where (TIME) is 15, 30, 60, 90, and 120.
- In the cell below the dCIN5_AvgLogFC_t15 header, we typed
=AVERAGE(
- Then we highlighted all the data in row 2 associated with t15, pressed the closing paren key (shift 0),and pressed enter.
- This cell now contains the average of the log fold change data from the first gene at t=15 minutes.
- We clicked on this cell and positioned the cursor at the bottom right corner to copy the entire column of 6188 other genes.
- We repeated steps 4-7 with the t30, t60, t90, and the t120 data.
- In the first empty column to the right of the dCIN5_AvgLogFC_t120 calculation, we created the column header dCIN5_ss_HO.
- In the first cell below this header, we typed
=SUMSQ(
- We highlighted all the LogFC data in row 2 (but not the AvgLogFC), pressed the closing paren key (shift 0),and pressed the enter.
- In the empty column to the right of dCIN5_ss_HO, we created the column headers dCIN5_ss_(TIME) as in (3).
- We made a note of how many data points we have at each time point for our strain. For this strain, it is 20.
- In the first cell below the header dCIN5)_ss_t15, we typed
=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, we used Step (7) trick to copy the formula throughout the column.
- The
- We repeated this computation for the t30 through t120 data points. We were sure to get the data right for each time point for each cell, column, and row for each computation.
- In the first column to the right of dCIN5_ss_t120, we created the column header dCIN5_SS_full.
- In the first row below this header, we typed
=sum(<range of cells containing "ss" for each timepoint>)
and hit enter. - In the next two columns to the right, we created the headers dCIN5_Fstat and dCIN5_p-value.
- Recall the number of data points from (13): call that total n. This is n=20.
- In the first cell of the dCIN5_Fstat column, type
=((20-5)/5)*(<dCIN5_ss_HO>-<dCIN5_SS_full>)/<dCIN5_SS_full>
and hit enter.- We replaced the phrase dCIN5_ss_HO with the cell designation.
- We replaced the phrase <dCIN5_SS_full> with the cell designation.
- We copied it to the whole column.
- In the first cell below the dCIN5_p-value header, we type
=FDIST(<dCIN5_Fstat>,5,n-5)
replacing the phrase <dCIN5_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. We copied it to the whole column. - Before we moved on to the next step, we performed a sanity check to see if we did all of these computations correctly.
- We clicked on cell A1 and click on the Data tab and selected the Filter icon. Little drop-down arrows appeared at the top of each column. This enabled us to filter the data according to criteria we set.
- We clicked on the drop-down arrow on your dCIN5_p-value column, select "Number Filters". In the window that appears, we set a criterion so that the p value is less than 0.05.
- Excel now only displayed the rows that correspond to data meeting that filtering criterion. The number that appears in the lower left hand corner of the window gives the number of rows that meet that criterion. We checked our results with each other to make sure that the computations were performed correctly.
Calculate the Bonferroni and p value Correction
- We performed adjustments to the p value to correct for the multiple testing problem. We labeled the next two columns to the right with the same label, dCIN5_Bonferroni_p-value.
- We typed the equation
=<dCIN5_p-value>*6189
. Upon completion of this single computation, we used the Step (10) trick to copy the formula throughout the column. - We replaced 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(dCIN5_Bonferroni_p-value>1,1,dCIN5_Bonferroni_p-value)
, where "dCIN5_Bonferroni_p-value" refers to the cell in which the first Bonferroni p value computation was made. We used the Step (10) trick again to copy the formula throughout the column.
Calculate the Benjamini & Hochberg p value Correction
- Insert a new worksheet named "(STRAIN)_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 (STRAIN)_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 "STRAIN_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.
- Zip and upload the .xlsx file that you have just created to the wiki.