74 #define NCBI_USE_ERRCODE_X ObjMgr_BlobSplit
86 return const_cast<C&
>(c);
129 switch ( src.
Which() ) {
153 switch ( src.
Which() ) {
160 "Delta-seq is unset");
220 bool need_split_descr;
222 need_split_descr =
false;
228 bool need_split_inst;
230 need_split_inst =
false;
233 need_split_inst =
false;
236 need_split_inst =
false;
240 need_split_inst =
true;
245 need_split_inst =
true;
249 need_split_inst =
false;
253 need_split_inst =
false;
260 bool need_split_annot;
262 need_split_annot =
false;
265 need_split_annot = !src.
GetAnnot().empty();
268 bool need_split = need_split_descr || need_split_inst || need_split_annot;
278 if (
info->m_PlaceId.IsBioseq() ) {
279 ERR_POST_X(3,
"Several Bioseqs with the same id: " <<
287 info->m_PlaceId = place_id;
288 info->m_Bioseq.Reset(&dst);
293 need_split_descr = need_split_inst = need_split_annot =
false;
297 if ( need_split_descr ) {
308 if ( need_split_inst ) {
315 if ( need_split_annot ) {
337 dst.
SetId().SetId(
id);
361 bool need_split_annot;
363 need_split_annot =
false;
366 need_split_annot = !src.
GetAnnot().empty();
369 bool need_split_bioseq =
false;
376 need_split_bioseq =
true;
385 bool need_split =need_split_descr || need_split_annot || need_split_bioseq;
390 ERR_POST_X(4,
"Bioseq_set doesn't have integer id");
394 if (
info->m_PlaceId.IsBioseq_set() ) {
395 ERR_POST_X(5,
"Several Bioseq-sets with the same id: " <<
403 info->m_PlaceId = place_id;
404 info->m_Bioseq_set.Reset(&dst);
409 need_split_descr = need_split_annot = need_split_bioseq = 0;
414 if ( need_split_descr ) {
425 if ( need_split_annot ) {
436 auto begin = seq_set.begin();
437 auto end = seq_set.end();
438 if ( need_split_bioseq ) {
441 size_t old_size =
info->m_Bioseqs.size();
442 while ( begin != end ) {
455 reverse(
info->m_Bioseqs.begin()+old_size,
info->m_Bioseqs.end());
458 while ( begin != end ) {
468 if (
first->IsSeq() ) {
473 if ( *it !=
first && (*it)->IsSeq() ) {
536 info.m_Seq_inst.Reset(&src);
574 range.SetFrom(0).SetLength(seq_length);
593 switch ( src_seq.
Which() ) {
607 if ( src_data.
IsGap() ) {
613 range.SetFrom(pos).SetLength(length);
626 dst_delta.
Set().push_back(new_seq);
661 if (
info.m_Size.GetAsnSize() > 1024 ) {
678 seq.
GetId().size() <= 4;
692 bool same_id =
false;
694 if (
i->Equals(**j) ) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static CSafeStatic< CSize > small_annot
static CSafeStatic< CAsnSizer > s_Sizer
NCBI_DEFINE_ERR_SUBCODE_X(12)
CRef< CMasterSeqSegments > m_Master
static size_t CountAnnotObjects(const CSeq_annot &annot)
bool CopyHist(CPlace_SplitInfo &place_info, const CSeq_hist &hist)
bool CopyAnnot(CPlace_SplitInfo &place_info, const CSeq_annot &annot)
TSeqPos GetLength(const CSeq_data &src) const
bool CopySequence(CPlace_SplitInfo &place_info, TSeqPos seq_length, CSeq_inst &dst, const CSeq_inst &src)
bool CopyDescr(CPlace_SplitInfo &place_info, TSeqPos seq_length, const CSeq_descr &descr)
CRef< CSeq_entry > m_Skeleton
bool CanSplitBioseq(const CBioseq &bioseq) const
bool SplitBioseq(CPlace_SplitInfo &place_info, const CBioseq &bioseq)
void CopySkeleton(CSeq_entry &dst, const CSeq_entry &src)
void AddSegments(const CSeqMap &seq)
void AddSegmentIds(int idx, const TIds &ids)
bool IsBioseq_set(void) const
bool IsBioseq(void) const
TBioseq_setId GetBioseq_setId(void) const
const TBioseqId & GetBioseqId(void) const
CRef< CSeq_inst_SplitInfo > m_Inst
CRef< CSeq_descr_SplitInfo > m_Descr
CRef< CSeq_hist_SplitInfo > m_Hist
CRef< CBioseq_set > m_Bioseq_set
static bool IsGoodFeatTable(const CSeq_table &table)
static size_t CountAnnotObjects(const CSeq_annot &annot)
TAnnotPriority m_Priority
@Seq_descr.hpp User-defined methods of the data storage class.
TSeqPos GetLength(void) const
TDataSize GetZipSize(void) const
Template class for iteration on objects of class C (non-medifiable version)
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
#define REVERSE_ITERATE(Type, Var, Cont)
ITERATE macro to reverse sequence through container elements.
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
const TPrim & Get(void) const
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
string AsString(void) const
bool IsBetter(const CSeq_id_Handle &h) const
True if "this" is a better bioseq than "h".
CConstBeginInfo ConstBegin(const C &obj)
Get starting point of non-modifiable object hierarchy.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
const CSeqMap & GetSeqMap(void) const
Get sequence map.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
#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.
bool IsId(void) const
Check if variant Id is selected.
TId GetId(void) const
Get the variant data.
const TInt & GetInt(void) const
Get the variant data.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
void SetRelease(const TRelease &value)
Assign a value to Release data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
TSet & SetSet(void)
Select the variant.
bool IsSetColl(void) const
to identify a collection Check if a value has been assigned to Coll data member.
TClass GetClass(void) const
Get the Class member data.
bool IsSetDate(void) const
Check if a value has been assigned to Date data member.
bool IsSetRelease(void) const
Check if a value has been assigned to Release data member.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
void SetId(TId &value)
Assign a value to Id data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
void SetLevel(TLevel value)
Assign a value to Level data member.
const TRelease & GetRelease(void) const
Get the Release member data.
bool IsSetLevel(void) const
nesting level Check if a value has been assigned to Level data member.
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
E_Choice Which(void) const
Which variant is currently selected.
const TDate & GetDate(void) const
Get the Date member data.
list< CRef< CSeq_annot > > TAnnot
void SetDate(TDate &value)
Assign a value to Date data member.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
void SetClass(TClass value)
Assign a value to Class data member.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
void SetColl(TColl &value)
Assign a value to Coll data member.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
const TColl & GetColl(void) const
Get the Coll member data.
virtual void Reset(void)
Reset the whole object.
list< CRef< CSeq_entry > > TSeq_set
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
const TId & GetId(void) const
Get the Id member data.
TLevel GetLevel(void) const
Get the Level member data.
@ eClass_segset
segmented sequence + parts
const TIupacaa & GetIupacaa(void) const
Get the variant data.
TRepr GetRepr(void) const
Get the Repr member data.
void SetLength(TLength value)
Assign a value to Length data member.
bool IsSetDeleted(void) const
Check if a value has been assigned to Deleted data member.
TId & SetId(void)
Assign a value to Id data member.
bool IsSetReplaced_by(void) const
these seqs make this one obsolete Check if a value has been assigned to Replaced_by data member.
bool IsSetSeq_data(void) const
the sequence Check if a value has been assigned to Seq_data data member.
TStrand GetStrand(void) const
Get the Strand member data.
const TInst & GetInst(void) const
Get the Inst member data.
void SetSeq_data(TSeq_data &value)
Assign a value to Seq_data data member.
bool IsSetAssembly(void) const
how was this assembled? Check if a value has been assigned to Assembly data member.
const TDeleted & GetDeleted(void) const
Get the Deleted member data.
TTopology GetTopology(void) const
Get the Topology member data.
const TIupacna & GetIupacna(void) const
Get the variant data.
void SetExt(TExt &value)
Assign a value to Ext data member.
void SetHist(THist &value)
Assign a value to Hist data member.
const TFuzz & GetFuzz(void) const
Get the Fuzz member data.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
const TNcbi8aa & GetNcbi8aa(void) const
Get the variant data.
const TLiteral & GetLiteral(void) const
Get the variant data.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
const TId & GetId(void) const
Get the Id member data.
bool IsSetHist(void) const
sequence history Check if a value has been assigned to Hist data member.
bool IsSetExt(void) const
extensions for special types Check if a value has been assigned to Ext data member.
const Tdata & Get(void) const
Get the member data.
bool IsSetReplaces(void) const
seq makes these seqs obsolete Check if a value has been assigned to Replaces data member.
Tdata & Set(void)
Assign a value to data member.
TLength GetLength(void) const
Get the Length member data.
TLength GetLength(void) const
Get the Length member data.
list< CRef< CSeq_id > > TId
const TFuzz & GetFuzz(void) const
Get the Fuzz member data.
TMol GetMol(void) const
Get the Mol member data.
const TNcbieaa & GetNcbieaa(void) const
Get the variant data.
bool IsSetFuzz(void) const
could be unsure Check if a value has been assigned to Fuzz data member.
void SetFuzz(TFuzz &value)
Assign a value to Fuzz data member.
void SetInst(TInst &value)
Assign a value to Inst data member.
bool IsSetLength(void) const
length of sequence in residues Check if a value has been assigned to Length data member.
const THist & GetHist(void) const
Get the Hist member data.
virtual void Reset(void)
Reset the whole object.
const TExt & GetExt(void) const
Get the Ext member data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
void SetTopology(TTopology value)
Assign a value to Topology data member.
const TSeq_table & GetSeq_table(void) const
Get the variant data.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
E_Choice Which(void) const
Which variant is currently selected.
const TDelta & GetDelta(void) const
Get the variant data.
const TNcbi4na & GetNcbi4na(void) const
Get the variant data.
const TLoc & GetLoc(void) const
Get the variant data.
void SetRepr(TRepr value)
Assign a value to Repr data member.
const TNcbi2na & GetNcbi2na(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
const TData & GetData(void) const
Get the Data member data.
void SetFuzz(TFuzz &value)
Assign a value to Fuzz data member.
list< CRef< CSeq_annot > > TAnnot
bool IsSetSeq_data(void) const
may have the data Check if a value has been assigned to Seq_data data member.
void SetLength(TLength value)
Assign a value to Length data member.
list< CRef< CDelta_seq > > Tdata
const TReplaces & GetReplaces(void) const
Get the Replaces member data.
void SetStrand(TStrand value)
Assign a value to Strand data member.
bool IsGap(void) const
Check if variant Gap is selected.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
const TReplaced_by & GetReplaced_by(void) const
Get the Replaced_by member data.
const TNcbi8na & GetNcbi8na(void) const
Get the variant data.
const TDescr & GetDescr(void) const
Get the Descr member data.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
E_Choice Which(void) const
Which variant is currently selected.
void SetMol(TMol value)
Assign a value to Mol data member.
bool IsSetTopology(void) const
Check if a value has been assigned to Topology data member.
bool IsSetFuzz(void) const
length uncertainty Check if a value has been assigned to Fuzz data member.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ e_Ncbi2na
2 bit nucleic acid code
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Ncbi8na
8 bit extended nucleic acid code
@ e_Ncbi4na
4 bit nucleic acid code
@ e_Iupacaa
IUPAC 1 letter amino acid code.
@ e_Ncbi8aa
8 bit extended amino acid codes
@ e_Literal
a piece of sequence
@ e_Loc
point to a sequence
Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).
range(_Ty, _Ty) -> range< _Ty >
const struct ncbi::grid::netcache::search::fields::SIZE size
@ eAnnotPriority_skeleton
bool m_DisableSplitDescriptions
bool m_DisableSplitAssembly
bool m_DisableSplitSequence
bool m_DisableSplitAnnotations
bool m_SplitNonFeatureSeqTables