Cdomin12 Week 8

From LMU BioDB 2019
Jump to navigation Jump to search

User Page

template: cdomin12

Assignment Page Individual Journal Entries Class Journal
Week 1 cdomin12 Week 1 Class Journal Week 1
Week 2 cdomin12 Week 2 Class Journal Week 2
Week 3 RAD53 / YPL153C Week 3 Class Journal Week 3
Week 4 cdomin12 Week 4 Class Journal Week 4
Week 5 IMG/VR Week 5 Class Journal Week 5
Week 6 cdomin12 Week 6 Class Journal Week 6
Week 7 cdomin12 Week 7 Class Journal Week 7
Week 8 cdomin12 Week 8 Class Journal Week 8
Week 9 cdomin12 Week 9 Class Journal Week 9
Week 10 cdomin12 Week 10 Class Journal Week 10
Week 11 cdomin12 Week 11 Skinny Genes
Week 12/13 Skinny Genes Quality Assurance Skinny Genes
Week 15 Skinny Genes Deliverables Skinny Genes

Purpose

To conduct statistical analysis using p values in order to further analyze and correct data while practicing and utilizing Excel skills and knowledge. Also, to begin using STEM software to practice the core competency of "Data Conversion and Interoperability".

Methods/Results

Statistical Analysis Part 1: ANOVA

  1. Created a new worksheet, naming it "wt_ANOVA"
  2. Copied the first three columns containing the "MasterIndex", "ID", and "Standard Name" from the "Master_Sheet" worksheet and pasted it into new worksheet. Copied the columns containing the data for wt and pasted it into new worksheet.
  3. At the top of the first column to the right of your data, created five column headers of the form wt_AvgLogFC_(TIME) where STRAIN is wt and (TIME) is 15, 30, etc.
  4. In the cell below the wt_AvgLogFC_t15 header, typed =AVERAGE
  5. Then highlighted all the data in row 2 associated with t15, pressed the closing paren key (shift 0),and pressed the "enter" key.
  6. This cell now contained the average of the log fold change data from the first gene at t=15 minutes.
  7. Clicked on this cell and positioned cursor at the bottom right corner. Double clicked black cross, and the formula was copied to the entire column of 6188 other genes.
  8. Repeated 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 wt_AvgLogFC_t120 calculation, created the column header wt_ss_HO.
  10. In the first cell below this header, typed =SUMSQ(
  11. Highlighted all the LogFC data in row 2 (but not the AvgLogFC), pressed the closing paren key (shift 0),and pressed the "enter" key.
  12. In the next empty column to the right of wt_ss_HO, created the column headers wt_ss_(TIME) as in (3).
  13. Made a note of how many data points 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". Counted carefully. Also, made 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).
  14. In the first cell below the header wt_ss_t15, type =SUMSQ(D2:G2)-COUNTA(D2:G2)*AA2^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> was replaced by the data range associated with t15.
    • The phrase <AvgLogFC_t15> was replaced by the cell number in which computed the AvgLogFC for t15, and the "^2" squares that value.
    • Upon completion of this single computation, used the Step (7) trick to copy the formula throughout the column.
  15. Repeated this computation for the t30 through t120 data points. Again, be sure to get the data for each time point, typed the right number of data points, and got the average from the appropriate cell for each time point, and copied the formula to the whole column for each computation.
  16. In the first column to the right of wt_ss_t120, created the column header wt_SS_full.
  17. In the first row below this header, type =SUM(AG2:AK2) and hit enter.
  18. In the next two columns to the right, created the headers wt_Fstat and wt_p-value.
  19. Recall the number of data points from (13): call that total n.
  20. In the first cell of the (STRAIN)_Fstat column, type =((23-5)/5)*(((AF2)-(AL2))/(AL2))

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.
    • Replaced the phrase wt_ss_HO with the cell designation.
    • Replaced the phrase <wt_SS_full> with the cell designation.
    • Copied to the whole column.
  1. In the first cell below the wt_p-value header, type =FDIST(AM2,5,23-5) replaced the phrase <(STRAIN)_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. . Copied to the whole column.
    • Clicked on cell A1 and clicked on the Data tab. Selected the Filter icon (looks like a funnel). Little drop-down arrows appeared at the top of each column. This enabled us to filter the data according to criteria we set.
    • Clicked on the drop-down arrow on your wt_p-value column. Selected "Number Filters". In the window that appears, set a criterion that filtered 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 appeared in the lower left hand corner of the window the number of rows that meet that criterion.
    • Undid any filters applied before making any additional calculations.

Results: 2,528/6189 records found to have P<0.05

Calculate the Bonferroni and p value Correction

Note: Be sure to undo any filters that you have applied before continuing with the next steps.

  1. Now we will perform adjustments to the p value to correct for the multiple testing problem. Labeled the next two columns to the right with the same label, wt_Bonferroni_p-value.
  2. Typed the equation =<wt_p-value>*6189, Upon completion of this single computation, used the Step (10) trick to copy the formula throughout the column.
  3. 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 wt_Bonferroni_p-value header: =IF(AO2>1,1,AO2), where "wt_Bonferroni_p-value" refers to the cell in which the first Bonferroni p value computation was made. Used the Step (10) trick to copy the formula throughout the column.

Calculate the Benjamini & Hochberg p value Correction

  1. Inserted a new worksheet named "wt_ANOVA_B-H".
  2. Copied and pasted the "MasterIndex", "ID", and "Standard Name" columns from previous worksheet into the first two columns of the new worksheet.
  3. For the following, used Paste special > Paste values. Copied unadjusted p values from ANOVA worksheet and pasted it into Column D.
  4. Selected all of columns A, B, C, and D. Sorted by ascending values on Column D. Clicked the sort button from A to Z on the toolbar, in the window that appears, sorted by column D, smallest to largest.
  5. Typed the header "Rank" in cell E1. Created a series of numbers in ascending order from 1 to 6189 in this column. This is the p value rank, smallest to largest. Typed "1" into cell E2 and "2" into cell E3. Selected both cells E2 and E3. Double-clicked 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. Calculated the Benjamini and Hochberg p value correction. Type wt_B-H_p-value in cell F1. Typed the following formula in cell F2: =(D2*6189)/E2 and press enter. Copy that equation to the entire column.
  7. Typed "STRAIN_B-H_p-value" into cell G1.
  8. Typed the following formula into cell G2: =IF(F2>1,1,F2) and pressed enter. Copied that equation to the entire column.
  9. Selected columns A through G. Sorted them by MasterIndex in Column A in ascending order.
  10. Copied column G and used Paste special > Paste values and pasted it into the next column on the right of your ANOVA sheet.
  • Zip and uploaded the .xlsx file that just created to the wiki.

Sanity Check: Number of genes significantly changed

  • Went to wt_ANOVA worksheet.
  • Selected row 1 (the row with your column headers) and selected the menu item Data > Filter > Autofilter (The funnel icon on the Data tab).
  • Clicked 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)?
    • How many genes have p < 0.01? and what is the percentage (out of 6189)?
    • How many genes have p < 0.001? and what is the percentage (out of 6189)?
    • How many genes have p < 0.0001? and what is the percentage (out of 6189)?
  • 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)?
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)?

