# Karina Alvarez Week 11

## Electronic Lab Notebook

### Methods

#### Statistical Analysis Part 1: ANOVA

2. 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).
3. Create a new worksheet, naming it stats.
4. Copy the first two columns of the data worksheet (containing ID and Standard Name) into the stats sheet.
5. In the first row, columns c through g, create column labels of the form (STRAIN)_xbar_(TIME) where (STRAIN) is wt, dGLN3, etc., and (TIME) is 15, 30, etc.
6. In the first row, columns h and i, create the column labels (STRAIN)_xbar_grand and (STRAIN)_ss_HO.
7. In the first row, columns j through n, create the column labels (STRAIN)_ss_(TIME) as in (3).
8. In the first row, columns o, p, and q, create the column labels (STRAIN)_SS_full, Fstat and p-value.
9. Now we're ready to compute. In cell c2, type =AVERAGE(
10. Then click on the tab containing the data, and highlight all the data in row 2 associated with (STRAIN) and t15, press the closing paren key (shift 0),and press the "enter" key.
11. Click 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.
12. Click on cell c2 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.
13. Move to cell d2, and repeat (7) through (10) with the t30 data, to e2 with the t60 data, f2 with the t90, g2 with the 120.
14. Move to cell h2, and repeat (7) through (10) highlighting all the data for (STRAIN) in row 2 instead of the individual time points.
15. Now, we move to cell i2. Type =SUMSQ(
16. Click 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).
17. Make a note of how many data points you have at each time point. In most cases this number will be 4, but for some strains and times it may be 5. Count carefully. Also, make a note of the total number of data points. For most strains this number will be 20, but for wt it may be 23.
18. In cell j2, type =SUMSQ(data!C2:F2)-4*stats!C2^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.
19. In cells k2 through n2, repeat (16) 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 (d2,e2,f2,g2) for each time point, and copy the formula to the whole column for each computation.
20. Once you've populated cells j2 through n2, click on o2 and type =sum(j2:n2) and hit enter. Copy to the whole column.
21. Recall the number of data points from (15): call that total n.
22. In cell p2, type =((n-5)/5)*(i2-o2)/o2 and hit enter. Don't actually type the n but instead use the number from (20). copy to the whole column.
23. In cell q2, type =FDIST(P2,5,n-5) replacing n as in (20) with the number of data points total. Copy to the whole column.
24. Now we will perform adjustments to the p value to correct for the multiple testing problem. Label column r "STRAIN_Bonferroni_p-value".
25. Type the equation =q2*6189, Upon completion of this single computation, use the Step (10) trick to copy the formula throughout the column.
26. Replace 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. Insert a new worksheet named "B&H".
2. First, create 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-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. We will use this to put the genes back in order at the end of these calculations.
3. Copy and paste the column of ID's from one of the previous worksheets into column B.
4. For the following, use Paste special > Paste values. Copy Column Q (the unadjusted p values) from the stats worksheet and paste it into Column C.
5. Select all of columns A, B, and C. Sort 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. Type the header "Rank" in cell D1. Repeat what you 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. Now you can calculate the Benjamini and Hochberg p value correction. Type "STRAIN_B-H_p-value" in cell E1. Type the following formula in cell E2: =(C2*6189)/D2 and press enter. Copy that equation to the entire column using the trick you learned last week.
8. Type "STRAIN_B-H_p-value" into cell F1.
9. Type the following formula into cell F2: =IF(E2>1,1,E2) and press enter. Copy that equation to the entire column using the trick you learned last week.
10. Select columns A through F. Now sort them by your Index in Column A in ascending order.
11. Copy 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

Before we move on to clustering and the biological analysis of the data, we want to perform a 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.

