Convert tree confidence values to integers
Dear all,
can anyone share if there is a command-line utility for UNIX that would convert bootstrap/confidence values in trees from fractions (0-1) to integers (1-100)? Keeping intact branch lengths and OTU names.
Thanks a lot in advance.
• 1,663 views
•
link
1 answer
If your tree file is text-formatted, you could use awk to convert fractions to percentage values, adding some logic to test for errors, e.g.:
$ echo "0.123" | awk '{ r=int(100*$0); if((r>=0)&&(r<=100)){ print r; } else { print "error"; exit(-1); } }'
• 0 views
•
link
Log in to answer this question.
Alex - thanx indeed for this advice