FePhyFoFum / phyx

phylogenetics tools for linux (and other mostly posix compliant) computers
blackrim.org
GNU General Public License v3.0
111 stars 17 forks source link

Question on tests #92

Closed gaballench closed 5 years ago

gaballench commented 5 years ago

Hi,

I just compiled phyx under ubuntu. When running python run_tests.py I got some tests failing. The end of the output is:

...
PASSED TESTS: 31
FAILED TESTS: 9
These failed:
    pxt2new,pxrmk,pxrr,pxcolt,pxmrcacut,pxtscale,pxrlt,pxrmt,pxmrcaname

After inspecting the whole output I spotted the specific tests that failed:

...
intended output: (((TaxonA:0.10000000000000000555,TaxonB:0.02999999999999999889):0.125,TaxonC:0.25):0.4000000000000000222,(TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333):0.2999999999999999889);

your output: (((TaxonA:0.10000000000000000555,TaxonB:0.02999999999999999889):0.12500000000000000000,TaxonC:0.25000000000000000000):0.40000000000000002220,(TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333):0.29999999999999998890);
...
intended output: (((((s4:0.11903321910000000394,s5:0.11903321910000000394)C:0.025441717459999999007,s6:0.14447493659999999238)D:0.76476400190000004553,s7:0.90923893850000003791)E:0.76874934999999999796,(s3:1.2572336289999999082,(s1:0.36035534310000000291,s2:0.36035534310000000291)A:1.19687828620000003)B:0.52075465919999996967)F:0.063491588919999994434,((s8:0.31068892650000001776,s9:0.31068892650000001776)G:0.10315082489999999327,s10:0.41383975140000001103)H:1.3276401259999999205);

your output: (((((s4:0.11903321910000000394,s5:0.11903321910000000394)C:0.02544171745999999901,s6:0.14447493659999999238)D:0.76476400190000004553,s7:0.90923893850000003791)E:0.76874934999999999796,(s3:1.25723362899999990816,(s1:0.36035534310000000291,s2:0.36035534310000000291)A:1.19687828620000002999)B:0.52075465919999996967)F:0.06349158891999999443,((s8:0.31068892650000001776,s9:0.31068892650000001776)G:0.10315082489999999327,s10:0.41383975140000001103)H:1.32764012599999992048);
...
intended output: (TaxonA:0.050000000000000002776,(TaxonB:0.02999999999999999889,((TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333):0.69999999999999995559,TaxonC:0.25):0.125):0.050000000000000002776);

your output: (TaxonA:0.05000000000000000278,(TaxonB:0.02999999999999999889,((TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333):0.69999999999999995559,TaxonC:0.25000000000000000000):0.12500000000000000000):0.05000000000000000278);
...
intended output: ((TaxonC:0.25,TaxonA:0.22500000000000000555,TaxonB:0.15499999999999999889)1.0:0.4000000000000000222,(TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333)0.94:0.2999999999999999889);