1. Go to the "stats" worksheet.
2. Select row A 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.
3. Click on the drop-down arrow on Column Q. Select "Custom". 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.
• 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)?
5. To see the relationship between the Bonferroni and Benjamini-Hochberg corrections, 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)?
6. Compare the results with known data:
• 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?
• Compare the numbers for the wild type (analyzed by Alyssa N Gomes) and the Δgln3
• Record this information using sample PowerPoint slide making sure to create a title for the slide that gives the "message" of the slide.
• Upload the slide onto OpenWetWare
##### Clustering and Gene Ontology Analysis with STEM
• Click on the download link, register, and download the stem.zip file to your Desktop.
• Unzip the file. In Seaver 120, you can right click 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.
• In Seaver 120, we encountered an issue where the program would not launch on the Windows XP machines due to a lack of memory. (Even though the computers have been upgraded to Windows 7, do this to launch the program.) To get around this problem, launch STEM from the command line.
• Go to the start menu and click on Programs > Accessories > Command Prompt.
• You will need to navigate to the directory (folder) in which the STEM program resides. If you followed the instructions above and extracted the stem folder to the Desktop, type the following: cd Desktop\stem and press "Enter".
• To launch the program then type: java -mx512M -jar stem.jar -d defaults.txt and press "Enter". This will launch the program with less memory allocated to it.
• Insert a new worksheet into your Excel workbook, and name it "stem".
• Copy the "Index" column from your "B&H" worksheet and paste it into column A of your "stem" worksheet. Select all of the data from your "stats" worksheet and Paste special > paste values into your "stem" worksheet, starting with column B.
• Your leftmost column should have the column header "Index". Rename this column to "SPOT". Column B should be named "ID". Rename this column to "Gene Symbol".
• Filter 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, select all of the rows (except for your header row) and delete the rows by right-clicking and choosing "Delete Row" from the context menu. Undo the filter. This ensures that we will cluster only the genes with a "significant" change in expression and not the noise.
• Delete all of the data columns EXCEPT for the Average Log Fold change columns for each timepoint (for example, wt_xbar_t15, etc.).
• Rename the data columns with just the time and units (for example, 15m, 30m, etc.).
• Save your work. Then use Save As to save this spreadsheet as Text (Tab-delimited) (*.txt). Click OK to the warnings and close your file.
• Note that it would be a good idea to turn 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, click on the Browse... button to navigate to and select your file.
• Check the box next to Spot IDs included in the data file.
2. In section 2 (Gene Info) of the main STEM interface window, select Saccharomyces cerevisiae (SGD), from the drop-down menu for Gene Annotation Source. Select No cross references, from the Cross Reference Source drop-down menu. Select No Gene Locations from the Gene Location Source drop-down menu.
3. In section 3 (Options) of the main STEM interface window, make sure that the Clustering Method says "STEM Clustering Method" and do 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) click on the yellow Execute button to run STEM.
4. Viewing and Saving STEM Results
1. A new window will open 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.
• Click 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:", click on the radio button that says "Based on real time". Then close the Interface Options window.
• Take a screenshot of this window (on a PC, simultaneously press the Alt and PrintScreen buttons to save the view in the active window to the clipboard) and paste it into a PowerPoint presentation to save your figures.
2. Click on each of the SIGNIFICANT profiles to open a window showing a more detailed plot containing all of the genes in that profile.
• Take a screenshot of each of the individual profile windows and save the images in your PowerPoint presentation.
• 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 significant 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. Answer the following:
• Why did you select this profile? In other words, why was it interesting to you?
• How many genes belong to this profile?
• How many genes were expected to belong to this profile?
• What is the p value for the enrichment of genes in this profile? 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.
• 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. 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?
• To easily look up the definitions, go to http://geneontology.org.
• Copy and paste the GO ID (e.g. GO:0044848) into the search field at the upper left of the page called "Search GO Data".
• In the results page, click on the button that says "Link to detailed information about <term>, in this case "biological phase"".
• The definition will be on the next results page, e.g. here.

### Data and Observations

• Data points for each time point:
• t15: 4
• t30: 5
• t60: 4
• t90: 5
• t120: 5
• How many genes have p < 0.05? What is the percentage?
• 2378 genes out of 6189 = 38.42%
• How many genes have p<0.01? What is the percentage?
• 1527 genes out of 6189 = 24.67%
• How many genes have p<0.001? What is the percentage?
• 860 genes out of 6189 = 13.90%
• How many genes have p<0.0001? What is the percentage?
• 460 genes out of 6189 = 7.43%
• How many genes are p <0.05 for the Bonferroni-corrected p value? What is the percentage?
• 228 out of 6189 genes = 3.68%
• How many genes are p<0.05 for the Benjami and Hochberg-corrected p value? What is the percentage?
• 1656 out of 6189 genes = 26.76%
• Unadjusted, Bonferroni-corrected NSR1 p value = 1.43E-8
• Unadjusted B-H corrected NSR1 p value = 9.2E-5

Stem Results

• Why did you select this profile? In other words, why was it interesting to you?
• I selected profile 28 because it rose very steadily for the first 60 minutes before dropping drastically after 60m. All other profiles alternatively decreased and increased for every time point (approximately) but this one had a trend of increasing expression for the first 60m and then a decrease in the last 60m.
• How many genes belong to this profile?
• 95 genes belong to this profile.
• How many genes were expected to belong to this profile?
• 18.7 genes are expected to belong to this profile.
• What is the p value for the enrichment of genes in this profile?
• p value = 9.3E-37
• How many GO terms are associated with this profile at p<0.05?
• 44 terms have p<0.05.
• How many GO terms are associated with this profile at a corrected p value <0.05?
• 5 terms have corrected p value < 0.05.
• Define 10 terms from the GO terms list for your profile. Why does the cell react to the cold shock by changing the expression of genes associated with these GO terms?
• cellular amino acid biosynthetic process: the chemical reactions and pathways resulting in the formation of amino acids, organic acids containing one or more substituents
• cellular amino acid metabolic process: the chemical reactions and pathways involving amino acids, carboxylic acids containing one or more amino groups, as carried out by individual cells.
• carboxylic acid biosynthesis process: the chemical reactions and pathways resulting in the formation of carboxylic acids, any organic acid containing one or more carboxyl groups.
• organic acid biosynthesis process: the chemical reactions and pathways resulting in the formation of organic acids, any acidic compound containing carbon in covalent linkage
• aspartate family amino acid metabolic process: the chemical reactions and pathways involving amino acids of the aspartate family, comprising asparagine, aspartate, lysine, methionine, and threonine.
• small molecule biosynthetic process: the chemical reactions and pathways resulting in the formation of small molecule, any low molecular weight, monomeric, non-encoded molecule
• aspartate family amino acid biosynthesis process: the chemical reactions and pathways resulting in the formation of amino acids of the aspartate family, comprising asparagine, aspartate, lysine, methionine, and threonine.
• response to stress: any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a disturbance in organismal or cellular homeostasis, usually, but not necessarily, exogenous (eg temperature, humidity, ionizing radiation)
• glutamine family amino acid metabolic process: the chemical reactions and pathways involving amino acids of the glutamate family, comprising arginine, glutamate, glutamine, and proline
• phosphorylation: the process of introducing a phosphate group into a molecule, usually with the formation of a phosphoric ester, a phosphoric anhydride, or a phosphoric amide
• all term definitions from http://geneontology.org
• Analysis of stem results: