NCBI C++ ToolKit
version.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: version.cpp 68910 2015-09-15 18:15:16Z zaretska $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Christiam Camacho
27  *
28  */
29 
30 /// @file version.cpp
31 /// Implementation of the BLAST engine's version and reference classes
32 
33 #include <ncbi_pch.hpp>
36 #include <sstream>
37 
38 /** @addtogroup AlgoBlast
39  *
40  * @{
41  */
42 
44 BEGIN_SCOPE(blast)
45 
46 /// References for the various BLAST publications
47 static const string kReferences[(int)CReference::eMaxPublications+1] = {
48  // eGappedBlast
49  "Stephen F. Altschul, Thomas L. Madden, \
50 Alejandro A. Sch&auml;ffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. \
51 Lipman (1997), \"Gapped BLAST and PSI-BLAST: a new generation of protein \
52 database search programs\", Nucleic Acids Res. 25:3389-3402.",
53  // ePhiBlast
54  "Zheng Zhang, Alejandro A. Sch&auml;ffer, Webb Miller, \
55 Thomas L. Madden, David J. Lipman, Eugene V. Koonin, and Stephen F. \
56 Altschul (1998), \"Protein sequence similarity searches using patterns \
57 as seeds\", Nucleic Acids Res. 26:3986-3990.",
58  // eMegaBlast
59  "Zheng Zhang, Scott Schwartz, Lukas Wagner, and Webb Miller (2000), \
60 \"A greedy algorithm for aligning DNA sequences\", \
61 J Comput Biol 2000; 7(1-2):203-14.",
62  // eCompBasedStats
63  "Alejandro A. Sch&auml;ffer, L. Aravind, Thomas L. Madden, Sergei Shavirin, \
64 John L. Spouge, Yuri I. Wolf, Eugene V. Koonin, and Stephen F. Altschul \
65 (2001), \"Improving the accuracy of PSI-BLAST protein database searches \
66 with composition-based statistics and other refinements\", Nucleic Acids \
67 Res. 29:2994-3005.",
68  // eCompAdjustedMatrices
69  "Stephen F. Altschul, John C. Wootton, E. Michael Gertz, Richa Agarwala, \
70 Aleksandr Morgulis, Alejandro A. Sch&auml;ffer, and Yi-Kuo Yu (2005) \"Protein \
71 database searches using compositionally adjusted substitution matrices\", \
72 FEBS J. 272:5101-5109.",
73  // eIndexedMegablast
74  "Aleksandr Morgulis, George Coulouris, Yan Raytselis, \
75 Thomas L. Madden, Richa Agarwala, Alejandro A. Sch&auml;ffer \
76 (2008), \"Database Indexing for Production MegaBLAST Searches\", \
77 Bioinformatics 24:1757-1764.",
78  // eDeltaBlast
79  "Grzegorz M. Boratyn, Alejandro A. Schaffer, Richa Agarwala, Stephen F. Altschul, \
80 David J. Lipman and Thomas L. Madden (2012) \"Domain enhanced lookup time \
81 accelerated BLAST\", Biology Direct 7:12.",
82  // eMaxPublications
83  kEmptyStr
84 };
85 
86 /// Pubmed URLs to retrieve the references defined above
87 static const string kPubMedUrls[(int)CReference::eMaxPublications+1] = {
88  // eGappedBlast
89  "//www.ncbi.nlm.nih.gov/\
90 entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=9254694&dopt=Citation",
91  // ePhiBlast
92  "//www.ncbi.nlm.nih.gov/\
93 entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=9705509&dopt=Citation",
94  // eMegaBlast
95  "//www.ncbi.nlm.nih.gov/\
96 entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=10890397&dopt=Citation",
97  // eCompBasedStats
98  "//www.ncbi.nlm.nih.gov/\
99 entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=11452024&dopt=Citation",
100  // eCompAdjustedMatrices
101  "//www.ncbi.nlm.nih.gov/\
102 entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=16218944&dopt=Citation",
103  // eIndexedMegablast
104  "//www.ncbi.nlm.nih.gov/pubmed/18567917",
105  // eDeltaBlast
106  "//www.ncbi.nlm.nih.gov/pubmed/22510480",
107  // eMaxPublications
108  kEmptyStr
109 };
110 
111 string
113 {
114  return kReferences[(int) pub];
115 }
116 
117 string
119 {
120  string pub_string = GetString(pub);
121  string::size_type offset = pub_string.find("&auml;");
122  if (offset != string::npos)
123  pub_string.replace(offset, 6, "a");
124 
125  return pub_string;
126 }
127 
128 string
130 {
131  return kPubMedUrls[(int) pub];
132 }
133 
134 END_SCOPE(blast)
136 
137 /* @} */
#define static
Declares singleton objects to store the version and reference for the BLAST engine.
Function calls to actually perform a BLAST search (high level).
Class to keep track of the various BLAST references.
Definition: version.hpp:67
int offset
Definition: replacements.h:160
static string GetString(EPublication pub)
Reference for requested publication.
Definition: version.cpp:112
EPublication
Enumerates the various BLAST publications.
Definition: version.hpp:70
static string GetHTMLFreeString(EPublication pub)
Reference for requested publication without umlaut.
Definition: version.cpp:118
static const string kReferences[(int) CReference::eMaxPublications+1]
References for the various BLAST publications.
Definition: version.cpp:47
static const string kPubMedUrls[(int) CReference::eMaxPublications+1]
Pubmed URLs to retrieve the references defined above.
Definition: version.cpp:87
static string GetPubmedUrl(EPublication pub)
Get Pubmed url for requested publication.
Definition: version.cpp:129
@ eMaxPublications
Used as sentinel value.
Definition: version.hpp:78
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define kEmptyStr
Definition: ncbistr.hpp:123
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
#define const
Definition: zconf.h:232
Modified on Tue Apr 23 07:38:09 2024 by modify_doxy.py rev. 669887