your output: ((TaxonC:0.25000000000000000000,TaxonA:0.22500000000000000555,TaxonB:0.15499999999999999889)1.0:0.40000000000000002220,(TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333)0.94:0.29999999999999998890);
...
intended output: ((((s19:8.9192294969999998955,s21:8.9192294939999996473):19.95224960999999908,(((s28:1.9460922439999999156,(s29:1.0875761909999999144,(s30:0.89291712800000000438,s31:0.89291712800000000438):0.1946590628000000045):0.85851605259999996811):8.3971209000000008871,s32:10.343213150000000411):11.095432569999999828,((s33:7.2263048049999998312,((s34:2.6703496819999998912,s35:2.6703496819999998912):2.2229339779999999216,s36:4.8932836599999998128):2.3330211450000000184):7.1928712350000001408,((s38:0.64219284539999998973,s39:0.64219284539999998973):0.026374224099999999532,s40:0.66856706949999999967):13.750608970000000042):7.0194696820000004323):7.4328333889999997908):9.4218491340000003476,(((s46:12.201041119999999296,s49:12.201041119999999296):6.604755154000000239,(s51:5.415238384000000238,s52:5.415238384000000238):13.390557890000000185):7.9737073949999999201,s56:26.779503670000000426):11.513824579999999642):38.8094614199999981,(((((s87:3.6908438889999999333,s88:3.6908438889999999333):11.450733709999999732,(((s90:4.7201172930000003802,(s91:3.9975684220000000657,s92:3.9975684220000000657):0.72254887099999998146):1.5459479199999999199,(s93:2.1981845510000002086,s94:2.1981845510000002086):4.0678806630000003963):0.40424694570000002658,s95:6.6703121569999996865):8.4712654399999998134):12.393069060000000192,((s98:5.0744154459999997187,s100:5.0744154459999997187):14.972703170000000839,s104:20.047118619999999112):7.4875280369999996921):20.733653700000001407,s126:48.268300349999996968):16.541938389999998549,((((s133:19.194524080000000765,(s135:5.4586278740000002685,(s136:0.5006869268000000428,s137:0.5006869268000000428):4.9579409449999998216):13.73589620999999994):8.3350646560000001273,s140:27.529588740000001224):2.2861742469999999372,((s151:16.862653529999999336,((s153:3.929431493000000053,s154:3.929431493000000053):0.58952085890000005541,(s155:4.4774633660000002777,(s156:2.7123332000000002218,s157:2.7123332000000002218):1.765130166000000056):0.041488986419999998589):12.343701169999999223):11.437733610000000439,s162:28.300387140000001551):1.515375848999999997):2.6277221590000001683,((s169:7.8409351410000001081,s170:7.8409351410000001081):7.5946375750000001403,(s172:13.329860059999999677,(s173:6.7214149780000003176,((s174:0.30807071029999999467,s175:0.30807071029999999467):4.1074336630000001236,s177:4.4155043730000000934):2.3059106030000000587):6.6084450869999997735):2.1057126570000002097):17.007912430000001081):32.366753600000002677):12.292550920000000048);
((((((s283:0.49950781950000000542,s284:0.49950781950000000542):2.3766585789999998823,s285:2.8761663990000001512):13.275750099999999776,s286:16.151916490000001403):14.555233230000000688,(s288:9.130600983000000781,(s289:5.3395037639999998191,s290:5.3395037639999998191):3.7910972179999999909):21.576548739999999782):2.471388135000000208,((s292:0.10949029849999999953,s293:0.10949029849999999953):21.110084839999998962,s296:21.219575139999999891):11.958962720000000601):12.972100010000000125,s307:46.150637869999997065);
(s19:8.9192294969999998955,s21:8.9192294939999996473);

