Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Commit 2371f66

Browse files
committed
Merge branch 'dev'
2 parents 1dcfa66 + 50611bb commit 2371f66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+290
-687
lines changed

.travis.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
sudo: false
22
language: cpp
3-
compiler:
4-
- gcc
5-
- clang
6-
install:
7-
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
3+
4+
matrix:
5+
include:
6+
- os: linux
7+
dist: trusty
8+
- os: osx
9+
osx_image: xcode8
10+
- os: osx
11+
osx_image: xcode7.2
12+
13+
#install:
14+
#- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
815
addons:
916
apt:
1017
sources:
@@ -23,8 +30,16 @@ addons:
2330
notifications:
2431
email: false
2532

33+
before_install:
34+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
35+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install tbb ; fi
2636
script:
2737
- export LD_LIBRARY_PATH=$HOME/lib
38+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
2839
- ./configure --prefix=$HOME && make && make install
29-
- make test
40+
- make check
41+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then make check; fi
42+
#For some reason, make check on OS X + conda fails to respect LD_LIBRARY_PATH,
43+
#so we'll run the tests manually
44+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cd test; for i in $(find . -type f -perm +111);do $i -r detailed;cd .. ;done; fi
3045
- $HOME/bin/libsequenceConfig --version

README.md

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,18 @@ The revision history of the library is [here](REVISION_HISTORY.md). The documen
5757

5858
### Obtaining the master branch
5959
You have a few options:
60-
<ol>
61-
<li> Clone the repo (best option): git clone https://github.com/molpopgen/libsequence.git</li>
62-
<li> Click on "Download Zip" at https://github.com/molpopgen/libsequence </li>
63-
</ol>
60+
61+
* Clone the repo (best option): git clone https://github.com/molpopgen/libsequence.git
62+
* Click on "Download Zip" at https://github.com/molpopgen/libsequence
63+
6464

6565
### Obtaining a specific release
6666
Again, a few options:
67-
<ol>
68-
<li> Click on "Releases" at https://github.com/molpopgen/libsequence, then download the one you want </li>
69-
<li> Clone the repo (see previous section)</li>
70-
<ol>
71-
<li> Get a list of releases by saying "git tag -l" </li>
72-
<li> Checkout the release you want. For example "git checkout 1.8.0"</li>
73-
</ol>
74-
</ol>
67+
68+
* Click on "Releases" at https://github.com/molpopgen/libsequence, then download the one you want
69+
* Clone the repo (see previous section)
70+
* Get a list of releases by saying "git tag -l"
71+
* Checkout the release you want. For example "git checkout 1.8.0"
7572

7673
## Installation
7774

@@ -109,6 +106,24 @@ make
109106
sudo make install
110107
~~~
111108

109+
The build conditions can be adjusted via the usual environment variables. To compile an optimized "release" build:
110+
111+
~~~
112+
./configure CXXFLAGS="-O3 -DNDEBUG"
113+
~~~
114+
115+
To compile a debugger-friendly build:
116+
117+
~~~
118+
./configure CXXFLAGS="-O0 -g"
119+
~~~
120+
121+
To change the compiler, set the C and C++ compiler variables:
122+
123+
~~~
124+
./configure CC=gcc CXX=g++
125+
~~~
126+
112127
#### Compiling unit tests and examples
113128

114129
To compile unit testing suite and example programs
@@ -136,13 +151,15 @@ cd test && sh runTests.sh
136151

137152
Some users may not have the dependent libraries installed in the standard locations on their systems. Note that "standard" means wherever the compiler system looks for header files during compilation and libraries during linking. This scenario is common on OS X systems where users have used some sort of "system" to install various libraries rather than installing from source directly. In order to accomodate such situations, the user must provide the correct path to the include and lib directories. For example, assume that the dependend libraries are in /opt on your system. You would install libsequence as follows:
138153

139-
CXXFLAGS=-I/opt/include LDFLAGS="$LDFLAGS -l/opt/lib" ./configure
154+
CPPFLAGS=-I/opt/include LDFLAGS="$LDFLAGS -l/opt/lib" ./configure
140155

141156
make
142157

158+
~~~
143159
sudo make install
160+
~~~
144161

145-
Note that the modification of LDFLAGS prepends the current value of LDFLAGS if it exists. This allows for scenarios where the system's search path for libraries may have been modified by the user or sysadmin via a modification of that shell variable. (One could also do the same with CXXFLAGS, FYI.)
162+
Note that the modification of LDFLAGS prepends the current value of LDFLAGS if it exists. This allows for scenarios where the system's search path for libraries may have been modified by the user or sysadmin via a modification of that shell variable. (One could also do the same with CPPFLAGS, FYI.)
146163

147164
### Installing libsequence locally
148165

@@ -152,15 +169,18 @@ If you do not have permission to "sudo make install", you can install the librar
152169

153170
Then, when compiling any program using libsequence, you need to add
154171

155-
> -I$HOME/include
156-
172+
~~~
173+
-I$HOME/include
174+
~~~
157175
to any compilation commands and
158176

159-
> -L$HOME/lib
177+
~~~
178+
-L$HOME/lib
179+
~~~
160180

161181
to any linking commands.
162182

