Lucia I. Ramirez Week 11: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
(finish last of methods)
(add template and course category at bottom of page)
Line 140: Line 140:
<!---##* Open the GO list file you saved for this profile in Excel.  This list shows all of the Gene Ontology terms that are associated with genes that fit this profile.  Select the third row and then choose from the menu Data > Filter > Autofilter.  Filter on the "p-value" column to show only GO terms that have a p value of < 0.05.  '''''How many GO terms are associated with this profile at p < 0.05?'''''  The GO list also has a column called "Corrected p-value".  This correction is needed because the software has performed thousands of significance tests.  Filter on the "Corrected p-value" column to show only GO terms that have a corrected p value of < 0.05.  '''''How many GO terms are associated with this profile with a corrected p value < 0.05?'''''
<!---##* Open the GO list file you saved for this profile in Excel.  This list shows all of the Gene Ontology terms that are associated with genes that fit this profile.  Select the third row and then choose from the menu Data > Filter > Autofilter.  Filter on the "p-value" column to show only GO terms that have a p value of < 0.05.  '''''How many GO terms are associated with this profile at p < 0.05?'''''  The GO list also has a column called "Corrected p-value".  This correction is needed because the software has performed thousands of significance tests.  Filter on the "Corrected p-value" column to show only GO terms that have a corrected p value of < 0.05.  '''''How many GO terms are associated with this profile with a corrected p value < 0.05?'''''
##* Select 10 Gene Ontology terms from your filtered list (either p < 0.05 or corrected p < 0.05).  '''''Look up the definitions for each of the terms at [http://geneontology.org http://geneontology.org].  Write a paragraph that describes the biological interpretation of these GO terms.  In other words, why does the cell react to cold shock by changing the expression of genes associated with these GO terms?'''''-->
##* Select 10 Gene Ontology terms from your filtered list (either p < 0.05 or corrected p < 0.05).  '''''Look up the definitions for each of the terms at [http://geneontology.org http://geneontology.org].  Write a paragraph that describes the biological interpretation of these GO terms.  In other words, why does the cell react to cold shock by changing the expression of genes associated with these GO terms?'''''-->
{{Template: Lucia I. Ramirez}}
[[Category: BIOL398-04/S15]]

Revision as of 17:49, 13 April 2015

For the modeling project, we will analyze a Dahlquist lab microarray dataset comparing the wild type strain to a different strain of yeast. For the statistical analysis, I will analyze the wild type data and Lauren will analyze the alternate strain:

  • Wild type vs. Δhmo1: Lucia and Lauren

Excell Spreadsheet File name: Dahlquist_Lab_Microarray_Data_wt


Experimental Design

In the Excel spreadsheet, there is a worksheet labled "data". In this worksheet, each row contains the data for one gene (one spot on the microarray). The first column (labeled "ID") contains the gene identifier from the Saccharomyces Genome Database. The second 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).

Each of the column headings from the data begin with the experiment name ("wt" for wild type S. cerevisiae data, "dCIN5" for the Δcin5 data, etc., and Spar for the S. paradoxus data). "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).

Number of replicates for each strain:

t15 = 4

t30 = 5

t60 = 4

t90 = 5

t120 = 5

total number of data points = 23


Statistical Analysis Part 1: ANOVA

  1. Created a new worksheet, naming it stats
  2. Copied the first two columns of the data worksheet (containing ID and Standard Name) into the stats sheet.
  3. In the first row, columns C through G, created column labels of the form (STRAIN)_xbar_(TIME) where (STRAIN) is wt, dGLN3, etc., and (TIME) is 15, 30, etc.
  4. In the first row, columns H and I, created the column labels (STRAIN)_xbar_grand and (STRAIN)_ss_HO.
  5. In the first row, columns J through N, created the column labels (STRAIN)_ss_(TIME) as in (3).
  6. In the first row, columns O, P, and Q, created the column labels (STRAIN)_SS_full, Fstat and p-value.
  7. Computed the following:
    1. In cell C2, typed =AVERAGE(
    2. Clicked on the tab containing the data, and highlighted all the data in row 2 associated with (STRAIN) and t15, pressed the closing paren key (shift 0),and pressed the "enter" key.
    3. Clicked on the tab for the stats sheet. Cell C2 now contains the average of the log fold change data from the first gene at t=15 minutes.
    4. To copy the entire column of 6188 other genes, clicked on cell c2 and positioned cursor at the bottom right corner; cursor changes to a thin black plus sign (not a chubby white one); When it does, double click, and the formula.
    5. Moved to cell D2, and repeated (7) through (10) with the t30 data, to E2 with the t60 data, F2 with the t90, G2 with the 120.
    6. Moved to cell H2, and repeated (7) through (10) highlighting all the data for (STRAIN) in row 2 instead of the individual time points.
  8. Computed the following:
    1. In cell I2, typed =SUMSQ(
    2. Clicked on the data sheet's tab again, and highlight all the data in row 2 for your (STRAIN), press the closing paren key (shift 0),and press the "enter" key.
      • The data highlighted here will be same as in (12).
  9. Computed the following for the wt_ss columns:
    1. In cell J2, typed =SUMSQ(data!C2:F2) - 4*C2^2 and hit enter.
    2. In cell K2, typed =SUMSQ(data!G2:K2) - 5*D2^2 and hit enter.
    3. In cell L2, typed =SUMSQ(data!L2:O2) - 4*E2^2 and hit enter.
    4. In cell M2, typed =SUMSQ(data!P2:T2) - 5*F2^2 and hit enter.
    5. In cell N2, typed =SUMSQ(data!U2:Y2) - 5*G2^2 and hit enter.
      • The phrase "data!C2:F2" should be the data associated with t15. The number "4" is the number of data points (note that cells c2, d2, e2, f2 contain 4 data points). The phrase "stats!c2" gets the average you computed in Step (8) for t15, and the "^2" squares that value. Upon completion of this single computation, use the Step (10) trick to copy the formula throughout the column.
  10. Once I populated cells J2 through N2, click on o2 and type =sum(j2:n2) and hit enter. Copy to the whole column.
  11. Recalled the number of data points, which is 23 and called that total n and computed the following:
    1. In cell P2, type =((n-5)/5)*(i2-o2)/o2 and hit enter. Copied to the whole column.
    2. In cell Q2, type =FDIST(P2,5,n-5). Copied to the whole column.
  12. Performed adjustments to the p value to correct for the multiple testing problem. Labeled column R "STRAIN_Bonferroni_p-value".
  13. Typed the equation =q2*6189. Copied the whole column.
  14. Replaced any corrected p value that is greater than 1 by the number 1 by typing the following formula into cell s2: =IF(r2>1,1,r2)
Calculate the Benjamini & Hochberg p value Correction
  1. Inserted a new worksheet named "B&H".
  2. First, created an index column by first typing "Index" into cell A1. Then type "1" into cell A2 and "2" into cell A3. Select both cells A2 and A3. Double-clicked on the plus sign on the lower right-hand corner of selection to fill the column with a series of numbers from 1 to 6189.
  3. Copied and pasted the column of ID's from one of the previous worksheets into column B.
  4. For the following, used Paste special > Paste values. Copy Column Q (the unadjusted p values) from the stats worksheet and paste it into Column C.
  5. Selected all of columns A, B, and C. Sorted by ascending values on Column C. Click the sort button from A to Z on the toolbar, in the window that appears, sort by column C, smallest to largest.
  6. Typed the header "Rank" in cell D1. Repeated what I did in step 2 to create a series of numbers in ascending order from 1 to 6189. This is the p value rank, smallest to largest.
  7. Then calculated the Benjamini and Hochberg p value correction. Typed "STRAIN_B-H_p-value" in cell E1. Typed the following formula in cell E2: =(C2*6189)/D2 and pressed enter. Copied that equation to the entire column using the trick you learned last week.
  8. Typed "STRAIN_B-H_p-value" into cell F1.
  9. Typed the following formula into cell F2: =IF(E2>1,1,E2) and pressed enter. Copied that equation to the entire column using the trick you learned last week.
  10. Selected columns A through F. Then sorted them by your Index in Column A in ascending order.
  11. Copied column F and use Paste special < Paste values to paste it into column T of your stats sheet.


Sanity Check: Number of genes significantly changed

Check point: make sure data analysis was performed correctly. Find out the number of genes that are significantly changed at various p value cut-offs.

  • Went to the "stats" 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). Little drop-down arrows appeared at the top of each column. This enabled me to filter the data according to criteria set.
  • Clicked on the drop-down arrow on Column Q. Selected "Custom". In the window that appears, set the following criterion that will filter your data for the following p values:
    • How many genes have p < 0.05? and what is the percentage (out of 6189)? 2378 (~38%)
    • How many genes have p < 0.01? and what is the percentage (out of 6189)? 1527 (~25%)
    • How many genes have p < 0.001? and what is the percentage (out of 6189)? 860 (~14%)
    • How many genes have p < 0.0001? and what is the percentage (out of 6189)? 460 (~7%)
  • When I used a p value cut-off of p < 0.05, I am saying that I would have seen a gene expression change that deviates this far from zero by chance less than 5% of the time.
  • I 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. To apply a more stringent criterion to our p values, I 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, I filtered my 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)? 228 (~4%)
    • How many genes are p < 0.05 for the Benjamini and Hochberg-corrected p value? and what is the percentage (out of 6189)? 228 (~4%)
  • 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.
  • 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 (8.85971E-05), Bonferroni-corrected (8.85971E-05), and B-H-corrected p values(3.85205E-06)? What is its average Log fold change at each of the timepoints in the experiment?
  • You and your partner should compare the numbers you got between the wild type strain and the other strain you have been assigned. You will be reporting this information in both your final paper and final presentation in the course, organized as a table.

