&
value)
159 returnspaces +
"<"+
tag+
">"+
"\n";
165 returnspaces +
"<"+
tag+
">";
172 returnspaces +
"</"+
tag+
">"+
"\n";
252 boolfirstOfPair =
true;
256firstOfPair =
false;
330 if( pBiomolEnumInfo ) {
334 const string*psBiomolName = find_iter->second;
378 if(biomol_str.find(
"RNA") !=
NPOS)
414 return "01-JAN-1900";
431 if( ! sStrandedness.empty() ) {
436 if( ! sMolType.empty() ) {
438}
else if(
ctx.IsProt()) {
473def.resize(def.length() - 1);
495 if(acc.length() !=
prev.length()) {
499 for(
i= 0;
i< acc.length() && !
isdigit((
unsigned char) acc[
i]); ++
i) {
500 if(acc[
i] !=
prev[
i]) {
504 if(
i< acc.length()) {
531 boolhasOthers =
false;
541 static const size_tkAccCutoff = 20;
542 static const size_tkBinCutoff = 5;
544 boolhasExtras =
false;
549 if(xtra.size() < kAccCutoff) {
562 typedefvector<string> TAccBin;
563 typedefvector <TAccBin> TAccBins;
565TAccBin* curr_bin =
nullptr;
568CAccessionItem::TExtra_accessions::const_iterator
prev= xtra.begin();
571bins.push_back(TAccBin());
572curr_bin = &bins.back();
574curr_bin->push_back(*it);
578 ITERATE(TAccBins, bin_it, bins) {
579 if(bin_it->size() <= kBinCutoff) {
585 stringrnge = bin_it->front() +
"-"+ bin_it->back();
615 str.append(
s_OpenTag(
" ",
"GBSeq_secondary-accessions"));
617 str.append(
s_CloseTag(
" ",
"GBSeq_secondary-accessions"));
642 if(dblinklines.size() == 0)
return;
645 stringline = *gp_it;
706 stringsource_line =
source.GetOrganelle() +
source.GetTaxname();
707 if( !
source.GetCommon().empty() ) {
708source_line.append( (
source.IsUsingAnamorph() ?
" (anamorph: ":
" (") +
source.GetCommon() +
")");
714 const string& sTaxonomy =
source.GetLineage();
715 stringstaxon = sTaxonomy;
717staxon.resize( staxon.length() - 1);
740 if( csh.
Skip() ) {
744vector<string>* rcx = csh.
GetCache();
746 for(
auto&
str: *rcx) {
810 const char* pchDelim =
"";
821list<string> authors;
824 boolhasAuthors =
false;
825 ITERATE(list<string>, it, authors) {
827 str.append(
s_OpenTag(
" ",
"GBReference_authors"));
842title.resize(title.length() - 1);
852 if( (*it ==
'\n') || (*it ==
'\t') || (*it ==
'\r') ) {
859 stringdoi = ref.
GetDOI();
860 if( ! doi.empty() ) {
971 str.append(
s_OpenTag(
" ",
"GBSeq_feature-table"));
982 string location= feat->GetLoc().GetString();
986 str.append(
s_OpenTag(
" ",
"GBFeature_intervals"));
989 CScope& scope =
f.GetContext()->GetScope();
1003to = range.
GetTo() + 1;
1015 if( best->
IsGi() ) {
1017list< CConstRef<CSeq_id> > ids;
1018 for(
auto& syn_id: *syns) {
1019ids.push_back(syn_id.GetSeqId());
1038 str.append(
" <GBFeature_partial5 value=\"true\"/>\n");
1041 str.append(
" <GBFeature_partial3 value=\"true\"/>\n");
1044 if( !feat->GetQuals().empty() ) {
1113 TSeqPostotal = from <= to? to - from + 1 : 0;
1227 str.append(
s_OpenTag(
" ",
"GBSeq_feature-table"));
1242 const boolisGapOfLengthZero = ( gapStart > gapEnd );
1245 if( isGapOfLengthZero ) {
1256 str.append(
s_OpenTag(
" ",
"GBFeature_intervals"));
1270 if( isGapOfLengthZero ) {
1274 "Non-consecutive residues"));
1279 stringestimated_length;
1283estimated_length =
"unknown";
1328name =
"WGS";
break;
1330name =
"WGS_SCAFLD";
break;
1332name =
"WGS_CONTIG";
break;
1345name =
"TSA";
break;
1347name =
"TLS";
break;
1354 template<
typenameT>
void 1402 str.append(
s_OpenTag(
" ",
"GBAltSeqData_items"));
1407 stringfirst_id = item.GetFirstID();
1408 stringlast_id = item.GetLastID();
1411 if(first_id != last_id)
1455 for(
string&
str:
l) {
1464 #ifdef NCBI_SHUN_OSTRSTREAMUser-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.
@ eExtreme_Biological
5' and 3'
const TExtra_accessions & GetExtraAccessions(void) const
const string & GetAccession(void) const
vector< string > TExtra_accessions
const string & GetAccession(void) const
const TCache & GetCache(void) const
const CSeq_loc & GetLoc(void) const
const TDBSource & GetDBSource(void) const
const string & GetDefline(void) const
vector< CRef< CFormatQual > > TQuals
void x_FormatRefJournal(const CReferenceItem &ref, string &journal, CBioseqContext &ctx) const
CBioseqContext * GetContext(void)
const CSerialObject * GetObject(void) const
const string & GetString(void) const
~CGBSeqFormatter() override
void FormatPrimary(const CPrimaryItem &primary, IFlatTextOStream &text_os) override
void x_WriteFileHeader(IFlatTextOStream &text_os)
void End(IFlatTextOStream &) override
void EndSection(const CEndSectionItem &, IFlatTextOStream &) override
void FormatDBSource(const CDBSourceItem &dbs, IFlatTextOStream &text_os) override
void FormatSource(const CSourceItem &source, IFlatTextOStream &text_os) override
void FormatDefline(const CDeflineItem &defline, IFlatTextOStream &text_os) override
void FormatTSA(const CTSAItem &tsa, IFlatTextOStream &text_os) override
void FormatLocus(const CLocusItem &locus, IFlatTextOStream &text_os) override
void FormatReference(const CReferenceItem &keys, IFlatTextOStream &text_os) override
void x_FormatAltSeq(const T &item, const string &name, IFlatTextOStream &text_os)
list< string > m_Dbsource
void FormatSegment(const CSegmentItem &seg, IFlatTextOStream &text_os) override
void FormatSequence(const CSequenceItem &seq, IFlatTextOStream &text_os) override
void FormatGenomeProject(const CGenomeProjectItem &, IFlatTextOStream &) override
void FormatVersion(const CVersionItem &version, IFlatTextOStream &text_os) override
void FormatKeywords(const CKeywordsItem &keys, IFlatTextOStream &text_os) override
void x_StrOStreamToTextOStream(IFlatTextOStream &text_os)
void FormatContig(const CContigItem &contig, IFlatTextOStream &text_os) override
void FormatComment(const CCommentItem &keys, IFlatTextOStream &text_os) override
void FormatWGS(const CWGSItem &wgs, IFlatTextOStream &text_os) override
void FormatCache(const CCacheItem &csh, IFlatTextOStream &text_os) override
void FormatGap(const CGapItem &gap, IFlatTextOStream &text_os) override
void FormatFeature(const CFeatureItemBase &feat, IFlatTextOStream &text_os) override
void FormatAccession(const CAccessionItem &acc, IFlatTextOStream &text_os) override
unique_ptr< CObjectOStream > m_Out
void x_WriteGBSeq(IFlatTextOStream &text_os)
CGBSeqFormatter(bool isInsd=false)
void StartSection(const CStartSectionItem &, IFlatTextOStream &) override
list< string > m_Comments
TSeqPos GetTo(void) const
TSeqPos GetEstimatedLength(void) const
TSeqPos GetFrom(void) const
std::vector< std::string > TEvidence
const std::string & GetType(void) const
bool HasEstimatedLength(void) const
const TEvidence & GetEvidence(void) const
const std::string & GetFeatureName(void) const
const TDBLinkLineVec & GetDBLinkLines(void) const
vector< TDBLinkLine > TDBLinkLineVec
vector< string > TKeywords
const TKeywords & GetKeywords(void) const
const string & GetName(void) const
size_t GetLength(void) const
TBiomol GetBiomol(void) const
TTopology GetTopology(void) const
const string & GetDivision(void) const
TStrand GetStrand(void) const
const string & GetString(void) const
const string & GetTitle(void) const
static void GetAuthNames(const CAuth_list &alp, TStrList &authors)
const string & GetRemark(void) const
int GetSerial(void) const
TEntrezId GetPMID(void) const
const CAuth_list & GetAuthors(void) const
const CSeq_loc & GetLoc(void) const
const string & GetDOI(void) const
const string & GetConsortium(void) const
bool IsSetAuthors(void) const
size_t GetNum(void) const
size_t GetCount(void) const
Seq-loc iterator class â iterates all intervals from a seq-loc in the correct order.
const CSeqVector & GetSequence(void) const
TSeqPos GetTo(void) const
TSeqPos GetFrom(void) const
TTSAType GetType(void) const
TWGSType GetType(void) const
virtual void AddLine(const CTempString &, const CSerialObject *=nullptr, EAddNewline=eAddNewline_Yes)
This adds its given argument, appending a newline only if the add_newline argument is eAddNewline_Yes...
virtual void AddParagraph(const list< string > &, const CSerialObject *=nullptr)
This adds a list of strings to the stream one at a time, unconditionally adding a newline to each one...
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static const char * str(char *buf, int n)
static const char location[]
static string s_OpenTag(const string &spaces, const string &tag)
static void s_GBSeqStringCleanup(string &str, bool location=false)
CGBSeq::TMoltype s_GBSeqMoltype(CMolInfo::TBiomol biomol)
static string s_OpenTagNoNewline(const string &spaces, const string &tag)
static bool s_IsSuccessor(const string &acc, const string &prev)
static string s_CloseTag(const string &spaces, const string &tag)
string s_GetDate(const CBioseq_Handle &bsh, CSeqdesc::E_Choice choice)
CGBSeq::TTopology s_GBSeqTopology(CSeq_inst::TTopology topology)
static string s_AddAttribute(const string &spaces, const string &tag, const string &attribute, const string &value)
static string s_CombineStrings(const string &spaces, const string &tag, const string &value)
CGBSeq::TStrandedness s_GBSeqStrandedness(CSeq_inst::TStrand strand, CMolInfo::TBiomol eBiomol)
#define ENTREZ_ID_TO(T, entrez_id)
unsigned int TSeqPos
Type for sequence locations and lengths.
#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.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
const TValueToName & ValueToName(void) const
Get value-to-name map.
#define ENUM_METHOD_NAME(EnumName)
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
static int ConstScore(const CConstRef< CSeq_id > &id)
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
bool IsPartialStop(ESeqLocExtremes ext) const
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
pair< TConstObjectPtr, TTypeInfo > ConstObjectInfo(const C &obj)
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
CConstRef< CSynonymsSet > GetSynonyms(const CSeq_id &id)
Get bioseq synonyms, resolving to the bioseq in this scope.
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer)
Fill the buffer string with the sequence data for the interval [start, stop).
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
position_type GetLength(void) const
#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.
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 void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
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.
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 string XmlEncode(const CTempString str, TXmlEncode flags=eXmlEnc_Contents)
Encode a string for XML.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt to string.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
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 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.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTo(TTo value)
Assign a value to To data member.
bool IsGi(void) const
Check if variant Gi is selected.
bool IsUpdate_date(void) const
Check if variant Update_date is selected.
const TUpdate_date & GetUpdate_date(void) const
Get the variant data.
list< CRef< CSeq_id > > TId
E_Choice
Choice variants.
ETopology
topology of molecule
EStrand
strandedness in living organism
const TCreate_date & GetCreate_date(void) const
Get the variant data.
@ eBiomol_cRNA
viral RNA genome copy intermediate
@ eBiomol_genomic_mRNA
reported a mix of genomic and cdna sequence
@ e_Update_date
date of last update
@ e_Create_date
date entry first created/released
@ eStrand_other
default ds for DNA, ss for RNA, pept
@ eStrand_ds
double strand
@ eStrand_ss
single strand
const string version
version string
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
void DateToString(const CDate &date, string &str, EDateToString format_choice=eDateToString_regular)
CRef< CPub > journal(ParserPtr pp, char *bptr, char *eptr, CRef< CAuth_list > &auth_list, CRef< CTitle::C_E > &title, bool has_muid, CRef< CCit_art > &cit_art, Int4 er)
#define FOR_EACH_STRING_IN_LIST(Itr, Var)
FOR_EACH_STRING_IN_LIST EDIT_EACH_STRING_IN_LIST.
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static SLJIT_INLINE sljit_ins xr(sljit_gpr dst, sljit_gpr src)
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