<div dir="ltr"><div>Dear Tyler, <br></div><div><br></div><div>Only some functions in hierfstat work with genind objects, but all of them work with hierfstat objects, which you can obtain with</div><div><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none">genind2hierfstat(dat,pop=NULL)<br></pre><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="font-family:arial,sans-serif">There is a number of functions in hierfstat calculating pairwise Fst, with different methods<br><a href="http://127.0.0.1:16265/help/library/hierfstat/html/genet.dist.html" style="color:rgb(128,0,128);font-family:sans-serif;font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">genet.dist</a> () offers a range of fst methods<br></span></pre><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="font-family:arial,sans-serif">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.<br></span></pre><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="font-family:arial,sans-serif">and fst.dosage() also calculates pairwise population WG17 for SNP data, but has some issues with NA at the moment.<br><br></span></pre><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="font-family:arial,sans-serif">Hope is helpful, <br><br></span></pre><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="font-family:arial,sans-serif">All the best, <br><br></span></pre><div><div dir="ltr"><div dir="ltr"><div>----------------------------------------------------------</div>Amaranta Fontcuberta, graduate assistant<br><div>Dept. Écologie et Évolution</div><div>Université de Lausanne</div></div></div></div><pre style="color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="font-family:arial,sans-serif"></span></pre></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Missatge de Tyler Smith <<a href="mailto:tyler@plantarum.ca" target="_blank">tyler@plantarum.ca</a>> del dia dc., 25 de març 2020 a les 17:17:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
The basic tutorial includes instructions to use the function<br>
`pairwise.fst`, which I believe was once part of the package<br>
`hierfstat`. That function no longer exists, and the closest match in<br>
`hierfstat` is `pairwise.neifst`. That function won't work on a `genind`<br>
object:<br>
<br>
<br>
```<br>
> data(nancycats)<br>
> pairwise.fst(nancycats)<br>
Error in pairwise.fst(nancycats) : could not find function "pairwise.fst"<br>
> pairwise.neifst(nancycats)<br>
Error in names(y) <- nm[!nas] : <br>
'names' attribute [11] must be the same length as the vector [1]<br>
In addition: Warning message:<br>
In <a href="http://is.na" rel="noreferrer" target="_blank">is.na</a>(x) : <a href="http://is.na" rel="noreferrer" target="_blank">is.na</a>() applied to non-(list or vector) of type 'S4'<br>
```<br>
<br>
Is there a way to calculate pairwise Fst for genind objects now?<br>
<br>
Thanks,<br>
<br>
Tyler<br>
<br>
-- <br>
Tyler Smith<br>
<a href="http://plantarum.ca" rel="noreferrer" target="_blank">http://plantarum.ca</a><br>
_______________________________________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a></blockquote></div></div>