65 numFilteredByOverlap(0){}
75 result +=
"Total number of pending sequences that are not moved to normal alignment because of insufficient overlapping:"
80 result +=
"Number of Blast Hits = ";
91 result +=
"Alignments removed due to redundancy:";
99 result +=
"Numer of obsolete sequences removed:";
121 for(
unsigned int i = 0;
i < gis.size();
i++)
123 result += NStr::NumericToString<TGi>( gis[
i] );
131 if (giPairs.size() <= 0)
136 for (
unsigned int i = 0 ;
i < giPairs.size();
i++)
138 result += NStr::NumericToString<TGi>(giPairs[
i].second);
167 for (
unsigned int i = 0;
i < cds.size();
i++)
169 for (list<UpdaterInterface*>::iterator lit =
m_updaterList.begin();
172 if ((*lit)->hasCd(cds[
i]))
189 for (
unsigned int i = 0;
i < updaters.size();
i++)
191 for (list<UpdaterInterface*>::iterator lit =
m_updaterList.begin();
194 if ((*lit) == updaters[
i])
211 list<UpdaterInterface*>::iterator lit =
m_updaterList.begin();
217 blasted.push_back(updater);
221 return blasted.size();
230 for (
unsigned int i = 0;
i < cds.size();
i++)
271 LOG_POST(
"Not all BLASTs on the group are done. Thus updating this group can't be done at this time.\n");
315 : m_config(
config), m_cd(cd), m_guideAlignment(0), m_processPendingThreshold(-1), m_hitsNeeded(-1),
330 bool blasted =
false;
334 catch (blast::CBlastException& be) {
358 return(blasted ? 1 : 0);
371 bool updated =
false;
380 if (numNoAlignment > 0)
381 LOG_POST(
"There are "<<numNoAlignment
382 <<
" hits whose alignments do not overlap with the CD. This may indicate there are long insert to the CD alignment. You can find the GIs for those hits in the log.");
403 blast::CRemoteBlast* rblast;
404 blast::CBlastProteinOptionsHandle* blastopt;
408 blastopt =
new blast::CBlastProteinOptionsHandle(blast::CBlastOptions::eRemote);
409 rblast =
new blast::CRemoteBlast(blastopt);
413 psiopt =
new blast::CPSIBlastOptionsHandle(blast::CBlastOptions::eRemote);
415 rblast =
new blast::CRemoteBlast(psiopt);
432 entrezQuery +=
"[Organism]";
436 if (!entrezQuery.empty())
437 rblast->SetEntrezQuery(entrezQuery.c_str());
443 list< CRef< CSeq_entry > >& seqList = bioseqs->SetSeq_set();
451 seqList.push_back(seqOld);
461 if (masks.size() > 0)
464 masking_locations.push_back(masks);
465 rblast->SetQueries(bioseqs,masking_locations);
468 rblast->SetQueries(bioseqs);
479 bool useConsensus =
true;
482 config.unalignedSegThreshold = 35;
483 config.requestFrequencyRatios =
true;
494 rblast->SetQueries(pssm);
500 bool blasted =
false;
503 blasted = rblast-> SubmitSync();
504 m_rid = rblast->GetRID();
509 blasted = rblast->Submit();
529 m_rid = rblast->GetRID();
537 blast::CRemoteBlast rblast(
getRid());
540 done = rblast.CheckDone();
544 hits = rblast.GetAlignments();
555 blast::CRemoteBlast rblast(
getRid());
558 done = rblast.CheckDone();
576 if(!seqAligns.
Empty())
582 if (numNoAlignment > 0)
583 LOG_POST(
"There are hits whose alignments do not overlap with the CD. This may indicate there are long insert to the CD alignment. You find the GIs for those hits in the log\n");
587 LOG_POST(
"Got no alignment for BLAST hits for CD " <<
m_cd->
GetAccession() <<
". will try again to retrieve the hits.\n");
599 unsigned int nIdent = 0;
600 unsigned int qLen = queryString.length(), sLen = subjectString.length();
601 unsigned int i, j, qStart, qStop, sStart, sStop;
603 if (alignment.
Empty() || qLen == 0 || sLen == 0)
return result;
608 double denom = (denseg.GetSeqStop(0) - denseg.GetSeqStart(0) + 1);
613 for (
i = 0;
i < lens.size(); ++
i) {
615 if (starts[2*
i] < 0 || starts[2*
i + 1] < 0)
continue;
616 qStart = starts[2*
i];
617 sStart = starts[2*
i + 1];
619 qStop = qStart + lens[
i] - 1;
620 sStop = sStart + lens[
i] - 1;
621 if (qStop >= qLen || sStop >= sLen)
continue;
623 for (j = 0; j < lens[
i]; ++j) {
624 if (queryString[qStart + j] == subjectString[sStart + j]) ++nIdent;
627 result = 100.0*nIdent/denom;
635 if ( !cd || (!alignments.
IsSet()))
638 double pidScore = 0.0;
639 list< CRef< CSeq_align > >& seqAligns = alignments.
Set();
641 vector< CRef< CBioseq > > bioseqs;
649 vector< CRef< CBioseq > > bioseqVec;
650 for (
unsigned int i = 0;
i < bioseqs.size();
i++)
666 list< CRef< CSeq_align > >::iterator it = seqAligns.begin();
671 string queryString, subjectString;
674 if (it != seqAligns.end()) {
675 querySeqID = (*it)->SetSegs().SetDenseg().GetIds()[0];
693 vector< CRef< CSeq_id > >& seqIds= denseg->SetIds();
696 vector< CRef< CSeq_id > > pdbIds;
698 if ((pdbIds.size() > 0) &&
SeqEntryHasSeqId(masterSeq, *seqIds[0]) && (!seqIds[0] ->IsPdb()))
701 for(; it != seqAligns.end(); it++)
719 int start = denseg.GetSeqStart(0);
720 int stop = denseg.GetSeqStop(0);
721 pidScore = 100*pidScore/(stop - start + 1);
726 if (denseg.GetDim() > 1)
727 seqID = denseg.GetIds()[1];
732 vector< CRef< CBioseq > > bioseqVec;
738 if (bioseqVec.size() > 1)
740 int index =
pickBioseq(refresher, seqAlignRef, bioseqVec);
742 seqEntry->
SetSeq(*bioseqVec[index]);
743 seqID = denseg.GetIds()[1];
750 seqEntry->
SetSeq(*bioseqVec[0]);
795 replacedGi = refresher->
refresh(seqAlignRef, seqEntry);
816 if ((completed % 500) == 0)
839 vector< CRef< CSeq_id > > seqIds;
841 if (seqIds.size() == 0)
870 vector< CRef< CSeq_id > >& seqIdVec = denseg.SetIds();
872 assert(denseg.GetDim() > 1);
876 for (
int i = 0;
i < (
int) bioseqVec.size();
i++)
882 CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
883 for (; it != itend; ++it)
894 for (
int i = 0;
i < (
int) bioseqVec.size();
i++)
899 CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
901 bool foundPDB =
false;
902 for (; it != itend; ++it)
906 else if ((*it)->IsGi())
920 for (
int i = 0;
i < (
int) bioseqVec.size();
i++)
925 CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
926 for (; it != itend; ++it)
951 bool foundOldSeq =
false;
952 for (
int i = 0;
i < num;
i++)
960 if ((oAcc == nAcc) && (giNew != giOld))
1002 if (overlap < 0)
return false;
1007 int lastPos =
bm.getLastAlignedPosition();
1008 int firstPos =
bm.getFirstAlignedPosition();
1022 if (lo + overlap <= firstPos)
1023 result = (hi - overlap >= firstPos);
1025 result = (lo + overlap <lastPos);
1029 LOG_POST(
"CD sequence " <<
i <<
" [" << lo <<
", " << hi <<
"] and proposed update with range [" << firstPos <<
", " << lastPos <<
"] exceed maximum allowed overlap = " << overlap);
1031 LOG_POST(
"Disallowed overlap of CD sequence " <<
i <<
" [" << lo <<
", " << hi <<
"] and proposed update with range [" << firstPos <<
", " << lastPos <<
"]");
1049 if (lenAligned >= pssmLen)
1065 if ( ( mGapToN - sGapToN > allowed) ||
1066 (mGapToC - sGapToC > allowed))
1074 for (
unsigned int i = 0;
i < bioseqs.size();
i++)
1077 CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
1078 for (; it != itend; ++it) {
1082 seqEntry->
SetSeq(*bioseqs[
i]);
1093 string loaderName = loader->GetName();
1101 LOG_POST(
"Failed to get bioseq handle for seqid " << seqid->GetSeqIdString() <<
".");
1107 bioseqs.push_back(bioseq);
1113 vector< CRef<CSeq_id> > seqids;
1114 unsigned int batchSize = 500;
1115 unsigned int maxBatchSize = 2000;
1119 list< CRef< CSeq_align > >& seqAligns = alignments.
Set();
1120 list< CRef< CSeq_align > >::iterator lit = seqAligns.begin();
1121 for (; lit != seqAligns.end(); lit++)
1123 seqids.push_back((*lit)->SetSegs().SetDenseg().GetIds()[1]);
1124 list< CRef< CSeq_align > >::iterator
next = lit;
1127 if (seqids.size() >= batchSize || (
next == (seqAligns.end())) )
1129 string errors, warnings;
1130 vector< CRef< CBioseq > > bioseqBatch;
1138 LOG_POST(
"Returned from object manager with a batch of " << bioseqBatch.size() <<
" sequences.");
1141 LOG_POST(
"Returned from CBlastServices::GetSequences('" << dbName <<
"') with a batch of " << bioseqBatch.size() <<
" sequences.");
1144 catch (blast::CBlastException& be)
1146 if (seqids.size() > maxBatchSize)
1152 LOG_POST(
"Retrieving sequences from RemoteBlast failed with an exception of "<<be.GetErrCodeString());
1156 LOG_POST(
"Unspecified exception during CBlastServices::GetSequences(). Skipping to next Seq-align.\n");
1160 if (seqids.size()!= bioseqBatch.size())
1162 LOG_POST(
"Ask for "<< seqids.size()<<
" sequences. Got "<<bioseqBatch.size()<<
" back\n");
1163 LOG_POST(
"Error="<<errors<<
"\nWarnings="<<warnings);
1166 for (
unsigned int i = 0 ;
i < bioseqBatch.size();
i++)
1168 bioseqs.push_back(bioseqBatch[
i]);
1176 vector< CRef< CSeq_id > > seqIds;
1178 for (
unsigned int i = 0;
i < seqIds.size();
i++)
1179 if (seqIds[
i]->IsGi())
1180 return seqIds[
i]->GetGi();
1186 const list< CRef< CSeq_id > >& seqIds = bioseq->
GetId();
1187 list< CRef< CSeq_id > >::const_iterator cit = seqIds.begin();
1188 for (; cit != seqIds.end(); cit++)
1190 return (*cit)->GetGi();
1202 vector< CRef< CSeq_id > >& seqIds= denseg->SetIds();
1203 if(seqIds.size() <= 1)
1212 vector< CRef< CSeq_id > > slaveIds;
1214 if (slaveIds.size() > 0)
1215 seqIds[1].Reset( (slaveIds[0]).GetPointer() );
1217 if (seqEntry->
IsSet())
1225 seqEntry->
SetSeq(*bioseq);
1254 bool hasSource =
false;
1255 bool hasTitle =
false;
1259 if (seqDescr.
IsSet())
1261 list< CRef< CSeqdesc > >& descrList = seqDescr.
Set();
1262 list< CRef< CSeqdesc > >::iterator cit = descrList.begin();
1263 while (cit != descrList.end())
1265 if ((*cit)->IsSource() && (!hasSource))
1270 else if ( (*cit)->IsTitle())
1277 else if ((*cit)->IsUser() && (!hasSource))
1279 if ((*cit)->SetUser().SetType().SetStr() ==
"TaxNamesData")
1281 vector< CRef< CUser_field > >& fields = (*cit)->SetUser().SetData();
1282 if ( fields.size() > 0)
1292 descrList.push_back(
source);
1296 cit = descrList.erase(cit);
1299 cit = descrList.erase(cit);
1305 if (seqEntry->
IsSet())
1307 const list< CRef< CSeqdesc > >& descrList = seqEntry->
GetSet().
GetDescr().
Get();
1308 list< CRef< CSeqdesc > >::const_iterator cit = descrList.begin();
1309 for (; cit != descrList.end(); cit++)
1311 if ((*cit)->IsSource())
1313 seqDescr.
Set().push_back(*cit);
1323 const list< CRef< CSeq_id > >& seqIds = bioseq->
GetId();
1324 list< CRef< CSeq_id > >::const_iterator cit = seqIds.begin();
1326 for (; cit != seqIds.end(); cit++)
1328 if ((*cit)->IsPdb())
1337 vector<TIntId> uids;
1338 string pdb = (*cit)->GetPdb().GetMol().Get();
1341 client.Query(pdb,
"structure", uids);
1344 LOG_POST(
"\nFailed to retrieve mmdb-id for "<<pdb<<
" because the error:\n "<<e.
ReportAll());
1348 if (uids.size() > 0)
1353 generalId.
SetDb(
"mmdb");
1354 generalId.
SetTag().SetId(mmdbId);
1356 seqAnnot->
SetData().SetIds().push_back(mmdbTag);
1357 bioseq->
SetAnnot().push_back(seqAnnot);
1365 if (pdbBlock->CanGetCompound())
1367 const list< string >& compounds = pdbBlock->GetCompound();
1368 if (compounds.size() != 0)
1369 seqDesc->
SetTitle(*(compounds.begin()));
1370 seqDescr.
Set().push_back(seqDesc);
1382 if (seqEntry->
IsSeq())
1384 const list< CRef< CSeq_id > >& seqIdList = seqEntry->
GetSeq().
GetId();
1385 list< CRef< CSeq_id > >::const_iterator lsii;
1386 for (lsii = seqIdList.begin(); lsii != seqIdList.end(); ++lsii)
1390 if ((*lsii)->IsPdb())
1391 slaveIds.push_back(*lsii);
1394 slaveIds.push_back(*lsii);
1396 return slaveIds.size();
1400 list< CRef< CSeq_entry > >::const_iterator lsei;
1401 const list< CRef< CSeq_entry > >& seqEntryList = seqEntry->
GetSet().
GetSeq_set();
1402 for (lsei = seqEntryList.begin(); lsei != seqEntryList.end(); ++lsei)
1406 return slaveIds.size();
1413 if (seqEntry->
IsSeq())
1439 list< CRef< CSeq_entry > >::const_iterator lsei;
1440 const list< CRef< CSeq_entry > >& seqEntryList = seqEntry->
GetSet().
GetSeq_set();
1441 for (lsei = seqEntryList.begin(); lsei != seqEntryList.end(); ++lsei)
1452 vector< CRef< CSeq_id > > seqIds;
1454 for (
unsigned int i = 0;
i < seqIds.size();
i++)
1456 if (seqIds[
i]->Match(seqId))
1465 CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
1466 for (; it != itend; ++it)
1468 if ((*it)->Match(seqId))
1481 list< CRef< CBlast_def_line > >& deflines = blastDefLine->
Set();
1483 if (deflines.size() <= 1)
1485 bioseqs.push_back(
orig);
1491 iter != deflines.end(); iter++)
1496 bioseqs.push_back(splitBioseq);
1499 return deflines.size();
1505 int sourceOrder = 0;
1506 if (seqDescr.
IsSet())
1508 list< CRef< CSeqdesc > >& descrList = seqDescr.
Set();
1509 list< CRef< CSeqdesc > >::iterator cit = descrList.begin();
1510 while (cit != descrList.end())
1512 if ((*cit)->IsSource())
1514 if (sourceOrder == order)
1517 cit = descrList.erase(cit);
1523 else if ( (*cit)->IsTitle())
1524 cit = descrList.erase(cit);
1528 title->
SetTitle(blastDefline->GetTitle());
1529 descrList.push_back(title);
1533 bioseq->
SetId().assign(blastDefline->GetSeqid().begin(), blastDefline->GetSeqid().end());
1549 if (oss.size() == 1) {
1552 const vector<char> & v = *oss.front();
1559 size += (**iter1).size();
1566 temp.append(& (**iter3)[0], (*iter3)->size());
1583 static const string asnDeflineObjLabel =
"ASN1_BlastDefLine";
1588 const list< CRef< CSeqdesc > >& descList = desc.
Get();
1589 for (list<
CRef< CSeqdesc > >::const_iterator iter = descList.begin(); iter != descList.end(); iter++){
1591 if((*iter)->IsUser()){
1597 if (
label == asnDeflineObjLabel){
1598 const vector< CRef< CUser_field > >& usf = uobj.
GetData();
1600 if(usf.front()->GetData().IsOss()){
1602 const TOss& oss = usf.front()->GetData().GetOss();
1615 static const string asnDeflineObjLabel =
"ASN1_BlastDefLine";
1619 list< CRef< CSeqdesc > >& descList = desc.
Set();
1620 for (list<
CRef< CSeqdesc > >::iterator iter = descList.begin(); iter != descList.end(); iter++)
1622 if((*iter)->IsUser())
1629 if (
label == asnDeflineObjLabel)
1631 descList.erase(iter);
1647 vector< CRef< CSeq_align > > seqAlignVec;
1648 for (
int i = 0;
i < num;
i++)
1650 cd_utils::BlockFormater bf(seqAlignVec, seqlen);
1651 list< CRef< CSeq_align > >& seqAlignList = cd->
GetSeqAligns();
1652 if (seqAlignList.size() > 0)
1655 if (
bmp.getMaster() ==
bmp.getSlave())
1656 seqAlignList.erase(seqAlignList.begin());
1657 if (seqAlignList.size() > 0)
1658 bf.setReferenceSeqAlign(*seqAlignList.begin());
1660 int numGood = bf.findIntersectingBlocks(overlap);
1661 bf.formatBlocksForQualifiedRows(seqAlignList);
1664 bf.getQualifiedRows(rows);
1665 for (
unsigned int r = 0;
r < rows.size();
r++)
1668 return num - numGood;
1680 if (seqEntry.
IsSet())
1683 list< CRef< CSeq_entry > >::iterator it = seqSet.begin();
1684 for (; it != seqSet.end(); it++)
1715 return newgi != oldgi;
1735 string newStr, oldStr;
1738 if (newStr.size() != oldStr.size())
1741 vector< CRef< CSeq_id > > newIds;
1744 for (
unsigned int i = 0;
i < newIds.size();
i++)
1746 if (newIds[
i]->IsGi())
1748 else if (newIds[
i]->IsPdb())
1752 bool replaced =
false;
1753 for (list<
CRef< CSeq_align > >::iterator lit = seqAlignList.begin(); lit != seqAlignList.end(); lit++)
1757 GetSeqID(seqAlign, idInAlign,
true);
1764 bmp.getSlave().setSeqId(pdbId);
1765 seqAlign =
bmp.toSeqAlign();
1770 bmp.getSlave().setSeqId(giId);
1771 seqAlign =
bmp.toSeqAlign();
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Declares the BLAST exception class.
Declares the CBlastServices class.
CRef< CSeq_align > getSeqAlign(int row) const
int getGapToNTerminal(int bn) const
int getGapToCTerminal(int bn, int len=-1) const
vector< Block > & getBlocks()
int GetUpperBound(int Row) const
string GetSequenceStringByRow(int rowId)
bool AddSequence(CRef< CSeq_entry > seqAntry)
bool GetSeqIDFromAlignment(int RowIndex, CRef< CSeq_id > &SeqID) const
bool AddPendingSeqAlign(CRef< CSeq_align > seqAlign)
bool GetSeqEntryForRow(int rowId, CRef< CSeq_entry > &seqEntry) const
bool CopyBioseqForSeqId(const CRef< CSeq_id > &seqId, CRef< CBioseq > &bioseq) const
void ErasePendingRows(set< int > &rows)
int GetLowerBound(int Row) const
const list< CRef< CSeq_align > > & GetSeqAligns() const
bool GetBioseqForRow(int rowId, CRef< CBioseq > &bioseq)
string GetAccession(int &Version) const
bool GetSeqIDForRow(int Pair, int DenDiagRow, CRef< CSeq_id > &SeqID) const
AccessionBioseqMap m_accSeqMap
bool hasOlderVersion(CRef< CBioseq > bioseq)
void addSequence(CRef< CBioseq > bioseq)
TGi refresh(CRef< CSeq_align > seqAlign, CRef< CSeq_entry > seqEntry)
void addSequences(CSeq_entry &seqEntry)
int submitBlast(bool wait=false, int row=0)
bool findSeq(CRef< CSeq_id > seqID, vector< CRef< CBioseq > > &bioseqs, CRef< CSeq_entry > &seqEntry)
static int mergePending(CCdCore *cd, int threshold, bool remaster)
bool isFragmentedSeq(CCdCore *cd, CRef< CSeq_align > seqAlign, CRef< CSeq_entry > seqEntry)
double ComputePercentIdentity(const CRef< CSeq_align > &alignment, const string &queryString, const string &subjectString)
static void reformatBioseqByBlastDefline(CRef< CBioseq > bioseq, CRef< CBlast_def_line > blastDefline, int order)
static CRef< CBlast_def_line_set > GetBlastDefline(const CBioseq &handle)
bool overlapWithCDRow(CCdCore *cd, CRef< CSeq_align > seqAlign)
static int GetAllIdsFromSeqEntry(CRef< CSeq_entry > seqEntry, vector< CRef< CSeq_id > > &slaveIds, bool pdbOnly=false)
bool blast(bool wait=false, int row=0)
cd_utils::BlockModelPair * m_guideAlignment
CDUpdater(CCdCore *cd, CdUpdateParameters &config)
const string getLastError()
void retrieveAllSequences(CSeq_align_set &alignments, vector< CRef< CBioseq > > &bioseqs)
static bool reformatBioseq(CRef< CBioseq > bioseq, CRef< CSeq_entry > seqEntry, CEntrez2Client &client)
static void RemoveBlastDefline(CBioseq &handle)
void getCds(vector< CCdCore * > &)
static int SplitBioseqByBlastDefline(CRef< CBioseq > handle, vector< CRef< CBioseq > > &bioseqs)
CDUpdateStats & getStats()
static bool SeqEntryHasSeqId(CRef< CSeq_entry > seqEntry, const CSeq_id &seqId)
CRef< CSeq_id > m_masterPdb
static int pickBioseq(CDRefresher *refresher, CRef< CSeq_align > seqAlignRef, vector< CRef< CBioseq > > &bioseqVec)
bool getHits(CRef< CSeq_align_set > &hits)
void getSequencesFromGB(vector< CRef< CSeq_id > > seqids, vector< CRef< CBioseq > > &bioseqs)
CdUpdateParameters m_config
static bool GetOneBioseqFromSeqEntry(CRef< CSeq_entry > seqEntry, CRef< CBioseq > &bioseq, const CSeq_id *seqId=0)
int m_processPendingThreshold
bool modifySeqAlignSeqEntry(CCdCore *cd, CRef< CSeq_align > &seqAlign, CRef< CSeq_entry > seqEntry)
static void OssToDefline(const CUser_field::TData::TOss &oss, CBlast_def_line_set &bdls)
Efficiently decode a Blast-def-line-set from binary ASN.1.
bool passedFilters(CCdCore *cd, CRef< CSeq_align > seqAlign, CRef< CSeq_entry > seqEntry)
bool checkBlastAndUpdate()
static int processPendingToNormal(int overlap, CCdCore *cd)
bool findRowsWithOldSeq(CCdCore *cd, CBioseq &bioseq)
static bool BioseqHasSeqId(const CBioseq &bioseq, const CSeq_id &seqId)
CRef< CSeq_align_set > m_hits
static TGi getGi(CRef< CSeq_entry > seqEntry)
bool update(CCdCore *cd, CSeq_align_set &alignments)
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
CObjectIStreamAsnBinary –.
TTaxId SetTaxId(TTaxId tax_id)
Handle to the protein-protein options to the BLAST algorithm.
Exception class for the CRemoteBlast class.
structure for seqloc info
bool GetNamedScore(const string &id, int &score) const
Get score.
@Seq_descr.hpp User-defined methods of the data storage class.
static string getOrganismName(Organism org)
string getBlastDatabaseName()
int allowedOverlapWithCDRow
int missingResidueThreshold
void getCds(vector< CCdCore * > &)
GroupUpdater(vector< CCdCore * > &cds, CdUpdateParameters &config)
int submitBlast(bool wait=false, int row=0)
vector< CDUpdater * > m_cdUpdaters
void addBatch(CRef< CSeq_align_set > seqAlignSet)
const string & getConsensus()
void setOptions(const PssmMakerOptions &option)
CRef< CPssmWithParameters > make()
const BlockModelPair & getGuideAlignment()
unsigned findSequencesInTheGroup(CRef< CSeq_id > seqId, vector< CRef< CBioseq > > &bioseqVec) const
void addSequences(vector< CRef< CBioseq > > &bioseqVec, bool grouped=false)
Collection of masked regions for a single query sequence.
static void addUpdater(UpdaterInterface *updater)
static list< UpdaterInterface * > m_updaterList
static int checkAllBlasts(vector< UpdaterInterface * > &blasted)
virtual bool getBlastHits()=0
static void removeUpdaters(const vector< CCdCore * > &cds)
container_type::iterator iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
CRef< CSeq_align > Denseg2DenseDiagList(const CRef< CSeq_align > &denseSegSeqAlign)
bool GetSeqID(const CRef< CSeq_align > &seqAlign, CRef< CSeq_id > &SeqID, bool getSlave=true)
int GetNumAlignedResidues(const CRef< CSeq_align > &align)
bool ReMasterCdWithoutUnifiedBlocks(CCdCore *cd, int Row, bool resetFields=true)
bool SetUpdateDate(CCdCore *cd)
bool SeqIdsMatch(const CRef< CSeq_id > &id1, const CRef< CSeq_id > &id2)
int GetSeqLength(const CBioseq &bioseq)
bool GetPDBBlockFromSeqEntry(CRef< CSeq_entry > seqEntry, CRef< CPDB_block > &pdbBlock)
string GetRawSequenceString(const CBioseq &bioseq)
bool GetNcbieaaString(const CBioseq &bioseq, string &str)
bool GetAccAndVersion(const CRef< CBioseq > bioseq, string &acc, int &version, CRef< CSeq_id > &seqId)
Declares auxiliary class to calculate the effective search space.
thread_local unique_ptr< FtaMsgPost > bmp
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static void GetSequences(TSeqIdVector &seqids, const string &database, char seqtype, TBioseqVector &bioseqs, string &errors, string &warnings, bool verbose=false, bool target_only=false)
Get a set of Bioseqs given an input set of Seq-ids.
void SetPseudoCount(int p)
Sets PseudoCount.
void SetSegFiltering(bool val)
Enable SEG filtering.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
SStrictId_Tax::TId TTaxId
Taxon id type.
#define TAX_ID_FROM(T, value)
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
string ReportAll(TDiagPostFlags flags=eDPF_Exception) const
Report all exceptions.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
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.
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.
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
bool NotNull(void) const THROWS_NONE
Check if pointer is not null – same effect as NotEmpty().
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
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.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt to string.
static const char label[]
Tdata & Set(void)
Assign a value to data member.
void SetSequences(TSequences &value)
Assign a value to Sequences data member.
bool IsStr(void) const
Check if variant Str is selected.
void SetTag(TTag &value)
Assign a value to Tag data member.
const TStrs & GetStrs(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
vector< vector< char > * > TOss
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
void SetDb(const TDb &value)
Assign a value to Db data member.
TId GetId(void) const
Get the variant data.
void SetTaxname(const TTaxname &value)
Assign a value to Taxname data member.
const TDenseg & GetDenseg(void) const
Get the variant data.
Tdata & Set(void)
Assign a value to data member.
TDenseg & SetDenseg(void)
Select the variant.
const TStarts & GetStarts(void) const
Get the Starts member data.
void SetSegs(TSegs &value)
Assign a value to Segs data member.
vector< TSignedSeqPos > TStarts
bool IsSet(void) const
Check if a value has been assigned to data member.
list< CRef< CDense_diag > > TDendiag
const TSegs & GetSegs(void) const
Get the Segs member data.
TGeneral & SetGeneral(void)
Select the variant.
bool IsPdb(void) const
Check if variant Pdb is selected.
TGi GetGi(void) const
Get the variant data.
const TSeq & GetSeq(void) const
Get the variant data.
const TDescr & GetDescr(void) const
Get the Descr member data.
TSet & SetSet(void)
Select the variant.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSet(void) const
Check if variant Set is selected.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
void SetData(TData &value)
Assign a value to Data data member.
TId & SetId(void)
Assign a value to Id data member.
TTitle & SetTitle(void)
Select the variant.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
const TId & GetId(void) const
Get the Id member data.
void ResetAnnot(void)
Reset Annot data member.
const Tdata & Get(void) const
Get the member data.
list< CRef< CSeq_id > > TId
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
bool IsSet(void) const
Check if a value has been assigned to data member.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
Tdata & Set(void)
Assign a value to data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
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 orig
const struct ncbi::grid::netcache::search::fields::SIZE size
const CharType(& source)[N]
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Declares the CPSIBlastOptionsHandle class.
vector< TMaskedQueryRegions > TSeqLocInfoVector
Collection of masked regions for all queries in a BLAST search.
static CNamedPipeClient * client
#define row(bind, expected)
string toString(bool detailed=true)
pair< TGi, TGi > OldNewGiPair
vector< OldNewGiPair > oldNewPairs