Commit 54e22815 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 4.6.4

parent be0a2e4d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2,10 +2,6 @@
#define FL_NATIVE_FILE_CHOOSER_H

#include <FL/Enumerations.H>
#if defined(USE_NEW_FLTK_FEATURES) && FL_PATCH_VERSION < 3
#undef FL_PATCH_VERSION
#define FL_PATCH_VERSION 3
#endif
#define SEAVIEW_FLTK_VERSION 100*FL_MAJOR_VERSION + 10*FL_MINOR_VERSION + FL_PATCH_VERSION
#if SEAVIEW_FLTK_VERSION < 133 && !(defined(__APPLE__) || defined(WIN32))
#define Fl_Native_File_Chooser mgFl_Native_File_Chooser
+162 −35
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ void *mycalloc(int nbr, size_t taille);
char complementer_base(char nucl);
void complementer_seq(char *deb_ch, int l);
char init_codon_to_aa(char *codon, int gc);
char stop_codon_to_aa(char *codon, int gc);
int notrail2(char *chaine, int len);
int prepch(char *chaine, char **posmot);
int compch(char *cible, int lcible, char **posmot, int nbrmots);
@@ -53,31 +54,36 @@ for(i=(int)strlen(pname);i<length;i++) pname[i]=' ';
}


#define TOTCODES 20  /* nbre total de codes definis, 0 inclus */
#define TOTCODES 25  /* nbre total de codes definis, 0 inclus */
int totcodes=TOTCODES;

char aminoacids[]="RLSTPAGVKNQHEDYCFIMW*X";

struct genetic_code_libel { /* definition d'un code genetique */
	char libel[61]; /* nom du code decrivant ses variants % code standard */
	char* target;
	int code[65]; /* tableau codon->acide amine */
	int ncbi_gc; /* numero NCBI du meme code */
	int codon_init[64]; /* tableau codon initiateur -> acide amine */
	int codon_init[64]; /* tableau codon initiateur ou stop -> acide amine */
	};

/* 
les codons sont numerotes de 1 a 64 selon ordre alphabetique;
le numero 65 est attribue a tout codon avec base hors AcCcGgTtUu
les acides amines sont numerotes selon l'ordre de la variable aminoacids
de un a 20 + * pour stop et X pour inconnu
de un a 20 + * pour stop et X pour inconnu.
 Table codon_init gives 19 (=M) for initiation codons and 21 (=*) for stop codons.
 In some genetic codes, the same codon corresponds to an aa in table code
 and to a stop in table codon_init.
*/

