Question: Convert tree confidence values to integers
0
gravatar for roussine
21 months ago by
roussine10
roussine10 wrote:

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.

bootstrap tree confidence • 495 views
ADD COMMENTlink modified 21 months ago • written 21 months ago by roussine10

Alex - thanx indeed for this advice

ADD REPLYlink written 21 months ago by roussine10
0
gravatar for Alex Reynolds
21 months ago by
Alex Reynolds29k
Seattle, WA USA
Alex Reynolds29k wrote:

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); } }'
ADD COMMENTlink modified 21 months ago • written 21 months ago by Alex Reynolds29k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 927 users visited in the last hour