File: nwk_to_dot.cpp

package info (click to toggle)
iqtree 2.0.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 14,620 kB
  • sloc: cpp: 142,571; ansic: 57,789; sh: 275; python: 242; makefile: 95
file content (15 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../lib/io_utils.hpp"
#include "../lib/trees_impl.hpp"

#include <iostream>
#include <terraces/parser.hpp>

int main(int argc, char** argv) {
	if (argc < 3) {
		std::cerr << "Usage: " << argv[0] << " [treefile] [rooted]";
		return -1;
	}
	auto tree = terraces::parse_new_nwk(terraces::utils::read_file_full(argv[1]));
	bool rooted = bool(std::stoi(argv[2]));
	terraces::print_tree_dot(tree.tree, tree.names, std::cout, rooted);
}