(it->first->CompareOrdered(*seqid) == 0)
118 if(it->first->Compare(*seqid) != CSeq_id::E_SIC::e_YES)
129 if(it->first->CompareOrdered(*seqid) == 0)
131 if(it->first->Compare(*seqid) != CSeq_id::E_SIC::e_YES)
141 if(descr.
IsSet()) {
142 for(
autopDesc : descr.
Get()) {
143 if(pDesc && (pDesc->Which() == choice)) {
157 if(
info.m_descr) {
164 autoparentSet =
info.m_parent_set;
166 if(parentSet->m_descr) {
172parentSet = parentSet->m_parent_set;
213pNewEntry->SetSet().SetSeq_set().push_back(entry);
225 if(it->first->Compare(*seqid) != CSeq_id::E_SIC::e_YES)
254 autobioseq_id_mi = bioseq_info.
FindMember(
"id");
257 autobioseqset_seqset_mi = bioseq_set_info.
FindMember(
"seq-set");
258 autobioseqset_annot_mi = bioseq_set_info.
FindMember(
"annot");
259 autoseqinst_len_mi = seqinst_info.
FindMember(
"length");
260 autoseqinst_mol_mi = seqinst_info.
FindMember(
"mol");
261 autoseqinst_repr_mi = seqinst_info.
FindMember(
"repr");
262 autobioseq_descr_mi = bioseq_info.
FindMember(
"descr");
268 in.ReadObject(&
context.bioseq_stack.back().m_ids, (*member).GetTypeInfo());
275 in.ReadObject(&descr, (*member).GetTypeInfo());
276 context.bioseq_stack.back().m_descr = descr;
282 in.ReadObject(&
context.bioseq_stack.back().m_length, (*member).GetTypeInfo());
288 in.ReadObject(&
context.bioseq_stack.back().m_mol, (*member).GetTypeInfo());
295 in.ReadObject(&
context.bioseq_stack.back().m_repr, (*member).GetTypeInfo());
304(*member).GetTypeInfo()->DefaultSkipData(
in);
312 auto& set_rec =
context.bioseq_set_stack.back();
313set_rec->m_annot_pos = pos;
314(*member).GetTypeInfo()->DefaultSkipData(
in);
351 context.bioseq_stack.push_back({});
352 autoparent =
context.bioseq_set_stack.back();
354 type.GetTypeInfo()->DefaultSkipData(
in);
356 auto& bioseqinfo =
context.bioseq_stack.back();
357 m_bioseq_list.push_back({pos, parent, bioseqinfo.m_length, bioseqinfo.m_descr, bioseqinfo.m_ids, bioseqinfo.m_mol, bioseqinfo.m_repr});
358 context.bioseq_stack.pop_back();
371 autoparent =
context.bioseq_set_stack.back();
378 type.GetTypeInfo()->DefaultReadData(
in, pBioseqSet);
380 if(pBioseqSet->IsSetLevel()) {
381 last->m_Level = pBioseqSet->GetLevel();
384 last->m_class = pBioseqSet->GetClass();
385 if(pBioseqSet->IsSetDescr()) {
386 last->m_descr.Reset(&(pBioseqSet->GetDescr()));
394 context.bioseq_set_stack.pop_back();
405 type.GetTypeInfo()->DefaultReadData(
in, pFeatId);
406 if(pFeatId->IsLocal() && pFeatId->GetLocal().IsId())
415 auto* pObject =
object.GetObjectPtr();
416 object.GetTypeInfo()->DefaultReadData(
in, pObject);
418 if(pFeatId->IsLocal() && pFeatId->GetLocal().IsId())
443obj_stream->SkipFileHeader(object_type);
447obj_stream->EndOfData();
458 if(object_type ==
nullptr|| !object_type->IsCObject())
463 autoobj_info = obj_stream->Read(object_type);
465obj_stream->EndOfData();
485 autoexistingPos = existingInfo.
m_pos;
486 autonewPos = newInfo.
m_pos;
490 if(!filename.empty()) {
491existingFilePos = filename +
":"+ existingFilePos;
492newFilePos = filename +
":"+ newFilePos;
495 " present in the set starting at "+ existingFilePos;
496 if(newPos != existingPos) {
497 msg+=
" and the set starting at "+ newFilePos;
511std::list<CRef<CSeq_annot>> pAnnots;
513 return{pDescriptors, pAnnots};
517 autobioseqset_annot_mi = bioseq_set_info.
FindMember(
"annot");
522pDescriptors->
Assign(*top->m_descr);
525 if(top->HasAnnot()) {
527bioseqset_annot_mi.GetMemberInfo()->GetTypeInfo()->ReadData(*obj_stream, &pAnnots);
538pDescriptors->
Assign(*it->m_descr);
541 for(
autopDesc : it->m_descr->Get()) {
542pDescriptors->
Set().push_back(pDesc);
546 if(it->HasAnnot()) {
548list< CRef< CSeq_annot > > annots;
549bioseqset_annot_mi.GetMemberInfo()->GetTypeInfo()->ReadData(*obj_stream, &annots);
550 if(!annots.empty()) {
551pAnnots.splice(pAnnots.end(), std::move(annots));
555 return{pDescriptors, pAnnots};
575 auto& parent = rec.m_parent_set;
600 auto& parent = rec.m_parent_set;
602 if(
auto_class = parent->m_class;
IsHugeSet(_class))
608 autograndParent = parent->m_parent_set;
609 while(!
IsHugeSet(grandParent->m_class)) {
610parent = grandParent;
611grandParent = grandParent->m_parent_set;
619 for(
auto id: rec.m_ids) {
637std::list<CRef<CSeq_annot>> pAnnots;
641pTopEntry->SetSet().SetLevel() = top->m_Level.value();
643pTopEntry->SetSet().SetClass() = top->m_class;
645pTopEntry->SetSet().SetDescr().Assign(*pDescriptors);
647 if(!pAnnots.empty()) {
648 auto& dest = pTopEntry->SetAnnot();
649dest.splice(dest.end(), std::move(pAnnots));
666std::list<CRef<CSeq_annot>> pAnnots;
668 if(pDescriptors || !pAnnots.empty() || top->m_Level) {
671top_entry->SetSet().SetLevel() = top->m_Level.value();
673top_entry->SetSet().SetClass() = top->m_class;
675top_entry->SetSet().SetDescr(*pDescriptors);
677 if(!pAnnots.empty()) {
678 auto& dest = top_entry->SetAnnot();
679dest.splice(dest.end(), std::move(pAnnots));
701 return!
all.empty();
717 const autoaddTopEntry =
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void Open(CHugeFile *file, ILineErrorListener *pMessageListener) override
bool IsMultiSequence() const override
bool GetNextBlob() override
const TBioseqSetInfo * FindTopObject(CConstRef< CSeq_id > seqid) const
CConstRef< CSeqdesc > GetClosestDescriptor(const TBioseqInfo &info, CSeqdesc::E_Choice choice) const
unique_ptr< CObjectIStream > MakeObjStream(TFileSize pos) const
auto & GetBiosets() const
CRef< CSerialObject > ReadAny()
void x_ThrowDuplicateId(const TBioseqSetInfo &existingInfo, const TBioseqSetInfo &newInfo, const CSeq_id &duplicateId)
virtual void x_SetBioseqSetHooks(CObjectIStream &objStream, TContext &context)
std::list< CConstRef< CSeq_id > > m_top_ids
TBioseqIndex m_bioseq_index
static bool IsHugeSet(CBioseq_set::TClass setClass)
std::tuple< CRef< CSeq_descr >, std::list< CRef< CSeq_annot > > > x_GetTopLevelDescriptors() const
const CBioseq_set::TClass * m_pTopLevelClass
ILineErrorListener * mp_MessageListener
bool HasNestedGenbankSets() const
bool IsNotJustLocalOrGeneral() const
CConstRef< CSubmit_block > GetSubmitBlock() const override
CRef< CSeq_entry > GetNextSeqEntry() override
virtual CRef< CSeq_entry > LoadSeqEntry(const TBioseqSetInfo &info, eAddTopEntry add_top_entry=eAddTopEntry::yes) const
TSeqIdTypes m_seq_id_types
void ExtendReadHooks(t_more_hooks hooks)
CConstRef< CSubmit_block > m_submit_block
TStreamPos GetCurrentPos() const
TBioseqSetList::const_iterator m_Current
const TBioseqInfo * FindBioseq(CConstRef< CSeq_id > seqid) const
const CBioseq_set::TClass * GetTopLevelClass() const
bool HasLoneProteins() const
TBioseqSetList m_FlattenedSets
TBioseqList m_bioseq_list
TBioseqSetList m_bioseq_set_list
virtual void FlattenGenbankSet()
virtual void x_SetHooks(CObjectIStream &objStream, TContext &context)
virtual void x_SetFeatIdHooks(CObjectIStream &objStream)
TBioseqSetIndex m_FlattenedIndex
CRef< CBioseq > LoadBioseq(CConstRef< CSeq_id > seqid) const
virtual void x_SetBioseqHooks(CObjectIStream &objStream, TContext &context)
std::list< t_more_hooks > m_more_hooks
std::function< void(CObjectIStream &)> t_more_hooks
CRef< CSeq_entry > m_top_entry
unique_ptr< CObjectIStream > MakeObjStream(std::streampos pos=0) const
TTypeInfo RecognizeContent(std::streampos pos)
std::streampos m_filesize
@Seq_descr.hpp User-defined methods of the data storage class.
Base class for all serializable objects.
constexpr bool test(T _Pos) const
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static const TObjectType * SafeCast(TTypeInfo type)
string GetLabel(const CSeq_id &id)
CMemberIterator FindMember(const string &memberName) const
Find class member by its name.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
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.
static string UInt8ToString(Uint8 value, TNumToStringFlags flags=0, int base=10)
Convert UInt8 to string.
@ e_Other
for historical reasons, 'other' = 'refseq'
@ e_General
for other databases
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_genbank
converted genbank
const Tdata & Get(void) const
Get the member data.
E_Choice
Choice variants.
bool IsSet(void) const
Check if a value has been assigned to data member.
Tdata & Set(void)
Assign a value to data member.
static CConstRef< CSeqdesc > s_GetDescriptor(const CSeq_descr &descr, CSeqdesc::E_Choice choice)
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
std::istream & in(std::istream &in_, double &x_)
void SetLocalSkipHook(const CObjectTypeInfo &obj_type_info, CObjectIStream &istr, _Func _func)
void SetLocalReadHook(const CObjectTypeInfo &obj_type_info, CObjectIStream &ostr, _Func _func)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static CS_CONTEXT * context
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