your output: ((((s19:8.91922949699999989548,s21:8.91922949399999964726):19.95224960999999908040,(((s28:1.94609224399999991562,(s29:1.08757619099999991441,(s30:0.89291712800000000438,s31:0.89291712800000000438):0.19465906280000000450):0.85851605259999996811):8.39712090000000088708,s32:10.34321315000000041096):11.09543256999999982781,((s33:7.22630480499999983124,((s34:2.67034968199999989125,s35:2.67034968199999989125):2.22293397799999992159,s36:4.89328365999999981284):2.33302114500000001840):7.19287123500000014076,((s38:0.64219284539999998973,s39:0.64219284539999998973):0.02637422409999999953,s40:0.66856706949999999967):13.75060897000000004198):7.01946968200000043225):7.43283338899999979077):9.42184913400000034756,(((s46:12.20104111999999929594,s49:12.20104111999999929594):6.60475515400000023902,(s51:5.41523838400000023796,s52:5.41523838400000023796):13.39055789000000018518):7.97370739499999992006,s56:26.77950367000000042594):11.51382457999999964215):38.80946141999999809968,(((((s87:3.69084388899999993328,s88:3.69084388899999993328):11.45073370999999973208,(((s90:4.72011729300000038023,(s91:3.99756842200000006571,s92:3.99756842200000006571):0.72254887099999998146):1.54594791999999991994,(s93:2.19818455100000020863,s94:2.19818455100000020863):4.06788066300000039632):0.40424694570000002658,s95:6.67031215699999968649):8.47126543999999981338):12.39306906000000019219,((s98:5.07441544599999971865,s100:5.07441544599999971865):14.97270317000000083851,s104:20.04711861999999911177):7.48752803699999969211):20.73365370000000140749,s126:48.26830034999999696765):16.54193838999999854877,((((s133:19.19452408000000076527,(s135:5.45862787400000026850,(s136:0.50068692680000004280,s137:0.50068692680000004280):4.95794094499999982162):13.73589620999999993955):8.33506465600000012728,s140:27.52958874000000122351):2.28617424699999993720,((s151:16.86265352999999933559,((s153:3.92943149300000005297,s154:3.92943149300000005297):0.58952085890000005541,(s155:4.47746336600000027772,(s156:2.71233320000000022176,s157:2.71233320000000022176):1.76513016600000005596):0.04148898641999999859):12.34370116999999922314):11.43773361000000043930,s162:28.30038714000000155124):1.51537584899999999699):2.62772215900000016831,((s169:7.84093514100000010814,s170:7.84093514100000010814):7.59463757500000014034,(s172:13.32986005999999967742,(s173:6.72141497800000031759,((s174:0.30807071029999999467,s175:0.30807071029999999467):4.10743366300000012359,s177:4.41550437300000009344):2.30591060300000005867):6.60844508699999977352):2.10571265700000020971):17.00791243000000108054):32.36675360000000267746):12.29255092000000004759);
((((((s283:0.49950781950000000542,s284:0.49950781950000000542):2.37665857899999988234,s285:2.87616639900000015118):13.27575009999999977595,s286:16.15191649000000140290):14.55523323000000068816,(s288:9.13060098300000078098,(s289:5.33950376399999981913,s290:5.33950376399999981913):3.79109721799999999092):21.57654873999999978196):2.47138813500000020795,((s292:0.10949029849999999953,s293:0.10949029849999999953):21.11008483999999896241,s296:21.21957513999999989096):11.95896272000000060132):12.97210001000000012539,s307:46.15063786999999706495);
(s19:8.91922949699999989548,s21:8.91922949399999964726);
...
intended output: (((TaxonA:1,TaxonB:0.2999999999999999889):1.25,TaxonC:2.5):4,(TaxonD:2.3000000000000002665,TaxonE:1.6000000000000000888):3);

your output: (((TaxonA:1.00000000000000000000,TaxonB:0.29999999999999998890):1.25000000000000000000,TaxonC:2.50000000000000000000):4.00000000000000000000,(TaxonD:2.30000000000000026645,TaxonE:1.60000000000000008882):3.00000000000000000000);
...
intended output: (Eubacteria:4200,(Archaea:3806.0102499999998145,((((SAR:1626.0427319999998872,Plant:1626.0276670000000649):72.380183999999999855,Excavata:1698.4229159999999865):74.73121999999999332,Amoebozoa:1773.1541360000001077):7.9375349999999995632,(Animal:1295.717544000000089,Fungi:1295.7033610000000863):485.3800600000000145):2024.9200000000000728):394);

your output: (Eubacteria:4200.00000000000000000000,(Archaea:3806.01024999999981446308,((((SAR:1626.04273199999988719355,Plant:1626.02766700000006494520):72.38018399999999985539,Excavata:1698.42291599999998652493):74.73121999999999331976,Amoebozoa:1773.15413600000010774238):7.93753499999999956316,(Animal:1295.71754400000008899951,Fungi:1295.70336100000008627831):485.38006000000001449735):2024.92000000000007275958):394.00000000000000000000);
...
intended output: ((TaxonC:0.25,TaxonB:0.15499999999999999889):0.4000000000000000222,(TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333):0.2999999999999999889);

