Error: maintree file can have only one tree.

360 views
Skip to first unread message

Kelly

unread,
Oct 11, 2023, 9:08:10 AM10/11/23
to PAML discussion group
Any help with this error? My tree file does in fact have only one tree in it.

Sandra AC

unread,
Oct 11, 2023, 9:17:18 AM10/11/23
to PAML discussion group
Hi Kelly,

Can you please share the tree file and the control file you are using? In that way, it will be easier for troubleshooting :) 

Cheers,
S.

Kelly

unread,
Oct 11, 2023, 9:38:47 AM10/11/23
to PAML discussion group
Whoops, I think I sent that as a PM by accident. Let me know if you didn't get it, Sandra. And thank you again for the help!
Message has been deleted

Skip

unread,
Feb 5, 2024, 2:20:31 PM2/5/24
to PAML discussion group
Was there a solution to this problem? I'm having the same issue. Attached are my tree and control file.
gecko_mcmctree.ctl
gecko_inTree.tre

Sandra AC

unread,
Feb 5, 2024, 2:36:02 PM2/5/24
to PAML discussion group
Hi there,

I am not sure I received Kelly's private message nor a notification with the latest message in October, sorry! Kelly, if you are still following this thread of messages and still need help, please send your files so that I can check again.

Skip, your tree file has branch lengths and the notation that you are using for the calibrations is incorrect (i.e., wrong format). In a nutshell, you have soft-bound calibrations following this format: "B-2.356-2.631-9.99999999999999e-301-0.025-". You should follow the format "B(min_age,max_age,min_tail,max_tail)". For hard bounds, please use "1E-300" -- not sure what "9.99999999999999e-301" is supposed to mean. I have seen that you also have lower bounds, which also follow the wrong format. You can find all the details regarding the PAML notation to incorporate node age constraints in the PAML documentation (pp. 49-52). As aforementioned, please also remove the branch lengths as detailed in the PAML Wiki too. Seeing that you have formatting issues in your input files, please check that your input sequence file is correctly formatted -- you will also find all this information in the PAML Wiki.

Hope this helps!
S.

Skip

unread,
Feb 5, 2024, 3:36:18 PM2/5/24
to PAML discussion group
Thank you. I've been using the R package MCMCtreeR since this is such large and unwieldy tree. I thought that the calibrations looked funky, but I was hoping PAML wouldn't get bogged down by that. I'll give this another try.

Thanks again.

Jose Fernández Simón

unread,
Oct 7, 2025, 9:56:16 AMOct 7
to PAML discussion group

Hello Sandra,

I was running MCMCtree (following your tutorial) and got the same error as in this thread: 


Running MCMCtree_prior for divergence times estimation ..

error: maintree file can have only one treeMCMCTREE in paml version 4.10.7, June 2023


I read a previous message about this issue here, but I still did not find any problem with my tree (attached here). Any idea?


Thankyou!


Here is my tree:


112 1
(((Acteon_tornatilis,(Hydatina_amplustre,Micromelo_undatus))'B(266.9,274.4,0.025,0.025)',(Ringiculoides_cf_kurilensis,(Microglyphis_hasegawai,Ringicula_sp))'B(161.5,165.3,0.025,0.025)'),(((Tylodina_perversa,Tylodina_rafinesquii_MCZ392619)'B(61.66,66,0.025,0.025)',(((Limacina_antarctica2,Clio_piatkowski),(Peracle_sp_X640,(Aplysia_dactylomela_ZMBN84917,Akera_bullata_ZMBN83032))),((Pseudoilbia_avellana_MCZ393926,(Runcina_adriatica_MCZ393924,Runcina_africana_MCZ393925)),((Bullacta_caurina_NHMUK20070444,Bulla_vernicosa_MCZ393827),(Chelidonura_punctata_ZMBN105147,Hamineobulla_kawamurai_NHMUK20070016))'B(168.6,170.9,0.025,0.025)'))),(((Omalogyra_sp2,Omalogyra_sp1),((Oxynoe_olivacea,Lobiger_souverbii),(Platyhedyle_denudata1,((Elysia_pusilla_MCZ393737,Plakobranchus_ocellatus),((Cyerce_elegans_MCZ393754,Polybranchia_jensenae_MCZ393773),(Costasiella_nonatoi,(Stiliger_llerae,Placida_dendritica))))))),(((Leucotina_sp,(Odostomia_plicata,Toledonia_cf_limnaeoides)),(Turbonilla_paucistriata,((Mormula_sp_85469,Pyrgostylus_striatulus_12043),(Mumiola_sp_35476,(Longchaeus_acus_80525,(Pyramidelloidea_34343,Tiberia_yellow))))))'B(241.464,246.7,0.025,0.025)',(((Asperspina_brambelli,(Pontohedyle_milaschewitchii,Microhedyle_glandulifera_Istria)),((Aiteng_cf_mysticus_Vanuatu,Bathyhedyle_boucheti),(Hedylopsis_spiculifera,(Pseudunela_cornuta,(Strubellia_paradoxa,(Acochlidium_amboinense,Potamohedyle_espinosai)))))),(((Glacidorbis_rusticus,Glacidorbis_hedleyi),(Salinator_sp,(Phallomedusa_solida,(Amphibola_crenata_ZSMMol20250132,Amphibola_crenata_ZSMMol20250126)))),((((Williamia_gussoni,Williamia_peltoides),(Siphonaria_pectinata,(Siphonaria_lessoni,(Siphonaria_atra,(Siphonaria_savignyi,(Siphonaria_alternata,(Siphonaria_sp_2,Siphonaria_normalis)))))))'B(132.6,137.05,0.025,0.025)',(Chilina_sp,((Aplexa_hypnorum,(Physa_fontinalis,Physella_acuta)),((Radix_ovata,(Galba_truncatula,Stagnicola_fuscus)),(Ancylus_fluviatilis,(Planorbella_duryi,(Hippeutis_complanatus,Gyraulus_chinensis)))))'B(168.2,170.9,0.025,0.025)')),((((Auriculastra_tornatelliformis,Melampus_luteus),(Smeagol_phillipensis,(Marinula_sp,(Otina_ovata,Trimusculus_sp)))),((Ellobium_aurisjudae,Leucophytia_bidentata),(Carychium_tridentatum,(Pythia_scarabaeus,(Ovatella_firminii,(Cassidula_nucleus,Laemodonta_bella))))))'B(61.66,66,0.025,0.025)',((Scolodonta_interrupta,(Rumina_decollata,((Fruticicola_fruticum,Helix_pomatia),(Granaria_frumentum,(Arion_distinctus,(Nanina_citrina,(Vitrinia_pellucida,(Malacolimax_tenellus,Deroceras_cf_agreste))))))))'B(121.4,125.77,0.025,0.025)',((Vaginula_lactea,Veronicellidae_Brazil),((Onchidella_cf_hildae,(Onchidella_celtica,(Onchidella_marginata,Onchidella_nigricans))),((Veronicella_sp,Onchidium_reevesii),(Peronia_setoensis,(Peronia_verruculata,Peronia_okinawensis))))))))))))));



Sandra AC

unread,
Oct 7, 2025, 10:03:45 AMOct 7
to PAML discussion group
Hi José,

Thanks for reaching out! Could you please send me the exact tree file and control file you are using? I can create a dummy alignment but, if you can send yours over, that would save me some time before troubleshooting.

Just some general comments: the time unit should be 100Myr and you need to place a root age constraint in the Newick tree as recommended in the PAML Wiki. You can find some examples for tree and control files in the tutorial you are following in my GitHub repository or our latest tutorial in the PAML GitHub repository.

As soon as I get your input files, I shall troubleshoot what may be going wrong!

All the best,
Sandy

Sandra AC

unread,
Oct 10, 2025, 9:53:17 AMOct 10
to PAML discussion group
Hi everyone,

After exchanging additional emails with Jose, I figured out that the issue was due to the name given to a working directory. In the GitHub tutorial Jose was following, there is a "sed" command that replaces word "clock" with updated options in the control file. Unfortunately, the working directory where all files were saved was named "molecular_clock"; the name of this working directory is part of the path written in the control file for both the tree and alignment files (i.e., after variables "treefile" and "seqfile"). When the "sed" command was used, the paths for the tree and alignment files were affected, and MCMCtree could not run as these paths were broken.

Hope this can also be helpful to other people in case you find similar errors and/or use commands like "awk" or "sed" in your pipelines!

All the best,
Sandy
Reply all
Reply to author
Forward
0 new messages