[adegenet-forum] pairwise.fst in the basic tutorial

Amaranta amaranta.fontcuberta at gmail.com
Wed Mar 25 17:38:06 CET 2020


Dear Tyler,

Only some functions in hierfstat work with genind objects, but all of them
work with hierfstat objects, which you can obtain with

genind2hierfstat(dat,pop=NULL)

There is a number of functions in hierfstat calculating pairwise Fst,
with different methods
genet.dist <http://127.0.0.1:16265/help/library/hierfstat/html/genet.dist.html>
() offers a range of fst methods

betas() calculates a newer measure of FST (WG 2017), $betaW is the
average FST across  pops, so if you feed it with a dataset of 2
populations, it will give like a pairwise FST.

and fst.dosage() also calculates pairwise population WG17 for SNP
data, but has some issues with NA at the moment.

Hope is helpful,

All the best,

----------------------------------------------------------
Amaranta Fontcuberta, graduate assistant
Dept. Écologie et Évolution
Université de Lausanne


Missatge de Tyler Smith <tyler at plantarum.ca> del dia dc., 25 de març 2020 a
les 17:17:

> Hello,
>
> The basic tutorial includes instructions to use the function
> `pairwise.fst`, which I believe was once part of the package
> `hierfstat`. That function no longer exists, and the closest match in
> `hierfstat` is `pairwise.neifst`. That function won't work on a `genind`
> object:
>
>
> ```
> > data(nancycats)
> > pairwise.fst(nancycats)
> Error in pairwise.fst(nancycats) : could not find function "pairwise.fst"
> > pairwise.neifst(nancycats)
> Error in names(y) <- nm[!nas] :
>   'names' attribute [11] must be the same length as the vector [1]
> In addition: Warning message:
> In is.na(x) : is.na() applied to non-(list or vector) of type 'S4'
> ```
>
> Is there a way to calculate pairwise Fst for genind objects now?
>
> Thanks,
>
> Tyler
>
> --
> Tyler Smith
> http://plantarum.ca
> _______________________________________________
> 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/20200325/dad778b5/attachment.html>


More information about the adegenet-forum mailing list