Showing posts with label data analysis. Show all posts
Showing posts with label data analysis. Show all posts

Saturday, 2 July 2016

Calculating the Geometric Mean/Geomean of Housekeeping Genes from Real-Time PCR Data Using Excel

In real-time PCR, it is not uncommon for multiple housekeeping genes to be used for normalising data. Knowing how to calculate an average for your housekeeping genes will be useful regardless of whether you opt to carry out relative or absolute quantification of your gene of interest.

If you are using three or more housekeeping genes, you can calculate the geometric or geomean easily using Excel.





Cell Formulae
Column B: Gene 1 CT values from your qPCR run
Column C: Gene 2 CT values from your qPCR run
Column D: Housekeeping gene 1 CT values from your qPCR run
Column E: Housekeeping gene 2 CT values from your qPCR run
Column F: Housekeeping gene 3 CT values from your qPCR run

Column G: =GEOMEAN(D4:F4) and copy/paste formula down to G18

Tuesday, 5 April 2016

Graphing Data - How To Calculate Error Bars

When turning numerical data into graphical form (e.g. bar graphs), you sometimes find that the data is much easier to interpret when changes observed in test conditions are presented as fold changes relative to the control, which is set to “1”. In doing this, you might wonder how you would go about calculating the error bars. In the following, I will detail how I go about calculating error bars for relative fold changes:

Below is an example data set with three control and three experimental replicates:

C1. 3.55
C2. 3.82
C3. 3.13
E1. 5.21
E2. 6.74
E3. 5.68

Take the average and you will have:

à C-AVG=3.50     E-AVG=5.88

Next, calculate the relative fold change by dividing by the control average:

à C-AVG=3.50/3.50   E-AVG=5.88/3.50  à  C-RelAVG=1   E-RelAVG=1.68

For the error bars, calculate the SEM:

C-SEM=0.20   E-SEM=0.45

Next calculate the SEM for the relative fold change values by dividing the SEMs with the control average:

à C-SEM=0.20/3.50            E-SEM=0.45/3.50  à  C-RelSEM=0.06   E-RelSEM=0.13

Below is an illustration of the data presented without setting the data relative to the control:

  
Here is the data set relative to the control:




Tuesday, 2 February 2016

Data Analysis – T-Test vs Mann Whitney U

For those unfamiliar with statistics, it can often be confusing when deciding which test to apply to analyse data in order to determine whether changes observed are indeed statistically significant (i.e. p<0.05)

The following will provide some guidance on how to analyse data between two groups (e.g. placebo vs drug treatment, normal vs diseased, light vs dark, etc).

What Are The Differences?
The t-test is a test between population means. They are parametric tests and should only be applied to data that is normally distributed. In contrast, the Mann-Whitney U (MWU) test is a test of differences in medians as well as the shape and spread of the data. It is a non-parametric test that can be used as an alternative to the t-test on data that is not normally distributed. However, it should be noted that the MWU test can be applied to normally distributed data.

The number of data points or sample size can also affect the choice in tests. If you have large datasets that have a normal distribution, a t-test can be very powerful. But if you have a small number of data points (e.g. less than 6 data points), a MWU test would be preferable to a t-test since the data is unlikely to have a normal distribution.

What Do I Use?  
To determine which test to apply, you will first need to establish whether your experimental data is normally distributed. For illustrative purposes, a mock dataset (below) will be used. The dataset below is from two groups (normal vs diseased). The sample type is coded and blind to the experimenter.



There are a number of normality tests for you to choose from, but if you have a set of data with less than 2000 data points, as above, try using the Shapiro-Wilk normality test. The null hypothesis is that your data points belong to a normal distribution; reciprocally, your alternative hypothesis is that your data points do not belong to a normal distribution. If p<0.05, your data does not have a normal distribution. For the above dataset, the results of running the Shapiro-Wilk test is as follows:


n = 24
Mean = 66.33333333333333
SD = 21.25142791451429
W = 0.9437512788610762

Threshold (p=0.01) = 0.8840000033378601
Threshold (p=0.05) = 0.9160000085830688
Threshold (p=0.10) = 0.9300000071525574


Here, p>0.05 at all thresholds. Accordingly, the alternative hypothesis is rejected and we conclude that the data points have a normal distribution.

** The results above were calculated using an online Shapiro-Wilk calculator.   

For sample sizes greater than 2000, you can use the Kolmogorov-Smirnov test. If you prefer to visualize the data in graphical form, try using a normal probability plot or quantile-quantile plot.

Other Ways To Test Normality
Aside from the normality tests mentioned above, there are other normality tests available. For their description, please refer to the following link.