Changeset 3763


Ignore:
Timestamp:
Oct 19, 2018, 9:42:38 AM (6 months ago)
Author:
Peter
Message:

refs #905

Some naive tests for class VcfFile?. Also add a test VCF file. If
bcftools is available a compressed vcf is generated.

Update README with pointer to set BCFTOOLS via commandline and also
mention boost::iostream.

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/README

    r3734 r3763  
    104104expected to be found in `DIR/include/` and boost libraries are
    105105expected to be found in `DIR/lib/`. The `configure` script tries to
    106 detect libraries `boost_thread` and `boost_thread`. The name of a
    107 boost library typically depends on its configuration (see boost's
    108 naming convention) and there may be several versions/configurations of
    109 the same library installed. The `configure` tries to pick one of the
    110 available libraries, wchih can be overridden with `./configure
    111 --with-boost-thread=foo` and `configure --with-boost-system=foo`,
     106detect libraries `boost_thread`, `boost_thread` and
     107`boost_iostreams`. The name of a boost library typically depends on
     108its configuration (see boost's naming convention) and there may be
     109several versions/configurations of the same library installed. The
     110`configure` tries to pick one of the available libraries, wchih can be
     111overridden with `./configure --with-boost-thread=foo`, `configure
     112--with-boost-system=foo`, and `--with-boost-iostreams=foo`,
    112113respectively. The check for boost can be turned off with
    113114`--without-boost`.
     
    146147SAMTOOLS=/path/to/samtools`.
    147148
     149The bcftools program is needed for some tests. If bcftools is not
     150found by configure, these tests will be skipped. If you have bcftools
     151available outside your PATH, you can help configure to find it with
     152`./configure BCFTOOLS=/path/to/bcftools`.
     153
    148154=== ZLIB ===
    149155
  • trunk/m4/yat_check_htslib.m4

    r3728 r3763  
    11## $Id$
    22#
    3 # serial 2 (yat 0.16)
     3# serial 3 (yat 0.16)
    44#
    55#   Copyright (C) 2016, 2018 Peter Johansson
     
    4343])
    4444_YAT_PROG_SAMTOOLS
     45_YAT_PROG_BCFTOOLS
    4546
    4647# propagate some results to 'Makefile' and 'config.h'
     
    5960  AC_DEFINE([HAVE_SAMTOOLS_FASTA_EXECUTABLE], [1],
    6061            [Define if samtools fasta is available])
     62])
     63
     64AM_CONDITIONAL([HAVE_BCFTOOLS_EXECUTABLE], [test x"$BCFTOOLS" != x"false"])
     65AC_SUBST([BCFTOOLS])
     66AS_IF([test x"$BCFTOOLS" = x"false"], [], [
     67  AC_DEFINE([HAVE_BCFTOOLS_EXECUTABLE], [1],
     68            [Define if bcftools executable is available])
    6169])
    6270
     
    147155
    148156
     157# sets shell variables 'BCFTOOLS'
     158AC_DEFUN([_YAT_PROG_BCFTOOLS],
     159[
     160  AC_PATH_PROG([BCFTOOLS], [bcftools], [false])
     161  AC_ARG_VAR([BCFTOOLS], [Tools for manipulating VCFs])
     162])
     163
     164
    149165# _YAT_PROG_SAMTOOLS_VERSION(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
    150166AC_DEFUN([_YAT_PROG_SAMTOOLS_VERSION],
  • trunk/test/Makefile.am

    r3759 r3763  
    113113  test/vcf.test \
    114114  test/vcf_compare.test \
     115  test/vcf_file.test \
     116  test/vcf_file2.test \
    115117  test/vcf_header.test \
    116118  test/vector_expression.test \
     
    177179test/pileup.log: test/data/foo.sorted.bam
    178180test/static_test.log: $(srcdir)/m4/yat.m4 $(shell_test_deps)
     181
     182test/vcf_file.log: $(srcdir)/test/data/foo.vcf
     183test/vcf_file2.log: test/data/foo.vcf.gz
     184
    179185test/yat_config_test.log: build_support/yat-config \
    180186  build_support/for_installation/yat-config $(shell_test_deps)
     
    328334CLEANFILES += test/data/foo.fasta
    329335CLEANFILES += test/data/foo.fasta.fai
     336CLEANFILES += test/data/foo.vcf.gz
    330337
    331338check_DATA  = test/data/foo.sorted.bam
     
    333340check_DATA += test/data/foo.fasta
    334341check_DATA += test/data/foo.fasta.fai
     342check_DATA += test/data/foo.vcf.gz
    335343
    336344test/data/.dirstamp:
     
    375383endif
    376384
     385if HAVE_BCFTOOLS_EXECUTABLE
     386test/data/foo.vcf.gz: test/data/foo.vcf
     387  $(AM_V_GEN)
     388  $(AM_V_at)$(BCFTOOLS) view $(srcdir)/test/data/foo.vcf -O z > $@
     389else
     390test/data/foo.fasta: test/data/.dirstamp
     391  $(AM_V_at): > $@
     392endif
     393
    377394test/lib/.dirstamp:
    378395  @$(MKDIR_P) test/lib
Note: See TracChangeset for help on using the changeset viewer.