45 #define NCBI_USE_ERRCODE_X ObjMgr_GC_Assembly_Parser
53 switch ( GetErrCode() ) {
54 case eUnsupported:
return "eUnsupported";
55 case eOtherError:
return "eOtherError";
109 annot_copy->
Assign(**annot);
110 entry.
SetAnnot().push_back(annot_copy);
119 if ( gc_assembly.
IsUnit() ) {
187 if (
delta.IsLoc() ) {
189 switch (delta_loc.
Which()) {
207 if (tagged_seq.
GetSeqs().size() == 1) {
220 switch ( it_id.
Which() ) {
259 "Unsupported alias type in GC-Sequence synonyms");
264 if (synonyms.
find(struct_syn) != synonyms.
end()) {
280 entry = parent_entry;
294 annot_copy->
Assign(**annot);
295 entry->
SetAnnot().push_back(annot_copy);
341 syn_id->
Assign(*syn->GetSeqId());
342 bioseq->
SetId().push_back(syn_id);
353 bioseq->
SetInst().SetExt().SetDelta(
Seq-loc and seq-align mapper exceptions.
the sequence(s) representing this molecule in the case of 2L and 2R - the molecule is represented by ...
bool CanGetLength() const
Is the length statistic available?
TSeqPos GetLength() const
return the length of this sequence.
@Seq_descr.hpp User-defined methods of the data storage class.
void SetDescr(CSeq_descr &value)
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
SQLRETURN desc_copy(TDS_DESC *dest, TDS_DESC *src)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
void x_ParseGCSequence(const CGC_Sequence &gc_seq, const CGC_Sequence *parent_seq, CRef< CSeq_entry > parent_entry, CRef< CSeq_id > override_id)
CGC_Assembly_Parser(const CGC_Assembly &assembly, TParserFlags flags=fDefault)
Parse the assembly, convert it to seq-entry, collect additional information (top-level sequences etc)...
void x_InitSeq_entry(CRef< CSeq_entry > entry, CRef< CSeq_entry > parent)
void x_CopyData(const CGC_AssemblyDesc &assm_desc, CSeq_entry &entry)
void x_AddBioseq(CRef< CSeq_entry > parent_entry, const TSeqIds &synonyms, const CGC_Sequence &gc_seq)
virtual ~CGC_Assembly_Parser(void)
void x_ParseGCAssembly(const CGC_Assembly &gc_assembly, CRef< CSeq_entry > parent_entry)
@ fIgnoreLocalIds
Do not add local private and external ids to bioseqs.
@ fIgnoreAnnots
Do not add annotations to seq-entries and bioseqs.
@ fIgnoreExternalIds
Do not add external ids to bioseqs.
@ fIgnoreDescr
Do not add descriptions to seq-entries and bioseqs.
@ fSkipDuplicates
Skip duplicate sequences (all synonyms are checked).
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.
const TGenbank & GetGenbank(void) const
Get the variant data.
bool IsSetGpipe(void) const
the gpipe accession Check if a value has been assigned to Gpipe data member.
list< CRef< CSeq_annot > > TAnnot
const TDescr & GetDescr(void) const
Get the Descr member data.
list< CRef< CGC_Sequence > > TSeqs
const TId & GetId(void) const
Get the Id member data.
bool IsSetDescr(void) const
Various attributes assigned at this level: biosrc, comments, publications...
const TUnit & GetUnit(void) const
Get the variant data.
const TStructure & GetStructure(void) const
Get the Structure member data.
bool IsSingle(void) const
Check if variant Single is selected.
const TGi & GetGi(void) const
Get the Gi member data.
list< CRef< CSeq_annot > > TAnnot
const TDesc & GetDesc(void) const
Get the Desc member data.
bool IsSetAnnot(void) const
in alt-loci units - contain alignment of this sequence to the primary unit Check if a value has been ...
bool IsSetDesc(void) const
descriptors live in a shared data block Check if a value has been assigned to Desc data member.
const TRefseq & GetRefseq(void) const
Get the variant data.
bool IsSetMols(void) const
collections of molecules for this assembly Check if a value has been assigned to Mols data member.
const TPrivate & GetPrivate(void) const
Get the variant data.
list< CRef< CGC_TypedSeqId > > TSeq_id_synonyms
bool IsAssembly_set(void) const
Check if variant Assembly_set is selected.
bool IsSetMore_assemblies(void) const
Check if a value has been assigned to More_assemblies data member.
bool IsSetOther_sequences(void) const
On primary assembly-unit: here will be the unplaced sequences On alt-loci: list of sequences aligned/...
const TDesc & GetDesc(void) const
Get the Desc member data.
const TOther_sequences & GetOther_sequences(void) const
Get the Other_sequences member data.
bool IsSetAnnot(void) const
Feature annotation; Contains Pseudo Autosomal regions on chromosomes and scaffolds in the following f...
const TPrimary_assembly & GetPrimary_assembly(void) const
Get the Primary_assembly member data.
bool IsSetStructure(void) const
locations of ordered scaffolds/components Check if a value has been assigned to Structure data member...
E_Choice Which(void) const
Which variant is currently selected.
const TExternal & GetExternal(void) const
Get the variant data.
const TSeq_id_synonyms & GetSeq_id_synonyms(void) const
Get the Seq_id_synonyms member data.
const TSeqs & GetSeqs(void) const
Get the Seqs member data.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
bool IsSetGi(void) const
optional since not all sequences have GIs Similarity: relationship between this synonym to main seqid...
list< CRef< CGC_TaggedSequences > > TSequences
const TAssembly_set & GetAssembly_set(void) const
Get the variant data.
bool IsSetDesc(void) const
descriptors live in a shared data block Check if a value has been assigned to Desc data member.
const TMols & GetMols(void) const
Get the Mols member data.
bool IsSetDescr(void) const
Various attributes assigned at this level: biosrc, comments, publications...
list< CRef< CGC_Replicon > > TMols
bool IsSetSequences(void) const
placed: populated both on chromosome and scaffold levels unlocalized: populated on chromosome level C...
const TDescr & GetDescr(void) const
Get the Descr member data.
const TGpipe & GetGpipe(void) const
Get the Gpipe member data.
const TSequences & GetSequences(void) const
Get the Sequences member data.
bool IsUnit(void) const
Check if variant Unit is selected.
list< CRef< CGC_Assembly > > TMore_assemblies
list< CRef< CGC_Sequence > > TSet
const TSingle & GetSingle(void) const
Get the variant data.
const TPublic & GetPublic(void) const
Get the Public member data.
const TSet & GetSet(void) const
Get the variant data.
const TMore_assemblies & GetMore_assemblies(void) const
Get the More_assemblies member data.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
bool IsSetSeq_id_synonyms(void) const
Other known identifiers: Local / gpipe-satellite / genbank / refseq Check if a value has been assigne...
const TSeq_id & GetSeq_id(void) const
Get the Seq_id member data.
@ eState_placed
exist only within a replicon. placed sequences on higher sequence
const TId & GetId(void) const
Get the Id member data.
const TWhole & GetWhole(void) const
Get the variant data.
TFrom GetFrom(void) const
Get the From member data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsLocal(void) const
Check if variant Local is selected.
const TInt & GetInt(void) const
Get the variant data.
TSet & SetSet(void)
Select the variant.
const TSet & GetSet(void) const
Get the variant data.
void SetLevel(TLevel value)
Assign a value to Level data member.
void SetClass(TClass value)
Assign a value to Class data member.
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
TLevel GetLevel(void) const
Get the Level member data.
@ eClass_segset
segmented sequence + parts
list< CRef< CSeqdesc > > Tdata
TId & SetId(void)
Assign a value to Id data member.
const Tdata & Get(void) const
Get the member data.
void SetInst(TInst &value)
Assign a value to Inst data member.
const Tdata & Get(void) const
Get the member data.
@ eRepr_delta
sequence made by changes (delta) to others
@ eRepr_virtual
no seq data
@ eMol_na
just a nucleic acid
Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).
Int4 delta(size_t dimension_, const Int4 *score_)