New version of Bio++ and a bug in Nhx class

58 views
Skip to first unread message

Yifei Huang

unread,
Nov 19, 2012, 10:17:26 PM11/19/12
to biopp-he...@googlegroups.com
Hi everyone,

I found that the most recent version downloaded from the git repository is very different from the previous stable versions. For example, a lot of libraries have different interfaces and several classes have been merged. Do you suggest to switch to the new version or stick to the stable version now? In addition, I found the Nhx class does not work anymore. It used to work in the git version I downloaded in Jan. 26, 2012, but does not work in the most recent git version and bio++ 2.0.3 (I used exactly the same tree file). The error information is following:

terminate called after throwing an instance of 'bpp::Exception'
  what():  NestedStringTokenizer (constructor). Unclosed block.
Aborted

I attached the example program and the tree I used. Any help is highly appreciated. Thank you very much!

Best,

Yifei

--
Yifei Huang
Department of Biology
McMaster University
testNhx.tar.gz

Julien Yann Dutheil

unread,
Nov 20, 2012, 3:41:22 AM11/20/12
to biopp-he...@googlegroups.com
Hi Yifei,

I have fixed the Nhx bug (at least on your file). There are indeed
some changes since the last stable version, particularly in bpp-phyl.
I think most of them are documented on the devel forum. It is really
up to you to decide on whether you want to shift to the development
version. 99% of the changes on the git version are expected to be on
the next stable version, as we try to keep experimental features on
dedicated branches so that the master branch remains as stable as
possible.

All the best,

J
> --
> You received this message because you are subscribed to the Google Groups
> "Bio++ Usage Help Forum" group.
> To post to this group, send email to biopp-he...@googlegroups.com.
> To unsubscribe from this group, send email to
> biopp-help-for...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Julien Y. Dutheil, Ph-D
0 (+49) 6421 178 986

§ Max Planck Institute for Terrestrial Microbiology
Department of Organismic Interactions
Marburg -- GERMANY

§ Intitute of Evolutionary Sciences - Montpellier
University of Montpellier 2 -- FRANCE

Yifei Huang

unread,
Nov 20, 2012, 4:46:50 PM11/20/12
to biopp-he...@googlegroups.com
Hi Julien,

Thanks a lot for your reply. I decided to move to the new version of bio++. By the way, I downloaded the new git clone today. However, it seems the Nhx class is still buggy. It has the following problems:

1) In the tree file, there are 6 nodes. However, in the parsed tree there are only 3 nodes.

2) The properties cannot be extracted from the nodes using the registered names.

I attached my code for testing. In addition, I tried "make test" for bpp-phyl, but test_nhx and test_likelihood_nh failed.

Best,

Yifei

PS: In Phyl.all, files are missing for the following two lines:
#include "Phyl/NewLikelihood.all"
#include "Phyl/OldLikelihood.all" 
testNhx.tar.gz

Julien Yann Dutheil

unread,
Nov 21, 2012, 7:39:21 AM11/21/12
to biopp-he...@googlegroups.com
Hi Yifei,

Thanks a lot for your feedback! I realized that the dashboard was not
running the unit tests nightly, most likely because of the recent
server update, which explains why I did not see the pb with the
test_nhx before :s.
I have committed a fix for the Nhx parser, which should deal with more
special cases (the issue was the presence/absence of annotations at
the root node). Hope it will work now.
Concerning the test_likelihood_nh unit test, is it constantly failing
on your machine? This can be due to distinct rounding errors, as the
test perform well on my machine for instance...

As for point 2, the property tag is "G" in your example, not "count".
Maybe try with Nhx(false) to use the property names (see
http://biopp.univ-montp2.fr/apidoc/bpp-phyl/html/classbpp_1_1Nhx.html#a001fbb99e4204e08b904bd9f8a9d68f7).

All the best,

Julien.

Yifei Huang

unread,
Nov 25, 2012, 7:14:00 PM11/25/12
to biopp-he...@googlegroups.com
Hi Julien,

Sorry for the late of reply. I downloaded the new version and it works very well. It seems the test_likelihood_nh unit test has no problem in the new version. I don't know why it was failed in the older version but it seems everything is good now. Thanks a lot for your help!

Best,

Yifei


On Wed, Nov 21, 2012 at 7:39 AM, Julien Yann Dutheil <jy.du...@gmail.com> wrote:
I have committed a fix for the Nhx parser, which should deal with more
special cases (the issue was the presence/absence of annotations at
the root node). Hope it will work now.
Concerning the test_likelihood_nh unit test, is it constantly failing
on your machine? This can be due to distinct rounding errors, as the
test perform well on my machine for instance...



Yifei Huang

unread,
Nov 25, 2012, 7:39:44 PM11/25/12
to biopp-he...@googlegroups.com
Hi Julien,

Sorry to bother you again, but I found another small problem in the Nhx parser. I found the Nhx parser cannot read the branch lengths from the tree file. I attached an example which shows the branch lengths in the tree object are 0's instead of the values in the tree file.

Best,

Yifei 

Julien Yann Dutheil

unread,
Nov 26, 2012, 1:21:39 PM11/26/12
to biopp-he...@googlegroups.com
Hi Yifei,

Sorry about that... I think you forgot to attach the example file
showing the bug? Would you mind posting it on the mantis bug tracker
(biopp.univ-montp2.fr/bug) ? I think it is a better place for
reporting this type of issue. Thanks a lot for your patience and
careful debugging!

Cheers,

J.

Yifei Huang

unread,
Nov 28, 2012, 12:21:00 PM11/28/12
to biopp-he...@googlegroups.com
Hi Julien,

Thanks for your reply. I submitted the problem to the mantis bug tracker.

Best,

Yifei

Julien Yann Dutheil

unread,
Dec 16, 2012, 4:50:48 AM12/16/12
to biopp-he...@googlegroups.com
Hi Yifei,

Cannot remember if I said it already... but I have hopefully corrected
this issue... sorry for the late notice :s

J.

Yifei Huang

unread,
Dec 16, 2012, 11:04:36 AM12/16/12
to biopp-he...@googlegroups.com
Thanks a lot, Julien. I tried the new code and it seems good.

Best,

Yifei
Reply all
Reply to author
Forward
0 new messages