Doing Bootstrapping of phylogenetic tree

43 views
Skip to first unread message

Tamanna Batra

unread,
Apr 16, 2024, 11:42:38 AMApr 16
to poppr
How to do bootstrapping of phylogenetic tree made from genetic distance matrix in GenAlex software? i have  tried in aboot function available in poppr but it is showing error.
Kindly help with this.


Thank you

Zhian Kamvar

unread,
Apr 16, 2024, 11:50:39 AMApr 16
to Tamanna Batra, poppr
Unfortunately, you cannot perform a bootstrap analysis using a distance matrix calculated outside of R unless you can also calculate the same distance matrix inside R.

To perform a bootstrap analysis, you need the function that creates the distance matrix from the data. If you know the distance metric that GenAlEx was using, and it exists in R, then you can calculate the bootstrap values.

--
You received this message because you are subscribed to the Google Groups "poppr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/f2e6c0a1-c833-4762-a855-bb2d591935b7n%40googlegroups.com.

Zhian Kamvar

unread,
Apr 16, 2024, 6:38:03 PMApr 16
to Tamanna Batra, poppr
In general, for calculating boostraps for a tree in R, all you need is the original genetic data and the aboot function will take care of the rest.
 
My question is can i use that genetic distance data in the format which R accepts to calculate the bootstrap values for the phylogenetic tree constructed in MEGA.

You cannot use that genetic distance data to calculate bootstrap values for the reasons I stated in the previous response.

 The genetic distance matrix calculated by Genalex is based on Nei’s distance and in poppr manual it is mentioned that aboot function can do Bootstrapping for any genetic distance calculated. So may be i need to change my genetic distance format to some other genind or genclone object as mentioned in the manual that i am not clear about. Please explain this also.

You should not use the distance matrix generated by GenAlEx. Instead, you can read your data into poppr as a genclone object by using the `read.genalex()` function as shown in this tutorial: https://grunwaldlab.github.io/Population_Genetics_in_R/Data_Preparation.html.
From there, you can use `aboot(myData, dist = nei.dist)` to bootstrap a tree based on nei's distance as shown in https://grunwaldlab.github.io/Population_Genetics_in_R/Pop_Structure.html#genetic-distance (note that Nei's distance assumes you are comparing populations and can lead to very long branch lengths for individuals, see section 3.4 of https://cran.r-project.org/web/packages/poppr/vignettes/algo.pdf).

So if you are saying i can only calculate BS values if i had calculated genetic distance in R itself then only this function will work.but for now as i have not done everything in R , i just wanted to learn how to calculate and interpret those BS values in R  for the phylogenetic tree. So what should i do should i go for calculating bruvo distance for codominant allelic data. So that from bruvo i can go for BS values. Plz help in this.

Bruvo's distance has its own bootstrap function called `bruvo.boot()` and it takes a genind or genclone object. Like the answer above, read in your data with `read.genalex()` and then pass it to the `bruvo.boot()` function, making sure to note the repeat lengths of the SSR markers (see https://grunwaldlab.github.io/poppr/reference/bruvo.boot.html).

One more thing in Bootstrapping it is mentioned that we need to calculate some confidence intervals. Plz brief it about this also.

I do not believe you can calculate a confidence interval. The bootstrap values represent the confidence level for a particular clade to contain all the members across bootstrap samples.

I hope that helps.

Best,
Zhian


On Tue, Apr 16, 2024 at 10:46 AM Tamanna Batra <tamanna...@gmail.com> wrote:
Thank you for reply
I have one more query regarding this.
i am working on the co-dominant markers. I have scored the alleles as per the base pairs size and generated the scoring file of it and from that created genetic distance matrix using Genalex software and then created the dendrogram in MEGA software by that genetic distance file format. My question is can i use that genetic distance data in the format which R accepts to calculate the bootstrap values for the phylogenetic tree constructed in MEGA.

My second question is
The genetic distance matrix calculated by Genalex is based on Nei’s distance and in poppr manual it is mentioned that aboot function can do Bootstrapping for any genetic distance calculated. So may be i need to change my genetic distance format to some other genind or genclone object as mentioned in the manual that i am not clear about. Please explain this also.

My next query is regarding bruvo’s distance.
So if you are saying i can only calculate BS values if i had calculated genetic distance in R itself then only this function will work.but for now as i have not done everything in R , i just wanted to learn how to calculate and interpret those BS values in R  for the phylogenetic tree. So what should i do should i go for calculating bruvo distance for codominant allelic data. So that from bruvo i can go for BS values. Plz help in this.

One more thing in Bootstrapping it is mentioned that we need to calculate some confidence intervals. Plz brief it about this also.

Waiting for your respone
Thank you so much for your previous reply.
Regards
Tamanna

> On 16-Apr-2024, at 9:20 PM, Zhian Kamvar <zka...@gmail.com> wrote:
>

Tamanna Batra

unread,
Apr 17, 2024, 4:46:33 PMApr 17
to Zhian Kamvar, poppr
Reply all
Reply to author
Forward
0 new messages