src/objects/seqfeat/SeqFeatData.cpp

Go to the documentation of this file.
00001 /* $Id: SeqFeatData.cpp 172934 2009-10-13 11:26:32Z bollin $
00002  * ===========================================================================
00003  *
00004  *                            PUBLIC DOMAIN NOTICE
00005  *               National Center for Biotechnology Information
00006  *
00007  *  This software/database is a "United States Government Work" under the
00008  *  terms of the United States Copyright Act.  It was written as part of
00009  *  the author's official duties as a United States Government employee and
00010  *  thus cannot be copyrighted.  This software/database is freely available
00011  *  to the public for use. The National Library of Medicine and the U.S.
00012  *  Government have not placed any restriction on its use or reproduction.
00013  *
00014  *  Although all reasonable efforts have been taken to ensure the accuracy
00015  *  and reliability of the software and data, the NLM and the U.S.
00016  *  Government do not and cannot warrant the performance or results that
00017  *  may be obtained by using this software or data. The NLM and the U.S.
00018  *  Government disclaim all warranties, express or implied, including
00019  *  warranties of performance, merchantability or fitness for any particular
00020  *  purpose.
00021  *
00022  *  Please cite the author in any work or product based on this material.
00023  *
00024  * ===========================================================================
00025  *
00026  * Author:  .......
00027  *
00028  * File Description:
00029  *   .......
00030  *
00031  * Remark:
00032  *   This code was originally generated by application DATATOOL
00033  *   using specifications from the ASN data definition file
00034  *   'seqfeat.asn'.
00035  */
00036 
00037 // standard includes
00038 
00039 // generated includes
00040 #include <ncbi_pch.hpp>
00041 #include <objects/seqfeat/SeqFeatData.hpp>
00042 #include <objects/seqfeat/RNA_ref.hpp>
00043 #include <objects/seqfeat/Imp_feat.hpp>
00044 #include <objects/seq/Pubdesc.hpp>
00045 #include <objects/general/User_object.hpp>
00046 
00047 #include <algorithm>
00048 #include <util/static_map.hpp>
00049 
00050 // generated classes
00051 
00052 BEGIN_NCBI_SCOPE
00053 
00054 BEGIN_objects_SCOPE // namespace ncbi::objects::
00055 
00056 
00057 struct SImportEntry {
00058     const char*            m_Name;
00059     CSeqFeatData::ESubtype m_Subtype;
00060 
00061     bool operator<(const SImportEntry& e) const {
00062         return strcmp(m_Name, e.m_Name) < 0;
00063     }
00064 };
00065 
00066 // NOTE: these must stay in ASCIIbetical order!
00067 static const SImportEntry kImportTable[] = {
00068     { "-10_signal",          CSeqFeatData::eSubtype_10_signal },
00069     { "-35_signal",          CSeqFeatData::eSubtype_35_signal },
00070     { "3'UTR",               CSeqFeatData::eSubtype_3UTR },
00071     { "3'clip",              CSeqFeatData::eSubtype_3clip },
00072     { "5'UTR",               CSeqFeatData::eSubtype_5UTR },
00073     { "5'clip",              CSeqFeatData::eSubtype_5clip },
00074     { "CAAT_signal",         CSeqFeatData::eSubtype_CAAT_signal },
00075     { "C_region",            CSeqFeatData::eSubtype_C_region },
00076     { "D-loop",              CSeqFeatData::eSubtype_D_loop },
00077     { "D_segment",           CSeqFeatData::eSubtype_D_segment },
00078     { "GC_signal",           CSeqFeatData::eSubtype_GC_signal },
00079     { "Imp_CDS",             CSeqFeatData::eSubtype_Imp_CDS },
00080     { "J_segment",           CSeqFeatData::eSubtype_J_segment },
00081     { "LTR",                 CSeqFeatData::eSubtype_LTR },
00082     { "N_region",            CSeqFeatData::eSubtype_N_region },
00083     { "RBS",                 CSeqFeatData::eSubtype_RBS },
00084     { "STS",                 CSeqFeatData::eSubtype_STS },
00085     { "S_region",            CSeqFeatData::eSubtype_S_region },
00086     { "TATA_signal",         CSeqFeatData::eSubtype_TATA_signal },
00087     { "V_region",            CSeqFeatData::eSubtype_V_region },
00088     { "V_segment",           CSeqFeatData::eSubtype_V_segment },
00089     { "allele",              CSeqFeatData::eSubtype_allele },
00090     { "attenuator",          CSeqFeatData::eSubtype_attenuator },
00091     { "conflict",            CSeqFeatData::eSubtype_conflict },
00092     { "enhancer",            CSeqFeatData::eSubtype_enhancer },
00093     { "exon",                CSeqFeatData::eSubtype_exon },
00094     { "gap",                 CSeqFeatData::eSubtype_gap },
00095     { "iDNA",                CSeqFeatData::eSubtype_iDNA },
00096     { "import",              CSeqFeatData::eSubtype_imp },
00097     { "intron",              CSeqFeatData::eSubtype_intron },
00098     { "mat_peptide",         CSeqFeatData::eSubtype_mat_peptide },
00099     { "misc_RNA",            CSeqFeatData::eSubtype_misc_RNA },
00100     { "misc_binding",        CSeqFeatData::eSubtype_misc_binding },
00101     { "misc_difference",     CSeqFeatData::eSubtype_misc_difference },
00102     { "misc_feature",        CSeqFeatData::eSubtype_misc_feature },
00103     { "misc_recomb",         CSeqFeatData::eSubtype_misc_recomb },
00104     { "misc_signal",         CSeqFeatData::eSubtype_misc_signal },
00105     { "misc_structure",      CSeqFeatData::eSubtype_misc_structure },
00106     { "modified_base",       CSeqFeatData::eSubtype_modified_base },
00107     { "mutation",            CSeqFeatData::eSubtype_mutation },
00108     { "old_sequence",        CSeqFeatData::eSubtype_old_sequence },
00109     { "operon",              CSeqFeatData::eSubtype_operon },
00110     { "oriT",                CSeqFeatData::eSubtype_oriT },
00111     { "polyA_signal",        CSeqFeatData::eSubtype_polyA_signal },
00112     { "polyA_site",          CSeqFeatData::eSubtype_polyA_site },
00113     { "precursor_RNA",       CSeqFeatData::eSubtype_precursor_RNA },
00114     { "prim_transcript",     CSeqFeatData::eSubtype_prim_transcript },
00115     { "primer_bind",         CSeqFeatData::eSubtype_primer_bind },
00116     { "promoter",            CSeqFeatData::eSubtype_promoter },
00117     { "protein_bind",        CSeqFeatData::eSubtype_protein_bind },
00118     { "rep_origin",          CSeqFeatData::eSubtype_rep_origin },
00119     { "repeat_region",       CSeqFeatData::eSubtype_repeat_region },
00120     { "repeat_unit",         CSeqFeatData::eSubtype_repeat_unit },
00121     { "satellite",           CSeqFeatData::eSubtype_satellite },
00122     { "sig_peptide",         CSeqFeatData::eSubtype_sig_peptide },
00123     { "site_ref",            CSeqFeatData::eSubtype_site_ref },
00124     { "source",              CSeqFeatData::eSubtype_source },
00125     { "stem_loop",           CSeqFeatData::eSubtype_stem_loop },
00126     { "terminator",          CSeqFeatData::eSubtype_terminator },
00127     { "transit_peptide",     CSeqFeatData::eSubtype_transit_peptide },
00128     { "unsure",              CSeqFeatData::eSubtype_unsure },
00129     { "variation",           CSeqFeatData::eSubtype_variation },
00130     { "virion",              CSeqFeatData::eSubtype_virion }
00131 };
00132 
00133 static const SImportEntry* const kImportTableEnd
00134     = kImportTable + sizeof(kImportTable)/sizeof(SImportEntry);
00135 
00136 // Feat info table
00137 typedef pair<CSeqFeatData::E_Choice, CSeqFeatData::SFeatDataInfo> TInfoPair;
00138 
00139 #define FEAT_INFO_PAIR(type, subtype, key_full, key_gb) \
00140     TInfoPair(CSeqFeatData::e_##type, CSeqFeatData::SFeatDataInfo( \
00141               CSeqFeatData::eSubtype_##subtype, key_full, key_gb))
00142 
00143 static const TInfoPair kInfoPairs[] = {
00144     FEAT_INFO_PAIR(Gene, gene, "Gene", "gene"),
00145     FEAT_INFO_PAIR(Org, org, "Org", "source"),
00146     FEAT_INFO_PAIR(Cdregion, cdregion, "CDS", "CDS"),
00147     FEAT_INFO_PAIR(Pub, pub, "???", "misc_feature"),
00148     FEAT_INFO_PAIR(Seq, seq, "???", "misc_feature"),
00149     FEAT_INFO_PAIR(Region, region, "Region", "misc_feature"),
00150     FEAT_INFO_PAIR(Comment, comment, "Comment", "misc_feature"),
00151     FEAT_INFO_PAIR(Bond, bond, "Bond", "misc_feature"),
00152     FEAT_INFO_PAIR(Rsite, rsite, "Rsite", "misc_feature"),
00153     FEAT_INFO_PAIR(User, user, "User", "misc_feature"),
00154     FEAT_INFO_PAIR(Txinit, txinit, "TxInit", "promoter"),
00155     FEAT_INFO_PAIR(Num, num, "Num", "misc_feature"),
00156     FEAT_INFO_PAIR(Psec_str, psec_str, "SecStr", "misc_feature"),
00157     FEAT_INFO_PAIR(Non_std_residue, non_std_residue, "NonStdRes", "misc_feature"),
00158     FEAT_INFO_PAIR(Het, het, "Het", "misc_binding"),
00159     FEAT_INFO_PAIR(Biosrc, biosrc, "Src", "source")
00160 };
00161 
00162 typedef CStaticArrayMap<CSeqFeatData::E_Choice,
00163                         CSeqFeatData::SFeatDataInfo> TInfoMap;
00164 DEFINE_STATIC_ARRAY_MAP(TInfoMap, sc_InfoPairs, kInfoPairs);
00165 
00166 
00167 // e_Prot info table
00168 typedef pair<CProt_ref::EProcessed, CSeqFeatData::SFeatDataInfo> TProtInfoPair;
00169 
00170 #define PROT_INFO_PAIR(proc, subtype, key_full, key_gb) \
00171     TProtInfoPair(CProt_ref::eProcessed_##proc, CSeqFeatData::SFeatDataInfo( \
00172               CSeqFeatData::eSubtype_##subtype, key_full, key_gb))
00173 
00174 static const TProtInfoPair kProtInfoPairs[] = {
00175     PROT_INFO_PAIR(preprotein, preprotein, "Prot", "proprotein"),
00176     PROT_INFO_PAIR(mature, mat_peptide_aa, "Prot", "mat_peptide"),
00177     PROT_INFO_PAIR(signal_peptide, sig_peptide_aa, "Prot", "sig_peptide"),
00178     PROT_INFO_PAIR(transit_peptide, transit_peptide_aa, "Prot", "transit_peptide")
00179 };
00180 
00181 typedef CStaticArrayMap<CProt_ref::EProcessed,
00182                         CSeqFeatData::SFeatDataInfo> TProtInfoMap;
00183 DEFINE_STATIC_ARRAY_MAP(TProtInfoMap, sc_ProtInfoPairs, kProtInfoPairs);
00184 
00185 
00186 // e_Site info table
00187 typedef pair<CSeqFeatData::ESite, CSeqFeatData::SFeatDataInfo> TSiteInfoPair;
00188 
00189 #define SITE_INFO_PAIR(site, subtype, key_full, key_gb) \
00190     TSiteInfoPair(CSeqFeatData::eSite_##site, CSeqFeatData::SFeatDataInfo( \
00191               CSeqFeatData::eSubtype_##subtype, key_full, key_gb))
00192 
00193 static const TSiteInfoPair kSiteInfoPairs[] = {
00194     SITE_INFO_PAIR(binding, site, "Site", "misc_binding"),
00195     SITE_INFO_PAIR(metal_binding, site, "Site", "misc_binding"),
00196     SITE_INFO_PAIR(lipid_binding, site, "Site", "misc_binding"),
00197     SITE_INFO_PAIR(np_binding, site, "Site", "protein_bind"),
00198     SITE_INFO_PAIR(dna_binding, site, "Site", "primer_bind"),
00199     SITE_INFO_PAIR(signal_peptide, site, "Site", "sig_peptide"),
00200     SITE_INFO_PAIR(transit_peptide, site, "Site", "transit_peptide")
00201 };
00202 
00203 typedef CStaticArrayMap<CSeqFeatData::ESite,
00204                         CSeqFeatData::SFeatDataInfo> TSiteInfoMap;
00205 DEFINE_STATIC_ARRAY_MAP(TSiteInfoMap, sc_SiteInfoPairs, kSiteInfoPairs);
00206 
00207 
00208 // e_Rna info table
00209 typedef pair<CRNA_ref::EType, CSeqFeatData::SFeatDataInfo> TRnaInfoPair;
00210 
00211 #define RNA_INFO_PAIR(rna, subtype, key_full, key_gb) \
00212     TRnaInfoPair(CRNA_ref::eType_##rna, CSeqFeatData::SFeatDataInfo( \
00213               CSeqFeatData::eSubtype_##subtype, key_full, key_gb))
00214 
00215 static const TRnaInfoPair kRnaInfoPairs[] = {
00216     RNA_INFO_PAIR(premsg, preRNA, "precursor_RNA", "precursor_RNA"),
00217     RNA_INFO_PAIR(mRNA, mRNA, "mRNA", "mRNA"),
00218     RNA_INFO_PAIR(tRNA, tRNA, "tRNA", "tRNA"),
00219     RNA_INFO_PAIR(rRNA, rRNA, "rRNA", "rRNA"),
00220     RNA_INFO_PAIR(snRNA, snRNA, "snRNA", "snRNA"),
00221     RNA_INFO_PAIR(scRNA, scRNA, "scRNA", "scRNA"),
00222     RNA_INFO_PAIR(snoRNA, snoRNA, "snoRNA", "snoRNA"),
00223     RNA_INFO_PAIR(ncRNA, ncRNA, "ncRNA", "ncRNA"),
00224     RNA_INFO_PAIR(tmRNA, tmRNA, "tmRNA", "tmRNA")
00225 };
00226 
00227 typedef CStaticArrayMap<CRNA_ref::EType,
00228                         CSeqFeatData::SFeatDataInfo> TRnaInfoMap;
00229 DEFINE_STATIC_ARRAY_MAP(TRnaInfoMap, sc_RnaInfoPairs, kRnaInfoPairs);
00230 
00231 
00232 void CSeqFeatData::x_InitFeatDataInfo(void) const
00233 {
00234     m_FeatDataInfo.m_Key_gb = "misc_feature"; // ???
00235     m_FeatDataInfo.m_Key_full = "???";
00236     switch (Which()) {
00237     case e_Prot:
00238         {
00239             TProtInfoMap::const_iterator it =
00240                 sc_ProtInfoPairs.find(GetProt().GetProcessed());
00241             if (it != sc_ProtInfoPairs.end()) {
00242                 m_FeatDataInfo = it->second;
00243             }
00244             else {
00245                 m_FeatDataInfo.m_Subtype = eSubtype_prot;
00246                 m_FeatDataInfo.m_Key_full = "Prot";
00247                 m_FeatDataInfo.m_Key_gb = "Protein";
00248             }
00249             break;
00250         }
00251     case e_Site: // Is this correct, or are these encoded as Imp?
00252         {
00253             TSiteInfoMap::const_iterator it = sc_SiteInfoPairs.find(GetSite());
00254             if (it != sc_SiteInfoPairs.end()) {
00255                 m_FeatDataInfo = it->second;
00256             }
00257             else {
00258                 m_FeatDataInfo.m_Subtype = eSubtype_site;
00259                 m_FeatDataInfo.m_Key_full = "Site";
00260                 m_FeatDataInfo.m_Key_gb = "misc_feature";
00261             }
00262             break;
00263         }
00264     case e_Rna:
00265         {
00266             CRNA_ref_Base::TType rna_type = GetRna().GetType();
00267             TRnaInfoMap::const_iterator it =
00268                 sc_RnaInfoPairs.find(rna_type);
00269             if (it != sc_RnaInfoPairs.end()) {
00270                 m_FeatDataInfo = it->second;
00271             }
00272             else {
00273                 bool can_get_name = (GetRna().CanGetExt()
00274                                     &&  GetRna().GetExt().IsName());
00275                 const string& ext_name = (can_get_name
00276                                         ? GetRna().GetExt().GetName()
00277                                         : kEmptyStr);
00278                 if (ext_name == "ncRNA") {
00279                     m_FeatDataInfo.m_Subtype = eSubtype_ncRNA;
00280                     m_FeatDataInfo.m_Key_full = ext_name;
00281                 } else if (ext_name == "tmRNA") {
00282                     m_FeatDataInfo.m_Subtype = eSubtype_tmRNA;
00283                     m_FeatDataInfo.m_Key_full = ext_name;
00284                 } else {
00285                     m_FeatDataInfo.m_Subtype = eSubtype_otherRNA;
00286                     bool other = GetRna().GetType() == CRNA_ref::eType_other;
00287                     m_FeatDataInfo.m_Key_full = other ? "RNA" : "misc_RNA";
00288                 }
00289                 m_FeatDataInfo.m_Key_gb = "misc_RNA";
00290             }
00291             break;
00292         }
00293     case e_Imp:
00294     {
00295         const string& key    = GetImp().GetKey();
00296         SImportEntry  key2   = { key.c_str(), eSubtype_imp };
00297         const SImportEntry* result = lower_bound(kImportTable,
00298                                                  kImportTableEnd,
00299                                                  key2);
00300         if ( result == kImportTableEnd ||
00301              strcmp(key2.m_Name, result->m_Name) ) {
00302             m_FeatDataInfo.m_Subtype = eSubtype_imp;
00303         } else {
00304             m_FeatDataInfo.m_Subtype = result->m_Subtype;
00305         }
00306         m_FeatDataInfo.m_Key_gb = key; // "Imp"?;
00307         m_FeatDataInfo.m_Key_full = key;
00308         break;
00309     }
00310     default:
00311         {
00312             TInfoMap::const_iterator it = sc_InfoPairs.find(Which());
00313             if (it != sc_InfoPairs.end()) {
00314                 m_FeatDataInfo = it->second;
00315             }
00316             else {
00317                 m_FeatDataInfo.m_Subtype = eSubtype_bad;
00318                 m_FeatDataInfo.m_Key_full = "???";
00319                 m_FeatDataInfo.m_Key_gb = "misc_feature"; // ???
00320             }
00321         }
00322     }
00323 }
00324 
00325 
00326 // destructor
00327 CSeqFeatData::~CSeqFeatData(void)
00328 {
00329 }
00330 
00331 
00332 // ASCII representation of subtype (GenBank feature key, e.g.)
00333 string CSeqFeatData::GetKey(EVocabulary vocab) const
00334 {
00335     if (m_FeatDataInfo.m_Key_gb.empty()  &&  m_FeatDataInfo.m_Key_full.empty()) {
00336         x_InitFeatDataInfo();
00337     }
00338     return (vocab == eVocabulary_genbank) ?
00339         m_FeatDataInfo.m_Key_gb : m_FeatDataInfo.m_Key_full;
00340 }
00341 
00342 
00343 CSeqFeatData::ESubtype CSeqFeatData::GetSubtype(void) const
00344 {
00345     if (m_FeatDataInfo.m_Subtype == eSubtype_any) { // unknown
00346         x_InitFeatDataInfo();
00347     }
00348     return m_FeatDataInfo.m_Subtype;
00349 }
00350 
00351 
00352 DEFINE_STATIC_MUTEX(sx_InitTablesMutex);
00353 
00354 
00355 typedef vector<CSeqFeatData::E_Choice> TSubtypesTable;
00356 static AutoPtr<TSubtypesTable> sx_SubtypesTable;
00357 
00358 typedef map<CSeqFeatData::ESubtype, CSeqFeatData::TQualifiers> TFeatQuals;
00359 // these maps contain sorted vectors for faster lookup
00360 static AutoPtr<TFeatQuals> sx_LegalQuals;
00361 static AutoPtr<TFeatQuals> sx_MandatoryQuals;
00362 static AutoPtr<CSeqFeatData::TQualifiers> sx_EmptyQuals;
00363 
00364 
00365 CSeqFeatData::E_Choice CSeqFeatData::GetTypeFromSubtype(ESubtype subtype)
00366 {
00367     if ( !sx_SubtypesTable ) {
00368         s_InitSubtypesTable();
00369     }
00370     return (*sx_SubtypesTable)[subtype];
00371 }
00372 
00373 bool CSeqFeatData::IsLegalQualifier(ESubtype subtype, EQualifier qual)
00374 {
00375     if ( !sx_LegalQuals ) {
00376         s_InitLegalQuals();  // does nothing if already intialized
00377     }
00378     TFeatQuals::const_iterator iter = sx_LegalQuals->find(subtype);
00379     if ( iter == sx_LegalQuals->end() ) {
00380         return false;
00381     }
00382     const TQualifiers& legal = iter->second;
00383     return binary_search(legal.begin(), legal.end(), qual);
00384 }
00385 
00386 
00387 const CSeqFeatData::TQualifiers& CSeqFeatData::GetLegalQualifiers(ESubtype subtype)
00388 {
00389     if ( !sx_LegalQuals ) {
00390         s_InitLegalQuals();  // does nothing if already intialized
00391     }
00392     TFeatQuals::const_iterator iter = sx_LegalQuals->find(subtype);
00393     if ( iter == sx_LegalQuals->end() ) {
00394         return *sx_EmptyQuals;
00395     }
00396     return iter->second;
00397 }
00398 
00399 
00400 const CSeqFeatData::TQualifiers& CSeqFeatData::GetMandatoryQualifiers(ESubtype subtype)
00401 {
00402     if ( !sx_MandatoryQuals ) {
00403         s_InitMandatoryQuals();  // does nothing if already intialized
00404     }
00405     TFeatQuals::const_iterator iter = sx_MandatoryQuals->find(subtype);
00406     if ( iter == sx_MandatoryQuals->end() ) {
00407         return *sx_EmptyQuals;
00408     }
00409     return iter->second;
00410 }
00411 
00412 
00413 void CSeqFeatData::s_InitSubtypesTable(void)
00414 {
00415     if ( sx_SubtypesTable ) {
00416         return;
00417     }
00418     CMutexGuard guard(sx_InitTablesMutex);
00419     if ( sx_SubtypesTable ) {
00420         return;
00421     }
00422     AutoPtr<TSubtypesTable> ptr(new TSubtypesTable(eSubtype_any+1, e_not_set));
00423     TSubtypesTable& table = *ptr;
00424 
00425     table[eSubtype_gene] = e_Gene;
00426     table[eSubtype_org] = e_Org;
00427     table[eSubtype_cdregion] = e_Cdregion;
00428     table[eSubtype_pub] = e_Pub;
00429     table[eSubtype_seq] = e_Seq;
00430     table[eSubtype_region] = e_Region;
00431     table[eSubtype_comment] = e_Comment;
00432     table[eSubtype_bond] = e_Bond;
00433     table[eSubtype_site] = e_Site;
00434     table[eSubtype_rsite] = e_Rsite;
00435     table[eSubtype_user] = e_User;
00436     table[eSubtype_txinit] = e_Txinit;
00437     table[eSubtype_num] = e_Num;
00438     table[eSubtype_psec_str] = e_Psec_str;
00439     table[eSubtype_non_std_residue] = e_Non_std_residue;
00440     table[eSubtype_het] = e_Het;
00441     table[eSubtype_biosrc] = e_Biosrc;
00442     for (int sub = eSubtype_prot; sub <= eSubtype_transit_peptide_aa; ++sub) {
00443         table[ESubtype(sub)] = e_Prot;
00444     }
00445     for (int sub = eSubtype_preRNA; sub <= eSubtype_otherRNA; ++sub) {
00446         table[ESubtype(sub)] = e_Rna;
00447     }
00448     table[eSubtype_ncRNA] = e_Rna;
00449     table[eSubtype_tmRNA] = e_Rna;
00450     for (int sub = eSubtype_imp; sub <= eSubtype_site_ref; ++sub) {
00451         table[ESubtype(sub)] = e_Imp;
00452     }
00453 
00454     sx_SubtypesTable = ptr;
00455 }
00456 
00457 
00458 void CSeqFeatData::s_InitLegalQuals(void)
00459 {
00460     if ( sx_LegalQuals ) {
00461         return;
00462     }
00463     CMutexGuard guard(sx_InitTablesMutex);
00464     if ( sx_LegalQuals ) {
00465         return;
00466     }
00467 
00468     if ( !sx_EmptyQuals ) {
00469         sx_EmptyQuals.reset(new TQualifiers);
00470     }
00471     
00472     AutoPtr<TFeatQuals> ptr(new TFeatQuals);
00473     TFeatQuals& table = *ptr;
00474 
00475 #define START_SUBTYPE(x) { \
00476     TQualifiers& quals = table[eSubtype_##x];
00477 #define ADD_QUAL(y) quals.push_back(eQual_##y)
00478 #define END_SUBTYPE }
00479 
00480 START_SUBTYPE(gene)
00481     ADD_QUAL(allele);
00482     ADD_QUAL(citation);
00483     ADD_QUAL(db_xref);
00484     ADD_QUAL(evidence);
00485     ADD_QUAL(experiment);
00486     ADD_QUAL(function);
00487     ADD_QUAL(gene);
00488     ADD_QUAL(gene_synonym);
00489     ADD_QUAL(inference);
00490     ADD_QUAL(label);
00491     ADD_QUAL(locus_tag);
00492     ADD_QUAL(map);
00493     ADD_QUAL(note);
00494     ADD_QUAL(old_locus_tag);
00495     ADD_QUAL(operon);
00496     ADD_QUAL(phenotype);
00497     ADD_QUAL(product);
00498     ADD_QUAL(pseudo);
00499     ADD_QUAL(trans_splicing);
00500     ADD_QUAL(usedin);
00501 END_SUBTYPE
00502 
00503 //START_SUBTYPE(org)
00504 //END_SUBTYPE
00505 
00506 START_SUBTYPE(cdregion)
00507     ADD_QUAL(EC_number);
00508     ADD_QUAL(allele);
00509     ADD_QUAL(citation);
00510     ADD_QUAL(codon);
00511     ADD_QUAL(codon_start);
00512     ADD_QUAL(db_xref);
00513     ADD_QUAL(experiment);
00514     ADD_QUAL(exception);
00515     ADD_QUAL(function);
00516     ADD_QUAL(gdb_xref);
00517     ADD_QUAL(gene);
00518     ADD_QUAL(gene_synonym);
00519     ADD_QUAL(inference);
00520     ADD_QUAL(label);
00521     ADD_QUAL(locus_tag);
00522     ADD_QUAL(map);
00523     ADD_QUAL(note);
00524     ADD_QUAL(number);
00525     ADD_QUAL(old_locus_tag);
00526     ADD_QUAL(operon);
00527     ADD_QUAL(product);
00528     ADD_QUAL(protein_id);
00529     ADD_QUAL(pseudo);
00530     ADD_QUAL(ribosomal_slippage);
00531     ADD_QUAL(standard_name);
00532     ADD_QUAL(trans_splicing);
00533     ADD_QUAL(transl_except);
00534     ADD_QUAL(transl_table);
00535     ADD_QUAL(translation);
00536     ADD_QUAL(usedin);
00537 END_SUBTYPE
00538 
00539 START_SUBTYPE(prot)
00540     ADD_QUAL(allele);
00541     ADD_QUAL(citation);
00542     ADD_QUAL(db_xref);
00543     ADD_QUAL(experiment);
00544     ADD_QUAL(function);
00545     ADD_QUAL(gene);
00546     ADD_QUAL(gene_synonym);
00547     ADD_QUAL(inference);
00548     ADD_QUAL(label);
00549     ADD_QUAL(locus_tag);
00550     ADD_QUAL(map);
00551     ADD_QUAL(note);
00552     ADD_QUAL(old_locus_tag);
00553     ADD_QUAL(product);
00554     ADD_QUAL(protein_id);
00555     ADD_QUAL(pseudo);
00556     ADD_QUAL(standard_name);
00557     ADD_QUAL(usedin);
00558 END_SUBTYPE
00559 
00560 START_SUBTYPE(preprotein)
00561     ADD_QUAL(EC_number);
00562     ADD_QUAL(allele);
00563     ADD_QUAL(citation);
00564     ADD_QUAL(db_xref);
00565     ADD_QUAL(experiment);
00566     ADD_QUAL(function);
00567     ADD_QUAL(gene);
00568     ADD_QUAL(gene_synonym);
00569     ADD_QUAL(inference);
00570     ADD_QUAL(label);
00571     ADD_QUAL(locus_tag);
00572     ADD_QUAL(map);
00573     ADD_QUAL(note);
00574     ADD_QUAL(old_locus_tag);
00575     ADD_QUAL(product);
00576     ADD_QUAL(protein_id);
00577     ADD_QUAL(pseudo);
00578     ADD_QUAL(standard_name);
00579     ADD_QUAL(usedin);
00580 END_SUBTYPE
00581 
00582 START_SUBTYPE(mat_peptide_aa)
00583     ADD_QUAL(EC_number);
00584     ADD_QUAL(allele);
00585     ADD_QUAL(citation);
00586     ADD_QUAL(db_xref);
00587     ADD_QUAL(experiment);
00588     ADD_QUAL(function);
00589     ADD_QUAL(gene);
00590     ADD_QUAL(gene_synonym);
00591     ADD_QUAL(inference);
00592     ADD_QUAL(label);
00593     ADD_QUAL(locus_tag);
00594     ADD_QUAL(map);
00595     ADD_QUAL(note);
00596     ADD_QUAL(old_locus_tag);
00597     ADD_QUAL(product);
00598     ADD_QUAL(protein_id);
00599     ADD_QUAL(pseudo);
00600     ADD_QUAL(standard_name);
00601     ADD_QUAL(usedin);
00602 END_SUBTYPE
00603 
00604 START_SUBTYPE(sig_peptide_aa)
00605     ADD_QUAL(allele);
00606     ADD_QUAL(citation);
00607     ADD_QUAL(db_xref);
00608     ADD_QUAL(experiment);
00609     ADD_QUAL(function);
00610     ADD_QUAL(gene);
00611     ADD_QUAL(gene_synonym);
00612     ADD_QUAL(inference);
00613     ADD_QUAL(label);
00614     ADD_QUAL(locus_tag);
00615     ADD_QUAL(map);
00616     ADD_QUAL(note);
00617     ADD_QUAL(old_locus_tag);
00618     ADD_QUAL(product);
00619     ADD_QUAL(protein_id);
00620     ADD_QUAL(pseudo);
00621     ADD_QUAL(standard_name);
00622     ADD_QUAL(usedin);
00623 END_SUBTYPE
00624 
00625 START_SUBTYPE(transit_peptide_aa)
00626     ADD_QUAL(allele);
00627     ADD_QUAL(citation);
00628     ADD_QUAL(db_xref);
00629     ADD_QUAL(experiment);
00630     ADD_QUAL(function);
00631     ADD_QUAL(gene);
00632     ADD_QUAL(gene_synonym);
00633     ADD_QUAL(inference);
00634     ADD_QUAL(label);
00635     ADD_QUAL(locus_tag);
00636     ADD_QUAL(map);
00637     ADD_QUAL(note);
00638     ADD_QUAL(old_locus_tag);
00639     ADD_QUAL(product);
00640     ADD_QUAL(protein_id);
00641     ADD_QUAL(pseudo);
00642     ADD_QUAL(standard_name);
00643     ADD_QUAL(usedin);
00644 END_SUBTYPE
00645 
00646 START_SUBTYPE(preRNA)
00647     ADD_QUAL(allele);
00648     ADD_QUAL(citation);
00649     ADD_QUAL(db_xref);
00650     ADD_QUAL(experiment);
00651     ADD_QUAL(function);
00652     ADD_QUAL(gene);
00653     ADD_QUAL(gene_synonym);
00654     ADD_QUAL(inference);
00655     ADD_QUAL(label);
00656     ADD_QUAL(locus_tag);
00657     ADD_QUAL(map);
00658     ADD_QUAL(note);
00659     ADD_QUAL(old_locus_tag);
00660     ADD_QUAL(operon);
00661     ADD_QUAL(product);
00662     ADD_QUAL(pseudo);
00663     ADD_QUAL(standard_name);
00664     ADD_QUAL(trans_splicing);
00665     ADD_QUAL(usedin);
00666 END_SUBTYPE
00667 
00668 START_SUBTYPE(mRNA)
00669     ADD_QUAL(allele);
00670     ADD_QUAL(citation);
00671     ADD_QUAL(db_xref);
00672     ADD_QUAL(evidence);
00673     ADD_QUAL(experiment);
00674     ADD_QUAL(exception);
00675     ADD_QUAL(function);
00676     ADD_QUAL(gene);
00677     ADD_QUAL(gene_synonym);
00678     ADD_QUAL(inference);
00679     ADD_QUAL(label);
00680     ADD_QUAL(locus_tag);
00681     ADD_QUAL(map);
00682     ADD_QUAL(note);
00683     ADD_QUAL(old_locus_tag);
00684     ADD_QUAL(operon);
00685     ADD_QUAL(product);
00686     ADD_QUAL(pseudo);
00687     ADD_QUAL(standard_name);
00688     ADD_QUAL(trans_splicing);
00689     ADD_QUAL(transcript_id);
00690     ADD_QUAL(usedin);
00691 END_SUBTYPE
00692 
00693 START_SUBTYPE(tRNA)
00694     ADD_QUAL(allele);
00695     ADD_QUAL(anticodon);
00696     ADD_QUAL(citation);
00697     ADD_QUAL(db_xref);
00698     ADD_QUAL(experiment);
00699     ADD_QUAL(function);
00700     ADD_QUAL(gene);
00701     ADD_QUAL(gene_synonym);
00702     ADD_QUAL(inference);
00703     ADD_QUAL(label);
00704     ADD_QUAL(locus_tag);
00705     ADD_QUAL(map);
00706     ADD_QUAL(note);
00707     ADD_QUAL(old_locus_tag);
00708     ADD_QUAL(product);
00709     ADD_QUAL(pseudo);
00710     ADD_QUAL(standard_name);
00711     ADD_QUAL(trans_splicing);
00712     ADD_QUAL(usedin);
00713 END_SUBTYPE
00714 
00715 START_SUBTYPE(rRNA)
00716     ADD_QUAL(allele);
00717     ADD_QUAL(citation);
00718     ADD_QUAL(db_xref);
00719     ADD_QUAL(evidence);
00720     ADD_QUAL(experiment);
00721     ADD_QUAL(function);
00722     ADD_QUAL(gene);
00723     ADD_QUAL(gene_synonym);
00724     ADD_QUAL(inference);
00725     ADD_QUAL(label);
00726     ADD_QUAL(locus_tag);
00727     ADD_QUAL(map);
00728     ADD_QUAL(note);
00729     ADD_QUAL(old_locus_tag);
00730     ADD_QUAL(operon);
00731     ADD_QUAL(product);
00732     ADD_QUAL(pseudo);
00733     ADD_QUAL(standard_name);
00734     ADD_QUAL(usedin);
00735 END_SUBTYPE
00736 
00737 START_SUBTYPE(snRNA)
00738     ADD_QUAL(allele);
00739     ADD_QUAL(citation);
00740     ADD_QUAL(db_xref);
00741     ADD_QUAL(evidence);
00742     ADD_QUAL(experiment);
00743     ADD_QUAL(function);
00744     ADD_QUAL(gene);
00745     ADD_QUAL(gene_synonym);
00746     ADD_QUAL(inference);
00747     ADD_QUAL(label);
00748     ADD_QUAL(locus_tag);
00749     ADD_QUAL(map);
00750     ADD_QUAL(note);
00751     ADD_QUAL(old_locus_tag);
00752     ADD_QUAL(product);
00753     ADD_QUAL(pseudo);
00754     ADD_QUAL(standard_name);
00755     ADD_QUAL(usedin);
00756 END_SUBTYPE
00757 
00758 START_SUBTYPE(scRNA)
00759     ADD_QUAL(allele);
00760     ADD_QUAL(citation);
00761     ADD_QUAL(db_xref);
00762     ADD_QUAL(evidence);
00763     ADD_QUAL(experiment);
00764     ADD_QUAL(function);
00765     ADD_QUAL(gene);
00766     ADD_QUAL(gene_synonym);
00767     ADD_QUAL(inference);
00768     ADD_QUAL(label);
00769     ADD_QUAL(locus_tag);
00770     ADD_QUAL(map);
00771     ADD_QUAL(note);
00772     ADD_QUAL(old_locus_tag);
00773     ADD_QUAL(product);
00774     ADD_QUAL(pseudo);
00775     ADD_QUAL(standard_name);
00776     ADD_QUAL(usedin);
00777 END_SUBTYPE
00778 
00779 START_SUBTYPE(snoRNA)
00780     ADD_QUAL(allele);
00781     ADD_QUAL(citation);
00782     ADD_QUAL(db_xref);
00783     ADD_QUAL(evidence);
00784     ADD_QUAL(experiment);
00785     ADD_QUAL(function);
00786     ADD_QUAL(gene);
00787     ADD_QUAL(gene_synonym);
00788     ADD_QUAL(inference);
00789     ADD_QUAL(label);
00790     ADD_QUAL(locus_tag);
00791     ADD_QUAL(map);
00792     ADD_QUAL(note);
00793     ADD_QUAL(old_locus_tag);
00794     ADD_QUAL(product);
00795     ADD_QUAL(pseudo);
00796     ADD_QUAL(standard_name);
00797     ADD_QUAL(usedin);
00798 END_SUBTYPE
00799 
00800 START_SUBTYPE(ncRNA)
00801     ADD_QUAL(allele);
00802     ADD_QUAL(citation);
00803     ADD_QUAL(db_xref);
00804     ADD_QUAL(evidence);
00805     ADD_QUAL(experiment);
00806     ADD_QUAL(function);
00807     ADD_QUAL(gene);
00808     ADD_QUAL(gene_synonym);
00809     ADD_QUAL(inference);
00810     ADD_QUAL(label);
00811     ADD_QUAL(locus_tag);
00812     ADD_QUAL(map);
00813     ADD_QUAL(note);
00814     ADD_QUAL(ncRNA_class);
00815     ADD_QUAL(old_locus_tag);
00816     ADD_QUAL(operon);
00817     ADD_QUAL(product);
00818     ADD_QUAL(standard_name);
00819     ADD_QUAL(trans_splicing);
00820     ADD_QUAL(usedin);
00821 END_SUBTYPE
00822 
00823 START_SUBTYPE(tmRNA)
00824     ADD_QUAL(allele);
00825     ADD_QUAL(citation);
00826     ADD_QUAL(db_xref);
00827     ADD_QUAL(evidence);
00828     ADD_QUAL(experiment);
00829     ADD_QUAL(function);
00830     ADD_QUAL(gene);
00831     ADD_QUAL(gene_synonym);
00832     ADD_QUAL(inference);
00833     ADD_QUAL(label);
00834     ADD_QUAL(locus_tag);
00835     ADD_QUAL(map);
00836     ADD_QUAL(note);
00837     ADD_QUAL(old_locus_tag);
00838     ADD_QUAL(operon);
00839     ADD_QUAL(product);
00840     ADD_QUAL(pseudo);
00841     ADD_QUAL(standard_name);
00842     ADD_QUAL(tag_peptide);
00843     ADD_QUAL(usedin);
00844 END_SUBTYPE
00845 
00846 START_SUBTYPE(otherRNA)  //  a.k.a. misc_RNA
00847     ADD_QUAL(allele);
00848     ADD_QUAL(citation);
00849     ADD_QUAL(db_xref);
00850     ADD_QUAL(evidence);
00851     ADD_QUAL(experiment);
00852     ADD_QUAL(function);
00853     ADD_QUAL(gene);
00854     ADD_QUAL(gene_synonym);
00855     ADD_QUAL(inference);
00856     ADD_QUAL(label);
00857     ADD_QUAL(locus_tag);
00858     ADD_QUAL(map);
00859     ADD_QUAL(note);
00860     ADD_QUAL(old_locus_tag);
00861     ADD_QUAL(operon);
00862     ADD_QUAL(product);
00863     ADD_QUAL(pseudo);
00864     ADD_QUAL(standard_name);
00865     ADD_QUAL(trans_splicing);
00866     ADD_QUAL(usedin);
00867 END_SUBTYPE
00868 
00869 //START_SUBTYPE(pub)
00870 //END_SUBTYPE
00871 
00872 //START_SUBTYPE(seq)
00873 //END_SUBTYPE
00874 
00875 //START_SUBTYPE(imp)
00876 //END_SUBTYPE
00877 
00878 //START_SUBTYPE(allele)
00879 //END_SUBTYPE
00880 
00881 START_SUBTYPE(attenuator)
00882     ADD_QUAL(allele);
00883     ADD_QUAL(citation);
00884     ADD_QUAL(db_xref);
00885     ADD_QUAL(evidence);
00886     ADD_QUAL(experiment);
00887     ADD_QUAL(gene);
00888     ADD_QUAL(gene_synonym);
00889     ADD_QUAL(inference);
00890     ADD_QUAL(label);
00891     ADD_QUAL(locus_tag);
00892     ADD_QUAL(map);
00893     ADD_QUAL(note);
00894     ADD_QUAL(old_locus_tag);
00895     ADD_QUAL(operon);
00896     ADD_QUAL(phenotype);
00897     ADD_QUAL(usedin);
00898 END_SUBTYPE
00899 
00900 START_SUBTYPE(C_region)
00901     ADD_QUAL(allele);
00902     ADD_QUAL(citation);
00903     ADD_QUAL(db_xref);
00904     ADD_QUAL(evidence);
00905     ADD_QUAL(experiment);
00906     ADD_QUAL(gene);
00907     ADD_QUAL(gene_synonym);
00908     ADD_QUAL(inference);
00909     ADD_QUAL(label);
00910     ADD_QUAL(locus_tag);
00911     ADD_QUAL(map);
00912     ADD_QUAL(note);
00913     ADD_QUAL(old_locus_tag);
00914     ADD_QUAL(product);
00915     ADD_QUAL(pseudo);
00916     ADD_QUAL(standard_name);
00917     ADD_QUAL(usedin);
00918 END_SUBTYPE
00919 
00920 START_SUBTYPE(CAAT_signal)
00921     ADD_QUAL(allele);
00922     ADD_QUAL(citation);
00923     ADD_QUAL(db_xref);
00924     ADD_QUAL(evidence);
00925     ADD_QUAL(experiment);
00926     ADD_QUAL(gene);
00927     ADD_QUAL(gene_synonym);
00928     ADD_QUAL(inference);
00929     ADD_QUAL(label);
00930     ADD_QUAL(locus_tag);
00931     ADD_QUAL(map);
00932     ADD_QUAL(note);
00933     ADD_QUAL(old_locus_tag);
00934     ADD_QUAL(usedin);
00935 END_SUBTYPE
00936 
00937 START_SUBTYPE(Imp_CDS)
00938     ADD_QUAL(EC_number);
00939     ADD_QUAL(allele);
00940     ADD_QUAL(citation);
00941     ADD_QUAL(codon);
00942     ADD_QUAL(codon_start);
00943     ADD_QUAL(db_xref);
00944     ADD_QUAL(evidence);
00945     ADD_QUAL(experiment);
00946     ADD_QUAL(exception);
00947     ADD_QUAL(function);
00948     ADD_QUAL(gene);
00949     ADD_QUAL(gene_synonym);
00950     ADD_QUAL(inference);
00951     ADD_QUAL(label);
00952     ADD_QUAL(locus_tag);
00953     ADD_QUAL(map);
00954     ADD_QUAL(note);
00955     ADD_QUAL(number);
00956     ADD_QUAL(old_locus_tag);
00957     ADD_QUAL(operon);
00958     ADD_QUAL(product);
00959     ADD_QUAL(protein_id);
00960     ADD_QUAL(pseudo);
00961     ADD_QUAL(standard_name);
00962     ADD_QUAL(transl_except);
00963     ADD_QUAL(transl_table);
00964     ADD_QUAL(translation);
00965     ADD_QUAL(usedin);
00966 END_SUBTYPE
00967 
00968 START_SUBTYPE(conflict)
00969     ADD_QUAL(allele);
00970     ADD_QUAL(citation);
00971     ADD_QUAL(compare);
00972     ADD_QUAL(db_xref);
00973     ADD_QUAL(evidence);
00974     ADD_QUAL(experiment);
00975     ADD_QUAL(gene);
00976     ADD_QUAL(gene_synonym);
00977     ADD_QUAL(inference);
00978     ADD_QUAL(locus_tag);
00979     ADD_QUAL(map);
00980     ADD_QUAL(note);
00981     ADD_QUAL(old_locus_tag);
00982     ADD_QUAL(replace);
00983     ADD_QUAL(usedin);
00984 END_SUBTYPE
00985 
00986 START_SUBTYPE(D_loop)
00987     ADD_QUAL(allele);
00988     ADD_QUAL(citation);
00989     ADD_QUAL(db_xref);
00990     ADD_QUAL(evidence);
00991     ADD_QUAL(experiment);
00992     ADD_QUAL(gene);
00993     ADD_QUAL(gene_synonym);
00994     ADD_QUAL(inference);
00995     ADD_QUAL(label);
00996     ADD_QUAL(locus_tag);
00997     ADD_QUAL(map);
00998     ADD_QUAL(note);
00999     ADD_QUAL(old_locus_tag);
01000     ADD_QUAL(usedin);
01001 END_SUBTYPE
01002 
01003 START_SUBTYPE(D_segment)
01004     ADD_QUAL(allele);
01005     ADD_QUAL(citation);
01006     ADD_QUAL(db_xref);
01007     ADD_QUAL(evidence);
01008     ADD_QUAL(experiment);
01009     ADD_QUAL(gene);
01010     ADD_QUAL(gene_synonym);
01011     ADD_QUAL(inference);
01012     ADD_QUAL(label);
01013     ADD_QUAL(locus_tag);
01014     ADD_QUAL(map);
01015     ADD_QUAL(note);
01016     ADD_QUAL(old_locus_tag);
01017     ADD_QUAL(product);
01018     ADD_QUAL(pseudo);
01019     ADD_QUAL(standard_name);
01020     ADD_QUAL(usedin);
01021 END_SUBTYPE
01022 
01023 START_SUBTYPE(enhancer)
01024     ADD_QUAL(allele);
01025     ADD_QUAL(bound_moiety);
01026     ADD_QUAL(citation);
01027     ADD_QUAL(db_xref);
01028     ADD_QUAL(evidence);
01029     ADD_QUAL(experiment);
01030     ADD_QUAL(gene);
01031     ADD_QUAL(gene_synonym);
01032     ADD_QUAL(inference);
01033     ADD_QUAL(label);
01034     ADD_QUAL(locus_tag);
01035     ADD_QUAL(map);
01036     ADD_QUAL(note);
01037     ADD_QUAL(old_locus_tag);
01038     ADD_QUAL(standard_name);
01039     ADD_QUAL(usedin);
01040 END_SUBTYPE
01041 
01042 START_SUBTYPE(exon)
01043     ADD_QUAL(EC_number);
01044     ADD_QUAL(allele);
01045     ADD_QUAL(citation);
01046     ADD_QUAL(db_xref);
01047     ADD_QUAL(evidence);
01048     ADD_QUAL(experiment);
01049     ADD_QUAL(function);
01050     ADD_QUAL(gene);
01051     ADD_QUAL(gene_synonym);
01052     ADD_QUAL(inference);
01053     ADD_QUAL(label);
01054     ADD_QUAL(locus_tag);
01055     ADD_QUAL(map);
01056     ADD_QUAL(note);
01057     ADD_QUAL(number);
01058     ADD_QUAL(old_locus_tag);
01059     ADD_QUAL(product);
01060     ADD_QUAL(pseudo);
01061     ADD_QUAL(standard_name);
01062     ADD_QUAL(usedin);
01063 END_SUBTYPE
01064 
01065 START_SUBTYPE(GC_signal)
01066     ADD_QUAL(allele);
01067     ADD_QUAL(citation);
01068     ADD_QUAL(db_xref);
01069     ADD_QUAL(evidence);
01070     ADD_QUAL(experiment);
01071     ADD_QUAL(gene);
01072     ADD_QUAL(gene_synonym);
01073     ADD_QUAL(inference);
01074     ADD_QUAL(label);
01075     ADD_QUAL(locus_tag);
01076     ADD_QUAL(map);
01077     ADD_QUAL(note);
01078     ADD_QUAL(old_locus_tag);
01079     ADD_QUAL(usedin);
01080 END_SUBTYPE
01081 
01082 START_SUBTYPE(iDNA)
01083     ADD_QUAL(allele);
01084     ADD_QUAL(citation);
01085     ADD_QUAL(db_xref);
01086     ADD_QUAL(evidence);
01087     ADD_QUAL(experiment);
01088     ADD_QUAL(function);
01089     ADD_QUAL(gene);
01090     ADD_QUAL(gene_synonym);
01091     ADD_QUAL(inference);
01092     ADD_QUAL(label);
01093     ADD_QUAL(locus_tag);
01094     ADD_QUAL(map);
01095     ADD_QUAL(note);
01096     ADD_QUAL(number);
01097     ADD_QUAL(old_locus_tag);
01098     ADD_QUAL(standard_name);
01099     ADD_QUAL(usedin);
01100 END_SUBTYPE
01101 
01102 START_SUBTYPE(intron)
01103     ADD_QUAL(allele);
01104     ADD_QUAL(citation);
01105     ADD_QUAL(cons_splice);
01106     ADD_QUAL(db_xref);
01107     ADD_QUAL(evidence);
01108     ADD_QUAL(experiment);
01109     ADD_QUAL(function);
01110     ADD_QUAL(gene);
01111     ADD_QUAL(gene_synonym);
01112     ADD_QUAL(inference);
01113     ADD_QUAL(label);
01114     ADD_QUAL(locus_tag);
01115     ADD_QUAL(map);
01116     ADD_QUAL(note);
01117     ADD_QUAL(number);
01118     ADD_QUAL(old_locus_tag);
01119     ADD_QUAL(pseudo);
01120     ADD_QUAL(standard_name);
01121     ADD_QUAL(usedin);
01122 END_SUBTYPE
01123 
01124 START_SUBTYPE(J_segment)
01125     ADD_QUAL(allele);
01126     ADD_QUAL(citation);
01127     ADD_QUAL(db_xref);
01128     ADD_QUAL(evidence);
01129     ADD_QUAL(experiment);
01130     ADD_QUAL(gene);
01131     ADD_QUAL(gene_synonym);
01132     ADD_QUAL(inference);
01133     ADD_QUAL(label);
01134     ADD_QUAL(locus_tag);
01135     ADD_QUAL(map);
01136     ADD_QUAL(note);
01137     ADD_QUAL(old_locus_tag);
01138     ADD_QUAL(product);
01139     ADD_QUAL(pseudo);
01140     ADD_QUAL(standard_name);
01141     ADD_QUAL(usedin);
01142 END_SUBTYPE
01143 
01144 START_SUBTYPE(LTR)
01145     ADD_QUAL(allele);
01146     ADD_QUAL(citation);
01147     ADD_QUAL(db_xref);
01148     ADD_QUAL(evidence);
01149     ADD_QUAL(experiment);
01150     ADD_QUAL(function);
01151     ADD_QUAL(gene);
01152     ADD_QUAL(gene_synonym);
01153     ADD_QUAL(inference);
01154     ADD_QUAL(label);
01155     ADD_QUAL(locus_tag);
01156     ADD_QUAL(note);
01157     ADD_QUAL(old_locus_tag);
01158     ADD_QUAL(standard_name);
01159     ADD_QUAL(usedin);
01160 END_SUBTYPE
01161 
01162 START_SUBTYPE(mat_peptide)
01163     ADD_QUAL(EC_number);
01164     ADD_QUAL(allele);
01165     ADD_QUAL(citation);
01166     ADD_QUAL(db_xref);
01167     ADD_QUAL(evidence);
01168     ADD_QUAL(experiment);
01169     ADD_QUAL(function);
01170     ADD_QUAL(gene);
01171     ADD_QUAL(gene_synonym);
01172     ADD_QUAL(inference);
01173     ADD_QUAL(label);
01174     ADD_QUAL(locus_tag);
01175     ADD_QUAL(map);
01176     ADD_QUAL(note);
01177     ADD_QUAL(old_locus_tag);
01178     ADD_QUAL(product);
01179     ADD_QUAL(pseudo);
01180     ADD_QUAL(standard_name);
01181     ADD_QUAL(usedin);
01182 END_SUBTYPE
01183 
01184 START_SUBTYPE(misc_binding)
01185     ADD_QUAL(allele);
01186     ADD_QUAL(bound_moiety);
01187     ADD_QUAL(citation);
01188     ADD_QUAL(db_xref);
01189     ADD_QUAL(evidence);
01190     ADD_QUAL(experiment);
01191     ADD_QUAL(function);
01192     ADD_QUAL(gene);
01193     ADD_QUAL(gene_synonym);
01194     ADD_QUAL(inference);
01195     ADD_QUAL(label);
01196     ADD_QUAL(locus_tag);
01197     ADD_QUAL(map);
01198     ADD_QUAL(note);
01199     ADD_QUAL(old_locus_tag);
01200     ADD_QUAL(usedin);
01201 END_SUBTYPE
01202 
01203 START_SUBTYPE(misc_difference)
01204     ADD_QUAL(allele);
01205     ADD_QUAL(citation);
01206     ADD_QUAL(clone);
01207     ADD_QUAL(compare);
01208     ADD_QUAL(db_xref);
01209     ADD_QUAL(evidence);
01210     ADD_QUAL(experiment);
01211     ADD_QUAL(gene);
01212     ADD_QUAL(gene_synonym);
01213     ADD_QUAL(inference);
01214     ADD_QUAL(label);
01215     ADD_QUAL(locus_tag);
01216     ADD_QUAL(map);
01217     ADD_QUAL(note);
01218     ADD_QUAL(old_locus_tag);
01219     ADD_QUAL(phenotype);
01220     ADD_QUAL(replace);
01221     ADD_QUAL(standard_name);
01222     ADD_QUAL(usedin);
01223 END_SUBTYPE
01224 
01225 START_SUBTYPE(misc_feature)
01226     ADD_QUAL(allele);
01227     ADD_QUAL(citation);
01228     ADD_QUAL(db_xref);
01229     ADD_QUAL(evidence);
01230     ADD_QUAL(experiment);
01231     ADD_QUAL(function);
01232     ADD_QUAL(gene);
01233     ADD_QUAL(gene_synonym);
01234     ADD_QUAL(inference);
01235     ADD_QUAL(label);
01236     ADD_QUAL(locus_tag);
01237     ADD_QUAL(map);
01238     ADD_QUAL(note);
01239     ADD_QUAL(number);
01240     ADD_QUAL(old_locus_tag);
01241     ADD_QUAL(phenotype);
01242     ADD_QUAL(product);
01243     ADD_QUAL(pseudo);
01244     ADD_QUAL(standard_name);
01245     ADD_QUAL(usedin);
01246 END_SUBTYPE
01247 
01248 START_SUBTYPE(misc_recomb)
01249     ADD_QUAL(allele);
01250     ADD_QUAL(citation);
01251     ADD_QUAL(db_xref);
01252     ADD_QUAL(evidence);
01253     ADD_QUAL(experiment);
01254     ADD_QUAL(gene);
01255     ADD_QUAL(gene_synonym);
01256     ADD_QUAL(inference);
01257     ADD_QUAL(label);
01258     ADD_QUAL(locus_tag);
01259     ADD_QUAL(map);
01260     ADD_QUAL(note);
01261     ADD_QUAL(old_locus_tag);
01262     ADD_QUAL(standard_name);
01263     ADD_QUAL(usedin);
01264 END_SUBTYPE
01265 
01266 START_SUBTYPE(misc_RNA)
01267     ADD_QUAL(allele);
01268     ADD_QUAL(citation);
01269     ADD_QUAL(db_xref);
01270     ADD_QUAL(evidence);
01271     ADD_QUAL(experiment);
01272     ADD_QUAL(function);
01273     ADD_QUAL(gene);
01274     ADD_QUAL(gene_synonym);
01275     ADD_QUAL(inference);
01276     ADD_QUAL(label);
01277     ADD_QUAL(locus_tag);
01278     ADD_QUAL(map);
01279     ADD_QUAL(note);
01280     ADD_QUAL(old_locus_tag);
01281     ADD_QUAL(operon);
01282     ADD_QUAL(product);
01283     ADD_QUAL(standard_name);
01284     ADD_QUAL(usedin);
01285 END_SUBTYPE
01286 
01287 START_SUBTYPE(misc_signal)
01288     ADD_QUAL(allele);
01289     ADD_QUAL(citation);
01290     ADD_QUAL(db_xref);
01291     ADD_QUAL(evidence);
01292     ADD_QUAL(experiment);
01293     ADD_QUAL(function);
01294     ADD_QUAL(gene);
01295     ADD_QUAL(gene_synonym);
01296     ADD_QUAL(inference);
01297     ADD_QUAL(label);
01298     ADD_QUAL(locus_tag);
01299     ADD_QUAL(map);
01300     ADD_QUAL(note);
01301     ADD_QUAL(old_locus_tag);
01302     ADD_QUAL(operon);
01303     ADD_QUAL(phenotype);
01304     ADD_QUAL(standard_name);
01305     ADD_QUAL(usedin);
01306 END_SUBTYPE
01307 
01308 START_SUBTYPE(misc_structure)
01309     ADD_QUAL(allele);
01310     ADD_QUAL(citation);
01311     ADD_QUAL(db_xref);
01312     ADD_QUAL(evidence);
01313     ADD_QUAL(experiment);
01314     ADD_QUAL(function);
01315     ADD_QUAL(gene);
01316     ADD_QUAL(gene_synonym);
01317     ADD_QUAL(inference);
01318     ADD_QUAL(label);
01319     ADD_QUAL(locus_tag);
01320     ADD_QUAL(map);
01321     ADD_QUAL(note);
01322     ADD_QUAL(old_locus_tag);
01323     ADD_QUAL(standard_name);
01324     ADD_QUAL(usedin);
01325 END_SUBTYPE
01326 
01327 START_SUBTYPE(modified_base)
01328     ADD_QUAL(allele);
01329     ADD_QUAL(citation);
01330     ADD_QUAL(db_xref);
01331     ADD_QUAL(evidence);
01332     ADD_QUAL(experiment);
01333     ADD_QUAL(frequency);
01334     ADD_QUAL(gene);
01335     ADD_QUAL(gene_synonym);
01336     ADD_QUAL(inference);
01337     ADD_QUAL(label);
01338     ADD_QUAL(locus_tag);
01339     ADD_QUAL(map);
01340     ADD_QUAL(mod_base);
01341     ADD_QUAL(note);
01342     ADD_QUAL(old_locus_tag);
01343     ADD_QUAL(usedin);
01344 END_SUBTYPE
01345 
01346 //START_SUBTYPE(mutation)
01347 //END_SUBTYPE
01348 
01349 START_SUBTYPE(N_region)
01350     ADD_QUAL(citation);
01351     ADD_QUAL(db_xref);
01352     ADD_QUAL(evidence);
01353     ADD_QUAL(experiment);
01354     ADD_QUAL(gene);
01355     ADD_QUAL(gene_synonym);
01356     ADD_QUAL(inference);
01357     ADD_QUAL(label);
01358     ADD_QUAL(locus_tag);
01359     ADD_QUAL(map);
01360     ADD_QUAL(note);
01361     ADD_QUAL(old_locus_tag);
01362     ADD_QUAL(product);
01363     ADD_QUAL(pseudo);
01364     ADD_QUAL(standard_name);
01365     ADD_QUAL(usedin);
01366 END_SUBTYPE
01367 
01368 START_SUBTYPE(old_sequence)
01369     ADD_QUAL(allele);
01370     ADD_QUAL(citation);
01371     ADD_QUAL(compare);
01372     ADD_QUAL(db_xref);
01373     ADD_QUAL(evidence);
01374     ADD_QUAL(experiment);
01375     ADD_QUAL(gene);
01376     ADD_QUAL(gene_synonym);
01377     ADD_QUAL(inference);
01378     ADD_QUAL(locus_tag);
01379     ADD_QUAL(map);
01380     ADD_QUAL(note);
01381     ADD_QUAL(old_locus_tag);
01382     ADD_QUAL(replace);
01383     ADD_QUAL(usedin);
01384 END_SUBTYPE
01385 
01386 START_SUBTYPE(polyA_signal)
01387     ADD_QUAL(allele);
01388     ADD_QUAL(citation);
01389     ADD_QUAL(db_xref);
01390     ADD_QUAL(evidence);
01391     ADD_QUAL(experiment);
01392     ADD_QUAL(gene);
01393     ADD_QUAL(gene_synonym);
01394     ADD_QUAL(inference);
01395     ADD_QUAL(label);
01396     ADD_QUAL(locus_tag);
01397     ADD_QUAL(map);
01398     ADD_QUAL(note);
01399     ADD_QUAL(old_locus_tag);
01400     ADD_QUAL(usedin);
01401 END_SUBTYPE
01402 
01403 START_SUBTYPE(polyA_site)
01404     ADD_QUAL(allele);
01405     ADD_QUAL(citation);
01406     ADD_QUAL(db_xref);
01407     ADD_QUAL(evidence);
01408     ADD_QUAL(experiment);
01409     ADD_QUAL(gene);
01410     ADD_QUAL(gene_synonym);
01411     ADD_QUAL(inference);
01412     ADD_QUAL(label);
01413     ADD_QUAL(locus_tag);
01414     ADD_QUAL(map);
01415     ADD_QUAL(note);
01416     ADD_QUAL(old_locus_tag);
01417     ADD_QUAL(usedin);
01418 END_SUBTYPE
01419 
01420 START_SUBTYPE(precursor_RNA)
01421     ADD_QUAL(allele);
01422     ADD_QUAL(citation);
01423     ADD_QUAL(db_xref);
01424     ADD_QUAL(evidence);
01425     ADD_QUAL(experiment);
01426     ADD_QUAL(function);
01427     ADD_QUAL(gene);
01428     ADD_QUAL(gene_synonym);
01429     ADD_QUAL(inference);
01430     ADD_QUAL(label);
01431     ADD_QUAL(locus_tag);
01432     ADD_QUAL(map);
01433     ADD_QUAL(note);
01434     ADD_QUAL(old_locus_tag);
01435     ADD_QUAL(operon);
01436     ADD_QUAL(product);
01437     ADD_QUAL(standard_name);
01438     ADD_QUAL(trans_splicing);
01439     ADD_QUAL(usedin);
01440 END_SUBTYPE
01441 
01442 START_SUBTYPE(prim_transcript)
01443     ADD_QUAL(allele);
01444     ADD_QUAL(citation);
01445     ADD_QUAL(db_xref);
01446     ADD_QUAL(evidence);
01447     ADD_QUAL(experiment);
01448     ADD_QUAL(function);
01449     ADD_QUAL(gene);
01450     ADD_QUAL(gene_synonym);
01451     ADD_QUAL(inference);
01452     ADD_QUAL(label);
01453     ADD_QUAL(locus_tag);
01454     ADD_QUAL(map);
01455     ADD_QUAL(note);
01456     ADD_QUAL(old_locus_tag);
01457     ADD_QUAL(operon);
01458     ADD_QUAL(standard_name);
01459     ADD_QUAL(usedin);
01460 END_SUBTYPE
01461 
01462 START_SUBTYPE(primer_bind)
01463     ADD_QUAL(PCR_conditions);
01464     ADD_QUAL(allele);
01465     ADD_QUAL(citation);
01466     ADD_QUAL(db_xref);
01467     ADD_QUAL(evidence);
01468     ADD_QUAL(experiment);
01469     ADD_QUAL(gene);
01470     ADD_QUAL(gene_synonym);
01471     ADD_QUAL(inference);
01472     ADD_QUAL(label);
01473     ADD_QUAL(locus_tag);
01474     ADD_QUAL(map);
01475     ADD_QUAL(note);
01476     ADD_QUAL(old_locus_tag);
01477     ADD_QUAL(standard_name);
01478     ADD_QUAL(usedin);
01479 END_SUBTYPE
01480 
01481 START_SUBTYPE(promoter)
01482     ADD_QUAL(allele);
01483     ADD_QUAL(bound_moiety);
01484     ADD_QUAL(citation);
01485     ADD_QUAL(db_xref);
01486     ADD_QUAL(evidence);
01487     ADD_QUAL(experiment);
01488     ADD_QUAL(function);
01489     ADD_QUAL(gene);
01490     ADD_QUAL(gene_synonym);
01491     ADD_QUAL(inference);
01492     ADD_QUAL(label);
01493     ADD_QUAL(locus_tag);
01494     ADD_QUAL(map);
01495     ADD_QUAL(note);
01496     ADD_QUAL(old_locus_tag);
01497     ADD_QUAL(operon);
01498     ADD_QUAL(phenotype);
01499     ADD_QUAL(pseudo);
01500     ADD_QUAL(standard_name);
01501     ADD_QUAL(usedin);
01502 END_SUBTYPE
01503 
01504 START_SUBTYPE(protein_bind)
01505     ADD_QUAL(allele);
01506     ADD_QUAL(bound_moiety);
01507     ADD_QUAL(citation);
01508     ADD_QUAL(db_xref);
01509     ADD_QUAL(evidence);
01510     ADD_QUAL(experiment);
01511     ADD_QUAL(function);
01512     ADD_QUAL(gene);
01513     ADD_QUAL(gene_synonym);
01514     ADD_QUAL(inference);
01515     ADD_QUAL(label);
01516     ADD_QUAL(locus_tag);
01517     ADD_QUAL(map);
01518     ADD_QUAL(note);
01519     ADD_QUAL(old_locus_tag);
01520     ADD_QUAL(operon);
01521     ADD_QUAL(standard_name);
01522     ADD_QUAL(usedin);
01523 END_SUBTYPE
01524 
01525 START_SUBTYPE(RBS)
01526     ADD_QUAL(allele);
01527     ADD_QUAL(citation);
01528     ADD_QUAL(db_xref);
01529     ADD_QUAL(evidence);
01530     ADD_QUAL(experiment);
01531     ADD_QUAL(gene);
01532     ADD_QUAL(gene_synonym);
01533     ADD_QUAL(inference);
01534     ADD_QUAL(label);
01535     ADD_QUAL(locus_tag);
01536     ADD_QUAL(map);
01537     ADD_QUAL(note);
01538     ADD_QUAL(old_locus_tag);
01539     ADD_QUAL(standard_name);
01540     ADD_QUAL(usedin);
01541 END_SUBTYPE
01542 
01543 START_SUBTYPE(repeat_region)
01544     ADD_QUAL(allele);
01545     ADD_QUAL(citation);
01546     ADD_QUAL(db_xref);
01547     ADD_QUAL(evidence);
01548     ADD_QUAL(experiment);
01549     ADD_QUAL(function);
01550     ADD_QUAL(gene);
01551     ADD_QUAL(gene_synonym);
01552     ADD_QUAL(inference);
01553     ADD_QUAL(insertion_seq);
01554     ADD_QUAL(label);
01555     ADD_QUAL(locus_tag);
01556     ADD_QUAL(map);
01557     ADD_QUAL(mobile_element);
01558     ADD_QUAL(note);
01559     ADD_QUAL(old_locus_tag);
01560     ADD_QUAL(rpt_family);
01561     ADD_QUAL(rpt_type);
01562     ADD_QUAL(rpt_unit);
01563     ADD_QUAL(rpt_unit_range);
01564     ADD_QUAL(rpt_unit_seq);
01565     ADD_QUAL(satellite);
01566     ADD_QUAL(standard_name);
01567     ADD_QUAL(transposon);
01568     ADD_QUAL(usedin);
01569 END_SUBTYPE
01570 
01571 START_SUBTYPE(repeat_unit)
01572     ADD_QUAL(allele);
01573     ADD_QUAL(citation);
01574     ADD_QUAL(db_xref);
01575     ADD_QUAL(evidence);
01576     ADD_QUAL(experiment);
01577     ADD_QUAL(function);
01578     ADD_QUAL(gene);
01579     ADD_QUAL(gene_synonym);
01580     ADD_QUAL(inference);
01581     ADD_QUAL(label);
01582     ADD_QUAL(locus_tag);
01583     ADD_QUAL(map);
01584     ADD_QUAL(note);
01585     ADD_QUAL(old_locus_tag);
01586     ADD_QUAL(rpt_family);
01587     ADD_QUAL(rpt_type);
01588     ADD_QUAL(rpt_unit);
01589     ADD_QUAL(rpt_unit_range);
01590     ADD_QUAL(rpt_unit_seq);
01591     ADD_QUAL(usedin);
01592 END_SUBTYPE
01593 
01594 START_SUBTYPE(rep_origin)
01595     ADD_QUAL(allele);
01596     ADD_QUAL(citation);
01597     ADD_QUAL(db_xref);
01598     ADD_QUAL(direction);
01599     ADD_QUAL(evidence);
01600     ADD_QUAL(experiment);
01601     ADD_QUAL(gene);
01602     ADD_QUAL(gene_synonym);
01603     ADD_QUAL(inference);
01604     ADD_QUAL(label);
01605     ADD_QUAL(locus_tag);
01606     ADD_QUAL(map);
01607     ADD_QUAL(note);
01608     ADD_QUAL(old_locus_tag);
01609     ADD_QUAL(standard_name);
01610     ADD_QUAL(usedin);
01611 END_SUBTYPE
01612 
01613 START_SUBTYPE(S_region)
01614     ADD_QUAL(allele);
01615     ADD_QUAL(citation);
01616     ADD_QUAL(db_xref);
01617     ADD_QUAL(evidence);
01618     ADD_QUAL(experiment);
01619     ADD_QUAL(gene);
01620     ADD_QUAL(gene_synonym);
01621     ADD_QUAL(inference);
01622     ADD_QUAL(label);
01623     ADD_QUAL(locus_tag);
01624     ADD_QUAL(map);
01625     ADD_QUAL(note);
01626     ADD_QUAL(old_locus_tag);
01627     ADD_QUAL(product);
01628     ADD_QUAL(pseudo);
01629     ADD_QUAL(standard_name);
01630     ADD_QUAL(usedin);
01631 END_SUBTYPE
01632 
01633 START_SUBTYPE(satellite)
01634     ADD_QUAL(allele);
01635     ADD_QUAL(citation);
01636     ADD_QUAL(db_xref);
01637     ADD_QUAL(evidence);
01638     ADD_QUAL(experiment);
01639     ADD_QUAL(gene);
01640     ADD_QUAL(gene_synonym);
01641     ADD_QUAL(inference);
01642     ADD_QUAL(label);
01643     ADD_QUAL(locus_tag);
01644     ADD_QUAL(map);
01645     ADD_QUAL(note);
01646     ADD_QUAL(old_locus_tag);
01647     ADD_QUAL(rpt_family);
01648     ADD_QUAL(rpt_type);
01649     ADD_QUAL(rpt_unit);
01650     ADD_QUAL(rpt_unit_range);
01651     ADD_QUAL(rpt_unit_seq);
01652     ADD_QUAL(standard_name);
01653     ADD_QUAL(usedin);
01654 END_SUBTYPE
01655 
01656 START_SUBTYPE(sig_peptide)
01657     ADD_QUAL(allele);
01658     ADD_QUAL(citation);
01659     ADD_QUAL(db_xref);
01660     ADD_QUAL(evidence);
01661     ADD_QUAL(experiment);
01662     ADD_QUAL(function);
01663     ADD_QUAL(gene);
01664     ADD_QUAL(gene_synonym);
01665     ADD_QUAL(inference);
01666     ADD_QUAL(label);
01667     ADD_QUAL(locus_tag);
01668     ADD_QUAL(map);
01669     ADD_QUAL(note);
01670     ADD_QUAL(old_locus_tag);
01671     ADD_QUAL(product);
01672     ADD_QUAL(pseudo);
01673     ADD_QUAL(standard_name);
01674     ADD_QUAL(usedin);
01675 END_SUBTYPE
01676 
01677 START_SUBTYPE(source)
01678     ADD_QUAL(bio_material);
01679     ADD_QUAL(cell_line);
01680     ADD_QUAL(cell_type);
01681     ADD_QUAL(chloroplast);
01682     ADD_QUAL(chromoplast);
01683     ADD_QUAL(chromosome);
01684     ADD_QUAL(citation);
01685     ADD_QUAL(clone);
01686     ADD_QUAL(clone_lib);
01687     ADD_QUAL(collected_by);
01688     ADD_QUAL(collection_date);
01689     ADD_QUAL(country);
01690     ADD_QUAL(cultivar);
01691     ADD_QUAL(culture_collection);
01692     ADD_QUAL(cyanelle);
01693     ADD_QUAL(db_xref);
01694     ADD_QUAL(dev_stage);
01695     ADD_QUAL(ecotype);
01696     ADD_QUAL(environmental_sample);
01697     ADD_QUAL(focus);
01698     ADD_QUAL(frequency);
01699     ADD_QUAL(germline);
01700     ADD_QUAL(haplotype);
01701     ADD_QUAL(host);
01702     ADD_QUAL(identified_by);
01703     ADD_QUAL(isolate);
01704     ADD_QUAL(isolation_source);
01705     ADD_QUAL(kinetoplast);
01706     ADD_QUAL(lab_host);
01707     ADD_QUAL(label);
01708     ADD_QUAL(lat_lon);
01709     ADD_QUAL(macronuclear);
01710     ADD_QUAL(map);
01711     ADD_QUAL(mating_type);
01712     ADD_QUAL(metagenomic);
01713     ADD_QUAL(mitochondrion);
01714     ADD_QUAL(mol_type);
01715     ADD_QUAL(note);
01716     ADD_QUAL(organelle);
01717     ADD_QUAL(organism);
01718     ADD_QUAL(PCR_primers);
01719     ADD_QUAL(plasmid);
01720     ADD_QUAL(pop_variant);
01721     ADD_QUAL(proviral);
01722     ADD_QUAL(rearranged);
01723     ADD_QUAL(segment);
01724     ADD_QUAL(sequenced_mol);
01725     ADD_QUAL(serotype);
01726     ADD_QUAL(serovar);
01727     ADD_QUAL(sex);
01728     ADD_QUAL(specimen_voucher);
01729     ADD_QUAL(strain);
01730     ADD_QUAL(sub_clone);
01731     ADD_QUAL(sub_species);
01732     ADD_QUAL(sub_strain);
01733     ADD_QUAL(tissue_lib);
01734     ADD_QUAL(tissue_type);
01735     ADD_QUAL(transgenic);
01736     ADD_QUAL(transposon);
01737     ADD_QUAL(usedin);
01738     ADD_QUAL(variety);
01739     ADD_QUAL(virion);
01740 END_SUBTYPE
01741 
01742 START_SUBTYPE(stem_loop)
01743     ADD_QUAL(allele);
01744     ADD_QUAL(citation);
01745     ADD_QUAL(db_xref);
01746     ADD_QUAL(experiment);
01747     ADD_QUAL(function);
01748     ADD_QUAL(gene);
01749     ADD_QUAL(gene_synonym);
01750     ADD_QUAL(inference);
01751     ADD_QUAL(label);
01752     ADD_QUAL(locus_tag);
01753     ADD_QUAL(map);
01754     ADD_QUAL(note);
01755     ADD_QUAL(old_locus_tag);
01756     ADD_QUAL(operon);
01757     ADD_QUAL(standard_name);
01758     ADD_QUAL(usedin);
01759 END_SUBTYPE
01760 
01761 START_SUBTYPE(STS)
01762     ADD_QUAL(allele);
01763     ADD_QUAL(citation);
01764     ADD_QUAL(db_xref);
01765     ADD_QUAL(experiment);
01766     ADD_QUAL(gene);
01767     ADD_QUAL(gene_synonym);
01768     ADD_QUAL(inference);
01769     ADD_QUAL(label);
01770     ADD_QUAL(locus_tag);
01771     ADD_QUAL(map);
01772     ADD_QUAL(note);
01773     ADD_QUAL(old_locus_tag);
01774     ADD_QUAL(standard_name);
01775     ADD_QUAL(usedin);
01776 END_SUBTYPE
01777 
01778 START_SUBTYPE(TATA_signal)
01779     ADD_QUAL(allele);
01780     ADD_QUAL(citation);
01781     ADD_QUAL(db_xref);
01782     ADD_QUAL(experiment);
01783     ADD_QUAL(gene);
01784     ADD_QUAL(gene_synonym);
01785     ADD_QUAL(inference);
01786     ADD_QUAL(label);
01787     ADD_QUAL(locus_tag);
01788     ADD_QUAL(map);
01789     ADD_QUAL(note);
01790     ADD_QUAL(old_locus_tag);
01791     ADD_QUAL(usedin);
01792 END_SUBTYPE
01793 
01794 START_SUBTYPE(terminator)
01795     ADD_QUAL(allele);
01796     ADD_QUAL(citation);
01797     ADD_QUAL(db_xref);
01798     ADD_QUAL(experiment);
01799     ADD_QUAL(gene);
01800     ADD_QUAL(gene_synonym);
01801     ADD_QUAL(inference);
01802     ADD_QUAL(label);
01803     ADD_QUAL(locus_tag);
01804     ADD_QUAL(map);
01805     ADD_QUAL(note);
01806     ADD_QUAL(operon);
01807     ADD_QUAL(old_locus_tag);
01808     ADD_QUAL(standard_name);
01809     ADD_QUAL(usedin);
01810 END_SUBTYPE
01811 
01812 START_SUBTYPE(transit_peptide)
01813     ADD_QUAL(allele);
01814     ADD_QUAL(citation);
01815     ADD_QUAL(db_xref);
01816     ADD_QUAL(experiment);
01817     ADD_QUAL(function);
01818     ADD_QUAL(gene);
01819     ADD_QUAL(gene_synonym);
01820     ADD_QUAL(inference);
01821     ADD_QUAL(label);
01822     ADD_QUAL(locus_tag);
01823     ADD_QUAL(map);
01824     ADD_QUAL(note);
01825     ADD_QUAL(old_locus_tag);
01826     ADD_QUAL(product);
01827     ADD_QUAL(pseudo);
01828     ADD_QUAL(standard_name);
01829     ADD_QUAL(usedin);
01830 END_SUBTYPE
01831 
01832 START_SUBTYPE(unsure)
01833     ADD_QUAL(allele);
01834     ADD_QUAL(citation);
01835     ADD_QUAL(db_xref);
01836     ADD_QUAL(experiment);
01837     ADD_QUAL(gene);
01838     ADD_QUAL(gene_synonym);
01839     ADD_QUAL(inference);
01840     ADD_QUAL(label);
01841     ADD_QUAL(locus_tag);
01842     ADD_QUAL(map);
01843     ADD_QUAL(note);
01844     ADD_QUAL(old_locus_tag);
01845     ADD_QUAL(replace);
01846     ADD_QUAL(usedin);
01847 END_SUBTYPE
01848 
01849 START_SUBTYPE(V_region)
01850     ADD_QUAL(allele);
01851     ADD_QUAL(citation);
01852     ADD_QUAL(db_xref);
01853     ADD_QUAL(experiment);
01854     ADD_QUAL(gene);
01855     ADD_QUAL(gene_synonym);
01856     ADD_QUAL(inference);
01857     ADD_QUAL(label);
01858     ADD_QUAL(locus_tag);
01859     ADD_QUAL(map);
01860     ADD_QUAL(note);
01861     ADD_QUAL(old_locus_tag);
01862     ADD_QUAL(product);
01863     ADD_QUAL(pseudo);
01864     ADD_QUAL(standard_name);
01865     ADD_QUAL(usedin);
01866 END_SUBTYPE
01867 
01868 START_SUBTYPE(V_segment)
01869     ADD_QUAL(allele);
01870     ADD_QUAL(citation);
01871     ADD_QUAL(db_xref);
01872     ADD_QUAL(experiment);
01873     ADD_QUAL(gene);
01874     ADD_QUAL(gene_synonym);
01875     ADD_QUAL(inference);
01876     ADD_QUAL(label);
01877     ADD_QUAL(locus_tag);
01878     ADD_QUAL(map);
01879     ADD_QUAL(note);
01880     ADD_QUAL(old_locus_tag);
01881     ADD_QUAL(product);
01882     ADD_QUAL(pseudo);
01883     ADD_QUAL(standard_name);
01884     ADD_QUAL(usedin);
01885 END_SUBTYPE
01886 
01887 START_SUBTYPE(variation)
01888     ADD_QUAL(allele);
01889     ADD_QUAL(citation);
01890     ADD_QUAL(compare);
01891     ADD_QUAL(db_xref);
01892     ADD_QUAL(experiment);
01893     ADD_QUAL(frequency);
01894     ADD_QUAL(gene);
01895     ADD_QUAL(gene_synonym);
01896     ADD_QUAL(inference);
01897     ADD_QUAL(label);
01898     ADD_QUAL(locus_tag);
01899     ADD_QUAL(map);
01900     ADD_QUAL(note);
01901     ADD_QUAL(old_locus_tag);
01902     ADD_QUAL(phenotype);
01903     ADD_QUAL(product);
01904     ADD_QUAL(replace);
01905     ADD_QUAL(standard_name);
01906     ADD_QUAL(usedin);
01907 END_SUBTYPE
01908 
01909 //START_SUBTYPE(virion)
01910 
01911 START_SUBTYPE(3clip)
01912     ADD_QUAL(allele);
01913     ADD_QUAL(citation);
01914     ADD_QUAL(db_xref);
01915     ADD_QUAL(experiment);
01916     ADD_QUAL(function);
01917     ADD_QUAL(gene);
01918     ADD_QUAL(gene_synonym);
01919     ADD_QUAL(inference);
01920     ADD_QUAL(label);
01921     ADD_QUAL(locus_tag);
01922     ADD_QUAL(map);
01923     ADD_QUAL(note);
01924     ADD_QUAL(old_locus_tag);
01925     ADD_QUAL(standard_name);
01926     ADD_QUAL(usedin);
01927 END_SUBTYPE
01928 
01929 START_SUBTYPE(3UTR)
01930     ADD_QUAL(allele);
01931     ADD_QUAL(citation);
01932     ADD_QUAL(db_xref);
01933     ADD_QUAL(experiment);
01934     ADD_QUAL(function);
01935     ADD_QUAL(gene);
01936     ADD_QUAL(gene_synonym);
01937     ADD_QUAL(inference);
01938     ADD_QUAL(label);
01939     ADD_QUAL(locus_tag);
01940     ADD_QUAL(map);
01941     ADD_QUAL(note);
01942     ADD_QUAL(old_locus_tag);
01943     ADD_QUAL(standard_name);
01944     ADD_QUAL(trans_splicing);
01945     ADD_QUAL(usedin);
01946 END_SUBTYPE
01947 
01948 START_SUBTYPE(5clip)
01949     ADD_QUAL(allele);
01950     ADD_QUAL(citation);
01951     ADD_QUAL(db_xref);
01952     ADD_QUAL(experiment);
01953     ADD_QUAL(function);
01954     ADD_QUAL(gene);
01955     ADD_QUAL(gene_synonym);
01956     ADD_QUAL(inference);
01957     ADD_QUAL(label);
01958     ADD_QUAL(locus_tag);
01959     ADD_QUAL(map);
01960     ADD_QUAL(note);
01961     ADD_QUAL(old_locus_tag);
01962     ADD_QUAL(standard_name);
01963     ADD_QUAL(usedin);
01964 END_SUBTYPE
01965 
01966 START_SUBTYPE(5UTR)
01967     ADD_QUAL(allele);
01968     ADD_QUAL(citation);
01969     ADD_QUAL(db_xref);
01970     ADD_QUAL(experiment);
01971     ADD_QUAL(function);
01972     ADD_QUAL(gene);
01973     ADD_QUAL(gene_synonym);
01974     ADD_QUAL(inference);
01975     ADD_QUAL(label);
01976     ADD_QUAL(locus_tag);
01977     ADD_QUAL(map);
01978     ADD_QUAL(note);
01979     ADD_QUAL(old_locus_tag);
01980     ADD_QUAL(standard_name);
01981     ADD_QUAL(trans_splicing);
01982     ADD_QUAL(usedin);
01983 END_SUBTYPE
01984 
01985 START_SUBTYPE(10_signal)
01986     ADD_QUAL(allele);
01987     ADD_QUAL(citation);
01988     ADD_QUAL(db_xref);
01989     ADD_QUAL(experiment);
01990     ADD_QUAL(gene);
01991     ADD_QUAL(gene_synonym);
01992     ADD_QUAL(inference);
01993     ADD_QUAL(label);
01994     ADD_QUAL(locus_tag);
01995     ADD_QUAL(map);
01996     ADD_QUAL(note);
01997     ADD_QUAL(old_locus_tag);
01998     ADD_QUAL(operon);
01999     ADD_QUAL(standard_name);
02000     ADD_QUAL(usedin);
02001 END_SUBTYPE
02002 
02003 START_SUBTYPE(35_signal)
02004     ADD_QUAL(allele);
02005     ADD_QUAL(citation);
02006     ADD_QUAL(db_xref);
02007     ADD_QUAL(experiment);
02008     ADD_QUAL(gene);
02009     ADD_QUAL(gene_synonym);
02010     ADD_QUAL(inference);
02011     ADD_QUAL(label);
02012     ADD_QUAL(locus_tag);
02013     ADD_QUAL(map);
02014     ADD_QUAL(note);
02015     ADD_QUAL(old_locus_tag);
02016     ADD_QUAL(operon);
02017     ADD_QUAL(standard_name);
02018     ADD_QUAL(usedin);
02019 END_SUBTYPE
02020 
02021 START_SUBTYPE(gap)
02022     ADD_QUAL(estimated_length);
02023     ADD_QUAL(map);
02024     ADD_QUAL(note);
02025 END_SUBTYPE
02026 
02027 START_SUBTYPE(operon)
02028     ADD_QUAL(allele);
02029     ADD_QUAL(citation);
02030     ADD_QUAL(db_xref);
02031     ADD_QUAL(experiment);
02032     ADD_QUAL(function);
02033     ADD_QUAL(inference);
02034     ADD_QUAL(label);
02035     ADD_QUAL(map);
02036     ADD_QUAL(note);
02037     ADD_QUAL(operon);
02038     ADD_QUAL(phenotype);
02039     ADD_QUAL(pseudo);
02040     ADD_QUAL(standard_name);
02041     ADD_QUAL(usedin);
02042 END_SUBTYPE
02043 
02044 START_SUBTYPE(oriT)
02045     ADD_QUAL(allele);
02046     ADD_QUAL(bound_moiety);
02047     ADD_QUAL(citation);
02048     ADD_QUAL(db_xref);
02049     ADD_QUAL(direction);
02050     ADD_QUAL(experiment);
02051     ADD_QUAL(gene);
02052     ADD_QUAL(gene_synonym);
02053     ADD_QUAL(inference);
02054     ADD_QUAL(label);
02055     ADD_QUAL(locus_tag);
02056     ADD_QUAL(map);
02057     ADD_QUAL(note);
02058     ADD_QUAL(old_locus_tag);
02059     ADD_QUAL(rpt_family);
02060     ADD_QUAL(rpt_type);
02061     ADD_QUAL(rpt_unit);
02062     ADD_QUAL(rpt_unit_range);
02063     ADD_QUAL(rpt_unit_seq);
02064     ADD_QUAL(standard_name);
02065     ADD_QUAL(usedin);
02066 END_SUBTYPE
02067 
02068 //START_SUBTYPE(site_ref)
02069 //END_SUBTYPE
02070 
02071 START_SUBTYPE(region)
02072     ADD_QUAL(allele);
02073     ADD_QUAL(citation);
02074     ADD_QUAL(db_xref);
02075     ADD_QUAL(experiment);
02076     ADD_QUAL(gene);
02077     ADD_QUAL(gene_synonym);
02078     ADD_QUAL(inference);
02079     ADD_QUAL(label);
02080     ADD_QUAL(locus_tag);
02081     ADD_QUAL(map);
02082     ADD_QUAL(note);
02083     ADD_QUAL(number);
02084     ADD_QUAL(old_locus_tag);
02085     ADD_QUAL(product);
02086     ADD_QUAL(pseudo);
02087     ADD_QUAL(standard_name);
02088     ADD_QUAL(usedin);
02089 END_SUBTYPE
02090 
02091 START_SUBTYPE(comment)  // same as misc_feature
02092     ADD_QUAL(allele);
02093     ADD_QUAL(citation);
02094     ADD_QUAL(db_xref);
02095     ADD_QUAL(experiment);
02096     ADD_QUAL(function);
02097     ADD_QUAL(gene);
02098     ADD_QUAL(gene_synonym);
02099     ADD_QUAL(inference);
02100     ADD_QUAL(label);
02101     ADD_QUAL(locus_tag);
02102     ADD_QUAL(map);
02103     ADD_QUAL(note);
02104     ADD_QUAL(number);
02105     ADD_QUAL(old_locus_tag);
02106     ADD_QUAL(phenotype);
02107     ADD_QUAL(product);
02108     ADD_QUAL(pseudo);
02109     ADD_QUAL(standard_name);
02110     ADD_QUAL(usedin);
02111 END_SUBTYPE
02112 
02113 START_SUBTYPE(bond)  // same as misc_feature
02114     ADD_QUAL(allele);
02115     ADD_QUAL(citation);
02116     ADD_QUAL(db_xref);
02117     ADD_QUAL(experiment);
02118     ADD_QUAL(function);
02119     ADD_QUAL(gene);
02120     ADD_QUAL(gene_synonym);
02121     ADD_QUAL(inference);
02122     ADD_QUAL(label);
02123     ADD_QUAL(locus_tag);
02124     ADD_QUAL(map);
02125     ADD_QUAL(note);
02126     ADD_QUAL(number);
02127     ADD_QUAL(old_locus_tag);
02128     ADD_QUAL(phenotype);
02129     ADD_QUAL(product);
02130     ADD_QUAL(pseudo);
02131     ADD_QUAL(standard_name);
02132     ADD_QUAL(usedin);
02133 END_SUBTYPE
02134 
02135 START_SUBTYPE(site)  //  same as misc_feature
02136     ADD_QUAL(allele);
02137     ADD_QUAL(citation);
02138     ADD_QUAL(db_xref);
02139     ADD_QUAL(experiment);
02140     ADD_QUAL(function);
02141     ADD_QUAL(gene);
02142     ADD_QUAL(gene_synonym);
02143     ADD_QUAL(inference);
02144     ADD_QUAL(label);
02145     ADD_QUAL(locus_tag);
02146     ADD_QUAL(map);
02147     ADD_QUAL(note);
02148     ADD_QUAL(number);
02149     ADD_QUAL(old_locus_tag);
02150     ADD_QUAL(phenotype);
02151     ADD_QUAL(product);
02152     ADD_QUAL(pseudo);
02153     ADD_QUAL(standard_name);
02154     ADD_QUAL(usedin);
02155 END_SUBTYPE
02156 
02157 //START_SUBTYPE(rsite)
02158 //END_SUBTYPE
02159 
02160 //START_SUBTYPE(user)
02161 //END_SUBTYPE
02162 
02163 //START_SUBTYPE(txinit)
02164 //END_SUBTYPE
02165 
02166 //START_SUBTYPE(num)
02167 //END_SUBTYPE
02168 
02169 START_SUBTYPE(psec_str)  //  same as misc_feature
02170     ADD_QUAL(allele);
02171     ADD_QUAL(citation);
02172     ADD_QUAL(db_xref);
02173     ADD_QUAL(experiment);
02174     ADD_QUAL(function);
02175     ADD_QUAL(gene);
02176     ADD_QUAL(gene_synonym);
02177     ADD_QUAL(inference);
02178     ADD_QUAL(label);
02179     ADD_QUAL(locus_tag);
02180     ADD_QUAL(map);
02181     ADD_QUAL(note);
02182     ADD_QUAL(number);
02183     ADD_QUAL(old_locus_tag);
02184     ADD_QUAL(phenotype);
02185     ADD_QUAL(product);
02186     ADD_QUAL(pseudo);
02187     ADD_QUAL(standard_name);
02188     ADD_QUAL(usedin);
02189 END_SUBTYPE
02190 
02191 //START_SUBTYPE(non_std_residue)
02192 //END_SUBTYPE
02193 
02194 START_SUBTYPE(het)  //  same as misc_feature
02195     ADD_QUAL(allele);
02196     ADD_QUAL(citation);
02197     ADD_QUAL(db_xref);
02198     ADD_QUAL(experiment);
02199     ADD_QUAL(function);
02200     ADD_QUAL(gene);
02201     ADD_QUAL(gene_synonym);
02202     ADD_QUAL(inference);
02203     ADD_QUAL(label);
02204     ADD_QUAL(locus_tag);
02205     ADD_QUAL(map);
02206     ADD_QUAL(note);
02207     ADD_QUAL(number);
02208     ADD_QUAL(old_locus_tag);
02209     ADD_QUAL(phenotype);
02210     ADD_QUAL(product);
02211     ADD_QUAL(pseudo);
02212     ADD_QUAL(standard_name);
02213     ADD_QUAL(usedin);
02214 END_SUBTYPE
02215 
02216 //START_SUBTYPE(biosrc)
02217 //END_SUBTYPE
02218 
02219 #undef START_SUBTYPE
02220 #undef ADD_QUAL
02221 #undef END_SYBTYPE
02222 
02223     // sort for binary_search
02224     NON_CONST_ITERATE ( TFeatQuals, iter, table ) {
02225         sort(iter->second.begin(), iter->second.end());
02226     }
02227 
02228     sx_LegalQuals = ptr;
02229 }
02230 
02231 
02232 void CSeqFeatData::s_InitMandatoryQuals(void)
02233 {
02234     if ( sx_MandatoryQuals ) {
02235         return;
02236     }
02237     CMutexGuard guard(sx_InitTablesMutex);
02238     if ( sx_MandatoryQuals ) {
02239         return;
02240     }
02241 
02242     if ( !sx_EmptyQuals ) {
02243         sx_EmptyQuals.reset(new TQualifiers);
02244     }
02245     
02246     AutoPtr<TFeatQuals> ptr(new TFeatQuals);
02247     TFeatQuals& table = *ptr;
02248 
02249     table[eSubtype_conflict].push_back(eQual_citation);
02250     table[eSubtype_gap].push_back(eQual_estimated_length);
02251     table[eSubtype_misc_binding].push_back(eQual_bound_moiety);
02252     table[eSubtype_protein_bind].push_back(eQual_bound_moiety);
02253     table[eSubtype_modified_base].push_back(eQual_mod_base);
02254     table[eSubtype_old_sequence].push_back(eQual_citation);
02255     table[eSubtype_operon].push_back(eQual_operon);
02256     table[eSubtype_source].push_back(eQual_organism);
02257     table[eSubtype_ncRNA].push_back(eQual_ncRNA_class);
02258 
02259     // sort for binary_search
02260     NON_CONST_ITERATE ( TFeatQuals, iter, table ) {
02261         sort(iter->second.begin(), iter->second.end());
02262     }
02263 
02264     sx_MandatoryQuals = ptr;
02265 }
02266 
02267 
02268 typedef pair<CSeqFeatData::EQualifier, string> TQualPair;
02269 static const TQualPair kQualPairs[] = {
02270     TQualPair(CSeqFeatData::eQual_bad, "bad"),
02271     TQualPair(CSeqFeatData::eQual_allele, "allele"),
02272     TQualPair(CSeqFeatData::eQual_anticodon, "anticodon"),
02273     TQualPair(CSeqFeatData::eQual_bio_material, "bio_material"),
02274     TQualPair(CSeqFeatData::eQual_bound_moiety, "bound_moiety"),
02275     TQualPair(CSeqFeatData::eQual_cell_line, "cell_line"),
02276     TQualPair(CSeqFeatData::eQual_cell_type, "cell_type"),
02277     TQualPair(CSeqFeatData::eQual_chloroplast, "chloroplast"),
02278     TQualPair(CSeqFeatData::eQual_chromoplast, "chromoplast"),
02279     TQualPair(CSeqFeatData::eQual_chromosome, "chromosome"),
02280     TQualPair(CSeqFeatData::eQual_citation, "citation"),
02281     TQualPair(CSeqFeatData::eQual_clone, "clone"),
02282     TQualPair(CSeqFeatData::eQual_clone_lib, "clone_lib"),
02283     TQualPair(CSeqFeatData::eQual_codon, "codon"),
02284     TQualPair(CSeqFeatData::eQual_codon_start, "codon_start"),
02285     TQualPair(CSeqFeatData::eQual_collected_by, "collected_by"),
02286     TQualPair(CSeqFeatData::eQual_collection_date, "collection_date"),
02287     TQualPair(CSeqFeatData::eQual_compare, "compare"),
02288     TQualPair(CSeqFeatData::eQual_cons_splice, "cons_splice"),
02289     TQualPair(CSeqFeatData::eQual_country, "country"),
02290     TQualPair(CSeqFeatData::eQual_cultivar, "cultivar"),
02291     TQualPair(CSeqFeatData::eQual_culture_collection, "culture_collection"),
02292     TQualPair(CSeqFeatData::eQual_cyanelle, "cyanelle"),
02293     TQualPair(CSeqFeatData::eQual_db_xref, "db_xref"),
02294     TQualPair(CSeqFeatData::eQual_dev_stage, "dev_stage"),
02295     TQualPair(CSeqFeatData::eQual_direction, "direction"),
02296     TQualPair(CSeqFeatData::eQual_EC_number, "EC_number"),
02297     TQualPair(CSeqFeatData::eQual_ecotype, "ecotype"),
02298     TQualPair(CSeqFeatData::eQual_environmental_sample, "environmental_sample"),
02299     TQualPair(CSeqFeatData::eQual_estimated_length, "estimated_length"),
02300     TQualPair(CSeqFeatData::eQual_evidence, "evidence"),
02301     TQualPair(CSeqFeatData::eQual_exception, "exception"),
02302     TQualPair(CSeqFeatData::eQual_experiment, "experiment"),
02303     TQualPair(CSeqFeatData::eQual_focus, "focus"),
02304     TQualPair(CSeqFeatData::eQual_frequency, "frequency"),
02305     TQualPair(CSeqFeatData::eQual_function, "function"),
02306     TQualPair(CSeqFeatData::eQual_gdb_xref, "gdb_xref"),
02307     TQualPair(CSeqFeatData::eQual_gene, "gene"),
02308     TQualPair(CSeqFeatData::eQual_gene_synonym, "gene_synonym"),
02309     TQualPair(CSeqFeatData::eQual_germline, "germline"),
02310     TQualPair(CSeqFeatData::eQual_haplotype, "haplotype"),
02311     TQualPair(CSeqFeatData::eQual_host, "host"),
02312     TQualPair(CSeqFeatData::eQual_identified_by, "identified_by"),
02313     TQualPair(CSeqFeatData::eQual_inference, "inference"),
02314     TQualPair(CSeqFeatData::eQual_insertion_seq, "insertion_seq"),
02315     TQualPair(CSeqFeatData::eQual_isolate, "isolate"),
02316     TQualPair(CSeqFeatData::eQual_isolation_source, "isolation_source"),
02317     TQualPair(CSeqFeatData::eQual_kinetoplast, "kinetoplast"),
02318     TQualPair(CSeqFeatData::eQual_lab_host, "lab_host"),
02319     TQualPair(CSeqFeatData::eQual_label, "label"),
02320     TQualPair(CSeqFeatData::eQual_lat_lon, "lat_lon"),
02321     TQualPair(CSeqFeatData::eQual_locus_tag, "locus_tag"),
02322     TQualPair(CSeqFeatData::eQual_macronuclear, "macronuclear"),
02323     TQualPair(CSeqFeatData::eQual_map, "map"),
02324     TQualPair(CSeqFeatData::eQual_mating_type, "mating_type"),
02325     TQualPair(CSeqFeatData::eQual_metagenomic, "metagenomic"),
02326     TQualPair(CSeqFeatData::eQual_mitochondrion, "mitochondrion"),
02327     TQualPair(CSeqFeatData::eQual_mobile_element, "mobile_element"),
02328     TQualPair(CSeqFeatData::eQual_mod_base, "mod_base"),
02329     TQualPair(CSeqFeatData::eQual_mol_type, "mol_type"),
02330     TQualPair(CSeqFeatData::eQual_ncRNA_class, "ncRNA_class"),
02331     TQualPair(CSeqFeatData::eQual_note, "note"),
02332     TQualPair(CSeqFeatData::eQual_number, "number"),
02333     TQualPair(CSeqFeatData::eQual_old_locus_tag, "old_locus_tag"),
02334     TQualPair(CSeqFeatData::eQual_operon, "operon"),
02335     TQualPair(CSeqFeatData::eQual_organelle, "organelle"),
02336     TQualPair(CSeqFeatData::eQual_organism, "organism"),
02337     TQualPair(CSeqFeatData::eQual_partial, "partial"),
02338     TQualPair(CSeqFeatData::eQual_PCR_conditions, "PCR_conditions"),
02339     TQualPair(CSeqFeatData::eQual_PCR_primers, "PCR_primers"),
02340     TQualPair(CSeqFeatData::eQual_phenotype, "phenotype"),
02341     TQualPair(CSeqFeatData::eQual_plasmid, "plasmid"),
02342     TQualPair(CSeqFeatData::eQual_pop_variant, "pop_variant"),
02343     TQualPair(CSeqFeatData::eQual_product, "product"),
02344     TQualPair(CSeqFeatData::eQual_protein_id, "protein_id"),
02345     TQualPair(CSeqFeatData::eQual_proviral, "proviral"),
02346     TQualPair(CSeqFeatData::eQual_pseudo, "pseudo"),
02347     TQualPair(CSeqFeatData::eQual_rearranged, "rearranged"),
02348     TQualPair(CSeqFeatData::eQual_replace, "replace"),
02349     TQualPair(CSeqFeatData::eQual_ribosomal_slippage, "ribosomal_slippage"),
02350     TQualPair(CSeqFeatData::eQual_rpt_family, "rpt_family"),
02351     TQualPair(CSeqFeatData::eQual_rpt_type, "rpt_type"),
02352     TQualPair(CSeqFeatData::eQual_rpt_unit, "rpt_unit"),
02353     TQualPair(CSeqFeatData::eQual_rpt_unit_range, "rpt_unit_range" ),
02354     TQualPair(CSeqFeatData::eQual_rpt_unit_seq, "rpt_unit_seq" ),
02355     TQualPair(CSeqFeatData::eQual_satellite, "satellite"),
02356     TQualPair(CSeqFeatData::eQual_segment, "segment"),
02357     TQualPair(CSeqFeatData::eQual_sequenced_mol, "sequenced_mol"),
02358     TQualPair(CSeqFeatData::eQual_serotype, "serotype"),
02359     TQualPair(CSeqFeatData::eQual_serovar, "serovar"),
02360     TQualPair(CSeqFeatData::eQual_sex, "sex"),
02361     TQualPair(CSeqFeatData::eQual_specimen_voucher, "specimen_voucher"),
02362     TQualPair(CSeqFeatData::eQual_standard_name, "standard_name"),
02363     TQualPair(CSeqFeatData::eQual_strain, "strain"),
02364     TQualPair(CSeqFeatData::eQual_sub_clone, "sub_clone"),
02365     TQualPair(CSeqFeatData::eQual_sub_species, "sub_species"),
02366     TQualPair(CSeqFeatData::eQual_sub_strain, "sub_strain"),
02367     TQualPair(CSeqFeatData::eQual_tag_peptide, "tag_peptide"),
02368     TQualPair(CSeqFeatData::eQual_tissue_lib, "tissue_lib"),
02369     TQualPair(CSeqFeatData::eQual_tissue_type, "tissue_type"),
02370     TQualPair(CSeqFeatData::eQual_trans_splicing, "trans_splicing"),
02371     TQualPair(CSeqFeatData::eQual_transcript_id, "transcript_id"),
02372     TQualPair(CSeqFeatData::eQual_transgenic, "transgenic"),
02373     TQualPair(CSeqFeatData::eQual_translation, "translation"),
02374     TQualPair(CSeqFeatData::eQual_transl_except, "transl_except"),
02375     TQualPair(CSeqFeatData::eQual_transl_table, "transl_table"),
02376     TQualPair(CSeqFeatData::eQual_transposon, "transposon"),
02377     TQualPair(CSeqFeatData::eQual_usedin, "usedin"),
02378     TQualPair(CSeqFeatData::eQual_variety, "variety"),
02379     TQualPair(CSeqFeatData::eQual_virion, "virion")
02380 };
02381 
02382 typedef CStaticArrayMap<CSeqFeatData::EQualifier, string> TQualsMap;
02383 DEFINE_STATIC_ARRAY_MAP(TQualsMap, sc_QualPairs, kQualPairs);
02384 
02385 const string& CSeqFeatData::GetQualifierAsString(EQualifier qual)
02386 {
02387     TQualsMap::const_iterator iter = sc_QualPairs.find(qual);
02388     return (iter != sc_QualPairs.end()) ? iter->second : kEmptyStr;
02389 }
02390 
02391 
02392 const CSeqFeatData::EQualifier CSeqFeatData::GetQualifierType(const string& qual)
02393 {
02394     CSeqFeatData::EQualifier type = CSeqFeatData::eQual_bad;;
02395 
02396     TQualsMap::const_iterator iter = sc_QualPairs.begin();
02397     while (iter != sc_QualPairs.end() && !NStr::Equal(qual, iter->second)) {
02398         ++iter;
02399     }
02400     if (iter != sc_QualPairs.end()) {
02401         type = iter->first;
02402     }
02403 
02404     return type;
02405 }
02406 
02407 
02408 /////////////////// end of CSeqFeatData methods
02409 
02410 
02411 const CFeatList* CSeqFeatData::GetFeatList()
02412 {
02413     static auto_ptr<CFeatList> theFeatList;
02414 
02415     if ( !theFeatList.get() ) {
02416         DEFINE_STATIC_MUTEX(s_Mutex);
02417         CMutexGuard LOCK(s_Mutex);
02418         if ( !theFeatList.get() ) {
02419             theFeatList.reset(new CFeatList());
02420         }
02421     }
02422     return theFeatList.get();
02423 }
02424 
02425 const CBondList* CSeqFeatData::GetBondList()
02426 {
02427     static auto_ptr<CBondList> theBondList;
02428 
02429     if ( !theBondList.get() ) {
02430         DEFINE_STATIC_MUTEX(s_Mutex);
02431         CMutexGuard LOCK(s_Mutex);
02432         if ( !theBondList.get() ) {
02433             theBondList.reset(new CBondList());
02434         }
02435     }
02436     return theBondList.get();
02437 }
02438 
02439 
02440 const CSiteList* CSeqFeatData::GetSiteList()
02441 {
02442     static auto_ptr<CSiteList> theSiteList;
02443 
02444     if ( !theSiteList.get() ) {
02445         DEFINE_STATIC_MUTEX(s_Mutex);
02446         CMutexGuard LOCK(s_Mutex);
02447         if ( !theSiteList.get() ) {
02448             theSiteList.reset(new CSiteList());
02449         }
02450     }
02451     return theSiteList.get();
02452 }
02453 
02454 
02455 //////////////////////////////////////////////////////////////////////////////
02456 
02457 static CFeatListItem sc_ConfigItemInit[] = {
02458     CFeatListItem( CSeqFeatData::e_not_set,  CSeqFeatData::eSubtype_any,   "All",  "Master" ),
02459     CFeatListItem( CSeqFeatData::e_Gene,     CSeqFeatData::eSubtype_gene,  "Gene", "Gene" ),
02460     CFeatListItem( CSeqFeatData::e_Org,      CSeqFeatData::eSubtype_org,   "Org",  "Org" ),
02461     CFeatListItem( CSeqFeatData::e_Cdregion, CSeqFeatData::eSubtype_cdregion,  "CDS",  "CDS" ),
02462 
02463     CFeatListItem( CSeqFeatData::e_Prot,     CSeqFeatData::eSubtype_any,   "Protein, All",  "Prot Master" ),
02464     CFeatListItem( CSeqFeatData::e_Prot,     CSeqFeatData::eSubtype_prot,  "Protein", "Prot" ),
02465     CFeatListItem( CSeqFeatData::e_Prot,     CSeqFeatData::eSubtype_preprotein,    "PreProtein", "PreProtein" ),
02466     CFeatListItem( CSeqFeatData::e_Prot,     CSeqFeatData::eSubtype_mat_peptide_aa,    "Mature Peptide AA", "Mat-Peptide AA" ),
02467     CFeatListItem( CSeqFeatData::e_Prot,     CSeqFeatData::eSubtype_sig_peptide_aa,    "Signal Peptide AA", "Sig-Peptide AA" ),
02468     CFeatListItem( CSeqFeatData::e_Prot,     CSeqFeatData::eSubtype_transit_peptide_aa,    "Transit Peptide AA", "Transit-Peptide AA" ),
02469 
02470     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_any,   "RNA, All" , "RNA Master" ),
02471     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_preRNA,  "precursor_RNA",   "precursor_RNA" ),
02472     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_mRNA,  "mRNA", "mRNA" ),
02473     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_tRNA,  "tRNA", "tRNA" ),
02474     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_rRNA,  "rRNA", "rRNA" ),
02475     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_snRNA,  "snRNA", "snRNA" ),
02476     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_scRNA,  "scRNA", "scRNA" ),
02477     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_snoRNA,  "sno_RNA", "sno_RNA" ),
02478     CFeatListItem( CSeqFeatData::e_Rna,     CSeqFeatData::eSubtype_otherRNA,  "misc_RNA",  "misc_RNA" ),
02479 
02480     CFeatListItem( CSeqFeatData::e_Pub,     CSeqFeatData::eSubtype_pub,   "Pub", "Pub" ),
02481     CFeatListItem( CSeqFeatData::e_Seq,     CSeqFeatData::eSubtype_seq,   "Seq", "Seq" ),
02482 
02483     CFeatListItem( CSeqFeatData::e_Imp,      CSeqFeatData::eSubtype_any,   "Import All", "Import Master" ),
02484 
02485     CFeatListItem( CSeqFeatData::e_Region,   CSeqFeatData::eSubtype_region,    "region",     "region" ),
02486     CFeatListItem( CSeqFeatData::e_Comment,  CSeqFeatData::eSubtype_comment,    "comment",     "comment" ),
02487     CFeatListItem( CSeqFeatData::e_Bond,     CSeqFeatData::eSubtype_bond,    "bond",     "bond" ),
02488     CFeatListItem( CSeqFeatData::e_Site,     CSeqFeatData::eSubtype_site,    "site",     "site" ),
02489     CFeatListItem( CSeqFeatData::e_Rsite,    CSeqFeatData::eSubtype_rsite,    "rsite",     "rsite" ),
02490     CFeatListItem( CSeqFeatData::e_User,     CSeqFeatData::eSubtype_user,    "user",     "user" ),
02491     CFeatListItem( CSeqFeatData::e_Txinit,   CSeqFeatData::eSubtype_txinit,    "txinit",     "txinit" ),
02492     CFeatListItem( CSeqFeatData::e_Num,      CSeqFeatData::eSubtype_num,    "num",     "num" ),
02493     CFeatListItem( CSeqFeatData::e_Psec_str, CSeqFeatData::eSubtype_psec_str,    "psec_str",     "psec_str" ),
02494     CFeatListItem( CSeqFeatData::e_Non_std_residue,     CSeqFeatData::eSubtype_non_std_residue,    "non_std_residue",     "non_std_residue" ),
02495     CFeatListItem( CSeqFeatData::e_Het,      CSeqFeatData::eSubtype_het,    "het",     "het" ),
02496     CFeatListItem( CSeqFeatData::e_Biosrc,   CSeqFeatData::eSubtype_biosrc,    "biosrc",     "biosrc" ),
02497 };
02498 
02499 
02500 /**
02501     CFeatListItem comparator
02502     to sort the set properly.
02503 */
02504 bool CFeatListItem::operator<(const CFeatListItem& rhs) const
02505 {
02506     if (m_Type == rhs.m_Type) {
02507         // the 'Any' subtype should sort lower than anything else in that type.
02508         if (m_Subtype == CSeqFeatData::eSubtype_any) {
02509             return rhs.m_Subtype != CSeqFeatData::eSubtype_any;
02510         }
02511         if ( rhs.m_Subtype == CSeqFeatData::eSubtype_any) {
02512             return false;
02513         }
02514         return m_Subtype < rhs.m_Subtype;
02515     }
02516     return m_Type < rhs.m_Type;
02517 }
02518 
02519 
02520 /*****
02521     CFeatList definitions.
02522 *****/
02523 
02524 CFeatList::CFeatList()
02525 {
02526     x_Init();
02527 }
02528 
02529 
02530 CFeatList::~CFeatList()
02531 {
02532 }
02533 
02534 bool CFeatList::TypeValid(int type, int subtype) const
02535 {
02536     const_iterator ci_it = m_FeatTypes.find(CFeatListItem(type, subtype, "", ""));
02537     if (ci_it == m_FeatTypes.end()) {
02538         return false;
02539     }
02540     return true;
02541 }
02542 
02543 
02544 bool CFeatList::GetItem(int type, int subtype, CFeatListItem& config_item) const
02545 {
02546     const_iterator ci_it = m_FeatTypes.find(CFeatListItem(type, subtype, "", ""));
02547     if (ci_it == m_FeatTypes.end()) {
02548         return false;
02549     }
02550     config_item = *ci_it;
02551     return true;
02552 }
02553 
02554 
02555 bool CFeatList::GetItemBySubtype(int subtype,  CFeatListItem& config_item) const
02556 {
02557     TSubtypeMap::const_iterator fm_it = m_FeatTypeMap.find(subtype);
02558     if (fm_it == m_FeatTypeMap.end()) {
02559         return false;
02560     }
02561     config_item = fm_it->second;
02562     return true;
02563 }
02564 
02565 
02566 bool CFeatList::GetItemByDescription(const string& desc, CFeatListItem& config_item) const
02567 {
02568     const_iterator ci_it = begin();
02569     for (; ci_it != end(); ++ci_it) {
02570         if (NStr::EqualNocase(ci_it->GetDescription(), desc)) {
02571             config_item = *ci_it;
02572             return true;
02573         }
02574     }
02575     return false;
02576 }
02577 
02578 
02579 bool CFeatList::GetTypeSubType(const string& desc, int& type, int& subtype) const
02580 {
02581     CFeatListItem config_item;
02582     if ( GetItemByDescription(desc, config_item) ) {
02583         type = config_item.GetType();
02584         subtype = config_item.GetSubtype();
02585         return true;
02586     }
02587     return false;
02588 }
02589 
02590 bool CFeatList::GetItemByKey(const string& key, CFeatListItem& config_item) const
02591 {
02592     const_iterator ci_it = begin();
02593     for (; ci_it != end(); ++ci_it) {
02594         if (ci_it->GetStoragekey() == key) {
02595             config_item = *ci_it;
02596             return true;
02597         }
02598     }
02599     return false;
02600 }
02601 
02602 
02603 string CFeatList::GetDescription(int type, int subtype) const
02604 {
02605     CFeatListItem config_item;
02606     if (!GetItem(type, subtype, config_item)) {
02607         return kEmptyStr;
02608     }
02609     return config_item.GetDescription();
02610 }
02611 
02612 
02613 string CFeatList::GetStoragekey(int type, int subtype) const
02614 {
02615     CFeatListItem config_item;
02616     if (!GetItem(type, subtype, config_item)) {
02617         return kEmptyStr;
02618     }
02619     return config_item.GetStoragekey();
02620 }
02621 
02622 
02623 string CFeatList::GetStoragekey(int subtype) const
02624 {
02625     CFeatListItem config_item;
02626     if (!GetItemBySubtype(subtype, config_item)) {
02627         return kEmptyStr;
02628     }
02629     return config_item.GetStoragekey();
02630 }
02631 
02632 
02633 vector<string> CFeatList::GetStoragekeys(int subtype) const
02634 {
02635     vector<string> keys;
02636     keys.push_back(GetStoragekey(CSeqFeatData::e_not_set, CSeqFeatData::eSubtype_any));
02637     if (subtype != CSeqFeatData::eSubtype_any) {
02638         CFeatListItem item;
02639         if (GetItemBySubtype(subtype, item)) {
02640             CFeatListItem sub_master_item;
02641             if (GetItem(item.GetType(), CSeqFeatData::eSubtype_any, sub_master_item)) {
02642                 keys.push_back(sub_master_item.GetStoragekey());
02643             }
02644             keys.push_back(item.GetStoragekey());
02645         }
02646     }
02647 
02648     return keys;
02649 }
02650 
02651 void CFeatList::x_Init()
02652 {
02653     size_t  config_item_size = sizeof(sc_ConfigItemInit)/sizeof(CFeatListItem);
02654     for (size_t i = 0; i < config_item_size; ++i ) {
02655         bool feat_items_init_no_dups =
02656            m_FeatTypes.insert(sc_ConfigItemInit[i]).second;
02657         _VERIFY(feat_items_init_no_dups);
02658     }
02659     
02660     for (const SImportEntry* iep = kImportTable; iep < kImportTableEnd; ++iep) {
02661         CFeatListItem item(CSeqFeatData::GetTypeFromSubtype(iep->m_Subtype), 
02662                            iep->m_Subtype, iep->m_Name, iep->m_Name);
02663         bool import_items_init_no_dups =
02664             m_FeatTypes.insert(item).second;
02665         _VERIFY(import_items_init_no_dups);
02666     }
02667 
02668     ITERATE(CFeatList, it, m_FeatTypes) {
02669         const CFeatListItem& item = *it;
02670         int subtype = item.GetSubtype();
02671         if (subtype != CSeqFeatData::eSubtype_any  ||  item.GetType() == CSeqFeatData::e_not_set) {
02672             // only enter the main Master item, no other master items.
02673             // else subtypes are not unique.
02674             m_FeatTypeMap[subtype] = item;
02675         }
02676     }
02677 }
02678 
02679 
02680 /// return a list of all the feature descriptions for a menu or other control.
02681 void CFeatList::GetDescriptions(vector<string> &descs, bool hierarchical) const
02682 {
02683     descs.clear();
02684 
02685 
02686     ITERATE (TFeatTypeContainer, iter, m_FeatTypes) {
02687         string  this_desc = iter->GetDescription();
02688 
02689         if (hierarchical) {
02690             string parent_desc;
02691             if (iter->GetSubtype() != CSeqFeatData::eSubtype_any) {
02692                 parent_desc = GetDescription(iter->GetType(), CSeqFeatData::eSubtype_any);
02693             } else if (iter->GetType() != CSeqFeatData::e_not_set) {
02694                 parent_desc = this_desc;
02695             }
02696 
02697             if ( ! parent_desc.empty()) {
02698                 this_desc = parent_desc + "/" + this_desc;
02699             }
02700         }
02701 
02702         descs.push_back(this_desc);
02703     }
02704 }
02705 
02706 string x_SpaceToDash(string str1)
02707 {
02708     string::size_type pos = 0;
02709     while ((pos = NStr::Find(str1, " ", pos)) != NCBI_NS_STD::string::npos) {
02710         str1[pos] = '-';
02711     }
02712     return str1;
02713 }
02714 
02715 /////////////////////////////////////////////////////////////////////////////
02716 
02717 static const CBondList::TBondKey bond_key_to_subtype [] = {
02718     CBondList::TBondKey ( "disulfide",  CSeqFeatData::eBond_disulfide  ),
02719     CBondList::TBondKey ( "other",      CSeqFeatData::eBond_other      ),
02720     CBondList::TBondKey ( "thioether",  CSeqFeatData::eBond_thioether  ),
02721     CBondList::TBondKey ( "thiolester", CSeqFeatData::eBond_thiolester ),
02722     CBondList::TBondKey ( "xlink",      CSeqFeatData::eBond_xlink      )
02723 };
02724 DEFINE_CLASS_STATIC_ARRAY_MAP(CBondList::TBondMap, CBondList::sm_BondKeys, bond_key_to_subtype);
02725 
02726 CBondList::CBondList()
02727 {
02728 }
02729 
02730 
02731 CBondList::~CBondList()
02732 {
02733 }
02734 
02735 
02736 bool CBondList::IsBondName(string str) const
02737 {
02738     const_iterator ci_it = sm_BondKeys.find (x_SpaceToDash(str).c_str());
02739     if (ci_it != sm_BondKeys.end ()) {
02740         return true;
02741     } else {
02742         return false;
02743     }
02744 }
02745 
02746 
02747 bool CBondList::IsBondName (string str, CSeqFeatData::EBond& bond_type) const
02748 {
02749     const_iterator ci_it = sm_BondKeys.find (x_SpaceToDash(str).c_str());
02750     if (ci_it != sm_BondKeys.end ()) {
02751         bond_type = ci_it->second;
02752         return true;
02753     } else {
02754         return false;
02755     }
02756 }
02757 
02758 
02759 CSeqFeatData::EBond CBondList::GetBondType(string str) const
02760 {
02761     const_iterator ci_it = sm_BondKeys.find (x_SpaceToDash(str).c_str());
02762     if (ci_it == sm_BondKeys.end()) {
02763         NCBI_THROW(CException, eUnknown, "Not a valid bond type!");
02764     } else {
02765         return ci_it->second;
02766     }
02767 }
02768 /////////////////////////////////////////////////////////////////////////////
02769 
02770 static const CSiteList::TSiteKey site_key_to_subtype [] = {
02771     CSiteList::TSiteKey ( "acetylation",                 CSeqFeatData::eSite_acetylation                 ),
02772     CSiteList::TSiteKey ( "active",                      CSeqFeatData::eSite_active                      ),
02773     CSiteList::TSiteKey ( "amidation",                   CSeqFeatData::eSite_amidation                   ),
02774     CSiteList::TSiteKey ( "binding",                     CSeqFeatData::eSite_binding                     ),
02775     CSiteList::TSiteKey ( "blocked",                     CSeqFeatData::eSite_blocked                     ),
02776     CSiteList::TSiteKey ( "cleavage",                    CSeqFeatData::eSite_cleavage                    ),
02777     CSiteList::TSiteKey ( "DNA binding",                 CSeqFeatData::eSite_dna_binding                 ),
02778     CSiteList::TSiteKey ( "gamma carboxyglutamic acid",  CSeqFeatData::eSite_gamma_carboxyglutamic_acid  ),
02779     CSiteList::TSiteKey ( "glycosylation",               CSeqFeatData::eSite_glycosylation               ),
02780     CSiteList::TSiteKey ( "hydroxylation",               CSeqFeatData::eSite_hydroxylation               ),
02781     CSiteList::TSiteKey ( "inhibit",                     CSeqFeatData::eSite_inhibit                     ),
02782     CSiteList::TSiteKey ( "lipid binding",               CSeqFeatData::eSite_lipid_binding               ),
02783     CSiteList::TSiteKey ( "metal binding",               CSeqFeatData::eSite_metal_binding               ),
02784     CSiteList::TSiteKey ( "methylation",                 CSeqFeatData::eSite_methylation                 ),
02785     CSiteList::TSiteKey ( "modified",                    CSeqFeatData::eSite_modified                    ),
02786     CSiteList::TSiteKey ( "mutagenized",                 CSeqFeatData::eSite_mutagenized                 ),
02787     CSiteList::TSiteKey ( "myristoylation",              CSeqFeatData::eSite_myristoylation              ),
02788     CSiteList::TSiteKey ( "nitrosylation",               CSeqFeatData::eSite_nitrosylation               ),
02789     CSiteList::TSiteKey ( "np binding",                  CSeqFeatData::eSite_np_binding                  ),
02790     CSiteList::TSiteKey ( "other",                       CSeqFeatData::eSite_other                       ),
02791     CSiteList::TSiteKey ( "oxidative deamination",       CSeqFeatData::eSite_oxidative_deamination       ),
02792     CSiteList::TSiteKey ( "phosphorylation",             CSeqFeatData::eSite_phosphorylation             ),
02793     CSiteList::TSiteKey ( "pyrrolidone carboxylic acid", CSeqFeatData::eSite_pyrrolidone_carboxylic_acid ),
02794     CSiteList::TSiteKey ( "signal peptide",              CSeqFeatData::eSite_signal_peptide              ),
02795     CSiteList::TSiteKey ( "sulfatation",                 CSeqFeatData::eSite_sulfatation                 ),
02796     CSiteList::TSiteKey ( "transit peptide",             CSeqFeatData::eSite_transit_peptide             ),
02797     CSiteList::TSiteKey ( "transmembrane region",        CSeqFeatData::eSite_transmembrane_region        ),
02798     CSiteList::TSiteKey ( "unclassified",                CSeqFeatData::eSite_other                       ),
02799 };
02800 
02801 DEFINE_CLASS_STATIC_ARRAY_MAP(CSiteList::TSiteMap, CSiteList::sm_SiteKeys, site_key_to_subtype);
02802 
02803 CSiteList::CSiteList()
02804 {
02805 }
02806 
02807 
02808 CSiteList::~CSiteList()
02809 {
02810 }
02811 
02812 
02813 bool CSiteList::IsSiteName(string str) const
02814 {
02815     const_iterator ci_it = sm_SiteKeys.find (x_SpaceToDash(str).c_str());
02816     if (ci_it != sm_SiteKeys.end ()) {
02817         return true;
02818     } else {
02819         return false;
02820     }
02821 }
02822 
02823 
02824 bool CSiteList::IsSiteName (string str, CSeqFeatData::ESite& site_type) const
02825 {
02826     const_iterator ci_it = sm_SiteKeys.find (x_SpaceToDash(str).c_str());
02827     if (ci_it != sm_SiteKeys.end ()) {
02828         site_type = ci_it->second;
02829         return true;
02830     } else {
02831         return false;
02832     }
02833 }
02834 
02835 
02836 CSeqFeatData::ESite CSiteList::GetSiteType(string str) const
02837 {
02838     const_iterator ci_it = sm_SiteKeys.find (x_SpaceToDash(str).c_str());
02839     if (ci_it == sm_SiteKeys.end()) {
02840         NCBI_THROW(CException, eUnknown, "Not a valid site type!");
02841     } else {
02842         return ci_it->second;
02843     }
02844 }
02845 
02846 
02847 END_objects_SCOPE // namespace ncbi::objects::
02848 
02849 END_NCBI_SCOPE
02850 
02851 /* Original file checksum: lines: 61, chars: 1894, CRC32: 86fb976 */
02852 
02853 

Generated on Sun Dec 6 22:38:48 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:21:09 2009 by modify_doxy.py rev. 173732