thibautjombart / adegenet

adegenet: a R package for the multivariate analysis of genetic markers
169 stars 64 forks source link

Basic tutorial uses hierfstat::pairwise.fst, which no longer exists #278

Closed plantarum closed 3 years ago

plantarum commented 4 years ago

The tutorial uses the function hierfstat::pairwise.fst, which no longer exists in hierfstat. The new functions in hierfstat don't support genind objects, and require conversion to a hierfstat data frame before you can use them. Consequently, the line:

https://github.com/thibautjombart/adegenet/blob/95e1d68c268a14e877464dcb480bb91c9cb6cddb/tutorials/tutorial-basics.Rnw#L1154

Should be:

matFst <- pairwise.neifst(genind2hierfstat(nancycats[1:50,]))

There are other related changes needed in the description in that section, and I don't know if pairwise.neifst should be recommended over other options (gen.dist, pairwise.WCfst).

Thanks,

Tyler

jgx65 commented 4 years ago

Actually, you don't need to use genind2hierfstat, the following works (and is recommended) genet.dist(nancycats[1:50,],method="Nei87")

plantarum commented 4 years ago

Great, thanks!

plantarum commented 4 years ago

I tried to update the tutorial myself, to send as a pull request, but I can't get Sweave to work to regenerate the pdf. :(

zkamvar commented 3 years ago

Hi @plantarum, would you be able to send a pull request with just the changes you made (if they still exist) don't worry about building the PDF, I'll consider that my problem.

plantarum commented 3 years ago

Hi @zkamvar . I have switched laptops since I made the changes, and it looks like I didn't push them back to my fork, or transfer them to my current laptop. They should still exist in my backups, but it will take me a few days to check on them.

zkamvar commented 3 years ago

Oof, that sounds like a hassle. I'll go ahead and make a PR with the changes this weekend. Thank you for pointing this out and sorry I didn't respond last year; The only thing I can say is that I had just started a new job and a new pandemic, so things just kind of fell by the wayside.

plantarum commented 3 years ago

No worries Zhian, it happens. I hope my comments didn't come across as criticism. The fact that you're sharing your work at all is greatly appreciated, and your documentation, even when it drifts a little out of date, is extensive.

Best,

Tyler

"Zhian N. Kamvar" @.***> writes:

Oof, that sounds like a hassle. I'll go ahead and make a PR with the changes this weekend. Thank you for pointing this out and sorry I didn't respond last year; The only thing I can say is that I had just started a new job and a new pandemic, so things just kind of fell by the wayside.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

-- Tyler Smith plantarum.ca