<IMG SRC=\"images/new.gif\" \
124WIDTH=30 HEIGHT=15 ALT=\"New sequence mark\">";
127 bg.gif\" WIDTH=30 HEIGHT=15 ALT=\" \">";
130 /bg.gif\" WIDTH=15 HEIGHT=15 ALT=\" \">";
133 if\" WIDTH=15 HEIGHT=15 ALT=\"Checked mark\">";
160 boolfound_gi =
false;
166 if((*itr)->IsGi()) {
167id_string += (*itr)->AsFastaString();
181id_string += id_token;
197vector< CConstRef<CSeq_id> > original_seqids;
200original_seqids.push_back(itr->GetSeqId());
222 if(((*itr)->IsGeneral() &&
223(*itr)->AsFastaString().find(
"gnl|BL_ORD_ID")
225(*itr)->AsFastaString().find(
"lcl|Subject_") != string::npos) {
226vector<string> title_tokens;
227 stringdefline = sequence::CDeflineGenerator().GenerateDefline(bh);
238obj_id->
SetStr(id_token);
239next_seqid->SetLocal(*obj_id);
241next_seqid->Assign(**itr);
243ids.push_back(next_seqid);
249list<TGi>& use_this_gi,
250 string& seqid,
string& defline,
256 if( !handle )
return;
260 if(bdlRef.
Empty()){
261list<CRef<objects::CSeq_id> > ids;
264defline = sequence::CDeflineGenerator().GenerateDefline(handle);
267 constlist< CRef< CBlast_def_line > >& bdl = bdlRef->
Get();
268 boolis_first =
true;
273 ITERATE(list<TGi>, iter_gi, use_this_gi){
274 if(cur_gi == *iter_gi){
275gi_in_use_this_gi = *iter_gi;
279 if(use_this_gi.empty() || gi_in_use_this_gi >
ZERO_GI) {
283 if((*iter)->IsSetTitle()){
285defline = (*iter)->GetTitle();
291 if( show_gi && cur_gi >
ZERO_GI){
292defline = defline +
" >"+
"gi|"+
294concat_acc +
" "+ (*iter)->GetTitle();
296defline = defline +
" >"+ concat_acc +
" "+
309 if(descr.length() > maxDescrLength) {
310descr = descr.substr(0,maxDescrLength);
314descr = descr.substr(0,end);
324 boolgetIdentProteins)
390list<string> &use_this_seqid,
394 if( !handle )
return;
419seq_status = itr->second;
438 boolgetIdentProteins = !
m_IsDbNa&& bdl.size() > 1;
440iter != bdl.end(); iter++){
444 if(!use_this_seqid.empty()){
448 if((use_this_seqid.empty() && sdl->
gi== cur_gi) ||
match) {
454 if(bdl.size() == 0) {
466sdl->
score_url= !useTemplates ?
"<a href=#":
"";
472sdl->
score_url+= !useTemplates ?
">":
"";
488 if((*iter_bdl)->IsSetTaxid() && (*iter_bdl)->CanGetTaxid()){
489seqUrlInfo.
taxid= (*iter_bdl)->GetTaxid();
500 if(!(bdl.empty())) {
502iter != bdl.end(); iter++){
507 if(use_this_seqid.empty() ||
match) {
509 if((*iter)->IsSetTitle()){
510 boolid_used_already =
false;
512 if((*iter_id)->Match(*(sdl->
id))) {
513id_used_already =
true;
517 if(!id_used_already) {
524concat_acc +
" "+ (*iter)->GetTitle();
544 size_tnum_defline_to_show,
545 booltranslated_nuc_alignment,
548m_AlnSetRef(&seqalign),
550m_LineLen(line_length),
551m_NumToShow(num_defline_to_show),
552m_TranslatedNucAlignment(translated_nuc_alignment),
555m_MasterRange(master_range),
625 boolstruct_linkout =
false;
627 const intk_CountMax = 200;
631 if( !handle )
continue;
635bdl_iter != bdl.end() && struct_linkout ==
false; bdl_iter++){
636 if((*bdl_iter)->IsSetLinks())
639link_iter != (*bdl_iter)->GetLinks().end(); link_iter++)
642struct_linkout =
true;
648 if(struct_linkout ==
true||
count> k_CountMax)
652 returnstruct_linkout;
664 boolis_first_aln =
true;
665 size_tnum_align = 0;
682 boolmaster_is_na =
false;
686 for(CSeq_align_set::Tdata::const_iterator
690 if(ialn < m_SkipTo && ialn >=
m_SkipFrom)
continue;
698subid = &((*iter)->GetSeq_id(1));
699 if(is_first_aln || (!is_first_aln && !subid->
Match(*previous_id))) {
703 if(m_MaxScoreLen < sci->bit_string.size()){
706 if(m_MaxEvalueLen < sci->evalue_string.size()){
710 if(m_MaxTotalScoreLen < sci->total_bit_string.size()){
724is_first_aln =
false;
739 buf[
sizeof(
buf)-1] =
'\0';
748 buf[
sizeof(
buf)-1] =
'\0';
851 boolfirst_new =
true;
854 size_tline_length = 0;
855 stringline_component;
889 out<< line_component;
890line_length += line_component.size();
894 if(!(sdl->
id->AsFastaString().find(
"gnl|BL_ORD_ID") != string::npos ||
895sdl->
id->AsFastaString().find(
"lcl|Subject_") != string::npos)){
898idStr = sdl->
id->AsFastaString();
903 if(
strncmp(idStr.c_str(),
"lcl|", 4) == 0) {
904idStr = sdl->
id->AsFastaString().substr(4);
907line_length += idStr.size();
913line_component = (line_component.empty() ?
"":
" ") + sdl->
defline;
914 stringactual_line_component;
915 if(line_component.size()+line_length >
m_LineLen){
916actual_line_component = line_component.substr(0,
m_LineLen-
920actual_line_component = line_component.substr(0,
m_LineLen-
926 out<< actual_line_component;
928line_length += actual_line_component.size();
936 out<< (*iter)->bit_string;
944(*iter)->total_bit_string.size());
949 intpercent_coverage = (*iter)->percent_coverage;
967 intpercent_identity =(
int) (0.5 + (*iter)->percent_identity);
968 if(percent_identity > 100) {
969percent_identity =
min(99, percent_identity);
976 boolis_first =
true;
982 out<< *iter_linkout;
992 const string& param,
993 const string& entrez_term)
997snprintf(
buf,
sizeof(
buf), structure_Overview.c_str(), rid.c_str(),
9980, 0, param.c_str(),
"overview",
999(entrez_term.empty()?
"none": entrez_term.c_str()));
1000 buf[
sizeof(
buf)-1] =
'\0';
1001 out<<
' '<<
buf<<
"\n\n";
1015 intcurrDisplaySort,
1017 intcolumnDisplSort,
1026 if(currDisplaySort == columnDisplSort) {
1027 out<<
"<th class=\"sel\">";
1033 out<<
"<a href=\"Blast.cgi?" 1034<<
"CMD=Get&"<< query_buf
1035<<
"&DISPLAY_SORT="<< columnDisplSort
1036<<
"&HSP_SORT="<< columnHspSort
1037<<
"#sort_mark\">";
1042 out<<
"</a></th>\n";
1056 boolis_first_aln =
true;
1057 size_tnum_align = 0;
1064 intpercent_identity = 0;
1078 boolmaster_is_na =
false;
1082 for(CSeq_align_set::Tdata::const_iterator
1087 if(ialn < m_SkipTo && ialn >=
m_SkipFrom)
continue;
1091 m_ScopeRef->GetBioseqHandle((*iter)->GetSeq_id(0)).GetBioseqLength();
1092master_is_na =
m_ScopeRef->GetBioseqHandle((*iter)->GetSeq_id(0)).
1093GetBioseqCore()->IsNa();
1096subid = &((*iter)->GetSeq_id(1));
1100 if(!is_first_aln && !(subid->
Match(*previous_id))) {
1104 if(m_MaxScoreLen < sci->bit_string.size()){
1107 if(m_MaxTotalScoreLen < sci->total_bit_string.size()){
1114 if(m_MaxEvalueLen < sci->evalue_string.size()){
1121hit.
Set().clear();
1127hit.
Set().push_back(*iter);
1129is_first_aln =
false;
1130previous_id = subid;
1137 if(m_MaxScoreLen < sci->bit_string.size()){
1140 if(m_MaxTotalScoreLen < sci->total_bit_string.size()){
1147 if(m_MaxEvalueLen < sci->evalue_string.size()){
1154hit.
Set().clear();
1188 out<<
"(Click headers to sort columns)\n";
1192 out<<
"<div id=\"desctbl\">"<<
"<table id=\"descs\">"<<
"\n"<<
"<thead>"<<
"\n";
1193 out<<
"<tr class=\"first\">"<<
"\n"<<
"<th>Accession</th>"<<
"\n"<<
"<th>Description</th>"<<
"\n";
1203parameters_to_change,
1206parameters_to_change.
clear();
1224 out<<
"<th>"<<
kN<<
"</th>"<<
"\n";
1228 out<<
"<th>Links</th>\n";
1230 out<<
"</thead>\n";
1235 out<<
"<tbody>\n";
1241 out<<
"</tbody>\n</table></div>\n";
1247 intpercent_identity = 0;
1249 boolfirst_new =
true;
1250 intprev_database_type = 0, cur_database_type = 0;
1251 boolis_first =
true;
1253 boolis_mixed_database =
false;
1263parameters_to_change,
1269 stringline_component;
1271 if(is_mixed_database) {
1274 out<<
"<tr>\n<th colspan=\""<< tableColNumber<<
"\" class=\"l sp\">";
1276 if(cur_database_type) {
1277 out<<
"Genomic sequences";
1279 out<<
"Transcripts";
1285 out<<
"</th></tr>\n";
1287}
else if(prev_database_type != cur_database_type) {
1289 out<<
"<tr>\n<th colspan=\""<< tableColNumber<<
"\" class=\"l sp\">";
1291 if(cur_database_type) {
1292 out<<
"Genomic sequences";
1294 out<<
"Transcripts";
1297 out<<
"<span class=\"slink\">" 1298<<
" [<a href=\"Blast.cgi?CMD=Get&" 1300<<
"&DATABASE_SORT=";
1301 if(cur_database_type) {
1306 out<<
"#sort_mark\">show first</a>]</span>";
1312 out<<
"</th></tr>\n";
1316prev_database_type = cur_database_type;
1320 out<<
"<td class=\"l\">\n";
1355 out<< line_component;
1360 if(!(sdl->
id->AsFastaString().find(
"gnl|BL_ORD_ID") != string::npos ||
1361sdl->
id->AsFastaString().find(
"lcl|Subject_") != string::npos)){
1372 out<<
"</td><td class=\"lim l\"><div class=\"lim\">";
1374line_component =
" "+ sdl->
defline;
1375 stringactual_line_component;
1376actual_line_component = line_component;
1380 out<<
"</div></td><td>";
1382 out<< actual_line_component;
1388 out<< (*iter)->bit_string;
1394 out<<
"<td>"<< (*iter)->total_bit_string <<
"</td>";
1401(*iter)->total_bit_string.size());
1404 intpercent_coverage = 100*(*iter)->master_covered_length/
m_QueryLength;
1406 out<<
"<td>"<< percent_coverage <<
"%</td>";
1417 out<<
"<td>"<< (*iter)->evalue_string <<
"</td>";
1426 out<<
"<td>"<< percent_identity <<
"%</td>";
1452 boolfirst_time =
true;
1456first_time =
false;
1458 out<< *iter_linkout;
1485 stringevalue_buf, bit_score_buf, total_bit_score_buf, raw_score_buf;
1491list<string> use_this_seq;
1493use_this_seq.clear();
1495num_ident, use_this_seq);
1498evalue_buf, bit_score_buf, total_bit_score_buf,
1501unique_ptr<SScoreInfo> score_info(
new SScoreInfo);
1502score_info->sum_n = sum_n == -1 ? 1:sum_n ;
1505score_info->use_this_seqid = use_this_seq;
1507score_info->bit_string = bit_score_buf;
1508score_info->raw_score_string = raw_score_buf;
1509score_info->evalue_string = evalue_buf;
1511score_info->blast_rank = blast_rank+1;
1513score_info->flip =
false;
1514 returnscore_info.release();
1520 stringevalue_buf, bit_score_buf, total_bit_score_buf, raw_score_buf;
1522 if(aln.
Get().empty())
1525unique_ptr<SScoreInfo> score_info(
new SScoreInfo);
1528 if(seqSetInfo->hspNum == 0) {
1533evalue_buf, bit_score_buf, total_bit_score_buf,
1535score_info->id = seqSetInfo->id;
1537score_info->total_bit_string = total_bit_score_buf;
1538score_info->bit_string = bit_score_buf;
1539score_info->evalue_string = evalue_buf;
1540score_info->percent_coverage = seqSetInfo->percent_coverage;
1541score_info->percent_identity = seqSetInfo->percent_identity;
1542score_info->hspNum = seqSetInfo->hspNum;
1543score_info->totalLen = seqSetInfo->totalLen;
1545score_info->use_this_seqid = seqSetInfo->use_this_seq;
1546score_info->sum_n = seqSetInfo->sum_n == -1 ? 1:seqSetInfo->sum_n ;
1548score_info->raw_score_string = raw_score_buf;
1549score_info->match = seqSetInfo->match;
1550score_info->align_length = seqSetInfo->align_length;
1551score_info->master_covered_length = seqSetInfo->master_covered_length;
1554score_info->subjRange = seqSetInfo->subjRange;
1555score_info->flip = seqSetInfo->flip;
1557score_info->blast_rank = blast_rank+1;
1559 returnscore_info.release();
1562vector <CShowBlastDefline::SDeflineInfo*>
1565vector <CShowBlastDefline::SDeflineInfo*> sdlVec;
1566 for(
size_t i= 0;
i< seqIds.size();
i++) {
1567list<string> use_this_seq;
1569sdlVec.push_back(sdl);
1597sdl->
gi= (*id).GetGi();
1621 boolfirst_new =
true;
1622 intprev_database_type = 0, cur_database_type = 0;
1623 boolis_first =
true;
1627 stringrowType =
"odd";
1633 boolformatHeaderSort = !is_first && (prev_database_type != cur_database_type);
1634 if(is_mixed_database && (is_first || formatHeaderSort)) {
1636subHeaderID = cur_database_type ?
"GnmSeq":
"Transcr";
1640prev_database_type = cur_database_type;
1647 stringfirstSeq = (is_first) ?
"firstSeq":
"";
1651rowType = (rowType ==
"odd") ?
"even":
"odd";
1653 if(!subHeader.empty()) {
1654defLine = subHeader + defLine;
1667 if(sdl->
taxid> 0) {
1690 stringallClustRows;
1697allClustRows += clustRow;
1701 stringclustMemDiff, clustSizeShow;
1704clustSizeShow =
"shown";
1716 stringallClustRows;
1723allClustRows += descrHeader;
1730allClustRows += clustRow;
1740 boolfirst_new =
true;
1749 stringfirstSeq = (is_first) ?
"firstSeq":
"";
1771defLine = descrHeader + defLine;
1788 if(!(sdl->
id->AsFastaString().find(
"gnl|BL_ORD_ID") != string::npos ||sdl->
id->AsFastaString().find(
"lcl|Subject_") != string::npos)) {
1802 stringdescr = (!sdl->
defline.empty()) ? sdl->
defline:
"None provided";
1805descr =
"\""+ descr +
"\"";
1849 if(!(sdl->
id->AsFastaString().find(
"gnl|BL_ORD_ID") != string::npos ||sdl->
id->AsFastaString().find(
"lcl|Subject_") != string::npos)) {
1854 stringdescr = (!sdl->
defline.empty()) ? sdl->
defline:
"None provided";
1934 stringseqSetType = isGenomicSeq ?
"Genomic sequences":
"Transcripts";
1936 if(formatHeaderSort) {
1954 if(!(sdl->
id->AsFastaString().find(
"gnl|BL_ORD_ID") != string::npos ||
1955sdl->
id->AsFastaString().find(
"lcl|Subject_") != string::npos)) {
1972 stringdescr = (!sdl->
defline.empty()) ? sdl->
defline:
"None provided";
1989 stringdeflId,deflFrmID,deflFastaSeq,deflAccs,deflFastaDwnld;
1994deflAccs = sdl->
id->AsFastaString();
2058links += *iter_linkout;
2068 stringshow_new,psi_new,psi_new_accesible,show_checked,replaceBy,psiNewSeq;
2071first_new = (sdl->
is_new&& first_new) ?
false: first_new;
2073show_new =
"hidden";
2076psi_new =
"psi_new";
2077psi_new_accesible =
"psiNw";
2085show_checked =
"hidden";
2087 stringpsiUsedToBuildPssm = (sdl->
was_checked) ?
"on":
"off";
2126 if(!(sdl->
id->AsFastaString().find(
"gnl|BL_ORD_ID") != string::npos || sdl->
id->AsFastaString().find(
"lcl|Subject_") != string::npos)) {
2134sdlFormatInfo->
dfln_gi= dflGi;
2138 stringdescr = (!sdl->
defline.empty()) ? sdl->
defline:
"None provided";
2149 stringdeflId,deflFrmID,deflFastaSeq,deflAccs;
2154deflAccs = sdl->
id->AsFastaString();
2163sdlFormatInfo->
dfln_id= deflId;
2166sdlFormatInfo->
dflnAccs=deflAccs;
2185 boolis_first_aln =
true;
2186 size_tnum_align = 0;
2195 for(CSeq_align_set::Tdata::const_iterator iter =
m_AlnSetRef->Get().begin();
2204subid = &((*iter)->GetSeq_id(1));
2206 if(!is_first_aln && !(subid->
Match(*previous_id))) {
2211hit.
Set().clear();
2217hit.
Set().push_back(*iter);
2219is_first_aln =
false;
2220previous_id = subid;
2227hit.
Set().clear();
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 class to display one-line descriptions at the top of the BLAST report.
static CAlignFormatUtil::SSeqAlignSetCalcParams * GetSeqAlignSetCalcParamsFromASN(const objects::CSeq_align_set &alnSet)
static string GetIDUrl(SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)
Create URL for seqid.
static CAlignFormatUtil::SSeqAlignSetCalcParams * GetSeqAlignSetCalcParams(const objects::CSeq_align_set &aln, int queryLength, bool do_translation)
static bool IsMixedDatabase(const objects::CSeq_align_set &alnset, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)
static list< string > GetFullLinkoutUrl(const list< CRef< objects::CBlast_def_line > > &bdl, const string &rid, const string &cdd_rid, const string &entrez_term, bool is_na, bool structure_linkout_as_group, bool for_alignment, int cur_align, string &linkoutOrder, TTaxId taxid, string &database, int query_number, string &user_url, string &preComputedResID, ILinkoutDB *linkoutdb, const string &mv_build_name)
Get linkout membership for for the list of blast deflines.
static void GetAlnScores(const objects::CSeq_align &aln, int &score, double &bits, double &evalue, int &sum_n, int &num_ident, list< TGi > &use_this_gi)
Extract score info from blast alingment.
static void BuildFormatQueryString(CCgiContext &ctx, string &cgi_query)
static void GetScoreString(double evalue, double bit_score, double total_bit_score, int raw_score, string &evalue_str, string &bit_score_str, string &total_bit_score_str, string &raw_score_str)
format evalue and bit_score
static string GetBareId(const objects::CSeq_id &id)
Get sequence id with no database source (bare accession)
static string MapTemplate(string inpString, string tmplParamName, Int8 templParamVal)
Replace template tags by real data.
static bool MatchSeqInSeqList(TGi cur_gi, CRef< objects::CSeq_id > &seqID, list< string > &use_this_seq, bool *isGiList=NULL)
Matches text seqID or gi with the list of seqIds or gis.
static int GetSeqLinkoutInfo(objects::CBioseq::TId &cur_id, ILinkoutDB **linkoutdb, const string &mv_build_name, TGi gi=INVALID_GI)
static CRef< objects::CSeq_id > GetDisplayIds(const objects::CBioseq_Handle &handle, const objects::CSeq_id &aln_id, list< TGi > &use_this_gi, TGi &gi, TTaxId &taxid)
Scan the the list of blast deflines and find seqID to be use in display.
static list< string > GetLinkoutUrl(int linkout, const objects::CBioseq::TId &ids, const string &rid, const string &cdd_rid, const string &entrez_term, bool is_na, TGi first_gi, bool structure_linkout_as_group, bool for_alignment, int cur_align, string preComputedResID)
Get the list of urls for linkouts.
static int GetPercentMatch(int numerator, int denominator)
function for calculating percent match for an alignment.
static string MapTagToConstString(const string tag_name, EMapConstString flag=eMapToURL)
static void AddSpace(CNcbiOstream &out, size_t number)
Add the specified white space.
static string MapSpaceTemplate(string inpString, string tmplParamName, string templParamVal, unsigned int maxParamLength, int spacesFormatFlag=eSpacePosAtLineEnd)
Replace template tags by real data and calculate and add spaces dependent on maxParamLength and space...
static string GetLabel(CConstRef< objects::CSeq_id > id, bool with_version=false)
Return a label for an ID Tries to recreate behavior of GetLabel before a change that prepends "ti|" t...
static string MapTagToHTML(const string tag_name)
void PutTargetGiFirst(TGi gi)
Place the CBlast_def_line object which contains the requested gi as the first in the list (if found)
Class for computing sequences' titles ("definitions").
static void GetTaxInfo(TTaxId taxid, SSeqDBTaxInfo &info)
Get taxonomy information.
static CRef< CBlast_def_line_set > ExtractBlastDefline(const CBioseq &bioseq)
Extract a Blast-def-line-set object from a Bioseq retrieved by CSeqDB.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
size_t m_MaxEvalueLen
Eval header size.
int m_StartIndex
The start index of defline for PSI blast description table.
void x_InitLinkOutInfo(SDeflineInfo *sdl, objects::CBioseq::TId &cur_id, int blast_rank, bool getIdentProteins)
string m_MapViewerBuildName
mapviewer build name associated with the sequences in the BLAST database out of which the results are...
void x_FillDeflineAndId(const objects::CBioseq_Handle &handle, const objects::CSeq_id &aln_id, list< string > &use_this_seqid, SDeflineInfo *sdl, int blast_rank)
Internal function to fill defline info.
CShowBlastDefline(const objects::CSeq_align_set &seqalign, objects::CScope &scope, size_t line_length=65, size_t deflines_to_show=kDfltArgNumDescriptions, bool translated_nuc_alignment=false, CRange< TSeqPos > *master_range=NULL)
Constructors.
CRef< objects::CScope > m_ScopeRef
Scope to fetch sequence.
string x_FormatClusterMemData(SDeflineInfo *sdl, string defline)
size_t m_MaxQueryCoverLen
string x_FormatPsi(SDeflineInfo *sdl, bool &first_new)
Format PSI blat related data.
int m_Option
Display options.
bool x_CheckForStructureLink()
Checks the first X deflines (currently X is 200) for a structure link.
void x_DisplayDefline(CNcbiOstream &out)
Display defline for regular output.
SScoreInfo * x_GetScoreInfoForTable(const objects::CSeq_align_set &aln, int blast_rank)
Internal function to return score info.
static void GetBioseqHandleDeflineAndId(const objects::CBioseq_Handle &handle, list< TGi > &use_this_gi, string &seqid, string &defline, bool show_gi=true, TGi this_gi_first=INVALID_GI)
Returns sequence id and a BLAST defline as strings, given a Bioseq handle and a list of gis.
PsiblastStatus m_PsiblastStatus
string m_BlastType
Blast type.
SScoreInfo * x_GetScoreInfo(const objects::CSeq_align &aln, int blast_rank)
Internal function to return score info.
PsiblastSeqStatus
PSI-BLAST sequence status (applicable in HTML only)
@ eGoodSeq
above the threshold evalue
@ eUnknown
Uninitialized.
@ eCheckedSeq
user checked
@ eRepeatSeq
previously already found
SAppLogInfo * m_AppLogInfo
static void GetSeqIdList(const objects::CBioseq_Handle &bh, list< CRef< objects::CSeq_id > > &ids)
Converts a Bioseq handle's sequence id type into a list of objects::CSeq_id references,...
void DisplayBlastDefline(CNcbiOstream &out)
Display defline.
string m_Database
Database name.
bool m_TranslatedNucAlignment
used to calculate the alignment length
int m_SkipFrom
seq aligns to be skipped
vector< SDeflineFormattingInfo * > m_SdlFormatInfoVec
void DisplayOneDefline(CNcbiOstream &out, SDeflineInfo *sdl, SScoreInfo *iter, bool &is_first)
Display one defline.
SDeflineInfo * x_GetDeflineInfo(CConstRef< objects::CSeq_id > id, list< string > &use_this_seqid, int blast_rank)
Internal function to return defline info.
void x_DisplayDeflineTableBody(CNcbiOstream &out)
Display defline table contents for table output.
void x_DisplayDeflineTableTemplate(CNcbiOstream &out)
Display defline for table output using templates.
static string GetSeqIdListString(const list< CRef< objects::CSeq_id > > &id, bool show_gi)
Creates a '|' delimited string, corresponding to a list of Seq-ids.
string x_FormatDeflineTableLine(SDeflineInfo *sdl, SScoreInfo *iter, bool &first_new)
Format defline.
SDeflineInfo * GetDeflineInfo(CConstRef< objects::CSeq_id > id, list< string > &use_this_seqid, int blast_rank)
Get one defline info.
size_t m_MaxScoreLen
Score header size.
string x_FormatClusterMemDataTxt(SDeflineInfo *sdl, string defline)
ILinkoutDB * m_LinkoutDB
Reference to LinkoutDB implementation. Not owned by this class.
vector< SScoreInfo * > m_ScoreList
List containing score info for all seqalign.
void x_InitDefline(void)
Initialize defline params for regular output.
string m_PreComputedResID
CDD precomputed results ID.
string m_Rid
blast request id
int m_PositionIndex
result position index for multiple query case
void Init(void)
Initialize defline params.
string x_FormatDeflineTableLineCSV(SDeflineInfo *sdl, SScoreInfo *iter)
size_t m_MaxPercentIdentityLen
string m_LinkoutOrder
Linkout order for display.
size_t m_LineLen
Line length.
void DisplayBlastDeflineTable(CNcbiOstream &out)
string x_FormatDeflineTableLineText(SDeflineInfo *sdl, SScoreInfo *iter)
vector< CShowBlastDefline::SDeflineFormattingInfo * > GetFormattingInfo(void)
Get deflines formatting info.
size_t m_NumToShow
Number of seqalign hits to show.
void x_DisplayDeflineTableTemplateCSV(CNcbiOstream &out)
string m_EntrezTerm
entrez term
void Display(CNcbiOstream &out)
Display defline.
void x_DisplayDeflineTableTemplateText(CNcbiOstream &out)
void x_DisplayDeflineTable(CNcbiOstream &out)
Display defline for table output.
string x_FormatDeflineTableHeaderText(void)
string m_CddRid
cdd blast request id
SDeflineTemplates * m_DeflineTemplates
blast defline templates
void x_InitFormattingInfo(SScoreInfo *sci)
CConstRef< objects::CSeq_align_set > m_AlnSetRef
Internal data with score information for each defline.
unique_ptr< CNcbiIfstream > m_ConfigFile
Internal configure file, i.e. .ncbirc.
@ eNewPass
Sequences are newly found in current pass.
@ eFirstPass
First pass. Default.
@ eRepeatPass
Sequences were found in previous pass.
void x_InitDeflineTable(void)
Initialize defline params for table output.
size_t m_MaxTotalScoreLen
Total score header size.
int m_QueryNumber
query number
unique_ptr< CNcbiRegistry > m_Reg
bool m_StructureLinkout
Indicates if 'Related structures' link should show.
TIdString2SeqStatus * m_SeqStatus
hash table to track psiblast status for each sequence
string x_FormatSeqSetHeaders(int isGenomic, bool formatHeaderSort)
Format headers for Transcrit/Genomic seq set.
CRange< TSeqPos > * m_MasterRange
blast sub-sequnce query
void x_GetTaxonomyInfoForTaxID(SDeflineInfo *sdl, SSeqDBTaxInfo &taxInfo)
container_type::const_iterator const_iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
std::ofstream out("events_result.xml")
main entry point for tests
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const CCgiEntry & GetRequestValue(const string &name, bool *is_found=0) const
static string HTMLEncode(const string &str, THTMLEncodeFlags flags=fEncodeAll)
HTML encodes a string. E.g. <.
const string AsFastaString(void) const
TGi FindGi(const container &ids)
Return gi from id list if exists, return 0 otherwise.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
static int WorstRank(const CRef< CSeq_id > &id)
static int Score(const CRef< CSeq_id > &id)
Wrappers for use with FindBestChoice from <corelib/ncbiutil.hpp>
@ eContent
Untagged human-readable accession or the like.
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
string GenerateDefline(const CBioseq_Handle &bsh, TUserFlags flags=0)
Main method.
vector< CSeq_id_Handle > TId
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
bool Empty(void) const THROWS_NONE
Check if CConstRef is empty â not pointing to any object which means having a null value.
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 NCBI_INT8_FORMAT_SPEC
int64_t Int8
8-byte (64-bit) signed integer
position_type GetLength(void) const
#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.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
@ eReverseSearch
Search in a backward direction.
@ eNocase
Case insensitive compare.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
const Tdata & Get(void) const
Get the member data.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
TStr & SetStr(void)
Select the variant.
Tdata & Set(void)
Assign a value to data member.
const Tdata & Get(void) const
Get the member data.
bool IsLocal(void) const
Check if variant Local is selected.
bool IsGi(void) const
Check if variant Gi is selected.
@ e_Gi
GenInfo Integrated Database.
const TId & GetId(void) const
Get the Id member data.
list< CRef< CSeq_id > > TId
unsigned int
A callback function used to compare two keys in a database.
HTML library helper classes and functions.
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
int strncmp(const char *str1, const char *str2, size_t count)
Defines NCBI C++ exception handling.
Process information in the NCBI Registry, including working with configuration files.
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Useful/utility classes and methods.
std::istream & in(std::istream &in_, double &x_)
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
static const char * kQueryCovLine2
static const char * kScore
static const size_t kBits_size
static const char * kTwoSpaceMargin
static void s_DisplayStructureOverview(CNcbiOstream &out, const string &rid, const string ¶m, const string &entrez_term)
static const size_t kOneSpaceMargin_size
static const char * kTotal
static const char * kBits
static const char * kHeader
static const char * kPsiblastCheckboxChecked
static const char * kTotalScore
static const char * kPsiblastNewSeqBackgroundGif
static const char * kOneSpaceMargin
static const int kMaxPercentIdentityLen
static const char * kScientific
static const char * kPsiblastEvalueLink
static const char * kDescription
static const char * kNewSeqHeader
static const size_t kCoverage_size
static const int kMaxTaxonomyNameLengthExt
static const char * kCommon
static const int kMaxTaxonomyNameLength
static const char * kAccession
static const char * kIdentLine2
static const char * kIdentity
static const int kMaxAccLength
static const char * kQueryCov
static const char * kPsiblastNewSeqGif
static const char * kPsiblastCheckedBackgroundGif
static const char * kMember
static const char * kEllipsis
static void s_DisplayCheckboxChecked(CNcbiOstream &out, TGi gi)
static const char * kRepeatHeader
static void s_DisplayCheckbox(CNcbiOstream &out, TGi gi)
static const size_t kTwoSpaceMargin_size
static const char * kCluster
static const int kMaxDispNumberLength
static const char * kPsiblastCheckedGif
static const char * kScoreLine2
static const char * kPsiblastCheckbox
static const int kMaxDescrLength
static const char * kMaxScore
static const char * kAncestor
static const char * kTaxid
static const char * kEvalue
static const char * kName
static const char * kTaxa
static const char * kAccAbbr
static const char * kPerc
static const char * kCoverage
static const size_t kScore_size
static void s_DisplayDescrColumnHeader(CNcbiOstream &out, int currDisplaySort, string query_buf, int columnDisplSort, int columnHspSort, string columnText, int max_data_len, bool html)
static const char * kNumOf
static const size_t kTotal_size
static const char * kLenAbbr
static void s_LimitDescrLength(string &descr, size_t maxDescrLength=kMaxDescrLength)
static const size_t kHeader_size
static const char * kValue
static const size_t kIdentity_size
static const size_t kQueryCov_size
static const char * kClusterTitle
static const size_t kValue_size
static SLJIT_INLINE sljit_ins or(sljit_gpr dst, sljit_gpr src)
Structure that holds information needed for creation seqID URL in descriptions and alignments.
bool useTemplates
bool indicating that templates should be used when contsructing links
bool advancedView
bool indicating that advanced view design option should be used when contsructing links
string resourcesUrl
URL(s) to other resources from .ncbirc.
vector< string > queryCoverageVec
vector< string > taxidVec
vector< string > deflIdVec
vector< string > percentIdentityVec
Data Representing each defline.
CConstRef< objects::CSeq_id > id
list< string > linkout_list
vector< SClusterMemberInfo > clustMemList
string psiFirstNewAnchorTmpl
first new seq anchor template (psi blast)
string scoreInfoTmpl
score info template
string seqInfoTmpl
sequence infor template
string psiGoodGiHiddenTmpl
good gi hidden field tewmplate (psi blast)
string defLineTmpl
whole defilne template
string subHeaderSort
subheader sort template for Transcript/Genomic case
string subHeaderTmpl
subheader templates for Transcript/Genomic case
CConstRef< objects::CSeq_id > id
list< string > use_this_seqid
string common_name
Common name, such as "noisy night monkey".
string blast_name
A simple category name, such as "birds".
string scientific_name
Scientific name, such as "Aotus vociferans".
TTaxId taxid
An identifier for this species or taxonomic group.
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