/* initialisation de tous les codes genetiques */
struct genetic_code_libel genetic_code[TOTCODES] = 
{

{ /* 0: universel */
	{"Universal genetic code"},
{ /* 0: standard */
	{"Standard genetic code"},
	"Standard",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -86,11 +92,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
	21,0,21,0,0,0,0,0,21,0,0,0,0,0,19,0} /* UUG */
}
,
{ /* 1: yeast mt */
	{"CUN=T  AUA=M  UGA=W"},
	"Yeast Mitochondrial",
	{9,10,9,10,4,4,4,4,1,3,1,3,19,18,19,18,
	11,12,11,12,5,5,5,5,1,1,1,1,4,4,4,4,
	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -99,23 +106,25 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,19,0,19,0, /* AUA, AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0} 
}
,
{ /* 2: :    MITOCHONDRIAL CODE OF VERTEBRATES */
	{"AGR=*  AUA=M  UGA=W"},
	"Vertebrate Mitochondrial",
     {9,10,9,10,4,4,4,4,21,3,21,3,19,18,19,18,11,12,11,12,
     5,5,5,5,1,1,1,1,2,2,2,2,13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,21,15,
     21,15,3,3,3,3,20,16,20,16,2,17,2,17,22},
	2,
	{0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19, /* AUN */
	{0,0,0,0,0,0,0,0,21,0,21,0,19,19,19,19, /* AUN */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0}
}
,
{ /* 3:   MITOCHONDRIAL CODE OF FILAMENTOUS FUNGI */
	{"UGA=W"},
	"Mold Mitochondrial; Protozoan Mitochondrial; Coelenterate Mitochondrial; Mycoplasma; Spiroplasma",
     {9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,11,12,11,12,5,5,5,
     5,1,1,1,1,2,2,2,2,13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,21,15,21,
     15,3,3,3,3,20,16,20,16,2,17,2,17,22},
@@ -123,11 +132,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19, /* AUN */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	0,0,0,0,0,0,0,0,0,0,0,0,19,0,19,0} /* UUR */
	21,0,21,0,0,0,0,0,0,0,0,0,19,0,19,0} /* UUR */
}
,
{ /* 4:    MITOCHONDRIAL CODE OF INSECT AND PLATYHELMINTHES  */
	{"AUA=M  UGA=W  AGR=S"},
	"Invertebrate Mitochondrial",
     {9,10,9,10,4,4,4,4,3,3,3,3,19,18,19,18,11,12,11,12,5,5,5,
     5,1,1,1,1,2,2,2,2,13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,21,15,21,
     15,3,3,3,3,20,16,20,16,2,17,2,17,22},
@@ -135,11 +145,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19, /* AUN */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
}
,
{ /* 5:    Nuclear code of Candida cylindracea (see nature 341:164) */
	{"CUG=S"},
	"Alternative Yeast Nuclear",
     	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
	11,12,11,12,5,5,5,5,1,1,1,1,2,2,3,2,
	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -148,11 +159,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	21,0,21,0,0,0,0,0,21,0,0,0,0,0,0,0}
}
,
{ /* 6:   NUCLEAR CODE OF CILIATA: UAR = Gln = Q */
	{"UAR=Q"},
	"Ciliate Nuclear; Dasycladacean Nuclear; Hexamita Nuclear",
     {9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,11,12,11,12,5,5,5,
     5,1,1,1,1,2,2,2,2,13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,11,15,11,
     15,3,3,3,3,21,16,20,16,2,17,2,17,22},
@@ -160,11 +172,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0}
}
,
{ /* 7:   NUCLEAR CODE OF EUPLOTES */
	{"UGA=C"},
	"Euplotid Nuclear",
     {9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,11,12,11,12,5,5,5,
     5,1,1,1,1,2,2,2,2,13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,21,15,21,
     15,3,3,3,3,16,16,20,16,2,17,2,17,22},
@@ -172,11 +185,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0}
}
,
{ /* 8:   MITOCHONDRIAL CODE OF ECHINODERMS */
	{"UGA=W  AGR=S  AAA=N"},
	"Echinoderm Mitochondrial; Flatworm Mitochondrial",
     	{10,10,9,10,4,4,4,4,3,3,3,3,18,18,19,18,
	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -184,25 +198,27 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	9,
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0}
}
,
{ /* 9:   MITOCHONDRIAL CODE OF ASCIDIACEA */
	{"UGA=W  AGR=G  AUA=M"},
	"Ascidian Mitochondrial",
     	{9,10,9,10,4,4,4,4,7,3,7,3,19,18,19,18,
	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
	21,15,21,15,3,3,3,3,20,16,20,16,2,17,2,17,22},
	13,
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	{0,0,0,0,0,0,0,0,0,0,0,0,19,0,19,0, /* AUA,AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
}
,
{ /* 10:   MITOCHONDRIAL CODE OF PLATYHELMINTHES */
	{"UGA=W  AGR=S  UAA=Y AAA=N"},
	"Alternative Flatworm Mitochondrial",
	{10,10,9,10,4,4,4,4,3,3,3,3,18,18,19,18,
	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -211,11 +227,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0}
}
,
{ /* 11:   NUCLEAR CODE OF BLEPHARISMA */
	{"UAG=Q"},
	"Blepharisma Macronuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -224,11 +241,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	21,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0}
}
,
{ /* 12:   NUCLEAR CODE OF BACTERIA: differs only for initiation codons */
	{"NUG=AUN=M when initiation codon"},
	"Bacterial, Archaeal and Plant Plastid",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -237,11 +255,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19, /* AUN */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
	21,0,21,0,0,0,0,0,21,0,0,0,0,0,19,0} /* UUG */
}
,
{ /* 13: Chlorophycean Mitochondrial */
	{"UAG=Leu"},
	"Chlorophycean Mitochondrial",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -250,11 +269,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
	21,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0}
}
,
{ /* 14:    MITOCHONDRIAL CODE OF TREMATODE  */
	{"AUA=M  UGA=W  AGR=S AAA=N"},
	"Trematode Mitochondrial",
     {10,10,9,10,4,4,4,4,3,3,3,3,19,18,19,18,11,12,11,12,5,5,5,
     5,1,1,1,1,2,2,2,2,13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,21,15,21,
     15,3,3,3,3,20,16,20,16,2,17,2,17,22},
@@ -262,11 +282,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} 
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0} 
}
,
{ /* 15: TAG-Leu,TCA-stop */
	{"UAG=L UCA=*"},
	"Scenedesmus obliquus mitochondrial",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -275,11 +296,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} 
	21,0,0,0,21,0,0,0,21,0,0,0,0,0,0,0} 
}
,
{ /* 16: Thraustochytrium-mt */
	{"UUA=*"},
	"Thraustochytrium mitochondrial",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -288,11 +310,12 @@ struct genetic_code_libel genetic_code[TOTCODES] =
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19, /* AUG AUU */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} 
	21,0,21,0,0,0,0,0,21,0,0,0,21,0,0,0} 
}
  ,
  { /* 17:   MITOCHONDRIAL CODE OF Pterobranchia */
    {"UGA=W  AGA=S  AGG=K"},
    "Pterobranchia Mitochondrial",
/*ANN*/	{9,10,9,10,4,4,4,4,3,3,9,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -300,25 +323,27 @@ struct genetic_code_libel genetic_code[TOTCODES] =
/*ncbi*/24,
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
         0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
         0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
         0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
         21,0,21,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
  }
  ,
  { /* 18: Candidate Division SR1 and Gracilibacteria */
    {"UGA=G"},
    "Candidate Division SR1 and Gracilibacteria",
    /*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
    /*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
    /*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
    /*TNN*/	21,15,21,15,3,3,3,3,7,16,20,16,2,17,2,17,22},
    /*ncbi*/25,
    /*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* GUG */
      21,0,21,0,0,0,0,0,0,0,0,0,0,0,19,0} /* UUG */
  }
  ,
  { /* 19: Pachysolen tannophilus */
    {"CUG=A"},
    "Pachysolen tannophilus Nuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,6,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
@@ -327,7 +352,77 @@ struct genetic_code_libel genetic_code[TOTCODES] =
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* CUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} /* UUG */
	21,0,21,0,0,0,0,0,21,0,0,0,0,0,0,0}
  }
  ,
    { /* 20: Karyorelict Nuclear */
    {"UAR=Q, UGA=W, CUG=A"},
    "Karyorelict Nuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,6,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
/*TNN*/	11,15,11,15,3,3,3,3,20,16,20,16,2,17,2,17,22},
/*ncbi*/27,
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0}
  }
  ,
    { /* 21: Condylostoma Nuclear */
    {"UAR=Q, UGA=W, CUG=A"},
    "Condylostoma Nuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,6,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
/*TNN*/	11,15,11,15,3,3,3,3,20,16,20,16,2,17,2,17,22},
/*ncbi*/28,
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	21,0,21,0,0,0,0,0,21,0,0,0,0,0,0,0}
  }
  ,
    { /* 22: Mesodinium Nuclear */
    {"UAR=Y, CUG=A"},
    "Mesodinium Nuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,6,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
/*TNN*/	15,15,15,15,3,3,3,3,21,16,20,16,2,17,2,17,22},
/*ncbi*/29,
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0}
  }
  ,
    { /* 23: Peritrich Nuclear */
    {"UAR=E, CUG=A"},
    "Peritrich Nuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,6,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
/*TNN*/	13,15,13,15,3,3,3,3,21,16,20,16,2,17,2,17,22},
/*ncbi*/30,
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0}
  }
  ,
    { /* 24: Blastocrithidia Nuclear */
    {"UAR=E, UGA=W"},
    "Blastocrithidia Nuclear",
/*ANN*/	{9,10,9,10,4,4,4,4,1,3,1,3,18,18,19,18,
/*CNN*/	11,12,11,12,5,5,5,5,1,1,1,1,2,2,2,2,
/*GNN*/	13,14,13,14,6,6,6,6,7,7,7,7,8,8,8,8,
/*TNN*/	13,15,13,15,3,3,3,3,20,16,20,16,2,17,2,17,22},
/*ncbi*/31,
/*init*/{0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0, /* AUG */
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	21,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0}
  }


