-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved configuration, compilation and linking process. Added options to control whether or not to build junctools, and whether to dynamically link in boost. Improved the python detection. Added column in tab output to handle sample number Made GTF loading more flexible in junctools Fixed a bug interpreting mapsplice junction files Fixed a bug handling block sizes in bed files Fixed several travis issues
- Loading branch information
Showing
61 changed files
with
624 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
# Autoconf setup | ||
AC_PREREQ([2.68]) | ||
AC_INIT([portcullis],[1.0.0_beta5],[[email protected]],[portcullis],[http://www.earlham.ac.uk]) | ||
AC_INIT([portcullis],[1.0.0_beta6],[[email protected]],[portcullis],[http://www.earlham.ac.uk]) | ||
AC_CONFIG_SRCDIR([src/portcullis.cc]) | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
|
@@ -95,26 +95,34 @@ if test "$with_samtools" == no ; then | |
AC_MSG_ERROR([samtools not found]) | ||
fi | ||
|
||
#AM_PATH_PYTHON([], [], AC_MSG_ERROR([Python interpreter not found.])) | ||
AC_ARG_ENABLE([junctools], | ||
AS_HELP_STRING([--disable-junctools], [Disable build of python package junctools]), make_junctools="no", make_junctools="yes") | ||
|
||
AX_PYTHON_DEVEL([>= '3.1']) | ||
if [[ "${make_junctools}" == "yes" ]]; then | ||
|
||
AX_PYTHON_DEVEL([>= '3.1']) | ||
|
||
if [[ -z "${PYTHON_VERSION}" ]]; then | ||
AC_MSG_ERROR([Python3 not detected. If running on a debian system try "sudo apt-get install python3-dev".]) | ||
fi | ||
if [[ -z "${PYTHON_VERSION}" ]]; then | ||
AC_MSG_ERROR([Python3 not detected. If running on a debian system try "sudo apt-get install python3-dev".]) | ||
fi | ||
|
||
if [[ -z "${PYTHON_EXTRA_LIBS}" ]]; then | ||
AC_MSG_ERROR([Python3 detected but Python3 development library was not found. If running on a debian system try "sudo apt-get install python3-dev".]) | ||
fi | ||
if [[ -z "${PYTHON_EXTRA_LIBS}" ]]; then | ||
AC_MSG_ERROR([Python3 detected but Python3 development library was not found. If running on a debian system try "sudo apt-get install python3-dev".]) | ||
fi | ||
|
||
pybin=python${PYTHON_VERSION} | ||
pybin=python${PYTHON_VERSION} | ||
|
||
# Check for required python libraries | ||
AX_PYTHON_MODULE(numpy, [AC_MSG_ERROR([numpy not found])], ${pybin}) | ||
AX_PYTHON_MODULE(matplotlib, [AC_MSG_ERROR([matplotlib not found])], ${pybin}) | ||
AX_PYTHON_MODULE(scipy, [AC_MSG_ERROR([scipy not found])], ${pybin}) | ||
AX_PYTHON_MODULE(sphinx, [AC_MSG_ERROR([sphinx not found])], ${pybin}) | ||
AX_PYTHON_MODULE(sklearn, [AC_MSG_ERROR([sklearn not found])], ${pybin}) | ||
# Check for required python libraries | ||
#AX_PYTHON_MODULE(numpy, [AC_MSG_ERROR([numpy not found])], ${pybin}) | ||
#AX_PYTHON_MODULE(matplotlib, [AC_MSG_ERROR([matplotlib not found])], ${pybin}) | ||
#AX_PYTHON_MODULE(scipy, [AC_MSG_ERROR([scipy not found])], ${pybin}) | ||
#AX_PYTHON_MODULE(sphinx, [AC_MSG_ERROR([sphinx not found])], ${pybin}) | ||
#AX_PYTHON_MODULE(sklearn, [AC_MSG_ERROR([sklearn not found])], ${pybin}) | ||
|
||
|
||
fi | ||
AM_CONDITIONAL([MAKE_JUNCTOOLS], [test x$make_junctools = xyes]) | ||
AC_SUBST([MAKE_JUNCTOOLS]) | ||
|
||
|
||
# Check for sphinx executable to build documentation | ||
|
@@ -139,13 +147,10 @@ fi | |
AM_CONDITIONAL([MAKE_DOCS], [test x$sphinx = xyes]) | ||
AC_SUBST([MAKE_DOCS]) | ||
|
||
AC_ARG_ENABLE([junctools], | ||
AS_HELP_STRING([--disable-junctools], [Disable build of python package junctools])) | ||
|
||
AM_CONDITIONAL([MAKE_JUNCTOOLS], [test x$enable_junctools != xno]) | ||
AC_SUBST([MAKE_JUNCTOOLS]) | ||
|
||
## Check for boost (required) | ||
AC_ARG_ENABLE([dynamic-boost], AS_HELP_STRING([--enable-dynamic-boost], [Boost is statically linked by default. Use this option if you would prefer to dynamically link boost]), dynboost="yes", dynboost="no") | ||
AX_BOOST_BASE([1.52],, [AC_MSG_ERROR([Boost not found. Please ensure that boost is properly built and the BOOST_ROOT environment variable is set. Alternatively you can override BOOST_ROOT with the --with-boost option.])]) | ||
AX_BOOST_SYSTEM | ||
AX_BOOST_FILESYSTEM | ||
|
@@ -154,8 +159,26 @@ AX_BOOST_PROGRAM_OPTIONS | |
AX_BOOST_TIMER | ||
|
||
|
||
# Combine BOOST variables | ||
BOOST_LIBS="${BOOST_TIMER_STATIC_LIB} ${BOOST_CHRONO_STATIC_LIB} ${BOOST_FILESYSTEM_STATIC_LIB} ${BOOST_PROGRAM_OPTIONS_STATIC_LIB} ${BOOST_SYSTEM_STATIC_LIB}" | ||
# Combine BOOST variables (apart for BOOST_TEST) | ||
BOOST_DYN_LIBS="${BOOST_TIMER_LIB} ${BOOST_CHRONO_LIB} ${BOOST_FILESYSTEM_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} ${BOOST_SYSTEM_LIB}" | ||
AC_SUBST([BOOST_DYN_LIBS]) | ||
|
||
BOOST_STATIC_LIBS="${BOOST_TIMER_STATIC_LIB} ${BOOST_CHRONO_STATIC_LIB} ${BOOST_FILESYSTEM_STATIC_LIB} ${BOOST_PROGRAM_OPTIONS_STATIC_LIB} ${BOOST_SYSTEM_STATIC_LIB} " | ||
AC_SUBST([BOOST_STATIC_LIBS]) | ||
|
||
# Prefer static linking of boost. If one or more static libs are not present | ||
# (this happens with some default boost installations on some environments) then | ||
# use dynamic libs instead. | ||
if [[ "${dynboost}" == "yes" ]]; then | ||
BOOST_LIBS="${BOOST_DYN_LIBS}" | ||
else | ||
if [[ -z "${BOOST_TIMER_STATIC_LIB}" ]] || [[ -z "${BOOST_CHRONO_STATIC_LIB}" ]] || [[ -z "${BOOST_FILESYSTEM_STATIC_LIB}" ]] || [[ -z "${BOOST_PROGRAM_OPTIONS_STATIC_LIB}" ]] || [[ -z "${BOOST_SYSTEM_STATIC_LIB}" ]]; then | ||
AC_MSG_WARN([Not all static boost libraries could be found. Will use dynamic libraries instead.]) | ||
BOOST_LIBS="${BOOST_DYN_LIBS}" | ||
else | ||
BOOST_LIBS="${BOOST_STATIC_LIBS}" | ||
fi | ||
fi | ||
AC_SUBST([BOOST_LIBS]) | ||
|
||
LIBS="${SAVED_LIBS}" | ||
|
@@ -166,23 +189,28 @@ LIBS="${SAVED_LIBS}" | |
AM_CXXFLAGS="-g -g3 -gdwarf-4" | ||
AC_SUBST([AM_CXXFLAGS]) | ||
|
||
#AM_CPPFLAGS="${BOOST_CPPFLAGS} ${PYTHON_CPPFLAGS} ${DLIB_CPPFLAGS} ${ZLIB_CPPFLAGS}" | ||
AM_CPPFLAGS="${BOOST_CPPFLAGS} ${ZLIB_CPPFLAGS}" | ||
AC_SUBST([AM_CPPFLAGS]) | ||
|
||
#AM_LDFLAGS="${BOOST_LDFLAGS} ${PYTHON_EXTRA_LDFLAGS} ${ZLIB_LDFLAGS} ${PTHREAD_CFLAGS}" | ||
AM_LDFLAGS="${BOOST_LDFLAGS} ${PTHREAD_CFLAGS} ${ZLIB_LDFLAGS}" | ||
AC_SUBST([AM_LDFLAGS]) | ||
|
||
# Order is important! | ||
#AM_LIBS="${M_LIB} ${DL_LIB} ${BOOST_LIBS} ${PYTHON_EXTRA_LIBS} ${PYTHON_LIBS} ${RT_LIB} ${ZLIB_LIB} ${PTHREAD_LIBS}" | ||
AM_LIBS="${M_LIB} ${DL_LIB} ${BOOST_LIBS} ${RT_LIB} ${ZLIB_LIB} ${PTHREAD_LIBS}" | ||
AC_SUBST([AM_LIBS]) | ||
|
||
AC_OUTPUT | ||
|
||
if [[ "$make_junctools" == "no" ]]; then | ||
AC_MSG_NOTICE([Junctools not created at user request]) | ||
fi | ||
|
||
if [[ "${sphinx}" == "no" ]]; then | ||
AC_MSG_WARN([Sphinx not detected, or version is too old. Wont create documentation. You can still find the documentation online at: https://portcullis.readthedocs.io/en/latest/]) | ||
fi | ||
|
||
if [[ "${dynboost}" == "yes" ]]; then | ||
AC_MSG_NOTICE([Boost will be dynamically linked to your executable]) | ||
else | ||
AC_MSG_NOTICE([Building documentation with sphinx]) | ||
fi | ||
AC_MSG_NOTICE([Boost will be statically linked to your executable]) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.. _faq: | ||
|
||
|
||
Frequently Asked Questions | ||
========================== | ||
|
||
Can I reduce portcullis' memory usage? | ||
-------------------------------------- | ||
|
||
Portcullis is optimised to reduce memory usage where possible, so in most cases | ||
memory usage should not be an issue if you were able to align your reads in the first | ||
place. However, if you are encountering out of memory issues, there are a few factors | ||
that can influence memory usage in portcullis, particularly during the junction | ||
analysis stage. The first is the number of threads used, more threads require more | ||
memory. You can therefore reduce memory usage at the expense of runtime. Second, | ||
we have an ability to process additional metrics in the junction analysis stage | ||
called ``--extra``, this can require large amounts of memory, so unless you really | ||
need this option on (there should be no direct impact on the default filtering | ||
setup) the switch this off. Finally, the main driver for memory usage is the depth | ||
of the dataset, specifically highly covered junctions. Should have have tens of | ||
thousands of reads supporting a single junction, all these reads must be kept in | ||
memory. You can therefore reduce memory usage by pre-processing the BAM files to | ||
either cap the depth (you can use the `Kmer Analysis Toolkit <https://github.com/TGAC/KAT>`_ | ||
to identify high coverage kmers then remove reads associated with those kmers), | ||
or downsample using ``samtools view -s``. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ Contents: | |
using | ||
metrics | ||
junctools | ||
faq | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.