Code covered by the BSD License  

Highlights from
HWtest

4.0

4.0 | 1 rating Rate this file 5 Downloads (last 30 days) File Size: 6.67 KB File ID: #14425
image thumbnail

HWtest

by Giuseppe Cardillo

 

26 Mar 2007 (Updated 23 Dec 2009)

Test if a locus is under Hardy Weinberg Proportion

| Watch this File

File Information
Description

The Hardy Weinberg equilibrium is a fundamental law in genetic.
This function was deeply rewrited.
If a locus is biallelic the function use the exact Hardy Weinberg test (similar to Fisher exact test) analyzing all possible tables. If you download TERNPLOT functions (ID:2299) the function plots a De Finetti's Diagram.
Often a locus shows multiple alleles with low frequency, so the application of chi square is avoided. In this case the function use a Monte Carlo algorithm to perform the exact test.
In the zip file you can find a demo.

You can visit my homepage http://home.tele2.it/cardillo
My profile on XING http://www.xing.com/go/invita/13675097
My profile on LinkedIN http://it.linkedin.com/in/giuseppecardillo

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Fisherextest

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
19 Oct 2007 Dmitriy Fradkin

This package has a nice demo, implements useful functionality, however it cannot be used inside other programs without further modifications to hwetest.
I would suggest adding a verbose flag to turn off all the printing, and making hwetest return some values.

Please login to add a comment or rating.
Updates
07 May 2007

I erased the cloned code in the demo and added a "verbose" argument in

13 Sep 2007

minor bug fixed

26 Sep 2007

minor editing and inbreeding coefficient added

05 Oct 2007

Monte Carlo method implemented

22 Oct 2007

Reinserting the verbose identifiler; added a De Finetti's Diagram for biallelic loci.

22 Oct 2007

fix a bug in De Finetti's diagram

01 May 2008

some minor editing

03 Jun 2008

The function was heavly vectorized to speed up using the gammaln function. The waitbar was erased because it slacken the function too much.

12 Jun 2008

RANDPERM was replaced with the faster Fisher-Yates-Sattolo algorithm. NORMINV was replaced with ERFCINV function. The STATISTICS TOOLBOX is no more needed.
Correction was implemented for the De Finetti's diagram.
More comments added.

02 Jul 2008

Added calculations for Matching probability, Power of discrimination; Power of exclusion; Typical Paternity Index

03 Jul 2008

Added Polimorphism Information Content (PIC)

24 Sep 2008

Improvement in input error handling

12 Nov 2008

Changes in help section

25 Nov 2008

changes in alpha and delta default values

31 Mar 2009

I'have added a statistical test on heterozigosity

23 Dec 2009

Changes in description

Tag Activity for this File
Tag Applied By Date/Time
biotech Giuseppe Cardillo 22 Oct 2008 09:06:05
pharmaceutical Giuseppe Cardillo 22 Oct 2008 09:06:05
hardy weinberg equilibrium Giuseppe Cardillo 22 Oct 2008 09:06:05
locus Giuseppe Cardillo 22 Oct 2008 09:06:05
de finettis diagram Giuseppe Cardillo 22 Oct 2008 09:06:05
test Giuseppe Cardillo 22 Oct 2008 09:06:05
pharmaceutical Cristina McIntire 12 Nov 2008 13:57:35
biotech Cristina McIntire 12 Nov 2008 13:57:35

Contact us at files@mathworks.com