fParse_PartialOK = 0x01,
81fParse_RawText = 0x02,
83fParse_AnyRaw = fParse_RawText | fParse_RawGI,
87fParse_ValidLocal = 0x08,
90fParse_AnyLocal = 0x18,
91fParse_NoFASTA = 0x20,
96fParse_FallbackOK = 0x40,
102fParse_Default = fParse_RawText | fParse_ValidLocal
110fInvalidChar = 1 << 1,
111fExceedsMaxLength = 1 << 2
117eFasta_AsTypeAndContent
136TParseFlags
flags= fParse_AnyRaw);
153 #ifdef NCBI_STRICT_GI 188 CSeq_id(EFastaAsTypeAndContent, E_Choice the_type,
198 CSeq_id& Set(E_Choice the_type,
201 CSeq_id& Set(E_Choice the_type,
207 CSeq_id& Set(EFastaAsTypeAndContent, E_Choice the_type,
214 staticE_Choice WhichInverseSeqId(
const CTempString& SeqIdCode);
217 static const char* WhichFastaTag(E_Choice choice);
234eSeqId_refseq = eSeqId_other,
247eAcc_type_mask = 0xff,
251fAcc_nuc = 0x80000000,
252fAcc_prot = 0x40000000,
254fAcc_predicted = 0x20000000,
255fAcc_specials = 0x10000000,
256fAcc_master = 0x08000000,
257fAcc_ncbo = 0x04000000,
258fAcc_fallback = 0x02000000,
259fAcc_vdb_only = 0x01000000,
260eAcc_flag_mask = 0xff000000,
266eAcc_dirsub = 2 << 8,
267eAcc_div_patent = 3 << 8,
270eAcc_gsdb_ds = 6 << 8,
272eAcc_backbone = 8 << 8,
274eAcc_segset = 10 << 8,
276eAcc_unique = 12 << 8,
277eAcc_ambig = 112 << 8,
278eAcc_ambig_g = 113 << 8,
279eAcc_ambig_e = 114 << 8,
280eAcc_ambig_ge = 115 << 8,
281eAcc_ambig_d = 116 << 8,
282eAcc_ambig_gd = 117 << 8,
283eAcc_ambig_ed = 118 << 8,
284eAcc_ambig_ged = 119 << 8,
285eAcc_unreserved = 127 << 8,
286fAcc_genomic = 128 << 8,
287eAcc_genome = 128 << 8,
288eAcc_htgs = 129 << 8,
292eAcc_chromosome = 133 << 8,
293eAcc_genomic_rgn = 134 << 8,
294eAcc_wgs_intermed = 135 << 8,
297eAcc_optical_map = 138 << 8,
298eAcc_targeted = 139 << 8,
299eAcc_division_mask = 0xff00,
302eAcc_wgs_master = eAcc_wgs | fAcc_master,
303eAcc_wgs_intermed_master = eAcc_wgs_intermed | fAcc_master,
304eAcc_tsa_master = eAcc_tsa | fAcc_master,
305eAcc_targeted_master = eAcc_targeted | fAcc_master,
306eAcc_wgs_vdb_only = eAcc_wgs | fAcc_vdb_only,
307eAcc_wgs_intermed_vdb_only = eAcc_wgs_intermed | fAcc_vdb_only,
308eAcc_tsa_vdb_only = eAcc_tsa | fAcc_vdb_only,
309eAcc_targeted_vdb_only = eAcc_targeted | fAcc_vdb_only,
310eAcc_wgs_vdb_master = eAcc_wgs | fAcc_master | fAcc_vdb_only,
311eAcc_wgs_intermed_vdb_master
312= eAcc_wgs_intermed | fAcc_master | fAcc_vdb_only,
313eAcc_tsa_vdb_master = eAcc_tsa | fAcc_master | fAcc_vdb_only,
314eAcc_targeted_vdb_master = eAcc_targeted | fAcc_master | fAcc_vdb_only,
317 #define NCBI_ACC(type, div, mol) eSeqId_##type | eAcc_##div | fAcc_##mol 349eAcc_gb_patent =
NCBI_ACC(genbank, div_patent, seq),
418eAcc_refseq_unreserved =
NCBI_ACC(refseq, unreserved, seq),
432eAcc_refseq_wgsm_intermed =
NCBI_ACC(refseq, wgs_intermed_master,
434eAcc_refseq_wgsv_intermed =
NCBI_ACC(refseq, wgs_intermed_vdb_only,
436eAcc_refseq_wgsvm_intermed =
NCBI_ACC(refseq, wgs_intermed_vdb_master,
438eAcc_refseq_prot_predicted = eAcc_refseq_prot | fAcc_predicted,
439eAcc_refseq_mrna_predicted = eAcc_refseq_mrna | fAcc_predicted,
440eAcc_refseq_ncrna_predicted = eAcc_refseq_ncrna | fAcc_predicted,
441eAcc_refseq_chromosome_ncbo = eAcc_refseq_chromosome | fAcc_ncbo,
442eAcc_refseq_contig_ncbo = eAcc_refseq_contig | fAcc_ncbo,
480eAcc_ddbj_targetedv_nuc =
NCBI_ACC(ddbj, targeted_vdb_only,
nuc),
481eAcc_ddbj_targetedvm_nuc =
NCBI_ACC(ddbj, targeted_vdb_master,
nuc),
543eAcc_ddbj_tpa_targetedm_nuc =
NCBI_ACC(tpd, targeted_master,
nuc),
544eAcc_ddbj_tpa_targetedv_nuc =
NCBI_ACC(tpd, targeted_vdb_only,
nuc),
545eAcc_ddbj_tpa_targetedvm_nuc =
NCBI_ACC(tpd, targeted_vdb_master,
nuc),
555eAcc_gpipe_unreserved =
NCBI_ACC(gpipe, unreserved, seq),
558eAcc_named_annot_track =
NCBI_ACC(named_annot_track, other, seq)
563{
return static_cast<E_Choice>(
info& eAcc_type_mask); }
567 staticEAccessionInfo IdentifyAccession(
const CTempString& accession,
568TParseFlags
flags= fParse_AnyRaw);
569EAccessionInfo IdentifyAccession(TParseFlags
flags 570= fParse_AnyRaw | fParse_AnyLocal)
const;
572 static voidLoadAccessionGuide(
const string& filename);
576 boolMatch(
const CSeq_id& sid2)
const;
588 intCompareOrdered(
const CSeq_id& sid2)
const;
591 returnCompareOrdered(sid2) < 0;
600 const stringAsFastaString(
void)
const;
615fLabel_Version = 0x10,
618fLabel_GeneralDbIsContent = 0x20,
619fLabel_Trimmed = 0x40,
620fLabel_UpperCase = 0x80,
623fLabel_Default = fLabel_Version
665eFormat_BestWithVersion
682 static boolIsValidLocalID(
const CTempString& s);
687 staticTErrorFlags CheckLocalID(
const CTempString& s);
701TParseFlags
flags= fParse_Default);
720 boolallow_partial_failure =
false);
737fRequireAccessions = 1 << 0
741 intAdjustScore (
intbase_score,
742TAdjustScoreFlags
flags= TAdjustScoreFlags())
745{
returnAdjustScore(base_score, fRequireAccessions); }
746 intBaseTextScore (
void)
const;
747 intBaseBestRankScore (
void)
const;
749 intBaseFastaAAScore (
void)
const;
750 intBaseFastaNAScore (
void)
const;
751 intBaseBlastScore (
void)
const;
753 int TextScore(
void)
const{
returnAdjustScore(BaseTextScore()); }
754 int BestRankScore(
void)
const{
returnAdjustScore(BaseBestRankScore()); }
756 int FastaAAScore(
void)
const{
returnAdjustScore(BaseFastaAAScore()); }
757 int FastaNAScore(
void)
const{
returnAdjustScore(BaseFastaNAScore()); }
758 int BlastScore(
void)
const{
returnAdjustScore(BaseBlastScore()); }
761{
returnStrictAdjustScore(BaseTextScore()); }
763{
returnStrictAdjustScore(BaseBestRankScore()); }
765{
returnStrictAdjustScore(BaseFastaAAScore()); }
767{
returnStrictAdjustScore(BaseFastaNAScore()); }
769{
returnStrictAdjustScore(BaseBlastScore()); }
773{
return id?
id->TextScore() :
kMax_Int; }
775{
return id?
id->TextScore() :
kMax_Int; }
777{
return id?
id->BestRankScore() :
kMax_Int; }
779{
returnScore(
id); }
781{
return id?
id->FastaAAScore() :
kMax_Int; }
783{
return id?
id->FastaNAScore() :
kMax_Int; }
785{
return id?
id->BlastScore() :
kMax_Int; }
788{
return id?
id->StrictTextScore() :
kMax_Int; }
790{
return id?
id->StrictBestRankScore() :
kMax_Int; }
792{
return id?
id->StrictFastaAAScore() :
kMax_Int; }
794{
return id?
id->StrictFastaNAScore() :
kMax_Int; }
796{
return id?
id->StrictBlastScore() :
kMax_Int; }
813 static boolPreferAccessionOverGi(
void);
816 static boolAvoidGi(
void);
822fAllowLocalId = (1 << 0),
823fGpipeAddSecondary = (1 << 1)
839 stringComposeOSLT(list<string>* secondary_ids =
nullptr,
843 const static size_tkMaxLocalIDLength = 50;
844 const static size_tkMaxGeneralDBLength = 20;
845 const static size_tkMaxGeneralTagLength = 50;
846 const static size_tkMaxAccessionLength = 30;
854eSNPScaleLimit_Chromosome
857 static const char* GetSNPScaleLimit_Name(ESNPScaleLimit
value);
858 staticESNPScaleLimit GetSNPScaleLimit_Value(
const string& name);
859 boolIsAllowedSNPScaleLimit(ESNPScaleLimit scale_limit)
const;
868 staticETypeVariant x_IdentifyTypeVariant(E_Choice
type,
872E_Choice x_Init(list<CTempString>& fasta_pieces, E_Choice
type,
883 voidx_WriteContentAsFasta(ostream&
out)
const;
899fAllowUnderscores = 0x1
916: m_Range(&range), m_Number(range.start)
920: m_Range(&range), m_Number(
number)
924: m_Range(it.m_Range), m_Number(it.m_Number)
931{
returnm_Accession.empty() ? x_SetAccession() : m_Accession; }
933{
returnm_Accession.empty() ? &x_SetAccession() : &m_Accession; }
935{
return*(*
this+
n); }
940{ m_Accession.erase(); ++m_Number;
return*
this; }
944{ m_Accession.erase(); --m_Number;
return*
this; }
952{ m_Accession.erase(); m_Number +=
n;
return*
this; }
954{ m_Accession.erase(); m_Number -=
n;
return*
this; }
957{
returnm_Number == it.
m_Number; }
959{
returnm_Number != it.
m_Number; }
961{
returnm_Number < it.
m_Number; }
963{
returnm_Number > it.
m_Number; }
965{
returnm_Number <= it.
m_Number; }
967{
returnm_Number >= it.
m_Number; }
969{
returnm_Number - it.
m_Number; }
972 const string& x_SetAccession(
void)
const;
986{
returnstop - start + 1; }
1012 virtual const char* GetErrCodeString(
void)
const override;
1020 template<
classTId>
1029 template<
classcontainer>
1033 ITERATE(
typenamecontainer, iter, ids) {
1042 template<
classcontainer>
1046 return id?
id->GetGi() :
ZERO_GI;
1051 template<
classcontainer>
1054 ITERATE(
typenamecontainer, iter, ids) {
@ eBoth
Both preliminary and traceback stages.
*** Sequence identifiers ******************************** *
Base class for all serializable objects.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Abstract base class for lightweight line-by-line reading.
string GetSeqIdString(const CSeq_id &id)
bool operator<(const CEquivRange &A, const CEquivRange &B)
std::ofstream out("events_result.xml")
main entry point for tests
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
EErrCode
Error types that an application can generate.
CVect2< NCBI_PROMOTE(int,U) > operator*(int v1, const CVect2< U > &v2)
ESerialRecursionMode
How to assign and compare child sub-objects of serial objects.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual void WriteAsFasta(CNcbiOstream &out) const
@ eRecursive
Recursively.
const_iterator operator--(int)
TGi FindGi(const container &ids)
Return gi from id list if exists, return 0 otherwise.
int WorstRankScore(void) const
int StrictFastaAAScore(void) const
static int StrictBestRank(const CRef< CSeq_id > &id)
const_iterator(const SSeqIdRange &range)
CProxy DumpAsFasta(void) const
const_iterator & operator++(void)
CConstRef< CSeq_id > GetSeq_idByType(const container &ids, CSeq_id::E_Choice choice)
Search the container of CRef<CSeq_id> for the id of given type.
static int StrictScore(const CRef< CSeq_id > &id)
EAccessionInfo
For IdentifyAccession (below)
const_iterator & operator+=(int n)
CConstRef< CSeq_id > Get_ConstRef_Seq_id(TId &id)
Dummy convertor for container search functions.
int BestRankScore(void) const
const SSeqIdRange * m_Range
static E_Choice GetAccType(EAccessionInfo info)
static int StrictBlastRank(const CRef< CSeq_id > &id)
E_SIC
Compare return values.
const_iterator(const SSeqIdRange &range, int number)
EFastaAsTypeAndContent
Tag for method variants that would otherwise be ambiguous.
int BaseWorstRankScore(void) const
int TextScore(void) const
bool operator<=(const const_iterator &it) const
EComposeOSLTFlags
Flags specifying special treatment for certain types of Seq-ids in ComposeOSLT().
const_iterator end(void) const
int BlastScore(void) const
const string * operator->(void) const
int TFlags
binary OR of EFlags
const_iterator operator+(int n) const
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
int operator-(const const_iterator &it) const
static int WorstRank(const CRef< CSeq_id > &id)
const_iterator operator++(int)
static int StrictFastaNARank(const CRef< CSeq_id > &id)
const_iterator(const const_iterator &it)
const_iterator begin(void) const
int StrictBestRankScore(void) const
static int StrictFastaAARank(const CRef< CSeq_id > &id)
EMaxScore
Numerical quality ranking; lower is better.
NCBI_EXCEPTION_DEFAULT(CSeqIdException, CException)
int StrictTextScore(void) const
int StrictBlastScore(void) const
bool operator==(const const_iterator &it) const
const_iterator operator-(int n) const
EStringFormat
Get a string representation of the sequence IDs of a given bioseq.
CSeq_id::EAccessionInfo acc_info
ptrdiff_t difference_type
#define NCBI_ACC(type, div, mol)
static int Score(const CRef< CSeq_id > &id)
Wrappers for use with FindBestChoice from <corelib/ncbiutil.hpp>
const_iterator & operator-=(int n)
bool operator>=(const const_iterator &it) const
static int BestRank(const CRef< CSeq_id > &id)
bool operator<(const CSeq_id &sid2) const
random_access_iterator_tag iterator_category
string operator[](int n) const
static int ConstScore(const CConstRef< CSeq_id > &id)
int StrictAdjustScore(int base_score) const
static int BlastRank(const CRef< CSeq_id > &id)
ELabelType
return the label for a given string
const_iterator & operator--(void)
DECLARE_SAFE_FLAGS_TYPE(EAdjustScoreFlags, TAdjustScoreFlags)
string GetLabel(const CSeq_id &id)
static int FastaNARank(const CRef< CSeq_id > &id)
const CTextseq_id * GetTextseq_Id(void) const
Return embedded CTextseq_id, if any.
int FastaAAScore(void) const
const_iterator & operator=(const const_iterator &it)
set< CSeq_id_Handle > TSeqIdHandles
int StrictFastaNAScore(void) const
bool operator!=(const const_iterator &it) const
CConstRef< CSeq_id > FindTextseq_id(const container &ids)
Return text seq-id from id list if exists, return 0 otherwise.
E_SIC Compare(const CSeq_id &sid2) const
Compare() - more general.
ESNPScaleLimit
SNP annotation scale limits.
int FastaNAScore(void) const
static int FastaAARank(const CRef< CSeq_id > &id)
@ eUnknownType
Unrecognized Seq-id type.
@ e_NO
different SeqId types-can't compare
@ e_YES
SeqIds compared, but are different.
@ eFormat_BestWithoutVersion
@ eFastaContent
Like eFasta, but without any tag.
@ eContent
Untagged human-readable accession or the like.
@ eBoth
Type and content, delimited by a vertical bar.
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
@ eType
FASTA-style type, or database in GeneralDbIsContent mode.
@ eSNPScaleLimit_Supercontig
bool IsValid(const CSeq_point &pt, CScope *scope)
Checks that point >= 0 and point < length of Bioseq.
sequence::ECompare Compare(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope)
Returns the sequence::ECompare containment relationship between CSeq_locs.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
NCBI_NS_STD::string::size_type SIZE_TYPE
#define NCBI_SEQLOC_EXPORT
static const char label[]
CSeq_id_Base & operator=(const CSeq_id_Base &)
E_Choice Which(void) const
Which variant is currently selected.
E_Choice
Choice variants.
@ e_Gibbmt
Geninfo backbone moltype.
@ e_Giim
Geninfo import id.
@ 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_Gibbsq
Geninfo backbone seqid.
@ e_General
for other databases
@ e_Gi
GenInfo Integrated Database.
@ e_Named_annot_track
Internal named annotation tracking ID.
@ e_not_set
No variant selected.
@ e_Tpg
Third Party Annot/Seq Genbank.
list< CRef< CSeq_id > > TId
unsigned int
A callback function used to compare two keys in a database.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const string version
version string
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
std::istream & in(std::istream &in_, double &x_)
string GetStringDescr(const CBioseq &bioseq)
static const char * kMaxScore
void Dump(CSplitCacheApp *app, const C &obj, ESerialDataFormat format, const string &key, const string &suffix=kEmptyStr)
bool operator>(const typename tree< T, tree_node_allocator >::iterator_base &one, const typename tree< T, tree_node_allocator >::iterator_base &two)
static bool ambig(char c)
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