Fst calculation with gl.fst.pop

237 views
Skip to first unread message

Emmanuel Paul Wicker

unread,
Apr 13, 2022, 8:08:07 AM4/13/22
to da...@googlegroups.com
Dear dartR team,

I have calculated the Weir & Cokerham 1984 Fst on a dataset of 104 individuals and 62703 SNP loci (12 populations), using :
- dartR::gl.fst.pop, giving Fst and bootstraps
- hierfstat::genet.dist with the method "WC84"

Surprisingly, the Fst values obtained with gl.fst.pop are lower than those of genet.dist, by several magnitudes ! See the results enclosed : the gl.fst.pop output values are quite unusual for this estimator.
Have you already experienced this discrepancy ? can you explain it ?

 I am using R 4.1.3. and packages dartR 2.0.3 and hierfstat 0.5-10.

Thanks in advance for your help,
Best wishes,

Emmanuel
TR4_country_Fst(dartR).txt
Differentiation_pairwiseFst._Countries(genet.dist).txt

Jose Luis Mijangos

unread,
Apr 13, 2022, 8:39:14 PM4/13/22
to dartR
Hi Emmanuel,

I think you are looking at the p-values instead of the Fst values. I got the same results in both functions. See code below:

library(dartR)
library(hierfstat)

# testing datasets
test <- platypus.gl
test <- gl.filter.callrate(test,threshold = 1,plot.out = FALSE)
test_dartR <- test
test_hier_tmp <- gl2gi(test)
test_hier <- genind2hierfstat(test_hier_tmp)

# Fst in dartR
dartR_fst <- gl.fst.pop(test_dartR)
dartR_fst$Fsts
#                                   TENTERFIELD SEVERN_BELOW     SEVERN_ABOVE
# TENTERFIELD           NA                          NA                        NA
# SEVERN_BELOW     0.07837657           NA                        NA
# SEVERN_ABOVE     0.06812133          0.05274132          NA

# Fst in hierfstat
hier_fst <- genet.dist(test_hier,method ="WC84")
# results:
#                                  SEVERN_ABOVE   SEVERN_BELOW
# SEVERN_BELOW   0.05274132            
# TENTERFIELD       0.06812133            0.07837657

Cheers,
Luis

Bernd.Gruber

unread,
Apr 13, 2022, 9:33:26 PM4/13/22
to da...@googlegroups.com

Hi Emmanuel,

 

The output if you using the nboots>1 parameter is a list in the

 

gl.fst.pop function that contains the fst values and the p values.

 

So maybe this is what happened.

 

Cheers, Bernd

 

 

==============================================================================

Dr Bernd Gruber                                              )/_         

                                                         _.--..---"-,--c_    

Professor Ecological Modelling                      \|..'           ._O__)_     

Tel: (02) 6206 3804                         ,=.    _.+   _ \..--( /          

Fax: (02) 6201 2328                           \\.-''_.-' \ (     \_          

Institute for Applied Ecology                  `'''       `\__   /\          

Faculty of Science and Technology                          ')                

University of Canberra   ACT 2601 AUSTRALIA

Email: bernd....@canberra.edu.au

WWW: bernd-gruber

 

Australian Government Higher Education Provider Number CRICOS #00212K 

NOTICE & DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.

==============================================================================

--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/c0854ce8-e988-4376-9642-17ed24c908ddn%40googlegroups.com.

Emmanuel Paul Wicker

unread,
Apr 14, 2022, 3:58:46 AM4/14/22
to da...@googlegroups.com
Dear Luis,
The gl.fst.pop results I shared are definitely from Fsts, not from Pvalues...
The only difference is that I used a genind X from where I extracted some populations (popsub),
converted the genind to hierfstat format, then used
genet.dist(X, diploid=F, method = "WC84")

converted the genind to gl, then used
gl.fst.pop(X.gl, nboots=100, percent=95, nclusters=7)

Best wishes,
Emmanuel

--
Reply all
Reply to author
Forward
0 new messages