code: def action(arguments):
      
      # Ignore SIGPIPE, for head support
      common.exit_on_sigpipe()
      logging.basicConfig()
  
      prot_sequences = SeqIO.parse(arguments.protein_align,
                                   fileformat.from_handle(arguments.protein_align))
      nucl_sequences = SeqIO.parse(arguments.nucl_align,
                                   fileformat.from_handle(arguments.nucl_align))
  
      instance = AlignmentMapper(TRANSLATION_TABLES[arguments.translation_table],
                                 arguments.fail_action)
  
      SeqIO.write(instance.map_all(prot_sequences, nucl_sequences),
                  arguments.out_file, fileformat.from_filename(arguments.out_file.name))
docs: Run