A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/align__format__util_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/align_format/align_format_util.cpp Source File

96

{

"BL2SEQ_WBLAST_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/blast/bl2seq/wblast2.cgi"

},

97

{

"CBLAST_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/Structure/cblast/cblast.cgi"

},

98

{

"DOWNLOAD_CGI"

,

"/blast/dumpgnl.cgi"

},

99

{

"ENTREZ_QUERY_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/entrez/query.fcgi"

},

100

{

"ENTREZ_SITES_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/sites/entrez"

},

101

{

"ENTREZ_SUBSEQ_TM"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/<@db@>/<@gi@>?report=gbwithparts&from=<@from@>&to=<@to@>&RID=<@rid@>"

},

102

{

"ENTREZ_TM"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/<@db@>/<@acc@>?report=genbank&log$=<@log@>&blast_rank=<@blast_rank@>&RID=<@rid@>"

},

103

{

"ENTREZ_VIEWER_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/entrez/viewer.fcgi"

},

104

{

"GENE_INFO"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term=%d&RID=%s&log$=geneexplicit%s&blast_rank=%d"

},

105

{

"MAP_SEARCH_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/mapview/map_search.cgi"

},

106

{

"MAPVIEWER_CGI"

,

"https://www.ncbi.nlm.nih.gov/mapview/maps.cgi?maps=blast_set"

},

107

{

"SEQVIEW_URL"

,

"https://www.ncbi.nlm.nih.gov/<@dbtype@>/<@seqid@>?report=graph&rid=<@rid@>[<@seqid@>]&"

},

108

{

"SEQVIEW_URL_NON_GI"

,

"https://www.ncbi.nlm.nih.gov/projects/sviewer/?RID=<@rid@>&id=<@firstSeqID@>&"

},

109

{

"TRACE_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/Traces/trace.cgi"

},

110

{

"TREEVIEW_CGI"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/blast/treeview/blast_tree_view.cgi"

},

111

{

"WGS"

,

"<@protocol@>//www.ncbi.nlm.nih.gov/nuccore/<@wgsacc@>"

},

117 

