Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.22 KB

nni.md

File metadata and controls

54 lines (40 loc) · 1.22 KB

Gotree: toolkit and api for phylogenetic tree manipulation

Commands

nni

This command generates all NNI neighbors from a given tree.

Usage

Usage:
  gotree nni [flags]

Flags:
  -h, --help            help for nni
  -i, --input string    Input Tree (default "stdin")
  -o, --output string   NNI output tree file (default "stdout")

Global Flags:
      --format string   Input tree format (newick, nexus, or phyloxml) (default "newick")

Example

  • Generates NNI neighbors
echo "(n1_1,n1_2,(n2_1,n2_2)n2)n1;" | gotree nni

It should give the following trees:

(n1_1,n2_2,(n2_1,n1_2)n2)n1;
(n1_1,n2_1,(n1_2,n2_2)n2)n1;

Tree:

n1_1 ---------------+                +--------------- n2_1
                    |----------------|                            
n1_2 ---------------+                +--------------- n2_2

NNIs:

n1_1 ---------------+                +--------------- n2_1
                    |----------------|                            
n2_2 ---------------+                +--------------- n1_2

n1_1 ---------------+                +--------------- n1_2
                    |----------------|                            
n2_1 ---------------+                +--------------- n2_2