Skip to content

Commit

Permalink
add tool newick2dot
Browse files Browse the repository at this point in the history
  • Loading branch information
starius committed Jun 25, 2015
1 parent 2d23455 commit d226614
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/bin/newick2dot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env lua

-- tree.lua, Lua representation of trees with edge lengths
-- Copyright (C) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.

local T = require 'tree'

local newick = io.read('*all')
local tree = T.fromNewick(newick)
local graph = tree:toGraph()
local dot = T.toDot(graph)
print(dot)
5 changes: 5 additions & 0 deletions tree-dev-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ build = {
['tree.detail.compat'] = 'src/tree/detail/compat.lua',
['tree.detail.arrayFromIt'] = 'src/tree/detail/arrayFromIt.lua',
},
install = {
bin = {
newick2dot = 'src/bin/newick2dot.lua',
},
},
}

0 comments on commit d226614

Please sign in to comment.