New upstream version 2.4.0
Julien Y. Dutheil
6 years ago
35 | 35 | # library implements. |
36 | 36 | # In other words, the library implements all the interface numbers in the |
37 | 37 | # range from number current - age to current. |
38 | SET(${PROJECT_NAME}_VERSION_CURRENT "3") | |
38 | SET(${PROJECT_NAME}_VERSION_CURRENT "4") | |
39 | 39 | SET(${PROJECT_NAME}_VERSION_REVISION "0") |
40 | 40 | SET(${PROJECT_NAME}_VERSION_AGE "0") |
41 | 41 | |
53 | 53 | endif (CMAKE_INSTALL_PREFIX) |
54 | 54 | |
55 | 55 | include (GNUInstallDirs) |
56 | find_package (bpp-seq 11.0.0 REQUIRED) | |
56 | find_package (bpp-seq 12.0.0 REQUIRED) | |
57 | 57 | |
58 | 58 | # Find the zlib installation (define zlib imported target) |
59 | 59 | find_package(ZLIB REQUIRED) |
103 | 103 | # Packager |
104 | 104 | SET(CPACK_PACKAGE_NAME "libbpp-raa") |
105 | 105 | SET(CPACK_PACKAGE_VENDOR "Bio++ Development Team") |
106 | SET(CPACK_PACKAGE_VERSION "2.3.1") | |
106 | SET(CPACK_PACKAGE_VERSION "2.4.0") | |
107 | 107 | SET(CPACK_PACKAGE_VERSION_MAJOR "2") |
108 | SET(CPACK_PACKAGE_VERSION_MINOR "3") | |
109 | SET(CPACK_PACKAGE_VERSION_PATCH "1") | |
108 | SET(CPACK_PACKAGE_VERSION_MINOR "4") | |
109 | SET(CPACK_PACKAGE_VERSION_PATCH "0") | |
110 | 110 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Remote Acnuc Access library") |
111 | 111 | SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt") |
112 | 112 | SET(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt") |
115 | 115 | # /!\ This assumes that an external build is used |
116 | 116 | SET(CPACK_SOURCE_IGNORE_FILES |
117 | 117 | "/build/" |
118 | "/html/" | |
119 | "/BppRaa.tag" | |
118 | 120 | "/\\\\.git/" |
119 | 121 | "/\\\\.gitignore" |
120 | 122 | ${CPACK_SOURCE_IGNORE_FILES} |
0 | 25/02/18 -*- version 2.4.0 -*- | |
1 | ||
2 | 25/02/18 Julien Dutheil | |
3 | ||
4 | * Removed all dynamic exception specifications | |
5 | * Increased inerface number to 4. | |
6 | ||
0 | 7 | 10/05/17 -*- version 2.3.0 -*- |
1 | 8 | |
2 | 9 | 28/09/14 -*- Version 2.2.0 -*- |
37 | 37 | # could be handy for archiving the generated documentation or if some version |
38 | 38 | # control system is used. |
39 | 39 | |
40 | PROJECT_NUMBER = 2.3.0 | |
40 | PROJECT_NUMBER = 2.4.0 | |
41 | 41 | |
42 | 42 | # Using the PROJECT_BRIEF tag one can provide an optional one line description |
43 | 43 | # for a project that appears at the top of each page and should give viewer a |
0 | %define _basename bpp-raa | |
1 | %define _version 2.3.1 | |
2 | %define _release 1 | |
3 | 0 | %define _prefix /usr |
4 | 1 | |
5 | URL: http://biopp.univ-montp2.fr/ | |
2 | URL: https://github.com/BioPP/bpp-raa | |
6 | 3 | |
7 | Name: %{_basename} | |
8 | Version: %{_version} | |
9 | Release: %{_release} | |
4 | Name: bpp-raa | |
5 | Version: 2.4.0 | |
6 | Release: 1%{?dist} | |
10 | 7 | License: CECILL-2.0 |
11 | 8 | Vendor: The Bio++ Project |
12 | Source: http://biopp.univ-montp2.fr/repos/sources/%{_basename}-%{_version}.tar.gz | |
9 | Source: %{name}-%{version}.tar.gz | |
13 | 10 | Summary: Bio++ Remote Acnuc Access library |
14 | 11 | Group: Development/Libraries/C and C++ |
15 | Requires: bpp-core = %{_version} | |
16 | Requires: bpp-seq = %{_version} | |
12 | Requires: bpp-core = %{version} | |
13 | Requires: bpp-seq = %{version} | |
17 | 14 | |
18 | BuildRoot: %{_builddir}/%{_basename}-root | |
15 | BuildRoot: %{_builddir}/%{name}-root | |
19 | 16 | BuildRequires: cmake >= 2.8.11 |
20 | 17 | BuildRequires: gcc-c++ >= 4.7.0 |
21 | BuildRequires: libbpp-core3 = %{_version} | |
22 | BuildRequires: libbpp-core-devel = %{_version} | |
23 | BuildRequires: libbpp-seq11 = %{_version} | |
24 | BuildRequires: libbpp-seq-devel = %{_version} | |
18 | BuildRequires: libbpp-core4 = %{version} | |
19 | BuildRequires: libbpp-core-devel = %{version} | |
20 | BuildRequires: libbpp-seq12 = %{version} | |
21 | BuildRequires: libbpp-seq-devel = %{version} | |
25 | 22 | BuildRequires: zlib >= 1.2.3 |
26 | 23 | BuildRequires: zlib-devel >= 1.2.3 |
27 | 24 | |
32 | 29 | This library contains utilitary and classes to query public database (GenBank, EMBL, SwissProt, etc) using acnuc. |
33 | 30 | It is part of the Bio++ project. |
34 | 31 | |
35 | %package -n libbpp-raa3 | |
32 | %package -n libbpp-raa4 | |
36 | 33 | Summary: Bio++ Remote Acnuc Access library |
37 | 34 | Group: Development/Libraries/C and C++ |
38 | 35 | |
39 | %description -n libbpp-raa3 | |
36 | %description -n libbpp-raa4 | |
40 | 37 | This library contains utilitary and classes to query public database (GenBank, EMBL, SwissProt, etc) using acnuc. |
41 | 38 | It is part of the Bio++ project. |
42 | 39 | |
43 | 40 | %package -n libbpp-raa-devel |
44 | 41 | Summary: Libraries, includes to develop applications with %{_basename} |
45 | 42 | Group: Development/Libraries/C and C++ |
46 | Requires: libbpp-raa3 = %{_version} | |
47 | Requires: libbpp-seq11 = %{_version} | |
48 | Requires: libbpp-seq-devel = %{_version} | |
49 | Requires: libbpp-core3 = %{_version} | |
50 | Requires: libbpp-core-devel = %{_version} | |
43 | Requires: libbpp-raa4 = %{version} | |
44 | Requires: libbpp-seq12 = %{version} | |
45 | Requires: libbpp-seq-devel = %{version} | |
46 | Requires: libbpp-core4 = %{version} | |
47 | Requires: libbpp-core-devel = %{version} | |
51 | 48 | Requires: zlib >= 1.2.3 |
52 | 49 | Requires: zlib-devel >= 1.2.3 |
53 | 50 | |
54 | 51 | %description -n libbpp-raa-devel |
55 | 52 | The libbpp-raa-devel package contains the header files and static libraries for |
56 | building applications which use %{_basename}. | |
53 | building applications which use %{name}. | |
54 | ||
55 | %global debug_package %{nil} | |
57 | 56 | |
58 | 57 | %prep |
59 | 58 | %setup -q |
70 | 69 | %clean |
71 | 70 | rm -rf $RPM_BUILD_ROOT |
72 | 71 | |
73 | %post -n libbpp-raa3 -p /sbin/ldconfig | |
72 | %post -n libbpp-raa4 -p /sbin/ldconfig | |
74 | 73 | |
75 | %postun -n libbpp-raa3 -p /sbin/ldconfig | |
74 | %postun -n libbpp-raa4 -p /sbin/ldconfig | |
76 | 75 | |
77 | %files -n libbpp-raa3 | |
76 | %files -n libbpp-raa4 | |
78 | 77 | %defattr(-,root,root) |
79 | 78 | %doc AUTHORS.txt COPYING.txt INSTALL.txt ChangeLog |
80 | 79 | %{_prefix}/%{_lib}/lib*.so.* |
90 | 89 | %{_prefix}/include/* |
91 | 90 | |
92 | 91 | %changelog |
92 | * Mon Feb 26 2018 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.4.0-1 | |
93 | - Increased interface number | |
94 | - Removed dynamic exceptions specifications. | |
93 | 95 | * Tue Jun 06 2017 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.3.1-1 |
94 | 96 | - Increased interface number |
95 | 97 | * Wed May 10 2017 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.3.0-1 |
14 | 14 | using namespace std; |
15 | 15 | using namespace bpp; |
16 | 16 | |
17 | RAA::RAA(const string& dbname, int port, const string& server) throw (int) | |
17 | RAA::RAA(const string& dbname, int port, const string& server) | |
18 | 18 | { |
19 | 19 | kw_pattern = NULL; |
20 | 20 | current_address.div = -1; |
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | RAA::RAA(int port, const string& server) throw (int) | |
29 | RAA::RAA(int port, const string& server) | |
30 | 30 | { |
31 | 31 | kw_pattern = NULL; |
32 | 32 | int error = raa_open_socket((char*)server.c_str(), port, (char*)"Bio++", &raa_data); |
240 | 240 | } |
241 | 241 | |
242 | 242 | |
243 | Sequence* RAA::translateCDS(int seqrank) throw (BadCharException) | |
243 | Sequence* RAA::translateCDS(int seqrank) | |
244 | 244 | { |
245 | 245 | char* descript; |
246 | 246 | if (seqrank < 2 || seqrank > raa_data->nseq) |
275 | 275 | } |
276 | 276 | |
277 | 277 | |
278 | Sequence* RAA::translateCDS(const string& name) throw (BadCharException) | |
278 | Sequence* RAA::translateCDS(const string& name) | |
279 | 279 | { |
280 | 280 | int rank; |
281 | 281 | rank = raa_isenum(raa_data, (char*)name.c_str()); |
302 | 302 | } |
303 | 303 | |
304 | 304 | |
305 | RaaList* RAA::processQuery(const string& query, const string& listname) throw (string) | |
305 | RaaList* RAA::processQuery(const string& query, const string& listname) | |
306 | 306 | { |
307 | 307 | char* message; |
308 | 308 | int type, rank; |
328 | 328 | } |
329 | 329 | |
330 | 330 | |
331 | RaaList* RAA::createEmptyList(const string& listname, const string& kind) throw (int) | |
331 | RaaList* RAA::createEmptyList(const string& listname, const string& kind) | |
332 | 332 | { |
333 | 333 | int err, lrank; |
334 | 334 | char type, * p = 0, * q = 0; |
551 | 551 | }; |
552 | 552 | |
553 | 553 | |
554 | void* RAA::prepareGetAnyFeature(int seqrank, const string& featurekey) throw (string) | |
554 | void* RAA::prepareGetAnyFeature(int seqrank, const string& featurekey) | |
555 | 555 | { |
556 | 556 | char* p, * line; |
557 | 557 | int l; |
96 | 96 | * 4: database is currently not available for remote connection\n |
97 | 97 | * 7: not enough memory |
98 | 98 | */ |
99 | RAA(const std::string& dbname, int port = 5558, const std::string& server = "pbil.univ-lyon1.fr") throw (int); | |
99 | RAA(const std::string& dbname, int port = 5558, const std::string& server = "pbil.univ-lyon1.fr"); | |
100 | 100 | |
101 | 101 | /** |
102 | 102 | * @brief Direct constructor: opens a network connection to a database server, without specifying a database. |
112 | 112 | * 2: cannot create connection with server\n |
113 | 113 | * 7: not enough memory |
114 | 114 | */ |
115 | RAA(int port = 5558, const std::string& server = "pbil.univ-lyon1.fr") throw (int); | |
115 | RAA(int port = 5558, const std::string& server = "pbil.univ-lyon1.fr"); | |
116 | 116 | |
117 | 117 | /** |
118 | 118 | * @brief Destructor: closes both the database access, if any, and the network connection. |
271 | 271 | * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an |
272 | 272 | * exception when translated to protein. |
273 | 273 | */ |
274 | Sequence* translateCDS(int seqrank) throw (BadCharException); // TODO add comment to Sequence | |
274 | Sequence* translateCDS(int seqrank); // TODO add comment to Sequence | |
275 | 275 | |
276 | 276 | /** |
277 | 277 | * @brief Returns the full protein translation of a protein-coding nucleotide database (sub)sequence. |
284 | 284 | * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an |
285 | 285 | * exception when translated to protein. |
286 | 286 | */ |
287 | Sequence* translateCDS(const std::string& name) throw (BadCharException); | |
287 | Sequence* translateCDS(const std::string& name); | |
288 | 288 | |
289 | 289 | /** |
290 | 290 | * @brief Returns the amino acid translation of the first codon of a protein-coding (sub)sequence. |
315 | 315 | * @return The resulting list of matching database elements. |
316 | 316 | * @throw string If error, the string is a message describing the error cause. |
317 | 317 | */ |
318 | RaaList* processQuery(const std::string& query, const std::string& listname) throw (std::string); | |
318 | RaaList* processQuery(const std::string& query, const std::string& listname); | |
319 | 319 | |
320 | 320 | /** |
321 | 321 | * @brief Creates an empty list with specified name. |
327 | 327 | * @throw int 3: a list with same name already existed; it is left unchanged.\n |
328 | 328 | * 4: the server cannot create more lists. |
329 | 329 | */ |
330 | RaaList* createEmptyList(const std::string& listname, const std::string& kind = RaaList::LIST_SEQUENCES) throw (int); | |
330 | RaaList* createEmptyList(const std::string& listname, const std::string& kind = RaaList::LIST_SEQUENCES); | |
331 | 331 | |
332 | 332 | /** |
333 | 333 | * @brief Deletes a list and calls its destructor. |
405 | 405 | * @return An opaque pointer to be transmitted to functions getNextFeature() or interruptGetAnyFeature(). |
406 | 406 | * @throw string A message indicating the cause of the error. |
407 | 407 | */ |
408 | void* prepareGetAnyFeature(int seqrank, const std::string& featurekey) throw (std::string); | |
408 | void* prepareGetAnyFeature(int seqrank, const std::string& featurekey); | |
409 | 409 | |
410 | 410 | /** |
411 | 411 | * @brief Successively returns features specified in a previous prepareGetAnyFeature() call. |
3191 | 3191 | char raa_translate_init_codon(raa_db_access* raa_current_db, int numseq) |
3192 | 3192 | { |
3193 | 3193 | char codon[4]; |
3194 | int point, special_init = TRUE, val, gc, phase, rank = 0; | |
3194 | int point, special_init = TRUE, val, gc = 0, phase = 0, rank = 0; | |
3195 | 3195 | |
3196 | 3196 | if (raa_current_db->num_5_partial == 0) |
3197 | 3197 | raa_current_db->num_5_partial = raa_iknum(raa_current_db, "5'-PARTIAL", raa_key); |