Powerpoint slide depicting percentages described above: Media: BIOL398-04 S15 p-value slide Lsquared.pptx


Clustering and Gene Ontology Analysis with STEM

  1. Began by downloading and extracting the STEM software. Click here to go to the STEM web site.
    • Clicked on the download link, register, and download the stem.zip file to your Desktop.
    • Unzipped the file. Right clicked on the file icon and select the menu item 7-zip > Extract Here.
    • This will create a folder called stem. Inside the folder, double-click on the stem.cmd to launch the STEM program.
  2. Prepare your microarray data file for loading into STEM.
    • Inserted a new worksheet into your Excel workbook, and name it "stem".
    • Copied the "Index" column from your "B&H" worksheet and paste it into column A of your "stem" worksheet. Selected all of the data from my "stats" worksheet and Pasted special > paste values into your "stem" worksheet, starting with column B.
      • My leftmost column had the column header "Index". Renamed this column to "SPOT". Column B is named "ID". Renamed this column to "Gene Symbol".
      • Filtered the data on the B-H corrected p value to be > 0.05 (that's greater than in this case).
        • Once the data has been 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. Undid the filter. This ensured that it clusters only the genes with a "significant" change in expression and not the noise.
      • Deleted all of the data columns EXCEPT for the Average Log Fold change columns for each timepoint (for example, wt_xbar_t15, etc.).
      • Renamed the data columns with just the time and units (for example, 15m, 30m, etc.).
      • Saved your work. Then used Save As to save this spreadsheet as Text (Tab-delimited) (*.txt). Click OK to the warnings and close your file.
        • Turned on the file extensions by following the procedure on the class Help page.
  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, selected Saccharomyces cerevisiae (SGD), from the drop-down menu for Gene Annotation Source. Selected No cross references, from the Cross Reference Source drop-down menu. Selected No Gene Locations from the Gene Location Source drop-down menu.
    3. 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.
    4. In section 4 (Execute) clicked on the yellow Execute button to run STEM.
  4. Viewing and Saving STEM Results
    1. A new window opened called "All STEM Profiles (1)". Each box corresponds to a model expression profile. Colored profiles have a statistically significant number of genes assigned; they are arranged in order from most to least significant p value. Profiles with the same color belong to the same cluster of profiles. The number in each box is simply an ID number for the profile.
      • Clicked on the button that says "Interface Options...". At the bottom of the Interface Options window that appears below where it says "X-axis scale should be:", clicked on the radio button that says "Based on real time". Then closed the Interface Options window.
      • Took a screenshot of this window and pasted it into a PowerPoint presentation to save your figures.
    2. Clicked on each of the profiles to open a window showing a more detailed plot containing all of the genes in that profile.
      • Took a screenshot of each of the individual profile windows and saved the images in your PowerPoint presentation.Media: LR STEM Results.pptx
      • At the bottom of each profile window, there are two yellow buttons "Profile Gene Table" and "Profile GO Table". For each of the profiles, click on the "Profile Gene Table" button to see the list of genes belonging to the profile. In the window that appears, click on the "Save Table" button and save the file to your desktop. Make your filename descriptive of the contents, e.g. "wt_profile#_genelist.txt", where you replace the number symbol with the actual profile number.
      • For each of the profiles, click on the "Profile GO Table" to see the list of Gene Ontology terms belonging to the profile. In the window that appears, click on the "Save Table" button and save the file to your desktop. Make your filename descriptive of the contents, e.g. "wt_profile#_GOlist.txt", where you use "wt", "dGLN3", etc. to indicate the dataset and where you replace the number symbol with the actual profile number. At this point you have saved all of the primary data from the STEM software and it's time to interpret the results!
  5. Analyzing and Interpreting STEM Results
    1. Select one of the profiles you saved in the previous step for further intepretation of the data. We suggest that you choose one that has a pattern of up- or down-regulated genes at the early (first three) timepoints. I chose profile 37 Answer the following:
      • Why did you select this profile? In other words, why was it interesting to you? Simply because it looked like an upside down parabola.
      • How many genes belong to this profile? 255
      • How many genes were expected to belong to this profile? 31.8
      • What is the p value for the enrichment of genes in this profile? 1.7E-143 Bear in mind that we just finished computing p values to determine whether each individual gene had a significant change in gene expression at each time point. This p value determines whether the number of genes that show this particular expression profile across the time points is significantly more than expected.

Back to User page: Lucia I. Ramirez

Journals/Assignments

Week 1

Week 2

Week 3

Week 4

Week 5

Week 6

Week 7

Week 8

Week 9

Week 10

Week 11

Week 12

Week 13

Week 14

Week 15