Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when parsing tree with Fbranch #22

Closed
mrml500 opened this issue Jul 21, 2020 · 17 comments
Closed

Error when parsing tree with Fbranch #22

mrml500 opened this issue Jul 21, 2020 · 17 comments

Comments

@mrml500
Copy link

mrml500 commented Jul 21, 2020

Hi,

Thanks for creating this package.

I am experiencing a similar issue as posted here (#13), but the solution was not provided:

##Command:
Dsuite Fbranch tree.nwk combined_tree.txt > f_branch.txt
##Error:
ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is:
(Outgroup,((AG-018,AG-024),((AA-006,AA-019),(AU-015,AA-015))));

I used the same tree file for the Dtrios and DtriosCombine commands and that successfully generated the combined_tree.txt file for the F_branch command. Sub-setting the data and removing the Outgroup didn't make any difference.

Any ideas what could be causing this error?

All the best,
Mike

@millanek
Copy link
Owner

Hi Mike
My best guess would be a spelling error in your tree file. If you can't figure it out, feel free to email me with your combined_tree.txt and the tree.nwk files, I can try to investigate.

Kind regards
Milan

@mrml500
Copy link
Author

mrml500 commented Jul 23, 2020 via email

@millanek
Copy link
Owner

millanek commented Sep 1, 2020

Hi Mike

Thanks for your patience. A few other people reported similar problems. The reason is: Dtrios just kind of "looks over” the tree to find the arrangement of the trios, whereas Fbranch needs to do a full tree data-structure parsing. So the code is different, and the Fbranch code was less flexible about the format of the input. In your case it was the dashes "-" in the taxon names that caused the trouble.

I have made the parser more flexible, so I think it should work with your file and also for people who have blank spaces in the group names. I also added a check for duplicate entries in the trees. This is all in the latest version r38.

Milan

@millanek millanek closed this as completed Sep 1, 2020
@siberianhigh
Copy link

Hi Milan,

I've got the same problem with the version 0.4 r38

Dsuite Fbranch tree.txt sets__tree.txt > fbranch.txt ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is: (Outgroup,internalNode1X,internalNode5X);

But my tree is very simple: (Outgroup,((a,b),c),(((d,h),(e,f)),g));

Do you have any suggestions?

best,
Evgeniy

@SethMusker
Copy link

I had a problem with full stops (periods) in my names as well. Replacing with underscores fixed the problem.

@siberianhigh Try putting the outgroup at the end?
(((a,b),c),(((d,h),(e,f)),g),Outgroup);

@furr-rui
Copy link

Hi Milan,

I've got the same problem with the version 0.4 r38

Dsuite Fbranch all10qa11qv.nwk out_combined_tree.txt > all10pop_branch.txt
ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is:
(((((((internalNode0X,(internalNode1X)),TBS),internalNode4X),JJL),DWX),internalNode13X),Outgroup);
Do you have any suggestions?

best,
frr

@SethMusker
Copy link

It looks like the brackets around (internalNode1X) might be redundant. Try removing them?

@furr-rui
Copy link

furr-rui commented Jan 13, 2022 via email

@yefanglee
Copy link

Thank you for your reply. I have successfully solved this problem.

------------------ 原始邮件 ------------------ 发件人: "millanek/Dsuite" @.>; 发送时间: 2022年1月12日(星期三) 下午4:16 @.>; @.@.>; 主题: Re: [millanek/Dsuite] Error when parsing tree with Fbranch (#22) It looks like the brackets around (internalNode1X) might be redundant. Try removing them? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

Hi, I met the same problems as you. Could you please tell me how to solve it? Thanks!
((((((internalNode0X)))),(internalNode1X,((NUB),((SIB))))),((FAL.00099760),((BEZ),((WAS,((EUR),((SAF),(EAF,(NAF))))),((SAS),(SC,(NC)))))))

@Prashantevo
Copy link

Hi there,

I am having the same error as above.

ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is:
((Dpop,(internalNode1X,internalNode7X,(11pop,internalNode8X,internalNode11X))),Outgroup);

I do not have any pop name with periods or - , rather 1pop, 2pop.

I also tried with new version yet getting same issue. Can someone help ?

@yefanglee
Copy link

Hi there,

I am having the same error as above.

ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is: ((Dpop,(internalNode1X,internalNode7X,(11pop,internalNode8X,internalNode11X))),Outgroup);

I do not have any pop name with periods or - , rather 1pop, 2pop.

I also tried with new version yet getting same issue. Can someone help ?

that means your tree string was not correct. you can check carefully tree string.

@Prashantevo
Copy link

Hi there,
I am having the same error as above.
ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is: ((Dpop,(internalNode1X,internalNode7X,(11pop,internalNode8X,internalNode11X))),Outgroup);
I do not have any pop name with periods or - , rather 1pop, 2pop.
I also tried with new version yet getting same issue. Can someone help ?

that means your tree string was not correct. you can check carefully tree string.

I used the tree generated by FastTree just removing branch values.

@yefanglee
Copy link

Hi there,
I am having the same error as above.
ERROR: The tree string could not be parsed correctly! The remaining unparsed tree string is: ((Dpop,(internalNode1X,internalNode7X,(11pop,internalNode8X,internalNode11X))),Outgroup);
I do not have any pop name with periods or - , rather 1pop, 2pop.
I also tried with new version yet getting same issue. Can someone help ?

that means your tree string was not correct. you can check carefully tree string.

I used the tree generated by FastTree just removing branch values.

So did I, but the tree string generated by FastTree always didn't work for branch. I conducted a NWK file by myself.

@Prashantevo
Copy link

Prashantevo commented Nov 30, 2023

Thank you so much for your reply.

I am confused how would you revise/edit tree.
my tree looks like this:

(Outgroup,(18pop,((15pop,(17pop,16pop)),(7pop,(6pop,(5pop,(4pop,(3pop,(1pop,2pop)))))),((11pop,(8pop,10pop),((12pop,9pop),(14pop,13pop)))))));

PS: I have also tried putting outgroup at the end

@yefanglee
Copy link

Thank you so much for your reply.

I am confused how would you revise/edit tree. my tree looks like this:

(Outgroup,(18pop,((15pop,(17pop,16pop)),(7pop,(6pop,(5pop,(4pop,(3pop,(1pop,2pop)))))),((11pop,(8pop,10pop),((12pop,9pop),(14pop,13pop)))))));

PS: I have also tried putting outgroup at the end

your original tree was showed in below according to your tree string. But I think there was something wrong with it.
image
Here I reconstructed a tree string: (((((((((((1,2),3),4),5),6),7),((((9,12),(13,14)),(8,10)),11)),((16,17),15)),19),O). I am not sure if it can success in Franch.

@Prashantevo
Copy link

Thank you very much. I removed 19 and it worked.

@HuTaoJiaZiAckerman
Copy link

Can you try that your tree.nek file put on itol(https://itol.embl.de/) websites to re-root. After export again as a nwk format, you code will work! I hope this approach can slove the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants