Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

Create Phylogeny Tree (Newick File) from Distance Matrix?

$
0
0

I have established my gene clusters and already calculated the distances needed to measure their phylogenetic relationship. I used an algorithm basically gives a measure of distance between gene clusters and is represented in a dataframe such as (Input Example):

BGC1      BGC2     Distance
------------------------------ 
BGC31     BGC34     0.6
BGC34     BGC45     0.7
BGC34     BGC53     0.2
BGC53     BGC31     0.8

x <- data.frame(BGC1 = c('BGC31','BGC34','BGC34','BGC35'), 
                BGC2 = c('BGC34','BGC45','BGC53','BGC51'), 
                distance = c(0.6,0.7,0.2,0.8))

Goal: Would it be possible to construct a tree just based on this type of data? I want to have a .newick file available for this as well, I'm not sure if this is possible using R though.

However, I have been able to create network visualizations from this data through Cytoscape but not possibly a tree. Any further suggestions for this particular example?

Thanks once again for your input :)


Viewing all articles
Browse latest Browse all 206278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>