78 if ( (*it !=
'"') && (*it !=
'\'') ) {
91 const string *text_string =
nullptr,
99 if ( !(*it)->IsSetLabel() || !(*it)->GetLabel().IsStr() ) {
103 const string&
label = (*it)->GetLabel().GetStr();
107 if (
label ==
"text string") {
108 text_string = &data.
GetStr();
109 }
else if (
label ==
"go id") {
111 }
else if (
label ==
"evidence") {
112 evidence = &data.
GetStr();
113 }
else if (
label ==
"go ref") {
116 }
else if (data.
IsInt()) {
117 if (
label ==
"go id") {
120 }
else if (
label ==
"pubmed id") {
128 go_text = *text_string;
141 go_text += *evidence;
144 bool add_dash =
false;
149 go_text +=
"<a href=\"";
152 go_text +=
string(
"GO:" );
156 if (text_string && text_string->length() > 0) {
158 go_text +=
string(
" - " );
161 go_text += *text_string;
163 if (is_html && go_id) {
167 go_text +=
string(
" [Evidence " ) + *evidence +
string(
"]" );
172 go_text +=
" [PMID ";
173 if (is_html && go_id) {
174 go_text +=
"<a href=\"";
178 if(is_html && go_id) {
184 go_text +=
" [GO Ref ";
186 go_text +=
"<a href=\"";
214 static const char kIdxToSymbol[] =
"?ACMGRSVUWYHKDBN";
216 vector<char> symbol_to_idx(256,
'\0');
217 for (
size_t i = 0;
i <
sizeof(kIdxToSymbol) - 1; ++
i) {
218 symbol_to_idx[kIdxToSymbol[
i]] =
i;
221 size_t idx = symbol_to_idx[str1[2]] | symbol_to_idx[str2[2]];
222 return kIdxToSymbol[idx];
239 if (!codon.empty()) {
250 list<string>::iterator it =
codons.begin();
251 list<string>::iterator
prev = it++;
252 while (it !=
codons.end()) {
253 string& codon1 = *
prev;
254 string& codon2 = *it;
255 if (codon1[0] == codon2[0] && codon1[1] == codon2[1]) {
278 const char *pch =
str.c_str();
281 if( *pch ==
'+' || *pch ==
'-' ) {
320 m_Style(style), m_Flags(
flags), m_Trim(trim), m_AddPeriod(
false)
329 m_Style(style), m_Flags(
flags), m_Trim(trim), m_AddPeriod(
false)
339 m_Style(style), m_Trim(trim), m_AddPeriod(0)
352 m_Style(style), m_Trim(trim), m_AddPeriod(0)
360 m_Style(
CFormatQual::eQuoted), m_Trim(trim), m_AddPeriod(0)
380 if( sc_NameTildeStyleMap.end() ==
result ) {
390 bool bHtml =
ctx.Config().DoHTML();
391 if ( bHtml && name ==
"EC_number" ) {
392 string strLink =
"<a href=\"";
420 const bool forceNoValue = (
421 !
ctx.Config().SrcQualsToNote() &&
423 name ==
"metagenomic" );
427 q, (is_note ?
"note" : name),
433 qual->SetAddPeriod();
447 if (
ctx.Config().CheckQualSyntax()) {
451 bool has_space =
false;
453 if (
isspace((
unsigned char)(*it))) {
455 }
else if (has_space) {
502 if (
m_Value ==
"transmembrane-region" ) {
503 m_Value =
"transmembrane region";
505 if (
m_Value ==
"signal-peptide" ) {
508 if (
m_Value ==
"transit-peptide" ) {
511 if (
m_Value !=
"transit peptide" &&
m_Value !=
"signal peptide" &&
514 const static char *pchSiteSuffix =
" site";
555 const SIZE_TYPE min_length =
min( str1.length(), str2.length() );
556 for( ; pos < min_length; ++pos ) {
557 const char textComparison =
toupper( str1[pos] ) -
toupper( str2[pos] );
558 if( textComparison != 0 ) {
559 return textComparison < 0;
563 return ( str1.length() < str2.length() );
577 string qual =
"gene_synonym";
578 const list<string> &synonyms =
GetValue();
580 std::copy(synonyms.begin(), synonyms.end(),
588 if (
ctx.IsRefSeq() && !
ctx.Config().IsModeDump()) {
591 ITERATE (vector<string>, it, sub) {
602 static const char* kOTHER =
"OTHER";
605 const char* aa = kOTHER;
606 switch ((*it)->GetAa().Which()) {
608 aa =
GetAAName((*it)->GetAa().GetNcbieaa(),
true);
611 aa =
GetAAName((*it)->GetAa().GetNcbi8aa(),
false);
614 aa =
GetAAName((*it)->GetAa().GetNcbistdaa(),
false);
621 x_AddFQ(q, name,
"(pos:" + pos +
",aa:" + aa +
')',
641 switch(
m_Value->GetStatus() ) {
643 nomenclature +=
"Official ";
646 nomenclature +=
"Interim ";
649 nomenclature +=
"Unclassified ";
652 nomenclature +=
"Symbol: ";
655 nomenclature +=
m_Value->GetSymbol();
659 nomenclature +=
" | Name: " +
m_Value->GetName();
663 if(
m_Value->CanGetSource() ) {
667 if(
source.GetTag().IsId() || (
source.GetTag().IsStr() && !
source.GetTag().GetStr().empty() ) ) {
668 nomenclature +=
" | Provided by: " +
source.GetDb() +
":";
669 if(
source.GetTag().IsStr() ) {
670 nomenclature +=
source.GetTag().GetStr();
699 const string&
value )
702 if (
m_str.empty() ) {
703 m_str =
"experimental evidence, no additional details recorded";
715 m_str(
"non-experimental evidence, no additional details recorded" )
762 const char* s =
nullptr;
771 s =
"unassigned DNA";
774 s =
"unassigned RNA";
813 s =
"transcribed RNA";
839 s =
"unassigned RNA";
846 s =
"unassigned DNA";
866 const CDbtag& dbtag =
id.GetGeneral();
867 if ( ! dbtag.
IsSetDb() )
continue;
877 if (
len != 6 &&
len != 8 )
continue;
879 for (
int i = 0;
i <
len;
i++ ) {
883 if ( num_digits > 0 ) {
892 if ( num_letters != 4 && num_letters != 6 ) {
895 if ( num_digits != 2 ) {
898 if ( bail )
continue;
926 if (!
subname.empty() || add_period ) {
927 bool is_src_orgmod_note =
929 if (is_src_orgmod_note) {
940 if (add_period && qual) {
941 qual->SetAddPeriod();
955 const string& organelle
965 x_AddFQ(q, name,
"plastid:" + organelle);
969 x_AddFQ(q, name,
"mitochondrion:kinetoplast");
1006 const bool bHtml =
ctx.Config().DoHTML();
1015 if(
ctx.GetReferences().empty() ) {
1021 CPub_set_Base::TPub::iterator pub_iter = unusedPubs.begin();
1022 for( ; pub_iter != unusedPubs.end() ; ++pub_iter ) {
1023 if( (*ref_iter)->Matches( **pub_iter ) ) {
1027 int serial = (*ref_iter)->GetSerial();
1028 TEntrezId pmid = (*ref_iter)->GetPMID();
1042 value =
"[<a href=\"";
1045 value =
'[' + pub_id_str +
']';
1049 pub_iter = unusedPubs.erase( pub_iter );
1058 if (
ctx.IsRefSeq() && !
ctx.Config().IsModeRelease()) {
1059 CPub_set_Base::TPub::iterator pub_iter = unusedPubs.begin();
1060 for (; pub_iter != unusedPubs.end(); ++pub_iter) {
1061 if ((*pub_iter)->IsPmid()) {
1062 const TEntrezId pmid = (*pub_iter)->GetPmid().Get();
1064 pubmed =
"[PUBMED ";
1066 pubmed +=
"<a href=\"";
1086 bool bHtml =
ctx.Config().DoHTML();
1089 if ( bHtml && name ==
"transl_table" ) {
1090 string link =
"<a href=\"";
1105 bool bHtml =
ctx.Config().DoHTML();
1111 if ((
ctx.Config().HideGI() ||
ctx.Config().IsPolicyFtp() ||
ctx.Config().IsPolicyGenomes()) && name ==
"db_xref")
return;
1118 if (name ==
"protein_id") {
1119 ctx.Config().GetHTMLFormatter().FormatProteinId(id_str, *
m_Value,
string(id_str));
1121 if (name ==
"transcript_id") {
1122 ctx.Config().GetHTMLFormatter().FormatTranscriptId(id_str, *
m_Value,
string(id_str));
1132 subname.replace(pos, 1,
"<");
1135 subname.replace(pos, 1,
">");
1141 string north_or_south;
1143 string east_or_west;
1149 if (ch < '0' || ch >
'9') {
1155 lat_lon_stream >> lat;
1156 lat_lon_stream >> north_or_south;
1157 lat_lon_stream >> lon;
1158 lat_lon_stream >> east_or_west;
1159 if( lat_lon_stream.bad() ) {
1163 if( north_or_south !=
"N" && north_or_south !=
"S" ) {
1167 if( east_or_west !=
"E" && east_or_west !=
"W" ) {
1177 if( lon_num < -180.0 ) {
1179 }
else if( lon_num > 180.0 ) {
1182 if( lat_num < -90.0 ) {
1184 }
else if( lat_num > 90.0 ) {
1210 result <<
"<a href=\"" <<
"https://www.google.com/maps/place/"
1225 vector< string > fwd_names;
1234 vector< string > rev_names;
1243 vector< string > fwd_seqs;
1249 if ( fwd_seqs.empty() ) {
1253 vector< string > rev_seqs;
1260 for (
size_t i=0;
i < fwd_seqs.size(); ++
i ) {
1264 if (
i < fwd_names.size() ) {
1265 value += sep +
"fwd_name: ";
1269 if(
i < fwd_seqs.size() ) {
1270 value += sep +
"fwd_seq: ";
1274 if (
i < rev_names.size() ) {
1275 value += sep +
"rev_name: ";
1279 if(
i < rev_seqs.size() ) {
1280 value += sep +
"rev_seq: ";
1290 string north_or_south;
1292 string east_or_west;
1298 if (ch < '0' || ch >
'9') {
1304 lat_lon_stream >> lat;
1305 lat_lon_stream >> north_or_south;
1306 lat_lon_stream >> lon;
1307 lat_lon_stream >> east_or_west;
1308 if( lat_lon_stream.bad() ) {
1312 if( north_or_south !=
"N" && north_or_south !=
"S" ) {
1316 if( east_or_west !=
"E" && east_or_west !=
"W" ) {
1322 size_t len = lat.length();
1323 if (pos + 9 <
len) {
1330 size_t len = lon.length();
1331 if (pos + 9 <
len) {
1336 return lat +
" " + north_or_south +
" " + lon +
" " + east_or_west;
1350 if (
ctx.Config().DoHTML()) {
1357 bool is_subsource_note =
1359 if (is_subsource_note) {
1368 if (add_period && qual) {
1369 qual->SetAddPeriod();
1391 if(
ctx.Config().DoHTML() ) {
1401 ( !
ctx.Config().IsModeRelease() && !
ctx.Config().IsModeEntrez() ) )
1421 return (dbt1->
Compare(*dbt2)<0);
1437 string db_xref; db_xref.reserve(100);
1440 const CDbtag& dbt = **it;
1446 if (db ==
"PID" || db ==
"GI") {
1458 if (
ctx.Config().DropBadDbxref()) {
1471 if (!dbt.
IsApproved( is_refseq, is_source, is_est_or_gss )) {
1480 }
else if (
tag.IsStr()) {
1519 db_xref.append(db.
data(), db.
length()).push_back(
':');
1521 if (
ctx.Config().DoHTML()) {
1522 string url = dbt.
GetUrl(
ctx.GetTaxname() );
1524 db_xref.append(
"<a href=\"").append(url).append(
"\">").append(
id).append(
"</a>");
1533 if (quals_already_done.
find(db_xref) == quals_already_done.
end()) {
1534 quals_already_done.
insert(db_xref);
1552 dynamic_cast<const CFlatXrefQVal*
>(gxref->second.GetPointerOrNull());
1555 if (dbtag.
Match(**dbt)) {
1614 size_t num_mrna = 0, num_prot = 0, num_est = 0, num_long_sra = 0;
1615 size_t rnaseq_base_coverage = 0, rnaseq_biosamples_introns_full = 0;
1616 const string* method =
nullptr;
1624 if (
label ==
"Method") {
1629 }
else if (
label ==
"Counts") {
1631 if (!(*i)->IsSetLabel() && (*i)->GetLabel().IsStr()) {
1634 const string&
label = (*i)->GetLabel().GetStr();
1635 if (
label ==
"mRNA") {
1636 num_mrna = (*i)->GetData().GetInt();
1637 }
else if (
label ==
"EST") {
1638 num_est = (*i)->GetData().GetInt();
1639 }
else if (
label ==
"Protein") {
1640 num_prot = (*i)->GetData().GetInt();
1641 }
else if (
label ==
"long SRA read") {
1642 num_long_sra = (*i)->GetData().GetInt();
1645 }
else if (
label ==
"mRNA") {
1647 }
else if (
label ==
"EST") {
1649 }
else if (
label ==
"Protein") {
1651 }
else if (
label ==
"long SRA read") {
1653 }
else if (
label ==
"rnaseq_base_coverage" ) {
1657 }
else if (
label ==
"rnaseq_biosamples_introns_full" ) {
1665 text <<
"Derived by automated computational analysis";
1667 text <<
" using gene prediction method: " << *method;
1671 if (num_mrna > 0 || num_est > 0 || num_prot > 0 || num_long_sra > 0 ||
1672 rnaseq_base_coverage > 0 )
1674 text <<
" Supporting evidence includes similarity to:";
1676 string section_prefix =
" ";
1678 if( num_mrna > 0 || num_est > 0 || num_prot > 0 || num_long_sra > 0 )
1680 text << section_prefix;
1696 if (num_long_sra > 0) {
1697 text <<
prefix << num_long_sra <<
" long SRA read";
1698 if (num_long_sra > 1) {
1710 section_prefix =
", and ";
1713 if( rnaseq_base_coverage > 0 )
1715 text << section_prefix;
1717 text << rnaseq_base_coverage <<
"% coverage of the annotated genomic feature by RNAseq alignments";
1718 if( rnaseq_biosamples_introns_full > 0 ) {
1719 text <<
", including " << rnaseq_biosamples_introns_full;
1721 if( rnaseq_biosamples_introns_full > 1 ) {
1724 text <<
" with support for all annotated introns";
1727 section_prefix =
", and ";
1741 const bool is_ftable =
ctx.Config().IsFormatFTable();
1742 const bool is_html =
ctx.Config().DoHTML();
1745 static const string sfx =
";";
1766 if( textStringField.
IsNull() ) {
1771 if( ! textStringData.
IsStr() ) {
1775 return textStringData.
GetStr();
1785 if( pmidField.
IsNull() ) {
1790 if( ! pmidData.
IsInt() ) {
1794 return pmidData.
GetInt();
1803 if (
m_Aa.empty() ) {
1815 text += locationString;
1824 if (seq_vector.
size() == 3) {
1857 if (
ctx.Config().CodonRecognizedToNote() ) {
1859 string str =
"codon recognized: " + recognized;
1865 x_AddFQ(q, name,
"codons recognized: " + recognized);
1868 x_AddFQ(q,
"codon_recognized", recognized);
1884 CProt_ref::TName::const_iterator it =
m_Value.begin();
1888 x_AddFQ(quals, (note ?
"note" : name), *it);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
bool Match(const CDbtag &dbt2) const
string GetUrl(void) const
bool IsApproved(EIsRefseq refseq=eIsRefseq_No, EIsSource is_source=eIsSource_No, EIsEstOrGss is_est_or_gss=eIsEstOrGss_No) const
int Compare(const CDbtag &dbt2) const
CConstRef< CSeq_loc > m_Anticodon
void Format(TFlatQuals &q, const CTempString &n, CBioseqContext &ctx, TFlags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CCdregion::TCode_break m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CFlatCodonQVal(unsigned int codon, unsigned char aa, bool is_ascii=true)
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CFlatExperimentQVal(const string &="")
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
int GetPubmedId(void) const
bool Equals(const CFlatGoQVal &rhs) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CConstRef< CUser_field > m_Value
const string & GetTextString(void) const
CConstRef< CGb_qual > m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CFlatInferenceQVal(const string &="")
void Format(TFlatQuals &q, const CTempString &n, CBioseqContext &, TFlags) const
CConstRef< CUser_object > m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CConstRef< CGene_ref_Base::TFormal_name > m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CConstRef< COrgMod > m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CBioSource::TGenome m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CConstRef< CPub_set > m_Value
CConstRef< CSeq_id > m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
const string & GetString(void) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
const TValue & GetValue(void) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CFlatStringQVal(const CTempString &value, TStyle style=CFormatQual::eQuoted, ETrim trim=CFormatQual::eTrim_Normal)
IFlatQVal::TFlags m_AddPeriod
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
CConstRef< CSubSource > m_Value
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
const string & m_Seqfeat_note
CConstRef< CTrna_ext > m_Value
void Format(TFlatQuals &q, const CTempString &n, CBioseqContext &ctx, TFlags) const
void Format(TFlatQuals &quals, const CTempString &name, CBioseqContext &ctx, TFlags flags) const
bool x_XrefInGeneXref(const CDbtag &dbtag) const
CConstRef< TQuals > m_Quals
static string IndexToCodon(int index)
static void GetPrefixAndRemainder(const string &inference, string &prefix, string &remainder)
bool operator()(const string &str1, const string &str2)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
TQualMMap::const_iterator const_iterator
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
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
Return a field reference representing the tokenized key, or a NULL reference if the key doesn't exist...
static const string kSpace
static const string kSemicolonEOL
static const string kSemicolon
TFlatQual x_AddFQ(TFlatQuals &q, const CTempString &n, const CTempString &v, TStyle st=CFormatQual::eQuoted, CFormatQual::TFlags flags=0, ETrim trim=CFormatQual::eTrim_Normal) const
static const string kComma
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
const TResidue codons[4][4]
SStrictId_Entrez::TId TEntrezId
TEntrezId type for entrez ids which require the same strictness as TGi.
#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.
#define ENUM_METHOD_NAME(EnumName)
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
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.
@ eContent
Untagged human-readable accession or the like.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#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 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 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 double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate spaces 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.
const char * data(void) const
Return a pointer to the array represented.
void erase(size_type pos=0)
Truncate the string at some specified position Note: basic_string<> supports additional erase() optio...
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.
size_type length(void) const
Return the length of the represented array.
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 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 & ToLower(string &str)
Convert string to lower case – string& version.
@ eNocase
Case insensitive compare.
static const char label[]
TSubtype GetSubtype(void) const
Get the Subtype member data.
bool CanGetName(void) const
Check if it is safe to call GetName method.
const TName & GetName(void) const
Get the Name member data.
@ eSubtype_lat_lon
+/- decimal degrees
@ eSubtype_environmental_sample
const TStr & GetStr(void) const
Get the variant data.
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.
const TTag & GetTag(void) const
Get the Tag member data.
const TData & GetData(void) const
Get the Data member data.
bool CanGetData(void) const
Check if it is safe to call GetData method.
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
bool IsFields(void) const
Check if variant Fields is selected.
bool IsInt(void) const
Check if variant Int is selected.
bool IsStr(void) const
Check if variant Str is selected.
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.
TInt GetInt(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TLabel & GetLabel(void) const
Get the Label member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CRef< CUser_field > > TData
const TSubname & GetSubname(void) const
Get the Subname member data.
const TPub & GetPub(void) const
Get the variant data.
bool IsPub(void) const
Check if variant Pub is selected.
const TCodon & GetCodon(void) const
Get the Codon member data.
bool IsSetCodon(void) const
codon(s) as in Genetic-code Check if a value has been assigned to Codon data member.
const TVal & GetVal(void) const
Get the Val member data.
list< CRef< CCode_break > > TCode_break
const TQual & GetQual(void) const
Get the Qual member data.
@ e_Ncbieaa
ASCII value of NCBIeaa code.
bool IsGi(void) const
Check if variant Gi is selected.
@ e_General
for other databases
TTech GetTech(void) const
Get the Tech member data.
list< CRef< CSeq_id > > TId
bool CanGetTech(void) const
Check if it is safe to call GetTech method.
@ eTech_targeted
targeted locus sets/studies
@ eTech_tsa
transcriptome shotgun assembly
@ eTech_wgs
whole genome shotgun sequencing
@ eTech_survey
one-pass genomic sequence
@ eTech_est
Expressed Sequence Tag.
@ eBiomol_pre_RNA
precursor RNA of any sort really
@ eBiomol_cRNA
viral RNA genome copy intermediate
@ eBiomol_snoRNA
small nucleolar RNA
@ eBiomol_transcribed_RNA
transcribed RNA other than existing classes
@ eBiomol_other_genetic
other genetic material
char * dbname(DBPROCESS *dbproc)
Get name of current database.
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::SIZE size
const CharType(& source)[N]
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
bool TrimSpacesAndJunkFromEnds(string &str, bool allow_ellipsis=false)
const char * strLinkBaseGeneOntologyRef
bool RemovePeriodFromEnd(string &str, bool keep_ellipsis=true)
const char * strLinkBaseGeneOntology
void ExpandTildes(string &s, ETildeStyle style)
const char * strLinkBaseTransTable
bool ConvertQuotesNotInHTMLTags(string &str)
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)
void AddPeriod(string &str)
void CleanAndCompress(string &dest, const CTempString &instr)
void ConvertQuotes(string &str)
const char * strLinkBaseExpasy
static const char * suffix[]
static const char * prefix[]
CStaticPairArrayMap< const char *, ETildeStyle, PCase_CStr > TNameTildeStyleMap
static bool s_IsNote(IFlatQVal::TFlags flags, CBioseqContext &ctx)
DEFINE_STATIC_ARRAY_MAP(TNameTildeStyleMap, sc_NameTildeStyleMap, kNameTildeStyleMap)
static size_t s_ComposeCodonRecognizedStr(const CTrna_ext &trna, string &recognized)
SStaticPair< const char *, ETildeStyle > TNameTildeStylePair
void s_ConvertGtLt(string &subname)
static void s_ReplaceUforT(string &codon)
static size_t s_CountAccessions(const CUser_field &field)
void s_HtmlizeLatLon(string &subname)
static char s_MakeDegenerateBase(const string &str1, const string &str2)
static bool s_StringIsJustQuotes(const string &str)
static string s_GetGOText(const CUser_field &field, const bool is_ftable, const bool is_html)
static bool s_AltitudeIsValid(const string &str)
static const TNameTildeStylePair kNameTildeStyleMap[]
ETildeStyle s_TildeStyleFromName(const string &name)
string s_TruncateLatLon(string &subname)
vector< TFlatQual > TFlatQuals
static const char * str(char *buf, int n)
bool operator()(const CDbtag *dbt1, const CDbtag *dbt2)
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...