lib/bio/nwk.rb in bio-nwk-0.1.2 vs lib/bio/nwk.rb in bio-nwk-0.1.3
- old
+ new
@@ -203,5 +203,12 @@
tree = nwk.tree
return(tree)
end
+def getTreeObjFromMcmctree(tree_file)
+ first_line = `head -1 #{tree_file}`.chomp
+ tree_txt = `tail -1 #{tree_file}`.chomp
+ treeio = Bio::Newick.new(tree_txt).tree
+ return([first_line, treeio])
+end
+