dlce-eva / python-nexus

python-nexus - Generic nexus (.nex, .trees) reader/writer for python
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

Support reading nexus from stdin where appropriate #17

Closed xrotwang closed 4 years ago

xrotwang commented 4 years ago

This will allow us to build pipelines of chained nexus comands.

xrotwang commented 4 years ago

Looks nice, I think:

$ cat tests/examples/example.nex | nexus combine - tests/examples/example.nex 

#NEXUS

[0 - 1: 1                                                              ]
[2 - 3: example                                                        ]
BEGIN DATA;
    DIMENSIONS NTAX=4 NCHAR=4;
    FORMAT DATATYPE=STANDARD MISSING=? GAP=-  SYMBOLS="01";

MATRIX
Betty     1010
Harry     0000
Louise    1111
Simon     0101
;
END;
SimonGreenhill commented 4 years ago

Oh, very cool -- thanks!