Convert tree confidence values to integers
1
0
Entering edit mode
6.8 years ago
roussine ▴ 10

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.

tree bootstrap confidence • 1.3k views
ADD COMMENT
0
Entering edit mode

Alex - thanx indeed for this advice

ADD REPLY
0
Entering edit mode
6.8 years ago

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 COMMENT

Login before adding your answer.

Traffic: 2516 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6