Comments (3)
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.
nwkit (https://github.com/kfuku52/nwkit) mcmctree command can do this but have bug (kfuku52/nwkit#7).
from gotree.
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)
- issue in gotree HOT 3
- Issue installating goalign/gotree HOT 2
- Bipartition question HOT 8
- Hey
- gotree new release HOT 3
- nexus_parser.go:169:15: cannot use func literal (type func(string, string)) as type func(string, string) bool in argument to al.seqbag.Iterate HOT 10
- Convert between (un)quoted taxon labels HOT 4
- Robinson-Foulds or other HOT 2
- compare distances documentation HOT 2
- gotree collpase length not working? HOT 2
- Output list of taxon labels? HOT 3
- Version string not displayed HOT 4
- Added width and background options for svg and png HOT 3
- Possible bug with gotree prune HOT 8
- Bug of generate. HOT 2
- strange results tree
- Newick parsing failing if there is trailing whitespace after semicolon
- Strange label placement on radial svg
- About negative branches on NJ tree HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotree.