tjunier / newick_utils

shell tools for processing phylogenetic trees
Other
104 stars 31 forks source link

Piping in nw_rename (and other tools) #9

Open alephreish opened 9 years ago

alephreish commented 9 years ago

Imagine that mapping information for nw_rename is created on the fly. It would be natural to try to avoid creation of intermediate files and pipe the map via named or anonymous pipe, but it doesn't seem to work:

$ nw_rename - <(echo "1 10") <<< "((1,2),3,4);"
((1,2),3,4);
$ echo "1 10" > tmp
$ nw_rename - tmp <<< "((1,2),3,4);"
((10,2),3,4);

It is more a feature request since piping is not mentioned in the manual, but it would be a quite straightforward (and easily implementable I guess) extension.