53 const string& data_file,
65 return "SPLIT_LOADER_DEMO:" + data_file;
70 const string& data_file)
72 m_DataFile(data_file),
124 chunk->
x_LoadAnnot(annot->m_Place, *annot->m_Annot);
131 chunk->
x_LoadDescr(descr->second.m_Place, *descr->second.m_Descr);
138 sequence.push_back(seq->second.m_Literal);
166 if ( blob_id != my_blob_id ) {
203 info.GetSplitInfo().AddChunk(**it);
231 if ( (*it)->IsSeq() ) {
264 data.m_Place.first = idh;
268 data.m_Literal->SetSeq_data(bioseq.
SetInst().SetSeq_data());
269 bioseq.
SetInst().ResetSeq_data();
276 loc_set.push_back(loc);
284 chunks.push_back(chunk);
304 data.m_Place = place;
305 data.m_Descr.Reset(&descr);
307 chunks.push_back(chunk);
320 data.m_Place = place;
325 data.m_Annot = &annot;
326 annot_chunks.push_back(
data);
342 chunks.push_back(chunk);
356 handles.
insert(loc_it.GetSeq_id_Handle());
360 handles.
insert(loc_it.GetSeq_id_Handle());
402 handles.
insert(loc_it.GetSeq_id_Handle());
User-defined methods of the data storage class.
const CSeq_id * GetFirstId() const
CTSE_LoadLock GetTSE_LoadLock(const TBlobId &blob_id)
TDim CheckNumRows(void) const
Validatiors.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
@Seq_descr.hpp User-defined methods of the data storage class.
namespace ncbi::objects::
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
void x_SplitSet(TChunks &chunks, CBioseq_set &seqset)
void x_SplitAnnot(TChunks &chunks, TPlace place, CBioseq::TAnnot &annots)
TDescrChunks m_DescrChunks
vector< CRef< CTSE_Chunk_Info > > TChunks
virtual void GetChunk(TChunk chunk)
virtual ~CSplitDataLoader(void)
void x_LoadData(CTSE_LoadLock &load_lock)
TAnnotChunks m_AnnotChunks
void x_SplitSeqData(TChunks &chunks, CSeq_id_Handle idh, CBioseq &bioseq)
void x_SplitFeats(CTSE_Chunk_Info &chunk, const CSeq_annot &annot)
void x_SplitSeq(TChunks &chunks, CBioseq &bioseq)
TSequenceChunks m_SeqChunks
virtual bool CanGetBlobById(void) const
void x_SplitAligns(CTSE_Chunk_Info &chunk, const CSeq_annot &annot)
virtual TBlobId GetBlobId(const CSeq_id_Handle &idh)
CSplitDataLoader(const string &loader_name, const string &data_file)
virtual void DropTSE(CRef< CTSE_Info > tse_info)
vector< SAnnotData > TAnnots
CTSE_Chunk_Info::TPlace TPlace
void x_SplitGraphs(CTSE_Chunk_Info &chunk, const CSeq_annot &annot)
virtual TTSE_Lock GetBlobById(const TBlobId &blob_id)
void x_SplitDescr(TChunks &chunks, TPlace place, CSeq_descr &descr)
virtual TTSE_LockSet GetRecords(const CSeq_id_Handle &idh, EChoice choice)
Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call wi...
static string GetLoaderNameFromArgs(const string &data_file)
void x_AddAnnotPlace(const TBioseqId &id)
void x_LoadAnnot(const TPlace &place, const CSeq_annot &annot)
void x_AddDescInfo(TDescTypeMask type_mask, const TBioseqId &id)
void x_LoadSequence(const TPlace &place, TSeqPos pos, const TSequence &seq)
void SetLoaded(CObject *obj=0)
vector< TLocation > TLocationSet
void x_LoadDescr(const TPlace &place, const CSeq_descr &descr)
TChunkId GetChunkId(void) const
void x_AddAnnotType(const CAnnotName &annot_name, const SAnnotTypeSelector &annot_type, const TLocationId &location_id)
list< CRef< CSeq_literal > > TSequence
void x_AddSeq_data(const TLocationSet &location)
pair< TLocationId, TLocationRange > TLocation
bool IsLoaded(void) const
bool IsLoaded(void) const
container_type::iterator iterator
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
#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.
@ eSerial_AsnText
ASN.1 text.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
CDataSource * GetDataSource(void) const
EChoice
main blob is blob with sequence all other blobs are external and contain external annotations
TRegisterInfo GetRegisterInfo(void)
CBlobIdFor< string > CBlobIdString
static void RegisterInObjectManager(CObjectManager &om, CLoaderMaker_Base &loader_maker, CObjectManager::EIsDefault is_default, CObjectManager::TPriority priority)
Register the loader only if the name is not yet registered in the object manager.
void Reset(void)
Reset reference object.
static TThisType GetWhole(void)
#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.
TId GetId(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
const TProduct & GetProduct(void) const
Get the Product member data.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
const TLoc & GetLoc(void) const
Get the Loc member data.
TSet & SetSet(void)
Select the variant.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
void SetId(TId &value)
Assign a value to Id data member.
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
void ResetDescr(void)
Reset Descr data member.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
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.
bool IsAlign(void) const
Check if variant Align is selected.
void ResetDescr(void)
Reset Descr data member.
bool IsSetSeq_data(void) const
the sequence Check if a value has been assigned to Seq_data data member.
const TGraph & GetGraph(void) const
Get the variant data.
const TInst & GetInst(void) const
Get the Inst member data.
list< CRef< CSeq_graph > > TGraph
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
list< CRef< CSeq_align > > TAlign
TLength GetLength(void) const
Get the Length member data.
const TAlign & GetAlign(void) const
Get the variant data.
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.
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
bool IsGraph(void) const
Check if variant Graph is selected.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
const TFtable & GetFtable(void) const
Get the variant data.
list< CRef< CSeq_feat > > TFtable
bool IsFtable(void) const
Check if variant Ftable is selected.
const TData & GetData(void) const
Get the Data member data.
list< CRef< CSeq_annot > > TAnnot
E_Choice Which(void) const
Which variant is currently selected.
CRef< objects::CObjectManager > om
#define row(bind, expected)