File: trees2NEXUS

package info (click to toggle)
fastdnaml 1.2.2-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 576 kB
  • ctags: 384
  • sloc: ansic: 3,927; sh: 549; makefile: 22
file content (18 lines) | stat: -rw-r--r-- 370 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh
#
# Convert one tree per line into PAUP (NEXUS) tree file
# Accepts input from named file(s) or standard input
#
echo "#NEXUS"
echo ""
echo "Begin Trees;"
if test $# -eq 0; then
   egrep -n "." | sed -e 's/:/ = /' -e 's/^/  utree /'
else
   i=0
   for file in $*; do
     i=`expr $i + 1`
     sed -e 's/^/  utree '"$i"' = /' $file
   done
fi
echo "Endblock;"