Codebase list libbpp-raa / upstream/2.4.0
New upstream version 2.4.0 Julien Y. Dutheil 6 years ago
7 changed file(s) with 58 addition(s) and 47 deletion(s). Raw diff Collapse all Expand all
3535 # library implements.
3636 # In other words, the library implements all the interface numbers in the
3737 # range from number current - age to current.
38 SET(${PROJECT_NAME}_VERSION_CURRENT "3")
38 SET(${PROJECT_NAME}_VERSION_CURRENT "4")
3939 SET(${PROJECT_NAME}_VERSION_REVISION "0")
4040 SET(${PROJECT_NAME}_VERSION_AGE "0")
4141
5353 endif (CMAKE_INSTALL_PREFIX)
5454
5555 include (GNUInstallDirs)
56 find_package (bpp-seq 11.0.0 REQUIRED)
56 find_package (bpp-seq 12.0.0 REQUIRED)
5757
5858 # Find the zlib installation (define zlib imported target)
5959 find_package(ZLIB REQUIRED)
103103 # Packager
104104 SET(CPACK_PACKAGE_NAME "libbpp-raa")
105105 SET(CPACK_PACKAGE_VENDOR "Bio++ Development Team")
106 SET(CPACK_PACKAGE_VERSION "2.3.1")
106 SET(CPACK_PACKAGE_VERSION "2.4.0")
107107 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")
110110 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Remote Acnuc Access library")
111111 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
112112 SET(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt")
115115 # /!\ This assumes that an external build is used
116116 SET(CPACK_SOURCE_IGNORE_FILES
117117 "/build/"
118 "/html/"
119 "/BppRaa.tag"
118120 "/\\\\.git/"
119121 "/\\\\.gitignore"
120122 ${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
07 10/05/17 -*- version 2.3.0 -*-
18
29 28/09/14 -*- Version 2.2.0 -*-
3737 # could be handy for archiving the generated documentation or if some version
3838 # control system is used.
3939
40 PROJECT_NUMBER = 2.3.0
40 PROJECT_NUMBER = 2.4.0
4141
4242 # Using the PROJECT_BRIEF tag one can provide an optional one line description
4343 # 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
30 %define _prefix /usr
41
5 URL: http://biopp.univ-montp2.fr/
2 URL: https://github.com/BioPP/bpp-raa
63
7 Name: %{_basename}
8 Version: %{_version}
9 Release: %{_release}
4 Name: bpp-raa
5 Version: 2.4.0
6 Release: 1%{?dist}
107 License: CECILL-2.0
118 Vendor: The Bio++ Project
12 Source: http://biopp.univ-montp2.fr/repos/sources/%{_basename}-%{_version}.tar.gz
9 Source: %{name}-%{version}.tar.gz
1310 Summary: Bio++ Remote Acnuc Access library
1411 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}
1714
18 BuildRoot: %{_builddir}/%{_basename}-root
15 BuildRoot: %{_builddir}/%{name}-root
1916 BuildRequires: cmake >= 2.8.11
2017 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}
2522 BuildRequires: zlib >= 1.2.3
2623 BuildRequires: zlib-devel >= 1.2.3
2724
3229 This library contains utilitary and classes to query public database (GenBank, EMBL, SwissProt, etc) using acnuc.
3330 It is part of the Bio++ project.
3431
35 %package -n libbpp-raa3
32 %package -n libbpp-raa4
3633 Summary: Bio++ Remote Acnuc Access library
3734 Group: Development/Libraries/C and C++
3835
39 %description -n libbpp-raa3
36 %description -n libbpp-raa4
4037 This library contains utilitary and classes to query public database (GenBank, EMBL, SwissProt, etc) using acnuc.
4138 It is part of the Bio++ project.
4239
4340 %package -n libbpp-raa-devel
4441 Summary: Libraries, includes to develop applications with %{_basename}
4542 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}
5148 Requires: zlib >= 1.2.3
5249 Requires: zlib-devel >= 1.2.3
5350
5451 %description -n libbpp-raa-devel
5552 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}
5756
5857 %prep
5958 %setup -q
7069 %clean
7170 rm -rf $RPM_BUILD_ROOT
7271
73 %post -n libbpp-raa3 -p /sbin/ldconfig
72 %post -n libbpp-raa4 -p /sbin/ldconfig
7473
75 %postun -n libbpp-raa3 -p /sbin/ldconfig
74 %postun -n libbpp-raa4 -p /sbin/ldconfig
7675
77 %files -n libbpp-raa3
76 %files -n libbpp-raa4
7877 %defattr(-,root,root)
7978 %doc AUTHORS.txt COPYING.txt INSTALL.txt ChangeLog
8079 %{_prefix}/%{_lib}/lib*.so.*
9089 %{_prefix}/include/*
9190
9291 %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.
9395 * Tue Jun 06 2017 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.3.1-1
9496 - Increased interface number
9597 * Wed May 10 2017 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.3.0-1
1414 using namespace std;
1515 using namespace bpp;
1616
17 RAA::RAA(const string& dbname, int port, const string& server) throw (int)
17 RAA::RAA(const string& dbname, int port, const string& server)
1818 {
1919 kw_pattern = NULL;
2020 current_address.div = -1;
2626 }
2727
2828
29 RAA::RAA(int port, const string& server) throw (int)
29 RAA::RAA(int port, const string& server)
3030 {
3131 kw_pattern = NULL;
3232 int error = raa_open_socket((char*)server.c_str(), port, (char*)"Bio++", &raa_data);
240240 }
241241
242242
243 Sequence* RAA::translateCDS(int seqrank) throw (BadCharException)
243 Sequence* RAA::translateCDS(int seqrank)
244244 {
245245 char* descript;
246246 if (seqrank < 2 || seqrank > raa_data->nseq)
275275 }
276276
277277
278 Sequence* RAA::translateCDS(const string& name) throw (BadCharException)
278 Sequence* RAA::translateCDS(const string& name)
279279 {
280280 int rank;
281281 rank = raa_isenum(raa_data, (char*)name.c_str());
302302 }
303303
304304
305 RaaList* RAA::processQuery(const string& query, const string& listname) throw (string)
305 RaaList* RAA::processQuery(const string& query, const string& listname)
306306 {
307307 char* message;
308308 int type, rank;
328328 }
329329
330330
331 RaaList* RAA::createEmptyList(const string& listname, const string& kind) throw (int)
331 RaaList* RAA::createEmptyList(const string& listname, const string& kind)
332332 {
333333 int err, lrank;
334334 char type, * p = 0, * q = 0;
551551 };
552552
553553
554 void* RAA::prepareGetAnyFeature(int seqrank, const string& featurekey) throw (string)
554 void* RAA::prepareGetAnyFeature(int seqrank, const string& featurekey)
555555 {
556556 char* p, * line;
557557 int l;
9696 * 4: database is currently not available for remote connection\n
9797 * 7: not enough memory
9898 */
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");
100100
101101 /**
102102 * @brief Direct constructor: opens a network connection to a database server, without specifying a database.
112112 * 2: cannot create connection with server\n
113113 * 7: not enough memory
114114 */
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");
116116
117117 /**
118118 * @brief Destructor: closes both the database access, if any, and the network connection.
271271 * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an
272272 * exception when translated to protein.
273273 */
274 Sequence* translateCDS(int seqrank) throw (BadCharException); // TODO add comment to Sequence
274 Sequence* translateCDS(int seqrank); // TODO add comment to Sequence
275275
276276 /**
277277 * @brief Returns the full protein translation of a protein-coding nucleotide database (sub)sequence.
284284 * @throw BadCharException In rare cases, the CDS may contain an internal stop codon that raises an
285285 * exception when translated to protein.
286286 */
287 Sequence* translateCDS(const std::string& name) throw (BadCharException);
287 Sequence* translateCDS(const std::string& name);
288288
289289 /**
290290 * @brief Returns the amino acid translation of the first codon of a protein-coding (sub)sequence.
315315 * @return The resulting list of matching database elements.
316316 * @throw string If error, the string is a message describing the error cause.
317317 */
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);
319319
320320 /**
321321 * @brief Creates an empty list with specified name.
327327 * @throw int 3: a list with same name already existed; it is left unchanged.\n
328328 * 4: the server cannot create more lists.
329329 */
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);
331331
332332 /**
333333 * @brief Deletes a list and calls its destructor.
405405 * @return An opaque pointer to be transmitted to functions getNextFeature() or interruptGetAnyFeature().
406406 * @throw string A message indicating the cause of the error.
407407 */
408 void* prepareGetAnyFeature(int seqrank, const std::string& featurekey) throw (std::string);
408 void* prepareGetAnyFeature(int seqrank, const std::string& featurekey);
409409
410410 /**
411411 * @brief Successively returns features specified in a previous prepareGetAnyFeature() call.
31913191 char raa_translate_init_codon(raa_db_access* raa_current_db, int numseq)
31923192 {
31933193 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;
31953195
31963196 if (raa_current_db->num_5_partial == 0)
31973197 raa_current_db->num_5_partial = raa_iknum(raa_current_db, "5'-PARTIAL", raa_key);