Skip to content

Commit

Permalink
Updates to developer instructions for getting docs to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreybarrick committed Apr 4, 2023
1 parent 7283e64 commit 01644bb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Version 0.38.0
* If you are using the current generation of Nanopore long read data, we recommend using the
--nanopore option, which sets read mapping parameters that speed up the analysis and filters
out predictions in error-prone homopolymer repeats of 4 or more bases.
* The MacOSX executable is now universal (should run on both Intel and M1 macs).
* Changed how reads that map equally to the reference and new junction get resolved to
eliminate junctions that could get assigned high frequencies due to very little evidence,
particularly in polymorphism mode. This approach is more conservative and may decrease the
Expand Down
42 changes: 23 additions & 19 deletions DEVELOPER
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ $ make
$ make install

A special script exists for building a new breseq release package on the current system. If you are working
on Linux, you can run this directly in this setup. If you are making a MacOSX release, you must also install
universal versions of the libraries using the alternative MacPorts instructions below.
on Linux, you can run this directly in this setup. If you are making a MacOSX release, you must use MacPorts
to install universal versions of the libraries using the alternative instructions below.

$./binarydist.sh

Expand All @@ -43,39 +43,43 @@ $ make test
Note that conda installs a compiler in this environment that will interfere with building breseq
in this environment, so only use it for the tests or running breseq on your samples!

=== Developing with XCode on MacOSX or Building MacOSX Universal Binaries===

Open the included project file: src/c/breseq.xcodeproj
=== Building MacOSX Universal Binaries and Documentation ===

For compiling a universal binary, breseq needs a universal library (compiled for both arm64 and x86_64).
XCode expects this to be installed in /opt/local/lib. Install MacPorts then use it to install these:
XCode expects this to be installed in /opt/local/lib.

Install MacPorts then use it to install this:
$ sudo port install zlib +universal

You need to uninstall the architecture specific version installed by conda:
$ conda activate breseq-dev
$ conda uninstall zlib
If you are building the documentation, you also need sphinx, latex, and some of their extras:
$ sudo port install texlive texlive-latex-extra py311-sphinx py311-sphinxcontrib-jsmath
(Note: installing these through conda doesn't seem to catch all the dependencies as of 2023-04-04.)

You will need to change your breseq-dev conda environment to find these files
$ conda env create -f dev-environment.yml
$ conda activate breseq-dev
$ conda env config vars set CFLAGS="-I/opt/local/include -I${CONDA_PREFIX}/include"
$ conda env config vars set CPPFLAGS="-I/opt/local/include -I${CONDA_PREFIX}/include"
$ conda env config vars set LDFLAGS="-L/opt/local/lib -L${CONDA_PREFIX}/lib"
$ conda activate breseq-dev
$ conda env config vars list
Next, you will need to change your environment to find these library and header files by adding
these lines to your shell config file (Example: ~/.zshrc)

export CFLAGS="$CFLAGS -I/opt/local/include"
export CPPFLAGS="$CPPFLAGS -I/opt/local/include"
export LDFLAGS="$LDFLAGS -L/opt/local/lib"

At this point, you can compile a release with MacOSX universal binaries.
$./binarydist.sh

=== Developing with XCode ===

Open the included project file: src/c/breseq.xcodeproj

For compiling a universal binary, breseq needs a universal library (compiled for both arm64 and x86_64).
XCode expects this to be installed in /opt/local/lib. Install MacPorts then use it to install these:

$ 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

=== Debugging in XCode ===

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
Expand Down
1 change: 1 addition & 0 deletions binarydist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ BINARYLOCALDIR=${BRESEQVERSIONSTRING}-${BINARYNAME}
BINARYDIR=${PWD}/${BINARYLOCALDIR}
rm -rf ${BINARYDIR} ${BINARYDIR}.tgz

echo "${BINARYLOCALDIR}"
echo "${BINARYDIR}"
echo "./configure --without-libunwind --prefix=\"${BINARYDIR}\" --enable-static CFLAGS=\"${ARCHFLAGS} ${CFLAGS}\" CXXFLAGS=\"${ARCHFLAGS} ${CXXFLAGS}\" LDFLAGS=\"${ARCHFLAGS} ${LDFLAGS}\""
./configure --without-libunwind --prefix="${BINARYDIR}" --enable-static CFLAGS="${ARCHFLAGS} ${CFLAGS}" CXXFLAGS="${ARCHFLAGS} ${CXXFLAGS}" LDFLAGS="${ARCHFLAGS} ${LDFLAGS}"
Expand Down
6 changes: 3 additions & 3 deletions dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ dependencies:
- automake
- libtool
- m4
- sphinx
- sphinxcontrib-jsmath
- texlive-core
# - sphinx
# - sphinxcontrib-jsmath
# - texlive-core

0 comments on commit 01644bb

Please sign in to comment.