[adegenet-forum] HWE calculation

Thibaut Jombart thibautjombart at gmail.com
Fri Mar 3 12:20:00 CET 2017


As a side note, Felipe, please avoid posting the same msg to several
mailing lists at the same time, as it makes tracking answers much more
difficult.

Best

Thibaut


--
Dr Thibaut Jombart
Lecturer, Department of Infectious Disease Epidemiology, Imperial College
London
Head of RECON: repidemicsconsortium.org
sites.google.com/site/thibautjombart/
github.com/thibautjombart
Twitter: @TeebzR <http://twitter.com/TeebzR>
+44(0)20 7594 3658

On 3 March 2017 at 10:21, Roman Luštrik <roman.lustrik at biolitika.si> wrote:

> Perhaps something like this?
>
> library(adegenet)
> library(pegas)
>
> data(nancycats)
>
> lvls <- levels(pop(nancycats))
> out <- vector("list", length(lvls)) # prepare list for output
> names(out) <- lvls
>
> for (i in lvls) {
>   out[[i]] <- hw.test(nancycats[pop(nancycats) == i])
> }
>
> Cheers,
> Roman
>
> ----
> In god we trust, all others bring data.
>
> ------------------------------
> *From: *"Felipe Hernández" <fhernandeu at uc.cl>
> *To: *adegenet-forum at lists.r-forge.r-project.org
> *Sent: *Thursday, March 2, 2017 6:04:42 PM
> *Subject: *[adegenet-forum] HWE calculation
>
> Hi everyone,
>
> I have used the adegenet/pegas packages to estimate HWE using a genind
> object. I got the results from chi-squared and exact test based on Monte
> Carlo for my whole set of loci (52 loci) across all my 29 populations. I
> wonder if there is any option to calculate HWE and get exact test Monte
> Carlo results, but for each population separately. Sorry if the question is
> so basic, but I would appreciate any helpful advice!
>
> Best,
> Felipe
>
> --
> Felipe Hernández
> Médico Veterinario (DVM), MSc.
> PhD. Candidate
> Interdisciplinary Ecology Program
> School of Natural Resources and Environment
> Wildlife Ecology and Conservation Department
> University of Florida
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/
> listinfo/adegenet-forum
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/
> listinfo/adegenet-forum
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170303/5d0e1cc0/attachment.html>


More information about the adegenet-forum mailing list