[adegenet-forum] HWE
Jombart, Thibaut
t.jombart at imperial.ac.uk
Mon Aug 17 18:16:12 CEST 2015
Hi Carlo,
if you want to be conservative, you can apply Bonferroni correction to your data.
Here's an example using nancycats:
> library(adegenet)
> library(pegas)
> temp <- hw.test(nancycats)
> pval <- temp[,3]
> pval
fca8 fca23 fca43 fca45 fca77 fca78
0.000000e+00 0.000000e+00 0.000000e+00 1.622163e-03 0.000000e+00 0.000000e+00
fca90 fca96 fca37
0.000000e+00 1.965095e-14 1.209777e-10
> loc.to.keep <- pval < (0.05/nLoc(nancycats)) # use Bonferroni
> loc.to.keep
fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96 fca37
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
> x <- nancycats[loc=loc.to.keep]
Here all the loci are kept, but loci at HWE would have been filtered out.
Cheers
Thibaut
==============================
Dr Thibaut Jombart
MRC Centre for Outbreak Analysis and Modelling
Department of Infectious Disease Epidemiology
Imperial College - School of Public Health
Norfolk Place, London W2 1PG, UK
Tel. : 0044 (0)20 7594 3658
http://sites.google.com/site/thibautjombart/
http://sites.google.com/site/therepiproject/
http://adegenet.r-forge.r-project.org/
Twitter: @thibautjombart
________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Carlo Pecoraro [carlo.pecoraro2 at unibo.it]
Sent: 17 August 2015 16:58
To: adegenet-forum at lists.r-forge.r-project.org
Cc: Thibaut Jombart
Subject: [adegenet-forum] I: HWE
Hi all,
I am trying to remove from my dataset those loci in HWE. I have measured it both per population: hwe.pop<-(lapply(seppop(x), hw.test) and per locus hwe.loc<-hw.test(x), B=1000).
Now I would like to define a threshold (0.05) for the Pr(chi^2>), removing all those loci with a derived P-values above this threshold. How could I perform this analysis? Do you have any suggestion?
I am wondering if this is the best way to filter my dataset according to the HWE. Any advise would be more than welcome.
Best regards,
Carlo
Da: Carlo Pecoraro
Inviato: lunedì 17 agosto 2015 16:14
A: 'adegenet-forum at lists.r-forge.r-project.org'
Oggetto: HWE
Hi all,
I am trying to remove from my dataset those loci in HWE. I have measured it both per population: hwe.pop<-(lapply(seppop(x), hw.test) and per locus hwe.loc<-hw.test(x), B=1000).
Now I would like to define a threshold (0.05) for the Pr(chi^2>), removing all those loci with a derived P-values above this threshold. How could I perform this analysis? Do you have any suggestion?
I am wondering if this is the best way to filter my dataset according to the HWE. Any advise would be more than welcome.
Best regards,
Carlo
--
Carlo Pecoraro, PhD Candidate
Laboratory of Genetics & Genomics of Marine Resources and Environment (GenoDREAM)
Dept. Biological, Geological & Environmental Sciences (BiGeA)
University of Bologna
Via S. Alberto 163, 48123 Ravenna (Italy)
IRD (Institut de Recherche pour le Développement)
UMR 212 EME (Ecosytèmes Marins Exploités)
BP 570
Victoria, Mahé
Seychelles
Ph: +39 3337603101
skype contact: carlo_pecoraro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150817/13e10711/attachment.html>
More information about the adegenet-forum
mailing list