BioPython upgma tree construction is not giving ultrametric tree
0
0
Entering edit mode
8.1 years ago

distanceMatrix = TreeConstruction._DistanceMatrix(names, matrix) treeConstructor = TreeConstruction.DistanceTreeConstructor(method = 'upgma') upgmaTree = treeConstructor.upgma(distanceMatrix) Phylo.draw(upgmaTree)

Below is the matrix. names = ['a','b','c','d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't']

matrix = [[0], [0.018744503210352675, 0], [0.030681603516372374, 0.020927067938666236, 0], [0.03520909690374213, 0.02586495007230356, 0.006949293856950145, 0], [0.03464626797898091, 0.02417293415279258, 0.007482409357620393, 0.00647344783627073, 0], [0.03660512222929122, 0.02793801584073725, 0.010889047965694967, 0.007161144575822319, 0.013527956476122458, 0], [0.06705591296440506, 0.06615929960876647, 0.06988877740205153, 0.06841522303184029, 0.07431339420263505, 0.06166325696512467, 0], [0.04714721338685092, 0.03835995003207764, 0.021150739071372774, 0.014923244750154285, 0.02093494649805793, 0.01223288557737774, 0.06447388890685803, 0], [0.05447770566184877, 0.054874041196571424, 0.046958174689812206, 0.04483300739388885, 0.04775073254619876, 0.0393239212506531, 0.02188409742049191, 0.040190635901619795, 0], [0.05793001955237661, 0.05569074754740878, 0.05137023148811482, 0.04886427825545678, 0.051962266876149354, 0.04332987243320595, 0.0329372967988775, 0.04419252696407532, 0.018634315034919573, 0], [0.0591173885809013, 0.05968653338761247, 0.05762850964586366, 0.05687530027574156, 0.06015601793039398, 0.05095585477595671, 0.020551964084559164, 0.05265511329417505, 0.016960088835703224, 0.012759573758152227, 0], [0.06777123855702892, 0.06203327562014589, 0.058840352620458995, 0.05439949753351657, 0.059629607761207, 0.049727504963747275, 0.06076938789487119, 0.049196040780601843, 0.05085708686188672, 0.03395941620908704, 0.041502366911549425, 0], [0.07431639819512934, 0.07344408892796256, 0.07466376874833285, 0.07519564096917904, 0.07834890816425122, 0.06925853371803847, 0.017733398176501606, 0.07028198563829714, 0.028212383363258105, 0.038864261641563556, 0.02711534261860941, 0.061193653541703134, 0], [0.07547797556246287, 0.07461362763745001, 0.07582124195486474, 0.07652392439652442, 0.07923748904549929, 0.07020262510425798, 0.020185256565341266, 0.07183871559748775, 0.029833649258433577, 0.04015803032720721, 0.02892427732619484, 0.06194036535569757, 0.0052834282179202875, 0], [0.0633847253681389, 0.06204791008668825, 0.06265899076660351, 0.06230270912162486, 0.06603919803468006, 0.05686061443707367, 0.03329789414821894, 0.05814943138780366, 0.030083161526693616, 0.016730958100021696, 0.017719581078078615, 0.02552991048859133, 0.03550206328824084, 0.036829602468964585, 0], [0.068521590573409, 0.06895483140191644, 0.06975862898255106, 0.06876025160578675, 0.07272922964651352, 0.06326409618677598, 0.02348415044090272, 0.06331776277672503, 0.024133300591877363, 0.02105352237114453, 0.017556188661822004, 0.03746026895202758, 0.0249805309134754, 0.025928501435135747, 0.0122247945900332, 0], [0.06832697604379308, 0.06189898718559618, 0.0585267912604104, 0.05514820460480938, 0.05878907852780096, 0.05039126300929354, 0.05979844462423396, 0.048883827301294126, 0.05276035654621845, 0.03584257903803827, 0.04238777064163311, 0.0033617884190000617, 0.06159864619793543, 0.062143561170401644, 0.026006476971835047, 0.038077142539892306, 0], [0.06436607737667455, 0.05811519490363505, 0.055287588039123974, 0.05207539719085771, 0.05471662499674246, 0.04820622902014582, 0.05748892639543255, 0.047906286196458675, 0.05155285773374079, 0.034784485342876634, 0.04167797067458582, 0.0032157175967075305, 0.06001538760252313, 0.061457870654019975, 0.025608378050063118, 0.03645065735609213, 0.0007201567414604025, 0], [0.06351374109329287, 0.06132035673281027, 0.06196142056873907, 0.059580395817744214, 0.06248343049053701, 0.054875227557153114, 0.0361881040704989, 0.055492851496172294, 0.03546805417164056, 0.021759888740429004, 0.021335760253969372, 0.03213850266913885, 0.03820380611929065, 0.04030404700788155, 0.020528762927047067, 0.0225610863036145, 0.03225750338069647, 0.03179177052241966, 0], [0.06241826065659629, 0.058702183367751966, 0.05906311711357131, 0.05691307078403723, 0.05990350332376738, 0.051862084529305234, 0.04112593371589233, 0.052508635079869866, 0.03741040172543958, 0.021824328333276907, 0.02506762294389942, 0.017523898814946315, 0.04364377889113788, 0.04506948241938768, 0.013351229377106305, 0.024297590537420963, 0.01780367190975875, 0.01730654842236901, 0.015410830121846615, 0]]

upgma treeconstruction ultrametric trees • 1.8k views
ADD COMMENT

Login before adding your answer.

Traffic: 2196 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