snippet for selecting only differing residues based on an alignment: run the one-liner below on a file “seq” containing the alignment lines only, with all newline characters removed:
export j=0; cat seq | while read -n 1 char; do export j=$((j+1)); if [ "$char" != "*" ]; then echo -n "${j},"; fi; done; echo
in pseudocode, that's:
-
set up a counter starting at 0
-
feed me the contents of a file called "seq"