Jcowan4 Journal Week 8
Contents
Purpose
The purpose was to be able to conduct the "analyze" step of the data life cycle for a DNA microarray dataset (used to make sure data values are accurate), to develop an intuition about what different p-value cut-offs mean (understand the ratios and what fits a category) and to keep a detailed electronic laboratory notebook to facilitate reproducible research(to instruct any person to get the same exact results we got.
Methods/Results
Part 1
- We created a new worksheet, named it "wt_ANOVA"
- We copied the first three columns containing the "MasterIndex", "ID", and "Standard Name" from the "Master_Sheet" worksheet for our strain and pasted it into the worksheet. Then we copied the columns containing the data for our strain and pasted it into the worksheet.
- At the top of the first column to the right of our data, we created five column headers of the form wt_AvgLogFC_(15,30,60,90,120)
- In the cell below the wt_AvgLogFC_t15 header, we type "=AVERAGE"
- Then we highlighted all the data in row 2 associated with t15, then we pressed the enter (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. When it does, double click, and the formula will be copied to the entire column of 6188 others genes.
- We repeated steps (4) through (8) with the t30, t60, t90, and the t120 data.
- Now in the first empty column to the right of the wt_AvgLogFC_t120 calculation, we created the column header wt_ss_HO.
- In the first cell below this header, we typed "=SUMSQ"
- Then highlighted all the LogFC data in row 2 (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 wt_ss_HO, create the column headers wt_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 wt_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 <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.
- The
- 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 wt_ss_t120, create the column header wt_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 wt_Fstat and wt_p-value.
- Recall the number of data points from (13): call that total n.
- In the first cell of the wt_Fstat column, type
=((n-5)/5)*(<wt_ss_HO>-<wt_SS_full>)/<wt_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.
- Replace the phrase wt_ss_HO with the cell designation.
- Replace the phrase <wt_SS_full> with the cell designation.
- Copy to the whole column.
- In the first cell below the wt_p-value header, type
=FDIST(<wt_Fstat>,5,n-5)
replacing the phrase <wt_Fstat> with the cell designation and the "n" as in (13) with the number of data points total. . 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 wt_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.
- Be sure to undo any filters that you have applied before making any additional calculations.
Calculate the Bonferroni and p value Correction
Note: Be sure to undo any filters that you have applied before continuing with the next steps.
- Now we will perform adjustments to the p value to correct for the multiple testing problem. Label the next two columns to the right with the same label, wt_Bonferroni_p-value.
- Type the equation
=<wt_p-value>*6189
, Upon completion of this single computation, use the Step (10) trick to copy the formula throughout the column. - Replace 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(wt_Bonferroni_p-value>1,1,wt_Bonferroni_p-value)
, where "wt_Bonferroni_p-value" refers to the cell in which the first Bonferroni p value computation was made. Use the Step (10) trick to copy the formula throughout the column.
Calculate the Benjamini & Hochberg p value Correction
- Insert a new worksheet named "wt_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 wt_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.
Part 2
- Prepare your microarray data file for loading into STEM.
- Insert a new worksheet into your Excel workbook, and name it "wt_stem".
- Select all of the data from your "wt_ANOVA" worksheet and Paste special > paste values into your "wt_stem" worksheet.
- Your leftmost column should have the column header "Master_Index". Rename this column to "SPOT". Column B should be named "ID". Rename this column to "Gene Symbol". Delete the column named "Standard_Name".
- 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_AvgLogFC_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 you should turn on the file extensions if you have not already done so.
- Now download and extract the STEM software. Click here to go to the STEM web site.
- Click on the download link 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
.- You now need to download the Gene Ontology and yeast GO annotations and place them in this folder.
- Click here to download the file "gene_ontology.obo".
- Click here to download the file "gene_association.sgd.gz".
- Inside the folder, double-click on the
stem.jar
to launch the STEM program.
- Click on the download link and download the
- Running STEM
- 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.
- Click on the radio button No normalization/add 0.
- Check the box next to Spot IDs included in the data file.
- In section 2 (Gene Info) of the main STEM interface window, leave the default selection for the three drop-down menu selections for Gene Annotation Source, Cross Reference Source, and Gene Location Source as "User provided".
- Click the "Browse..." button to the right of the "Gene Annotation File" item. Browse to your "stem" folder and select the file "gene_association.sgd.gz" and click Open.
- 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.
- In section 4 (Execute) click on the yellow Execute button to run STEM.
- If you get an error, there are some known reasons why stem might not work. If you had #DIV/0! errors in your input file, it will cause problems. Re-open your file and open the Find/Replace dialog. Search for #DIV/0!, but don't put anything in the replace field. Click "Replace all" to remove the #DIV/0! errors. Then save your file and try again with stem.
- This is the stopping point for the Week 8 assignment.
- 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.
- Viewing and Saving STEM Results
- 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
andPrintScreen
buttons to save the view in the active window to the clipboard) and paste it into a PowerPoint presentation to save your figures.
- Click on each of the SIGNIFICANT profiles (the colored ones) 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.
- Upload these files to the wiki and link to them on your individual journal page. (Note that it will be easier to zip all the files together and upload them as one file).
- 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!
- Upload these files to the wiki and link to them on your individual journal page. (Note that it will be easier to zip all the files together and upload them as one file).
- 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.
- Analyzing and Interpreting STEM Results
- Select one of the profiles you saved in the previous step for further intepretation of the data. I suggest that you choose one that has a pattern of up- or down-regulated genes at the cold shock timepoints. Each member of your group should choose a different profile. 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 6 Gene Ontology terms from your filtered list (either p < 0.05 or corrected p < 0.05).
- Each member of the group will be reporting on his or her own cluster in your research presentation. You should take care to choose terms that are the most significant, but that are also not too redundant. For example, "RNA metabolism" and "RNA biosynthesis" are redundant with each other because they mean almost the same thing.
- Note whether the same GO terms are showing up in multiple clusters.
- Look up the definitions for each of the terms at http://geneontology.org. In your research presentation, you will discuss 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? Also, what does this have to do with the transcription factor being deleted (for the groups working with deletion strain data)?
- 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 on the left of the page.
- 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.
- Each member of the group will be reporting on his or her own cluster in your research presentation. You should take care to choose terms that are the most significant, but that are also not too redundant. For example, "RNA metabolism" and "RNA biosynthesis" are redundant with each other because they mean almost the same thing.
- Select one of the profiles you saved in the previous step for further intepretation of the data. I suggest that you choose one that has a pattern of up- or down-regulated genes at the cold shock timepoints. Each member of your group should choose a different profile. Answer the following:
Data & Files
Conclusion
References
- Week 8. Retrieved October 15, 2019, from https://xmlpipedb.cs.lmu.edu/biodb/fall2019/index.php/Week_8
Acknowledgments
1. I worked with Kaitlyn, Christina, and Marcus for this assignment.
2. Dr. Dahlquist for the continued support in assisting and answering our questions during the making of this assignment.
3."Except for what is noted above, this individual journal entry was completed by me and not copied from another source."