-
Notifications
You must be signed in to change notification settings - Fork 20
/
DEVELOPER
89 lines (61 loc) · 3.61 KB
/
DEVELOPER
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
=== Developing with Command-Line Compilation ===
To compile the repository version of the breseq source code, you must have a C/C++ compiler,
autotools, autoconf, m4, and several other GNU tools installed on your system. You can use conda
with the included dev-environment.yml file to install packages needed for building breseq.
$ conda env create -f dev-environment.yml
$ conda activate breseq-dev
# These commands set things up so compilation can find the installed libraries
$ conda env config vars set CFLAGS=-I${CONDA_PREFIX}/include
$ conda env config vars set CPPFLAGS=-I${CONDA_PREFIX}/include
$ conda env config vars set LDFLAGS=-L${CONDA_PREFIX}/lib
$ conda env config vars set WITH_STATIC_LIBZ=${CONDA_PREFIX}
$ conda activate breseq-dev
$ conda env config vars list
Note that this DOES NOT install a C/C++ compiler. One must be installed outside of conda.
Also, be careful on MacOSX to install the architecture matching your system!
If zlib is not found, you may need to create the environment this way,
so that the architecture of the library matches that of your system:
$ CONDA_SUBDIR=osx-`arch` conda env create -f dev-environment.yml
Building requires running the ./bootstrap script when you have a fresh version from the repository or
whenever the autoconf configuration files have changed, for example when a new source file has been
added to the project.
$ ./bootstrap
$ ./configure
$ make
$ make install
=== Consistency Test Instructions ===
The output of the consistency tests varies depending on different versions of bowtie2 and R. You should
use Conda with the included test-environment.yml file to install the current versions used for the consistency tests.
$ conda env create -f test-environment.yml
$ conda activate breseq-test
$ make test
Note that conda installs a compiler in this environment that will interfere with building breseq, so
only use it for the tests or running breseq on your samples!
=== Developing with XCode ===
Open the included project file: src/c/breseq.xcodeproj
For compiling a universal binary, breseq needs the require libaries (currentl libz) installed
under the prefix /opt/local. This is the default install location for MacPorts, which you can
use to install them, or you can install them there yourself.
If you do install with MacPorts, it you can install just for your architecture, or you can install
a universal version of the library using the +universal flaglike this.
$ sudo port install zlib +universal
Before compiling and debugging in in XCode, you need to run the first few commands of the command-line
instructions to generate Makefiles for building samtools external libraries.
$ ./bootstrap
$ ./configure
To run breseq with the XCode debugger, you must set the environmental variable PATH, within the
"executable" or "scheme" options, include the locations where you have R and bowtie2 installed.
You can find these with the 'which' shell command. Then set up a new Environment Variable within XCode
like this (it can be to where the breseq-run conda environment installed these tools):
PATH /Users/myusername/local/bin:$PATH
You may also want to set the working directory, and will definitely want to set the command line options
(which are the same as the command you would type in the shell, but omitting the initial "breseq")
breseq -r reference.gbk reads.fastq
becomes
Arguments: -r reference.gbk reads.fastq
=== Building Binaries for Distribution ===
A special script exists for building a MacOSX universal binary:
$ ./binarydist.sh
See the directions inside of this file on how to install zlib correctly for MacOSX.
To generate a source archive for distribution:
$ make distcheck