:
CAppJob(
"FASTA Export"), m_Params(params)
74 const CSeq_loc* loc =
dynamic_cast<const CSeq_loc*
>(it->object.GetPointer());
85 dynamic_cast<const CSeq_entry&
>(iter->GetObject());
87 for(; bioseq_iter; ++bioseq_iter) {
88fasta_ostr.
Write(*bioseq_iter);
94 if(whole_loc.
Empty())
98fasta_ostr.
Write(handle, whole_loc);
105fasta_ostr.
Write(handle, loc);
110err_msg =
"Failed to save file:\n";
114 if(err_msg.empty()) {
127best_id_loc->
Assign(loc);
136 for(
auto&ex_loc : loc_vector) {
137 if(ex_loc->Equals(*best_id_loc))
141loc_vector.push_back(best_id_loc);
162 for(
auto&ex_loc : loc_vector) {
163 if(ex_loc->Equals(*best_id_loc))
167loc_vector.push_back(best_id_loc);
CAppJobError Default implementation for IAppJobError - encapsulates a text error message.
CAppJob - default implementation of IAppJob that could be used as a base class.
CFastaExportParams m_Params
CFastaExportJob(const CFastaExportParams ¶ms)
bool x_CheckForDuplicates(const objects::CSeq_loc &loc, TLocVector &loc_vector, objects::CScope &scope) const
virtual EJobState Run()
Function that does all the useful work, called by the Engine.
CConstRef< objects::CSeq_loc > x_GetWholeLoc(const objects::CSeq_loc &loc, TLocVector &loc_vector, objects::CScope &scope) const
std::vector< CConstRef< objects::CSeq_loc > > TLocVector
bool GetSaveMasterRecord() const
wxString GetFileName() const
const TConstScopedObjects & GetObjects() const
int GetExportType() const
FASTA-format output; see also ReadFasta in <objtools/readers/fasta.hpp>
static void Convert(objects::CScope &scope, const CObject &obj, const CTypeInfo *info, TObjList &objs, TFlags flags=eDefault)
Convert an object of potentially unknown type to a set of objects of known type.
ITypeConverter::TObjList TObjList
USING_SCOPE(ncbi::objects)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
const string & GetMsg(void) const
Get message string.
void Info(CExceptionArgs_Base &args)
CRef< CAppJobError > m_Error
string m_Descr
mutex to sync our internals
EJobState
Job states (describe FSM)
vector< SConstScopedObject > TConstScopedObjects
CConstRef< CSeq_id > GetSeqId(void) const
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
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,...
virtual void Write(const CSeq_entry_Handle &handle, const CSeq_loc *location=0)
Unspecified locations designate complete sequences; non-empty custom titles override the usual title ...
void SetFlag(EFlags flag)
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
@ fInstantiateGaps
honor specifed gap mode; on by default
@ fAssembleParts
assemble FAR delta sequences; on by dflt
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
bool Empty(void) const THROWS_NONE
Check if CConstRef is empty â not pointing to any object which means having a null value.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
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