Kayla Jackson Electronic Lab Notebook
Contents
Fall 2015
September 9, 2015
- Plans for next week:
- Grace, Natalie, and I will complete normalization analysis with updated protocols found on Dahlquist lab site.
- We will run the normalization on wt, dHMO1, dSWI4, dZAP1, and Spar strains
- New workflow for Within- and Between-chip Normalization will changed drastically. R scripts will be located on OWW. All data retrieval and sharing will take place on LionShare.
September 22, 2015
Steps 4-5: Within- and Between-chip Normalization
- The updated microarray analysis protocol can be found here
Installing R 3.1.0 and the limma package
The following protocol was developed to normalize GCAT and Ontario DNA microarray chip data from the Dahlquist lab using the R Statistical Software and the limma package (part of the Bioconductor Project).
- The normalization procedure has been verified to work with version 3.1.0 of R released in April 2014
- Note that using other versions of R or the limma package might give different results.
- Note also that using the 32-bit versus the 64-bit versions of R 3.1.0 will give different results for the normalization out in the 10^{-13} or 10^{-14} decimal place. The Dahlquist Lab is standardizing on using the 64-bit version of R.
- To install R for the first time, download and run the installer from the link above, accepting the default installation.
- To use the limma package, unzip the file and place the contents into a folder called "limma" in the library directory of the R program. If you accept the default location, that will be C:\Program Files\R\R-3.1.0\library (this will be different on the computers in S120 since you do not have administrator rights).
Running the Normalization Script
- Create a folder on your Desktop to store your files for the microarray analysis procedure.
- Download the zipped file that contains the
.gpr
files and save it to this folder (or move it if it saved in a different folder). Unzip this file using 7-zip. Right-click on the file and select the menu item, "7-zip > Extract Here". - Launch R x64 3.1.0 (make sure you are using the 64-bit version).
- Change the directory to the folder containing the targets file and the GPR files for the chips by selecting the menu item File > Change dir... and clicking on the appropriate directory. You will need to click on the + sign to drill down to the right directory. Once you have selected it, click OK.
- In R, select the menu item File > Source R code..., and select the bigFatNormalization2.R script.
- Wait while R processes your files.
- When the processing has finished, you will find three files called GCAT_and_Ontario_Unnormalized.csv, GCAT_and_Ontario_Within_Array_Normalization.csv, GCAT_and_Ontario_Between_Array_Normalization.csv. The latter file is the one that you will need going forward.
- Save these files to LionShare and/or to a flash drive.
Visualizing the Normalized Data
- Immediately after running the normalization script, select the menu item File > Source R code..., and select the generatePlots1.R script.
- Wait while R processes your files. You will see the individual plots being created in a new window. R will save them automatically to the same folder that contains the data and scripts.
- The box plots for each strain (comparison of the before, after within- and after between-chip normalization in the same file) are saved under the name of the strain, e.g., dCIN5.jpg.
- The MA plots are saved under a name for the individual chip, e.g., dCIN5_LogFC_t15-1.jpg, and show the plots both before and after normalization.
- Wait while R processes your files. You will see the individual plots being created in a new window. R will save them automatically to the same folder that contains the data and scripts.
- Zip the files of the plots together and upload to LionShare and/or save to a flash drive.
Step 6: Statistical Analysis
- For the statistical analysis, we will begin with the file "GCAT_and_Ontario_Between_Array_Normalization.csv" that you generated in the previous step.
- Open this file in Excel and Save As an Excel Workbook
*.xlsx
. It is a good idea to add your initials and the date (yyyymmdd) to the filename as well. - Rename the worksheet with the data "Compiled_Normalized_Data".
- Type the header "ID" in cell A1.
- Insert a new column after column A and name it "Standard Name". Column B will contain the common names for the genes on the microarray.
- Copy the entire column of IDs from Column A.
- Paste the names into the "Value" field of the ORF List <-> Gene List tool in YEASTRACT. Then, click on the "Transform" button.
- Select all of the names in the "Gene Name" column of the resulting table.
- Copy and paste these names into column B of the
*.xlsx
file. Save your work.
- Insert a new column on the very left and name it "MasterIndex". We will create a numerical index of genes so that we can always sort them back into the same order.
- Type a "1" in cell A2 and a "2" in cell A3.
- Select both cells. Hover your mouse over the bottom-right corner of the selection until it makes a thin black + sign. Double-click on the + sign to fill the entire column with a series of numbers from 1 to 6189 (the number of genes on the microarray).
- Insert a new worksheet and call it "Rounded_Normalized_Data". We are going to round the normalization results to four decimal places because of slight variations seen in different runs of the normalization script.
- Copy the first three columns of the "Compiled_Normalized_Data" sheet and paste it into the first three columns of the "Rounded_Normalized_Data" sheet.
- Copy the first row of the "Compiled_Normalized_Data" sheet and paste it into the first row of the "Rounded_Normalized_Data" sheet.
- In cell D2, type the equation
=ROUND(Compiled_Normalized_Data!D2,4)
. - Copy and paste this equation in the rest of the cells of row 2.
- Select all of the cells of row 2 and hover your mouse over the bottom right corner of the selection. When the cursor changes to a thin black "plus" sign, double-click on it to paste the equation to all the rows in the worksheet. Save your work.
- Insert a new worksheet and call it "Master_Sheet".
- Go back to the "Rounded_Normalized_Data" sheet and Select All and Copy.
- Click on cell A1 of the "Master_Sheet" worksheet. Select Paste special > Paste values to paste the values, but not the formulas from the previous sheet. Save your work.
- There will be some #VALUE! errors in cells where there was missing data for genes that existed on the Ontario chips, but not the GCAT chips.
- Select the menu item Find/Replace and Find all cells with "#VALUE!" and replace them with a single space character. Record how many replacements were made to your electronic lab notebook. Save your work.
- This will be the starting point for our statistical analysis below.
Summary
- These steps were followed as such to ensure that the new normalization script is working properly for everyone. The results of each individual's normalization will be compared at the laboratory meeting on 09/23. There wer 41,998 instances of missing data for genes that existed on the Ontario chips, but not the GCAT chips.
- Note: Need resolution for administrator privileges when installing LIMMA package in R. A temporary fix is installing the package in the current R session, however, the package is removed when the session ends.
September 23, 2015
- Target for next week: Complete at least one strain using within-strain ANOVA protocol.
- Plans for upcoming week:
- Cross-check normalization results with Natalie, Grace, Tessa, and Kristen. All differences between results should be 0. Confirm if successful ornate.
- Within-Strain ANOVA for wt, Spar, and each deletion strain.
- Procede with statistical analysis portal for wt, dZAP1, and dGLN3 and submit and share files via LionShare
28 September 2015
Within-Strain ANOVA
- 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>)-<number of data points>*<AvgLogFC_t15>^2
and hit enter.- 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
- 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, (STRAIN)_Bonferroni_p-value.
- Type the equation
=<(STRAIN)_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 (STRAIN)_Bonferroni_p-value header:
=IF(r2>1,1,r2)
. Use the Step (10) trick to copy the formula throughout the column.
Calculate the Benjamini & Hochberg p value Correction
- Insert a new worksheet named "(STRAIN)_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 (STRAIN)_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.
- Upload the .xlsx file that you have just created to LionShare. Send Dr. Dahlquist an e-mail with the link to the file (e-mail kdahlquist at lmu dot edu).
Sanity Check: Number of genes significantly changed
Before we move on to further analysis of the data, we want to perform a more extensive 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.
- Go to your (STRAIN)_ANOVA worksheet.
- Select row 1 (the row with your column headers) 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.
- Click 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)?
- When we use a p value cut-off of p < 0.05, what we are saying is that you would have seen a gene expression change that deviates this far from zero by chance less than 5% of the time.
- 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)?
- 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, Bonferroni-corrected, and B-H-corrected p values? What is its average Log fold change at each of the timepoints in the experiment? Note that the average Log fold change is what we called "STRAIN)_AvgLogFC_(TIME)" in step 3 of the ANOVA analysis.
- We will compare the numbers we get between the wild type strain and the other strains studied, organized as a table. Use this sample PowerPoint slide to see how your table should be formatted.
Results of Sanity Check
ΔCIN5 | WT | ΔZAP1 | |
---|---|---|---|
p < 0.05 | 2438 (39.39%) | 2600 (42.01%) | 2559(41.35%) |
p < 0.01 | 1529 (24.71%) | 1727 (27.90%) | 1683(27.19%) |
p < 0.001 | 838 (13.54%) | 1015 (16.40%) | 953 (15.40%) |
p < 0.0001 | 458 (7.40%) | 574 (9.27%) | 521 (8.42%) |
Bonferroni p < 0.05 | 232 (3.75%) | 302 (4.88%) | 251 (4.06%) |
B-H p < 0.05 | 1683 (27.29%) | 1936 (30.03%) | 1859 (28.26%) |
October 12, 2015
Using YEASTRACT to Infer which Transcription Factors Regulate a Cluster of Genes
In the previous analysis using STEM, we found a number of gene expression profiles (aka clusters) which grouped genes based on similarity of gene expression changes over time. The implication is that these genes share the same expression pattern because they are regulated by the same (or the same set) of transcription factors. We will explore this using the YEASTRACT database.
- Open the gene list in Excel for the one of the significant profiles from your stem analysis. Choose a cluster with a clear cold shock/recovery up/down or down/up pattern. You should also choose one of the largest clusters.
- Copy the list of gene IDs onto your clipboard.
- Launch a web browser and go to the YEASTRACT database.
- On the left panel of the window, click on the link to Rank by TF.
- Paste your list of genes from your cluster into the box labeled ORFs/Genes.
- Check the box for Check for all TFs.
- Accept the defaults for the Regulations Filter (Documented, DNA binding plus expression evidence)
- Do not apply a filter for "Filter Documented Regulations by environmental condition".
- Rank genes by TF using: The % of genes in the list and in YEASTRACT regulated by each TF.
- Click the Search button.
- Answer the following questions:
- In the results window that appears, the p values colored green are considered "significant", the ones colored yellow are considered "borderline significant" and the ones colored pink are considered "not significant". How many transcription factors are green or "significant"?
- List the "significant" transcription factors on your wiki page, along with the corresponding "% in user set", "% in YEASTRACT", and "p value".
- Are CIN5, GLN3, HAP4, HMO1, SWI4, and ZAP1 on the list?
- Opted not to continue with next transcriptional map task as too many genes to create and not sure as to which genes to continue with.
dCIN5 Results
- Used only those TFs with BH p-value < 0.05 in YEASTRACT
- Number of significant transcription factors: 72
- List of significant transcription factors with % in user set, % in YEASTRACT, p-value:
- This information can be found here: Jackson YEASTRACT Results
- Only ZAP1 was on this list of significant TFs
WT Results
- Used only those TFs with BH p-value < 0.05 in YEASTRACT
- Number of significant transcription factors: 111
- List of significant transcription factors with % in user set, % in YEASTRACT, p-value:
- This information can be found here: Jackson YEASTRACT Results
- Only GLN3 was missing from this list of significant TFs
dZAP1 Results
- Used only those TFs with BH p-value < 0.05 in YEASTRACT
- Number of significant transcription factors: 99
- List of significant transcription factors with % in user set, % in YEASTRACT, p-value:
- This information can be found here: Jackson YEASTRACT Results
- Only GLN3 was missing from this list of significant TFs
October 14, 2015
- Today at lab meeting, we decided on a system for paring down our regulatory networks. Following this meeting, each member of the team was assigned a strain to focus on from this point forward. dHMO1 and dSWI4 were removed from analysis.
- Assignments for creating Networks:
- wt: Natalie
- dHAP4: Grace
- dCIN5: Kayla
- dGLN3: Tessa
- dZAP1: Kristen
- Instructions for paring down network:
- First, eliminate genes that are unconnected
- Then, systematically pare down by YEASTRACT p-value, one by one. For each elimination, check and get rid of unconnected genes. We want a gene list of less than 35 transcription factors. We want 15 - 35 range for our family of networks.
- For now, we will focus on WT and deletion strains (not Spar)
- Two types of pare downs:
- First, just the genes from YEASTRACT
- Later, potentially adding in our deletion strain genes. Careful with elimination of TF's - deletion strain genes must stay in.
October 22, 2015
Using YEASTRACT to Infer which Transcription Factors Regulate a Cluster of Genes
- Go back to the YEASTRACT database and follow the link to Generate Regulation Matrix.
- Copy and paste the list of transcription factors you identified (plus CIN5, HAP4, GLN3, HMO1, SWI4, and ZAP1) into both the "Transcription factors" field and the "Target ORF/Genes" field.
- We are going to generate several regulation matrices, with different "Regulations Filter" options.
- For the first one, accept the defaults: "Documented", "DNA binding plus expression evidence"
- Click the "Generate" button.
- In the results window that appears, click on the link to the "Regulation matrix (Semicolon Separated Values (CSV) file)" that appears and save it to your Desktop. Rename this file with a meaningful name so that you can distinguish it from the other files you will generate.
- Repeat these steps to generate a second regulation matrix, this time applying the Regulations Filter "Documented", "Only DNA binding evidence".
- Repeat these steps a third time to generate a third regulation matrix, this time applying the Regulations Filter "Documented", DNA binding and expression evidence".
Visualizing Your Gene Regulatory Networks with GRNsight
We will analyze the regulatory matrix files you generated above in Microsoft Excel and visualize them using GRNsight to determine which one will be appropriate to pursue further in the modeling.
- First we need to properly format the output files from YEASTRACT. You will repeat these steps for each of the three files you generated above.
- Open the file in Excel. It will not open properly in Excel because a semicolon was used as the column delimiter instead of a comma. To fix this, Select the entire Column A. Then go to the "Data" tab and select "Text to columns". In the Wizard that appears, select "Delimited" and click "Next". In the next window, select "Semicolon", and click "Next". In the next window, leave the data format at "General", and click "Finish". This should now look like a table with the names of the transcription factors across the top and down the first column and all of the zeros and ones distributed throughout the rows and columns. This is called an "adjacency matrix." If there is a "1" in the cell, that means there is a connection between the trancription factor in that row with that column.
- Save this file in Microsoft Excel workbook format (.xlsx).
- Check to see that all of the transcription factors in the matrix are connected to at least one of the other transcription factors by making sure that there is at least one "1" in a row or column for that transcription factor. If a factor is not connected to any other factor, delete its row and column from the matrix. Make sure that you still have somewhere between 15 and 30 transcription factors in your network after this pruning.
- Only delete the transcription factor if there are all zeros in its column AND all zeros in its row. You may find visualizing the matrix in GRNsight (below) can help you find these easily.
- For this adjacency matrix to be usable in GRNmap (the modeling software) and GRNsight (the visualization software), we need to transpose the matrix. Insert a new worksheet into your Excel file and name it "network". Go back to the previous sheet and select the entire matrix and copy it. Go to you new worksheet and click on the A1 cell in the upper left. Select "Paste special" from the "Home" tab. In the window that appears, check the box for "Transpose". This will paste your data with the columns transposed to rows and vice versa. This is necessary because we want the transcription factors that are the "regulatORS" across the top and the "regulatEES" along the side.
- The labels for the genes in the columns and rows need to match. Thus, delete the "p" from each of the gene names in the columns. Adjust the case of the labels to make them all upper case.
- In cell A1, copy and paste the text "rows genes affected/cols genes controlling".
- Now we will visualize what these gene regulatory networks look like with the GRNsight software.
- Go to the GRNsight home page (you can either use the version on the home page or the beta version.
- Select the menu item File > Open and select one of the regulation matrix .xlsx file that has the "network" worksheet in it that you formatted above. If the file has been formatted properly, GRNsight should automatically create a graph of your network. Move the nodes (genes) around until you get a layout that you like and take a screenshot of the results. Paste it into your PowerPoint presentation. Repeat with the other two regulation matrix files. You will want to arrange the genes in the same order for each screenshot so that the graphs can be easily compared
Looking at the dCIN5 "Documented" "DNA Binding Only" Network
- Genes added to the network: Δcin5, Δgln3, Δhap4, Δhmo1, Δswi4
- There are no genes that are unconnected to the network.
- Network has 72 genes in the network
- TFs with YEASTRACT p-value > 1E-09 removed from network
- dHAP4, dGLN3, dCIN5 added to network
- 30 TFs remained in network after pare down
- 11 unconnected TFs removed from network
- YOX1, SNF7, RDS3, BAS1, MGA2, CS3, TAF14,SPT20, SRB2, RLM1, YLR278
- FINAL NETWORK
- 19 Nodes
- 45 Edges
October 28, 2015
- Today at lab meeting, we discussed submitting abstracts for the Experimental Biology conference in San Diego. I will request funding from the RISE program to travel to the conference.