<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I have a question about the pairwise distance calculation in the DistanceCalculator under Phylo.TreeConstruction.</div><div class=""><br class=""></div><div class="">It pertains to the normalization.</div><div class=""><br class=""></div><div class="">Line 456.</div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> </span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);">return</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> </span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> </span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);">-</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> (score </span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);">*</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> </span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);">1.0</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> </span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);">/</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""> max_score)</span></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 13.44px; white-space: pre; widows: 1; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><br class=""></div><div style="widows: 1;" class=""><font color="#333333" class=""><span style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class="">I understand that the goal here is to have a distance between 0 and 1. But couldn’t this be greater than 1 if say score was negative as is allowed in PAM and BLOSUM lookup matrices. Perhaps the entire distance matrix should be computed, then a minimum and maximum derived, and then normalized between 0 and 1 rather than do it on a pairwise basis. What do you think?</span></span></font></div><div style="widows: 1;" class=""><font color="#333333" class=""><span style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class=""><br class=""></span></span></font></div><div style="widows: 1;" class=""><font color="#333333" class=""><span style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class="">Jordan</span></span></font></div></body></html>