Difference between revisions of "Dbashour Week 8"
From LMU BioDB 2017
(added questions) |
(syntax fix) |
||
Line 21: | Line 21: | ||
#Upon completion of this single computation, use the Step (7) trick to copy the formula throughout the column. | #Upon completion of this single computation, use the Step (7) trick to copy the formula throughout the column. | ||
#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. | #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 (STRAIN)_ss_t120, create the column header (STRAIN)_SS_full. | + | #In the first column to the right of (STRAIN)_ss_t120, create the column header (STRAIN)_SS_full. |
− | In the first row below this header, type =sum(<range of cells containing "ss" for each timepoint>) and hit enter. | + | #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 (STRAIN)_Fstat and (STRAIN)_p-value. | + | #In the next two columns to the right, create the headers (STRAIN)_Fstat and (STRAIN)_p-value. |
− | Recall the number of data points from (13): call that total n. | + | #Recall the number of data points from (13): call that total n. |
− | In the first cell of the (STRAIN)_Fstat column, type =((n-5)/5)*(<(STRAIN)_ss_HO>-<(STRAIN)_SS_full>)/<(STRAIN)_SS_full> and hit enter. | + | #In the first cell of the (STRAIN)_Fstat column, type =((n-5)/5)*(<(STRAIN)_ss_HO>-<(STRAIN)_SS_full>)/<(STRAIN)_SS_full> and hit enter. |
− | Don't actually type the n but instead use the number from (13). Also note that "5" is the number of timepoints and the dSWI4 strain has 4 timepoints (it is missing t15). | + | #Don't actually type the n but instead use the number from (13). Also note that "5" is the number of timepoints and the dSWI4 strain has 4 timepoints (it is missing t15). |
− | Replace the phrase (STRAIN)_ss_HO with the cell designation. | + | #Replace the phrase (STRAIN)_ss_HO with the cell designation. |
− | Replace the phrase <(STRAIN)_SS_full> with the cell designation. | + | #Replace the phrase <(STRAIN)_SS_full> with the cell designation. |
− | Copy to the whole column. | + | #Copy to the whole column. |
− | In the first cell below the (STRAIN)_p-value header, type =FDIST(<(STRAIN)_Fstat>,5,n-5) replacing the phrase <(STRAIN)_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. (Again, note that the number of timepoints is actually "4" for the dSWI4 strain). Copy to the whole column. | + | #In the first cell below the (STRAIN)_p-value header, type =FDIST(<(STRAIN)_Fstat>,5,n-5) replacing the phrase <(STRAIN)_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. (Again, note that the number of timepoints is actually "4" for the dSWI4 strain). 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. | + | #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 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 (STRAIN)_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. | + | #Click on the drop-down arrow on your (STRAIN)_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. | + | #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 | + | #Calculate the Bonferroni and p value Correction |
Revision as of 22:28, 19 October 2017
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.
- Create a new worksheet, naming it either "(STRAIN)_ANOVA" as appropriate. For example, you might call yours "wt_ANOVA" or "dHAP4_ANOVA"
- 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.
- At the top of the first column to the right of your data, create five column headers of the form (STRAIN)_AvgLogFC_(TIME) where (STRAIN) is your strain designation and (TIME) is 15, 30, etc.
- In the cell below the (STRAIN)_AvgLogFC_t15 header, type =AVERAGE(
- Then highlight all the data in row 2 associated with (STRAIN) 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 (STRAIN)_AvgLogFC_t120 calculation, create the column header (STRAIN)_ss_HO.
- In the first cell below this header, type =SUMSQ(
- Highlight all the LogFC data in row 2 for your (STRAIN) (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 (STRAIN)_ss_HO, create the column headers (STRAIN)_ss_(TIME) as in (3).
- Make a note of how many data points you have at each time point for your strain. For most of the strains, it will be 4, but for dHAP4 t90 or t120, it will be "3", and for the wild type it will be "4" or "5". Count carefully. Also, make a note of the total number of data points. Again, for most strains, this will be 20, but for example, dHAP4, this number will be 18, and for wt it should be 23 (double-check).
- In the first cell below the header (STRAIN)_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 <number of data points> should be replaced by the number of data points for that timepoint (either 3, 4, or 5).
- 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.
- 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 (STRAIN)_ss_t120, create the column header (STRAIN)_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 (STRAIN)_Fstat and (STRAIN)_p-value.
- Recall the number of data points from (13): call that total n.
- In the first cell of the (STRAIN)_Fstat column, type =((n-5)/5)*(<(STRAIN)_ss_HO>-<(STRAIN)_SS_full>)/<(STRAIN)_SS_full> and hit enter.
- Don't actually type the n but instead use the number from (13). Also note that "5" is the number of timepoints and the dSWI4 strain has 4 timepoints (it is missing t15).
- Replace the phrase (STRAIN)_ss_HO with the cell designation.
- Replace the phrase <(STRAIN)_SS_full> with the cell designation.
- Copy to the whole column.
- In the first cell below the (STRAIN)_p-value header, type =FDIST(<(STRAIN)_Fstat>,5,n-5) replacing the phrase <(STRAIN)_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. (Again, note that the number of timepoints is actually "4" for the dSWI4 strain). 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 (STRAIN)_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