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

Tyler Smith tyler at plantarum.ca
Wed Mar 25 18:12:25 CET 2020


Thanks Vojtech,

I had loaded hierfstat first, but I wasn't using the same version. The
CRAN version of hierfstat appears not to have been updated in five
years, and the current verson no longer includes `pairwise.fst`.

As of this morning, I am running the latest version of `hierstat` from
github, after spending an hour or so chasing down incompatible
dependencies among the latest versions of pegas, hierfstat, adegenet et
al.

Best,

Tyler


Vojtěch Zeisek writes:

> Hello,
> You need to run library(hierfstat) first. I see it in that package (version
> 0.04-22). For me
> library(adegenet)
> data(nancycats)
> library(hierfstat)
> pairwise.fst(nancycats)
> works well.
> HTH,
> V.
>
> Dne středa 25. března 2020 17:17:15 CET, Tyler Smith napsal(a):
>> 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


More information about the adegenet-forum mailing list