Giter Club home page Giter Club logo

Comments (3)

xiekunwhy avatar xiekunwhy commented on July 30, 2024 1

Yes, that's what I want, and I think the following annotation file may produce the same results

B(79.2, 152.8, 1e-300, 1e-300):cma,dvi
B(89.7, 220.9, 1e-300, 1e-300):agl,dvi
B(152.3, 236.2, 1e-300, 1e-300):tmo,tca
B(250.999938, 302.8938, 0.025, 0.025):cma,ota

run

cat test.nwk|/Bio/User/kxie/software/mambaforge/envs/gotree/bin/gotree annotate -m annotation.txt --comment|tr '[' "'" | tr ']' "'"

I got

((((agl,(cma,dvi)'B(79.2, 152.8, 1e-300, 1e-300)')'B(89.7, 220.9, 1e-300, 1e-300)',sor),((tmo,zmo),tca)'B(152.3, 236.2, 1e-300, 1e-300)'),ota)'B(250.999938, 302.8938, 0.025, 0.025)';

The same.

Thank you very much~

from gotree.

xiekunwhy avatar xiekunwhy commented on July 30, 2024

nwkit (https://github.com/kfuku52/nwkit) mcmctree command can do this but have bug (kfuku52/nwkit#7).

from gotree.

fredericlemoine avatar fredericlemoine commented on July 30, 2024

Hi,

If you know the constraints for each node of the tree, one possibility may be to write an annotation file (annotations.txt):

B(79.2, 152.8, 1e-300, 1e-300):cma,dvi
B(89.7, 220.9, 1e-300, 1e-300):agl,cma,dvi
B(152.3, 236.2, 1e-300, 1e-300):tmo,zmo,tca
B(250.999938, 302.8938, 0.025, 0.025):tmo,zmo,tca,agl,cma,dvi,sor,ota

And attach the annotations as "comments" in the input tree:

echo "((((agl,(cma,dvi)),sor),((tmo,zmo),tca)),ota);" | gotree annotate -m annotations.txt --comment

It should give you a tree like this:

((((agl,(cma,dvi)[B(79.2, 152.8, 1e-300, 1e-300)])[B(89.7, 220.9, 1e-300, 1e-300)],sor),((tmo,zmo),tca)[B(152.3, 236.2, 1e-300, 1e-300)]),ota)[B(250.999938, 302.8938, 0.025, 0.025)];

In which you can just replace all '[' and ']' by ', for example:

echo "((((agl,(cma,dvi)),sor),((tmo,zmo),tca)),ota);" | gotree annotate -m annotations.txt --comment | tr '[' "'" | tr ']' "'"

Result:

((((agl,(cma,dvi)'B(79.2, 152.8, 1e-300, 1e-300)')'B(89.7, 220.9, 1e-300, 1e-300)',sor),((tmo,zmo),tca)'B(152.3, 236.2, 1e-300, 1e-300)'),ota)'B(250.999938, 302.8938, 0.025, 0.025)';

Does it answer your question?

from gotree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.