81 : m_ac(&
source), m_queryRows(0), m_subjectRows(0), m_seqs(0), m_scoringMatrix(matrixName), m_useWhole(
false),
82 m_scoreType(
CSeq_align::eScore_Score), m_psiTargetCd(0)
92 : m_ac(0), m_seqs(&seqs), m_scoringMatrix(matrixName), m_useWhole(
false), m_psiTargetCd(0)
122 cd_utils::PssmMaker pm(targetCD,
true,
true);
123 cd_utils::PssmMakerOptions
config;
124 config.requestFrequencyRatios =
true;
134 int numBlastsDone = 0;
141 for (
unsigned int q = 0; q <
m_queryRows->size(); q++)
165 for (
int i = 0;
i < nrows;
i++)
174 totalBlasts = (
int)((
double)nrows * (((double)nrows-1)/2));
200 numQueries = nrows-1;
203 CSeq_loc querySeqLoc, subjectSeqLoc;
204 for (
int qr = 0; qr < numQueries; qr++)
228 int subStart = qr +1;
229 int batchSize = (nrows -1) - (qr + 1) + 1;
236 for (
int sr = subStart; sr < nrows; sr++)
253 assert((
unsigned)batchSize == subjectVector.
Size());
260 numBlastsDone += batchSize;
262 notifier(numBlastsDone, totalBlasts);
301 for (
int sr = 0; sr < nrows; sr++)
332 for (index = 0; index < total; ++index)
334 const list< CRef< CSeq_align > >& seqAlignList = (*hits)[index].GetSeqAlign()->Get();
335 if (seqAlignList.empty())
402 bioseq = (*m_seqs)[
row];
409 const list< CRef< CSeq_annot > >& annots = bioseq->
GetAnnot();
410 for (list<
CRef< CSeq_annot > >::const_iterator cit = annots.begin(); cit != annots.end(); cit++)
412 if ((*cit)->IsSetData())
414 if ((*cit)->GetData().IsLocs())
416 const list< CRef< CSeq_loc > >& locs = (*cit)->GetData().GetLocs();
442 tbioseq->
SetInst().SetLength(to - from + 1);
443 CNCBIeaa tr(seqData.substr(from, to - from + 1));
444 tbioseq->
SetInst().SetSeq_data().SetNcbieaa(tr);
450 double score, idScore;
454 for (
int i = 0;
i < nhits;
i++)
457 const list< CRef< CSeq_align > >& seqAlignList = hits[
i].GetSeqAlign()->Get();
458 if (seqAlignList.size() > 0)
467 score = 100*idScore/seqLen;
484 int realQuery =
query;
492 int totalBeforeQuery = (nrows - 1 + nrows - realQuery)*realQuery/2;
493 comp = totalBeforeQuery + (realSubject - realQuery - 1);
508 if (from < 0 || to < 0 ||
len <=0)
return result;
509 if (from <= to && to <
len && (to - from + 1 >= 0)) {
526 if (nTermShift == 0 && cTermShift == 0) {
533 if (from == 0 && (to == 0 || to ==
len - 1)) {
534 nTermShift = (nTermShift < 0) ? nTermShift : 0;
535 cTermShift = (cTermShift < 0) ? cTermShift : 0;
536 if (-nTermShift <
len - 1 + cTermShift ) {
545 if (nTermShift >= 0) {
546 from = (nTermShift <= from) ? from - nTermShift : 0;
548 from = (-nTermShift < to - 1 + cTermShift) ? from - nTermShift : from;
550 if (cTermShift >= 0) {
551 to = (cTermShift <=
len - 1 - to) ? to + cTermShift :
len - 1;
553 to = (-cTermShift <= to - from - 1 + nTermShift) ? to + cTermShift : to;
581 om->GetRegisteredNames(loader_names);
583 om->RevokeDataLoader(*itr);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Declares the CBlastAdvancedProteinOptionsHandle class.
Declares the CBlastProteinOptionsHandle class.
User-defined methods of the data storage class.
bool GetBioseqForRow(int rowId, CRef< CBioseq > &bioseq)
int GetLowerBound(int row) const
int GetUpperBound(int row) const
const CSeq_id * GetFirstId() const
TSeqPos GetLength(void) const
Handle to the Advanced BLASTP options.
Handle to the protein-protein options to the BLAST algorithm.
void AddQuery(CRef< CBlastSearchQuery > q)
Add a query to the set.
size_type Size() const
Returns the number of queries found in this query vector.
NCBI C++ Object Manager dependant implementation of IQueryFactory.
Handle to the protein-protein options to the BLAST algorithm.
Runs a single iteration of the PSI-BLAST algorithm between 2 sequences.
Search Results for All Queries.
bool GetNamedScore(const string &id, int &score) const
Get score.
bool IsFootprintValid(int from, int to, int len)
void useWholeSequence(bool whole)
int getCompositeIndex(int query, int subject)
CRef< CSeq_align > getPsiBlastAlignement(int row)
bool FillOutSeqLoc(const CRef< CBioseq > &bs, CSeq_loc &seqLoc)
CRef< CPssmWithParameters > m_psiTargetPssm
double getPairwiseScore(int row1, int row2)
void RemoveAllDataLoaders()
const vector< int > * m_subjectRows
vector< double > m_scores
void processBlastHits(int queryRow, CSearchResultSet &hits)
vector< CRef< CSeq_align > > m_alignments
CRef< CBioseq > truncateBioseq(int row)
static const double E_VAL_WHEN_NO_SEQ_ALIGN
static const int DEFAULT_NR_SEQNUM
vector< CRef< CBioseq > > * m_seqs
static const double BLAST_SCALING_FACTOR_DEFAULT
CdBlaster(AlignmentCollection &source, string matrixName=SCORING_MATRIX_DEFAULT)
CRef< CSeq_align > getPairwiseBlastAlignement(int row1, int row2)
static const string SCORING_MATRIX_DEFAULT
void ApplyEndShiftToRange(int &from, int nTermShift, int &to, int cTermShift, int len)
const vector< int > * m_queryRows
double getPairwiseEValue(int row1, int row2)
vector< int > m_batchSizes
static const long DEFAULT_NR_SIZE
vector< CRef< CBioseq > > m_truncatedBioseqs
static const double SCORE_WHEN_NO_SEQ_ALIGN
bool blast(NotifierFunction notifier=0)
double getPsiBlastScore(int row)
static const int CDD_DATABASE_SIZE
void setFootprintExtension(int nExt, int CExt)
CSeq_align::EScoreType m_scoreType
void setPsiBlastTarget(CRef< CPssmWithParameters > pssm)
AlignmentCollection * m_ac
double getPsiBlastEValue(int row)
@ eCompositionBasedStats
Composition-based statistics as in NAR 29:2994-3005, 2001.
@ eNoCompositionBasedStats
Don't use composition based statistics.
CRef< CSeq_align > ExtractFirstSeqAlign(CRef< CSeq_align > seqAlign)
void(* NotifierFunction)(int Num, int Total)
bool GetNcbieaaString(const CBioseq &bioseq, string &str)
void SetEvalueThreshold(double eval)
Sets EvalueThreshold.
void SetDbLength(Int8 len)
Sets DbLength.
void SetDbSeqNum(unsigned int num)
Sets DbSeqNum.
void SetCompositionBasedStats(ECompoAdjustModes mode)
Sets this mode, which mostly specifies whether composition of db sequence is taken into account when ...
void SetHitlistSize(int s)
Sets HitlistSize.
CRef< CSearchResultSet > Run()
Run the PSI-BLAST 2 Sequences engine.
void SetMatrixName(const char *matrix)
Sets MatrixName.
void SetPseudoCount(int p)
Sets PseudoCount.
void SetSegFiltering(bool val)
Enable SEG filtering.
size_type GetNumResults() const
Return the number of results contained by this object.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
vector< string > TRegisteredNames
void ResetDataAndHistory(void)
Clear all information in the scope except added data loaders.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
#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.
TPseudocount GetPseudocount(void) const
Get the Pseudocount member data.
const TParams & GetParams(void) const
Get the Params member data.
void SetTo(TTo value)
Assign a value to To data member.
void SetId(TId &value)
Assign a value to Id data member.
TFrom GetFrom(void) const
Get the From member data.
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
bool IsInt(void) const
Check if variant Int is selected.
const TInt & GetInt(void) const
Get the variant data.
const TInst & GetInst(void) const
Get the Inst member data.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
TLength GetLength(void) const
Get the Length member data.
void SetInst(TInst &value)
Assign a value to Inst data member.
unsigned int
A callback function used to compare two keys in a database.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is whole
const CharType(& source)[N]
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
Declares the CPSIBlastOptionsHandle class.
CRef< objects::CObjectManager > om
#define row(bind, expected)