Changeset 2891


Ignore:
Timestamp:
Dec 9, 2012, 12:53:49 AM (9 years ago)
Author:
Peter
Message:

check for samtools in configure; create bam file in 'make check' if we have samtools. refs #729

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2882 r2891  
    294294  YAT_CHECK_LIBBAM([LIBS="$BAM_LIBS $LIBS"],
    295295    [YAT_MSG_ERROR([Library 'libbam' was not found])])
    296 ])
    297 AM_CONDITIONAL([HAVE_SAMTOOLS], [test x"$with_samtools" = x"yes"])
     296  AC_PATH_PROG([SAMTOOLS], [samtools], [false])
     297  AC_ARG_VAR([SAMTOOLS], [Tools for alignment in the SAM format])
     298], [
     299  SAMTOOLS=false
     300])
     301AM_CONDITIONAL([HAVE_LIBBAM], [test x"$with_samtools" = x"yes"])
     302AM_CONDITIONAL([HAVE_SAMTOOLS], [test x"$SAMTOOLS" != x"false"])
     303AC_SUBST([SAMTOOLS])
     304AS_IF([test x"$SAMTOOLS" = x"false"], [], [
     305  AC_DEFINE([HAVE_SAMTOOLS], [1], [Define if samtools executable is available])
     306])
    298307
    299308#support for large files
  • trunk/test/Makefile.am

    r2888 r2891  
    246246test/data/wenni_result.data \
    247247test/data/wenni_weight.data
     248
     249CLEANFILES += test/data/.dirstamp
     250CLEANFILES += test/data/foo.bam
     251CLEANFILES += test/data/foo.supported.bam
     252CLEANFILES += test/data/foo.supported.bam.bai
     253
     254check_DATA  = test/data/foo.sorted.bam
     255check_DATA += test/data/foo.sorted.bam.bai
     256
     257test/data/.dirstamp:
     258  @$(MKDIR_P) test/data
     259  @: > $@
     260
     261if HAVE_SAMTOOLS
     262test/data/foo.bam: test/data/foo.sam test/data/.dirstamp
     263  $(SAMTOOLS) view -Sb test/data/foo.sam -o $@
     264
     265test/data/foo.sorted.bam: test/data/foo.bam
     266  $(SAMTOOLS) sort -o test/data/foo.bam test/data/foo.sorted
     267
     268test/data/foo.sorted.bam.bai: test/data/foo.sorted.bam
     269  $(SAMTOOLS) index test/data/foo.sorted.bam
     270else
     271test/data/foo.sorted.bam:; : > $@
     272test/data/foo.sorted.bam.bai:; : > $@
     273endif
  • trunk/yat/omic/Makefile.am

    r2883 r2891  
    2020# along with yat. If not, see <http://www.gnu.org/licenses/>.
    2121
    22 if HAVE_SAMTOOLS
     22if HAVE_LIBBAM
    2323yat_libyat_la_SOURCES += yat/omic/BamFile.cc
    2424yat_libyat_la_SOURCES += yat/omic/BamHeader.cc
     
    3434yat_libyat_la_SOURCES += yat/omic/GFF3.cc
    3535
    36 if HAVE_SAMTOOLS
     36if HAVE_LIBBAM
    3737nobase_include_HEADERS += $(srcdir)/yat/omic/BamFile.h
    3838nobase_include_HEADERS += $(srcdir)/yat/omic/BamHeader.h
Note: See TracChangeset for help on using the changeset viewer.