{

"BIOASSAY_NUC"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/entrez?db=pcassay&term=<@gi@>[RNATargetGI]&RID=<@rid@>&log$=pcassay<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

119

{

"BIOASSAY_PROT"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/entrez?db=pcassay&term=<@gi@>[PigGI]&RID=<@rid@>&log$=pcassay<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

121

{

"BIOASSAY_IMG"

,

"<img border=0 height=16 width=16 src=\"images/Bioassay.gif\" alt=\"PubChem BioAssay Info linked to <@label@>\">"

},

123

{

"BIOASSAY_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">bioactivity screening</span></div>"

},

125

{

"GENE"

,

"<a class=\"gene\" term=\"<@uid@>\" href=\"https://www.ncbi.nlm.nih.gov/gene?<@termParam@>RID=<@rid@>&log$=gene<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a><input type=\"hidden\" value=\"<@label@>\" />"

},

127

{

"GENE_IMG"

,

"<img border=0 height=16 width=16 src=\"images/G.gif\" alt=\"Gene info linked to <@label@>\">"

},

129

{

"GENE_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">associated gene details</span></div>"

},

131

{

"GENE_TERM"

,

"term=<@label@><@uid@>&"

},

133

{

"GENOME_DATA_VIEWER_NUC"

,

"<span class=\"adNew\">New</span><a href=\"https://www.ncbi.nlm.nih.gov/genome/gdv/browser/?context=blast&id=<@label@>&alignid=<@queryID@>&from=<@from@>&to=<@to@>&rid=<@rid@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

135

{

"GENOME_DATA_VIEWER_PROT"

,

"<span class=\"adNew\">New</span><a href=\"https://www.ncbi.nlm.nih.gov/genome/gdv/browser/?context=Protein&acc=<@label@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

137

{

"GENOME_DATA_VIEWER_TRANSCR"

,

"<span class=\"adNew\">New</span><a href=\"https://www.ncbi.nlm.nih.gov/genome/gdv/browser/?context=nucleotide&acc=<@label@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

139

{

"GENOME_DATA_VIEWER_IMG"

,

"<div class=\"gdv\">V</div>"

},

141

{

"GENOME_DATA_VIEWER_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">aligned genomic context</span></div>"

},

143

{

"GEO"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/geoprofiles/?term=genbank[Platform+Reporter+Type]+AND+<@label@>[Reporter+Identifier]&RID=<@rid@>&log$=geo<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

145

{

"GEO_IMG"

,

"<img border=0 height=16 width=16 src=\"images/E.gif\" alt=\"GEO profiles info linked to <@label@>\">"

},

147

{

"GEO_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">microarray expression data</span></div>"

},

149

{

"MAPVIEWER"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/mapview/map_search.cgi?direct=on&gbgi=<@gi@>&THE_BLAST_RID=<@rid@>&log$=map<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

151

{

"MAPVIEWER_GENOME"

,

"<a href=\"<@user_url@>&db=<@db@>&na=<@is_na@>&gnl=<@gnl@>&gi=<@gi@>&term=<@gi@>[gi]&taxid=<@taxid@>&RID=<@rid@>&QUERY_NUMBER=<@query_number@>&log$=nucl<@log@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

153

{

"MAPVIEWER_IMG"

,

"<img border=0 height=16 width=16 src=\"images/M.gif\" alt=\"Genome view with mapviewer linked to <@label@>\">"

},

155

{

"MAPVIEWER_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">aligned genomic context</span></div>"

},

157

{

"REPR_MICROBIAL_GENOMES"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/genome?term=<@label@>[<@uid@>]&RID=<@rid@>&log$=map<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

159

{

"REPR_MICROBIAL_GENOMES_IMG"

,

"<img border=0 height=16 width=16 src=\"images/L.gif\" alt=\"View genome information for <@label@>\">"

},

161

{

"REPR_MICROBIAL_GENOMES_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">Genomic Sequence</span></div>"

},

163

{

"STRUCTURE_URL"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?from=blast&blast_rep_id=<@label@>&query_id=<@queryID@>&command=view+annotations;set+annotation+cdd;set+annotation+site;set+view+detailed+view;select+chain+<@label@>;show+selection&log$=<@log@>&blast_rank=<@blast_rank@>&RID=<@rid@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

164

{

"STRUCTURE_SINGLE_CHAIN_URL"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?mmdbid=5FN2&command=select%20sets%20!<@chainID@>;%20show%20selection\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

166

{

"STRUCTURE_IMG"

,

"<img border=0 height=16 width=16 src=\"https://www.ncbi.nlm.nih.gov/Structure/cblast/str_link.gif\" alt=\"Structure related to <@label@>\">"

},

168

{

"STRUCTURE_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">3D structure displays</span></div>"

},

170

{

"STRUCTURE_ALPHA_FOLD"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?from=blast&blast_rep_id=<@label@>&query_id=<@queryID@>&command=view+annotations;set+annotation+cdd;set+annotation+site;set+view+detailed+view;select+chain+!A;show+selection&log$=<@log@>&blast_rank=<@blast_rank@>&RID=<@rid@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

171

{

"STRUCTURE_ALPHA_FOLD_NO_RID"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?from=blast&blast_rep_id=<@label@>&query_id=<@label@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a>"

},

173

{

"UNIGEN"

,

"<a class=\"gene\" term=\"<@uid@>\" href=\"https://www.ncbi.nlm.nih.gov/unigene/?<@termParam@>RID=<@rid@>&log$=unigene<@log@>&blast_rank=<@blast_rank@>\"<@lnkTitle@><@lnkTarget@>><@lnk_displ@></a><input type=\"hidden\" value=\"<@label@>\" />"

},

175

{

"UNIGEN_IMG"

,

"<img border=0 height=16 width=16 src=\"images/U.gif\" alt=\"UniGene info linked to <@label@>\">"

},

177

{

"UNIGEN_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">clustered expressed sequence tags</span></div>"

},

179

{

"BL2SEQ"

,

"<a href=\"blast.ncbi.nlm.nih.gov/Blast.cgi?QUERY=<@query@>&SUBJECTS=<@subject@>&PROGRAM=tblastx&EXPECT=10&CMD=request&SHOW_OVERVIEW=on&OLD_BLAST=false&NEW_VIEW=on\">Get TBLASTX alignments</a>"

},

181

{

"ENTREZ"

,

"<a title=\"Show report for <@acc@>\" <@cssInf@>href=\"https://www.ncbi.nlm.nih.gov/<@db@>/<@acc@>?report=genbank&log$=<@log@>&blast_rank=<@blast_rank@>&RID=<@rid@>\" <@target@>>"

},

183

{

"ENTREZ_SUBSEQ"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/<@db@>/<@gi@>?report=gbwithparts&from=<@from@>&to=<@to@>&RID=<@rid@>\">"

},

185

{

"STRUCTURE_OVW"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/Structure/cblast/cblast.cgi?blast_RID=%s&blast_rep_gi=%d&hit=%d&%s&blast_view=%s&hsp=0&taxname=%s&client=blast\">Related Structures</a>"

},

187

{

"TRACE"

,

"<a title=\"Show report for <@val@>\" <@cssInf@>href=\"https://www.ncbi.nlm.nih.gov/Traces/trace.cgi?cmd=retrieve&dopt=fasta&val=<@val@>&RID=<@rid@>\">"

},

189

{

"CUSTOM_LINK_TEMPLATE"

,

"<a href=\"<@custom_url@>\" class=\"<@custom_cls@>\" target=\"<@custom_trg@>\" title=\"<@custom_title@>\"><@custom_lnk_displ@></a>"

},

191

{

"CUSTOM_LINK_TITLE"

,

"Show <@custom_report_type@> report for <@seqid@>"

},

193

{

"GENERIC_LINK_TEMPLATE"

,

"<a title=\"Show report for <@seqid@>\" href=\"<@url@>\" ><@seqid@></a>"

},

195

{

"GENERIC_LINK_MOUSE_OVER"

,

"<span class=\"jig-ncbipopper\" data-jigconfig=\"destText:'<@defline@>'\"><a onclick=\"window.open(this.href,'<@target@>')\" href=\"<@url@>\" ><@seqid@></a></span>"

},

197

{

"DOWNLOAD_LINK"

,

"<a href=\"<@download_url@>&segs=<@segs@>\"><@lnk_displ@></a>"

},

199

{

"DOWNLOAD_LINK_IMG"

,

"<img border=0 height=16 width=16 src=\"images/D.gif\" alt=\"Download subject sequence <@label@> spanning the HSP\">"

},

201

{

"IDENTICAL_PROTEINS_URL"

,

"<a href=\"https://www.ncbi.nlm.nih.gov/ipg/<@label@>\" title=\"View proteins identical to <@label@>\" <@lnkTarget@>><@lnk_displ@></a>"

},

203

{

"IDENTICAL_PROTEINS_DISPL"

,

"<div><@lnk@>-<span class=\"rlLink\">Identical proteins to <@label@></span></div>"

},

210

{

"CLASS_INFO"

,

"class=\"info\""

},

212

{

"LINKOUT_ORDER"

,

"G,U,E,S,B,R,M,V,T"

},

214

{

"SEQVIEW_COMMON_PARAMS"

,

"<@seqViewerParams@>&v=<@from@>:<@to@>&appname=ncbiblast&link_loc=<@link_loc@>"

},

216

{

"SEQVIEW_PARAMS"

,

"tracks=[key:sequence_track,name:Sequence,display_name:Sequence,id:STD1,category:Sequence,annots:Sequence,ShowLabel:true][key:gene_model_track,CDSProductFeats:false][key:alignment_track,name:other alignments,annots:NG Alignments|Refseq Alignments|Gnomon Alignments|Unnamed,shown:false]"

},

229 template

<

class

container>

bool 236

list<TGi>& use_this_gi,

237  int

& comp_adj_method)

239  const string

k_GiPrefix =

"gi:"

;

240  bool

hasScore =

false

;

241  ITERATE

(

typename

container, iter, scoreList) {

244  if

(

id

.GetStr()==

"score"

){

245

score = (*iter)->GetValue().GetInt();

246

}

else if

(

id

.GetStr()==

"bit_score"

){

247

bits = (*iter)->GetValue().GetReal();

248

}

else if

(

id

.GetStr()==

"e_value"

||

id

.GetStr()==

"sum_e"

) {

249

evalue = (*iter)->GetValue().GetReal();

251

}

else if

(

id

.GetStr()==

"use_this_gi"

){

252  Uint4

gi_v = (

Uint4

)((*iter)->GetValue().GetInt());

254

}

else if

(

id

.GetStr()==

"sum_n"

){

255

sum_n = (*iter)->GetValue().GetInt();

256

}

else if

(

id

.GetStr()==

"num_ident"

){

257

num_ident = (*iter)->GetValue().GetInt();

258

}

else if

(

id

.GetStr()==

"comp_adjustment_method"

) {

259

comp_adj_method = (*iter)->GetValue().GetInt();

262  string

strGi =

NStr::Replace

(

id

.GetStr(),k_GiPrefix,

""

);

263  TGi

gi = NStr::StringToNumeric<TGi>(strGi);

264

use_this_gi.push_back(gi);

282

list<string> string_l;

289

list<string>::iterator iter = string_l.begin();

290  while

(iter != string_l.end())

303  string

errsevmsg[] = {

"UNKNOWN"

,

"INFO"

,

"WARNING"

,

"ERROR"

,

308  if

(iter->level > 5){

312  if

(iter->level == 4){

315

iter->level = iter->level;

321  out

<< errsevmsg[iter->level] <<

": "

<< iter->message <<

"\n"

;

330

vector<string> split_line;

332  ITERATE

(vector<string>, iter, split_line) {

342 static bool

s_FillDbInfoRemotely(

const string

&

dbname

,

347

blastdb->SetName(

dbname

);

348

blastdb->SetType() =

info

.is_protein

357  info

.definition = dbinfo->GetDescription();

358  if

(

info

.definition.empty())

362  info

.total_length = dbinfo->GetTotal_length();

363  info

.number_seqs =

static_cast<int>

(dbinfo->GetNum_sequences());

378  int

dbfilt_algorithm)

387  if

(

info

.definition.empty())

394  info

.filt_algorithm_name.clear();

395  info

.filt_algorithm_options.clear();

396  if

(dbfilt_algorithm == -1) {

400 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 401  (!defined(NCBI_COMPILER_MIPSPRO)) ) 402  string

filtering_algorithm;

405  info

.filt_algorithm_name,

406  info

.filt_algorithm_options);

413  bool

is_protein,

int

numSeqs,

Int8

numLetters,

string

&

tag

)

417  info

.is_protein = is_protein;

419  info

.definition =

string

(

"User specified sequence set."

);

422  info

.definition =

string

(

"User specified sequence set "

) +

425  info

.number_seqs = numSeqs;

426  info

.total_length = numLetters;

427

retval.push_back(

info

);

432  const string

& blastdb_names,

bool

is_protein,

433  int

dbfilt_algorithm

,

438  bool

found_all =

false

;

440

vector<string> missing_names;

441

vector< CRef<objects::CBlast4_database_info> > all_db_info =

442

rmt_blast_services.

GetDatabaseInfo

(blastdb_names,is_protein,&found_all,&missing_names);

443  if

( !missing_names.empty() ){

445  for

(

size_t

ndx=0 ; ndx < missing_names.size(); ndx++){

446  msg

+= missing_names[ndx];

448  msg

+=

string

(

"' not found on NCBI servers.\n"

);

451  for

(

size_t

ndx=0 ; ndx < all_db_info.size(); ndx++){

453

objects::CBlast4_database_info &dbinfo = *all_db_info[ndx];

454  info

.name = dbinfo.GetDatabase().GetName();

455  info

.definition = dbinfo.GetDescription();

456  if

(

info

.definition.empty())

460  info

.total_length = dbinfo.GetTotal_length();

461  info

.number_seqs =

static_cast<int>

(dbinfo.GetNum_sequences());

462  if

(

info

.total_length < 0) {

467  msg

+=

string

(

"' has bad total length on NCBI servers.\n"

);

471

retval.push_back(

info

);

476

vector<CTempString> dbs;

478

retval.reserve(dbs.size());

480  ITERATE

(vector<CTempString>,

i

, dbs) {

482  info

.is_protein = is_protein;

483  bool

success =

false

;

492

retval.push_back(

info

);

497  msg

+=

string

(

"' not found on NCBI servers.\n"

);

513  out

<<

"Database: "

;

519  for

(

size_t i

= 1;

i

< dbinfo_list.size();

i

++) {

520

db_titles +=

"; "

+ dbinfo_list[

i

].definition;

521

tot_num_seqs +=

static_cast<Int8>

(dbinfo_list[

i

].number_seqs);

522

tot_length += dbinfo_list[

i

].total_length;

537  " total letters\n\n"

;

541  ITERATE

(vector<SDbInfo>, dbinfo, dbinfo_list) {

542  if

(dbinfo->subset ==

false

) {

543  out

<<

" Database: "

;

546  if

( !dbinfo->filt_algorithm_name.empty() ) {

547  out

<<

" Masked using: '"

<< dbinfo->filt_algorithm_name <<

"'"

;

548  if

( !dbinfo->filt_algorithm_options.empty() ) {

549  out

<<

", options: '"

<< dbinfo->filt_algorithm_options <<

"'"

;

554  out

<<

" Posted date: "

;

555  out

<< dbinfo->date <<

"\n"

;

557  out

<<

" Number of letters in database: "

;

560  out

<<

" Number of sequences in database: "

;

565  out

<<

" Subset of the database(s) listed below"

<<

"\n"

;

566  out

<<

" Number of letters searched: "

;

569  out

<<

" Number of sequences searched: "

;

586  out

<<

"Gapped"

<<

"\n"

;

588  out

<<

"Lambda K H"

;

591  out

<<

" a alpha sigma"

;

599

sprintf(

buffer

,

"%#8.3g "

, k);

601

sprintf(

buffer

,

"%#8.3g "

, h);

605

sprintf(

buffer

,

"%#8.3g "

, gbp->

a

);

638  bool

use_long_seqids =

false

;

642

use_long_seqids = (

registry

.

Get

(

"BLAST"

,

"LONG_SEQID"

) ==

"1"

);

644  if

(!use_long_seqids) {

677  if

((*iter)->IsTitle()) {

678

all_descr_str += (*iter)->GetTitle();

682  return

all_descr_str;

693  const string label

(

"Query"

);

696  label

, tabular, rid);

707  const string label

(

"Subject"

);

719  const string

&

label

,

726

}

else if

(tabular) {

750  out

<<

"\n"

<<

"# RID: "

<< rid;

752  out

<<

"\n"

<<

"RID: "

<< rid <<

"\n"

;

758  const string

& pattern,

763  out

<< num_patterns <<

" occurrence(s) of pattern: "

<<

"\n" 764

<< pattern <<

" at position(s) "

;

767  for

(vector<int>::iterator it =

offsets

.begin();

777  out

<<

" of query sequence"

<<

"\n"

;

778  out

<<

"pattern probability="

<<

prob

<<

"\n"

;

788

list<TGi>& use_this_gi)

790  int

comp_adj_method = 0;

793

num_ident, use_this_gi, comp_adj_method);

802

list<string>& use_this_seq)

804  int

comp_adj_method = 0;

807

num_ident, use_this_seq, comp_adj_method);

817

list<TGi>& use_this_gi,

818  int

& comp_adj_method)

820  bool

hasScore =

false

;

830

sum_n, num_ident, use_this_gi, comp_adj_method);

837

score, bits, evalue, sum_n, num_ident, use_this_gi, comp_adj_method);

840

score, bits, evalue, sum_n, num_ident, use_this_gi, comp_adj_method);

843

score, bits, evalue, sum_n, num_ident, use_this_gi, comp_adj_method);

846  if

(use_this_gi.size() == 0) {

854  const string

k_GiPrefix =

"gi:"

;

855

list<string> use_this_seq;

856  ITERATE

(list<TGi>, iter_gi, use_this_gi){

858

use_this_seq.push_back(strSeq);

869

list<string>& use_this_seq,

870  int

& comp_adj_method)

872  bool

hasScore =

false

;

880

list<TGi> use_this_gi;

883

sum_n, num_ident, use_this_gi, comp_adj_method);

890

score, bits, evalue, sum_n, num_ident, use_this_gi, comp_adj_method);

893

score, bits, evalue, sum_n, num_ident, use_this_gi, comp_adj_method);

896

score, bits, evalue, sum_n, num_ident, use_this_gi, comp_adj_method);

899  if

(use_this_gi.size() == 0) {

923  const CDbtag

& dtg =

id

->GetGeneral();

927

retval =

id

->GetSeqIdString(with_version);

942  double

total_bit_score,

945  string

& bit_score_str,

946  string

& total_bit_score_str,

947  string

& raw_score_str)

949  char

evalue_buf[100], bit_score_buf[100], total_bit_score_buf[100];

952  static string

kBitScoreFormat(

"%4.1lf"

);

953 #ifdef CTOOLKIT_COMPATIBLE 954  static bool

ctoolkit_compatible =

false

;

955  static bool

value_set =

false

;

957  if

(getenv(

"CTOOLKIT_COMPATIBLE"

)) {

958

kBitScoreFormat.assign(

"%4.0lf"

);

959

ctoolkit_compatible =

true

;

965  if

(evalue < 1.0e-180) {

966

snprintf(evalue_buf,

sizeof

(evalue_buf),

"0.0"

);

967

}

else if

(evalue < 1.0e-99) {

968

snprintf(evalue_buf,

sizeof

(evalue_buf),

"%2.0le"

, evalue);

969 #ifdef CTOOLKIT_COMPATIBLE 970  if

(ctoolkit_compatible) {

971

strncpy(evalue_buf, evalue_buf+1,

sizeof

(evalue_buf-1));

974

}

else if

(evalue < 0.0009) {

975

snprintf(evalue_buf,

sizeof

(evalue_buf),

"%3.0le"

, evalue);

976

}

else if

(evalue < 0.1) {

977

snprintf(evalue_buf,

sizeof

(evalue_buf),

"%4.3lf"

, evalue);

978

}

else if

(evalue < 1.0) {

979

snprintf(evalue_buf,

sizeof

(evalue_buf),

"%3.2lf"

, evalue);

980

}

else if

(evalue < 10.0) {

981

snprintf(evalue_buf,

sizeof

(evalue_buf),

"%2.1lf"

, evalue);

983

snprintf(evalue_buf,

sizeof

(evalue_buf),

"%2.0lf"

, evalue);

986  if

(bit_score > 99999){

987

snprintf(bit_score_buf,

sizeof

(bit_score_buf),

"%5.3le"

, bit_score);

988

}

else if

(bit_score > 99.9){

989

snprintf(bit_score_buf,

sizeof

(bit_score_buf),

"%3.0ld"

,

992

snprintf(bit_score_buf,

sizeof

(bit_score_buf), kBitScoreFormat.c_str(),

995  if

(total_bit_score > 99999){

996

snprintf(total_bit_score_buf,

sizeof

(total_bit_score_buf),

"%5.3le"

,

998

}

else if

(total_bit_score > 99.9){

999

snprintf(total_bit_score_buf,

sizeof

(total_bit_score_buf),

"%3.0ld"

,

1000

(

long

)total_bit_score);

1002

snprintf(total_bit_score_buf,

sizeof

(total_bit_score_buf),

"%2.1lf"

,

1005

evalue_str = evalue_buf;

1006

bit_score_str = bit_score_buf;

1007

total_bit_score_str = total_bit_score_buf;

1019  bool

is_first_aln =

true

;

1020  unsigned int

num_align = 0;

1023  if

((*iter)->GetSegs().IsDisc()) {

1026

subid = &((*iter)->GetSeq_id(1));

1027  if

(is_first_aln || (!is_first_aln && !subid->

Match

(*previous_id))){

1031  if

(num_align >

number

) {

1035

is_first_aln =

false

;

1036

previous_id = subid;

1038

new_aln.

Set

().push_back(*iter);

1047  bool

is_first_aln =

true

;

1048  unsigned int

num_align = 0;

1051  if

((*iter)->GetSegs().IsDisc()) {

1054

subid = &((*iter)->GetSeq_id(1));

1055  if

(is_first_aln || (!is_first_aln && !subid->

Match

(*previous_id))){

1059  if

(num_align >=

number

) {

1063

is_first_aln =

false

;

1064

previous_id = subid;

1076  bool

is_first_aln =

true

;

1077  unsigned int

num_align = 0;

1078  bool

finishCurrent =

false

;

1080  if

((*iter)->GetSegs().IsDisc()) {

1083

subid = &((*iter)->GetSeq_id(1));

1084  if

(is_first_aln || (!is_first_aln && !subid->

Match

(*previous_id))){

1085

finishCurrent = (num_align + 1 ==

number

) ?

true

:

false

;

1088

is_first_aln =

false

;

1089

previous_id = subid;

1091  if

(num_align >

number

&& !finishCurrent) {

1094

new_aln.

Set

().push_back(*iter);

1101  int

& num_gaps,

int

& num_gap_opens)

1103

num_gaps = num_gap_opens = align_length = 0;

1108  for

(

int i

=0;

i

<chunk_vec->size();

i

++) {

1110  int

chunk_length = chunk->GetAlnRange().GetLength();

1113  if

(chunk->IsGap()) {

1115

num_gaps += chunk_length;

1119

align_length += chunk_length;

1130  for

(CSeq_align_set::Tdata::const_iterator iter =

source

.Get().begin();

1131

iter !=

source

.Get().end(); iter++) {

1132  if

((*iter)->IsSetSegs()){

1136  for

(CSeq_align_set::Tdata::const_iterator iter2 =

1139

target.

Set

().push_back(*iter2);

1142

target.

Set

().push_back(*iter);

1177  if

((*iter)->IsSetDim()){

1178

ds.

SetDim

((*iter)->GetDim());

1180  if

((*iter)->IsSetIds()){

1181

ds.

SetIds

() = (*iter)->GetIds();

1185  if

((*iter)->IsSetStarts()){

1187

ds.

SetStarts

().push_back(*iterStarts);

1190  if

((*iter)->IsSetLen()){

1191

ds.

SetLens

().push_back((*iter)->GetLen());

1193  if

((*iter)->IsSetStrands()){

1198  if

((*iter)->IsSetScores()){

1200

ds.

SetScores

().push_back(*iterScores);

1221  if

(bdl_id && bdl_id->

Match

(

id

) &&

1222

(*iter_bdl)->IsSetTaxid() && (*iter_bdl)->CanGetTaxid()){

1223

taxid = (*iter_bdl)->GetTaxid();

1238

frame = (start % 3) + 1;

1265  int

score1, sum_n1, num_ident1;

1266  double

bits1, evalue1;

1267

list<TGi> use_this_gi1;

1269  int

score2, sum_n2, num_ident2;

1270  double

bits2, evalue2;

1271

list<TGi> use_this_gi2;

1274  GetAlnScores

(*info1, score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1275  GetAlnScores

(*info2, score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1279  bool

retval =

false

;

1282  if

(length1 > 0 && length2 > 0 && num_ident1 > 0 &&num_ident2 > 0 ) {

1283  if

(((

double

)num_ident1)/length1 == ((

double

)num_ident2)/length2) {

1285

retval = evalue1 < evalue2;

1288

retval = ((double)num_ident1)/length1 >= ((double)num_ident2)/length2;

1292

retval = evalue1 < evalue2;

1307  int

score1, sum_n1, num_ident1;

1308  double

bits1, evalue1;

1309

list<TGi> use_this_gi1;

1311  int

score2, sum_n2, num_ident2;

1312  double

bits2, evalue2;

1313

list<TGi> use_this_gi2;

1315  GetAlnScores

(*(info1->

Get

().front()), score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1316  GetAlnScores

(*(info2->

Get

().front()), score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1317  return

bits1 > bits2;

1326  bool

retval =

false

;

1329

retval = cov1 > cov2;

1330

}

else if

(cov1 == cov2) {

1331  int

score1, sum_n1, num_ident1;

1332  double

bits1, evalue1;

1333

list<TGi> use_this_gi1;

1335  int

score2, sum_n2, num_ident2;

1336  double

bits2, evalue2;

1337

list<TGi> use_this_gi2;

1338  GetAlnScores

(*(info1->

Get

().front()), score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1339  GetAlnScores

(*(info2->

Get

().front()), score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1340

retval = evalue1 < evalue2;

1349  int

start1 = 0, start2 = 0;

1356

start1 =

min

(info1->

Get

().front()->GetSeqStart(0),

1357

info1->

Get

().front()->GetSeqStop(0));

1358

start2 =

min

(info2->

Get

().front()->GetSeqStart(0),

1359

info2->

Get

().front()->GetSeqStop(0));

1361  if

(start1 == start2) {

1363  int

score1, sum_n1, num_ident1;

1364  double

bits1, evalue1;

1365

list<TGi> use_this_gi1;

1367  int

score2, sum_n2, num_ident2;

1368  double

bits2, evalue2;

1369

list<TGi> use_this_gi2;

1372  GetAlnScores

(*(info1->

Get

().front()), score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1373  GetAlnScores

(*(info1->

Get

().front()), score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1374  return

evalue1 < evalue2;

1377  return

start1 < start2;

1387  int

score1, sum_n1, num_ident1;

1388  double

bits1, evalue1;

1389

list<TGi> use_this_gi1;

1391  int

score2, sum_n2, num_ident2;

1392  double

bits2, evalue2;

1393

list<TGi> use_this_gi2;

1396  GetAlnScores

(*info1, score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1397  GetAlnScores

(*info2, score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1398  return

bits1 > bits2;

1406  int

start1 = 0, start2 = 0;

1411  if

(start1 == start2) {

1413  int

score1, sum_n1, num_ident1;

1414  double

bits1, evalue1;

1415

list<TGi> use_this_gi1;

1417  int

score2, sum_n2, num_ident2;

1418  double

bits2, evalue2;

1419

list<TGi> use_this_gi2;

1422  GetAlnScores

(*info1, score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1423  GetAlnScores

(*info2, score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1424  return

evalue1 < evalue2;

1428  return

start1 < start2;

1436  int

start1 = 0, start2 = 0;

1441  if

(start1 == start2) {

1443  int

score1, sum_n1, num_ident1;

1444  double

bits1, evalue1;

1445

list<TGi> use_this_gi1;

1447  int

score2, sum_n2, num_ident2;

1448  double

bits2, evalue2;

1449

list<TGi> use_this_gi2;

1452  GetAlnScores

(*info1, score1, bits1, evalue1, sum_n1, num_ident1, use_this_gi1);

1453  GetAlnScores

(*info2, score2, bits2, evalue2, sum_n2, num_ident2, use_this_gi2);

1454  return

evalue1 < evalue2;

1458  return

start1 < start2;

1475  if

(do_translation) {

1478

final_aln = denseg_aln;

1494  bool

do_translation) {

1495  double

identity = 0;

1506  if

(do_translation) {

1509

final_aln = denseg_aln;

1523

alnvec.GetWholeAlnSeqString(0,

query

);

1524

alnvec.GetWholeAlnSeqString(1,

subject

);

1529  for

(

int i

= 0;

i

< length; ++

i

) {

1536

identity = ((double)num_ident)/length;

1545  double

&percentIdent1,

1546  double

&percentIdent2)

1575  double

evalue1 = seqSetInfo1->evalue;

1576  double

evalue2 = seqSetInfo2->evalue;

1577  double

percentIdent1 = seqSetInfo1->percent_identity;

1578  double

percentIdent2 = seqSetInfo2->percent_identity;

1580  bool

retval =

false

;

1581  if

(percentIdent1 < 0 || percentIdent2 < 0) {

1584  if

(percentIdent1 > 0 &&percentIdent2 > 0) {

1585  if

(percentIdent1 == percentIdent2) {

1586

retval = evalue1 < evalue2;

1589

retval = percentIdent1 >= percentIdent2;

1592

retval = evalue1 < evalue2;

1600  int

score1, score2, sum_n, num_ident;

1601  double

bits, evalue;

1602

list<TGi> use_this_gi;

1603  double

total_bits1 = 0, total_bits2 = 0;

1607

sum_n, num_ident, use_this_gi);

1608

total_bits1 += bits;

1613

sum_n, num_ident, use_this_gi);

1614

total_bits2 += bits;

1618  return

total_bits1 >= total_bits2;

1622 #ifndef NCBI_COMPILER_WORKSHOP 1631  const string

& mv_build_name)

1637

id1 = &(info1->

Get

().front()->GetSeq_id(1));

1638

id2 = &(info2->

Get

().front()->GetSeq_id(1));

1640  int

linkout1 = 0, linkout2 = 0;

1659  const string

& mv_build_name)

1663 #ifndef NCBI_COMPILER_WORKSHOP 1669  bool

do_translation,

CScope

& scope,

int 1671  const string

& mv_build_name)

1676  if

(sort_method == 1) {

1677 #ifndef NCBI_COMPILER_WORKSHOP 1681

}

else if

(sort_method == 2) {

1683

}

else if

(sort_method == 3) {

1695  const string

& mv_build_name)

1699  int

linkoutPrev = 0;

1702  const CSeq_id

&

id

= (*iter)->GetSeq_id(1);

1707  if

(prevSubjectId.

Empty

() || !

id

.Match(*prevSubjectId)){

1708

prevSubjectId = &id;

1709

linkout = linkoutdb ? linkoutdb->

GetLinkout

(

id

, mv_build_name): 0;

1710

linkoutPrev = linkout;

1714

linkout = linkoutPrev;

1717  if

(sort_method == 1) {

1718

target[1]->Set().push_back(*iter);

1719

}

else if

(sort_method == 2){

1720

target[0]->Set().push_back(*iter);

1722

target[1]->Set().push_back(*iter);

1725  if

(sort_method == 1) {

1726

target[0]->Set().push_back(*iter);

1727

}

else if

(sort_method == 2) {

1728

target[1]->Set().push_back(*iter);

1730

target[0]->Set().push_back(*iter);

1734

target[0]->Set().push_back(*iter);

1738

target[0]->Set().push_back(*iter);

1750  const CSeq_id

& cur_id = (*iter)->GetSeq_id(1);

1751  if

(previous_id.

Empty

()) {

1753

temp->

Set

().push_back(*iter);

1754

target.push_back(temp);

1755

}

else if

(cur_id.

Match

(*previous_id)){

1756

temp->

Set

().push_back(*iter);

1760

temp->

Set

().push_back(*iter);

1761

target.push_back(temp);

1763

previous_id = &cur_id;

1778

align_set->

Set

().push_back(*iter2);

1792  for

(

size_t i

= 0;

i

< seqIdList.size();

i

++) {

1798  const CSeq_id

& cur_id = (*iter)->GetSeq_id(1);

1799  if

(previous_id.

Empty

() || !cur_id.

Match

(*previous_id)) {

1800  if

(

count

>= seqIdList.size()) {

1804  if

(hitsMap.

find

(idString) != hitsMap.

end

()) {

1806

temp->

Set

().push_back(*iter);

1807

hitsMap[idString] = temp;

1814  else if

(cur_id.

Match

(*previous_id)){

1815  if

(!temp.

Empty

()) {

1816

temp->

Set

().push_back(*iter);

1819

previous_id = &cur_id;

1826

vector <string> seqIds;

1834

list< CRef<CSeq_align_set> > orderedSet;

1836  for

(

size_t i

= 0;

i

< seqIds.size();

i

++) {

1837  if

(hitsMap.

find

(seqIds[

i

]) != hitsMap.

end

()) {

1838

orderedSet.push_back(hitsMap[seqIds[

i

]]);

1847  bool

success =

false

;

1851  if

(!seqId.

Empty

())

1860  if

(!strTag.empty())

1862

vector<string> vecInfo;

1872  if

(vecInfo.size() != 3)

1877

strRun = vecInfo[0];

1878

strSpotId = vecInfo[1];

1879

strReadIndex = vecInfo[2];

1889  string

strRun, strSpotId,strReadIndex;

1896

link +=

"?run="

+ strRun;

1897

link +=

"."

+ strSpotId;

1898

link +=

"."

+ strReadIndex;

1911  if

(!id_general.

Empty

() && id_general->

AsFastaString

().find(

"gnl|BL_ORD_ID"

) != string::npos){

1916  if

(id_general.

Empty

()){

1918  if

(id_other.

Empty

()){

1919

bestid = id_accession;

1922

bestid = id_general;

1933  bool

db_is_na,

string

rid,

int

query_number,

1934  bool

for_alignment) {

1939  if

(!id_general.

Empty

()

1940

&& id_general->

AsFastaString

().find(

"gnl|BL_ORD_ID"

) != string::npos){

1948  bool

nodb_path =

false

;

1950  if

(user_url.find(

"dumpgnl.cgi"

) ==string::npos){

1955  char

*chptr, *dbtmp;

1957  char

*

dbname

=

new char

[

sizeof

(char)*length + 2];

1961

dbtmp =

new char

[

sizeof

(char)*length + 2];

1962

memset(dbtmp,

'\0'

,

sizeof

(

char

)*length + 2);

1963  for

(

i

= 0;

i

< length;

i

++) {

1971  while

(!

isspace

((

unsigned char

)

dbname

[

i

]) && j < 256 &&

i

< length) {

1979  if

((chptr = strrchr(tmpbuff,

'/'

)) !=

NULL

) {

1980  strcat

(dbtmp, (

char

*)(chptr+1));

1991  if

(!bestID.empty()){

1992

strcpy(gnl, bestID.c_str());

2000  if

(user_url.find(

"?"

) == string::npos){

2001

link += user_url +

"?"

+

"db="

+

str

+

"&na="

+ (db_is_na?

"1"

:

"0"

);

2003  if

(user_url.find(

"="

) != string::npos) {

2006

link += user_url +

"db="

+

str

+

"&na="

+ (db_is_na?

"1"

:

"0"

);

2009  if

(gnl[0] !=

'\0'

){

2022

link +=

"&RID="

+ rid;

2025  if

(query_number > 0){

2029  if

(user_url.find(

"dumpgnl.cgi"

) ==string::npos){

2031

link +=

"&log$=nuclalign"

;

2033

link +=

"&log$=nucltop"

;

2060  value_type

(

"composition_based_statistics"

,

""

));

2066  bool

is_first =

true

;

2069  string

parameter = it->first;

2071  if

(parameters_to_change.count(

NStr::ToLower

(parameter)) > 0 ||

2072

parameters_to_change.count(

NStr::ToUpper

(parameter)) > 0) {

2081

it->first +

"="

+ parameters_to_change[it->first];

2088

cgi_query += it->first +

"="

+ it->second;

2098  string

format_type =

ctx

.GetRequestValue(

"FORMAT_TYPE"

).GetValue();

2099  string

ridstr =

ctx

.GetRequestValue(

"RID"

).GetValue();

2100  string

align_view =

ctx

.GetRequestValue(

"ALIGNMENT_VIEW"

).GetValue();

2102

cgi_query +=

"RID="

+ ridstr;

2103

cgi_query +=

"&FORMAT_TYPE="

+ format_type;

2104

cgi_query +=

"&ALIGNMENT_VIEW="

+ align_view;

2106

cgi_query +=

"&QUERY_NUMBER="

+

ctx

.GetRequestValue(

"QUERY_NUMBER"

).GetValue();

2107

cgi_query +=

"&FORMAT_OBJECT="

+

ctx

.GetRequestValue(

"FORMAT_OBJECT"

).GetValue();

2108

cgi_query +=

"&RUN_PSIBLAST="

+

ctx

.GetRequestValue(

"RUN_PSIBLAST"

).GetValue();

2109

cgi_query +=

"&I_THRESH="

+

ctx

.GetRequestValue(

"I_THRESH"

).GetValue();

2111

cgi_query +=

"&DESCRIPTIONS="

+

ctx

.GetRequestValue(

"DESCRIPTIONS"

).GetValue();

2113

cgi_query +=

"&ALIGNMENTS="

+

ctx

.GetRequestValue(

"ALIGNMENTS"

).GetValue();

2115

cgi_query +=

"&NUM_OVERVIEW="

+

ctx

.GetRequestValue(

"NUM_OVERVIEW"

).GetValue();

2117

cgi_query +=

"&NCBI_GI="

+

ctx

.GetRequestValue(

"NCBI_GI"

).GetValue();

2119

cgi_query +=

"&SHOW_OVERVIEW="

+

ctx

.GetRequestValue(

"SHOW_OVERVIEW"

).GetValue();

2121

cgi_query +=

"&SHOW_LINKOUT="

+

ctx

.GetRequestValue(

"SHOW_LINKOUT"

).GetValue();

2123

cgi_query +=

"&GET_SEQUENCE="

+

ctx

.GetRequestValue(

"GET_SEQUENCE"

).GetValue();

2125

cgi_query +=

"&MASK_CHAR="

+

ctx

.GetRequestValue(

"MASK_CHAR"

).GetValue();

2126

cgi_query +=

"&MASK_COLOR="

+

ctx

.GetRequestValue(

"MASK_COLOR"

).GetValue();

2128

cgi_query +=

"&SHOW_CDS_FEATURE="

+

ctx

.GetRequestValue(

"SHOW_CDS_FEATURE"

).GetValue();

2131

cgi_query +=

"&FORMAT_EQ_TEXT="

+

2133

GetRequestValue(

"FORMAT_EQ_TEXT"

).

2138

cgi_query +=

"&FORMAT_EQ_OP="

+

2140

GetRequestValue(

"FORMAT_EQ_OP"

).

2145

cgi_query +=

"&FORMAT_EQ_MENU="

+

2147

GetRequestValue(

"FORMAT_EQ_MENU"

).

2151

cgi_query +=

"&EXPECT_LOW="

+

ctx

.GetRequestValue(

"EXPECT_LOW"

).GetValue();

2152

cgi_query +=

"&EXPECT_HIGH="

+

ctx

.GetRequestValue(

"EXPECT_HIGH"

).GetValue();

2154

cgi_query +=

"&BL2SEQ_LINK="

+

ctx

.GetRequestValue(

"BL2SEQ_LINK"

).GetValue();

2161  const string

& mv_build_name)

2163  bool

is_mixed =

false

;

2164  bool

is_first =

true

;

2165  int

prev_database = 0;

2169  const CSeq_id

&

id

= (*iter)->GetSeq_id(1);

2170  int

linkout = linkoutdb

2171

? linkoutdb->

GetLinkout

(

id

, mv_build_name)

2174  if

(!is_first && cur_database != prev_database) {

2178

prev_database = cur_database;

2189  bool

formatAsMixedDbs =

false

;

2190  string

mixedDbs =

ctx

.GetRequestValue(

"MIXED_DATABASE"

).GetValue();

2191  if

(!mixedDbs.empty()) {

2193

formatAsMixedDbs = (mixedDbs ==

"on"

|| mixedDbs ==

"true"

|| mixedDbs ==

"yes"

) ?

true

:

false

;

2195  return

formatAsMixedDbs;

2205  string

lnk_tl_info =

""

,

2206  string

lnk_title =

""

)

2208  const string

kLinkTitle=

" title=\"View <@lnk_tl_info@> for <@label@>\" "

;

2209  const string

kLinkTarget=

"target=\"lnk"

+ rid +

"\""

;

2210  string

lnkTitle = (lnk_title.empty()) ? kLinkTitle : lnk_title;

2216  string

lnkTarget =

NStr::StartsWith

(lnk_displ,

"<img"

) ?

""

: kLinkTarget;

2232  bool

textLink =

true

)

2235

list<string> linkout_list;

2236  string

url_link,lnk_displ,lnk_title,lnkTitleInfo;

2238

vector<string> accs;

2240  string

firstAcc = (accs.size() > 0)? accs[0] : labelList;

2249

lnkTitleInfo =

"UniGene cluster"

;

2250  string

uid = !linkoutInfo.

is_na

?

"[Protein Accession]"

:

"[Nucleotide Accession]"

;

2258

linkout_list.push_back(url_link);

2267

linkTitle =

" title=\"View 3D structure <@label@>\""

;

2272

linkTitle =

" title=\"View AlphaFold 3D structure <@label@>\""

;

2277  string

molID,chainID;

2287

linkout_list.push_back(url_link);

2289  if

(linkout &

eGeo

){

2293

lnkTitleInfo =

"Expression profiles"

;

2302

linkout_list.push_back(url_link);

2304  if

(linkout &

eGene

){

2307

lnk_displ =

"Gene"

;

2308

lnkTitleInfo =

"gene information"

;

2316  string

uid = !linkoutInfo.

is_na

?

"[Protein Accession]"

:

"[Nucleotide Accession]"

;

2325

linkout_list.push_back(url_link);

2331

lnk_displ =

"Map Viewer"

;

2333

lnkTitleInfo =

"BLAST hits on the "

+ linkoutInfo.

taxName

+

" genome"

;

2339  string

user_url = (linkoutInfo.

user_url

.empty()) ? mapviewBlastHitUrl : linkoutInfo.

user_url

;

2355

linkout_list.push_back(url_link);

2362  string

linkTitle =

" title=\"View <@label@> aligned to the "

+ linkoutInfo.

taxName

+

" genome\""

;

2369

linkout_list.push_back(url_link);

2376  string

linkTitle =

" title=\"View Bioassays involving <@label@>\""

;

2378

giList =

NStr::Replace

(giList,

","

,

"[RNATargetGI] OR "

);

2385

linkout_list.push_back(url_link);

2391

lnkTitleInfo =

"Bioassay data"

;

2392  string

linkTitle =

" title=\"View Bioassays involving <@label@>\""

;

2401

linkout_list.push_back(url_link);

2407

lnkTitleInfo =

"genomic information"

;

2409  string

uid = !linkoutInfo.

is_na

?

"Protein Accession"

:

"Nucleotide Accession"

;

2417

linkout_list.push_back(url_link);

2423

urlTag =

"GENOME_DATA_VIEWER_TRANSCR"

;

2424

lnkTitleInfo =

"title=\"View the annotation of the transcript <@label@> within a genomic context in NCBI's Genome Data Viewer (GDV)- genome browser for RefSeq annotated assemblies. See other genomic features annotated at the same location as the protein annotation and browse to other regions.\""

;

2427

urlTag = linkoutInfo.

is_na

?

"GENOME_DATA_VIEWER_NUC"

:

"GENOME_DATA_VIEWER_PROT"

;

2428

lnkTitleInfo = linkoutInfo.

is_na

?

2429  "title=\"View BLAST hits for <@label@> within a genomic context in NCBI's Genome Data Viewer (GDV)- genome browser for RefSeq annotated assemblies. See other genomic features annotated at the same location as hits and browse to other regions.\"" 2431  "title=\"View the annotation of the protein <@label@> within a genomic context in NCBI's Genome Data Viewer (GDV)- genome browser for RefSeq annotated assemblies. See other genomic features annotated at the same location as the protein annotation and browse to other regions.\""

;

2439

seqFrom = (seqFrom == 0) ? seqFrom : seqFrom - 1;

2442

seqTo = (seqTo == 0) ? seqTo : seqTo - 1;

2451

linkout_list.push_back(url_link);

2453  return

linkout_list;

2459  const string

& cdd_rid,

2460  const string

& entrez_term,

2463  bool

structure_linkout_as_group,

2464  bool

for_alignment,

int

cur_align,

2465  string

preComputedResID)

2468

list<string> linkout_list;

2474

first_gi = (first_gi ==

ZERO_GI

) ? gi : first_gi;

2479

linkoutInfo.

Init

(rid,

2488

structure_linkout_as_group,

2501  return

linkout_list;

2507  if

(linkLetter ==

"U"

) {

2510  else if

(linkLetter ==

"S"

) {

2513  else if

(linkLetter ==

"E"

) {

2516  else if

(linkLetter ==

"G"

) {

2519  else if

(linkLetter ==

"M"

) {

2522  else if

(linkLetter ==

"N"

) {

2525  else if

(linkLetter ==

"B"

) {

2528  else if

(linkLetter ==

"R"

) {

2531  else if

(linkLetter ==

"V"

) {

2534  else if

(linkLetter ==

"T"

) {

2544  if

(linkout_map.count(linkout) > 0){

2545

linkout_map[linkout].push_back(cur_id);

2548

vector <CBioseq::TId > idList;

2549

idList.push_back(cur_id);

2550

linkout_map.

insert

(

map

<

int

, vector <CBioseq::TId > >::

value_type

(linkout,idList));

2556  const string

& mv_build_name,

2567

linkout = (*linkoutdb)->GetLinkout(gi, mv_build_name);

2571

linkout = (*linkoutdb)->GetLinkout(*seqID, mv_build_name);

2574  int

linkoutWithoutVersion = (*linkoutdb)->GetLinkout(*seqIDNew, mv_build_name);

2575  if

(linkoutWithoutVersion && (linkoutWithoutVersion |

eStructure

)) {

2576

linkout = linkout | linkoutWithoutVersion;

2582

cerr <<

"[BLAST FORMATTER EXCEPTION] Problem with linkoutdb: "

<< e.

GetMsg

() << endl;

2591  map

<

int

, vector <CBioseq::TId > > &linkout_map,

2593  const string

& mv_build_name)

2595  if

(!linkoutdb)

return

;

2601  if

(linkout &

eGene

){

2607  if

(linkout &

eGeo

){

2638  map

<

int

, vector <CBioseq::TId > > &linkout_map,

2640  const string

& mv_build_name)

2642  const int

kMaxDeflineNum = 10;

2645

iter != bdl.end(); iter++){

2653  if

(num > kMaxDeflineNum)

break

;

2664

taxName =

info

.common_name;

2678

list<string> &linkout_list)

2688  string

lnk_displ =

"Identical Proteins"

;

2693

linkout_list.push_back(url_link);

2702  map

<

int

, vector < CBioseq::TId > > &linkout_map,

2703  bool

getIdentProteins)

2706

list<string> linkout_list;

2708

vector<string> linkLetters;

2710  for

(

size_t i

= 0;

i

< linkLetters.size();

i

++) {

2712

vector < CBioseq::TId > idList;

2714

linkoutInfo.

taxName

.clear();

2719  if

(linkout_map.

find

(linkout) != linkout_map.

end

()) {

2720

idList = linkout_map[linkout];

2723  bool

disableLink = (linkout == 0 || idList.size() == 0);

2726  string

giList,labelList;

2728  for

(

size_t i

= 0;

i

< idList.size();

i

++) {

2731  if

(first_gi ==

ZERO_GI

) first_gi = gi;

2736  if

(!labelList.empty()) labelList +=

","

;

2737

labelList +=

label

;

2740  if

(!giList.empty() && (linkout &

eBioAssay

) && !linkoutInfo.

is_na

)

continue

;

2741  if

(!giList.empty()) giList +=

","

;

2745

linkoutInfo.

gnl

.clear();

2757  if

(one_linkout.size() > 0) {

2758

list<string>::iterator iter = one_linkout.begin();

2759

linkout_list.push_back(*iter);

2763  if

(getIdentProteins) {

2766  return

linkout_list;

2772

list<string> linkout_list;

2774  if

(bdl.size() > 0) {

2776

list< CRef< CBlast_def_line > >::const_iterator iter = bdl.begin();

2781

!linkoutInfo.

is_na

&& bdl.size() > 1);

2783  return

linkout_list;

2789  const string

& cdd_rid,

2790  const string

& entrez_term,

2792  bool

structure_linkout_as_group,

2795  string

& linkoutOrder,

2800  string

&preComputedResID,

2802  const string

& mv_build_name)

2805

list<string> linkout_list;

2807  if

(bdl.size() > 0) {

2809

list< CRef< CBlast_def_line > >::const_iterator iter = bdl.begin();

2812

SLinkoutInfo linkoutInfo;

2813

linkoutInfo.

Init

(rid,

2822

structure_linkout_as_group,

2825

linkoutInfo.cur_align = cur_align;

2826

linkoutInfo.taxid = taxid;

2831

!is_na && bdl.size() > 1);

2833  return

linkout_list;

2839  bool

getIdentProteins)

2841

list<string> linkout_list;

2849  return

linkout_list;

2854  const string

& cdd_rid,

2855  const string

& entrez_term,

2857  bool

structure_linkout_as_group,

2860  string

& linkoutOrder,

2865  string

&preComputedResID,

2867  const string

& mv_build_name,

2868  bool

getIdentProteins)

2871

list<string> linkout_list;

2875

SLinkoutInfo linkoutInfo;

2876

linkoutInfo.

Init

(rid,

2885

structure_linkout_as_group,

2888

linkoutInfo.cur_align = cur_align;

2889

linkoutInfo.taxid = taxid;

2895  return

linkout_list;

2911  bool

oppositeStrands =

false

;

2912  bool

isFirst =

false

;

2919

query_list.push_back(query_range);

2923  if

(subject_range.

GetFrom

() > subject_range.

GetTo

()){

2924

subject_range.

Set

(subject_range.

GetTo

(), subject_range.

GetFrom

());

2926

subject_list.push_back(subject_range);

2928

oppositeStrands = (!isFirst) ? (*iter)->GetSeqStrand(0) != (*iter)->GetSeqStrand(1) : oppositeStrands;

2934  return

oppositeStrands;

2943

list<CRange<TSeqPos> > merge_list;

2945  bool

is_first =

true

;

2950

merge_list.push_back(*iter);

2955

merge_list.pop_back();

2957

merge_list.push_back(temp_range);

2958

prev_range = temp_range;

2960

merge_list.push_back(*iter);

2972

list<CRange<TSeqPos> > merge_list;

2974

list<CRange<TSeqPos> > temp;

2981

temp.push_back(seq_range);

2988  int

master_covered_lenghth = 0;

2990

master_covered_lenghth += iter->GetLength();

2992  return

master_covered_lenghth;

3001

list<CRange<TSeqPos> > query_list;

3002

list<CRange<TSeqPos> > subject_list;

3009

*master_covered_lenghth = 0;

3011

*master_covered_lenghth += iter->GetLength();

3016

from = (from == 0) ? iter->GetFrom() :

min

(from,iter->GetFrom());

3017

to =

max

(to,iter->GetTo());

3021  return

subjectRange;

3028  bool

nuc_to_nuc_translation,

3033  const string

& mv_build_name) {

3036  if

(db_sort == 0 && hit_sort < 1 && hsp_sort < 1)

3039

list< CRef<CSeq_align_set> > seqalign_hit_total_list;

3040

vector< CRef<CSeq_align_set> > seqalign_vec(2);

3046

linkoutdb, mv_build_name);

3054

nuc_to_nuc_translation,

3058

seqalign_hit_total_list.splice(seqalign_hit_total_list.end(),one_seqalign_hit_total_list);

3064

list< CRef<CSeq_align_set> >

3066  bool

nuc_to_nuc_translation,

3070

list< CRef<CSeq_align_set> > seqalign_hit_total_list;

3071

list< CRef<CSeq_align_set> > seqalign_hit_list;

3080

nuc_to_nuc_translation);

3091

}

else if

(hsp_sort ==

eScore

) {

3097

seqalign_hit_total_list.push_back(temp);

3099  return

seqalign_hit_total_list;

3104  bool

nuc_to_nuc_translation,

3114

nuc_to_nuc_translation,

3125  int

score, sum_n, num_ident;

3126  double

bits, evalue;

3127

list<TGi> use_this_gi;

3133

sum_n, num_ident, use_this_gi);

3138  if

(evalue >= evalueLow && evalue <= evalueHigh) {

3139

new_aln->

Set

().push_back(*iter);

3154  if

(numerator == denominator)

3157  int

retval =(

int

) (0.5 + 100.0*((

double

)numerator)/((double)denominator));

3158

retval =

min

(99, retval);

3165  if

(numerator == denominator)

3168  double

retval =100*(double)numerator/(

double

)denominator;

3174  double

percentIdentLow,

3175  double

percentIdentHigh)

3177  int

score, sum_n, num_ident;

3178  double

bits, evalue;

3179

list<TGi> use_this_gi;

3185

sum_n, num_ident, use_this_gi);

3187  if

(seqAlnLength > 0 && num_ident > 0) {

3189  if

(alnPercentIdent >= percentIdentLow && alnPercentIdent <= percentIdentHigh) {

3190

new_aln->

Set

().push_back(*iter);

3200  double

percentIdentLow,

3201  double

percentIdentHigh)

3203  int

score, sum_n, num_ident;

3204  double

bits, evalue;

3205

list<TGi> use_this_gi;

3211

sum_n, num_ident, use_this_gi);

3217  if

(seqAlnLength > 0 && num_ident > 0) {

3219  if

( (evalue >= evalueLow && evalue <= evalueHigh) &&

3220

(alnPercentIdent >= percentIdentLow && alnPercentIdent <= percentIdentHigh)) {

3221

new_aln->Set().push_back(*iter);

3237  double

percentIdent,

3241  double

percentIdentLow,

3242  double

percentIdentHigh,

3248  bool

isInRange =

false

;

3251  string

evalue_buf, bit_score_buf, total_bit_buf, raw_score_buf;

3256  if

(evalueLow >= 0 && percentIdentLow >= 0 && queryCoverLow >= 0) {

3257

isInRange = (evalue >= evalueLow && evalue <= evalueHigh) &&

3258

(percentIdent >= percentIdentLow && percentIdent <= percentIdentHigh) &&

3259

(queryCover >= queryCoverLow && queryCover <= queryCoverHigh);

3261  else if

(evalueLow >= 0 && percentIdentLow >= 0) {

3262

isInRange = (evalue >= evalueLow && evalue <= evalueHigh) &&

3263

(percentIdent >= percentIdentLow && percentIdent <= percentIdentHigh);

3265  else if

(evalueLow >= 0 && queryCoverLow >= 0) {

3266

isInRange = (evalue >= evalueLow && evalue <= evalueHigh) &&

3267

(queryCover >= queryCoverLow && queryCover <= queryCoverHigh);

3269  else if

(queryCoverLow >= 0 && percentIdentLow >= 0) {

3270

isInRange = (queryCover >= queryCoverLow && queryCover <= queryCoverHigh) &&

3271

(percentIdent >= percentIdentLow && percentIdent <= percentIdentHigh);

3273  else if

(evalueLow >= 0) {

3274

isInRange = (evalue >= evalueLow && evalue <= evalueHigh);

3276  else if

(percentIdentLow >= 0) {

3277

isInRange = (percentIdent >= percentIdentLow && percentIdent <= percentIdentHigh);

3279  else if

(queryCoverLow >= 0) {

3280

isInRange = (queryCover >= queryCoverLow && queryCover <= queryCoverHigh);

3288  double

percentIdentLow,

3289  double

percentIdentHigh,

3293

list< CRef<CSeq_align_set> > seqalign_hit_total_list;

3294

list< CRef<CSeq_align_set> > seqalign_hit_list;

3311

seqalign_hit_total_list.push_back(temp);

3324  int

alignCount = 0,hspCount = 0;

3326  const CSeq_id

& newQueryId = (*iter)->GetSeq_id(0);

3327  if

(prevQueryId.

Empty

() || !newQueryId.

Match

(*prevQueryId)){

3328  if

(hspCount >= maxHsps) {

3332

prevQueryId = &newQueryId;

3334  if

(alignCount < maxAligns) {

3335  const CSeq_id

& newSubjectId = (*iter)->GetSeq_id(1);

3337  if

(prevSubjectId.

Empty

() || !newSubjectId.

Match

(*prevSubjectId)){

3339

prevSubjectId = &newSubjectId;

3343

new_aln->

Set

().push_back(*iter);

3354  if

(queryNumber == 0) {

3360  int

currQueryNum = 0;

3363  const CSeq_id

& newQueryId = (*iter)->GetSeq_id(0);

3364  if

(prevQueryId.

Empty

() || !newQueryId.

Match

(*prevQueryId)){

3366

prevQueryId = &newQueryId;

3369  if

(currQueryNum == queryNumber) {

3370  if

(new_aln.

Empty

()) {

3373

new_aln->

Set

().push_back(*iter);

3375  else if

(currQueryNum > queryNumber) {

3385  string

l_cfg_file_name;

3389  bool

cfgExists =

true

;

3391  string

l_fmtcfg_env;

3392  if

(

NULL

!= getenv(

"NCBI"

) ) l_ncbi_env = getenv(

"NCBI"

);

3393  if

(

NULL

!= getenv(

"FMTCFG"

) ) l_fmtcfg_env = getenv(

"FMTCFG"

);

3395  if

( l_fmtcfg_env.empty() )

3396

l_cfg_file_name =

".ncbirc"

;

3398

l_cfg_file_name = l_fmtcfg_env;

3400  CFile

l_fchecker( l_cfg_file_name );

3401

cfgExists = l_fchecker.

Exists

();

3402  if

( (!cfgExists) && (!l_ncbi_env.empty()) ) {

3403  if

( l_ncbi_env.rfind(

"/"

) != (l_ncbi_env.length() -1 ))

3404

l_ncbi_env.append(

"/"

);

3405

l_cfg_file_name = l_ncbi_env + l_cfg_file_name;

3406  CFile

l_fchecker2( l_cfg_file_name );

3407

cfgExists = l_fchecker2.

Exists

();

3412  if

( l_dbg ) fprintf(stderr,

"REGISTRY: %s\n"

,l_cfg_file_name.c_str());

3434  string

l_key, l_host_port, l_format;

3435  string

l_secion_name =

"BLASTFMTUTIL"

;

3436  string

l_fmt_suffix =

"_FORMAT"

;

3437  string

l_host_port_suffix =

"_HOST_PORT"

;

3438  string

l_subst_pattern;

3444  string

l_base_dir =

m_Reg

->Get(l_secion_name,

"INCLUDE_BASE_DIR"

);

3445  if

( !l_base_dir.empty() && ( l_base_dir.rfind(

"/"

) != (l_base_dir.length()-1)) ) {

3446

l_base_dir.append(

"/"

);

3450  string

default_host_port;

3454

l_subst_pattern=

"<@"

+l_key_ndx+

"@>"

;

3455

l_host_port =

m_Reg

->Get(l_secion_name, l_key_ndx);

3458  if

( l_host_port.empty()){

3459

l_key = url_name + l_host_port_suffix; l_subst_pattern=

"<@"

+l_key+

"@>"

;

3460

l_host_port =

m_Reg

->Get(l_secion_name, l_key);

3462  if

( l_host_port.empty())

return GetURLDefault

(url_name,index);

3465

l_key = url_name + l_fmt_suffix ;

3468

l_format =

m_Reg

->Get(l_secion_name, l_key_ndx);

3471  if

( l_format.empty() ) l_format =

m_Reg

->Get(l_secion_name, l_key);

3472  if

( l_format.empty())

return GetURLDefault

(url_name,index);

3474  string

l_format_file = l_base_dir + l_format;

3475  CFile

l_fchecker( l_format_file );

3476  bool

file_name_mode = l_fchecker.

Exists

();

3477  if

( file_name_mode ) {

3478  string

l_inc_file_name = l_format_file;

3482  char

*l_mem =

new char

[ (size_t) l_inc_size + 1];

3483

memset( l_mem,0, (

size_t

) l_inc_size + 1 ) ;

3484

l_file.seekg( 0, ios::beg );

3485

l_file.read(l_mem, l_inc_size);

3487

l_format.erase(); l_format.reserve( (

size_t

)l_inc_size + 1 );

3492

result_url =

NStr::Replace

(l_format,l_subst_pattern,l_host_port);

3494  if

( result_url.empty())

return GetURLDefault

(url_name,index);

3502  string

search_name = url_name;

3507  if

(url_link.empty()) {

3518  auto

cit = kMapTagToURL.find(tag_name);

3520  if

( cit != kMapTagToURL.end()) {

3525  auto

cit = kMapTagToHTML.find(tag_name);

3527  if

( cit != kMapTagToHTML.end()) {

3528

mappedStr = cit->second;

3532  auto

cit = kMapTagToString.find(tag_name);

3534  if

( cit != kMapTagToString.end()) {

3535

mappedStr = cit->second;

3552

retval.

Resize

(0, 0, -1);

3553  if

(matrix_name ==

NULL

||

3560  if

(packed_mtx ==

NULL

) {

3577

retval(

'*'

,

'*'

) = 1;

3579

retval(

'U'

,

'U'

) = retval(

'C'

,

'C'

);

3580

retval(

'U'

,

'C'

) = retval(

'C'

,

'C'

);

3581

retval(

'C'

,

'U'

) = retval(

'C'

,

'C'

);

3588  string

tmplParam =

"<@"

+ tmplParamName +

"@>"

;

3596  string

tmplParam =

"<@"

+ tmplParamName +

"@>"

;

3597  NStr::Replace

(inpString,tmplParam,templParamVal,outString);

3603

templParamVal =

AddSpaces

(templParamVal, maxParamValLength, spacesFormatFlag);

3604  string

outString =

MapTemplate

(inpString,tmplParamName,templParamVal);

3614  if

(maxParamValLength >= paramVal.size()) {

3615  size_t

numSpaces = maxParamValLength - paramVal.size() + 1;

3617

numSpaces = numSpaces/2;

3619

spaceString.assign(numSpaces,

' '

);

3622

paramVal = paramVal.substr(0, maxParamValLength - 3) +

"..."

;

3623

spaceString +=

" "

;

3626

paramVal = paramVal + spaceString;

3629

paramVal = spaceString + paramVal + spaceString;

3632

paramVal = spaceString + paramVal;

3647  string

httpProt =

"https:"

;

3648  if

(!config_reg.

Empty

()) {

3649  if

(config_reg.

HasEntry

(

"BLASTFMTUTIL"

,

"PROTOCOL"

)) {

3650

httpProt = config_reg.

Get

(

"BLASTFMTUTIL"

,

"PROTOCOL"

);

3675  string

db,logstr_moltype;

3676  if

(seqUrlInfo->

isDbNa

) {

3678

logstr_moltype =

"nucl"

;

3681

logstr_moltype =

"prot"

;

3683  string

logstr_location = (seqUrlInfo->

isAlignLink

) ?

"align"

:

"top"

;

3697  string

url_link = urlTemplate;

3698  if

(seqUrlInfo->

user_url

.find(

"sra.cgi"

) != string::npos) {

3699  string

strRun, strSpotId,strReadIndex;

3716  const unsigned int

kWgsProjLength = 4;

3717  const unsigned int

kWgsProjIDLengthMin = 8;

3718  const unsigned int

kWgsProjIDLengthMax = 10;

3721  if

(wgsAccession.size() < 6) {

3730  string

wgsProj = wgsAccession.substr(0,kWgsProjLength);

3731  for

(

size_t i

= 0;

i

< wgsProj.length();

i

++){

3732  if

(!

isalpha

(wgsProj[

i

]&0xff)) {

3738  string

wgsId = wgsAccession.substr(kWgsProjLength);

3739  if

(wgsId.length() >= kWgsProjIDLengthMin && wgsId.length() <= kWgsProjIDLengthMax) {

3740  for

(

size_t i

= 0;

i

< wgsId.length();

i

++){

3757  const unsigned int

kWgsProgNameLength = 6;

3760

wgsProjName = wgsAccession.substr(0,kWgsProgNameLength);

3772  string

title =

"title=\"Show report for "

+ seqUrlInfo->accession +

"\" "

;

3775  string

temp_class_info = classInfo; temp_class_info +=

" "

;

3777  string

wgsAccession = seqUrlInfo->accession;

3778  bool

isWGS =

false

;

3782  if

(isWGS && seqUrlInfo->useTemplates) {

3788  else if

(hasTextSeqID) {

3793  if

(!seqUrlInfo->useTemplates) {

3806  if

(seqUrlInfo->useTemplates) {

3808

url_link = l_TraceUrl + (

string

)

"?cmd=retrieve&dopt=fasta&val="

+ actual_id +

"&RID="

+ seqUrlInfo->rid;

3813

temp_class_info = (!seqUrlInfo->defline.empty())?

CAlignFormatUtil::MapTemplate

(temp_class_info,

"defline"

,seqUrlInfo->defline):temp_class_info;

3824

user_url = (seqUrlInfo->addCssInfo) ?

m_Reg

->Get(

"LOCAL_ID"

,

"TOOL_URL_ALIGN"

) :

m_Reg

->Get(

"LOCAL_ID"

,

"TOOL_URL"

);

3831

temp_class_info = (!seqUrlInfo->defline.empty())?

CAlignFormatUtil::MapTemplate

(temp_class_info,

"defline"

,seqUrlInfo->defline):temp_class_info;

3838

seqUrlInfo->seqUrl = url_link;

3856  string

title =

"title=\"Show report for "

+ seqUrlInfo->accession +

"\" "

;

3859

!((seqUrlInfo->user_url.find(

"dumpgnl.cgi"

) != string::npos && seqUrlInfo->gi >

ZERO_GI

) ||

3860

(seqUrlInfo->user_url.find(

"maps.cgi"

) != string::npos))) {

3862  string

url_with_parameters,toolURLParams;

3863  if

(

m_Reg

&& !seqUrlInfo->blastType.empty() && seqUrlInfo->blastType !=

"newblast"

) {

3864

toolURLParams =

m_Reg

->Get(seqUrlInfo->blastType,

"TOOL_URL_PARAMS"

);

3866  if

(!toolURLParams.empty()) {

3867  string

urlLinkTemplate = seqUrlInfo->user_url + toolURLParams;

3868

url_with_parameters =

s_MapURLLink

(urlLinkTemplate, seqUrlInfo, *ids);

3871  if

(seqUrlInfo->user_url.find(

"sra.cgi"

) != string::npos) {

3876

seqUrlInfo->database,

3877

seqUrlInfo->isDbNa, seqUrlInfo->rid,

3878

seqUrlInfo->queryNumber,

3879

seqUrlInfo->isAlignLink);

3883  if

(!seqUrlInfo->useTemplates) {

3885  if

(seqUrlInfo->addCssInfo) {

3889

url_link +=

"<a "

+ title + deflineInfo +

"href=\""

;

3891

url_link += url_with_parameters;

3892  if

(!seqUrlInfo->useTemplates) url_link +=

"\">"

;

3899

seqUrlInfo->seqUrl = url_link;

3914  if

((seqUrlInfo->advancedView || seqUrlInfo->blastType ==

"mapview"

|| seqUrlInfo->blastType ==

"mapview_prev"

) ||

3915

seqUrlInfo->blastType ==

"gsfasta"

|| seqUrlInfo->blastType ==

"gsfasta_prev"

) {

3919  string

url_link =

GetIDUrl

(seqUrlInfo,ids);

3927  string

linkURL =

GetIDUrl

(seqUrlInfo,ids);

3928  if

(!linkURL.empty()) {

3931  string

linkTmpl = (seqUrlInfo->

addCssInfo

) ? genericLinkMouseoverTmpl : genericLinkTemplate;

3944 static string s_MapCustomLink

(

string

linkUrl,

string

reportType,

string

accession,

string

linkText,

string

linktrg,

string

linkTitle =

""

,

string

linkCls =

""

)

3946  if

(linkTitle.empty()) {

3966

list<string> customLinksList;

3970  string

linkUrl,link,linkTiltle = customLinkTitle;

3972

linkUrl = seqUrlInfo->

seqUrl

;

3977  string

linkText = (seqUrlInfo->

isDbNa

) ?

"GenBank"

:

"GenPept"

;

3979

linkUrl +=

"&from=<@fromHSP@>&to=<@toHSP@>"

;

3980

linkTiltle =

"Aligned region spanning positions <@fromHSP@> to <@toHSP@> on <@seqid@>"

;

3983

customLinksList.push_back(link);

3985  return

customLinksList;

3992  string

dbtype = (seqUrlInfo->

isDbNa

) ?

"nuccore"

:

"protein"

;

3999  string

seqViewUrl = (seqUrlInfo->

gi

>

ZERO_GI

)?seqViewerUrl:seqViewerUrlNonGi;

4002  string

seqViewerParams;

4004

seqViewerParams =

m_Reg

->Get(seqUrlInfo->

blastType

,

"SEQVIEW_PARAMS"

);

4007

seqViewerParams = seqViewerParams.empty() ? seqViewerParamsDefault : seqViewerParams;

4012  string

linkTitle =

"Show alignment to <@seqid@> in <@custom_report_type@>"

;

4018

link_loc =

"fromSubj"

;

4022

link_loc =

"fromHSP"

;

4023

linkTitle +=

" for <@fromHSP@> to <@toHSP@> range"

;

4027  string

title = (seqUrlInfo->

isDbNa

) ?

"Nucleotide Graphics"

:

"Protein Graphics"

;

4037

list<string> customLinksList =

GetGiLinksList

(seqUrlInfo,hspRange);

4039  if

(!graphicLink.empty()) {

4040

customLinksList.push_back(graphicLink);

4042  return

customLinksList;

4047  int

customLinkTypes = customLinkTypesInp;

4055  else if

(seqUrlInfo->

blastType

==

"sra"

) {

4058  else if

(seqUrlInfo->

blastType

==

"snp"

) {

4061  else if

(seqUrlInfo->

blastType

==

"gsfasta"

) {

4064  return

customLinkTypes;

4072

objects::CScope &scope,

4073  int

customLinkTypes)

4075

list<string> customLinksList;

4076  string

linkUrl,link;

4082

linkUrl = seqUrlInfo->

seqUrl

;

4084

customLinksList.push_back(link);

4088

customLinksList.push_back(link);

4092

customLinksList.push_back(link);

4096

customLinksList.push_back(link);

4099

linkUrl = seqUrlInfo->

seqUrl

;

4101

customLinksList.push_back(link);

4104

linkUrl = seqUrlInfo->

seqUrl

;

4106

customLinksList.push_back(link);

4111

linkUrl = seqUrlInfo->

resourcesUrl

+ rs +

"?report=FLT"

;

4115

customLinksList.push_back(link);

4119

customLinksList.push_back(link);

4123

customLinksList.push_back(link);

4126

linkUrl = seqUrlInfo->

seqUrl

;

4128

customLinksList.push_back(link);

4130  return

customLinksList;

4136

objects::CScope &scope)

4140  string

linkUrl,link;

4151  if

(!linkUrl.empty()) {

4152

linkUrl +=

"&segs="

+ seqUrlInfo->

segs

;

4162

objects::CScope &scope)

4170

linkUrl = seqUrlInfo->

seqUrl

;

4174

linkUrl = seqUrlInfo->

seqUrl

;

4175

vector<string> parts;

4179  if

(parts.size() > 1) {

4182

linkUrl = seqUrlInfo->

resourcesUrl

+ rs +

"?report=fasta"

;

4203  const CDbtag

& dtg = subject_id.GetGeneral();

4204  const string

& dbName = dtg.

GetDb

();

4222

list<TGi> use_this_gi;

4224

use_this_gi.clear();

4227

num_ident, use_this_gi);

4230

seqSetInfo->sum_n = sum_n == -1 ? 1:sum_n ;

4232

seqSetInfo->use_this_gi = use_this_gi;

4233

seqSetInfo->bit_score = bits;

4234

seqSetInfo->raw_score = score;

4235

seqSetInfo->evalue = evalue;

4236

seqSetInfo->match = num_ident;

4239

seqSetInfo->flip =

false

;

4241  return

seqSetInfo.release();

4256  if

(aln.

Get

().empty())

4261  double

total_bits = 0;

4262  double

highest_bits = 0;

4263  double

lowest_evalue = 0;

4264  int

highest_length = 1;

4265  int

highest_ident = 0;

4267  double

totalLen = 0;

4269

list<TGi> use_this_gi;

4279

totalLen += align_length;

4282

num_ident, use_this_gi);

4283

use_this_gi.clear();

4293  if

(bits > highest_bits) {

4294

highest_length = align_length;

4295

highest_ident = num_ident;

4299  if

(bits > highest_bits) {

4300

highest_bits = bits;

4301

lowest_evalue = evalue;

4304

seqSetInfo->

match

= highest_ident;

4310

seqSetInfo->

evalue

= lowest_evalue;

4311

seqSetInfo->

hspNum

=

static_cast<int>

(aln.

Size

());

4325  if

(aln.

Get

().empty())

4328  double

highest_bits = 0;

4329  int

highest_length = 1;

4330  int

highest_ident = 0;

4332

list<TGi> use_this_gi;

4338

num_ident, use_this_gi);

4347  if

(bits > highest_bits) {

4348

highest_length = align_length;

4349

highest_ident = num_ident;

4351 

highest_bits = bits;

4356  return

percent_identity;

4360 template

<

class

container>

bool 4364  double

& totalBitScore,

4365  int

& percentCoverage,

4366  double

& percentIdent,

4371

list<TGi>& use_this_gi)

4373  const string

k_GiPrefix =

"gi:"

;

4374  bool

hasScore =

false

;

4377  ITERATE

(

typename

container, iter, scoreList) {

4381  if

(

id

.GetStr()==

"seq_evalue"

) {

4382

evalue = (*iter)->GetValue().GetReal();

4383

}

else if

(

id

.GetStr()==

"seq_bit_score"

){

4384

bitScore = (*iter)->GetValue().GetReal();

4385

}

else if

(

id

.GetStr()==

"seq_total_bit_score"

){

4386

totalBitScore = (*iter)->GetValue().GetReal();

4387

}

else if

(

id

.GetStr()==

"seq_percent_coverage"

){

4388

percentCoverage = (*iter)->GetValue().GetInt();

4389

}

else if

(

id

.GetStr()==

"seq_percent_identity"

&& (*iter)->GetValue().IsInt()){

4390

percentIdent = (*iter)->GetValue().GetInt();

4391

}

else if

(

id

.GetStr()==

"seq_percent_identity"

&& (*iter)->GetValue().IsReal()){

4392

percentIdent = (*iter)->GetValue().GetReal();

4393

}

else if

(

id

.GetStr()==

"seq_hspnum"

){

4394

hspNum = (*iter)->GetValue().GetInt();

4395

}

else if

(

id

.GetStr()==

"seq_align_totlen"

){

4396

totalLen = (*iter)->GetValue().GetReal();

4397

}

else if

(

id

.GetStr()==

"score"

){

4398

rawScore = (*iter)->GetValue().GetInt();

4399

}

else if

(

id

.GetStr()==

"use_this_gi"

){

4400  Uint4

gi_v = (

Uint4

) ((*iter)->GetValue().GetInt());

4402

}

else if

(

id

.GetStr()==

"sum_n"

){

4403

sum_n = (*iter)->GetValue().GetInt();

4406  string

strGi =

NStr::Replace

(

id

.GetStr(),k_GiPrefix,

""

);

4407  TGi

gi = NStr::StringToNumeric<TGi>(strGi);

4408

use_this_gi.push_back(gi);

4419  const string

k_GiPrefix =

"gi:"

;

4426  for

(CUser_object::TData::const_iterator fit = fields.begin(); fit != fields.end(); ++fit) {

4435  TGi

gi = NStr::StringToNumeric<TGi>(strGi);

4436

use_this_gi.push_back(gi);

4454  for

(CUser_object::TData::const_iterator fit = fields.begin(); fit != fields.end(); ++fit) {

4461

use_this_seq.push_back(*acc_iter);

4473  bool

hasScore =

false

;

4475  double

bitScore = -1;

4476  double

totalBitScore = -1;

4477  int

percentCoverage = -1;

4478  double

percentIdent = -1;

4480  double

totalLen = 0;

4483

list<TGi> use_this_gi;

4484

list<string> use_this_seq;

4488

hasScore =

s_GetBlastScore

(aln.

GetScore

(),evalue,bitScore, totalBitScore,percentCoverage,percentIdent,hspNum,totalLen,rawScore,sum_n,use_this_gi);

4494

evalue,bitScore, totalBitScore,percentCoverage,percentIdent,hspNum,totalLen,rawScore,sum_n,use_this_gi);

4497

evalue,bitScore, totalBitScore,percentCoverage,percentIdent,hspNum,totalLen,rawScore,sum_n,use_this_gi);

4500

evalue,bitScore, totalBitScore,percentCoverage,percentIdent,hspNum,totalLen,rawScore,sum_n,use_this_gi);

4504  if

(use_this_gi.size() == 0) {

4513

seqSetInfo->evalue = evalue;

4514

seqSetInfo->bit_score = bitScore;

4515

seqSetInfo->total_bit_score = totalBitScore;

4516

seqSetInfo->percent_coverage = percentCoverage;

4517

seqSetInfo->percent_identity = percentIdent;

4518

seqSetInfo->hspNum = hspNum;

4519

seqSetInfo->totalLen = (

Int8

)totalLen;

4521

seqSetInfo->sum_n = sum_n == -1 ? 1:sum_n ;

4524

seqSetInfo->use_this_seq = use_this_seq;

4525

seqSetInfo->raw_score = rawScore;

4528

seqSetInfo->flip =

false

;

4530  return

seqSetInfo.release();

4535

list<TGi>& use_this_gi,

4546

list<TGi>& use_this_gi,

4563  bool

found =

false

;

4565

iter != bdl.end(); iter++){

4569  if

((*iter)->IsSetTaxid() && (*iter)->CanGetTaxid()){

4570

taxid = (*iter)->GetTaxid();

4572  if

(!use_this_gi.empty()) {

4573  ITERATE

(list<TGi>, iter_gi, use_this_gi){

4574  if

(cur_gi == *iter_gi){

4581  if

((*iter_id)->Match(aln_id)

4583

(*iter_id)->IsGeneral() && (*iter_id)->GetGeneral().CanGetDb() &&

4584

aln_id.

GetGeneral

().

GetDb

() == (*iter_id)->GetGeneral().GetDb())) {

4603  const string

k_GiPrefix =

"gi:"

;

4604  const string

k_SeqIDPrefix =

"seqid:"

;

4612

textSeqid =

NStr::Replace

(use_this_seqid,k_SeqIDPrefix,

""

);

4628  ITERATE

(list<string>, iter_seq, use_this_seq){

4637

list<TGi> use_this_gi;

4638  ITERATE

(list<string>, iter_seq, use_this_seq){

4641  if

(isGi) use_this_gi.push_back(NStr::StringToNumeric<TGi>(strGI));

4650  bool

found =

false

;

4654  ITERATE

(list<string>, iter_seq, use_this_seq){

4657  if

((isGi && cur_gi == NStr::StringToNumeric<TGi>((useThisSeq))) || (!isGi && curSeqID == useThisSeq)){

4662  if

(isGiList) *isGiList = isGi;

4671  if

(alnSeqID->

IsGi

()) {

4678  bool

found = std::find(seqList.begin(), seqList.end(), curSeqID) != seqList.end();

4681  ITERATE

(list<string>, iter_seq, use_this_seq){

4683

found = std::find(seqList.begin(), seqList.end(), useThisSeq) != seqList.end();

4694  bool

has_match =

false

;

4696  ITERATE

(list<string>, iter_seq, use_this_seq) {

4699  if

(useThisSeq == textSeqIDToMatch) {

4709

list<string> new_use_this_seq;

4710  bool

hasAccType =

false

;

4713  ITERATE

(list<string>, iter_seq, use_this_seq) {

4716  if

(useThisSeqAccType != accessionType) {

4717

new_use_this_seq.push_back(useThisSeq);

4723

use_this_seq = new_use_this_seq;

4729

list<string>& use_this_seq,

4745  if

(gi) *gi =

FindGi

(*ids);

4746  if

(textSeqID) *textSeqID =

GetLabel

(wid,

true

);

4748  bool

found =

false

;

4750

iter != bdl.end(); iter++){

4754  string

curSeqID =

GetLabel

(wid,

true

);

4755  if

(taxid && (*iter)->IsSetTaxid() && (*iter)->CanGetTaxid()){

4756

*taxid = (*iter)->GetTaxid();

4758  if

(!use_this_seq.empty()) {

4759  ITERATE

(list<string>, iter_seq, use_this_seq){

4762  if

((isGi && cur_gi == NStr::StringToNumeric<TGi>((useThisSeq))) || (!isGi && curSeqID == useThisSeq)){

4769  if

((*iter_id)->Match(aln_id)

4771

(*iter_id)->IsGeneral() && (*iter_id)->GetGeneral().CanGetDb() &&

4772

aln_id.

GetGeneral

().

GetDb

() == (*iter_id)->GetGeneral().GetDb())) {

4778  if

(gi) *gi = cur_gi;

4779  if

(textSeqID) *textSeqID = curSeqID;

4791

list<TGi>& use_this_gi)

4798  bool

found =

false

;

4800

iter != bdl.end(); iter++){

4803  if

(!use_this_gi.empty()) {

4804  ITERATE

(list<TGi>, iter_gi, use_this_gi){

4805  if

(cur_gi == *iter_gi){

4812  if

((*iter_id)->Match(aln_id)

4814

(*iter_id)->IsGeneral() && (*iter_id)->GetGeneral().CanGetDb() &&

4815

aln_id.

GetGeneral

().

GetDb

() == (*iter_id)->GetGeneral().GetDb())) {

4846

list<CRef<CSeq_align> >::iterator mItr=alnset.

Set

().begin();

4860  for

(;mItr != alnset.

Set

().end(); ++mItr) {

4870  if

(coll[0] == align_subj_rng) {

4874

subj_rng_coll += align_subj_rng;

4886

query_rng.

SetFrom

(

map

.GetSeqPosFromAlnPos(0,subj_aln_start));

4887

query_rng.

SetTo

(

map

.GetSeqPosFromAlnPos(0,subj_aln_end));

4891

subj_rng_coll += subj_rng;

4909  for

(CBioseq::TId::const_iterator iter = ids.begin(); iter != ids.end();

4911  if

((*iter)->Which() == choice){

4928  if

(!(

id

.

Empty

())){

4929  return id

->GetGi();

4938  for

(;desc_t; ++desc_t) {

4948  if

(

id

.IsGi() ||

id

.IsPrf() ||

id

.IsPir()) {

4949

retval =

id

.AsFastaString();

4952

retval =

id

.GetSeqIdString(

true

);

4961  bool

hasTextSeqID =

true

;

4967

hasTextSeqID =

false

;

4971  if

(hasTextSeqID && textSeqID) {

4974  return

hasTextSeqID;

4981  bool

hasTextSeqID =

false

;

4985  if

(seqID.

Empty

()) {

4988  if

(seqID.

Empty

()) {

4991  if

(!seqID.

Empty

()) {

4992

hasTextSeqID =

true

;

4995  return

hasTextSeqID;

4999

vector <string> &seqList)

5002

list<string> use_this_seq;

5003  bool match

=

false

;

5007

subid = &((*iter)->GetSeq_id(1));

5008  if

(previous_id.

Empty

() || !subid->

Match

(*previous_id)){

5009

use_this_seq.clear();

5014

previous_id = subid;

5016

new_aln->

Set

().push_back(*iter);

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.

static void s_CalcAlnPercentIdent(const CRef< CSeq_align_set > &info1, const CRef< CSeq_align_set > &info2, double &percentIdent1, double &percentIdent2)

static string s_GetTaxName(TTaxId taxid)

static bool s_ProcessAlignSet(const CSeq_align_set &alnset, list< CRange< TSeqPos > > &query_list, list< CRange< TSeqPos > > &subject_list)

static CRef< CSeq_id > s_GetSeqIdByType(const list< CRef< CSeq_id > > &ids, CSeq_id::E_Choice choice)

return id type specified or null ref

static string s_MapURLLink(string urlTemplate, CAlignFormatUtil::SSeqURLInfo *seqUrlInfo, const CBioseq::TId &ids)

static list< CRange< TSeqPos > > s_MergeRangeList(list< CRange< TSeqPos > > &source)

MAKE_CONST_MAP(kMapTagToURL, ct::tagStrNocase, ct::tagStrNocase, { { "BL2SEQ_WBLAST_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/blast/bl2seq/wblast2.cgi" }, { "CBLAST_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/Structure/cblast/cblast.cgi" }, { "DOWNLOAD_CGI","/blast/dumpgnl.cgi"}, { "ENTREZ_QUERY_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/entrez/query.fcgi" }, { "ENTREZ_SITES_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/sites/entrez" }, { "ENTREZ_SUBSEQ_TM", "<@protocol@>//www.ncbi.nlm.nih.gov/<@db@>/<@gi@>?report=gbwithparts&from=<@from@>&to=<@to@>&RID=<@rid@>" }, { "ENTREZ_TM", "<@protocol@>//www.ncbi.nlm.nih.gov/<@db@>/<@acc@>?report=genbank&log$=<@log@>&blast_rank=<@blast_rank@>&RID=<@rid@>" }, { "ENTREZ_VIEWER_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/entrez/viewer.fcgi" }, { "GENE_INFO", "<@protocol@>//www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term=%d&RID=%s&log$=geneexplicit%s&blast_rank=%d" }, { "MAP_SEARCH_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/mapview/map_search.cgi" }, { "MAPVIEWER_CGI", "https://www.ncbi.nlm.nih.gov/mapview/maps.cgi?maps=blast_set" }, {"SEQVIEW_URL","https://www.ncbi.nlm.nih.gov/<@dbtype@>/<@seqid@>?report=graph&rid=<@rid@>[<@seqid@>]&"}, {"SEQVIEW_URL_NON_GI","https://www.ncbi.nlm.nih.gov/projects/sviewer/?RID=<@rid@>&id=<@firstSeqID@>&"}, { "TRACE_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/Traces/trace.cgi" }, { "TREEVIEW_CGI", "<@protocol@>//www.ncbi.nlm.nih.gov/blast/treeview/blast_tree_view.cgi"}, { "WGS", "<@protocol@>//www.ncbi.nlm.nih.gov/nuccore/<@wgsacc@>" }, })

static void s_AddLinkoutInfo(map< int, vector< CBioseq::TId > > &linkout_map, int linkout, CBioseq::TId &cur_id)

static string s_MapCustomLink(string linkUrl, string reportType, string accession, string linkText, string linktrg, string linkTitle="", string linkCls="")

static bool s_GetSRASeqMetadata(const CBioseq::TId &ids, string &strRun, string &strSpotId, string &strReadIndex)

void s_AddOtherRelatedInfoLinks(CBioseq::TId &cur_id, const string &rid, bool is_na, bool for_alignment, int cur_align, list< string > &linkout_list)

static list< string > s_NumGiToStringGiList(list< TGi > use_this_gi)

static CRange< TSeqPos > & s_FixMinusStrandRange(CRange< TSeqPos > &rng)

static bool s_FillDbInfoLocally(const string &dbname, CAlignFormatUtil::SDbInfo &info, int dbfilt_algorithm)

Initialize database statistics with data obtained from local BLAST databases.

static CRef< CScope > kScope

bool s_GetBlastScore(const container &scoreList, int &score, double &bits, double &evalue, int &sum_n, int &num_ident, list< TGi > &use_this_gi, int &comp_adj_method)

Get blast score information.

static list< string > s_GetLinkoutUrl(int linkout, string giList, string labelList, TGi first_gi, CAlignFormatUtil::SLinkoutInfo &linkoutInfo, bool textLink=true)

string s_GetBestIDForURL(CBioseq::TId &ids)

static bool s_isAlnInFilteringRange(double evalue, double percentIdent, int queryCover, double evalueLow, double evalueHigh, double percentIdentLow, double percentIdentHigh, int queryCoverLow, int queryCoverHigh)

static string s_MapCommonUrlParams(string urlTemplate, CAlignFormatUtil::SSeqURLInfo *seqUrlInfo)

static int s_LinkLetterToType(string linkLetter)

static double adjustPercentIdentToDisplayValue(double value)

const char k_PSymbol[ePMatrixSize+1]

Residues.

static string s_UseThisSeqToTextSeqID(string use_this_seqid, bool &isGi)

static string s_MapLinkoutGenParam(string &url_link_tmpl, const string &rid, string giList, bool for_alignment, int cur_align, string &label, string &lnk_displ, string lnk_tl_info="", string lnk_title="")

static list< string > s_GetFullLinkoutUrl(CBioseq::TId &cur_id, CAlignFormatUtil::SLinkoutInfo &linkoutInfo, map< int, vector< CBioseq::TId > > &linkout_map, bool getIdentProteins)

static bool FromRangeAscendingSort(CRange< TSeqPos > const &info1, CRange< TSeqPos > const &info2)

const int k_NumAsciiChar

Number of ASCII characters for populating matrix columns.

Declares the CBlastServices class.

static string GetProtocol(void)

static const char * kNoHitsFound

The string containing the message that no hits were found.

static CRef< objects::CSeq_align_set > FilterSeqalignBySeqList(objects::CSeq_align_set &source_aln, vector< string > &seqList)

function for Filtering seqalign by specific subjects

static void PrintPhiInfo(int num_patterns, const string &pattern, double prob, vector< int > &offsets, CNcbiOstream &out)

Prints out PHI-BLAST info for header (or footer)

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 int GetAlignmentLength(const objects::CSeq_align &aln, bool do_translation)

get the alignment length

static bool IsWGSAccession(string &accession, string &wgsProj)

Check if accession is WGS.

static void PruneSeqalign(const objects::CSeq_align_set &source_aln, objects::CSeq_align_set &new_aln, unsigned int num=static_cast< unsigned int >(kDfltArgNumAlignments))

Fill new alignset containing the specified number of alignments with unique slave seqids.

static int GetUniqSeqCoverage(objects::CSeq_align_set &alnset)

Calculate the uniq subject query coverage range (blastn only)

static CAlignFormatUtil::SSeqAlignSetCalcParams * GetSeqAlignSetCalcParams(const objects::CSeq_align_set &aln, int queryLength, bool do_translation)

static void SortHitByMolecularType(list< CRef< objects::CSeq_align_set > > &seqalign_hit_list, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)

sort a list of seqalign set by molecular type

static void AcknowledgeBlastQuery(const objects::CBioseq &cbs, size_t line_len, CNcbiOstream &out, bool believe_query, bool html, bool tabular=false, const string &rid=kEmptyStr)

Print out blast query info.

static bool IsMixedDatabase(const objects::CSeq_align_set &alnset, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)

static list< CRef< objects::CSeq_align_set > > SortOneSeqalignForSortableFormat(const objects::CSeq_align_set &source, bool nuc_to_nuc_translation, int hit_sort, int hsp_sort)

static void GetAsciiProteinMatrix(const char *matrix_name, CNcbiMatrix< int > &retval)

Retrieve a scoring matrix for the provided matrix 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 x_AcknowledgeBlastSequence(const objects::CBioseq &cbs, size_t line_len, CNcbiOstream &out, bool believe_query, bool html, const string &label, bool tabular, const string &rid)

static void PrintDbReport(const vector< SDbInfo > &dbinfo_list, size_t line_length, CNcbiOstream &out, bool top=false)

Print out blast database information.

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 string GetSeqDescrString(const objects::CBioseq &cbs)

Returns a full description for a Bioseq, concatenating all available titles.

@ eAddEOLAtLineEnd

add EOL at the beginning of the string

@ eAddEOLAtLineStart

add spaces at the end of the string

@ eSpacePosAtLineEnd

add spaces at the begining of the string

static list< TGi > StringGiToNumGiList(list< string > &use_this_seq)

Convert if string gi list to TGi list.

static string AddSpaces(string paramVal, size_t maxParamLength, int spacesFormatFlag=eSpacePosToCenter)

Calculate the number of spaces and add them to paramVal.

static CRef< objects::CSeq_align_set > FilterSeqalignByPercentIdent(objects::CSeq_align_set &source_aln, double percentIdentLow, double percentIdentHigh)

function for Filtering seqalign by percent identity

static bool RemoveSeqsOfAccessionTypeFromSeqInUse(list< string > &use_this_seq, objects::CSeq_id::EAccessionInfo accesionType)

function to remove sequences of accesionType from use_this_seq list

static bool SortHitByMasterStartAscending(CRef< objects::CSeq_align_set > &info1, CRef< objects::CSeq_align_set > &info2)

sorting function for sorting a list of seqalign set by ascending mater start position

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 map< string, CRef< objects::CSeq_align_set > > HspListToHitMap(vector< string > seqIdList, const objects::CSeq_align_set &source)

static string GetBareId(const objects::CSeq_id &id)

Get sequence id with no database source (bare accession)

static string GetGnlID(const objects::CDbtag &dtg)

Return ID for GNL label.

static bool m_geturl_debug_flag

static void SortHit(list< CRef< objects::CSeq_align_set > > &seqalign_hit_list, bool do_translation, objects::CScope &scope, int sort_method, ILinkoutDB *linkoutdb, const string &mv_build_name)

actual sorting function for SortHitByMolecularType

static void FillScanModeBlastDbInfo(vector< SDbInfo > &retval, bool is_protein, int numSeqs, Int8 numLetters, string &tag)

Fills one BLAST dbinfo structure.

static bool SortHitByTotalScoreDescending(CRef< objects::CSeq_align_set > const &info1, CRef< objects::CSeq_align_set > const &info2)

return the comparison result: 1st >= 2nd => true, false otherwise

static string GetIDUrlGen(SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)

Create URL for seqid that goes to entrez or trace.

static bool SortHspBySubjectStartAscending(const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)

static CAlignFormatUtil::DbType GetDbType(const objects::CSeq_align_set &actual_aln_list, objects::CScope &scope)

Set the database as gi type.

static void PruneSeqalignAll(const objects::CSeq_align_set &source_aln, objects::CSeq_align_set &new_aln, unsigned int number)

Fill new alignset containing the specified number of alignments plus the rest of alignments for the l...

static void PrintTildeSepLines(string str, size_t line_len, CNcbiOstream &out)

Print out misc information separated by "~".

static string BuildUserUrl(const objects::CBioseq::TId &ids, TTaxId taxid, string user_url, string database, bool db_is_na, string rid, int query_number, bool for_alignment)

return the custom url (such as mapview)

static string MapTemplate(string inpString, string tmplParamName, Int8 templParamVal)

Replace template tags by real data.

static CAlignFormatUtil::SSeqAlignSetCalcParams * GetSeqAlignCalcParams(const objects::CSeq_align &aln)

static string GetURLFromRegistry(const string url_name, int index=-1)

retrieve URL from .ncbirc file combining host/port and format strings values.

static bool IsGiList(list< string > &use_this_seq)

Check if use_this_seq conatins gi list.

static double GetSeqAlignSetCalcPercentIdent(const objects::CSeq_align_set &aln, bool do_translation)

static string GetGraphiscLink(SSeqURLInfo *seqUrlInfo, bool hspRange=false)

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 void PrintKAParameters(double lambda, double k, double h, size_t line_len, CNcbiOstream &out, bool gapped, const Blast_GumbelBlk *gbp=NULL)

Print out kappa, lamda blast parameters.

static CRef< objects::CSeq_align > CreateDensegFromDendiag(const objects::CSeq_align &aln)

Create denseseg representation for densediag seqalign.

static list< string > GetCustomLinksList(SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope, int customLinkTypes=eLinkTypeDefault)

Create the list of string links for seqid that go.

static string GetURLDefault(const string url_name, int index=-1)

settings are not complete.

static CRef< objects::CSeq_align_set > FilterSeqalignByEval(objects::CSeq_align_set &source_aln, double evalueLow, double evalueHigh)

function for Filtering seqalign by expect value

static string GetFASTALinkURL(SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)

Create URL showing aligned regions info.

static bool GetTextSeqID(const list< CRef< objects::CSeq_id > > &ids, string *textSeqID=NULL)

static void GetBlastDbInfo(vector< SDbInfo > &retval, const string &blastdb_names, bool is_protein, int dbfilt_algorithm, bool is_remote=false)

Retrieve BLAST database information for presentation in BLAST report.

static void GetUseThisSequence(const objects::CSeq_align &aln, list< TGi > &use_this_gi)

Extract use_this_gi info from blast alingment.

static bool SortHitByPercentIdentityDescendingEx(const CRef< objects::CSeq_align_set > &info1, const CRef< objects::CSeq_align_set > &info2)

sorting function for sorting a list of seqalign set by descending identity

static void ExtractSeqAlignForSeqList(CRef< objects::CSeq_align_set > &all_aln_set, string alignSeqList)

extract seq_align_set coreesponding to seqid list

static int GetPercentMatch(int numerator, int denominator)

function for calculating percent match for an alignment.

static string GetSeqIdString(const objects::CBioseq &cbs, bool believe_local_id=true)

Returns a full '|'-delimited Seq-id string for a Bioseq.

static bool MatchSeqInUseThisSeqList(list< string > &use_this_seq, string textSeqIDToMatch)

static list< string > GetSeqLinksList(SSeqURLInfo *seqUrlInfo, bool hspRange=false)

static CRef< objects::CSeq_align_set > SortSeqalignForSortableFormat(CCgiContext &ctx, objects::CScope &scope, objects::CSeq_align_set &aln_set, bool nuc_to_nuc_translation, int db_order, int hit_order, int hsp_order, ILinkoutDB *linkoutdb, const string &mv_build_name)

static double GetPercentIdentity(const objects::CSeq_align &aln, objects::CScope &scope, bool do_translation)

calculate the percent identity for a seqalign

static void ExtractSeqalignSetFromDiscSegs(objects::CSeq_align_set &target, const objects::CSeq_align_set &source)

If a Seq-align-set contains Seq-aligns with discontinuous type segments, extract the underlying Seq-a...

static bool IsWGSPattern(string &wgsAccession)

Check if accession is WGS.

static string MapTagToConstString(const string tag_name, EMapConstString flag=eMapToURL)

static bool SortHitByScoreDescending(const CRef< objects::CSeq_align_set > &info1, const CRef< objects::CSeq_align_set > &info2)

static CRef< objects::CSeq_align_set > FilterSeqalignByScoreParams(objects::CSeq_align_set &source_aln, double evalueLow, double evalueHigh, double percentIdentLow, double percentIdentHigh)

function for Filtering seqalign by expect value and percent identity

static void GetAlignLengths(objects::CAlnVec &salv, int &align_length, int &num_gaps, int &num_gap_opens)

Count alignment length, number of gap openings and total number of gaps in a single alignment.

static string BuildSRAUrl(const objects::CBioseq::TId &ids, string user_url)

return the SRA (Short Read Archive) URL

static bool SortHspByMasterStartAscending(const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)

sorting function for sorting a list of seqalign by ascending mater start position

static int SetCustomLinksTypes(SSeqURLInfo *seqUrlInfo, int customLinkTypesInp)

Create info indicating what kind of links to display.

static int GetMasterCoverage(const objects::CSeq_align_set &alnset)

static unique_ptr< CNcbiRegistry > m_Reg

static int GetFrame(int start, objects::ENa_strand strand, const objects::CBioseq_Handle &handle)

return the frame for a given strand Note that start is zero bases.

static void GetBdlLinkoutInfo(const list< CRef< objects::CBlast_def_line > > &bdl, map< int, vector< objects::CBioseq::TId > > &linkout_map, ILinkoutDB *linkoutdb, const string &mv_build_name)

Create map that holds all linkouts for the list of blast deflines and corresponding seqIDs.

static bool SortHspByPercentIdentityDescending(const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)

sorting function for sorting a list of seqalign by descending identity

static CRef< objects::CSeq_align_set > HitListToHspList(list< CRef< objects::CSeq_align_set > > &source)

extract all nested hsp's into a list

static string GetTitle(const objects::CBioseq_Handle &bh)

static TTaxId GetTaxidForSeqid(const objects::CSeq_id &id, objects::CScope &scope)

return the tax id for a seqid

static void AddSpace(CNcbiOstream &out, size_t number)

Add the specified white space.

static string GetAlignedRegionsURL(SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)

Create URL to FASTA info.

static list< string > GetGiLinksList(SSeqURLInfo *seqUrlInfo, bool hspRange=false)

static void AcknowledgeBlastSubject(const objects::CBioseq &cbs, size_t line_len, CNcbiOstream &out, bool believe_query, bool html, bool tabular=false)

Print out blast subject info.

static TGi GetGiForSeqIdList(const list< CRef< objects::CSeq_id > > &ids)

return gi from id list

static void SplitSeqalignByMolecularType(vector< CRef< objects::CSeq_align_set > > &target, int sort_method, const objects::CSeq_align_set &source, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)

static bool SortHitByMasterCoverageDescending(CRef< objects::CSeq_align_set > const &info1, CRef< objects::CSeq_align_set > const &info2)

static void BlastPrintError(list< SBlastError > &error_return, bool error_post, CNcbiOstream &out)

Output blast errors.

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 void HspListToHitList(list< CRef< objects::CSeq_align_set > > &target, const objects::CSeq_align_set &source)

group hsp's with the same id togeter

static void SortHitByPercentIdentityDescending(list< CRef< objects::CSeq_align_set > > &seqalign_hit_list, bool do_translation)

sort a list of seqalign set by alignment identity

static string MapProtocol(string url_link)

static string GetFullIDLink(SSeqURLInfo *seqUrlInfo, const objects::CBioseq::TId *ids)

static bool SortHspByScoreDescending(const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)

static CRef< objects::CSeq_align_set > LimitSeqalignByHsps(objects::CSeq_align_set &source_aln, int maxAligns, int maxHsps)

function for Limitting seqalign by hsps number (by default results are not cut off within the query)

static CRef< objects::CSeq_align_set > ExtractQuerySeqAlign(CRef< objects::CSeq_align_set > &source_aln, int queryNumber)

function for extracting seqalign for the query

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)

static void x_WrapOutputLine(string str, size_t line_len, CNcbiOstream &out, bool html=false)

Wrap a string to specified length.

static unsigned int GetSubjectsNumber(const objects::CSeq_align_set &source_aln, unsigned int num)

Calculate number of subject sequnces in alignment limitted by num.

static CRange< TSeqPos > GetSeqAlignCoverageParams(const objects::CSeq_align_set &alnset, int *masterCoverage, bool *flip)

TDim GetNumRows(void) const

TSeqPos GetAlnStop(TNumseg seg) const

TSignedRange GetSeqAlnRange(TNumrow row) const

CRef< CAlnChunkVec > GetAlnChunks(TNumrow row, const TSignedRange &range, TGetChunkFlags flags=fAlnSegsOnly) const

API for Remote Blast Services.

static CNcbiApplication * Instance(void)

Singleton method.

void Resize(size_t i, size_t j, T val=T())

resize this matrix, filling the empty cells with a known value

TThisType & Subtract(const TRange &r)

position_type GetCoveredLength(void) const

Returns total length covered by ranges in this collection, i.e.

Uint8 GetTotalLength() const

Returns the sum of the lengths of all available sequences.

const string & GetDBNameList() const

Get list of database names.

void GetMaskAlgorithmDetails(int algorithm_id, objects::EBlast_filter_program &program, string &program_name, string &algo_opts)

Get information about one type of masking available here.

string GetTitle() const

Returns the database title.

int GetNumSeqs() const

Returns the number of sequences available.

string GetDate() const

Returns the construction date of the database.

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.

Tdata::size_type Size() const

CRef< CSeq_align > CreateTranslatedDensegFromNADenseg(void) const

Create a Dense-seg with widths from Dense-seg of nucleotides Used by AlnMgr to handle translated nucl...

CRef< CSeq_align > CreateDensegFromStdseg(SSeqIdChooser *SeqIdChooser=0) const

---------------------------------------------------------------------------- PRE : the Seq-align has ...

TSeqPos GetSeqStop(TDim row) const

const CSeq_id & GetSeq_id(TDim row) const

Get seq-id (the first one if segments have different ids).

TSeqPos GetSeqStart(TDim row) const

@Seq_descr.hpp User-defined methods of the data storage class.

Class to sort by linkout bit.

string m_MapViewerBuildName

CSortHitByMolecularTypeEx(ILinkoutDB *linkoutdb, const string &mv_build_name)

bool operator()(const CRef< CSeq_align_set > &info1, const CRef< CSeq_align_set > &info2)

virtual int GetLinkout(TGi gi, const string &mv_build_name)=0

Retrieve the Linkout for a given GI.

const_iterator end() const

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

const_iterator end() const

const_iterator begin() const

const_iterator begin() const

const_iterator end() const

std::ofstream out("events_result.xml")

main entry point for tests

bool Empty(const CNcbiOstrstream &src)

static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)

static const char * str(char *buf, int n)

CRef< objects::CBlast4_database_info > GetDatabaseInfo(CRef< objects::CBlast4_database > blastdb)

Retrieve detailed information for one BLAST database If information about multiple databases is neede...

#define GI_FROM(T, value)

const CNcbiRegistry & GetConfig(void) const

Get the application's cached configuration parameters (read-only).

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

int TSignedSeqPos

Type for signed sequence position.

#define TAX_ID_TO(T, tax_id)

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

SStrictId_Tax::TId TTaxId

Taxon id type.

TCgiEntries::iterator TCgiEntriesI

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define ERR_POST_EX(err_code, err_subcode, message)

Error posting with error codes.

@ eDiag_Info

Informational message.

@ eDiag_Fatal

Fatal error – guarantees exit(or abort)

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

const string & GetMsg(void) const

Get message string.

virtual bool Exists(void) const

Check existence of file.

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.

static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)

Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...

string GetSeqIdString(bool with_version=false) const

Return seqid string with optional version for text seqid type.

void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const

Append a label for this Seq-id to the supplied string.

CConstRef< CSeq_id > GetSeq_idByType(const container &ids, CSeq_id::E_Choice choice)

Search the container of CRef<CSeq_id> for the id of given type.

EAccessionInfo

For IdentifyAccession (below)

bool Match(const CSeq_id &sid2) const

Match() - TRUE if SeqIds are equivalent.

static int WorstRank(const CRef< CSeq_id > &id)

const CTextseq_id * GetTextseq_Id(void) const

Return embedded CTextseq_id, if any.

CConstRef< CSeq_id > FindTextseq_id(const container &ids)

Return text seq-id from id list if exists, return 0 otherwise.

@ eContent

Untagged human-readable accession or the like.

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

TBioseqCore GetBioseqCore(void) const

Get bioseq core structure.

TSeqPos GetBioseqLength(void) const

bool Empty(void) const THROWS_NONE

Check if CConstRef is empty – not pointing to any object which means having a null value.

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.

uint32_t Uint4

4-byte (32-bit) unsigned integer

int64_t Int8

8-byte (64-bit) signed integer

TThisType CombinationWith(const TThisType &r) const

bool IntersectingWith(const TThisType &r) const

TThisType & Set(position_type from, position_type to)

virtual const string & Get(const string &section, const string &name, TFlags flags=0) const

Get the parameter value.

virtual bool HasEntry(const string &section, const string &name=kEmptyStr, TFlags flags=0) const

bool Empty(TFlags flags=fAllLayers) const

Verify if Registry is empty.

#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 Int8ToString(Int8 value, TNumToStringFlags flags=0, int base=10)

Convert Int8 to string.

static CTempString TruncateSpaces_Unsafe(const CTempString str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.

static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive compare of a substring with another string.

static Int8 StringToInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to Int8.

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 double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

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 string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static string JavaScriptEncode(const CTempString str)

Encode a string for JavaScript.

static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)

Split a string into two pieces using the specified delimiters.

int TWrapFlags

Bitwise OR of "EWrapFlags".

static void Wrap(const string &str, SIZE_TYPE width, IWrapDest &dest, TWrapFlags flags, const string *prefix, const string *prefix1)

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 & ToUpper(string &str)

Convert string to upper case – string& version.

static string URLEncode(const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)

URL-encode string.

static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.

static string & ToLower(string &str)

Convert string to lower case – string& version.

@ fConvErr_NoThrow

Do not throw an exception on error.

@ fSplit_MergeDelimiters

Merge adjacent delimiters.

@ fWrap_HTMLPre

Wrap as pre-formatted HTML?

@ fWrap_FlatFile

Wrap for flat file use.

@ fWithCommas

Use commas as thousands separator.

string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const

Transform time to string.

@ fFormat_Simple

Use single characters as format symbols.

C::value_type FindBestChoice(const C &container, F score_func)

Find the best choice (lowest score) for values in a container.

static const char label[]

@ eBlast4_residue_type_nucleotide

@ eBlast4_residue_type_protein

const Tdata & Get(void) const

Get the member data.

void SetFrom(TFrom value)

Assign a value to From data member.

TTo GetTo(void) const

Get the To member data.

TFrom GetFrom(void) const

Get the From member data.

void SetTo(TTo value)

Assign a value to To data member.

bool IsSetData(void) const

the object itself Check if a value has been assigned to Data data member.

bool IsStr(void) const

Check if variant Str is selected.

bool IsSetType(void) const

type of object within class Check if a value has been assigned to Type data member.

const TTag & GetTag(void) const

Get the Tag member data.

bool IsStrs(void) const

Check if variant Strs is selected.

const TStrs & GetStrs(void) const

Get the variant data.

bool IsId(void) const

Check if variant Id is selected.

const TData & GetData(void) const

Get the Data member data.

bool CanGetDb(void) const

Check if it is safe to call GetDb method.

bool CanGetTag(void) const

Check if it is safe to call GetTag method.

const TDb & GetDb(void) const

Get the Db member data.

bool IsSetLabel(void) const

field label Check if a value has been assigned to Label data member.

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.

bool IsSetData(void) const

Check if a value has been assigned to Data data member.

vector< CStringUTF8 > TStrs

vector< CRef< CUser_field > > TData

TId GetId(void) const

Get the variant data.

const TDenseg & GetDenseg(void) const

Get the variant data.

Tdata & Set(void)

Assign a value to data member.

TScore & SetScore(void)

Assign a value to Score data member.

TLens & SetLens(void)

Assign a value to Lens data member.

bool IsSetBounds(void) const

regions of sequence over which align was computed Check if a value has been assigned to Bounds data m...

E_Choice Which(void) const

Which variant is currently selected.

TDim GetDim(void) const

Get the Dim member data.

void SetSegs(TSegs &value)

Assign a value to Segs data member.

TScores & SetScores(void)

Assign a value to Scores data member.

void SetDim(TDim value)

Assign a value to Dim data member.

void SetDim(TDim value)

Assign a value to Dim data member.

vector< TSeqPos > TStarts

void SetType(TType value)

Assign a value to Type data member.

bool IsDendiag(void) const

Check if variant Dendiag is selected.

bool IsSetType(void) const

Check if a value has been assigned to Type data member.

const TStd & GetStd(void) const

Get the variant data.

TStarts & SetStarts(void)

Assign a value to Starts data member.

TStrands & SetStrands(void)

Assign a value to Strands data member.

bool CanGetExt(void) const

Check if it is safe to call GetExt method.

const TDendiag & GetDendiag(void) const

Get the variant data.

bool IsStd(void) const

Check if variant Std is selected.

vector< ENa_strand > TStrands

bool IsDisc(void) const

Check if variant Disc is selected.

vector< CRef< CScore > > TScores

TType GetType(void) const

Get the Type member data.

bool IsSetDim(void) const

dimensionality Check if a value has been assigned to Dim data member.

void SetNumseg(TNumseg value)

Assign a value to Numseg data member.

const TExt & GetExt(void) const

Get the Ext member data.

bool IsSetScore(void) const

for whole alignment Check if a value has been assigned to Score data member.

list< CRef< CSeq_align > > Tdata

TIds & SetIds(void)

Assign a value to Ids data member.

const TScore & GetScore(void) const

Get the Score member data.

TBounds & SetBounds(void)

Assign a value to Bounds data member.

const TScores & GetScores(void) const

Get the Scores member data.

const TDisc & GetDisc(void) const

Get the variant data.

list< CRef< CDense_diag > > TDendiag

const Tdata & Get(void) const

Get the member data.

const TSegs & GetSegs(void) const

Get the Segs member data.

const TBounds & GetBounds(void) const

Get the Bounds member data.

ENa_strand

strand of nucleic acid

bool IsGeneral(void) const

Check if variant General is selected.

E_Choice Which(void) const

Which variant is currently selected.

TGi GetGi(void) const

Get the variant data.

E_Choice

Choice variants.

const TGeneral & GetGeneral(void) const

Get the variant data.

bool IsGi(void) const

Check if variant Gi is selected.

@ e_Other

for historical reasons, 'other' = 'refseq'

@ e_General

for other databases

@ e_Gi

GenInfo Integrated Database.

list< CRef< CSeqdesc > > Tdata

const TInst & GetInst(void) const

Get the Inst member data.

const TTitle & GetTitle(void) const

Get the variant data.

bool CanGetLength(void) const

Check if it is safe to call GetLength method.

const TId & GetId(void) const

Get the Id member data.

const Tdata & Get(void) const

Get the member data.

bool IsSetInst(void) const

the sequence data Check if a value has been assigned to Inst data member.

TLength GetLength(void) const

Get the Length member data.

list< CRef< CSeq_id > > TId

bool IsSetDescr(void) const

descriptors Check if a value has been assigned to Descr data member.

const TDescr & GetDescr(void) const

Get the Descr member data.

@ e_Ncbieaa

extended ASCII 1 letter aa codes

@ e_Title

a title for this sequence

char * dbname(DBPROCESS *dbproc)

Get name of current database.

unsigned int

A callback function used to compare two keys in a database.

HTML library helper classes and functions.

use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database

std::false_type tagStrNocase

constexpr bool empty(list< Ts... >) noexcept

const string version

version string

double value_type

The numeric datatype used by the parser.

Magic spell ;-) needed for some weird compilers... very empiric.

const GenericPointer< typename T::ValueType > T2 value

const CharType(& source)[N]

int strncmp(const char *str1, const char *str2, size_t count)

#define ASSERT

macro for assert.

Defines NCBI C++ diagnostic APIs, classes, and macros.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.

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_)

double lambda(size_t dimMatrix_, const Int4 *const *scoreMatrix_, const double *q_)

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 PCRE2_SIZE * offsets

const SNCBIPackedScoreMatrix * NCBISM_GetStandardMatrix(const char *name)

void NCBISM_Unpack(const SNCBIPackedScoreMatrix *psm, SNCBIFullScoreMatrix *fsm)

Expand a packed score matrix into an unpacked one, which callers can proceed to index directly by sta...

Defines BLAST database access classes.

Defines exception class and several constants for SeqDB.

void SeqDB_SplitQuoted(const string &dbname, vector< CSeqDB_Substring > &dbs, bool keep_quote=false)

Combine and quote list of database names.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

#define row(bind, expected)

Structure to hold the Gumbel parameters (for FSC).

double Alpha_un

Ungapped alpha.

double Sigma

cov(L) = sigma y + tau

double a

avg(L) = a y + b

double Alpha

var(L) = alpha y + beta

string filt_algorithm_name

Filtering algorithm ID used in BLAST search.

string filt_algorithm_options

Filtering algorithm options used in BLAST search.

void Init(string rid_in, string cdd_rid_in, string entrez_term_in, bool is_na_in, string database_in, int query_number_in, string user_url_in, string preComputedResID_in, string linkoutOrder_in, bool structure_linkout_as_group_in=false, bool for_alignment_in=true)

CRange< TSeqPos > subjRange

Structure that holds information for all hits of one subject in Seq Align Set.

CRange< TSeqPos > subjRange

int master_covered_length

Structure that holds information needed for creation seqID URL in descriptions and alignments.

string user_url

user url TOOL_URL from .ncbirc

string blastType

blast type refer to blobj->adm->trace->created_by

CRange< TSeqPos > seqRange

sequence range

string database

name of the database

string defline

sequence defline

bool addCssInfo

bool indicating that css info should be added

int queryNumber

the query number

string accession

accession

string segs

string containing align segments in the the following format seg1Start-seg1End,seg2Start-seg2End

int blast_rank

index of the current alignment

string seqUrl

sequence URL created

bool isAlignLink

bool indicating if link is in alignment section

bool isDbNa

bool indicating if the database is nucleotide or not

string resourcesUrl

URL(s) to other resources from .ncbirc.


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