Skip to content

Commit

Permalink
Preparing for release
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondac committed Jun 22, 2018
1 parent 416c7c2 commit 315727b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 46 deletions.
4 changes: 3 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -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

Expand Down
45 changes: 0 additions & 45 deletions nexus_tree_to_phyloxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 315727b

Please sign in to comment.