your output: ((TaxonC:0.25000000000000000000,TaxonB:0.15499999999999999889):0.40000000000000002220,(TaxonD:0.23000000000000000999,TaxonE:0.16000000000000000333):0.29999999999999998890);
...
intended output: (((((s19:8.9192294969999998955,s21:8.9192294939999996473)THURSTON:19.95224960999999908,(((s28:1.9460922439999999156,(s29:1.0875761909999999144,(s30:0.89291712800000000438,s31:0.89291712800000000438):0.1946590628000000045):0.85851605259999996811):8.3971209000000008871,s32:10.343213150000000411):11.095432569999999828,((s33:7.2263048049999998312,((s34:2.6703496819999998912,s35:2.6703496819999998912):2.2229339779999999216,s36:4.8932836599999998128):2.3330211450000000184):7.1928712350000001408,((s38:0.64219284539999998973,s39:0.64219284539999998973):0.026374224099999999532,s40:0.66856706949999999967):13.750608970000000042):7.0194696820000004323):7.4328333889999997908):9.4218491340000003476,(((s46:12.201041119999999296,s49:12.201041119999999296):6.604755154000000239,(s51:5.415238384000000238,s52:5.415238384000000238):13.390557890000000185):7.9737073949999999201,s56:26.779503670000000426):11.513824579999999642):38.8094614199999981,(((((s87:3.6908438889999999333,s88:3.6908438889999999333):11.450733709999999732,(((s90:4.7201172930000003802,(s91:3.9975684220000000657,s92:3.9975684220000000657):0.72254887099999998146):1.5459479199999999199,(s93:2.1981845510000002086,s94:2.1981845510000002086):4.0678806630000003963):0.40424694570000002658,s95:6.6703121569999996865):8.4712654399999998134):12.393069060000000192,((s98:5.0744154459999997187,s100:5.0744154459999997187):14.972703170000000839,s104:20.047118619999999112):7.4875280369999996921):20.733653700000001407,s126:48.268300349999996968):16.541938389999998549,((((s133:19.194524080000000765,(s135:5.4586278740000002685,(s136:0.5006869268000000428,s137:0.5006869268000000428):4.9579409449999998216):13.73589620999999994):8.3350646560000001273,s140:27.529588740000001224):2.2861742469999999372,((s151:16.862653529999999336,((s153:3.929431493000000053,s154:3.929431493000000053):0.58952085890000005541,(s155:4.4774633660000002777,(s156:2.7123332000000002218,s157:2.7123332000000002218):1.765130166000000056):0.041488986419999998589):12.343701169999999223):11.437733610000000439,s162:28.300387140000001551):1.515375848999999997):2.6277221590000001683,((s169:7.8409351410000001081,s170:7.8409351410000001081):7.5946375750000001403,(s172:13.329860059999999677,(s173:6.7214149780000003176,((s174:0.30807071029999999467,s175:0.30807071029999999467):4.1074336630000001236,s177:4.4155043730000000934):2.3059106030000000587):6.6084450869999997735):2.1057126570000002097):17.007912430000001081):32.366753600000002677):12.292550920000000048)KIM:22.897210330000000056,((((((((s213:0.20297418419999999073,s214:0.20297418419999999073):12.716102810000000645,((s216:5.6164296230000001486,(s218:3.7133940970000001158,s219:3.7133940970000001158):1.9030355269999998935):3.1149687089999997802,(s221:4.9410893590000002362,s222:4.9410893610000004017):3.7903089730000001367):4.1876786619999997185):2.7811719639999998854,s224:15.700248959999999698):8.1136411430000006106,(s228:16.403987719999999939,s229:16.403987719999999939):7.4099023769999998734):20.193931890000001772,(((s235:1.1647619609999999568,s237:1.1647619609999999568):30.92897798999999992,(((s239:11.809203410000000289,(s240:1.1451934539999999441,s241:1.1451934539999999441):10.664009959999999566):6.4760607239999998797,(s243:5.3663286640000000816,s244:5.3663286640000000816):12.918935480000000027):0.58795460539999999661,((s246:1.0213854540000000259,s247:1.0213854540000000259):2.2789929720000001723,s248:3.3003784249999998934):15.572840319999999181):13.220521209999999357):1.9422983140000000812,((((s252:0.89098380509999997034,s253:0.89098380509999997034):1.4460778729999999026,(s254:0.53647671720000000839,s255:0.53647671720000000839):1.8005849609999999839):0.53514565960000004541,s256:2.8722073379999999432):1.8723211109999999824,s257:4.7445284489999997035):29.291509810000000869):9.9717837229999997106):17.839297959999999676,(s266:27.929393990000001224,(s268:4.2347317469999996575,s269:4.2347317469999996575):23.694662239999999542):33.917725959999998508):17.52852757000000139,(((((((s283:0.49950781950000000542,s284:0.49950781950000000542):2.3766585789999998823,s285:2.8761663990000001512):13.275750099999999776,s286:16.151916490000001403):14.555233230000000688,(s288:9.130600983000000781,(s289:5.3395037639999998191,s290:5.3395037639999998191):3.7910972179999999909):21.576548739999999782):2.471388135000000208,((s292:0.10949029849999999953,s293:0.10949029849999999953):21.110084839999998962,s296:21.219575139999999891):11.958962720000000601):12.972100010000000125,s307:46.150637869999997065)LEE:9.3515165059999993957,(s325:1.5758250609999999714,s326:1.5758250609999999714):53.926329320000000678):23.873493140000000778):10.771398910000000271,(((s340:9.9405505230000006378,s341:9.9405505230000006378):21.029577369999998382,((s345:9.0691226749999991341,s347:9.0691226769999992996):1.9682665619999999418,(s348:7.1978738189999997843,s350:7.1978738189999997843):3.8395154179999999577):19.932738659999998276):45.330191679999998655,(s381:4.5261479199999996581,s382:4.5261479199999996581):71.774171659999993267):13.846726849999999587):9.8529535619999997209);

