diff --git a/README b/README index 289e4b3..2bde9fc 100644 --- a/README +++ b/README @@ -1,5 +1,7 @@ Scripts for making and manipulating NEXUS files, along with some for -dealing with input databases (such as Munster ones). +dealing with input databases (such as from the INTF in Münster). + +The scripts were designed to work with my input data, and may not always work properly with other data. If it doesn't work, and you would like to help improve the software then please create an issue at https://github.com/edmondac/nexus_scripts/issues Use a virtualenv built with the supplied requirements.txt diff --git a/nexus_tree_to_phyloxml.py b/nexus_tree_to_phyloxml.py index 1219c44..e5e4273 100644 --- a/nexus_tree_to_phyloxml.py +++ b/nexus_tree_to_phyloxml.py @@ -67,51 +67,6 @@ def draw(self): output_file = "{}.phyloxml".format(self.input_file) Phylo.write(tree, output_file, 'phyloxml') - #~ print("Converting to graph") - #~ G = Phylo.to_networkx(tree) - - #~ print("Outputting to GraphML") - #~ output_file = "{}.graphml".format(self.input_file) - #~ networkx.write_graphml(G, output_file) - - # OLD THING 1 - #~ print("Drawing tree - this could take a few minutes...") - #~ output_file = "{}.svg".format(self.input_file) - #~ tree.ladderize() # Flip branches so deeper clades are displayed at top - #~ plt.figure(figsize=(24, 24)) - #~ Phylo.draw(tree) - #~ plt.axis('off') - #~ plt.savefig(output_file) - #~ import pdb; pdb.set_trace() - #~ return - - # OLD THING 2 - #~ net = Phylo.to_networkx(tree) - #~ G = networkx.nx_agraph.to_agraph(net) - #~ G.node_attr.update(color="red", style="filled") - #~ G.edge_attr.update(color="blue", width="2.0") - #~ output_file = "{}.dot".format(self.input_file) - #~ networkx.drawing.nx_pydot.write_dot(net, output_file) - #WARNING - this creates a .dot file but it just doesn't look like a tree! - - # dot - filter for drawing directed graphs - # neato - filter for drawing undirected graphs - # twopi - filter for radial layouts of graphs - # circo - filter for circular layout of graphs - # fdp - filter for drawing undirected graphs - # sfdp - filter for drawing large undirected graphs - # patchwork - filter for tree maps - - #~ G.draw(output_file, format='svg', prog='neato') - - - # OLD THING 3 - #~ with NamedTemporaryFile() as dotfile: - #~ #networkx.write_dot(net, dotfile.name) - #~ networkx.drawing.nx_pydot.write_dot(net, dotfile.name) - #~ _post_process_dot(dotfile.name) - #~ subprocess.check_call(['fdp', '-Tsvg', dotfile.name, '-o', output_file]) - if __name__ == "__main__": import argparse