PTP in bPTP web server vs mPTP web server

508 views
Skip to first unread message

jj biodiversity

unread,
Mar 28, 2022, 9:05:00 PM3/28/22
to PTP and GMYC species delimitation
Dear community,

I've recently delved into PTP, and tried it on two webservers (https://mptp.h-its.org/ and https://species.h-its.org/).

Are the single rate PTP in mptp server and PTP in the other server different from one another?

In mptp website, I tried single-rate, which resulted in partitions close to morphology and ABGD. (55 partitions)

In PTP website however, both maximum likelihood and bayesian solution resulted in unrealistic oversplitting of species. (over 8- partitions)

I would appreciate your helps.

Lutteropp, Sarah

unread,
Mar 29, 2022, 2:01:49 AM3/29/22
to jj biodiversity, PTP and GMYC species delimitation

Hi!


While both mPTP single and PTP aim optimize the same target function, the tools use different heuristic algorithms to do so.


The mPTP implementation is cooler, newer, and faster (mind the bias - I'm a coauthor of it). And it tends to achieve better results. You can compare the loglikelihoods and AIC scores reported by both methods to see which tool did a better job in optimizing the target function, and which one got stuck in a worse local optimum.


Best regards,

Sarah



From: ptp-species-...@googlegroups.com <ptp-species-...@googlegroups.com> on behalf of jj biodiversity <jjbiodi...@gmail.com>
Sent: Tuesday, March 29, 2022 3:05 AM
To: PTP and GMYC species delimitation
Subject: PTP in bPTP web server vs mPTP web server
 
--
You received this message because you are subscribed to the Google Groups "PTP and GMYC species delimitation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ptp-species-delimi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptp-species-delimitation/4fbdc802-cb8d-4fb0-871f-9df5b72575fen%40googlegroups.com.

jj biodiversity

unread,
Mar 29, 2022, 2:48:50 AM3/29/22
to PTP and GMYC species delimitation
Thank you for your prompt reply Sarah,

So is PTP option in mPTP web server (https://mptp.h-its.org/ ) still counts as mPTP? I am confused, as my understanding is that mPTP is having different rate per species and PTP is having a single rate for all species. 

I would love to know the difference between the single rate PTP option in the mPTP webserver vs PTP, since the former works so much better!
On the other hand, mPTP options in the same webserver resulted in over-lumping. 

Regards,
Jeong

Lutteropp, Sarah

unread,
Mar 29, 2022, 2:51:36 PM3/29/22
to jj biodiversity, PTP and GMYC species delimitation

Hi Jeong!


Back then we implemented two target functions for mPTP, using either single rate or multiple rates:


In mPTP single, we compute the loglikelihood the same way as in the PTP program, using a single rate.

In mPTP multi, we compute the loglikelihood using multiple rates.


From the command line documentation (https://github.com/Pas-Kapli/mptp/blob/master/src/mptp.c#L390):

" --single Use one lambda for all coalescent.\n"
" --multi Use one lambda per coalescent (this is default).\n"


I took a look at the MPTP source code (especially at

https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c), and verified that the target function that is optimized by the DP heuristic is indeed the loglikelihood function (using either single or multi rate, depending on the selected model).


If using the single-rate model, this is also used to select the species delimitation, and only compared to the null model via a Likelihood-Ratio-Test (see https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207 and https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L237).


But if using the multi-rate model, another step is done. After having computed the "best" species delimitations for 1, ..., n species (i.e., the ones that score highest in the multi-rate loglikelihood function), the Akaike Information Criterion (https://en.wikipedia.org/wiki/Akaike_information_criterion#Modification_for_small_sample_size) is used for model comparison (see https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L194). With this criterion, a more complex model (i.e., more species) is only accepted if it increases the target function's value enough compared to a less complex model (i.e., less species). This is why you observed over-lumping on your data when using mPTP with this model.


To summarize:

- Both PTP and mPTP-single optimize exactly the same target function. The only difference lies in the heuristic algorithm that is used to maximize the loglikelihood under a single rate.

- mPTP-multi does model comparison via AIC, which can lead to over-lumping in some cases.


I hope this helps! Sorry that I did not remember these details. The code is nearly 7 years old, and I'm not working in Academia anymore.


Best regards,

Sarah



Sent: Tuesday, March 29, 2022 8:48 AM

To: PTP and GMYC species delimitation
Subject: Re: PTP in bPTP web server vs mPTP web server
 

jj biodiversity

unread,
Mar 29, 2022, 11:22:20 PM3/29/22
to PTP and GMYC species delimitation
Hello Sarah,

Thank you very much for your detailed explanations and summaries! Though I am still unsure what I can do to improve the results in relation to AIC for mPTP, I now understand that PTP and single-rate mPTP are essentially the same, minus the different heuristic algorithm. I suppose I should stick with the single rate for now.

Would you be so kind to look at my other question regarding PTP (and mPTP)? Why is it that removing distantly related groups improves the results? For my dataset, PTP only delimited the closely related species accurately when I removed the outgroups and other distantly related ingroup species.

Regards,
Jeong

Alexandros Stamatakis

unread,
Apr 4, 2022, 4:09:05 AM4/4/22
to ptp-species-...@googlegroups.com
Dear Jeong,

> Thank you very much for your detailed explanations and summaries! Though
> I am still unsure what I can do to improve the results in relation to
> AIC for mPTP, I now understand that PTP and single-rate mPTP are
> essentially the same, minus the different heuristic algorithm. I suppose
> I should stick with the single rate for now.

We believe that the multiple rate version is the better model.

> Would you be so kind to look at my other question regarding PTP (and
> mPTP)? Why is it that removing distantly related groups improves the
> results? For my dataset, PTP only delimited the closely related species
> accurately when I removed the outgroups and other distantly related
> ingroup species.

Well, as we don't know the absolute truth, I would state that removing
the outgroups yields different results, not necessarily improve results.

Beyond this, both PTP and mPTP are essentially conducting a
classification on the branch lengths of a phylogenetic tree into inter
versus intra-species branches, hence fiddling with the branch lengths or
even the tree itself (removing the outgroup) will change the branch
length distribution that mPTP operates on and hence naturally yield
different results. I nontheless, do believe that removing an outgroup
yet keeping the root it yielded is a reasonable thing to do such as to
not distort mpTP too much.

Hope this helps,

Alexis

>
> Regards,
> Jeong
>
>
> On Tuesday, March 29, 2022 at 2:51:36 PM UTC-4 sarah.l...@h-its.org wrote:
>
> Hi Jeong!
>
>
> Back then we implemented two target functions for mPTP, using either
> single rate or multiple rates:
>
>
> In mPTP single, we compute the loglikelihood the same way as in the
> PTP program, using a single rate.
>
> In mPTP multi, we compute the loglikelihood using multiple rates.
>
>
> From the command line documentation
> (https://github.com/Pas-Kapli/mptp/blob/master/src/mptp.c#L390
> <https://github.com/Pas-Kapli/mptp/blob/master/src/mptp.c#L390>):
>
> " --single Use one lambda for all coalescent.\n"
> " --multi Use one lambda per coalescent (this is default).\n"
>
>
> I took a look at the MPTP source code (especially at
>
> https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c),
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c> and
> verified that the target function that is optimized by the DP
> heuristic is indeed the loglikelihood function (using either single
> or multi rate, depending on the selected model).
>
>
> If using the single-rate model, this is also used to select the
> species delimitation, and only compared to the null model via a
> Likelihood-Ratio-Test (see
> https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207> and
> https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L237).
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L237>
>
>
> But if using the multi-rate model, another step is done. After
> having computed the "best" species delimitations for 1, ..., n
> species (i.e., the ones that score highest in the multi-rate
> loglikelihood function), the Akaike Information Criterion
> (https://en.wikipedia.org/wiki/Akaike_information_criterion#Modification_for_small_sample_size
> <https://en.wikipedia.org/wiki/Akaike_information_criterion#Modification_for_small_sample_size>)
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L194>). With
> this criterion, a more complex model (i.e., more species) is only
> accepted if it increases the target function's value enough compared
> to a less complex model (i.e., less species). This is why you
> observed over-lumping on your data when using mPTP with this model.
>
>
> To summarize:
>
> - Both PTP and mPTP-single optimize exactly the same target
> function. The only difference lies in the heuristic algorithm that
> is used to maximize the loglikelihood under a single rate.
>
> - mPTP-multi does model comparison via AIC, which can lead to
> over-lumping in some cases.
>
>
> I hope this helps! Sorry that I did not remember these details. The
> code is nearly 7 years old, and I'm not working in Academia anymore.
>
>
> Best regards,
>
> Sarah
>
>
> ------------------------------------------------------------------------
> *From:* ptp-species-...@googlegroups.com
> <ptp-species-...@googlegroups.com> on behalf of jj biodiversity
> <jjbiodi...@gmail.com>
> *Sent:* Tuesday, March 29, 2022 8:48 AM
>
> *To:* PTP and GMYC species delimitation
> *Subject:* Re: PTP in bPTP web server vs mPTP web server
> ------------------------------------------------------------------------
> *From:* ptp-species-...@googlegroups.com
> <ptp-species-...@googlegroups.com> on behalf of jj biodiversity
> <jjbiodi...@gmail.com>
> *Sent:* Tuesday, March 29, 2022 3:05 AM
> *To:* PTP and GMYC species delimitation
> *Subject:* PTP in bPTP web server vs mPTP web server
> Dear community,
>
> I've recently delved into PTP, and tried it on two webservers
> (https://mptp.h-its.org/ <https://mptp.h-its.org/> and
> https://species.h-its.org/ <https://species.h-its.org/>).
>
> Are the single rate PTP in mptp server and PTP in the other
> server different from one another?
>
> In mptp website, I tried single-rate, which resulted in
> partitions close to morphology and ABGD. (55 partitions)
>
> In PTP website however, both maximum likelihood and bayesian
> solution resulted in unrealistic oversplitting of species. (over
> 8- partitions)
>
> I would appreciate your helps.
>
> --
> You received this message because you are subscribed to the
> Google Groups "PTP and GMYC species delimitation" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to ptp-species-delimi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptp-species-delimitation/4fbdc802-cb8d-4fb0-871f-9df5b72575fen%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/4fbdc802-cb8d-4fb0-871f-9df5b72575fen%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTP and GMYC species delimitation" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to ptp-species-delimi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptp-species-delimitation/7d357ba6-3c7f-4909-a943-4d95ac334337n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/7d357ba6-3c7f-4909-a943-4d95ac334337n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTP and GMYC species delimitation" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptp-species-delimi...@googlegroups.com
> <mailto:ptp-species-delimi...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptp-species-delimitation/1b9ea4a2-26f6-4750-a25c-3af93ddc3a11n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/1b9ea4a2-26f6-4750-a25c-3af93ddc3a11n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Alexandros (Alexis) Stamatakis

Research Group Leader, Heidelberg Institute for Theoretical Studies
Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
Affiliated Scientist, Evolutionary Genetics and Paleogenomics (EGP) lab,
Institute of Molecular Biology and Biotechnology, Foundation for
Research and Technology Hellas

www.exelixis-lab.org

jj biodiversity

unread,
Aug 27, 2022, 4:19:54 PM8/27/22
to PTP and GMYC species delimitation
Dear Alexis,

Thank you kindly for your reply, and apologies for the very late reply. 
I think your explanation gave me better understanding of how branch length distribution can affect PTP. 

I have a relevant question regarding my result here, which as to do with over-lumping of species. 
I would most appreciate it if you would see my reasoning for why this happens makes sense!

--I used PTP result (maximum likelihood solution), and the gene of choice is ITS2. The outgroups were excluded for the initial analysis, but PTP only classified the basal species with longer branches as discreet species, while lumping the other species with shorter branches as one MOTU.

This changed when I also excluded the several basal ingroup species, which resulted in the previously lumped species partitioned in accordance with morphology and COI PTP result.

My guess of why this happens is that:
The basal ingroups have much longer branches compared to the other ingroup species that were initially lumped. 
And/or
The branch lengths between the basal ingroups and the other initially lumped species are much larger than the branch lengths between the initially lumped species.

This largely uneven distribution of branch lengths between the groups confused PTP, which assumes only single speciation and coalescence rate. Thus classified the longer branches among the basal species as speciation, while the shorter branches between the others as coalescence (thus lumped as a single species).--


I attached my two PTP results here. May I also send you the tree file if it would help?

Regards,
Jeong 

output.PTPMLPartition.txt.png                                            output.PTPMLPartition.txt (1).png

Alexandros Stamatakis

unread,
Sep 5, 2022, 6:24:36 AM9/5/22
to ptp-species-...@googlegroups.com
Dear Jeong,

Yes, that makes sense from the point of view of PTP as it just takes
into account the tree structure and the branch lengths for delimitation.

Alexis

On 27.08.22 23:19, jj biodiversity wrote:
> Dear Alexis,
>
> Thank you kindly for your reply, and apologies for the very late reply.
> I think your explanation gave me better understanding of how branch
> length distribution can affect PTP.
>
> I have a relevant question regarding my result here, which as to do with
> over-lumping of species.
> I would most appreciate it if you would see my reasoning for why this
> happens makes sense!
>
> *--*I used PTP result (maximum likelihood solution), and the gene of
> choice is ITS2. The outgroups were excluded for the initial analysis,
> but PTP only classified the basal species with longer branches as
> discreet species, while lumping the other species with shorter branches
> as one MOTU.
>
> This changed when I also excluded the several basal ingroup species,
> which resulted in the previously lumped species partitioned in
> accordance with morphology and COI PTP result.
>
> My guess of why this happens is that:
> The basal ingroups have much longer branches compared to the other
> ingroup species that were initially lumped.
> And/or
> The branch lengths between the basal ingroups and the other initially
> lumped species are much larger than the branch lengths between the
> initially lumped species.
>
> This largely uneven distribution of branch lengths between the groups
> confused PTP, which assumes only single speciation and coalescence rate.
> Thus classified the longer branches among the basal species as
> speciation, while the shorter branches between the others as coalescence
> (thus lumped as a single species).*--*
>
>
> I attached my two PTP results here. May I also send you the tree file if
> it would help?
>
> Regards,
> Jeong
>
> output.PTPMLPartition.txt.png output.PTPMLPartition.txt (1).png
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c>),
> > <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c>> and
> > verified that the target function that is optimized by the DP
> > heuristic is indeed the loglikelihood function (using either single
> > or multi rate, depending on the selected model).
> >
> >
> > If using the single-rate model, this is also used to select the
> > species delimitation, and only compared to the null model via a
> > Likelihood-Ratio-Test (see
> > https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207>
> > <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L207>> and
> > https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L237
> <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L237>).
> > <https://github.com/Pas-Kapli/mptp/blob/master/src/dp.c#L237
> <https://groups.google.com/d/msgid/ptp-species-delimitation/4fbdc802-cb8d-4fb0-871f-9df5b72575fen%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptp-species-delimitation/4fbdc802-cb8d-4fb0-871f-9df5b72575fen%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "PTP and GMYC species delimitation" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to ptp-species-delimi...@googlegroups.com.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ptp-species-delimitation/7d357ba6-3c7f-4909-a943-4d95ac334337n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/7d357ba6-3c7f-4909-a943-4d95ac334337n%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/ptp-species-delimitation/7d357ba6-3c7f-4909-a943-4d95ac334337n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptp-species-delimitation/7d357ba6-3c7f-4909-a943-4d95ac334337n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "PTP and GMYC species delimitation" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to ptp-species-delimi...@googlegroups.com
> > <mailto:ptp-species-delimi...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ptp-species-delimitation/1b9ea4a2-26f6-4750-a25c-3af93ddc3a11n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/1b9ea4a2-26f6-4750-a25c-3af93ddc3a11n%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/ptp-species-delimitation/1b9ea4a2-26f6-4750-a25c-3af93ddc3a11n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptp-species-delimitation/1b9ea4a2-26f6-4750-a25c-3af93ddc3a11n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Alexandros (Alexis) Stamatakis
>
> Research Group Leader, Heidelberg Institute for Theoretical Studies
> Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
> Affiliated Scientist, Evolutionary Genetics and Paleogenomics (EGP)
> lab,
> Institute of Molecular Biology and Biotechnology, Foundation for
> Research and Technology Hellas
>
> www.exelixis-lab.org <http://www.exelixis-lab.org>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTP and GMYC species delimitation" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptp-species-delimi...@googlegroups.com
> <mailto:ptp-species-delimi...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptp-species-delimitation/42915ab2-fd1b-43c6-aaf9-8646d3cf2472n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/42915ab2-fd1b-43c6-aaf9-8646d3cf2472n%40googlegroups.com?utm_medium=email&utm_source=footer>.

jj biodiversity

unread,
Sep 5, 2022, 9:56:02 AM9/5/22
to PTP and GMYC species delimitation
Dear Alexis,

Thank you kindly for the confirmation.

Jeong

Emmanuel Olajide

unread,
Sep 5, 2022, 12:13:34 PM9/5/22
to PTP and GMYC species delimitation
Dear Alex,

How long does it take to get GYMC result.
It takes days?.

Alexandros Stamatakis

unread,
Sep 5, 2022, 11:36:23 PM9/5/22
to ptp-species-...@googlegroups.com
It depends on the input size, normally it should be faster though in
most cases,

Alexis
> <http://www.exelixis-lab.org <http://www.exelixis-lab.org>>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "PTP and GMYC species delimitation" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to ptp-species-delimi...@googlegroups.com
> > <mailto:ptp-species-delimi...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ptp-species-delimitation/42915ab2-fd1b-43c6-aaf9-8646d3cf2472n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/42915ab2-fd1b-43c6-aaf9-8646d3cf2472n%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/ptp-species-delimitation/42915ab2-fd1b-43c6-aaf9-8646d3cf2472n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptp-species-delimitation/42915ab2-fd1b-43c6-aaf9-8646d3cf2472n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Alexandros (Alexis) Stamatakis
>
> Research Group Leader, Heidelberg Institute for Theoretical Studies
> Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
> Affiliated Scientist, Evolutionary Genetics and Paleogenomics (EGP)
> lab,
> Institute of Molecular Biology and Biotechnology, Foundation for
> Research and Technology Hellas
>
> www.exelixis-lab.org <http://www.exelixis-lab.org>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTP and GMYC species delimitation" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptp-species-delimi...@googlegroups.com
> <mailto:ptp-species-delimi...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptp-species-delimitation/5efdb52e-49ba-4336-b4bb-69a23bed9b28n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptp-species-delimitation/5efdb52e-49ba-4336-b4bb-69a23bed9b28n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages