: m_Descr(
"Build CAlnVec-based alignment"),
231m_SelectAnchor(select_anchor)
248 stringerr_msg, logMsg =
"CBuildAlnVecJob - exception in Run() ";
254 switch( aex.GetErrCode() ){
260err_msg =
"Sorry, merging of multiple alignments has failed. Alignments of this type are not supported.";
270err_msg =
"ShutDown "+ aex.GetMsg();
273err_msg = logMsg +
GetDescr() +
". "+aex.GetMsg();
283}
catch(std::exception& e) {
291 if(!err_msg.empty()) {
374 if(n_align == 1 &&
m_Aligns[0]->GetSegs().IsDenseg()) {
383 m_TaskName=
"Adding Seq-aligns to the alignment";
389 intanchor_index = -1;
391 for(
size_t i= 0;
i< n_align;
i++) {
396check_anchor = check_anchor && aln.CheckNumRows() == 2;
399ids[0] =
ConstRef(&aln.GetSeq_id(0));
400ids[1] =
ConstRef(&aln.GetSeq_id(1));
401}
else if(anchor_index == -1) {
402 if(ids[0]->Match(aln.GetSeq_id(0))) {
405 if(ids[1]->Match(aln.GetSeq_id(1))) {
406anchor_index = (anchor_index == 0) ? -1 : 1;
408}
else if(ids[anchor_index]->Match(aln.GetSeq_id(anchor_index)) ==
false) {
409check_anchor =
false;
417 if(check_anchor && anchor_index != -1)
418 swap(anchor_id, ids[anchor_index]);
435 for(
int row= 0;
row< row_num; ++
row) {
440 if(anchor_row == -1) {
451}
catch(std::exception&) {
460 SetTaskName(
"Initializing alignment segment types ... ");
462 for(
int row= 0;
row< row_num; ++
row) {
467}
catch(std::exception&) {
474 if(anchor_row != -1)
static CRef< CScope > m_Scope
USING_SCOPE(ncbi::objects)
TSegTypeFlags GetSegType(TNumrow row, TNumseg seg, int offset=0) const
const CSeq_id & GetSeqId(TNumrow row) const
TDim GetNumRows(void) const
void Add(const CDense_seg &ds, TAddFlags flags=0)
void Merge(TMergeFlags flags=0)
const CDense_seg & GetDenseg(void) const
CScope & GetScope(void) const
const CBioseq_Handle & GetBioseqHandle(TNumrow row) const
CAppJobError Default implementation for IAppJobError - encapsulates a text error message.
CAppJobProgress Default implementation for IAppJobProgress - the class encapsulates a text message an...
virtual CRef< CObject > GetResult()
Returns the Job Result.
vector< CConstRef< objects::CSeq_align > > TAligns
CBuildAlnVecJob(const TAligns &aligns, objects::CScope &scope, bool select_anchor=false)
CBuildAlnVecJob.
CRef< CBuildAlnVecResult > m_Result
virtual ~CBuildAlnVecJob()
virtual CConstIRef< IAppJobProgress > GetProgress()
return progress object, the function shall be synchronized internally.
virtual void SetTaskCompleted(int completed)
virtual void SetTaskTotal(int total)
virtual CConstIRef< IAppJobError > GetError()
Returns IAppJobError object describing internal error that caused the Job to fail.
virtual string GetDescr() const
Returns a human readable description of the Job (optional)
CRef< objects::CScope > m_Scope
virtual bool InterruptTask()
virtual void SetTaskName(const string &name)
virtual EJobState Run()
Function that does all the useful work, called by the Engine.
CRef< CAppJobError > m_Error
CRef< objects::CAlnVec > m_AlnVec
void SetTaskProgressCallback(ITaskProgressCallback *callback)
Hook a callback to a task.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#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.
void Warning(CExceptionArgs_Base &args)
string ReportAll(TDiagPostFlags flags=eDPF_Exception) const
Report all exceptions.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
virtual bool IsCanceled() const override
EJobState
Job states (describe FSM)
void SetNormDone(float done)
void SetText(const string &text)
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
unsigned int
A callback function used to compare two keys in a database.
#define row(bind, expected)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4