[adegenet-forum] Per locus pairwise Fst

Vikram Chhatre crypticlineage at gmail.com
Fri Sep 12 19:31:46 CEST 2014

I am revisiting this topic due to some technical problems.

The task at hand is to estimate pairwise Fst matrices for each locus

# Genind object is stored in:

# Use seploc to separate loci:
gen100_seploc <- seploc(gen100_genind, truenames=TRUE, res.type=c('genind',

# Calculate pairwise Fst:
gen100_perLocusPWFst <- lapply(gen100_seploc, pairwise.fst,
res.type=c('dist', 'matrix'), trunames=TRUE)

For a data set consisting of 30 populations, 20 individuals each, 1000 loci
and 2 alleles per locus (1.2 million data points), it takes up to 6 hours
to estimate the pairwise Fst matrix with this method.

Is there any way to speed this up?  Should I look into any other packages?

Many thanks for your time and help.

On Mon, Jul 14, 2014 at 9:16 AM, Vikram Chhatre <crypticlineage at gmail.com>

> Perfect!  Thank you for both solutions.
> V
> On Mon, Jul 14, 2014 at 9:13 AM, Jombart, Thibaut <
> t.jombart at imperial.ac.uk> wrote:
>> Hi there,
>> you can use seploc to separate loci, and lapply over the resulting list
>> using your prefered fst function.
>> Cheers
>> Thibaut
>> ________________________________________
>> From: adegenet-forum-bounces at lists.r-forge.r-project.org [
>> adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram
>> Chhatre [crypticlineage at gmail.com]
>> Sent: 14 July 2014 14:01
>> To: adegenet-forum at lists.r-forge.r-project.org
>> Subject: [adegenet-forum] Per locus pairwise Fst
>> Good morning.
>> I would like to estimate per locus pairwise Fst for populations, but it
>> appears that Adegenet only estimates this over all loci (i.e. single
>> matrix).  What I would like is one matrix per locus.  Has anyone modified
>> the functions or know of alternative programs that can do this?
>> Thanks
>> Vikram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140912/605d81cb/attachment.html>

More information about the adegenet-forum mailing list