Re: Calulating global fst values

822 views
Skip to first unread message
Message has been deleted

Jose Luis Mijangos

unread,
Aug 18, 2022, 9:39:27 PM8/18/22
to dartR
Hi Ella,

Could you please extend what you mean about global FST values, perhaps you could provide an example or a citation?

P-values are truncated to two decimals. So, a p-value = 0 means p-value < 0.01.

Cheers,
Luis



On Thursday, 18 August 2022 at 10:09:13 pm UTC+10 ella...@gmail.com wrote:
Hi All,

Im wondering if DartR has the ability to calculate global fst values? and if not, are there any suitable packages which utilises genlight data or have easy ways of converting it?

On another note, my pairwise Fst pvalues all equal to 0. What does this mean? Is it a possible error on my behalf? or is it not significant at all?

Thanks for your help,
Ella 

Ella Dunn

unread,
Aug 19, 2022, 2:09:04 AM8/19/22
to da...@googlegroups.com
Hi Luis,

Here are the output Pvalues I received from my Pairwise fst calculation. Is there a way I can increase the decimal places to accurately determine how significant they are from one another?

Thanks,
Ella 

--
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/778cc61b-64bb-40c6-8744-249754c75964n%40googlegroups.com.
Screen Shot 2022-08-19 at 4.05.01 pm.png

Jose Luis Mijangos

unread,
Aug 19, 2022, 3:58:27 AM8/19/22
to dartR
Hi Ella,

The gl.fst.pop function is a wrapper for the function stappFst from Package StAMPP. This function uses Bootstrapping to calculate the p-values. The bootstrapping method resamples the individuals "nboots" times and calculates FST every time for each locus. Then all the calculated FST > 0 are summed and divided by "nboots" to get the p-value. In other words, the proportion of bootstrapped FST values equal to zero or less (no differentiation between populations) is used as the P-value for differentiation.

So, if all the bootstrapped FST values are zero, the p-value will be zero.

You can increase the number of bootstraps ("nboots") to be more confident in the statistical significance of your results.

Cheers,
Luis

Bernd.Gruber

unread,
Aug 20, 2022, 9:37:22 AM8/20/22
to da...@googlegroups.com
Hi,

Not sure if this is what you are looking for.

You can calculate overall Fsts using package hierfstat.

hierfstat uses genind objects so you need to convert you data with the gl2gi function first and then the hierfstat function should work.

If it works can you please let us know.


Cheer, Bernd

————————————————————————————————————

Bernd Gruber

Professor Spatial and Ecological Modelling

Institute for Applied Ecology 

P 02 62063804  E bernd....@canberra.edu.au

appliedecology.edu.au

University of Canberra, ACT 2617

NOTICE & DISCLAIMER: This email and any files transmitted with it may contain confidential or copyright materials 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.Australian Government Higher Education (CRICOS)Registered Provider number: #00212K
————————————————————————————————————

On 20 Aug 2022, at 10:20, Jose Luis Mijangos <luis.m...@gmail.com> wrote:


--

mukiibi robert

unread,
Dec 15, 2023, 11:13:05 AM12/15/23
to dartR
Hi Luis,
I am kind of having the same problem. I ran the following command to estimate Fst values >>>fst2=gl.fst.pop(snp_data, nboots = 100, percent = 95, nclusters = 1, verbose = NULL).
All my estimates were returned with Pvalues 0, even those that are very low such as 0.01. I am wondering if there is a way to increase the number of decimal places dartR can return for the pvalues. I have tried higher  nboots but no change observed. I am a little skeptical to refer to an Fst of 0.01 as significant, however one of our reviewers wants us to attach pvalues to our Fst estimates.
Thank you in advance,
Robert
FST_pvalues.png
fsts.png

Jose Luis Mijangos

unread,
Dec 18, 2023, 8:19:59 PM12/18/23
to dartR
Hi Robert,

As mentioned, in the previous conversation, the p-value is 0 when none of the bootstraps results is less than zero, so there is not possible to increase the decimals when the p-value is 0. 

Another approach that might be more useful is to calculate Confidence intervals, as shown below. 

devtools::install_github("green-striped-gecko/dartR@dev")

res <- gl.report.fstat(platypus.gl,
                       nboots = 2000,
                       CI.type = "perc",
                       ncpus = parallel::detectCores()-1 ,
                       )

Cheers,
Luis 

Reply all
Reply to author
Forward
0 new messages