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);
140 result+= NStr::NumericToString<TGi>(giPairs[
i].
first);
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])
211list<UpdaterInterface*>::iterator lit =
m_updaterList->begin();
217blasted.push_back(updater);
221 returnblasted.size();
230 for(
unsigned int i= 0;
i< cds.size();
i++)
258 boolallDone =
true;
271 LOG_POST(
"Not all BLASTs on the group are done. Thus updating this group can't be done at this time.\n");
283 boolallDone =
true;
315: m_config(
config), m_cd(cd), m_guideAlignment(0), m_processPendingThreshold(-1), m_hitsNeeded(-1),
330 boolblasted =
false;
334 catch(blast::CBlastException& be) {
358 return(blasted ? 1 : 0);
371 boolupdated =
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.");
393cds.push_back(
m_cd);
403blast::CRemoteBlast* rblast;
404blast::CBlastProteinOptionsHandle* blastopt;
408blastopt =
newblast::CBlastProteinOptionsHandle(blast::CBlastOptions::eRemote);
409rblast =
newblast::CRemoteBlast(blastopt);
413psiopt =
newblast::CPSIBlastOptionsHandle(blast::CBlastOptions::eRemote);
415rblast =
newblast::CRemoteBlast(psiopt);
432entrezQuery +=
"[Organism]";
436 if(!entrezQuery.empty())
437rblast->SetEntrezQuery(entrezQuery.c_str());
443list< CRef< CSeq_entry > >& seqList = bioseqs->SetSeq_set();
451seqList.push_back(seqOld);
461 if(masks.size() > 0)
464masking_locations.push_back(masks);
465rblast->SetQueries(bioseqs,masking_locations);
468rblast->SetQueries(bioseqs);
479 booluseConsensus =
true;
482 config.unalignedSegThreshold = 35;
483 config.requestFrequencyRatios =
true;
494rblast->SetQueries(pssm);
500 boolblasted =
false;
503rblast-> SubmitSync();
504 m_rid= rblast->GetRID();
509blasted = rblast->Submit();
529 m_rid= rblast->GetRID();
537blast::CRemoteBlast rblast(
getRid());
540 done= rblast.CheckDone();
544hits = rblast.GetAlignments();
555blast::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 intnIdent = 0;
600 unsigned intqLen = 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 doubledenom = (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;
616qStart = starts[2*
i];
617sStart = starts[2*
i+ 1];
619qStop = qStart + lens[
i] - 1;
620sStop = 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 doublepidScore = 0.0;
639list< CRef< CSeq_align > >& seqAligns = alignments.
Set();
641vector< CRef< CBioseq > > bioseqs;
649vector< CRef< CBioseq > > bioseqVec;
650 for(
unsigned int i= 0;
i< bioseqs.size();
i++)
666list< CRef< CSeq_align > >::iterator it = seqAligns.begin();
671 stringqueryString, subjectString;
674 if(it != seqAligns.end()) {
675querySeqID = (*it)->SetSegs().SetDenseg().GetIds()[0];
677queryBioseq.
Reset();
693vector< CRef< CSeq_id > >& seqIds= denseg->SetIds();
696vector< CRef< CSeq_id > > pdbIds;
698 if((pdbIds.size() > 0) &&
SeqEntryHasSeqId(masterSeq, *seqIds[0]) && (!seqIds[0] ->IsPdb()))
701 for(; it != seqAligns.end(); it++)
721 intstart = denseg.GetSeqStart(0);
722 intstop = denseg.GetSeqStop(0);
723pidScore = 100*pidScore/(stop - start + 1);
729 if(denseg.GetDim() > 1)
730seqID = denseg.GetIds()[1];
735vector< CRef< CBioseq > > bioseqVec;
741 if(bioseqVec.size() > 1)
743 intindex =
pickBioseq(refresher, seqAlignRef, bioseqVec);
745seqEntry->
SetSeq(*bioseqVec[index]);
746seqID = denseg.GetIds()[1];
747gi = seqID->
GetGi();
753seqEntry->
SetSeq(*bioseqVec[0]);
798replacedGi = refresher->
refresh(seqAlignRef, seqEntry);
819 if((completed % 500) == 0)
842vector< CRef< CSeq_id > > seqIds;
844 if(seqIds.size() == 0)
853 if(SeqID->
IsPdb())
873vector< CRef< CSeq_id > >& seqIdVec = denseg.SetIds();
875 assert(denseg.GetDim() > 1);
879 for(
int i= 0;
i< (
int) bioseqVec.size();
i++)
885CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
886 for(; it != itend; ++it)
897 for(
int i= 0;
i< (
int) bioseqVec.size();
i++)
902CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
904 boolfoundPDB =
false;
905 for(; it != itend; ++it)
909 else if((*it)->IsGi())
923 for(
int i= 0;
i< (
int) bioseqVec.size();
i++)
928CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
929 for(; it != itend; ++it)
954 boolfoundOldSeq =
false;
955 for(
int i= 0;
i< num;
i++)
963 if((oAcc == nAcc) && (giNew != giOld))
1005 if(overlap < 0)
return false;
1010 intlastPos =
bm.getLastAlignedPosition();
1011 intfirstPos =
bm.getFirstAlignedPosition();
1025 if(lo + overlap <= firstPos)
1026 result= (hi - overlap >= firstPos);
1028 result= (lo + overlap <lastPos);
1032 LOG_POST(
"CD sequence "<<
i<<
" ["<< lo <<
", "<< hi <<
"] and proposed update with range ["<< firstPos <<
", "<< lastPos <<
"] exceed maximum allowed overlap = "<< overlap);
1034 LOG_POST(
"Disallowed overlap of CD sequence "<<
i<<
" ["<< lo <<
", "<< hi <<
"] and proposed update with range ["<< firstPos <<
", "<< lastPos <<
"]");
1052 if(lenAligned >= pssmLen)
1068 if( ( mGapToN - sGapToN > allowed) ||
1069(mGapToC - sGapToC > allowed))
1077 for(
unsigned int i= 0;
i< bioseqs.size();
i++)
1080CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
1081 for(; it != itend; ++it) {
1085seqEntry->
SetSeq(*bioseqs[
i]);
1096 stringloaderName = loader->GetName();
1104 LOG_POST(
"Failed to get bioseq handle for seqid "<< seqid->GetSeqIdString() <<
".");
1110bioseqs.push_back(bioseq);
1116vector< CRef<CSeq_id> > seqids;
1117 unsigned intbatchSize = 500;
1118 unsigned intmaxBatchSize = 2000;
1122list< CRef< CSeq_align > >& seqAligns = alignments.
Set();
1123list< CRef< CSeq_align > >::iterator lit = seqAligns.begin();
1124 for(; lit != seqAligns.end(); lit++)
1126seqids.push_back((*lit)->SetSegs().SetDenseg().GetIds()[1]);
1127list< CRef< CSeq_align > >::iterator
next= lit;
1130 if(seqids.size() >= batchSize || (
next== (seqAligns.end())) )
1132 stringerrors, warnings;
1133vector< CRef< CBioseq > > bioseqBatch;
1141 LOG_POST(
"Returned from object manager with a batch of "<< bioseqBatch.size() <<
" sequences.");
1144 LOG_POST(
"Returned from CBlastServices::GetSequences('"<< dbName <<
"') with a batch of "<< bioseqBatch.size() <<
" sequences.");
1147 catch(blast::CBlastException& be)
1149 if(seqids.size() > maxBatchSize)
1155 LOG_POST(
"Retrieving sequences from RemoteBlast failed with an exception of "<<be.GetErrCodeString());
1159 LOG_POST(
"Unspecified exception during CBlastServices::GetSequences(). Skipping to next Seq-align.\n");
1163 if(seqids.size()!= bioseqBatch.size())
1165 LOG_POST(
"Ask for "<< seqids.size()<<
" sequences. Got "<<bioseqBatch.size()<<
" back\n");
1166 LOG_POST(
"Error="<<errors<<
"\nWarnings="<<warnings);
1169 for(
unsigned int i= 0 ;
i< bioseqBatch.size();
i++)
1171bioseqs.push_back(bioseqBatch[
i]);
1179vector< CRef< CSeq_id > > seqIds;
1181 for(
unsigned int i= 0;
i< seqIds.size();
i++)
1182 if(seqIds[
i]->IsGi())
1183 returnseqIds[
i]->GetGi();
1189 constlist< CRef< CSeq_id > >& seqIds = bioseq->
GetId();
1190list< CRef< CSeq_id > >::const_iterator cit = seqIds.begin();
1191 for(; cit != seqIds.end(); cit++)
1193 return(*cit)->GetGi();
1205vector< CRef< CSeq_id > >& seqIds= denseg->SetIds();
1206 if(seqIds.size() <= 1)
1215vector< CRef< CSeq_id > > slaveIds;
1217 if(slaveIds.size() > 0)
1218seqIds[1].Reset( (slaveIds[0]).GetPointer() );
1220 if(seqEntry->
IsSet())
1228seqEntry->
SetSeq(*bioseq);
1257 boolhasSource =
false;
1258 boolhasTitle =
false;
1262 if(seqDescr.
IsSet())
1264list< CRef< CSeqdesc > >& descrList = seqDescr.
Set();
1265list< CRef< CSeqdesc > >::iterator cit = descrList.begin();
1266 while(cit != descrList.end())
1268 if((*cit)->IsSource() && (!hasSource))
1273 else if( (*cit)->IsTitle())
1280 else if((*cit)->IsUser() && (!hasSource))
1282 if((*cit)->SetUser().SetType().SetStr() ==
"TaxNamesData")
1284vector< CRef< CUser_field > >& fields = (*cit)->SetUser().SetData();
1285 if( fields.size() > 0)
1295descrList.push_back(
source);
1299cit = descrList.erase(cit);
1302cit = descrList.erase(cit);
1308 if(seqEntry->
IsSet())
1310 constlist< CRef< CSeqdesc > >& descrList = seqEntry->
GetSet().
GetDescr().
Get();
1311list< CRef< CSeqdesc > >::const_iterator cit = descrList.begin();
1312 for(; cit != descrList.end(); cit++)
1314 if((*cit)->IsSource())
1316seqDescr.
Set().push_back(*cit);
1326 constlist< CRef< CSeq_id > >& seqIds = bioseq->
GetId();
1327list< CRef< CSeq_id > >::const_iterator cit = seqIds.begin();
1328 boolisPdb =
false;
1329 for(; cit != seqIds.end(); cit++)
1331 if((*cit)->IsPdb())
1340vector<TIntId> uids;
1341 stringpdb = (*cit)->GetPdb().GetMol().Get();
1344 client.Query(pdb,
"structure", uids);
1347 LOG_POST(
"\nFailed to retrieve mmdb-id for "<<pdb<<
" because the error:\n "<<e.
ReportAll());
1351 if(uids.size() > 0)
1356generalId.
SetDb(
"mmdb");
1357generalId.
SetTag().SetId(mmdbId);
1359seqAnnot->
SetData().SetIds().push_back(mmdbTag);
1360bioseq->
SetAnnot().push_back(seqAnnot);
1368 if(pdbBlock->CanGetCompound())
1370 constlist< string >& compounds = pdbBlock->GetCompound();
1371 if(compounds.size() != 0)
1372seqDesc->
SetTitle(*(compounds.begin()));
1373seqDescr.
Set().push_back(seqDesc);
1385 if(seqEntry->
IsSeq())
1387 constlist< CRef< CSeq_id > >& seqIdList = seqEntry->
GetSeq().
GetId();
1388list< CRef< CSeq_id > >::const_iterator lsii;
1389 for(lsii = seqIdList.begin(); lsii != seqIdList.end(); ++lsii)
1393 if((*lsii)->IsPdb())
1394slaveIds.push_back(*lsii);
1397slaveIds.push_back(*lsii);
1399 returnslaveIds.size();
1403list< CRef< CSeq_entry > >::const_iterator lsei;
1404 constlist< CRef< CSeq_entry > >& seqEntryList = seqEntry->
GetSet().
GetSeq_set();
1405 for(lsei = seqEntryList.begin(); lsei != seqEntryList.end(); ++lsei)
1409 returnslaveIds.size();
1416 if(seqEntry->
IsSeq())
1442list< CRef< CSeq_entry > >::const_iterator lsei;
1443 constlist< CRef< CSeq_entry > >& seqEntryList = seqEntry->
GetSet().
GetSeq_set();
1444 for(lsei = seqEntryList.begin(); lsei != seqEntryList.end(); ++lsei)
1455vector< CRef< CSeq_id > > seqIds;
1457 for(
unsigned int i= 0;
i< seqIds.size();
i++)
1459 if(seqIds[
i]->Match(seqId))
1468CBioseq::TId::const_iterator it = ids.begin(), itend = ids.end();
1469 for(; it != itend; ++it)
1471 if((*it)->Match(seqId))
1484list< CRef< CBlast_def_line > >& deflines = blastDefLine->
Set();
1486 if(deflines.size() <= 1)
1488bioseqs.push_back(
orig);
1494iter != deflines.end(); iter++)
1499bioseqs.push_back(splitBioseq);
1502 returndeflines.size();
1508 intsourceOrder = 0;
1509 if(seqDescr.
IsSet())
1511list< CRef< CSeqdesc > >& descrList = seqDescr.
Set();
1512list< CRef< CSeqdesc > >::iterator cit = descrList.begin();
1513 while(cit != descrList.end())
1515 if((*cit)->IsSource())
1517 if(sourceOrder == order)
1520cit = descrList.erase(cit);
1526 else if( (*cit)->IsTitle())
1527cit = descrList.erase(cit);
1531title->
SetTitle(blastDefline->GetTitle());
1532descrList.push_back(title);
1536bioseq->
SetId().assign(blastDefline->GetSeqid().begin(), blastDefline->GetSeqid().end());
1552 if(oss.size() == 1) {
1555 constvector<char> & v = *oss.front();
1562 size+= (**iter1).size();
1565temp.reserve(
size);
1569temp.append(& (**iter3)[0], (*iter3)->size());
1586 static const char* asnDeflineObjLabel =
"ASN1_BlastDefLine";
1591 constlist< CRef< CSeqdesc > >& descList = desc.
Get();
1592 for(list<
CRef< CSeqdesc >>::const_iterator iter = descList.begin(); iter != descList.end(); iter++){
1594 if((*iter)->IsUser()){
1597 if(uobjid.
IsStr()){
1600 if(
label== asnDeflineObjLabel){
1601 constvector< CRef< CUser_field > >& usf = uobj.
GetData();
1603 if(usf.front()->GetData().IsOss()){
1605 constTOss& oss = usf.front()->GetData().GetOss();
1618 static const char* asnDeflineObjLabel =
"ASN1_BlastDefLine";
1622list< CRef< CSeqdesc > >& descList = desc.
Set();
1623 for(list<
CRef< CSeqdesc >>::iterator iter = descList.begin(); iter != descList.end(); iter++)
1625 if((*iter)->IsUser())
1629 if(uobjid.
IsStr())
1632 if(
label== asnDeflineObjLabel)
1634descList.erase(iter);
1650vector< CRef< CSeq_align > > seqAlignVec;
1651 for(
int i= 0;
i< num;
i++)
1653cd_utils::BlockFormater bf(seqAlignVec, seqlen);
1654list< CRef< CSeq_align > >& seqAlignList = cd->
GetSeqAligns();
1655 if(seqAlignList.size() > 0)
1658 if(
bmp.getMaster() ==
bmp.getSlave())
1659seqAlignList.erase(seqAlignList.begin());
1660 if(seqAlignList.size() > 0)
1661bf.setReferenceSeqAlign(*seqAlignList.begin());
1663 intnumGood = bf.findIntersectingBlocks(overlap);
1664bf.formatBlocksForQualifiedRows(seqAlignList);
1667bf.getQualifiedRows(rows);
1668 for(
unsigned int r= 0;
r< rows.size();
r++)
1671 returnnum - numGood;
1683 if(seqEntry.
IsSet())
1686list< CRef< CSeq_entry > >::iterator it = seqSet.begin();
1687 for(; it != seqSet.end(); it++)
1718 returnnewgi != oldgi;
1738 stringnewStr, oldStr;
1741 if(newStr.size() != oldStr.size())
1744vector< CRef< CSeq_id > > newIds;
1747 for(
unsigned int i= 0;
i< newIds.size();
i++)
1749 if(newIds[
i]->IsGi())
1751 else if(newIds[
i]->IsPdb())
1752pdbId = newIds[
i];
1755 boolreplaced =
false;
1756 for(list<
CRef< CSeq_align >>::iterator lit = seqAlignList.begin(); lit != seqAlignList.end(); lit++)
1760 GetSeqID(seqAlign, idInAlign,
true);
1767 bmp.getSlave().setSeqId(pdbId);
1768seqAlign =
bmp.toSeqAlign();
1773 bmp.getSlave().setSeqId(giId);
1774seqAlign =
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 CSafeStatic< list< UpdaterInterface * > > m_updaterList
static void addUpdater(UpdaterInterface *updater)
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
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