@@ -352,6 +447,19 @@ else
}


char *get_code_target(int code)
/* 
get a description of target organisms of a variant genetic code
return value	pointer to the description, not to be altered!
*/
{
if(code >= 0 && code < totcodes)
	return genetic_code[code].target ;
else	
	return "Unknown genetic code. Standard code is used.";
}


int calc_codon_number(char *codon)
{
static char nucleotides[] = "AaCcGgTtUu";
@@ -537,7 +645,6 @@ void complementer_seq(char *deb_ch, int l)
}



char init_codon_to_aa(char *codon, int gc)
{
int num, aa;
@@ -550,7 +657,27 @@ if(gc < 0 || gc >= totcodes) gc = 0;
pdata = &genetic_code[gc];
aa = pdata->codon_init[num];
/* if not listed in expected init codons */
if(aa == 0) aa = pdata->code[num];
if(aa == 0 || aa == 21) aa = pdata->code[num];
return aminoacids[aa - 1];
}


char stop_codon_to_aa(char *codon, int gc)
{
int num, aa;
struct genetic_code_libel *pdata;

num = calc_codon_number(codon);
if(num >= 64) return 'X';
/* use regular code if unknown number */
if(gc < 0 || gc >= totcodes) gc = 0; 
pdata = &genetic_code[gc];
aa = pdata->code[num];
if (aa != 21) {
	aa = pdata->codon_init[num];
	/* if not listed in expected stop codons */
	if (aa != 21) aa = pdata->code[num];
}
return aminoacids[aa - 1];
}