163-
When running programs linking to any of the above run-time libraries, and depending on your system, you may also need to adjust variables like LD _ LIBRARY _ PATH to prepend $HOME/lib to them, etc., but you'll need to figure that out on case-by-case basis, as different systems can behave quite differently.
183+
When running programs linking to any of the above run-time libraries, and depending on your system, you may also need to adjust variables like LD_LIBRARY_PATH to prepend $HOME/lib to them, etc., but you'll need to figure that out on case-by-case basis, as different systems can behave quite differently.
164184

165185
### Another installation option (not supported by the libsequence author)
166186

REVISION_HISTORY.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This document lists major changes between tags/releases of libsequence. The following caveat is important:
66

7-
If you see a section below referring to libseqeunce version X, and no version X exists as a release, then you must consider the info here inaccurate. In such cases, the list of changes may refer to planned changes for a future release which may or may not be implemented yet in either the master or some development branch.
7+
If you see a section below referring to libsequence version X, and no version X exists as a release, then you must consider the info here inaccurate. In such cases, the list of changes may refer to planned changes for a future release which may or may not be implemented yet in either the master or some development branch.
88

99
## Moving towards a "2.0" release: ABI compatibility in flux
1010

@@ -30,6 +30,11 @@ However:
3030

3131
1. Sequence/SeqRegexes.hpp -- not working. This will not be fixed until GCC supports <regex>. The function is now currently implemented in a non-regex manner, which is lame, but it works.
3232

33+
## libsequence 1.9.1
34+
35+
* Sequence::SeqException was removed. Exceptions from namespace std are preferred, and are easier to wrap in other languages.
36+
* Sequence::PolySNP::ThetaL throws exception if outrgroup not present
37+
3338
## libsequence 1.9.0
3439

3540
* Fixed issues with Sequence::Comeron95 that made it impossible to allocate on the stack.

Sequence/AlignStream.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ long with libsequence. If not, see <http://www.gnu.org/licenses/>.
2626

2727
#include <Sequence/Alignment.hpp>
2828
#include <Sequence/Seq.hpp>
29-
#include <Sequence/SeqExceptions.hpp>
3029
#include <type_traits>
3130
#include <utility>
3231
#include <string>
32+
#include <stdexcept>
3333

3434
/*! \file AlignStream.hpp
3535
@brief declaration of virtual base class for alignment streams (Sequence::AlignStream)
@@ -148,15 +148,15 @@ namespace Sequence
148148
for these iterators evaluates to
149149
std::vector<T>::const_iterator, any vector<T>
150150
can be the data source
151-
\exception Sequence::SeqException is thrown
151+
\exception std::runtime_error is thrown
152152
if all data elements in the range (beg,end]
153153
are not of the same length
154154
*/
155155
void assign(const_iterator beg,const_iterator end);
156156
/*!
157157
Assign via a move operation
158158
159-
\exception Sequence::SeqException is thrown
159+
\exception std::runtime_error is thrown
160160
if all data elements are not of the same length
161161
*/
162162
void assign( std::vector<T> && _data);

Sequence/Alignment.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ long with libsequence. If not, see <http://www.gnu.org/licenses/>.
2727
#include <fstream>
2828
#include <vector>
2929
#include <string>
30-
#include <Sequence/SeqExceptions.hpp>
31-
30+
#include <stdexcept>
3231
/*! \file Alignment.hpp
3332
@brief Declaration of namespace Sequence::Alignment
3433
*/

Sequence/Comparisons.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ long with libsequence. If not, see <http://www.gnu.org/licenses/>.
3737
#include <string>
3838
#include <algorithm>
3939
#include <type_traits>
40-
#include <Sequence/SeqExceptions.hpp>
4140
#include <Sequence/SeqEnums.hpp>
4241

4342
namespace Sequence

Sequence/FST.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ long with libsequence. If not, see <http://www.gnu.org/licenses/>.
2828
#include <set>
2929
#include <memory>
3030
#include <Sequence/stateCounter.hpp>
31-
#include <Sequence/SeqExceptions.hpp>
3231

3332
/*! \file FST.hpp
3433
@brief delcaration of a class (Sequence::FST) to analyze population structure

Sequence/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pkginclude_HEADERS = AlignStream.hpp\
3535
Seq.hpp\
3636
SeqConstants.hpp\
3737
SeqEnums.hpp\
38-
SeqExceptions.hpp\
3938
SeqFunctors.hpp\
4039
SeqProperties.hpp\
4140
SeqRegexes.hpp\

Sequence/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ pkginclude_HEADERS = AlignStream.hpp\
369369
Seq.hpp\
370370
SeqConstants.hpp\
371371
SeqEnums.hpp\
372-
SeqExceptions.hpp\
373372
SeqFunctors.hpp\
374373
SeqProperties.hpp\
375374
SeqRegexes.hpp\

Sequence/PolyTable.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ long with libsequence. If not, see <http://www.gnu.org/licenses/>.
5353
#include <type_traits>
5454
#include <functional>
5555
#include <memory>
56-
#include <Sequence/SeqExceptions.hpp>
5756
#include <Sequence/polySiteVector.hpp>
5857
/*! \example PolyTableIterators.cc */
5958
namespace Sequence

0 commit comments

Comments
 (0)