textComparison = 0;
141 const SIZE_TYPEmin_length =
min( str1.length(), str2.length() );
142 for( ; pos < min_length; ++pos ) {
144 if( textComparison != 0 ) {
148 if( 0 == textComparison ) {
150textComparison = str1.length() - str2.length();
154 if( textComparison < 0 ) {
156}
else if( textComparison > 0 ) {
166}
else if( 0 == pmid2 ) {
169 returnpmid1 < 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 returns1.empty() && s2.empty();
194 size_ts1_len = s1.length();
195 if( s1[s1_len-1] ==
'.') {
198 size_ts2_len = s2.length();
199 if( s2[s2_len-1] ==
'.') {
203 if( s1_len != s2_len ) {
209 for(
size_tii = 0; ii < s1_len ; ++ii ) {
223 if( !
ctx.Config().CheckCDSProductId() ) {
231 if( !pseudo && !
ctx.IsEMBL() && !
ctx.IsDDBJ() ) {
242 if(! pseudo && grp) {
247 booljust_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()) ) {
393 return!feat.
GetNamedQual(
"estimated_length").empty();
400 return! feat.
GetNamedQual(
"estimated_length").empty() &&
427 return! feat.
GetNamedQual(
"regulatory_class").empty();
565 const CDbtag& dbt = **it;
597 return( !
isdigit(ch) && ch !=
'.'&& ch !=
'-');
610 if( ec_number.empty() )
return false;
612 boolis_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') {
625string::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 stringkOther =
"unclassified";
663 string& punctuation,
667 boolhasSubstantiveNote =
false;
669 conststring::size_type original_length = note.length();
673 const string& qual = (*it)->GetValue();
676 if( !note.empty() ) {
677prefix = punctuation;
678 const string& next_prefix = (*it)->GetPrefix();
680prefix += next_prefix;
684 if( !qual.empty() && qual !=
".") {
685hasSubstantiveNote =
true;
690 const boolnoRedundancyThisIteration =
692 JoinString(note, prefix, qual, noRedundancyThisIteration );
694addPeriod = (*it)->GetAddPeriod();
695punctuation = (*it)->GetSuffix();
699 if( ! hasSubstantiveNote ) {
700note.resize( original_length );
711 if(!noteStr.empty()) {
721flatFeature.
SetQuals().push_back(note);
728 inttotal_length = 0;
730total_length += loc_iter.GetRange().GetLength();
751 intbest_overlap = 0;
753 for(
CFeat_CIit(seq, sel); it; ++it) {
766 if( best_overlap < current_overlap ) {
768best_overlap = current_overlap;
769best_processed = current_processed;
772}
else if( (best_overlap == current_overlap) && (best_processed > current_processed) ) {
774best_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() ) {
877 if( !
output.empty() ) {
890 if( string_to_split.empty() ) {
895 if( string_to_split[0] !=
'(') {
896output_vec.push_back( string_to_split );
903 size_tamount_to_chop_off_end = 0;
904 if( string_to_split[string_to_split.length() - 1] ==
')') {
905amount_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 caseobjects::CFlatFileConfig::eMode_Release:
926 caseobjects::CFlatFileConfig::eMode_Entrez:
927 returnsc_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 returnsc_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 returnsc_LegalRefSeqExceptText.find(
text.c_str()) != sc_LegalRefSeqExceptText.end();
980 boolsuppressAccession) :
981 CFlatItem(&
ctx), m_Feat(feat), m_Feat_Tree(ftree), m_Loc(loc ? loc :
982(feat ? &feat.GetLocation() :
nullptr)),
983m_SuppressAccession(suppressAccession)
1025 return "Precursor";
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 boolsuppressAccession,
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 stringprecursor_comment;
1297 if( prod_bioseq ) {
1299 if( best_prot_feat && best_prot_feat.
IsSetComment() ) {
1300precursor_comment = best_prot_feat.
GetComment() ;
1310 if( ! comment.empty() && comment !=
"~"&& comment != precursor_comment) {
1318seqfeat_note->SetAddPeriod();
1325 if( !
ctx.ShowAnnotCommentAsCOMMENT() ) {
1329 if((*it)->IsComment()) {
1330 const string& comment = (*it)->GetComment();
1332 const static stringktRNAscanSE =
"tRNA features were annotated by tRNAscan-SE";
1340 stringcomm = comment;
1376 switch(
data.GetSubtype() ) {
1406 stringraw_exception;
1412 if( raw_exception ==
"") {
1416 const boolbIsRefseq =
ctx.IsRefSeq();
1418 const boolbIsRelaxed = ((!
ctx.Config().IsModeRelease()) && (!
ctx.Config().IsModeEntrez()));
1420list<string> exceptions;
1423list<string> output_exceptions;
1424list<string> output_notes;
1425 ITERATE( list<string>, it, exceptions ) {
1427 if( cur.empty() ) {
1437 if( bIsRefseq || bIsRelaxed ||
data.IsCdregion() ) {
1438output_exceptions.push_back( cur );
1440output_notes.push_back( cur );
1445 if( bIsRefseq || bIsRelaxed ) {
1446output_exceptions.push_back( cur );
1448output_notes.push_back( cur );
1453 if(
data.IsCdregion() ) {
1456output_notes.push_back( cur );
1464output_notes.push_back( cur );
1469 if(
data.IsRna() ||
data.IsCdregion() ) {
1472output_notes.push_back( cur );
1476 const boolis_cds_or_mrna = (
data.IsCdregion() ||
1479 if( is_cds_or_mrna ) {
1482output_notes.push_back( cur );
1489 if( is_cds_or_mrna ) {
1492output_notes.push_back( cur );
1498output_exceptions.push_back( cur );
1501output_notes.push_back( cur );
1505 if( ! output_exceptions.empty() ) {
1506 stringexception =
NStr::Join( output_exceptions,
", ");
1509 if( ! output_notes.empty() ) {
1510 stringnote =
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_tiPos = 0; iPos < quals.size(); ++iPos ) {
1577 if( qual->
GetQual() ==
"old_locus_tag") {
1594 boolpseudo = 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 boolis_not_genbank =
false;
1640 const CSeq_id&
id= **id_iter;
1642 switch(
id.Which() ) {
1647is_not_genbank =
true;
1658 const CGene_ref* feat_gene_xref =
nullptr;
1660 if(! feat_gene_xref && parentFeatureItem) {
1661feat_gene_xref = parentFeatureItem->GetFeat().GetGeneXref();
1663 boolsuppressed =
false;
1665 const boolgene_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) {
1687ft = bsx->
GetFeatIndex(parentFeatureItem->GetFeat());
1709gene_ref = feat_gene_xref;
1717gene_ref = feat_gene_xref;
1721gene_ref = feat_gene_xref;
1727gene_ref = feat_gene_xref;
1731gene_ref = feat_gene_xref;
1733}
else if((! feat_gene_xref || ! suppressed) &&
1736 boolis_mapped =
false;
1737 if(parentFeatureItem) {
1738ft = bsx->
GetFeatIndex(parentFeatureItem->GetFeat());
1748 if( feat_gene_xref ) {
1749gene_ref = feat_gene_xref;
1767parent_feat_handle = parentFeatureItem->GetFeat();
1769gene_feat, parent_feat_handle );
1785ftree->AddGenesForFeat(
m_Feat,
ctx.GetAnnotSelector());
1796 if(ft && (! is_mapped)) {
1804}
else if(feat_gene_xref) {
1806gene_ref = feat_gene_xref;
1813 if(
ctx.IsEMBL() ||
ctx.IsDDBJ() ) {
1916 if(
ctx.Config().IsFormatFTable() ) {
1921 if(
ctx.UsingSeqEntryIndex() ) {
1945 boolis_not_genbank =
false;
1948 const CSeq_id&
id= **id_iter;
1950 switch(
id.Which() ) {
1955is_not_genbank =
true;
1967 boolsuppressed =
false;
1969 const boolgene_forbidden_if_genbank =
1977(is_not_genbank || ! gene_forbidden_if_genbank)) {
1978 if(feat_gene_xref) {
1983 if(feat_gene_xref && ! suppressed &&
1985gene_ref = feat_gene_xref;
1986}
else if((! feat_gene_xref || ! suppressed) &&
1989 boolis_mapped =
false;
2012 if( parentFeatureItem ) {
2013parent_feat_handle = parentFeatureItem->GetFeat();
2015gene_feat, parent_feat_handle );
2144vector<char>
n(1,
static_cast<char>(aa));
2213 switch( rna_type ) {
2219 stringtranscription;
2223 if(
rna.IsSetExt()) {
2225 switch(ext.
Which()) {
2248 const string& aa_str =
s_AaName(aa);
2249 stringamino_acid_str = aa_str;
2251 if( !aa_str.empty() ) {
2252 const string& ac_str = aa_str;
2255 if(!gbqual->IsSetQual() || !gbqual->IsSetVal())
continue;
2258amino_acid_str =
"tRNA-fMet";
2261amino_acid_str =
"tRNA-iMet";
2266 if(!gbqual->IsSetQual() || !gbqual->IsSetVal())
continue;
2269amino_acid_str =
"tRNA-Ile2";
2277ac_str.substr(5,
NPOS)));
2281 const string& comment =
2300 stringtranscription;
2307 switch( subtype ) {
2310 if( !
rna.IsSetExt() ) {
2314 if( ! ext.
IsGen() ) {
2320 if( !
rna.IsSetExt() ) {
2326 constlist< CRef< CRNA_qual > >& quals = ext.
GetGen().
GetQuals().Get();
2327list< 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 stringstrName = 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()) {
2402translation,
false);
2420translation.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 stringconflict_msg =
2539 "Protein sequence is in conflict with the conceptual translation";
2546 boolhas_prot =
false;
2563 if(
ctx.IsProt() ) {
2573 if( ! protHandle ) {
2577 if( comm && !comm->
GetComment().empty() ) {
2595 if( ! protHandle ) {
2729 const CSeq_id& seqid = **seqid_ci;
2732pTheOneUsableGeneralSeqId.
Reset();
2739 static const char*
constsc_IgnoredDbs[] = {
2753stringstream sTagStrm;
2756sTagStrm.str().swap(sTag);
2759 if( ! sDb.empty() && ! sTag.empty() &&
2760sc_IgnoredDbSet.find(sDb.c_str()) == sc_IgnoredDbSet.end() )
2762 if( pTheOneUsableGeneralSeqId ) {
2764pTheOneUsableGeneralSeqId.
Reset();
2767pTheOneUsableGeneralSeqId = *seqid_ci;
2774 const CSeq_id& seqid = **seqid_ci;
2776 switch( seqid.
Which() ) {
2782eLastRegularChoice = seqid.
Which();
2800 if( *seqid_ci == pTheOneUsableGeneralSeqId ) {
2810}
else if( protId ) {
2816 if( protId->
IsGi() ) {
2817gi = protId->
GetGi();
2845 if( ! prot_acc.empty() ) {
2878 if( !
names.empty() ) {
2882 if(
names.size() > 1 ) {
2900 if( !protRef || !protRef->
IsSetDesc() ) {
2904 stringdesc = protRef->
GetDesc();
2909prot_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 intpos = bspint.
GetTo();
3005inset = (inset % 3);
3012 for(
auto& gbqual : cds.
GetQual()) {
3013 if(!gbqual->IsSetQual() || !gbqual->IsSetVal())
continue;
3015tr_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() &&
3206list< CConstRef<CUser_object> > objs;
3212back_inserter(objs));
3217 boolfound =
false;
3251x_AddQual(eFQ_region,
3252new 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() ) {
3369 stringnucleotides = iupacna_seq_data.
GetIupacna().
Get();
3373 conststring::size_type max_len_allowed = seq_literal.
GetLength();
3374 if( nucleotides.size() > max_len_allowed ) {
3375nucleotides.resize( max_len_allowed );
3391 static const stringkOther =
"other";
3392 static const stringkDnaBinding =
"DNA binding";
3393 static const stringkInhibit =
"inhibition";
3420 if( (
ctx.Config().IsFormatGenbank() ||
3421 ctx.Config().IsFormatGBSeq() ||
3422 ctx.Config().IsFormatINSDSeq()) &&
ctx.IsProt() ) {
3439 if( oid ==
"ModelEvidence") {
3441}
else if( oid ==
"Process"|| oid ==
"Component"|| oid ==
"Function") {
3473 if( oid ==
"ModelEvidence") {
3475}
else if( oid ==
"GeneOntology") {
3492 if( ! ids.empty() ) {
3519 if(
label==
"Process") {
3521}
else if(
label==
"Component") {
3523}
else if(
label==
"Function") {
3531 if( (*it)->GetData().IsFields() ) {
3534 boolokay_to_add =
true;
3538 for( ; iter !=
m_Quals.
end() && iter->first == slot; ++iter) {
3540 if( qual.
Equals(*go_val) )
3542okay_to_add =
false;
3547 if( okay_to_add ) {
3565 if(
label==
"Process") {
3567}
else if(
label==
"Component") {
3569}
else if(
label==
"Function") {
3577 if( (*it)->GetData().IsFields() ) {
3580 boolokay_to_add =
true;
3584 for( ; iter !=
m_Quals.
end() && iter->first == slot; ++iter) {
3586 if( qual.
Equals(*go_val) )
3588okay_to_add =
false;
3593 if( okay_to_add ) {
3616 if( ! gene_ref && gene_feat ) {
3631&gene_ref->
GetLocus() :
nullptr;
3633&gene_ref->
GetDesc() :
nullptr;
3635&gene_ref->
GetSyn() :
nullptr;
3636 const string* locus_tag =
3640 if(
ctx.IsProt() ) {
3648 if( !from_overlap || okay_to_propage ) {
3652 else if(desc && okay_to_propage) {
3659 if( !
m_Gene.empty() ) {
3661 if(locus || ! locus_tag) {
3668 if( gene_ref || okay_to_propage ) {
3674 else if(locus_tag) {
3680 if( gene_ref || okay_to_propage ) {
3682 if(is_gene && desc) {
3683 stringdesc_cleaned = *desc;
3688 else if(locus_tag) {
3689 if(is_gene && desc) {
3696 if( gene_ref || okay_to_propage ) {
3701}
else if(locus_tag) {
3728 const boolis_type_where_allele_from_gene_forbidden_except_with_embl_or_ddbj =
3733 if( ! is_type_where_allele_from_gene_forbidden &&
3734( is_embl_or_ddbj || ! is_type_where_allele_from_gene_forbidden_except_with_embl_or_ddbj ) )
3756 for(CSeq_feat::TDbxref::iterator
i= xrefs.begin();
3757 i!= xrefs.end(); ++
i) {
3758 if((*i)->Equals(**it)) {
3784 const string& strPseudoGene = gene_feat->
GetNamedQual(
"pseudogene");
3807 if(
names.size() > 1) {
3812 if( !
ctx.IsProt() ) {
3813 stringdesc = pref.
GetDesc();
3818prot_desc->SetAddPeriod();
3849 if(
ctx.IsRefSeq() || !
ctx.Config().ForGBRelease() ) {
3858 if( !pseudo && (
ctx.Config().ShowPeptides() ||
ctx.Config().IsFormatGBSeq() ||
ctx.Config().IsFormatINSDSeq() ) ) {
3876 if(
ctx.IsProt() && (
ctx.IsRefSeq() ||
ctx.Config().IsFormatGBSeq() ||
ctx.Config().IsFormatINSDSeq() ) && !
IsMappedFromProt() &&
3883 boolhas_mat_peptide =
false;
3884 boolhas_propeptide =
false;
3885 boolhas_signal_peptide =
false;
3889 const boolis_pept_whole_loc = loc->
IsWhole() ||
3898 for(
CFeat_CIfeat_it(
ctx.GetHandle(), sel); feat_it; ++feat_it) {
3899 boolcopy_loc =
false;
3900 switch(feat_it->GetData().GetProt().GetProcessed()) {
3904has_signal_peptide =
true;
3905 if( (feat_it->GetLocation().GetTotalRange().GetFrom() ==
3908loc = loc->
Subtract(feat_it->GetLocation(),
3910 nullptr,
nullptr);
3916has_mat_peptide =
true;
3920has_propeptide =
true;
3934(feat_it->GetLocation().GetTotalRange().GetTo());
3952 boolproteinIsAtLeastMature;
3956proteinIsAtLeastMature =
false;
3959proteinIsAtLeastMature =
true;
3963 if( (!has_mat_peptide || !has_signal_peptide || !has_propeptide) || (proteinIsAtLeastMature) || (!is_pept_whole_loc) ) {
3984 if( !
ctx.IsRefSeq() ) {
3990!
ctx.IsRefSeq() && !
ctx.IsProt() &&
4015vals.push_back(
val);
4018list<string>::iterator it = vals.begin();
4019 while(it != vals.end()) {
4021it = vals.erase(it);
4062 static const stringkPmid(
"PMID:");
4065out_new_val.clear();
4070 while( str_pos <
val.length() ) {
4073 const SIZE_TYPEpmid_label_pos =
val.find(
"PMID:", str_pos );
4074 if( pmid_label_pos ==
NPOS) {
4077 copy(
val.begin() + str_pos,
val.end(), back_inserter(out_new_val) );
4082 const SIZE_TYPEfirst_pmid_pos = pmid_label_pos + kPmid.length();
4083 copy(
val.begin() + str_pos,
val.begin() + first_pmid_pos, back_inserter(out_new_val) );
4084str_pos = first_pmid_pos;
4088 boolfirst_num =
true;
4089 while( str_pos <
val.length() ) {
4091 const SIZE_TYPEnext_pmid_pos =
val.find_first_not_of(
" ,", str_pos);
4092 if( next_pmid_pos ==
NPOS|| !
isdigit(
val[next_pmid_pos]) ) {
4097 SIZE_TYPEend_of_pmid_pos =
val.find_first_not_of(
"0123456789", next_pmid_pos );
4098 if(
NPOS== end_of_pmid_pos ) {
4099end_of_pmid_pos =
val.length();
4103 stringpmid =
val.substr(next_pmid_pos, end_of_pmid_pos - next_pmid_pos );
4106 if( ! first_num ) {
4107out_new_val +=
',';
4109out_new_val +=
"<a href=\"";
4111out_new_val += pmid;
4112out_new_val +=
"\">";
4113out_new_val += pmid;
4114out_new_val +=
"</a>";
4115str_pos = end_of_pmid_pos;
4130 static constTLegalImport kLegalImports[] = {
4132 #define DO_IMPORT(x) { #x, eFQ_##x } 4189 boolcheck_qual_syntax =
ctx.Config().CheckQualSyntax();
4193 boolfirst_pseudogene =
true;
4195vector<string> replace_quals;
4198 if(!(*it)->IsSetQual() || !(*it)->IsSetVal()) {
4201 const string&
val= (*it)->GetVal();
4203 const char* name = (*it)->GetQual().c_str();
4204 constTLegalImportMap::const_iterator li = kLegalImportMap.find(name);
4206 if( li != kLegalImportMap.end() ) {
4208}
else if(check_qual_syntax) {
4220 if(
val.empty() ) {
4242 if((*it)->IsSetVal()) {
4249 if((*it)->IsSetVal()) {
4266 if((*it)->IsSetVal()) {
4281 if( ! old_locus_tag_added_elsewhere ) {
4299 if((*it)->IsSetVal() &&
4315 const string& gene_val =
4318 const string& product_val =
4320 if(
val!= gene_val &&
val!= product_val) {
4321 if( !
ctx.Config().CodonRecognizedToNote() ||
4335 if(!
ctx.Config().CheckQualSyntax() ||
4344 if(
val==
"EXPERIMENTAL") {
4346}
else if(
val==
"NOT_EXPERIMENTAL") {
4359 if(string::npos == s.find_first_not_of(
"ACGTUacgtu")) {
4363replace_quals.push_back(s);
4394 if( first_pseudogene ) {
4395first_pseudogene =
false;
4416 if(replace_quals.size()) {
4417 std::sort(replace_quals.begin(), replace_quals.end());
4418 ITERATE(vector<string>, it, replace_quals) {
4440 const string& rpt_unit )
4443 if(rpt_unit.empty()) {
4447vector<string> units;
4451 string tmp= rpt_unit.substr(1, rpt_unit.length() - 2);
4454units.push_back(rpt_unit);
4468 const string& rpt_type,
4469 boolcheck_qual_syntax )
4472 if(rpt_type.empty()) {
4476 string value( rpt_type );
4479vector<string> pieces;
4482 ITERATE( vector<string>, it, pieces ) {
4516 const string& recombination_class,
4517 boolcheck_qual_syntax
4521 if(recombination_class.empty()) {
4525 stringrecomb_class = recombination_class;
4542 const string& regulatory_class,
4543 boolcheck_qual_syntax
4547 if(regulatory_class.empty()) {
4551 stringreg_class = regulatory_class;
4581 #define DO_QUAL(x) x_FormatQual(eFQ_##x, #x, qvec) 4584 DO_QUAL(recombination_class);
4625 DO_QUAL(artificial_location);
4687 DO_QUAL(mobile_element_type);
4762 #define DO_NOTE(x) x_FormatNoteQual(eFQ_##x, GetStringOfFeatQual(eFQ_##x), qvec) 4763 #define DO_NOTE_PREPEND_NEWLINE(x) x_FormatNoteQual(eFQ_##x, GetStringOfFeatQual(eFQ_##x), qvec, IFlatQVal::fPrependNewline ) 4795 booladd_period =
true;
4799 if(
GetContext()->Config().GoQualsToNote()) {
4809 #undef DO_NOTE_PREPEND_NEWLINE 4820 while(it != end && it->first == slot) {
4837 while(it != end && it->first == slot) {
4852vector<CConstRef<CFlatGoQVal> > goQuals;
4856 while(it != end && it->first == slot) {
4861 if( goQuals.empty() ) {
4872string::size_type this_part_beginning_text_string_pos = 0;
4875 const string* pLastQualTextString =
nullptr;
4880 const string*pThisQualTextString = &(*iter)->GetTextString();
4881 if(! pThisQualTextString) {
4887 if(! pLastQualTextString || !
NStr::EqualNocase(*pLastQualTextString, *pThisQualTextString)) {
4889 if( ! combined.empty() ) {
4891this_part_beginning_text_string_pos = combined.length() - 1;
4893combined += temp_qvec.back()->GetValue();
4897 const string& new_value = temp_qvec.back()->GetValue();
4902post_text_string_pos += pLastQualTextString->length();
4906 stringstr_to_append = new_value.substr( post_text_string_pos,
4907(pLastQualTextString->length() - post_text_string_pos) );
4908 if(
NStr::Find(combined, str_to_append, this_part_beginning_text_string_pos) ==
NPOS) {
4909combined.append( str_to_append );
4913pLastQualTextString = pThisQualTextString;
4915pLastQualTextString =
nullptr;
4918 if( ! combined.empty() ) {
4919 const stringprefix =
" ";
4920 const stringsuffix =
";";
4922qvec.push_back(res);
4961{
"insertion sequence",
false},
4962{
"integron",
false},
4963{
"non-LTR retrotransposon",
false},
4965{
"retrotransposon",
false},
4966{
"transposon",
false}
4975 if( mobile_element_type_value.empty() ) {
4980string::size_type colon_pos = mobile_element_type_value.find(
':');
4982 const stringvalue_before_colon = ( string::npos == colon_pos
4983? mobile_element_type_value
4984: mobile_element_type_value.substr( 0, colon_pos ) );
4987sm_MobileElemTypeKeys.find( value_before_colon.c_str() );
4988 if( prefix_info == sm_MobileElemTypeKeys.end() ) {
4993 if( prefix_info->second ) {
4994 if( string::npos == colon_pos ) {
5021(gene_ref && gene_ref->
IsSetSyn() && !gene_ref->
GetSyn().empty() )
5028 if(
ctx.Config().DropIllegalQuals()) {
5039 const string& gene_name = gene->
GetValue();
5045seqfeat_note =
nullptr;
5053prot_desc =
nullptr;
5060CProt_ref::TName::iterator remove_start = prot_names->
SetValue().begin();
5062CProt_ref::TName::iterator new_end =
5063 remove( remove_start, prot_names->
SetValue().end(), gene_name );
5066 if(prot_names->
GetValue().empty()) {
5068prot_names =
nullptr;
5074 const string& pdesc = prot_desc->
GetValue();
5078CProt_ref::TName::iterator remove_start = prot_names->
SetValue().begin();
5080CProt_ref::TName::iterator new_end =
5085 if(prot_names->
GetValue().empty()) {
5087prot_names =
nullptr;
5095prot_desc =
nullptr;
5100 if(prot_desc && standard_name) {
5105prot_desc =
nullptr;
5111 if(prot_desc && gene_syn && cds_prod) {
5115prot_desc =
nullptr;
5132seqfeat_note =
nullptr;
5135 if(cds_product && seqfeat_note) {
5138seqfeat_note =
nullptr;
5153seqfeat_note =
nullptr;
5161 if( feat_comment ==
"tRNA-") {
5163seqfeat_note =
nullptr;
5168 if(note && standard_name) {
5174 if(!
ctx.IsProt() && note && gene_syn) {
5183 if(note && prot_desc) {
5199 if(
ctx.Config().IsModeRelease() ||
ctx.Config().IsModeEntrez() ) {
5211 while( pseudogene_iter !=
m_Quals.
end() &&
5220 TQIpseudogene_iter_to_erase = pseudogene_iter;
5364 if( it != sc_QualMap.end() ) {
5378 if( !
data.IsLegalQualifier(qual) ) {
5389 return data.IsLegalQualifier(qual);
5458ev =
"experimental";
5461ev =
"not_experimental";
5468 if( exception_text ==
"ribosomal slippage") {
5471 else if( exception_text ==
"trans-splicing") {
5474 else if( exception_text ==
"circular RNA") {
5487 if( !
key.empty() && !
val.empty() ) {
5489(
key==
"protein_id"||
5490 key==
"orig_protein_id"||
5491 key==
"transcript_id"||
5492 key==
"orig_transcript_id"))
5502 if(
data.IsGene() ) {
5504}
else if(
data.IsProt() ) {
5533 if( oid ==
"GeneOntology") {
5539 if(
label==
"Process") {
5540name =
"GO_process";
5541}
else if(
label==
"Component") {
5542name =
"GO_component";
5543}
else if(
label==
"Function") {
5544name =
"GO_function";
5546 if( name.empty() ) {
5551 if( (*it)->GetData().IsFields() ) {
5567 const CDbtag& dbt = **it;
5571 switch( oid.
Which() ) {
5573 if( !oid.
GetStr().empty() ) {
5646 stringseq(
"---");
5656 x_AddFTableQual(
"anticodon",
"(pos:"+ pos +
",aa:"+ aa +
",seq:"+ seq +
")");
5673 if(
rna.IsSetExt()) {
5676 if(!ext.
GetName().empty()) {
5679}
else if(ext.
IsTRNA()) {
5686 else if( ext.
IsGen() ) {
5688 if(
gen.IsSetClass() ) {
5689 if(
gen.IsLegalClass()) {
5698 if(
gen.IsSetProduct() ) {
5709!(
ctx.Config().HideGI() ||
ctx.Config().IsPolicyFtp() ||
ctx.Config().IsPolicyGenomes()));
5726 const CSeq_id* accn =
nullptr;
5728 const CSeq_id* general =
nullptr;
5729 const CSeq_id* gi =
nullptr;
5732 switch((*it)->Which()) {
5734 local= it->GetPointer();
5747accn = it->GetPointer();
5750 if(!(*it)->GetGeneral().IsSkippable()) {
5751general = it->GetPointer();
5755gi = it->GetPointer();
5769 if(!
label.empty()) {
5775 if(
local&& (! suppress_local) &&
label.empty()) {
5779 if(gi && giOK &&
label.empty()) {
5817 stringaa =
"OTHER";
5818 switch((*it)->GetAa().Which()) {
5820aa =
GetAAName((*it)->GetAa().GetNcbieaa(),
true);
5823aa =
GetAAName((*it)->GetAa().GetNcbi8aa(),
false);
5826aa =
GetAAName((*it)->GetAa().GetNcbistdaa(),
false);
5831 x_AddFTableQual(
"transl_except",
"(pos:"+ pos +
",aa:"+ aa +
")");
5836 if(gcode > 1 && gcode != 255) {
5843!(
ctx.Config().HideGI() ||
ctx.Config().IsPolicyFtp() ||
ctx.Config().IsPolicyGenomes()));
5855 if( !
prot.GetData().IsProt() ) {
5860 if(
prot.IsSetComment() && !
prot.GetComment().empty() ) {
5871 if( !it->empty() ) {
5879 if( !it->empty() ) {
5884 if( !it->empty() ) {
5895 if( !region.empty() ) {
5931 if( !het.
Get().empty() ) {
5941 if( !res.empty() ) {
5949 switch( subtype ) {
5998 switch( subtype ) {
6048 if( (*it)->IsSetSubtype() ) {
6050 if(
str.empty() ) {
6053 if( (*it)->IsSetSubname() && !(*it)->GetSubname().empty() ) {
6054 str+= (*it)->GetSubname();
6063 if( (*it)->IsSetSubtype() ) {
6065 if(
str.empty() ) {
6068 if( (*it)->IsSetName() ) {
6069 str+= (*it)->GetName();
6158 const string& strRawName )
6160 if( !
ctx.Config().DoHTML() ) {
6172 if( ! coll.empty() ) {
6178 if( voucher_info_ref ) {
6179ostringstream
text;
6182 if(inst_full_name.empty()) {
6183inst_full_name = voucher_info_ref->m_InstFullName;
6185 text<<
"<acronym title=\"" 6187<<
"\" class=\"voucher\">" 6188<< inst <<
"</acronym>" 6190<<
"<a href=\""<< *voucher_info_ref->m_Links;
6192 if( voucher_info_ref->m_PrependInstitute) {
6195 if( voucher_info_ref->m_PrependCollection) {
6198 if(voucher_info_ref->m_Prefix) {
6199 text<< *voucher_info_ref->m_Prefix;
6201 if(voucher_info_ref->m_Trim) {
6202 const string& trim = *voucher_info_ref->m_Trim;
6208 if(voucher_info_ref->m_PadTo > 0 && voucher_info_ref->m_PadWith) {
6209 intlen_id = (
int)
id.length();
6210 intlen_pad = (
int) voucher_info_ref->m_PadWith->length();
6211 while(len_id < voucher_info_ref->m_PadTo) {
6212 text<< *voucher_info_ref->m_PadWith;
6217 if( voucher_info_ref->m_Suffix ) {
6218 text<< *voucher_info_ref->m_Suffix;
6220 text<<
"\">"<<
id<<
"</a>";
6225 if( ! inst_full_name.empty() ) {
6226ostringstream
text;
6228 text<<
"<acronym title=\""<<
NStr::Replace(inst_full_name,
"\"",
""") <<
"\" class=\"voucher\">" 6229<< inst <<
"</acronym>" 6248 if( taxname.
empty() &&
ctx.Config().NeedOrganismQual() ) {
6249taxname =
"unknown";
6254 if( !taxname.
empty() ) {
6257 if( !common.
empty() ) {
6266 const string& sSubname = (
6272 if( ecotypesSeen.
find(sSubname) != ecotypesSeen.
end() ) {
6275ecotypesSeen.
insert( sSubname );
6289( sSubname.empty() ?
kEmptyStr:
"type_material: "+ sSubname ) ));
6314 if( primers.
CanGet() ) {
6316 stringprimer_value;
6318 boolhas_fwd_seq =
false;
6319 boolhas_rev_seq =
false;
6321 if( (*it)->IsSetForward() ) {
6323 if( forward.
CanGet() ) {
6325 const string&fwd_name = ( (*it2)->CanGetName() ? (*it2)->GetName().Get() :
kEmptyStr);
6326 if( ! fwd_name.empty() ) {
6329 const string&fwd_seq = ( (*it2)->CanGetSeq() ? (*it2)->GetSeq().Get() :
kEmptyStr);
6331 if( ! fwd_seq.empty() ) {
6333has_fwd_seq =
true;
6338 if( (*it)->IsSetReverse() ) {
6340 if( reverse.
CanGet() ) {
6342 const string&rev_name = ((*it2)->CanGetName() ? (*it2)->GetName().Get() :
kEmptyStr);
6343 if( ! rev_name.empty() ) {
6346 const string&rev_seq = ( (*it2)->CanGetSeq() ? (*it2)->GetSeq().Get() :
kEmptyStr);
6348 if( ! rev_seq.empty() ) {
6350has_rev_seq =
true;
6356 if( ! primer_value.empty() ) {
6357 const boolis_in_note = ( ! has_fwd_seq || ! has_rev_seq );
6359primer_value =
"PCR_primers="+ primer_value;
6381 boolinsertion_seq_name =
false,
6382plasmid_name =
false,
6383transposon_name =
false;
6391insertion_seq_name =
true;
6396plasmid_name =
true;
6401transposon_name =
true;
6427organelle.
Reset();
6443 #define DO_QUAL(x) x_FormatQual(eSQ_##x, GetStringOfSourceQual(eSQ_##x), qvec) 6490 if( !
GetContext()->Config().FrequencyToNote() ) {
6497 DO_QUAL(environmental_sample);
6524 if( !
GetContext()->Config().SrcQualsToNote() ) {
6546 #define DO_QUAL(x) x_FormatQual(eSQ_##x, GetStringOfSourceQual(eSQ_##x), qvec) 6570 if(
GetContext()->Config().FrequencyToNote() ) {
6582 DO_QUAL(endogenous_virus_name);
6624 booladd_period =
false;
6626 #define DO_NOTE(x) x_FormatNoteQual(eSQ_##x, #x, qvec) 6635 if(
GetContext()->Config().SrcQualsToNote() ) {
6658 if(
GetContext()->Config().FrequencyToNote() ) {
6684 if(
GetContext()->Config().SrcQualsToNote() ) {
6696 static const stringkEOL =
"\n";
6697notestr +=
"extrachromosomal";
6730ival.
SetId(*
ctx.GetPrimaryId());
6734an->
SetData().SetFtable().push_back(feat);
6754 while(it != end && it->first == slot) {
6777 const string&
key,
6778 string&
value)
const 6782 for( CSeq_feat::TQual::iterator it = gbQuals.begin();
6783it != gbQuals.end(); ++it )
6791 if(!(*it)->IsSetQual() || !(*it)->IsSetVal()) {
6794 if( (*it)->GetQual() ==
key) {
6795 value= (*it)->GetVal();
6816 if( ! ext_type.
IsStr() || ext_type.
GetStr() !=
"CombinedFeatureUserObjects") {
6827 if( ! field_label.
IsStr() || ! field_data.
IsObject() ||
6828field_label.
GetStr() !=
"ModelEvidence")
6842 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
@ fFlags_showEvenIfRedund
@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)
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
TTo GetTo(void) const
Get the To member data.
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.
EType
type of RNA feature
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.
E_Choice
Choice variants.
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_Ncbi8aa
NCBI8aa code.
@ 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.
E_Choice
Choice variants.
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.
E_Choice
Choice variants.
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)
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_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...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4