#!/usr/bin/env perl # Purpose: Substitute any instances of J, O or U with I, K and C, respectively. # This is to allow amino acid sequences containing these letters to be # accepted by WU BLAST 2006 and earlier. # Input: FASTA format amino acid sequence(s) # Standard Output: FASTA format, with letters substituted # Installation: save the text of this file on your computer in a file named # "aasubst.pl", then make the file executable with the shell command # "chmod a+x aasubst.pl" # Note: if this script fails to run, the problem can likely be fixed by replacing # everything to the right of the exclamation mark on line 1 with the full path # and filename of the perl interpreter on your computer. # Example usage with xdformat: # gunzip < nr.gz | aasubst.pl | xdformat -p -o nr -- - # # Example usage with blastp: # aasubst.pl jousequence.aa | blastp nr - filter=seg echofilter # OR # aasubst.pl < jousequence.aa | blastp nr - filter=seg echofilter # Author: W. Gish # Date: 2008-02-05 while (<>) { if (!/^>/) { tr/jJoOuU/iIkKcC/; } print; } exit 0;