48 : m_Ids(ids), m_NAs(NAs)
61 return "Loading " + s +
" from GenBank";
84 if (seq_id == 0 && seq_loc == 0) {
85 LOG_POST(
Error <<
"CGBObjectLoader::Execute(): Invalid object type to open.");
98 if (seq_loc && seq_loc->
IsInt()) {
103 if (ival.
GetFrom() < bioseqLength) {
104 if (ival.
GetTo() > bioseqLength)
105 ival.
SetTo(bioseqLength);
108 ival.
SetTo(bioseqLength);
119 catch (
const exception& e) {
124 for (
const auto& na :
m_NAs) {
139 for (
auto gi : gis) {
175 catch (
const exception& e) {
void x_ShowErrorsDlg(const wxString &title)
void x_UpdateHTMLResults(const wxString &object, objects::ILineErrorListener *errCont, const string &exception="", const string &error_msg="", const wxString &objectName=wxT("File:"))
Interface for testing cancellation request in a long lasting operation.
vector< SObject > TObjects
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
static void GetAllGIs(const TNAA &naa, EEntrezDB eedb, TGis &gis, EUidsSource *pUidsSource=NULL)
EEntrezDB
eutils databases that can be used
@ EEDB_All
try both nucleotide and protein databases, merge results
CGBObjectLoader(const vector< CRef< CObject > > &ids, const vector< string > &NAs)
virtual bool PreExecute()
virtual bool PostExecute()
vector< CRef< CObject > > m_Ids
virtual TObjects & GetObjects()
virtual bool Execute(ICanceled &canceled)
virtual string GetDescription() const
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
TSeqPos GetBioseqLength(void) const
SAnnotSelector & IncludeNamedAnnotAccession(const string &acc, int zoom_level=0)
SAnnotSelector & AddNamedAnnots(const CAnnotName &name)
Add named annot to set of annots names to look for.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual bool IsCanceled(void) const =0
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.
static const char label[]
void SetTo(TTo value)
Assign a value to To data member.
TFrom GetFrom(void) const
Get the From member data.
void SetFrom(TFrom value)
Assign a value to From data member.
TGi & SetGi(void)
Select the variant.
TTo GetTo(void) const
Get the To member data.
bool IsInt(void) const
Check if variant Int is selected.