Can you add type=int, so that you don't have to cast from string to int on line 58?
Also, the help message should explain the semantics of the -1 as doing all pairwise, and mention under what conditions the different output files are created.