# HG changeset patch # User dfornika # Date 1530041639 14400 # Node ID a6cd59f35832853ab203fc4354c6a0989632b925 # Parent f29e7738bb6474037376870032dab4e81e201ae2 Uploaded diff -r f29e7738bb64 -r a6cd59f35832 tools/mentalist_tree/mentalist_tree --- a/tools/mentalist_tree/mentalist_tree Mon Jun 18 15:52:32 2018 -0400 +++ b/tools/mentalist_tree/mentalist_tree Tue Jun 26 15:33:59 2018 -0400 @@ -57,6 +57,10 @@ input_file = sys.argv[1] reader = csv.reader(open(input_file, "r"), delimiter="\t") input_matrix = list(reader) + # Don't build a tree with fewer than 3 samples, just produce an empty file + if len(input_matrix) < 4: + print('();') + sys.exit(0) distance_matrix = process_input_matrix(input_matrix) constructor = DistanceTreeConstructor() tree = constructor.nj(distance_matrix) diff -r f29e7738bb64 -r a6cd59f35832 tools/mentalist_tree/mentalist_tree.xml --- a/tools/mentalist_tree/mentalist_tree.xml Mon Jun 18 15:52:32 2018 -0400 +++ b/tools/mentalist_tree/mentalist_tree.xml Tue Jun 26 15:33:59 2018 -0400 @@ -1,6 +1,6 @@ - biopython + biopython ]]> - 10.1101/172858