3497 |
25 May 16 |
peter |
## $Id$ |
3497 |
25 May 16 |
peter |
2 |
# |
4298 |
05 Feb 23 |
peter |
# serial 11 (yat 0.21) |
3497 |
25 May 16 |
peter |
4 |
# |
4276 |
25 Jan 23 |
peter |
# Copyright (C) 2016, 2018, 2020, 2023 Peter Johansson |
3497 |
25 May 16 |
peter |
6 |
# |
3497 |
25 May 16 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
3497 |
25 May 16 |
peter |
8 |
# |
3497 |
25 May 16 |
peter |
# The yat library is free software; you can redistribute it and/or |
3497 |
25 May 16 |
peter |
# modify it under the terms of the GNU General Public License as |
3497 |
25 May 16 |
peter |
# published by the Free Software Foundation; either version 3 of the |
3497 |
25 May 16 |
peter |
# License, or (at your option) any later version. |
3497 |
25 May 16 |
peter |
13 |
# |
3497 |
25 May 16 |
peter |
# The yat library is distributed in the hope that it will be useful, |
3497 |
25 May 16 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3497 |
25 May 16 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3497 |
25 May 16 |
peter |
# General Public License for more details. |
3497 |
25 May 16 |
peter |
18 |
# |
3497 |
25 May 16 |
peter |
# You should have received a copy of the GNU General Public License |
3497 |
25 May 16 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
3497 |
25 May 16 |
peter |
21 |
|
3885 |
25 Mar 20 |
peter |
# YAT_CHECK_HTSLIB |
3885 |
25 Mar 20 |
peter |
23 |
# =================== |
3885 |
25 Mar 20 |
peter |
# This is a wrapper macro primarily written for yat. For other |
3885 |
25 Mar 20 |
peter |
# packages the sub-macros called within here and defined below are |
3885 |
25 Mar 20 |
peter |
# probably more useful. |
3497 |
25 May 16 |
peter |
27 |
# |
3885 |
25 Mar 20 |
peter |
# This macro adds a configure option --without-htslib. If option is |
3885 |
25 Mar 20 |
peter |
# not provided checks for zlib header and lib are performed, checks |
3885 |
25 Mar 20 |
peter |
# for htslib headers and lib are performed. |
3885 |
25 Mar 20 |
peter |
31 |
|
3885 |
25 Mar 20 |
peter |
# In addition, checks if a samtools program is available and whether |
3885 |
25 Mar 20 |
peter |
# 'samtools --version' and 'samtools fasta' are available and |
3885 |
25 Mar 20 |
peter |
# propagate the results with AM_CONDITIONAL, AC_SUBST and |
3885 |
25 Mar 20 |
peter |
# AC_DEFINE. Similarly checks if bcftools program is available. |
3497 |
25 May 16 |
peter |
36 |
AC_DEFUN([YAT_CHECK_HTSLIB], |
3497 |
25 May 16 |
peter |
37 |
[ |
3497 |
25 May 16 |
peter |
# HTSLIB API available from http://www.htslib.org/ |
3497 |
25 May 16 |
peter |
39 |
AC_ARG_WITH([htslib], |
3497 |
25 May 16 |
peter |
40 |
[AS_HELP_STRING([--without-htslib], [disable htslib support])], |
3497 |
25 May 16 |
peter |
41 |
[], |
3883 |
24 Mar 20 |
peter |
42 |
[with_htslib=yes]) |
3497 |
25 May 16 |
peter |
43 |
|
3497 |
25 May 16 |
peter |
44 |
AS_IF([test x"$with_htslib" != x"no"], [ |
3497 |
25 May 16 |
peter |
45 |
_YAT_CHECK_ZLIB |
4276 |
25 Jan 23 |
peter |
46 |
_YAT_CHECK_HTSLIB([$1]) |
4003 |
15 Oct 20 |
peter |
47 |
YAT_VAR_BAM_CIGAR_TABLE([ |
4003 |
15 Oct 20 |
peter |
48 |
AC_DEFINE([HAVE_BAM_CIGAR_TABLE], [1], |
4003 |
15 Oct 20 |
peter |
49 |
[Define to 1 if bam_cigar_table is available]) |
4003 |
15 Oct 20 |
peter |
50 |
]) |
3497 |
25 May 16 |
peter |
51 |
]) |
3497 |
25 May 16 |
peter |
52 |
_YAT_PROG_SAMTOOLS |
3763 |
19 Oct 18 |
peter |
53 |
_YAT_PROG_BCFTOOLS |
3497 |
25 May 16 |
peter |
54 |
|
3497 |
25 May 16 |
peter |
# propagate some results to 'Makefile' and 'config.h' |
3497 |
25 May 16 |
peter |
56 |
AM_CONDITIONAL([HAVE_HTSLIB], [test x"$with_htslib" = x"yes"]) |
3890 |
26 Mar 20 |
peter |
57 |
AC_SUBST([have_htslib], [$with_htslib]) |
3497 |
25 May 16 |
peter |
58 |
AM_CONDITIONAL([HAVE_SAMTOOLS_EXECUTABLE], [test x"$SAMTOOLS" != x"false"]) |
3497 |
25 May 16 |
peter |
59 |
AC_SUBST([SAMTOOLS]) |
3497 |
25 May 16 |
peter |
60 |
AS_IF([test x"$SAMTOOLS" = x"false"], [], [ |
3497 |
25 May 16 |
peter |
61 |
AC_DEFINE([HAVE_SAMTOOLS_EXECUTABLE], [1], |
3497 |
25 May 16 |
peter |
62 |
[Define if samtools executable is available]) |
3497 |
25 May 16 |
peter |
63 |
]) |
3497 |
25 May 16 |
peter |
64 |
AM_CONDITIONAL([HAVE_SAMTOOLS_FASTA_EXECUTABLE], |
3497 |
25 May 16 |
peter |
65 |
[test x"$yat_cv_samtools_fasta" = x"ok"]) |
3497 |
25 May 16 |
peter |
66 |
AS_IF([test x"$yat_cv_samtools_fasta" = x"ok"], [ |
3497 |
25 May 16 |
peter |
67 |
AC_DEFINE([HAVE_SAMTOOLS_FASTA_EXECUTABLE], [1], |
3497 |
25 May 16 |
peter |
68 |
[Define if samtools fasta is available]) |
3497 |
25 May 16 |
peter |
69 |
]) |
3497 |
25 May 16 |
peter |
70 |
|
3763 |
19 Oct 18 |
peter |
71 |
AM_CONDITIONAL([HAVE_BCFTOOLS_EXECUTABLE], [test x"$BCFTOOLS" != x"false"]) |
3763 |
19 Oct 18 |
peter |
72 |
AC_SUBST([BCFTOOLS]) |
3763 |
19 Oct 18 |
peter |
73 |
AS_IF([test x"$BCFTOOLS" = x"false"], [], [ |
3763 |
19 Oct 18 |
peter |
74 |
AC_DEFINE([HAVE_BCFTOOLS_EXECUTABLE], [1], |
3763 |
19 Oct 18 |
peter |
75 |
[Define if bcftools executable is available]) |
3763 |
19 Oct 18 |
peter |
76 |
]) |
3763 |
19 Oct 18 |
peter |
77 |
|
3728 |
16 Mar 18 |
peter |
78 |
]) # YAT_CHECK_HTSLIB |
3497 |
25 May 16 |
peter |
79 |
|
3497 |
25 May 16 |
peter |
80 |
|
4276 |
25 Jan 23 |
peter |
# YAT_CHECK_HTS([action-if-found], [action-if-not-found], [min_version]) |
3885 |
25 Mar 20 |
peter |
82 |
# ===================== |
3885 |
25 Mar 20 |
peter |
# if header <htslib/hts.h> and libhts exist execute action-if-found, |
3885 |
25 Mar 20 |
peter |
# otherwise execute action-if-not-found |
4276 |
25 Jan 23 |
peter |
85 |
# |
4276 |
25 Jan 23 |
peter |
# If min_version is not empty, check that version of hts is at least |
4276 |
25 Jan 23 |
peter |
# min_version. |
3885 |
25 Mar 20 |
peter |
88 |
AC_DEFUN([YAT_CHECK_HTS], |
3885 |
25 Mar 20 |
peter |
89 |
[ |
4276 |
25 Jan 23 |
peter |
90 |
YAT_HEADER_HTS([ |
4276 |
25 Jan 23 |
peter |
91 |
YAT_CHECK_HTS_VERSION([$3], [ |
4276 |
25 Jan 23 |
peter |
92 |
YAT_LIB_HTS([$1], [$2]) |
4276 |
25 Jan 23 |
peter |
93 |
], [ |
4276 |
25 Jan 23 |
peter |
94 |
$2 |
4276 |
25 Jan 23 |
peter |
95 |
]) |
4276 |
25 Jan 23 |
peter |
96 |
], [ |
4276 |
25 Jan 23 |
peter |
97 |
$2 |
4276 |
25 Jan 23 |
peter |
98 |
]) |
3885 |
25 Mar 20 |
peter |
99 |
]) |
3885 |
25 Mar 20 |
peter |
100 |
|
3885 |
25 Mar 20 |
peter |
101 |
|
3885 |
25 Mar 20 |
peter |
# YAT_HEADER_HTS([action-if-found], [action-if-not-found]) |
3885 |
25 Mar 20 |
peter |
103 |
# ===================== |
3885 |
25 Mar 20 |
peter |
# Check if header 'htslib/hts.h' is available. If available execute |
3885 |
25 Mar 20 |
peter |
# action-if-found; otherwise execute action-if-not-found |
3885 |
25 Mar 20 |
peter |
106 |
AC_DEFUN([YAT_HEADER_HTS], |
3885 |
25 Mar 20 |
peter |
107 |
[ |
3885 |
25 Mar 20 |
peter |
108 |
YAT_CHECK_HEADERS([htslib/hts.h], [$1], [$2]) |
3885 |
25 Mar 20 |
peter |
109 |
]) # YAT_HEADER_HTS |
3885 |
25 Mar 20 |
peter |
110 |
|
3885 |
25 Mar 20 |
peter |
111 |
|
4276 |
25 Jan 23 |
peter |
# YAT_CHECK_HTS_VERSION([min-version], [action-if-success], [action-if-failed]) |
4276 |
25 Jan 23 |
peter |
113 |
# ===================== |
4276 |
25 Jan 23 |
peter |
# The macro uses HTS_VERSION, which was introduced in htslib 1.10, so |
4276 |
25 Jan 23 |
peter |
# min-version must at least be 1.10 to work as expected. |
4276 |
25 Jan 23 |
peter |
116 |
AC_DEFUN([YAT_CHECK_HTS_VERSION], |
4276 |
25 Jan 23 |
peter |
117 |
[ |
4277 |
25 Jan 23 |
peter |
118 |
AC_REQUIRE([AC_PROG_GREP]) |
4277 |
25 Jan 23 |
peter |
119 |
AC_REQUIRE([AC_PROG_SED]) |
4277 |
25 Jan 23 |
peter |
# trim off leading and trailing whitespaces |
4277 |
25 Jan 23 |
peter |
121 |
yat_wanted_hts_version=`AS_ECHO(["$1"]) \ |
4277 |
25 Jan 23 |
peter |
122 |
| $SED 's/^[[ \t]]*//' | $SED 's/[[ \t]]*$//'` |
4277 |
25 Jan 23 |
peter |
123 |
AS_VAR_IF([yat_wanted_hts_version], [], [ |
4277 |
25 Jan 23 |
peter |
# if wanted_hts_version is empty, just do action-if-success |
4276 |
25 Jan 23 |
peter |
125 |
$2 |
4277 |
25 Jan 23 |
peter |
126 |
], [ # otherwise run compilation test |
4277 |
25 Jan 23 |
peter |
127 |
yat_hts_version_major=`AS_ECHO([$yat_wanted_hts_version]) \ |
4277 |
25 Jan 23 |
peter |
128 |
| $SED 's/\([[^.]][[^.]]*\)\..*/\1/'` |
4277 |
25 Jan 23 |
peter |
129 |
yat_hts_version_minor=`AS_ECHO([$yat_wanted_hts_version]) \ |
4277 |
25 Jan 23 |
peter |
130 |
| $SED 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` |
4277 |
25 Jan 23 |
peter |
131 |
yat_hts_version_micro=`AS_ECHO([$yat_wanted_hts_version]) \ |
4277 |
25 Jan 23 |
peter |
132 |
| $SED 's/[[^.]][[^.]]*.[[^.]][[^.]]*.\(.*\)/\1/'` |
4276 |
25 Jan 23 |
peter |
133 |
AS_VAR_IF([yat_hts_version_micro], [], [yat_hts_version_micro=0]) |
4277 |
25 Jan 23 |
peter |
134 |
|
4277 |
25 Jan 23 |
peter |
# Check that version number are integers before applying arithmetics |
4277 |
25 Jan 23 |
peter |
136 |
m4_foreach([YAT_x_version], |
4277 |
25 Jan 23 |
peter |
137 |
[[$yat_hts_version_major], |
4277 |
25 Jan 23 |
peter |
138 |
[$yat_hts_version_minor], |
4277 |
25 Jan 23 |
peter |
139 |
[$yat_hts_version_micro]], |
4277 |
25 Jan 23 |
peter |
140 |
[AS_IF([AS_ECHO([YAT_x_version]) \ |
4277 |
25 Jan 23 |
peter |
141 |
| $GREP "^[[0-9]][[0-9]]*$" > /dev/null], [], |
4277 |
25 Jan 23 |
peter |
142 |
[AC_MSG_ERROR([invalid hts min-version: $yat_wanted_hts_version])]) |
4277 |
25 Jan 23 |
peter |
143 |
]) |
4277 |
25 Jan 23 |
peter |
144 |
|
4277 |
25 Jan 23 |
peter |
145 |
AS_VAR_ARITH([yat_hts_pp_version], |
4277 |
25 Jan 23 |
peter |
146 |
[100000 \* $yat_hts_version_major + 100 \* $yat_hts_version_minor + $yat_hts_version_micro]) |
4277 |
25 Jan 23 |
peter |
147 |
|
4298 |
05 Feb 23 |
peter |
148 |
AC_CACHE_CHECK([if HTS verson >= $yat_wanted_hts_version ($yat_hts_pp_version)], |
4276 |
25 Jan 23 |
peter |
149 |
[yat_cv_hts_version], |
4276 |
25 Jan 23 |
peter |
150 |
[yat_cv_hts_version=no |
4276 |
25 Jan 23 |
peter |
151 |
AC_COMPILE_IFELSE([ |
4276 |
25 Jan 23 |
peter |
152 |
AC_LANG_PROGRAM([@%:@include <htslib/hts.h>], [ |
4276 |
25 Jan 23 |
peter |
153 |
@%:@ifndef HTS_VERSION |
4276 |
25 Jan 23 |
peter |
154 |
@%:@error HTS_VERSION not defined; probably too old hts.h |
4276 |
25 Jan 23 |
peter |
155 |
@%:@endif |
4276 |
25 Jan 23 |
peter |
156 |
|
4276 |
25 Jan 23 |
peter |
157 |
@%:@if HTS_VERSION < $yat_hts_pp_version |
4276 |
25 Jan 23 |
peter |
158 |
@%:@error HTS_VERSION smaller than $yat_hts_pp_version |
4276 |
25 Jan 23 |
peter |
159 |
@%:@endif |
4276 |
25 Jan 23 |
peter |
160 |
]) |
4276 |
25 Jan 23 |
peter |
161 |
], [ |
4276 |
25 Jan 23 |
peter |
162 |
yat_cv_hts_version=yes |
4276 |
25 Jan 23 |
peter |
163 |
], [ |
4276 |
25 Jan 23 |
peter |
164 |
yat_cv_hts_version=no |
4276 |
25 Jan 23 |
peter |
165 |
]) |
4276 |
25 Jan 23 |
peter |
166 |
]) |
4276 |
25 Jan 23 |
peter |
# action |
4276 |
25 Jan 23 |
peter |
168 |
AS_VAR_IF([yat_cv_hts_version], [yes], [$2], [$3]) |
4276 |
25 Jan 23 |
peter |
169 |
]) |
4276 |
25 Jan 23 |
peter |
170 |
]) # YAT_CHECK_HTS_VERSION |
4276 |
25 Jan 23 |
peter |
171 |
|
4276 |
25 Jan 23 |
peter |
172 |
|
3885 |
25 Mar 20 |
peter |
# YAT_LIB_HTS([action-if-found], [action-if-not-found]) |
3885 |
25 Mar 20 |
peter |
174 |
# ===================== |
3885 |
25 Mar 20 |
peter |
# Check if function 'hts_version()' is available. First try linking |
3885 |
25 Mar 20 |
peter |
# against LIBS only, if hts_version() not found, try linking against |
3885 |
25 Mar 20 |
peter |
# -lhts as well. If hts_version() is found, execute |
3885 |
25 Mar 20 |
peter |
# action-if-not-found; otherwise execute action-if-not-found. |
3885 |
25 Mar 20 |
peter |
179 |
AC_DEFUN([YAT_LIB_HTS], |
3885 |
25 Mar 20 |
peter |
180 |
[ |
3885 |
25 Mar 20 |
peter |
181 |
HTS_LIBS=no |
3885 |
25 Mar 20 |
peter |
182 |
YAT_SEARCH_LIBS([hts_version], [hts], |
3885 |
25 Mar 20 |
peter |
183 |
[HTS_LIBS=$yat_cv_search_hts_version |
3885 |
25 Mar 20 |
peter |
184 |
$1], |
3885 |
25 Mar 20 |
peter |
185 |
[$2]) |
3885 |
25 Mar 20 |
peter |
186 |
]) # YAT_LIB_HTS |
3885 |
25 Mar 20 |
peter |
187 |
|
3885 |
25 Mar 20 |
peter |
188 |
|
4003 |
15 Oct 20 |
peter |
# YAT_VAR_BAM_CIGAR_TABLE([action-if-found], [action-if-not-found]) |
4003 |
15 Oct 20 |
peter |
190 |
# ===================== |
4003 |
15 Oct 20 |
peter |
# Check if variable bam_cigar_table is available. |
4003 |
15 Oct 20 |
peter |
192 |
AC_DEFUN([YAT_VAR_BAM_CIGAR_TABLE], |
4003 |
15 Oct 20 |
peter |
193 |
[ |
4003 |
15 Oct 20 |
peter |
194 |
AC_CACHE_CHECK([if bam_cigar_table is available], |
4003 |
15 Oct 20 |
peter |
195 |
[yat_cv_var_bam_cigar_table], |
4003 |
15 Oct 20 |
peter |
196 |
[AC_COMPILE_IFELSE([ |
4003 |
15 Oct 20 |
peter |
197 |
AC_LANG_PROGRAM([@%:@include <htslib/sam.h>], |
4003 |
15 Oct 20 |
peter |
198 |
[int8_t x = bam_cigar_table@<:@0@:>@;]) |
4003 |
15 Oct 20 |
peter |
199 |
], [ |
4003 |
15 Oct 20 |
peter |
200 |
yat_cv_var_bam_cigar_table=yes |
4003 |
15 Oct 20 |
peter |
201 |
], [ |
4003 |
15 Oct 20 |
peter |
202 |
yat_cv_var_bam_cigar_table=no |
4003 |
15 Oct 20 |
peter |
203 |
]) |
4003 |
15 Oct 20 |
peter |
204 |
]) |
4003 |
15 Oct 20 |
peter |
205 |
AS_VAR_IF([yat_cv_var_bam_cigar_table], [yes], [$1], [$2]) |
4003 |
15 Oct 20 |
peter |
206 |
]) |
4003 |
15 Oct 20 |
peter |
207 |
|
4003 |
15 Oct 20 |
peter |
208 |
|
3497 |
25 May 16 |
peter |
### Private macros ### |
3497 |
25 May 16 |
peter |
210 |
|
3497 |
25 May 16 |
peter |
211 |
AC_DEFUN([_YAT_CHECK_HTSLIB], |
3497 |
25 May 16 |
peter |
212 |
[ |
3883 |
24 Mar 20 |
peter |
# Check if htslib is available. |
3497 |
25 May 16 |
peter |
214 |
YAT_CHECK_HTS([ |
3883 |
24 Mar 20 |
peter |
215 |
AC_DEFINE([YAT_HAVE_HTSLIB], [1], [Define to 1 if htslib is available]) |
3883 |
24 Mar 20 |
peter |
216 |
LIBS="$HTS_LIBS $LIBS" |
3497 |
25 May 16 |
peter |
217 |
have_hts=yes; |
3497 |
25 May 16 |
peter |
218 |
],[ |
4276 |
25 Jan 23 |
peter |
219 |
AC_MSG_FAILURE([htslib version $1 (or newer) was not found]) |
4276 |
25 Jan 23 |
peter |
220 |
],[ dnl |
4276 |
25 Jan 23 |
peter |
221 |
$1 dnl |
3497 |
25 May 16 |
peter |
222 |
]) |
3497 |
25 May 16 |
peter |
223 |
|
3497 |
25 May 16 |
peter |
224 |
YAT_CHECK_LA_LIBS([ |
3883 |
24 Mar 20 |
peter |
225 |
@%:@ include <htslib/sam.h> |
3870 |
24 Feb 20 |
peter |
226 |
void my_func(void) { hts_version(); } |
3883 |
24 Mar 20 |
peter |
227 |
], [$HTS_LIBS $LIBZ $user_LIBS], [$HTS_LIBS], [YAT_STATIC_LIBS]) |
3497 |
25 May 16 |
peter |
228 |
]) |
3497 |
25 May 16 |
peter |
229 |
|
3497 |
25 May 16 |
peter |
230 |
|
3497 |
25 May 16 |
peter |
# _YAT_CHECK_ZLIB |
3497 |
25 May 16 |
peter |
232 |
AC_DEFUN([_YAT_CHECK_ZLIB], |
3497 |
25 May 16 |
peter |
233 |
[ |
3497 |
25 May 16 |
peter |
234 |
AC_CHECK_HEADER([zlib.h], [], |
3497 |
25 May 16 |
peter |
235 |
[AC_MSG_FAILURE([header file 'zlib.h' was not found])]) |
3728 |
16 Mar 18 |
peter |
236 |
YAT_SEARCH_LIBS([inflateEnd], [z], |
3728 |
16 Mar 18 |
peter |
237 |
[LIBZ=$yat_cv_search_inflateEnd |
3728 |
16 Mar 18 |
peter |
238 |
LIBS="$LIBZ $LIBS"], |
3497 |
25 May 16 |
peter |
239 |
[AC_MSG_FAILURE([library 'libz' was not found])]) |
3497 |
25 May 16 |
peter |
240 |
|
3497 |
25 May 16 |
peter |
241 |
YAT_CHECK_LA_LIBS([ |
3497 |
25 May 16 |
peter |
242 |
@%:@include <zlib.h> |
3497 |
25 May 16 |
peter |
243 |
int my_func(void) |
3497 |
25 May 16 |
peter |
244 |
{ z_streamp zs; inflateEnd(zs); return 0; } |
3497 |
25 May 16 |
peter |
245 |
], [$LIBZ $user_LIBS], [$LIBZ], [YAT_STATIC_LIBS]) |
3497 |
25 May 16 |
peter |
246 |
]) # _YAT_CHECK_ZLIB |
3497 |
25 May 16 |
peter |
247 |
|
3497 |
25 May 16 |
peter |
248 |
|
3497 |
25 May 16 |
peter |
# sets shell variables 'SAMTOOLS' and 'have_samtools_fasta' |
3497 |
25 May 16 |
peter |
250 |
AC_DEFUN([_YAT_PROG_SAMTOOLS], |
3497 |
25 May 16 |
peter |
251 |
[ |
3497 |
25 May 16 |
peter |
252 |
have_samtools_fasta=no |
3497 |
25 May 16 |
peter |
253 |
AC_PATH_PROG([SAMTOOLS], [samtools], [false]) |
3497 |
25 May 16 |
peter |
# check that found samtools is modern i.e. has --version (introduced in 1.2). |
3497 |
25 May 16 |
peter |
255 |
AS_IF([test x"$SAMTOOLS" != x"false"], [ |
3497 |
25 May 16 |
peter |
256 |
_YAT_PROG_SAMTOOLS_VERSION([ |
3497 |
25 May 16 |
peter |
# if samtools --version works, look for samtools fasta |
3497 |
25 May 16 |
peter |
258 |
_YAT_PROG_SAMTOOLS_FASTA([have_samtools_fasta=yes], []) |
3497 |
25 May 16 |
peter |
259 |
], [ |
3497 |
25 May 16 |
peter |
260 |
SAMTOOLS=false |
3497 |
25 May 16 |
peter |
261 |
]) |
3497 |
25 May 16 |
peter |
262 |
]) |
3497 |
25 May 16 |
peter |
263 |
AC_ARG_VAR([SAMTOOLS], [Tools for alignment in the SAM format]) |
3497 |
25 May 16 |
peter |
264 |
]) |
3497 |
25 May 16 |
peter |
265 |
|
3497 |
25 May 16 |
peter |
266 |
|
3763 |
19 Oct 18 |
peter |
# sets shell variables 'BCFTOOLS' |
3763 |
19 Oct 18 |
peter |
268 |
AC_DEFUN([_YAT_PROG_BCFTOOLS], |
3763 |
19 Oct 18 |
peter |
269 |
[ |
3763 |
19 Oct 18 |
peter |
270 |
AC_PATH_PROG([BCFTOOLS], [bcftools], [false]) |
3763 |
19 Oct 18 |
peter |
271 |
AC_ARG_VAR([BCFTOOLS], [Tools for manipulating VCFs]) |
3763 |
19 Oct 18 |
peter |
272 |
]) |
3763 |
19 Oct 18 |
peter |
273 |
|
3763 |
19 Oct 18 |
peter |
274 |
|
3497 |
25 May 16 |
peter |
# _YAT_PROG_SAMTOOLS_VERSION(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) |
3497 |
25 May 16 |
peter |
276 |
AC_DEFUN([_YAT_PROG_SAMTOOLS_VERSION], |
3497 |
25 May 16 |
peter |
277 |
[ |
3497 |
25 May 16 |
peter |
278 |
AC_CACHE_CHECK([samtools --version], |
3497 |
25 May 16 |
peter |
279 |
[yat_cv_samtools_version], |
3497 |
25 May 16 |
peter |
280 |
[YAT_RUN_LOG([$SAMTOOLS --version], |
3497 |
25 May 16 |
peter |
281 |
[yat_cv_samtools_version=ok], |
3497 |
25 May 16 |
peter |
282 |
[yat_cv_samtools_version=no]) |
3497 |
25 May 16 |
peter |
283 |
]) |
3497 |
25 May 16 |
peter |
284 |
AS_IF([test x"$yat_cv_samtools_version" = x"ok"], [$1], [$2]) |
3497 |
25 May 16 |
peter |
285 |
]) # _YAT_PROG_SAMTOOLS_VERSION |
3497 |
25 May 16 |
peter |
286 |
|
3497 |
25 May 16 |
peter |
287 |
|
3885 |
25 Mar 20 |
peter |
# _YAT_PROG_SAMTOOLS_FASTA(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) |
3497 |
25 May 16 |
peter |
289 |
AC_DEFUN([_YAT_PROG_SAMTOOLS_FASTA], |
3497 |
25 May 16 |
peter |
290 |
[ |
3497 |
25 May 16 |
peter |
291 |
AC_CACHE_CHECK([samtools fasta], |
3497 |
25 May 16 |
peter |
292 |
[yat_cv_samtools_fasta], |
3497 |
25 May 16 |
peter |
293 |
[YAT_RUN_LOG([$SAMTOOLS fasta -1 conftest_1.fa \ |
3497 |
25 May 16 |
peter |
294 |
-2 conftest_2.fa $srcdir/test/data/foo.sam], |
3497 |
25 May 16 |
peter |
295 |
[yat_cv_samtools_fasta=ok], |
3497 |
25 May 16 |
peter |
296 |
[yat_cv_samtools_fasta=no]) |
3497 |
25 May 16 |
peter |
297 |
]) |
3497 |
25 May 16 |
peter |
298 |
AS_IF([test x"$yat_cv_samtools_fasta" = x"ok"], [$1], [$2]) |
3497 |
25 May 16 |
peter |
299 |
]) # _YAT_PROG_SAMTOOLS_FASTA |