/* ===========================================================================
*
*                            PUBLIC DOMAIN NOTICE
*               National Center for Biotechnology Information
*
*  This software/database is a "United States Government Work" under the
*  terms of the United States Copyright Act.  It was written as part of
*  the author's official duties as a United States Government employee and
*  thus cannot be copyrighted.  This software/database is freely available
*  to the public for use. The National Library of Medicine and the U.S.
*  Government have not placed any restriction on its use or reproduction.
*
*  Although all reasonable efforts have been taken to ensure the accuracy
*  and reliability of the software and data, the NLM and the U.S.
*  Government do not and cannot warrant the performance or results that
*  may be obtained by using this software or data. The NLM and the U.S.
*  Government disclaim all warranties, express or implied, including
*  warranties of performance, merchantability or fitness for any particular
*  purpose.
*
*  Please cite the author in any work or product based on this material.
*
* ===========================================================================*/
#ifndef __BLAST_GCODE_H__
#define __BLAST_GCODE_H__
#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
		BLAST_GCODE_STANDARD = 1,
		BLAST_GCODE_UNIVERSAL = 1,
		BLAST_GCODE_DEFAULT = 1,
		BLAST_GCODE_VERTEBRATE_MITO = 2,
		BLAST_GCODE_YEAST_MITO = 3,
		BLAST_GCODE_MOLD_MITO = 4,
		BLAST_GCODE_INVERTEBRATE_MITO = 5,
		BLAST_GCODE_CILIATE_MACRONUCLEAR = 6,
		BLAST_GCODE_ECHINODERMATE_MITO = 9,
		BLAST_GCODE_ALT_CILIATE_MACRONUCLEAR = 10,
		BLAST_GCODE_EUBACTERIAL = 11,
		BLAST_GCODE_ALT_YEAST = 12,
		BLAST_GCODE_ASCIDIAN_MITO = 13,
		BLAST_GCODE_FLATWORM_MITO = 14,
		BLAST_GCODE_MAX
	} BLAST_GCodeID, PNTR BLAST_GCodeIDPtr;

typedef struct _blast_gcode {
	struct _blast_gcode PNTR	next;
	BLAST_GCodeID	id;
	Nlm_Boolean	initialized;
	BLAST_AlphabetPtr	ntap, aaap;
	BLAST_Letter	ambiguous; /* when the translation can't be inferred */
	BLAST_LetterPtr	code,	/* code for the plus (+) strand */
					rccode; /* code for the reverse complement */
	CharPtr	inits,	/* inits for the plus (+) strand */
			rcinits;	/* inits for the reverse complement */
	CharPtr	name;
	} BLAST_GCode, PNTR BLAST_GCodePtr;

#define BLAST_CODON_LEN	3

BLAST_GCodePtr	BlastGCodeNew PROTO((BLAST_GCodeID id, BLAST_AlphabetPtr nt, BLAST_AlphabetPtr aa));
void		BlastGCodeDestruct PROTO((BLAST_GCodePtr));

BLAST_GCodePtr BlastGCodeFind PROTO((BLAST_GCodeID id, BLAST_AlphabetPtr nt, BLAST_AlphabetPtr aa));

BLAST_Error	BlastStrTranslate_F3L4B2 PROTO((BLAST_GCodePtr gp, BLAST_StrPtr s, BLAST_StrPtr f1, BLAST_StrPtr f2, BLAST_StrPtr f3));
BLAST_Error	BlastStrTranslateRC_F3L4B2 PROTO((BLAST_GCodePtr gp, BLAST_StrPtr s, BLAST_StrPtr f1, BLAST_StrPtr f2, BLAST_StrPtr f3));

#ifdef __cplusplus
}
#endif
#endif /* !__BLAST_GCODE_H__ */

