This is a simple implementation of a BLAST postprocessing tool that realigns the sequences using quality adjusted alignment (i.e. accounting for quality values in the sequences). Note that the actual implementation of the quality-adjusted alignment is in the "bio" library, specifically in the file http://malde.org/~ketil/bio/Bio/Alignment/QAlign.hs You will need: 1. a working Haskell compiler, preferably GHC 2. the "bio" library installed, available as http://malde.org/~ketil/bio (Use darcs to download it, follow instructions to install it.) Now, you should be able to ghc --make -O2 src/PostN.hs -o postn To use it, you will need: a blast database file (db.seq) a blast query file (query.seq) the query quality values (query.qual) the blastn results in XML format (blast.xml) You should then be able to do: ./postn -s query.seq query.qual db.seq blast.xml which will print one line per alignment, with fields: query seq, db seq, blast idents, blast bits, blast evalue smith-waterman bits, quality adjusted bits, s-w length, qual adj length You can also replace -s by -l in the command line, which will output the complete alignments. This is a conceptual prototype only, exepect a more polished interface if it develops into a more production oriented tool :-) Mail me (ketil at malde dot org) with any questions or problems!