54 #include <wx/filename.h>
67 #if defined(NCBI_OS_MSWIN)
108 throw std::runtime_error(
"Could not initialize object manager");
127 for( ; bioseq_ci; ++bioseq_ci ) {
136 search_loc->
SetWhole(*selected_seq_id);
149 int progressCount = 0;
157 SSeqLoc ssl(*search_loc, *scope);
158 query.push_back(ssl);
171 const list<CVecscreen::AlnInfo*>* aln_info =
176 vecscreen.
SetImagePath( resPath.ToStdString() +
string(
"/") );
177 stringstream ssAlignGraphic;
178 ssAlignGraphic <<
"<HTML>"
179 <<
"<TITLE>BLAST Search Results</TITLE>"
180 <<
"<BODY BGCOLOR=\"#FFFFFF\" LINK=\"#0000FF\" VLINK=\"#660099\" ALINK=\"#660099\" >"
183 ssAlignGraphic <<
"</PRE>"
188 list<CVecscreen::AlnInfo*>::const_iterator itr = aln_info->begin();
189 for ( ; itr != aln_info->end(); ++itr )
197 summary.
range = (*itr)->range;
205 vector<SRangeMatch> rangematchArr;
206 rangematchArr.push_back(rangematch);
209 rangematchArr, seqlen);
211 pair<TVecscreenSummaryBySeqid::iterator, bool> ins_res =
214 if ( !ins_res.second )
230 progress.SetValue(++progressCount);
236 const vector<CVecscreenRun::SVecscreenSummary>&
293 const CTextseq_id* textseq_id =
id->GetTextseq_Id();
343 if ( localid.
IsId() )
349 if ( localid.
IsStr() )
Data loader implementation that uses the blast databases.
Declares the CBlastNucleotideOptionsHandle class.
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
@ eNucleotide
nucleotide database
Class to perform a BLAST search on local BLAST databases Note that PHI-BLAST can be run using this cl...
NCBI C++ Object Manager dependant implementation of IQueryFactory.
static wxString GetResourcePath(void)
the shared resource path corresponds to the <res> alias above.
void SetImagePath(string path)
Set path to pre-made image gif files with different colors.
static string GetStrengthString(MatchType match_type)
Returns a string concerning the strength of the match for a given enum value.
const list< AlnInfo * > * GetAlnInfoList() const
return alignment info list
void VecscreenPrint(CNcbiOstream &out)
show alignment graphic view
CRef< objects::CSeq_align_set > ProcessSeqAlign(void)
Process alignment to show.
vector< CRef< CSeq_loc > > TSearchLocVec
void Run(objects::CSeq_entry_Handle seh, wxGauge &progress)
CRef< CSeq_id > x_FindTypeGeneral(CBioseq_Handle bioseq_handle)
CVectorScreen()
Constructors.
CRef< CSeq_id > x_SelectSeqId(CBioseq_Handle bioseq_handle)
vector< CVecscreenRun::SVecscreenSummary > m_vecscreen_summary
static bool IsDbAvailable()
TSearchLocVec m_vecSearchLocs
const vector< CVecscreenRun::SVecscreenSummary > & GetVecscreenSummary() const
CRef< CSeq_id > x_FindAccession(CBioseq_Handle bioseq_handle)
objects::CSeq_entry_Handle m_TopSeqEntry
const TVecscreenSummaryBySeqid & GetVecscreenSummaryBySeqid() const
CRef< CSeq_id > x_FindLocalId(CBioseq_Handle bioseq_handle)
~CVectorScreen()
Destructor.
TVecscreenSummaryBySeqid m_seqidSummary
iterator_bool insert(const value_type &val)
container_type::value_type value_type
CRef< CSeqDB > GetSeqDb() const
Obtain a reference to the database.
CRef< CSearchResultSet > Run()
Executes the search.
void SetHitlistSize(int s)
Sets HitlistSize.
static CBlastOptionsHandle * CreateTask(string task, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested task,...
@ eBlastDbIsNucleotide
nucleotide
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
const string AsFastaString(void) const
CConstRef< CSeq_id > GetSeqIdOrNull(void) const
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
TLoader * GetLoader(void) const
Get pointer to the loader.
void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)
Add data loader by name.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
string GetName(void) const
void AddScope(CScope &scope, TPriority pri=kPriority_Default)
Add the scope's datasources as a single group with the given priority All data sources (data loaders ...
@ kPriority_NotSet
Deprecated: use kPriority_Default instead.
vector< CSeq_id_Handle > TId
bool CanGetId(void) const
const TId & GetId(void) const
bool NotNull(void) const THROWS_NONE
Check if pointer is not null – same effect as NotEmpty().
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
bool IsStr(void) const
Check if variant Str is selected.
bool IsId(void) const
Check if variant Id is selected.
const TStr & GetStr(void) const
Get the variant data.
TId GetId(void) const
Get the variant data.
bool IsGeneral(void) const
Check if variant General is selected.
bool IsLocal(void) const
Check if variant Local is selected.
bool CanGetAccession(void) const
Check if it is safe to call GetAccession method.
const TGeneral & GetGeneral(void) const
Get the variant data.
const TAccession & GetAccession(void) const
Get the Accession member data.
@ eMol_na
just a nucleic acid
Main class to perform a BLAST search on the local machine.
#define ASSERT
macro for assert.
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
const CSeq_id * seqid
Seq-id of query.
CRange< TSeqPos > range
range of match.
string match_type
Categorizes strength of match.
CRange< TSeqPos > m_range
Structure to represent a single sequence to be fed to BLAST.
vector< SRangeMatch > m_arrRangeMatch