your output: (((((s19:8.91922949699999989548,s21:8.91922949399999964726)THURSTON:19.95224960999999908040,(((s28:1.94609224399999991562,(s29:1.08757619099999991441,(s30:0.89291712800000000438,s31:0.89291712800000000438):0.19465906280000000450):0.85851605259999996811):8.39712090000000088708,s32:10.34321315000000041096):11.09543256999999982781,((s33:7.22630480499999983124,((s34:2.67034968199999989125,s35:2.67034968199999989125):2.22293397799999992159,s36:4.89328365999999981284):2.33302114500000001840):7.19287123500000014076,((s38:0.64219284539999998973,s39:0.64219284539999998973):0.02637422409999999953,s40:0.66856706949999999967):13.75060897000000004198):7.01946968200000043225):7.43283338899999979077):9.42184913400000034756,(((s46:12.20104111999999929594,s49:12.20104111999999929594):6.60475515400000023902,(s51:5.41523838400000023796,s52:5.41523838400000023796):13.39055789000000018518):7.97370739499999992006,s56:26.77950367000000042594):11.51382457999999964215):38.80946141999999809968,(((((s87:3.69084388899999993328,s88:3.69084388899999993328):11.45073370999999973208,(((s90:4.72011729300000038023,(s91:3.99756842200000006571,s92:3.99756842200000006571):0.72254887099999998146):1.54594791999999991994,(s93:2.19818455100000020863,s94:2.19818455100000020863):4.06788066300000039632):0.40424694570000002658,s95:6.67031215699999968649):8.47126543999999981338):12.39306906000000019219,((s98:5.07441544599999971865,s100:5.07441544599999971865):14.97270317000000083851,s104:20.04711861999999911177):7.48752803699999969211):20.73365370000000140749,s126:48.26830034999999696765):16.54193838999999854877,((((s133:19.19452408000000076527,(s135:5.45862787400000026850,(s136:0.50068692680000004280,s137:0.50068692680000004280):4.95794094499999982162):13.73589620999999993955):8.33506465600000012728,s140:27.52958874000000122351):2.28617424699999993720,((s151:16.86265352999999933559,((s153:3.92943149300000005297,s154:3.92943149300000005297):0.58952085890000005541,(s155:4.47746336600000027772,(s156:2.71233320000000022176,s157:2.71233320000000022176):1.76513016600000005596):0.04148898641999999859):12.34370116999999922314):11.43773361000000043930,s162:28.30038714000000155124):1.51537584899999999699):2.62772215900000016831,((s169:7.84093514100000010814,s170:7.84093514100000010814):7.59463757500000014034,(s172:13.32986005999999967742,(s173:6.72141497800000031759,((s174:0.30807071029999999467,s175:0.30807071029999999467):4.10743366300000012359,s177:4.41550437300000009344):2.30591060300000005867):6.60844508699999977352):2.10571265700000020971):17.00791243000000108054):32.36675360000000267746):12.29255092000000004759)KIM:22.89721033000000005586,((((((((s213:0.20297418419999999073,s214:0.20297418419999999073):12.71610281000000064466,((s216:5.61642962300000014864,(s218:3.71339409700000011583,s219:3.71339409700000011583):1.90303552699999989350):3.11496870899999978022,(s221:4.94108935900000023622,s222:4.94108936100000040170):3.79030897300000013672):4.18767866199999971855):2.78117196399999988543,s224:15.70024895999999969831):8.11364114300000061064,(s228:16.40398771999999993909,s229:16.40398771999999993909):7.40990237699999987342):20.19393189000000177202,(((s235:1.16476196099999995681,s237:1.16476196099999995681):30.92897798999999992020,(((s239:11.80920341000000028941,(s240:1.14519345399999994406,s241:1.14519345399999994406):10.66400995999999956609):6.47606072399999987965,(s243:5.36632866400000008156,s244:5.36632866400000008156):12.91893548000000002673):0.58795460539999999661,((s246:1.02138545400000002594,s247:1.02138545400000002594):2.27899297200000017227,s248:3.30037842499999989343):15.57284031999999918128):13.22052120999999935691):1.94229831400000008124,((((s252:0.89098380509999997034,s253:0.89098380509999997034):1.44607787299999990260,(s254:0.53647671720000000839,s255:0.53647671720000000839):1.80058496099999998385):0.53514565960000004541,s256:2.87220733799999994318):1.87232111099999998238,s257:4.74452844899999970352):29.29150981000000086851):9.97178372299999971062):17.83929795999999967648,(s266:27.92939399000000122442,(s268:4.23473174699999965753,s269:4.23473174699999965753):23.69466223999999954231):33.91772595999999850847):17.52852757000000138987,(((((((s283:0.49950781950000000542,s284:0.49950781950000000542):2.37665857899999988234,s285:2.87616639900000015118):13.27575009999999977595,s286:16.15191649000000140290):14.55523323000000068816,(s288:9.13060098300000078098,(s289:5.33950376399999981913,s290:5.33950376399999981913):3.79109721799999999092):21.57654873999999978196):2.47138813500000020795,((s292:0.10949029849999999953,s293:0.10949029849999999953):21.11008483999999896241,s296:21.21957513999999989096):11.95896272000000060132):12.97210001000000012539,s307:46.15063786999999706495)LEE:9.35151650599999939573,(s325:1.57582506099999997140,s326:1.57582506099999997140):53.92632932000000067774):23.87349314000000077840):10.77139891000000027077,(((s340:9.94055052300000063781,s341:9.94055052300000063781):21.02957736999999838190,((s345:9.06912267499999913412,s347:9.06912267699999929960):1.96826656199999994179,(s348:7.19787381899999978430,s350:7.19787381899999978430):3.83951541799999995774):19.93273865999999827636):45.33019167999999865515,(s381:4.52614791999999965810,s382:4.52614791999999965810):71.77417165999999326687):13.84672684999999958677):9.85295356199999972091);
...

All of them seem to fail because of sensitivity to rounding errors, so I was wondering if such tests represented an issue or whether I could safely ignore them and assume that the behavior of phyx is ok despite such results. I should mention that everything went well with dependencies as far as I can tell.

Thanks,

Gustavo

josephwb commented 5 years ago

Thanks. This is a known issue: the precision of the edge lengths returned has changed. We need ony to update the expected test results. Nothing to worry about on your end!