135 int textComparison = 0;
141 const SIZE_TYPE min_length =
min( str1.length(), str2.length() );
142 for( ; pos < min_length; ++pos ) {
144 if( textComparison != 0 ) {
148 if( 0 == textComparison ) {
150 textComparison = str1.length() - str2.length();
154 if( textComparison < 0 ) {
156 }
else if( textComparison > 0 ) {
166 }
else if( 0 == pmid2 ) {
169 return pmid1 < pmid2;
178 return id.IsGenbank() ||
id.IsEmbl() ||
id.IsDdbj() ||
179 id.IsOther() ||
id.IsPatent() ||
180 id.IsTpg() ||
id.IsTpe() ||
id.IsTpd() ||
186 const string &s1,
const string &s2,
189 if( s1.empty() || s2.empty() ) {
190 return s1.empty() && s2.empty();
194 size_t s1_len = s1.length();
195 if( s1[s1_len-1] ==
'.' ) {
198 size_t s2_len = s2.length();
199 if( s2[s2_len-1] ==
'.' ) {
203 if( s1_len != s2_len ) {
209 for(
size_t ii = 0; ii < s1_len ; ++ii ) {
223 if ( !
ctx.Config().CheckCDSProductId() ) {
231 if ( !pseudo && !
ctx.IsEMBL() && !
ctx.IsDDBJ() ) {
242 if (! pseudo && grp) {
247 bool just_stop =
false;
255 if ( pseudo || just_stop ) {
274 if (tsip && tsip->IsSetAccession() &&
282 if (
ctx.Config().IsModeRelease()) {
293 if (tsip && tsip->IsSetAccession() &&
303 "rearrangement required for product") !=
NPOS) {
317 if ((*it)->Matches(feat.
GetCit())) {
346 if (
ctx.IsRefSeq() &&
368 (!gene.
GetSyn().empty() && !gene.
GetSyn().front().empty()) ) {
400 return ! feat.
GetNamedQual(
"estimated_length").empty() &&
597 return( !
isdigit(ch) && ch !=
'.' && ch !=
'-' );
610 if ( ec_number.empty() )
return false;
612 bool is_ambig =
false;
617 ITERATE(
string, ec_iter, ec_number ) {
620 if (is_ambig)
return false;
621 }
else if (*ec_iter ==
'-' ) {
624 }
else if( *ec_iter ==
'n') {
625 string::const_iterator ec_iter_next = ec_iter;
627 if( ec_iter_next != ec_number.end() && numperiods == 3 && numdigits == 0 &&
isdigit(*ec_iter_next) ) {
633 }
else if (*ec_iter ==
'.') {
635 if (numdigits > 0 && numdashes > 0)
return false;
636 if (numdigits == 0 && numdashes == 0)
return false;
637 if (numdashes > 1)
return false;
643 if (numperiods == 3) {
644 if (numdigits > 0 && numdashes > 0)
return false;
645 if (numdigits > 0 || numdashes == 1)
return true;
654 static const string kOther =
"unclassified";
667 bool hasSubstantiveNote =
false;
669 const string::size_type original_length = note.length();
673 const string& qual = (*it)->GetValue();
676 if ( !note.empty() ) {
677 prefix = punctuation;
678 const string& next_prefix = (*it)->GetPrefix();
680 prefix += next_prefix;
684 if( !qual.empty() && qual !=
"." ) {
685 hasSubstantiveNote =
true;
690 const bool noRedundancyThisIteration =
692 JoinString(note, prefix, qual, noRedundancyThisIteration );
694 addPeriod = (*it)->GetAddPeriod();
695 punctuation = (*it)->GetSuffix();
699 if( ! hasSubstantiveNote ) {
700 note.resize( original_length );
711 if (!noteStr.empty()) {
721 flatFeature.
SetQuals().push_back(note);
728 int total_length = 0;
730 total_length += loc_iter.GetRange().GetLength();
751 int best_overlap = 0;
753 for (
CFeat_CI it(seq, sel); it; ++it) {
766 if ( best_overlap < current_overlap ) {
768 best_overlap = current_overlap;
769 best_processed = current_processed;
772 }
else if ( (best_overlap == current_overlap) && (best_processed > current_processed) ) {
774 best_processed = current_processed;
796 if (
ctx.Config().IsFormatFTable() ) {
812 const string& imploc = imp.
GetLoc();
813 if ( imploc.find(
'<') !=
NPOS || imploc.find(
'>') !=
NPOS ) {
819 const CSeq_loc&
l = it.GetEmbeddingSeq_loc();
820 switch (
l.Which() ) {
823 if (
l.GetPnt().IsSetFuzz() ) {
832 if (
l.GetPacked_pnt().IsSetFuzz() ) {
842 if (
l.GetInt().IsSetFuzz_from() ) {
845 if ( !fuzz &&
l.GetInt().IsSetFuzz_to() ) {
876 if( !
str.empty() ) {
890 if( string_to_split.empty() ) {
895 if( string_to_split[0] !=
'(' ) {
896 output_vec.push_back( string_to_split );
903 size_t amount_to_chop_off_end = 0;
904 if( string_to_split[string_to_split.length() - 1] ==
')' ) {
905 amount_to_chop_off_end = 1;
908 NStr::Split( string_to_split.substr( 1, string_to_split.length() - amount_to_chop_off_end - 1),
",", output_vec, 0 );
925 case objects::CFlatFileConfig::eMode_Release:
926 case objects::CFlatFileConfig::eMode_Entrez:
927 return sc_ValidPseudoGeneText.find(
text.c_str()) != sc_ValidPseudoGeneText.end();
929 return !
text.empty();
934 "annotated by transcript or proteomic data",
935 "rearrangement required for product",
936 "reasons given in citation",
944 return sc_LegalExceptText.find(
text.c_str()) != sc_LegalExceptText.end();
949 "adjusted for low-quality genome",
950 "alternative processing",
951 "alternative start codon",
952 "artificial frameshift",
954 "mismatches in transcription",
955 "mismatches in translation",
956 "modified codon recognition",
957 "nonconsensus splice site",
958 "transcribed product replaced",
959 "transcribed pseudogene",
960 "translated product replaced",
961 "unclassified transcription discrepancy",
962 "unclassified translation discrepancy",
963 "unextendable partial coding region"
970 return sc_LegalRefSeqExceptText.find(
text.c_str()) != sc_LegalRefSeqExceptText.end();
980 bool suppressAccession) :
981 CFlatItem(&
ctx), m_Feat(feat), m_Feat_Tree(ftree), m_Loc(loc ? loc :
982 (feat ? &feat.GetLocation() :
nullptr)),
983 m_SuppressAccession(suppressAccession)
1028 switch ( subtype ) {
1039 switch ( subtype ) {
1048 if ( !
ctx.IsRefSeq() ) {
1049 return "misc_feature";
1057 return "misc_feature";
1073 switch ( subtype ) {
1086 return "regulatory";
1103 bool suppressAccession,
1134 if ( !
ctx.Config().HideUnclassPartial() ) {
1170 const string& operon_name = operon->
GetNamedQual(
"operon" );
1171 if ( !operon_name.empty() ) {
1186 switch ( subtype ) {
1244 if (
ctx.Config().DropIllegalQuals() &&
1290 string precursor_comment;
1299 if( best_prot_feat && best_prot_feat.
IsSetComment() ) {
1300 precursor_comment = best_prot_feat.
GetComment() ;
1310 if ( ! comment.empty() && comment !=
"~" && comment != precursor_comment) {
1318 seqfeat_note->SetAddPeriod();
1325 if( !
ctx.ShowAnnotCommentAsCOMMENT() ) {
1329 if ((*it)->IsComment()) {
1330 const string & comment = (*it)->GetComment();
1332 const static string ktRNAscanSE =
"tRNA features were annotated by tRNAscan-SE";
1340 string comm = comment;
1376 switch(
data.GetSubtype() ) {
1406 string raw_exception;
1412 if ( raw_exception ==
"" ) {
1416 const bool bIsRefseq =
ctx.IsRefSeq();
1418 const bool bIsRelaxed = ((!
ctx.Config().IsModeRelease()) && (!
ctx.Config().IsModeEntrez()));
1420 list<string> exceptions;
1423 list<string> output_exceptions;
1424 list<string> output_notes;
1425 ITERATE( list<string>, it, exceptions ) {
1437 if( bIsRefseq || bIsRelaxed ||
data.IsCdregion() ) {
1438 output_exceptions.push_back( cur );
1440 output_notes.push_back( cur );
1445 if( bIsRefseq || bIsRelaxed ) {
1446 output_exceptions.push_back( cur );
1448 output_notes.push_back( cur );
1453 if(
data.IsCdregion() ) {
1456 output_notes.push_back( cur );
1464 output_notes.push_back( cur );
1469 if(
data.IsRna() ||
data.IsCdregion() ) {
1472 output_notes.push_back( cur );
1476 const bool is_cds_or_mrna = (
data.IsCdregion() ||
1479 if( is_cds_or_mrna ) {
1482 output_notes.push_back( cur );
1489 if( is_cds_or_mrna ) {
1492 output_notes.push_back( cur );
1498 output_exceptions.push_back( cur );
1501 output_notes.push_back( cur );
1505 if ( ! output_exceptions.empty() ) {
1506 string exception =
NStr::Join( output_exceptions,
", " );
1509 if ( ! output_notes.empty() ) {
1510 string note =
NStr::Join( output_notes,
", " );
1537 if ( ! gene_ref && gene_feat ) {
1539 if (gene_ref && gene_ref->
IsSetDb()) {
1558 if ( ! gene_feat ) {
1562 if (
ctx.IsProt() ) {
1572 for (
size_t iPos = 0; iPos < quals.size(); ++iPos ) {
1577 if ( qual->
GetQual() ==
"old_locus_tag" ) {
1594 bool pseudo = m_Feat.IsSetPseudo() ? m_Feat.GetPseudo() :
false;
1599 if ( gene_feat && gene_feat->IsSetPseudo() && gene_feat->GetPseudo() ) {
1601 const CGene_ref* altref = &gene_feat->GetData().GetGene();
1606 if ( gene_ref && gene_ref->IsSetPseudo() && gene_ref->GetPseudo() ) {
1611 if (
data.GetGene().IsSetPseudo() &&
data.GetGene().GetPseudo() ) {
1616 if (
data.GetRna().IsSetPseudo() &&
data.GetRna().GetPseudo() ) {
1637 bool is_not_genbank =
false;
1640 const CSeq_id&
id = **id_iter;
1642 switch (
id.Which() ) {
1647 is_not_genbank =
true;
1658 const CGene_ref* feat_gene_xref =
nullptr;
1660 if (! feat_gene_xref && parentFeatureItem) {
1661 feat_gene_xref = parentFeatureItem->GetFeat().GetGeneXref();
1663 bool suppressed =
false;
1665 const bool gene_forbidden_if_genbank =
1673 (is_not_genbank || ! gene_forbidden_if_genbank)) {
1674 if (feat_gene_xref) {
1680 if (feat_gene_xref && ! suppressed) {
1685 if (parentFeatureItem) {
1709 gene_ref = feat_gene_xref;
1717 gene_ref = feat_gene_xref;
1721 gene_ref = feat_gene_xref;
1727 gene_ref = feat_gene_xref;
1731 gene_ref = feat_gene_xref;
1733 }
else if ((! feat_gene_xref || ! suppressed) &&
1736 bool is_mapped =
false;
1737 if (parentFeatureItem) {
1748 if ( feat_gene_xref ) {
1749 gene_ref = feat_gene_xref;
1767 parent_feat_handle = parentFeatureItem->GetFeat();
1769 gene_feat, parent_feat_handle );
1785 ftree->AddGenesForFeat(
m_Feat,
ctx.GetAnnotSelector());
1796 if (ft && (! is_mapped)) {
1804 }
else if (feat_gene_xref) {
1806 gene_ref = feat_gene_xref;
1813 if (
ctx.IsEMBL() ||
ctx.IsDDBJ() ) {
1916 if (
ctx.Config().IsFormatFTable() ) {
1921 if (
ctx.UsingSeqEntryIndex() ) {
1945 bool is_not_genbank =
false;
1948 const CSeq_id&
id = **id_iter;
1950 switch (
id.Which() ) {
1955 is_not_genbank =
true;
1967 bool suppressed =
false;
1969 const bool gene_forbidden_if_genbank =
1977 (is_not_genbank || ! gene_forbidden_if_genbank)) {
1978 if (feat_gene_xref) {
1983 if (feat_gene_xref && ! suppressed &&
1985 gene_ref = feat_gene_xref;
1986 }
else if ((! feat_gene_xref || ! suppressed) &&
1989 bool is_mapped =
false;
2012 if( parentFeatureItem ) {
2013 parent_feat_handle = parentFeatureItem->GetFeat();
2015 gene_feat, parent_feat_handle );
2144 vector<char>
n(1,
static_cast<char>(aa));
2213 switch ( rna_type ) {
2219 string transcription;
2223 if (
rna.IsSetExt()) {
2225 switch (ext.
Which()) {
2248 const string& aa_str =
s_AaName(aa);
2249 string amino_acid_str = aa_str;
2251 if ( !aa_str.empty() ) {
2252 const string& ac_str = aa_str;
2255 if (!gbqual->IsSetQual() || !gbqual->IsSetVal())
continue;
2258 amino_acid_str =
"tRNA-fMet";
2261 amino_acid_str =
"tRNA-iMet";
2266 if (!gbqual->IsSetQual() || !gbqual->IsSetVal())
continue;
2269 amino_acid_str =
"tRNA-Ile2";
2277 ac_str.substr(5,
NPOS)));
2281 const string& comment =
2300 string transcription;
2307 switch ( subtype ) {
2310 if ( !
rna.IsSetExt() ) {
2314 if ( ! ext.
IsGen() ) {
2320 if ( !
rna.IsSetExt() ) {
2326 const list< CRef< CRNA_qual > >& quals = ext.
GetGen().
GetQuals().Get();
2327 list< CRef< CRNA_qual > >::const_iterator it = quals.
begin();
2328 for ( ; it != quals.end(); ++it ) {
2329 if ( (*it)->IsSetQual() && (*it)->IsSetVal() ) {
2330 if ( (*it)->GetQual() ==
"tag_peptide" ) {
2343 if ( !
rna.IsSetExt() ) {
2348 string strName = ext.
GetName();
2349 if ( strName !=
"misc_RNA" ) {
2356 if (
rna.IsSetExt() &&
rna.GetExt().IsName() ) {
2364 if(
rna.IsSetExt() &&
rna.GetExt().IsGen() ) {
2366 if (
gen.IsSetClass() ) {
2367 if (
gen.IsLegalClass()) {
2402 translation,
false );
2420 translation.clear();
2439 if ( gcode == 255 ) {
2442 if (
ctx.Config().IsFormatGBSeq() ||
ctx.Config().IsFormatINSDSeq() || gcode > 1 ) {
2484 }
else if (inset == 2) {
2526 }
else if ( tr_ex.length() > 0 ) {
2538 static const string conflict_msg =
2539 "Protein sequence is in conflict with the conceptual translation";
2546 bool has_prot =
false;
2563 if (
ctx.IsProt() ) {
2573 if ( ! protHandle ) {
2595 if ( ! protHandle ) {
2729 const CSeq_id & seqid = **seqid_ci;
2732 pTheOneUsableGeneralSeqId.
Reset();
2739 static const char*
const sc_IgnoredDbs[] = {
2753 stringstream sTagStrm;
2756 sTagStrm.str().swap(sTag);
2759 if( ! sDb.empty() && ! sTag.empty() &&
2760 sc_IgnoredDbSet.find(sDb.c_str()) == sc_IgnoredDbSet.end() )
2762 if( pTheOneUsableGeneralSeqId ) {
2764 pTheOneUsableGeneralSeqId.
Reset();
2767 pTheOneUsableGeneralSeqId = *seqid_ci;
2774 const CSeq_id & seqid = **seqid_ci;
2776 switch( seqid.
Which() ) {
2782 eLastRegularChoice = seqid.
Which();
2800 if( *seqid_ci == pTheOneUsableGeneralSeqId ) {
2810 }
else if( protId ) {
2816 if ( protId->
IsGi() ) {
2817 gi = protId->
GetGi();
2845 if( ! prot_acc.empty() ) {
2878 if ( !
names.empty() ) {
2882 if (
names.size() > 1 ) {
2900 if ( !protRef || !protRef->
IsSetDesc() ) {
2904 string desc = protRef->
GetDesc();
2909 prot_desc->SetAddPeriod();
2919 if ( !protRef || protRef->
GetActivity().empty() ) {
2933 if ( !protRef || !protRef->
IsSetEc() || protRef->
GetEc().empty() ) {
2958 if (
ctx.IsEMBL() ||
ctx.IsDDBJ() ) {
2973 if ( !
ctx.GetLocation().IsWhole()) {
2974 if (bsploc.
IsInt()) {
2979 int pos = bspint.
GetTo();
3005 inset = (inset % 3);
3012 for (
auto& gbqual : cds.
GetQual()) {
3013 if (!gbqual->IsSetQual() || !gbqual->IsSetVal())
continue;
3015 tr_ex = gbqual->GetVal ();
3108 (
const_cast<CSeq_id*
>(
id.GetPointer()));
3124 switch( (*it).Which() ) {
3141 return tracker.GetBestChoice();
3172 if( id_iter->IsGi() ) {
3192 const string ®ion =
data.GetRegion();
3193 if ( region.empty() ) {
3197 if (
ctx.IsProt() &&
3206 list< CConstRef<CUser_object> > objs;
3212 back_inserter(objs));
3251 x_AddQual(eFQ_region,
3252 new CFlatStringQVal(f->GetData().GetStr()));
3280 if ( (
ctx.IsGenbankFormat() ||
ctx.Config().IsFormatGBSeq() ||
ctx.Config().IsFormatINSDSeq() ) &&
ctx.IsProt() ) {
3355 variation.GetData().GetInstance().CanGetDelta() ) {
3358 if( *delta_iter && (*delta_iter)->CanGetSeq() ) {
3373 const string::size_type max_len_allowed = seq_literal.
GetLength();
3374 if( nucleotides.size() > max_len_allowed ) {
3375 nucleotides.resize( max_len_allowed );
3391 static const string kOther =
"other";
3392 static const string kDnaBinding =
"DNA binding";
3393 static const string kInhibit =
"inhibition";
3420 if ( (
ctx.Config().IsFormatGenbank() ||
3421 ctx.Config().IsFormatGBSeq() ||
3422 ctx.Config().IsFormatINSDSeq()) &&
ctx.IsProt() ) {
3439 if ( oid ==
"ModelEvidence" ) {
3447 }
else if ( oid ==
"Process" || oid ==
"Component" || oid ==
"Function" ) {
3479 if ( oid ==
"ModelEvidence" ) {
3487 }
else if ( oid ==
"GeneOntology" ) {
3504 if ( ! ids.empty() ) {
3531 if (
label ==
"Process" ) {
3533 }
else if (
label ==
"Component" ) {
3535 }
else if (
label ==
"Function" ) {
3543 if ( (*it)->GetData().IsFields() ) {
3546 bool okay_to_add =
true;
3550 for ( ; iter !=
m_Quals.
end() && iter->first == slot; ++iter) {
3552 if( qual.
Equals(*go_val) )
3554 okay_to_add =
false;
3577 if (
label ==
"Process" ) {
3579 }
else if (
label ==
"Component" ) {
3581 }
else if (
label ==
"Function" ) {
3589 if ( (*it)->GetData().IsFields() ) {
3592 bool okay_to_add =
true;
3596 for ( ; iter !=
m_Quals.
end() && iter->first == slot; ++iter) {
3598 if( qual.
Equals(*go_val) )
3600 okay_to_add =
false;
3628 if ( ! gene_ref && gene_feat ) {
3645 &gene_ref->
GetDesc() :
nullptr;
3647 &gene_ref->
GetSyn() :
nullptr;
3648 const string* locus_tag =
3652 if (
ctx.IsProt() ) {
3660 if ( !from_overlap || okay_to_propage ) {
3664 else if (desc && okay_to_propage) {
3673 if (locus || ! locus_tag) {
3680 if ( gene_ref || okay_to_propage ) {
3686 else if (locus_tag) {
3692 if ( gene_ref || okay_to_propage ) {
3694 if (is_gene && desc) {
3695 string desc_cleaned = *desc;
3700 else if (locus_tag) {
3701 if (is_gene && desc) {
3708 if ( gene_ref || okay_to_propage ) {
3713 }
else if (locus_tag) {
3740 const bool is_type_where_allele_from_gene_forbidden_except_with_embl_or_ddbj =
3745 if ( ! is_type_where_allele_from_gene_forbidden &&
3746 ( is_embl_or_ddbj || ! is_type_where_allele_from_gene_forbidden_except_with_embl_or_ddbj ) )
3768 for (CSeq_feat::TDbxref::iterator
i = xrefs.begin();
3769 i != xrefs.end(); ++
i) {
3770 if ((*i)->Equals(**it)) {
3796 const string & strPseudoGene = gene_feat->
GetNamedQual(
"pseudogene");
3819 if (
names.size() > 1) {
3824 if ( !
ctx.IsProt() ) {
3830 prot_desc->SetAddPeriod();
3861 if (
ctx.IsRefSeq() || !
ctx.Config().ForGBRelease() ) {
3870 if ( !pseudo && (
ctx.Config().ShowPeptides() ||
ctx.Config().IsFormatGBSeq() ||
ctx.Config().IsFormatINSDSeq() ) ) {
3895 bool has_mat_peptide =
false;
3896 bool has_propeptide =
false;
3897 bool has_signal_peptide =
false;
3901 const bool is_pept_whole_loc = loc->
IsWhole() ||
3910 for (
CFeat_CI feat_it(
ctx.GetHandle(), sel); feat_it; ++feat_it) {
3911 bool copy_loc =
false;
3912 switch (feat_it->GetData().GetProt().GetProcessed()) {
3916 has_signal_peptide =
true;
3917 if ( (feat_it->GetLocation().GetTotalRange().GetFrom() ==
3920 loc = loc->
Subtract(feat_it->GetLocation(),
3928 has_mat_peptide =
true;
3932 has_propeptide =
true;
3946 (feat_it->GetLocation().GetTotalRange().GetTo());
3964 bool proteinIsAtLeastMature;
3968 proteinIsAtLeastMature =
false;
3971 proteinIsAtLeastMature =
true;
3975 if ( (!has_mat_peptide || !has_signal_peptide || !has_propeptide) || (proteinIsAtLeastMature) || (!is_pept_whole_loc) ) {
3996 if ( !
ctx.IsRefSeq() ) {
4002 !
ctx.IsRefSeq() && !
ctx.IsProt() &&
4027 vals.push_back(
val);
4030 list<string>::iterator it = vals.begin();
4031 while (it != vals.end()) {
4033 it = vals.erase(it);
4074 static const string kPmid(
"PMID:");
4077 out_new_val.clear();
4082 while( str_pos <
val.length() ) {
4085 const SIZE_TYPE pmid_label_pos =
val.find(
"PMID:", str_pos );
4086 if( pmid_label_pos ==
NPOS ) {
4089 copy(
val.begin() + str_pos,
val.end(), back_inserter(out_new_val) );
4094 const SIZE_TYPE first_pmid_pos = pmid_label_pos + kPmid.length();
4095 copy(
val.begin() + str_pos,
val.begin() + first_pmid_pos, back_inserter(out_new_val) );
4096 str_pos = first_pmid_pos;
4100 bool first_num =
true;
4101 while( str_pos <
val.length() ) {
4103 const SIZE_TYPE next_pmid_pos =
val.find_first_not_of(
" ,", str_pos);
4109 SIZE_TYPE end_of_pmid_pos =
val.find_first_not_of(
"0123456789", next_pmid_pos );
4110 if(
NPOS == end_of_pmid_pos ) {
4111 end_of_pmid_pos =
val.length();
4115 string pmid =
val.substr(next_pmid_pos, end_of_pmid_pos - next_pmid_pos );
4121 out_new_val +=
"<a href=\"";
4123 out_new_val += pmid;
4124 out_new_val +=
"\">";
4125 out_new_val += pmid;
4126 out_new_val +=
"</a>";
4127 str_pos = end_of_pmid_pos;
4142 static const TLegalImport kLegalImports[] = {
4144 #define DO_IMPORT(x) { #x, eFQ_##x }
4201 bool check_qual_syntax =
ctx.Config().CheckQualSyntax();
4205 bool first_pseudogene =
true;
4207 vector<string> replace_quals;
4210 if (!(*it)->IsSetQual() || !(*it)->IsSetVal()) {
4213 const string&
val = (*it)->GetVal();
4215 const char* name = (*it)->GetQual().c_str();
4216 const TLegalImportMap::const_iterator li = kLegalImportMap.find(name);
4218 if ( li != kLegalImportMap.end() ) {
4220 }
else if (check_qual_syntax) {
4254 if ((*it)->IsSetVal()) {
4261 if ((*it)->IsSetVal()) {
4278 if ((*it)->IsSetVal()) {
4293 if( ! old_locus_tag_added_elsewhere ) {
4311 if ((*it)->IsSetVal() &&
4327 const string& gene_val =
4330 const string& product_val =
4332 if (
val != gene_val &&
val != product_val) {
4333 if ( !
ctx.Config().CodonRecognizedToNote() ||
4347 if (!
ctx.Config().CheckQualSyntax() ||
4356 if (
val ==
"EXPERIMENTAL" ) {
4358 }
else if (
val ==
"NOT_EXPERIMENTAL" ) {
4371 if (string::npos == s.find_first_not_of(
"ACGTUacgtu")) {
4375 replace_quals.push_back(s);
4406 if( first_pseudogene ) {
4407 first_pseudogene =
false;
4428 if (replace_quals.size()) {
4429 std::sort(replace_quals.begin(), replace_quals.end());
4430 ITERATE (vector<string>, it, replace_quals) {
4452 const string& rpt_unit )
4455 if (rpt_unit.empty()) {
4459 vector<string> units;
4463 string tmp = rpt_unit.substr(1, rpt_unit.length() - 2);
4466 units.push_back(rpt_unit);
4480 const string& rpt_type,
4481 bool check_qual_syntax )
4484 if (rpt_type.empty()) {
4488 string value( rpt_type );
4491 vector<string> pieces;
4494 ITERATE( vector<string>, it, pieces ) {
4528 const string& recombination_class,
4529 bool check_qual_syntax
4533 if (recombination_class.empty()) {
4537 string recomb_class = recombination_class;
4554 const string& regulatory_class,
4555 bool check_qual_syntax
4559 if (regulatory_class.empty()) {
4563 string reg_class = regulatory_class;
4593 #define DO_QUAL(x) x_FormatQual(eFQ_##x, #x, qvec)
4774 #define DO_NOTE(x) x_FormatNoteQual(eFQ_##x, GetStringOfFeatQual(eFQ_##x), qvec)
4775 #define DO_NOTE_PREPEND_NEWLINE(x) x_FormatNoteQual(eFQ_##x, GetStringOfFeatQual(eFQ_##x), qvec, IFlatQVal::fPrependNewline )
4807 bool add_period =
true;
4811 if (
GetContext()->Config().GoQualsToNote()) {
4821 #undef DO_NOTE_PREPEND_NEWLINE
4832 while (it != end && it->first == slot) {
4849 while (it != end && it->first == slot) {
4864 vector<CConstRef<CFlatGoQVal> > goQuals;
4868 while (it != end && it->first == slot) {
4873 if( goQuals.empty() ) {
4884 string::size_type this_part_beginning_text_string_pos = 0;
4887 const string* pLastQualTextString =
nullptr;
4892 const string *pThisQualTextString = &(*iter)->GetTextString();
4893 if (! pThisQualTextString) {
4899 if(! pLastQualTextString || !
NStr::EqualNocase(*pLastQualTextString, *pThisQualTextString)) {
4901 if( ! combined.empty() ) {
4903 this_part_beginning_text_string_pos = combined.length() - 1;
4905 combined += temp_qvec.back()->GetValue();
4909 const string & new_value = temp_qvec.back()->GetValue();
4914 post_text_string_pos += pLastQualTextString->length();
4918 string str_to_append = new_value.substr( post_text_string_pos,
4919 (pLastQualTextString->length() - post_text_string_pos) );
4920 if(
NStr::Find(combined, str_to_append, this_part_beginning_text_string_pos) ==
NPOS ) {
4921 combined.append( str_to_append );
4925 pLastQualTextString = pThisQualTextString;
4927 pLastQualTextString =
nullptr;
4930 if( ! combined.empty() ) {
4931 const string prefix =
" ";
4932 const string suffix =
";";
4934 qvec.push_back(res);
4973 {
"insertion sequence",
false },
4974 {
"integron",
false },
4975 {
"non-LTR retrotransposon",
false },
4977 {
"retrotransposon",
false },
4978 {
"transposon",
false }
4987 if( mobile_element_type_value.empty() ) {
4992 string::size_type colon_pos = mobile_element_type_value.find(
':' );
4994 const string value_before_colon = ( string::npos == colon_pos
4995 ? mobile_element_type_value
4996 : mobile_element_type_value.substr( 0, colon_pos ) );
4999 sm_MobileElemTypeKeys.find( value_before_colon.c_str() );
5000 if( prefix_info == sm_MobileElemTypeKeys.end() ) {
5005 if( prefix_info->second ) {
5006 if( string::npos == colon_pos ) {
5033 (gene_ref && gene_ref->
IsSetSyn() && !gene_ref->
GetSyn().empty() )
5040 if (
ctx.Config().DropIllegalQuals()) {
5051 const string& gene_name = gene->
GetValue();
5057 seqfeat_note =
nullptr;
5065 prot_desc =
nullptr;
5072 CProt_ref::TName::iterator remove_start = prot_names->
SetValue().begin();
5074 CProt_ref::TName::iterator new_end =
5078 if (prot_names->
GetValue().empty()) {
5080 prot_names =
nullptr;
5086 const string& pdesc = prot_desc->
GetValue();
5090 CProt_ref::TName::iterator remove_start = prot_names->
SetValue().begin();
5092 CProt_ref::TName::iterator new_end =
5097 if (prot_names->
GetValue().empty()) {
5099 prot_names =
nullptr;
5107 prot_desc =
nullptr;
5112 if (prot_desc && standard_name) {
5117 prot_desc =
nullptr;
5123 if (prot_desc && gene_syn && cds_prod) {
5127 prot_desc =
nullptr;
5144 seqfeat_note =
nullptr;
5147 if (cds_product && seqfeat_note) {
5150 seqfeat_note =
nullptr;
5165 seqfeat_note =
nullptr;
5173 if( feat_comment ==
"tRNA-" ) {
5175 seqfeat_note =
nullptr;
5180 if (note && standard_name) {
5186 if (!
ctx.IsProt() && note && gene_syn) {
5195 if (note && prot_desc) {
5211 if(
ctx.Config().IsModeRelease() ||
ctx.Config().IsModeEntrez() ) {
5232 TQI pseudogene_iter_to_erase = pseudogene_iter;
5376 if ( it != sc_QualMap.end() ) {
5390 if ( !
data.IsLegalQualifier(qual) ) {
5401 return data.IsLegalQualifier(qual);
5470 ev =
"experimental";
5473 ev =
"not_experimental";
5480 if ( exception_text ==
"ribosomal slippage" ) {
5483 else if ( exception_text ==
"trans-splicing" ) {
5486 else if ( exception_text ==
"circular RNA" ) {
5499 if ( !
key.empty() && !
val.empty() ) {
5501 (
key ==
"protein_id" ||
5502 key ==
"orig_protein_id" ||
5503 key ==
"transcript_id" ||
5504 key ==
"orig_transcript_id"))
5514 if (
data.IsGene() ) {
5516 }
else if (
data.IsProt() ) {
5545 if ( oid ==
"GeneOntology" ) {
5551 if (
label ==
"Process" ) {
5552 name =
"GO_process";
5553 }
else if (
label ==
"Component" ) {
5554 name =
"GO_component";
5555 }
else if (
label ==
"Function" ) {
5556 name =
"GO_function";
5558 if ( name.empty() ) {
5563 if ( (*it)->GetData().IsFields() ) {
5579 const CDbtag& dbt = **it;
5583 switch ( oid.
Which() ) {
5585 if ( !oid.
GetStr().empty() ) {
5668 x_AddFTableQual(
"anticodon",
"(pos:" + pos +
",aa:" + aa +
",seq:" + seq +
")");
5685 if (
rna.IsSetExt()) {
5691 }
else if (ext.
IsTRNA()) {
5698 else if ( ext.
IsGen() ) {
5700 if (
gen.IsSetClass() ) {
5701 if (
gen.IsLegalClass()) {
5710 if (
gen.IsSetProduct() ) {
5721 !(
ctx.Config().HideGI() ||
ctx.Config().IsPolicyFtp() ||
ctx.Config().IsPolicyGenomes()));
5738 const CSeq_id* accn =
nullptr;
5740 const CSeq_id* general =
nullptr;
5744 switch ((*it)->Which()) {
5746 local = it->GetPointer();
5759 accn = it->GetPointer();
5762 if (!(*it)->GetGeneral().IsSkippable()) {
5763 general = it->GetPointer();
5767 gi = it->GetPointer();
5781 if (!
label.empty()) {
5787 if (
local && (! suppress_local) &&
label.empty()) {
5791 if (gi && giOK &&
label.empty()) {
5829 string aa =
"OTHER";
5830 switch ((*it)->GetAa().Which()) {
5832 aa =
GetAAName((*it)->GetAa().GetNcbieaa(),
true);
5835 aa =
GetAAName((*it)->GetAa().GetNcbi8aa(),
false);
5838 aa =
GetAAName((*it)->GetAa().GetNcbistdaa(),
false);
5848 if (gcode > 1 && gcode != 255) {
5855 !(
ctx.Config().HideGI() ||
ctx.Config().IsPolicyFtp() ||
ctx.Config().IsPolicyGenomes()));
5867 if ( !
prot.GetData().IsProt() ) {
5872 if (
prot.IsSetComment() && !
prot.GetComment().empty() ) {
5883 if ( !it->empty() ) {
5891 if ( !it->empty() ) {
5896 if ( !it->empty() ) {
5907 if ( !region.empty() ) {
5943 if ( !het.
Get().empty() ) {
5953 if ( !res.empty() ) {
5961 switch ( subtype ) {
6010 switch ( subtype ) {
6060 if ( (*it)->IsSetSubtype() ) {
6062 if (
str.empty() ) {
6065 if ( (*it)->IsSetSubname() && !(*it)->GetSubname().empty() ) {
6066 str += (*it)->GetSubname();
6075 if ( (*it)->IsSetSubtype() ) {
6077 if (
str.empty() ) {
6080 if ( (*it)->IsSetName() ) {
6081 str += (*it)->GetName();
6170 const string& strRawName )
6172 if ( !
ctx.Config().DoHTML() ) {
6184 if( ! coll.empty() ) {
6190 if( voucher_info_ref ) {
6194 if (inst_full_name.empty()) {
6195 inst_full_name = voucher_info_ref->m_InstFullName;
6197 text <<
"<acronym title=\""
6199 <<
"\" class=\"voucher\">"
6200 << inst <<
"</acronym>"
6202 <<
"<a href=\"" << *voucher_info_ref->m_Links;
6204 if( voucher_info_ref->m_PrependInstitute) {
6207 if( voucher_info_ref->m_PrependCollection) {
6210 if (voucher_info_ref->m_Prefix) {
6211 text << *voucher_info_ref->m_Prefix;
6213 if (voucher_info_ref->m_Trim) {
6214 const string& trim = *voucher_info_ref->m_Trim;
6220 if (voucher_info_ref->m_PadTo > 0 && voucher_info_ref->m_PadWith) {
6221 int len_id = (
int)
id.length();
6222 int len_pad = (
int) voucher_info_ref->m_PadWith->length();
6223 while (len_id < voucher_info_ref->m_PadTo) {
6224 text << *voucher_info_ref->m_PadWith;
6229 if( voucher_info_ref->m_Suffix ) {
6230 text << *voucher_info_ref->m_Suffix;
6232 text <<
"\">" <<
id <<
"</a>";
6237 if( ! inst_full_name.empty() ) {
6240 text <<
"<acronym title=\"" <<
NStr::Replace(inst_full_name,
"\"",
""") <<
"\" class=\"voucher\">"
6241 << inst <<
"</acronym>"
6260 if ( taxname.
empty() &&
ctx.Config().NeedOrganismQual() ) {
6261 taxname =
"unknown";
6266 if ( !taxname.
empty() ) {
6269 if ( !common.
empty() ) {
6278 const string & sSubname = (
6284 if( ecotypesSeen.
find(sSubname) != ecotypesSeen.
end() ) {
6287 ecotypesSeen.
insert( sSubname );
6301 ( sSubname.empty() ?
kEmptyStr :
"type_material: " + sSubname ) ));
6328 string primer_value;
6330 bool has_fwd_seq =
false;
6331 bool has_rev_seq =
false;
6333 if( (*it)->IsSetForward() ) {
6337 const string &fwd_name = ( (*it2)->CanGetName() ? (*it2)->GetName().Get() :
kEmptyStr );
6338 if( ! fwd_name.empty() ) {
6341 const string &fwd_seq = ( (*it2)->CanGetSeq() ? (*it2)->GetSeq().Get() :
kEmptyStr );
6343 if( ! fwd_seq.empty() ) {
6350 if( (*it)->IsSetReverse() ) {
6354 const string &rev_name = ((*it2)->CanGetName() ? (*it2)->GetName().Get() :
kEmptyStr );
6355 if( ! rev_name.empty() ) {
6358 const string &rev_seq = ( (*it2)->CanGetSeq() ? (*it2)->GetSeq().Get() :
kEmptyStr );
6360 if( ! rev_seq.empty() ) {
6368 if( ! primer_value.empty() ) {
6369 const bool is_in_note = ( ! has_fwd_seq || ! has_rev_seq );
6371 primer_value =
"PCR_primers=" + primer_value;
6393 bool insertion_seq_name =
false,
6394 plasmid_name =
false,
6395 transposon_name =
false;
6403 insertion_seq_name =
true;
6408 plasmid_name =
true;
6413 transposon_name =
true;
6455 #define DO_QUAL(x) x_FormatQual(eSQ_##x, GetStringOfSourceQual(eSQ_##x), qvec)
6502 if( !
GetContext()->Config().FrequencyToNote() ) {
6509 DO_QUAL(environmental_sample);
6536 if ( !
GetContext()->Config().SrcQualsToNote() ) {
6558 #define DO_QUAL(x) x_FormatQual(eSQ_##x, GetStringOfSourceQual(eSQ_##x), qvec)
6582 if(
GetContext()->Config().FrequencyToNote() ) {
6594 DO_QUAL(endogenous_virus_name);
6636 bool add_period =
false;
6638 #define DO_NOTE(x) x_FormatNoteQual(eSQ_##x, #x, qvec)
6647 if (
GetContext()->Config().SrcQualsToNote() ) {
6670 if(
GetContext()->Config().FrequencyToNote() ) {
6696 if (
GetContext()->Config().SrcQualsToNote() ) {
6708 static const string kEOL =
"\n";
6709 notestr +=
"extrachromosomal";
6736 if (
range.IsWhole() ) {
6746 an->
SetData().SetFtable().push_back(feat);
6766 while (it != end && it->first == slot) {
6790 string&
value )
const
6794 for ( CSeq_feat::TQual::iterator it = gbQuals.begin();
6795 it != gbQuals.end(); ++it )
6803 if (!(*it)->IsSetQual() || !(*it)->IsSetVal()) {
6806 if ( (*it)->GetQual() ==
key ) {
6807 value = (*it)->GetVal();
6828 if( ! ext_type.
IsStr() || ext_type.
GetStr() !=
"CombinedFeatureUserObjects" ) {
6840 field_label.
GetStr() !=
"ModelEvidence" )
6854 const CUser_field & evidence_field = **evidence_iter;
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Biological
5' and 3'
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void remove_if(Container &c, Predicate *__pred)
bool operator()(const char ch)
Tracks the best score (lowest value).
CScope & GetScope(void) const
const CFlatFileConfig & Config(void) const
vector< TRef > TReferences
CRef< CFeatureIndex > GetFeatureForProduct(void)
CRef< CFeatureIndex > GetFeatIndex(const CMappedFeat &mf)
CRef< CFeatureIndex > GetBestProteinFeature(void)
CRef< CFeatureIndex > GetBestGene(void)
const CMappedFeat GetMappedFeat(void) const
CRef< feature::CFeatTree > m_Feat_Tree
CFeatureItemBase(const CMappedFeat &feat, CBioseqContext &ctx, CRef< feature::CFeatTree > ftree, const CSeq_loc *loc=0, bool suppressAccession=false)
CConstRef< CFlatFeature > Format(void) const
virtual string GetKey(void) const
const CMappedFeat & GetFeat(void) const
const CSeq_loc & GetLoc(void) const
bool IsSuppressAccession(void) const
virtual void x_FormatQuals(CFlatFeature &ff) const =0
CConstRef< CSeq_loc > m_Loc
void x_FormatGOQualCombined(EFeatureQualifier slot, const CTempString &name, CFlatFeature::TQuals &qvec, TQualFlags flags=0) const
void x_FormatQuals(CFlatFeature &ff) const override
void x_AddQualTranslationExceptionIdx(const CCdregion &, CBioseqContext &, string &tr_ex)
void x_AddFTableDbxref(const CSeq_feat::TDbxref &dbxref)
void x_AddFTableBondQuals(const CSeqFeatData::TBond &bond)
void x_AddFTableRegionQuals(const CSeqFeatData::TRegion ®ion)
void x_AddFTableQuals(CBioseqContext &ctx)
void x_AddQual(EFeatureQualifier slot, const IFlatQVal *value)
EItem GetItemType() const override
void x_AddQualTranslation(CBioseq_Handle &, CBioseqContext &, bool)
bool x_GetPseudo(const CGene_ref *=0, const CSeq_feat *=0) const
void x_AddQualPseudo(CBioseqContext &, CSeqFeatData::E_Choice, CSeqFeatData::ESubtype, bool)
void x_AddQualsRegion(CBioseqContext &)
bool IsMappedFromProt(void) const
void x_AddQualPartial(CBioseqContext &)
void x_AddQualDb(const CGene_ref *)
void x_FormatQual(EFeatureQualifier slot, const char *name, CFlatFeature::TQuals &qvec, TQualFlags flags=0) const
void x_AddQualsExt(const CUser_field &field, const CSeq_feat::TExt &ext)
CFeatureItem(const CMappedFeat &feat, CBioseqContext &ctx, CRef< feature::CFeatTree > ftree, const CSeq_loc *loc, EMapped mapped=eMapped_not_mapped, bool suppressAccession=false, CConstRef< CFeatureItem > parentFeatureItem=CConstRef< CFeatureItem >())
void x_AddQualsSite(CBioseqContext &)
void x_AddProductIdQuals(CBioseq_Handle &prod, EFeatureQualifier slot)
const CFlatStringQVal * x_GetStringQual(EFeatureQualifier slot) const
void x_AddFTableQual(const string &name, const string &val=kEmptyStr, CFormatQual::ETrim trim=CFormatQual::eTrim_Normal)
void x_DropIllegalQuals(void) const
CConstRef< CGene_ref > m_GeneRef
void x_AddQualSeqfeatNote(CBioseqContext &)
void x_AddQuals(CBioseqContext &ctx, CConstRef< CFeatureItem > parentFeatureItem)
void x_AddQualsProt(CBioseqContext &, bool)
void x_AddFTablePsecStrQuals(const CSeqFeatData::TPsec_str &psec_str)
string GetKey(void) const override
void x_FormatNoteQuals(CFlatFeature &ff) const
void x_AddQualProtComment(const CBioseq_Handle &)
void x_AddQualsHet(CBioseqContext &ctx)
void x_AddQualCodonStartIdx(const CCdregion &, CBioseqContext &, const int inset)
void x_AddQualsBond(CBioseqContext &)
void x_AddRecombinationClassQual(const string &recombination_class, bool check_qual_syntax)
bool x_AddFTableGeneQuals(const CSeqFeatData::TGene &gene)
void x_AddQualProtActivity(const CProt_ref *)
void x_AddRptUnitQual(const string &rpt_unit)
void x_AddQualsIdx(CBioseqContext &ctx, CConstRef< CFeatureItem > parentFeatureItem)
void x_AddFTableNonStdQuals(const CSeqFeatData::TNon_std_residue &res)
void x_AddQualProteinConflict(const CCdregion &, CBioseqContext &)
void x_AddQualsCdregion(const CMappedFeat &cds, CBioseqContext &ctx, bool pseudo)
void x_AddQualsNonStd(CBioseqContext &ctx)
void x_AddQualProtEcNumber(CBioseqContext &, const CProt_ref *)
void x_AddQualsGene(const CBioseqContext &ctx, const CGene_ref *, CConstRef< CSeq_feat > &, bool from_overlap)
void x_RemoveQuals(EFeatureQualifier slot) const
void x_GatherInfoWithParent(CBioseqContext &ctx, CConstRef< CFeatureItem > parentFeatureItem)
virtual void x_AddQualsRna(const CMappedFeat &feat, CBioseqContext &ctx, bool pseudo)
TQuals::const_iterator TQCI
void x_AddQualCdsProduct(CBioseqContext &, const CProt_ref *)
void x_AddQualsPsecStr(CBioseqContext &)
void x_AddQualsCdregionIdx(const CMappedFeat &cds, CBioseqContext &ctx, bool pseudo)
IFlatQVal::TFlags TQualFlags
void x_FormatNoteQual(EFeatureQualifier slot, const CTempString &name, CFlatFeature::TQuals &qvec, TQualFlags flags=0) const
void x_AddQualsGb(CBioseqContext &)
CFlatStringListQVal * x_GetStringListQual(EFeatureQualifier slot) const
void x_CleanQuals(const CGene_ref *)
void x_AddQualTranslationTable(const CCdregion &, CBioseqContext &)
bool x_HasMethodtRNAscanSE(void) const
CFlatProductNamesQVal * x_GetFlatProductNamesQual(EFeatureQualifier slot) const
void x_AddQualTranslationException(const CCdregion &, CBioseqContext &)
void x_AddFTableAnticodon(const CTrna_ext &trna_ext, CBioseqContext &ctx)
void x_AddQualExpInv(CBioseqContext &)
void x_AddQualProtNote(const CProt_ref *, const CMappedFeat &)
void x_AddQualNote(CConstRef< CSeq_feat >)
void x_AddFTableBiosrcQuals(const CBioSource &src)
void x_AddQualProteinId(CBioseqContext &, const CBioseq_Handle &, CConstRef< CSeq_id >)
void x_AddGoQuals(const CUser_field &field)
void x_AddFTableProtQuals(const CMappedFeat &prot)
CSeqFeatData::ESubtype m_Type
void x_AddQualGeneXref(const CGene_ref *, const CConstRef< CSeq_feat > &)
void x_AddQualOldLocusTag(const CBioseqContext &ctx, CConstRef< CSeq_feat >)
bool x_GetGbValue(const string &, string &) const
void x_AddQualProtMethod(const CBioseq_Handle &)
void x_ImportQuals(CBioseqContext &ctx)
void x_AddFTableSiteQuals(const CSeqFeatData::TSite &site)
bool IsMappedFromCDNA(void) const
static string x_SeqIdWriteForTable(const CBioseq &seq, bool suppress_local, bool giOK)
void x_AddQualsRegulatoryClass(CBioseqContext &ctx, CSeqFeatData::ESubtype subtype)
void x_AddQualProtDesc(const CProt_ref *)
void x_AddQualCodedBy(CBioseqContext &)
void x_AddQualOperon(CBioseqContext &, CSeqFeatData::ESubtype)
void x_AddFTableCdregionQuals(const CMappedFeat &feat, CBioseqContext &ctx)
void x_AddFTableRnaQuals(const CMappedFeat &feat, CBioseqContext &ctx)
void x_GetAssociatedProtInfoIdx(CBioseqContext &, CBioseq_Handle &, const CProt_ref *&, CMappedFeat &protFeat, CConstRef< CSeq_id > &)
void x_AddQualsVariation(CBioseqContext &ctx)
void x_AddFTableExtQuals(const CSeq_feat::TExt &ext)
void x_AddRptTypeQual(const string &rpt_type, bool check_qual_syntax)
void x_AddQualDbXref(CBioseqContext &)
TQCI x_GetQual(EFeatureQualifier slot) const
bool x_IsSeqFeatDataFeatureLegal(CSeqFeatData::EQualifier qual)
void x_AddRegulatoryClassQual(const string ®ulatory_class, bool check_qual_syntax)
bool IsMapped(void) const
bool x_HasQual(EFeatureQualifier slot) const
void x_AddQualExceptions(CBioseqContext &)
void x_GetAssociatedProtInfo(CBioseqContext &, CBioseq_Handle &, const CProt_ref *&, CMappedFeat &protFeat, CConstRef< CSeq_id > &)
void x_AddQualCodonStart(const CCdregion &, CBioseqContext &)
vector< CRef< CFormatQual > > TQuals
bool IsFormatDDBJ(void) const
bool GoQualsEachMerge(void) const
bool IsModeGBench(void) const
bool IsFormatGBSeq(void) const
bool GeneRNACDSFeatures(void) const
bool HideRemoteImpFeatures(void) const
bool ShowFarTranslations(void) const
bool IupacaaOnly(void) const
bool HideImpFeatures(void) const
bool IsPolicyFtp(void) const
bool AlwaysTranslateCDS(void) const
bool IsFormatINSDSeq(void) const
bool IsPolicyGenomes(void) const
bool IsFormatFTable(void) const
bool NeverTranslateCDS(void) const
bool TranslateIfNoProduct(void) const
bool DropIllegalQuals(void) const
bool CodonRecognizedToNote(void) const
bool HideProteinID(void) const
bool HideMiscFeatures(void) const
bool NeedRequiredQuals(void) const
bool IsModeDump(void) const
bool GoQualsToNote(void) const
bool ValidateFeatures(void) const
bool HideExonFeatures(void) const
bool ShowTranscript(void) const
bool HideIntronFeatures(void) const
int GetPubmedId(void) const
bool Equals(const CFlatGoQVal &rhs) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
const string & GetTextString(void) const
CBioseqContext * GetContext(void)
void x_SetObject(const CSerialObject &obj)
CProt_ref::TName & SetValue(void)
const CProt_ref::TName & GetValue(void) const
const string & GetString(void) const
const string & GetValue(void) const
@Gb_qual.hpp User-defined methods of the data storage class.
static bool IsValidRptTypeValue(const string &val)
static CSeq_feat_Handle ResolveGeneXref(const CGene_ref *xref_g_ref, const CSeq_entry_Handle &top_level_seq_entry)
This does plain, simple resolution of a CGene_ref to its gene.
static void GetAssociatedGeneInfo(const CSeq_feat_Handle &in_feat, CBioseqContext &ctx, const CConstRef< CSeq_loc > &feat_loc, CConstRef< CGene_ref > &out_suppression_check_gene_ref, const CGene_ref *&out_g_ref, CConstRef< CSeq_feat > &out_s_feat, const CSeq_feat_Handle &in_parent_feat)
Find the gene associated with the given feature.
void GetLabel(string *label) const
bool IsSuppressed(void) const
@Imp_feat.hpp User-defined methods of the data storage class.
bool operator()(const string &arg)
const string & m_ComparisonString
CInStringPred(const string &comparisonString)
static TVoucherInfoRef GetInstitutionVoucherInfo(const string &inst_abbrev)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
ostream & AsString(ostream &s) const
Exceptions for objmgr/util library.
@OrgMod.hpp User-defined methods of the data storage class.
static bool IsINSDCValidTypeMaterial(const string &type_material)
static const string & GetInstitutionFullName(const string &short_name)
static bool HoldsInstitutionCode(const TSubtype stype)
This indicates if the given Org-mod subtype is supposed to hold an institution code (Example: "ATCC:2...
static bool ParseStructuredVoucher(const string &str, string &inst, string &coll, string &id)
iterator Erase(iterator it)
iterator LowerBound(Key &key)
iterator Find(const Key &key)
@RNA_ref.hpp User-defined methods of the data storage class.
static SIZE_TYPE Convert(const CTempString &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst, TCoding dst_coding)
CRef< CSeqMasterIndex > GetMasterIndex(void) const
CRef< CBioseqIndex > GetBioseqIndex(void)
EQualifier
List of available qualifiers for feature keys.
@ eQual_recombination_class
@ eQual_UniProtKB_evidence
@ eQual_ribosomal_slippage
@ eQual_calculated_mol_wt
@ eQual_mobile_element_type
@ eQual_artificial_location
ESubtype GetSubtype(void) const
static const vector< string > & GetRecombinationClassList()
@ eSubtype_misc_difference
@ eSubtype_misc_structure
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
@ eSubtype_mobile_element
@ eSubtype_prim_transcript
@ eSubtype_transit_peptide_aa
@ eSubtype_sig_peptide_aa
@ eSubtype_mat_peptide_aa
static const vector< string > & GetRegulatoryClassList()
CRef< feature::CFeatTree > GetFeatTree(void) const
namespace ncbi::objects::
const string & GetNamedQual(const CTempString &qual_name) const
Return a named qualifier.
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
static TSeqPos Convert(const CSeq_data &in_seq, CSeq_data *out_seq, CSeq_data::E_Choice to_code, TSeqPos uBeginIdx=0, TSeqPos uLength=0, bool bAmbig=false, Uint4 seed=17734276)
void SetLoc(const CSeq_loc &loc)
const CBioSource & GetSource(void) const
void x_FormatNoteQuals(CFlatFeature &ff) const
TQuals::const_iterator TQCI
void x_AddQuals(CBioseqContext &ctx) override
EItem GetItemType() const override
void x_AddQual(ESourceQualifier slot, const IFlatQVal *value) const
CSourceFeatureItem(const CBioSource &src, TRange range, CBioseqContext &ctx, CRef< feature::CFeatTree > ftree)
void x_GatherInfo(CBioseqContext &ctx) override
void x_AddPcrPrimersQuals(const CBioSource &src, CBioseqContext &ctx) const
void x_FormatQual(ESourceQualifier slot, const CTempString &name, CFlatFeature::TQuals &qvec, TQualFlags flags=0) const
void x_FormatQuals(CFlatFeature &ff) const override
void x_FormatGBNoteQuals(CFlatFeature &ff) const
void x_FormatNoteQual(ESourceQualifier slot, const char *name, CFlatFeature::TQuals &qvec, TQualFlags flags=0) const
void Subtract(const CSourceFeatureItem &other, CScope &scope)
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
static bool NCBI_UseGeoLocNameForCountry(void)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
virtual void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags=0) const =0
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
string Tag(const string &name, int value)
Include a standard set of the NCBI C++ Toolkit most basic headers.
static bool s_CheckQuals_bind(const CMappedFeat &feat)
static const string s_TrnaList[]
bool s_ValidateMobileElementType(const string &mobile_element_type_value)
CSeq_id_Handle s_FindBestIdChoice(const CBioseq_Handle::TId &ids)
static bool s_CheckQuals_conflict(const CMappedFeat &feat, CBioseqContext &ctx)
static const TMobileElemTypeKey mobile_element_key_to_suffix_required[]
static bool s_CheckQuals_gap(const CMappedFeat &feat)
static int s_GetOverlap(const CMappedFeat &feat)
static bool s_SkipFeature(const CMappedFeat &feat, const CSeq_loc &loc, CBioseqContext &ctx)
static const string & s_AaName(int aa)
static bool s_CheckQuals_gene(const CMappedFeat &feat)
static bool s_LocIsFuzz(const CMappedFeat &feat, const CSeq_loc &loc)
static bool s_StrEqualDisregardFinalPeriod(const string &s1, const string &s2, NStr::ECase use_case)
static bool s_HasPub(const CMappedFeat &feat, CBioseqContext &ctx)
static bool s_CheckQuals_old_seq(const CMappedFeat &feat, CBioseqContext &ctx)
static void s_ParseParentQual(const CGb_qual &gbqual, list< string > &vals)
static bool s_CheckFuzz(const CInt_fuzz &fuzz)
static ESourceQualifier s_OrgModToSlot(const COrgMod &om)
static bool s_CheckQuals_regulatory(const CMappedFeat &feat)
static const TQualPair sc_GbToFeatQualMap[]
static string s_GetSpecimenVoucherText(CBioseqContext &ctx, const string &strRawName)
static ESourceQualifier s_SubSourceToSlot(const CSubSource &ss)
static bool s_IsValidExceptionText(const string &text)
static void s_AddPcrPrimersQualsAppend(string &output, const string &name, const string &str)
static bool s_CheckQuals_ncRNA(const CMappedFeat &feat)
CStaticPairArrayMap< EFeatureQualifier, CSeqFeatData::EQualifier > TQualMap
static bool s_IsLegalECNumber(const string &ec_number)
static const string & s_GetSiteName(CSeqFeatData::TSite site)
static const char *const sc_ValidPseudoGene[]
CStaticPairArrayMap< const char *, bool, PCase_CStr > TMobileElemTypeMap
static const string s_GetSubtypeString(const COrgMod::TSubtype &subtype)
static int s_ScoreSeqIdHandle(const CSeq_id_Handle &idh)
CStaticArraySet< const char *, PNocase > TLegalRefSeqExceptText
static bool s_IsValidRegulatoryClass(const string &type)
static void s_NoteFinalize(bool addPeriod, string ¬eStr, CFlatFeature &flatFeature, ETildeStyle style=eTilde_newline)
#define DO_NOTE_PREPEND_NEWLINE(x)
SStaticPair< EFeatureQualifier, CSeqFeatData::EQualifier > TQualPair
static bool s_IsValidPseudoGene(objects::CFlatFileConfig::TMode mode, const string &text)
static int s_ToIupacaa(int aa)
static bool s_CheckQuals_mod_base(const CMappedFeat &feat)
static bool s_IsValidRecombinationClass(const string &type)
static bool s_CheckMandatoryQuals(const CMappedFeat &feat, const CSeq_loc &loc, CBioseqContext &ctx)
static bool s_IsValidDirection(const string &direction)
static void s_QualVectorToNote(const CFlatFeature::TQuals &qualVector, bool noRedundancy, string ¬e, string &punctuation, bool &addPeriod)
static bool s_CheckQuals_assembly_gap(const CMappedFeat &feat)
static bool s_IsValidnConsSplice(const string &cons_splice)
static const char *const sc_ValidExceptionText[]
static CMappedFeat s_GetBestProtFeature(const CBioseq_Handle &seq)
The best protein feature is defined as the one that has the most overlap with the given DNA.
static void s_HTMLizeExperimentQual(string &out_new_val, const string &val)
static CSeqFeatData::EQualifier s_GbToSeqFeatQual(EFeatureQualifier qual)
static bool s_IsValidRefSeqExceptionText(const string &text)
static bool s_TransSplicingFeatureAllowed(const CSeqFeatData &data)
CStaticArraySet< const char *, PNocase > TLegalPseudoGeneText
SStaticPair< const char *, bool > TMobileElemTypeKey
static bool s_HasCompareOrCitation(const CMappedFeat &feat, CBioseqContext &ctx)
static void s_SplitCommaSeparatedStringInParens(vector< string > &output_vec, const string &string_to_split)
static const char *const sc_ValidRefSeqExceptionText[]
static bool s_ValidId(const CSeq_id &id)
static const string & s_GetBondName(CSeqFeatData::TBond bond)
static bool s_CheckQuals_cdregion(const CMappedFeat &feat, const CSeq_loc &loc, CBioseqContext &ctx)
DEFINE_STATIC_ARRAY_MAP(TLegalPseudoGeneText, sc_ValidPseudoGeneText, sc_ValidPseudoGene)
CStaticArraySet< const char *, PNocase_CStr > TLegalExceptText
static const string s_GetSubsourceString(const CSubSource::TSubtype &subtype)
ESourceQualifier GetSourceQualOfOrgMod(COrgMod::ESubtype eOrgModSubtype)
Translate an org-mod subtype into a sourcequalifier.
@ eSQ_endogenous_virus_name
ESourceQualifier GetSourceQualOfSubSource(CSubSource::ESubtype eSubSourceSubtype)
Translate a subsource subtype into a sourcequalifier.
@ eFQ_mobile_element_type
@ eFQ_recombination_class
@ eFQ_artificial_location
static const struct name_t names[]
static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static SQLCHAR output[256]
static const char * str(char *buf, int n)
Public API for finding the gene(s) on a given feature using the same criteria as the flatfile generat...
constexpr size_t ArraySize(const Element(&)[Size])
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
const TPrim & Get(void) const
#define ENUM_METHOD_NAME(EnumName)
const string AsFastaString(void) const
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
CConstRef< CSeq_id > GetSeqId(void) const
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
static int Score(const CRef< CSeq_id > &id)
Wrappers for use with FindBestChoice from <corelib/ncbiutil.hpp>
string GetLabel(const CSeq_id &id)
const CTextseq_id * GetTextseq_Id(void) const
Return embedded CTextseq_id, if any.
@ eContent
Untagged human-readable accession or the like.
@ eBoth
Type and content, delimited by a vertical bar.
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
ENa_strand GetStrand(void) const
Get the location's strand.
TRange GetTotalRange(void) const
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
CRef< CSeq_loc > Subtract(const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper, ILengthGetter *len_getter) const
Subtract seq-loc from this, merge/sort resulting ranges depending on flags.
bool IsSetStrand(EIsSetStrand flag=eIsSetStrand_Any) const
Check if strand is set for any/all part(s) of the seq-loc depending on the flag.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
bool IsPartialStop(ESeqLocExtremes ext) const
TSeqPos GetStop(ESeqLocExtremes ext) const
@ eEmpty_Allow
ignore empty locations
@ fFGL_Content
Include its content if there is any.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
TSeqPos LocationOffset(const CSeq_loc &outer, const CSeq_loc &inner, EOffsetType how=eOffset_FromStart, CScope *scope=0)
returns (TSeqPos)-1 if the locations don't overlap
int SeqLocPartialCheck(const CSeq_loc &loc, CScope *scope)
CRef< CSeq_loc > Seq_loc_Subtract(const CSeq_loc &loc1, const CSeq_loc &loc2, CSeq_loc::TOpFlags flags, CScope *scope)
Subtract the second seq-loc from the first one.
@ eSeqlocPartial_Complete
@ eOffset_FromStart
For positive-orientation strands, start = left and end = right; for reverse-orientation strands,...
CConstRef< CSeq_feat > GetOverlappingGene(const CSeq_loc &loc, CScope &scope, ETransSplicing eTransSplicing=eTransSplicing_Auto)
CConstRef< CSeq_feat > GetOverlappingOperon(const CSeq_loc &loc, CScope &scope)
string GetAccessionForGi(TGi gi, CScope &scope, EAccessionVersion use_version=eWithAccessionVersion, EGetIdType flags=0)
Retrieve the accession for a given GI.
static void Translate(const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
Translate a string using a specified genetic code.
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
double GetProteinWeight(const CBioseq_Handle &handle, const CSeq_loc *location=0, TGetProteinWeight opts=0)
Handles the standard 20 amino acids and Sec and Pyl; treats Asx as Asp, Glx as Glu,...
CBioseq_Handle GetBioseqHandleFromTSE(const CSeq_id &id, const CTSE_Handle &tse)
Get bioseq handle for sequence withing one TSE.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CSeq_annot_Handle AddSeq_annot(CSeq_annot &annot, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add Seq-annot, return its CSeq_annot_Handle.
@ eGetBioseq_Loaded
Search in all loaded TSEs in the scope.
@ eGetBioseq_All
Search bioseq, load if not loaded yet.
const string & GetNamedQual(const CTempString &qual_name) const
Return a named qualifier.
bool IsSetExcept(void) const
vector< CSeq_id_Handle > TId
bool GetExcept(void) const
bool IsSetComment(void) const
const CPub_set & GetCit(void) const
const CTSE_Handle & GetTSE_Handle(void) const
Get CTSE_Handle of containing TSE.
bool GetPseudo(void) const
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to seq-annot for this feature.
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
const CSeq_feat::TExts & GetExts(void) const
bool IsSetDbxref(void) const
bool IsSetExp_ev(void) const
CSeq_feat::EExp_ev GetExp_ev(void) const
const CSeqFeatData & GetData(void) const
bool IsSetTitle(void) const
bool IsSetXref(void) const
const CProt_ref * GetProtXref(void) const
get protein (if present) from Seq-feat.xref list
bool IsSetExcept_text(void) const
bool IsSetProduct(void) const
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
const string & GetComment(void) const
const CUser_object & GetExt(void) const
const CSeq_annot::TDesc & Seq_annot_GetDesc(void) const
const string & GetExcept_text(void) const
const string & GetTitle(void) const
bool IsSetExts(void) const
CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const
const CSeq_feat::TDbxref & GetDbxref(void) const
bool IsSetQual(void) const
const CGene_ref * GetGeneXref(void) const
get gene (if present) from Seq-feat.xref list
bool IsSetPseudo(void) const
const CSeq_feat::TQual & GetQual(void) const
const TId & GetId(void) const
bool IsSetExt(void) const
bool Seq_annot_IsSetDesc(void) const
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
bool IsSetCit(void) const
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
SAnnotSelector & SetFeatType(TFeatType type)
Set feature type (also set annotation type to feat)
CSeq_id_Handle GetProductId(void) const
bool IsSetPartial(void) const
const CSeq_loc & GetLocation(void) const
bool GetPartial(void) const
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
const CSeq_feat_Handle & GetSeq_feat_Handle(void) const
Get original feature handle.
const CSeq_feat & GetMappedFeature(void) const
Feature mapped to the master sequence.
const CSeq_loc & GetProduct(void) const
SAnnotSelector & SetLimitTSE(const CTSE_Handle &limit)
Limit annotations to those from the TSE only.
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
void SetCoding(TCoding coding)
const_iterator begin(void) const
const_iterator end(void) const
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CConstRef is not empty – pointing to an object and has a non-null value.
TObjectType * GetNonNullPointer(void) const
Get pointer value and throw a null pointer exception if pointer is null.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
NCBI_NS_STD::string::size_type SIZE_TYPE
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static void TrimPrefixInPlace(string &str, const CTempString prefix, ECase use_case=eCase)
Trim prefix from a string (in-place)
ECase
Which type of string comparison.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
static string & ToLower(string &str)
Convert string to lower case – string& version.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ eNocase
Case insensitive compare.
@ eCase
Case sensitive compare.
static const char label[]
const Tdata & Get(void) const
Get the member data.
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
const TPcr_primers & GetPcr_primers(void) const
Get the Pcr_primers member data.
TGenome GetGenome(void) const
Get the Genome member data.
TOrigin GetOrigin(void) const
Get the Origin member data.
const Tdata & Get(void) const
Get the member data.
bool IsSetOrg(void) const
Check if a value has been assigned to Org data member.
list< CRef< CSubSource > > TSubtype
bool IsSetPcr_primers(void) const
Check if a value has been assigned to Pcr_primers data member.
const TOrg & GetOrg(void) const
Get the Org member data.
TSubtype GetSubtype(void) const
Get the Subtype member data.
bool CanGet(void) const
Check if it is safe to call Get method.
bool CanGet(void) const
Check if it is safe to call Get method.
bool IsSetIs_focus(void) const
to distinguish biological focus Check if a value has been assigned to Is_focus data member.
list< CRef< CPCRReaction > > Tdata
list< CRef< CPCRPrimer > > Tdata
@ eSubtype_insertion_seq_name
@ eSubtype_transposon_name
@ eSubtype_isolation_source
@ eSubtype_environmental_sample
@ eSubtype_endogenous_virus_name
@ eOrigin_synthetic
purely synthetic
TFrom GetFrom(void) const
Get the From member data.
bool IsSetSyn(void) const
synonyms for locus Check if a value has been assigned to Syn data member.
bool IsSetFormal_name(void) const
Check if a value has been assigned to Formal_name data member.
const TFormal_name & GetFormal_name(void) const
Get the Formal_name member data.
const TSyn & GetSyn(void) const
Get the Syn member data.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool IsSetPseudo(void) const
pseudogene Check if a value has been assigned to Pseudo data member.
bool IsSetLocus_tag(void) const
systematic gene name (e.g., MI0001, ORF0069) Check if a value has been assigned to Locus_tag data mem...
bool IsSetLocus(void) const
Official gene symbol Check if a value has been assigned to Locus data member.
bool IsSetDesc(void) const
descriptive name Check if a value has been assigned to Desc data member.
bool IsSetDb(void) const
ids in other dbases Check if a value has been assigned to Db data member.
bool IsSetAllele(void) const
Official allele designation Check if a value has been assigned to Allele data member.
const TDb & GetDb(void) const
Get the Db member data.
bool IsSetMaploc(void) const
descriptive map location Check if a value has been assigned to Maploc data member.
const TLocus_tag & GetLocus_tag(void) const
Get the Locus_tag member data.
const TLocus & GetLocus(void) const
Get the Locus member data.
TPseudo GetPseudo(void) const
Get the Pseudo member data.
const TAllele & GetAllele(void) const
Get the Allele member data.
const TMaploc & GetMaploc(void) const
Get the Maploc member data.
const TStr & GetStr(void) const
Get the variant data.
bool IsSetData(void) const
the object itself Check if a value has been assigned to Data data member.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetDb(void) const
name of database or system Check if a value has been assigned to Db data member.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
bool IsLim(void) const
Check if variant Lim is selected.
const TTag & GetTag(void) const
Get the Tag member data.
const TData & GetData(void) const
Get the Data member data.
bool IsSetTag(void) const
appropriate tag Check if a value has been assigned to Tag data member.
const TFields & GetFields(void) const
Get the variant data.
const TDb & GetDb(void) const
Get the Db member data.
vector< CRef< CUser_field > > TFields
E_Choice Which(void) const
Which variant is currently selected.
TLim GetLim(void) const
Get the variant data.
bool IsFields(void) const
Check if variant Fields is selected.
bool IsStr(void) const
Check if variant Str is selected.
vector< CRef< CUser_object > > TObjects
bool IsSetLabel(void) const
field label Check if a value has been assigned to Label data member.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
bool IsObjects(void) const
Check if variant Objects is selected.
const TObject & GetObject(void) const
Get the variant data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
bool IsObject(void) const
Check if variant Object is selected.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CRef< CUser_field > > TData
TId GetId(void) const
Get the variant data.
const TObjects & GetObjects(void) const
Get the variant data.
const TMod & GetMod(void) const
Get the Mod member data.
bool IsSetDb(void) const
ids in taxonomic or culture dbases Check if a value has been assigned to Db data member.
const TDiv & GetDiv(void) const
Get the Div member data.
bool IsSetCommon(void) const
common name Check if a value has been assigned to Common data member.
bool IsSetMod(void) const
unstructured modifiers Check if a value has been assigned to Mod data member.
const TTaxname & GetTaxname(void) const
Get the Taxname member data.
const TCommon & GetCommon(void) const
Get the Common member data.
const TDb & GetDb(void) const
Get the Db member data.
bool IsSetDiv(void) const
GenBank division code Check if a value has been assigned to Div data member.
list< CRef< COrgMod > > TMod
bool IsSetOrgname(void) const
Check if a value has been assigned to Orgname data member.
bool IsSetTaxname(void) const
preferred formal name Check if a value has been assigned to Taxname data member.
const TMod & GetMod(void) const
Get the Mod member data.
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
@ eSubtype_gb_acronym
used by taxonomy database
@ eSubtype_gb_synonym
used by taxonomy database
@ eSubtype_other
ASN5: old-name (254) will be added to next spec.
@ eSubtype_dosage
chromosome dosage of hybrid
@ eSubtype_nat_host
natural host of this specimen
@ eSubtype_metagenome_source
@ eSubtype_specimen_voucher
@ eSubtype_gb_anamorph
used by taxonomy database
@ eSubtype_culture_collection
@ eSubtype_forma_specialis
bool IsSetDesc(void) const
description (instead of name) Check if a value has been assigned to Desc data member.
EProcessed
processing status
const TActivity & GetActivity(void) const
Get the Activity member data.
const TName & GetName(void) const
Get the Name member data.
bool IsSetEc(void) const
E.C.
TProcessed GetProcessed(void) const
Get the Processed member data.
bool IsSetName(void) const
protein name Check if a value has been assigned to Name data member.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool IsSetActivity(void) const
activities Check if a value has been assigned to Activity data member.
const TEc & GetEc(void) const
Get the Ec member data.
@ eProcessed_signal_peptide
@ eProcessed_transit_peptide
const TQuals & GetQuals(void) const
Get the Quals member data.
const TAnticodon & GetAnticodon(void) const
Get the Anticodon member data.
TNcbi8aa GetNcbi8aa(void) const
Get the variant data.
const TAa & GetAa(void) const
Get the Aa member data.
TNcbistdaa GetNcbistdaa(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetAa(void) const
Check if a value has been assigned to Aa data member.
bool IsTRNA(void) const
Check if variant TRNA is selected.
bool IsSetAnticodon(void) const
location of anticodon Check if a value has been assigned to Anticodon data member.
bool IsNcbieaa(void) const
Check if variant Ncbieaa is selected.
bool IsSetExt(void) const
generic fields for ncRNA, tmRNA, miscRNA Check if a value has been assigned to Ext data member.
TNcbieaa GetNcbieaa(void) const
Get the variant data.
bool IsSetCodon(void) const
codon(s) as in Genetic-code Check if a value has been assigned to Codon data member.
bool IsGen(void) const
Check if variant Gen is selected.
TIupacaa GetIupacaa(void) const
Get the variant data.
bool IsSetQuals(void) const
e.g., tag_peptide qualifier for tmRNAs Check if a value has been assigned to Quals data member.
const TGen & GetGen(void) const
Get the variant data.
const TName & GetName(void) const
Get the variant data.
bool IsSetClass(void) const
for ncRNAs, the class of non-coding RNA: examples: antisense_RNA, guide_RNA, snRNA Check if a value h...
E_Choice Which(void) const
Which variant is currently selected.
const TExt & GetExt(void) const
Get the Ext member data.
const TTRNA & GetTRNA(void) const
Get the variant data.
bool IsName(void) const
Check if variant Name is selected.
const TClass & GetClass(void) const
Get the Class member data.
@ e_Name
for naming "other" type
const TVal & GetVal(void) const
Get the Val member data.
const TKey & GetKey(void) const
Get the Key member data.
bool IsSetLoc(void) const
original location string Check if a value has been assigned to Loc data member.
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
vector< CRef< CDbtag > > TDbxref
EPsec_str
protein secondary structure
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetCode(void) const
genetic code used Check if a value has been assigned to Code data member.
bool IsBond(void) const
Check if variant Bond is selected.
bool IsProt(void) const
Check if variant Prot is selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
bool IsImp(void) const
Check if variant Imp is selected.
const TQual & GetQual(void) const
Get the Qual member data.
bool IsSetKey(void) const
Check if a value has been assigned to Key data member.
const TLocation & GetLocation(void) const
Get the Location member data.
bool IsSetConflict(void) const
conflict Check if a value has been assigned to Conflict data member.
list< CRef< CCode_break > > TCode_break
TFrame GetFrame(void) const
Get the Frame member data.
const TData & GetData(void) const
Get the Data member data.
const TCode & GetCode(void) const
Get the Code member data.
const TDbxref & GetDbxref(void) const
Get the Dbxref member data.
bool IsPsec_str(void) const
Check if variant Psec_str is selected.
void SetData(TData &value)
Assign a value to Data data member.
bool IsHet(void) const
Check if variant Het is selected.
const TCdregion & GetCdregion(void) const
Get the variant data.
TPseudo GetPseudo(void) const
Get the Pseudo member data.
bool IsSetQual(void) const
Check if a value has been assigned to Qual data member.
bool IsSetPseudo(void) const
annotated on pseudogene? Check if a value has been assigned to Pseudo data member.
const TComment & GetComment(void) const
Get the Comment member data.
bool IsVariation(void) const
Check if variant Variation is selected.
const TGene & GetGene(void) const
Get the variant data.
const TProt & GetProt(void) const
Get the variant data.
bool IsSite(void) const
Check if variant Site is selected.
vector< CRef< CGb_qual > > TQual
const TQual & GetQual(void) const
Get the Qual member data.
const TRna & GetRna(void) const
Get the variant data.
bool IsNon_std_residue(void) const
Check if variant Non_std_residue is selected.
bool IsSetDbxref(void) const
support for xref to other databases Check if a value has been assigned to Dbxref data member.
const TCode_break & GetCode_break(void) const
Get the Code_break member data.
bool IsSetVal(void) const
Check if a value has been assigned to Val data member.
const TLoc & GetLoc(void) const
Get the Loc member data.
bool IsRna(void) const
Check if variant Rna is selected.
bool IsRegion(void) const
Check if variant Region is selected.
TConflict GetConflict(void) const
Get the Conflict member data.
bool IsSetCode_break(void) const
individual exceptions Check if a value has been assigned to Code_break data member.
const TImp & GetImp(void) const
Get the variant data.
bool IsSetFrame(void) const
Check if a value has been assigned to Frame data member.
@ e_Het
cofactor, prosthetic grp, etc, bound to seq
@ e_Region
named region (globin locus)
@ e_Comment
just a comment
@ e_Non_std_residue
non-standard residue here in seq
@ eExp_ev_experimental
any reasonable experimental check
@ eExp_ev_not_experimental
similarity, pattern, etc
@ eFrame_not_set
not set, code uses one
@ eFrame_three
reading frame
@ e_Ncbieaa
ASCII value of NCBIeaa code.
void SetTo(TTo value)
Assign a value to To data member.
ENa_strand
strand of nucleic acid
void SetId(TId &value)
Assign a value to Id data member.
TFrom GetFrom(void) const
Get the From member data.
bool IsGeneral(void) const
Check if variant General is selected.
E_Choice Which(void) const
Which variant is currently selected.
void SetFrom(TFrom value)
Assign a value to From data member.
TGi GetGi(void) const
Get the variant data.
const TGeneral & GetGeneral(void) const
Get the variant data.
bool IsGi(void) const
Check if variant Gi is selected.
TTo GetTo(void) const
Get the To member data.
bool IsWhole(void) const
Check if variant Whole is selected.
bool IsInt(void) const
Check if variant Int is selected.
const TInt & GetInt(void) const
Get the variant data.
@ e_Other
for historical reasons, 'other' = 'refseq'
@ e_Gpipe
Internal NCBI genome pipeline processing ID.
@ e_Tpe
Third Party Annot/Seq EMBL.
@ e_Tpd
Third Party Annot/Seq DDBJ.
@ e_General
for other databases
@ e_Gi
GenInfo Integrated Database.
@ e_not_set
No variant selected.
@ e_Tpg
Third Party Annot/Seq Genbank.
void SetData(TData &value)
Assign a value to Data data member.
const Tdata & Get(void) const
Get the member data.
const TIupacna & GetIupacna(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
TTech GetTech(void) const
Get the Tech member data.
TLength GetLength(void) const
Get the Length member data.
list< CRef< CSeq_id > > TId
bool CanGetSeq_data(void) const
Check if it is safe to call GetSeq_data method.
bool IsSetId(void) const
equivalent identifiers Check if a value has been assigned to Id data member.
const TComment & GetComment(void) const
Get the variant data.
const TMolinfo & GetMolinfo(void) const
Get the variant data.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
list< CRef< CAnnotdesc > > Tdata
@ eTech_concept_trans
conceptual translation
@ eTech_standard
standard sequencing
@ eTech_concept_trans_a
conceptual transl. supplied by author
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ eBiomol_transcribed_RNA
transcribed RNA other than existing classes
@ e_Comment
a more extensive comment
@ e_Molinfo
info on the molecule and techniques
const TLiteral & GetLiteral(void) const
Get the variant data.
list< CRef< CDelta_item > > TDelta
bool IsLiteral(void) const
Check if variant Literal is selected.
unsigned int
A callback function used to compare two keys in a database.
static void text(MDB_val *v)
range(_Ty, _Ty) -> range< _Ty >
constexpr auto sort(_Init &&init)
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
static const BitmapCharRec ch1
static const BitmapCharRec ch2
Int4 delta(size_t dimension_, const Int4 *score_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
bool TrimSpacesAndJunkFromEnds(string &str, bool allow_ellipsis=false)
bool RemovePeriodFromEnd(string &str, bool keep_ellipsis=true)
bool IsValidAccession(const string &accn, EAccValFlag flag=eValidateAcc)
void ExpandTildes(string &s, ETildeStyle style)
const char * GetAAName(unsigned char aa, bool is_ascii)
const char * strLinkBasePubmed
void JoinString(string &to, const string &prefix, const string &str, bool noRedundancy=true)
bool CommentHasSuspiciousHtml(const string &str)
void AddPeriod(string &str)
const string & GetTechString(int tech)
void ConvertQuotes(string &str)
#define FOR_EACH_SEQID_ON_BIOSEQ(Itr, Var)
FOR_EACH_SEQID_ON_BIOSEQ EDIT_EACH_SEQID_ON_BIOSEQ.
#define FOR_EACH_GBQUAL_ON_SEQFEAT(Itr, Var)
FOR_EACH_GBQUAL_ON_SEQFEAT EDIT_EACH_GBQUAL_ON_SEQFEAT.
#define FOR_EACH_STRING_IN_VECTOR(Itr, Var)
FOR_EACH_STRING_IN_VECTOR EDIT_EACH_STRING_IN_VECTOR.
#define FIELD_IS_SET(Var, Fld)
FIELD_IS_SET base macro.
#define GET_STRING_FLD_OR_BLANK(Var, Fld)
GET_STRING_FLD_OR_BLANK base macro.
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
CRef< objects::CObjectManager > om
EFeatureQualifier m_Value
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...