anchor.diff:      integer,          intent(out) :: seq(:)
       integer,          intent(out) :: error_code
       character(len=*), intent(out) :: error_string
  -    integer :: i,n,index
  +    integer :: i,n,ind
       integer :: err
   
       error_string = ''
       n = len_trim(string)
  -    do i = 1,n
  -       index = aa_to_class(string(i:i))
  -       if ( index == 0 ) then ! symbol is not in protein_alphabet
  -          error_code = 24
  -          error_string = string(i:i)
  -          return
  -       else
  -          seq(i) = index
  -       end if
  -    end do
  +    seq = [(index(protein_set,string(i:i)), i=1,len_trim(string))]
       
     end subroutine fasta_string2seq
   
  
positive.code:     end do
      rewind(unt)
  
      data_type = 'protein'
      if (nnuc > nprot) data_type = 'nuc_acid'
  
      call fasta_init(data_type)
  
      string = ""
      k = 1
  
negative.code:   public :: protein_alphabet
    public :: nuc_acid_alphabet
    public :: fasta_read
    integer, parameter :: kprot=21, knuc=6
    character(len=1) :: protein_alphabet(kprot) = &
         ['A','C','D','E','F','G','H','I','K',&
         'L','M','N','P','Q','R','S','T','V','W','Y','-']
    character(len=1) :: nuc_acid_alphabet(knuc) = &
         ['A','C','G','T','U','-']
    character(len=kprot) :: protein_set='ACDEFGHIKLMNPQRSTVWY-'
    character(len=knuc)  :: nuc_acid_set='ACGTU-'
  
  contains
  
    function is_nuc_acid(string) result(res)
      ! check that a string contain only natural nucleotides symbols
      character(len=*), intent(in)  :: string
      logical :: res
      
      res = .false.
      if (verify(trim(string),trim(nuc_acid_set)) == 0) res = .true.
      
    end function is_nuc_acid
    
    function is_protein(string) result(res)
      ! check that a string contain only natural amino acids symbols
      character(len=*), intent(in)  :: string
      logical :: res
      
      res = .false.
      if (verify(trim(string),trim(protein_set)) == 0) res = .true.
      
    end function is_protein
  
    subroutine fasta_string2seq(string,seq,error_code,error_string)
      ! read a sequence, return an array of integer
  