60 }
catch (sequence::CSeqIdFromHandleException& e) {
61 if (e.GetErrCode() != sequence::CSeqIdFromHandleException::eRequestedIdNotFound)
63 canonical_id.
Reset(&
id);
70 return id.AsFastaString();
static CRef< CScope > m_Scope
static bool IsId(const CObject_id &obj)
static CRef< CSeq_id > GnomonMRNA(Int8 id)
static void SetId(CObject_id &obj, Int8 value)
static CRef< CSeq_id > ToSeq_id(const string &str)
static string ToString(const CSeq_id &id)
static Int8 GetId(const CObject_id &obj)
static CRef< CSeq_id > GnomonProtein(Int8 id)
CConstRef< CSeq_id > ToCanonical(const CSeq_id &id) const
E_Choice GetIdType(TId8 &value) const
The NCBI C++ standard methods for dealing with std::string.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
CConstRef< CSeq_id > GetSeqId(void) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
@ eGetId_ThrowOnError
Throw exception on errors. If not set, an empty value is returned.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
void Reset(void)
Reset reference object.
int64_t Int8
8-byte (64-bit) signed integer
#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 enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
void SetTag(TTag &value)
Assign a value to Tag data member.
TStr & SetStr(void)
Select the variant.
void SetDb(const TDb &value)
Assign a value to Db data member.
TId & SetId(void)
Select the variant.
@ e_not_set
No variant selected.
string GetDNASequence(CConstRef< objects::CSeq_id > id, CScope &scope)
static const char * str(char *buf, int n)