#!/bin/bash
EXTENSION=".newick"

if [ ! -f quicktree ] || [ ! -f rapidnj ]; then
    echo "Need both binaries 'quicktree' and 'rapidnj' to generate the to generate newick trees!"
    exit;
fi

for i in ../input/*.stockholm; do
	# Remove .stockholm from the filename
    OUTPUT=${i::-10}
    
    ./quicktree $i | tr -d '[:space:]' > "$OUTPUT-quicktree$EXTENSION"
    ./rapidnj -i sth $i | sed -e "s/'//g" | tr -d '[:space:]' > "$OUTPUT-rapidnj$EXTENSION"
    
    python parser.py "$OUTPUT-quicktree$EXTENSION"
    python parser.py "$OUTPUT-rapidnj$EXTENSION"
done

#!/bin/bash
EXTENSION=".newick"

if [ ! -f quicktree ] || [ ! -f rapidnj ]; then
    echo "Need both binaries 'quicktree' and 'rapidnj' to generate the to generate newick trees!"
    exit;
fi

for i in ../input/*.stockholm; do
	# Remove .stockholm from the filename
    OUTPUT=${i::-10}
    
    ./quicktree $i > "$OUTPUT-quicktree$EXTENSION"
    ./rapidnj -i sth $i | sed -e "s/'//g" > "$OUTPUT-rapidnj$EXTENSION"
done

--- 
+++ 
@@ -10,9 +10,6 @@
 	# Remove .stockholm from the filename
     OUTPUT=${i::-10}
     
-    ./quicktree $i | tr -d '[:space:]' > "$OUTPUT-quicktree$EXTENSION"
-    ./rapidnj -i sth $i | sed -e "s/'//g" | tr -d '[:space:]' > "$OUTPUT-rapidnj$EXTENSION"
-    
-    python parser.py "$OUTPUT-quicktree$EXTENSION"
-    python parser.py "$OUTPUT-rapidnj$EXTENSION"
+    ./quicktree $i > "$OUTPUT-quicktree$EXTENSION"
+    ./rapidnj -i sth $i | sed -e "s/'//g" > "$OUTPUT-rapidnj$EXTENSION"
 done
Remove newlines, spaces etc from output of NJ