Answer to above question are located at the following link: p value slide


Compared results with known data:

NSR1

unadjusted:2.86939E-10

Bonferroni-corrected:1.77586E-06

B-H-corrected: 8.87932E-07

average log fold change 15m:3.279225

average log fold change 30m:3.621

average log fold change 60 m:3.526525

average log fold change 90m:-2.04985

average log fold change 120m:-0.60622

Does NSR1 change expression due to cold shock in this experiment?

Yes, expression changes and it starts to show negative values indicating that expression of genes are less expressed during cold shock.

  • Found "your favorite gene" (from your Week 3 assignment) in the dataset:

Favorite Gene: YPL153C

unadjusted: 0.005415

Bonferroni-corrected: 33.50424111

B-H-corrected: 0.023931601

average log fold change 15m: -0.57335

average log fold change 30m: -0.78184

average log fold change 60 m: -0.7237

average log fold change 90m: 0.7496

average log fold change 120m: -0.25624

Does your favorite gene change expression due to cold shock in this experiment?

My favorite gene barely changes expression during cold shock. It stays close in negative values indicating that gene expression is not changing by much.

Clustering and GO Term Enrichment with stem (part 2)

  1. Prepared microarray data file for loading into STEM.
    • Inserted a new worksheet into your Excel workbook, and name it "wt_stem".
    • Selected all of the data from your "wt_ANOVA" worksheet and Paste special > paste values into "wt_stem" worksheet.
      • Leftmost column should have the column header "Master_Index". Renamed this column to "SPOT". Column B named "ID". Renamed this column to "Gene Symbol". Deleted the column named "Standard_Name".
      • Filtered the data on the B-H corrected p value to be > 0.05 (that's greater than in this case).
        • Once the data was filtered, selected all of the rows (except for your header row) and deleted the rows by right-clicking and choosing "Delete Row" from the context menu. Und idthe filter.
      • Deleted all of the data columns EXCEPT for the Average Log Fold change columns for each timepoint (for example, wt_AvgLogFC_t15, etc.).
      • Renamed the data columns with just the time and units (for example, 15m, 30m, etc.).
      • Saved work. Then used Save As to save this spreadsheet as Text (Tab-delimited) (*.txt). Clicked OK to the warnings and close your file.
        • Note that you should turn on the file extensions if you have not already done so.
  2. Downloaded and extracted the STEM software. Clicked here to go to the STEM web site.
    • Clicked on the download link and downloaded the stem.zip file to Desktop.
    • Unziped the file.
    • Inside the folder, double-clicked on the stem.jar to launched the STEM program.
  3. Running STEM
    1. In section 1 (Expression Data Info) of the the main STEM interface window, clicked on the Browse... button to navigate to and select your file.
      • Clicked on the radio button No normalization/add 0.
      • Checked the box next to Spot IDs included in the data file.
    2. In section 2 (Gene Info) of the main STEM interface window, left the default selection for the three drop-down menu selections for Gene Annotation Source, Cross Reference Source, and Gene Location Source as "User provided".
    3. Clicked the "Browse..." button to the right of the "Gene Annotation File" item. Browsed to "stem" folder and selected the file "gene_association.sgd.gz" and clicked Open.
    4. In section 3 (Options) of the main STEM interface window, made sure that the Clustering Method said "STEM Clustering Method" and did not change the defaults for Maximum Number of Model Profiles or Maximum Unit Change in Model Profiles between Time Points.
    5. In section 4 (Execute) clicked on the yellow Execute button to run STEM.

STEMCD.png

Data and Files

Zip File for Interim Deadline

text file for STEM analysis

Conclusion

Using the excel program, we were able to conduct p value correction by using ANOVA to calculate a Bonferroni p value and B-H p value. These are important skills in learning how to properly calculate and evaluate p values. With a big emphasis on p values in statistical analysis in research, it is important to more closely examine how these values are obtained and how to interpret them. The beginning of using the STEM program is also important in learning how to properly conduct data conversion and interoperability in order to use your data in multiple different programs and in multiple different formats.

Acknowledgments

1. I worked with User:Knguye66, User:Jcowan4, and User:Mavila9 for this assignment.

2."Except for what is noted above, this individual journal entry was completed by me and not copied from another source."

Cdomin12 (talk) 21:07, 22 October 2019 (PDT)

References

Cdomin12 (talk) 21:07, 22 October 2019 (PDT)