62 const string& alias_scope)
77 const string& alias_scope)
101 switch ( src_id.
Which() ) {
109 txt_id = &acc_id.
SetPir();
121 txt_id = &acc_id.
SetPrf();
124 txt_id = &acc_id.
SetTpg();
127 txt_id = &acc_id.
SetTpe();
130 txt_id = &acc_id.
SetTpd();
157 const string& alias_scope)
166 switch ((*it)->Which()) {
170 if ( (*it)->GetGenbank().IsSetGpipe() ) {
174 else if (map_to ==
eGenBank && (*it)->GetGenbank().IsSetGi()) {
186 if ( (*it)->GetRefseq().IsSetGpipe() ) {
190 else if (map_to ==
eRefSeq && (*it)->GetRefseq().IsSetGi()) {
203 else if (map_to ==
eUCSC &&
204 (*it)->GetExternal().GetExternal() ==
"UCSC") {
227 switch ((*it)->Which()) {
262 if ((*it)->GetPrivate().IsLocal()) {
264 (*it)->GetPrivate().GetLocal().GetStr();
267 id.
Set(
"lcl|chr" + s);
277 const CSeq_id&
id = (*it)->GetExternal().GetId();
287 "Unhandled ID type in GC-Assembly: " +
299 if (
id.IsLocal() &&
id.GetLocal().IsStr() &&
300 id.GetLocal().GetStr().find(
"_random") != string::npos &&
315 bioseq->
SetId().push_back(chr_lcl);
317 bioseq->
SetId().push_back(lcl);
341 for ( ; id_iter; ++id_iter) {
344 m_Cache[idh].dest_mapper = mapper;
383 const string& alias_scope)
391 map_to, alias_scope);
415 const string& alias_scope)
422 map_to, alias_scope);
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void x_AddUnversionedMapping(const CSeq_id &src_id, const CSeq_id_Handle &dst_id)
void AddAliasMappings(const CGC_Assembly &assm, EAliasMapping mapping, const string &alias_scope=kEmptyStr)
EAliasMapping
Mapping destination type.
@ eGenBankAcc
GenBank accession.
@ eAccVer
Find versioned accession.
@ eRefSeqAcc
RefSeq accession.
virtual CSeq_id_Handle Map(const CSeq_id_Handle &)
void x_AddAccessionMapping(const CSeq_id &id)
CIdMapperGCAssembly(CScope &scope, const CGC_Assembly &assm, EAliasMapping mapping, const string &alias_scope=kEmptyStr)
Establish mappings based on a GC-Assembly.
void x_AddAliasMappings(const CGC_Assembly &seq, EAliasMapping mapping, const string &alias_scope)
virtual CSeq_id_Handle Map(const CSeq_id_Handle &)
Map a single given CSeq_id_Handle to another.
static std::string MapErrorString(const CSeq_id_Handle &)
virtual void AddMapping(const CSeq_id_Handle &from, const CSeq_id_Handle &to)
Add a mapping to the internal mapping table.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
Template class for iteration on objects of class C (non-medifiable version)
static const char * str(char *buf, int n)
#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.
#define MSerial_AsnText
I/O stream manipulators –.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
CSeq_id & Set(const CTempString &the_id, TParseFlags flags=fParse_AnyRaw)
Reassign based on flat specifications; arguments interpreted as with constructors.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
@ eSeqMap_Down
map from a segmented bioseq to segments
@ eSeqMap_Up
map from segments to the top level bioseq
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string PrintableString(const CTempString str, TPrintableMode mode=fNewLine_Quote|fNonAscii_Passthru)
Get a printable version of the specified string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
@ fNewLine_Quote
Display "\n" instead of actual linebreak.
TStr & SetStr(void)
Select the variant.
bool IsSetGpipe(void) const
the gpipe accession Check if a value has been assigned to Gpipe data member.
list< CRef< CGC_Sequence > > TSeqs
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.
bool IsSetMols(void) const
collections of molecules for this assembly Check if a value has been assigned to Mols data member.
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 TOther_sequences & GetOther_sequences(void) const
Get the Other_sequences member data.
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...
const TSeq_id_synonyms & GetSeq_id_synonyms(void) const
Get the Seq_id_synonyms member data.
list< CRef< CGC_TaggedSequences > > TSequences
const TAssembly_set & GetAssembly_set(void) const
Get the variant data.
const TMols & GetMols(void) const
Get the Mols member data.
list< CRef< CGC_Replicon > > TMols
bool IsSetSequences(void) const
placed: populated both on chromosome and scaffold levels unlocalized: populated on chromosome level C...
const TSequence & GetSequence(void) const
Get the Sequence 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.
bool IsSetSeq_id_synonyms(void) const
Other known identifiers: Local / gpipe-satellite / genbank / refseq Check if a value has been assigne...
list< CRef< CGC_TaggedSequences > > TOther_sequences
const TSeq_id & GetSeq_id(void) const
Get the Seq_id member data.
TNamed_annot_track & SetNamed_annot_track(void)
Select the variant.
TEmbl & SetEmbl(void)
Select the variant.
TOther & SetOther(void)
Select the variant.
void ResetVersion(void)
Reset Version data member.
TTpe & SetTpe(void)
Select the variant.
TTpg & SetTpg(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
void ResetRelease(void)
Reset Release data member.
TPir & SetPir(void)
Select the variant.
TTpd & SetTpd(void)
Select the variant.
TGpipe & SetGpipe(void)
Select the variant.
TDdbj & SetDdbj(void)
Select the variant.
TLocal & SetLocal(void)
Select the variant.
void ResetName(void)
Reset Name data member.
TPrf & SetPrf(void)
Select the variant.
TGenbank & SetGenbank(void)
Select the variant.
TSwissprot & SetSwissprot(void)
Select the variant.
@ 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_Named_annot_track
Internal named annotation tracking ID.
@ e_Tpg
Third Party Annot/Seq Genbank.
TId & SetId(void)
Assign a value to Id data member.
void SetInst(TInst &value)
Assign a value to Inst data member.
@ eRepr_delta
sequence made by changes (delta) to others
@ eMol_na
just a nucleic acid