Question: Convert tree confidence values to integers
0
gravatar for roussine
14 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 • 369 views
ADD COMMENTlink modified 14 months ago • written 14 months ago by roussine10

Alex - thanx indeed for this advice

ADD REPLYlink written 14 months ago by roussine10
0
gravatar for Alex Reynolds
14 months ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k 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 14 months ago • written 14 months ago by Alex Reynolds28k
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: 1492 users visited in the last hour