+68 −11
Original line number Diff line number Diff line
@@ -5,9 +5,6 @@
#include <FL/x.H>
#include <FL/Fl_Sys_Menu_Bar.H>
#include <FL/Fl_Help_View.H>
#if 100*FL_MAJOR_VERSION + 10*FL_MINOR_VERSION + FL_PATCH_VERSION >= 140
#include <src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H>
#endif
#include <FL/filename.H>
#include <FL/fl_draw.H>
#include <sys/stat.h>
@@ -20,11 +17,13 @@ static void file_receive_cb(const char *fname);
static void show_apropos(Fl_Widget *, void *unused);
void MG_apple_inits(void);
void set_seaview_modified(SEA_VIEW *view, int ismodified);
#if 100*FL_MAJOR_VERSION + FL_MINOR_VERSION < 104
  void windowmenuitem_callback(Fl_Widget *o, void *data);
  int find_windowmenuitem(Fl_Window *w);
  int add_windowmenuitem(const char *name, Fl_Window *w);
  void rename_windowmenuitem(const char *name, int rank);
  void delete_windowmenuitem(int rank);
#endif
char *mac_GetOutputFName_Plus(const char *dfault, const char *message, int, const char *directory);

/* extern functions */
@@ -181,7 +180,7 @@ char *mac_GetOutputFName_Plus(const char *dfault, const char *message, int use_o
  [key makeKeyWindow];
  [preset release];
  [dir release];
  if ( retval == NSOKButton ) {//read accessory view state
  if ( retval == NSFileHandlingPanelOKButton ) {//read accessory view state
    printout_block = [blockview intValue];
    printout_fontsize = [fontview intValue];
    printout_black = [pdfmatrix selectedRow];
@@ -191,10 +190,11 @@ char *mac_GetOutputFName_Plus(const char *dfault, const char *message, int use_o
    strcpy(pathname, [[[_panel URL] path] UTF8String]);
    }
  [_panel setAccessoryView:nil];
  if ( retval == NSCancelButton ) return NULL;
  if ( retval == NSFileHandlingPanelCancelButton ) return NULL;
  return pathname;
}

#if 100*FL_MAJOR_VERSION + FL_MINOR_VERSION < 104

void windowmenuitem_callback(Fl_Widget *o, void *data)
{
@@ -239,6 +239,9 @@ void delete_windowmenuitem(int rank)
  fl_sys_menu_bar->remove(rank);
}

#endif


static void file_receive_cb(const char *fname)
{
  SEA_VIEW *view;
@@ -293,10 +296,56 @@ static void show_apropos(Fl_Widget *w, void *unused)
  about->show();
}

#if 100*FL_MAJOR_VERSION + FL_MINOR_VERSION >= 104

static Fl_Window *merged;

static bool merge_windows_for_class(Fl_Window *first)
{
  bool retval = false;
  Fl_Window *win = first;
  NSWindow *nsw = (NSWindow*)fl_xid(first), *nsw2;
  while ((win = Fl::next_window(win)) != NULL) {
    int diff = strcmp(win->xclass(), first->xclass());
    if (win->parent() || diff) continue;
    nsw2 = (NSWindow*)fl_xid(win);
    [nsw2 addTabbedWindow:nsw ordered:NSWindowAbove];
    retval = true;
    if (!merged) merged = win;
  }
  return retval;
}

static void merge_windows_by_class_cb(Fl_Widget *, void *)
{
  merged = NULL;
more:
  Fl_Window *win = Fl::first_window();
  NSWindow *nsw;
  while (win) {
    nsw = (NSWindow*)fl_xid(win);
    if (!win->parent() && ![nsw tabbedWindows] && strcmp(win->xclass(), Fl_Window::default_xclass())) {
      if (merge_windows_for_class(win)) goto more;
    }
    win = Fl::next_window(win);
  }
  if (merged) merged->show();
}
#endif // FLTK ≥ 1.4

void MG_apple_inits(void)
{
  fl_open_callback(file_receive_cb);
  fl_mac_set_about(show_apropos, NULL, 0);
#if 100*FL_MAJOR_VERSION + FL_MINOR_VERSION >= 104
  Fl_Sys_Menu_Bar::create_window_menu();
  int merge = fl_sys_menu_bar->find_index("Window/Merge All Windows");
  if (merge >= 0) {
    fl_sys_menu_bar->replace(merge, "Merge Windows by Class");
    Fl_Menu_Item *item = (Fl_Menu_Item*)fl_sys_menu_bar->menu() + merge;
    item->callback(merge_windows_by_class_cb);
  }
#endif
  Fl::set_font(FL_COURIER,"Courier");
  Fl::set_font(FL_COURIER_BOLD, (fl_mac_os_version >= 100500 ? "Courier-Bold" : "Courier Bold") );
  if (fl_mac_os_version >= 100500) { // it seems that Courier Oblique is not present on older OS
@@ -463,9 +512,17 @@ Copy_Surface::Copy_Surface(bool pict, int w, int h) : Fl_Surface_Device(NULL)
    }
  else {
    prepare_copy_pdf_and_pict(w, h);
#if 100*FL_MAJOR_VERSION + 10*FL_MINOR_VERSION + FL_PATCH_VERSION >= 140
    driver(Fl_Graphics_Driver::newMainGraphicsDriver());
#else
    driver(new Fl_Quartz_Graphics_Driver());
#endif
    oldgc = fl_gc;
#if 100*FL_MAJOR_VERSION + 10*FL_MINOR_VERSION + FL_PATCH_VERSION >= 140
    driver()->gc(gc);
#else
    fl_gc = gc;
#endif
    }
}

@@ -558,7 +615,7 @@ void Copy_Surface::init_PDF_context(int w, int h)
  CGRect bounds = CGRectMake(0, 0, w, h );	
  pdfdata = CFDataCreateMutable(NULL, 0);
  CGDataConsumerRef myconsumer;
  if (CGDataConsumerCreateWithCFData != NULL) { // true from 10.4
  if (CGDataConsumerCreateWithCFData) { // true from 10.4
    myconsumer = CGDataConsumerCreateWithCFData (pdfdata);
  }
  else {
+28 −9
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@
#include <FL/Fl_Graphics_Driver.H>
#endif

#if defined(WIN32)
#include <windows.h>
#endif

#if !(defined(__APPLE__) || defined(WIN32)) && 100*FL_MAJOR_VERSION + 10*FL_MINOR_VERSION  + FL_PATCH_VERSION == 130
// for X11 under 1.3.0 only
#include <FL/Fl_Printer.H>
@@ -161,10 +165,8 @@ typedef Fl_PDF_File_Device Fl_PDF_or_PS_File_Device;
#endif
#endif

#if (defined(__APPLE__) || defined(WIN32))

#if defined(__APPLE__)
class Copy_Surface : public Fl_Surface_Device {
#ifdef __APPLE__
  bool use_pict;
  CFMutableDataRef pdfdata;
  CGContextRef oldgc;
@@ -178,18 +180,35 @@ class Copy_Surface : public Fl_Surface_Device {
  void prepare_copy_pdf_and_pict(int w, int h);
  void complete_copy_pdf_and_pict();
  void init_PDF_context(int w, int h);
#else
  HDC oldflgc;
#endif
public:
#ifdef __APPLE__
  Copy_Surface(bool use_pict, int w, int h);
  ~Copy_Surface();
};
#endif // __APPLE__

#if defined(WIN32)

#if 100*FL_MAJOR_VERSION + 10*FL_MINOR_VERSION + FL_PATCH_VERSION >= 134 // FLTK after 1.3.4

#include <FL/Fl_Copy_Surface.H>
class Copy_Surface : public Fl_Copy_Surface {
public:
  Copy_Surface(int w, int h) : Fl_Copy_Surface(w, h) {}
  ~Copy_Surface() {}
};

#else

class Copy_Surface : public Fl_Surface_Device {
  HDC oldflgc;
public:
  Copy_Surface(int w, int h);
#endif
  ~Copy_Surface();
};
#endif

#endif // FLTK after 1.4

#endif // WIN32


#endif // PDF_OR_PS_H
+78 −35

File changed.

Preview size limit exceeded, changes collapsed.

Loading