diff -Nru mira-3.9.18/.tarball-version mira-4.0/.tarball-version --- mira-3.9.18/.tarball-version 2013-07-01 18:41:08.000000000 +0000 +++ mira-4.0/.tarball-version 2014-02-02 17:08:32.000000000 +0000 @@ -1 +1 @@ -3.9.18 \ No newline at end of file +4.0 \ No newline at end of file diff -Nru mira-3.9.18/.version mira-4.0/.version --- mira-3.9.18/.version 2013-07-01 18:41:08.000000000 +0000 +++ mira-4.0/.version 2014-02-02 17:08:32.000000000 +0000 @@ -1 +1 @@ -3.9.18 \ No newline at end of file +4.0 \ No newline at end of file diff -Nru mira-3.9.18/HELP_WANTED mira-4.0/HELP_WANTED --- mira-3.9.18/HELP_WANTED 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/HELP_WANTED 2014-02-02 12:05:17.000000000 +0000 @@ -23,11 +23,6 @@ - some helper scripts to automatically download, quickly reformat and then assemble data from the NCBI SRA & trace archive or the ENSEMBL trace server would be nice (perl or Tcl preferred) -- multithreading: the Smith-Waterman alignments could be calculated in - parallel (not trivial, but should not be really hard either). Furthermore, - the task of building contigs could be distributed on 2 threads or even 2 - threads per independent contig (harder to realise). I did not find the time - to build this in yet. - and of course: feedback in any form, be it ideas, bug reports, success stories (or failures) etc. diff -Nru mira-3.9.18/INSTALL mira-4.0/INSTALL --- mira-3.9.18/INSTALL 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/INSTALL 2014-02-02 12:05:17.000000000 +0000 @@ -1,4 +1,5 @@ -Informationregarding building MIRA is in the README_build.html file +Information regarding building MIRA is in the "Definitive Guide to MIRA", +chapter "Installation." The following is taken straight out of the "GNU configure" documentation and applies to the non-MIRA specific switches of "configure" only. diff -Nru mira-3.9.18/Makefile.am mira-4.0/Makefile.am --- mira-3.9.18/Makefile.am 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/Makefile.am 2014-02-02 16:55:17.000000000 +0000 @@ -41,11 +41,13 @@ distclean-local: bclean -find . -name ".deps" -exec rm -rf {} \; -rm -rf OSXstatlibs + -rm -rf m4 -rm -rf Makefile Makefile.in aclocal.m4 config.status config.h config.h.in config.log configure autom4te.cache config.guess config.sub missing libtool -rm -rf config clean-local: bclean make -C distribution clean + make -C doc clean -rm -rf OSXstatlibs cvsclean: bclean diff -Nru mira-3.9.18/Makefile.in mira-4.0/Makefile.in --- mira-3.9.18/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -39,22 +39,19 @@ ChangeLog INSTALL NEWS THANKS config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -136,6 +133,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -801,11 +799,13 @@ distclean-local: bclean -find . -name ".deps" -exec rm -rf {} \; -rm -rf OSXstatlibs + -rm -rf m4 -rm -rf Makefile Makefile.in aclocal.m4 config.status config.h config.h.in config.log configure autom4te.cache config.guess config.sub missing libtool -rm -rf config clean-local: bclean make -C distribution clean + make -C doc clean -rm -rf OSXstatlibs cvsclean: bclean diff -Nru mira-3.9.18/README mira-4.0/README --- mira-3.9.18/README 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/README 2014-02-02 12:05:17.000000000 +0000 @@ -1,6 +1,6 @@ - Rheinfelden, Winter 2012 + Rheinfelden, Winter 2014 -MIRA version 3.9.x +MIRA version 4.x MIRA - The Genome and EST Sequence Assembly System @@ -19,26 +19,10 @@ Building ======== -Please consult the file README_build.html for more information on -pre-requisites, available options and walkthrough for common systems. There's -also a section on building documentation in the same file. - -Here's a short summary: ------------------------ -Note: if you are working on a GIT checkout, you need to have GNU -autoconf/automake tools and run "sh bootstrap.sh" from the top-level directory -first. - -Then, in the best case, building MIRA binaries is done in three steps (but -please consult the INSTALL file before doing so): - -1) ./configure -2) make -3) make install - -additionally for user documentation as HTML and PDF: - -4) make docs +Please consult the file "Definitive Guide to MIRA", chapter "Installation," +for more information on pre-requisites, available options and walkthrough for +common systems. There's also a section on building documentation in the same +file. Directory structure of the source package @@ -79,7 +63,7 @@ mira_talk@freelists.org To report bugs or ask for new features, please use the new ticketing system at: - http://sourceforge.net/apps/trac/mira-assembler/ + http://sourceforge.net/p/mira-assembler/tickets/ This ensures that requests do not get lost. diff -Nru mira-3.9.18/README_build.html mira-4.0/README_build.html --- mira-3.9.18/README_build.html 2013-07-01 18:41:09.000000000 +0000 +++ mira-4.0/README_build.html 2014-02-02 17:08:33.000000000 +0000 @@ -1,4 +1,4 @@ -Installing MIRA

Installing MIRA

Bastien Chevreux

MIRA Version 3.9.18

Table of Contents

1. +Installing MIRA

Installing MIRA

Bastien Chevreux

MIRA Version 4.0

Table of Contents

1. Where to fetch MIRA
2. Installing from a precompiled binary package @@ -43,8 +43,7 @@ SourceForge: http://sourceforge.net/projects/mira-assembler/

There you will normally find a couple of precompiled binaries -- usually - for Linux, sometimes also for Mac OSX -- or the source package for - compiling yourself. + for Linux and Mac OSX -- or the source package for compiling yourself.

Precompiled binary packages are named in the following way:

@@ -116,20 +115,20 @@

4.1.  Prerequisites

- The MIRA 3.x series works with quite old systems, the upcomming 4.x - series will need a C++11 compatible toolchain, i.e., systems starting + The MIRA 3.x series works with quite old systems, the upcoming 4.x + series will need a C++11 compatible tool chain, i.e., systems starting from the later half of 2011 should be OK. The requisites for compiling MIRA are:

  • gcc ≥ 4.6.2, with libstdc++6. You really want to use a simple - installation package preconfigured for your system, but in case you + installation package pre-configured for your system, but in case you want or have to install gcc yourself, please refer to http://gcc.gnu.org/ for more information on the GNU compiler collection.

  • BOOST library ≥ 1.46. Lower versions might work, but untested. You would need to change the checking in the configure script for this to run through. You really want to use a simple - installation package preconfigured for your system, but in case you + installation package pre-configured for your system, but in case you want or have to install BOOST yourself, please refer to http://www.boost.org/ for more information on the BOOST library.

    [Warning]Warning
    @@ -155,7 +154,7 @@
  • xxd. A small utility from the vim package.
  • - TCmalloc library ≥ 1.6. Not a prereqisite per se, but highly recommended: + TCmalloc library ≥ 1.6. Not a prerequisite per se, but highly recommended: MIRA will also work without, but memory requirements may then be a lot higher (40% and more).

    @@ -170,7 +169,7 @@ http://www.nongnu.org/libunwind/

  • For building the documentation, additional - prerequisites are from the DocBook toolchain: + prerequisites are from the DocBook tool chain:

    • xsltproc + docbook-xsl for HTML output
    • @@ -189,11 +188,12 @@ arcadia:/path/to/mira-4.0.0$ make arcadia:/path/to/mira-4.0.0$ make install

      This should install the following programs: -

      • mira
      • convert_project

      - Should the ./configure step fail for some reason or another, you should get - a message telling you at which step this happens and and either - install missing packages or tell configure where - it should search the packages it did not find, see also next section. +

      • mira
      • miraconvert
      • mirabait
      • miramem

      + Should the ./configure step fail for some reason or + another, you should get a message telling you at which step this + happens and and either install missing packages or tell + configure where it should search the packages it + did not find, see also next section.

    4.3.  Configure switches for MIRA

    @@ -205,7 +205,7 @@ BOOST configure switches for MIRA

    BOOST is maybe the most tricky library to get right in case it does - not come preconfigured for your system. The two main switches for + not come pre-configured for your system. The two main switches for helping to locate BOOST are probably --with-boost=[ARG] and --with-boost-libdir=LIB_DIR. Only if those @@ -223,9 +223,9 @@ bit platforms, setting the switch to 'no' forces the compiler to produce 32 bit executables (if possible)

    [Warning]Warning
    - As of MIRA 3.9.0, support for 32 bit plattforms is being + As of MIRA 3.9.0, support for 32 bit platforms is being slowly phased out. While MIRA should compile and also run fine - on 32 bit plattforms, I do not guarantee it anymore as I + on 32 bit platforms, I do not guarantee it anymore as I haven't used 32 bit systems in the last 5 years.
    --enable-warnings @@ -284,8 +284,8 @@ Once this is done, you can unpack and compile MIRA. For a dynamically linked version, use:

    -tar xvjf mira-3.9.1.tar.bz2
    -cd mira-3.9.1
    +tar xvjf mira-4.0.0.tar.bz2
    +cd mira-4.0.0
     ./configure
     make && make install

    For a statically linked version, just change the configure line from @@ -308,8 +308,8 @@ Once this is done, you can unpack and compile MIRA. For a dynamically linked version, use:

    -tar xvjf mira-3.9.1.tar.bz2
    -cd mira-3.9.1
    +tar xvjf mira-4.0.0.tar.bz2
    +cd mira-4.0.0
     ./configure
     make && make install

    For a statically linked version you will need to compile and install @@ -332,8 +332,8 @@ Once this is done, you can unpack and compile MIRA. For a dynamically linked version, use:

    -tar xvjf mira-3.9.1.tar.bz2
    -cd mira-3.9.1
    +tar xvjf mira-4.0.0.tar.bz2
    +cd mira-4.0.0
     ./configure
     make && make install

    For a statically linked version you will need to compile and install @@ -452,31 +452,49 @@

    This has been tested on OSX 10.6.4. You will need XCode (from Apple) and some packages from MacPorts. -

    1. Download and install a current XCode
    2. - Install BOOST from MacPorts. If you haven't already done so, install MacPorts - Basically, just a couple of easy steps, see - http://www.macports.org/install.php -

    3. Install BOOST: in a terminal, type

      sudo port install boost
      [Note]Note

      - for universal builds (e.g. for distributing MIRA with - universal binaries) rather do -

      -sudo port install boost +universal
      [Note]Note
      - This will take a while! It took ~1 hour on my - MacAir with a 1.86 GHz dual core processor, even without - universal. MacPros and server will be somehwat faster I suppose. -
    4. - Download the MIRA source package and unpack it -
    5. - Run ./configure and make. -
    [Note]If compiling or linking fails at first
    Depending on how - and where all the different packages were installed, the most useful - ./configure parameters will probably be - --enable-mirastatic, - --with-boost=... and maybe also - --with-boost-libdir=.... -
    [Note]Note
    - Building documentation needs the packages 'libxslt' and 'dblatex' from MacPorts. -

    6.2.  +

    1. Download and install a current XCode
    2. Download and compile a current GCC (≥ 4.8.2). Do NOT use a + GCC from MacPorts, it lacks a vitally important library + (libstdc++.a)
    3. Download, compile with GCC and install a current BOOST + library
    4. Download, compile with GCC and install all libraries MIRA + needs (flex, etc.pp). Follow the directions given in Section 5.4: “ + Compile everything from scratch + ” and Section 5.4, “ + Compile everything from scratch + ”
    5. Download the MIRA source package and unpack it
    6. + In the unpacked MIRA directory, create a directory called + OSXstatlibs. Into this directory, you need to + softlink all needed static libraries from GCC, BOOST, flex, + etc.pp. +

      + E.g., I have GCC installed in + /opt/localwgcc48/ and therefore I need to use + the following to link GCC static libraries: +

      +$ ln -s /opt/localwgcc48/lib/*a .

      + I have all the other libraries (BOOST, flex, etc.pp) installed in + /opt/biosw/, therefore I also need to link + these libraries: +

      +$ ln -s /opt/biosw/lib/*a .
    7. + Run ./configure --enable-mirastatic ... where + "..." stands for additional configure parameters needed and then + run make. +

      + Oh, and then pray. +

    [Note]Note
    + As of now (Feb. 2014), if you are on OSX 10.9 (Mavericks) and are + using GCC ≤ 4.8.2, the steps described above (including the prayer) + may not be enough. If an error occurs at the linking stage very late in + the MIRA building process, you need to patch a system file as described + in http://trac.macports.org/ticket/41033
    [Note]Note
    + A checkout from git needs some packages from MacPorts: +
    $ port install autoconf automake libtool
    [Note]Note

    + Building documentation needs the packages 'libxslt' and 'dblatex' from MacPorts. +

    $ port install dblatex libxslt

    + (Feb 2014) The above may fail while installing the one or other + dependency (for me it was while installing 'urw-fonts'). If that is + the case, repeat a couple of times and normally it should work. +

    6.2.  NetBSD 5 (i386)

    Contributed by Thomas Vaughan diff -Nru mira-3.9.18/THANKS mira-4.0/THANKS --- mira-3.9.18/THANKS 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/THANKS 2014-02-02 12:05:17.000000000 +0000 @@ -57,7 +57,8 @@ input/output routines Peter Cock Invaluable feedback for implementing SAM format and pointing out bugs, small and large - +Debian Med team For patches and packaging MIRA so that it is available for + Debian and all distributions based on Debian. ... and numerous people on the mira_talk mailing list who reported successes, bugs and/or quirks either in the build process or while running mira. diff -Nru mira-3.9.18/aclocal.m4 mira-4.0/aclocal.m4 --- mira-3.9.18/aclocal.m4 2013-07-01 18:38:12.000000000 +0000 +++ mira-4.0/aclocal.m4 2014-02-02 17:08:12.000000000 +0000 @@ -988,19 +988,19 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([config/m4/ax_boost_base.m4]) -m4_include([config/m4/ax_boost_filesystem.m4]) -m4_include([config/m4/ax_boost_iostreams.m4]) -m4_include([config/m4/ax_boost_regex.m4]) -m4_include([config/m4/ax_boost_system.m4]) -m4_include([config/m4/ax_boost_thread.m4]) -m4_include([config/m4/ax_check_zlib.m4]) -m4_include([config/m4/ax_cxx_have_std.m4]) -m4_include([config/m4/ax_cxx_have_stl.m4]) -m4_include([config/m4/ax_cxx_namespaces.m4]) -m4_include([config/m4/ax_lib_expat.m4]) -m4_include([config/m4/libtool.m4]) -m4_include([config/m4/ltoptions.m4]) -m4_include([config/m4/ltsugar.m4]) -m4_include([config/m4/ltversion.m4]) -m4_include([config/m4/lt~obsolete.m4]) +m4_include([m4/ax_boost_base.m4]) +m4_include([m4/ax_boost_filesystem.m4]) +m4_include([m4/ax_boost_iostreams.m4]) +m4_include([m4/ax_boost_regex.m4]) +m4_include([m4/ax_boost_system.m4]) +m4_include([m4/ax_boost_thread.m4]) +m4_include([m4/ax_check_zlib.m4]) +m4_include([m4/ax_cxx_have_std.m4]) +m4_include([m4/ax_cxx_have_stl.m4]) +m4_include([m4/ax_cxx_namespaces.m4]) +m4_include([m4/ax_lib_expat.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff -Nru mira-3.9.18/build-aux/git-version-gen mira-4.0/build-aux/git-version-gen --- mira-3.9.18/build-aux/git-version-gen 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/build-aux/git-version-gen 2014-02-02 17:05:43.000000000 +0000 @@ -143,7 +143,7 @@ # on master? case $b in - master-* | rel_*) + master* | rel_*) : we are on master or release branch # then use version taken from tag version of git describe. v=`git describe --long --tags 2>/dev/null` diff -Nru mira-3.9.18/config/m4/ax_boost_base.m4 mira-4.0/config/m4/ax_boost_base.m4 --- mira-3.9.18/config/m4/ax_boost_base.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_boost_base.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,258 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# DESCRIPTION -# -# Test for the Boost C++ libraries of a particular version (or newer) -# -# If no path to the installed boost library is given the macro searchs -# under /usr, /usr/local, /opt and /opt/local and evaluates the -# $BOOST_ROOT environment variable. Further documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# Copyright (c) 2009 Peter Adolphs -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 20 - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], - [use Boost library from a standard location (ARG=yes), - from the specified location (ARG=), - or disable it (ARG=no) - @<:@ARG=yes@:>@ ])], - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - - -AC_ARG_WITH([boost-libdir], - AS_HELP_STRING([--with-boost-libdir=LIB_DIR], - [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), - [ - if test -d "$withval" - then - ac_boost_lib_path="$withval" - else - AC_MSG_ERROR(--with-boost-libdir expected directory name) - fi - ], - [ac_boost_lib_path=""] -) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) - succeeded=no - - dnl On 64-bit systems check for system libraries in both lib64 and lib. - dnl The former is specified by FHS, but e.g. Debian does not adhere to - dnl this (as it rises problems for generic multi-arch support). - dnl The last entry in the list is chosen by default when no libraries - dnl are found, e.g. when only header-only libraries are installed! - libsubdirs="lib" - ax_arch=`uname -m` - if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then - libsubdirs="lib64 lib lib64" - fi - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - BOOST_CPPFLAGS="-I$ac_boost_path/include" - for ac_boost_path_tmp in $libsubdirs; do - if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then - BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" - break - fi - done - elif test "$cross_compiling" != yes; then - for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - for libsubdir in $libsubdirs ; do - if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - dnl overwrite ld flags if we have required special directory with - dnl --with-boost-libdir parameter - if test "$ac_boost_lib_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_lib_path" - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_REQUIRE([AC_PROG_CXX]) - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - if test "$cross_compiling" != yes; then - for ac_boost_path in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - if test "$ac_boost_lib_path" = ""; then - for libsubdir in $libsubdirs ; do - if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - BOOST_LDFLAGS="-L$best_path/$libsubdir" - fi - fi - - if test "x$BOOST_ROOT" != "x"; then - for libsubdir in $libsubdirs ; do - if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "$succeeded" != "yes" ; then - if test "$_version" = "0" ; then - AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) - else - AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) - fi - # execute ACTION-IF-NOT-FOUND (if present): - ifelse([$3], , :, [$3]) - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - # execute ACTION-IF-FOUND (if present): - ifelse([$2], , :, [$2]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" -fi - -]) diff -Nru mira-3.9.18/config/m4/ax_boost_filesystem.m4 mira-4.0/config/m4/ax_boost_filesystem.m4 --- mira-3.9.18/config/m4/ax_boost_filesystem.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_boost_filesystem.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_FILESYSTEM -# -# DESCRIPTION -# -# Test for Filesystem library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. Further documentation is -# available at . -# -# This macro calls: -# -# AC_SUBST(BOOST_FILESYSTEM_LIB) -# -# And sets: -# -# HAVE_BOOST_FILESYSTEM -# -# LICENSE -# -# Copyright (c) 2009 Thomas Porschberg -# Copyright (c) 2009 Michael Tindal -# Copyright (c) 2009 Roman Rybalko -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 22 - -AC_DEFUN([AX_BOOST_FILESYSTEM], -[ - AC_ARG_WITH([boost-filesystem], - AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@], - [use the Filesystem library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_filesystem_lib="" - else - want_boost="yes" - ax_boost_user_filesystem_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - LIBS_SAVED=$LIBS - LIBS="$LIBS $BOOST_SYSTEM_LIB" - export LIBS - - AC_CACHE_CHECK(whether the Boost::Filesystem library is available, - ax_cv_boost_filesystem, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[using namespace boost::filesystem; - path my_path( "foo/bar/data.txt" ); - return 0;]])], - ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_filesystem" = "xyes"; then - AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - if test "x$ax_boost_user_filesystem_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_filesystem*.so* $BOOSTLIBDIR/libboost_filesystem*.dylib* $BOOSTLIBDIR/libboost_filesystem*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_filesystem.*\)\.so.*$;\1;' -e 's;^lib\(boost_filesystem.*\)\.a*$;\1;' -e 's;^lib\(boost_filesystem.*\)\.dylib$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], - [link_filesystem="no"]) - done - if test "x$link_filesystem" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_filesystem*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_filesystem.*\)\.dll.*$;\1;' -e 's;^\(boost_filesystem.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], - [link_filesystem="no"]) - done - fi - else - for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do - AC_CHECK_LIB($ax_lib, exit, - [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], - [link_filesystem="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_ERROR(Could not find a version of the library!) - fi - if test "x$link_filesystem" != "xyes"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - LIBS="$LIBS_SAVED" - fi -]) diff -Nru mira-3.9.18/config/m4/ax_boost_iostreams.m4 mira-4.0/config/m4/ax_boost_iostreams.m4 --- mira-3.9.18/config/m4/ax_boost_iostreams.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_boost_iostreams.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_iostreams.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_IOSTREAMS -# -# DESCRIPTION -# -# Test for IOStreams library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. Further documentation is -# available at . -# -# This macro calls: -# -# AC_SUBST(BOOST_IOSTREAMS_LIB) -# -# And sets: -# -# HAVE_BOOST_IOSTREAMS -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 18 - -AC_DEFUN([AX_BOOST_IOSTREAMS], -[ - AC_ARG_WITH([boost-iostreams], - AS_HELP_STRING([--with-boost-iostreams@<:@=special-lib@:>@], - [use the IOStreams library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1 ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_iostreams_lib="" - else - want_boost="yes" - ax_boost_user_iostreams_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::IOStreams library is available, - ax_cv_boost_iostreams, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include - @%:@include - ]], - [[std::string input = "Hello World!"; - namespace io = boost::iostreams; - io::filtering_istream in(boost::make_iterator_range(input)); - return 0; - ]])], - ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_iostreams" = "xyes"; then - AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - if test "x$ax_boost_user_iostreams_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.so* $BOOSTLIBDIR/libboost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break], - [link_iostreams="no"]) - done - if test "x$link_iostreams" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break], - [link_iostreams="no"]) - done - fi - - else - for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do - AC_CHECK_LIB($ax_lib, main, - [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break], - [link_iostreams="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_ERROR(Could not find a version of the library!) - fi - if test "x$link_iostreams" != "xyes"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) diff -Nru mira-3.9.18/config/m4/ax_boost_regex.m4 mira-4.0/config/m4/ax_boost_regex.m4 --- mira-3.9.18/config/m4/ax_boost_regex.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_boost_regex.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_regex.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_REGEX -# -# DESCRIPTION -# -# Test for Regex library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. Further documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_REGEX_LIB) -# -# And sets: -# -# HAVE_BOOST_REGEX -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# Copyright (c) 2008 Michael Tindal -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 20 - -AC_DEFUN([AX_BOOST_REGEX], -[ - AC_ARG_WITH([boost-regex], - AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@], - [use the Regex library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_regex_lib="" - else - want_boost="yes" - ax_boost_user_regex_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Regex library is available, - ax_cv_boost_regex, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include - ]], - [[boost::regex r(); return 0;]])], - ax_cv_boost_regex=yes, ax_cv_boost_regex=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_regex" = "xyes"; then - AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - if test "x$ax_boost_user_regex_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], - [link_regex="no"]) - done - if test "x$link_regex" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_regex*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], - [link_regex="no"]) - done - fi - - else - for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do - AC_CHECK_LIB($ax_lib, main, - [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], - [link_regex="no"]) - done - fi - if test "x$ax_lib" = "x"; then - AC_MSG_ERROR(Could not find a version of the Boost::Regex library!) - fi - if test "x$link_regex" != "xyes"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) diff -Nru mira-3.9.18/config/m4/ax_boost_system.m4 mira-4.0/config/m4/ax_boost_system.m4 --- mira-3.9.18/config/m4/ax_boost_system.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_boost_system.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_SYSTEM -# -# DESCRIPTION -# -# Test for System library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. Further documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_SYSTEM_LIB) -# -# And sets: -# -# HAVE_BOOST_SYSTEM -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Daniel Casimiro -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 14 - -AC_DEFUN([AX_BOOST_SYSTEM], -[ - AC_ARG_WITH([boost-system], - AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@], - [use the System library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-system=boost_system-gcc-mt ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_system_lib="" - else - want_boost="yes" - ax_boost_user_system_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_BUILD]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::System library is available, - ax_cv_boost_system, - [AC_LANG_PUSH([C++]) - CXXFLAGS_SAVE=$CXXFLAGS - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[boost::system::system_category]])], - ax_cv_boost_system=yes, ax_cv_boost_system=no) - CXXFLAGS=$CXXFLAGS_SAVE - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_system" = "xyes"; then - AC_SUBST(BOOST_CPPFLAGS) - - AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - LDFLAGS_SAVE=$LDFLAGS - if test "x$ax_boost_user_system_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], - [link_system="no"]) - done - if test "x$link_system" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], - [link_system="no"]) - done - fi - - else - for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do - AC_CHECK_LIB($ax_lib, exit, - [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], - [link_system="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_ERROR(Could not find a version of the library!) - fi - if test "x$link_system" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) diff -Nru mira-3.9.18/config/m4/ax_boost_thread.m4 mira-4.0/config/m4/ax_boost_thread.m4 --- mira-3.9.18/config/m4/ax_boost_thread.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_boost_thread.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,149 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_THREAD -# -# DESCRIPTION -# -# Test for Thread library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. Further documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_THREAD_LIB) -# -# And sets: -# -# HAVE_BOOST_THREAD -# -# LICENSE -# -# Copyright (c) 2009 Thomas Porschberg -# Copyright (c) 2009 Michael Tindal -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 23 - -AC_DEFUN([AX_BOOST_THREAD], -[ - AC_ARG_WITH([boost-thread], - AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@], - [use the Thread library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-thread=boost_thread-gcc-mt ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_thread_lib="" - else - want_boost="yes" - ax_boost_user_thread_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_BUILD]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Thread library is available, - ax_cv_boost_thread, - [AC_LANG_PUSH([C++]) - CXXFLAGS_SAVE=$CXXFLAGS - - if test "x$host_os" = "xsolaris" ; then - CXXFLAGS="-pthreads $CXXFLAGS" - elif test "x$host_os" = "xmingw32" ; then - CXXFLAGS="-mthreads $CXXFLAGS" - else - CXXFLAGS="-pthread $CXXFLAGS" - fi - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[boost::thread_group thrds; - return 0;]])], - ax_cv_boost_thread=yes, ax_cv_boost_thread=no) - CXXFLAGS=$CXXFLAGS_SAVE - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_thread" = "xyes"; then - if test "x$host_os" = "xsolaris" ; then - BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" - elif test "x$host_os" = "xmingw32" ; then - BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" - else - BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" - fi - - AC_SUBST(BOOST_CPPFLAGS) - - AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - LDFLAGS_SAVE=$LDFLAGS - case "x$host_os" in - *bsd* ) - LDFLAGS="-pthread $LDFLAGS" - break; - ;; - esac - if test "x$ax_boost_user_thread_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_thread*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.a*$;\1;'`; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], - [link_thread="no"]) - done - if test "x$link_thread" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_thread*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.a*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], - [link_thread="no"]) - done - fi - - else - for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do - AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], - [link_thread="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_ERROR(Could not find a version of the library!) - fi - if test "x$link_thread" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - else - case "x$host_os" in - *bsd* ) - BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS" - break; - ;; - esac - - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) diff -Nru mira-3.9.18/config/m4/ax_check_zlib.m4 mira-4.0/config/m4/ax_check_zlib.m4 --- mira-3.9.18/config/m4/ax_check_zlib.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_check_zlib.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_ZLIB() -# -# DESCRIPTION -# -# This macro searches for an installed zlib library. If nothing was -# specified when calling configure, it searches first in /usr/local and -# then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified, -# it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If -# --without-zlib is specified, the library is not searched at all. -# -# If either the header file (zlib.h) or the library (libz) is not found, -# the configuration exits on error, asking for a valid zlib installation -# directory or --without-zlib. -# -# The macro defines the symbol HAVE_LIBZ if the library is found. You -# should use autoheader to include a definition for this symbol in a -# config.h file. Sample usage in a C/C++ source is as follows: -# -# #ifdef HAVE_LIBZ -# #include -# #endif /* HAVE_LIBZ */ -# -# LICENSE -# -# Copyright (c) 2008 Loic Dachary -# Copyright (c) 2010 Bastien Chevreux -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 8 - -AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB]) -AC_DEFUN([AX_CHECK_ZLIB], -# -# Handle user hints -# -[AC_MSG_CHECKING(if zlib is wanted) -AC_ARG_WITH(zlib, -[ --with-zlib=DIR root directory path of zlib installation [defaults to - /usr/local or /usr if not found in /usr/local] - --without-zlib to disable zlib usage completely], -[if test "$withval" != no ; then - zlib_places="/usr/local /usr /opt/local /sw" - AC_MSG_RESULT(yes) - if test -d "$withval" - then - zlib_places="$withval $zlib_places" - else - AC_MSG_WARN([Sorry, $withval does not exist, checking usual places]) - fi -else - AC_MSG_RESULT(no) -fi], -[AC_MSG_RESULT(yes)]) - -# -# Locate zlib, if wanted -# -if test -n "${zlib_places}" -then - # check the user supplied or any other more or less 'standard' place: - # Most UNIX systems : /usr/local and /usr - # MacPorts / Fink on OSX : /opt/local respectively /sw - for ZLIB_HOME in ${zlib_places} ; do - if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi - ZLIB_HOME="" - done - - # if zlib.h was nowhere to be found, give a notice and bail out - if test ! -n "${ZLIB_HOME}"; then - AC_MSG_ERROR(No zlib.h in any include directory of ${zlib_places}: either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib) - fi - - ZLIB_OLD_LDFLAGS=$LDFLAGS - ZLIB_OLD_CPPFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" - CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" - AC_LANG_SAVE - AC_LANG_C - AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no]) - AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) - AC_LANG_RESTORE - if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes" - then - # - # If both library and header were found, use them - # - AC_CHECK_LIB(z, inflateEnd) - AC_MSG_CHECKING(zlib in ${ZLIB_HOME}) - AC_MSG_RESULT(ok) - else - # - # If either header or library was not found, revert and bomb - # - AC_MSG_CHECKING(zlib in ${ZLIB_HOME}) - LDFLAGS="$ZLIB_OLD_LDFLAGS" - CPPFLAGS="$ZLIB_OLD_CPPFLAGS" - AC_MSG_RESULT(failed) - AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib) - fi -fi - -]) diff -Nru mira-3.9.18/config/m4/ax_cxx_have_std.m4 mira-4.0/config/m4/ax_cxx_have_std.m4 --- mira-3.9.18/config/m4/ax_cxx_have_std.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_cxx_have_std.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_have_std.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_HAVE_STD -# -# DESCRIPTION -# -# If the compiler supports ISO C++ standard library (i.e., can include the -# files iostream, map, iomanip and cmath), define HAVE_STD. -# -# LICENSE -# -# Copyright (c) 2008 Todd Veldhuizen -# Copyright (c) 2008 Luc Maisonobe -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AU_ALIAS([AC_CXX_HAVE_STD], [AX_CXX_HAVE_STD]) -AC_DEFUN([AX_CXX_HAVE_STD], -[AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library, -ax_cv_cxx_have_std, -[AC_REQUIRE([AX_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#include -#include -#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[return 0;], - ax_cv_cxx_have_std=yes, ax_cv_cxx_have_std=no) - AC_LANG_RESTORE -]) -if test "$ax_cv_cxx_have_std" = yes; then - AC_DEFINE(HAVE_STD,,[define if the compiler supports ISO C++ standard library]) -fi -]) diff -Nru mira-3.9.18/config/m4/ax_cxx_have_stl.m4 mira-4.0/config/m4/ax_cxx_have_stl.m4 --- mira-3.9.18/config/m4/ax_cxx_have_stl.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_cxx_have_stl.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_have_stl.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_HAVE_STL -# -# DESCRIPTION -# -# If the compiler supports the Standard Template Library, define HAVE_STL. -# -# LICENSE -# -# Copyright (c) 2008 Todd Veldhuizen -# Copyright (c) 2008 Luc Maisonobe -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AU_ALIAS([AC_CXX_HAVE_STL], [AX_CXX_HAVE_STL]) -AC_DEFUN([AX_CXX_HAVE_STL], -[AC_CACHE_CHECK(whether the compiler supports Standard Template Library, -ax_cv_cxx_have_stl, -[AC_REQUIRE([AX_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[list x; x.push_back(5); -list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], - ax_cv_cxx_have_stl=yes, ax_cv_cxx_have_stl=no) - AC_LANG_RESTORE -]) -if test "$ax_cv_cxx_have_stl" = yes; then - AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library]) -fi -]) diff -Nru mira-3.9.18/config/m4/ax_cxx_namespaces.m4 mira-4.0/config/m4/ax_cxx_namespaces.m4 --- mira-3.9.18/config/m4/ax_cxx_namespaces.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_cxx_namespaces.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_namespaces.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_NAMESPACES -# -# DESCRIPTION -# -# If the compiler can prevent names clashes using namespaces, define -# HAVE_NAMESPACES. -# -# LICENSE -# -# Copyright (c) 2008 Todd Veldhuizen -# Copyright (c) 2008 Luc Maisonobe -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AU_ALIAS([AC_CXX_NAMESPACES], [AX_CXX_NAMESPACES]) -AC_DEFUN([AX_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ax_cv_cxx_namespaces, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ax_cv_cxx_namespaces=yes, ax_cv_cxx_namespaces=no) - AC_LANG_RESTORE -]) -if test "$ax_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) diff -Nru mira-3.9.18/config/m4/ax_lib_expat.m4 mira-4.0/config/m4/ax_lib_expat.m4 --- mira-3.9.18/config/m4/ax_lib_expat.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ax_lib_expat.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,283 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_lib_expat.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_LIB_EXPAT([MINIMUM-VERSION]) -# -# DESCRIPTION -# -# This macro provides tests of availability of Expat XML Parser of -# particular version or newer. This macro checks for Expat XML Parser -# headers and libraries and defines compilation flags -# -# Macro supports following options and their values: -# -# 1) Single-option usage: -# -# --with-expat -- yes, no, or path to Expat XML Parser -# installation prefix -# -# 2) Three-options usage (all options are required): -# -# --with-expat=yes -# --with-expat-inc -- path to base directory with Expat headers -# --with-expat-lib -- linker flags for Expat -# -# This macro calls: -# -# AC_SUBST(EXPAT_CFLAGS) -# AC_SUBST(EXPAT_LIBS) -# AC_SUBST(EXPAT_LDFLAGS) -# AC_SUBST(EXPAT_VERSION) -- only if version requirement is used -# -# And sets: -# -# HAVE_EXPAT -# -# LICENSE -# -# Copyright (c) 2008 Mateusz Loskot -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 10 - -AC_DEFUN([AX_LIB_EXPAT], -[ - AC_ARG_WITH([expat], - AS_HELP_STRING([--with-expat=@<:@ARG@:>@], - [use Expat XML Parser from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)] - ), - [ - if test "$withval" = "yes"; then - if test -f /usr/local/include/expat.h ; then - expat_prefix=/usr/local - elif test -f /usr/include/expat.h ; then - expat_prefix=/usr - else - expat_prefix="" - fi - expat_requested="yes" - elif test -d "$withval"; then - expat_prefix="$withval" - expat_requested="yes" - else - expat_prefix="" - expat_requested="no" - fi - ], - [ - dnl Default behavior is implicit yes - if test -f /usr/local/include/expat.h ; then - expat_prefix=/usr/local - elif test -f /usr/include/expat.h ; then - expat_prefix=/usr - else - expat_prefix="" - fi - ] - ) - - AC_ARG_WITH([expat-inc], - AS_HELP_STRING([--with-expat-inc=@<:@DIR@:>@], - [path to Expat XML Parser headers] - ), - [expat_include_dir="$withval"], - [expat_include_dir=""] - ) - AC_ARG_WITH([expat-lib], - AS_HELP_STRING([--with-expat-lib=@<:@ARG@:>@], - [link options for Expat XML Parser libraries] - ), - [expat_lib_flags="$withval"], - [expat_lib_flags=""] - ) - - EXPAT_CFLAGS="" - EXPAT_LIBS="" - EXPAT_VERSION="" - - dnl - dnl Collect include/lib paths and flags - dnl - run_expat_test="no" - - if test -n "$expat_prefix"; then - expat_include_dir="$expat_prefix/include" - expat_ld_flags="-L$expat_prefix/lib" - expat_lib_flags="-lexpat" - run_expat_test="yes" - elif test "$expat_requested" = "yes"; then - if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then - run_expat_test="yes" - fi - else - run_expat_test="no" - fi - - dnl - dnl Check Expat XML Parser files - dnl - if test "$run_expat_test" = "yes"; then - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$expat_include_dir" - - saved_LIBS="$LIBS" - LIBS="$LIBS $expat_lib_flags" - - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $expat_ld_flags" - - dnl - dnl Check Expat headers - dnl - AC_MSG_CHECKING([for Expat XML Parser headers in $expat_include_dir]) - - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include - ]], - [[]] - )], - [ - EXPAT_CFLAGS="-I$expat_include_dir" - expat_header_found="yes" - AC_MSG_RESULT([found]) - ], - [ - expat_header_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - - dnl - dnl Check Expat libraries - dnl - if test "$expat_header_found" = "yes"; then - - AC_MSG_CHECKING([for Expat XML Parser libraries]) - - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include - ]], - [[ -XML_Parser p = XML_ParserCreate(NULL); -XML_ParserFree(p); -p = NULL; - ]] - )], - [ - EXPAT_LIBS="$expat_lib_flags" - EXPAT_LDFLAGS="$expat_ld_flags" - expat_lib_found="yes" - AC_MSG_RESULT([found]) - ], - [ - expat_lib_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - fi - - CPPFLAGS="$saved_CPPFLAGS" - LDFLAGS="$saved_LDFLAGS" - LIBS="$saved_LIBS" - fi - - AC_MSG_CHECKING([for Expat XML Parser]) - - if test "$run_expat_test" = "yes"; then - if test "$expat_header_found" = "yes" -a "$expat_lib_found" = "yes"; then - - AC_SUBST([EXPAT_CFLAGS]) - AC_SUBST([EXPAT_LDFLAGS]) - AC_SUBST([EXPAT_LIBS]) - - HAVE_EXPAT="yes" - else - HAVE_EXPAT="no" - fi - - AC_MSG_RESULT([$HAVE_EXPAT]) - - dnl - dnl Check Expat version - dnl - if test "$HAVE_EXPAT" = "yes"; then - - expat_version_req=ifelse([$1], [], [], [$1]) - - if test -n "$expat_version_req"; then - - AC_MSG_CHECKING([if Expat XML Parser version is >= $expat_version_req]) - - if test -f "$expat_include_dir/expat.h"; then - - expat_major=`cat $expat_include_dir/expat.h | \ - grep '^#define.*XML_MAJOR_VERSION.*[0-9]$' | \ - sed -e 's/#define XML_MAJOR_VERSION.//'` - - expat_minor=`cat $expat_include_dir/expat.h | \ - grep '^#define.*XML_MINOR_VERSION.*[0-9]$' | \ - sed -e 's/#define XML_MINOR_VERSION.//'` - - expat_revision=`cat $expat_include_dir/expat.h | \ - grep '^#define.*XML_MICRO_VERSION.*[0-9]$' | \ - sed -e 's/#define XML_MICRO_VERSION.//'` - - EXPAT_VERSION="$expat_major.$expat_minor.$expat_revision" - AC_SUBST([EXPAT_VERSION]) - - dnl Decompose required version string and calculate numerical representation - expat_version_req_major=`expr $expat_version_req : '\([[0-9]]*\)'` - expat_version_req_minor=`expr $expat_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - expat_version_req_revision=`expr $expat_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$expat_version_req_revision" = "x"; then - expat_version_req_revision="0" - fi - - expat_version_req_number=`expr $expat_version_req_major \* 10000 \ - \+ $expat_version_req_minor \* 100 \ - \+ $expat_version_req_revision` - - dnl Calculate numerical representation of detected version - expat_version_number=`expr $expat_major \* 10000 \ - \+ $expat_minor \* 100 \ - \+ $expat_revision` - - expat_version_check=`expr $expat_version_number \>\= $expat_version_req_number` - if test "$expat_version_check" = "1"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Found Expat XML Parser $EXPAT_VERSION, which is older than required. Possible compilation failure.]) - fi - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Missing expat.h header. Unable to determine Expat version.]) - fi - fi - fi - - else - HAVE_EXPAT="no" - AC_MSG_RESULT([$HAVE_EXPAT]) - - if test "$expat_requested" = "yes"; then - AC_MSG_WARN([Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=@<:@DIR@:>@ or provide include directory and linker flags using --with-expat-inc and --with-expat-lib]) - fi - fi -]) diff -Nru mira-3.9.18/config/m4/libtool.m4 mira-4.0/config/m4/libtool.m4 --- mira-3.9.18/config/m4/libtool.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/libtool.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,8001 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff -Nru mira-3.9.18/config/m4/ltoptions.m4 mira-4.0/config/m4/ltoptions.m4 --- mira-3.9.18/config/m4/ltoptions.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ltoptions.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,384 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff -Nru mira-3.9.18/config/m4/ltsugar.m4 mira-4.0/config/m4/ltsugar.m4 --- mira-3.9.18/config/m4/ltsugar.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ltsugar.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff -Nru mira-3.9.18/config/m4/ltversion.m4 mira-4.0/config/m4/ltversion.m4 --- mira-3.9.18/config/m4/ltversion.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/ltversion.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff -Nru mira-3.9.18/config/m4/lt~obsolete.m4 mira-4.0/config/m4/lt~obsolete.m4 --- mira-3.9.18/config/m4/lt~obsolete.m4 2013-07-01 18:38:07.000000000 +0000 +++ mira-4.0/config/m4/lt~obsolete.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff -Nru mira-3.9.18/configure mira-4.0/configure --- mira-3.9.18/configure 2013-07-01 18:38:14.000000000 +0000 +++ mira-4.0/configure 2014-02-02 17:08:13.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for mira 3.9.18. +# Generated by GNU Autoconf 2.68 for mira 4.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ # Identity of this package. PACKAGE_NAME='mira' PACKAGE_TARNAME='mira' -PACKAGE_VERSION='3.9.18' -PACKAGE_STRING='mira 3.9.18' +PACKAGE_VERSION='4.0' +PACKAGE_STRING='mira 4.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -658,6 +658,7 @@ host_cpu host LIBTOOL +BUNDLETARGET BLOODYDARWINSTATLIBDIRHACK build_os build_vendor @@ -1350,7 +1351,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mira 3.9.18 to adapt to many kinds of systems. +\`configure' configures mira 4.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1420,7 +1421,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mira 3.9.18:";; + short | recursive ) echo "Configuration of mira 4.0:";; esac cat <<\_ACEOF @@ -1599,7 +1600,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mira configure 3.9.18 +mira configure 4.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2139,7 +2140,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mira $as_me 3.9.18, which was +It was created by mira $as_me 4.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2957,7 +2958,7 @@ # Define the identity of the package. PACKAGE='mira' - VERSION='3.9.18' + VERSION='4.0' cat >>confdefs.h <<_ACEOF @@ -3091,9 +3092,18 @@ AMCXXFLAGS="" # having this before AC_CANONICAL_BUILD sets the correct CPU info in ${build_os} +# +# and we need 10.6 instead of 10.5 as for 10.5, the linker creates a binary like +# this +# /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) +# /opt/localwgcc48/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) +# /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) +# +# which does not run on a couple of other OSX installations + if test "${systemuname}" = "Darwin"; then - CFLAGS="-mmacosx-version-min=10.5 ${CFLAGS}" - CXXFLAGS="-mmacosx-version-min=10.5 ${CXXFLAGS}" + CFLAGS="-mmacosx-version-min=10.6 ${CFLAGS}" + CXXFLAGS="-mmacosx-version-min=10.6 ${CXXFLAGS}" fi # The internal echo for /bin/sh on darwin doesn't support -n @@ -4536,8 +4546,8 @@ # check for gcc version if using gcc if test x$GCC = xyes; then - gccversion=`gcc -dumpversion` - gxxversion=`g++ -dumpversion` + gccversion=`$CC -dumpversion` + gxxversion=`$CXX -dumpversion` if test "x${gccversion}" != "x${gxxversion}"; then echo "gcc is version ${gccversion} while g++ is version ${gxxversion}" echo "This is not a sane environment, both versions should be the same (>=4.6.1). Stopping here." @@ -5447,6 +5457,7 @@ mkdir ${osxstatlibdirhack} (cd ${osxstatlibdirhack}; ln -s /opt/biosw/lib/*a .; cd ..) (cd ${osxstatlibdirhack}; ln -s /opt/localw*/lib/*a .; cd ..) + (cd ${osxstatlibdirhack}; ln -s /opt/local/lib/libbz2.a .; ln -s /opt/local/lib/libexpat.a .; cd ..) LDFLAGS="-L${osxstatlibdirhack} -Wl,-search_paths_first ${LDFLAGS}" # note: putting osxstatlibdirhack in LDFLAGS here is pretty futile @@ -5458,15 +5469,22 @@ # And we need to tell gcc/ld our explicit wish to link the C and C++ std lib # statically ... why it does not do that when seeing -static is a mystery to # me + # Note 08.09.2013: + # static linking of libgcc and libstdc++ is a bad idea, leads to abort trap 6 + # We're going the bundle way now. # # But we must export BLOODYDARWINSTATLIBDIRHACK for that - BLOODYDARWINSTATLIBDIRHACK="-static-libgcc -static-libstdc++ -L${osxstatlibdirhack}" + BLOODYDARWINSTATLIBDIRHACK=" -L${osxstatlibdirhack}" fi + BUNDLETARGET=darwin else BLOODYDARWINSTATLIBDIRHACK="" + BUNDLETARGET=nobundle fi BLOODYDARWINSTATLIBDIRHACK=${BLOODYDARWINSTATLIBDIRHACK} +BUNDLETARGET=${BUNDLETARGET} + echo @@ -17447,6 +17465,7 @@ fi + # check BOOST before anything else, it's a prime candidate # for being installed by the system (/usr/...) but as well # in another (newer?) version somewhere else. @@ -19173,6 +19192,67 @@ echo "+++++++++++++++++++++++++++++++++++++" + +# check whether rt library is needed. BOOST thread needs +# clock_gettime, on some systems it's in rt lib which is +# NOT automatically used +# problem: AC_CHECK_LIB prepends -lrt to LIBS, we need +# to have it *after* the boost libs +oldLIBS=$LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes +else + ac_cv_lib_rt_clock_gettime=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF + + LIBS="-lrt $LIBS" + +fi + +if test "${LIBS}" != "${oldLIBS}"; then + LIBS="$oldLIBS -lrt" + echo "+++++++++++++++++++++++++++++++++++++" + echo "Need to specifically use rt library" + echo "LIBS now: ${LIBS}" + echo "+++++++++++++++++++++++++++++++++++++" +fi + + CFLAGS=${oldCFLAGS} # check for expat and zlib @@ -19950,9 +20030,6 @@ - - - # --------------------------------------------------------------------------- # MIRA specific flags and settings # --------------------------------------------------------------------------- @@ -20119,7 +20196,7 @@ #AC_CONFIG_FILES([Makefile]) -ac_config_files="$ac_config_files Makefile src/Makefile src/stdinc/Makefile src/debuggersupport/Makefile src/memorc/Makefile src/errorhandling/Makefile src/util/Makefile src/io/Makefile src/mira/Makefile src/caf/Makefile src/support/Makefile src/scripts/Makefile src/progs/Makefile doc/Makefile doc/docbook/Makefile distribution/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/stdinc/Makefile src/debuggersupport/Makefile src/memorc/Makefile src/errorhandling/Makefile src/util/Makefile src/io/Makefile src/mira/Makefile src/caf/Makefile src/support/Makefile src/scripts/Makefile src/modules/Makefile src/progs/Makefile doc/Makefile doc/docbook/Makefile distribution/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -20707,7 +20784,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mira $as_me 3.9.18, which was +This file was extended by mira $as_me 4.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20764,7 +20841,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mira config.status 3.9.18 +mira config.status 4.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -21271,6 +21348,7 @@ "src/caf/Makefile") CONFIG_FILES="$CONFIG_FILES src/caf/Makefile" ;; "src/support/Makefile") CONFIG_FILES="$CONFIG_FILES src/support/Makefile" ;; "src/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES src/scripts/Makefile" ;; + "src/modules/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/Makefile" ;; "src/progs/Makefile") CONFIG_FILES="$CONFIG_FILES src/progs/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/docbook/Makefile") CONFIG_FILES="$CONFIG_FILES doc/docbook/Makefile" ;; diff -Nru mira-3.9.18/configure.ac mira-4.0/configure.ac --- mira-3.9.18/configure.ac 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/configure.ac 2014-02-02 12:05:17.000000000 +0000 @@ -20,9 +20,18 @@ AMCXXFLAGS="" # having this before AC_CANONICAL_BUILD sets the correct CPU info in ${build_os} +# +# and we need 10.6 instead of 10.5 as for 10.5, the linker creates a binary like +# this +# /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) +# /opt/localwgcc48/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) +# /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) +# +# which does not run on a couple of other OSX installations + if test "${systemuname}" = "Darwin"; then - CFLAGS="-mmacosx-version-min=10.5 ${CFLAGS}" - CXXFLAGS="-mmacosx-version-min=10.5 ${CXXFLAGS}" + CFLAGS="-mmacosx-version-min=10.6 ${CFLAGS}" + CXXFLAGS="-mmacosx-version-min=10.6 ${CXXFLAGS}" fi # The internal echo for /bin/sh on darwin doesn't support -n @@ -88,8 +97,8 @@ # check for gcc version if using gcc if test x$GCC = xyes; then - gccversion=`gcc -dumpversion` - gxxversion=`g++ -dumpversion` + gccversion=`$CC -dumpversion` + gxxversion=`$CXX -dumpversion` if test "x${gccversion}" != "x${gxxversion}"; then echo "gcc is version ${gccversion} while g++ is version ${gxxversion}" echo "This is not a sane environment, both versions should be the same (>=4.6.1). Stopping here." @@ -519,6 +528,7 @@ mkdir ${osxstatlibdirhack} (cd ${osxstatlibdirhack}; ln -s /opt/biosw/lib/*a .; cd ..) (cd ${osxstatlibdirhack}; ln -s /opt/localw*/lib/*a .; cd ..) + (cd ${osxstatlibdirhack}; ln -s /opt/local/lib/libbz2.a .; ln -s /opt/local/lib/libexpat.a .; cd ..) LDFLAGS="-L${osxstatlibdirhack} -Wl,-search_paths_first ${LDFLAGS}" # note: putting osxstatlibdirhack in LDFLAGS here is pretty futile @@ -530,14 +540,20 @@ # And we need to tell gcc/ld our explicit wish to link the C and C++ std lib # statically ... why it does not do that when seeing -static is a mystery to # me + # Note 08.09.2013: + # static linking of libgcc and libstdc++ is a bad idea, leads to abort trap 6 + # We're going the bundle way now. # # But we must export BLOODYDARWINSTATLIBDIRHACK for that - BLOODYDARWINSTATLIBDIRHACK="-static-libgcc -static-libstdc++ -L${osxstatlibdirhack}" + BLOODYDARWINSTATLIBDIRHACK=" -L${osxstatlibdirhack}" fi + BUNDLETARGET=darwin else BLOODYDARWINSTATLIBDIRHACK="" + BUNDLETARGET=nobundle fi AC_SUBST(BLOODYDARWINSTATLIBDIRHACK,${BLOODYDARWINSTATLIBDIRHACK}) +AC_SUBST(BUNDLETARGET,${BUNDLETARGET}) echo @@ -628,6 +644,7 @@ AC_CXX_HAVE_STD AC_CXX_HAVE_STL + # check BOOST before anything else, it's a prime candidate # for being installed by the system (/usr/...) but as well # in another (newer?) version somewhere else. @@ -884,6 +901,23 @@ echo "+++++++++++++++++++++++++++++++++++++" + +# check whether rt library is needed. BOOST thread needs +# clock_gettime, on some systems it's in rt lib which is +# NOT automatically used +# problem: AC_CHECK_LIB prepends -lrt to LIBS, we need +# to have it *after* the boost libs +oldLIBS=$LIBS +AC_CHECK_LIB(rt, clock_gettime) +if test "${LIBS}" != "${oldLIBS}"; then + LIBS="$oldLIBS -lrt" + echo "+++++++++++++++++++++++++++++++++++++" + echo "Need to specifically use rt library" + echo "LIBS now: ${LIBS}" + echo "+++++++++++++++++++++++++++++++++++++" +fi + + CFLAGS=${oldCFLAGS} # check for expat and zlib @@ -1153,9 +1187,6 @@ - - - # --------------------------------------------------------------------------- # MIRA specific flags and settings # --------------------------------------------------------------------------- @@ -1293,6 +1324,7 @@ src/caf/Makefile \ src/support/Makefile \ src/scripts/Makefile \ + src/modules/Makefile \ src/progs/Makefile \ doc/Makefile \ doc/docbook/Makefile \ diff -Nru mira-3.9.18/debian/changelog mira-4.0/debian/changelog --- mira-3.9.18/debian/changelog 2013-10-22 09:25:43.000000000 +0000 +++ mira-4.0/debian/changelog 2014-02-02 22:37:21.000000000 +0000 @@ -1,9 +1,14 @@ -mira (3.9.18-1ubuntu1) trusty; urgency=low +mira (4.0-1) unstable; urgency=low - * Specify --with-boost-* to configure for ax_boost_*.m4 to find - multiarched boost libraries. + [ Thorsten Alteholz ] + * New upstream version + * debian/rules: add boost dir in auto_configure (Closes: #735798) + + [ Andreas Tille ] + * cme fix dpkg-control + * debian/patches/{make.patch,spelling.patch}: applied upstream (thus removed) - -- Dmitrijs Ledkovs Tue, 22 Oct 2013 10:25:43 +0100 + -- Thorsten Alteholz Sun, 02 Feb 2014 22:51:35 +0100 mira (3.9.18-1) unstable; urgency=low diff -Nru mira-3.9.18/debian/control mira-4.0/debian/control --- mira-3.9.18/debian/control 2013-10-22 09:25:51.000000000 +0000 +++ mira-4.0/debian/control 2014-02-02 13:17:47.000000000 +0000 @@ -1,6 +1,5 @@ Source: mira -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Med Packaging Team +Maintainer: Debian Med Packaging Team Uploaders: Charles Plessy , Steffen Moeller , Tim Booth , @@ -21,7 +20,7 @@ flex, vim-common, zlib1g-dev -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/mira/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/mira/trunk/ Homepage: http://chevreux.org/projects_mira.html @@ -93,4 +92,3 @@ repeats. . This package contains an HTML book introducing to mira. - diff -Nru mira-3.9.18/debian/mira-assembler.lintian-overrides mira-4.0/debian/mira-assembler.lintian-overrides --- mira-3.9.18/debian/mira-assembler.lintian-overrides 2013-08-09 18:34:22.000000000 +0000 +++ mira-4.0/debian/mira-assembler.lintian-overrides 2013-12-28 12:45:07.000000000 +0000 @@ -1,4 +1,2 @@ # according to www.dict.cc transfering is American English spelling mira-assembler: spelling-error-in-binary usr/bin/mira Transfering Transferring -mira-assembler: spelling-error-in-binary usr/bin/convert_project Transfering Transferring - diff -Nru mira-3.9.18/debian/patches/series mira-4.0/debian/patches/series --- mira-3.9.18/debian/patches/series 2013-08-09 12:12:00.000000000 +0000 +++ mira-4.0/debian/patches/series 2014-02-02 13:17:47.000000000 +0000 @@ -1 +1 @@ -boost-minimal.patch +#boost-minimal.patch diff -Nru mira-3.9.18/debian/rules mira-4.0/debian/rules --- mira-3.9.18/debian/rules 2013-10-22 09:22:12.000000000 +0000 +++ mira-4.0/debian/rules 2014-02-02 15:04:00.000000000 +0000 @@ -9,8 +9,10 @@ pkg=mira-assembler exampledir=usr/share/doc/mira-examples/examples/minidemo/data/bbdataset1/ +include /usr/share/dpkg/default.mk + %: - dh $@ + dh $@ override_dh_auto_install : make install DESTDIR=$(CURDIR)/debian/$(pkg) @@ -86,7 +88,8 @@ override_dh_auto_configure : mkdir lib ln -s /usr/lib/libtcmalloc_minimal.so.4 lib/libtcmalloc_minimal.so - dh_auto_configure -- --with-boost-system=boost_system --with-boost-thread=boost_thread --with-boost-regex=boost_regex --with-boost-filesystem=boost_filesystem --with-boost-iostreams=boost_iostreams + #dh_auto_configure + dh_auto_configure -- --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH) override_dh_builddeb: dh_builddeb -- -Z xz diff -Nru mira-3.9.18/debian/watch mira-4.0/debian/watch --- mira-3.9.18/debian/watch 2013-06-05 20:58:21.000000000 +0000 +++ mira-4.0/debian/watch 2014-02-02 23:29:22.000000000 +0000 @@ -1,2 +1,2 @@ version=3 -opts="uversionmangle=s/rc/~rc/" http://sf.net/mira-assembler/mira-(\d.*).tar.bz2 +http://sf.net/mira-assembler/mira-([\d.]+)\.tar\.bz2 diff -Nru mira-3.9.18/distribution/Makefile mira-4.0/distribution/Makefile --- mira-3.9.18/distribution/Makefile 2013-07-01 18:39:48.000000000 +0000 +++ mira-4.0/distribution/Makefile 2014-02-02 17:08:31.000000000 +0000 @@ -36,22 +36,19 @@ subdir = distribution DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -77,17 +74,18 @@ BOOST_REGEX_LIB = -lboost_regex BOOST_SYSTEM_LIB = -lboost_system BOOST_THREAD_LIB = -lboost_thread +BUNDLETARGET = darwin CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -I/usr/include -g -W -Wstrict-prototypes -fno-strict-aliasing -Wextra -ansi -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wformat -Wimplicit -Wmissing-braces -Wparentheses -Wswitch -Wswitch-default -Wswitch-enum -Wunused -Wfloat-equal -Wendif-labels -Wconversion -Wdisabled-optimization -Wsequence-point -Werror=unused-value -Werror=uninitialized -Werror=return-type +CFLAGS = -O3 -funroll-loops -I/usr/include -g -Werror=uninitialized -Werror=return-type CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -DPUBLICQUIET -DAJ_Linux64 -pthread -I/opt/biosw/include -I/usr/include -g -W -Wstrict-prototypes -fdiagnostics-show-option -Wextra -Wshadow -fno-strict-aliasing -ansi -Wcast-align -Wcast-qual -Wchar-subscripts -Wpointer-arith -Wredundant-decls -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wformat -Wimplicit -Wmissing-braces -Wparentheses -Wswitch -Wswitch-default -Wswitch-enum -Wunused -Wfloat-equal -Wendif-labels -Wconversion -Wdisabled-optimization -Wsequence-point -Werror=unused-value -Werror=uninitialized -Werror=return-type -Werror=parentheses -std=c++0x -Werror=unused-value +CXXFLAGS = -DPUBLICQUIET -DAJ_Linux64 -O3 -funroll-loops -pthread -I/opt/biosw/include -I/usr/include -g -Werror=uninitialized -Werror=return-type -Werror=parentheses -std=c++0x -Werror=unused-value CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"mira\" -DPACKAGE_TARNAME=\"mira\" -DPACKAGE_VERSION=\"3.9.18\" -DPACKAGE_STRING=\"mira\ 3.9.18\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mira\" -DVERSION=\"3.9.18\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE64=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -Drestrict=__restrict -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_FSEEKO=1 -DHAVE_ISBLANK=1 -DHAVE_NAMESPACES=/\*\*/ -DHAVE_STD=/\*\*/ -DHAVE_STL=/\*\*/ -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DBOUNDTRACKFLAG=1 -DBUGTRACKFLAG=1 +DEFS = -DPACKAGE_NAME=\"mira\" -DPACKAGE_TARNAME=\"mira\" -DPACKAGE_VERSION=\"4.0\" -DPACKAGE_STRING=\"mira\ 4.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mira\" -DVERSION=\"4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE64=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -Drestrict=__restrict -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_FSEEKO=1 -DHAVE_ISBLANK=1 -DHAVE_NAMESPACES=/\*\*/ -DHAVE_STD=/\*\*/ -DHAVE_STL=/\*\*/ -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_LIBRT=1 -DBOUNDTRACKFLAG=1 -DBUGTRACKFLAG=1 DEPDIR = .deps DLLTOOL = false DSYMUTIL = @@ -117,7 +115,7 @@ LEXLIB = -lfl LEX_OUTPUT_ROOT = lex.yy LIBOBJS = -LIBS = -lboost_thread -lboost_regex -lboost_system -lboost_filesystem -lboost_iostreams -lexpat -lm -lz -lbz2 -ltcmalloc_minimal +LIBS = -lboost_thread -lboost_regex -lboost_system -lboost_filesystem -lboost_iostreams -lrt -lexpat -lm -lz -lbz2 -ltcmalloc_minimal LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s @@ -135,17 +133,17 @@ PACKAGE = mira PACKAGE_BUGREPORT = PACKAGE_NAME = mira -PACKAGE_STRING = mira 3.9.18 +PACKAGE_STRING = mira 4.0 PACKAGE_TARNAME = mira PACKAGE_URL = -PACKAGE_VERSION = 3.9.18 +PACKAGE_VERSION = 4.0 PATH_SEPARATOR = : RANLIB = ranlib SED = /bin/sed SET_MAKE = SHELL = /bin/bash STRIP = strip -VERSION = 3.9.18 +VERSION = 4.0 abs_builddir = /home/bach/work/assembly/mira.git/distribution abs_srcdir = /home/bach/work/assembly/mira.git/distribution abs_top_builddir = /home/bach/work/assembly/mira.git @@ -395,33 +393,26 @@ cp -R -L ../src/3rdparty . tar cvjf mira_3rdparty_`date +%d-%m-%Y`.tar.bz2 3rdparty +libbundle-nobundle: + @echo "Do not need to bundle on this platform" + +libbundle-darwin: + @echo "Using Macdylibbundler to create OSX compatible dylib references" + (cd ${MIRADIR}; dylibbundler -b -od -d lib -p @executable_path/../lib/ -x bin/mira; cd ..) + copybin: @echo "Making distribution for ${BITPACKAGE}" -rm -rf ${MIRADIR} *.tar *.gz mkdir ${MIRADIR} mkdir ${MIRADIR}/bin cp ../src/progs/mira ${MIRADIR}/bin - cp ../src/progs/convert_project ${MIRADIR}/bin -# cp ../src/progs/scftool ${MIRADIR}/bin -# cp ../src/progs/fastatool ${MIRADIR}/bin -# cp ../src/progs/uncover_at ${MIRADIR}/bin -# cp ../src/progs/clipSCFbyQual ${MIRADIR}/bin + ln -s -f mira ${MIRADIR}/bin/mirabait + ln -s -f mira ${MIRADIR}/bin/miraconvert + ln -s -f mira ${MIRADIR}/bin/miramem # ln -s -f mira ${MIRADIR}/bin/miraSearchESTSNPs # ln -s -f mira ${MIRADIR}/bin/miraclip - ln -s -f mira ${MIRADIR}/bin/miramem - ln -s -f convert_project ${MIRADIR}/bin/mirabait - ln -s -f convert_project ${MIRADIR}/bin/caf2fasta - ln -s -f convert_project ${MIRADIR}/bin/caf2gbf - ln -s -f convert_project ${MIRADIR}/bin/caf2text - ln -s -f convert_project ${MIRADIR}/bin/caf2html - ln -s -f convert_project ${MIRADIR}/bin/caf2tcs - ln -s -f convert_project ${MIRADIR}/bin/gbf2caf - ln -s -f convert_project ${MIRADIR}/bin/caf2caf - ln -s -f convert_project ${MIRADIR}/bin/gbf2fasta mkdir ${MIRADIR}/scripts cp ../src/scripts/fixACE4consed.tcl ${MIRADIR}/scripts - cp ../src/scripts/fastaselect.tcl ${MIRADIR}/scripts - cp ../src/scripts/fastqselect.tcl ${MIRADIR}/scripts cp ../src/scripts/fasta2frag.tcl ${MIRADIR}/scripts copydocs: @@ -433,17 +424,15 @@ cp -R -L ../doc/docbook/images ${MIRADIR}/docs cp -R -L ../doc/docbook/doccss ${MIRADIR}/docs -distribin: copybin +distribin: copybin libbundle-${BUNDLETARGET} strip ${MIRADIR}/bin/* tar cvjf ${PACKAGE_TARNAME}_binonly_${MIRAVERSION}.tar.bz2 ${MIRADIR} -distridbg: copybin - rm ${MIRADIR}/bin/scftool - rm ${MIRADIR}/bin/fastatool +distridbg: copybin libbundle-${BUNDLETARGET} rm -rf ${MIRADIR}/scripts tar cvjf ${PACKAGE_TARNAME}_dbgonly_${MIRAVERSION}.tar.bz2 ${MIRADIR} -distrib: copybin copydocs +distrib: copybin libbundle-${BUNDLETARGET} copydocs cp ../THANKS ${MIRADIR} cp README ${MIRADIR} cp LICENCE ${MIRADIR} diff -Nru mira-3.9.18/distribution/Makefile.am mira-4.0/distribution/Makefile.am --- mira-3.9.18/distribution/Makefile.am 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/distribution/Makefile.am 2014-02-02 12:05:17.000000000 +0000 @@ -2,38 +2,33 @@ MIRAVERSION=${GITSHORT}_${build_os}_${BITPACKAGE}_${MIRASTATIC} MIRADIR=${PACKAGE_TARNAME}_${MIRAVERSION} +BUNDLETARGET=darwin + 3rdparty: rm -rf 3rdparty cp -R -L ../src/3rdparty . tar cvjf mira_3rdparty_`date +%d-%m-%Y`.tar.bz2 3rdparty +libbundle-nobundle: + @echo "Do not need to bundle on this platform" + +libbundle-darwin: + @echo "Using Macdylibbundler to create OSX compatible dylib references" + (cd ${MIRADIR}; dylibbundler -b -od -d lib -p @executable_path/../lib/ -x bin/mira; cd ..) + copybin: @echo "Making distribution for ${BITPACKAGE}" -rm -rf ${MIRADIR} *.tar *.gz mkdir ${MIRADIR} mkdir ${MIRADIR}/bin cp ../src/progs/mira ${MIRADIR}/bin - cp ../src/progs/convert_project ${MIRADIR}/bin -# cp ../src/progs/scftool ${MIRADIR}/bin -# cp ../src/progs/fastatool ${MIRADIR}/bin -# cp ../src/progs/uncover_at ${MIRADIR}/bin -# cp ../src/progs/clipSCFbyQual ${MIRADIR}/bin + ln -s -f mira ${MIRADIR}/bin/mirabait + ln -s -f mira ${MIRADIR}/bin/miraconvert + ln -s -f mira ${MIRADIR}/bin/miramem # ln -s -f mira ${MIRADIR}/bin/miraSearchESTSNPs # ln -s -f mira ${MIRADIR}/bin/miraclip - ln -s -f mira ${MIRADIR}/bin/miramem - ln -s -f convert_project ${MIRADIR}/bin/mirabait - ln -s -f convert_project ${MIRADIR}/bin/caf2fasta - ln -s -f convert_project ${MIRADIR}/bin/caf2gbf - ln -s -f convert_project ${MIRADIR}/bin/caf2text - ln -s -f convert_project ${MIRADIR}/bin/caf2html - ln -s -f convert_project ${MIRADIR}/bin/caf2tcs - ln -s -f convert_project ${MIRADIR}/bin/gbf2caf - ln -s -f convert_project ${MIRADIR}/bin/caf2caf - ln -s -f convert_project ${MIRADIR}/bin/gbf2fasta mkdir ${MIRADIR}/scripts cp ../src/scripts/fixACE4consed.tcl ${MIRADIR}/scripts - cp ../src/scripts/fastaselect.tcl ${MIRADIR}/scripts - cp ../src/scripts/fastqselect.tcl ${MIRADIR}/scripts cp ../src/scripts/fasta2frag.tcl ${MIRADIR}/scripts copydocs: @@ -45,17 +40,15 @@ cp -R -L ../doc/docbook/images ${MIRADIR}/docs cp -R -L ../doc/docbook/doccss ${MIRADIR}/docs -distribin: copybin +distribin: copybin libbundle-${BUNDLETARGET} strip ${MIRADIR}/bin/* tar cvjf ${PACKAGE_TARNAME}_binonly_${MIRAVERSION}.tar.bz2 ${MIRADIR} -distridbg: copybin - rm ${MIRADIR}/bin/scftool - rm ${MIRADIR}/bin/fastatool +distridbg: copybin libbundle-${BUNDLETARGET} rm -rf ${MIRADIR}/scripts tar cvjf ${PACKAGE_TARNAME}_dbgonly_${MIRAVERSION}.tar.bz2 ${MIRADIR} -distrib: copybin copydocs +distrib: copybin libbundle-${BUNDLETARGET} copydocs cp ../THANKS ${MIRADIR} cp README ${MIRADIR} cp LICENCE ${MIRADIR} diff -Nru mira-3.9.18/distribution/Makefile.in mira-4.0/distribution/Makefile.in --- mira-3.9.18/distribution/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/distribution/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -36,22 +36,19 @@ subdir = distribution DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -77,6 +74,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = darwin CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -395,33 +393,26 @@ cp -R -L ../src/3rdparty . tar cvjf mira_3rdparty_`date +%d-%m-%Y`.tar.bz2 3rdparty +libbundle-nobundle: + @echo "Do not need to bundle on this platform" + +libbundle-darwin: + @echo "Using Macdylibbundler to create OSX compatible dylib references" + (cd ${MIRADIR}; dylibbundler -b -od -d lib -p @executable_path/../lib/ -x bin/mira; cd ..) + copybin: @echo "Making distribution for ${BITPACKAGE}" -rm -rf ${MIRADIR} *.tar *.gz mkdir ${MIRADIR} mkdir ${MIRADIR}/bin cp ../src/progs/mira ${MIRADIR}/bin - cp ../src/progs/convert_project ${MIRADIR}/bin -# cp ../src/progs/scftool ${MIRADIR}/bin -# cp ../src/progs/fastatool ${MIRADIR}/bin -# cp ../src/progs/uncover_at ${MIRADIR}/bin -# cp ../src/progs/clipSCFbyQual ${MIRADIR}/bin + ln -s -f mira ${MIRADIR}/bin/mirabait + ln -s -f mira ${MIRADIR}/bin/miraconvert + ln -s -f mira ${MIRADIR}/bin/miramem # ln -s -f mira ${MIRADIR}/bin/miraSearchESTSNPs # ln -s -f mira ${MIRADIR}/bin/miraclip - ln -s -f mira ${MIRADIR}/bin/miramem - ln -s -f convert_project ${MIRADIR}/bin/mirabait - ln -s -f convert_project ${MIRADIR}/bin/caf2fasta - ln -s -f convert_project ${MIRADIR}/bin/caf2gbf - ln -s -f convert_project ${MIRADIR}/bin/caf2text - ln -s -f convert_project ${MIRADIR}/bin/caf2html - ln -s -f convert_project ${MIRADIR}/bin/caf2tcs - ln -s -f convert_project ${MIRADIR}/bin/gbf2caf - ln -s -f convert_project ${MIRADIR}/bin/caf2caf - ln -s -f convert_project ${MIRADIR}/bin/gbf2fasta mkdir ${MIRADIR}/scripts cp ../src/scripts/fixACE4consed.tcl ${MIRADIR}/scripts - cp ../src/scripts/fastaselect.tcl ${MIRADIR}/scripts - cp ../src/scripts/fastqselect.tcl ${MIRADIR}/scripts cp ../src/scripts/fasta2frag.tcl ${MIRADIR}/scripts copydocs: @@ -433,17 +424,15 @@ cp -R -L ../doc/docbook/images ${MIRADIR}/docs cp -R -L ../doc/docbook/doccss ${MIRADIR}/docs -distribin: copybin +distribin: copybin libbundle-${BUNDLETARGET} strip ${MIRADIR}/bin/* tar cvjf ${PACKAGE_TARNAME}_binonly_${MIRAVERSION}.tar.bz2 ${MIRADIR} -distridbg: copybin - rm ${MIRADIR}/bin/scftool - rm ${MIRADIR}/bin/fastatool +distridbg: copybin libbundle-${BUNDLETARGET} rm -rf ${MIRADIR}/scripts tar cvjf ${PACKAGE_TARNAME}_dbgonly_${MIRAVERSION}.tar.bz2 ${MIRADIR} -distrib: copybin copydocs +distrib: copybin libbundle-${BUNDLETARGET} copydocs cp ../THANKS ${MIRADIR} cp README ${MIRADIR} cp LICENCE ${MIRADIR} diff -Nru mira-3.9.18/distribution/README mira-4.0/distribution/README --- mira-3.9.18/distribution/README 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/distribution/README 2014-02-02 12:05:17.000000000 +0000 @@ -1,6 +1,6 @@ - Rheinfelden, Winter 2012 + Rheinfelden, Winter 2014 -README for the binary package of MIRA 3.9.x +README for the binary package of MIRA 4.0.x =========================================== Table of contents @@ -22,36 +22,32 @@ CHANGES.txt, or for older updates, src/mira/CHANGES_old.txt of the source package distributions. -Stable versions will have major.minor.sub-version (e.g. 3.4.0 or 3.4.1) while -development version will have a branch identifier prepended (e.g. dev3.9.1). +Current stable versions will have major.minor.sub-version of 4.0.x while +development version will have a branch identifier of 4.1.x. 2. What's provided? =================== You have downloaded the binary package of MIRA. It consists of binaries, -documentation, a directory with small demos and a directory with some support -files. +documentation and support files. Binaries provided: - - mira: for assembly of genome sequences + - mira: for assembly or mapping of sequences - miramem: estimating memory needed to assemble projects. Realised through - link to mira. - - convert_project: for converting project file types into other types - - mirabait: quickly bait sequences from a large set - - caf2fasta, caf2gbf, caf2text, caf2html, gbf2caf and gbf2fasta are some - frequently used file converters (realised through links to convert_project) - - scftool: set of tools useful when working with SCF trace files - - fastatool: set of tools useful when working with FASTA trace files + link to the mira binary. + - miraconvert: for converting sequencing related file types into other + types. Includes various options for processing, filtering etc.pp. Realised + through link to the mira binary. + - mirabait: quickly bait sequences from a large set.Realised through link to + the mira binary. +Note: the above is just only one binary ("mira"), the others are just soft +links pointing to mira. Scripts provided: - fasta2frag.tcl: fragmenting sequences into smaller, overlapping subsequences. Useful for simulating shotgun sequences. Can create subsequences in both directions (/default) and also paired-end sequences. - - fastaselect.tcl: given a FASTA file (and possibly a FASTA quality file) and - a file with names of reads, select the sequences from the input FASTA (and - quality file) and writes them to an output FASTA - - fastqselect.tcl: like fastaselect.tcl, only for FASTQ - fixACE4consed.tcl: Consed has a bug which incapacitates it from reading consensus tags in ACE files written by the MIRA assembler (and possibly other programs). This script massages an ACE file so that consed can read @@ -60,6 +56,13 @@ Documentation provided: See section 4 "Documentation" +Support files provided: +The support directory contains files for the Staden gap4/gap5 assembly viewer +and finishing tool which teaches the viewer about the tags MIRA uses. These +files are up-to-date and ready to use. The same files for "consed" should be +seen as "pointer to how things could be done" as I do not own consed to test +these files. + 3. Installation =============== @@ -68,9 +71,9 @@ contained, they should work with any Linux kernel >=2.6. On Mac OSX, they may work on version 10.5 and should work on all versions >= 10.6. -Copy the binaries (and scripts if you want) into a directory in your path -environment (or add the extraction directory to your path variable) and you -are ready to go. +Copy the binaries and the soft links (and scripts if you want) into a +directory in your path environment (or add the extraction directory to your +path variable) and you are ready to go. Support files for the Staden GAP4 (GAP5) assembly finishing tool and consed are in the "support" directory. Please refer to the documentation of the @@ -93,34 +96,26 @@ - Introduction (always) - Installation (eventually) - - Short usage introduction to MIRA3 (always, although that chapter is geared - a bit towards Sanger) + - Preparing data - Then - - Assembly of 454 data with MIRA3 (when working with 454 sequences) - - Assembly of Ion Torrent data with MIRA3 (when working with Ion Torrent - sequences) - - Solexa sequence assembly with MIRA3 (when working with Solexa sequences) - - Assembly of EST data with MIRA3 (when working with EST data) + - De-novo assemblies + - Mapping assemblies + - EST / RNASeq assemblies - Working with the results of MIRA (always) - Utilities in the MIRA package (eventually) - Assembly of hard genome or EST projects (always) - Some advice when going into a sequencing project (eventually) +Vut it wouldn't hurt if you quickly looked at the tableof content of all the +other chapters to determine whether there might be something interesting for +you in it. + 5. Demos ======== -A few small usage examples for genomic and EST assembly are in the 'minidemo' -directory. As the demos rely on file links, this directory will have to be -unpacked under a Unix operating system. Unpacking it with WinZip/WinRAR/other -Windows applications and then transferring the directory to Linux will NOT -work. - -Simply go into the directory and execute the runme.sh scripts (and have a look -at them if you wish). - -However, these demos can be rather simplistic, so please do read the -documentation. +At the moment no demos are provided. However, the step by step documentation +and example configuration in the manual should get you going in no time. 6. Licenses and Disclaimer @@ -156,13 +151,13 @@ http://www.freelists.org/list/mira_talk -and send your question to: +and then send your question to: mira_talk@freelists.org To report bugs or ask for features, please use the ticketing system at: - http://sourceforge.net/apps/trac/mira-assembler/ + http://sourceforge.net/p/mira-assembler/tickets/ This ensures that requests don't get lost. diff -Nru mira-3.9.18/doc/Makefile mira-4.0/doc/Makefile --- mira-3.9.18/doc/Makefile 2013-07-01 18:39:48.000000000 +0000 +++ mira-4.0/doc/Makefile 2014-02-02 17:08:31.000000000 +0000 @@ -36,22 +36,19 @@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -117,17 +114,18 @@ BOOST_REGEX_LIB = -lboost_regex BOOST_SYSTEM_LIB = -lboost_system BOOST_THREAD_LIB = -lboost_thread +BUNDLETARGET = nobundle CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -I/usr/include -g -W -Wstrict-prototypes -fno-strict-aliasing -Wextra -ansi -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wformat -Wimplicit -Wmissing-braces -Wparentheses -Wswitch -Wswitch-default -Wswitch-enum -Wunused -Wfloat-equal -Wendif-labels -Wconversion -Wdisabled-optimization -Wsequence-point -Werror=unused-value -Werror=uninitialized -Werror=return-type +CFLAGS = -O3 -funroll-loops -I/usr/include -g -Werror=uninitialized -Werror=return-type CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -DPUBLICQUIET -DAJ_Linux64 -pthread -I/opt/biosw/include -I/usr/include -g -W -Wstrict-prototypes -fdiagnostics-show-option -Wextra -Wshadow -fno-strict-aliasing -ansi -Wcast-align -Wcast-qual -Wchar-subscripts -Wpointer-arith -Wredundant-decls -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wformat -Wimplicit -Wmissing-braces -Wparentheses -Wswitch -Wswitch-default -Wswitch-enum -Wunused -Wfloat-equal -Wendif-labels -Wconversion -Wdisabled-optimization -Wsequence-point -Werror=unused-value -Werror=uninitialized -Werror=return-type -Werror=parentheses -std=c++0x -Werror=unused-value +CXXFLAGS = -DPUBLICQUIET -DAJ_Linux64 -O3 -funroll-loops -pthread -I/opt/biosw/include -I/usr/include -g -Werror=uninitialized -Werror=return-type -Werror=parentheses -std=c++0x -Werror=unused-value CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"mira\" -DPACKAGE_TARNAME=\"mira\" -DPACKAGE_VERSION=\"3.9.18\" -DPACKAGE_STRING=\"mira\ 3.9.18\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mira\" -DVERSION=\"3.9.18\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE64=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -Drestrict=__restrict -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_FSEEKO=1 -DHAVE_ISBLANK=1 -DHAVE_NAMESPACES=/\*\*/ -DHAVE_STD=/\*\*/ -DHAVE_STL=/\*\*/ -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DBOUNDTRACKFLAG=1 -DBUGTRACKFLAG=1 +DEFS = -DPACKAGE_NAME=\"mira\" -DPACKAGE_TARNAME=\"mira\" -DPACKAGE_VERSION=\"4.0\" -DPACKAGE_STRING=\"mira\ 4.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mira\" -DVERSION=\"4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE64=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -Drestrict=__restrict -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_FSEEKO=1 -DHAVE_ISBLANK=1 -DHAVE_NAMESPACES=/\*\*/ -DHAVE_STD=/\*\*/ -DHAVE_STL=/\*\*/ -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_LIBRT=1 -DBOUNDTRACKFLAG=1 -DBUGTRACKFLAG=1 DEPDIR = .deps DLLTOOL = false DSYMUTIL = @@ -157,7 +155,7 @@ LEXLIB = -lfl LEX_OUTPUT_ROOT = lex.yy LIBOBJS = -LIBS = -lboost_thread -lboost_regex -lboost_system -lboost_filesystem -lboost_iostreams -lexpat -lm -lz -lbz2 -ltcmalloc_minimal +LIBS = -lboost_thread -lboost_regex -lboost_system -lboost_filesystem -lboost_iostreams -lrt -lexpat -lm -lz -lbz2 -ltcmalloc_minimal LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s @@ -175,17 +173,17 @@ PACKAGE = mira PACKAGE_BUGREPORT = PACKAGE_NAME = mira -PACKAGE_STRING = mira 3.9.18 +PACKAGE_STRING = mira 4.0 PACKAGE_TARNAME = mira PACKAGE_URL = -PACKAGE_VERSION = 3.9.18 +PACKAGE_VERSION = 4.0 PATH_SEPARATOR = : RANLIB = ranlib SED = /bin/sed SET_MAKE = SHELL = /bin/bash STRIP = strip -VERSION = 3.9.18 +VERSION = 4.0 abs_builddir = /home/bach/work/assembly/mira.git/doc abs_srcdir = /home/bach/work/assembly/mira.git/doc abs_top_builddir = /home/bach/work/assembly/mira.git diff -Nru mira-3.9.18/doc/Makefile.in mira-4.0/doc/Makefile.in --- mira-3.9.18/doc/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/doc/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -36,22 +36,19 @@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -117,6 +114,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/doc/docbook/Makefile mira-4.0/doc/docbook/Makefile --- mira-3.9.18/doc/docbook/Makefile 2013-07-01 18:39:48.000000000 +0000 +++ mira-4.0/doc/docbook/Makefile 2014-02-02 17:08:31.000000000 +0000 @@ -36,22 +36,19 @@ subdir = doc/docbook DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -77,17 +74,18 @@ BOOST_REGEX_LIB = -lboost_regex BOOST_SYSTEM_LIB = -lboost_system BOOST_THREAD_LIB = -lboost_thread +BUNDLETARGET = nobundle CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -I/usr/include -g -W -Wstrict-prototypes -fno-strict-aliasing -Wextra -ansi -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wformat -Wimplicit -Wmissing-braces -Wparentheses -Wswitch -Wswitch-default -Wswitch-enum -Wunused -Wfloat-equal -Wendif-labels -Wconversion -Wdisabled-optimization -Wsequence-point -Werror=unused-value -Werror=uninitialized -Werror=return-type +CFLAGS = -O3 -funroll-loops -I/usr/include -g -Werror=uninitialized -Werror=return-type CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -DPUBLICQUIET -DAJ_Linux64 -pthread -I/opt/biosw/include -I/usr/include -g -W -Wstrict-prototypes -fdiagnostics-show-option -Wextra -Wshadow -fno-strict-aliasing -ansi -Wcast-align -Wcast-qual -Wchar-subscripts -Wpointer-arith -Wredundant-decls -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wformat -Wimplicit -Wmissing-braces -Wparentheses -Wswitch -Wswitch-default -Wswitch-enum -Wunused -Wfloat-equal -Wendif-labels -Wconversion -Wdisabled-optimization -Wsequence-point -Werror=unused-value -Werror=uninitialized -Werror=return-type -Werror=parentheses -std=c++0x -Werror=unused-value +CXXFLAGS = -DPUBLICQUIET -DAJ_Linux64 -O3 -funroll-loops -pthread -I/opt/biosw/include -I/usr/include -g -Werror=uninitialized -Werror=return-type -Werror=parentheses -std=c++0x -Werror=unused-value CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"mira\" -DPACKAGE_TARNAME=\"mira\" -DPACKAGE_VERSION=\"3.9.18\" -DPACKAGE_STRING=\"mira\ 3.9.18\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mira\" -DVERSION=\"3.9.18\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE64=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -Drestrict=__restrict -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_FSEEKO=1 -DHAVE_ISBLANK=1 -DHAVE_NAMESPACES=/\*\*/ -DHAVE_STD=/\*\*/ -DHAVE_STL=/\*\*/ -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DBOUNDTRACKFLAG=1 -DBUGTRACKFLAG=1 +DEFS = -DPACKAGE_NAME=\"mira\" -DPACKAGE_TARNAME=\"mira\" -DPACKAGE_VERSION=\"4.0\" -DPACKAGE_STRING=\"mira\ 4.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mira\" -DVERSION=\"4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE64=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -Drestrict=__restrict -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_FSEEKO=1 -DHAVE_ISBLANK=1 -DHAVE_NAMESPACES=/\*\*/ -DHAVE_STD=/\*\*/ -DHAVE_STL=/\*\*/ -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_LIBRT=1 -DBOUNDTRACKFLAG=1 -DBUGTRACKFLAG=1 DEPDIR = .deps DLLTOOL = false DSYMUTIL = @@ -117,7 +115,7 @@ LEXLIB = -lfl LEX_OUTPUT_ROOT = lex.yy LIBOBJS = -LIBS = -lboost_thread -lboost_regex -lboost_system -lboost_filesystem -lboost_iostreams -lexpat -lm -lz -lbz2 -ltcmalloc_minimal +LIBS = -lboost_thread -lboost_regex -lboost_system -lboost_filesystem -lboost_iostreams -lrt -lexpat -lm -lz -lbz2 -ltcmalloc_minimal LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s @@ -135,17 +133,17 @@ PACKAGE = mira PACKAGE_BUGREPORT = PACKAGE_NAME = mira -PACKAGE_STRING = mira 3.9.18 +PACKAGE_STRING = mira 4.0 PACKAGE_TARNAME = mira PACKAGE_URL = -PACKAGE_VERSION = 3.9.18 +PACKAGE_VERSION = 4.0 PATH_SEPARATOR = : RANLIB = ranlib SED = /bin/sed SET_MAKE = SHELL = /bin/bash STRIP = strip -VERSION = 3.9.18 +VERSION = 4.0 abs_builddir = /home/bach/work/assembly/mira.git/doc/docbook abs_srcdir = /home/bach/work/assembly/mira.git/doc/docbook abs_top_builddir = /home/bach/work/assembly/mira.git @@ -200,7 +198,7 @@ top_builddir = ../.. top_srcdir = ../.. GITBUILD = `$(top_srcdir)/build-aux/git-version-gen isshort $(top_srcdir)/.tarball-version` -CHAPTERS = chap_bitsandpieces_part chap_mirautils_part chap_454_part chap_iontor_part chap_est_part chap_faq_part chap_hard_part chap_logfiles_part chap_maf_part chap_pacbio_part chap_reference_part chap_sanger_part chap_solexa_part chap_installation_part chap_intro_part chap_results_part chap_sra_part chap_seqadvice_part chap_bonus_part chap_preface_part chap_3p_ghbambus_part.xml +CHAPTERS = chap_specialparams_part.xml chap_denovo_part.xml chap_mapping_part.xml chap_seqtechdesc_part.xml chap_bitsandpieces_part chap_mirautils_part chap_est_part chap_faq_part chap_hard_part chap_logfiles_part chap_maf_part chap_reference_part chap_installation_part chap_intro_part chap_results_part chap_sra_part chap_seqadvice_part chap_bonus_part chap_preface_part chap_3p_ghbambus_part.xml CHAP_XML = $(CHAPTERS:%_part=%_part.xml) CHAP_HTML = $(CHAPTERS:%_part=%_part.html) EXTRA_DIST = ${CHAP_XML} book_definitiveguide.xml bookfigures book.xsl doccss images mira.xsl versionfile @@ -409,15 +407,24 @@ chapters: ${CHAP_HTML} versionfile -book_3rdparty: versionfile ${CHAP_XML} book_3rdparty.xml +book_3rdparty_html: versionfile ${CHAP_XML} book_3rdparty.xml xsltproc --nonet --xinclude --output 3rdparty_MIRA.html $(top_srcdir)/doc/docbook/book.xsl $(top_srcdir)/doc/docbook/book_3rdparty.xml + +book_3rdparty_pdf: versionfile ${CHAP_XML} book_3rdparty.xml dblatex --xslt-opts=--nonet --output=3rdparty_MIRA.pdf $(top_srcdir)/doc/docbook/book_3rdparty.xml -book_definitive: versionfile ${CHAP_XML} book_definitiveguide.xml +book_definitive_html: versionfile ${CHAP_XML} book_definitiveguide.xml xsltproc --nonet --xinclude --output DefinitiveGuideToMIRA.html $(top_srcdir)/doc/docbook/book.xsl $(top_srcdir)/doc/docbook/book_definitiveguide.xml +book_definitive_pdf: versionfile ${CHAP_XML} book_definitiveguide.xml dblatex --xslt-opts=--nonet --output=DefinitiveGuideToMIRA.pdf $(top_srcdir)/doc/docbook/book_definitiveguide.xml -books: versionfile book_definitive book_3rdparty +book_definitive: versionfile ${CHAP_XML} book_definitive_html book_definitive_pdf + +books_html: versionfile book_definitive_html book_3rdparty_html + +books_pdf: versionfile book_definitive_pdf book_3rdparty_pdf + +books: versionfile books_html books_pdf all: versionfile books chapters diff -Nru mira-3.9.18/doc/docbook/Makefile.am mira-4.0/doc/docbook/Makefile.am --- mira-3.9.18/doc/docbook/Makefile.am 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/Makefile.am 2014-02-02 12:05:17.000000000 +0000 @@ -7,7 +7,7 @@ @echo \MIRA Version ${GITBUILD}\ >>versionfile -CHAPTERS = chap_bitsandpieces_part chap_mirautils_part chap_454_part chap_iontor_part chap_est_part chap_faq_part chap_hard_part chap_logfiles_part chap_maf_part chap_pacbio_part chap_reference_part chap_sanger_part chap_solexa_part chap_installation_part chap_intro_part chap_results_part chap_sra_part chap_seqadvice_part chap_bonus_part chap_preface_part chap_3p_ghbambus_part.xml +CHAPTERS = chap_specialparams_part.xml chap_denovo_part.xml chap_mapping_part.xml chap_seqtechdesc_part.xml chap_bitsandpieces_part chap_mirautils_part chap_est_part chap_faq_part chap_hard_part chap_logfiles_part chap_maf_part chap_reference_part chap_installation_part chap_intro_part chap_results_part chap_sra_part chap_seqadvice_part chap_bonus_part chap_preface_part chap_3p_ghbambus_part.xml CHAP_XML = $(CHAPTERS:%_part=%_part.xml) CHAP_HTML = $(CHAPTERS:%_part=%_part.html) @@ -26,15 +26,25 @@ chapters: ${CHAP_HTML} versionfile -book_3rdparty: versionfile ${CHAP_XML} book_3rdparty.xml +book_3rdparty_html: versionfile ${CHAP_XML} book_3rdparty.xml xsltproc --nonet --xinclude --output 3rdparty_MIRA.html $(top_srcdir)/doc/docbook/book.xsl $(top_srcdir)/doc/docbook/book_3rdparty.xml + +book_3rdparty_pdf: versionfile ${CHAP_XML} book_3rdparty.xml dblatex --xslt-opts=--nonet --output=3rdparty_MIRA.pdf $(top_srcdir)/doc/docbook/book_3rdparty.xml -book_definitive: versionfile ${CHAP_XML} book_definitiveguide.xml +book_definitive_html: versionfile ${CHAP_XML} book_definitiveguide.xml xsltproc --nonet --xinclude --output DefinitiveGuideToMIRA.html $(top_srcdir)/doc/docbook/book.xsl $(top_srcdir)/doc/docbook/book_definitiveguide.xml +book_definitive_pdf: versionfile ${CHAP_XML} book_definitiveguide.xml dblatex --xslt-opts=--nonet --output=DefinitiveGuideToMIRA.pdf $(top_srcdir)/doc/docbook/book_definitiveguide.xml -books: versionfile book_definitive book_3rdparty +book_definitive: versionfile ${CHAP_XML} book_definitive_html book_definitive_pdf + + +books_html: versionfile book_definitive_html book_3rdparty_html + +books_pdf: versionfile book_definitive_pdf book_3rdparty_pdf + +books: versionfile books_html books_pdf all: versionfile books chapters diff -Nru mira-3.9.18/doc/docbook/Makefile.in mira-4.0/doc/docbook/Makefile.in --- mira-3.9.18/doc/docbook/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/doc/docbook/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -36,22 +36,19 @@ subdir = doc/docbook DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -77,6 +74,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -200,7 +198,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ GITBUILD = `$(top_srcdir)/build-aux/git-version-gen isshort $(top_srcdir)/.tarball-version` -CHAPTERS = chap_bitsandpieces_part chap_mirautils_part chap_454_part chap_iontor_part chap_est_part chap_faq_part chap_hard_part chap_logfiles_part chap_maf_part chap_pacbio_part chap_reference_part chap_sanger_part chap_solexa_part chap_installation_part chap_intro_part chap_results_part chap_sra_part chap_seqadvice_part chap_bonus_part chap_preface_part chap_3p_ghbambus_part.xml +CHAPTERS = chap_specialparams_part.xml chap_denovo_part.xml chap_mapping_part.xml chap_seqtechdesc_part.xml chap_bitsandpieces_part chap_mirautils_part chap_est_part chap_faq_part chap_hard_part chap_logfiles_part chap_maf_part chap_reference_part chap_installation_part chap_intro_part chap_results_part chap_sra_part chap_seqadvice_part chap_bonus_part chap_preface_part chap_3p_ghbambus_part.xml CHAP_XML = $(CHAPTERS:%_part=%_part.xml) CHAP_HTML = $(CHAPTERS:%_part=%_part.html) EXTRA_DIST = ${CHAP_XML} book_definitiveguide.xml bookfigures book.xsl doccss images mira.xsl versionfile @@ -409,15 +407,24 @@ chapters: ${CHAP_HTML} versionfile -book_3rdparty: versionfile ${CHAP_XML} book_3rdparty.xml +book_3rdparty_html: versionfile ${CHAP_XML} book_3rdparty.xml xsltproc --nonet --xinclude --output 3rdparty_MIRA.html $(top_srcdir)/doc/docbook/book.xsl $(top_srcdir)/doc/docbook/book_3rdparty.xml + +book_3rdparty_pdf: versionfile ${CHAP_XML} book_3rdparty.xml dblatex --xslt-opts=--nonet --output=3rdparty_MIRA.pdf $(top_srcdir)/doc/docbook/book_3rdparty.xml -book_definitive: versionfile ${CHAP_XML} book_definitiveguide.xml +book_definitive_html: versionfile ${CHAP_XML} book_definitiveguide.xml xsltproc --nonet --xinclude --output DefinitiveGuideToMIRA.html $(top_srcdir)/doc/docbook/book.xsl $(top_srcdir)/doc/docbook/book_definitiveguide.xml +book_definitive_pdf: versionfile ${CHAP_XML} book_definitiveguide.xml dblatex --xslt-opts=--nonet --output=DefinitiveGuideToMIRA.pdf $(top_srcdir)/doc/docbook/book_definitiveguide.xml -books: versionfile book_definitive book_3rdparty +book_definitive: versionfile ${CHAP_XML} book_definitive_html book_definitive_pdf + +books_html: versionfile book_definitive_html book_3rdparty_html + +books_pdf: versionfile book_definitive_pdf book_3rdparty_pdf + +books: versionfile books_html books_pdf all: versionfile books chapters diff -Nru mira-3.9.18/doc/docbook/attic/README.txt mira-4.0/doc/docbook/attic/README.txt --- mira-3.9.18/doc/docbook/attic/README.txt 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/attic/README.txt 2014-02-02 12:05:17.000000000 +0000 @@ -13,3 +13,254 @@ Therefore, instead of commenting out, things go to attic *sigh* + + + + + + + Walkthroughs + + + + + These walkthroughs use "msd" as project name (acronym for My Simple Dataset), + please replace that with your own project name according to the MIRA naming + convention. + + + + mira with "--job=est" + + + + + + Example: One strain, Sanger without vectors and no XML + + + Given is just a FASTA and FASTA quality file, where the Sanger + sequencing vector sequences and problematic things (like bad + quality) have been either completely removed from the data or were + masked with "X". Apart from that, no further processing (poly-A + removal etc.) was done. Your directory looks like this: + + +bach@arcadia:$ ls -l +-rwxr--r-- 1 bach bach 15486163 2009-02-22 21:01 msd_in.sanger.fasta +-rwxr--r-- 1 bach bach 38017687 2009-02-22 21:01 msd_in.sanger.fasta.qual + + + + Then, use this command: + + +$ mira --project=msd + --job=denovo,est,accurate,sanger + SANGER_SETTINGS + -CL:qc=no + >& log_assembly.txt + + + + We switch off the Sanger quality clips because bad quality is + already trimmed away by your pipeline. + + + + + Example: One strain, 454 with XML ancillary data + + + Like above, but this time 454 sequencing and the FASTA files contain + everything (including remaining adaptors and bad quality), but + there's a XML with ancillary data which contains all necessary clips + (like generated by, e.g., sff_extract): + + +bach@arcadia:$ ls -l +-rwxr--r-- 1 bach bach 15486163 2009-02-22 21:01 msd_in.454.fasta +-rwxr--r-- 1 bach bach 38017687 2009-02-22 21:01 msd_in.454.fasta.qual +-rwxr--r-- 1 bach bach 10433244 2009-02-22 21:01 msd_traceinfo_in.454.xml + + Then, use this command: + + +bach@arcadia:$ mira --project=msd + --job=denovo,est,accurate,454 + 454_SETTINGS + -CL:qc=no + >& log_assembly.txt + + + + We just switch off our quality clip for 454 (and load the quality + clips from the XML), poly-A removal is performed by MIRA. Loading of + TRACEINFO XML data must not be switched on as it's the default for + 454 data. + + + + + Example: One strain, 454 with XML ancillary data, poly-A already removed. + + + Like above, but this time the data was pre-processed by another program + to mask the poly-A stretches with X: + + +bach@arcadia:$ ls -l +-rwxr--r-- 1 bach bach 15486163 2009-02-22 21:01 msd_in.454.fasta +-rwxr--r-- 1 bach bach 38017687 2009-02-22 21:01 msd_in.454.fasta.qual +-rwxr--r-- 1 bach bach 10433244 2009-02-22 21:01 msd_traceinfo_in.454.xml + + Then, use this command: + + +bach@arcadia:$ mira --project=msd + --job=denovo,est,accurate,454 + 454_SETTINGS + -CL:qc=no:cpat=no + >& log_assembly.txt + + + + + We just switch off our quality clip (and load the quality clips from + the XML) and also switch off poly-A clipping. Remember, never + perform poly-A/T clipping twice on a data set. + + + + + Example: Two strains, 454 with XML ancillary data, poly-A already + removed. + + + Like above, but this time we assign reads to different + strains. This can happen either by putting the strain information + into the XML file (using the strain field of the + NCBI TRACEINFO format definition) or by using a two column, + tab-delimited file which mira loads on request. + + + As written. when using XML no change to the command line from the + last example would be needed. This example uses the extra file with + strain information. The file + msd_straindata_in.txt contains key value pair + information on the relationship of reads to strains and looks like + this (gnlti* are name of reads): + + +bach@arcadia:$ cat msd_straindata_in.454.txt +gnlti136478626 tom +gnlti136479357 tom +gnlti136479063 tom +gnlti136478624 jerry +gnlti136479522 jerry +gnlti136477918 jerry + + Then, use this command (note the additional -LR:lsd + option): + + +bach@arcadia:$ mira --project=msd + --job=denovo,est,accurate,454 + 454_SETTINGS + -LR:lsd=yes + -CL:qc=no:cpat=no + >& log_assembly.txt + + + + + + miraSearchESTSNPs + + + + + + Example: Two strains, Sanger with masked sequences, no XML + + + Given just a FASTA and FASTA quality file, where the Sanger + sequencing vectors and all sequencing related things (like bad + quality) have been either completely removed from the data or were + masked with "X". Apart from that, no further processing (poly-A + removal etc.) was done. + + + You have n strains (in this + example n=2) called "tom" and "jerry" + + + Your directory looks like this: + + +bach@arcadia:$ ls -l +-rw-r--r-- 1 bach bach 5276 2009-02-22 21:23 msd_in.sanger.fasta +-rw-r--r-- 1 bach bach 13827 2009-02-22 21:23 msd_in.sanger.fasta.qual +-rw-r--r-- 1 bach bach 120 2009-02-22 21:27 msd_straindata_in.txt + + The file msd_straindata_in.txt contains key + value pair information on the relationship of reads to strains and + looks like this (gnlti* are name of reads): + + +bach@arcadia:$ cat msd_straindata_in.txt +gnlti136478626 tom +gnlti136479357 tom +gnlti136479063 tom +gnlti136478624 jerry +gnlti136479522 jerry +gnlti136477918 jerry + + To assemble, use this: + + +bach@arcadia:$ miraSearchESTSNPs + --project=msd + --job=denovo,accurate,sanger,esps1 + >&log_assembly_esps1.txt + + Note that the results of this first step are in sub-directories + prefixed with "step1". + + + When the first step finished, continue with this (note that no + "--project" is given here): + + +bach@arcadia:$ miraSearchESTSNPs + --job=denovo,accurate,esps2 + >&log_assembly_esps2.txt + + + Note that the results of this second step are in sub-directories + prefixed with "tom", "jerry" and "remain". You will find in each + directory the clean transcripts from every strain/organism. + + + To see which SNPs exist between both "tom" and "jerry", launch the + third step: + + +bach@arcadia:$ miraSearchESTSNPs + --job=denovo,accurate,esps3 + >&log_assembly_esps3.txt + + + + + Note that the results of this third step are in sub-directories + prefixed with "step3". + + + In the step3_d_results directory for example, + you can transform the CAF file into a gap4 database and then look at + the SNPs searching for the tags SROr, SIOr and SAOr. + + + + diff -Nru mira-3.9.18/doc/docbook/attic/chap_454_part.xml mira-4.0/doc/docbook/attic/chap_454_part.xml --- mira-3.9.18/doc/docbook/attic/chap_454_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/attic/chap_454_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,916 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +

    + Solomon Short + + Upset causes changes. Change causes upset. + +
    + Assembly of 454 data with MIRA3 + + + Introduction + + + MIRA can assemble 454 type data either on its own or together with any + other technology MIRA know to handle (Illumina, Sanger, + etc.). Paired-end sequences coming from genomic projects can also be + used if you take care to prepare your data the way MIRA needs it. + + + MIRA goes a long way to assemble sequence in the best possible way: it + uses multiple passes, learning in each pass from errors that occurred in + the previous passes. There are routines specialised in handling oddities + that occur in different sequencing technologies + + + Tip Use the MIRA version of + the sff_extract script which is provided as + download in the MIRA 3rd party software package. This script knows + about adaptor information and all the little important details when + extracting data from SFF into FASTQ (or FASTA) format. + + + + Some reading requirements + + + This guide assumes that you have basic working knowledge of Unix + systems, know the basic principles of sequencing (and sequence + assembly) and what assemblers do. + + + While there are step by step walkthroughs on how to setup your 454 + data and then perform an assembly, this guide expects you to read at + some point in time + + + + + the "Caveats when using 454 data" section of + this document (just below). This. Is. Important. Read. It! + + + + + the mira_usage introductory help file so that + you have a basic knowledge on how to set up projects in mira for + Sanger sequencing projects. + + + + + the GS FLX Data Processing Software Manual + from Roche Diagnostics (or the corresponding manual for the GS20 + or Titanium instruments). + + + + + and last but not least the mira_reference + help file to look up some command line options. + + + + + + + + + Playing around with some demo data + + + If you want to jump into action, I suggest you walk through the + "Walkthrough: combined unpaired and paired-end assembly of Brucella + ceti" section of this document to get a feeling on how things + work. That particular walkthrough is with paired and unpaired 454 data + from the NCBI short read archive, so be prepared to download a couple + of hundred MiBs. + + + But please do not forget to come back to the "Caveats" section just + below later, it contains a pointers to common traps lurking in the + depths of high throughput sequencing. + + + + + Estimating memory needs + + + "Do I have enough memory?" has been one of the + most often asked question in former times. To answer this question, + please use miramem which will give you an estimate. Basically, you + just need to start the program and answer the questions, for more + information please refer to the corresponding section in the main MIRA + documentation. + + + Take this estimate with a grain of salt, depending on the sequences + properties, variations in the estimate can be +/- 30%. + + + Take these estimates even with a larger grain of salt for + eukaryotes. Some of them are incredibly repetitive and this leads + currently to the explosion of some secondary tables in MIRA. I'm + working on it. + + + + + + Caveats when using 454 data + + + Please take some time to read this section. If you're really eager to + jump into action, then feel free to skip forward to the walkthrough, but + make sure to come back later. + + + + Screen. Your. Sequences! (part 1) + + + Or at least use the vector clipping info provided in the SFF file and + have them put into a standard NCBI TRACEINFO XML format. Yes, that's + right: vector clipping info. + + + Here's the short story: 454 reads can contain a kind of vector + sequence. To be more precise, they can - and very often do - contain + the sequence of the (A or B)-adaptors that were used for sequencing. + + + To quote a competent bioinformatician who thankfully dug through quite + some data and patent filings to find out what is going on: "These + adaptors consist of a PCR primer, a sequencing primer and a key. The + B-adaptor is always in because it's needed for the emPCR and + sequencing. If the fragments are long enough, then one usually does + not reach the adaptor at all. But if the fragments are too short - + tough luck." + + + Basically it's tough luck for a lot of 454 sequencing + project I have seen so far, both for public data (sequences available + at the NCBI trace archive) and non-public data. + + + + + Screen. Your. Sequences! (optional part 2) + + + Some labs use specially designed tags for their sequencing (I've heard + of cases with up to 20 bases). The tag sequences always being very + identical, they will behave like vector sequences in an assembly. Like + for any other assembler: if you happen to get such a project, then you + must take care that those tags are filtered out, respectively masked + from your sequences before going into an assembly. If you don't, the + results will be messy at best. + + + Tip Put your FASTAs through SSAHA2 or better, SMALT + with the sequence of your tags as masking target. MIRA can read the + SSAHA2 output (or SMALT when using "-f ssaha" output) and mask + internally using the MIRA -CL:msvs* parameters. + + + + + To right clip or not to right clip? + + + Sequences coming from the GS20, FLX or Titanium have usually pretty + good clip points set by the Roche/454 preprocessing software. There + is, however, a tendency to overestimate the quality towards the end of + the sequences and declare sequence parts as 'good' which really + shouldn't be. + + + Sometimes, these bad parts toward the end of sequences are so + annoyingly bad that they prevent MIRA from correctly building contigs, + that is, instead of one contig you might get two. + + + MIRA has the -CL:pec clipping option to deal with these + annoyances (standard for all --job=genome + assemblies). This algorithm performs proposed end + clipping which will guarantee that the ends of reads are + clean when the coverage of a project is high enough. + + + For genomic sequences: the term 'enough' being somewhat fuzzy + ... everything above a coverage of 15x should be no problem at all, + coverages above 10x should also be fine. Things start to get tricky + below 10x, but give it a try. Below 6x however, switch off + the -CL:pec option. + + + + + Left clipping wrongly preprocessed data + + + Short intro, to be expanded. (see example in B:ceti walkthrough) + + + + + + Walkthrough: a 454 assembly with unpaired reads + + + + Preparing the 454 data for MIRA + + + The basic data type you will get from the sequencing instruments will + be SFF files. Those files contain almost all information needed for an + assembly, but they need to be converted into more standard files + before mira can use this information. + + + Let's assume we just sequenced a bug (Bacillus + chocorafoliensis) and internally our department uses the + short bchoc mnemonic for your + project/organism/whatever. So, whenever you + see bchoc in the following text, you can replace + it by whatever name suits you. + + + For this example, we will assume that you have created a directory + myProject for the data of your project and that + the SFF files are in there. Doing a ls -lR should + give you something like this: + + +arcadia:/path/to/myProject$ ls -lR +-rw-rw-rw- 1 bach users 475849664 2007-09-23 10:10 EV10YMP01.sff +-rw-rw-rw- 1 bach users 452630172 2007-09-25 08:59 EV5RTWS01.sff +-rw-rw-rw- 1 bach users 436489612 2007-09-21 08:39 EVX95GF02.sff + + + As you can see, this sequencing project has 3 SFF + files. + + + We'll use sff_extract: + + +arcadia:/path/to/myProject$ sff_extract -o bchoc EV10YMP01.sff EV5RTWS01.sff EVX95GF02.sff + + For more information on how to use sff_extract, + please refer to the chapter in the NCBI Trace and Short Read archive. + + + This can take some time, the 1.2 million FLX reads from this + example need approximately 9 minutes for conversion. Your directory + should now look something like this: + + +arcadia:/path/to/myProject$ ls -l +-rw-r--r-- 1 bach users 231698898 2007-10-21 15:16 bchoc.fastq +-rw-r--r-- 1 bach users 193962260 2007-10-21 15:16 bchoc.xml +-rw-rw-rw- 1 bach users 475849664 2007-09-23 10:10 EV10YMP01.sff +-rw-rw-rw- 1 bach users 452630172 2007-09-25 08:59 EV5RTWS01.sff +-rw-rw-rw- 1 bach users 436489612 2007-09-21 08:39 EVX95GF02.sff + + By this time, the SFFs are not needed anymore. You can remove them + from this directory if you want. + + + + + Writing a manifest + + + The manifest is a configuration file for an assembly: it controls what + type of assembly you want to do and which data should go into the + assembly. For this first example, we just need a very simple manifest: + + +# A manifest file can contain comment lines, these start with the #-character + +# First part of a manifest: defining some basic things + +# In this example, we just give a name to the assembly +# and tell MIRA it should assemble a genome de-novo in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = MyFirstAssembly +job = genome,denovo,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups", for more information +# please consult the MIRA manual, chapter "Reference" + +readgroup = SomeUnpaired454ReadsIGotFromTheLab +technology = 454 +data = bchoc.fastq bchoc.xml + + Save the above lines into a file, we'll use + bchoc_1st_manifest.conf in this example. + + +arcadia:/path/to/myProject$ ls -l +-rw-r--r-- 1 bach users 231698898 2007-10-21 15:16 bchoc.fastq +-rw-r--r-- 1 bach users 193962260 2007-10-21 15:16 bchoc.xml +-rw-r--r-- 1 bach users 756 2011-11-05 17:57 bchoc_1st_manifest.conf + + + + Starting the assembly + + + Starting the assembly is now just a matter of one line: + + +arcadia:/path/to/myProject$ mira bchoc_1st_manifest.conf >&log_assembly.txt + + Now, that was easy, wasn't it? In the above example - for assemblies + having only 454 data and if you followed the walkthrough on how to + prepare the data - everything you might want to adapt in the first + time are the following line in the manifest file: + + + + + project= (for naming your assembly project) + + + + + job= (perhaps to change the quality of the assembly to 'draft') + + + + + parameters= -GE:not=xxx (perhaps to change the number of processors) + + + + + Of course, you are free to change any option via the extended + parameters, but this is covered in the MIRA main reference manual. + + + + + + Walkthrough: a paired-end Sanger / unpaired 454 hybrid assembly + + + Preparing the data for a Sanger / 454 hybrid assembly takes some more steps + but is not really more complicated than a normal Sanger-only or 454-only + assembly. + + + In the following sections, the files with 454 input data will have + .454. in the name, files with Sanger have + .sanger.. That's just a convention I use, you do + not need to do that, but it helps to keep things nicely organised. + + + + Preparing the 454 data + + + Please proceed exactly in the same way as described for the assembly + of unpaired 454-only data in the section above, that is, without + writing a manifest and starting the actual assembly. The only difference: in the sff_extract part, use "-o" with the parameter "bchoc.454" to get the files named accordingly. + + +arcadia:/path/to/myProject$ sff_extract -o bchoc.454 EV10YMP01.sff EV5RTWS01.sff EVX95GF02.sff + + In the end you should have two files (FASTQ and TRACEINFO) for the 454 + data ready. + + + + + Preparing the Sanger data + + + There are quite a number of sequencing providers out there, all with + different pre-processing pipelines and different output + file-types. MIRA supports quite a number of them, the three most + important would probably be + + + + + (preferred option) FASTQ files and ancillary data in NCBI + TRACEINFO XML format. + + + + + (preferred option) FASTA files which are coupled with FASTA quality + files and ancillary data in NCBI TRACEINFO XML format. + + + + + (preferred option) CAF (from the Sanger Institute) files that + contain the sequence, quality values and ancillary data like + clippings etc. + + + + + (secondary option) EXP files as the Staden pregap4 package writes. + + + + + Your sequencing provider MUST have performed at least a sequencing + vector clip on this data. A quality clip might also be good to do by + the provider as they usually know best what quality they can expect + from their instruments (although MIRA can do this also if you want). + + + You can either perform clipping the hard way by removing physically + all bases from the input (this is + called trimming), or you can keep the clipped + bases in the input file and provided clipping information in ancillary + data files. These clipping information then MUST be present in the + ancillary data (either the TRACEINFO XML, or in the combined CAF, or + in the EXP files), together with other standard data like, e.g., + mate-pair information when using a paired-ends approach. + + + This example assumes that the data is provided as FASTA together with a + quality file and ancillary data in NCBI TRACEINFO XML format. + + + Put these files (appropriately renamed) into the directory with the + 454 data. + + + Here's how the directory with the preprocessed data should now look + approximately like: + + +arcadia:/path/to/myProject$ ls -l +-rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.454.fastq +-rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.454.xml + +-rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.sanger.fastq +-rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.sanger.xml + + + + Writing a manifest + + + This assembly contains unpaired 454 data and paired-end Sanger + data. Let's assume the 454 data to be exactly the same as for the + previous walkthrough. For the Sanger data, let's assume the template + DNA size for the Sanger library to be between 2500 and 3500 bases and + the read naming to follow the TIGR naming scheme: + + +# A manifest file can contain comment lines, these start with the #-character + +# First part of a manifest: defining some basic things + +# In this example, we just give a name to the assembly +# and tell MIRA it should assemble a genome de-novo in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = MyFirstHybridAssembly +job = genome,denovo,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups", for more information +# please consult the MIRA manual, chapter "Reference" + +readgroup = SomeUnpaired454ReadsIGotFromTheLab +technology = 454 +data = bchoc.454.* + +# Note the wildcard "bchoc.454.*" in the data line above: this +# will load both the FASTQ and XML data + +readgroup = SomePairedSangerReadsIGotFromTheLab +technology = sanger +template_size = 2500 3500 +segment_placement = ---> <--- +segment_naming = TIGR +data = bchoc.sanger.* + + If you compare the manifest above with the manifest in the walkthrough + for using only unpaired 454 data, you will see that large parts, i.e., + the definition of the job, parameter and the 454 read group is + exactly the same. The only differences are in the + naming of the assembly project (in project =), and + the definition of a second readgroup containing the Sanger sequencing + data. + + + + + Starting the hybrid assembly + + + Quite unsurprisingly, the command to start the assembly is exactly the same as always: + + +arcadia:/path/to/myProject$ mira myassebly_manifest.conf >&log_assembly.txt + + + + + Walkthrough: combined unpaired and paired-end assembly of Brucella ceti + + + Here's a walkthrough which should help you in setting up own assemblies. You + do not need to set up your directory structures as I do, but for this + walkthrough it could help. + + + This walkthrough was written at times when the NCBI still offered SFFs + for 454 data, which now it does not anymore. However, the approach is + still valid for your data where you should get SFFs. + + + This walkthrough was written at times when the primary input for 454 + data in MIRA was using FASTA + FASTA quality files. This has shifted + nowadays to FASTQ as input (it's more compact and faster to parse). I'm + sure you will be able to make the necessary changes to the command line + of sff_extract yourself :-) + + + + Preliminaries + + + Please make sure that sff_extract is working properly and that you have + at least version 0.2.1 (use sff_extract -v). Please also make sure + that SSAHA2 can be run correctly (test this by running ssaha2 -v). + + + + + Preparing your file system + + + Note: this is how I set up a project, feel free to implement whatever + structure suits your needs. + + +$ mkdir bceti +$ cd bceti +bceti_assembly$ mkdir origdata data assemblies + + Your directory should now look like this: + + +arcadia:bceti$ ls -l +drwxr-xr-x 2 bach users 48 2008-11-08 16:51 assemblies +drwxr-xr-x 2 bach users 48 2008-11-08 16:51 data +drwxr-xr-x 2 bach users 48 2008-11-08 16:51 origdata + + Explanation of the structure: + + + + + the origdata directory will contain the 'raw' + result files that one might get from sequencing. Basically,. + + + + + the data directory will contain the + preprocessed sequences for the assembly, ready to be used by MIRA + + + + + the assemblies directory will contain + assemblies we make with our data (we might want to make more than + one). + + + + + + + + + Getting the data + + + Since early summer 2009, the NCBI does not offer SFF files anymore, + which is a pity. This guide will nevertheless allow you to perform + similar assemblies on own data. + + + Please browse to + + and + + and download the SFF files to the origdata + directory (press the download button on those pages). + + + En passant, note the following: SRR005481 is described to be a 454 FLX + data set where the library contains unpaired data ("Library Layout: + SINGLE"). SRR005482 has also 454 FLX data, but this time it's + paired-end data ("Library Layout: PAIRED + (ORIENTATION=forward)"). Knowing this will be important later on in + the process. + + +arcadia:bceti$ cd origdata +arcadia:origdata$ ls -l +-rw-r--r-- 1 bach users 240204619 2008-11-08 16:49 SRR005481.sff.gz +-rw-r--r-- 1 bach users 211333635 2008-11-08 16:55 SRR005482.sff.gz + + We need to unzip those files: + + +arcadia:bceti_assembly/origdata$ gunzip *.gz + + And now this directory should look like this + + +arcadia:bceti_assembly/origdata$ ls -l +-rw-r--r-- 1 bach users 544623256 2008-11-08 16:49 SRR005481.sff +-rw-r--r-- 1 bach users 476632488 2008-11-08 16:55 SRR005482.sff + + Now move into the (still empty) data directory + + +arcadia:origdata$ cd ../data + + + + Data preprocessing with sff_extract + + + + + + Extracting unpaired data from SFF + + + We will first extract the data from the unpaired experiment + (SRR005481), the generated file names should all start + with bceti: + + +arcadia:bceti_assembly/data$ sff_extract -o bceti ../origdata/SRR005481.sff +Working on '../origdata/SRR005481.sff': +Converting '../origdata/SRR005481.sff' ... done. +Converted 311201 reads into 311201 sequences. + +******************************************************************************** +WARNING: weird sequences in file ../origdata/SRR005481.sff + +After applying left clips, 307639 sequences (=99%) start with these bases: +TCTCCGTC + +This does not look sane. + +Countermeasures you *probably* must take: +1) Make your sequence provider aware of that problem and ask whether this can be +corrected in the SFF. +2) If you decide that this is not normal and your sequence provider does not +react, use the --min_left_clip of sff_extract. +(Probably '--min_left_clip=13' but you should cross-check that) +******************************************************************************** + + (Note: I got this on the SRR005481 data set downloaded in October + 2008. In the mean time, the sequencing center or NCBI may have + corrected the error) + + + Wait a minute ... what happened here? + + + We launched a pretty standard extraction of reads where the whole + sequence were extracted and saved in the FASTA files and FASTA + quality files, and clipping information will be given in the + XML. Additionally, the clipped parts of every read will be shown in + lower case in the FASTA file. + + + After two or three minutes, the directory looked like this: + + +arcadia:bceti_assembly/data$ ls -l +-rw-r--r-- 1 bach users 91863124 2008-11-08 17:15 bceti.fasta +-rw-r--r-- 1 bach users 264238484 2008-11-08 17:15 bceti.fasta.qual +-rw-r--r-- 1 bach users 52197816 2008-11-08 17:15 bceti.xml + + + + Dealing with wrong clip-offs in the SFF + + + In the example above, sff_extract discovered an unusual pattern + sequence and gave a (stern) warning: almost all the sequences + created for the FASTA file had a skew in the distribution of bases. + + + Let's have a look at the first 30 bases of the first 20 sequences of + the FASTA that was created: + + +arcadia:bceti_assembly/data$ head -40 bceti_in.454.fasta | grep -v ">" | cut -c 0-30 +tcagTCTCCGTCGCAATCGCCGCCCCCACA +tcagTCTCCGTCGGCGCTGCCCGCCCGATA +tcagTCTCCGTCGTGGAGGATTACTGGGCG +tcagTCTCCGTCGGCTGTCTGGATCATGAT +tcagTCTCCGTCCTCGCGTTCGATGGTGAC +tcagTCTCCGTCCATCTGTCGGGAACGGAT +tcagTCTCCGTCCGAGCTTCCGATGGCACA +tcagTCTCCGTCAGCCTTTAATGCCGCCGA +tcagTCTCCGTCCTCGAAACCAAGAGCGTG +tcagTCTCCGTCGCAGGCGTTGGCGCGGCG +tcagTCTCCGTCTCAAACAAAGGATTAGAG +tcagTCTCCGTCCTCACCCTGACGGTCGGC +tcagTCTCCGTCTTGTGCGGTTCGATCCGG +tcagTCTCCGTCTGCGGACGGGTATCGCGG +tcagTCTCCGTCTCGTTATGCGCTCGCCAG +tcagTCTCCGTCTCGCATTTTCCAACGCAA +tcagTCTCCGTCCGCTCATATCCTTGTTGA +tcagTCTCCGTCCTGTGCTGGGAAAGCGAA +tcagTCTCCGTCTCGAGCCGGGACAGGCGA +tcagTCTCCGTCGTCGTATCGGGTACGAAC + + What you see is the following: the leftmost 4 + characters tcag of every read are the last bases + of the standard 454 sequencing adaptor A. The fact that they are + given in lower case means that they are clipped away in the SFF + (which is good). + + + However, if you look closely, you will see that there is something + peculiar: after the adaptor sequence, all reads seem to start with + exactly the same sequence TCTCCGTC. This is *not* + sane. + + + This means that the left clip of the reads in the SFF has not been + set correctly. The reason for this is probably a wrong value which + was used in the 454 data processing pipeline. This seems to be a + problem especially when custom sequencing adaptors are used. + + + In this case, the result is pretty catastrophic: out of the 311201 + reads in the SFF, 307639 (98.85%) show this behaviour. We will + certainly need to get rid of these first 12 bases. + + + Now, in cases like these, there are three steps that you really + should follow: + + + + + Is this something that you expect from the experimental setup? + If yes, then all is OK and you don't need to take further + action. But I suppose that for 99% of all people, these abnormal + sequences are not expected. + + + + + Contact. Your. Sequence. Provider! The underlying problem is + something that *MUST* be resolved on their side, not on + yours. It might be a simple human mistake, but it it might very + well be a symptom of a deeper problem in their quality + assurance. Notify. Them. Now! + + + + + In the mean time (or if the sequencing provider does not react), + you can use the --min_left_clip command line option + from sff_extract as suggested in the warning message. + + + + + + + So, to correct for this error, we will redo the extraction of the + sequence from the SFF, this time telling sff_extract to set the left + clip starting at base 13 at the lowest: + + +arcadia:bceti_assembly/data$ sff_extract -o bceti --min_left_clip=13 ../origdata/SRR005481.sff +Working on '../origdata/SRR005481.sff': +Converting '../origdata/SRR005481.sff' ... done. +Converted 311201 reads into 311201 sequences. +arcadia:sff_from_ncbi/bceti_assembly/data$ ls -l +-rw-r--r-- 1 bach users 91863124 2008-11-08 17:31 bceti.fasta +-rw-r--r-- 1 bach users 264238484 2008-11-08 17:31 bceti.fasta.qual +-rw-r--r-- 1 bach users 52509017 2008-11-08 17:31 bceti.xml + + This concludes the small intermezzo on how to deal with wrong left + clips. + + + + + + Preparing an assembly + + + Preparing an assembly is now just a matter of setting up a directory and + linking the input files into that directory. + + +arcadia:bceti_assembly/data$ cd ../assemblies/ +arcadia:bceti_assembly/assemblies$ mkdir arun_08112008 +arcadia:bceti_assembly/assemblies$ cd arun_08112008 +arcadia:assemblies/arun_08112008$ ln -s ../../data/* . +arcadia:bceti_assembly/assemblies/arun_08112008$ ls -l +lrwxrwxrwx 1 bach users 29 2008-11-08 18:17 bceti.454.fasta -> ../../data/bceti.454.fasta +lrwxrwxrwx 1 bach users 34 2008-11-08 18:17 bceti.454.fasta.qual -> ../../data/bceti.454.fasta.qual +lrwxrwxrwx 1 bach users 33 2008-11-08 18:17 bceti.454.xml -> ../../data/bceti.454.xml + + + + Starting the assembly 2 + + + Start an assembly with the options you like, for example like this: + + +$ NONONONONONONO ---- MAKE IT WITH MANIFEST !!!!mira --project=bceti --job=denovo,genome,accurate,454 >&log_assembly + + + + + What to do with the MIRA result files? + + + Please consult the corresponding section in the + mira usage document, it + contains much more information than this stub. + + + But basically, after the assembly has finished, you will find four + directories. The tmp directory can be deleted + without remorse as it contains logs and some tremendous amount of + temporary data (dozens of gigabytes for bigger + projects). The info directory has some text files + with basic statistics and other informative files. Start by having a + look at the *_info_assembly.txt, it'll give you a + first idea on how the assembly went. + + + The results directory finally contains the assembly + files in different formats, ready to be used for further processing with + other tools. + + + If you used the uniform read distribution option, you will inevitably + need to filter your results as this option produces larger and better + alignments, but also more ``debris contigs''. For this, use the + miraconvert which is distributed together with the MIRA package. + + + Also very important when analysing 454 assemblies: screen the small + contigs ( < 1000 bases) for abnormal behaviour. You wouldn't be the + first to have some human DNA contamination in a bacterial sequencing. Or + some herpes virus sequence in a bacterial project. Or some bacterial DNA + in a human data set. Look whether these small contigs + + + + + have a different GC content than the large contigs + + + + + whether a BLAST of these sequences against some selected databases + brings up hits in other organisms that you certainly were not + sequencing. + + + + + + + + diff -Nru mira-3.9.18/doc/docbook/attic/chap_iontor_part.xml mira-4.0/doc/docbook/attic/chap_iontor_part.xml --- mira-3.9.18/doc/docbook/attic/chap_iontor_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/attic/chap_iontor_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,688 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short (modified) + + A baby is Life's way of insisting that the universe give it another chance. + + +
    + Assembly of Ion Torrent data with MIRA3 + + + Introduction + + + MIRA can assemble Ion Torrent type data either on its own or together with + Sanger, 454 or Solexa type sequencing data (true hybrid assembly). Paired-end + sequences coming from genomic projects can also be used if you + take care to prepare your data the way MIRA needs it. + + + MIRA goes a long way to assemble sequence in the best possible way: it + uses multiple passes, learning in each pass from errors that occurred in + the previous passes. There are routines specialised in handling oddities + that occur in different sequencing technologies + + + + IonTorrent is - as of January 2014 - still a moving target: there are + new protocols every few months and they've come a long way since their + very first data sets. The data quality is now more or less comparable + to better 454 data sets, at least from what I have seen. It might be + that you need to fetch the latest MIRA version available to get the + best possible assembly. + + + + + Some reading requirements + + + This guide assumes that you have basic working knowledge of Unix + systems, know the basic principles of sequencing (and sequence + assembly) and what assemblers do. + + + While there are step by step walkthroughs on how to setup your Ion + Torrent data and then perform an assembly, this guide expects you to + read at some point in time + + + + + the mira_usage introductory help file so that + you have a basic knowledge on how to set up projects in mira for + Sanger sequencing projects. + + + + + and last but not least the mira_reference + help file to look up some command line options. + + + + + + + + Walkthrough: unpaired data + + + This walkthrough will use two data sets for E. coli + strain DH10B made available by IonTorrent and will show you the main steps you need + to perform to get assemblies going. + + + + Preparing your file system + + + Note: this is how I set up a project, feel free to implement whatever + structure suits your needs. + + +arcadia:$ mkdir dh10b +arcadia:$ cd dh10b +arcadia:dh10b$ mkdir origdata data assemblies + + Your directory should now look like this: + + +arcadia:dh10b$ ls -l +drwxr-xr-x 2 bach users 48 2011-08-12 22:43 assemblies +drwxr-xr-x 2 bach users 48 2011-08-12 22:43 data +drwxr-xr-x 2 bach users 48 2011-08-12 22:43 origdata + + Explanation of the structure: + + + + + the origdata directory will contain the 'raw' + result files that one might get from sequencing. In our case it + will be the ZIP files from the IonTorrent site. + + + + + the data directory will contain the + preprocessed sequences for the assembly, ready to be used by MIRA + + + + + the assemblies directory will contain + assemblies we make with our data (we might want to make more than + one). + + + + + + + Getting the data for this walkthrough + + + The data sets in question are + + + + + E. coli DH10B, PGM run B13-328 + which you can download from + (download the SFF). This data set, subsequently nicknamed B13, + contains data from the 316 chip with reads of an average size of + ~100bp. + + + + + E. coli DH10B, PGM run B14-387 + which you can download from . This + data set, subsequently nicknamed B14, contains data from the 314 + chip which IonTorrent uses to show off the "longer reads" capability + of its sequencer. "Longer" meaning in this case an average of ~220 + bp, which is not bad at all. + + + + + Save the two ZIP files into the origdata directory should now look like this: + + +arcadia:dh10b$ ls -l origdata +-rw-r--r-- 1 bach bach 824002890 2011-08-15 21:43 B13_328.sff.zip +-rw-r--r-- 1 bach bach 327926296 2011-08-14 20:32 B14_387_CR_0.05.sff.zip + + Our data is still in ZIP files, let's get them out and put them into the + data directory: + + +arcadia:dh10b$ cd data +arcadia:data$ unzip ../origdata/B13_328.sff.zip +Archive: ../origdata/B13_328.sff.zip + inflating: B13_328.sff + creating: __MACOSX/ + inflating: __MACOSX/._B13_328.sff +arcadia:data$ unzip ../origdata/B14_387_CR_0.05.sff.zip +Archive: ../origdata/B14_387_CR_0.05.sff.zip + inflating: R_2011_07_19_20_05_38_user_B14-387-r121336-314_pool30-ms_B14-387_cafie_0.05.sff +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 1721658336 2011-06-17 01:29 B13_328.sff +drwxrwxr-x 2 bach bach 4096 2011-06-21 16:16 __MACOSX +-rw-rw-r-- 1 bach bach 688207032 2011-07-28 23:31 R_2011_07_19_20_05_38_user_B14-387-r121336-314_pool30-ms_B14-387_cafie_0.05.sff + + Oooops, quite some chaos ... IonTorrent included some unnecessary + things (the __MACOSX directory) and gave their + data files wildly different names. Let's clean up a bit here: + + +arcadia:data$ rm -rf __MACOSX +arcadia:data$ mv B13_328.sff B13.sff +arcadia:data$ mv R_2011_07_19_20_05_38_user_B14-387-r121336-314_pool30-ms_B14-387_cafie_0.05.sff B14.sff +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 1721658336 2011-06-17 01:29 B13.sff +-rw-rw-r-- 1 bach bach 688207032 2011-07-28 23:31 B14.sff + + There, much nicer. + + + + + Preparing the Ion Torrent data for MIRA + + + MIRA will need the base sequences, quality values attached to those + bases and - if already present - clipping points for quality clips and + sequencing adaptor clips. + + + The basic data type you will get from the sequencing instruments will + be SFF files. Those files contain almost all information + needed for an assembly, but SFFs need to be converted into more + standard files before MIRA can use this information. + + + In former times this was done using 3 files (FASTA, FASTA quality and + XML), but nowadays the FASTQ format is used almost everywhere, so we + will need only two files: FASTQ for sequence + quality and XML for + clipping information. + + + Tip + Use the sff_extract script from Jose Blanca at the + University of Valencia. The home of sff_extract is: + but I + am thankful to Jose for giving permission to distribute the script in + the MIRA 3rd party package (separate download on SourceForge). + + + The data sets B13 and B14 have short and long IonTorrent reads and we + will want to assemble them together. For the sake of clarity, I want + to name the file with a prefix: dh10b_b13b14. + + +arcadia:data$ sff_extract -o dh10b_b13b14 B13.sff B14.sff +Working on 'B13.sff': +Converting 'B13.sff' ... done. +Converted 1687490 reads into 1687490 sequences. +Working on 'B14.sff': +Converting 'B14.sff' ... done. +Converted 350109 reads into 350109 sequences. + + The parameters to sff_extract tell it to convert + the SFFs named B13.sff and + B14.sff into files where the names start with + dh10b_b13b14. By default, a FASTQ file and a XML + file in NCBI traceinfo will be created. + + + Do not hard clip sequences! + + People "in the know" might want to tell + sff_extract to simply dump hard-clip sequences + into the FASTQ file via the -c argument. Hard-clipped + means: the clipped sequence parts of a read are physically trimmed + away, never to be seen again. + + + This is D + I S C O U R A G E D ! + + + Reason: unlike 454, IonTorrent actually uses actively the SFF + feature to set different clipping points for quality and adaptor + clips. This is useful information for MIRA. Furthermore, some of the + quality control algorithms of MIRA use also the clipped part of a + read to improve assembly quality with measurable effect. If a hard + clip was performed on the sequences, these algorithms are not as + effective anymore. + + + + The XML TRACEINFO file + + For the die hards out there who really do not want the XML TRACEINFO + files: if MIRA gets only the sequence, it will use the usual + 454/Roche convention to treat left and right lower case part of + sequences as clipped and retain the uppercase middle part of a + sequence. sff_extract adheres to this convention, + and while the resulting assemblies are not quite as good as with the + TRACEINFO XML, they're still better than with hard clipped + sequences. + + + + The conversion can take some time, the ~2 million IonTorrent reads + from this example need approximately 2.5 minutes for conversion. Go + grab a coffee, or tea, or whatever. + + + Welcome back. Your directory should now look something like this: + + +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 771462745 2011-08-19 22:24 dh10b_b13b14.fastq +-rw-r--r-- 1 bach bach 441331004 2011-08-19 22:24 dh10b_b13b14.xml +-rw-r--r-- 1 bach bach 1721658336 2011-06-17 01:29 B13.sff +-rw-rw-r-- 1 bach bach 688207032 2011-07-28 23:31 B14.sff + + Cool. Last step: we do not need the SFF files here anymore (we still + have them as ZIP in the origdata folder), let's + get rid of them: + + +arcadia:data$ rm *sff +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 771462745 2011-08-19 22:24 dh10b_b13b14.fastq +-rw-r--r-- 1 bach bach 441331004 2011-08-19 22:24 dh10b_b13b14.xml + + + + Writing a manifest configuration file + + + Good, we're almost there. Let's switch to the + assemblies directory and create a subdirectory for our + first assembly test. + + +arcadia:data$ cd ../assemblies/ +arcadia:assemblies$ mkdir 1sttest +arcadia:assemblies$ cd 1sttest + + This directory is quite empty and the IonTorrent data is not + present. And it does not need to be as we'll tell MIRA in the manifest + configuration file where to find the data and what to do with it. + + +# A manifest file can contain comment lines, these start with the #-character + +# First part of a manifest: defining some basic things + +# In this example, we just give a name to the assembly +# and tell MIRA it should assemble a genome de-novo in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = dh10b +job = genome,denovo,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups", for more information +# please consult the MIRA manual, chapter "Reference" + +readgroup = SomeUnpairedIonTorrentReadsIGotFromTheLab +technology = iontor +data = ../../data/dh10b* + +# note the wildcard "dh10b*" part in the 'data' line above: +# if you followed the walkthrough and have the FASTQ and XML file, +# this will automatically load both files (which is what we want) + + Save the above lines into a file, we'll use manifest.conf in this example. + + +arcadia:/path/to/myProject$ ls -l +-rw-r--r-- 1 bach users 756 2011-11-05 17:57 manifest.conf + + + + Starting the assembly + + + Starting the assembly is now just a matter of one line: + + +arcadia:1sttest$ mira manifest.conf >&log_assembly.txt + + Now, that was easy, wasn't it? In the above example - for assemblies + having only Ion Torrent data and if you followed the walkthrough on + how to prepare the data - everything you might want to adapt in the + first time are the following entries in the manifest file: + + + + + --project (for naming your assembly project) + + + + + --job (perhaps to change the quality of the assembly to 'draft' + + + + + Of course, you are free to change any option via the extended + parameters, perhaps change the default number of processors to use + from 2 to 4 via -GE:not=4 or any other of the > 150 + parameters MIRA has ... but this is covered in the MIRA main reference + manual. + + + Low coverage + + MIRA default parameters are optimised for assemblies with decent + coverages. In the case of Ion Torrent, this means an average + coverage of ≥ 20 to 25. If you are working on projects with lower + coverage, please adapt a couple of parameters for low coverage data. + + + + Do not use too high coverage + + As with every sequencing technology, you should not use too much + data as this is detrimental to assembly quality. Long story short: + non-random sequencing errors will, at high coverage, occur + frequently enough to look like valid repeat pattern, leading MIRA to + create more contigs than necessary ... some of them with the + sequencing errors looking like genuine sequence. + + + As a simple rule of thumb, coverage numbers between 50x and 80x are + OK, coverage above can (and will) lead to problems. + + + + + + + Walkthrough: paired data + + + + Getting the data + + + This walkthrough will use three data sets to assemble + E.coli MG1655: one shotgun/fragment set and two + paired-end data sets with different template sizes. Life has put the + full data sets for download, but as using the full sets for a bacteria + is absolute overkill (and also detrimental to assembly quality), they + were also kind enough to prepare sub-sampled data sets which we will use. + + + You will find all files at + + + + + Set with single fragments (unpaired data), down-sampled to 40x + coverage: C11-127_40X.sff.zip + This data set, subsequently nicknamed C11, contains data from the + 316 chip with reads of an average usable size of ~200bp. + + + + + Set with paired data from a long paired-end library with an average + size of 3.5kb, down-sampled to 20x coverage: FRA-257_20X.sff.zip + This data set, subsequently nicknamed FRA-257, contains data from the + 316 chip with reads of an average usable size of ~xxxxxxxbp. + + + + + Set with paired data from a long paired-end library with an average + size of 8.9kb, down-sampled to 20x coverage: C28-140_20X.sff.zip + This data set, subsequently nicknamed C28, contains data from the + 316 chip with reads of an average usable size of ~xxxxxxxbp. + + + + + File with the linker sequences used for the paired-end sequencing. This will be needed by sff_extract: LMP_Linkers.fasta.gz + + + + + Save all files into the origdata directory should now look like this: + + arcadia:origdata$ ls -l +-r--r--r-- 1 bach bach 1826508536 Jun 14 00:04 C11-127_40X.sff.zip +-r--r--r-- 1 bach bach 681739117 Jun 14 00:05 C28-140_20X.sff.zip +-r--r--r-- 1 bach bach 537186774 Jun 14 00:06 FRA-257_20X.sff.zip +-r--r--r-- 1 bach bach 91 Mar 7 20:05 LMP_Linkers.fasta.gz + + Quickly unpack the tiny linkers file: + + +arcadia:origdata$ gunzip LMP_Linkers.fasta.gz +arcadia:origdata$ ls -l +-r--r--r-- 1 bach bach 1826508536 Jun 14 00:04 C11-127_40X.sff.zip +-r--r--r-- 1 bach bach 681739117 Jun 14 00:05 C28-140_20X.sff.zip +-r--r--r-- 1 bach bach 537186774 Jun 14 00:06 FRA-257_20X.sff.zip +-r--r--r-- 1 bach bach 89 Mar 7 20:05 LMP_Linkers.fasta + + + + Preparing the Ion Torrent data for MIRA + + + We will unzip all three sets with unzip and then + extract with sff_extract into different data files, + for the paired-end sets we will ask sff_extract to + split the paired sequences in the SFF into single, but paired reads: + + + Unzip the data: + + arcadia:origdata$ cd ../data +arcadia:data$ cd ../data +arcadia:data$ unzip '../origdata/*zip' +Archive: ../origdata/C11-127_40X.sff.zip + inflating: C11-127_40X.sff + +Archive: ../origdata/C28-140_20X.sff.zip + inflating: C28-140_20X.sff + +Archive: ../origdata/FRA-257_20X.sff.zip + inflating: FRA-257_20X.sff + +3 archives were successfully processed. +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 3617626646 Feb 10 00:32 C11-127_40X.sff +-rw-rw-r-- 1 bach bach 1320383792 Dec 21 18:21 C28-140_20X.sff +-rw-rw-r-- 1 bach bach 1159612116 Dec 16 20:48 FRA-257_20X.sff + + Extract unpaired reads (will take ~2.5 minutes): + + arcadia:data$ sff_extract C11-127_40X.sff +Working on 'C11-127_40X.sff': +Converting 'C11-127_40X.sff' ... date + done. +Converted 1111060 reads into 1111060 sequences. + + Extract 3.5kb paired reads (will take ~8 minutes): + + arcadia:data$ sff_extract C28-140_20X.sff +Testing whether SSAHA2 is installed and can be launched ... ok. +Working on 'C28-140_20X.sff': +Creating temporary sequences from reads in 'C28-140_20X.sff' ... done. +Searching linker sequences with SSAHA2 (this may take a while) ... ok. +Parsing SSAHA2 result file ... done. +Converting 'C28-140_20X.sff' ... done. +Converted 792280 reads into 1567302 sequences. + + Extract 8.9kb paired reads (will take ~6.5 minutes): + + arcadia:data$ sff_extract C28-140_20X.sff +Testing whether SSAHA2 is installed and can be launched ... ok. +Working on 'FRA-257_20X.sff': +Creating temporary sequences from reads in 'FRA-257_20X.sff' ... done. +Searching linker sequences with SSAHA2 (this may take a while) ... ok. +Parsing SSAHA2 result file ... done. +Converting 'FRA-257_20X.sff' ... done. +Converted 618621 reads into 1224056 sequences. + + Remove SFF files which are not needed anymore: + + arcadia:data$ rm *.sff +arcadia:data$ ls -l +-rw-rw-r-- 1 bach bach 1000477444 Jun 14 00:35 C11-127_40X.fastq +-rw-rw-r-- 1 bach bach 246427864 Jun 14 00:35 C11-127_40X.xml +-rw-rw-r-- 1 bach bach 355981807 Jun 14 00:44 C28-140_20X.fastq +-rw-rw-r-- 1 bach bach 354995399 Jun 14 00:44 C28-140_20X.xml +-rw-rw-r-- 1 bach bach 300577380 Jun 14 00:51 FRA-257_20X.fastq +-rw-rw-r-- 1 bach bach 281069580 Jun 14 00:51 FRA-257_20X.xml + + We're done here. + + + + + Writing a manifest configuration file + + + Switch to the assemblies directory and create a + subdirectory for our first assembly test. + + +arcadia:data$ cd ../assemblies/ +arcadia:assemblies$ mkdir 1sttest +arcadia:assemblies$ cd 1sttest + + The manifest file itself should be pretty much self-explanatory, + except perhaps the segment placement line, please look that up in the + MIRA reference manual. + + project = mg1655 +job = genome,denovo,accurate +parameters = -GE:not=4 + +readgroup = TheShotgunReads +technology = iontor +data = ../../data/C11-127_40X.* + +readgroup = ThePE3.5kbLib +technology = iontor +data = ../../data/FRA-257_20X.* +template_size = 2600 4400 +segment_placement = samedir backward + +readgroup = ThePE8.9kbLib +technology = iontor +data = ../../data/C28-140_20X.* +template_size = 7800 10300 +segment_placement = samedir backward + +# note the wildcard "*" in the 'data' lines above: +# if you followed the walkthrough and have the FASTQ and XML files, +# this will automatically load both files for each data set +# (which is what we want) + + Save the above lines into a file, we'll use manifest.conf in this example. + + +arcadia:/path/to/myProject$ ls -l +-rw-r--r-- 1 bach users 756 2011-11-05 17:57 manifest.conf + + + + Starting the assembly + + + Starting the assembly is now just a matter of one line: + + +arcadia:1sttest$ mira manifest.conf >&log_assembly.txt + + + + + What to do with the MIRA result files? + + + Please consult the corresponding section in the + mira usage document, it + contains much more information than this stub. + + + But basically, after the assembly has finished, you will find four + directories. The tmp directory can be deleted + without remorse as it contains logs and some tremendous amount of + temporary data (dozens of gigabytes for bigger + projects). The info directory has some text files + with basic statistics and other informative files. Start by having a + look at the *_info_assembly.txt, it'll give you a + first idea on how the assembly went. + + + The results directory finally contains the assembly + files in different formats, ready to be used for further processing with + other tools. + + + If you used the uniform read distribution option, you will inevitably + need to filter your results as this option produces larger and better + alignments, but also more "debris contigs". For this, use the + miraconvert which is distributed together with the MIRA package. + + + Also very important when analysing Ion Torrent assemblies: screen the + small contigs ( < 1000 bases) for abnormal behaviour. You wouldn't be + the first to have some human DNA contamination in a bacterial + sequencing. Or some herpes virus sequence in a bacterial project. Or + some bacterial DNA in a human data set. Or ... + + + Look whether these small contigs + + + + + have a different GC content than the large contigs + + + + + whether a BLAST of these sequences against some selected databases + brings up hits in other organisms that you certainly were not + sequencing. + + + + +
    diff -Nru mira-3.9.18/doc/docbook/attic/chap_pacbio_part.xml mira-4.0/doc/docbook/attic/chap_pacbio_part.xml --- mira-3.9.18/doc/docbook/attic/chap_pacbio_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/attic/chap_pacbio_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,549 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + New problems demand new solutions. New solutions create new problems. + + +
    + + Assembly of Pacific Biosciences data with MIRA3 + + + MIRA 4.0 officially supports only CCS or error-corrected-CLR + + This is here to set the stage: at the moment, MIRA can only make good + use of PacBio reads which have an error rate of roundabout 5%. This + means you will have to use either: + + + + + CCS (Circular Consensus Sequence) reads with at least 3 to 4 passes. + + + + + CLR (Continuous Long Reads) which were error corrected either with + PacBio CCS reads, self-corrected with itself, or some other + high-quality sequencing technology (Illumina comes to mind) + + + + + Impatient people can directly jump to + which contains + walkthroughs using data made publicly available by PacBio. + + + Unofficially, MIRA also supports uncorrected reads. However, the + assemblies are currently (as of 4.0) not good enough and using MIRA with + this kind of data is not recommended for general use. + + + + WARNING + + During the course of 2011, PacBio has made available on + their DevNet site + quite a number of documents and introductory videos. A must read for + everyone working with this sequencing technology. + + + + + Introduction + + As of January 2014, Pacific Biosciences looks like the new undisputed + star in the de-novo sequencing arena. Illumina may try to counter it via + Moleculo, but first reports point at a few shortcomings of Moleculo + which Pacific Biosciences does not have. + + + Some reading requirements + + This guide assumes that you have basic working knowledge of Unix + systems, know the basic principles of sequencing (and sequence + assembly) and what assemblers do. + + + While there are step by step walk-throughs on how to setup your + data for Sanger, 454 and Solexa in other MIRA guides, this guide is + (currently) a bit more terse. You are expected to read at some point in + time: + + + + the mira_reference help file to look up + some command line options. + + + for hybrid assemblies of PacBio data with Sanger, 454, Solexa + the corresponding mira_usage, + mira_454 or mira_solexa + help files to look up how to prepare the different data sets. + + + + + + Assembly of PacBio data with MIRA + + + + Preparing data + + MIRA will happily read data in several different formats (FASTA, + FASTQ, etc.). For the sake of simplicity, this guide will use FASTQ as + demonstration format. + + + Unpaired reads + + This is actually quite simple. Just put your reads as FASTQ in a + file and you are done. No need to bother about read naming + conventions or similar things. Like so: + +@readname_001 +ACGTTGCAGGGTCATGCAGT... +@readname_002 +... + + + + + Setting up files and directories + + + Launching MIRA + + In the most basic incantation, you will need to tell MIRA just five things: + + + + + the name of your project. + + + + + whether you want a "genome" or "EST" assembly + + + + + whether it is a denovo or mapping assembly + + + + + which quality level (draft, normal or accurate) + + + + + the data you want to use + + + + + The above needs to be written together in a manifest file, which is a + file listing the MIRA configuration and the data it should use. Have a + look at the walkthrough below and at the MIRA reference to get an idea + on how to write such a file (it's simple, really). Then start MIRA + like this: + + +mira manifest.conf >&log_assembly.txt + + MIRA has -- at the last count -- more than 150 parameters one can use + to fine tune almost every aspect of an assembly, from data loading + options to results saving, from data preprocessing to results + interpretation, from simple alignment parameters to parametrisation of + internal misassembly decision rules ... and much more. Many of these + parameters can be even set individually for each sequencing technology + they apply to. Example given: in an assembly with Solexa, Sanger, 454 + and PacBio data, the minimum read length for Solexa could be set to + 30, while for 454 it could be 80, Sanger 100 and PacBio 150. Please + refer to the reference manual for a full overview on how to use + quick switches and extended + switches in manifest files. + + + + + Walkthroughs: real data sets from PacBio + + We'll use some data provided by PacBio for the + E. coli O104:H4 outbreak in 2011, see for + more info. + + + + Error corrected CLR for E. coli C227-11$ + + + That data set is quite interesting: PacBio took CLR reads (the reads + with only ~85% accuracy) and mapped CCS reads (presumably >90% + accuracy) to them to correct errors of the CLR reads. The resulting + error corrected CLR data is of pretty good + quality, not only from the quality values but when assembled, the + number of sequencing errors in the reads which can be spotted in the + alignments is obviously quite low. + + + + Preparing a directory structure + + + Note: this is how I set up a project, feel free to implement whatever + structure suits your needs. + + +$ mkdir c227-11-clrc +$ cd c227-11-clrc +arcadia:c227-11-clrc$ mkdir origdata data assemblies + + Your directory should now look like this: + + +arcadia:c227-11-clrc$ ls -l +drwxr-xr-x 2 bach users 48 2011-08-19 20:21 assemblies +drwxr-xr-x 2 bach users 48 2011-08-19 20:21 data +drwxr-xr-x 2 bach users 48 2011-08-19 20:21 origdata + + "c227-11-clrc" is an arbitrary name I just chose by concatenating + the name of the bug and "-clrc" to indicate that this project has + CLR sequences which were Corected. But you can name this whatever you + want: foobar, blafurbsel, ... + + + Explanation of the structure: + + + + + the origdata directory will contain the 'raw' + result files that one might get from sequencing. In our case it + will be the .tar.gz file with the data in + FASTQ format from the DevNet site. + + + + + the data directory will contain the + preprocessed sequences for the assembly, ready to be used by MIRA + + + + + the assemblies directory will contain + assemblies we make with our data (we might want to make more than + one). + + + + + + + Getting the data and preparing it + + + Head over to PacBio DevNet and fetch the data set for the E. coli + C227-11 CLR corrected data set. Put it into the + origdata directory created a few moments ago. + + + Now, let's extract the data to the data directory: + + +arcadia:c227-11-clrc$ cd data +arcadia:data$ tar xvzf ../origdata/e-coli-c227-11-corrected-fastq-1.2.2beta.tgz +e-coli-c227-11-corrected-fastq-1.2.2beta/ +e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq + + One thing you would quickly find out but which I tell now to save + time: at the moment, PacBio seems to love ultra long read + names. Here are the first 10 from the current data set: + + +arcadia:data$ grep ^@m e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq | head -10 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10040/0_5174/c0 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10040/0_5174/c1 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1017/0_1636/c0 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1054/0_4073/c0 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1054/0_4073/c1 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1054/4121_4891/c0 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10548/0_5766/c0 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10548/0_5766/c1 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10640/0_2393/c0 +@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/11000/0_3285/c0 + + How sweet! Read names with 80 and more characters AND having the "/" + character as component, the later being a recipe for disaster sooner + or later in some post-processing pipelines. + + + MIRA has absolutely no problem with the above: neither with long read + names nor with the "/" character in the name. However, long read names + are a problem for example for gap4 (an assembly + viewer) and the "/" character might lead to confusion with the + standard UNIX directory separator, many programs which can be used + to post-process assemblies simply disallow that character. + + + For the sake of simplicity and compatibility, let's rename all + sequences. For this we'll use miraconvert, + which is a binary of the MIRA program package: + + +arcadia:data$ miraconvert + -R c227-11-clrc + e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq + c227-11-clrc.fastq +Loading from fastq, saving to: fastq +Loading data from FASTQ ... +Counting sequences in FASTQ file: found 73496 sequences. +Localtime: Sat Aug 20 20:36:26 2011 +Unusual offset of 34, guessing this file to be a Sanger-type FASTQ format. +Using calculated FASTQ quality offset: 33 +Localtime: Sat Aug 20 20:36:26 2011 +Loading data from FASTQ file: + [0%] ....|.... [10%] ....|.... [20%] ....|.... [30%] ....|.... [40%] ....|.... +[50%] ....|.... [60%] ....|.... [70%] ....|.... [80%] ....|.... [90%] ....|.... [100%] + +Done. +Loaded 73496 reads, Localtime: Sat Aug 20 20:36:35 2011 + done. +Data conversion process finished, no obvious errors encountered. + + The above command has been split in multiple lines for better overview + but should be entered in one line. + + + The parameters to miraconvert say + + + + + -R c227-11-clrc: sequences + should be renamed, all starting with "c227-11-clrc" and to which + miraconvert will append an underscore and + a counter. + + + + + e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq: + that's the full name of our input file. + + + + + c227-11-clrc.fastq: that's + the name of our output file. + + + + + Your directory should now look like this ... + + +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 257844076 2011-08-20 21:04 c227-11-clrc.fastq +drwxr-x--- 2 bach bach 4096 2011-07-22 04:49 e-coli-c227-11-corrected-fastq-1.2.2beta + + ... and as we do not need the subdirectory with the extracted data from PacBio anymore, let's get rid of it: + + +arcadia:data$ rm -rf e-coli-c227-11-corrected-fastq-1.2.2beta +arcadia:data$ ls -l +-rw-r--r-- 1 bach bach 257844076 2011-08-20 21:04 c227-11-clrc.fastq + + Perfect, we're done here. + + + + + Starting the assembly + + + Good, we're almost there. Let's switch to the + assembly directory and create a subdirectory for our + first assembly test. + + +arcadia:data$ cd ../assemblies/ +arcadia:assemblies$ mkdir 1sttest +arcadia:assemblies$ cd 1sttest + + This directory is quite empty and the PacBio data is not + present. And it does not need to be as we'll tell MIRA in the manifest + configuration file where to find the data and what to do with it. + + +# A manifest file can contain comment lines, these start with the #-character + +# First part of a manifest: defining some basic things + +# In this example, we just give a name to the assembly +# and tell MIRA it should assemble a genome de-novo in accurate mode + +project = c227-11-clrc +job = genome,denovo,accurate +parameters = -CO:mrpg=5 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups", for more information +# please consult the MIRA manual, chapter "Reference" + +readgroup = MyPacBioCLRCReads +technology = pcbiohq +data = ../../data/c227-11-clrc.fastq + + Starting the assembly is now just a matter of one line: + + +arcadia:1sttest$ mira manifest.conf >&log_assembly.txt + + Some 3 to 4 hours later, you should have a nice and shiny assembly of + your data. + + + Now, that was easy, wasn't it? In the above example - for assemblies + having only PacBio data and if you followed the walkthrough on how to + prepare the data - everything you might want to adapt in the first + time are the following options: + + + + + project= (for naming your assembly project) + + + + + job= (perhaps to change the quality of the assembly to 'draft' + + + + + parameters= -CO:mrpg= X + + + At the moment, this parameter needs to be adjusted by YOU + regarding the expected average coverage of error corrected reads + in your project. The value X should be set + as in X = AvgCov / 5 (alternatively divide + by 4 or 6). + + + + + Of course, you are free to change any of the > 150 options via + the extended parameters MIRA has ... but this is covered in the MIRA + main reference manual. + + + + + Working with the results of the assembly + + + There is a whole chapter in the manual dedicated to this, you are expected to read it :-) + + + However, for the impatient, here's a quick rundown on what I am + going to show as example in this section: loading results into an + assembly viewer. + + + + + Looking at the assembly in gap4 + + + I'm very fond of gap4, so I'll use it to show ho the assembly looks like: + + arcadia:c227-11-clrc_results$ caf2gap -project c227-11 -ace c227-11-clrc_LargeContigs_out.caf >&/dev/null +arcadia:c227-11-clrc_results$ ls -l C* +-rw-r--r-- 1 bach bach 543539856 2011-08-20 22:35 C227-11.0 +-rw-r--r-- 1 bach bach 39512896 2011-08-20 22:35 C227-11.0.aux +arcadia:c227-11-clrc_results$ gap4 C227-11.0 + + And while it's difficult to judge an assembly only from a + screen shot, I made one: 22 contigs, none smaller than 4kb and + pretty good certainty your bases are correct. Pray tell, isn't that + beautiful? + +
    + + Result of the assembly of <emphasis>E. coli</emphasis> C227-11 with + error corrected CLR reads. + + + + + + +
    +
    +
    + + CCS reads for E. coli C227-11 + + Head over to PacBio DevNet and fetch the data set for the E. coli + C227-11 CCS data set. + + + For the rest ... well, it's pretty much the same as for the CLR data + set. Just one little difference: in the .tgz you + downloaded, PacBio has split the data set into multiple FASTQ files + (for whatever reason). You will need to give those names in the + manifest file before starting to work with that. Yep, and that's it. + + +
    + + Hybrid assemblies: PacBio plus Sanger/454/Solexa/IonTorrent + + TO BE EXPANDED: no real walkthrough yest, just a few hints. + + + + + Prepare your PacBio data like explained in this guide. I.e.: get it + error corrected into FASTQ files. + + + + + Prepare your other data (Sanger, 454, Solexa, IonTorrent or any combination of + it) like explained in the respective MIRA guides. + + + + + Write a manifest which includes all data files as readgroups and start MIRA. + + + + +
    diff -Nru mira-3.9.18/doc/docbook/attic/chap_sanger_part.xml mira-4.0/doc/docbook/attic/chap_sanger_part.xml --- mira-3.9.18/doc/docbook/attic/chap_sanger_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/attic/chap_sanger_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,592 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + Just when you think it's finally settled, it isn't. + + +
    + + Short usage introduction to MIRA3 + + + This guide assumes that you have basic working knowledge of Unix systems, + know the basic principles of sequencing (and sequence assembly) and what + assemblers do. Furthermore, it is advised to read through the main + documentation of the assembler as this is really just a getting started + guide. + + + + Important notes + + + For working parameter settings for assemblies involving 454, IonTorrent, + Solexa or PacBio data, please also read the MIRA help files dedicated to these + platforms. + + + + + Quick start for the impatient + + + This example assumes that you have a few sequences in FASTA format that + may or may not have been preprocessed - that is, where sequencing vector + has been cut back or masked out. If quality values are also present in a + fasta like format, so much the better. + + + We need to give a name to our project: throughout this example, we will + assume that the sequences we are working with are + from Bacillus + chocorafoliensis (or short: Bchoc); a well known, + chocolate-adoring bug from the Bacillus family which is able to make a + couple of hundred grams of chocolate vanish in just a few minutes. + + + Our project will therefore be named 'bchoc'. + + + + Estimating memory needs + + + "Do I have enough memory?" has been one of the + most often asked question in former times. To answer this question, + please use miramem which will give you an + estimate. Basically, you just need to start the program and answer the + questions, for more information please refer to the corresponding + section in the main MIRA documentation. + + + Take this estimate with a grain of salt, depending on the sequences + properties, variations in the estimate can be +/- 30%. + + + + + Preparing and starting an assembly from scratch with FASTA files + + + + + + With data pre-clipped or pre-screened for vector sequence + + + The following steps will allow to quickly start a simple assembly if + your sequencing provider gave you data which was pre-clipped or + pre-screened for vector sequence: + + +$ mkdir bchoc_assembly1 +$ cd bchoc_assembly1 +bchoc_assembly1$ cp /your/path/sequences.fasta bchoc_in.sanger.fasta +bchoc_assembly1$ cp /your/path/qualities.someextension bchoc_in.sanger.fasta.qual +bchoc_assembly1$ mira --project=bchoc --job=denovo,genome,accurate,sanger --fasta + + Explanation: we created a + directory for the assembly, copied the sequences into it (to make + things easier for us, we named the file directly in a format + suitable for mira to load it automatically) and we also copied + quality values for the sequences into the same directory. As last + step, we started mira with options telling it that + + + + + our project is named 'bchoc' and hence, input and output files + will have this as prefix; + + + + + the data is in a FASTA formatted file; + + + + + the data should be assembled de-novo as + a genome at an assembly quality level + of accurate and that the reads we are + assembling were generated with Sanger technology. + + + + + By giving mira the project name 'bchoc' + (--project=bchoc) and naming sequence file with + an appropriate extension _in.sanger.fasta, mira + automatically loaded that file for assembly. When there are + additional quality values available + (bchoc_in.sanger.fasta.qual), these are also + automatically loaded and used for the assembly. + + + If there is no file with quality values available, MIRA will stop + immediately. You will need to provide parameters to the command line + which explicitly switch off loading and using quality files. + + + Not using quality values is NOT + recommended. Read the corresponding section in the MIRA reference + manual. + + + + + Using SSAHA2 / SMALT to screen for vector sequence + + + If your sequencing provider gave you data which was NOT pre-clipped + for vector sequence, you can do this yourself in a pretty robust + manner using SSAHA2 -- or the successor, SMALT -- from the Sanger + Centre. You just need to know which sequencing vector the provider + used and have its sequence in FASTA format (ask your provider). + + + Note that this screening is a valid method for any type of Sanger + sequencing vectors, 454 adaptors, Solexa adaptors and paired-end + adaptors etc. + + + For SSAHA2 follow these steps (most are the same as in the example + above): + + +$ mkdir bchoc_assembly1 +$ cd bchoc_assembly1 +bchoc_assembly1$ cp /your/path/sequences.fasta bchoc_in.sanger.fasta +bchoc_assembly1$ cp /your/path/qualities.someextension bchoc_in.sanger.fasta.qual +bchoc_assembly1$ ssaha2 -output ssaha2 + -kmer 8 -skip 1 -seeds 1 -score 12 -cmatch 9 -ckmer 6 + /path/where/the/vector/data/resides/vector.fasta + bchoc_in.sanger.fasta > bchoc_ssaha2vectorscreen_in.txt +bchoc_assembly1$ mira -project=bchoc -job=denovo,genome,accurate,sanger -fasta SANGER_SETTINGS -CL:msvs=yes + + Explanation: there are just + two differences to the example above: + + + + + calling SSAHA2 to generate a file which contains information on + the vector sequence hitting your sequences. + + + + + telling mira with SANGER_SETTINGS + -CL:msvs=yes to load this vector screening data for + Sanger data + + + + + For SMALT, the only difference is that you use SMALT for generating + the vector-screen file and ask SMALT to generate it in SSAHA2 + format. As SMALT works in two steps (indexing and then mapping), you + also need to perform it in two steps and then call MIRA. E.g.: + + +bchoc_assembly1$ smalt index -k 7 -s 1 smaltidxdb /path/where/the/vector/data/resides/vector.fasta +bchoc_assembly1$ smalt map -f ssaha -d -1 -m 7 smaltidxdb bchoc_in.sanger.fasta > bchoc_smaltvectorscreen_in.txt +bchoc_assembly1$ mira -project=bchoc -job=denovo,genome,accurate,sanger -fasta SANGER_SETTINGS -CL:msvs=yes + + Please note that, due to subtle differences between output of SSAHA2 + (in ssaha2 format) and SMALT (in ssaha2 format), MIRA identifies the + source of the screening (and the parsing method it needs) by the + name of the screen file. Therefore, screens done with SSAHA2 need to + have the postfix *_ssaha2vectorscreen_in.txt in + the file name and screens done with SMALT need + *_smaltvectorscreen_in.txt. + + + + + + + Calling mira from the command line + + + Mira can be used in many different ways: building assemblies from + scratch, performing reassembly on existing projects, assembling + sequences from closely related strains, assembling sequences against an + existing backbone (mapping assembly), etc.pp. Mira comes with a number + of quick switches, i.e., switches that + turn on parameter combinations which should be suited for most needs. + + + E.g.: mira --project=foobar --job=sanger --fasta + -highlyrepetitive + + + The line above will tell mira that our project will have the general + name foobar and that the sequences are to be loaded + from FASTA files, the sequence input file being + named foobar_in.sanger.fasta (and sequence quality + file, if + available, foobar_in.sanger.fasta.qual. The reads + come from Sanger technology and mira is prepared for the genome + containing nasty repeats. The result files will be in a directory + named foobar_results, statistics about the assembly + will be available in the foobar_info directory + like, e.g., a summary of contig statistics in + foobar_info/foobar_info_contigstats.txt. Notice + that the --job= switch is missing some + specifications, mira will automatically fill in the remaining defaults + (i.e., denovo,genome,accurate in the example above). + + + E.g.: mira --project=foobar --job=mapping,accurate,sanger + --fasta --highlyrepetitive + + + This is the same as the previous example except mira will perform a + mapping assembly in 'accurate' quality of the sequences against a + backbone sequence(s). mira will therefore additionally load the backbone + sequence(s) from the file foobar_backbone_in.fasta + (FASTA being the default type of backbone sequence to be loaded) and, if + existing, quality values for the backbone + from foobar_backbone_in.fasta.qual. + + + E.g.: mira --project=foobar --job=mapping,accurate,sanger + --fasta --highlyrepetitive -SB:bft=gbf + + + As above, except we have added an extensive + switch (-SB:bft) to tell mira that the backbones + are in a GenBank format file (GBF). MIRA will therefore load the + backbone sequence(s) from the file + foobar_backbone_in.gbf. Note that the GBF file can + also contain multiple entries, i.e., it can be a GBFF file. + + + E.g.: mira --project=foobar --job=mapping,accurate,sanger + --fastq --highlyrepetitive -SB:bft=gbf + + + As above, except we have changed the input type for all files from FASTA + to FASTQ. + + + + + Using multiple processors + + + This feature is in its infancy, presently only the SKIM algorithm uses + multiple threads. Setting the number of processes for this stage can be + done via the -GE:not + parameter. E.g. -GE:not=4 to use 4 threads. + + + + + Usage examples + + + + + + Assembly from scratch with GAP4 and EXP files + + + A simple GAP4 project will do nicely. Please take care of the + following: You need already preprocessed experiment / fasta / phd + files, i.e., at least the sequencing vector should have been tagged + (in EXP files) or masked out (FASTA or PHD files). It would be nice if + some kind of not too lazy quality clipping had also been done for the + EXP files, pregap4 should do this for you. + + + + + Step 1: Create a file of filenames (named + mira_in.fofn) for the project you wish to + assemble. The file of filenames should contain the newline + separated names of the EXP-files and nothing else. + + + + + Step 2: Execute the mira assembly, eventually using command line + options or output redirection: + + +$ /path/to/the/mira/package/mira ... other options ... + + or simply + + +$ mira ... other options ... + + if MIRA is in a directory which is in your PATH. The result of the + assembly will now be in directory + named mira_results where you will + find mira_out.caf, mira_out.html + etc. or in gap4 direct assembly format in + the mira_out.gap4da sub-directory. + + + + + Step 3a: (This is not recommended + anymore) Change to the gap4da directory and start gap4: + + +$ cd mira_results/mira_out.gap4da +mira_results/mira_out.gap4da$ gap4 + + choose the menu 'File->New' and enter a name for your new database + (like 'demo'). Then choose the menu 'Assembly->Directed + assembly'. Enter the text 'fofn' in the entry + labelled Input readings from List or file + name and enter the text 'failures' into the entry + labelled Save failures to List or file name. + Press "OK". + + + That's it. + + + + + Step 3b: (Recommended) As an alternative to + step 3a, one can use the caf2gap converter (see below) + + +mira_results$ caf2gap -project demo -version 0 -ace mira_out.caf +mira_results$ gap4 DEMO.0 + + + + + + Out-of-the box example + MIRA comes with a few really small toy project to test usability on a + given system. Go to the minidemo directory and follow the instructions + given in the section for own projects above, but start with step 2. + Eventually, you might want to start mira while redirecting the output + to a file for later analysis. + + + + + Reassembly of GAP4 edited projects + + + It is sometimes wanted to reassemble a project that has already been + edited, for example when hidden data in reads has been uncovered or + when some repetitive bases have been tagged manually. The canonical + way to do this is by using CAF files as data exchange format and the + caf2gap and gap2caf converters available from the Sanger Centre + (). + + + The project will be completely reassembled, contig joins or breaks + that have been made in the GAP4 database will be lost, you will get an + entirely new assembly with what mira determines to be the best + assembly. + + + + + Step 1: Convert your GAP4 project with the gap2caf tool. Assuming + that the assembly is in the GAP4 + database CURRENT.0, convert it with the + gap2caf tool: + + +$ gap2caf -project CURRENT -version 0 -ace > newstart_in.caf + + The name "newstart" will be the project name + of the new assembly project. + + + + + Step 2: Start mira with the -caf option and tell it the name of + your new reassembly project: + + +$ mira -caf=newstart + + (and other options like --job etc. at will.) + + + + + Step 3: Convert the resulting CAF file + newstart_assembly/newstart_d_results/newstart_out.caf + to a gap4 database format as explained above and start gap4 with + the new database: + + +$ cd newstart_assembly/newstart_d_results +newstart_assembly/newstart_d_results$ caf2gap -project reassembled -version 0 -ace newstart_out.caf +newstart_assembly/newstart_d_results$ gap4 REASSEMBLED.0 + + + + + + Using backbones to perform a mapping assembly against a reference sequence + + + + One useful features of mira is the ability to assemble against already + existing reference sequences or contigs (also called a mapping assembly). The + parameters that control the behaviour of the assembly in these cases are in + the -STRAIN/BACKBONE section of the parameters. + + + Please have a look at the example in the minidemo/bbdemo2 directory + which maps sequences from C.jejuni RM1221 against (parts of) the genome + of C.jejuni NCTC1168. + + + There are a few things to consider when using backbone sequences: + + + + + Backbone sequences can be as long as needed! They are not subject + to normal read length constraints of a maximum of 10k bases. That + is, if one wants to load one or several entire chromosomes of a + bacterium or lower eukaryote as backbone sequence(s), this is just + fine. + + + + + Backbone sequences can be single sequences like provided by, e.g., + FASTA, FASTQ or GenBank files. But backbone sequences also can be + whole assemblies when they are provided as, e.g., CAF format. This + opens the possibility to perform semi-hybrid assemblies by + assembling first reads from one sequencing technology de-novo + (e.g. 454) and then map reads from another sequencing technology + (e.g. Solexa) to the whole 454 alignment instead of mapping it to + the 454 consensus. + + + A semi-hybrid assembly will therefore contain, like a hybrid + assembly, the reads of both sequencing technologies. + + + + + Backbone sequences will not be reversed! They will always appear in + forward direction in the output of the assembly. Please note: if the + backbone sequence consists of a CAF file that contain contigs which contain + reversed reads, then the contigs themselves will be in forward direction. + But the reads they contain that are in reverse complement direction will of + course also stay reverse complement direction. + + + + + Backbone sequences will not not be assembled together! That is, if a + sequence of the backbones has a perfect overlap with another backbone + sequence, they will still not be merged. + + + + + Reads are assembled to backbones in a first come, first served + scattering strategy. + + + Suppose you have two identical backbones and one read which + would match both, then the read would be mapped to the first + backbone. If you had two (almost) identical reads, the first + read would go to the first backbone, the second read to the + second backbone. With three almost identical reads, the first + backbone would get two reads, the second backbone one read. + + + + + Only in backbones loaded from CAF files: contigs made out of single + reads (singlets) loose their status as backbones and will be returned to the + normal read pool for the assembly process. That is, these sequences will be + assembled to other backbones or with each other. + + + + + + + Examples for using backbone sequences: + + + + + Example 1: assume you have a genome of an existing organism. From + that, a mutant has been made by mutagenesis and you are skimming + the genome in shotgun mode for mutations. You would generate for + this a straindata file that gives the name of + the mutant strain to the newly sequenced reads and simply assemble + those against your existing genome, using the following + parameters: + + + -SB:lsd=yes:lb=yes:bsn=nameOriginalStrain:bft=caf|fasta|gbf + + + When loading backbones from CAF, the qualities of the consensus + bases will be calculated by mira according normal consensus + computing rules. When loading backbones from FASTA or GBF, one + can set the expected overall quality of the sequences (e.g. 1 + error in 1000 bases = quality of 30) with + -SB:bbq=30. It is recommended to have the backbone + quality at least as high as the -CO:mgqrt value, so + that mira can automatically detect and report SNPs. + + + + + Example 2: suppose that you are in the process of performing a + shotgun sequencing and you want to determine the moment when you + got enough reads. One could make a complete assembly each day when + new sequences arrive. However, starting with genomes the size of a + lower eukaryote, this may become prohibitive from the + computational point of view. A quick and efficient way to resolve + this problem is to use the CAF file of the previous assembly as + backbone and simply add the new reads to the pool. The number of + singlets remaining after the assembly versus the total number of + reads of the project is a good measure for the coverage of the + project. + + + + + Example 3: in EST assembly with miraSearchESTSNPs, existing cDNA + sequences can also be useful when added to the project during step + 3 (in the file step3_in.par). They will + provide a framework to which mRNA-contigs built in previous steps + will be assembled against, allowing for a fast evaluation of the + results. Additionally, they provide a direction for the assembled + sequences so that one does not need to invert single contigs by + hand afterwards. + + + + + + + +
    diff -Nru mira-3.9.18/doc/docbook/attic/chap_solexa_part.xml mira-4.0/doc/docbook/attic/chap_solexa_part.xml --- mira-3.9.18/doc/docbook/attic/chap_solexa_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/attic/chap_solexa_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,1512 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + There is no such thing like overkill. + + +
    + Assembly of Illumina data with MIRA3 + + + Introduction + + + This guide assumes that you have basic working knowledge of Unix systems, know + the basic principles of sequencing (and sequence assembly) and what assemblers + do. + + + While there are step by step instructions on how to setup your Solexa data and + then perform an assembly, this guide expects you to read at some point in time + + + + + the MIRA reference manual file to look up some + command line options as well as general information on what tags + MIRA uses in assemblies, files it generates etc.pp + + + + + the short usage introduction to MIRA3 so that + you have a basic knowledge on how to set up projects in mira for + Sanger sequencing projects. + + + + + + + + + Caveats when assembling Solexa data + + + Even very short Solexa reads (< 50bp) are great for mapping assemblies. I + simply love them as you can easily spot differences in mutant organisms + ... or boost the quality of a newly sequenced genome to Q60. + + + Regarding de-novo assemblies ... well, from an assembler's point of + view, very short reads are a catastrophe, regardless of the sequencing + technology. + + + + + Repeats. The problem of repetitive sequences (e.g. rRNA stretches in + bacteria) gets worse the shorter the read lengths get. + + + + + Amount of data. As MIRA is by heart an assembler to resolve + difficult repetitive problems as they occur in Sanger and 454 reads, it + drags along quite a lot of ancillary information which is useless in + Solexa assemblies ... but still eats away memory. + + + + + + + Things look better for the now available 'longer' Solexa reads. Starting + with a length of 75bp and paired-end data, de-novo for bacteria is not + that bad at all. The first Solexas with a length of ~110 bases are + appearing in public, and from a contig building these are about as good + for de-novo as the first 454 GS20 reads were (from a quality perspective + they are even way better). + + + + Rule of thumb: in genome sequencing, the longer, the better. + + + If you have to pay a bit more to get longer reads (e.g. Solexa 100mers + instead of 75mers), go get the longer reads. With these, the results + you generate are way(!) better than with 36, 50 or even 75mers + ... both in mapping and de-novo. Don't try to save a couple of hundred + bucks in sequencing, you'll pay dearly afterwards in assembly. + + + For RNASeq, things are a bit more complicated + + + + + Rule of thumb: in RNASeq de-novo sequencing, the longer, the better. + + + Like for genome sequencing, go get longer reads. Your assemblies will + be definitively be better. + + + + + Even if you can get bacteria sequenced with ridiculously high coverage + like 500x or 1000x, this amount of data is simply not needed. Even + more important - though counterintuitive - is the fact that due to + non-random sequence dependent sequencing errors, a too high coverage + may even make the assembly worse. + + + Another rule of thumb: when having more than enough data, reduce the + data set so as to have an average coverage of approximately 100x. In + some rare cases (high GC content), perhaps 120x to 150x, but certainly + not more. + + + + When reducing a data set, do NOT, under + no circumstances not, try fancying selection of reads by some arbitrary + quality or length criteria. This will introduce a terrible bias in your + assembly due to non-random sequence-dependent sequencing errors and + non-random sequence dependent base quality assignment. More on this in + the next section. + + + + + Typical highlights and lowlights of Solexa sequencing data + + + Note: This section contains things I've + seen in the past and simply jotted down. You may have different + observations. + + + + Highlights + + + + + + Quality + + + For 36mers and the MIRA proposed-end-clipping, even in the old + pipeline I get about 90 to 95% reads matching to a reference without + a single error. For 72mers, the number is approximately 5% lower, + 100mers another 5% less. Still, these are great numbers. + + + + + Improved base calling pipeline of Illumina + + + The new base calling pipeline (1.4 or 2.4?) rolled out by Illumina + in Q1/Q2 2009 typically yields 20-50% more data from the very same + images. Furthermore, the base calling is way better than in the old + pipeline. For Solexa 76 mers, after trimming I get only 1% real + junk, between 85 and 90% of the reads are matching to a reference + without a single error. Of the remaining reads, roughly 50% have one + error, 25% have two errors, 12.5% have three errors etc. + + + It is worthwhile to re-analyse your old data if the images are + still around. + + + + + + Lowlights + + + + + + Long homopolymers + + + Long homopolymers (stretches of identical bases in reads) can be a + slight problem for Solexa. However, it must be noted that this is a + problem of all sequencing technologies on the market so far (Sanger, + Solexa, 454). Furthermore, the problem in much less pronounced in + Solexa than in 454 data: in Solexa, first problem appear may appear + in stretches of 9 to 10 bases, in 454 a stretch of 3 to 4 bases may + already start being problematic in some reads. + + + + + The GGCxG and GGC motifs + + + GGCxG or even GGC motif in the + 5' to 3' direction of reads. This one is particularly annoying and + it took me quite a while to circumvent in MIRA the problems it + causes. + + + Simply put: at some places in a genome, base calling after a + GGCxG or GGC motif is + particularly error prone, the number of reads without errors + declines markedly. Repeated GGC motifs worsen + the situation. The following screen shots of a mapping assembly + illustrate this. + + + The first example is a the GGCxG motif (in form + of a GGCTG) occurring in approximately one third + of the reads at the shown position. Note that all but one read + with this problem are in the same (plus) direction. + +
    + + The Solexa GGCxG problem. + + + + + + +
    + + The next two screen shots show the GGC, once for + forward direction and one with reverse direction reads: + +
    + + The Solexa GGC problem, forward example + + + + + + +
    +
    + + The Solexa GGC problem, reverse example + + + + + + +
    + + Places in the genome that have GGCGGC.....GCCGCC + (a motif, perhaps even repeated, then some bases and then an + inverted motif) almost always have very, very low number of good + reads. Especially when the motif is GGCxG. + + + Things get especially difficult when these motifs occur at sites + where users may have a genuine interest. The following example is a + screen shot from the Lenski data (see walk-through below) where a + simple mapping reveals an anomaly which -- in reality -- is an IS + insertion (see ) + but could also look like a GGCxG motif in forward + direction (GGCCG) and at the same time a + GGC motif in reverse direction: + +
    + + A genuine place of interest almost masked by the + <literal>GGCxG</literal> problem. + + + + + + +
    +
    + + + Strong GC bias in some Solexa data (2nd half 2009 until advent of TruSeq kit at end of 2010) + + + + Here I'm recycling a few slides from a couple of talks I held in 2010. + + + Things used to be so nice and easy with the early Solexa data I worked + with (36 and 44mers) in late 2007 / early 2008. When sample taking was + done right -- e.g. for bacteria: in stationary phase -- and the + sequencing lab did a good job, the read coverage of the genome was + almost even. I did see a few papers claiming to see non-trivial GC + bias back then, but after having analysed the data I worked with I + dismissed them as "not relevant for my use cases." Have a look at the + following figure showing exemplarily the coverage of a 45% GC + bacterium in 2008: + +
    + + Example for no GC coverage bias in 2008 Solexa data. + + + Example for no GC coverage bias in 2008 Solexa data. Apart from a + slight <emphasis>smile shape</emphasis> of the coverage -- + indicating the sample taking was not 100% in stationary phase of the + bacterial culture -- everything looks pretty nice: the average + coverage is at 27x, and when looking at potential genome + duplications at twice the coverage (54x), there's nothing apart a + single peak (which turned out to be a problem in a rRNA region). + + + + + + +
    + + Things changed starting sometime in Q3 2009, at least that's when I + got some data which made me notice a problem. Have a look at the + following figure which shows exactly the same organism as in the + figure above (bacterium, 45% GC): + +
    + + Example for GC coverage bias starting Q3 2009 in Solexa data. + + + Example for GC coverage bias starting Q3 2009 in Solexa + data. There's no <emphasis>smile shape</emphasis> anymore -- the + people in the lab learned to pay attention to sample in 100% + stationary phase -- but something else is extremely disconcerting: + the average coverage is at 33x, and when looking at potential genome + duplications at twice the coverage (66x), there are several dozen + peaks crossing the 66x threshold over a several kilobases (in one + case over 200 Kb) all over the genome. As if several small genome + duplications happened. + + + + + + +
    + + By the way, the figures above are just examples: I saw over a dozen + sequencing projects in 2008 without GC bias and several dozen in 2009 + / 2010 with GC bias. + + + Checking the potential genome duplication sites, they all looked + "clean", i.e., the typical genome insertion markers are + missing. Poking around at possible explanations, I looked at GC + content of those parts in the genome ... and there was the + explanation: + +
    + + Example for GC coverage bias, direct comparison 2008 / 2010 data. + + + Example for GC coverage bias, direct comparison 2008 / 2010 + data. The bug has 45% average GC, areas with above average read + coverage in 2010 data turn out to be lower GC: around 33 to 36%. The + effect is also noticeable in the 2008 data, but barely so. + + + + + + +
    + + Now as to actually why the GC bias suddenly + became so strong is unknown to me. The people in the lab use the same + protocol since several years to extract the DNA and the sequencing + providers claim to always use the Illumina standard protocols. + + + But obviously something must have changed. Current ideas about possible reasons include + + + + changed chemistries from Illumina leading perhaps to bias during DNA amplification + + + changed "standard" protocols + + + other ... + + + + It took Illumina some 18 months to resolve that problem for the + broader public: since data I work on were done with the TruSeq kit, + this problem has vanished. + + + However, if you based some conclusions or wrote a paper with Illumina + data which might be affected by the GC bias (Q3 2009 to Q4 2010), I + suggest you rethink all the conclusion drawn. This should be + especially the case for transcriptomics experiments where a difference + in expression of 2x to 3x starts to get highly significant! + +
    +
    + + + Mapping assemblies + + + This part will introduce you step by step how to get your data together for a + simple mapping assembly. + + + I'll make up an example using an imaginary bacterium: Bacillus chocorafoliensis (or short: Bchoc). + + + In this example, we assume you have two strains: a wild type strain of + Bchoc_wt and a mutant which you perhaps got from mutagenesis or other + means. Let's imagine that this mutant needs more time to eliminate a given + amount of chocolate, so we call the mutant Bchoc_se ... SE for + slow eater + + + You wanted to know which mutations might be responsible for the observed + behaviour. Assume the genome of Bchoc_wt is available to you as it was + published (or you previously sequenced it), so you resequenced Bchoc_se + with Solexa to examine mutations. + + + + Copying and naming the sequence data + + + You need to create (or get from your sequencing provider) the sequencing data + in either FASTQ or FASTA + FASTA quality format. The following walkthrough + uses what most people nowadays get: FASTQ. + + + Create a new project directory (e.g. myProject) and a subdirectory of this which will hold the sequencing data (e.g. data). + + arcadia:/path/to mkdir myProject +arcadia:/path/to cd myProject +arcadia:/path/to/myProject$ mkdir data + + Put the FASTQ data into that data directory so that it now looks perhaps like this: + + arcadia:/path/to/myProject$ ls -l data +-rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocse_lane6.solexa.fastq +-rw-r--r-- 1 bach users 264823645 2008-03-28 21:51 bchocse_lane7.solexa.fastq + + + + Copying and naming the reference sequence + + + The reference sequence (the backbone) can be in a number of different + formats: GFF3, GenBank, FASTA, CAF. The first three have the advantage + of being able to carry additional information like, e.g., + annotation. In this example, we will use a GenBank file like the ones + one can download from the NCBI. So, let's assume that our wild type + strain is in the following file: + NC_someNCBInumber.gbk. + + + You do not need to copy the reference sequence to your directory, but + I normally copy also the reference file into the directory with my + data as I want to have, at the end of my work, a nice little + self-sufficient directory which I can archive away and still be sure + that in 10 years time I have all data I need together. + + arcadia:/path/to/myProject$ cp /somewhere/NC_someNCBInumber.gbk data +arcadia:/path/to/myProject$ ls -l data +-rw-r--r-- 1 bach users 6543511 2008-04-08 23:53 NC_someNCBInumber.gbk +-rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocse_lane6.solexa.fastq +-rw-r--r-- 1 bach users 264823645 2008-03-28 21:51 bchocse_lane7.solexa.fastq + + We're almost finished with the setup. As I like to have things neatly separated, I always create a directory called assemblies which will hold my assemblies (or different trials) together. Let's quickly do that: + + arcadia:/path/to/myProject$ mkdir assemblies +arcadia:/path/to/myProject$ mkdir assemblies/1sttrial +arcadia:/path/to/myProject$ cd assemblies/1sttrial + + + + Writing a simple manifest file + + + A manifest file is a configuration file for MIRA which tells it what type of assembly it should do and which data it should load. In this case we have unpaired sequencing data which we want to map to a reference sequence, the manifest file for that is pretty simple: + + # Example for a manifest describing a mapping assembly with +# unpaired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = MyFirstAssembly +job = genome,mapping,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gbk +technology = text +strain = bchoc_wt + +# now the Illumina data + +readgroup = SomeUnpairedIlluminaReadsIGotFromTheLab +data = ../../data/*fastq +technology = solexa +strain = bchoc_se + + + Please look up the parameters of the manifest file in the main manual. The ones + above basically say: make an accurate mapping of Solexa reads + against a genome; in one pass; the name of the backbone strain is + 'bchoc_wt'; the + base qualities for the backbone are to be assumed Q30; for Solexa + data: assign default strain names for reads which have not loaded + ancillary data with strain info and that default strain name should + be 'bchoc_se'. + + + + + Starting the assembly + + Starting the assembly is now just a matter of a simple command line: + + arcadia:/path/to/myProject/assemblies/1sttrial$ mira manifest.conf >&log_assembly.txt + + + For a bacterial project having a backbone of ~4 megabases and with + ~4.5 million Solexa 36mers, MIRA needs some ~21 minutes on my + development machine. + + + A yeast project with a genome of ~20 megabases and ~20 million 36mers + needs 3.5 hours and 28 GiB RAM. + + + + For this example - if you followed the walk-through on how to prepare the data + - everything you might want to adapt in the first time are the following thing in the manifest file: + options: + + + + + project= (for naming your assembly project) + + + + + strain_name= to give the names of your reference and mapping strain + + + + + -GE:not= to tell MIRA how many processors it should use + + + + + Of course, you are free to change any option via the extended parameters, but + this will be the topic of another FAQ. + + + + + Mapping with multiple strains + + + MIRA will make use of ancillary information present in the manifest + file. One of these is the information to which strain (or organism or + cell line etc.pp) the generated data belongs. + + + You just need to tell in the manifest file which data comes from which + strain. Let's assume that in the example from above, the "lane6" data + were from a first mutant named bchoc_se1 and the + "lane7" data were from a second mutant + named bchoc_se2. Here's the manifest file you + would write then: + + # Example for a manifest describing a mapping assembly with +# unpaired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = MyFirstAssembly +job = genome,mapping,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gbk +technology = text +strain = bchoc_wt + +# now the Illumina data + +readgroup = DataForSE1 +data = ../../data/bchocse_lane6.solexa.fastq +technology = solexa +strain = bchoc_se1 + +readgroup = DataForSE2 +data = ../../data/bchocse_lane7.solexa.fastq +technology = solexa +strain = bchoc_se2 + + While mapping (or even assembling de-novo) with multiple strains is + possible, the interpretation of results may become a bit daunting in + some cases. For many scenarios it might therefore be preferable to + successively use the data sets in own mappings or assemblies. + + + + This is really the only change you need to do for this example. + + + + Manifest for paired-end data sets + + + When using paired-end data in mapping, you must decide whether you want + + + + + use the MIRA feature to create long 'coverage equivalent reads' + (CERs) which saves a lot of memory (both in the assembler and + later on in an assembly editor). However, you then + loose paired-end + information! + + + + + or whether you want to keep paired-end + information! at the expense of larger memory requirements both in MIRA + and in assembly editors afterwards. + + + + + or a mix of the two above + + + + + The Illumina pipeline generally gives you two files for paired-end + data: a project-1.fastq and + project-2.fastq. The first file containing the + first read of a read-pair, the second file the second read. Depending + on the preprocessing pipeline of your sequencing provider, the names + of the reads are either the very same in both files or already have + a /1 or /2 appended. + + + + MIRA can read all FASTQ variants produced by various Illumina + pipelines, be they with or without the /1 and /2 already appended to + the names. You generally do not need to do any name mangling before + feeding the data to MIRA. + + + + The following manifest file is an example for mapping a 500 bp + paired-end and a 3kb mate-pair library of a strain + called bchoc_se1 against a GenBank reference + file containing a strain called bchoc_wt: + + # Example for a manifest describing a mapping assembly with +# paired Illumina data, not merging reads and therefore keeping +# all pair information + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) +# and switch off merging of Solexa reads + +project = MyFirstAssembly +job = genome,mapping,accurate +parameters = -GE:not=4 SOLEXA_SETTINGS -CO:msr=no + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gbk +technology = text +strain = bchoc_wt + +# now the Illumina data + +readgroup = DataForPairedEnd500bpLib +data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 250 750 infoonly +segment_placement = ---> <--- infoonly + +readgroup = DataForMatePair3kbLib +data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 2500 3500 infoonly +segment_placement = <--- ---> infoonly + + Please look up the parameters used in the main manual. The ones + above basically say: make an accurate mapping of Solexa reads + against a genome. Additionally do not merge short short Solexa + reads to the contig. + + + For the paired-end library, assume a DNA template template size of + 250 to 750 bp and the segment orientation of the read pairs follows + the forward / reverse scheme. That information should be treated as + "information only" by MIRA, i.e., it is not used for deciding whether + a pair is well mapped. + + + For the mate-pair library, assume a DNA template template size of + 2500 to 3500 bp and the segment orientation of the read pairs follows + the reverse / forward scheme. That information should be treated as + "information only" by MIRA, i.e., it is not used for deciding whether + a pair is well mapped. + + + Comparing this command line with a command line for unpaired-data, two + parameters were added in the section for Solexa data: + + + + + -CO:msr=no tells MIRA not to merge reads that + are 100% identical to the backbone. This also allows to keep the + template information for the reads. + + + + + infoonly attribute actually switches + off checking of template sizes and segment + placement when inserting reads into the backbone. At first glance + this might seem counter-intuitive, but it's absolutely necessary + to spot, e.g., genome re-arrangements or indels in data analysis + after the assembly. + + + The reason is that if template size and segment placement checking + were on, the following would happen at, e.g. sites of + re-arrangement: MIRA would map the first read of a read-pair + without problem. However, it would very probably reject the second + read because it would not map at the specified distance or + orientation from its partner. Therefore, in mapping assemblies + with paired-end data, checking of the template size must be + switched off to give post-processing programs a chance to spot + re-arrangements. + + + + + + + Note: for other influencing factors + you might want to change depending on size of Solexa reads, see + section above on mapping of unpaired data. + + + + + Places of interest in a mapping assembly + + + This section just give a short overview on the tags you might find + interesting. For more information, especially on how to configure gap4 + or consed, please consult the mira usage document + and the mira manual. + + + In file types that allow tags (CAF, MAF, ACE), SNPs and other + interesting features will be marked by MIRA with a number of tags. The + following sections give a brief overview. For a description of what + the tags are (SROc, WRMc etc.), please read up the section "Tags used + in the assembly by MIRA and EdIt" in the main manual. + + + Screen shots in this section are taken from the walk-through with + Lenski data (see below). + + + + Where are SNPs? + + + + + the SROc tag will point to most + SNPs. Should you assemble sequences of more than one strain (I + cannot really recommend such a strategy), you also might + encounter SIOc and SAOc tags. + +
    + + "SROc" tag showing a SNP position in a Solexa mapping + assembly. + + + + + + +
    +
    + + "SROc" tag showing a SNP/indel position in a Solexa mapping + assembly. + + + + + + +
    +
    + + + the WRMc tags might sometimes + point SNPs to indels of one or two bases. + + +
    + + +
    + + + Where are insertions, deletions or genome re-arrangements? + + + + + Large deletions: the MCVc tags + point to deletions in the resequenced data, where no read is + covering the reference genome. + +
    + + "MCVc" tag (dark red stretch in figure) showing a genome + deletion in Solexa mapping assembly. + + + + + + +
    +
    + + + Insertions, small deletions and re-arrangements: these are + harder to spot. In unpaired data sets they can be found looking + at clusters of SROc, SRMc, WRMc, and / or UNSc tags. + +
    + + An IS150 insertion hiding behind a WRMc and a SRMc tags + + + + + + +
    + + more massive occurrences of these tags lead to a rather colourful + display in finishing programs, which is why these clusters are + also sometimes called Xmas-trees. + +
    + + A 16 base pair deletion leading to a SROc/UNsC xmas-tree + + + + + + +
    +
    + + An IS186 insertion leading to a SROc/UNsC xmas-tree + + + + + + +
    + + In sets with paired-end data, post-processing software (or + alignment viewers) can use the read-pair information to guide + you to these sites (MIRA doesn't set tags at the moment). + +
    +
    + + +
    + + + Other tags of interest + + + + + the UNSc tag points to areas + where the consensus algorithm had troubles choosing a base. This + happens in low coverage areas, at places of insertions (compared + to the reference genome) or sometimes also in places where + repeats with a few bases difference are present. Often enough, + these tags are in areas with problematic sequences for the + Solexa sequencing technology like, e.g., a + GGCxG or even GGC motif in + the reads. + + + + + the SRMc tag points to places + where repeats with a few bases difference are present. Here too, + sequence problematic for the Solexa technology are likely to + have cause base calling errors and subsequently setting of this + tag. + + + + + + + + + Comprehensive spreadsheet tables (for Excel or OOcalc) + + + Biologists are not really interested in SNPs coordinates, and why + should they? They're more interested where SNPs are, how good they + are, which genes or other elements they hit, whether they have an + effect on a protein sequence, whether they may be important etc. For + organisms without intron/exon structure or splice variants, MIRA can + generate pretty comprehensive tables and files if an annotated + GenBank file was used as reference and strain information was given + to MIRA during the assembly. + + + Well, MIRA does all that automatically for you if the reference + sequence you gave was annotated. + + + For this, miraconvert should be used with the + asnp format as target and a CAF file as input: + + +$ miraconvert -t asnp input.caf output + + Note that it is strongly suggested to perform a quick manual cleanup + of the assembly prior to this: for rare cases (mainly at site of + small indels of one or two bases), mira will not tag SNPs with a SNP + tag (SROc, SAOc or SIOc) but will be fooled into a tag denoting + unsure positions (UNSc). This can be quickly corrected manually. See + further down in this manual in the section on post-processing. + + + After conversion, you will have four files in the directory which + you can all drag-and-drop into spreadsheet applications like + OpenOffice Calc or Excel. + + + The files should be pretty self-explanatory, here's just a short overview: + + + + + output_info_snplist.txt is a simple list of + the SNPs, with their positions compared to the reference + sequence (in bases and map degrees on the genome) as well as the + GenBank features they hit. + + + + + output_info_featureanalysis.txt is a much + extended version of the list above. It puts the SNPs into + context of the features (proteins, genes, RNAs etc.) and gives a + nice list, SNP by SNP, what might cause bigger changes in + proteins. + + + + + output_info_featuresummary.txt looks at the + changes (SNPs, indels) from the other way round. It gives an + excellent overview which features (genes, proteins, RNAs, + intergenic regions) you should investigate. + + + There's one column (named 'interesting') which pretty much + summarises up everything you need into three categories: yes, + no, and perhaps. 'Yes' is set if indels were detected, an amino + acid changed, start or stop codon changed or for SNPs in + intergenic regions and RNAs. 'Perhaps' is set for SNPs in + proteins that change a codon, but not an amino acid (silent + SNPs). 'No' is set if no SNP is hitting a feature. + + + + + output_info_featuresequences.txt simply + gives the sequences of each feature of the reference sequence + and the resequenced strain. + + + + + + + + + HTML files depicting SNP positions and deletions + + + I've come to realise that people who don't handle data from NextGen + sequencing technologies on a regular basis (e.g., many biologists) + don't want to be bothered with learning to handle specialised + programs to have a look at their resequenced strains. Be it because + they don't have time to learn how to use a new program or because + their desktop is not strong enough (CPU, memory) to handle the data + sets. + + + Something even biologist know to operate are browsers. Therefore, + miraconvert has the option to load a CAF file of a mapping + assembly at output to HTML those areas which are interesting to + biologists. It uses the tags SROc, SAOc, SIOc and MCVc and outputs + the surrounding alignment of these areas together with a nice + overview and links to jump from one position to the previous or + next. + + + This is done with the '-t hsnp' option of miraconvert: + + +$ miraconvert -t hsnp input.caf output + + Note: I recommend doing this only + if the resequenced strain is a very close relative to the reference + genome, else the HTML gets pretty big. But for a couple of hundred + SNPs it works great. + + + + + WIG files depicting contig coverage + + + miraconvert can also dump a coverage file in + WIG format (using '-t wig'). This comes pretty handy for searching + genome deletions or duplications in programs like the Affymetrix + Integrated Genome Browser (IGB, see ). + + + + + Tables for gene expression values / genome deletions & duplications + + + When having data mapped against a reference with annotations (either from GenBank formats or GFF3 formats), miraconvert can generate tables depicting either expression values (in RNASeq/EST data mappings) or probable genome multiplication and deletion factors (in genome mappings). For this to work, you must use a MAF or CAF file as input, specify fcov as output format and the reference sequence must have had annotations during the mapping with MIRA. + + TODO: add example + +miraconvert -t fcov mira_out.maf myfeaturetable + +
    + + + Walkthrough: mapping of E.coli from Lenski lab against E.coli B REL606 + + + Sorry, needs to be re-written for the relatively new SRR format + distributed at the NCBI ... and changes in MIRA 3.9.x. Please come + back later. + + +
    + + + De-novo Solexa only assemblies + + + This is actually quite straightforward and not much different from + mapping assemblies: you need to tell MIRA were the data files are, + whether or not there are special conditions which apply (paired-end info + etc.) and that it is a de-novo assembly that you want and off you go. + + # Example for a manifest describing a de-novo assembly with +# paired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should assemble a genome in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = MyFirstAssembly +job = genome,denovo,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups". This example uses a +# paired-end library with 500bp and a mate-pair library with 3.5kb + +readgroup = MyPairedEnd500bpLib +data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 250 750 +segment_placement = ---> <--- + +readgroup = MyMatePair3kbLib +data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 2500 3500 +segment_placement = <--- ---> + + Then you start the assembly: + + +arcadia:/path/to/myProject$ mira manifest.conf >&log_assembly.txt + + Of course, you can add any other switch you want like, e.g., changing + the number of processors used, adding default strain names etc.pp + + + + + De-novo hybrid assemblies (Solexa + ...) + + + + + Two strategies can be thought of to assemble genomes using a combination + of Solexa and other (longer) reads: either using all reads for a full + de-novo assembly or first assembling the longer reads and use the + resulting assembly as backbone to map Solexa reads. Both strategies have + their pro and cons. + + + + All reads de-novo + + + Throwing all reads into a de-novo assembly is the most straightforward + way to get 'good' assemblies. This strategy is also the one which - in + most cases - yields the longest contigs as, in many projects, parts of + a genome not covered by one sequencing technology will probably be + covered by another sequencing technology. Furthermore, having the + consensus covered by more than one sequencing technology make base + calling a pretty robust thing: if MIRA finds disagreements it cannot + resolve easily, the assembler at least leaves a tag in the assembly to + point human finishers to these positions of interest. + + + The downside of this approach however is the fact that the sheer + amount of data in Solexa sequencing projects makes life difficult for + de-novo assemblers, especially for MIRA which is keeping quite some + additional information in memory in de-novo assemblies and tries to + use algorithms as exact as possible during contig + construction. Therefore, MIRA sometimes still runs into data sets + which make it behave quite badly with respect to assembly time and + memory consumption (but this is being constantly improved). + + + Full de-novo hybrid assemblies can be recommended only for bacteria at + the moment, although lower eukaryotes should also be feasible on + larger machines. + + + This is actually quite straightforward and not much different from + mapping assemblies: you need to tell MIRA were the data files are, + whether or not there are special conditions which apply (paired-end + info etc.) and that it is a de-novo assembly that you want and off you + go. + + # Example for a manifest describing a de-novo assembly with +# shotgun 454 data and paired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should assemble a genome in accurate mode +# As special parameter, we want to use 4 threads in parallel (where possible) + +project = MyFirstAssembly +job = genome,denovo,accurate +parameters = -GE:not=4 + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups". This example uses a +# 454 shotgun library; a Solexa paired-end library with 500bp and a Solexa +# mate-pair library with 3.5kb + +# First the 454 data. Note that, in this example, no XML data is loaded for +# 454 (showing that this is less critical for shotgun 454 data) + +readgroup = MyShotgun454Lib +data = ../../data/project_454data.fastq +technology = 454 +strain = bchoc_se1 + +# Now Illumina data + +readgroup = MyPairedEnd500bpLib +data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 250 750 +segment_placement = ---> <--- + +readgroup = MyMatePair3kbLib +data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 2500 3500 +segment_placement = <--- ---> + + Then you start the assembly: + + +arcadia:/path/to/myProject$ mira manifest.conf >&log_assembly.txt + + + + Long reads first, then Solexa + + + This strategy works in two steps: first assembling long reads, then + mapping short reads to the full alignment (not just a consensus + sequence). The result will be an assembly containing 454 (or Sanger) + and Solexa reads. + + + + Step 1: assemble the 'long' reads (454 or Sanger or both) just as + you would when assembling 454 or Sanger data. + + + + Step 2: filter the results. Fetch 'long' contigs from the assembly + before which are larger than 500 bases and have a given minimum + coverage. The Idea is to get more or less all contigs which + represent valid genome sequence of your project. + + +$ miraconvert -x 500 mira_out.maf hybrid_backbone.maf + + You might eventually want to add an additional filter for minimum + average coverage. If your project has an average coverage of 24, + you should filter for a minimum average coverage of 33% (coverage + 8, you might want to try out higher coverages) like this: + + +$ miraconvert -x 500 -y 8 mira_out.maf hybrid_backbone.maf + + + + Step 3: map the Solexa data. Copy the hybrid backbone to a new + empty directory, add in the Solexa data, start a mapping assembly + using the MAF as input for the backbone / reference. If you + assembled the 454 / Sanger data with strain info, the Solexa data + should also get those (as described above). + + + The readgroup section of your manifest file would then look like this: (need to write) + + + + + + + + Post-processing of assemblies + + + This section is a bit terse, you should also read the chapter on + working with results of MIRA3. + + + + Post-processing mapping assemblies + + + When working with resequencing data and a mapping assembly, I always + load finished projects into an assembly editor and perform a quick + cleanup of the results. + + + For close relatives of the reference strain this doesn't take long as + MIRA will have set tags (see section earlier in this document) at all + sites you should have a look at. For example, very close mutant + bacteria with just SNPs or simple deletions and no genome + reorganisation, I usually clean up in 10 to 15 minutes. That gives the + last boost to data quality and your users (biologists etc.) will thank + you for that as it reduces their work in analysing the data (be it + looking at data or performing wet-lab experiments). + + + Assume you have the following result files in the result directory of + a MIRA assembly: + + +arcadia:/path/to/myProject/newstrain_d_results$ ls -l +-rw-r--r-- 1 bach bach 655176303 2009-06-08 14:56 newstrain_out.caf +... + + The general workflow I use is to convert the CAF file to a gap4 database + and start the gap4 editor: + + +arcadia:newstrain_d_results$ caf2gap -project NEWSTRAIN -ace newstrain_out.caf >& /dev/null +arcadia:newstrain_d_results$ gap4 NEWSTRAIN.0 + + Then, in gap4 or gap5, I + + + + + quickly search for the UNSc and WRMc tags and check whether they + could be real SNPs that were overseen by MIRA. In that case, I + manually set a SROc (or SIOc) tag in gap4 via hot-keys that were + defined to set these tags. + + + + + sometimes also quickly clean up reads that are causing trouble in + alignments and lead to wrong base calling. These can be found at + sites with UNSc tags, most of the time they have the 5' to 3' + GGCxG motif which can cause trouble to Solexa. + + + + + look at sites with deletions (tagged with MCVc) and look whether I + should clean up the borders of the deletion. + + + + + After this, I convert the gap4 database back to CAF format: + + +$ gap2caf -project NEWSTRAIN >newstrain_edited.caf + + But beware: gap4 does not have the same consensus calling routines as + MIRA and will have saved it's own consensus in the new CAF. In fact, + gap4 performs rather badly in projects with multiple sequencing + technologies. So I use miraconvert from the MIRA package to recall + a good consensus (and save it in MAF as it's more compact and a lot + faster in handling than CAF): + + +$ miraconvert -r c newstrain_edited.caf newstrain_edited_recalled.maf + + And from this file I can then convert with miraconvert to any + other format I or my users need: CAF, FASTA, ACE, WIG (for coverage + analysis) etc.pp. + + + I can also also generate tables and HTML files with SNP analysis + results (with the "-t asnp" and "-t + hsnp" options of miraconvert) + + + + + Post-processing de-novo assemblies + + + As the result file of MIRA de-novo assemblies contains everything down + to 'contigs' with just two reads, it is advised to first filter out + all contigs which are smaller than a given size or have a coverage + lower than 1/3 to 1/2 of the overall coverage. + + + Filtering is performed by miraconvert using CAF file as + input. Assume you have the following file: + + +arcadia:/path/to/myProject/newstrain_d_results$ ls -l +... +-rw-r--r-- 1 bach bach 655176303 2009-06-08 14:56 newstrain_out.maf +... + + Let's say you have a hybrid assembly with an average coverage of + 50x. I normally filter out all contigs which have an average coverage + less than 1/3 and are smaller than 500 bases. These are mostly junk + contiglets remaining from the assembly and can be more or less safely + ignored. This is done the following way: + + +arcadia:newstrain_d_results$ miraconvert -x 500 -y 17 newstrain_out.maf newstrain_filterx500y17.caf + + From there on, convert the filtered CAF file to anything you need to + continue finishing of the genome (gap4 database, ACE, etc.pp). + + + + + + Using SRA data from the Short Read Archive at the NCBI + + + Make sure you have the SRA toolkit installed, see + + + The SRA format needs to be converted into something MIRA understands, + FASTQ being an ideal candidate. Therefore the program used for this will + be fastq-dump, which unfortunately will not output + names as needed by default, but fortunately has useful options to define + your own names via the --defline-seq + and --defline-qual command line options. + + + When using paired-end or mate-pair data, one disconcerting thing about + the SRA tools is that they will always concatenate by default the two + reads into a single sequence, which is of course not what any sane + person would expect. Here too, there's a command line option to get + around this: --split-spot + + + The following shows how I would recommend extracting (and naming) reads + from the SRA: + + +$ ls -l +... +$ fastq-dump --split-spot --defline-seq '@$ac_$si/$ri' --defline-qual '+' SRR012345.sra + + + + + + Known bugs / problems + + + These are actual for version 3 of MIRA and might or might not have been + addressed in later version. + + + Bugs: + + + + + mapping of paired-end reads with one read being in non-repetitive + area and the other in a repeat is not as effective as it should + be. The optimal strategy to use would be to map first the + non-repetitive read and then the read in the repeat. Unfortunately, + this is not yet implemented in MIRA. + + + + +
    diff -Nru mira-3.9.18/doc/docbook/book_3rdparty.xml mira-4.0/doc/docbook/book_3rdparty.xml --- mira-3.9.18/doc/docbook/book_3rdparty.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/book_3rdparty.xml 2014-02-02 12:05:17.000000000 +0000 @@ -3,7 +3,7 @@ -3rd party documentation to MIRA3 +3rd party documentation to MIRA 4 Things "The Definitive Guide" missed and other people kindly contributed diff -Nru mira-3.9.18/doc/docbook/book_definitiveguide.xml mira-4.0/doc/docbook/book_definitiveguide.xml --- mira-3.9.18/doc/docbook/book_definitiveguide.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/book_definitiveguide.xml 2014-02-02 12:05:17.000000000 +0000 @@ -3,11 +3,11 @@ -Sequence assembly with MIRA3 +Sequence assembly with MIRA 4 The Definitive Guide -MIRA3 +MIRA 4 This documentation is licensed under the Creative Commons @@ -60,15 +60,15 @@ - - - - + + + + - + @@ -78,6 +78,13 @@ Binary files /tmp/cZG3rEBpnp/mira-3.9.18/doc/docbook/bookfigures/ion_dh10bcovB13_12kb.png and /tmp/KecoAokE4n/mira-4.0/doc/docbook/bookfigures/ion_dh10bcovB13_12kb.png differ Binary files /tmp/cZG3rEBpnp/mira-3.9.18/doc/docbook/bookfigures/ion_dh10bcovB13_320kb.png and /tmp/KecoAokE4n/mira-4.0/doc/docbook/bookfigures/ion_dh10bcovB13_320kb.png differ Binary files /tmp/cZG3rEBpnp/mira-3.9.18/doc/docbook/bookfigures/results_convert_project.png and /tmp/KecoAokE4n/mira-4.0/doc/docbook/bookfigures/results_convert_project.png differ Binary files /tmp/cZG3rEBpnp/mira-3.9.18/doc/docbook/bookfigures/results_miraconvert.png and /tmp/KecoAokE4n/mira-4.0/doc/docbook/bookfigures/results_miraconvert.png differ diff -Nru mira-3.9.18/doc/docbook/chap_3p_ghbambus_part.xml mira-4.0/doc/docbook/chap_3p_ghbambus_part.xml --- mira-3.9.18/doc/docbook/chap_3p_ghbambus_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_3p_ghbambus_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -52,7 +52,7 @@ GraphViz package from - Just to be safe I also pre-installed + Just to be safe I also pre-installed GraphViz perl module from @@ -106,7 +106,7 @@ add the line: #include <string.h> - + Logger.hh @@ -130,11 +130,11 @@ add the line: #include <string.h> - + After changes, remake bambus from the the - bambus-2.33 directory run + bambus-2.33 directory run make clean make all @@ -157,14 +157,14 @@ in function FileSystem::isCreatableFile (line 58), changed - char * end_of_path = strrchr(filename, PATH_DELIMINATOR); + char * end_of_path = strrchr(filename, PATH_DELIMINATOR); to const char * end_of_path = strrchr(filename, PATH_DELIMINATOR); - + Options.cc @@ -172,7 +172,7 @@ add the line: #include <cstdio> - + @@ -185,7 +185,7 @@ Can't locate TIGR/Foundation.pm in @INC - to locate Fountation.pm type: + to locate Foundation.pm type: locate Foundation.pm @@ -260,7 +260,7 @@ Prepare shotgun data for assembly - Now, work on shotgun SFF files and append (use -a) to PE data in fasta, qual, xml files: + Now, work on shotgun SFF files and append (use -a) to PE data in fasta, qual, xml files: sff_extract -Q -a FAPPU2401.sff FA79DFG01.sff E95K6EU01.sff -o non_0157 @@ -330,7 +330,7 @@ priority ALL 1 # The following lines can be un-commented to specify certain -# per-library settings +# per-library settings # Redundancies # redundancy lib_some 1 @@ -387,7 +387,7 @@ printScaff -e non_O157_bambus.evidence.xml - -s non_O157_bambus.out.xml + -s non_O157_bambus.out.xml -l non_O157_bambus.lib -f non_0157_out.unpadded.fasta -merge -o non_O157_bambus_scaffold -page -dot @@ -407,4 +407,3 @@ - diff -Nru mira-3.9.18/doc/docbook/chap_454_part.xml mira-4.0/doc/docbook/chap_454_part.xml --- mira-3.9.18/doc/docbook/chap_454_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_454_part.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,916 +0,0 @@ - - - - - - - Bastien - Chevreux - bach@chevreux.org - - - -
    - Solomon Short - - Upset causes changes. Change causes upset. - -
    - Assembly of 454 data with MIRA3 - - - Introduction - - - MIRA can assemble 454 type data either on its own or together with any - other technology MIRA know to handle (Illumina, Sanger, - etc.). Paired-end sequences coming from genomic projects can also be - used if you take care to prepare your data the way MIRA needs it. - - - MIRA goes a long way to assemble sequence in the best possible way: it - uses multiple passes, learning in each pass from errors that occurred in - the previous passes. There are routines specialised in handling oddities - that occur in different sequencing technologies - - - Tip Use the MIRA version of - the sff_extract script which is provided as - download in the MIRA 3rd party software package. This script knows - about adaptor information and all the little important details when - extracting data from SFF into FASTQ (or FASTA) format. - - - - Some reading requirements - - - This guide assumes that you have basic working knowledge of Unix - systems, know the basic principles of sequencing (and sequence - assembly) and what assemblers do. - - - While there are step by step walkthroughs on how to setup your 454 - data and then perform an assembly, this guide expects you to read at - some point in time - - - - - the "Caveats when using 454 data" section of - this document (just below). This. Is. Important. Read. It! - - - - - the mira_usage introductory help file so that - you have a basic knowledge on how to set up projects in mira for - Sanger sequencing projects. - - - - - the GS FLX Data Processing Software Manual - from Roche Diagnostics (or the corresponding manual for the GS20 - or Titanium instruments). - - - - - and last but not least the mira_reference - help file to look up some command line options. - - - - - - - - - Playing around with some demo data - - - If you want to jump into action, I suggest you walk through the - "Walkthrough: combined unpaired and paired-end assembly of Brucella - ceti" section of this document to get a feeling on how things - work. That particular walkthrough is with paired and unpaired 454 data - from the NCBI short read archive, so be prepared to download a couple - of hundred MiBs. - - - But please do not forget to come back to the "Caveats" section just - below later, it contains a pointers to common traps lurking in the - depths of high throughput sequencing. - - - - - Estimating memory needs - - - "Do I have enough memory?" has been one of the - most often asked question in former times. To answer this question, - please use miramem which will give you an estimate. Basically, you - just need to start the program and answer the questions, for more - information please refer to the corresponding section in the main MIRA - documentation. - - - Take this estimate with a grain of salt, depending on the sequences - properties, variations in the estimate can be +/- 30%. - - - Take these estimates even with a larger grain of salt for - eukaryotes. Some of them are incredibly repetitive and this leads - currently to the explosion of some secondary tables in MIRA. I'm - working on it. - - - - - - Caveats when using 454 data - - - Please take some time to read this section. If you're really eager to - jump into action, then feel free to skip forward to the walkthrough, but - make sure to come back later. - - - - Screen. Your. Sequences! (part 1) - - - Or at least use the vector clipping info provided in the SFF file and - have them put into a standard NCBI TRACEINFO XML format. Yes, that's - right: vector clipping info. - - - Here's the short story: 454 reads can contain a kind of vector - sequence. To be more precise, they can - and very often do - contain - the sequence of the (A or B)-adaptors that were used for sequencing. - - - To quote a competent bioinformatician who thankfully dug through quite - some data and patent filings to find out what is going on: "These - adaptors consist of a PCR primer, a sequencing primer and a key. The - B-adaptor is always in because it's needed for the emPCR and - sequencing. If the fragments are long enough, then one usually does - not reach the adaptor at all. But if the fragments are too short - - tough luck." - - - Basically it's tough luck for a lot of 454 sequencing - project I have seen so far, both for public data (sequences available - at the NCBI trace archive) and non-public data. - - - - - Screen. Your. Sequences! (optional part 2) - - - Some labs use specially designed tags for their sequencing (I've heard - of cases with up to 20 bases). The tag sequences always being very - identical, they will behave like vector sequences in an assembly. Like - for any other assembler: if you happen to get such a project, then you - must take care that those tags are filtered out, respectively masked - from your sequences before going into an assembly. If you don't, the - results will be messy at best. - - - Tip Put your FASTAs through SSAHA2 or better, SMALT - with the sequence of your tags as masking target. MIRA can read the - SSAHA2 output (or SMALT when using "-f ssaha" output) and mask - internally using the MIRA -CL:msvs* parameters. - - - - - To right clip or not to right clip? - - - Sequences coming from the GS20, FLX or Titanium have usually pretty - good clip points set by the Roche/454 preprocessing software. There - is, however, a tendency to overestimate the quality towards the end of - the sequences and declare sequence parts as 'good' which really - shouldn't be. - - - Sometimes, these bad parts toward the end of sequences are so - annoyingly bad that they prevent MIRA from correctly building contigs, - that is, instead of one contig you might get two. - - - MIRA has the -CL:pec clipping option to deal with these - annoyances (standard for all --job=genome - assemblies). This algorithm performs proposed end - clipping which will guarantee that the ends of reads are - clean when the coverage of a project is high enough. - - - For genomic sequences: the term 'enough' being somewhat fuzzy - ... everything above a coverage of 15x should be no problem at all, - coverages above 10x should also be fine. Things start to get tricky - below 10x, but give it a try. Below 6x however, switch off - the -CL:pec option. - - - - - Left clipping wrongly preprocessed data - - - Short intro, to be expanded. (see example in B:ceti walkthrough) - - - - - - Walkthrough: a 454 assembly with unpaired reads - - - - Preparing the 454 data for MIRA - - - The basic data type you will get from the sequencing instruments will - be SFF files. Those files contain almost all information needed for an - assembly, but they need to be converted into more standard files - before mira can use this information. - - - Let's assume we just sequenced a bug (Bacillus - chocorafoliensis) and internally our department uses the - short bchoc mnemonic for your - project/organism/whatever. So, whenever you - see bchoc in the following text, you can replace - it by whatever name suits you. - - - For this example, we will assume that you have created a directory - myProject for the data of your project and that - the SFF files are in there. Doing a ls -lR should - give you something like this: - - -arcadia:/path/to/myProject$ ls -lR --rw-rw-rw- 1 bach users 475849664 2007-09-23 10:10 EV10YMP01.sff --rw-rw-rw- 1 bach users 452630172 2007-09-25 08:59 EV5RTWS01.sff --rw-rw-rw- 1 bach users 436489612 2007-09-21 08:39 EVX95GF02.sff - - - As you can see, this sequencing project has 3 SFF - files. - - - We'll use sff_extract: - - -arcadia:/path/to/myProject$ sff_extract -o bchoc EV10YMP01.sff EV5RTWS01.sff EVX95GF02.sff - - For more information on how to use sff_extract, - please refer to the chapter in the NCBI Trace and Short Read archive. - - - This can take some time, the 1.2 million FLX reads from this - example need approximately 9 minutes for conversion. Your directory - should now look something like this: - - -arcadia:/path/to/myProject$ ls -l --rw-r--r-- 1 bach users 231698898 2007-10-21 15:16 bchoc.fastq --rw-r--r-- 1 bach users 193962260 2007-10-21 15:16 bchoc.xml --rw-rw-rw- 1 bach users 475849664 2007-09-23 10:10 EV10YMP01.sff --rw-rw-rw- 1 bach users 452630172 2007-09-25 08:59 EV5RTWS01.sff --rw-rw-rw- 1 bach users 436489612 2007-09-21 08:39 EVX95GF02.sff - - By this time, the SFFs are not needed anymore. You can remove them - from this directory if you want. - - - - - Writing a manifest - - - The manifest is a configuration file for an assembly: it controls what - type of assembly you want to do and which data should go into the - assembly. For this first example, we just need a very simple manifest: - - -# A manifest file can contain comment lines, these start with the #-character - -# First part of a manifest: defining some basic things - -# In this example, we just give a name to the assembly -# and tell MIRA it should assemble a genome de-novo in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = MyFirstAssembly -job = genome,denovo,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups", for more information -# please consult the MIRA manual, chapter "Reference" - -readgroup = SomeUnpaired454ReadsIGotFromTheLab -technology = 454 -data = bchoc.fastq bchoc.xml - - Save the above lines into a file, we'll use - bchoc_1st_manifest.conf in this example. - - -arcadia:/path/to/myProject$ ls -l --rw-r--r-- 1 bach users 231698898 2007-10-21 15:16 bchoc.fastq --rw-r--r-- 1 bach users 193962260 2007-10-21 15:16 bchoc.xml --rw-r--r-- 1 bach users 756 2011-11-05 17:57 bchoc_1st_manifest.conf - - - - Starting the assembly - - - Starting the assembly is now just a matter of one line: - - -arcadia:/path/to/myProject$ mira bchoc_1st_manifest.conf >&log_assembly.txt - - Now, that was easy, wasn't it? In the above example - for assemblies - having only 454 data and if you followed the walkthrough on how to - prepare the data - everything you might want to adapt in the first - time are the following line in the manifest file: - - - - - project= (for naming your assembly project) - - - - - job= (perhaps to change the quality of the assembly to 'draft') - - - - - parameters= -GE:not=xxx (perhaps to change the nuber of processors) - - - - - Of course, you are free to change any option via the extended - parameters, but this is covered in the MIRA main reference manual. - - - - - - Walkthrough: a paired-end Sanger / unpaired 454 hybrid assembly - - - Preparing the data for a Sanger / 454 hybrid assembly takes some more steps - but is not really more complicated than a normal Sanger-only or 454-only - assembly. - - - In the following sections, the files with 454 input data will have - .454. in the name, files with Sanger have - .sanger.. That's just a convention I use, you do - not need to do that, but it helps to keep things nicely organised. - - - - Preparing the 454 data - - - Please proceed exactly in the same way as described for the assembly - of unpaired 454-only data in the section above, that is, without - writing a manifest and starting the actual assembly. The only difference: in the sff_extract part, use "-o" with the parameter "bchoc.454" to get the files named accordingly. - - -arcadia:/path/to/myProject$ sff_extract -o bchoc.454 EV10YMP01.sff EV5RTWS01.sff EVX95GF02.sff - - In the end you should have two files (FASTQ and TRACEINFO) for the 454 - data ready. - - - - - Preparing the Sanger data - - - There are quite a number of sequencing providers out there, all with - different pre-processing pipelines and different output - file-types. MIRA supports quite a number of them, the three most - important would probably be - - - - - (preferred option) FASTQ files and ancillary data in NCBI - TRACEINFO XML format. - - - - - (preferred option) FASTA files which are coupled with FASTA quality - files and ancillary data in NCBI TRACEINFO XML format. - - - - - (preferred option) CAF (from the Sanger Institute) files that - contain the sequence, quality values and ancillary data like - clippings etc. - - - - - (secondary option) EXP files as the Staden pregap4 package writes. - - - - - Your sequencing provider MUST have performed at least a sequencing - vector clip on this data. A quality clip might also be good to do by - the provider as they usually know best what quality they can expect - from their instruments (although MIRA can do this also if you want). - - - You can either perform clipping the hard way by removing physically - all bases from the input (this is - called trimming), or you can keep the clipped - bases in the input file and provided clipping information in ancillary - data files. These clipping information then MUST be present in the - ancillary data (either the TRACEINFO XML, or in the combined CAF, or - in the EXP files), together with other standard data like, e.g., - mate-pair information when using a paired-ends approach. - - - This example assumes that the data is provided as FASTA together with a - quality file and ancillary data in NCBI TRACEINFO XML format. - - - Put these files (appropriately renamed) into the directory with the - 454 data. - - - Here's how the directory with the preprocessed data should now look - approximately like: - - -arcadia:/path/to/myProject$ ls -l --rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.454.fastq --rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.454.xml - --rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.sanger.fastq --rwxrwxrwx 1 bach 2007-10-13 22:44 bchoc.sanger.xml - - - - Writing a manifest - - - This assembly contains unpaired 454 data and paired-end Sanger - data. Let's assume the 454 data to be exactly the same as for the - previous walkthrough. For the Sanger data, let's assume the template - DNA size for the Sanger library to be between 2500 and 3500 bases and - the read naming fto follow the TIGR naming scheme: - - -# A manifest file can contain comment lines, these start with the #-character - -# First part of a manifest: defining some basic things - -# In this example, we just give a name to the assembly -# and tell MIRA it should assemble a genome de-novo in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = MyFirstHybridAssembly -job = genome,denovo,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups", for more information -# please consult the MIRA manual, chapter "Reference" - -readgroup = SomeUnpaired454ReadsIGotFromTheLab -technology = 454 -data = bchoc.454.* - -# Note the wildcard "bchoc.454.*" in the data line above: this -# will load both the FASTQ and XML data - -readgroup = SomePairedSangerReadsIGotFromTheLab -technology = sanger -templatesize = 2500 3500 -segmentplacement = ---> <--- -segmentnaming = TIGR -data = bchoc.sanger.* - - If you compare the manifest above with the manifest in the walkthrough - for using only unpaired 454 data, you will see that large parts, i.e., - the definition of the job, parameter and the 454 read group is - exactly the same. The only differences are in the - naming of the assembly project (in project =), and - the definition of a second readgroup containing the Sanger sequencing - data. - - - - - Starting the hybrid assembly - - - Quite unsurprisingly, the command to start the assembly is exactly the same as always: - - -arcadia:/path/to/myProject$ mira myassebly_manifest.conf >&log_assembly.txt - - - - - Walkthrough: combined unpaired and paired-end assembly of Brucella ceti - - - Here's a walkthrough which should help you in setting up own assemblies. You - do not need to set up your directory structures as I do, but for this - walkthrough it could help. - - - This walkthrough was written at times when the NCBI still offered SFFs - for 454 data, which now it does not anymore. However, the approach is - still valid for your data where you should get SFFs. - - - This walkthrough was written at times when the primary input for 454 - data in MIRA was using FASTA + FASTA quality files. This has shifted - nowadays to FASTQ as input (it's more compact and faster to parse). I'm - sure you will be able to make the necessary changes to the command line - of sff_extract yourself :-) - - - - Preliminaries - - - Please make sure that sff_extract is working properly and that you have - at least version 0.2.1 (use sff_extract -v). Please also make sure - that SSAHA2 can be run correctly (test this by running ssaha2 -v). - - - - - Preparing your file system - - - Note: this is how I set up a project, feel free to implement whatever - structure suits your needs. - - -$ mkdir bceti -$ cd bceti -bceti_assembly$ mkdir origdata data assemblies - - Your directory should now look like this: - - -arcadia:bceti$ ls -l -drwxr-xr-x 2 bach users 48 2008-11-08 16:51 assemblies -drwxr-xr-x 2 bach users 48 2008-11-08 16:51 data -drwxr-xr-x 2 bach users 48 2008-11-08 16:51 origdata - - Explanation of the structure: - - - - - the origdata directory will contain the 'raw' - result files that one might get from sequencing. Basically,. - - - - - the data directory will contain the - preprocessed sequences for the assembly, ready to be used by MIRA - - - - - the assemblies directory will contain - assemblies we make with our data (we might want to make more than - one). - - - - - - - - - Getting the data - - - Since early summer 2009, the NCBI does not offer SFF files anymore, - which is a pity. This guide will nevertheless allow you to perform - similar assemblies on own data. - - - Please browse to - - and - - and download the SFF files to the origdata - directory (press the download button on those pages). - - - En passant, note the following: SRR005481 is described to be a 454 FLX - data set where the library contains unpaired data ("Library Layout: - SINGLE"). SRR005482 has also 454 FLX data, but this time it's - paired-end data ("Library Layout: PAIRED - (ORIENTATION=forward)"). Knowing this will be important later on in - the process. - - -arcadia:bceti$ cd origdata -arcadia:origdata$ ls -l --rw-r--r-- 1 bach users 240204619 2008-11-08 16:49 SRR005481.sff.gz --rw-r--r-- 1 bach users 211333635 2008-11-08 16:55 SRR005482.sff.gz - - We need to unzip those files: - - -arcadia:bceti_assembly/origdata$ gunzip *.gz - - And now this directory should look like this - - -arcadia:bceti_assembly/origdata$ ls -l --rw-r--r-- 1 bach users 544623256 2008-11-08 16:49 SRR005481.sff --rw-r--r-- 1 bach users 476632488 2008-11-08 16:55 SRR005482.sff - - Now move into the (still empty) data directory - - -arcadia:origdata$ cd ../data - - - - Data preprocessing with sff_extract - - - - - - Extracting unpaired data from SFF - - - We will first extract the data from the unpaired experiment - (SRR005481), the generated file names should all start - with bceti: - - -arcadia:bceti_assembly/data$ sff_extract -o bceti ../origdata/SRR005481.sff -Working on '../origdata/SRR005481.sff': -Converting '../origdata/SRR005481.sff' ... done. -Converted 311201 reads into 311201 sequences. - -******************************************************************************** -WARNING: weird sequences in file ../origdata/SRR005481.sff - -After applying left clips, 307639 sequences (=99%) start with these bases: -TCTCCGTC - -This does not look sane. - -Countermeasures you *probably* must take: -1) Make your sequence provider aware of that problem and ask whether this can be -corrected in the SFF. -2) If you decide that this is not normal and your sequence provider does not -react, use the --min_left_clip of sff_extract. -(Probably '--min_left_clip=13' but you should cross-check that) -******************************************************************************** - - (Note: I got this on the SRR005481 data set downloaded in October - 2008. In the mean time, the sequencing center or NCBI may have - corrected the error) - - - Wait a minute ... what happened here? - - - We launched a pretty standard extraction of reads where the whole - sequence were extracted and saved in the FASTA files and FASTA - quality files, and clipping information will be given in the - XML. Additionally, the clipped parts of every read will be shown in - lower case in the FASTA file. - - - After two or three minutes, the directory looked like this: - - -arcadia:bceti_assembly/data$ ls -l --rw-r--r-- 1 bach users 91863124 2008-11-08 17:15 bceti.fasta --rw-r--r-- 1 bach users 264238484 2008-11-08 17:15 bceti.fasta.qual --rw-r--r-- 1 bach users 52197816 2008-11-08 17:15 bceti.xml - - - - Dealing with wrong clip-offs in the SFF - - - In the example above, sff_extract discovered an unusual pattern - sequence and gave a (stern) warning: almost all the sequences - created for the FASTA file had a skew in the distribution of bases. - - - Let's have a look at the first 30 bases of the first 20 sequences of - the FASTA that was created: - - -arcadia:bceti_assembly/data$ head -40 bceti_in.454.fasta | grep -v ">" | cut -c 0-30 -tcagTCTCCGTCGCAATCGCCGCCCCCACA -tcagTCTCCGTCGGCGCTGCCCGCCCGATA -tcagTCTCCGTCGTGGAGGATTACTGGGCG -tcagTCTCCGTCGGCTGTCTGGATCATGAT -tcagTCTCCGTCCTCGCGTTCGATGGTGAC -tcagTCTCCGTCCATCTGTCGGGAACGGAT -tcagTCTCCGTCCGAGCTTCCGATGGCACA -tcagTCTCCGTCAGCCTTTAATGCCGCCGA -tcagTCTCCGTCCTCGAAACCAAGAGCGTG -tcagTCTCCGTCGCAGGCGTTGGCGCGGCG -tcagTCTCCGTCTCAAACAAAGGATTAGAG -tcagTCTCCGTCCTCACCCTGACGGTCGGC -tcagTCTCCGTCTTGTGCGGTTCGATCCGG -tcagTCTCCGTCTGCGGACGGGTATCGCGG -tcagTCTCCGTCTCGTTATGCGCTCGCCAG -tcagTCTCCGTCTCGCATTTTCCAACGCAA -tcagTCTCCGTCCGCTCATATCCTTGTTGA -tcagTCTCCGTCCTGTGCTGGGAAAGCGAA -tcagTCTCCGTCTCGAGCCGGGACAGGCGA -tcagTCTCCGTCGTCGTATCGGGTACGAAC - - What you see is the following: the leftmost 4 - characters tcag of every read are the last bases - of the standard 454 sequencing adaptor A. The fact that they are - given in lower case means that they are clipped away in the SFF - (which is good). - - - However, if you look closely, you will see that there is something - peculiar: after the adaptor sequence, all reads seem to start with - exactly the same sequence TCTCCGTC. This is *not* - sane. - - - This means that the left clip of the reads in the SFF has not been - set correctly. The reason for this is probably a wrong value which - was used in the 454 data processing pipeline. This seems to be a - problem especially when custom sequencing adaptors are used. - - - In this case, the result is pretty catastrophic: out of the 311201 - reads in the SFF, 307639 (98.85%) show this behaviour. We will - certainly need to get rid of these first 12 bases. - - - Now, in cases like these, there are three steps that you really - should follow: - - - - - Is this something that you expect from the experimental setup? - If yes, then all is OK and you don't need to take further - action. But I suppose that for 99% of all people, these abnormal - sequences are not expected. - - - - - Contact. Your. Sequence. Provider! The underlying problem is - something that *MUST* be resolved on their side, not on - yours. It might be a simple human mistake, but it it might very - well be a symptom of a deeper problem in their quality - assurance. Notify. Them. Now! - - - - - In the mean time (or if the sequencing provider does not react), - you can use the --min_left_clip command line option - from sff_extract as suggested in the warning message. - - - - - - - So, to correct for this error, we will redo the extraction of the - sequence from the SFF, this time telling sff_extract to set the left - clip starting at base 13 at the lowest: - - -arcadia:bceti_assembly/data$ sff_extract -o bceti --min_left_clip=13 ../origdata/SRR005481.sff -Working on '../origdata/SRR005481.sff': -Converting '../origdata/SRR005481.sff' ... done. -Converted 311201 reads into 311201 sequences. -arcadia:sff_from_ncbi/bceti_assembly/data$ ls -l --rw-r--r-- 1 bach users 91863124 2008-11-08 17:31 bceti.fasta --rw-r--r-- 1 bach users 264238484 2008-11-08 17:31 bceti.fasta.qual --rw-r--r-- 1 bach users 52509017 2008-11-08 17:31 bceti.xml - - This concludes the small intermezzo on how to deal with wrong left - clips. - - - - - - Preparing an assembly - - - Preparing an assembly is now just a matter of setting up a directory and - linking the input files into that directory. - - -arcadia:bceti_assembly/data$ cd ../assemblies/ -arcadia:bceti_assembly/assemblies$ mkdir arun_08112008 -arcadia:bceti_assembly/assemblies$ cd arun_08112008 -arcadia:assemblies/arun_08112008$ ln -s ../../data/* . -arcadia:bceti_assembly/assemblies/arun_08112008$ ls -l -lrwxrwxrwx 1 bach users 29 2008-11-08 18:17 bceti.454.fasta -> ../../data/bceti.454.fasta -lrwxrwxrwx 1 bach users 34 2008-11-08 18:17 bceti.454.fasta.qual -> ../../data/bceti.454.fasta.qual -lrwxrwxrwx 1 bach users 33 2008-11-08 18:17 bceti.454.xml -> ../../data/bceti.454.xml - - - - Starting the assembly 2 - - - Start an assembly with the options you like, for example like this: - - -$ NONONONONONONO ---- MAKE IT WITH MANIFEST !!!!mira --project=bceti --job=denovo,genome,accurate,454 >&log_assembly - - - - - What to do with the MIRA result files? - - - Please consult the corresponding section in the - mira usage document, it - contains much more information than this stub. - - - But basically, after the assembly has finished, you will find four - directories. The tmp directory can be deleted - without remorse as it contains logs and some tremendous amount of - temporary data (dozens of gigabytes for bigger - projects). The info directory has some text files - with basic statistics and other informative files. Start by having a - look at the *_info_assembly.txt, it'll give you a - first idea on how the assembly went. - - - The results directory finally contains the assembly - files in different formats, ready to be used for further processing with - other tools. - - - If you used the uniform read distribution option, you will inevitably - need to filter your results as this option produces larger and better - alignments, but also more ``debris contigs''. For this, use the - convert_project which is distributed together with the MIRA package. - - - Also very important when analysing 454 assemblies: screen the small - contigs ( < 1000 bases) for abnormal behaviour. You wouldn't be the - first to have some human DNA contamination in a bacterial sequencing. Or - some herpes virus sequence in a bacterial project. Or some bacterial DNA - in a human data set. Look whether these small contigs - - - - - have a different GC content than the large contigs - - - - - whether a BLAST of these sequences against some selected databases - brings up hits in other organisms that you certainly were not - sequencing. - - - - - - -
    - diff -Nru mira-3.9.18/doc/docbook/chap_bitsandpieces_part.xml mira-4.0/doc/docbook/chap_bitsandpieces_part.xml --- mira-3.9.18/doc/docbook/chap_bitsandpieces_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_bitsandpieces_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -80,149 +80,4 @@ *.smalt. - - - Using backbones to perform a mapping assembly against a reference sequence - - - One useful features of mira is the ability to assemble against already - existing reference sequences or contigs (also called a mapping assembly). The - parameters that control the behaviour of the assembly in these cases are in - the -STRAIN/BACKBONE section of the parameters. - - - Please have a look at the example in the minidemo/bbdemo2 directory - which maps sequences from C.jejuni RM1221 against (parts of) the genome - of C.jejuni NCTC1168. - - - There are a few things to consider when using backbone sequences: - - - - - Backbone sequences can be as long as needed! They are not subject - to normal read length constraints of a maximum of 20k bases. That - is, if one wants to load one or several entire chromosomes of a - bacterium or lower eukaryote as backbone sequence(s), this is just - fine. - - - - - Backbone sequences can be single sequences like provided by, e.g., - FASTA, FASTQ or GenBank files. But backbone sequences also can be - whole assemblies when they are provided as, e.g., CAF format. This - opens the possibility to perform semi-hybrid assemblies by - assembling first reads from one sequencing technology de-novo - (e.g. 454) and then map reads from another sequencing technology - (e.g. Solexa) to the whole 454 alignment instead of mapping it to - the 454 consensus. - - - A semi-hybrid assembly will therefore contain, like a hybrid - assembly, the reads of both sequencing technologies. - - - - - Backbone sequences will not be reversed! They will always appear in - forward direction in the output of the assembly. Please note: if the - backbone sequence consists of a CAF file that contain contigs which contain - reversed reads, then the contigs themselves will be in forward direction. - But the reads they contain that are in reverse complement direction will of - course also stay reverse complement direction. - - - - - Backbone sequences will not not be assembled together! That is, if a - sequence of the backbones has a perfect overlap with another backbone - sequence, they will still not be merged. - - - - - Reads are assembled to backbones in a first come, first served - scattering strategy. - - - Suppose you have two identical backbones and one read which - would match both, then the read would be mapped to the first - backbone. If you had two (almost) identical reads, the first - read would go to the first backbone, the second read to the - second backbone. With three almost identical reads, the first - backbone would get two reads, the second backbone one read. - - - - - Only in backbones loaded from CAF files: contigs made out of single - reads (singlets) loose their status as backbones and will be returned to the - normal read pool for the assembly process. That is, these sequences will be - assembled to other backbones or with each other. - - - - - - - Examples for using backbone sequences: - - - - - Example 1: assume you have a genome of an existing organism. From - that, a mutant has been made by mutagenesis and you are skimming - the genome in shotgun mode for mutations. You would generate for - this a straindata file that gives the name of - the mutant strain to the newly sequenced reads and simply assemble - those against your existing genome, using the following - parameters: - - - -SB:lsd=yes:lb=yes:bsn=nameOriginalStrain:bft=caf|fasta|gbf - - - When loading backbones from CAF, the qualities of the consensus - bases will be calculated by mira according normal consensus - computing rules. When loading backbones from FASTA or GBF, one - can set the expected overall quality of the sequences (e.g. 1 - error in 1000 bases = quality of 30) with - -SB:bbq=30. It is recommended to have the backbone - quality at least as high as the -CO:mgqrt value, so - that mira can automatically detect and report SNPs. - - - - - Example 2: suppose that you are in the process of performing a - shotgun sequencing and you want to determine the moment when you - got enough reads. One could make a complete assembly each day when - new sequences arrive. However, starting with genomes the size of a - lower eukaryote, this may become prohibitive from the - computational point of view. A quick and efficient way to resolve - this problem is to use the CAF file of the previous assembly as - backbone and simply add the new reads to the pool. The number of - singlets remaining after the assembly versus the total number of - reads of the project is a good measure for the coverage of the - project. - - - - - Example 3: in EST assembly with miraSearchESTSNPs, existing cDNA - sequences can also be useful when added to the project during step - 3 (in the file step3_in.par). They will - provide a framework to which mRNA-contigs built in previous steps - will be assembled against, allowing for a fast evaluation of the - results. Additionally, they provide a direction for the assembled - sequences so that one does not need to invert single contigs by - hand afterwards. - - - - - - diff -Nru mira-3.9.18/doc/docbook/chap_dataprep_part.xml mira-4.0/doc/docbook/chap_dataprep_part.xml --- mira-3.9.18/doc/docbook/chap_dataprep_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/chap_dataprep_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,114 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + Rome didn't fall in a day either. + +
    + Preparing data + + + Introduction + + + Most of this chapter and many sections are just stubs at the moment. + + + + + Sanger + + + Outside MIRA: transform .ab1 to .scf, perform sequencing vector clip + (and cloning vector clip if used), basic quality clips. + + + Recommended program: gap4 (or + rather pregap4) from the Staden 4 package. + + + + + Roche / 454 + + + Outside MIRA: convert SFF instrument from Roche to FASTQ, + use sff_extract for that. In case you used + "non-standard" sequencing procedures: clip away MIDs, clip away + non-standard sequencing adaptors used in that project. + + + + + Illumina + + + Outside MIRA: for heavens' sake: do NOT try to clip or trim by quality + yourself. Do NOT try to remove standard sequencing adaptors + yourself. Just leave Illumina data alone! (really, I mean it). + + + MIRA is much, much better at that job than you will probably ever get + ... and I dare to say that MIRA is better at that job than 99% of all + clipping/trimming software existing out there. Just make sure you use + the -CL:pec (proposed_end_clip) option of MIRA. + + + The only exception to the above is if you (or your + sequencing provider) used decidedly non-standard sequencing + adaptors. Then it might be worthwhile to perform own adaptor + clipping. But this will not be the case for 99% of all sequencing + projects out there. + + + Joining paired-ends: if you want to do this, feel free to use any tool + which is out there (TODO: quick list). Just make sure they do not join + on very short overlaps. For me, the minimum overlap is at least 17 + bases. + + + + + Pacific Biosciences + + + Outside MIRA: MIRA needs error corrected reads, either + + + + PacBio CCS reads (circular consensus sequence) which you get from the + PacBio SMRTAnalysis pipeline + + + or self-corrected or reads corrected with other sequencing + technologies which you will get either from the PacBio HGAP pipeline + or the pacbioToCA pipeline + + + + Assembly of uncorrected PacBio reads (CLR) is currently not supported + officially as of MIRA 4.0. + + + + + Ion Torrent + + + Outside MIRA: need to convert BAM to FASTQ. Need to clip away + non-standard sequencing adaptors if used in that project. Apart from + that: leave the data alone. + + +
    diff -Nru mira-3.9.18/doc/docbook/chap_denovo_part.xml mira-4.0/doc/docbook/chap_denovo_part.xml --- mira-3.9.18/doc/docbook/chap_denovo_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/chap_denovo_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,472 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + The universe is full of surprises - most of them nasty. + +
    + De-novo assemblies + + + Introduction + + + This guide assumes that you have basic working knowledge of Unix systems, know + the basic principles of sequencing (and sequence assembly) and what assemblers + do. + + + While there are step by step instructions on how to setup your data and + then perform an assembly, this guide expects you to read at some point in time + + + + + Before the assembly, to know what to do (or not to + do) with the sequencing data before giving it to MIRA. + + + + + For users with PacBio reads, has important + information regarding special parameters needed. + + + + + After the assembly, to know what to do with the + results of the assembly. More specifically, , , , and . + + + + + And also to look up how manifest files should be + written ( and and ), some command line options as well as general information on + what tags MIRA uses in assemblies, files it generates etc.pp + + + + + Last but not least, you may be interested in some observations about + the different sequencing technologies and the traps they may + contain, see for that. For advice on what to pay + attention to before going into a sequencing + project, have a look at . + + + + + + + General steps + + + This part will introduce you step by step how to get your data together + for a simple mapping assembly. I'll make up an example using an + imaginary bacterium: Bacillus chocorafoliensis (or + short: Bchoc). You collected the strain you want to + assemble somewhere in the wild, so you gave the strain the name + Bchoc_wt. + + + Just for laughs, let's assume you sequenced that bug with lots of more + or less current sequencing technologies: Sanger, 454, Illumina, Ion + Torrent and Pacific Biosciences. + + + + Copying and naming the sequence data + + + You need to create (or get from your sequencing provider) the + sequencing data in any supported file format. Amongst these, FASTQ and + FASTA + FASTA-quality will be the most common, although the latter is + well on the way out nowadays. The following walkthrough uses what most + people nowadays get: FASTQ. + + + Create a new project directory (e.g. myProject) + and a subdirectory of this which will hold the sequencing data + (e.g. data). + + arcadia:/path/to mkdir myProject +arcadia:/path/to cd myProject +arcadia:/path/to/myProject$ mkdir data + + Put the FASTQ data into that data directory so + that it now looks perhaps like this: + + arcadia:/path/to/myProject$ ls -l data +-rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocwt_lane6.solexa.fastq + + I completely made up the file names above. You can name them anyway you + want. And you can have them live anywhere on the hard-disk, you do not + need to put them in this data directory. It's just + the way I do it ... and it's where the example manifest files a bit + further down in this chapter will look for the data files. + + + We're almost finished with the setup. As I like to have things neatly separated, I always create a directory called assemblies which will hold my assemblies (or different trials) together. Let's quickly do that: + + arcadia:/path/to/myProject$ mkdir assemblies +arcadia:/path/to/myProject$ mkdir assemblies/1sttrial +arcadia:/path/to/myProject$ cd assemblies/1sttrial + + + + Writing a simple manifest file + + + A manifest file is a configuration file for MIRA which tells it what + type of assembly it should do and which data it should load. In this + case we'll make a simple assembly with unpaired Illumina data + + # Example for a manifest describing a de-novo assembly with +# unpaired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,denovo,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# here comes the unpaired Illumina data + +readgroup = SomeUnpairedIlluminaReadsIGotFromTheLab +data = ../../data/bchocwt_lane6.solexa.fastq +technology = solexa + + + Please look up the parameters of the manifest file in the main + manual or the example manifest files in the following section. + + + The ones above basically say: make an accurate denovo assembly of + unpaired Illumina reads. + + + + + Starting the assembly + + Starting the assembly is now just a matter of a simple command line: + + arcadia:/path/to/myProject/assemblies/1sttrial$ mira manifest.conf >&log_assembly.txt + + For this example - if you followed the walk-through on how to prepare the data + - everything you might want to adapt in the first time are the following thing in the manifest file: + options: + + + + + project= (for naming your assembly project) + + + + + Of course, you are free to change any option via the extended parameters, but + this is the topic of another part of this manual. + + + + + + Manifest files for different use cases + + + This section will introduce you to manifest files for different use + cases. It should cover the most important uses, but as always you are + free to mix and match the parameters and readgroup definitions to suit + your specific needs. + + + Taking into account that there may be a lot of + combinations of sequencing technologies, sequencing libraries (shotgun, + paired-end, mate-pair, etc.) and input file types (FASTQ, FASTA, + GenBank, GFF3, etc.pp), the example manifest files just use Illumina and + 454 as technologies, GFF3 as input file type for the reference sequence, + FASTQ as input type for sequencing data ... and they do not show the + multitude of more advanced features like, e.g., using ancillary clipping + information in XML files, ancillary masking information in SSAHA2 or + SMALT files etc.pp. + + + I'm sure you will be able to find your way by scanning through the + corresponding section on manifest files in the reference chapter :-) + + + + Manifest for shotgun data + + + Well, we've seen that already in the section above, but here it is + again ... but this time with 454 data. + + # Example for a manifest describing a denovo assembly with +# unpaired 454 data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,denovo,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# here's the 454 data + +readgroup = SomeUnpaired454ReadsIGotFromTheLab +data = ../../data/some454data.fastq +technology = 454 + + + + Assembling with multiple sequencing technologies (hybrid assemblies) + + + Hybrid mapping assemblies follow the general manifest scheme: tell + what you want in the first part, then simply add as separate readgroup + the information MIRA needs to know to find the data and off you + go. Just for laughs, here's a manifest for 454 shotgun with Illumina + shotgun + + # Example for a manifest describing a denovo assembly with +# shotgun 454 and shotgun Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,mapping,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# now the shotgun 454 data +readgroup = DataForShotgun454 +data = ../../data/project454data.fastq +technology = 454 + +# now the shotgun Illumina data + +readgroup = DataForShotgunIllumina +data = ../../data/someillumina.fastq +technology = solexa + + + + Manifest for data sets with paired reads + + + When using paired-end data, you should know + + + + + the orientation of the reads toward each other. This is specific + to sequencing technologies and / or the sequencing library preparation. + + + + + at which distance these reads should be. This is specific to the + sequencing library preparation and the sequencing lab should tell + you this. + + + + + In case you do not know one (or any) of the above, don't panic! MIRA + is able to estimate the needed values during the assembly if you tell + it to. + + + The following manifest shows you the most laziest way to define a + paired data set by simply adding autopairing as keyword to a + readgroup (using Illumina just as example): + + # Example for a lazy manifest describing a denovo assembly with +# one library of paired reads + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,denovo,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# now the Illumina paired-end data + +readgroup = DataIlluminaPairedLib +autopairing +data = ../../data/project_1.fastq ../../data/project_2.fastq +technology = solexa + + If you know the orientation of the reads and/or the library size, you + can tell this MIRA the following way (just showing the readgroup + definition here): + + readgroup = DataIlluminaPairedEnd500Lib +data = ../../data/project_1.fastq ../../data/project_2.fastq +technology = solexa +template_size = 250 750 +segment_placement = ---> <--- + + In cases you are not 100% sure about, e.g., the size of the DNA + template, you can also give a (generous) expected range and then tell + MIRA to automatically refine this range during the assembly based on + real, observed distances of read pairs. Do this with autorefine + modifier like this: + + template_size = 50 1000 autorefine + + The following manifest file is an example for assembling with several + different libraries from different technologies. Do not forget you + can use autopairing or autorefine :-) + + # Example for a manifest describing a denovo assembly with +# several kinds of sequencing libraries + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,denovo,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# now the Illumina paired-end data + +readgroup = DataIlluminaForPairedEnd500bpLib +data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 250 750 +segment_placement = ---> <--- + +# now the Illumina mate-pair data + +readgroup = DataIlluminaForMatePair3kbLib +data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 2500 3500 +segment_placement = <--- ---> + +# some Sanger data (6kb library) + +readgroup = DataForSanger6kbLib +data = ../../data/sangerdata.fastq +technology = sanger +template_size = 5500 6500 +segment_placement = ---> <--- + +# some 454 data + +readgroup = DataFo454Pairs +data = ../../data/454data.fastq +technology = 454 +template_size = 8000 1200 +segment_placement = 2---> 1---> + +# some Ion Torrent data + +readgroup = DataFoIonPairs +data = ../../data/iondata.fastq +technology = iontor +template_size = 1000 300 +segment_placement = 2---> 1---> + + + + De-novo with multiple strains + + + MIRA will make use of ancillary information present in the manifest + file. One of these is the information to which strain (or organism or + cell line etc.pp) the generated data belongs. + + + You just need to tell in the manifest file which data comes from which + strain. Let's assume that in the example from above, the "lane6" data + were from a first mutant named bchoc_se1 and the + "lane7" data were from a second mutant + named bchoc_se2. Here's the manifest file you + would write then: + + # Example for a manifest describing a de-novo assembly with +# unpaired Illumina data, but from multiple strains + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,denovo,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# now the Illumina data + +readgroup = DataForSE1 +data = ../../data/bchocse_lane6.solexa.fastq +technology = solexa +strain = bchoc_se1 + +readgroup = DataForSE2 +data = ../../data/bchocse_lane7.solexa.fastq +technology = solexa +strain = bchoc_se2 + + While assembling de-novo (pr mapping) with multiple strains is + possible, the interpretation of results may become a bit daunting in + some cases. For many scenarios it might therefore be preferable to + successively use the data sets in own assemblies or mappings. + + + This strain information for each readgroup is + really the only change you need to perform to tell MIRA everything it + needs for handling strains. + + + +
    diff -Nru mira-3.9.18/doc/docbook/chap_est_part.xml mira-4.0/doc/docbook/chap_est_part.xml --- mira-3.9.18/doc/docbook/chap_est_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_est_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -17,9 +17,8 @@ - Assembly of EST/RNASeq data with MIRA3 - - + EST / RNASeq assemblies + Introduction @@ -41,35 +40,52 @@ present. - While there are step by step walkthroughs on how to setup your EST data and - then perform assemblies regarding different requirements, this guide expects - you to read at some point in time + Please read at some point in time - the mira_usage introductory help file so that - you have a basic knowledge on how to set up projects in mira for - Sanger sequencing projects. + Before the assembly, to know what to do (or not to + do) with the sequencing data before giving it to MIRA. - the mira_454 introductory help file so that - you have a basic knowledge on how to set up projects in mira for - 454 sequencing projects. + For setting up the assembly, to know how to + start a denovo assembly (except you obviously will need to change + the --job setting from genome to + est). - and last but not least the mira_reference - help file to look up some command line options. + After the assembly, to know what to do with the + results of the assembly. More specifically, , , , and . + + + + + And also to look up how manifest files should be + written ( and and ), some command line options as well as general information on + what tags MIRA uses in assemblies, files it generates etc.pp - + Preliminaries: on the difficulties of assembling ESTs @@ -187,7 +203,7 @@ possible to switch on the SKIM chimera detection afterwards via -CL:ascdc. However, this will have exactly the effects described above: chimeras in higher coverage contigs will be detected, - but perfectly valid low coverage contigs will be torn apart. + but perfectly valid low coverage contigs will be torn apart. It is up to you to decide what you want or need. @@ -232,7 +248,7 @@ - + Preprocessing of ESTs @@ -325,7 +341,7 @@ getting confused, be it sequencing artefacts or highly expressed genes. - + The difference between <emphasis>assembly</emphasis> and <emphasis>clustering</emphasis> @@ -342,7 +358,7 @@ Splitting transcripts into contigs based on SNPs - Imagine this simple case: a gene has two slightly different alleles and you've + Imagine this simple case: a gene has two slightly different alleles and you've sequenced this: @@ -459,11 +475,11 @@ this can be changed using the -AL:egp:egpl parameters of MIRA if wanted. - + Problems with homopolymers, especially in 454 sequencing - + As 454 sequencing has a general problem with homopolymers, this rule of MIRA will sometimes lead formation of more contigs than expected due to sequencing errors at "long" homopolymer sites ... where long @@ -474,15 +490,15 @@ - + mira and miraSearchESTSNPs - The assembly of ESTS can be done in two ways when using the MIRA3 system: by - using mira or miraSearchESTSNPs. + The assembly of ESTS can be done in two ways when using the MIRA 4 system: by + using mira or miraSearchESTSNPs. If one has data from only one strain, mira using the "--job=est" @@ -614,7 +630,7 @@ - Like -AL:mrs above, -CO:rodirs is a fallback + Like -AL:mrs above, -CO:rodirs is a fall-back mechanism to disallow building of completely nonsensical contigs when -CO:asir=no and -AL:egp=no. You should decrease -CO:rodirs to anywhere between 10 and 0. @@ -636,14 +652,14 @@ homopolymer problem), but to disallow Sanger sequences from having them. The parameters would need be set like this: -$ mira [...] --job=est,... [...] +$ mira [...] --job=est,... [...] SANGER_SETTINGS -AL:egp=yes:egpl=split_on_codongaps 454_SETTINGS -AL:egp=no or in shorter form (as --job=est already presets -AL:egp=yes:egpl=split_on_codongaps for all technologies): -$ mira [...] --job=est,... [...] +$ mira [...] --job=est,... [...] 454_SETTINGS -AL:egp=no @@ -683,11 +699,11 @@ possible repeat marker bases and are tagged as such (temporarily) to catch each and every possible sequence alignment which might be important later. As a result of this stage, the following - information is written out: + information is written out: - Into step1_snpsinSTRAIN_<strainname>.caf + Into step1_snpsinSTRAIN_<strain_name>.caf all the sequences of a given strain that are in contigs (can be aligned with at least one other sequence) - also, all sequences that are singlets BUT have been tagged previously @@ -757,7 +773,7 @@ and writes out quite a lot of additional information files after each step. Results and and additional information of step 1 are stored in step1_* directories. Results and information of - step 2 are in <strainname>_* + step 2 are in <strain_name>_* directories. For step 3, it's step3_* again. @@ -790,253 +806,6 @@ - - - Walkthroughs - - - - - These walkthroughs use "msd" as project name (acronym for My Simple Dataset), - please replace that with your own project name according to the MIRA naming - convention. - - - - mira with "--job=est" - - - - - - Example: One strain, Sanger without vectors and no XML - - - Given is just a FASTA and FASTA quality file, where the Sanger - sequencing vector sequences and problematic things (like bad - quality) have been either completely removed from the data or were - masked with "X". Apart from that, no further processing (poly-A - removal etc.) was done. Your directory looks like this: - - -bach@arcadia:$ ls -l --rwxr--r-- 1 bach bach 15486163 2009-02-22 21:01 msd_in.sanger.fasta --rwxr--r-- 1 bach bach 38017687 2009-02-22 21:01 msd_in.sanger.fasta.qual - - - - Then, use this command: - - -$ mira --project=msd - --job=denovo,est,accurate,sanger - SANGER_SETTINGS - -CL:qc=no - >& log_assembly.txt - - - - We switch off the Sanger quality clips because bad quality is - already trimmed away by your pipeline. - - - - - Example: One strain, 454 with XML ancillary data - - - Like above, but this time 454 sequencing and the FASTA files contain - everything (including remaining adaptors and bad quality), but - there's a XML with ancillary data which contains all necessary clips - (like generated by, e.g., sff_extract): - - -bach@arcadia:$ ls -l --rwxr--r-- 1 bach bach 15486163 2009-02-22 21:01 msd_in.454.fasta --rwxr--r-- 1 bach bach 38017687 2009-02-22 21:01 msd_in.454.fasta.qual --rwxr--r-- 1 bach bach 10433244 2009-02-22 21:01 msd_traceinfo_in.454.xml - - Then, use this command: - - -bach@arcadia:$ mira --project=msd - --job=denovo,est,accurate,454 - 454_SETTINGS - -CL:qc=no - >& log_assembly.txt - - - - We just switch off our quality clip for 454 (and load the quality - clips from the XML), poly-A removal is performed by MIRA. Loading of - TRACEINFO XML data must not be switched on as it's the default for - 454 data. - - - - - Example: One strain, 454 with XML ancillary data, poly-A already removed. - - - Like above, but this time the data was pre-processed by another program - to mask the poly-A stretches with X: - - -bach@arcadia:$ ls -l --rwxr--r-- 1 bach bach 15486163 2009-02-22 21:01 msd_in.454.fasta --rwxr--r-- 1 bach bach 38017687 2009-02-22 21:01 msd_in.454.fasta.qual --rwxr--r-- 1 bach bach 10433244 2009-02-22 21:01 msd_traceinfo_in.454.xml - - Then, use this command: - - -bach@arcadia:$ mira --project=msd - --job=denovo,est,accurate,454 - 454_SETTINGS - -CL:qc=no:cpat=no - >& log_assembly.txt - - - - - We just switch off our quality clip (and load the quality clips from - the XML) and also switch off poly-A clipping. Remember, never - perform poly-A/T clipping twice on a data set. - - - - - Example: Two strains, 454 with XML ancillary data, poly-A already - removed. - - - Like above, but this time we assign reads to different - strains. This can happen either by putting the strain information - into the XML file (using the strain field of the - NCBI TRACEINFO format definition) or by using a two column, - tab-delimited file which mira loads on request. - - - As written. when using XML no change to the command line from the - last example would be needed. This example uses the extra file with - strain information. The file - msd_straindata_in.txt contains key value pair - information on the relationship of reads to strains and looks like - this (gnlti* are name of reads): - - -bach@arcadia:$ cat msd_straindata_in.454.txt -gnlti136478626 tom -gnlti136479357 tom -gnlti136479063 tom -gnlti136478624 jerry -gnlti136479522 jerry -gnlti136477918 jerry - - Then, use this command (note the additional -LR:lsd - option): - - -bach@arcadia:$ mira --project=msd - --job=denovo,est,accurate,454 - 454_SETTINGS - -LR:lsd=yes - -CL:qc=no:cpat=no - >& log_assembly.txt - - - - - - miraSearchESTSNPs - - - - - - Example: Two strains, Sanger with masked sequences, no XML - - - Given just a FASTA and FASTA quality file, where the Sanger - sequencing vectors and all sequencing related things (like bad - quality) have been either completely removed from the data or were - masked with "X". Apart from that, no further processing (poly-A - removal etc.) was done. - - - You have n strains (in this - example n=2) called "tom" and "jerry" - - - Your directory looks like this: - - -bach@arcadia:$ ls -l --rw-r--r-- 1 bach bach 5276 2009-02-22 21:23 msd_in.sanger.fasta --rw-r--r-- 1 bach bach 13827 2009-02-22 21:23 msd_in.sanger.fasta.qual --rw-r--r-- 1 bach bach 120 2009-02-22 21:27 msd_straindata_in.txt - - The file msd_straindata_in.txt contains key - value pair information on the relationship of reads to strains and - looks like this (gnlti* are name of reads): - - -bach@arcadia:$ cat msd_straindata_in.txt -gnlti136478626 tom -gnlti136479357 tom -gnlti136479063 tom -gnlti136478624 jerry -gnlti136479522 jerry -gnlti136477918 jerry - - To assemble, use this: - - -bach@arcadia:$ miraSearchESTSNPs - --project=msd - --job=denovo,accurate,sanger,esps1 - >&log_assembly_esps1.txt - - Note that the results of this first step are in sub-directories - prefixed with "step1". - - - When the first step finished, continue with this (note that no - "--project" is given here): - - -bach@arcadia:$ miraSearchESTSNPs - --job=denovo,accurate,esps2 - >&log_assembly_esps2.txt - - - Note that the results of this second step are in sub-directories - prefixed with "tom", "jerry" and "remain". You will find in each - directory the clean transcripts from every strain/organism. - - - To see which SNPs exist between both "tom" and "jerry", launch the - third step: - - -bach@arcadia:$ miraSearchESTSNPs - --job=denovo,accurate,esps3 - >&log_assembly_esps3.txt - - - - - Note that the results of this third step are in sub-directories - prefixed with "step3". - - - In the step3_d_results directory for example, - you can transform the CAF file into a gap4 database and then look at - the SNPs searching for the tags SROr, SIOr and SAOr. - - - - Solving common problems of EST assemblies @@ -1050,4 +819,3 @@ </para> </sect1> </chapter> - diff -Nru mira-3.9.18/doc/docbook/chap_faq_part.xml mira-4.0/doc/docbook/chap_faq_part.xml --- mira-3.9.18/doc/docbook/chap_faq_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_faq_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -49,7 +49,7 @@ <para>Test answer 2</para> </answer> </qandaentry> - </qandaset> + </qandaset> <para> </para> @@ -60,7 +60,7 @@ <para> </para> <screen> - I have a project which I once started quite normally via + I have a project which I once started quite normally via "--job=denovo,genome,accurate,454" and once with explicitly switching off the uniform read distribution "--job=denovo,genome,accurate,454 -AS:urd=no" @@ -71,7 +71,7 @@ </para> <para> Since 2.9.24x1, MIRA has a feature called "uniform read distribution" which is - normally switched on. This feature reduces overcompression of repeats during + normally switched on. This feature reduces over-compression of repeats during the contig building phase and makes sure that, e.g., a rRNA stretch which is present 10 times in a bacterium will also be present approximately 10 times in your result files. @@ -83,40 +83,40 @@ multiplied by a safety factor is reached at a given site. </para> <para> - It's generally a very useful tool disentangle repeats, but has some slight - secondary effects: rejection of otherwise perfectly good reads. The - assumption of read distribution uniformity is the big problem we have here: - of course it's not really valid. You sometimes have less, and sometimes more - than "the average" coverage. Furthermore, the new sequencing technologies - - 454 perhaps but especially the microreads from Solexa & probably also SOLiD - + It's generally a very useful tool disentangle repeats, but has some slight + secondary effects: rejection of otherwise perfectly good reads. The + assumption of read distribution uniformity is the big problem we have here: + of course it's not really valid. You sometimes have less, and sometimes more + than "the average" coverage. Furthermore, the new sequencing technologies - + 454 perhaps but especially the microreads from Solexa & probably also SOLiD - show that you also have a skew towards the site of replication origin. </para> <para> - One example: let's assume the average coverage of your project is 8 and by - chance at one place you have 17 (non-repetitive) reads, then the following + One example: let's assume the average coverage of your project is 8 and by + chance at one place you have 17 (non-repetitive) reads, then the following happens: </para> <para> $p$= parameter of -AS:urdsip </para> <para> - Pass 1 to $p-1$: MIRA happily assembles everything together and calculates a - number of different things, amongst them an average coverage of ~8. At the - end of pass '$p-1$', it will announce this average coverage as first estimate + Pass 1 to $p-1$: MIRA happily assembles everything together and calculates a + number of different things, amongst them an average coverage of ~8. At the + end of pass '$p-1$', it will announce this average coverage as first estimate to the assembly process. </para> <para> - Pass $p$: MIRA has still assembled everything together, but at the end of each - pass the contig self-checking algorithms now include an "average coverage - check". They'll invariably find the 17 reads stacked and decide (looking at - the -AS:urdct parameter which I now assume to be 2) that 17 is larger than - 2*8 and that this very well may be a repeat. The reads get flagged as + Pass $p$: MIRA has still assembled everything together, but at the end of each + pass the contig self-checking algorithms now include an "average coverage + check". They'll invariably find the 17 reads stacked and decide (looking at + the -AS:urdct parameter which I now assume to be 2) that 17 is larger than + 2*8 and that this very well may be a repeat. The reads get flagged as possible repeats. </para> <para> Pass $p+1$ to end: the "possibly repetitive" reads get a much tougher treatment in MIRA. Amongst other things, when building the contig, the contig - now looks that "possibly repetitive" reads do not overstack by an average + now looks that "possibly repetitive" reads do not over-stack by an average coverage multiplied by a safety value (-AS:urdcm) which I'll assume in this example to be 1.5. So, at a certain point, say when read 14 or 15 of that possible repeat want to be aligned to the contig at this given place, the @@ -127,11 +127,11 @@ got rejected like this, it will end up as singlet or in the debris file. </para> <para> - Tough luck. I do have ideas on how to reintegrate those reads at the and of an - assembly, but I had deferred doing this as in every case I had looked up, - adding those reads to the contigs wouldn't have changed anything ... there's - already enough coverage. What I do in those cases is simply filter away the - contiglets (defined as being of small size and having an average coverage + Tough luck. I do have ideas on how to re-integrate those reads at the and of an + assembly, but I had deferred doing this as in every case I had looked up, + adding those reads to the contigs wouldn't have changed anything ... there's + already enough coverage. What I do in those cases is simply filter away the + contiglets (defined as being of small size and having an average coverage below the average coverage of the project / 3 (or 2.5)) from a project. </para> </sect2> @@ -225,7 +225,7 @@ </listitem> <listitem> <para> - 454 GS20: 500 + 454 GS20: 500 </para> </listitem> <listitem> @@ -243,10 +243,10 @@ </para> <para> Let's assume we decide for an average coverage of 11 and a minimum length of - 1000 bases. Now you can filter your project with convert_project + 1000 bases. Now you can filter your project with miraconvert </para> <screen> - convert_project -f caf -t caf -x 1000 -y 14 sourcefile.caf filtered.caf + miraconvert -x 1000 -y 11 sourcefile.caf filtered.caf </screen> <para> </para> @@ -270,17 +270,17 @@ <itemizedlist> <listitem> <para> - IUPc + IUPc </para> </listitem> <listitem> <para> - UNSc + UNSc </para> </listitem> <listitem> <para> - SRMc + SRMc </para> </listitem> <listitem> @@ -325,7 +325,7 @@ <para>Sugar and spice and everything nice.</para> </answer> </qandaentry> - </qandaset> + </qandaset> <para> </para> @@ -380,7 +380,7 @@ No, not anymore. Use the sff_extract script to - extract your reads. Though the Roche sfftools package containes a few + extract your reads. Though the Roche sfftools package contains a few additional utilities which could be useful. @@ -429,8 +429,8 @@ - However, looking through some earlier project data I had, I also retrieved the - following (by simply making a consensus of sequences that did not match the + However, looking through some earlier project data I had, I also retrieved the + following (by simply making a consensus of sequences that did not match the target genome anymore): @@ -442,7 +442,7 @@ - Go figure, I have absolutely no idea where these come from as they also do not + Go figure, I have absolutely no idea where these come from as they also do not comply to the "tcag" ending the adaptors should have. @@ -493,7 +493,7 @@ A-Adaptor - DNA1 - Linker - DNA2 - B-Adaptor. - It's possible that one of the two DNA fragments is *very* short or is missing + It's possible that one of the two DNA fragments is *very* short or is missing completely, then one has something like this: @@ -518,7 +518,7 @@ will NOT have the direction - ---> Linker <--- + ---> Linker <--- as one might expect when being used to Sanger Sequencing, but rather in this @@ -548,10 +548,10 @@ If this is - for whatever reason - not possible, this list might help. - Are the sequences ~100-110 bases long? It's GS20. + Are the sequences ~100-110 bases long? It's GS20. - Are the sequences ~220-250 bases long? It's FLX. + Are the sequences ~220-250 bases long? It's FLX. Are the sequences ~350-450 bases long? It's Titanium. @@ -575,7 +575,7 @@ already did an assembly (using MIRA) on the basecalled and fully processed reads (using of course the accompanying *qual file). Do you suggest that I should redo the assembly after filtering out sequences being shorter than a -certain length (eg those that are <200bp)? In other words, am I taking into +certain length (e.g. those that are <200bp)? In other words, am I taking into account low quality sequences if I do the assembly the way the sequencing company did it (fully processed reads + quality files)? @@ -635,7 +635,7 @@ Long deletions (longer than read length): they'll be tagged with MCVc tag by MIRA ins the consensus. Additionally, when looking at the FASTA files when - running the CAF result through convert_project: long stretches of + running the CAF result through miraconvert: long stretches of sequences without coverage (the @ sign in the FASTAs) of X show missing genomic DNA. @@ -824,7 +824,7 @@ - (spaces inserted just as visual helper in the example sequence, they would not + (spaces inserted just as visual helper in the example sequence, they would not occur in the real stuff) @@ -847,12 +847,12 @@ - The part with the Xs was masked away by your repeat masker. Now, when MIRA - loads the FASTA, it will first apply the clippings from the XML file (they're - still the same). Then, if the option to clip away masked areas of a read - (-CL:mbc, which is normally on for EST projects), it will search for the - stretches of X and internally also put clips to the sequence. In the example - above, only the following sequence would remain as "working sequence" (the + The part with the Xs was masked away by your repeat masker. Now, when MIRA + loads the FASTA, it will first apply the clippings from the XML file (they're + still the same). Then, if the option to clip away masked areas of a read + (-CL:mbc, which is normally on for EST projects), it will search for the + stretches of X and internally also put clips to the sequence. In the example + above, only the following sequence would remain as "working sequence" (the clipped parts would still be present, but not used for any computation. @@ -877,8 +877,8 @@ boundaries and gap sizes. - Now, if you look at the sequence above, you will see two possible poly-A - tails ... at least the real poly-A tail should be masked else you will get + Now, if you look at the sequence above, you will see two possible poly-A + tails ... at least the real poly-A tail should be masked else you will get megahubs with all the other reads having the poly-A tail. @@ -957,7 +957,7 @@ same). - Countermeasures to take are: + Countermeasures to take are: @@ -1003,21 +1003,21 @@ - That's quite normal in the first few passes of an assembly. During each pass - (-AS:nop), contigs get built one by one. After a contig has been finished, it - checks itself whether it can find misassemblies due to repeats (and marks - these internally). If no misassembly, perfect, build next contig. But if yes, + That's quite normal in the first few passes of an assembly. During each pass + (-AS:nop), contigs get built one by one. After a contig has been finished, it + checks itself whether it can find misassemblies due to repeats (and marks + these internally). If no misassembly, perfect, build next contig. But if yes, the contig requests immediate re-assembly of itself. - But this can happen only a limited number of times (governed by -AS:rbl). If - there are still misassemblies, the contig is stored away anyway ... chances - are good that in the next full pass of the assembler, enough knowledge has + But this can happen only a limited number of times (governed by -AS:rbl). If + there are still misassemblies, the contig is stored away anyway ... chances + are good that in the next full pass of the assembler, enough knowledge has been gained top correctly place the reads. - So, you need to worry only if these messages still appear during the last - pass. The positions that cause this are marked with "SRMc" tags in the + So, you need to worry only if these messages still appear during the last + pass. The positions that cause this are marked with "SRMc" tags in the assemblies (CAF, ACE in the result dir; and some files in the info dir). @@ -1148,4 +1148,3 @@
    - diff -Nru mira-3.9.18/doc/docbook/chap_hard_part.xml mira-4.0/doc/docbook/chap_hard_part.xml --- mira-3.9.18/doc/docbook/chap_hard_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_hard_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -18,7 +18,7 @@ Assembly of <emphasis>hard</emphasis> genome or EST / RNASeq projects - + Getting 'mean' genomes or EST / RNASeq data sets assembled @@ -40,11 +40,12 @@ For the impatient - Use -HS:mnr=yes:nrr=10 and give it a try. If that does not - work, decrease -HS:nrr to anywhere between 5 and 9. If it - worked well enough increase the -HS:nrr parameter up to 15 - or 20. But please also read on to see how to choose the "nrr" - threshold. + For bacteria with nasty repeats, try first + --hirep_something. This will increase runtime and memory + requirements, but helps to get this sorted out. If the data for lower + eukaryotes leads to runtime and memory explosion, try either + --hirep_good or, for desperate cases, + --hirep_something. @@ -258,7 +259,7 @@ seen to be repetitive. - Note that reads can have several disjunct repeat stetches in a single + Note that reads can have several disjunct repeat stretches in a single read, hence they can occur more than one time in the file as shown with read2 in the example above. @@ -290,7 +291,7 @@ There's one very simple trick to find out whether your data contains some kind of sequencing vector or adaptor contamination which I use. it - makes use of the read repat file discussed above. + makes use of the read repeat file discussed above. The following example shows this exemplarily on a 454 data where the @@ -317,7 +318,7 @@ 324 GGTACTCGTATAGTGACACGCAACAGGGGATAGACAAGGCAC You probably see a sequence pattern - CTCGTATAGTGACACGCAACAGGGGATAGACAAGGCAC in the above screenshot. Before + CTCGTATAGTGACACGCAACAGGGGATAGACAAGGCAC in the above screens hot. Before going into details of what you are actually seeing, here's the explanation how this pipeline works: @@ -416,7 +417,7 @@ output consists of a tab delimited format in two columns: the first column contains the number of times a given line (sequence in our case) was seen, the second column contains the line - (sequence) itself. An exemplariy output looks like this (only first 15 lines shown): + (sequence) itself. An exemplarily output looks like this (only first 15 lines shown): 1 AAACTCGTATAGTGACACGCA 1 AAACTCGTATAGTGACACGCAACAGG diff -Nru mira-3.9.18/doc/docbook/chap_installation_part.xml mira-4.0/doc/docbook/chap_installation_part.xml --- mira-3.9.18/doc/docbook/chap_installation_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_installation_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -28,8 +28,7 @@ There you will normally find a couple of precompiled binaries -- usually - for Linux, sometimes also for Mac OSX -- or the source package for - compiling yourself. + for Linux and Mac OSX -- or the source package for compiling yourself. Precompiled binary packages are named in the following way: @@ -147,8 +146,8 @@ Prerequisites - The MIRA 3.x series works with quite old systems, the upcomming 4.x - series will need a C++11 compatible toolchain, i.e., systems starting + The MIRA 3.x series works with quite old systems, the upcoming 4.x + series will need a C++11 compatible tool chain, i.e., systems starting from the later half of 2011 should be OK. The requisites for compiling MIRA are: @@ -156,7 +155,7 @@ gcc ≥ 4.6.2, with libstdc++6. You really want to use a simple - installation package preconfigured for your system, but in case you + installation package pre-configured for your system, but in case you want or have to install gcc yourself, please refer to for more information on the GNU compiler collection. @@ -167,7 +166,7 @@ BOOST library ≥ 1.46. Lower versions might work, but untested. You would need to change the checking in the configure script for this to run through. You really want to use a simple - installation package preconfigured for your system, but in case you + installation package pre-configured for your system, but in case you want or have to install BOOST yourself, please refer to for more information on the BOOST library. @@ -207,7 +206,7 @@ - TCmalloc library ≥ 1.6. Not a prereqisite per se, but highly recommended: + TCmalloc library ≥ 1.6. Not a prerequisite per se, but highly recommended: MIRA will also work without, but memory requirements may then be a lot higher (40% and more). @@ -227,7 +226,7 @@ For building the documentation, additional - prerequisites are from the DocBook toolchain: + prerequisites are from the DocBook tool chain: @@ -263,14 +262,21 @@ mira - convert_project + miraconvert + + + mirabait + + + miramem - Should the ./configure step fail for some reason or another, you should get - a message telling you at which step this happens and and either - install missing packages or tell configure where - it should search the packages it did not find, see also next section. + Should the ./configure step fail for some reason or + another, you should get a message telling you at which step this + happens and and either install missing packages or tell + configure where it should search the packages it + did not find, see also next section. @@ -289,7 +295,7 @@ BOOST is maybe the most tricky library to get right in case it does - not come preconfigured for your system. The two main switches for + not come pre-configured for your system. The two main switches for helping to locate BOOST are probably --with-boost=[ARG] and --with-boost-libdir=LIB_DIR. Only if those @@ -317,9 +323,9 @@ to produce 32 bit executables (if possible) - As of MIRA 3.9.0, support for 32 bit plattforms is being + As of MIRA 3.9.0, support for 32 bit platforms is being slowly phased out. While MIRA should compile and also run fine - on 32 bit plattforms, I do not guarantee it anymore as I + on 32 bit platforms, I do not guarantee it anymore as I haven't used 32 bit systems in the last 5 years. @@ -439,8 +445,8 @@ linked version, use: -tar xvjf mira-3.9.1.tar.bz2 -cd mira-3.9.1 +tar xvjf mira-4.0.0.tar.bz2 +cd mira-4.0.0 ./configure make && make install @@ -479,8 +485,8 @@ linked version, use: -tar xvjf mira-3.9.1.tar.bz2 -cd mira-3.9.1 +tar xvjf mira-4.0.0.tar.bz2 +cd mira-4.0.0 ./configure make && make install @@ -518,8 +524,8 @@ linked version, use: -tar xvjf mira-3.9.1.tar.bz2 -cd mira-3.9.1 +tar xvjf mira-4.0.0.tar.bz2 +cd mira-4.0.0 ./configure make && make install @@ -667,47 +673,69 @@ Download and install a current XCode + Download and compile a current GCC (≥ 4.8.2). Do NOT use a + GCC from MacPorts, it lacks a vitally important library + (libstdc++.a) + Download, compile with GCC and install a current BOOST + library + Download, compile with GCC and install all libraries MIRA + needs (flex, etc.pp). Follow the directions given in and + + Download the MIRA source package and unpack it - Install BOOST from MacPorts. If you haven't already done so, install MacPorts - Basically, just a couple of easy steps, see - + In the unpacked MIRA directory, create a directory called + OSXstatlibs. Into this directory, you need to + softlink all needed static libraries from GCC, BOOST, flex, + etc.pp. + + E.g., I have GCC installed in + /opt/localwgcc48/ and therefore I need to use + the following to link GCC static libraries: + + +$ ln -s /opt/localwgcc48/lib/*a . + + I have all the other libraries (BOOST, flex, etc.pp) installed in + /opt/biosw/, therefore I also need to link + these libraries: + + +$ ln -s /opt/biosw/lib/*a . - Install BOOST: in a terminal, type - sudo port install boost - - - for universal builds (e.g. for distributing MIRA with - universal binaries) rather do - - -sudo port install boost +universal - - - This will take a while! It took ~1 hour on my - MacAir with a 1.86 GHz dual core processor, even without - universal. MacPros and server will be somehwat faster I suppose. - - - - Download the MIRA source package and unpack it - - - Run ./configure and make. + + Run ./configure --enable-mirastatic ... where + "..." stands for additional configure parameters needed and then + run make. + + + Oh, and then pray. + - If compiling or linking fails at first Depending on how - and where all the different packages were installed, the most useful - ./configure parameters will probably be - --enable-mirastatic, - --with-boost=... and maybe also - --with-boost-libdir=.... + As of now (Feb. 2014), if you are on OSX 10.9 (Mavericks) and are + using GCC ≤ 4.8.2, the steps described above (including the prayer) + may not be enough. If an error occurs at the linking stage very late in + the MIRA building process, you need to patch a system file as described + in - Building documentation needs the packages 'libxslt' and 'dblatex' from MacPorts. + A checkout from git needs some packages from MacPorts: + $ port install autoconf automake libtool + + + + Building documentation needs the packages 'libxslt' and 'dblatex' from MacPorts. + + $ port install dblatex libxslt + + (Feb 2014) The above may fail while installing the one or other + dependency (for me it was while installing 'urw-fonts'). If that is + the case, repeat a couple of times and normally it should work. + diff -Nru mira-3.9.18/doc/docbook/chap_intro_part.xml mira-4.0/doc/docbook/chap_intro_part.xml --- mira-3.9.18/doc/docbook/chap_intro_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_intro_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -18,14 +18,14 @@ - Introduction to MIRA3 + Introduction to MIRA What is MIRA? MIRA is a multi-pass DNA sequence data assembler/mapper for whole - genome and EST/RNASeq projects. MIRA assembles reads gained by + genome and EST/RNASeq projects. MIRA assembles/maps reads gained by @@ -35,7 +35,7 @@ - 454 pyrosequencing (GS20, FLX or Titanium) + 454 pyro-sequencing (GS20, FLX or Titanium) @@ -88,7 +88,7 @@ However, you very probably do not need to read everything. - You should read most of this introductionary chapter though: e.g., + You should read most of this introductional chapter though: e.g., @@ -103,7 +103,7 @@ - the part which showcases different features of MIRA (lots of screenshots!) + the part which showcases different features of MIRA (lots of screen shots!) @@ -114,17 +114,18 @@ After that, reading should depend on the type of data you intend to work - with: there are specific chapters for Sanger, 454, Solexa, IonTorrent - and PacBio data, all of which containing an overview on how to prepare - your data and how to launch MIRA for these data sets. There are also - complete walkthroughs which exemplarily show from start to end one way - of doing an assembly for a specific data set and what to do with the - results of the assembly. + with: there are specific chapters for assembly of de-novo, of mapping and + of EST / RNASeq projects. They all contain an overview on how to + define your data and how to launch MIRA for these data sets. There is + also chapter on how to prepare data sets from specific sequencing + technologies. - As the former named chapters are geared toward genome assemblies, there - is also a chapter going into details on how to use MIRA for EST / RNASeq - assemblies. Read that if you're into this kind of data. + The chapter on working with results of MIRA should again be of general + interest to everyone. It describes the structure of output directories + and files and gives first pointers on what to find where. Also, + converting results into different formats -- with and without filtering + for specific needs -- is covered there. As the previously cited chapters are more introductory in their nature, @@ -137,24 +138,27 @@ be found in the reference chapter. - The chapter on working with results of MIRA should again be of general interest to everyone. It - describes the structure of output directories and files and gives first pointers on what to - find where. Also, converting results into different formats -- with and without filtering for - specific needs -- is covered there. - - As not every assembly project is simple, there is also a chapter with - tipps on how to deal with projects which turn out to be "hard." It + tips on how to deal with projects which turn out to be "hard." It certainly helps if you at least skim through it even if you do not expect to have problems with your data ... it contains a couple of tricks on what one can see in result files as well as in temporary and log files which are not explained elsewhere. - As from time to time some general questions on sequencing are popping up on the MIRA - talk mailing list, I have added a chapter with some general musings on what to consider when - going into sequencing projects. This should be in no way a replacement for an exhaustive talk - with a sequencing provider, but it can give a couple of hints on what to take care of. + MIRA comes with a number of additional utilities which are described in + an own chapter. While the purpose of miraconvert + should be quite clear quite quickly, the versatility of use cases for + mirabait might surprise more than one. Be sure to + check it out. + + + As from time to time some general questions on sequencing are popping up + on the MIRA talk mailing list, I have added a chapter with some general + musings on what to consider when going into sequencing projects. This + should be in no way a replacement for an exhaustive talk with a + sequencing provider, but it can give a couple of hints on what to take + care of. There is also a FAQ chapter with some of the more frequently asked questions @@ -164,6 +168,14 @@ Finally, there are also chapters covering some more technical aspects of MIRA: the MAF format and structure / content of the tmp directory have own chapters. + + Complete walkthroughs ... are lacking at the moment for MIRA 4. In the + MIRA 3 manual I had them, but so many things have changed (at all + levels: MIRA, the sequencing technologies, data repositories) that I did + not have time to update them. I probably will need quite some time to + write new ones. Feel free to send me some if you are inclined to help + fellow scientists. + @@ -386,15 +398,15 @@ </para> <note> <para> - The screenshots in this section show data from assemblies produced + The screen shots in this section show data from assemblies produced with MIRA, but the visualisation itself is done in a finishing program named <command>gap4</command>. </para> <para> - Some of the screenshots were edited for showing a special feature of - MIRA. E.g., in the screenshots with Solexa data, quite some reads were + Some of the screen shots were edited for showing a special feature of + MIRA. E.g., in the screen shots with Solexa data, quite some reads were left out of the view pane as else -- due to the amount of data -- - these screenshots would need several pages for a complete printout. + these screen shots would need several pages for a complete printout. </para> </note> <sect2 id="sect_intro_miradiscernsrepeats"> @@ -404,7 +416,7 @@ <para> MIRA is an iterative assembler (it works in several passes) and acts a bit like a child when exploring the world: it explores the assembly - space and is specifically parametrised to allow a couple of assembly + space and is specifically parameterised to allow a couple of assembly errors during the first passes. But after each pass some routines (the "parents", if you like) check the result, searching for assembly errors and deduce knowledge about specific assemblies MIRA should not @@ -478,7 +490,7 @@ <para> I'm sure you'll recognise the basic principle in figures 8 and 9. The slides from the corresponding talk also look very similar to the - screenshots above: + screen shots above: </para> <figure id="chap_intro::gcb99_replocator.png"> <title> @@ -693,7 +705,7 @@ decision as all Solexa reads at the same spot (the reads which are not highlighted) show only one "G" for the given position. While MIRA chose to believe Solexa in this case, it tagged the position anyway in - case someone choses to check these kind of things. + case someone chooses to check these kind of things. </para> <figure id="chap_intro::454sxa_stms_hybdenovo.png"> <title> @@ -736,7 +748,7 @@ </sect2> <sect2 id="sect_intro_cer_reads"> <title> - MIRA allows older finshing programs to cope with amount data in Solexa + MIRA allows older finishing programs to cope with amount data in Solexa mapping projects @@ -760,7 +772,7 @@ So, MIRA reduces the number of reads in Solexa mapping projects - without sacrificing information on coverage. The princible is pretty + without sacrificing information on coverage. The principle is pretty simple: for 100% matching reads, MIRA tracks coverage of every reference base and creates long synthetic, coverage equivalent reads (CERs) in exchange for the Solexa reads. Reads that do not match 100% @@ -783,7 +795,7 @@ equivalent reads (CERs). Note that there are less reads, but no information is lost: the coverage of each reference base is equivalent to the left side of the figure and reads with - differences to the reference are stil present. + differences to the reference are still present. @@ -862,7 +874,7 @@
    - "MCVc" tag (Missing CoVerage in Consenus, dark red stretch in figure) + "MCVc" tag (Missing CoVerage in Consensus, dark red stretch in figure) showing a genome deletion in Solexa mapping assembly. @@ -1024,7 +1036,7 @@ Pfisterer (for EdIt) - © 2001-2011 Bastien Chevreux. + © 2001-2014 Bastien Chevreux. All rights reserved. @@ -1090,13 +1102,13 @@ system to keep the spam level low. - To report bugs or ask for new features, please use the new ticketing - system at: . This ensures + To report bugs or ask for new features, please use the SourceForge + ticketing system at: . This ensures that requests do not get lost and you get the additional benefit to automatically know when a bug has been - fixed (there won't be separate emails sent, that's what bug trackers are - there for). + fixed as I will not send separate emails, that's what bug trackers are + there for. Finally, new or intermediate versions of MIRA will be announced on the diff -Nru mira-3.9.18/doc/docbook/chap_iontor_part.xml mira-4.0/doc/docbook/chap_iontor_part.xml --- mira-3.9.18/doc/docbook/chap_iontor_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_iontor_part.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,1014 +0,0 @@ - - - - - - - Bastien - Chevreux - bach@chevreux.org - - - -
    - Solomon Short (modified) - - A baby is Life's way of insisting that the universe give it another chance. - - -
    - Assembly of Ion Torrent data with MIRA3 - - - Introduction - - - MIRA can assemble Ion Torrent type data either on its own or together with - Sanger, 454 or Solexa type sequencing data (true hybrid assembly). Paired-end - sequences coming from genomic projects can also be used if you - take care to prepare your data the way MIRA needs it. - - - MIRA goes a long way to assemble sequence in the best possible way: it - uses multiple passes, learning in each pass from errors that occurred in - the previous passes. There are routines specialised in handling oddities - that occur in different sequencing technologies - - - - Ion Torrent is pretty new and I did not have as much data to analyse as - I had with Sanger, 454 or Solexa. MIRA has been configured to - automatically work well with data currently available on the market and - with data which is to be expected during the course of 2011 / 2012. - - - However, IonTorrent is - at the moment - a moving target: there are new - protocols every few months and it might be that you need to fetch the - latest MIRA version available to get the best possible assembly. - - - - - Some reading requirements - - - This guide assumes that you have basic working knowledge of Unix - systems, know the basic principles of sequencing (and sequence - assembly) and what assemblers do. - - - While there are step by step walkthroughs on how to setup your Ion - Torrent data and then perform an assembly, this guide expects you to - read at some point in time - - - - - the mira_usage introductory help file so that - you have a basic knowledge on how to set up projects in mira for - Sanger sequencing projects. - - - - - and last but not least the mira_reference - help file to look up some command line options. - - - - - - - - Characteristics of Ion Torrent data - - - What I can say at the moment is that Ion Torrent reads behave very - much like the early data from the 454 technology (454 GS20): reads are - mostly between 90 and 110 bases long, with Ion Torrent having a - showcase with reads of ~220 to 230 bases. The following figure shows - what you can get out of 100bp reads if you're lucky: - -
    - - Example for good IonTorrent data (100bp reads). Note that only a - single sequencing error - shown by blue background - can be - seen. Except this, all homopolymers of size 3 and 4 in the area - shown are good. - - - Example for good IonTorrent data (100bp reads) - - - - - - -
    - - The "if you're lucky" part in the preceding sentence is not there by - accident: having so many clean reads is more of an exception rather a - rule. On the other hand, most sequencing errors in current IonTorrent - data are unproblematic ... if it were not for indels, which is going to - be explained on the next sections. - - - - Homopolymer insertions / deletions - - - The main source of error in your data will be insertions / deletions - (indels) especially in homopolymer regions (but not only there, see - also next section). Starting with a base run of 4 to 6 bases, there - is a distinct tendency to have an increased occurence of indel - errors. - -
    - - Example for problematic IonTorrent data (100bp reads). - - - Example for problematic IonTorrent data (100bp reads) - - - - - - -
    -
    - - The above figure contains a couple of particularly nasty indel - problems. While areas 2 (C-homopolymer length 3), 5 (A-homopolymer - length 4) and 6 (T-homopolymer length 3) are not a big problem as most - of the reads got the length right, the areas 1, 3 and 4 are nasty. - - - Area 1 is an A-homopolymer of length 7 and while many reads geth that - length right (enough to tell MIRA what the true length is), it also - contains reads with a length of 6 and and others with a lengh of 8. - - - Area 2 is a "A-homopolymer" of length 2 where approximately half of the - reads get the length right, the other half not. See also the following - section. - - - Area 4 is a T-homopolymer of length 5 which also has approximately half - the reads with a wrong length of 4. - - - - Sequencing direction dependend insertions / deletions - - - In the previous section, the screenshot showing indels had an indel - at a homopolymer of 2, which is something quite curious. Upon closer - investigation, one might notice a pattern in the gap/nogap - distribution: it is almost identical to the orientation of build - direction of reads! - - - I looked for other examples of this behaviour and found quite a - number of them, the following figure shows a very clear case of that - error behaviour: - -
    - - Example for a sequencing direction dependend indel. Note how all - but one of the reads in '+' direction miss a base while all reads - built in in '-' direction have the correct number of bases. - - - Example for a sequencing direction dependend indel - - - - - - -
    - - This is quite astonishing: the problem occurs at a site without real - homopolymer (calling a 2-bases run a 'homopolymer' starts stretching - the definition a bit) and there are no major problematic homopolymer - sites near. In fact, this was more or less the case for all sites I - had a look at. - - - Neither did the cases which were investigated show common base - patterns, so unlike the Solexa GGCxG motif it does not look like - that error of IonTorrent is bound to a particular motif. - - - While I cannot prove the following statement, I somehow suspect that - there must be some kind of secondary structure forming which leads to - that kind of sequencing error. If anyone has a good explanation I'd be - happy to hear it: feel free to contact me at - bach@chevreux.org. - -
    - - - Coverage variance - - - The coverage variance with the current ~100bp reads is a bit on the - bad side for low coverage projects (10x to 15x): it varies wildly, - sometimes dropping to nearly zero, sometimes reaching approximately - double the coverage. - - - While showing the same up and down, the effect on an assembly will - be less pronounced with higher coverages (25x and more) as the - chance increases that some reads are sequenced that span a gap. The - following two figures show typical coverage plots for the - E. coli data (100bp reads, ~33x coverage) - published by Ion Torrent. - -
    - - IonTorrent coverage (1) 320kb contig - - - IonTorrent coverage (1) 320kb contig - - - - - - -
    -
    - - IonTorrent coverage (1) zoom of a 12kb stretch - - - IonTorrent coverage (1) zoom of a 12kb stretch - - - - - - -
    - - From these figures (and some other data I have) I expect that one would need a coverage of - - - - - ≤1x - - - - for rough bug identification, i.e. answering what it is. - - - - - - ~ 5x - - - - for rough pathway exploration, i.e., answering the question - which pathways are more or less present (even if one misses a - gene or two in different pathways). - - - - - - ~ 12x to 15x - - - - for gene fishing expeditions, i.e., get enough sequence to have - almost all genes of an organism somehow present, even if some - are fragmented into different contigs or contain sequencing - errors. - - - - - - ≥ 25x - - - - for assemblies which are not too bad - - - - - - ≥ 40x - - - - for assemblies which represent the best possible thing you can - get with IonTorrent nowadays. - - - - -
    - - - GC bias - - - The GC bias seems to be small to non-existent, at least I could not - immediately make a correlation between GC content and - coverage. However, the only data sets I've seen so far are for - E. coli which has a GC content of rough 50% - ... I'd like to check GC bias with a couple of other organisms - before giving a final statement. - - - - - Other sources of error - - - You will want to keep an eye on the clipping of the data in the SFF - files from IonTorrent: while it is generally good enough, some data - sets of IonTorrent show that - for some error patterns - the clipping - is too lax and strange artefacts appear. MIRA will take care of these - - or at least of those it knows - but you should be aware of this - potential problem. - - - - - Where to find further information - - - IonTorrent being pretty new, getting as much information on that technology is quite important. So here are a couple of links I found to be helpful: - - - - - There is, of course, the TorrentDev site () - at Life Technologies which will be helpful to get a couple of - questions answered. - - - Just be aware that some of the documents over there are sometimes - painting an - how should I say it diplomatically? - overly - optimistic view on the performance of the technology. On the - other hand, so do documents released by the main competitors - like 454/Roche, Illumina, PacBio etc. ... so no harm done there. - - - - - I found Nick Loman's blog Pathogens: Genes and - Genomes to be my currently most valuable source of - information on IonTorrent. While the group he works for won a - sequencer from IonTorrent, he makes that fact very clear and still - unsparingly dissects the data he gets from that machine. - - - His posts got me going in getting MIRA grok IonTorrent. - - - - - The blog of Lex Nederbragt In between lines of - code is playing in the same league: very down to earth and - he knows a bluff when he sees it ... and is not afraid to call it - (be it from IonTorrent, PacBio or 454). - - - The analysis he did on a couple of Ion data sets have saved me - quite some time. - - - - - Last, but not least, the board with IonTorrent-related-stuff - over at SeqAnswers, - the first and foremost one-stop-shop ... erm ... discussion board - for everything related to sequencing nowadays. - - - - -
    - - - Walkthrough: unpaired data - - - This walkthrough will use two data sets for E. coli - strain DH10B made available by IonTorrent and will show you the main steps you need - to perform to get assemblies going. - - - - Preparing your file system - - - Note: this is how I set up a project, feel free to implement whatever - structure suits your needs. - - -arcadia:$ mkdir dh10b -arcadia:$ cd dh10b -arcadia:dh10b$ mkdir origdata data assemblies - - Your directory should now look like this: - - -arcadia:dh10b$ ls -l -drwxr-xr-x 2 bach users 48 2011-08-12 22:43 assemblies -drwxr-xr-x 2 bach users 48 2011-08-12 22:43 data -drwxr-xr-x 2 bach users 48 2011-08-12 22:43 origdata - - Explanation of the structure: - - - - - the origdata directory will contain the 'raw' - result files that one might get from sequencing. In our case it - will be the ZIP files from the IonTorrent site. - - - - - the data directory will contain the - preprocessed sequences for the assembly, ready to be used by MIRA - - - - - the assemblies directory will contain - assemblies we make with our data (we might want to make more than - one). - - - - - - - Getting the data for this walkthrough - - - The data sets in question are - - - - - E. coli DH10B, PGM run B13-328 - which you can download from - (download the SFF). This data set, subsequently nicknamed B13, - contains data from the 316 chip with reads of an average size of - ~100bp. - - - - - E. coli DH10B, PGM run B14-387 - which you can download from . This - data set, subsequently nicknamed B14, contains data from the 314 - chip which IonTorrent uses to show off the "longer reads" capability - of its sequencer. "Longer" meaning in this case an average of ~220 - bp, which is not bad at all. - - - - - Save the two ZIP files into the origdata directory should now look like this: - - -arcadia:dh10b$ ls -l origdata --rw-r--r-- 1 bach bach 824002890 2011-08-15 21:43 B13_328.sff.zip --rw-r--r-- 1 bach bach 327926296 2011-08-14 20:32 B14_387_CR_0.05.sff.zip - - Our data is still in ZIP files, let's get them out and put them into the - data directory: - - -arcadia:dh10b$ cd data -arcadia:data$ unzip ../origdata/B13_328.sff.zip -Archive: ../origdata/B13_328.sff.zip - inflating: B13_328.sff - creating: __MACOSX/ - inflating: __MACOSX/._B13_328.sff -arcadia:data$ unzip ../origdata/B14_387_CR_0.05.sff.zip -Archive: ../origdata/B14_387_CR_0.05.sff.zip - inflating: R_2011_07_19_20_05_38_user_B14-387-r121336-314_pool30-ms_B14-387_cafie_0.05.sff -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 1721658336 2011-06-17 01:29 B13_328.sff -drwxrwxr-x 2 bach bach 4096 2011-06-21 16:16 __MACOSX --rw-rw-r-- 1 bach bach 688207032 2011-07-28 23:31 R_2011_07_19_20_05_38_user_B14-387-r121336-314_pool30-ms_B14-387_cafie_0.05.sff - - Oooops, quite some chaos ... IonTorrent included some unnecessary - things (the __MACOSX directory) and gave their - data files wildly different names. Let's clean up a bit here: - - -arcadia:data$ rm -rf __MACOSX -arcadia:data$ mv B13_328.sff B13.sff -arcadia:data$ mv R_2011_07_19_20_05_38_user_B14-387-r121336-314_pool30-ms_B14-387_cafie_0.05.sff B14.sff -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 1721658336 2011-06-17 01:29 B13.sff --rw-rw-r-- 1 bach bach 688207032 2011-07-28 23:31 B14.sff - - There, much nicer. - - - - - Preparing the Ion Torrent data for MIRA - - - MIRA will need the base sequences, quality values attached to those - bases and - if already present - clipping points for quality clips and - sequencing adaptor clips. - - - The basic data type you will get from the sequencing instruments will - be SFF files. Those files contain almost all information - needed for an assembly, but SFFs need to be converted into more - standard files before MIRA can use this information. - - - In former times this was done using 3 files (FASTA, FASTA quality and - XML), but nowadays the FASTQ format is used almost everywhere, so we - will need only two files: FASTQ for sequence + quality and XML for - clipping information. - - - Tip - Use the sff_extract script from Jose Blanca at the - University of Valencia. The home of sff_extract is: - but I - am thankful to Jose for giving permission to distribute the script in - the MIRA 3rd party package (separate download on SourceForge). - - - The data sets B13 and B14 have short and long IonTorrent reads and we - will want to assemble them together. For the sake of clarity, I want - to name the file with a prefix: dh10b_b13b14. - - -arcadia:data$ sff_extract -o dh10b_b13b14 B13.sff B14.sff -Working on 'B13.sff': -Converting 'B13.sff' ... done. -Converted 1687490 reads into 1687490 sequences. -Working on 'B14.sff': -Converting 'B14.sff' ... done. -Converted 350109 reads into 350109 sequences. - - The parameters to sff_extract tell it to convert - the SFFs named B13.sff and - B14.sff into files where the names start with - dh10b_b13b14. By default, a FASTQ file and a XML - file in NCBI traceinfo will be created. - - - Do not hard clip sequences! - - People "in the know" might want to tell - sff_extract to simply dump hard-clip sequences - into the FASTQ file via the -c argument. Hard-clipped - means: the clipped sequence parts of a read are physically trimmed - away, never to be seen again. - - - This is D - I S C O U R A G E D ! - - - Reason: unlike 454, IonTorrent actually uses actively the SFF - feature to set different clipping points for quality and adaptor - clips. This is useful information for MIRA. Furthermore, some of the - quality control algorithms of MIRA use also the clipped part of a - read to improve assembly quality with measurable effect. If a hard - clip was performed on the sequences, these algorithms are not as - effective anymore. - - - - The XML TRACEINFO file - - For the die hards out there who really do not want the XML TRACEINFO - files: if MIRA gets only the sequence, it will use the usual - 454/Roche convention to treat left and right lower case part of - sequences as clipped and retain the uppercase middle part of a - sequence. sff_extract adheres to this convention, - and while the resulting assemblies are not quite as good as with the - TRACEINFO XML, they're still better than with hard clipped - sequences. - - - - The conversion can take some time, the ~2 million IonTorrent reads - from this example need approximately 2.5 minutes for conversion. Go - grab a coffee, or tea, or whatever. - - - Welcome back. Your directory should now look something like this: - - -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 771462745 2011-08-19 22:24 dh10b_b13b14.fastq --rw-r--r-- 1 bach bach 441331004 2011-08-19 22:24 dh10b_b13b14.xml --rw-r--r-- 1 bach bach 1721658336 2011-06-17 01:29 B13.sff --rw-rw-r-- 1 bach bach 688207032 2011-07-28 23:31 B14.sff - - Cool. Last step: we do not need the SFF files here anymore (we still - have them as ZIP in the origdata folder), let's - get rid of them: - - -arcadia:data$ rm *sff -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 771462745 2011-08-19 22:24 dh10b_b13b14.fastq --rw-r--r-- 1 bach bach 441331004 2011-08-19 22:24 dh10b_b13b14.xml - - - - Writing a manifest configuration file - - - Good, we're almost there. Let's switch to the - assemblies directory and create a subdirectory for our - first assembly test. - - -arcadia:data$ cd ../assemblies/ -arcadia:assemblies$ mkdir 1sttest -arcadia:assemblies$ cd 1sttest - - This directory is quite empty and the IonTorrent data is not - present. And it does not need to be as we'll tell MIRA in the manifest - configuration file where to find the data and what to do with it. - - -# A manifest file can contain comment lines, these start with the #-character - -# First part of a manifest: defining some basic things - -# In this example, we just give a name to the assembly -# and tell MIRA it should assemble a genome de-novo in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = dh10b -job = genome,denovo,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups", for more information -# please consult the MIRA manual, chapter "Reference" - -readgroup = SomeUnpairedIonTorrentReadsIGotFromTheLab -technology = iontor -data = ../../data/dh10b* - -# note the wildcard "dh10b*" part in the 'data' line above: -# if you followed the walkthrough and have the FASTQ and XML file, -# this will automatically load both files (which is what we want) - - Save the above lines into a file, we'll use manifest.conf in this example. - - -arcadia:/path/to/myProject$ ls -l --rw-r--r-- 1 bach users 756 2011-11-05 17:57 manifest.conf - - - - Starting the assembly - - - Starting the assembly is now just a matter of one line: - - -arcadia:1sttest$ mira manifest.conf >&log_assembly.txt - - Now, that was easy, wasn't it? In the above example - for assemblies - having only Ion Torrent data and if you followed the walkthrough on - how to prepare the data - everything you might want to adapt in the - first time are the following entries in the manifest file: - - - - - --project (for naming your assembly project) - - - - - --job (perhaps to change the quality of the assembly to 'draft' - - - - - Of course, you are free to change any option via the extended - parameters, perhaps change the default number of processors to use - from 2 to 4 via -GE:not=4 or any other of the > 150 - parameters MIRA has ... but this is covered in the MIRA main reference - manual. - - - Low coverage - - MIRA default parameters are optimised for assemblies with decent - coverages. In the case of Ion Torrent, this means an average - coverage of ≥ 20 to 25. If you are working on projects with lower - coverage, please adapt a couple of parameters for low coverage data. - - - - Do not use too high coverage - - As with every sequencing technology, you should not use too much - data as this is detrimental to assembly quality. Long story short: - non-random sequencing errors will, at high coverage, occur - frequently enough to look like valid repeat pattern, leading MIRA to - create more contigs than necessary ... some of them with the - sequencing errors looking like genuine sequence. - - - As a simple rule of thumb, coverage numbers between 50x and 80x are - OK, coverage above can (and will) lead to problems. - - - - - - - Walkthrough: paired data - - - - Getting the data - - - This walkthrough will use three data sets to assemble - E.coli MG1655: one shotgun/fragment set and two - paired-end data sets with different template sizes. Life has put the - full data sets for download, but as using the full sets for a bacteria - is absolute overkill (and also detrimental to assembly quality), they - were also kind enough to prepare subsampled data sets which we will use. - - - You will find all files at - - - - - Set with single fragments (unpaired data), downsampled to 40x - coverage: C11-127_40X.sff.zip - This data set, subsequently nicknamed C11, contains data from the - 316 chip with reads of an average usable size of ~200bp. - - - - - Set with paired data from a long paired-end library with an average - size of 3.5kb, downsampled to 20x coverage: FRA-257_20X.sff.zip - This data set, subsequently nicknamed FRA-257, contains data from the - 316 chip with reads of an average usable size of ~xxxxxxxbp. - - - - - Set with paired data from a long paired-end library with an average - size of 8.9kb, downsampled to 20x coverage: C28-140_20X.sff.zip - This data set, subsequently nicknamed C28, contains data from the - 316 chip with reads of an average usable size of ~xxxxxxxbp. - - - - - File with the linker sequences used for the paired-end sequencing. This will be needed by sff_extract: LMP_Linkers.fasta.gz - - - - - Save all files into the origdata directory should now look like this: - - arcadia:origdata$ ls -l --r--r--r-- 1 bach bach 1826508536 Jun 14 00:04 C11-127_40X.sff.zip --r--r--r-- 1 bach bach 681739117 Jun 14 00:05 C28-140_20X.sff.zip --r--r--r-- 1 bach bach 537186774 Jun 14 00:06 FRA-257_20X.sff.zip --r--r--r-- 1 bach bach 91 Mar 7 20:05 LMP_Linkers.fasta.gz - - Quickly unpack the tiny linkers file: - - -arcadia:origdata$ gunzip LMP_Linkers.fasta.gz -arcadia:origdata$ ls -l --r--r--r-- 1 bach bach 1826508536 Jun 14 00:04 C11-127_40X.sff.zip --r--r--r-- 1 bach bach 681739117 Jun 14 00:05 C28-140_20X.sff.zip --r--r--r-- 1 bach bach 537186774 Jun 14 00:06 FRA-257_20X.sff.zip --r--r--r-- 1 bach bach 89 Mar 7 20:05 LMP_Linkers.fasta - - - - Preparing the Ion Torrent data for MIRA - - - We will unzip all three sets with unzip and then - extract with sff_extract into different data files, - for the paired-end sets we will ask sff_extract to - split the paired sequences in the SFF into single, but paired reads: - - - Unzip the data: - - arcadia:origdata$ cd ../data -arcadia:data$ cd ../data -arcadia:data$ unzip '../origdata/*zip' -Archive: ../origdata/C11-127_40X.sff.zip - inflating: C11-127_40X.sff - -Archive: ../origdata/C28-140_20X.sff.zip - inflating: C28-140_20X.sff - -Archive: ../origdata/FRA-257_20X.sff.zip - inflating: FRA-257_20X.sff - -3 archives were successfully processed. -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 3617626646 Feb 10 00:32 C11-127_40X.sff --rw-rw-r-- 1 bach bach 1320383792 Dec 21 18:21 C28-140_20X.sff --rw-rw-r-- 1 bach bach 1159612116 Dec 16 20:48 FRA-257_20X.sff - - Extract unpaired reads (will take ~2.5 minutes): - - arcadia:data$ sff_extract C11-127_40X.sff -Working on 'C11-127_40X.sff': -Converting 'C11-127_40X.sff' ... date - done. -Converted 1111060 reads into 1111060 sequences. - - Extract 3.5kb paired reads (will take ~8 minutes): - - arcadia:data$ sff_extract C28-140_20X.sff -Testing whether SSAHA2 is installed and can be launched ... ok. -Working on 'C28-140_20X.sff': -Creating temporary sequences from reads in 'C28-140_20X.sff' ... done. -Searching linker sequences with SSAHA2 (this may take a while) ... ok. -Parsing SSAHA2 result file ... done. -Converting 'C28-140_20X.sff' ... done. -Converted 792280 reads into 1567302 sequences. - - Extract 8.9kb paired reads (will take ~6.5 minutes): - - arcadia:data$ sff_extract C28-140_20X.sff -Testing whether SSAHA2 is installed and can be launched ... ok. -Working on 'FRA-257_20X.sff': -Creating temporary sequences from reads in 'FRA-257_20X.sff' ... done. -Searching linker sequences with SSAHA2 (this may take a while) ... ok. -Parsing SSAHA2 result file ... done. -Converting 'FRA-257_20X.sff' ... done. -Converted 618621 reads into 1224056 sequences. - - Remove SFF files which are not needed anymore: - - arcadia:data$ rm *.sff -arcadia:data$ ls -l --rw-rw-r-- 1 bach bach 1000477444 Jun 14 00:35 C11-127_40X.fastq --rw-rw-r-- 1 bach bach 246427864 Jun 14 00:35 C11-127_40X.xml --rw-rw-r-- 1 bach bach 355981807 Jun 14 00:44 C28-140_20X.fastq --rw-rw-r-- 1 bach bach 354995399 Jun 14 00:44 C28-140_20X.xml --rw-rw-r-- 1 bach bach 300577380 Jun 14 00:51 FRA-257_20X.fastq --rw-rw-r-- 1 bach bach 281069580 Jun 14 00:51 FRA-257_20X.xml - - We're done here. - - - - - Writing a manifest configuration file - - - Switch to the assemblies directory and create a - subdirectory for our first assembly test. - - -arcadia:data$ cd ../assemblies/ -arcadia:assemblies$ mkdir 1sttest -arcadia:assemblies$ cd 1sttest - - The manifest file itself should be pretty much self-explanatory, - except perhaps the segment placement line, please look that up in the - MIRA reference manual. - - project = mg1655 -job = genome,denovo,accurate -parameters = -GE:not=4 - -readgroup = TheShotgunReads -technology = iontor -data = ../../data/C11-127_40X.* - -readgroup = ThePE3.5kbLib -technology = iontor -data = ../../data/FRA-257_20X.* -templatesize = 2600 4400 -segmentplacement = samedir backward - -readgroup = ThePE8.9kbLib -technology = iontor -data = ../../data/C28-140_20X.* -templatesize = 7800 10300 -segmentplacement = samedir backward - -# note the wildcard "*" in the 'data' lines above: -# if you followed the walkthrough and have the FASTQ and XML files, -# this will automatically load both files for each data set -# (which is what we want) - - Save the above lines into a file, we'll use manifest.conf in this example. - - -arcadia:/path/to/myProject$ ls -l --rw-r--r-- 1 bach users 756 2011-11-05 17:57 manifest.conf - - - - Starting the assembly - - - Starting the assembly is now just a matter of one line: - - -arcadia:1sttest$ mira manifest.conf >&log_assembly.txt - - - - - What to do with the MIRA result files? - - - Please consult the corresponding section in the - mira usage document, it - contains much more information than this stub. - - - But basically, after the assembly has finished, you will find four - directories. The tmp directory can be deleted - without remorse as it contains logs and some tremendous amount of - temporary data (dozens of gigabytes for bigger - projects). The info directory has some text files - with basic statistics and other informative files. Start by having a - look at the *_info_assembly.txt, it'll give you a - first idea on how the assembly went. - - - The results directory finally contains the assembly - files in different formats, ready to be used for further processing with - other tools. - - - If you used the uniform read distribution option, you will inevitably - need to filter your results as this option produces larger and better - alignments, but also more "debris contigs". For this, use the - convert_project which is distributed together with the MIRA package. - - - Also very important when analysing Ion Torrent assemblies: screen the - small contigs ( < 1000 bases) for abnormal behaviour. You wouldn't be - the first to have some human DNA contamination in a bacterial - sequencing. Or some herpes virus sequence in a bacterial project. Or - some bacterial DNA in a human data set. Or ... - - - Look whether these small contigs - - - - - have a different GC content than the large contigs - - - - - whether a BLAST of these sequences against some selected databases - brings up hits in other organisms that you certainly were not - sequencing. - - - - -
    diff -Nru mira-3.9.18/doc/docbook/chap_logfiles_part.xml mira-4.0/doc/docbook/chap_logfiles_part.xml --- mira-3.9.18/doc/docbook/chap_logfiles_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_logfiles_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -17,7 +17,7 @@
    - Log and temporary files used by MIRA 3 + Log and temporary files used by MIRA @@ -107,7 +107,7 @@ <para> After the initial all-against-all search (SKIM3), this file tells you to how many other reads each read has overlaps. Furthermore, reads that have more - overlaps than expected are tagged with ``mc'' (multycopy). + overlaps than expected are tagged with ``mc'' (multicopy). </para> </sect2> <sect2 id="sect2_logf_mira_int_posmatch_rawhashhits_passxlst"> @@ -218,4 +218,3 @@ </sect2> </sect1> </chapter> - diff -Nru mira-3.9.18/doc/docbook/chap_maf_part.xml mira-4.0/doc/docbook/chap_maf_part.xml --- mira-3.9.18/doc/docbook/chap_maf_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_maf_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -20,7 +20,11 @@ <title>The MAF format - This documents describes purpose and format of the MAF format, version 1. + This documents describes purpose and format of the MAF format, version + 1. Which has been superceeded by version 2 but is not described here + (yet). But as v1 and v2 are very similar only the notion of readgroups is + a big change, I'll let this description live until I have time to update + this section. @@ -77,7 +81,7 @@ This describes version 1 of the MAF format. If the need arises, enhancements - like metadata about total number of contigs and reads will be implemented in the + like meta-data about total number of contigs and reads will be implemented in the next version. @@ -229,7 +233,7 @@ - DI character: F or R + DI character: F or R Direction of the read with respect to the template. F for forward, R for reverse. @@ -237,18 +241,18 @@ - TF integer: template size from + TF integer: template size from - Minimum estimated + Minimum estimated size of a sequencing template. In paired-end sequencing, this is the minimum distance of the read pair. - TT integer: template size to + TT integer: template size to - Maximum estimated + Maximum estimated size of a sequencing template. In paired-end sequencing, this is the maximum distance of the read pair. @@ -263,9 +267,9 @@ - SL integer: seqvec left + SL integer: seqvec left - + Clip left due to sequencing vector. Assumed to be 1 if not present. Note that left clip values are excluding, e.g.: a value of '7' clips off the left 6 bases. @@ -273,9 +277,9 @@ - QL integer: qual left + QL integer: qual left - + Clip left due to low quality. Assumed to be 1 if not present. Note that left clip values are excluding, e.g.: a value off '7' clips of the left 6 bases. @@ -283,7 +287,7 @@ - CL integer: clip left + CL integer: clip left Clip left (any reason). Assumed to be 1 if not present. Note @@ -293,7 +297,7 @@ - SR integer: seqvec right + SR integer: seqvec right Clip right due to sequencing vector. Assumed to be the length of the sequence if not present. Note that @@ -303,7 +307,7 @@ - QR integer: qual right + QR integer: qual right Clip right due to low quality. Assumed to be the length of the sequence if not present. Note that right clip values @@ -313,7 +317,7 @@ - CR integer: clip right + CR integer: clip right Clip right (any reason). Assumed to be the length of the sequence if not present. Note that @@ -323,7 +327,7 @@ - AO four integers: x1 y1 x2 y2 + AO four integers: x1 y1 x2 y2 AO stands for "Align to Original". The interval [x1 y1] in the read as stored in the MAF file aligns @@ -368,7 +372,7 @@ - SN string: strain name + SN string: strain name Strain name of the sample that was sequenced, this is a free form string. @@ -376,7 +380,7 @@ - MT string: machine type + MT string: machine type Machine type which generated the data, this is a free form string. @@ -384,7 +388,7 @@ - BC string: base caller + BC string: base caller Base calling program used to call bases @@ -392,7 +396,7 @@ - IB boolean (0 or 1): is backbone + IB boolean (0 or 1): is backbone Whether the read is a backbone. Reads used as reference (backbones) in mapping assemblies get this attribute. @@ -572,7 +576,7 @@ so that parsers do not need to perform time consuming string lookups. Every read in a contig has exactly one AT line. - The interval + The interval [x2 y2] of the read (i.e., the unclipped data, also called the 'clear range') aligns with the interval [x1 y1] of the contig. If x1 > y1 (the contig positions), then the reverse complement of the read is aligned to the @@ -588,7 +592,7 @@ - EC + EC This ends a contig and is mandatory @@ -598,4 +602,3 @@ - diff -Nru mira-3.9.18/doc/docbook/chap_mapping_part.xml mira-4.0/doc/docbook/chap_mapping_part.xml --- mira-3.9.18/doc/docbook/chap_mapping_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/chap_mapping_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,776 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + You have to know what you're looking for before you can find it. + +
    + Mapping assemblies + + + Introduction + + + This guide assumes that you have basic working knowledge of Unix systems, know + the basic principles of sequencing (and sequence assembly) and what assemblers + do. + + + While there are step by step instructions on how to setup your data and + then perform an assembly, this guide expects you to read at some point in time + + + + + Before the mapping, to know what to do (or not to + do) with the sequencing data before giving it to MIRA. + + + + + Generally, the to know what to do with the + results of the assembly. More specifically, + + + + + And also to look up how manifest files should be + written ( and and ), some command line options as well as general information on + what tags MIRA uses in assemblies, files it generates etc.pp + + + + + Last but not least, you may be interested in some observations about + the different sequencing technologies and the traps they may + contain, see for that. For advice on what to pay + attention to before going into a sequencing + project, have a look at . + + + + + + + General steps + + + This part will introduce you step by step how to get your data together for a + simple mapping assembly. + + + I'll make up an example using an imaginary bacterium: Bacillus chocorafoliensis (or short: Bchoc). + + + In this example, we assume you have two strains: a wild type strain of + Bchoc_wt and a mutant which you perhaps got from mutagenesis or other + means. Let's imagine that this mutant needs more time to eliminate a given + amount of chocolate, so we call the mutant Bchoc_se ... SE for + slow eater + + + You wanted to know which mutations might be responsible for the observed + behaviour. Assume the genome of Bchoc_wt is available to you as it was + published (or you previously sequenced it), so you resequenced Bchoc_se + with Solexa to examine mutations. + + + + Copying and naming the sequence data + + + You need to create (or get from your sequencing provider) the sequencing data + in either FASTQ or FASTA + FASTA quality format. The following walkthrough + uses what most people nowadays get: FASTQ. + + + Create a new project directory (e.g. myProject) and a subdirectory of this which will hold the sequencing data (e.g. data). + + arcadia:/path/to mkdir myProject +arcadia:/path/to cd myProject +arcadia:/path/to/myProject$ mkdir data + + Put the FASTQ data into that data directory so that it now looks perhaps like this: + + arcadia:/path/to/myProject$ ls -l data +-rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocse_lane6.solexa.fastq +-rw-r--r-- 1 bach users 264823645 2008-03-28 21:51 bchocse_lane7.solexa.fastq + + + I completely made up the file names above. You can name them anyway you + want. And you can have them live anywhere on the hard disk, you do not + need to put them in this data directory. It's just + the way I do it ... and it's where the example manifest files a bit further down + in this chapter will look for the data files. + + + + Copying and naming the reference sequence + + + The reference sequence (the backbone) can be in a number of different + formats: GFF3, GenBank, MAF, CAF, FASTA. The first three have the advantage + of being able to carry additional information like, e.g., + annotation. In this example, we will use a GFF3 file like the ones + one can download from the NCBI. + + + TODO: Write why GFF3 is better and where to get them at the NCBI. + + + So, let's assume that our wild type + strain is in the following file: + NC_someNCBInumber.gff3. + + + You do not need to copy the reference sequence to your directory, but + I normally copy also the reference file into the directory with my + data as I want to have, at the end of my work, a nice little + self-sufficient directory which I can archive away and still be sure + that in 10 years time I have all data I need together. + + arcadia:/path/to/myProject$ cp /somewhere/NC_someNCBInumber.gff3 data +arcadia:/path/to/myProject$ ls -l data +-rw-r--r-- 1 bach users 6543511 2008-04-08 23:53 NC_someNCBInumber.gff3 +-rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocse_lane6.solexa.fastq +-rw-r--r-- 1 bach users 264823645 2008-03-28 21:51 bchocse_lane7.solexa.fastq + + We're almost finished with the setup. As I like to have things neatly separated, I always create a directory called assemblies which will hold my assemblies (or different trials) together. Let's quickly do that: + + arcadia:/path/to/myProject$ mkdir assemblies +arcadia:/path/to/myProject$ mkdir assemblies/1sttrial +arcadia:/path/to/myProject$ cd assemblies/1sttrial + + + + Writing a simple manifest file + + + A manifest file is a configuration file for MIRA which tells it what + type of assembly it should do and which data it should load. In this + case we have unpaired sequencing data which we want to map to a + reference sequence, the manifest file for that is pretty simple: + + # Example for a manifest describing a mapping assembly with +# unpaired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,mapping,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gff3 +strain = bchoc_wt + +# now the Illumina data + +readgroup = SomeUnpairedIlluminaReadsIGotFromTheLab +data = ../../data/*fastq +technology = solexa +strain = bchoc_se + + + Please look up the parameters of the manifest file in the main + manual or the example manifest files in the following section. + + + The ones above basically say: make an accurate mapping of Solexa + reads against a genome; in one pass; the name of the backbone strain + is 'bchoc_wt'; the data with the backbone sequence (and maybe + annotations) is in a specified GFF3 file; for Solexa data: assign + default strain names for reads which have not loaded ancillary data + with strain info and that default strain name should be 'bchoc_se'. + + + + + Starting the assembly + + Starting the assembly is now just a matter of a simple command line: + + arcadia:/path/to/myProject/assemblies/1sttrial$ mira manifest.conf >&log_assembly.txt + + For this example - if you followed the walk-through on how to prepare the data + - everything you might want to adapt in the first time are the following thing in the manifest file: + options: + + + + + project= (for naming your assembly project) + + + + + strain_name= to give the names of your reference and mapping strain + + + + + Of course, you are free to change any option via the extended parameters, but + this is the topic of another part of this manual. + + + + + + Manifest files for different use cases + + + This section will introduce you to manifest files for different use + cases. It should cover the most important uses, but as always you are + free to mix and match the parameters and readgroup definitions to suit + your specific needs. + + + Taking into account that there may be a lot of + combinations of sequencing technologies, sequencing libraries (shotgun, + paired-end, mate-pair, etc.) and input file types (FASTQ, FASTA, + GenBank, GFF3, etc.pp), the example manifest files just use Illumina and + 454 as technologies, GFF3 as input file type for the reference sequence, + FASTQ as input type for sequencing data ... and they do not show the + multitude of more advanced features like, e.g., using ancillary clipping + information in XML files, ancillary masking information in SSAHA2 or + SMALT files etc.pp. + + + I'm sure you will be able to find your way by scanning through the + corresponding section on manifest files in the reference chapter :-) + + + + Mapping with shotgun data + + + Well, we've seen that already in the section above, but here it is + again ... this time with Ion Torrent data though. + + # Example for a manifest describing a mapping assembly with +# unpaired Ion data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,mapping,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gff3 +strain = bchoc_wt + +# now the Ion Torrent data + +readgroup = SomeUnpairedIonReadsIGotFromTheLab +data = ../../data/someiondata.fastq +technology = iontor +strain = bchoc_se + + + + Manifest for data sets with paired reads + + + + + When using paired-end data in mapping, you must decide whether you want + + + + + use the MIRA feature to create long 'coverage equivalent reads' + (CERs) which saves a lot of memory (both in the assembler and + later on in an assembly editor). However, you then + loose information about read pairs! + + + + + or whether you want to keep information about read + pairs at the expense of larger memory requirements both + in MIRA and in assembly finishing tools or viewers afterwards. + + + + + or a mix of the two above + + + + + The Illumina pipeline generally normally gives you two files for paired-end + data: a project-1.fastq and + project-2.fastq. The first file containing the + first read of a read-pair, the second file the second read. Depending + on the preprocessing pipeline of your sequencing provider, the names + of the reads are either the very same in both files or already have + a /1 or /2 appended. Also, your + sequencing provider may give you one big file where the reads from + both ends are present. + + + + MIRA can read all FASTQ variants produced by various Illumina + pipelines, be they with or without the /1 and /2 already appended to + the names. You generally do not need to do any name mangling before + feeding the data to MIRA. However, MIRA will shell out a warning if read names are longer than 40 characters. + + + + + When using paired-end data, you should know + + + + + the orientation of the reads toward each other. This is specific + to sequencing technologies and / or the sequencing library preparation. + + + + + at which distance these reads should be. This is specific to the + sequencing library preparation and the sequencing lab should tell + you this. + + + + + In case you do not know one (or any) of the above, don't panic! MIRA + is able to estimate the needed values during the assembly if you tell + it to. + + + The following manifest shows you the most laziest way to define a + paired data set by simply adding autopairing as keyword to a + readgroup (using Illumina just as example): + + # Example for a lazy manifest describing a denovo assembly with +# one library of paired reads + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,mapping,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gff3 +technology = text +strain = bchoc_wt + +# now the Illumina paired-end data + +readgroup = DataIlluminaPairedLib +autopairing +data = ../../data/project_1.fastq ../../data/project_2.fastq +technology = solexa +strain = bchoc_se1 + + + See? Wasn't hard and it did not hurt, did it? One just needs to tell + MIRA it should expect paired reads via + the autopairing keyword and that is everything you + need. + + + If you know the orientation of the reads and/or the library size, you + can tell this MIRA the following way (just showing the readgroup + definition here): + + readgroup = DataIlluminaPairedEnd500Lib +data = ../../data/project_1.fastq ../../data/project_2.fastq +technology = solexa +template_size = 250 750 +segment_placement = ---> <--- + + In cases you are not 100% sure about, e.g., the size of the DNA + template, you can also give a (generous) expected range and then tell + MIRA to automatically refine this range during the assembly based on + real, observed distances of read pairs. Do this with autorefine + modifier like this: + + template_size = 50 1000 autorefine + + The following manifest file is an example for mapping a 500 bp + paired-end and a 3kb mate-pair library of a strain + called bchoc_se1 against a GenBank reference + file containing a strain called bchoc_wt: + + # Example for a manifest describing a mapping assembly with +# paired Illumina data, not merging reads and therefore keeping +# all pair information + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode +# As special parameter, we want to switch off merging of Solexa reads + +project = MyFirstAssembly +job = genome,mapping,accurate +parameters = SOLEXA_SETTINGS -CO:msr=no + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gff3 +technology = text +strain = bchoc_wt + +# now the Illumina data + +readgroup = DataForPairedEnd500bpLib +autopairing +data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq +technology = solexa +strain = bchoc_se1 + +readgroup = DataForMatePair3kbLib +data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 2000 4000 autorefine +segment_placement = <--- ---> + + Please look up the parameters used in the main manual. The ones + above basically say: make an accurate mapping of Solexa reads + against a genome. Additionally do not merge short short Solexa + reads to the contig. + + + For the paired-end library, be lazy and let MIRA find out everything + it needs. However, that information should be treated as + "information only" by MIRA, i.e., it is not used for deciding whether + a pair is well mapped. + + + For the mate-pair library, assume a DNA template template size of + 2000 to 4000 bp (but let MIRA automatically refine this using observed + distances) and the segment orientation of the read pairs follows + the reverse / forward scheme. That information should be treated as + "information only" by MIRA, i.e., it is not used for deciding whether + a pair is well mapped. + + + Comparing this manifest with a manifest for unpaired-data, two + parameters were added in the section for Solexa data: + + + + + -CO:msr=no tells MIRA not to merge reads that + are 100% identical to the backbone. This also allows to keep the + template information (distance and orientation) for the reads. + + + + + template_size tells MIRA at which distance the + two reads should normally be placed from each other. + + + + + segment_placement tells MIRA how the different + segments (reads) of a DNA template have to be ordered to form a + valid representation of the sequenced DNA. + + + + + + Note that in mapping assemblies, these + template_distance and + segment_placement parameters are normally treated + as information only, i.e., MIRA will map the + reads regardless whether the distance and orientation criterions are + met or not. This enables post-mapping analysis programs to hunt for + genome rearrangements or larger insertions/deletion. + + + + + If template size and segment placement checking were on, the + following would happen at, e.g. sites of re-arrangement: MIRA would + map the first read of a read-pair without problem. However, it would + very probably reject the second read because it would not map at the + specified distance or orientation from its partner. Therefore, in + mapping assemblies with paired-end data, checking of the template + size must be switched off to give post-processing programs a chance + to spot re-arrangements. + + + + + + Mapping with multiple sequencing technologies (hybrid mapping) + + + I'm sure you'll have picked up the general scheme of manifest files by + now. Hybrid mapping assemblies follow the general scheme: simply add + as separate readgroup the information MIRA needs to know to find the + data and off you go. Just for laughs, here's a manifest for 454 + shotgun with Illumina paired-end + + # Example for a manifest describing a mapping assembly with +# shotgun 454 and paired-end Illumina data, not merging reads and therefore keeping +# all pair information + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode +# As special parameter, we want to switch off merging of Solexa reads + +project = MyFirstAssembly +job = genome,mapping,accurate +parameters = SOLEXA_SETTINGS -CO:msr=no + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gff3 +strain = bchoc_wt + +# now the shotgun 454 data +readgroup = DataForShotgun454 +data = ../../data/project454data.fastq +technology = 454 +strain = bchoc_se1 + +# now the paired-end Illumina data + +readgroup = DataForPairedEnd500bpLib +data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq +technology = solexa +strain = bchoc_se1 +template_size = 250 750 +segment_placement = ---> <--- + + + + Mapping with multiple strains + + + MIRA will make use of ancillary information present in the manifest + file. One of these is the information to which strain (or organism or + cell line etc.pp) the generated data belongs. + + + You just need to tell in the manifest file which data comes from which + strain. Let's assume that in the example from above, the "lane6" data + were from a first mutant named bchoc_se1 and the + "lane7" data were from a second mutant + named bchoc_se2. Here's the manifest file you + would write then: + + # Example for a manifest describing a mapping assembly with +# unpaired Illumina data + +# First part: defining some basic things +# In this example, we just give a name to the assembly +# and tell MIRA it should map a genome in accurate mode + +project = MyFirstAssembly +job = genome,mapping,accurate + +# The second part defines the sequencing data MIRA should load and assemble +# The data is logically divided into "readgroups" + +# first, the reference sequence +readgroup +is_reference +data = ../../data/NC_someNCBInumber.gff3 +technology = text +strain = bchoc_wt + +# now the Illumina data + +readgroup = DataForSE1 +data = ../../data/bchocse_lane6.solexa.fastq +technology = solexa +strain = bchoc_se1 + +readgroup = DataForSE2 +data = ../../data/bchocse_lane7.solexa.fastq +technology = solexa +strain = bchoc_se2 + + While mapping (or even assembling de-novo) with multiple strains is + possible, the interpretation of results may become a bit daunting in + some cases. For many scenarios it might therefore be preferable to + successively use the data sets in own mappings or assemblies. + + + This strain information for each readgroup is really the only change you need to perform to tell MIRA everything it needs for handling strains. + + + + + + Walkthroughs + + + + Walkthrough: mapping of E.coli from Lenski lab against E.coli B REL606 + + + TODO: Sorry, needs to be re-written for the relatively new SRR format + distributed at the NCBI ... and changes in MIRA 3.9.x. Please come + back later. + + + + + + Useful things to know about reference sequences + + + There are a few things to consider when using reference sequences: + + + + + MIRA is not really made to handle a big amount of reference + sequences as they currently need inane amounts of memory. Use other + programs for mapping against more than, say, 200 megabases. + + + + + Reference sequences can be as long as needed! They are not subject + to normal read length constraints of a maximum of 32k bases. That + is, if one wants to load one or several entire chromosomes of a + bacterium or lower eukaryote as backbone sequence(s), this is just + fine. + + + + + Reference sequences can be single sequences like provided in, e.g., + FASTA, FASTQ, GFF or GenBank files. But reference sequences also can + be whole assemblies when they are provided as, e.g., MAF or CAF + format. This opens the possibility to perform semi-hybrid assemblies + by assembling first reads from one sequencing technology de-novo + (e.g. PacBio) and then map reads from another sequencing technology + (e.g. Solexa) to the whole PacBio alignment instead of mapping it to + the PacBio consensus. + + + A semi-hybrid assembly will therefore contain, like a hybrid + assembly, the reads of both sequencing technologies. + + + + + Reference sequences will not be reversed! They will always appear in + forward direction in the output of the assembly. Please note: if the + backbone sequence consists of a MAF or CAF file that contain contigs + which contain reversed reads, then the contigs themselves will be in + forward direction. But the reads they contain that are in reverse + complement direction will of course also stay reverse complement + direction. + + + + + Reference sequences will not not be assembled together! That is, + even if a reference sequence has a perfect overlap with another + reference sequence, they will still not be merged. + + + + + Reads are assembled to reference sequences in a first come, first + served scattering strategy. + + + Suppose you have two identical reference sequences and a read which + would match both, then the read would be mapped to the first + backbone. If you had two identical reads, the first read would go to + the first backbone, the second read to the second backbone. With + three identical reads, the first backbone would get two reads, the + second backbone one read. Etc.pp. + + + + + Only in references loaded from MAF or CAF files: contigs made out of + single reads (singlets) loose their status as reference sequence and + will be returned to the normal read pool for the assembly + process. That is, these sequences will be assembled to other + reference sequences or with each other. + + + + + + + Known bugs / problems + + + These are actual for version 4.0 of MIRA and might or might not have been + addressed in later version. + + + Bugs: + + + + + mapping of paired-end reads with one read being in non-repetitive + area and the other in a repeat is not as effective as it should + be. The optimal strategy to use would be to map first the + non-repetitive read and then the read in the repeat. Unfortunately, + this is not yet implemented in MIRA. + + + + +
    diff -Nru mira-3.9.18/doc/docbook/chap_mirautils_part.xml mira-4.0/doc/docbook/chap_mirautils_part.xml --- mira-3.9.18/doc/docbook/chap_mirautils_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_mirautils_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -20,13 +20,13 @@ Utilities in the MIRA package - convert_project + miraconvert Synopsis - convert_project + miraconvert options input_file output_basename @@ -36,12 +36,12 @@ Description - convert_project is a tool to convert, extract and + miraconvert is a tool to convert, extract and sometimes recalculate all kinds of data related to sequence assembly files. - More specifically, convert_project can + More specifically, miraconvert can @@ -52,7 +52,7 @@ - extract the consenus from multiple alignments in CAF and MAF format, + extract the consensus from multiple alignments in CAF and MAF format, writing it to any supported output format (FASTA, FASTQ, plain text, HTML, etc.) and -- if wished -- recalculating the consensus using the MIRA consensus engine with MIRA parameters @@ -142,7 +142,7 @@ To-type, the format of the output file. Multiple mentions of -t are allowed, in which case - convert_project will convert to multiple types. + miraconvert will convert to multiple types. @@ -195,7 +195,7 @@ Delete gap only columns. When output is contigs: delete - columns that are entirely gaps (can oocur after having deleted + columns that are entirely gaps (can occur after having deleted reads during editing in gap4, consed or other). When output is reads: delete gaps in reads. @@ -278,7 +278,7 @@ The following switches will work only if the input file contains contigs (i.e., CAF or MAF with contig data). Though infrequent, note - that both CAF and MAf can contain single reads only. + that both CAF and MAF can contain single reads only. @@ -375,7 +375,7 @@ - Split. Split outpout into single files, one file per + Split. Split output into single files, one file per contig. Files are named according to name of contig. @@ -420,7 +420,7 @@ Note: this is of course not applied to reads in contigs! Contigs passing - the -x length criterium and stored as complete + the -x length criterion and stored as complete assembly (CAF, MAF, ACE, etc.) still contain all their reads. @@ -494,14 +494,14 @@ -convert_project source.maf destination.sam +miraconvert source.maf destination.sam - Previous versions of convert_project had a slightly different + Previous versions of miraconvert had a slightly different syntax, which however is still supported: -convert_project -f maf -t sam source.caf destination +miraconvert source.maf destination.sam @@ -513,14 +513,14 @@ -convert_project source.caf destination.fasta wig ace +miraconvert source.caf destination.fasta wig ace - Previous versions of convert_project had a slightly different + Previous versions of miraconvert had a slightly different syntax, which however is still supported: -convert_project -f caf -t fasta -t wig -t ace source.caf destination +miraconvert -f caf -t fasta -t wig -t ace source.caf destination @@ -531,20 +531,20 @@ -convert_project -x 2000 -y 10 source.caf destination.caf +miraconvert -x 2000 -y 10 source.caf destination.caf - Filtering a FASTQ file for reads ≥ 55 basepairs, rename the + Filtering a FASTQ file for reads ≥ 55 base pairs, rename the selected reads with a string starting newname and save them back to FASTQ. Note how -t fastq was left out - as the default behaviour of convert_project is + as the default behaviour of miraconvert is to use the same "to" type as the input type (-f). -convert_project -x 55 -R newname source.fastq destination.fastq +miraconvert -x 55 -R newname source.fastq destination.fastq @@ -566,7 +566,7 @@ bchoc_c3 bchoc_c5 bchoc_c13 -arcadia:/path/to/myProject$ convert_project -N contigs.lst bchoc_out.caf myfilteredresult.caf +arcadia:/path/to/myProject$ miraconvert -N contigs.lst bchoc_out.caf myfilteredresult.caf [...] arcadia:/path/to/myProject$ ls -l -rw-r--r-- 1 bach users 231698898 2007-10-21 15:16 bchoc_out.caf @@ -608,13 +608,23 @@ or reverse complement direction.
    - One can use mirabait to do targeted assembly by fishing out reads belonging to a gene and just assemble these; or to clean out rRNA sequences from data sets; or to fish out and iteratively reconstruct mitochondria from metagenomic data; or, or, or ... whenever one has to take inor take out subsets of reads, this tool should come in quite handy. + One can use mirabait to do targeted assembly by + fishing out reads belonging to a gene and just assemble these; or to + clean out rRNA sequences from data sets; or to fish out and + iteratively reconstruct mitochondria from metagenomic data; or, or, or + ... whenever one has to take in or take out subsets of reads, this + tool should come in quite handy. The search performed is exact, that is, sequences selected are - guaranteed to have the required number of k-mers equal to the bait + guaranteed to have the required number of matching k-mers to the bait sequences while sequences not selected are guaranteed not have these. + + Pairs are not taken into account when baiting. That is: if one read of + a pair matches the bait but the other read does not, then the + non-matching read still does not get written out. + Options @@ -671,6 +681,20 @@ + + + + Do not compute hash statistics from a file with sequences, but instead treat the baitfilename as file name of a valid mirabait hash statistics file and load it from disk. + + + This feature enables one to reuse baits from earlier runs without having to wait for the recomputation of hash statistics. + + + While very useful when used for large corpi of bait sequences, there are currently no fool-guards implemented. This means that the user must absolutely make sure to use the same mirabait value for 'k' both in the run which generated the hash statistics file and in the search using the pre-computed file or else results will be (horribly) wrong. + + + + diff -Nru mira-3.9.18/doc/docbook/chap_pacbio_part.xml mira-4.0/doc/docbook/chap_pacbio_part.xml --- mira-3.9.18/doc/docbook/chap_pacbio_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_pacbio_part.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,817 +0,0 @@ - - - - - - - Bastien - Chevreux - bach@chevreux.org - - - -
    - Solomon Short - - New problems demand new solutions. New solutions create new problems. - - -
    - - Assembly of Pacific Biosciences data with MIRA3 - - - MIRA 3.4.0: currently only CCS or error-corrected-CLR supported - - This is here to set the stage: at the moment, MIRA can only make use of - PacBio reads which have an error rate of roundabout 5%. This means you - will have to use either: - - - - - CCS (Circular Consensus Sequence) reads with at least 3 to 4 passes. - - - - - CLR (Continuous Long Reads) which were error corrected either with - PacBio CCS reads or some other high-quality sequencing technology - (Illumina comes to mind) - - - - - Impatients can directly jump to which - contains walkthroughs using data made publicly available by PacBio. - - - - WARNING - - When I developed the routines for PacBio, I had no access to their data - and it shows. Now that first numbers regarding their reads get published - and the first data sets available publicly, I realise a couple of - preconditions were not met. Especially the fact that raw PacBio CLR reads - seem to have an error rate between 1-in-5 (80% correct) and 1-in-7 (85% - correct) means that MIRA will probably not operate very well with - those. One should have something between 1-in-12 to 1-in-20 as error - rate (92% to 95% correct) to get MIRA working happily. - - - During the course of 2011, PacBio has made available on their DevNet site quite a number - of documents and introductory videos. A must read for everyone - interested in this sequencing technology. - - - As of MIRA 3.4.0, large parts of this documentation are still from a - time where things like terminology, sequencing specifics etc.pp were not - available publicly. It'll take same time for me to convert the guide. - - - - - Introduction - - Pacific Biosciences looks like the new kid on the block of - sequencing technologies. They seem to have, for the first time since - Sanger sequencing, something which is able to produce sequences which are - actually longer than Sanger. They also have something new: - strobed sequencing. That technique alone was reason - enough for me to see whether it could be of any use. After a couple of - modifications to the MIRA assembly engine, I think I can say that "yes, it - very well can be." - - One could feed strobed PacBio sequences to MIRA 3.0.0 and the 2.9.x - line before and get some results out of it by faking them to be Sanger, - though the results were not always pretty. - - The first version of MIRA to officially support sequences from - Pacific Biosciences is MIRA 3.2. Versions in the 3.0.1 to 3.0.5 range and - 3.1.x had different degrees of support, but were never advertised having - it. - - - Some reading requirements - - This guide assumes that you have basic working knowledge of Unix - systems, know the basic principles of sequencing (and sequence assembly) - and what assemblers do. - - While there are step by step walk-throughs on how to setup your - data for Sanger, 454 and Solexa in other MIRA guides, this guide is - (currently) a bit more terse. You are expected to read at some point in - time - - - - the mira_reference help file to look up - some command line options. - - - for hybrid assemblies of PacBio data with Sanger, 454, Solexa - the corresponding mira_usage, - mira_454 or mira_solexa - help files to look up how to prepare the different data sets. - - - - - - Probable highlights and lowlights of PacBio sequencing - data - - - Lowlights - Sequence quality, indels, maybe chimeras. - - - Highlights - Long reads, maybe strobe sequencing - - - - - Assembly of PacBio data with MIRA - - - - Preparing data - - MIRA will happily read data in several different formats (FASTA, - FASTQ, etc.). For the sake of simplicity, this guide will use FASTQ as - demonstration format, but most of the time not add the quality line. - - - Simple, unstrobed, non-paired reads - - This is actually quite simple. Just put your reads as FASTQ in a - file and you are done. No need to bother about read naming - conventions or similar things. Like so: - -@readname_001 -ACGTTGCAGGGTCATGCAGT... -@readname_002 -... - - - - Strobed reads with two strobes, simulating paired ends - - It is probably preferable to keep both parts physically separated in - different reads. In this case, read naming becomes important for an - assembler. Pick any paired-end naming scheme you want and name your - reads accordingly. The following example shows the same data as - above, split in two reads and using the Solexa naming scheme to - denote the first read of a pair by appending /1 - to the read name and the second part by - appending /2: - - -@readname_001/1 -ACGTTGCAGG -@readname_001/2 -GTCATGCAGT -@readname_002/1 -... - - - The example above used Solexa naming scheme to denote paired-end - partner reads. You can use any naming scheme you want as long as - MIRA knows it. E.g.: the forward/reverse or - Sanger or TIGR naming - schemes, you will just need to tell MIRA about it with the - segmentnaming parameter in the manifest file. - - - Also note you might want to set segmentplacement in the - manifest, as well as templatesize. - - - - Should all your reads approximately have the same total length of - first part (/1) + insert + second part (/2), then you don't need to - create an additional file with information about expected distance - between the parts, you can use the template and segment information - in the manifest to tell MIRA about it. In case you have different - sizes because, e.g. you have sequenced different libraries, then you - will need to tell MIRA which reads have which distance from each - other. You can do this in an XML file in TRACEFORMAT (as defined by - the NCBI). - - - - Strobed reads with multiple strobes - - You should split the parts separated by these long inserts into - different reads. E.g., if your strobes are 500 bases long, but - separated by dark inserts > 1Kb, split them. You are free to - split them however you like, in sub-pairs, in single strobes or - whatever. For the example given above, this could be done like this: - - -@readname_001a/1 -ACGTTGCAGG -@readname_001a/2 -GTCATGCAGT -@readname_001b/1 -TATGCACTGAC -@readname_001b/2 -TAGCTGA -@readname_002 -... - - which would then be two read-pairs: the first and second strobes are - paired, as well as the third and fourth. Here too, you can use any - combination strobes to pair to each other (or to use without pair - information). - - - Combining first and fourth strobe as well as second and fourth - would look like this: - - -@readname_001a/1 -ACGTTGCAGG -@readname_001b/1 -TAGCTGA -@readname_001b/2 -GTCATGCAGT -@readname_001a/2 -TATGCACTGAC -@readname_002 -... - - Note that in this case you probably need to provide paired-end - information in a NCBI TRACEARCHIVE XML file to tell MIRA about the - different insert sizes. - - - Finally, you can put the reads all in one template like this: - - -@readname_001.f1 -ACGTTGCAGG -@readname_001.f2 -GTCATGCAGT -@readname_001.f3 -TATGCACTGAC -@readname_001.f4 -TAGCTGA -@readname_002 -... - - Note the subtle change in the naming of reads where I changed to a - different postfix naming. This is because the Solexa naming scheme - currently does not (officially) allow for more than two reads per - DNA template (well, /1 and /2). The forward/reverse naming scheme - like implemented by MIRA however does allow this. - - - This has just one drawback: currently MIRA will not be able to store - the distances between the strobes when they are all in one - template. This is being worked on and will be possible in a future - version. - - - - - Setting up files and directories - - - Launching MIRA - - In the most basic incantation, you will need to tell MIRA just five things: - - - - - the name of your project. - - - - - whether you want a "genome" or "EST" assembly - - - - - whether it is a denovo or mapping assembly - - - - - which quality level (draft, normal or accurate) - - - - - the data you want to use - - - - - The above needs to be written together in a manifest file, which is a file listing the MIRA configuration and the data it should use. Have a look at the walkthrough below and at the MIRA reference to get an idea on how to write such a file (it's simple, really). Then start MIRA like this: - - -mira manifest.conf >&log_assembly.txt - - MIRA has -- at the last count -- more than 150 parameters one can use - to fine tune almost every aspect of an assembly, from data loading - options to results saving, from data preprocessing to results - interpretation, from simple alignment parameters to parametrisation of - internal misassembly decision rules ... and much more. Many of these - parameters can be even set individually for each sequencing technology - they apply to. Example given: in an assembly with Solexa, Sanger, 454 - and PacBio data, the minimum read length for Solexa could be set to - 30, while for 454 it could be 80, Sanger 100 and PacBio 150. Please - refer to the reference manual for a full overview on how to use - quick switches and extended - switches in manifest files. - - - - - Walkthroughs: real data sets from PacBio - - We'll use some data provided by PacBio for the - E. coli O104:H4 outbreak in 2011, see for - more info. - - - - Error corrected CLR for E. coli C227-11$ - - - That data set is quite interesting: PacBio took CLR reads (the reads - with only ~85% accuracy) and mapped CCS reads (presumably >00% - accuracy) to them to correct errors of the CLR reads. The resulting - error corrected CLR data is of pretty good - quality, not only from the quality values but when assembled, the - number of sequencing errors in the reads which can be spotted in the - aligments is obviously quite low. - - - - Preparing a directory structure - - - Note: this is how I set up a project, feel free to implement whatever - structure suits your needs. - - -$ mkdir c227-11-clrc -$ cd c227-11-clrc -arcadia:c227-11-clrc$ mkdir origdata data assemblies - - Your directory should now look like this: - - -arcadia:c227-11-clrc$ ls -l -drwxr-xr-x 2 bach users 48 2011-08-19 20:21 assemblies -drwxr-xr-x 2 bach users 48 2011-08-19 20:21 data -drwxr-xr-x 2 bach users 48 2011-08-19 20:21 origdata - - "c227-11-clrc" is an arbitrary name I just chose by concatenating - the name of the bug and "-clrc" to indicate that this project has - CLR sequences which were Corected. But you can name this whatever you - want: foobar, blafurbsel, ... - - - Explanation of the structure: - - - - - the origdata directory will contain the 'raw' - result files that one might get from sequencing. In our case it - will be the .tar.gz file with the data in - FASTQ format from the Devnet site. - - - - - the data directory will contain the - preprocessed sequences for the assembly, ready to be used by MIRA - - - - - the assemblies directory will contain - assemblies we make with our data (we might want to make more than - one). - - - - - - - Getting the data and preparing it - - - Head over to PacBio DevNet and fetch the data set for the E. coli - C227-11 CLR corrected data set. Put it into the - origdata directory created a few moments ago. - - - Now, let's extract the data to the data directory: - - -arcadia:c227-11-clrc$ cd data -arcadia:data$ tar xvzf ../origdata/e-coli-c227-11-corrected-fastq-1.2.2beta.tgz -e-coli-c227-11-corrected-fastq-1.2.2beta/ -e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq - - One thing you would quickly find out but which I tell now to save - time: at the moment, PacBio seems to love ultra long read - names. Here are the first 10 from the current data set: - - -arcadia:data$ grep ^@m e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq | head -10 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10040/0_5174/c0 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10040/0_5174/c1 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1017/0_1636/c0 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1054/0_4073/c0 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1054/0_4073/c1 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/1054/4121_4891/c0 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10548/0_5766/c0 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10548/0_5766/c1 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/10640/0_2393/c0 -@m110618_035655_42142_c100158802555500000315044108071130_s1_p0/11000/0_3285/c0 - - How sweet! Read names with 80 and more characters AND having the "/" - character as component, the later being a recipe for desaster sooner - or later in some post-processing pipelines. - - - MIRA has absolutely no problem with the above: neither with long read - names nor with the "/" character in the name. However, long read names - are a problem for example for gap4 (an assembly - viewer) and the "/" character might lead to confusion with the - standard UNIX directory separator, many programs which can be used - to post-process assemblies simply disallow that character. - - - For the sake of simplicity and compatibility, let's rename all - sequences. For this we'll use convert_project, - which is a binary of the MIRA program package: - - -arcadia:data$ convert_project - -f fastq -t fastq -R c227-11-clrc - e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq - c227-11-clrc -Loading from fastq, saving to: fastq -Loading data from FASTQ ... -Counting sequences in FASTQ file: found 73496 sequences. -Localtime: Sat Aug 20 20:36:26 2011 -Unusual offset of 34, guessing this file to be a Sanger-type FASTQ format. -Using calculated FASTQ quality offset: 33 -Localtime: Sat Aug 20 20:36:26 2011 -Loading data from FASTQ file: - [0%] ....|.... [10%] ....|.... [20%] ....|.... [30%] ....|.... [40%] ....|.... -[50%] ....|.... [60%] ....|.... [70%] ....|.... [80%] ....|.... [90%] ....|.... [100%] - -Done. -Loaded 73496 reads, Localtime: Sat Aug 20 20:36:35 2011 - done. -Data conversion process finished, no obvious errors encountered. - - The above command has been split in multiple lines for better overview - but should be entered in one line. - - - The parameters to convert_project say - - - - - -f fastq: the "from" type (type - of the input file) is FASTQ - - - - - -t fastq: the "to" type (type - of the output file) should be FASTQ - - - - - -R c227-11-clrc: sequences - should be renamed, all starting with "c227-11-clrc" and to which - convert_project will append an underscore and - a counter. - - - - - e-coli-c227-11-corrected-fastq-1.2.2beta/e-coli-c227-11-corrected.fastq: - that's the full name of our input file. - - - - - c227-11-clrc: that's - the partial name of our output file. Partial because - convert_project will automatically add the - postfix of the target format to the name, in this case - .fastq. - - - Just in case you wonder why this works like this: - convert_project can convert to multiple - formats at once, e.g., like this: convert_project -f fastq -t - fasta -t fastq -t maf ... and then you will get nicely named - files. - - - - - Your directory should now look like this ... - - -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 257844076 2011-08-20 21:04 c227-11-clrc.fastq -drwxr-x--- 2 bach bach 4096 2011-07-22 04:49 e-coli-c227-11-corrected-fastq-1.2.2beta - - ... and as we do not need the subdirectory with the extracted data from PacBio anymore, let's get rid of it: - - -arcadia:data$ rm -rf e-coli-c227-11-corrected-fastq-1.2.2beta -arcadia:data$ ls -l --rw-r--r-- 1 bach bach 257844076 2011-08-20 21:04 c227-11-clrc.fastq - - Perfect, we're done here. - - - - - Starting the assembly - - - Good, we're almost there. Let's switch to the - assembly directory and create a subdirectory for our - first assembly test. - - -arcadia:data$ cd ../assemblies/ -arcadia:assemblies$ mkdir 1sttest -arcadia:assemblies$ cd 1sttest - - This directory is quite empty and the PacBio data is not - present. And it does not need to be as we'll tell MIRA in the manifest - configuration file where to find the data and what to do with it. - - -# A manifest file can contain comment lines, these start with the #-character - -# First part of a manifest: defining some basic things - -# In this example, we just give a name to the assembly -# and tell MIRA it should assemble a genome de-novo in accurate mode -# As special parameter, we want to use 4 threads in parallel instead -# of letting MIRA decide how many CPU cores it should use - -project = c227-11-clrc -job = genome,denovo,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups", for more information -# please consult the MIRA manual, chapter "Reference" - -readgroup = MyPacBioCLRCReads -technology = pcbiohq -data = ../../data/c227-11-clrc.fastq - - Starting the assembly is now just a matter of one line: - - -arcadia:1sttest$ mira manifest.conf >&log_assembly.txt - - Some 3 to 4 hours later, you should have a nice and shiny assembly of - your data. - - - Now, that was easy, wasn't it? In the above example - for assemblies - having only PacBio data and if you followed the walkthrough on how to - prepare the data - everything you might want to adapt in the first - time are the following options: - - - - - project= (for naming your assembly project) - - - - - job= (perhaps to change the quality of the assembly to 'draft' - - - - - Of course, you are free to change any of the > options via the extended - parameters MIRA has ... but this is covered in the MIRA main reference - manual. - - - - - Working with the results of the assembly - - - There is a whole chapter in the manual dedicated to this, you are expected to read it :-) - - - However, for the impatient, here's a quick rundown on what I am going - to show as example in this section: filtering of results and loading - results into an assembly viewer. - - - - Filtering results - - - This assembly project has an average coverage of roundabout 23 to - 24x. Due to sequencing errors, MIRA will have also created a few - small contigs with just a few reads and lot less coverage. These - contigs are, well, most of the time not interesting as they contain - junk most of the time. I want to get rid of them. - - - Let's say that only contigs ≥ 500 base pairs and with an average - coverage ≥ 8 (which is 1/3 of the average coverage of 24 of the - whole project) are interesting. Let's filter them out of the MIRA - results and create a CAF file which can then be imported into either - gap4 or gap5 (assembly viewers - and finishing tools from the Staden package). - - - Let's take a quick look at the main directories and files of the - assembly: - - -arcadia:1sttest$ ls -l -drwxr-xr-x 6 bach bach 4096 2011-08-20 16:57 c227-11-clrc_assembly --rw-r--r-- 1 bach bach 2524406 2011-08-20 19:46 log_assembly.txt -arcadia:1sttest$ cd c227-11-clrc_assembly -arcadia:c227-11-clrc_assembly$ ls -l -drwxr-xr-x 2 bach bach 4096 2011-08-20 17:01 c227-11-clrc_d_chkpt -drwxr-xr-x 2 bach bach 4096 2011-08-20 19:46 c227-11-clrc_d_info -drwxr-xr-x 2 bach bach 4096 2011-08-20 20:10 c227-11-clrc_d_results -drwxr-xr-x 2 bach bach 36864 2011-08-20 19:46 c227-11-clrc_d_tmp -arcadia:c227-11-clrc_assembly$ ls -l c227-11-clrc_d_info --rw-r--r-- 1 bach bach 2320 2011-08-20 19:46 c227-11-clrc_info_assembly.txt --rw-r--r-- 1 bach bach 88 2011-08-20 16:57 c227-11-clrc_info_callparameters.txt --rw-r--r-- 1 bach bach 168049 2011-08-20 19:46 c227-11-clrc_info_consensustaglist.txt --rw-r--r-- 1 bach bach 1599427 2011-08-20 19:46 c227-11-clrc_info_contigreadlist.txt --rw-r--r-- 1 bach bach 6718 2011-08-20 19:46 c227-11-clrc_info_contigstats.txt --rw-r--r-- 1 bach bach 7401 2011-08-20 19:46 c227-11-clrc_info_debrislist.txt --rw-r--r-- 1 bach bach 10572 2011-08-20 19:15 c227-11-clrc_info_readrepeats.lst --rw-r--r-- 1 bach bach 42697892 2011-08-20 19:46 c227-11-clrc_info_readtaglist.txt -arcadia:c227-11-clrc_assembly$ cd c227-11-clrc_d_results -arcadia:c227-11-clrc_results$ ls -l --rw-r--r-- 1 bach bach 192615652 2011-08-20 19:46 c227-11-clrc_out.ace --rw-r--r-- 1 bach bach 597368574 2011-08-20 19:46 c227-11-clrc_out.caf --rw-r--r-- 1 bach bach 306918692 2011-08-20 19:46 c227-11-clrc_out.maf --rw-r--r-- 1 bach bach 6333500 2011-08-20 19:46 c227-11-clrc_out.padded.fasta --rw-r--r-- 1 bach bach 18987968 2011-08-20 19:46 c227-11-clrc_out.padded.fasta.qual --rw-r--r-- 1 bach bach 7240 2011-08-20 19:46 c227-11-clrc_out.tcs --rw-r--r-- 1 bach bach 6297565 2011-08-20 19:46 c227-11-clrc_out.unpadded.fasta --rw-r--r-- 1 bach bach 18881604 2011-08-20 19:46 c227-11-clrc_out.unpadded.fasta.qual --rw-r--r-- 1 bach bach 4442567 2011-08-20 19:46 c227-11-clrc_out.wig - - OK, we're at the right spot for filtering. While we are at it, tell - convert_project to not only convert to CAF, but - also to write a new file with tabular data on contig statistics of - the filtered contigs: - - -arcadia:c227-11-clrc_results$ convert_project - -f maf -t caf -t cstats -x 500 -y 8 - c227-11-clrc_out.maf - c227-11-clrc_filteredx500y8 -Loading from maf, saving to: caf cstats -First counting reads: - [0%] ....|.... [10%] ....|.... [20%] ....|.... [30%] ....|.... [40%] ....|.... [50%] ....|.... [60%] ....|.... [70%] ....|.... [80%] ....|.... [90%] ....|.... [100%] -Now loading and processing data: - - ... lots of lines omitted ... - - -Data conversion process finished, no obvious errors encountered. -arcadia:c227-11-clrc_results$ ls -l *filtered* --rw-r--r-- 1 bach bach 584042411 2011-08-20 22:12 c227-11-clrc_filteredx500y8.caf --rw-r--r-- 1 bach bach 1518 2011-08-20 22:12 c227-11-clrc_filteredx500y8_info_contigstats.txt - -arcadia:c227-11-clrc_results$ cat c227-11-clrc_filteredx500y8_info_contigstats.txt -# name length av.qual #-reads mx.cov. av.cov GC% CnIUPAC CnFunny CnN CnX CnGap CnNoCov -c227-11-clrc_c1 335375 90 4081 35 21.27 49.73 2 0 0 0 1975 0 -c227-11-clrc_c2 651370 90 9224 41 23.88 51.23 3 0 0 0 4535 0 -c227-11-clrc_c3 356318 90 4962 40 24.18 50.81 0 0 0 0 2208 0 -c227-11-clrc_c4 386288 90 5178 39 23.58 51.49 3 0 0 0 2367 0 -c227-11-clrc_c5 908271 90 12277 40 23.41 50.73 3 0 0 0 5912 0 -... - - Once filtered, how many contigs are there? Well, 22: it's the - number of lines minus one of the file - c227-11-clrc_filteredx500y8_info_contigstats.txt: - - -arcadia:c227-11-clrc_results$ wc -l c227-11-clrc_filteredx500y8_info_contigstats.txt -23 - - - - Looking at the assembly in gap4 - - - I'm very fond of gap4, so I'll use it to show ho the assembly looks like: - - -arcadia:c227-11-clrc_results$ caf2gap -project c227-11 -ace c227-11-clrc_filteredx500y8.caf >&/dev/null -arcadia:c227-11-clrc_results$ ls -l C* --rw-r--r-- 1 bach bach 543539856 2011-08-20 22:35 C227-11.0 --rw-r--r-- 1 bach bach 39512896 2011-08-20 22:35 C227-11.0.aux -arcadia:c227-11-clrc_results$ gap4 C227-11.0 - - And while it's difficult to judge an assembly only from a - screenshot, I made one: 22 contigs, none smaller than 4kb and - pretty good certainty your bases are correct. Pray tell, isn't that - beautiful? - -
    - - Result of the assembly of <emphasis>E. coli</emphasis> C227-11 with - error corrected CLR reads. - - - - - - -
    -
    -
    -
    - - CCS reads for E. coli C227-11 - - Head over to PacBio DevNet and fetch the data set for the E. coli - C227-11 CCS data set. - - - For the rest ... well, it's pretty much the same as for the CLR data - set. Just one little difference: in the .tgz you - downloaded, PacBio has split the data set into multiple FASTQ files (for - whatever reason). You will need to concatenate them into one file - before starting to work with that. Yep, and that's it. - - -
    - - Hybrid assemblies: PacBio plus Sanger/454/Solexa/IonTorrent - - TO BE EXPANDED: no real walkthrough yest, just a few hints. - - - - - Prepare your PacBio data like explained in this guide. - - - - - Prepare your other data (Sanger, 454, Solexa, IonTorrent or any combination of - it) like explained in the respective MIRA guides. - - - - - Write a manifest which includes all data files as readgroups and start MIRA. - - - - - - Known bugs in 3.4.0 with PacBio data - - For error-corrected CLR data, MIRA does not get the average coverage of - a project correct: it underestimates it, sometimes by a factor of - 10. This in turn leads to too many "large" contigs and subsequently to a - N50 number which is way off the thruth. - - - Will be fixed asap. - - -
    diff -Nru mira-3.9.18/doc/docbook/chap_preface_part.xml mira-4.0/doc/docbook/chap_preface_part.xml --- mira-3.9.18/doc/docbook/chap_preface_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_preface_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -12,7 +12,7 @@ This "book" is actually the result of an exercise in self-defense. It contains texts from several years of help files, mails, postings, questions, - anwers etc.pp concerning MIRA and assembly projects one can do with it. + answers etc.pp concerning MIRA and assembly projects one can do with it. I never really intended to push MIRA. It started out as a PhD thesis and I @@ -36,20 +36,27 @@ somewhat lacking, some texts were re-used almost verbatim. - Nothing is perfect, and both MIRA and this documentation are far from it. If - you spot an error either in MIRA or the docs, feel free to report it. Or, - even better, correct it if you can. At least with the help files it should - be easy, they're just text files. + The last few years have seen tremendous change in the sequencing + technologies and MIRA 4 reflects that: core data structures and + routines had to be thrown overboard and replaced with faster and/or more + versatile versions suited for the broad range of technologies and use-cases + I am currently running MIRA with. + + + Nothing is perfect, and both MIRA and this documentation (even if it is + rather pompously called Definitive Guide) are far from + it. If you spot an error either in MIRA or this manual, feel free to report + it. Or, even better, correct it if you can. At least with the manual files + it should be easy: they're basically just some decorated text files. I hope that MIRA will be as useful to you as it has been to me. Have a lot of fun with it. - Rheinfelden, Spring 2013 + Rheinfelden, February 2014 Bastien Chevreux - diff -Nru mira-3.9.18/doc/docbook/chap_reference_part.xml mira-4.0/doc/docbook/chap_reference_part.xml --- mira-3.9.18/doc/docbook/chap_reference_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_reference_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -17,73 +17,78 @@
    - MIRA3 reference aka: The extended man page of MIRA, - a genome and EST/RNASeq sequence assembly system for Sanger, 454, IonTorrent, + MIRA 4 reference manual aka: The extended man page of MIRA 4, + a genome and EST/RNASeq sequence assembly and mapping program for Sanger, 454, IonTorrent, PacBio and Illumina/Solexa sequencing data Synopsis - mira -chrv manifest-file manifest-file ... + mira -chmMrtv manifest-file manifest-file ... - - - - Important notes - - - For an easy introduction on how to use MIRA, a number of tutorials with - step-by-step instructions are available: - - - - - mira_usage for basic Sanger assembly - - - - - mira_454 for basic 454 assembly - - - - - mira_iontor for basic Ion Torrent assembly - - - - - mira_pacbio for basic assembly of sequences - from Pacific Bioscience - - - - - mira_solexadev for basic mapping assembly of Solexa data - - - - - mira_est for some advice concerning assembly of EST sequence - (and miraSearchESTSNPs) - - - - - mira_hard some notes on how to assemble 'hard' - data sets: EST data sets or genome projects for eukaryotes, but some - prokaryotes also qualify for this - - - - - mira_faq with some frequently asked question - - - + The command line parameters in short: + + + + -c / --cwd=directory + + + Change working directory. + + + + + -h / --help + + + Print a short help and exit. + + + + + -m / --mcheck + + + Only check the manifest file, then exit. + + + + + -M / --mdcheck + + + Only check the manifest file and presence of data files, then exit. + + + + + -r / --resume + + + Resume / restart an interrupted assembly. + + + + + -t / --thread=integer ≥ 0 + + + Force number of threads (overrides equivalent -GE:not + manifest entry). + + + + + -v / --version + + + Print version and exit. + + + @@ -109,7 +114,7 @@ <listitem> <para> Some memory and disk space. Actually lots of both if you are - venturing into 454 or Solexa. + venturing into 454 or Illumina. </para> </listitem> </itemizedlist> @@ -121,7 +126,7 @@ Working modes - MIRA has three basic working modes: genome, EST or + MIRA has three basic working modes: genome, EST/RNASeq or EST-reconstruction-and-SNP-detection. From version 2.4 on, there is only executable which supports all modes. The name with which this executable is called defines the working mode: @@ -172,7 +177,9 @@ A manifest file can be seen as a two part configuration file for an assembly: the first part contains some general information while the second part contains information about - the sequencing data to be loaded. Examples being always easier to follow than long texts, here's an example for a de-novo assembly with 454 data: + the sequencing data to be loaded. Examples being always easier to + follow than long texts, here's an example for a de-novo assembly with + single-end (also called shotgun) 454 data: # Example for a manifest describing a simple 454 de-novo assembly @@ -196,10 +203,15 @@ data = TCMFS456ZH345.fastq TQF92GT7H34.fastq technology = 454 - To make things a bit more interesting, here's an example for a typical standard setup nowadays: unpaired 454 plus a paired-end Illumina + a mate-pair Illumina. To make things even more interesting, the data for Illumina sequences is not given for every single file, but with wildcards: + To make things a bit more interesting, here's an example using a + couple more technologies and showing some more options of the manifest + file like wild cards in file names, different paired-end/mate-pair + libraries and how to let MIRA refine pairing information (or even find + out everything by itself): # Example for a manifest describing a de-novo assembly with -# unpaired 454, paired-end Illumina and mate-pair Illumina +# unpaired 454, paired-end Illumina, a mate-pair Illumina +# and a paired Ion Torrent # First part: defining some basic things # In this example, we just give a name to the assembly @@ -214,23 +226,35 @@ # The data is logically divided into "readgroups": this reflects the # ... that read sequences ... +# defining the 454 reads readgroup = SomeUnpaired454ReadsIGotFromTheLab data = TCMFS456ZH345.fastq TQF92GT7H34.fastq -technology = 454 +technology = 454 -readgroup = SomePairedEndIlluminaReadsIGotFromTheLab +# defining the paired-end Illumina reads, fixing all needed pair information +readgroup = SomePairedEndIlluminaReadsIGotFromTheLab data = datape*.fastq technology = solexa -templatesize = 100 300 -segmentplacement = ---> <--- -segmentnaming = solexa +template_size = 100 300 +segment_placement = ---> <--- +segment_naming = solexa -readgroup = SomeMatePairIlluminaReadsIGotFromTheLab +# defining the mate-pair Illumina reads, fixing most needed pair information +# but letting MIRA refine the template_size via "autorefine" +readgroup = SomeMatePairIlluminaReadsIGotFromTheLab data = datamp*.fastq technology = solexa -templatesize = 2800 3200 -segmentplacement = <--- ---> -segmentnaming = solexa +template_size = 2000 4000 autorefine +segment_placement = <--- ---> +segment_naming = solexa + +# defining paired Ion Torrent reads +# example to show how lazy one can be and simply let MIRA estimate by itself +# all needed pairing information via "autopairing" +readgroup = SomePairedIonReadsIGotFromTheLab +autopairing +data = dataion*.fastq +technology = iontor
    @@ -414,8 +438,10 @@ </para> <para> MIRA automatically recognises what type the sequence data is by - looking at the postfix of files. Currently allowed file types - are: + looking at the postfix of files. For postfixes not adhering widely + used naming schemes for file types, there's additionally a way of + explicitly defining the type (see further down at the end of this + item on how this is done). Currently allowed file types are: </para> <itemizedlist> <listitem> @@ -429,10 +455,12 @@ </listitem> <listitem> <para> - <filename>.fna</filename>, also for sequences formatted in - FASTA format. The difference to <filename>.fasta</filename> - lies in the way MIRA treats a missing quality file (called - <filename>.fna.qual</filename>): it does not see that as + <filename>.fna</filename> and <filename>.fa</filename> also + for sequences formatted in FASTA format. The difference + to <filename>.fasta</filename> lies in the way MIRA treats a + missing quality file (called + <filename>.fna.qual</filename> + or <filename>.fa.qual</filename>): it does not see that as critical error and continues. </para> </listitem> @@ -443,13 +471,6 @@ </listitem> <listitem> <para> - <filename>.fofnexp</filename> for a <emphasis>file of EXP - filenames</emphasis> which point to file in the Staden EXP - format. - </para> - </listitem> - <listitem> - <para> <filename>.gff3</filename> or <filename>.gff</filename> for files in GFF3 format. Note that MIRA will load all sequences and annotations contained in this file. @@ -476,6 +497,18 @@ </listitem> <listitem> <para> + <filename>.exp</filename> for files in the Staden EXP format. + </para> + </listitem> + <listitem> + <para> + <filename>.fofnexp</filename> for a <emphasis>file of EXP + filenames</emphasis> which all point to files in the Staden EXP + format. + </para> + </listitem> + <listitem> + <para> <filename>.xml</filename>, <filename>.ssaha2</filename> and <filename>.smalt</filename> for ancillary data in NCBI TRACEINFO, SSAHA2 or SMALT format respectively. </para> </listitem> @@ -513,7 +546,7 @@ <note> Giving a directory like in <filename>mydir</filename> is equivalent to <filename>mydir/*</filename> (saying: give me all - files in the firectory <filename>mydir</filename>), however the + files in the directory <filename>mydir</filename>), however the first version should be preferred when the directory contains thousands of files. </note> @@ -531,11 +564,50 @@ error. </para> </note> + <para> + <emphasis>Explicit definition of file types.</emphasis> It is + possible to explicitly tell MIRA the type of a file even if said + file does not have a 'standard' naming scheme. For this, the + EMBOSS double-colon notation has been adapted to work also for + MIRA, i.e., you prepend the type of a file and separate it from + the file name by a double colon. E.g., + the <filename>.dat</filename> postfix is not anything MIRA will + recognise, but you can define it should be loaded as FASTQ file + like this: + </para> + <screen>data = fastq::myfile.dat</screen> + <para> + This does (of course) work also with directories or wildcard + characters. In the following example, the first line will load all + files from <filename>mydirectory</filename> as FASTQ while the + second line loads just <filename>.dat</filename> files in a given + path as FASTA: + </para> + <screen>data = fastq::mydirectory +data = fasta::/path/to/somewhere/*.dat</screen> + <para> + It is entirely possible (although not really sensible), to give + contradicting information to MIRA by using a different explicit + file type than one would guess from the standard postfix. In this + case, the explicit type takes precedence over the automatic + type. E.g.: to force MIRA to load a file as FASTA although it is + named <filename>.fastq</filename>, one could use this: + </para> + <screen>data = fasta::file.fastq</screen> + <para> + Note that the above does not make any kind of file conversion, + <filename>file.fastq</filename> needs to be already in FASTA + format or else MIRA will fail loading that data. + </para> </listitem> <listitem> <para> <emphasis role="bold">default_qual</emphasis>= - <replaceable>quality_value</replaceable> is meant to be used as default fallback quality value for sequences where the data files given above do not contain quality values. E.g., GFF3 or GenBank formats, eventually also FASTA files where quality data files is missing. + <replaceable>quality_value</replaceable> is meant to be used as + default fall-back quality value for sequences where the data files + given above do not contain quality values. E.g., GFF3 or GenBank + formats, eventually also FASTA files where quality data files is + missing. </para> </listitem> <listitem> @@ -548,7 +620,7 @@ </para> <para> The <emphasis>text</emphasis> technology is not a technology per - se, but should be used for sequences which are not comming from + se, but should be used for sequences which are not coming from sequencing machines like, e.g., database entries, consensus sequences, artificial reads (which do not comply to normal behaviour of 'normal' sequencing data), etc.pp @@ -565,35 +637,86 @@ </listitem> <listitem> <para> - <emphasis role="bold">templatesize </emphasis>= - <replaceable>min_size - max_size <emphasis>[infoonly|exclusion_criterion]</emphasis></replaceable>. Defines the + <emphasis role="bold">autopairing</emphasis> This keyword is used + to tell MIRA it should estimate values for + <emphasis>template_size</emphasis> and + <emphasis>segment_placement</emphasis> (see below). + </para> + <para> + This is basically the lazy way to tell MIRA that the data in the + corresponding readgroup consists of paired reads and that you + trust it will find out the correct values. + </para> + <note> + <emphasis>autopairing</emphasis> usually works quite well for + small and mid-sized libraries (up to, say, 10 kb). For larger + libraries it might be a good thing to tell MIRA some rough + boundaries via <emphasis>template_size</emphasis> / + <emphasis>segment_placement</emphasis> and let MIRA refine the + values for the template size via <emphasis>autorefine</emphasis> + (see below). + </note> + <note> + <emphasis>autopairing</emphasis> is a feature new to MIRA 4.0rc5, + it may contain bugs for some corner cases. Feedback appreciated. + </note> + </listitem> + <listitem> + <para> + <emphasis role="bold">template_size </emphasis>= + <replaceable>min_size max_size + <emphasis>[infoonly|exclusion_criterion]</emphasis> + <emphasis>[autorefine]</emphasis></replaceable>. Defines the minimum and maximum size of "good" DNA templates in the library - prep for this read group. + prep for this read group. This defines at which distance the two + reads of a pair are to be expected in a contig, a very useful + information for an assembler to resolve repeats in a genome or + different splice variants in transcriptome data. </para> <para> If the term <emphasis>infoonly</emphasis> is present, then MIRA will pass the information on template sizes in result files, but - will not use it for any decision making during de-novo assembly or - mapping assembly. The term <emphasis>exclusion_criterion</emphasis> makes MIRA use the information for decision making. - </para> - <para> - If <emphasis>infoonly</emphasis> or <emphasis>exclusion_criterion</emphasis> are missing, then MIRA assumes <emphasis>exclusion_criterion</emphasis> for de-novo assemblies and <emphasis>infoonly</emphasis> for mapping assemblies. + will not use it for any decision making during de-novo or mapping + assembly. The term <emphasis>exclusion_criterion</emphasis> makes + MIRA use the information for decision making. + </para> + <para> + If <emphasis>infoonly</emphasis> + or <emphasis>exclusion_criterion</emphasis> are missing, then MIRA + assumes <emphasis>exclusion_criterion</emphasis> for de-novo + assemblies and <emphasis>infoonly</emphasis> for mapping + assemblies. + </para> + <para> + If the term <emphasis>autorefine</emphasis> is present, MIRA will + start the assembly with the given size information but switch to + refined value computed from observed distances in an + assembly. However, please note that the size values + can <emphasis>never</emphasis> be expanded, only shrunk. It is + therefore advisable to use generous bounds when using the + autorefine feature. </para> <note> - The <emphasis>templatesize</emphasis> line in the manifest file + The <emphasis>template_size</emphasis> line in the manifest file replaces the parameters -GE:uti:tismin:tismax of earlier versions of MIRA (3.4.x and below). </note> <note> + The minimum or the maximum size (or both) can be set to a negative + value for "don't care and don't check". This allows constructs + like <literal>template_size= 500 -1 exclusion_criterion</literal> + which would check only the minimum distance but not the maximum + distance. + </note> + <note> <para> For <emphasis>mapping</emphasis> assemblies with MIRA, you usually will want to use <emphasis>infoonly</emphasis> as else - - in case of genome re-arrangements, larger deleteions or + in case of genome re-arrangements, larger deletions or insertions - MIRA would probably reject one read of every read - pair (as it would not be at the expected distance and/or - orientation) and you would not be able to simply find the - re-arrangement in downstream analysis. + pair in the corresponding areas as it would not be at the + expected distance and/or orientation ... and you would not be + able to simply find the re-arrangement in downstream analysis. </para> <para> For <emphasis>de-novo</emphasis> assemblies however @@ -613,7 +736,7 @@ sidebar above: "understanding readgroups and DNA templates"). That is, if one has a library with 6kb fragments, one knows that the outer ends of the two reads will be - approximately 6kb apart, ike so: + approximately 6kb apart, like so: </para> <screen>DNA template ############################################################## read 1 ....... @@ -632,25 +755,30 @@ </listitem> <listitem> <para> - <emphasis role="bold">segmentplacement </emphasis>= + <emphasis role="bold">segment_placement </emphasis>= <replaceable>placementcode <emphasis>[infoonly|exclusion_criterion]</emphasis></replaceable>. Allowed placement codes are: </para> <itemizedlist> <listitem> <para> - <emphasis role="bold">?</emphasis> which is a place-holder for - "unknown" or "don't care." Segments of a template can be reads - in any direction and in any relationship to each other. - Shotgun reads usually have this, but also useful for for, - e.g., primer walking with Sanger. + <emphasis role="bold">?</emphasis> + or <emphasis role="bold">unknown</emphasis> which are + place-holders for "well, in the end: don't care." Segments of + a template can be reads in any direction and in any + relationship to each other. + </para> + <para> + This is typically used for unpaired libraries (sometimes + called <emphasis>shotgun libraries</emphasis>), but may be + also useful for, e.g., primer walking with Sanger. </para> </listitem> <listitem> <para> - <emphasis role="bold">---> <---</emphasis> - or <emphasis role="bold">FR</emphasis> - or <emphasis>INNIES</emphasis>. The <emphasis>forward / + <emphasis role="bold">---> <---</emphasis> or <emphasis + role="bold">FR</emphasis> or <emphasis + role="bold">INNIES</emphasis>. The <emphasis>forward / reverse</emphasis> scheme as used in traditional Sanger sequencing as well as Illumina paired-end sequencing, </para> @@ -662,9 +790,9 @@ </listitem> <listitem> <para> - <emphasis role="bold"><--- ---></emphasis> - or <emphasis role="bold">RF</emphasis> - od <emphasis>OUTTIES</emphasis>. The <emphasis>reverse / + <emphasis role="bold"><--- ---></emphasis> or <emphasis + role="bold">RF</emphasis> or <emphasis + role="bold">OUTIES</emphasis>. The <emphasis>reverse / forward</emphasis> scheme as used in Illumina mate-pair sequencing. </para> @@ -674,10 +802,10 @@ </listitem> <listitem> <para> - <emphasis role="bold">1---> 2---></emphasis> - or <emphasis role="bold">samedir forward</emphasis> - or <emphasis role="bold">SF</emphasis> - or <emphasis>LEFTIES</emphasis>. The <emphasis>forward / + <emphasis role="bold">1---> 2---></emphasis> or + <emphasis role="bold">samedir forward</emphasis> or <emphasis + role="bold">SF</emphasis> or <emphasis + role="bold">LEFTIES</emphasis>. The <emphasis>forward / forward</emphasis> scheme. Segments of a template are all placed in the same direction, the segment order in the contig follows segment ordering of the reads. @@ -685,10 +813,10 @@ </listitem> <listitem> <para> - <emphasis role="bold">2---> 1---></emphasis> - <emphasis role="bold">samedir backward</emphasis> - or <emphasis role="bold">SB</emphasis> - or <emphasis role="bold">RIGHTIES</emphasis>. Segments of a template are + <emphasis role="bold">2---> 1---></emphasis> <emphasis + role="bold">samedir backward</emphasis> or <emphasis + role="bold">SB</emphasis> or <emphasis + role="bold">RIGHTIES</emphasis>. Segments of a template are all placed in the same direction, the segment order in the contig is reversed compared to segment ordering of the reads. </para> @@ -725,7 +853,7 @@ <para> For <emphasis>mapping</emphasis> assemblies with MIRA, you usually will want to use <emphasis>infoonly</emphasis> as else - - in case of genome re-arrangements, larger deleteions or + in case of genome re-arrangements, larger deletions or insertions - MIRA would probably reject one read of every read pair (as it would not be at the expected distance and/or orientation) and you would not be able to simply find the @@ -738,6 +866,9 @@ where you know what you do. </para> </note> + <note> + As soon as you tell MIRA that a readgroup contains paired reads (via one of the other typical readgroup parameters like template_size, segment_naming etc.), the <emphasis>segment_placement</emphasis> line becomes mandatory in the manifest. This is because different sequencing technologies and/or library preparations result in different read orientations. E.g., Illumina libraries come in paired-end flavour which have FR (forward/reverse) placements, but there are also mate-pair libraries which have reverse/forward (RF) placements. + </note> <sidebar> <title> Understanding read segment placement on DNA templates @@ -749,7 +880,7 @@ </listitem> <listitem> <para> - <emphasis role="bold">segmentnaming </emphasis>= <replaceable>naming_scheme</replaceable>. Defines + <emphasis role="bold">segment_naming </emphasis>= <replaceable>naming_scheme</replaceable>. Defines the naming scheme reads are following to indicate the DNA template they belong to. Allowed naming schemes are: <emphasis>sanger, stlouis, tigr, FR, solexa</emphasis>. @@ -774,7 +905,7 @@ Read naming is a long story with lots of historical gotchas: it needs to be clear and simple, but still people sometimes wanted to convey additional meta-information with it. Unsurprisingly, - several "standards" emerged over time. In short: it's a mess. + several "standards" emerged over time. In short: it's a mess. See also XKCD entry on <ulink url="http://xkcd.com/927/">proliferating standards</ulink>. </para> <para> How to choose: please read the documentation available at the @@ -864,7 +995,7 @@ </listitem> <listitem> <para> - <emphasis role="bold">strainname </emphasis>= + <emphasis role="bold">strain_name </emphasis>= <replaceable>string</replaceable>. Defines the strain / organism-code the reads of this read group are from. If not set, MIRA will assign "StrainX" to reads and "ReferenceStrain" to @@ -944,7 +1075,7 @@ <para> To allow very fine grained behaviour, especially in hybrid assemblies, and to prevent the explosion of parameter names, MIRA - uses categorises the paremeters in two categories: + knows two categories of parameters: </para> <orderedlist> <listitem> @@ -999,8 +1130,8 @@ technologies. </para> <para> - Here is exemplary a part of the output of used parameters that MIRA - will show: + Here is as example a part of the output of used parameters that MIRA + will show when started with 454 and Illumina (Solexa) data: </para> <screen> ... @@ -1012,29 +1143,29 @@ Spoiler detection (sd) : no Last pass only (sdlpo) : yes - Minimum read length (mrl) : [san] 80 - [454] 40 - [sxa] 20 - Base default quality (bdq) : [san] 10 - [454] 10 - [sxa] 10 + Minimum read length (mrl) : [454] 40 + [sxa] 20 + Enforce presence of qualities (epoq) : [454] no + [sxa] yes + ...</screen> <para> You can see the two different kind of settings that MIRA uses: <emphasis>common</emphasis> <emphasis>settings</emphasis> (like - <arg>-AS:nop</arg>) and <emphasis>technology</emphasis> - <emphasis>dependent</emphasis> <emphasis>settings</emphasis> (like - <arg>-AS:mrl</arg>), where for each sequencing technology used in - the project, the setting can be different. + <arg>-AS:nop</arg>) which allows only one value and + <emphasis>technology</emphasis> <emphasis>dependent</emphasis> + <emphasis>settings</emphasis> (like <arg>-AS:mrl</arg>), where for + each sequencing technology used in the project, the setting can be + different. </para> <para> - How would one set a minimum read length of 80 and a base default - quality of 10 for 454 reads, but for Solexa reads a minimum read - length of 30 with a base default quality of 15? The answer: + How would one set a minimum read length of 40 and not enforce + presence of base qualities for Sanger reads, but for 454 reads a + minimum read length of 30 and enforce base qualities? The answer: </para> <screen> job=denovo,genome,draft -parameters= 454_SETTINGS -AS:mrl=80:bdq=10 SOLEXA_SETTINGS -AS:mrl=30:bdq=15</screen> +parameters= SANGER_SETTINGS -AS:mrl=40:epoq=mo 454_SETTINGS -AS:mrl=40:epoq=yes</screen> <para> Notice the ..._SETTINGS section in the command line (or parameter file): these tell MIRA that all the following parameters until the advent of @@ -1048,16 +1179,20 @@ </para> <screen> job=denovo,genome,draft -parameters= 454_SETTINGS -AS:mrl=80:bdq=10 -parameters= SOLEXA_SETTINGS -AS:mrl=30:bdq=15</screen> +parameters= SANGER_SETTINGS -AS:mrl=80:epoq=no +parameters= 454_SETTINGS -AS:mrl=30:epoq=yes</screen> <para> Alternatively you can use a backslash at the end of a parameter line to indicate that the next line is a continuing line, like so: </para> <screen> job=denovo,genome,draft -parameters= 454_SETTINGS -AS:mrl=80:bdq=10 <userinput>\</userinput> - SOLEXA_SETTINGS -AS:mrl=30:bdq=15</screen> +parameters= SANGER_SETTINGS -AS:mrl=80:epoq=no <userinput>\</userinput> + 454_SETTINGS -AS:mrl=30:epoq=yes</screen> + <para> + Note that the very last line of the parameters settings MUST NOT + end with a backslash. + </para> </note> <para> Beside COMMON_SETTINGS there are currently 6 technology settings available: @@ -1142,7 +1277,7 @@ <screen> <userinput>parameters = <replaceable>COMMON_SETTINGS -GE:not=4 \ SANGER_SETTINGS -AL:mrs=70 -AS:mrl=150 \ - 454_SETTINGS -AL:mrs=75 -ASmrl=100 \ + 454_SETTINGS -AL:mrs=75 -AS:mrl=100 \ SOLEXA_SETTINGS -AL:mrs=90 -AS:mrl=75</replaceable></userinput></screen> <para> Please note that it is also perfectly legal to decompose the switches @@ -1176,13 +1311,59 @@ <variablelist> <varlistentry> <term> - <arg>-highlyrepetitive</arg> + <arg>--hirep_best</arg> + </term> + <term> + <arg>--hirep_good</arg> + </term> + <term> + <arg>--hirep_something</arg> </term> <listitem> - <para> A modifier switch for genome data that is - deemed to be highly repetitive. The assemblies will run slower due to more - iterative cycles that give MIRA a chance to resolve nasty repeats. + <para> + These are modifier switches for genome data that is deemed to + be highly repetitive. With <emphasis>hirep_good</emphasis> and + <emphasis>hirep_best</emphasis>, the assemblies will run + slower due to more iterative cycles and slightly different + default parameter sets that give MIRA a chance to resolve many + nasty repeats. The <emphasis>hirep_something</emphasis> switch + goes the other way round and resolves repeats less well than a + normal assembly, but allows MIRA to finish even on more + complex data. + </para> + <para> + Usage recommendations bacteria: starting MIRA without any + hirep switches yields good enough result in most cases. Under + normal circumstances one can use + <emphasis>hirep_good</emphasis> or + even <emphasis>hirep_best</emphasis> without remorse as data + sets and genome complexities are small enough to run within a + couple of hours at most. </para> + <para> + Usage recommendations for 'simple' lower eukaryotes: starting + MIRA without any hirep switches yields good enough result in + most cases. If the genomes are not too complex, + using <emphasis>hirep_good</emphasis> can be a possibility. + </para> + <para> + Usage recommendations for lower eukaryotes with complex + repeats: starting MIRA without any hirep switches might + already take too long or create temporary data files which are + too big. For these cases, using + <emphasis>hirep_something</emphasis> makes MIRA use a + parameter set which is targeted as resolving the + non-repetitive areas of a genome and additionally all repeats + which occur less than 10 times in the genome. Repeats occurring + more often will not be resolved, but using the debris + information one can recover affected reads and use these with + harsh data reduction algorithms (e.g. digital normalisation) + to get a glimpse into these. + </para> + <note> + These switches replace the '--highlyrepetitive' switch from + earlier versions. + </note> </listitem> </varlistentry> <varlistentry> @@ -1248,7 +1429,7 @@ </para> <para> In case MIRA cannot find out the number of cores, the - fallback value is <emphasis role="underline">2</emphasis>. + fall-back value is <emphasis role="underline">2</emphasis>. </para> <para> Note: when running the SKIM algorithm in parallel threads, @@ -1523,10 +1704,8 @@ </term> <listitem> <para> - Default is currently <emphasis role="underline">yes</emphasis> - for genome assemblies and <emphasis - role="underline">no</emphasis> for EST assemblies or - assemblies with Solexa data. + Default is currently always <emphasis role="underline">no</emphasis> + as these algorithms were supplanted by better ones in MIRA 4.0. </para> <para> Takes effect only if uniform read distribution @@ -1586,10 +1765,9 @@ <arg>urd_clipoffmultiplier(urdcm)=<replaceable>float > 1.0</replaceable></arg> </term> <listitem> - <para> Default is <emphasis role="underline">1.5</emphasis> for - all sequencing technologies in most assembly cases. The - <arg>--highlyrepetitive</arg> quick-switch sets this to <emphasis - role="underline">1.2</emphasis>. + <para> + Default is <emphasis role="underline">1.5</emphasis> for all + sequencing technologies in most assembly cases. </para> <para> This option says this: if MIRA determined that the average @@ -1614,23 +1792,6 @@ </varlistentry> <varlistentry> <term> - <arg>keep_long_repeats_separate(klrs)=<replaceable>on|y[es]|t[rue], off|n[o]|f[alse]</replaceable></arg> - </term> - <listitem> - <para> - Default is is dependent on --job quality: currently <emphasis - role="underline">no</emphasis> for draft and <emphasis - role="underline">yes</emphasis> for accurate. Switched of for - EST assembly. - </para> - <para> - Tells MIRA to use keep repeats longer that the length of reads - in separate contigs. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> <arg>spoiler_detection(sd)=<replaceable>on|y[es]|t[rue], off|n[o]|f[alse]</replaceable></arg> </term> <listitem> @@ -1721,18 +1882,6 @@ </varlistentry> <varlistentry> <term> - <arg>base_default_quality(bdq)=<replaceable>integer ≥ 0</replaceable></arg> - </term> - <listitem> - <para> Default is currently <emphasis - role="underline">10</emphasis> for all sequencing - technologies. Defines the default base quality of reads that - have no quality read from file. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> <arg>enforce_presence_of_qualities(epoq)=<replaceable>on|y[es]|t[rue], off|n[o]|f[alse]</replaceable></arg> </term> <listitem> @@ -1742,7 +1891,11 @@ values loaded. </para> <note> - <arg>-AS:epoq</arg> switches on/off the quality check for a complete sequencing technology. A more fine grained control for switching checks of per readgroup is available via the <emphasis>default_qual</emphasis> readgroup parameter in the manifest file. + <arg>-AS:epoq</arg> switches on/off the quality check for a + complete sequencing technology. A more fine grained control + for switching checks of per readgroup is available via + the <emphasis>default_qual</emphasis> readgroup parameter in + the manifest file. </note> </listitem> </varlistentry> @@ -1841,12 +1994,31 @@ Parameter group: -STRAIN/BACKBONE (-SB) - General options for controlling backbone options for mapping assemblies as - well as general strain information. + Controlling backbone options in mapping assemblies: + bootstrap_new_backbone(bnb)=on|y[es]|t[rue], off|n[o]|f[alse] + + + + Default is yes for + mapping assemblies with Illumina data, no otherwise. + + + When set to 'yes', MIRA will use a two stage mapping process + which bootstraps an intermediate backbone (reference) sequence + and greatly improves mapping accuracy at indel sites. + + + Currently only works with Illumina data, other sequencing + technologies will not be affected by this flag. + + + + + startbackboneusage_inpass(sbuip)=0 < integer @@ -1875,22 +2047,6 @@ - backbone_strainname_forceforall(bsnffa)=on|y[es]|t[rue], off|n[o]|f[alse] - - - - Default is no. Useful - when using CAF as input for backbone: forces all reads of the - backbone contigs to get assigned the new backbone strain, even - if they previously had other strains assigned. - - - Main usage is in multi-step hybrid assemblies. - - - - - backbone_raillength(brl)=0 ≤ integer ≤ 10000 @@ -1918,6 +2074,36 @@ + trim_overhanging_reads(tor)=on|y[es]|t[rue], off|n[o]|f[alse] + + + + Default is yes. + + + When set to 'yes', MIRA will trim back reads at end of contigs + which outgrow the reference sequence so that boundaries of + the reference and the mapped reads align perfectly. That is, + the mapping does not perform a sequence extension. + + + The trimming is performed via setting low quality cutoffs in + the reads, i.e., the trimmed parts are not really gone but + just not part of the active contig anymore. They can be + uncovered when working on the assembly in finishing programs + like, e.g., gap4 + or gap5. + + + Previous versions of MIRA (up to and including 3.9.18) behaved + as if this option had been set to 'no'. This is a major change + in behaviour, but it is also what probably most people expect + from a mapping. + + + + + also_build_new_contigs(abnc)=on|y[es]|t[rue], off|n[o]|f[alse] @@ -1941,7 +2127,7 @@ work optimally in this mode. I recommend to use a two step approach instead: first map with MIRA, then assemble de-novo all reads which did not map. This will lead more often than - not to the results expected (and in faster time). + not to the results expected (and in shorter time). @@ -2334,41 +2520,69 @@ Default is - no. This option is useful in EST assembly. Poly-A stretches in - forward reads and poly-T stretches in reverse reads that were not correctly - masked or clipped in preprocessing steps from external programs get clipped - or tagged here. The assembler will not use these stretches for critical - operations. + yes for all EST/RNASeq + assemblies. Poly-A stretches in forward reads and poly-T + stretches in reverse reads get either clipped or tagged here + (see -CL:cpkps below). The assembler will not use + these stretches for finding overlaps, but it will use these to + discern and disassemble different 3' UTR endings. + + Should poly-A / poly-T stretches have been trimmed in + pre-processing steps before MIRA got the reads, this option + MUST be switched off. + - cp_keep_poly_signal (cpkps)=on|y[es]|t[rue], off|n[o]|f[alse] + cp_keep_poly_stretch (cpkps)=on|y[es]|t[rue], off|n[o]|f[alse] Default is - no. This option is - currently not active (as of - version 2.9.22). + yes but takes effect only + if -CL:cpat (see above) is also set to yes. - In future, this will allow to keep the poly-A signal in the - reads and tag them. The tags provide a good visual anchor when + Instead of clipping the poly-A / poly-T sequence away, the + stretch in question in the reads is kept and tagged. The tags + provide additional information for MIRA to discern between + different 3' UTR endings and alse a good visual anchor when looking at the assembly with different programs. + + One side-effect of this option is that the poly-A / poly-T + stretch are 'cleaned'. That is, single non-poly A / poly-T + bases within the stretch are automatically edited to be + conforming to the surrounding stretch. This is necessary as + homopolymers are by nature one of the hardest motifs to be + sequenced correctly by any sequencing technology and one + frequently gets 'dirty' poly-A sequence from sequencing and + this interferes heavily with the methods MIRA uses to discern + repeats. + + + Keeping the poly-A sequence is a two-edged sword: on one hand it + enabled to discern different 3' UTR endings, on the other hand + it might be that sequencing problems toward the end of reads + create false-positive different endings. If you find that this + is the case for your data, just switch off this option: MIRA + will then simply build the longest possible 3' UTRs. + - cp_min_signal_len(cpmsl)=integer > 0 + cp_min_sequence_len(cpmsl)=integer > + 0 Default is - 10. Only takes effect when -CP:cpat (see above) is - set to yes. Defines the number of ``A'' (in forward direction) - or ``T'' (in reverse direction'' must be present to be considered a poly-A - signal stretch. + 10. Only takes effect + when -CP:cpat (see above) is set + to yes. Defines the number + of 'A' (in forward direction) or 'T' (in reverse direction) must + be present to be considered a poly-A sequence stretch. @@ -2378,9 +2592,11 @@ Default is - 1. Only takes effect when -CL:cpat (see above) is set - to yes. Defines the maximum number of errors allowed in the - potential poly-A signal stretch. The distribution of these errors is not + 1. Only takes effect + when -CL:cpat (see above) is set + to yes. Defines the + maximum number of errors allowed in the potential poly-A + sequence stretch. The distribution of these errors is not important. @@ -2390,11 +2606,39 @@ cp_max_gap_from_end(cpmgfe)=integer > 0 - Default - is 9. Only takes effect when -CL:cpat (see above) is - set to yes.Defines the number of bases from the end of a - sequence (if masked: from the end of the masked area) within which a - poly-A signal stretch is looked for. + Default is 9. Only + takes effect when -CL:cpat (see above) is set + to yes.Defines the number + of bases from the end of a sequence (if masked: from the end of + the masked area) within which a poly-A sequence stretch is + looked for. + + + + + + clip_3ppolybase (c3pp)=on|y[es]|t[rue], off|n[o]|f[alse] + + + c3p* options to be described ... + + + + + clip_known_adaptorsright (ckar)=on|y[es]|t[rue], off|n[o]|f[alse] + + + + Default is yes. Defines + whether MIRA should search and clip known sequencing technology + specific sequencing adaptors. MIRA knows adaptors for Illumina + best, followed by Ion Torrent and some 454 adaptors. + + + As the list of known adaptors changes quite frequently, the + best place to get a list of known adaptors by MIRA is by + looking at the text files in the program + sources: src/mira/adaptorsforclip.*.xxd. @@ -2523,7 +2767,7 @@ Default is is dependent on --job quality: currently yes for all genome assemblies. - Switched off for EST assemblies (but one wmight want to switch + Switched off for EST assemblies (but one might want to switch it on sometimes). @@ -2576,7 +2820,7 @@ role="underline">17 and 21 for Sanger, higher for 454 (up to 27) and highest for Solexa - (31). Ion Toorent has at + (31). Ion Torrent has at the moment 17, but this may change in the future to somewhat higher values. @@ -2591,11 +2835,12 @@ - clip_phix174(cpx174)=on|y[es]|t[rue], + search_phix174(spx174)=on|y[es]|t[rue], off|n[o]|f[alse] - Default is is on for Illumina data in EST assemblies, off otherwise. + Default is on for Illumina data, off + otherwise. PhiX 174 is a small phage of enterobacteria whose DNA is often @@ -2605,14 +2850,44 @@ identification. - If it remains in the sequenced data, it most often has to be - seen as a contaminant as projects will work with organisms - which should not contain the PhiX 174 phage. However, it may - be part of some genome sequences (enterobacteria). Therefore - the conservative approach of the MIRA default values to - automatically filter only RNASeq data sets but not genome data - sets. + If it remains in the sequenced data, it has to be + seen as a contaminant for projects working with organisms + which should not contain the PhiX 174 phage. + + However, PhiX may be part of some genome sequences + (enterobacteria). In these cases, the PhiX174 search will + report genuine genome data. + + + + + + filter_phix174(fpx174)=on|y[es]|t[rue], + off|n[o]|f[alse] + + + Default is on for Illumina data in + EST (RNASeq) assemblies, off otherwise. + + + If -CL:spx174 is on and -CL:fpx174 also, + MIRA will filter out as contaminants all reads which have + PhiX174 sequence recognised. + + + The default value of having the filtering on only for Illumina + EST (RNASeq) data is a conservative approach: the overwhelming + majority of RNASeq data will indeed not sequence some + enterobacteria, so having PhiX174 containing reads thrown out + is indeed a valid move. For genomes however, MIRA currently is + cautious and will not filter these reads by default. + + + However, PhiX may be part of some genome sequences + (enterobacteria). In these cases, the PhiX174 filter will + remove reads from valid genome or expression data. + @@ -2625,7 +2900,7 @@ role="underline">2 for Solexa data in EST / RNASeq assemblies, and 0 otherwise. If this parameter is >0, MIRA will completely mask with 'X' those - parts of a read which lead to kmer occurence less than the + parts of a read which lead to kmer occurrence less than the given value. @@ -2633,7 +2908,7 @@ ultra-high coverage contigs by cleaning out very likely, low frequency sequence dependent sequencing errors which passed all previous filters. The drawback is that very rare - transcripts with an occurence less than the given value will + transcripts with an occurrence less than the given value will also be masked out. However, RNASeq gives so much data that even the rarest transcripts should normally have more reads than the default setting. @@ -2723,7 +2998,7 @@ used as a word hash. The higher the value, the faster the search. The lower the value, the more weak matches are found. Values below 10 are not recommended. Defaults are - dependend on "--job" switch. + dependent on "--job" switch. @@ -2914,9 +3189,9 @@ - During hash statistics analysism, MIRA will estimate how repetitive parts - of reads are. Parts which are occuring less than - -HS:fenn times the average occurence will be tagged + During hash statistics analysis, MIRA will estimate how repetitive parts + of reads are. Parts which are occurring less than + -HS:fenn times the average occurrence will be tagged with a HAF2 (less than average) tag. @@ -2927,10 +3202,10 @@ - During hash statistics analysism, MIRA will estimate how repetitive parts - of reads are. Parts which are occuring more than + During hash statistics analysis, MIRA will estimate how repetitive parts + of reads are. Parts which are occurring more than -HS:fenn but less than -HS:fexn times - the average occurence will be tagged with a HAF3 (normal) tag. + the average occurrence will be tagged with a HAF3 (normal) tag. @@ -2940,10 +3215,10 @@ - During hash statistics analysism, MIRA will estimate how repetitive parts - of reads are. Parts which are occuring more than + During hash statistics analysis, MIRA will estimate how repetitive parts + of reads are. Parts which are occurring more than -HS:fexn but less than -HS:fer times - the average occurence will be tagged with a HAF4 (above average) tag. + the average occurrence will be tagged with a HAF4 (above average) tag. @@ -2953,10 +3228,10 @@ - During hash statistics analysism, MIRA will estimate how repetitive parts - of reads are. Parts which are occuring more than + During hash statistics analysis, MIRA will estimate how repetitive parts + of reads are. Parts which are occurring more than -HS:fer but less than -HS:fehr times - the average occurence will be tagged with a HAF5 (repeat) tag. + the average occurrence will be tagged with a HAF5 (repeat) tag. @@ -2966,13 +3241,13 @@ - During hash statistics analysism, MIRA will estimate how repetitive parts - of reads are. Parts which are occuring more than + During hash statistics analysis, MIRA will estimate how repetitive parts + of reads are. Parts which are occurring more than -HS:fehr but less than -HS:fecr times - the average occurence will be tagged with a HAF6 (heavy - repeat) tag. Parts which are occuring more than + the average occurrence will be tagged with a HAF6 (heavy + repeat) tag. Parts which are occurring more than -HS:fecr but less than -HS:nrr times the - average occurence will be tagged with a HAF7 (crazy repeat) + average occurrence will be tagged with a HAF7 (crazy repeat) tag. @@ -3734,49 +4009,99 @@ - automatic_contig_editing(ace)=on|y[es]|t[rue], off|n[o]|f[alse] + _mira_automatic_contig_editing(mace)=on|y[es]|t[rue], off|n[o]|f[alse] - Default is no. Once - contigs have been build, MIRA can call a built-in versions of - the automatic contig editors. For Sanger reads this is EdIt, - for 454 reads it is a specially crafted editor that knows - about deficiencies of the 454 technology (homopolymers). + Default is yes. When set + to yes, MIRA will use built-in versions of own automatic + contig editors (see parameters below) to improve alignments. + + + + + edit_kmer_singlets(eks)=on|y[es]|t[rue], off|n[o]|f[alse] + + - EdIt will try to resolve discrepancies in the contig by - performing trace analysis and correct even hard to resolve - errors. This option is always useful, but especially in - conjunction with -AS:nop and - -DP:ure (see above). + Default is yes for all + sequencing technologies, but only takes effect + if -ED:mace is on (see above). - Notice 1: the current development version has a memory leak in - the editor, therefore the option is not automatically turned - on. + When set to yes, MIRA uses the alignment information of a + complete contig at places with sequencing errors which lead to + unique kmers and correct the error according to the alignment. - Notice 2: it is strongly suggested to turn this option on for - 454 data as this greatly improves the quality. + This is an extremely conservative yet very effective editing + strategy and can therefore be kept always activated. - strict_editing_mode(sem)=on|y[es]|t[rue], off|n[o]|f[alse] + edit_homopolymer_overcalls(ehpo)=on|y[es]|t[rue], off|n[o]|f[alse] - Default is yes. Only for Sanger data. If set to yes, the - automatic editor will not take error hypotheses with a low probability into - account, even if all the requirements to make an edit are fulfilled. + Default is yes for 454 + and Ion Torrent, but only takes effect if -ED:mace + is on (see above). + + + When set to yes, MIRA use the alignment information of a + complete contig at places with potential homopolymer + sequencing errors and correct the error according to the + alignment. + + + This editor should be switched on only for sequencing + technologies with known homopolymer sequencing problems. That + is: currently only 454 and Ion. - confirmation_threshold(ct)=integer, 0 < x ≤ 100 + edit_automatic_contig_editing(eace)=on|y[es]|t[rue], off|n[o]|f[alse] + + + + Default is no. When set + to yes, MIRA will use built-in versions of the "EdIt" + automatic contig editor (see parameters below) to correct + sequencing errors in Sanger reads. + + + EdIt will try to resolve discrepancies in the contig by + performing trace signal analysis and correct even hard to resolve + errors. + + + The current development version has a memory leak in + this editor, therefore the option cannot be turned + on. + + + + + + strict_editing_mode(sem)=on|y[es]|t[rue], off|n[o]|f[alse] + + + + Default is yes. Only for + Sanger data. If set to yes, the automatic editor will not take + error hypotheses with a low probability into account, even if + all the requirements to make an edit are fulfilled. + + + + + + confirmation_threshold(ct)=integer, 0 < x ≤ 100 @@ -3801,6 +4126,24 @@ + iknowwhatido(ikwid)=on|y[es]|t[rue], off|n[o]|f[alse] + + + + Default is no. This + switch tells MIRA that you know what you do in some + situations and force it not to stop when it thinks something is + really wrong, but simply continue. + + + You generally should not to set this flag except in cases + where MIRA stopped and the warning / error message told you to + get around that very specific problem by setting this flag. + + + + + large_contig_size(lcs)=integer < 0 @@ -3809,10 +4152,12 @@ Default is 500. This parameter has absolutely no influence whatsoever on the assembly process of MIRA. But is used in the reporting within - the *_assembly_info.txt file after the assembly - where MIRA reports statistics on large - and all contigs. -MI:lcs is - the threshold value for categorising contigs. + the *_assembly_info.txt file after the + assembly where MIRA reports statistics on + large contigs and + all contigs. -MI:lcs is the + threshold value for dividing the contigs into these two + categories. @@ -3836,15 +4181,28 @@ MIRA uses coverage information of an assembly project to find out about potentially repetitive areas in reads (and thus, a genome). To calculate statistics which are reflecting the - approximate truth, the value of -MI:lcs4s is used - as a cutoff threshold: contigs smaller than this value do not - contribute to the calculation of average coverage while - contigs larger or equal to this value do. Having this cutoff - discards small contigs which tend to muddy the picture of - average coverage of a project. - - - If in doubt, don't touch this parameter. + approximate truth regarding the average coverage of a genome, + the "large contig size for stats" value of + -MI:lcs4s is used as a cutoff threshold: contigs + smaller than this value do not contribute to the calculation + of average coverage while contigs larger or equal to this + value do. + + + This reflects two facts: on the one hand - especially with + short read sequencing technologies and in projects without + read pair libraries - contigs containing predominantly + repetitive sequences are of a relatively small size. On the + other hand, reads which could not be placed into contigs + (maybe due to a sequencing technology dependent motif error) + often enough form small contigs with extremely low + coverage. + + + It should be clear that one does not want any of the above + when calculating average coverage statistics and having this + cutoff discards small contigs which tend to muddy the + picture. If in doubt, don't touch this parameter. @@ -3855,19 +4213,22 @@ Parameter group: -NAG_AND_WARN (-NW) - Parameters which let MIRA warn you about unusual things or potential problems. + Parameters which let MIRA warn you about unusual things or potential + problems. The flags in this parameter section come in three + flavours: stop, warn and + no which let MIRA either stop, give a warning + or do nothing if a specific problem is detected. - stop_on_nfs(sonfs)=on|y[es]|t[rue], off|n[o]|f[alse] + check_nfs(cnfs)=stop|warn|no - Default is yes. MIRA - will check whether the tmp directory is running on an NFS - mount. If it is and -MI:sonfs is active, MIRA will - stop with a warning message. + Default is stop. MIRA + will check whether the tmp directory is running on a NFS + mount. @@ -3888,70 +4249,153 @@ - stop_on_duplicate_readnames(sodrn)=on|y[es]|t[rue], off|n[o]|f[alse] + check_duplicate_readnames(cdrn)=stop|warn|no - Default is yes. MIRA - will check read names after loading. If duplicate read names are found and -MI:sonfs is active, MIRA will - stop with a warning message. + Default is stop. MIRA + will check for duplicate read names after loading. - Duplicate read names usually hint to a serious problem with your input and should really, really be fixed. You can choose to ignore this error by switching off this flag, but this will almost certainly lead to problems with result files (ACE and CAF for sure, maybe also SAM) and probably to other unexpected effects. + Duplicate read names usually hint to a serious problem with + your input and should really, really be fixed. You can + choose to ignore this error by switching off this flag, but + this will almost certainly lead to problems with result + files (ACE and CAF for sure, maybe also SAM) and probably to + other unexpected effects. - stop_on_template_error(sote)=on|y[es]|t[rue], off|n[o]|f[alse] + check_template_problems(ctp)=stop|warn|no - Default is yes. MIRA - will check read template naming after loading. If -MI:sonfs is active and problems were found, MIRA will - stop with a warning message. + Default is stop. MIRA + will check read template naming after loading. - Problems in read template naming point to problems with read names or to broken template information. You should try to find the cause of the problem instead of ignoring this error message. + Problems in read template naming point to problems with read + names or to broken template information. You should try to + find the cause of the problem instead of ignoring this error + message. - stop_on_maxreadnamelength(somrnl)=integer ≥ - 0 + check_maxreadnamelength(cmrnl)=stop|warn|no - Default is 40. MIRA + Default is stop. MIRA will check whether the length of the names of your reads - surpass the given number and stop if this is the case. A value - of 0 will switch off the - check. + surpass the given number of characters (see -NW:mrnl). - While MIRA and many other programs have no problem with that, + While MIRA and many other programs have no problem with long read names, some older programs have restrictions concerning the length of - the read name. Example given: the pipeline CAF -> + the read name. Example given: the pipeline CAF -> caf2gap -> gap2caf will stop working at the gap2caf stage if there are read names having > 40 characters where the names differ only at >40 characters. - This is a warning only, but as a couple of - people were bitten by this, the default behaviour of MIRA - is to stop when it sees that potential problem. You - might want to rename your reads to have ≤ 40 characters + This should be a warning only, but as a couple of people were + bitten by this, the default behaviour of MIRA is to stop when + it sees that potential problem. You might want to rename your + reads to have ≤ 40 characters. On the other hand, you also can ignore this potential problem and force MIRA to continue by using the parameter: - -NW:somrnl=0 + -NW:cmrnl=warn or -NW:cmrnl=no + + + + + + maxreadnamelength(mrnl)=integer ≥ + 0 + + + + Default is 40. This + defines the effective check length for -NW:cmrnl. + + + + + + check_average_coverage(cac)=stop|warn|no + + + + Default is stop. In + genome de-novo assemblies, MIRA will perform checks early in + the assembly process whether the average coverage to be + expected exceeds a given value (see -NW:acv). + + + With todays' sequencing technologies (especially Illumina, but + also Ion Torrent and 454), many people simply take everything + they get and throw it into an assembly. Which, in the case of + Illumina and Ion, can mean they try to assemble their organism + with a coverage of 100x, 200x and more (I've seen trials with + more than 1000x). + + + This is not good. Not. At. All! For two reasons (well, three + to be precise). + + + The first reason is that, usually, one does not sequence a + single cell but a population of cells. If this population is + not clonal (i.e., it contains subpopulations with genomic + differences with each other), assemblers will be able to pick + up these differences in the DNA once a certain sequence count + is reached and they will try reconstruct a genome containing + all clonal variations, treating these variations as potential + repeats with slightly different sequences. Which, of course, + will be wrong and I am pretty sure you do not want that. + + + The second and way more important reason is that none of the + current sequencing technologies is completely error free. Even + more problematic, they contain both random and non-random + sequencing errors. Especially the latter can become a big + hurdle if these non-random errors are so prevalent that they + suddenly appear to be valid sequence to an assembler. This in + turn leads to false repeat detection, hence possibly contig + breaks or even wrong consensus sequence. You don't want that, + do you? + + + The last reason is that overlap based assemblers (like MIRA + is) need exponentially more time and + memory when the coverage increases. So keeping the coverage + comparatively low helps you there. + + + + + + average_coverage_value(acv)=integer ≥ + 0 + + + + Default is 80 for + de-novo assemblies, in mapping assemblies it is 120 for Ion + Torrent and 160 for Illumina data (might change in + future). This defines the effective coverage to check for in + -NW:cac. @@ -3972,8 +4416,8 @@ Default is an empty string. When set to a non-empty string, - MIRA will create the tmp directory at the given location - instead of using the current working directory. + MIRA will create the MIRA-temporary directory at the given + location instead of using the current working directory. This option is particularly useful for systems which have @@ -3987,6 +4431,12 @@ In both cases above, and for larger projects, MIRA then runs a lot faster. + + Prior to MIRA 4.0rc2, users had to make sure themselves that + the target directory did not already exist. MIRA now handles + this automatically by creating directory names with a random + substring attached. + @@ -4112,16 +4562,15 @@ - Default is yes for - projects only with Sanger reads, 'no' as soon as there are - 454, Solexa or SOLiD reads involved. + Default is no. - MIRA will automatically switch to no (and cannot be forced to 'yes') - when 454 or Solexa reads are present in the project as this - ensure that the file system does not get flooded with millions - of files. + If set to yes, MIRA will + automatically switch back + to no (and cannot be + forced to 'yes') when 454 or Solexa reads are present in the + project as this ensure that the file system does not get + flooded with millions of files. @@ -4395,13 +4844,24 @@ - Resuming assemblies + Resuming / restarting assemblies - It may happen that a MIRA run is interrupted - sometimes rather harshly - due to events more or less outside your control like, e.g., power failures, machine shutdowns for maintenance, missing disk space, run-time quotas etc. This may be less of a problem when assembling or mapping small data sets with run times between a couple of minutes up to a few hours, but becomes a nuisance for larger data sets like in small eukaryotes or RNASeq samples where the run time is measured in days. + It may happen that a MIRA run is interrupted - sometimes rather harshly + - due to events more or less outside your control like, e.g., power + failures, machine shutdowns for maintenance, missing disk space, + run-time quotas etc. This may be less of a problem when assembling or + mapping small data sets with run times between a couple of minutes up to + a few hours, but becomes a nuisance for larger data sets like in small + eukaryotes or RNASeq samples where the run time is measured in days. - For cases like these, MIRA has a resume functionality: at predefined points in the assembly process, MIRA writes out special files to disk which enables it to resume the assembly at the point where these files were written. Starting MIRA in resume mode is pretty easy: simply add the resume flag -r on a command line like this: + For cases like these, MIRA has a resume + functionality: at predefined points in the assembly process, MIRA writes + out special files to disk which enables it to resume the assembly at the + point where these files were written. Starting MIRA in resume mode is + pretty easy: simply add the resume flag -r on a command line + like this: $ mira -r ... @@ -4434,7 +4894,7 @@ projectname_d_info: this directory contains information files of the final assembly. They provide statistics as well as, e.g., - information (easily parseable by scripts) on which read is found in which + information (easily parsable by scripts) on which read is found in which contig etc. @@ -4498,7 +4958,7 @@ text contain visual representations of the assembly suited for viewing in browsers or as simple text file. tcs is a summary of a contig suited - for "quick" analyses from command-line tools or even visual + for "quick" analysis from command-line tools or even visual inspection. wig is a file containing coverage information (useful for mapping assemblies) which can be loaded and shown by different genome browsers (IGB, GMOD, @@ -4519,9 +4979,18 @@ + + + projectname_LargeContigs_out.<type> + + + These files are only written when MIRA runs in + de-novo mode. They usually contain a subset + of contigs deemed 'large' from the whole project. More details + are given in the chapter "working with results of MIRA." + + - - @@ -4576,6 +5045,9 @@ reads, maximum and average coverage, average read length, number of A, C, G, T, N, X and gaps in consensus. </para> + <warning> + For contigs containing digitally normalised reads, the coverage numbers may sometimes seem strange. E.g.: a contig may contain only one read, but have an average coverage of 3. This means that the read was a representative for 3 reads. The coverage numbers are computed as if all 3 reads had been assembled instead of the representative. In EST/RNASeq projects, these numbers thus represent the (more or less) true expression coverage. + </warning> </listitem> </varlistentry> <varlistentry> @@ -4591,6 +5063,16 @@ </varlistentry> <varlistentry> <term> + <filename><replaceable>projectname</replaceable>_info_largecontigs.txt</filename> + </term> + <listitem> + <para>For de-novo assemblies, this file contains the name of the + contigs which pass the (adaptable) 'large contig' criterion. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> <filename><replaceable>projectname</replaceable>_info_readrepeats.lst</filename> </term> <listitem> @@ -4638,6 +5120,30 @@ </varlistentry> <varlistentry> <term> + <filename><replaceable>projectname</replaceable>_info_WARNINGS_*.txt</filename> + </term> + <listitem> + <para> + These files collect warning messages MIRA dumped out + throughout the assembly process. These warnings cover a wide + area of things monitored by MIRA and can - together with the + output written to STDOUT - give an insight as to why an + assembly does not behave as expected. There are three warning + files representing different levels of + criticality: <emphasis>critical</emphasis>, <emphasis>medium</emphasis> + and <emphasis>minor</emphasis>. These files may be empty, + meaning that no warning of the corresponding level was + printed. It is strongly suggested to have a look at least at + critical warnings during and after an assembly run. + </para> + <note> + These files are quite new to MIRA and not all warning messages + appear there yet. This will come over time. + </note> + </listitem> + </varlistentry> + <varlistentry> + <term> <filename><replaceable>projectname</replaceable>_error_reads_invalid</filename> </term> <listitem> @@ -4663,33 +5169,36 @@ <variablelist> <varlistentry> <term> - <filename>EXP</filename> + <filename>ACE</filename> </term> <listitem> - <para> Standard experiment files used in genome - sequencing. Correct EXP files are expected. Especially the ID - record (containing the id of the reading) and the LN record - (containing the name of the corresponding trace file) should be - correctly set. See <ulink - url="http://www.sourceforge.net/projects/staden/"/> for links to - online format description. + <para> This old assembly file format used mainly by phrap and + consed. Support for .ace output is currently only in test status in + MIRA as documentation on that format is ... sparse and I currently + don't have access to consed to verify my assumptions. + </para> + <para> Using consed, you will need to load projects with -nophd to + view them. Tags /in reads and consensus) are fully supported. The + only hitch: consed has a bug which prevents it to read consensus + tags which are located throughout the whole file (as MIRA writes + per default). The solution to that is easy: filter the CAF file + through the fixACE4consed.tcl script which is provided in the MIRA + distributions, then all should be well. + </para> + <para> If you don't have consed, you might want to try clview + (<ulink url="http://www.tigr.org/tdb/tgi/software/"/>) from TIGR + to look at .ace files. </para> </listitem> </varlistentry> <varlistentry> <term> - <filename>SCF</filename> + <filename>BAM</filename> </term> <listitem> - <para> The Staden trace file format that has established itself as - compact standard replacement for the much bigger ABI files. See - <ulink url="http://www.sourceforge.net/projects/staden/"/> for - links to online format description. - </para> - <para> - The SCF files should be V2-8bit, V2-16bit, V3-8bit or V3-16bit - and can be packed with compress or gzip. - </para> + The binary cousin of the SAM format. MIRA neither reads nor writes + BAM, but BAMs can be created out of SAMs (which can be created via + <command>miraconvert</command>). </listitem> </varlistentry> <varlistentry> @@ -4707,35 +5216,66 @@ </varlistentry> <varlistentry> <term> - <filename>ACE</filename> + <filename>EXP</filename> </term> <listitem> - <para> The assembly file format used mainly by phrap and - consed. Support for .ace output is currently only in test status in - MIRA as documentation on that format is ... sparse and I currently - don' have access to consed to verify my assumptions. + <para> Standard experiment files used in genome + sequencing. Correct EXP files are expected. Especially the ID + record (containing the id of the reading) and the LN record + (containing the name of the corresponding trace file) should be + correctly set. See <ulink + url="http://www.sourceforge.net/projects/staden/"/> for links to + online format description. </para> - <para> Using consed, you will need to load projects with -nophd to - view them. Tags /in reads and consensus) are fully supported. The - only hitch: consed has a bug which prevents it to read consensus - tags which are located throughout the whole file (as MIRA writes - per default). The solution to that is easy: filter the CAF file - through the fixACE4consed.tcl script which is provided in the MIRA - distributions, then all should be well. + </listitem> + </varlistentry> + <varlistentry> + <term> + <filename>FASTA</filename> + </term> + <listitem> + <para> A simple format for sequence data, see + <ulink url="http://www.ncbi.nlm.nih.gov/BLAST/fasta.html"/>. An + often used extension of that format is used to also store quality + values in a similar fashion, these files have a .fasta.qual + ending. </para> - <para> If you don't have consed, you might want to try clview - (<ulink url="http://www.tigr.org/tdb/tgi/software/"/>) from TIGR - to look at .ace files. + <para> + MIRA writes two kinds of FASTA files for + results: <emphasis>padded</emphasis> and + <emphasis>unpadded</emphasis>. The difference is that the padded + version still contains the gap (pad) character (an asterisk) at + positions in the consensus where some of the reads apparently + had some more bases than others but where the consensus routines + decided that to treat them as artifacts. The + <emphasis>unpadded</emphasis> version has the gaps removed. </para> </listitem> </varlistentry> <varlistentry> <term> - <filename>MAF</filename> + <filename>GBF, GBK</filename> </term> <listitem> - <para> MIRA Assembly Format (MAF). A faster and more compact form - than EXP, CAF or ACE. See documentation in separate file. + <para> GenBank file format as used at the NCBI to describe + sequences. MIRA is able to read and write this format (but only + for viruses or bacteria) for using sequences as backbones in an + assembly. Features of the GenBank format are also transferred + automatically to Staden compatible tags. + </para> + <para> + If possible, use GFF3 instead (see below). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <filename>GFF3</filename> + </term> + <listitem> + <para> General feature format used to describe sequences and + features on these sequences. MIRA is able to read and write this + format. </para> </listitem> </varlistentry> @@ -4752,24 +5292,11 @@ </varlistentry> <varlistentry> <term> - <filename>FASTA</filename> + <filename>MAF</filename> </term> <listitem> - <para> A simple format for sequence data, see - <ulink url="http://www.ncbi.nlm.nih.gov/BLAST/fasta.html"/>. An - often used extension of that format is used to also store quality - values in a similar fashion, these files have a .fasta.qual - ending. - </para> - <para> - MIRA writes two kinds of FASTA files for - results: <emphasis>padded</emphasis> and - <emphasis>unpadded</emphasis>. The difference is that the padded - version still contains the gap (pad) character (an asterisk) at - positions in the consensus where some of the reads apparently - had some more bases than others but where the consensus routines - decided that to treat them as artifacts. The - <emphasis>unpadded</emphasis> version has the gaps removed. + <para> MIRA Assembly Format (MAF). A faster and more compact form + than EXP, CAF or ACE. See documentation in separate file. </para> </listitem> </varlistentry> @@ -4787,13 +5314,31 @@ </varlistentry> <varlistentry> <term> - <filename>GBF, GBK</filename> + <filename>SAM</filename> </term> <listitem> - <para> GenBank file format as used at the NCBI to describe - sequences. MIRA is able to read this format for using sequences as - backbones in an assembly. Features of the GenBank format are also - transferred automatically to Staden compatible tags. + <para> The Sequence Alignment/Map Format. MIRA does not write SAM + directly, but <command>miraconvert</command> can be used for + converting a MAF (or CAF) file to SAM. + </para> + <para> + MIRA cannot read SAM though. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <filename>SCF</filename> + </term> + <listitem> + <para> The Staden trace file format that has established itself as + compact standard replacement for the much bigger ABI files. See + <ulink url="http://www.sourceforge.net/projects/staden/"/> for + links to online format description. + </para> + <para> + The SCF files should be V2-8bit, V2-16bit, V3-8bit or V3-16bit + and can be packed with compress or gzip. </para> </listitem> </varlistentry> @@ -4817,7 +5362,7 @@ <listitem> <para> Transpose Contig Summary. A text file as written by MIRA which gives a summary of a contig in tabular fashion, one line per - base. Nicely suited for "quick" analyses from command line tools, + base. Nicely suited for "quick" analysis from command line tools, scripts, or even visual inspection in file viewers or spreadsheet programs. </para> @@ -5246,7 +5791,7 @@ <note> <title>Important side note Due to the digital normalisation step, the coverage numbers in the info file - regarding contig statistics will not represnt the number of + regarding contig statistics will not represent the number of reads in the contig, but they will show an approximation of the true coverage or expression value as if there had not been a digital normalisation step performed. The approximation may @@ -5265,15 +5810,15 @@ is why "_rep_c" contigs occur late in a genome assembly. - For EST/RNASeq assemblies, the distinction between _c and - _rep_c makes less sense (a euphemism for "no - sense at all"), but EST assemblies also use this scheme for no better - reason than me not having an alternative or better naming scheme - there. However, MIRA has a different understanding of "rock solid" - when in EST/RNASeq assembly: here, MIRA will try to reconstruct a full - length gene sequence, starting with the most abundant genes. This is - why one more often sees "_rep" contigs at the beginning of a - EST/RNASeq assembly. + For EST/RNASeq assemblies, the distinction between + _c and _rep_c makes less + sense (which is, let's be clear, an euphemism for "no sense at all"), + but EST assemblies also use this scheme for no better reason than me + not having an alternative or better naming scheme there. However, MIRA + has a different understanding of "rock solid" when in EST/RNASeq + assembly: here, MIRA will try to reconstruct a full length gene + sequence, starting with the most abundant genes. This is why one more + often sees "_rep" contigs at the beginning of a EST/RNASeq assembly. Depending on the settings of -AS:mrpc, your project may or @@ -5289,12 +5834,18 @@ In case you used strain information in an assembly, you can recover the consensus for just any given strain - by using convert_project and convert from a + by using miraconvert and convert from a full assembly format (e.g. MAF or CAF) which also carries strain information to FASTA. MIRA will automatically detect the strain information and create one FASTA file per strain encountered. + + It will also create a blend of all strains encountered and + conveniently add "AllStrains" to the name of these files. Note that + this blend may or may not be something you need, but in some + cases I found it to be useful. + @@ -5327,11 +5878,11 @@ - FpAS: GenBank feature for a poly-A signal. Used in EST, cDNA or + Fpas: GenBank feature for a poly-A sequence. Used in EST, cDNA or transcript assembly. Either read in the input files or set when using - -CL:cpat. This allows to keep the poly-A signal in the reads - during assembly without them interfering as massive repeats or as - mismatches. + -CL:cpat. This allows to keep the poly-A sequence in + the reads during assembly without them interfering as massive + repeats or as mismatches. @@ -5580,7 +6131,7 @@ MIRA filters out these reads in different stages: before and after read clipping, during the SKIM stage, during the Smith-Waterman overlap checking stage or during contig building. The exact place where these - single reads land is dependend on why they do not align with other + single reads land is dependent on why they do not align with other reads. Reads landing in the debris file will have the reason and stage attached to the decision. @@ -5788,7 +6339,7 @@ of the input data set: a repeat with n copies in a genome will always be represented by reads forming n copies of the repeat in the reduced data set. Furthermore, subsampling is comparatively - insensitive to motif dependend sequencing errors. On the downside, + insensitive to motif dependent sequencing errors. On the downside, subsampling will more probably loose rare events of the data set (e.g., rare SNPs of a cell population or rare transcripts in EST/RNASeq). Also, in EST/RNASeq projects, subsampling will not be @@ -5847,7 +6398,7 @@ Digital normalisation should not be done prior to an assembly with - MIRA, rather the MIRA paramater to perform a digital normalisation + MIRA, rather the MIRA parameter to perform a digital normalisation on the complete data set should be used. @@ -5856,12 +6407,22 @@ assemblies may also profit from this feature. - MIRA keeps track of the approximate coverage represented by the - reads chosen in the digital normalisation process. That is, MIRA is - able to give approximate coverage numbers as if digital - normalisation had never happened. The approximation may be around 10 - to 20% below the true value. Contigs affected by this coverage - approximation are denoted with an additional "_dn" in their name. + + MIRA keeps track of the approximate coverage represented by the + reads chosen in the digital normalisation process. That is, MIRA is + able to give approximate coverage numbers as if digital + normalisation had never happened. The approximation may be around 10 + to 20% below the true value. Contigs affected by this coverage + approximation are denoted with an additional "_dn" in their name. + + + Due to the digital + normalisation step, the coverage numbers in the info file + regarding contig statistics will not represent the number of + reads in the contig, but they will show an approximation of + the true coverage or expression value as if there had not been + a digital normalisation step performed. + @@ -5872,7 +6433,7 @@ - Using data not from sequencing instruments: artifical / syntethic reads + Using data not from sequencing instruments: artificial / synthetic reads The default parameters for MIRA assemblies work best when given real @@ -5885,7 +6446,7 @@ If one doesn't take utter care to make these artificial reads at least behave a little bit like real sequencing data, a number of quality - ensurance algorithms of MIRA might spot that they "look funny" and + insurance algorithms of MIRA might spot that they "look funny" and trim back these artificial reads ... sometimes even removing them completely. @@ -5955,14 +6516,15 @@ - Sequencing type/technology: MIRA currently knows Sangers, 454, Ion - Torrent, Solexa and PacBio as sequencing technologies, every read - entered in an assembly must be one of those. + Sequencing type/technology: MIRA currently knows Sanger, 454, Ion + Torrent, Solexa, PacBioHQ/LQ and "Text" as sequencing + technologies, every read entered in an assembly must be one of + those. Artificial reads should be classified depending on the data they were created from, that is, Sanger for consensus of Sanger reads, - 454 for consensus of 454 reads etc. However, Should reads created + 454 for consensus of 454 reads etc. However, should reads created from Illumina consensus be much longer than, say, 200 or 300 bases, you should treat them as Sanger reads. @@ -6022,7 +6584,7 @@ distributed across the genome, MIRA will enforce an average coverage and temporarily reject reads from a contig when this average coverage multiplied by a safety factor is reached at a given - site. This strategy reduces overcompression of repeats during the + site. This strategy reduces over-compression of repeats during the contig building phase and keeps reads in reserve for other copies of that repeat. @@ -6066,7 +6628,7 @@ Pass p+1 to end: the "possibly repetitive" reads get a much tougher treatment in MIRA. Amongst other things, when building the contig, the contig - now looks that "possibly repetitive" reads do not overstack by an average + now looks that "possibly repetitive" reads do not over-stack by an average coverage multiplied by a safety value (-AS:urdcm) which we'll assume now to be 1.5 in this example. So, at a certain point, say when read 14 or 15 of that possible repeat want to be aligned to the contig at this given @@ -6078,7 +6640,7 @@ file. - Tough luck. I do have ideas on how to reintegrate those reads at the and of an + Tough luck. I do have ideas on how to re-integrate those reads at the and of an assembly, but I have deferred doing this as in every case I had looked up, adding those reads to the contigs wouldn't have changed anything ... there's already enough coverage. @@ -6094,32 +6656,34 @@ Keeping 'long' repetitive contigs separate - MIRA had since 2.9.36 a feature to keep long repeats in separate contigs - (-AS:klrs). Due to algorithm changes, this feature is now standard - (even if the command line parameter is still present). The effect of this is - that contigs with non-repetitive sequence will stop at a 'long repeat' border, - including only the first few bases of the repeat. Long repeats will be kept as - separate contigs. - - - This has been implemented to get a clean overview on which parts of an - assembly are 'safe' and which parts will be 'difficult'. For this, the naming - of the contigs has been extended: contigs named with a '_c' at the end are - contigs which contain mostly 'normal' coverage. Contigs with "rep_c" are - contigs which contain mostly sequence classified as repetitive and which could - not be assembled together with a 'c' contig. - - - The question remains: what are 'long' repeats. MIRA defines these as repeats - that are not spanned by any read that has non-repetitive parts at the end. So, - basically, the mean length of the reads that go into the assembly defines the + MIRA had since 2.9.36 a feature to keep long repeats in separate + contigs. Due to algorithm changes, this feature is now standard. The + effect of this is that contigs with non-repetitive sequence will + stop at a 'long repeat' border which cannot be crossed by a single + read or by paired reads, including only the first few bases of the + repeat. Long repeats will be kept as separate contigs. + + + This has been implemented to get a clean overview on which parts of + an assembly are 'safe' and which parts will be 'difficult'. For + this, the naming of the contigs has been extended: contigs named + with a '_c' at the end are contigs which contain mostly 'normal' + coverage. Contigs with "rep_c" are contigs which contain mostly + sequence classified as repetitive and which could not be assembled + together with a 'c' contig. + + + The question remains: what are 'long' repeats? MIRA defines these as + repeats that are not spanned by any read that has non-repetitive + parts at the end. Basically -for shotgun assemblies - the mean + length of the reads that go into the assembly defines the minimum length of 'long' repeats that have to be kept in separate contigs. - It has to be noted that when using paired-end (or template) sequencing, 'long' - repeats which can be spanned by read-pairs (or templates) are mostly - integrated into 'normal' contigs as MIRA can correctly place them most of the - time. + It has to be noted that when using paired-end (or template) + sequencing, 'long' repeats which can be spanned by read-pairs (or + templates) are frequently integrated into 'normal' contigs as MIRA + can correctly place them most of the time. @@ -6256,7 +6820,7 @@ The recommended way to deal with this problem is: import the results from MIRA into your finishing program like you always do. Then finish the genome there, export the project from the finishing program as CAF and finally use - convert_project (from the MIRA package ) with the "-r" option to + miraconvert (from the MIRA package ) with the "-r" option to recalculate the optimal consensus of your finished project. @@ -6269,12 +6833,12 @@ - Then, use convert_project with option '-r' to + Then, usemiraconvert with option '-r' to convert it into any other format that you need. Example for converting to a CAF and a FASTA format with correct consensus: -$ convert_project -f caf -t caf -t fasta -r c demo3.caf final_result +$ miraconvert -t caf -t fasta -r c demo3.caf final_result @@ -6313,26 +6877,19 @@ - Sequence data produced by electrophoresis rarely surpasses 1000 usable - bases and I never heard of, let alone seen, more than 1100. The fast - filtering SKIM relies on the fact that sequences will never exceed 10000 - bases in length. + Problems which might arise with 'unnatural' long sequence + reads: my implementation of the Smith-Waterman alignment + routines. I use a banded version with linear running time + (linear to the bandwidth) but quadratic space usage. So, + comparing two 'reads' of length 5000 will result in memory + usage of 95 MiB, two reads with 50000 bases will need 9.5 GiB. - - - The next problem that might arise with 'unnatural' long sequence - reads will be my implementation of the Smith-Waterman alignment - routines. I use a banded version with linear running time (linear - to the bandwidth) but quadratic space usage. So, comparing two - 'reads' of length 5000 will result in memory usage of 100MB. I - know that this could be considered as a flaw. On the other hand - - unless someone comes up with electrophoresis producing reads with - more than 2000 usable bases - I see no real need to change this as - long as there are more important things on the TODO list. Of - course, if anyone is willing to contribute a fast banded SW - alignment routine which runs in linear time and space, just feel - free to contact the author. + This problem has become acute now with PacBio, I'm working on + it. In the mean time, current usable sequence length of PacBio + are more in the 3 to 4 kilobase range, with only a few reads + attaining or surpassing 20 kb. So Todays' machines should + still be able to handle the problem more or less effortlessly. @@ -6450,6 +7007,12 @@ experience tells the result will rather be a bloody mess. + Well, assembling without quality values is a bit like above, but + bloodier. And the worst: you (or the people using the results of such + an assembly) will notice the gore only until it is way too late and + money has been sunk in follow-up experiments based on wrong data. + + All MIRA routines internally are geared toward quality values guiding decisions. No one should ever assembly anything without quality values. Never. Ever. Even if quality values are sometimes inaccurate, @@ -6459,7 +7022,8 @@ Now, there are very rare occasions where getting quality values is not possible. If you absolutely cannot get them, and I mean only in this case, use the following - switch:--noqualities[=SEQUENCINGTECHNOLOGY] and additionally give a default quality for reads of a readgroup. E.g.: + switch:--noqualities[=SEQUENCINGTECHNOLOGY] and + additionally give a default quality for reads of a readgroup. E.g.: parameters= --noqualities=454 @@ -6469,9 +7033,9 @@ default_qual=30 This tells MIRA not to complain about missing quality values and to - fake a quality value of 30 for all reads (of a readgroup) having no qualities, allowing - some MIRA routines (in standard parameter settings) to start - disentangling your repeats. + fake a quality value of 30 for all reads (of a readgroup) having no + qualities, allowing some MIRA routines (in standard parameter + settings) to start disentangling your repeats. Doing the above has some severe side-effects. You will be, e.g., at @@ -6535,7 +7099,7 @@ Reading result files from ssaha2 or - smalt from the Sanger centre is supported + smalt from the Sanger Centre is supported directly by MIRA to perform a fast and efficient tagging of sequencing vector stretches. This makes you basically independent from any other commercial or license-requiring vector screening @@ -6703,9 +7267,10 @@ After subscribing, mail general questions to the MIRA talk mailing list: mira_talk@freelists.org -To report bugs or ask for features, please use the new ticketing system at: - http://sourceforge.net/apps/trac/mira-assembler/ -This ensures that requests don't get lost. +To report bugs or ask for features, please use the SourceForge ticketing +system at: + http://sourceforge.net/p/mira-assembler/tickets/ +This ensures that requests do not get lost. [...] @@ -6798,14 +7363,6 @@ able to trace the reason yet. - - - There's an unexpected bug for MacOS which leads to rubbish - assemblies on large data sets which assemble totally fine with Linux - versions of MIRA. I have not been able to find out the reason for - this yet. - - @@ -6825,13 +7382,6 @@ end of the sequences. - - - The assignment of reads to debris or singlets and whether or not - they are put into the final result is messy, the statistic numbers - about this sometimes even wrong. Needs to be redone. - - @@ -6847,19 +7397,8 @@ - Making parts of the process multi-threaded (currently stopped due to - other priorities like Solexa etc.) - - - - - Less disk usage when using EST assembly on 10 or more million Solexa - reads - - - - - Others nifty ideas that I have not completely thought out yet. + Making Smith-Waterman parts of the process multi-threaded or use SIMD + (currently stopped due to other priorities like PacBio etc.) @@ -6871,8 +7410,8 @@ Working principles - Note: description is old and needs to be adapted to the current 2.9.x / - 3.x line. + Note: description is old and needs to be adapted to the current 4.x line + of MIRA. To avoid the "garbage-in, garbage-out" problematic, MIRA uses a 'high @@ -6936,7 +7475,7 @@ the alignment graph (through in-depth analysis up to a given level) and then adding the most probable overlap candidates to a given contig. Contigs may reject reads if these introduce to many errors - in the existing consensus. Errors in regions known as dangerous + in the existing consensus. Errors in regions known as dangerous (for the time being only ALUS and REPT) get additional attention by performing simple signal analysis when alignment discrepancies occur. diff -Nru mira-3.9.18/doc/docbook/chap_results_part.xml mira-4.0/doc/docbook/chap_results_part.xml --- mira-3.9.18/doc/docbook/chap_results_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_results_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -51,7 +51,7 @@ projectname_d_info: this directory contains information files of the final assembly. They provide statistics as well as, e.g., information - (easily parseable by scripts) on which read is found in which + (easily parsable by scripts) on which read is found in which contig etc. @@ -84,10 +84,10 @@ The following files in projectname_d_results contain results of the assembly in different formats. Depending on the - output options of MIRA, some files may or may not be there. As long as - the CAF or MAF format are present, you can translate your assembly - later on to about any supported format with the - convert_project program supplied with the MIRA + output options you defined for MIRA, some files may or may not be + there. As long as the CAF or MAF format are present, you can translate + your assembly later on to about any supported format with the + miraconvert program supplied with the MIRA distribution: @@ -151,6 +151,39 @@ + + + Additional 'large contigs' result files for de-novo assemblies of genomes + + + For de-novo assemblies of genomes, MIRA makes a proposal regarding + which contigs you probably want to have a look at ... and which ones + you can probably forget about. + + + This proposal relies on the largecontigs file + in the info directory (see section below) and MIRA automatically + extracted these contigs into all the formats you wanted to have your + results in. + + + + + The result files for 'large contigs' are all named: + projectname_LargeContigs_out.resulttype: + + + + + extractLargeContigs.sh: this is a small + shell script which just contains the call + to miraconvert with which MIRA extracted the + large contigs for you. In case you want to redefine what large + contigs are for you, feel free to use this as template. + + + + @@ -212,6 +245,30 @@ </listitem> <listitem> <para> + <filename><replaceable>projectname</replaceable>_info_largecontigs.txt</filename>: + This file contains as simple list the names of all the contigs + MIRA thinks to be more or less important at the end of the + assembly. To be present in this list, a contig needed to reach a + certain length (usually 500, but see <arg>-MI:lcs</arg>) and had a + coverage of at least 1/3 of the average coverage (per sequencing + technology) of the complete project. + </para> + <para> + Note: only present for de-novo assemblies of genomes. + </para> + <warning> + The default heuristics (500bp length and 1/3 coverage per + sequencing technology) generally work well enough for most + projects. However, Projects with extremely different coverage + numbers per sequencing technology may need to use different + numbers. E.g.: a project with 80x Illumina and 6x Sanger would + have contigs consisting only of 2 or 3 Sanger sequence but with + the average coverage >= 2 also in this list although clearly no + one would look at these under normal circumstances. + </warning> + </listitem> + <listitem> + <para> <filename><replaceable>projectname</replaceable>_info_readrepeats</filename>: This file helps to find out which parts of which reads are quite repetitive in a project. Please consult the chapter on how to @@ -249,7 +306,7 @@ </sect1> - <sect1 id="sect_first_look:_the_assembly_info"> + <sect1 id="sect_res_first_look:the_assembly_info"> <title> First look: the assembly info @@ -328,7 +385,7 @@ numbers give the respective lengths. - The next section shows information about the coverage assessement of + The next section shows information about the coverage assessment of large contigs. An example: @@ -387,7 +444,7 @@ consensus which might point at problems. - The above mentioned sections (length assessemnt, coverage assessment and + The above mentioned sections (length assessment, coverage assessment and quality assessment) for large contigs will then be re-iterated for all contigs, this time including also contigs which MIRA did not take into account as large contig. @@ -397,26 +454,26 @@ Converting results - + - Converting to and from other formats: convert_project + Converting to and from other formats:<command>miraconvert</command> - convert_project is tool in the MIRA package which + miraconvert is tool in the MIRA package which reads and writes a number of formats, ranging from full assembly formats like CAF and MAF to simple output view formats like HTML or plain text. -
    - <command>convert_project</command> supports a wide range of + <figure id="chap_res::results_miraconvert.png"> + <title><command>miraconvert</command> supports a wide range of format conversions to simplify export / import of results to and from other programs - Format conversions with convert_project + Format conversions with miraconvert - +
    @@ -446,8 +503,8 @@
    Please also read the chapter on MIRA utilities in this manual to learn - more on convert_project and have a look at - convert_project -h which lists all possible formats + more on miraconvert and have a look at + miraconvert -h which lists all possible formats and other command line options. @@ -471,7 +528,7 @@ You need the caf2gap and gap2caf utilities for this, which are - distributed separately from the Sanger Centrem + distributed separately from the Sanger Centre ). Conversion is pretty straightforward. From MIRA to gap4, it's like this: @@ -488,7 +545,7 @@ $ gap2caf -project YOURGAP4PROJECTNAME >tmp.caf -$ convert_project -f caf -t caf -r c tmp.caf somenewname +$ miraconvert -r c tmp.caf somenewname.caf Using gap2caf, be careful to use the simple > redirection to file and @@ -497,12 +554,12 @@ Using first gap2caf and then - convert_project is needed as gap4 writes an + miraconvert is needed as gap4 writes an own consensus to the CAF file which is not necessarily the best. Indeed, gap4 does not know about different sequencing technologies like 454 and treats everything as Sanger. Therefore, using - convert_project with the -r c option + miraconvert with the -r c option recalculates a MIRA consensus during the "conversion" from CAF to CAF. @@ -566,16 +623,16 @@ Converting to SAM is done by - using convert_project on a MIRA MAF file, like this: + using miraconvert on a MIRA MAF file, like this: -$ convert_project -f maf -t sam INPUT.maf OUTPUT +$ miraconvert maf -t sam INPUT.maf OUTPUT The above will create a file named OUTPUT.sam. Converting from SAM to a format which either mira - or convert_project can understand takes a few + or miraconvert can understand takes a few more steps. As neither tool currently reads SAM natively, you need to go via the gap5 editor of the Staden package: convert the SAM via tg_index to a gap5 database, @@ -589,27 +646,20 @@ Filtering results - It is important to remember that some assembly options of MIRA improve - the overall assembly while increasing the number of contig - debris, i.e. small contigs with low coverage that can - probably be discarded. One infamous option is the option to use - uniform read distribution (-AS:urd) - which helps to reconstruct identical repeats across multiple locations - in the genome but as a side effect, some redundant reads will end up as - typical contig debris. You probably do not want to have a look at contig - debris when finishing a genome unless you are really, really, really - picky. - - - By default, the result files of MIRA contain everything which might play - a role in automatic assembly post-processing pipelines as most - sequencing centers have implemented. + It is important to remember that, depending on assembly options, MIRA + will also include very small contigs (with eventually very low coverage) + made out of reads which were rejected from the "good" contigs for + quality or other reasons. You probably do not want to have a look at + this contig debris when finishing a genome unless you are really, + really, really picky. Many people prefer to just go on with what would be large - contigs. Therefore the convert_project program from - the MIRA package can selectively filter CAF or MAF files for contigs - with a certain size, average coverage or number of reads. + contigs. Therefore, in de-novo assemblies, MIRA writes out separate + files of what it thinks are "good", large contigs. In case you want to + extract contigs differently, the miraconvert program + from the MIRA package can selectively filter CAF or MAF files for + contigs with a certain size, average coverage or number of reads. The file *_info_assembly.txt in the info directory @@ -677,20 +727,20 @@ 1000 bases and with a minimum average coverage of 4 into FASTA format: -$ convert_project -f maf -t fasta -x 1000 -y 4 sourcefile.maf targetfile.fasta +$ miraconvert -x 1000 -y 4 sourcefile.maf targetfile.fasta Example (useful with assemblies of 454 data): extracting only contigs ≥ 500 bases into FASTA format: -$ convert_project -f maf -t fasta -x 500 sourcefile.maf targetfile.fasta +$ miraconvert -x 500 sourcefile.maf targetfile.fasta Example (e.g. useful with Sanger/454 hybrid assemblies): extracting only contigs ≥ 500 bases and with an average coverage ≥ 15 reads into CAF format, then converting the reduced CAF into a Staden GAP4 project: -$ convert_project -f maf -t caf -x 500 -y 15 sourcefile.maf tmp.caf +$ miraconvert -x 500 -y 15 sourcefile.maf tmp.caf $ caf2gap -project somename -ace tmp.caf Example (e.g. useful with Sanger/454 hybrid assemblies): extracting only @@ -698,12 +748,12 @@ then converting the reduced CAF into a Staden GAP4 project: -$ convert_project -f maf -t caf -x 500 -z 10 sourcefile.maf tmp +$ miraconvert -x 500 -z 10 sourcefile.maf tmp.caf $ caf2gap -project somename -ace tmp.caf
    - + - Finishing and data analysis: finding places of importance in the assembly + Places of importance in a de-novo assembly @@ -889,7 +939,7 @@ </listitem> </orderedlist> <para> - The following screenshot shows a case where one should not join as + The following screen shot shows a case where one should not join as the finishing program (in this case <command>gap4</command>) warns that no template (read-pair) span the join site: </para> @@ -905,7 +955,7 @@ </mediaobject> </figure> <para> - The next screenshot shows a case where one should join as the + The next screen shot shows a case where one should join as the finishing program (in this case <command>gap4</command>) finds templates spanning the join site and all of them are good: </para> @@ -945,7 +995,7 @@ the end of an assembly, these shaved-off reads will form short, low coverage contig debris which can more or less be safely ignored and sorted out via the filtering options (<arg>-x -y - -z</arg>) of <command>convert_project</command>. + -z</arg>) of <command>miraconvert</command>. </para> <para> Some 454 library construction protocols -- especially, but not @@ -1001,4 +1051,400 @@ </orderedlist> </sect2> </sect1> + <sect1 id="sect_res_places_of_interest_in_a_mapping_assembly"> + <title> + Places of interest in a mapping assembly + + + This section just give a short overview on the tags you might find + interesting. For more information, especially on how to configure gap4 + or consed, please consult the mira usage document + and the mira manual. + + + In file types that allow tags (CAF, MAF, ACE), SNPs and other + interesting features will be marked by MIRA with a number of tags. The + following sections give a brief overview. For a description of what + the tags are (SROc, WRMc etc.), please read up the section "Tags used + in the assembly by MIRA and EdIt" in the main manual. + + + Screen shots in this section are taken from the walk-through with + Lenski data (see below). + + + + Where are SNPs? + + + + + the SROc tag will point to most + SNPs. Should you assemble sequences of more than one strain (I + cannot really recommend such a strategy), you also might + encounter SIOc and SAOc tags. + +
    + + "SROc" tag showing a SNP position in a Solexa mapping + assembly. + + + + + + +
    +
    + + "SROc" tag showing a SNP/indel position in a Solexa mapping + assembly. + + + + + + +
    +
    + + + the WRMc tags might sometimes + point SNPs to indels of one or two bases. + + +
    + + +
    + + + Where are insertions, deletions or genome re-arrangements? + + + + + Large deletions: the MCVc tags + point to deletions in the resequenced data, where no read is + covering the reference genome. + +
    + + "MCVc" tag (dark red stretch in figure) showing a genome + deletion in Solexa mapping assembly. + + + + + + +
    +
    + + + Insertions, small deletions and re-arrangements: these are + harder to spot. In unpaired data sets they can be found looking + at clusters of SROc, SRMc, WRMc, and / or UNSc tags. + +
    + + An IS150 insertion hiding behind a WRMc and a SRMc tags + + + + + + +
    + + more massive occurrences of these tags lead to a rather colourful + display in finishing programs, which is why these clusters are + also sometimes called Xmas-trees. + +
    + + A 16 base pair deletion leading to a SROc/UNsC xmas-tree + + + + + + +
    +
    + + An IS186 insertion leading to a SROc/UNsC xmas-tree + + + + + + +
    + + In sets with paired-end data, post-processing software (or + alignment viewers) can use the read-pair information to guide + you to these sites (MIRA doesn't set tags at the moment). + +
    +
    + + +
    + + + Other tags of interest + + + + + the UNSc tag points to areas + where the consensus algorithm had troubles choosing a base. This + happens in low coverage areas, at places of insertions (compared + to the reference genome) or sometimes also in places where + repeats with a few bases difference are present. Often enough, + these tags are in areas with problematic sequences for the + Solexa sequencing technology like, e.g., a + GGCxG or even GGC motif in + the reads. + + + + + the SRMc tag points to places + where repeats with a few bases difference are present. Here too, + sequence problematic for the Solexa technology are likely to + have cause base calling errors and subsequently setting of this + tag. + + + + + + +
    + + + Post-processing mapping assemblies + + + This section is a bit terse, you should also read the chapter on + working with results of MIRA. + + + + Manual cleanup and validation (optional) + + + When working with resequencing data and a mapping assembly, I always + load finished projects into an assembly editor and perform a quick + cleanup of the results. SNP or small indels normally do not need + cleanups, but every mapper will get larger indels mostly wrong, and + MIRA is no exception to this. + + + For close relatives of the reference strain this doesn't take long as + MIRA will have set tags (see section earlier in this document) at all + sites you should have a look at. For example, very close mutant + bacteria with just SNPs or simple deletions and no genome + reorganisation, I usually clean up in 10 to 15 minutes. That gives the + last boost to data quality and your users (biologists etc.) will thank + you for that as it reduces their work in analysing the data (be it + looking at data or performing wet-lab experiments). + + + The general workflow I use is to convert the CAF file to a gap4 or gap5 + database. Then, in gap4 or gap5, I + + + + + quickly search for the UNSc and WRMc tags and check whether they + could be real SNPs that were overseen by MIRA. In that case, I + manually set a SROc (or SIOc) tag in gap4 via hotkeys that were + defined to set these tags. + + + + + sometimes also quickly clean up reads that are causing trouble in + alignments and lead to wrong base calling. These can be found at + sites with UNSc tags, most of the time they have the 5' to 3' + GGCxG motif which can cause trouble to Solexa. + + + + + look at sites with deletions (tagged with MCVc) and look whether I + should clean up the borders of the deletion. + + + + + After this, I convert the gap4 or gap5 database back to CAF format. + But beware: gap4 does not have the same consensus calling routines as + MIRA and will have saved it's own consensus in the new CAF. In fact, + gap4 performs rather badly in projects with multiple sequencing + technologies. So I use miraconvert from the MIRA package to recall + a good consensus (and save it in MAF as it's more compact and a lot + faster in handling than CAF): + + + And from this MAF file I can then convert with miraconvert to any + other format I or my users need: CAF, FASTA, ACE, WIG (for coverage + analysis), SNP and coverage analysis (see below), HTML etc.pp. + + + + + Comprehensive SNP analysis spreadsheet tables (for Excel or OOcalc) + + + Biologists are not really interested in SNPs coordinates, and why + should they? They're more interested where SNPs are, how good they + are, which genes or other elements they hit, whether they have an + effect on a protein sequence, whether they may be important etc. For + organisms without intron/exon structure or splice variants, MIRA can + generate pretty comprehensive tables and files if an annotated + GenBank file was used as reference and strain information was given + to MIRA during the assembly. + + + Well, MIRA does all that automatically for you if the reference + sequence you gave was annotated. + + + For this, miraconvert should be used with the + asnp format as target and a MAF (or CAF) file as + input: + + $ miraconvert -t asnp input.maf output + + Note that it is strongly suggested to perform a quick manual cleanup + of the assembly prior to this: for rare cases (mainly at site of + small indels of one or two bases), MIRA will not tag SNPs with a SNP + tag (SROc, SAOc or SIOc) but will be fooled into a tag denoting + unsure positions (UNSc). This can be quickly corrected manually. See + further down in this manual in the section on post-processing. + + + After conversion, you will have four files in the directory which + you can all drag-and-drop into spreadsheet applications like + OpenOffice Calc or Excel. + + + The files should be pretty self-explanatory, here's just a short overview: + + + + + output_info_snplist.txt is a simple list of + the SNPs, with their positions compared to the reference + sequence (in bases and map degrees on the genome) as well as the + GenBank features they hit. + + + + + output_info_featureanalysis.txt is a much + extended version of the list above. It puts the SNPs into + context of the features (proteins, genes, RNAs etc.) and gives a + nice list, SNP by SNP, what might cause bigger changes in + proteins. + + + + + output_info_featuresummary.txt looks at the + changes (SNPs, indels) from the other way round. It gives an + excellent overview which features (genes, proteins, RNAs, + intergenic regions) you should investigate. + + + There's one column (named 'interesting') which pretty much + summarises up everything you need into three categories: yes, + no, and perhaps. 'Yes' is set if indels were detected, an amino + acid changed, start or stop codon changed or for SNPs in + intergenic regions and RNAs. 'Perhaps' is set for SNPs in + proteins that change a codon, but not an amino acid (silent + SNPs). 'No' is set if no SNP is hitting a feature. + + + + + output_info_featuresequences.txt simply + gives the sequences of each feature of the reference sequence + and the resequenced strain. + + + + + + + HTML files depicting SNP positions and deletions + + + I've come to realise that people who don't handle data from NextGen + sequencing technologies on a regular basis (e.g., many biologists) + don't want to be bothered with learning to handle specialised + programs to have a look at their resequenced strains. Be it because + they don't have time to learn how to use a new program or because + their desktop is not strong enough (CPU, memory) to handle the data + sets. + + + Something even biologist know to operate are browsers. Therefore, + miraconvert has the option to load a MAF (or CAF) file of a + mapping assembly at output to HTML those areas which are interesting + to biologists. It uses the tags SROc, SAOc, SIOc and MCVc and outputs + the surrounding alignment of these areas together with a nice overview + and links to jump from one position to the previous or next. + + + This is done with the '-t hsnp' option of + miraconvert: + + $ miraconvert -t hsnp input.maf output + + I recommend doing this only if the resequenced strain is a very close + relative to the reference genome, else the HTML gets pretty big. But + for a couple of hundred SNPs it works great. + + + + + WIG files depicting contig coverage or GC content + + + miraconvert can also dump a coverage file in WIG + format (using '-t wig') or a WIG file for GC + content (using '-t gcwig'). This comes pretty handy + for searching genome deletions or duplications in programs like the + Affymetrix Integrated Genome Browser (IGB, see ) or when looking for foreign sequence + in a genome. + + + + + Comprehensive spreadsheet tables for gene expression values / genome deletions & duplications + + + When having data mapped against a reference with annotations (either + from GenBank formats or GFF3 formats), + miraconvert can generate tables depicting + either expression values (in RNASeq/EST data mappings) or probable + genome multiplication and deletion factors (in genome mappings). For + this to work, you must use a MAF or CAF file as input, specify + fcov as output format and the reference sequence + must have had annotations during the mapping with MIRA. + + TODO: add example + miraconvert -t fcov mira_out.maf myfeaturetable + +
    diff -Nru mira-3.9.18/doc/docbook/chap_sanger_part.xml mira-4.0/doc/docbook/chap_sanger_part.xml --- mira-3.9.18/doc/docbook/chap_sanger_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_sanger_part.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,592 +0,0 @@ - - - - - - - Bastien - Chevreux - bach@chevreux.org - - - -
    - Solomon Short - - Just when you think it's finally settled, it isn't. - - -
    - - Short usage introduction to MIRA3 - - - This guide assumes that you have basic working knowledge of Unix systems, - know the basic principles of sequencing (and sequence assembly) and what - assemblers do. Furthermore, it is advised to read through the main - documentation of the assembler as this is really just a getting started - guide. - - - - Important notes - - - For working parameter settings for assemblies involving 454, IonTorrent, - Solexa or PacBio data, please also read the MIRA help files dedicated to these - platforms. - - - - - Quick start for the impatient - - - This example assumes that you have a few sequences in FASTA format that - may or may not have been preprocessed - that is, where sequencing vector - has been cut back or masked out. If quality values are also present in a - fasta like format, so much the better. - - - We need to give a name to our project: throughout this example, we will - assume that the sequences we are working with are - from Bacillus - chocorafoliensis (or short: Bchoc); a well known, - chocolate-adoring bug from the Bacillus family which is able to make a - couple of hundred grams of chocolate vanish in just a few minutes. - - - Our project will therefore be named 'bchoc'. - - - - Estimating memory needs - - - "Do I have enough memory?" has been one of the - most often asked question in former times. To answer this question, - please use miramem which will give you an - estimate. Basically, you just need to start the program and answer the - questions, for more information please refer to the corresponding - section in the main MIRA documentation. - - - Take this estimate with a grain of salt, depending on the sequences - properties, variations in the estimate can be +/- 30%. - - - - - Preparing and starting an assembly from scratch with FASTA files - - - - - - With data pre-clipped or pre-screened for vector sequence - - - The following steps will allow to quickly start a simple assembly if - your sequencing provider gave you data which was pre-clipped or - pre-screened for vector sequence: - - -$ mkdir bchoc_assembly1 -$ cd bchoc_assembly1 -bchoc_assembly1$ cp /your/path/sequences.fasta bchoc_in.sanger.fasta -bchoc_assembly1$ cp /your/path/qualities.someextension bchoc_in.sanger.fasta.qual -bchoc_assembly1$ mira --project=bchoc --job=denovo,genome,accurate,sanger --fasta - - Explanation: we created a - directory for the assembly, copied the sequences into it (to make - things easier for us, we named the file directly in a format - suitable for mira to load it automatically) and we also copied - quality values for the sequences into the same directory. As last - step, we started mira with options telling it that - - - - - our project is named 'bchoc' and hence, input and output files - will have this as prefix; - - - - - the data is in a FASTA formatted file; - - - - - the data should be assembled de-novo as - a genome at an assembly quality level - of accurate and that the reads we are - assembling were generated with Sanger technology. - - - - - By giving mira the project name 'bchoc' - (--project=bchoc) and naming sequence file with - an appropriate extension _in.sanger.fasta, mira - automatically loaded that file for assembly. When there are - additional quality values available - (bchoc_in.sanger.fasta.qual), these are also - automatically loaded and used for the assembly. - - - If there is no file with quality values available, MIRA will stop - immediately. You will need to provide parameters to the command line - which explicitly switch off loading and using quality files. - - - Not using quality values is NOT - recommended. Read the corresponding section in the MIRA reference - manual. - - - - - Using SSAHA2 / SMALT to screen for vector sequence - - - If your sequencing provider gave you data which was NOT pre-clipped - for vector sequence, you can do this yourself in a pretty robust - manner using SSAHA2 -- or the successor, SMALT -- from the Sanger - Centre. You just need to know which sequencing vector the provider - used and have its sequence in FASTA format (ask your provider). - - - Note that this screening is a valid method for any type of Sanger - sequencing vectors, 454 adaptors, Solexa adaptors and paired-end - adaptors etc. - - - For SSAHA2 follow these steps (most are the same as in the example - above): - - -$ mkdir bchoc_assembly1 -$ cd bchoc_assembly1 -bchoc_assembly1$ cp /your/path/sequences.fasta bchoc_in.sanger.fasta -bchoc_assembly1$ cp /your/path/qualities.someextension bchoc_in.sanger.fasta.qual -bchoc_assembly1$ ssaha2 -output ssaha2 - -kmer 8 -skip 1 -seeds 1 -score 12 -cmatch 9 -ckmer 6 - /path/where/the/vector/data/resides/vector.fasta - bchoc_in.sanger.fasta > bchoc_ssaha2vectorscreen_in.txt -bchoc_assembly1$ mira -project=bchoc -job=denovo,genome,accurate,sanger -fasta SANGER_SETTINGS -CL:msvs=yes - - Explanation: there are just - two differences to the example above: - - - - - calling SSAHA2 to generate a file which contains information on - the vector sequence hitting your sequences. - - - - - telling mira with SANGER_SETTINGS - -CL:msvs=yes to load this vector screening data for - Sanger data - - - - - For SMALT, the only difference is that you use SMALT for generating - the vector-screen file and ask SMALT to generate it in SSAHA2 - format. As SMALT works in two steps (indexing and then mapping), you - also need to perform it in two steps and then call MIRA. E.g.: - - -bchoc_assembly1$ smalt index -k 7 -s 1 smaltidxdb /path/where/the/vector/data/resides/vector.fasta -bchoc_assembly1$ smalt map -f ssaha -d -1 -m 7 smaltidxdb bchoc_in.sanger.fasta > bchoc_smaltvectorscreen_in.txt -bchoc_assembly1$ mira -project=bchoc -job=denovo,genome,accurate,sanger -fasta SANGER_SETTINGS -CL:msvs=yes - - Please note that, due to subtle differences between output of SSAHA2 - (in ssaha2 format) and SMALT (in ssaha2 format), MIRA identifies the - source of the screening (and the parsing method it needs) by the - name of the screen file. Therefore, screens done with SSAHA2 need to - have the postfix *_ssaha2vectorscreen_in.txt in - the file name and screens done with SMALT need - *_smaltvectorscreen_in.txt. - - - - - - - Calling mira from the command line - - - Mira can be used in many different ways: building assemblies from - scratch, performing reassembly on existing projects, assembling - sequences from closely related strains, assembling sequences against an - existing backbone (mapping assembly), etc.pp. Mira comes with a number - of quick switches, i.e., switches that - turn on parameter combinations which should be suited for most needs. - - - E.g.: mira --project=foobar --job=sanger --fasta - -highlyrepetitive - - - The line above will tell mira that our project will have the general - name foobar and that the sequences are to be loaded - from FASTA files, the sequence input file being - named foobar_in.sanger.fasta (and sequence quality - file, if - available, foobar_in.sanger.fasta.qual. The reads - come from Sanger technology and mira is prepared for the genome - containing nasty repeats. The result files will be in a directory - named foobar_results, statistics about the assembly - will be available in the foobar_info directory - like, e.g., a summary of contig statistics in - foobar_info/foobar_info_contigstats.txt. Notice - that the --job= switch is missing some - specifications, mira will automatically fill in the remaining defaults - (i.e., denovo,genome,accurate in the example above). - - - E.g.: mira --project=foobar --job=mapping,accurate,sanger - --fasta --highlyrepetitive - - - This is the same as the previous example except mira will perform a - mapping assembly in 'accurate' quality of the sequences against a - backbone sequence(s). mira will therefore additionally load the backbone - sequence(s) from the file foobar_backbone_in.fasta - (FASTA being the default type of backbone sequence to be loaded) and, if - existing, quality values for the backbone - from foobar_backbone_in.fasta.qual. - - - E.g.: mira --project=foobar --job=mapping,accurate,sanger - --fasta --highlyrepetitive -SB:bft=gbf - - - As above, except we have added an extensive - switch (-SB:bft) to tell mira that the backbones - are in a GenBank format file (GBF). MIRA will therefore load the - backbone sequence(s) from the file - foobar_backbone_in.gbf. Note that the GBF file can - also contain multiple entries, i.e., it can be a GBFF file. - - - E.g.: mira --project=foobar --job=mapping,accurate,sanger - --fastq --highlyrepetitive -SB:bft=gbf - - - As above, except we have changed the input type for all files from FASTA - to FASTQ. - - - - - Using multiple processors - - - This feature is in its infancy, presently only the SKIM algorithm uses - multiple threads. Setting the number of processes for this stage can be - done via the -GE:not - parameter. E.g. -GE:not=4 to use 4 threads. - - - - - Usage examples - - - - - - Assembly from scratch with GAP4 and EXP files - - - A simple GAP4 project will do nicely. Please take care of the - following: You need already preprocessed experiment / fasta / phd - files, i.e., at least the sequencing vector should have been tagged - (in EXP files) or masked out (FASTA or PHD files). It would be nice if - some kind of not too lazy quality clipping had also been done for the - EXP files, pregap4 should do this for you. - - - - - Step 1: Create a file of filenames (named - mira_in.fofn) for the project you wish to - assemble. The file of filenames should contain the newline - separated names of the EXP-files and nothing else. - - - - - Step 2: Execute the mira assembly, eventually using command line - options or output redirection: - - -$ /path/to/the/mira/package/mira ... other options ... - - or simply - - -$ mira ... other options ... - - if MIRA is in a directory which is in your PATH. The result of the - assembly will now be in directory - named mira_results where you will - find mira_out.caf, mira_out.html - etc. or in gap4 direct assembly format in - the mira_out.gap4da sub-directory. - - - - - Step 3a: (This is not recommended - anymore) Change to the gap4da directory and start gap4: - - -$ cd mira_results/mira_out.gap4da -mira_results/mira_out.gap4da$ gap4 - - choose the menu 'File->New' and enter a name for your new database - (like 'demo'). Then choose the menu 'Assembly->Directed - assembly'. Enter the text 'fofn' in the entry - labelled Input readings from List or file - name and enter the text 'failures' into the entry - labelled Save failures to List or file name. - Press "OK". - - - That's it. - - - - - Step 3b: (Recommended) As an alternative to - step 3a, one can use the caf2gap converter (see below) - - -mira_results$ caf2gap -project demo -version 0 -ace mira_out.caf -mira_results$ gap4 DEMO.0 - - - - - - Out-of-the box example - MIRA comes with a few really small toy project to test usability on a - given system. Go to the minidemo directory and follow the instructions - given in the section for own projects above, but start with step 2. - Eventually, you might want to start mira while redirecting the output - to a file for later analysis. - - - - - Reassembly of GAP4 edited projects - - - It is sometimes wanted to reassemble a project that has already been - edited, for example when hidden data in reads has been uncovered or - when some repetitive bases have been tagged manually. The canonical - way to do this is by using CAF files as data exchange format and the - caf2gap and gap2caf converters available from the Sanger Centre - (). - - - The project will be completely reassembled, contig joins or breaks - that have been made in the GAP4 database will be lost, you will get an - entirely new assembly with what mira determines to be the best - assembly. - - - - - Step 1: Convert your GAP4 project with the gap2caf tool. Assuming - that the assembly is in the GAP4 - database CURRENT.0, convert it with the - gap2caf tool: - - -$ gap2caf -project CURRENT -version 0 -ace > newstart_in.caf - - The name "newstart" will be the project name - of the new assembly project. - - - - - Step 2: Start mira with the -caf option and tell it the name of - your new reassembly project: - - -$ mira -caf=newstart - - (and other options like --job etc. at will.) - - - - - Step 3: Convert the resulting CAF file - newstart_assembly/newstart_d_results/newstart_out.caf - to a gap4 database format as explained above and start gap4 with - the new database: - - -$ cd newstart_assembly/newstart_d_results -newstart_assembly/newstart_d_results$ caf2gap -project reassembled -version 0 -ace newstart_out.caf -newstart_assembly/newstart_d_results$ gap4 REASSEMBLED.0 - - - - - - Using backbones to perform a mapping assembly against a reference sequence - - - - One useful features of mira is the ability to assemble against already - existing reference sequences or contigs (also called a mapping assembly). The - parameters that control the behaviour of the assembly in these cases are in - the -STRAIN/BACKBONE section of the parameters. - - - Please have a look at the example in the minidemo/bbdemo2 directory - which maps sequences from C.jejuni RM1221 against (parts of) the genome - of C.jejuni NCTC1168. - - - There are a few things to consider when using backbone sequences: - - - - - Backbone sequences can be as long as needed! They are not subject - to normal read length constraints of a maximum of 10k bases. That - is, if one wants to load one or several entire chromosomes of a - bacterium or lower eukaryote as backbone sequence(s), this is just - fine. - - - - - Backbone sequences can be single sequences like provided by, e.g., - FASTA, FASTQ or GenBank files. But backbone sequences also can be - whole assemblies when they are provided as, e.g., CAF format. This - opens the possibility to perform semi-hybrid assemblies by - assembling first reads from one sequencing technology de-novo - (e.g. 454) and then map reads from another sequencing technology - (e.g. Solexa) to the whole 454 alignment instead of mapping it to - the 454 consensus. - - - A semi-hybrid assembly will therefore contain, like a hybrid - assembly, the reads of both sequencing technologies. - - - - - Backbone sequences will not be reversed! They will always appear in - forward direction in the output of the assembly. Please note: if the - backbone sequence consists of a CAF file that contain contigs which contain - reversed reads, then the contigs themselves will be in forward direction. - But the reads they contain that are in reverse complement direction will of - course also stay reverse complement direction. - - - - - Backbone sequences will not not be assembled together! That is, if a - sequence of the backbones has a perfect overlap with another backbone - sequence, they will still not be merged. - - - - - Reads are assembled to backbones in a first come, first served - scattering strategy. - - - Suppose you have two identical backbones and one read which - would match both, then the read would be mapped to the first - backbone. If you had two (almost) identical reads, the first - read would go to the first backbone, the second read to the - second backbone. With three almost identical reads, the first - backbone would get two reads, the second backbone one read. - - - - - Only in backbones loaded from CAF files: contigs made out of single - reads (singlets) loose their status as backbones and will be returned to the - normal read pool for the assembly process. That is, these sequences will be - assembled to other backbones or with each other. - - - - - - - Examples for using backbone sequences: - - - - - Example 1: assume you have a genome of an existing organism. From - that, a mutant has been made by mutagenesis and you are skimming - the genome in shotgun mode for mutations. You would generate for - this a straindata file that gives the name of - the mutant strain to the newly sequenced reads and simply assemble - those against your existing genome, using the following - parameters: - - - -SB:lsd=yes:lb=yes:bsn=nameOriginalStrain:bft=caf|fasta|gbf - - - When loading backbones from CAF, the qualities of the consensus - bases will be calculated by mira according normal consensus - computing rules. When loading backbones from FASTA or GBF, one - can set the expected overall quality of the sequences (e.g. 1 - error in 1000 bases = quality of 30) with - -SB:bbq=30. It is recommended to have the backbone - quality at least as high as the -CO:mgqrt value, so - that mira can automatically detect and report SNPs. - - - - - Example 2: suppose that you are in the process of performing a - shotgun sequencing and you want to determine the moment when you - got enough reads. One could make a complete assembly each day when - new sequences arrive. However, starting with genomes the size of a - lower eukaryote, this may become prohibitive from the - computational point of view. A quick and efficient way to resolve - this problem is to use the CAF file of the previous assembly as - backbone and simply add the new reads to the pool. The number of - singlets remaining after the assembly versus the total number of - reads of the project is a good measure for the coverage of the - project. - - - - - Example 3: in EST assembly with miraSearchESTSNPs, existing cDNA - sequences can also be useful when added to the project during step - 3 (in the file step3_in.par). They will - provide a framework to which mRNA-contigs built in previous steps - will be assembled against, allowing for a fast evaluation of the - results. Additionally, they provide a direction for the assembled - sequences so that one does not need to invert single contigs by - hand afterwards. - - - - - - - -
    diff -Nru mira-3.9.18/doc/docbook/chap_seqadvice_part.xml mira-4.0/doc/docbook/chap_seqadvice_part.xml --- mira-3.9.18/doc/docbook/chap_seqadvice_part.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/chap_seqadvice_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -67,7 +67,7 @@ This is a slightly reworked version of a post I made on the MIRA talk mailing list. The question "Could you please recommend me a sequencing provider?" arrives every now and then in my - provate inbox, often enough for me decide to make a collage of the + private inbox, often enough for me decide to make a collage of the responses I gave in the past and post it to MIRA talk. @@ -376,7 +376,7 @@ It is a lot easier to build a good relationship with someone who - speaks your language ... or a good(!) english. + speaks your language ... or a good(!) English. I will not haggle for a couple of hundred Euros in a single project, @@ -402,42 +402,180 @@ Regarding the technologies you can use ... it really depends on what you want to do :-) And note that I base my answers on technologies - available today without bigger problems: 454, Illumina, with - IonTorrent as Joker for quick projects. PacBio and Oxford Nanopore - might become game changers, but are not just yet. Here's what I would - do, which might not necessarily be what others would: + available today without bigger problems: PacBio, Illumina, with + IonTorrent as Joker for quick projects. 454 can still be considered, + but probably not for too long anymore as Roche stopped development of + the technology and thus PacBio takes over the part for long + reads. Oxford Nanopore might become a game changer, but they are not + just yet + + + + + Specific advice + + + Here's how I see things as of now (January 2014), which might not + necessarily be how others see them. + + + + Technologies + + + + Sanger + + + Use for: checking assemblies; closing gaps by PCR; checking for a couple of genes with + known sequence (i.e., where you can design oligos for). + + + Do not use for: anything else. In particular, if you find yourself + designing oligos for a 96 well plate destined for Sanger sequencing + of a single bacterial DNA sample, you (probably) are doing something + wrong. + + + + + Pacific Biosciences + + + Use for: de-novo of bacteria and lower eukaryotes (or higher + eukaryotes if you have the money). PacBio should be seen as + the technology to use when getting the best + assemblies with least number of contigs is important to you. Also, + resequencing of variants of known organisms with lots of genomic + reorganisation flexibility due to high numbers of transposons (where + short reads will not help in getting the chromosome assembled/mapped + correctly). + + + Do not use for: resequencing of "dull" organisms (where the only + differences will be simple SNPs or simple insertion/deletions or + simple contig reorganisations at non-repetitive places). Illumina + will do a much better and cost effective job there. + + + + As of January 2014: aim for at least 100x coverage of raw data, + better 130x to 150x as pre-processing (quality clip, removal of + adapters and other sequencing artefacts) will take its toll and + reduce the data by up to 1/3. After that, the error + correction/self-correction of raw reads into corrected reads will + again reduce the data considerably. + + + It's really a numbers game: the more data you have, the more + likely you will also get many of those really long reads in the 5 + to 30 Kb range which are extremely useful to get over those nasty + repeats. + + + + MIRA will most probably give you longer contigs with corrected + PacBio reads than you get with the HGAP pipeline, but the number of + indel errors will currently be higher. Either use Quiver on the + results of MIRA ... or simply polish the assembly with a cheap + Illumina data set. The latter approach will also give you better + results than a Quiver approach. + + + For non-haploid organisms, you might need more coverage to get + enough data at ploidy sites to get the reads correctly out of + error correction. + + + Preparation of your DNA sample is not trivial as many methods will + break your DNA into "small" chunks which are good enough for + Sanger, 454, Illumina or Ion Torrents, but not for PacBio. + + + + + Illumina + + + Use for: general resequencing jobs (finding SNPs, indel locations of + any size, copy number variations etc.); gene expression analysis; + cheap test sequencing of unknown organisms to assess complexity; + de-novo sequencing if you are OK with getting hundreds / thousands + of contigs (depending on organism, some bacteria get only a few + dozen). + + + Careful with high GC organisms, starting with 60% to 65% GC Illumina + reads contain more errors: SNP detection may be less reliable if + extreme care is not taken to perform good read clipping. Especially + the dreaded GGCxG motif often leads to problems in Illumina reads. + + + For de-novo assemblies, do NOT (never ever at + all and under no circumstances) use the Nextera kit, take + TruSeq. The non-random fragmentation behaviour of Nextera leads to + all sorts of problems for assemblers (not only MIRA) which try to + use kmer frequencies as a criterion for repetitiveness of a given + sequence. + + + + + Ion Torrent + + + Use for: like Illumina. With three notable exceptions: 1) SNP + detection is not as good as with Illumina (more false positives and + false negatives) 2) de-novo assemblies will contain more single-base + indels and 3) Ion having problems with homopolymers, that technology + is not as well suited as complimentary hybrid technology for PacBio + as is Illumina (except for high-GC perhaps). + + + Ion has a speed advantage on Illumina: if you have your own machine, + getting from your sample to data takes less time than with Illumina. + + + Also, it looks like as if Ion has less problems with GC content or + sequence motifs than Illumina. + + + + + Roche 454 + + + That technology is on the way out, but there may be two reasons to + not completely dismiss 454: 1) the average read length of 700 bp can + be seen as a plus when compared to Illumina or Ion ... but then + there's PacBio to take care of read length. 2) the large read-pair + libraries work better with 454 than Illumina mate-pair libraries, + something which might be important for scaffolding data where even + PacBio could not completely resolve long repeats. + + + + + + Sequencing de-novo + - On a gene fishing expedition? Probably Illumina HiSeq, at least - 100bp, 150 to 200bp if your provider supports it well. Ion if a - small organism and you need it quick without caring for possible - frameshifts. - - - Want some larger contigs? 454 Titanium + Illumina 100bp (150 to - 200bp if provider supports it). - - - The same as above, but maybe cheaper? Ion Torrent (long chemistry) - & Illumina. (Never tried that myself) - - - Even larger contigs and scaffolding? 454 Titanium + 454 paired-end + - Illumina HiSeq (also paired-end if you need more coverage). + On a cheap gene fishing expedition? Probably Illumina HiSeq, at + least 100bp, 150 to 250bp or 300bp if your provider supports it + well. Paired-end definitely a plus. As alternative: Ion Torrent for + small organism (maybe up to 100Mb) and when you need results quickly + without caring for possible frameshifts. - Larger scaffolds? Like above, but different library sizes in the paired-end libraries. + Want some larger contigs? PacBio. Add in cheap Illumina 100bp + paired-end (150 to 300bp if provider supports it) to get rid of + those last frameshifts which may remain. - Feeling adventurous or have a complex eukaryote? PacBio + at least - Illumina, preferably with 2x to 4x 454 mixed in. The raw PacBio - single-reads I have seen so far were ... ummm ... difficult to - handle (85% accuracy, with very unevenly spaced errors), 3-pass - reads should alleviate most problems (at cost of read lengths), - maybe 2-pass also. Make sure the provider does the whole - read-processing and collapsing for you or else you are in for some - fun time. + Maybe scaffolding of contigs above? PacBio + Illumina 100bp + a + large paired-end library (e.g. 454 20kb) Have some good friends at Oxford Nanopore who can give you some @@ -446,37 +584,36 @@ + + + Re-sequencing / mapping + + + There is a reason why Illumina currently dominates the market as it + does: a cheap Illumina run (preferably paired-end) will answer most of + your questions in 99% of the cases. Things will get difficult for + organisms with high numbers of repeats and/or frequent genome + re-arrangements. Then using longer read technologies and/or Illumina + mate-pair may be required. + + A word or two on coverage ... - - For de-novo assembly of genomes, the MIRA quick switches (--job=...) - are optimised for 'decent' coverages that are commonly seen to get you - something useful, i.e., ≥ 7x for Sanger, >=18x for 454 FLX, ≥ - 25x for 454 GS20. Should you venture into lower or higher coverages, you will - need to adapt a few parameters (clipping etc.) via extensive switches. - Low coverage isn't worth it There's one thing to be said about coverage and de-novo assembly: - especially for bacteria, getting more than 'decent' coverage with 454 - FLX or Titanium is - cheap. Every assembler I know will be happy to - assemble de-novo genomes with coverages of 25x, 30x, 40x ... and the - number of contigs will still drop dramatically between a 15x 454 and a - 30x 454 project. - - - With the introduction of the Titanium series, a full 454 plate may - seem to be too much: you should - get at least 200 megabase - out of a plate, press releases from 454 seem to suggest 400 to 600 - megabases. + especially for bacteria, getting more than 'decent' coverage is + cheap with any current day technology. Every + assembler I know will be happy to assemble de-novo genomes with + coverages of 25x, 30x, 40x ... and the number of contigs will still + drop dramatically between a 15x Ion Torrent and a 30x Ion Torrent + project. In any case, do some calculations: if the coverage you expect to get @@ -486,13 +623,13 @@ really, really good parts of the sequences to get you nice contigs. - Including library prep, a full 454 plate will cost you between 8000 to - 12000 bucks (or less). The price for a Solexa lane is also low ... 2000 - or less. Then you just need to do the math: is it worth to invest 10, - 20, 30 or more days of wet lab work, designing primers, doing PCR + Other example: the price for 1 gigabase Illumina paired-end of a + single DNA prep is way, way below USD 1000, even with commercial + providers. Then you just need to do the math: is it worth to invest + 10, 20, 30 or more days of wet lab work, designing primers, doing PCR sequencing etc. and trying to close remaining gaps or hunt down sequencing errors when you went for a 'low' coverage or a non-hybrid - sequencing strategy? Or do you invest a few thousand bucks to get some + sequencing strategy? Or do you invest a few bucks more to get some additional coverage and considerably reduce the uncertainties and gaps which remain? @@ -531,16 +668,13 @@ A word of caution regarding your DNA in hybrid sequencing projects - - - So, you have decided that sequencing your bug with 454 paired-end with - unpaired 454 data (or Sanger and 454, or Sanger and Solexa, or 454 and - Solexa or whatever) may be a viable way to get the best bang for your - buck. Then please follow this advice: prepare enough DNA - in one go - for the sequencing provider so that they can sequence it with all the - technologies you chose without you having to prepare another batch - ... or even grow another culture! + So, you have decided that sequencing your bug with PacBio and Illumina + (or PacBio and Ion Torrent or whatever) may be a viable way to get the + best bang for your buck. Then please follow this advice: prepare enough + DNA in one + go for the sequencing provider so that they can + sequence it with all the technologies you chose without you having to + prepare another batch ... or even grow another culture! The reason for that is that as soon as you do that, the probability that @@ -569,77 +703,102 @@ discern possible repeats from possible SNPs. - + - For bacteria: beware of (high copy number) plasmids! + Advice for bacteria - - This is a source of interesting problems and furthermore gets people - wondering why MIRA sometimes creates more contigs than other - assemblers when it usually creates less. - - - Here's the short story: there are data sets which include one ore - several high-copy plasmid(s). Here's a particularly ugly example: - SRA001028 from the NCBI short read archive which contains a plate of - paired-end reads for Ecoli K12 MG1655-G - (). - - - The genome is sequenced at ~10x coverage, but during the assembly, - three intermediate contigs with ~2kb attain a silly maximum coverage - of ~1800x each. This means that there were ~540 copies of this - plasmid (or these plasmids) in the sequencing. - - - When using the uniform read distribution algorithm - which is switched - on by default when using "--job=" and the quality level of 'accurate' - - MIRA will find out about the average coverage of the genome to be at - ~10x. Subsequently this leads MIRA to dutifully create ~500 additional - contigs (plus a number of contig debris) with various incarnations of - that plasmid at an average of ~10x, because it thought that these were - repetitive sites within the genome that needed to be disentangled. - - - Things get even more interesting when some of the plasmid / phage - copies are slightly different from each other. These too will be split - apart and when looking through the results later on and trying to join - the copies back into one contig, one will see that this should not be - done because there are real differences. - - - DON'T PANIC! - - - The only effect this has on your assembly is that the number of - contigs goes up. This in turn leads to a number of questions in my - mailbox why MIRA is sometimes producing more contigs than Newbler (or - other assemblers), but that is another story (hint: Newbler either - collapses repeats or leaves them completely out of the picture by not - assembling repetitive reads). - - - What you can do is the following: - - - - - either you assemble everything together and the join the plasmid - contigs manually after assembly, e.g. in gap4 (drawback: on really - high copy numbers, MIRA will work quite a bit longer ... and you - will have a lot of fun joining the contigs afterwards) - - - - - or, after you found out about the plasmid(s) and know the - sequence, you filter out reads in the input data which contain - this sequence and assemble the remaining reads. - - - - - + + + Do not sample DNA from bacteria in exponential growth phase! + + + The reason is simple: some bacteria grow so fast that they start + replicating themselves even before having finished the first + replication cycle. This leads to more DNA around the origin of + replication being present in cells, which in turn fools assemblers and + mappers into believing that those areas are either repeats or that + there are copy number changes. + + + Sample. In. Stationary. Phase! + + + For de-novo assemblies, MIRA will warn you if it detects data which + points at exponential phase. In mapping assemblies, look at the + coverage profile of your genome: if you see a smile shape (or V + shape), you have a problem. + + + + + Beware of (high copy number) plasmids! + + + This is a source of interesting problems and furthermore gets people + wondering why MIRA sometimes creates more contigs than other + assemblers when it usually creates less. + + + Here's the short story: there are data sets which include one ore + several high-copy plasmid(s). Here's a particularly ugly example: + SRA001028 from the NCBI short read archive which contains a plate of + paired-end reads for Ecoli K12 MG1655-G + (). + + + The genome is sequenced at ~10x coverage, but during the assembly, + three intermediate contigs with ~2kb attain a silly maximum coverage + of ~1800x each. This means that there were ~540 copies of this + plasmid (or these plasmids) in the sequencing. + + + When using the uniform read distribution algorithm - which is switched + on by default when using "--job=" and the quality level of 'accurate' - + MIRA will find out about the average coverage of the genome to be at + ~10x. Subsequently this leads MIRA to dutifully create ~500 additional + contigs (plus a number of contig debris) with various incarnations of + that plasmid at an average of ~10x, because it thought that these were + repetitive sites within the genome that needed to be disentangled. + + + Things get even more interesting when some of the plasmid / phage + copies are slightly different from each other. These too will be split + apart and when looking through the results later on and trying to join + the copies back into one contig, one will see that this should not be + done because there are real differences. + + + DON'T PANIC! + + + The only effect this has on your assembly is that the number of + contigs goes up. This in turn leads to a number of questions in my + mailbox why MIRA is sometimes producing more contigs than Newbler (or + other assemblers), but that is another story (hint: Newbler either + collapses repeats or leaves them completely out of the picture by not + assembling repetitive reads). + + + What you can do is the following: + + + + + either you assemble everything together and the join the plasmid + contigs manually after assembly, e.g. in gap4 (drawback: on really + high copy numbers, MIRA will work quite a bit longer ... and you + will have a lot of fun joining the contigs afterwards) + + + + + or, after you found out about the plasmid(s) and know the sequence, + you filter out reads in the input data which contain this sequence + (you can use mirabait for this) and assemble the + remaining reads. + + + + - diff -Nru mira-3.9.18/doc/docbook/chap_seqtechdesc_part.xml mira-4.0/doc/docbook/chap_seqtechdesc_part.xml --- mira-3.9.18/doc/docbook/chap_seqtechdesc_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/chap_seqtechdesc_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,783 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + Opinions are like chili powder - best used in moderation. + +
    + Description of sequencing technologies + + + Introduction + + + Note: This section contains things I've + seen in the past and simply jotted down. These may be fundamentally + correct or correct only under circumstances or not correct at all with + your data. You may have different observations. + + + ... + + + + + Illumina (formerly Solexa) + + + + Caveats for Illumina data + + + + Even if you can get bacteria sequenced with ridiculously high coverage + like 500x or 1000x, this amount of data is simply not needed. Even + more important - though counterintuitive - is the fact that due to + non-random sequence dependent sequencing errors, a too high coverage + may even make the assembly worse. + + + Another rule of thumb: when having more than enough data, reduce the + data set so as to have an average coverage of approximately 100x. In + some rare cases (high GC content), perhaps 120x to 150x, but certainly + not more. + + + + When reducing a data set, do NOT, + under no circumstances not, try fancy selection of reads by some + arbitrary quality or length criteria. This will introduce a terrible + bias in your assembly due to non-random sequence-dependent sequencing + errors and non-random sequence dependent base quality assignment. More + on this in the next section. + + + + + Illumina highlights + + + + Quality + + + For current HiSeq 100bp reads I get - after MIRA clipping - about 90 + to 95% reads matching to a reference without a single error. MiSeq + 250bp reads contain a couple more errors, but nothing to be alarmed + off. + + + In short: Illumina is currently the technology + to use if you want high quality reads. + + + + + + Lowlights + + + + Long homopolymers + + + Long homopolymers (stretches of identical bases in reads) can be a + slight problem for Solexa. However, it must be noted that this is a + problem of all sequencing technologies on the market so far (Sanger, + Solexa, 454). Furthermore, the problem in much less pronounced in + Solexa than in 454 data: in Solexa, first problem appear may appear + in stretches of 9 to 10 bases, in Ion Torrent a stretch of 3 to 4 + bases may already start being problematic in some cases. + + + + + The GGCxG and GGC motifs + + + GGCxG or even GGC motif in the + 5' to 3' direction of reads. This one is particularly annoying and + it took me quite a while to circumvent in MIRA the problems it + causes. + + + Simply put: at some places in a genome, base calling after a + GGCxG or GGC motif is + particularly error prone, the number of reads without errors + declines markedly. Repeated GGC motifs worsen + the situation. The following screen shots of a mapping assembly + illustrate this. + + + The first example is a the GGCxG motif (in form + of a GGCTG) occurring in approximately one third + of the reads at the shown position. Note that all but one read + with this problem are in the same (plus) direction. + +
    + + The Solexa GGCxG problem. + + + + + + +
    + + The next two screen shots show the GGC, once for + forward direction and one with reverse direction reads: + +
    + + The Solexa GGC problem, forward example + + + + + + +
    +
    + + The Solexa GGC problem, reverse example + + + + + + +
    + + Places in the genome that have GGCGGC.....GCCGCC + (a motif, perhaps even repeated, then some bases and then an + inverted motif) almost always have very, very low number of good + reads. Especially when the motif is GGCxG. + + + Things get especially difficult when these motifs occur at sites + where users may have a genuine interest. The following example is a + screen shot from the Lenski data (see walk-through below) where a + simple mapping reveals an anomaly which -- in reality -- is an IS + insertion (see ) + but could also look like a GGCxG motif in forward + direction (GGCCG) and at the same time a + GGC motif in reverse direction: + +
    + + A genuine place of interest almost masked by the + <literal>GGCxG</literal> problem. + + + + + + +
    +
    + + + Nextera library prep + + + Opinions seem to be divided about Nextera: some people don't like it + as it introduces sometimes terrible coverage bias in the data, other + people say they're happy with the data. + + + Someone told me (or wrote, I do not remember) that this divide may + be due to the fact that some people use their sequencing data for + de-novo assemblies, while others just do mappings and hunt for + SNPs. In fact, this would explain a lot: for de-novo assemblies, I + would never use Nextera. When on a hunt for SNPs, they may be OK. + + + + + Strong GC bias in some Solexa data (2nd half 2009 until advent of TruSeq kit at end of 2010) + + + I'm recycling a few slides from a couple of talks I held in 2010. + + + Things used to be so nice and easy with the early Solexa data I worked + with (36 and 44mers) in late 2007 / early 2008. When sample taking was + done right -- e.g. for bacteria: in stationary phase -- and the + sequencing lab did a good job, the read coverage of the genome was + almost even. I did see a few papers claiming to see non-trivial GC + bias back then, but after having analysed the data I worked with I + dismissed them as "not relevant for my use cases." Have a look at the + following figure showing exemplarily the coverage of a 45% GC + bacterium in 2008: + +
    + + Example for no GC coverage bias in 2008 Solexa data. + + + Example for no GC coverage bias in 2008 Solexa data. Apart from a + slight <emphasis>smile shape</emphasis> of the coverage -- + indicating the sample taking was not 100% in stationary phase of the + bacterial culture -- everything looks pretty nice: the average + coverage is at 27x, and when looking at potential genome + duplications at twice the coverage (54x), there's nothing apart a + single peak (which turned out to be a problem in a rRNA region). + + + + + + +
    + + Things changed starting sometime in Q3 2009, at least that's when I + got some data which made me notice a problem. Have a look at the + following figure which shows exactly the same organism as in the + figure above (bacterium, 45% GC): + +
    + + Example for GC coverage bias starting Q3 2009 in Solexa data. + + + Example for GC coverage bias starting Q3 2009 in Solexa + data. There's no <emphasis>smile shape</emphasis> anymore -- the + people in the lab learned to pay attention to sample in 100% + stationary phase -- but something else is extremely disconcerting: + the average coverage is at 33x, and when looking at potential genome + duplications at twice the coverage (66x), there are several dozen + peaks crossing the 66x threshold over a several kilobases (in one + case over 200 Kb) all over the genome. As if several small genome + duplications happened. + + + + + + +
    + + By the way, the figures above are just examples: I saw over a dozen + sequencing projects in 2008 without GC bias and several dozen in 2009 + / 2010 with GC bias. + + + Checking the potential genome duplication sites, they all looked + "clean", i.e., the typical genome insertion markers are + missing. Poking around at possible explanations, I looked at GC + content of those parts in the genome ... and there was the + explanation: + +
    + + Example for GC coverage bias, direct comparison 2008 / 2010 data. + + + Example for GC coverage bias, direct comparison 2008 / 2010 + data. The bug has 45% average GC, areas with above average read + coverage in 2010 data turn out to be lower GC: around 33 to 36%. The + effect is also noticeable in the 2008 data, but barely so. + + + + + + +
    + + Now as to actually why the GC bias suddenly + became so strong is unknown to me. The people in the lab use the same + protocol since several years to extract the DNA and the sequencing + providers claim to always use the Illumina standard protocols. + + + But obviously something must have changed. + + + It took Illumina some 18 months to resolve that problem for the + broader public: since data I work on were done with the TruSeq kit, + this problem has vanished. + + + However, if you based some conclusions or wrote a paper with Illumina + data which might be affected by the GC bias (Q3 2009 to Q4 2010), I + suggest you rethink all the conclusion drawn. This should be + especially the case for transcriptomics experiments where a difference + in expression of 2x to 3x starts to get highly significant! + +
    +
    +
    + + + Ion Torrent + + + As of January 2014, I would say Ion Torrent reads behave very much like + late data from the 454 technology (FLX / Titanium chemistry): reads are + on average are > 300bp and the homopolymer problem is much less + pronounced than 2 years ago. The following figure shows what you can get + out of 100bp reads if you're lucky: + +
    + + Example for good IonTorrent data (100bp reads). Note that only a + single sequencing error - shown by blue background - can be + seen. Except this, all homopolymers of size 3 and 4 in the area + shown are good. + + + Example for good IonTorrent data (100bp reads) + + + + + + +
    + + The "if you're lucky" part in the preceding sentence is not there by + accident: having so many clean reads is more of an exception rather a + rule. On the other hand, most sequencing errors in current IonTorrent + data are unproblematic ... if it were not for indels, which is going to + be explained on the next sections. + + + + Homopolymer insertions / deletions + + + The main source of error in your data will be insertions / deletions + (indels) especially in homopolymer regions (but not only there, see + also next section). Starting with a base run of 4 to 6 bases, there + is a distinct tendency to have an increased occurrence of indel + errors. + +
    + + Example for problematic IonTorrent data (100bp reads). + + + Example for problematic IonTorrent data (100bp reads) + + + + + + +
    +
    + + The above figure contains a couple of particularly nasty indel + problems. While areas 2 (C-homopolymer length 3), 5 (A-homopolymer + length 4) and 6 (T-homopolymer length 3) are not a big problem as most + of the reads got the length right, the areas 1, 3 and 4 are nasty. + + + Area 1 is an A-homopolymer of length 7 and while many reads get that + length right (enough to tell MIRA what the true length is), it also + contains reads with a length of 6 and and others with a length of 8. + + + Area 2 is a "A-homopolymer" of length 2 where approximately half of the + reads get the length right, the other half not. See also the following + section. + + + Area 4 is a T-homopolymer of length 5 which also has approximately half + the reads with a wrong length of 4. + + + + Sequencing direction dependent insertions / deletions + + + In the previous section, the screen shot showing indels had an indel + at a homopolymer of 2, which is something quite curious. Upon closer + investigation, one might notice a pattern in the gap/nogap + distribution: it is almost identical to the orientation of build + direction of reads! + + + I looked for other examples of this behaviour and found quite a + number of them, the following figure shows a very clear case of that + error behaviour: + +
    + + Example for a sequencing direction dependent indel. Note how all + but one of the reads in '+' direction miss a base while all reads + built in in '-' direction have the correct number of bases. + + + Example for a sequencing direction dependent indel + + + + + + +
    + + This is quite astonishing: the problem occurs at a site without real + homopolymer (calling a 2-bases run a 'homopolymer' starts stretching + the definition a bit) and there are no major problematic homopolymer + sites near. In fact, this was more or less the case for all sites I + had a look at. + + + Neither did the cases which were investigated show common base + patterns, so unlike the Solexa GGCxG motif it does not look like + that error of IonTorrent is bound to a particular motif. + + + While I cannot prove the following statement, I somehow suspect that + there must be some kind of secondary structure forming which leads to + that kind of sequencing error. If anyone has a good explanation I'd be + happy to hear it: feel free to contact me at + bach@chevreux.org. + +
    + + + Coverage variance + + + The coverage variance with the old ~100bp reads was a bit on the + bad side for low coverage projects (10x to 15x): it varied wildly, + sometimes dropping to nearly zero, sometimes reaching approximately + double the coverage. + + + This has now improved and I have not seen pronounced coverage variance + in the data sets I have worked on. + + + + + GC bias + + + The GC bias seems to be small to non-existent, at least I could not + immediately make a correlation between GC content and coverage. + + + + + Other sources of error + + + You will want to keep an eye on the clipping of the data in the SFF + files from IonTorrent: while it is generally good enough, some data + sets of IonTorrent show that - for some error patterns - the clipping + is too lax and strange artefacts appear. MIRA will take care of these + - or at least of those it knows - but you should be aware of this + potential problem. + + + + + Where to find further information + + + IonTorrent being pretty new, getting as much information on that + technology is quite important. So here are a couple of links I found + to be helpful: + + + + + There is, of course, the TorrentDev site () + at Life Technologies which will be helpful to get a couple of + questions answered. + + + Just be aware that some of the documents over there are sometimes + painting an - how should I say it diplomatically? - overly + optimistic view on the performance of the technology. On the + other hand, so do documents released by the main competitors + like 454/Roche, Illumina, PacBio etc. ... so no harm done there. + + + + + I found Nick Loman's blog Pathogens: Genes and + Genomes to be my currently most valuable source of + information on IonTorrent. While the group he works for won a + sequencer from IonTorrent, he makes that fact very clear and still + unsparingly dissects the data he gets from that machine. + + + His posts got me going in getting MIRA grok IonTorrent. + + + + + The blog of Lex Nederbragt In between lines of + code is playing in the same league: very down to earth and + he knows a bluff when he sees it ... and is not afraid to call it + (be it from IonTorrent, PacBio or 454). + + + The analysis he did on a couple of Ion data sets have saved me + quite some time. + + + + + Last, but not least, the board with IonTorrent-related-stuff + over at SeqAnswers, + the first and foremost one-stop-shop ... erm ... discussion board + for everything related to sequencing nowadays. + + + + +
    + + + Pacific BioSciences + + + As of January 2014, PacBio should be seen as the + technology to go to for de-novo sequencing of bacteria and lower + eukaryotes. Period. Complement it with a bit of Illumina to get rid of + the last remaining errors and you'll have - for a couple of thousand + Euros - the best genome sequences money can buy. + + + + Highlights + + + + Sequence lengths + + + Just one word: huge. At least compared to other currently existing + technologies. It is not unusual to get average - usable - read lengths + of more than 3 to 4 kb, some chemistries doubling that number (at + the expense of accuracy). The largest - usable - reads I have seen + were > 25kb, though one needs to keep in mind that these are + quite rare and one does not see many of them in a project. + + + + + GC bias + + + I have seen none in my projects so far, neither have I in public + data. But these were certainly not as many projects as Sanger, 454, + Illumina and Ion, so take this with a grain of salt. + + + + + Accuracy of corrected reads + + + Once the raw PacBio data has been corrected (HGAP pipeline), the + resulting reads have a pretty good accuracy. There still are + occasional homopolymer errors remaining at non-random locations, but + they are a minor problem. + + + + + Assemblies of corrected reads + + + The assemblies coming out of the HGAP pipeline are already + astoundingly good. Of course you get long contigs, but also the + number of miscalled consensus bases is not too bad: 1 error per 20 + kb. Once the program + Quiver went through the assembly to do its magic + in polishing, the quality improves further to into the range of 1 + error per 50kb to 1 error per 250kb. + + + In my hands, I get even better assemblies with MIRA (longer contigs + which span repeats unresolved by HGAP). When combining this with + some low coverage Illumina data (say, 50x) to do cheap polishing, + the error rates I get are lower than 1 error in 4 megabases. + + + Take the above with a grain of salt as at the time of this writing, + I analysed in-depth only on a couple of bacteria. For ploidal + organisms I have just played a bit around with public data without + really doing an in depth analysis there. + + + + + + Lowlights + + + + Naming confusion + + + With PacBio, there are quite a number of read types being thrown + around and which do confuse people: polymerase + reads, quality clipped + reads, subreads, corrected + reads and maybe some more I currently forgot. Here's the + total unofficial guide on how to keep those things apart: + + + + + polymerase reads are the rawest + and most unedited stuff you may come into contact. You can see + it as "data fresh from the machine" and the number of megabases + there is usually the one sequencing providers sell to you. + + + The sequencing technology PacBio employs uses special hairpin + adaptors they have named SMRTBell, and these adaptors will be + present in the polymerase reads together with the fragments of + your DNA. + + + In terms of regular expression look-alike, the data in + polymerase reads has the following form: + + (Adaptor + (forward fragment sequence + (Adaptor + (fragment sequence in reverse complement))))* + + E.g., some of your polymerase reads will + contain just the adaptor and (part of) a fragment sequence: + Adap+FwdSeq. Others might contain: Adap+FwdSeq+Adap+RevSeq. And + still others might contain: multiple copies of + Adap+FwdSeq+Adap+RevSeq. + + + + quality clipped reads are + simply polymerase reads where some sort of + first quality clipping has been done. + + + subreads are quality + clipped reads where the adaptors have been removed and + the read split into forward fragment sequences and reverse + fragment sequences. Hence, one quality clipped polymerase read can + yield several subreads. + + + + corrected (sub)reads are + subreads where through the magic of lots of computational power + and a very high coverage of subreads, the errors have been + almost completely removed from the subreads. + + + This is usually done only on a part of the subreads as it takes + already long enough (several hundred hours CPU for a simple + bacterium). + + + + + + + Forward / reverse chimeric sequences + + + The splitting of polymerase reads into subreads (see above) needs + the SMRTBell adaptor to be recognised by motif searching + programs. Unfortunately, it looks like as if some "low percentage" + of reads have a self-looped end instead of an adaptor. Which in turn + means that the subread splitting will not split those reads and you + end up with a chimeric sequence. + + + + + Accuracy of uncorrected subreads + + + You need to be brave now: the accuracy of the the unclipped + polymerase reads is usually only about 50%. That is: on average + every second base is wrong. And I have seen a project where this + accuracy was only 14% (6 out of 7 bases are wrong). + + + After clipping, the average accuracy of the polymerase reads should + be anywhere between 80% and 85% (this depends a little bit on the + chemistry used), which translates to: every 5th to every 7th base is + wrong. The vast majority of errors being insertions or deletions, not + base substitutions. + + + 80% to 85% accurracy with indels as primary error is unfortunately + something assemblers cannot use very well. Read: not at all if you + want good assemblies (at least I know no program which does + that). Therefore, one needs to apply some sort of correction + ... which needs quite a deal of CPU, see below. + + + + + Immense need for CPU power + + + The above mentioned accuracies of 80% to 85% are too low for any + existing assembler I know to be correctly assembled. Therefore, + people came up with the idea of doing error correction on subreads + to improve their quality. + + + There are two major approaches: 1) correcting PacBio subreads with + other technologies with shorter reads and 2) correcting long PacBio + subreads with shorter PacBio subreads. Both approaches have been + shown to work, though there seems to be a preference nowadays to use + the second option as the "shorter" PacBio reads provide the benefit + of being still longer than read from other technologies and hence + provide a better repeat resolution. + + + Anyway, the amount of CPU power needed for any method above is + something to keep for: bacteria with 3 to 5 megabases at a 100x + polymerase read coverage can take several hundred hours of CPU for + the correction step. + + + + + Increased quality requirements for clean DNA sample prep + + + This is a problem which cannot be really attributed to PacBio: one + absolutely needs to check whether the protocols used "since ever" + for DNA extraction yield results which are clean and long enough for + PacBio. Often they are not. + + + The reason for this being a problem is simple: PacBio can sequence + really long fragments, but if your DNA extraction protocol smashed + the DNA into small pieces, then no sequencing technology in this + universe will be able to give you long reads for small fragments. + + + + +
    diff -Nru mira-3.9.18/doc/docbook/chap_solexa_part.xml mira-4.0/doc/docbook/chap_solexa_part.xml --- mira-3.9.18/doc/docbook/chap_solexa_part.xml 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/doc/docbook/chap_solexa_part.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,1512 +0,0 @@ - - - - - - - Bastien - Chevreux - bach@chevreux.org - - - -
    - Solomon Short - - There is no such thing like overkill. - - -
    - Assembly of Illumina data with MIRA3 - - - Introduction - - - This guide assumes that you have basic working knowledge of Unix systems, know - the basic principles of sequencing (and sequence assembly) and what assemblers - do. - - - While there are step by step instructions on how to setup your Solexa data and - then perform an assembly, this guide expects you to read at some point in time - - - - - the MIRA reference manual file to look up some - command line options as well as general information on what tags - MIRA uses in assemblies, files it generates etc.pp - - - - - the short usage introduction to MIRA3 so that - you have a basic knowledge on how to set up projects in mira for - Sanger sequencing projects. - - - - - - - - - Caveats when assembling Solexa data - - - Even very short Solexa reads (< 50bp) are great for mapping assemblies. I - simply love them as you can easily spot differences in mutant organisms - ... or boost the quality of a newly sequenced genome to Q60. - - - Regarding de-novo assemblies ... well, from an assembler's point of - view, very short reads are a catastrophe, regardless of the sequencing - technology. - - - - - Repeats. The problem of repetitive sequences (e.g. rRNA stretches in - bacteria) gets worse the shorter the read lengths get. - - - - - Amount of data. As MIRA is by heart an assembler to resolve - difficult repetitive problems as they occur in Sanger and 454 reads, it - drags along quite a lot of ancillary information which is useless in - Solexa assemblies ... but still eats away memory. - - - - - - - Things look better for the now available 'longer' Solexa reads. Starting - with a length of 75bp and paired-end data, de-novo for bacteria is not - that bad at all. The first Solexas with a length of ~110 bases are - appearing in public, and from a contig building these are about as good - for de-novo as the first 454 GS20 reads were (from a quality perspective - they are even way better). - - - - Rule of thumb: in genome sequencing, the longer, the better. - - - If you have to pay a bit more to get longer reads (e.g. Solexa 100mers - instead of 75mers), go get the longer reads. With these, the results - you generate are way(!) better than with 36, 50 or even 75mers - ... both in mapping and de-novo. Don't try to save a couple of hundred - bucks in sequencing, you'll pay dearly afterwards in assembly. - - - For RNASeq, things are a bit more complicated - - - - - Rule of thumb: in RNASeq de-novo sequencing, the longer, the better. - - - Like for genome sequencing, go get longer reads. Your assemblies will - be definitively be better. - - - - - Even if you can get bacteria sequenced with ridiculously high coverage - like 500x or 1000x, this amount of data is simply not needed. Even - more important - though counterintuitive - is the fact that due to - non-random sequence dependent sequencing errors, a too high coverage - may even make the assembly worse. - - - Another rule of thumb: when having more than enough data, reduce the - data set so as to have an average coverage of approximately 100x. In - some rare cases (high GC content), perhaps 120x to 150x, but certainly - not more. - - - - When reducing a data set, do NOT, under - no circumstances not, try fancing selection of reads by some arbitrary - quality or length criteria. This will introduce a terrible bias in your - assembly due to non-random sequence-dependend sequencing errors and - non-random sequence dependend base quality assignment. More on this in - the next section. - - - - - Typical highlights and lowlights of Solexa sequencing data - - - Note: This section contains things I've - seen in the past and simply jotted down. You may have different - observations. - - - - Highlights - - - - - - Quality - - - For 36mers and the MIRA proposed-end-clipping, even in the old - pipeline I get about 90 to 95% reads matching to a reference without - a single error. For 72mers, the number is approximately 5% lower, - 100mers another 5% less. Still, these are great numbers. - - - - - Improved base calling pipeline of Illumina - - - The new base calling pipeline (1.4 or 2.4?) rolled out by Illumina - in Q1/Q2 2009 typically yields 20-50% more data from the very same - images. Furthermore, the base calling is way better than in the old - pipeline. For Solexa 76 mers, after trimming I get only 1% real - junk, between 85 and 90% of the reads are matching to a reference - without a single error. Of the remaining reads, roughly 50% have one - error, 25% have two errors, 12.5% have three errors etc. - - - It is worthwhile to re-analyse your old data if the images are - still around. - - - - - - Lowlights - - - - - - Long homopolymers - - - Long homopolymers (stretches of identical bases in reads) can be a - slight problem for Solexa. However, it must be noted that this is a - problem of all sequencing technologies on the market so far (Sanger, - Solexa, 454). Furthermore, the problem in much less pronounced in - Solexa than in 454 data: in Solexa, first problem appear may appear - in stretches of 9 to 10 bases, in 454 a stretch of 3 to 4 bases may - already start being problematic in some reads. - - - - - The GGCxG and GGC motifs - - - GGCxG or even GGC motif in the - 5' to 3' direction of reads. This one is particularly annoying and - it took me quite a while to circumvent in MIRA the problems it - causes. - - - Simply put: at some places in a genome, base calling after a - GGCxG or GGC motif is - particularly error prone, the number of reads without errors - declines markedly. Repeated GGC motifs worsen - the situation. The following screenshots of a mapping assembly - illustrate this. - - - The first example is a the GGCxG motif (in form - of a GGCTG) occuring in approximately one third - of the reads at the shown position. Note that all but one read - with this problem are in the same (plus) direction. - -
    - - The Solexa GGCxG problem. - - - - - - -
    - - The next two screenshots show the GGC, once for - forward direction and one with reverse direction reads: - -
    - - The Solexa GGC problem, forward example - - - - - - -
    -
    - - The Solexa GGC problem, reverse example - - - - - - -
    - - Places in the genome that have GGCGGC.....GCCGCC - (a motif, perhaps even repeated, then some bases and then an - inverted motif) almost always have very, very low number of good - reads. Especially when the motif is GGCxG. - - - Things get especially difficult when these motifs occur at sites - where users may have a genuine interest. The following example is a - screenshot from the Lenski data (see walk-through below) where a - simple mapping reveals an anomaly which -- in reality -- is an IS - insertion (see ) - but could also look like a GGCxG motif in forward - direction (GGCCG) and at the same time a - GGC motif in reverse direction: - -
    - - A genuine place of interest almost masked by the - <literal>GGCxG</literal> problem. - - - - - - -
    -
    - - - Strong GC bias in some Solexa data (2nd half 2009 until advent of TruSeq kit at end of 2010) - - - - Here I'm recycling a few slides from a couple of talks I held in 2010. - - - Things used to be so nice and easy with the early Solexa data I worked - with (36 and 44mers) in late 2007 / early 2008. When sample taking was - done right -- e.g. for bacteria: in stationary phase -- and the - sequencing lab did a good job, the read coverage of the genome was - almost even. I did see a few papers claiming to see non-trivial GC - bias back then, but after having analysed the data I worked with I - dismissed them as "not relevant for my use cases." Have a look at the - following figure showing exemplarily the coverage of a 45% GC - bacterium in 2008: - -
    - - Example for no GC coverage bias in 2008 Solexa data. - - - Example for no GC coverage bias in 2008 Solexa data. Apart from a - slight <emphasis>smile shape</emphasis> of the coverage -- - indicating the sample taking was not 100% in stationary phase of the - bacterial culture -- everything looks pretty nice: the average - coverage is at 27x, and when looking at potential genome - duplications at twice the coverage (54x), there's nothing apart a - single peak (which turned out to be a problem in a rRNA region). - - - - - - -
    - - Things changed starting somewhen in Q3 2009, at least that's when I - got some data which made me notice a problem. Have a look at the - following figure which shows exactly the same organism as in the - figure above (bacterium, 45% GC): - -
    - - Example for GC coverage bias starting Q3 2009 in Solexa data. - - - Example for GC coverage bias starting Q3 2009 in Solexa - data. There's no <emphasis>smile shape</emphasis> anymore -- the - people in the lab learned to pay attention to sample in 100% - stationary phase -- but something else is extremely disconcerting: - the average coverage is at 33x, and when looking at potential genome - duplications at twice the coverage (66x), there are several dozen - peaks crossing the 66x threshold over a several kilobases (in one - case over 200 Kb) all over the genome. As if several small genome - duplications happened. - - - - - - -
    - - By the way, the figures above are just examples: I saw over a dozen - sequencing projects in 2008 without GC bias and several dozen in 2009 - / 2010 with GC bias. - - - Checking the potential genome duplication sites, they all looked - "clean", i.e., the typical genome insertion markers are - missing. Poking around at possible explanations, I looked at GC - content of those parts in the genome ... and there was the - explanation: - -
    - - Example for GC coverage bias, direct comparison 2008 / 2010 data. - - - Example for GC coverage bias, direct comparison 2008 / 2010 - data. The bug has 45% average GC, areas with above average read - coverage in 2010 data turn out to be lower GC: around 33 to 36%. The - effect is also noticeable in the 2008 data, but barely so. - - - - - - -
    - - Now as to actually why the GC bias suddenly - became so strong is unknown to me. The people in the lab use the same - protocol since several years to extract the DNA and the sequencing - providers claim to always use the Illumina standard protocols. - - - But obviously something must have changed. Current ideas about possible reasons include - - - - changed chemistries from Illumina leading perhaps to bias during DNA amplification - - - changed "standard" protocols - - - other ... - - - - It took Illumina some 18 months to resolve that problem for the - broader public: since data I work on were done with the TruSeq kit, - this problem has vanished. - - - However, if you based some conclusions or wrote a paper with Illumina - data which might be affected by the GC bias (Q3 2009 to Q4 2010), I - suggest you rethink all the conclusion drawn. This should be - especially the case for transcriptomics experiments where a difference - in expression of 2x to 3x starts to get highly significant! - -
    -
    - - - Mapping assemblies - - - This part will introduce you step by step how to get your data together for a - simple mapping assembly. - - - I'll make up an example using an imaginary bacterium: Bacillus chocorafoliensis (or short: Bchoc). - - - In this example, we assume you have two strains: a wild type strain of - Bchoc_wt and a mutant which you perhaps got from mutagenesis or other - means. Let's imagine that this mutant needs more time to eliminate a given - amount of chocolate, so we call the mutant Bchoc_se ... SE for - slow eater - - - You wanted to know which mutations might be responsible for the observed - behaviour. Assume the genome of Bchoc_wt is available to you as it was - published (or you previously sequenced it), so you resequenced Bchoc_se - with Solexa to examine mutations. - - - - Copying and naming the sequence data - - - You need to create (or get from your sequencing provider) the sequencing data - in either FASTQ or FASTA + FASTA quality format. The following walkthrough - uses what most people nowadays get: FASTQ. - - - Create a new project directory (e.g. myProject) and a subdirectory of this which will hold the sequencing data (e.g. data). - - arcadia:/path/to mkdir myProject -arcadia:/path/to cd myProject -arcadia:/path/to/myProject$ mkdir data - - Put the FASTQ data into that data directory so that it now looks perhaps like this: - - arcadia:/path/to/myProject$ ls -l data --rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocse_lane6.solexa.fastq --rw-r--r-- 1 bach users 264823645 2008-03-28 21:51 bchocse_lane7.solexa.fastq - - - - Copying and naming the reference sequence - - - The reference sequence (the backbone) can be in a number of different - formats: GFF3, GenBank, FASTA, CAF. The first three have the advantage - of being able to carry additional information like, e.g., - annotation. In this example, we will use a GenBank file like the ones - one can download from the NCBI. So, let's assume that our wild type - strain is in the following file: - NC_someNCBInumber.gbk. - - - You do not need to copy the reference sequence to your directory, but - I normally copy also the reference file into the directory with my - data as I want to have, at the end of my work, a nice little - self-sufficient directory which I can archive away and still be sure - that in 10 years time I have all data I need together. - - arcadia:/path/to/myProject$ cp /somewhere/NC_someNCBInumber.gbk data -arcadia:/path/to/myProject$ ls -l data --rw-r--r-- 1 bach users 6543511 2008-04-08 23:53 NC_someNCBInumber.gbk --rw-r--r-- 1 bach users 263985896 2008-03-28 21:49 bchocse_lane6.solexa.fastq --rw-r--r-- 1 bach users 264823645 2008-03-28 21:51 bchocse_lane7.solexa.fastq - - We're almost finished with the setup. As I like to have things neatly separated, I always create a directory called assemblies which will hold my assemblies (or different trials) together. Let's quickly do that: - - arcadia:/path/to/myProject$ mkdir assemblies -arcadia:/path/to/myProject$ mkdir assemblies/1sttrial -arcadia:/path/to/myProject$ cd assemblies/1sttrial - - - - Writing a simple manifest file - - - A manifest file is a configuration file for MIRA which tells it what type of assembly it should do and which data it should load. In this case we have unpaired sequencing data which we want to map to a reference sequence, the manifest file for that is pretty simple: - - # Example for a manifest describing a mapping assembly with -# unpaired Illumina data - -# First part: defining some basic things -# In this example, we just give a name to the assembly -# and tell MIRA it should map a genome in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = MyFirstAssembly -job = genome,mapping,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups" - -# first, the reference sequence -readgroup -is_reference -data = ../../data/NC_someNCBInumber.gbk -technology = text -strain = bchoc_wt - -# now the Illumina data - -readgroup = SomeUnpairedIlluminaReadsIGotFromTheLab -data = ../../data/*fastq -technology = solexa -strain = bchoc_se - - - Please look up the parameters of the manifest file in the main manual. The ones - above basically say: make an accurate mapping of Solexa reads - against a genome; in one pass; the name of the backbone strain is - 'bchoc_wt'; the - base qualities for the backbone are to be assumed Q30; for Solexa - data: assign default strain names for reads which have not loaded - ancilarry data with strain info and that default strain name should - be 'bchoc_se'. - - - - - Starting the assembly - - Starting the assembly is now just a matter of a simple command line: - - arcadia:/path/to/myProject/assemblies/1sttrial$ mira manifest.conf >&log_assembly.txt - - - For a bacterial project having a backbone of ~4 megabases and with - ~4.5 million Solexa 36mers, MIRA needs some ~21 minutes on my - development machine. - - - A yeast project with a genome of ~20 megabases and ~20 million 36mers - needs 3.5 hours and 28 GiB RAM. - - - - For this example - if you followed the walk-through on how to prepare the data - - everything you might want to adapt in the first time are the following thing in the manifest file: - options: - - - - - project= (for naming your assembly project) - - - - - strainname= to give the names of your reference and mapping strain - - - - - -GE:not= to tell MIRA how many processors it should use - - - - - Of course, you are free to change any option via the extended parameters, but - this will be the topic of another FAQ. - - - - - Mapping with multiple strains - - - MIRA will make use of ancillary information present in the manifest - file. One of these is the information to which strain (or organism or - cell line etc.pp) the generated data belongs. - - - You just need to tell in the manifest file which data comes from which - strain. Let's assume that in the example from above, the "lane6" data - were from a first mutant named bchoc_se1 and the - "lane7" data were from a second mutant - named bchoc_se2. Here's the manifest file you - would write then: - - # Example for a manifest describing a mapping assembly with -# unpaired Illumina data - -# First part: defining some basic things -# In this example, we just give a name to the assembly -# and tell MIRA it should map a genome in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = MyFirstAssembly -job = genome,mapping,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups" - -# first, the reference sequence -readgroup -is_reference -data = ../../data/NC_someNCBInumber.gbk -technology = text -strain = bchoc_wt - -# now the Illumina data - -readgroup = DataForSE1 -data = ../../data/bchocse_lane6.solexa.fastq -technology = solexa -strain = bchoc_se1 - -readgroup = DataForSE2 -data = ../../data/bchocse_lane7.solexa.fastq -technology = solexa -strain = bchoc_se2 - - While mapping (or even assembling de-novo) with multiple strains is - possible, the interpretation of results may become a bit daunting in - some cases. For many scenarios it might therefore be preferable to - successively use the data sets in own mappings or assemblies. - - - - This is really the only change you need to do for this example. - - - - Manifest for paired-end data sets - - - When using paired-end data in mapping, you must decide whether you want - - - - - use the MIRA feature to create long 'coverage equivalent reads' - (CERs) which saves a lot of memory (both in the assembler and - later on in an assembly editor). However, you then - loose paired-end - information! - - - - - or whether you want to keep paired-end - information! at the expense of larger memory requirements both in MIRA - and in assembly editors afterwards. - - - - - or a mix of the two above - - - - - The Illumina pipeline generally gives you two files for paired-end - data: a project-1.fastq and - project-2.fastq. The first file containing the - first read of a read-pair, the second file the second read. Depending - on the preprocessing pipeline of your sequencing provider, the names - of the reads are either the very same in both files or already have - a /1 or /2 appended. - - - - MIRA can read all FASTQ variants produced by various Illumina - pipelines, be they with or without the /1 and /2 already appended to - the names. You generally do not need to do any name mangling before - feeding the data to MIRA. - - - - The following manifest file is an example for mapping a 500 bp - paired-end and a 3kb mate-pair library of a strain - called bchoc_se1 against a GenBank reference - file containing a strain called bchoc_wt: - - # Example for a manifest describing a mapping assembly with -# paired Illumina data, not merging reads and therefore keeping -# all pair information - -# First part: defining some basic things -# In this example, we just give a name to the assembly -# and tell MIRA it should map a genome in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) -# and switch off merging of Solexa reads - -project = MyFirstAssembly -job = genome,mapping,accurate -parameters = -GE:not=4 SOLEXA_SETTINGS -CO:msr=no - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups" - -# first, the reference sequence -readgroup -is_reference -data = ../../data/NC_someNCBInumber.gbk -technology = text -strain = bchoc_wt - -# now the Illumina data - -readgroup = DataForPairedEnd500bpLib -data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq -technology = solexa -strain = bchoc_se1 -template_size = 250 750 infoonly -segment_placement = ---> <--- infoonly - -readgroup = DataForMatePair3kbLib -data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq -technology = solexa -strain = bchoc_se1 -template_size = 2500 3500 infoonly -segment_placement = <--- ---> infoonly - - Please look up the parameters used in the main manual. The ones - above basically say: make an accurate mapping of Solexa reads - against a genome. Additionally do not merge short short Solexa - reads to the contig. - - - For the paired-end library, assume a DNA template template size of - 250 to 750 bp and the segment orientation of the read pairs follows - the forward / reverse scheme. That information should be treated as - "information only" by MIRA, i.e., it is not used for deciding whether - a pair is well mapped. - - - For the maite-pair library, assume a DNA template template size of - 2500 to 3500 bp and the segment orientation of the read pairs follows - the reverse / forward scheme. That information should be treated as - "information only" by MIRA, i.e., it is not used for deciding whether - a pair is well mapped. - - - Comparing this command line with a command line for unpaired-data, two - parameters were added in the section for Solexa data: - - - - - -CO:msr=no tells MIRA not to merge reads that - are 100% identical to the backbone. This also allows to keep the - template information for the reads. - - - - - infoonly attribute actually switches - off checking of template sizes and segment - placement when inserting reads into the backbone. At first glance - this might seem counter-intuitive, but it's absolutely necessary - to spot, e.g., genome re-arrangements or indels in data analysis - after the assembly. - - - The reason is that if template size and segment placement checking - were on, the following would happen at, e.g. sites of - re-arrangement: MIRA would map the first read of a read-pair - without problem. However, it would very probably reject the second - read because it would not map at the specified distance or - orientation from its partner. Therefore, in mapping assemblies - with paired-end data, checking of the template size must be - switched off to give post-processing programs a chance to spot - re-arrangements. - - - - - - - Note: for other influencing factors - you might want to change depending on size of Solexa reads, see - section above on mapping of unpaired data. - - - - - Places of interest in a mapping assembly - - - This section just give a short overview on the tags you might find - interesting. For more information, especially on how to configure gap4 - or consed, please consult the mira usage document - and the mira manual. - - - In file types that allow tags (CAF, MAF, ACE), SNPs and other - interesting features will be marked by MIRA with a number of tags. The - following sections give a brief overview. For a description of what - the tags are (SROc, WRMc etc.), please read up the section "Tags used - in the assembly by MIRA and EdIt" in the main manual. - - - Screenshots in this section are taken from the walk-through with - Lenski data (see below). - - - - Where are SNPs? - - - - - the SROc tag will point to most - SNPs. Should you assemble sequences of more than one strain (I - cannot really recommend such a strategy), you also might - encounter SIOc and SAOc tags. - -
    - - "SROc" tag showing a SNP position in a Solexa mapping - assembly. - - - - - - -
    -
    - - "SROc" tag showing a SNP/indel position in a Solexa mapping - assembly. - - - - - - -
    -
    - - - the WRMc tags might sometimes - point SNPs to indels of one or two bases. - - -
    - - -
    - - - Where are insertions, deletions or genome re-arrangements? - - - - - Large deletions: the MCVc tags - point to deletions in the resequenced data, where no read is - covering the reference genome. - -
    - - "MCVc" tag (dark red stretch in figure) showing a genome - deletion in Solexa mapping assembly. - - - - - - -
    -
    - - - Insertions, small deletions and re-arrangements: these are - harder to spot. In unpaired data sets they can be found looking - at clusters of SROc, SRMc, WRMc, and / or UNSc tags. - -
    - - An IS150 insertion hiding behind a WRMc and a SRMc tags - - - - - - -
    - - more massive occurences of these tags lead to a rather colourful - display in finishing programs, which is why these clusters are - also sometimes called Xmas-trees. - -
    - - A 16 base pair deletion leading to a SROc/UNsC xmas-tree - - - - - - -
    -
    - - An IS186 insertion leading to a SROc/UNsC xmas-tree - - - - - - -
    - - In sets with paired-end data, post-processing software (or - alignment viewers) can use the read-pair information to guide - you to these sites (MIRA doesn't set tags at the moment). - -
    -
    - - -
    - - - Other tags of interest - - - - - the UNSc tag points to areas - where the consensus algorithm had troubles choosing a base. This - happens in low coverage areas, at places of insertions (compared - to the reference genome) or sometimes also in places where - repeats with a few bases difference are present. Often enough, - these tags are in areas with problematic sequences for the - Solexa sequencing technology like, e.g., a - GGCxG or even GGC motif in - the reads. - - - - - the SRMc tag points to places - where repeats with a few bases difference are present. Here too, - sequence problematic for the Solexa technology are likely to - have cause base calling errors and subsequently setting of this - tag. - - - - - - - - - Comprehensive spreadsheet tables (for Excel or OOcalc) - - - Biologists are not really interested in SNPs coordinates, and why - should they? They're more interested where SNPs are, how good they - are, which genes or other elements they hit, whether they have an - effect on a protein sequence, whether they may be important etc. For - organisms without intron/exon structure or splice variants, MIRA can - generate pretty comprehensive tables and files if an annotated - GenBank file was used as reference and strain information was given - to MIRA during the assembly. - - - Well, MIRA does all that automatically for you if the reference - sequence you gave was annotated. - - - For this, convert_project should be used with the - asnp format as target and a CAF file as input: - - -$ convert_project -t asnp input.caf output - - Note that it is strongly suggested to perform a quick manual cleanup - of the assembly prior to this: for rare cases (mainly at site of - small indels of one or two bases), mira will not tag SNPs with a SNP - tag (SROc, SAOc or SIOc) but will be fooled into a tag denoting - unsure positions (UNSc). This can be quickly corrected manually. See - further down in this manual in the section on post-processing. - - - After conversion, you will have four files in the directory which - you can all drag-and-drop into spreadsheet applications like - OpenOffice Calc or Excel. - - - The files should be pretty self-explanatory, here's just a short overview: - - - - - output_info_snplist.txt is a simple list of - the SNPs, with their positions compared to the reference - sequence (in bases and map degrees on the genome) as well as the - GenBank features they hit. - - - - - output_info_featureanalysis.txt is a much - extended version of the list above. It puts the SNPs into - context of the features (proteins, genes, RNAs etc.) and gives a - nice list, SNP by SNP, what might cause bigger changes in - proteins. - - - - - output_info_featuresummary.txt looks at the - changes (SNPs, indels) from the other way round. It gives an - excellent overview which features (genes, proteins, RNAs, - intergenic regions) you should investigate. - - - There's one column (named 'interesting') which pretty much - summarises up everything you need into three categories: yes, - no, and perhaps. 'Yes' is set if indels were detected, an amino - acid changed, start or stop codon changed or for SNPs in - intergenic regions and RNAs. 'Perhaps' is set for SNPs in - proteins that change a codon, but not an amino acid (silent - SNPs). 'No' is set if no SNP is hitting a feature. - - - - - output_info_featuresequences.txt simply - gives the sequences of each feature of the reference sequence - and the resequenced strain. - - - - - - - - - HTML files depicting SNP positions and deletions - - - I've come to realise that people who don't handle data from NextGen - sequencing technologies on a regular basis (e.g., many biologists) - don't want to be bothered with learning to handle specialised - programs to have a look at their resequenced strains. Be it because - they don't have time to learn how to use a new program or because - their desktop is not strong enough (CPU, memory) to handle the data - sets. - - - Something even biologist know to operate are browsers. Therefore, - convert_project has the option to load a CAF file of a mapping - assembly at output to HTML those areas which are interesting to - biologists. It uses the tags SROc, SAOc, SIOc and MCVc and outputs - the surrounding alignment of these areas together with a nice - overview and links to jump from one position to the previous or - next. - - - This is done with the '-t hsnp' option of convert_project: - - -$ convert_project -t hsnp input.caf output - - Note: I recommend doing this only - if the resequenced strain is a very close relative to the reference - genome, else the HTML gets pretty big. But for a couple of hundred - SNPs it works great. - - - - - WIG files depicting contig coverage - - - convert_project can also dump a coverage file in - WIG format (using '-t wig'). This comes pretty handy for searching - genome deletions or duplications in programs like the Affymetrix - Integrated Genome Browser (IGB, see ). - - - - - Tables for gene expression values / genome deletions & duplications - - - When having data mapped against a reference with annotations (either from GenBank formats or GFF3 formats), convert_project can generate tables depicting either expression values (in RNASeq/EST data mappings) or probable genome multiplication and deletion factors (in genome mappings). For this to work, you must use a MAF or CAF file as input, specify fcov as output format and the reference sequence must have had annotations during the mapping with MIRA. - - TODO: add example - -convert_project -t fcov mira_out.maf myfeaturetable - -
    - - - Walkthrough: mapping of E.coli from Lenski lab against E.coli B REL606 - - - Sorry, needs to be re-written for the relatively new SRR format - distributed at the NCBI ... and changes in MIRA 3.9.x. Please come - back later. - - -
    - - - De-novo Solexa only assemblies - - - This is actually quite straightforward and not much different from - mapping assemblies: you need to tell MIRA were the data files are, - whether or not there are special conditions which apply (paired-end info - etc.) and that it is a de-novo assembly that you want and off you go. - - # Example for a manifest describing a de-novo assembly with -# paired Illumina data - -# First part: defining some basic things -# In this example, we just give a name to the assembly -# and tell MIRA it should assemble a genome in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = MyFirstAssembly -job = genome,denovo,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups". This example uses a -# paired-end library with 500bp and a mate-pair library with 3.5kb - -readgroup = MyPairedEnd500bpLib -data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq -technology = solexa -strain = bchoc_se1 -template_size = 250 750 -segment_placement = ---> <--- - -readgroup = MyMatePair3kbLib -data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq -technology = solexa -strain = bchoc_se1 -template_size = 2500 3500 -segment_placement = <--- ---> - - Then you start the assembly: - - -arcadia:/path/to/myProject$ mira manifest.conf >&log_assembly.txt - - Of course, you can add any other switch you want like, e.g., changing - the number of processors used, adding default strain names etc.pp - - - - - De-novo hybrid assemblies (Solexa + ...) - - - - - Two strategies can be thought of to assemble genomes using a combination - of Solexa and other (longer) reads: either using all reads for a full - de-novo assembly or first assembling the longer reads and use the - resulting assembly as backbone to map Solexa reads. Both strategies have - their pro and cons. - - - - All reads de-novo - - - Throwing all reads into a de-novo assembly is the most straightforward - way to get 'good' assemblies. This strategy is also the one which - in - most cases - yields the longest contigs as, in many projects, parts of - a genome not covered by one sequencing technology will probably be - covered by another sequencing technology. Furthermore, having the - consensus covered by more than one sequencing technology make base - calling a pretty robust thing: if MIRA finds disagreements it cannot - resolve easily, the assembler at least leaves a tag in the assembly to - point human finishers to these positions of interest. - - - The downside of this approach however is the fact that the sheer - amount of data in Solexa sequencing projects makes life difficult for - de-novo assemblers, especially for MIRA which is keeping quite some - additional information in memory in de-novo assemblies and tries to - use algorithms as exact as possible during contig - construction. Therefore, MIRA sometimes still runs into data sets - which make it behave quite badly with respect to assembly time and - memory consumption (but this is being constantly improved). - - - Full de-novo hybrid assemblies can be recommended only for bacteria at - the moment, although lower eukaryotes should also be feasible on - larger machines. - - - This is actually quite straightforward and not much different from - mapping assemblies: you need to tell MIRA were the data files are, - whether or not there are special conditions which apply (paired-end - info etc.) and that it is a de-novo assembly that you want and off you - go. - - # Example for a manifest describing a de-novo assembly with -# shotgun 454 data and paired Illumina data - -# First part: defining some basic things -# In this example, we just give a name to the assembly -# and tell MIRA it should assemble a genome in accurate mode -# As special parameter, we want to use 4 threads in parallel (where possible) - -project = MyFirstAssembly -job = genome,denovo,accurate -parameters = -GE:not=4 - -# The second part defines the sequencing data MIRA should load and assemble -# The data is logically divided into "readgroups". This example uses a -# 454 shotgun library; a Solexa paired-end library with 500bp and a Solexa -# mate-pair library with 3.5kb - -# First the 454 data. Note that, in this example, no XML data is loaded for -# 454 (showing that this is less critical for shotgun 454 data) - -readgroup = MyShotgun454Lib -data = ../../data/project_454data.fastq -technology = 454 -strain = bchoc_se1 - -# Now Illumina data - -readgroup = MyPairedEnd500bpLib -data = ../../data/project500bp-1.fastq ../../data/project500bp-2.fastq -technology = solexa -strain = bchoc_se1 -template_size = 250 750 -segment_placement = ---> <--- - -readgroup = MyMatePair3kbLib -data = ../../data/project3kb-1.fastq ../../data/project3kb-2.fastq -technology = solexa -strain = bchoc_se1 -template_size = 2500 3500 -segment_placement = <--- ---> - - Then you start the assembly: - - -arcadia:/path/to/myProject$ mira manifest.conf >&log_assembly.txt - - - - Long reads first, then Solexa - - - This strategy works in two steps: first assembling long reads, then - mapping short reads to the full alignment (not just a consensus - sequence). The result will be an assembly containing 454 (or Sanger) - and Solexa reads. - - - - Step 1: assemble the 'long' reads (454 or Sanger or both) just as - you would when assembling 454 or Sanger data. - - - - Step 2: filter the results. Fetch 'long' contigs from the assembly - before which are larger than 500 bases and have a given minimum - coverage. The Idea is to get more or less all contigs which - represent valid genome sequence of your project. - - -$ convert_project -x 500 mira_out.maf hybrid_backbone.maf - - You might eventually want to add an additional filter for minimum - average coverage. If your project has an average coverage of 24, - you should filter for a minimum average coverage of 33% (coverage - 8, you might want to try out higher coverages) like this: - - -$ convert_project -x 500 -y 8 mira_out.maf hybrid_backbone.maf - - - - Step 3: map the Solexa data. Copy the hybrid backbone to a new - empty directory, add in the Solexa data, start a mapping assembly - using the MAF as input for the backbone / reference. If you - assembled the 454 / Sanger data with strain info, the Solexa data - should also get those (as described above). - - - The readgroup section of your manifest file would then look like this: (need to write) - - - - - - - - Post-processing of assemblies - - - This section is a bit terse, you should also read the chapter on - working with results of MIRA3. - - - - Post-processing mapping assemblies - - - When working with resequencing data and a mapping assembly, I always - load finished projects into an assembly editor and perform a quick - cleanup of the results. - - - For close relatives of the reference strain this doesn't take long as - MIRA will have set tags (see section earlier in this document) at all - sites you should have a look at. For example, very close mutant - bacteria with just SNPs or simple deletions and no genome - reorganisation, I usually clean up in 10 to 15 minutes. That gives the - last boost to data quality and your users (biologists etc.) will thank - you for that as it reduces their work in analysing the data (be it - looking at data or performing wet-lab experiments). - - - Assume you have the following result files in the result directory of - a MIRA assembly: - - -arcadia:/path/to/myProject/newstrain_d_results$ ls -l --rw-r--r-- 1 bach bach 655176303 2009-06-08 14:56 newstrain_out.caf -... - - The general workflow I use is to convert the CAF file to a gap4 database - and start the gap4 editor: - - -arcadia:newstrain_d_results$ caf2gap -project NEWSTRAIN -ace newstrain_out.caf >& /dev/null -arcadia:newstrain_d_results$ gap4 NEWSTRAIN.0 - - Then, in gap4 or gap5, I - - - - - quickly search for the UNSc and WRMc tags and check whether they - could be real SNPs that were overseen by MIRA. In that case, I - manually set a SROc (or SIOc) tag in gap4 via hotkeys that were - defined to set these tags. - - - - - sometimes also quickly clean up reads that are causing trouble in - alignments and lead to wrong base calling. These can be found at - sites with UNSc tags, most of the time they have the 5' to 3' - GGCxG motif which can cause trouble to Solexa. - - - - - look at sites with deletions (tagged with MCVc) and look whether I - should clean up the borders of the deletion. - - - - - After this, I convert the gap4 database back to CAF format: - - -$ gap2caf -project NEWSTRAIN >newstrain_edited.caf - - But beware: gap4 does not have the same consensus calling routines as - MIRA and will have saved it's own consensus in the new CAF. In fact, - gap4 performs rather badly in projects with multiple sequencing - technologies. So I use convert_project from the MIRA package to recall - a good consensus (and save it in MAF as it's more compact and a lot - faster in handling than CAF): - - -$ convert_project -r c newstrain_edited.caf newstrain_edited_recalled.maf - - And from this file I can then convert with convert_project to any - other format I or my users need: CAF, FASTA, ACE, WIG (for coverage - analysis) etc.pp. - - - I can also also generate tables and HTML files with SNP analysis - results (with the "-t asnp" and "-t - hsnp" options of convert_project) - - - - - Post-processing de-novo assemblies - - - As the result file of MIRA de-novo assemblies contains everything down - to 'contigs' with just two reads, it is advised to first filter out - all contigs which are smaller than a given size or have a coverage - lower than 1/3 to 1/2 of the overall coverage. - - - Filtering is performed by convert_project using CAF file as - input. Assume you have the following file: - - -arcadia:/path/to/myProject/newstrain_d_results$ ls -l -... --rw-r--r-- 1 bach bach 655176303 2009-06-08 14:56 newstrain_out.maf -... - - Let's say you have a hybrid assembly with an average coverage of - 50x. I normally filter out all contigs which have an average coverage - less than 1/3 and are smaller than 500 bases. These are mostly junk - contiglets remaining from the assembly and can be more or less safely - ignored. This is done the following way: - - -arcadia:newstrain_d_results$ convert_project -x 500 -y 17 newstrain_out.maf newstrain_filterx500y17.caf - - From there on, convert the filtered CAF file to anything you need to - continue finishing of the genome (gap4 database, ACE, etc.pp). - - - - - - Using SRA data from the Short Read Archive at the NCBI - - - Make sure you have the SRA toolkit installed, see - - - The SRA fromat needs to be converted into something MIRA understands, - FASTQ being an ideal candidate. Therefore the program used for this will - be fastq-dump, which unfortunately will not output - names as needed by default, but fortunately has useful options to define - your own names via the --defline-seq - and --defline-qual command line options. - - - When using paired-end or mate-pair data, one disconcerting thing about - the SRA tools is that they will always concatenate by default the two - reads into a single sequence, which is of course not what any sane - person would expect. Here too, there's a command line option to get - around this: --split-spot - - - The following shows how I would recommend extracting (and naming) reads - from the SRA: - - -$ ls -l -... -$ fastq-dump --split-spot --defline-seq '@$ac_$si/$ri' --defline-qual '+' SRR012345.sra - - - - - - Known bugs / problems - - - These are actual for version 3 of MIRA and might or might not have been - addressed in later version. - - - Bugs: - - - - - mapping of paired-end reads with one read being in non-repetitive - area and the other in a repeat is not as effective as it should - be. The optimal strategy to use would be to map first the - non-repetitive read and then the read in the repeat. Unfortunately, - this is not yet implemented in MIRA. - - - - -
    diff -Nru mira-3.9.18/doc/docbook/chap_specialparams_part.xml mira-4.0/doc/docbook/chap_specialparams_part.xml --- mira-3.9.18/doc/docbook/chap_specialparams_part.xml 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/chap_specialparams_part.xml 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,79 @@ + + + + + + + Bastien + Chevreux + bach@chevreux.org + + + +
    + Solomon Short + + ... . + + +
    + Parameters for special situations + + + Introduction + + + Most of this chapter and many sections are just stubs at the moment. + + + + + PacBio + + + + PacBio CCS reads + + + Declare the sequencing technology to be high-quality PacBio (PCBIOHQ). The last time I worked with CCS, the + ends of the reads were not really clean, so using the proposed end + clipping (which needs to be manually switched on for PCBIOHQ reads) + may be advisable. + + ... +parameters = PCBIOHQ_SETTINGS -CL:pec=yes +... + +readgroup +technology=pcbiohq +data=... +... + + + + PacBio error corrected reads + + + Declare the sequencing technology to be high-quality PacBio (PCBIOHQ). For self-corrected data or data + corrected with other sequencing technologies, it is recommended to + change the -CO:mrpg setting to a value which is 1/4th to + 1/5th of the average coverage of the corrected PacBio reads across the + genome. E.g.: + + ... +parameters = PCBIOHQ_SETTINGS -CO:mrpg=5 +... + +readgroup +technology=pcbiohq +data=... +... + + for a project which has ~24x coverage. This necessity may change in + later versions of MIRA though. + + + +
    diff -Nru mira-3.9.18/doc/docbook/copyrightfile mira-4.0/doc/docbook/copyrightfile --- mira-3.9.18/doc/docbook/copyrightfile 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/copyrightfile 2014-02-02 12:05:17.000000000 +0000 @@ -1,4 +1,4 @@ -2013Bastien Chevreux +2014Bastien Chevreux diff -Nru mira-3.9.18/doc/docbook/replace_all.sh mira-4.0/doc/docbook/replace_all.sh --- mira-3.9.18/doc/docbook/replace_all.sh 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/doc/docbook/replace_all.sh 2014-02-02 12:05:17.000000000 +0000 @@ -0,0 +1,9 @@ + +FROM=strainname +TO=strain_name + +for f in *xml; do + echo $f + sed -e "s/$FROM/$TO/g" $f >bla + mv bla $f +done diff -Nru mira-3.9.18/doc/docbook/warning_frontofchapter.xml mira-4.0/doc/docbook/warning_frontofchapter.xml --- mira-3.9.18/doc/docbook/warning_frontofchapter.xml 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/doc/docbook/warning_frontofchapter.xml 2014-02-02 12:05:17.000000000 +0000 @@ -10,4 +10,3 @@ For those cases, please refer to chapter 3 (the reference) for how to write manifest files.
    - diff -Nru mira-3.9.18/m4/ax_boost_base.m4 mira-4.0/m4/ax_boost_base.m4 --- mira-3.9.18/m4/ax_boost_base.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_boost_base.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,258 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# DESCRIPTION +# +# Test for the Boost C++ libraries of a particular version (or newer) +# +# If no path to the installed boost library is given the macro searchs +# under /usr, /usr/local, /opt and /opt/local and evaluates the +# $BOOST_ROOT environment variable. Further documentation is available at +# . +# +# This macro calls: +# +# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) +# +# And sets: +# +# HAVE_BOOST +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg +# Copyright (c) 2009 Peter Adolphs +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 20 + +AC_DEFUN([AX_BOOST_BASE], +[ +AC_ARG_WITH([boost], + [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], + [use Boost library from a standard location (ARG=yes), + from the specified location (ARG=), + or disable it (ARG=no) + @<:@ARG=yes@:>@ ])], + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ac_boost_path="" + else + want_boost="yes" + ac_boost_path="$withval" + fi + ], + [want_boost="yes"]) + + +AC_ARG_WITH([boost-libdir], + AS_HELP_STRING([--with-boost-libdir=LIB_DIR], + [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), + [ + if test -d "$withval" + then + ac_boost_lib_path="$withval" + else + AC_MSG_ERROR(--with-boost-libdir expected directory name) + fi + ], + [ac_boost_lib_path=""] +) + +if test "x$want_boost" = "xyes"; then + boost_lib_version_req=ifelse([$1], ,1.20.0,$1) + boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` + boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` + boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` + boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` + if test "x$boost_lib_version_req_sub_minor" = "x" ; then + boost_lib_version_req_sub_minor="0" + fi + WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` + AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) + succeeded=no + + dnl On 64-bit systems check for system libraries in both lib64 and lib. + dnl The former is specified by FHS, but e.g. Debian does not adhere to + dnl this (as it rises problems for generic multi-arch support). + dnl The last entry in the list is chosen by default when no libraries + dnl are found, e.g. when only header-only libraries are installed! + libsubdirs="lib" + ax_arch=`uname -m` + if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then + libsubdirs="lib64 lib lib64" + fi + + dnl first we check the system location for boost libraries + dnl this location ist chosen if boost libraries are installed with the --layout=system option + dnl or if you install boost with RPM + if test "$ac_boost_path" != ""; then + BOOST_CPPFLAGS="-I$ac_boost_path/include" + for ac_boost_path_tmp in $libsubdirs; do + if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then + BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" + break + fi + done + elif test "$cross_compiling" != yes; then + for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do + if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then + for libsubdir in $libsubdirs ; do + if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" + BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" + break; + fi + done + fi + + dnl overwrite ld flags if we have required special directory with + dnl --with-boost-libdir parameter + if test "$ac_boost_lib_path" != ""; then + BOOST_LDFLAGS="-L$ac_boost_lib_path" + fi + + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_REQUIRE([AC_PROG_CXX]) + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@include + ]], [[ + #if BOOST_VERSION >= $WANT_BOOST_VERSION + // Everything is okay + #else + # error Boost version is too old + #endif + ]])],[ + AC_MSG_RESULT(yes) + succeeded=yes + found_system=yes + ],[ + ]) + AC_LANG_POP([C++]) + + + + dnl if we found no boost with system layout we search for boost libraries + dnl built and installed without the --layout=system option or for a staged(not installed) version + if test "x$succeeded" != "xyes"; then + _version=0 + if test "$ac_boost_path" != ""; then + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + fi + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" + done + fi + else + if test "$cross_compiling" != yes; then + for ac_boost_path in /usr /usr/local /opt /opt/local ; do + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + best_path=$ac_boost_path + fi + done + fi + done + + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" + if test "$ac_boost_lib_path" = ""; then + for libsubdir in $libsubdirs ; do + if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$best_path/$libsubdir" + fi + fi + + if test "x$BOOST_ROOT" != "x"; then + for libsubdir in $libsubdirs ; do + if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then + version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` + stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` + stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` + V_CHECK=`expr $stage_version_shorten \>\= $_version` + if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then + AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) + BOOST_CPPFLAGS="-I$BOOST_ROOT" + BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" + fi + fi + fi + fi + + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@include + ]], [[ + #if BOOST_VERSION >= $WANT_BOOST_VERSION + // Everything is okay + #else + # error Boost version is too old + #endif + ]])],[ + AC_MSG_RESULT(yes) + succeeded=yes + found_system=yes + ],[ + ]) + AC_LANG_POP([C++]) + fi + + if test "$succeeded" != "yes" ; then + if test "$_version" = "0" ; then + AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) + else + AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) + fi + # execute ACTION-IF-NOT-FOUND (if present): + ifelse([$3], , :, [$3]) + else + AC_SUBST(BOOST_CPPFLAGS) + AC_SUBST(BOOST_LDFLAGS) + AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) + # execute ACTION-IF-FOUND (if present): + ifelse([$2], , :, [$2]) + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" +fi + +]) diff -Nru mira-3.9.18/m4/ax_boost_filesystem.m4 mira-4.0/m4/ax_boost_filesystem.m4 --- mira-3.9.18/m4/ax_boost_filesystem.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_boost_filesystem.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,118 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_FILESYSTEM +# +# DESCRIPTION +# +# Test for Filesystem library from the Boost C++ libraries. The macro +# requires a preceding call to AX_BOOST_BASE. Further documentation is +# available at . +# +# This macro calls: +# +# AC_SUBST(BOOST_FILESYSTEM_LIB) +# +# And sets: +# +# HAVE_BOOST_FILESYSTEM +# +# LICENSE +# +# Copyright (c) 2009 Thomas Porschberg +# Copyright (c) 2009 Michael Tindal +# Copyright (c) 2009 Roman Rybalko +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 22 + +AC_DEFUN([AX_BOOST_FILESYSTEM], +[ + AC_ARG_WITH([boost-filesystem], + AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@], + [use the Filesystem library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_filesystem_lib="" + else + want_boost="yes" + ax_boost_user_filesystem_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + LIBS_SAVED=$LIBS + LIBS="$LIBS $BOOST_SYSTEM_LIB" + export LIBS + + AC_CACHE_CHECK(whether the Boost::Filesystem library is available, + ax_cv_boost_filesystem, + [AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [[using namespace boost::filesystem; + path my_path( "foo/bar/data.txt" ); + return 0;]])], + ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no) + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_filesystem" = "xyes"; then + AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + if test "x$ax_boost_user_filesystem_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_filesystem*.so* $BOOSTLIBDIR/libboost_filesystem*.dylib* $BOOSTLIBDIR/libboost_filesystem*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_filesystem.*\)\.so.*$;\1;' -e 's;^lib\(boost_filesystem.*\)\.a*$;\1;' -e 's;^lib\(boost_filesystem.*\)\.dylib$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], + [link_filesystem="no"]) + done + if test "x$link_filesystem" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_filesystem*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_filesystem.*\)\.dll.*$;\1;' -e 's;^\(boost_filesystem.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], + [link_filesystem="no"]) + done + fi + else + for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do + AC_CHECK_LIB($ax_lib, exit, + [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], + [link_filesystem="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the library!) + fi + if test "x$link_filesystem" != "xyes"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + LIBS="$LIBS_SAVED" + fi +]) diff -Nru mira-3.9.18/m4/ax_boost_iostreams.m4 mira-4.0/m4/ax_boost_iostreams.m4 --- mira-3.9.18/m4/ax_boost_iostreams.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_boost_iostreams.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,116 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_iostreams.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_IOSTREAMS +# +# DESCRIPTION +# +# Test for IOStreams library from the Boost C++ libraries. The macro +# requires a preceding call to AX_BOOST_BASE. Further documentation is +# available at . +# +# This macro calls: +# +# AC_SUBST(BOOST_IOSTREAMS_LIB) +# +# And sets: +# +# HAVE_BOOST_IOSTREAMS +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 18 + +AC_DEFUN([AX_BOOST_IOSTREAMS], +[ + AC_ARG_WITH([boost-iostreams], + AS_HELP_STRING([--with-boost-iostreams@<:@=special-lib@:>@], + [use the IOStreams library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1 ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_iostreams_lib="" + else + want_boost="yes" + ax_boost_user_iostreams_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::IOStreams library is available, + ax_cv_boost_iostreams, + [AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include + @%:@include + ]], + [[std::string input = "Hello World!"; + namespace io = boost::iostreams; + io::filtering_istream in(boost::make_iterator_range(input)); + return 0; + ]])], + ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no) + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_iostreams" = "xyes"; then + AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + if test "x$ax_boost_user_iostreams_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.so* $BOOSTLIBDIR/libboost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break], + [link_iostreams="no"]) + done + if test "x$link_iostreams" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break], + [link_iostreams="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do + AC_CHECK_LIB($ax_lib, main, + [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break], + [link_iostreams="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the library!) + fi + if test "x$link_iostreams" != "xyes"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) diff -Nru mira-3.9.18/m4/ax_boost_regex.m4 mira-4.0/m4/ax_boost_regex.m4 --- mira-3.9.18/m4/ax_boost_regex.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_boost_regex.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,111 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_regex.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_REGEX +# +# DESCRIPTION +# +# Test for Regex library from the Boost C++ libraries. The macro requires +# a preceding call to AX_BOOST_BASE. Further documentation is available at +# . +# +# This macro calls: +# +# AC_SUBST(BOOST_REGEX_LIB) +# +# And sets: +# +# HAVE_BOOST_REGEX +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg +# Copyright (c) 2008 Michael Tindal +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 20 + +AC_DEFUN([AX_BOOST_REGEX], +[ + AC_ARG_WITH([boost-regex], + AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@], + [use the Regex library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_regex_lib="" + else + want_boost="yes" + ax_boost_user_regex_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::Regex library is available, + ax_cv_boost_regex, + [AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include + ]], + [[boost::regex r(); return 0;]])], + ax_cv_boost_regex=yes, ax_cv_boost_regex=no) + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_regex" = "xyes"; then + AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + if test "x$ax_boost_user_regex_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], + [link_regex="no"]) + done + if test "x$link_regex" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_regex*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], + [link_regex="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do + AC_CHECK_LIB($ax_lib, main, + [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], + [link_regex="no"]) + done + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the Boost::Regex library!) + fi + if test "x$link_regex" != "xyes"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) diff -Nru mira-3.9.18/m4/ax_boost_system.m4 mira-4.0/m4/ax_boost_system.m4 --- mira-3.9.18/m4/ax_boost_system.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_boost_system.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,120 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_SYSTEM +# +# DESCRIPTION +# +# Test for System library from the Boost C++ libraries. The macro requires +# a preceding call to AX_BOOST_BASE. Further documentation is available at +# . +# +# This macro calls: +# +# AC_SUBST(BOOST_SYSTEM_LIB) +# +# And sets: +# +# HAVE_BOOST_SYSTEM +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg +# Copyright (c) 2008 Michael Tindal +# Copyright (c) 2008 Daniel Casimiro +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 14 + +AC_DEFUN([AX_BOOST_SYSTEM], +[ + AC_ARG_WITH([boost-system], + AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@], + [use the System library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-system=boost_system-gcc-mt ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_system_lib="" + else + want_boost="yes" + ax_boost_user_system_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_BUILD]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::System library is available, + ax_cv_boost_system, + [AC_LANG_PUSH([C++]) + CXXFLAGS_SAVE=$CXXFLAGS + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [[boost::system::system_category]])], + ax_cv_boost_system=yes, ax_cv_boost_system=no) + CXXFLAGS=$CXXFLAGS_SAVE + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_system" = "xyes"; then + AC_SUBST(BOOST_CPPFLAGS) + + AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + + LDFLAGS_SAVE=$LDFLAGS + if test "x$ax_boost_user_system_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [link_system="no"]) + done + if test "x$link_system" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [link_system="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [link_system="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the library!) + fi + if test "x$link_system" = "xno"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) diff -Nru mira-3.9.18/m4/ax_boost_thread.m4 mira-4.0/m4/ax_boost_thread.m4 --- mira-3.9.18/m4/ax_boost_thread.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_boost_thread.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,149 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_THREAD +# +# DESCRIPTION +# +# Test for Thread library from the Boost C++ libraries. The macro requires +# a preceding call to AX_BOOST_BASE. Further documentation is available at +# . +# +# This macro calls: +# +# AC_SUBST(BOOST_THREAD_LIB) +# +# And sets: +# +# HAVE_BOOST_THREAD +# +# LICENSE +# +# Copyright (c) 2009 Thomas Porschberg +# Copyright (c) 2009 Michael Tindal +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 23 + +AC_DEFUN([AX_BOOST_THREAD], +[ + AC_ARG_WITH([boost-thread], + AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@], + [use the Thread library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-thread=boost_thread-gcc-mt ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_thread_lib="" + else + want_boost="yes" + ax_boost_user_thread_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_BUILD]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::Thread library is available, + ax_cv_boost_thread, + [AC_LANG_PUSH([C++]) + CXXFLAGS_SAVE=$CXXFLAGS + + if test "x$host_os" = "xsolaris" ; then + CXXFLAGS="-pthreads $CXXFLAGS" + elif test "x$host_os" = "xmingw32" ; then + CXXFLAGS="-mthreads $CXXFLAGS" + else + CXXFLAGS="-pthread $CXXFLAGS" + fi + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [[boost::thread_group thrds; + return 0;]])], + ax_cv_boost_thread=yes, ax_cv_boost_thread=no) + CXXFLAGS=$CXXFLAGS_SAVE + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_thread" = "xyes"; then + if test "x$host_os" = "xsolaris" ; then + BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" + elif test "x$host_os" = "xmingw32" ; then + BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" + else + BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" + fi + + AC_SUBST(BOOST_CPPFLAGS) + + AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + + LDFLAGS_SAVE=$LDFLAGS + case "x$host_os" in + *bsd* ) + LDFLAGS="-pthread $LDFLAGS" + break; + ;; + esac + if test "x$ax_boost_user_thread_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_thread*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.a*$;\1;'`; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [link_thread="no"]) + done + if test "x$link_thread" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_thread*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [link_thread="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do + AC_CHECK_LIB($ax_lib, exit, + [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [link_thread="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the library!) + fi + if test "x$link_thread" = "xno"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + else + case "x$host_os" in + *bsd* ) + BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS" + break; + ;; + esac + + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) diff -Nru mira-3.9.18/m4/ax_check_zlib.m4 mira-4.0/m4/ax_check_zlib.m4 --- mira-3.9.18/m4/ax_check_zlib.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_check_zlib.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,133 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_ZLIB() +# +# DESCRIPTION +# +# This macro searches for an installed zlib library. If nothing was +# specified when calling configure, it searches first in /usr/local and +# then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified, +# it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If +# --without-zlib is specified, the library is not searched at all. +# +# If either the header file (zlib.h) or the library (libz) is not found, +# the configuration exits on error, asking for a valid zlib installation +# directory or --without-zlib. +# +# The macro defines the symbol HAVE_LIBZ if the library is found. You +# should use autoheader to include a definition for this symbol in a +# config.h file. Sample usage in a C/C++ source is as follows: +# +# #ifdef HAVE_LIBZ +# #include +# #endif /* HAVE_LIBZ */ +# +# LICENSE +# +# Copyright (c) 2008 Loic Dachary +# Copyright (c) 2010 Bastien Chevreux +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 8 + +AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB]) +AC_DEFUN([AX_CHECK_ZLIB], +# +# Handle user hints +# +[AC_MSG_CHECKING(if zlib is wanted) +AC_ARG_WITH(zlib, +[ --with-zlib=DIR root directory path of zlib installation [defaults to + /usr/local or /usr if not found in /usr/local] + --without-zlib to disable zlib usage completely], +[if test "$withval" != no ; then + zlib_places="/usr/local /usr /opt/local /sw" + AC_MSG_RESULT(yes) + if test -d "$withval" + then + zlib_places="$withval $zlib_places" + else + AC_MSG_WARN([Sorry, $withval does not exist, checking usual places]) + fi +else + AC_MSG_RESULT(no) +fi], +[AC_MSG_RESULT(yes)]) + +# +# Locate zlib, if wanted +# +if test -n "${zlib_places}" +then + # check the user supplied or any other more or less 'standard' place: + # Most UNIX systems : /usr/local and /usr + # MacPorts / Fink on OSX : /opt/local respectively /sw + for ZLIB_HOME in ${zlib_places} ; do + if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi + ZLIB_HOME="" + done + + # if zlib.h was nowhere to be found, give a notice and bail out + if test ! -n "${ZLIB_HOME}"; then + AC_MSG_ERROR(No zlib.h in any include directory of ${zlib_places}: either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib) + fi + + ZLIB_OLD_LDFLAGS=$LDFLAGS + ZLIB_OLD_CPPFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" + AC_LANG_SAVE + AC_LANG_C + AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no]) + AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) + AC_LANG_RESTORE + if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes" + then + # + # If both library and header were found, use them + # + AC_CHECK_LIB(z, inflateEnd) + AC_MSG_CHECKING(zlib in ${ZLIB_HOME}) + AC_MSG_RESULT(ok) + else + # + # If either header or library was not found, revert and bomb + # + AC_MSG_CHECKING(zlib in ${ZLIB_HOME}) + LDFLAGS="$ZLIB_OLD_LDFLAGS" + CPPFLAGS="$ZLIB_OLD_CPPFLAGS" + AC_MSG_RESULT(failed) + AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib) + fi +fi + +]) diff -Nru mira-3.9.18/m4/ax_cxx_have_std.m4 mira-4.0/m4/ax_cxx_have_std.m4 --- mira-3.9.18/m4/ax_cxx_have_std.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_cxx_have_std.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,46 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_cxx_have_std.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_HAVE_STD +# +# DESCRIPTION +# +# If the compiler supports ISO C++ standard library (i.e., can include the +# files iostream, map, iomanip and cmath), define HAVE_STD. +# +# LICENSE +# +# Copyright (c) 2008 Todd Veldhuizen +# Copyright (c) 2008 Luc Maisonobe +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AU_ALIAS([AC_CXX_HAVE_STD], [AX_CXX_HAVE_STD]) +AC_DEFUN([AX_CXX_HAVE_STD], +[AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library, +ax_cv_cxx_have_std, +[AC_REQUIRE([AX_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#include +#include +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[return 0;], + ax_cv_cxx_have_std=yes, ax_cv_cxx_have_std=no) + AC_LANG_RESTORE +]) +if test "$ax_cv_cxx_have_std" = yes; then + AC_DEFINE(HAVE_STD,,[define if the compiler supports ISO C++ standard library]) +fi +]) diff -Nru mira-3.9.18/m4/ax_cxx_have_stl.m4 mira-4.0/m4/ax_cxx_have_stl.m4 --- mira-3.9.18/m4/ax_cxx_have_stl.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_cxx_have_stl.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,44 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_cxx_have_stl.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_HAVE_STL +# +# DESCRIPTION +# +# If the compiler supports the Standard Template Library, define HAVE_STL. +# +# LICENSE +# +# Copyright (c) 2008 Todd Veldhuizen +# Copyright (c) 2008 Luc Maisonobe +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AU_ALIAS([AC_CXX_HAVE_STL], [AX_CXX_HAVE_STL]) +AC_DEFUN([AX_CXX_HAVE_STL], +[AC_CACHE_CHECK(whether the compiler supports Standard Template Library, +ax_cv_cxx_have_stl, +[AC_REQUIRE([AX_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[list x; x.push_back(5); +list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], + ax_cv_cxx_have_stl=yes, ax_cv_cxx_have_stl=no) + AC_LANG_RESTORE +]) +if test "$ax_cv_cxx_have_stl" = yes; then + AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library]) +fi +]) diff -Nru mira-3.9.18/m4/ax_cxx_namespaces.m4 mira-4.0/m4/ax_cxx_namespaces.m4 --- mira-3.9.18/m4/ax_cxx_namespaces.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_cxx_namespaces.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,40 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_cxx_namespaces.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_NAMESPACES +# +# DESCRIPTION +# +# If the compiler can prevent names clashes using namespaces, define +# HAVE_NAMESPACES. +# +# LICENSE +# +# Copyright (c) 2008 Todd Veldhuizen +# Copyright (c) 2008 Luc Maisonobe +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AU_ALIAS([AC_CXX_NAMESPACES], [AX_CXX_NAMESPACES]) +AC_DEFUN([AX_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ax_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ax_cv_cxx_namespaces=yes, ax_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ax_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) diff -Nru mira-3.9.18/m4/ax_lib_expat.m4 mira-4.0/m4/ax_lib_expat.m4 --- mira-3.9.18/m4/ax_lib_expat.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ax_lib_expat.m4 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,283 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_lib_expat.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_LIB_EXPAT([MINIMUM-VERSION]) +# +# DESCRIPTION +# +# This macro provides tests of availability of Expat XML Parser of +# particular version or newer. This macro checks for Expat XML Parser +# headers and libraries and defines compilation flags +# +# Macro supports following options and their values: +# +# 1) Single-option usage: +# +# --with-expat -- yes, no, or path to Expat XML Parser +# installation prefix +# +# 2) Three-options usage (all options are required): +# +# --with-expat=yes +# --with-expat-inc -- path to base directory with Expat headers +# --with-expat-lib -- linker flags for Expat +# +# This macro calls: +# +# AC_SUBST(EXPAT_CFLAGS) +# AC_SUBST(EXPAT_LIBS) +# AC_SUBST(EXPAT_LDFLAGS) +# AC_SUBST(EXPAT_VERSION) -- only if version requirement is used +# +# And sets: +# +# HAVE_EXPAT +# +# LICENSE +# +# Copyright (c) 2008 Mateusz Loskot +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 10 + +AC_DEFUN([AX_LIB_EXPAT], +[ + AC_ARG_WITH([expat], + AS_HELP_STRING([--with-expat=@<:@ARG@:>@], + [use Expat XML Parser from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)] + ), + [ + if test "$withval" = "yes"; then + if test -f /usr/local/include/expat.h ; then + expat_prefix=/usr/local + elif test -f /usr/include/expat.h ; then + expat_prefix=/usr + else + expat_prefix="" + fi + expat_requested="yes" + elif test -d "$withval"; then + expat_prefix="$withval" + expat_requested="yes" + else + expat_prefix="" + expat_requested="no" + fi + ], + [ + dnl Default behavior is implicit yes + if test -f /usr/local/include/expat.h ; then + expat_prefix=/usr/local + elif test -f /usr/include/expat.h ; then + expat_prefix=/usr + else + expat_prefix="" + fi + ] + ) + + AC_ARG_WITH([expat-inc], + AS_HELP_STRING([--with-expat-inc=@<:@DIR@:>@], + [path to Expat XML Parser headers] + ), + [expat_include_dir="$withval"], + [expat_include_dir=""] + ) + AC_ARG_WITH([expat-lib], + AS_HELP_STRING([--with-expat-lib=@<:@ARG@:>@], + [link options for Expat XML Parser libraries] + ), + [expat_lib_flags="$withval"], + [expat_lib_flags=""] + ) + + EXPAT_CFLAGS="" + EXPAT_LIBS="" + EXPAT_VERSION="" + + dnl + dnl Collect include/lib paths and flags + dnl + run_expat_test="no" + + if test -n "$expat_prefix"; then + expat_include_dir="$expat_prefix/include" + expat_ld_flags="-L$expat_prefix/lib" + expat_lib_flags="-lexpat" + run_expat_test="yes" + elif test "$expat_requested" = "yes"; then + if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then + run_expat_test="yes" + fi + else + run_expat_test="no" + fi + + dnl + dnl Check Expat XML Parser files + dnl + if test "$run_expat_test" = "yes"; then + + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$expat_include_dir" + + saved_LIBS="$LIBS" + LIBS="$LIBS $expat_lib_flags" + + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $expat_ld_flags" + + dnl + dnl Check Expat headers + dnl + AC_MSG_CHECKING([for Expat XML Parser headers in $expat_include_dir]) + + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [[ +@%:@include + ]], + [[]] + )], + [ + EXPAT_CFLAGS="-I$expat_include_dir" + expat_header_found="yes" + AC_MSG_RESULT([found]) + ], + [ + expat_header_found="no" + AC_MSG_RESULT([not found]) + ] + ) + AC_LANG_POP([C++]) + + dnl + dnl Check Expat libraries + dnl + if test "$expat_header_found" = "yes"; then + + AC_MSG_CHECKING([for Expat XML Parser libraries]) + + AC_LANG_PUSH([C++]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [[ +@%:@include + ]], + [[ +XML_Parser p = XML_ParserCreate(NULL); +XML_ParserFree(p); +p = NULL; + ]] + )], + [ + EXPAT_LIBS="$expat_lib_flags" + EXPAT_LDFLAGS="$expat_ld_flags" + expat_lib_found="yes" + AC_MSG_RESULT([found]) + ], + [ + expat_lib_found="no" + AC_MSG_RESULT([not found]) + ] + ) + AC_LANG_POP([C++]) + fi + + CPPFLAGS="$saved_CPPFLAGS" + LDFLAGS="$saved_LDFLAGS" + LIBS="$saved_LIBS" + fi + + AC_MSG_CHECKING([for Expat XML Parser]) + + if test "$run_expat_test" = "yes"; then + if test "$expat_header_found" = "yes" -a "$expat_lib_found" = "yes"; then + + AC_SUBST([EXPAT_CFLAGS]) + AC_SUBST([EXPAT_LDFLAGS]) + AC_SUBST([EXPAT_LIBS]) + + HAVE_EXPAT="yes" + else + HAVE_EXPAT="no" + fi + + AC_MSG_RESULT([$HAVE_EXPAT]) + + dnl + dnl Check Expat version + dnl + if test "$HAVE_EXPAT" = "yes"; then + + expat_version_req=ifelse([$1], [], [], [$1]) + + if test -n "$expat_version_req"; then + + AC_MSG_CHECKING([if Expat XML Parser version is >= $expat_version_req]) + + if test -f "$expat_include_dir/expat.h"; then + + expat_major=`cat $expat_include_dir/expat.h | \ + grep '^#define.*XML_MAJOR_VERSION.*[0-9]$' | \ + sed -e 's/#define XML_MAJOR_VERSION.//'` + + expat_minor=`cat $expat_include_dir/expat.h | \ + grep '^#define.*XML_MINOR_VERSION.*[0-9]$' | \ + sed -e 's/#define XML_MINOR_VERSION.//'` + + expat_revision=`cat $expat_include_dir/expat.h | \ + grep '^#define.*XML_MICRO_VERSION.*[0-9]$' | \ + sed -e 's/#define XML_MICRO_VERSION.//'` + + EXPAT_VERSION="$expat_major.$expat_minor.$expat_revision" + AC_SUBST([EXPAT_VERSION]) + + dnl Decompose required version string and calculate numerical representation + expat_version_req_major=`expr $expat_version_req : '\([[0-9]]*\)'` + expat_version_req_minor=`expr $expat_version_req : '[[0-9]]*\.\([[0-9]]*\)'` + expat_version_req_revision=`expr $expat_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` + if test "x$expat_version_req_revision" = "x"; then + expat_version_req_revision="0" + fi + + expat_version_req_number=`expr $expat_version_req_major \* 10000 \ + \+ $expat_version_req_minor \* 100 \ + \+ $expat_version_req_revision` + + dnl Calculate numerical representation of detected version + expat_version_number=`expr $expat_major \* 10000 \ + \+ $expat_minor \* 100 \ + \+ $expat_revision` + + expat_version_check=`expr $expat_version_number \>\= $expat_version_req_number` + if test "$expat_version_check" = "1"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_WARN([Found Expat XML Parser $EXPAT_VERSION, which is older than required. Possible compilation failure.]) + fi + else + AC_MSG_RESULT([no]) + AC_MSG_WARN([Missing expat.h header. Unable to determine Expat version.]) + fi + fi + fi + + else + HAVE_EXPAT="no" + AC_MSG_RESULT([$HAVE_EXPAT]) + + if test "$expat_requested" = "yes"; then + AC_MSG_WARN([Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=@<:@DIR@:>@ or provide include directory and linker flags using --with-expat-inc and --with-expat-lib]) + fi + fi +]) diff -Nru mira-3.9.18/m4/libtool.m4 mira-4.0/m4/libtool.m4 --- mira-3.9.18/m4/libtool.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/libtool.m4 2011-11-12 07:11:50.000000000 +0000 @@ -0,0 +1,8001 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff -Nru mira-3.9.18/m4/ltoptions.m4 mira-4.0/m4/ltoptions.m4 --- mira-3.9.18/m4/ltoptions.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ltoptions.m4 2011-11-12 07:11:50.000000000 +0000 @@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff -Nru mira-3.9.18/m4/ltsugar.m4 mira-4.0/m4/ltsugar.m4 --- mira-3.9.18/m4/ltsugar.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ltsugar.m4 2011-11-12 07:11:50.000000000 +0000 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff -Nru mira-3.9.18/m4/ltversion.m4 mira-4.0/m4/ltversion.m4 --- mira-3.9.18/m4/ltversion.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/ltversion.m4 2011-11-12 07:11:50.000000000 +0000 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff -Nru mira-3.9.18/m4/lt~obsolete.m4 mira-4.0/m4/lt~obsolete.m4 --- mira-3.9.18/m4/lt~obsolete.m4 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/m4/lt~obsolete.m4 2011-11-12 07:11:50.000000000 +0000 @@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff -Nru mira-3.9.18/minidemo/bbdemo2/runme.sh mira-4.0/minidemo/bbdemo2/runme.sh --- mira-3.9.18/minidemo/bbdemo2/runme.sh 2013-05-24 19:52:19.000000000 +0000 +++ mira-4.0/minidemo/bbdemo2/runme.sh 2014-02-02 12:05:17.000000000 +0000 @@ -6,14 +6,14 @@ # using the "accurate" assembly qualifier turns on MIRA in high quality mode, # ready to tackle a fair number of problems one can encounter in genome -# assembly. +# assembly. # It's not really needed for this small set, but neither does it harm. # The data itself is pretty good, but has a few reads that show distinct signs # "extended too long", i.e., they contain really bad quality. This is why we # turn on -CL:bsqc with standard parameters (look at the parameters.par file) -# the difference to bbdemo1: we map reads from C.jejuni RM1221 against +# the difference to bbdemo1: we map reads from C.jejuni RM1221 against # a backbone (the first 40kb of C.jejuni NCTC1168) ln -f -s ../data/bbdataset1/cjejuni_demo* . @@ -22,9 +22,9 @@ mira -parameters=parameters.par | tee log_assembly.txt echo "Done." echo -echo -n "Using convert_project create files with info on SNPs betwee strains ... " +echo -n "Using miraconvert create files with info on SNPs betwee strains ... " cd cjejuni_demo_assembly/cjejuni_demo_d_results -convert_project -f maf -t asnp cjejuni_demo_out.caf cjejuni_snpanalysis >/dev/null +miraconvert -f maf -t asnp cjejuni_demo_out.caf cjejuni_snpanalysis >/dev/null cd .. echo " done." echo @@ -32,11 +32,11 @@ echo "Load the project into the GAP4 editor to have a look at the first 40kb of" echo " Campylobacter jejuni RM1221 mapped against Campylobacter jejuni NCTC1168" echo -echo "There are also showcase files to demonstrate how MIRA together with convert_project" +echo "There are also showcase files to demonstrate how MIRA together with miraconvert" echo " helps you to find and analyse SNPs in prokaryotes." echo "Normally, I would first load the project in gap4 (using caf2gap), perform a bit of" echo " cleanup and manually check the data. Then only I would use gap2caf and" -echo " convert_project to extract and analyse SNP. But for showcasing, this will do." +echo " miraconvert to extract and analyse SNP. But for showcasing, this will do." echo echo echo "Want to know how many SNPs are between the strains?" @@ -45,7 +45,7 @@ echo " -> Look at the file cjejuni_snpanalysis_info_featureanalysis.txt" echo "Want to have a summary which genes/proteins are affected by SNPs?" echo " -> Look at the file cjejuni_snpanalysis_info_featuresummary.txt" -echo "Want to have the strain sequence of each gene/protein?" +echo "Want to have the strain sequence of each gene/protein?" echo " -> Look at the file cjejuni_snpanalysis_info_featuresequences.txt" echo echo "(and please read the comments on top of the 'runme.sh' script)" diff -Nru mira-3.9.18/minidemo/estdemo2/README mira-4.0/minidemo/estdemo2/README --- mira-3.9.18/minidemo/estdemo2/README 2013-05-24 19:52:19.000000000 +0000 +++ mira-4.0/minidemo/estdemo2/README 2014-02-02 12:05:17.000000000 +0000 @@ -1,14 +1,14 @@ -This demo demonstrates the usage of +This demo demonstrates the usage of miraEST - convert_project + miraconvert to perform an EST assembly and SNP analysis. To run the demo, just execute 'runme.sh'. step1_* files are mostly not of interest, so I won't describe them -here. +here. step2 files are named after the strain or organism they belong to (in this case "strain1_*" and "strain2_"). The results in these diff -Nru mira-3.9.18/src/Makefile.am mira-4.0/src/Makefile.am --- mira-3.9.18/src/Makefile.am 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/Makefile.am 2014-02-02 12:05:18.000000000 +0000 @@ -12,7 +12,7 @@ @cp version.stub version.H @echo \#define GITBUILD \"${GITBUILD}\" >>version.H @echo \#define MIRALIBVERSION GITBUILD >>version.H - @echo \#define MIRAVERSION MIRALIBVERSION \" \(\" MLV_QUIET MLV_TIME\"\)\" >>version.H + @echo \#define MIRAVERSION MIRALIBVERSION \" \" MLV_QUIET MLV_TIME\"\" >>version.H SUBDIRS = \ @@ -24,6 +24,7 @@ mira\ caf\ memorc\ + modules\ progs\ support\ scripts diff -Nru mira-3.9.18/src/Makefile.in mira-4.0/src/Makefile.in --- mira-3.9.18/src/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -38,22 +38,19 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -120,6 +117,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -255,6 +253,7 @@ mira\ caf\ memorc\ + modules\ progs\ support\ scripts @@ -623,7 +622,7 @@ @cp version.stub version.H @echo \#define GITBUILD \"${GITBUILD}\" >>version.H @echo \#define MIRALIBVERSION GITBUILD >>version.H - @echo \#define MIRAVERSION MIRALIBVERSION \" \(\" MLV_QUIET MLV_TIME\"\)\" >>version.H + @echo \#define MIRAVERSION MIRALIBVERSION \" \" MLV_QUIET MLV_TIME\"\" >>version.H # EdIt\ # examine\ diff -Nru mira-3.9.18/src/caf/Makefile.in mira-4.0/src/caf/Makefile.in --- mira-3.9.18/src/caf/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/caf/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -39,22 +39,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in caf_flexer.cc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -115,6 +112,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/caf/caf.C mira-4.0/src/caf/caf.C --- mira-3.9.18/src/caf/caf.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/caf/caf.C 2014-02-02 12:05:18.000000000 +0000 @@ -46,9 +46,6 @@ */ -#include "stdlib.h" -#include - #include "caf/caf_tokens.h" #include "caf/caf.H" diff -Nru mira-3.9.18/src/debuggersupport/Makefile.in mira-4.0/src/debuggersupport/Makefile.in --- mira-3.9.18/src/debuggersupport/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/debuggersupport/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -39,22 +39,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -103,6 +100,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/debuggersupport/dbgsupport.C mira-4.0/src/debuggersupport/dbgsupport.C --- mira-3.9.18/src/debuggersupport/dbgsupport.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/debuggersupport/dbgsupport.C 2014-02-02 12:05:18.000000000 +0000 @@ -24,8 +24,7 @@ #include "dbgsupport.H" -#include -//#include +#include bool mira___seendebugger=miraDetectDebugger(); @@ -36,11 +35,21 @@ void miraDetectGDB() { - FILE *fd = fopen("/tmp", "r"); - if(fileno(fd) > 5){ - mira___seendebugger=true; + mira___seendebugger=false; + + // fileno() is not std C, does not work, e.g., on Windows +#if _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE + // take /bin instead of /tmp, some machines apparently have access to /tmp denied + FILE *fd = fopen("/bin", "r"); + // careful, the above may fail! (bug report from Chris Hoefler) + if(fd!=nullptr){ + if(fileno(fd) > 5){ + mira___seendebugger=true; + } + fclose(fd); } - fclose(fd); +#endif + } bool miraDetectDebugger() diff -Nru mira-3.9.18/src/errorhandling/Makefile.in mira-4.0/src/errorhandling/Makefile.in --- mira-3.9.18/src/errorhandling/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/errorhandling/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -39,22 +39,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -102,6 +99,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/errorhandling/errorhandling.C mira-4.0/src/errorhandling/errorhandling.C --- mira-3.9.18/src/errorhandling/errorhandling.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/errorhandling/errorhandling.C 2014-02-02 12:05:18.000000000 +0000 @@ -26,6 +26,9 @@ #include "errorhandling.H" +#include "util/fmttext.H" + +#include using namespace std; @@ -127,7 +130,7 @@ ostr << "\n"; switch(n.gravity){ case Notify::INTERNAL: { - ostr << "Internal logic/programming/debugging error (*sigh* this should not have happened).\nPlease file a bug report on http://sourceforge.net/apps/trac/mira-assembler/\n\n"; + ostr << FmtText::wordWrap("Internal logic/programming/debugging error (*sigh* this should not have happened)\n\n",80); break; } case Notify::FATAL: { @@ -144,7 +147,7 @@ } } if(!n.msg1.empty()){ - n.priv_wrapErrorText(n.msg1.c_str(),ostr); + ostr << FmtText::makeTextSign(n.msg1,80); } if(!n.tif.empty()){ ostr << "\n->Thrown: " << n.tif; @@ -154,48 +157,6 @@ return ostr; } -void Notify::priv_wrapErrorText(const char * etxt, ostream & ostr) const -{ - ostr << "*******************************************************************************\n" - << "* "; - int linecount=0; - string word; - const int llength=76; - for(;; ++etxt){ - if(*etxt==' ' || *etxt=='\n' || *etxt==0){ - bool neednewline=true; - if(linecount+1+word.size()0 && !word.empty()){ - ostr << ' '; - ++linecount; - } - ostr << word; - linecount+=word.size(); - word.clear(); - neednewline=false; - } - if(*etxt=='\n' || *etxt==0 || neednewline){ - for(;linecount -#include - #include #include @@ -60,7 +57,6 @@ void zeroPointers(); void discard(); - void priv_wrapErrorText(const char * etxt, std::ostream & ostr) const; public: Notify(uint8 gravity, const char * _tif); diff -Nru mira-3.9.18/src/io/Makefile.in mira-4.0/src/io/Makefile.in --- mira-3.9.18/src/io/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/io/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -39,22 +39,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in exp_flexer.cc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -121,6 +118,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/io/fasta.C mira-4.0/src/io/fasta.C --- mira-3.9.18/src/io/fasta.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/fasta.C 2014-02-02 12:05:18.000000000 +0000 @@ -297,10 +297,14 @@ if(badchars.size()>0){ cerr << '\n'; for(uint32 i=0; i(badchars[i]) << dec << ") in fasta sequence at file byte position " << badpos[i]; + cerr << "-- 2 Illegal character (" << badchars[i] << ": " << hex << static_cast(badchars[i]) << dec << ") in fasta sequence at file byte position " << badpos[i] << endl; } - cerr << "This happened in sequence: " << FA_fastaseqname << "\nPlease fix your file."; - MIRANOTIFY(Notify::FATAL,"Aborting ..."); + if(badchars.size()==100){ + cerr << "\nThere may be more errors like the above, but stopping reporting here.\n"; + } + cerr << "This happened in sequence: " << FA_fastaseqname << "\nPlease fix your file.\n"; + + MIRANOTIFY(Notify::FATAL,"The sequence " << FA_sequence << " in file " << FA_fastaseqname << " showed unrecoverable errors while trying to load it (see also log above). Is it a valid FASTA sequence? Please double check ... and fix your file if necessary."); } read_read=true; diff -Nru mira-3.9.18/src/io/fasta.H mira-4.0/src/io/fasta.H --- mira-3.9.18/src/io/fasta.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/fasta.H 2014-02-02 12:05:18.000000000 +0000 @@ -34,8 +34,6 @@ #include #include -#include - #include "stdinc/defines.H" #include "stdinc/stlincludes.H" #include "errorhandling/errorhandling.H" diff -Nru mira-3.9.18/src/io/fastq-lh.H mira-4.0/src/io/fastq-lh.H --- mira-3.9.18/src/io/fastq-lh.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/fastq-lh.H 2014-02-02 12:05:18.000000000 +0000 @@ -25,12 +25,13 @@ #ifndef _bas_fastq_h_ #define _bas_fastq_h_ -#include -#include -#include -#include +#include +#include +#include #include +#include + // The enclosed lines are copied verbatim from kseq.h // from the readfq code from Heng Li at GitHub: // https://github.com/lh3/readfq @@ -40,7 +41,6 @@ // ----------------------------------------------------------------------- - /* The MIT License Copyright (c) 2008, 2009, 2011 Attractive Chaos @@ -66,18 +66,15 @@ SOFTWARE. */ -/* Last Modified: 18AUG2011 */ +/* Last Modified: 05MAR2012 */ #ifndef AC_KSEQ_H #define AC_KSEQ_H -#include -#include -#include - #define KS_SEP_SPACE 0 // isspace(): \t, \n, \v, \f, \r #define KS_SEP_TAB 1 // isspace() && !' ' -#define KS_SEP_MAX 1 +#define KS_SEP_LINE 2 // line separator: "\n" (Unix) or "\r\n" (Windows) +#define KS_SEP_MAX 2 #define __KS_TYPE(type_t) \ typedef struct __kstream_t { \ @@ -146,7 +143,10 @@ if (ks->end == 0) break; \ } else break; \ } \ - if (delimiter > KS_SEP_MAX) { \ + if (delimiter == KS_SEP_LINE) { \ + for (i = ks->begin; i < ks->end; ++i) \ + if (ks->buf[i] == '\n') break; \ + } else if (delimiter > KS_SEP_MAX) { \ for (i = ks->begin; i < ks->end; ++i) \ if (ks->buf[i] == delimiter) break; \ } else if (delimiter == KS_SEP_SPACE) { \ @@ -156,7 +156,7 @@ for (i = ks->begin; i < ks->end; ++i) \ if (isspace(ks->buf[i]) && ks->buf[i] != ' ') break; \ } else i = 0; /* never come to here! */ \ - if (str->m - str->l < (size_t)i - ks->begin + 1) { \ + if (str->m - str->l < (size_t)(i - ks->begin + 1)) { \ str->m = str->l + (i - ks->begin) + 1; \ kroundup32(str->m); \ str->s = (char*)realloc(str->s, str->m); \ @@ -172,7 +172,7 @@ if (str->s == 0) { \ str->m = 1; \ str->s = (char*)calloc(1, 1); \ - } \ + } else if (delimiter == KS_SEP_LINE && str->l > 1 && str->s[str->l-1] == '\r') --str->l; \ str->s[str->l] = '\0'; \ return str->l; \ } \ @@ -185,19 +185,16 @@ __KS_GETC(__read, __bufsize) \ __KS_GETUNTIL(__read, __bufsize) -#define __KSEQ_BASIC(type_t) \ - static inline kseq_t *kseq_init(type_t fd) \ +#define kseq_rewind(ks) ((ks)->last_char = (ks)->f->is_eof = (ks)->f->begin = (ks)->f->end = 0) + +#define __KSEQ_BASIC(SCOPE, type_t) \ + SCOPE kseq_t *kseq_init(type_t fd) \ { \ kseq_t *s = (kseq_t*)calloc(1, sizeof(kseq_t)); \ s->f = ks_init(fd); \ return s; \ } \ - static inline void kseq_rewind(kseq_t *ks) \ - { \ - ks->last_char = 0; \ - ks->f->is_eof = ks->f->begin = ks->f->end = 0; \ - } \ - static inline void kseq_destroy(kseq_t *ks) \ + SCOPE void kseq_destroy(kseq_t *ks) \ { \ if (!ks) return; \ free(ks->name.s); free(ks->comment.s); free(ks->seq.s); free(ks->qual.s); \ @@ -210,8 +207,8 @@ -1 end-of-file -2 truncated quality string */ -#define __KSEQ_READ \ - static int kseq_read(kseq_t *seq) \ +#define __KSEQ_READ(SCOPE) \ + SCOPE int kseq_read(kseq_t *seq) \ { \ int c; \ kstream_t *ks = seq->f; \ @@ -222,14 +219,15 @@ } /* else: the first header char has been read in the previous call */ \ seq->comment.l = seq->seq.l = seq->qual.l = 0; /* reset all members */ \ if (ks_getuntil(ks, 0, &seq->name, &c) < 0) return -1; /* normal exit: EOF */ \ - if (c != '\n') ks_getuntil(ks, '\n', &seq->comment, 0); /* read FASTA/Q comment */ \ + if (c != '\n') ks_getuntil(ks, KS_SEP_LINE, &seq->comment, 0); /* read FASTA/Q comment */ \ if (seq->seq.s == 0) { /* we can do this in the loop below, but that is slower */ \ seq->seq.m = 256; \ seq->seq.s = (char*)malloc(seq->seq.m); \ } \ while ((c = ks_getc(ks)) != -1 && c != '>' && c != '+' && c != '@') { \ + if (c == '\n') continue; /* skip empty lines */ \ seq->seq.s[seq->seq.l++] = c; /* this is safe: we always have enough space for 1 char */ \ - ks_getuntil2(ks, '\n', &seq->seq, 0, 1); /* read the rest of the line */ \ + ks_getuntil2(ks, KS_SEP_LINE, &seq->seq, 0, 1); /* read the rest of the line */ \ } \ if (c == '>' || c == '@') seq->last_char = c; /* the first header char has been read */ \ if (seq->seq.l + 1 >= seq->seq.m) { /* seq->seq.s[seq->seq.l] below may be out of boundary */ \ @@ -245,7 +243,7 @@ } \ while ((c = ks_getc(ks)) != -1 && c != '\n'); /* skip the rest of '+' line */ \ if (c == -1) return -2; /* error: no quality string */ \ - while (ks_getuntil2(ks, '\n', &seq->qual, 0, 1) >= 0 && seq->qual.l < seq->seq.l); \ + while (ks_getuntil2(ks, KS_SEP_LINE, &seq->qual, 0, 1) >= 0 && seq->qual.l < seq->seq.l); \ seq->last_char = 0; /* we have not come to the next header line */ \ if (seq->seq.l != seq->qual.l) return -2; /* error: qual string is of a different length */ \ return seq->seq.l; \ @@ -258,17 +256,26 @@ kstream_t *f; \ } kseq_t; -#define KSEQ_INIT(type_t, __read) \ +#define KSEQ_INIT2(SCOPE, type_t, __read) \ KSTREAM_INIT(type_t, __read, 16384) \ __KSEQ_TYPE(type_t) \ - __KSEQ_BASIC(type_t) \ - __KSEQ_READ + __KSEQ_BASIC(SCOPE, type_t) \ + __KSEQ_READ(SCOPE) + +#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static, type_t, __read) + +#define KSEQ_DECLARE(type_t) \ + __KS_TYPE(type_t) \ + __KSEQ_TYPE(type_t) \ + extern kseq_t *kseq_init(type_t fd); \ + void kseq_destroy(kseq_t *ks); \ + int kseq_read(kseq_t *seq); #endif // ----------------------------------------------------------------------- -// no class ... can be done with this setup :-( +// no class ... cannot be done with this setup :-( #endif diff -Nru mira-3.9.18/src/io/gap4_ft_so_map.xxd mira-4.0/src/io/gap4_ft_so_map.xxd --- mira-3.9.18/src/io/gap4_ft_so_map.xxd 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/io/gap4_ft_so_map.xxd 2014-02-02 12:05:18.000000000 +0000 @@ -8,6 +8,7 @@ # S_region, V_region, V_segment, conflict, unsure # # Added gap4db IDs which exist in FT or SO: Fgap for gap, FsoR for snoRNA +# Added a "new" gap4 ID (needed to tag poly-A): Fpas # # Do NOT clean up tabs at end of lines which have some, these are needed! @@ -37,7 +38,7 @@ Fcon conflict sequence_conflict SO:0001085 independent determinations of the "same" sequence differ at this site or region; Or /compare=[accession-number.sequence-version] Different sources report differing sequences. [EBIBS:GAR, UniProt:curation_manual] Fenh enhancer enhancer SO:0000165 a cis-acting sequence that increases the utilization of (some) eukaryotic promoters, and can function in either orientation and in any location (upstream or downstream) relative to the promoter; A cis-acting sequence that increases the utilization of (some) eukaryotic promoters, and can function in either orientation and in any location (upstream or downstream) relative to the promoter. Fexn exon exon SO:0000147 region of genome that codes for portion of spliced mRNA, rRNA and tRNA; may contain 5'UTR, all CDSs and 3' UTR; A region of the genome that codes for portion of spliced messenger RNA (SO:0000234); may contain 5'-untranslated region (SO:0000204), all open reading frames (SO:0000236) and 3'-untranslated region (SO:0000205). -Fgap gap gap SO:0000730 gap in the sequence A gap in the sequence of known length. THe unkown bases are filled in with N's. +Fgap gap gap SO:0000730 gap in the sequence A gap in the sequence of known length. The unknown bases are filled in with N's. Fgen gene gene SO:0000704 region of biological interest identified as a gene and for which a name has been assigned; A locatable region of genomic sequence, corresponding to a unit of inheritance, which is associated with regulatory regions, transcribed regions and/or other functional sequence regions FiDN iDNA iDNA SO:0000723 intervening DNA; DNA which is eliminated through any of several kinds of recombination; Genomic sequence removed from the genome, as a normal event, by a process of recombination. Fint intron intron SO:0000188 a segment of DNA that is transcribed, but removed from within the transcript by splicing together the sequences (exons) on either side of it; A segment of DNA that is transcribed, but removed from within the transcript by splicing together the sequences (exons) on either side of it. @@ -57,6 +58,7 @@ oriT origin_of_transfer SO:0000724 origin of transfer; region of a DNA molecule where transfer is initiated during the process of conjugation or mobilization A region of a DNA molecule whre transfer is initiated during the process of conjugation or mobilization. FpAS polyA_signal polyA_signal_sequence SO:0000551 recognition region necessary for endonuclease cleavage of an RNA transcript that is followed by polyadenylation; consensus=AATAAA [1]; The recognition sequence necessary for endonuclease cleavage of an RNA transcript that is followed by polyadenylation; consensus=AATAAA. FpAs polyA_site polyA_site SO:0000553 site on an RNA transcript to which will be added adenine residues by post-transcriptional polyadenylation; The site on an RNA transcript to which will be added adenine residues by post-transcriptional polyadenylation. +Fpas polyA_sequence polyA_sequence SO:0000610 Sequence of about 100 nucleotides of A added to the 3' end of most eukaryotic mRNAs. Sequence of about 100 nucleotides of A added to the 3' end of most eukaryotic mRNAs. FpRN precursor_RNA primary_transcript SO:0000185 any RNA species that is not yet the mature RNA product; may include 5' clipped region (5'clip), 5' untranslated region (5'UTR), coding sequences (CDS, exon), intervening sequences (intron), 3' untranslated region (3'UTR), and 3' clipped region (3'clip); The primary (initial, unprocessed) transcript; includes five_prime_clip (SO:0000555), five_prime_untranslated_region (SO:0000204), open reading frames (SO:0000236), introns (SO:0000188) and three_prime_ untranslated_region (three_prime_UTR), and three_prime_clip (SO:0000557). Fp_t prim_transcript primary_transcript SO:0000185 primary (initial, unprocessed) transcript; includes 5' clipped region (5'clip), 5' untranslated region (5'UTR), coding sequences (CDS, exon), intervening sequences (intron), 3' untranslated region (3'UTR), and 3' clipped region (3'clip); The primary (initial, unprocessed) transcript; includes five_prime_clip (SO:0000555), five_prime_untranslated_region (SO:0000204), open reading frames (SO:0000236), introns (SO:0000188) and three_prime_ untranslated_region (three_prime_UTR), and three_prime_clip (SO:0000557). Fp_b primer_bind primer_binding_site SO:0005850 non-covalent primer binding site for initiation of replication, transcription, or reverse transcription; includes site(s) for synthetic e.g., PCR primer elements; Non-covalent primer binding site for initiation of replication, transcription, or reverse transcription. diff -Nru mira-3.9.18/src/io/ncbiinfoxml.C mira-4.0/src/io/ncbiinfoxml.C --- mira-3.9.18/src/io/ncbiinfoxml.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/ncbiinfoxml.C 2014-02-02 12:05:18.000000000 +0000 @@ -35,6 +35,9 @@ #include "ncbiinfoxml.H" +#include + + using namespace std; diff -Nru mira-3.9.18/src/io/ncbiinfoxml.H mira-4.0/src/io/ncbiinfoxml.H --- mira-3.9.18/src/io/ncbiinfoxml.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/ncbiinfoxml.H 2014-02-02 12:05:18.000000000 +0000 @@ -30,8 +30,6 @@ #include -#include - #include "stdinc/defines.H" #include "stdinc/stlincludes.H" diff -Nru mira-3.9.18/src/io/phd.H mira-4.0/src/io/phd.H --- mira-3.9.18/src/io/phd.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/phd.H 2014-02-02 12:05:18.000000000 +0000 @@ -29,8 +29,6 @@ #include #include -#include - #include "stdinc/stlincludes.H" #include "stdinc/defines.H" diff -Nru mira-3.9.18/src/io/scf.C mira-4.0/src/io/scf.C --- mira-3.9.18/src/io/scf.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/io/scf.C 2014-02-02 12:05:18.000000000 +0000 @@ -31,6 +31,8 @@ using namespace std; +#include + vector SCF::SCF_suffixalternatives; diff -Nru mira-3.9.18/src/io/scf.H mira-4.0/src/io/scf.H --- mira-3.9.18/src/io/scf.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/io/scf.H 2014-02-02 12:05:18.000000000 +0000 @@ -48,11 +48,6 @@ #ifndef _scf_h_ #define _scf_h_ -#include -#include -#include -#include -#include #ifndef SOLARIS_CLUDGE #include diff -Nru mira-3.9.18/src/memorc/Makefile.in mira-4.0/src/memorc/Makefile.in --- mira-3.9.18/src/memorc/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/memorc/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -41,22 +41,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -109,6 +106,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/memorc/main.C mira-4.0/src/memorc/main.C --- mira-3.9.18/src/memorc/main.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/memorc/main.C 2014-02-02 12:05:18.000000000 +0000 @@ -1,8 +1,4 @@ #include "memorc.H" -#include -#include - -#include #include diff -Nru mira-3.9.18/src/memorc/memorc.C mira-4.0/src/memorc/memorc.C --- mira-3.9.18/src/memorc/memorc.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/memorc/memorc.C 2014-02-02 12:05:18.000000000 +0000 @@ -1,12 +1,6 @@ #include "memorc/memorc.H" - -#include -#include -#include -#include - -#include +#include #include diff -Nru mira-3.9.18/src/mira/CHANGES.txt mira-4.0/src/mira/CHANGES.txt --- mira-3.9.18/src/mira/CHANGES.txt 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/CHANGES.txt 2014-02-02 12:20:57.000000000 +0000 @@ -1,3 +1,259 @@ +MIRA 4.0 +-------- + +MIRA 4.0 is the result of a bit more than two years of work since MIRA 3.4 +came out and much has changed. A lot behind the scenes, but also interesting +things for everyone, most notably in speed and quality terms. + +The most important change for users: the interface. Please absolutely do +consult the section on manifest files in the documentation! Users who have not +used the MIRA 3.9 development series ABSOLUTELY MUST read the +documentation. Read at least, in the MIRA Definitive Guide, the sections +describing the new assembly description files ("manifest files"); and have a +look at the chapters describing the results of MIRA; and the utilities in the +package: + + 3.5. Configuring an assembly: files and parameters + 3.5.1. The manifest file: introduction + 3.5.2. The manifest file: basics + 3.5.3. The manifest file: defining the data to load + 9. Working with the results of MIRA + 10. Utilities in the MIRA package + +Furthermore, you might want to skim through the following chapters: + + 4. Preparing data + 5. De-novo assemblies + 6. Mapping assemblies + 7. EST / RNASeq assemblies + 8. Parameters for special situations + + +Main improvements made to simplify life: +- flexibilised parametrisation to easily define input data and assembly job: + the "manifest" configuration files allow using concepts of read groups as + well as segment orientation & segment placement +- new "fire & forget" mode of MIRA which basically should reduce misassemblies + in result files to zero: earlier version of MIRA would dump out + misassemblied contigs (with markers pointing at the misassembly), now + contigs dumped out do not contain any misassembly (at least none which MIRA + could discover). +- possibility to have MIRA determine automatically paired library parameters + (size & orientation) +- new automatic extraction of "large contigs" at the end of a genome de-novo + assembly. +- SAM output via "miraconvert", simplifies interaction with outside world + (gap5, tablet etc.pp) +- full GFF3 input and output compatibility, using Sequence Ontology, + translation to and from gap4/gap5 +- CASAVA 1.8 read naming for the new Illumina read name scheme +- new sequencing "technology" TEXT for unspecified data, i.e., from databases + like NCBI etc. +- new companion program "mirabait", which is a "grep" like utility for + retrieving sequences by in-silico baiting +- automatic estimation of parameters for paired libraries +- lots of other improvements left and right which add up ;-) + +Main speed improvements: +- faster contig handling routines, improves de-novo assembly times with Ion + Torrent or 454 / Solexa hybrid by 30% +- faster mapping routines, allows MIRA to more or less gracefully handle + projects with several thousand reference sequences. Useful for mapping + against EST / RNASeq assemblies. +- faster handling of deep coverage RNASeq and genome data (to be improved + still) +- faster kmer counting & smaller footprint in RAM and on disk +- faster checking of template restrictions +- optimized: faster data reading, does not need to count reads beforehand + anymore +- lots of other improvements left and right which add up ;-) + +Main assembly quality improvements: +- improved assembly quality for ultra-high coverage Solexa RNASeq data contigs + (new parameter -CL:rkm) +- better handling of sequencing libraries with uneven coverage (Nextera) +- lots of other improvements left and right which add up, like, handling of + newer MiSeq and Ion data, lossless digital normalisation etc.pp ;-) + +Documentation +- rewritten in large parts for manifest files +- started to update walkthrough for newer public data sets. + +Other internal changes: +- lots of reshuffled/reworked code +- improved gcc warnings +- improved build environment, now out-of-the box building on more Linux + distros and Mac OSX +- better and simplified code due to transitioning to C++11 +- new MAF format v2 + + + +Changes for the 3.9.x development line since MIRA 3.4.0: +======================================================== +4.0 +--- +- improvement: missing or additional backslashes in "parameters=" manifest + lines are diagnosed a bit better. +- increased max length of reads allowed in mapping to 32kb +- fine-tuning of standard parameters for PCBIOHQ reads +- fine-tuning of contig building in low-coverage areas of a contig +- fine-tuning of standard parameters for 3' polybase clipping +- bugfix: SAM output for mapping assemblies was sometimes broken (bug + uncovered by new parameter -SB:tor=yes) +- bugfix: the term "exclusion_criterion" for "segment_placement" in manifest + files was parsed wrongly. +- bugfix: miraconvert now does not munch away part of filenames separated by + dots. +- bugfix: using digital normalisation on genome assemblies led to an error, + fixed. + + +4.0rc5 +------ +- major improvements in contig building for genomes with really nasty repeats, + leading to more accurate contigs especially with paired data +- interface change: the "--highlyrepetitive" keyword has been replace by + "--hirep_something", "--hirep_good" and "--hirep_best" +- improvement: the proposal for "large contigs" in de-novo assemblies extracts + a better subset of contigs to represent the "true" genome, especially in + hybrid assemblies. +- improvement: automatic estimation of parameters for paired libraries, + switched on via "autopairing" keyword in manifest files +- improvement: in mapping assemblies better alignment in cases where the + mapped data contains non-clonal sequencing data or data which has more indels. +- improvement: the automatic sequencing error editor for "trivial" errors now + corrects more cases +- improvement: new command line parameter -t for setting number of threads + (overwriting -GE:not if set in manifest) +- improvement: new command line parameter -m and -M for checking manifest + files without performing an assembly +- improvement: poly-A stretches in EST / RNASeq assemblies are kept by default + in the sequences to differentiate between different 3' UTR endings +- improvement: the routines searching for chimeras were made more resistant to + finding wrong chimeras in "low" coverage data +- improvement: skim now filtering hits saved on disk a bit faster for de-novo + assemblies +- improvement: the misassembly detector for libraries with paired reads is on + by default (temporary parameter: -MI:ef3) +- improvement: detection (and warning) if de-novo assembly shows signs of a + skewed coverage over a genome like it occurs, e.g., in sequencing data + sampled from exponential growth phase of bacteria. +- improvement: started to log warnings to separate info files +- bugfix: extraction of large contigs only done for genome de-novo assemblies +- bugfix: poly-A stretches were annotated as polyA_signal_sequence instead of + polyA_sequence in GFF3 files. +- bugfix: non-repetitive overlaps in reads with masked stretches (-SK:mnr=yes) + are less likely to be dismissed, leading to better assembly of heavy + repeats. +- new parameters -ED:mace:eks:ehpo for more fine grained control of automatic + editor +- new parameters -NW:cac:acv to catch and warn early about assemblies + performed with overly large coverage +- new parameter -SB:bnb to allow mapping without bootstrapping +- minor: mirabait can no re-use precalculated kmer statistics via -L parameter +- minor: command line -v for mirabait & miramem +- minor; when compiling, the build script for MIRA now honours $CC and $CXX if + set +- minor: updated GTAGDB file for compatibility to Staden gap4 / gap5 package + (support directory) + + +4.0rc4 +------ +- improvement: simple variations in coverage which are not repeats are now + handled gratiously, i.e., these do not break contig building. Seems to be + extremely important for some Nextera libraries which can have some terribly + uneven coverage. +- improvement: the automatic adaptor clipping was a tad too overzealous + for some genome data and clip perfectly valid data in very rare cases. +- major bugfix: segment placements were not checked rigorously enough. E.g., + paired-end Illumina would also accept a mate-pair placement of its reads. +- major bugfix: paired-reads libraries were essentially broken since 3.9.11 + and reads were often assigned a wrong partner. +- improvement: the automatic overcall editor is now configurable and defaults + to correct only 454 and Ion data. +- bugfix: some coverage values in the assembly info file contained temporary + values from during the assembly, not from the end result. +- bugfix: when MIRA was started from a location not in path, it would not + always automatically find "miraconvert" and fail at the extraction of large + contigs in de-novo genome assemblies. + + +4.0rc3 +------ +- binaries now recognise themselves when run as "mira4", "mira4bait" and + "mira4convert". Note: the canonical name should be those without "4" in the + name though. +- small bugfix: error code was not >0 in certain situations +- mira now searches the binaries for itself and miraconvert in the directory + the called binary was installed, then in the $PATH environment. +- change: gap4da result type now always turned off by default +- new parameters: -HK:mhpb:rkrk +- loading of files in the manifest: a file type can now be explicitely given + via the EMBOSS-like double colon scheme. E.g.: data = fastq::file.dat +- bugfix: miraconvert -A did not work +- building: m4 configuration files now in the "m4" directory, not "config/m4" +- bugfix: the shell script to show how to extract large contigs now always + written for genome assembly projects even if automatic extraction failed. +- data checks: MIRA now halts if it does not correctly recognise read pairs + due to unknown read naming schemes. + + +4.0rc2 +------ +- speed improvement: extracting the consensus of an assembly via miraconvert + is now faster by a factor between 1.3 and 4.5 (depending on number of + strains present and a couple of other things) +- improvement: determination of "large contigs" did not handle well projects + with corrected PacBio reads, fixed. +- convenience: when using -DI:trt, MIRA now creates temporary dir names for + the target directory so that several runs of MIRA can be started in parallel + using the same manifest file but the temporary data of these runs do not + interfere with eachother +- bugfix: Smith-Waterman alignments entered an infinite loop in rare cases +- bugfix: "miraconvert -r C" produced IUPACs +- bugfix: miraconvert did not evalute the complete path of the result file but + always wrote to current directory +- bugfix: target install missed a && in progs/Makefile.am +- bugfix: loading of assemblies (in mira and miraconvert) could fail +- bugfix: saved diginorm multiplier values in MAF files led sometimes to + MAF parsing errors. +- bugfix: contig coverage statistics did not always correctly account for + diginorm reads +- fix for OSX: better binaries which should behave like Unix binaries +- small fix for compiling on Cygwin + + +4.0rc1 +------ +- for de-novo assemblies, MIRA now automatically extracts 'large contigs' into + additional result files +- new info file: "largecontigs". Only written for genome denovo. +- saving of "AllStrains" FASTA or FASTAQ now happens only if more than one + strain is present in the assembly (mira and convert_project) +- new behaviour in mapping assemblies: reads overhanging the reference + sequence left and right are trimmed back by default to the boundaries of the + reference sequence. Can be controlled via new parameter -SB:tor +- added new file type in manifest: .exp for loading single EXP files (compare + to "fofnexp") +- added new file type in manifest: ".fa". Behaves like ".fna" +- fix segfault when read access to /tmp directory is denied +- bugfix: merging of reads did sometimes not work as intended (introduced in + 3.9.2) +- bugfix: convert_project does not stop anymore on template problems +- bugfix: MAF output for projects with several strains now immediately + convertable to SAM +- bugfix: FASTQ files in MS-DOS format led to parsing problems +- bugfix: possible endless loop in mapping projects with -AS:nop>1 +- bugfix: miraconvert -n with an empty file selected all contigs/reads, now + selects none (as one would expect) +- renaming of all major MIRA binaries to have "mira" as prefix. Most important + change: "convert_project" is now "miraconvert" +- renamed and changed behaviour of all NAG_AND_WARN parameters. Now three + options: stop, warn, no + + dev3.9.18 --------- - improved lossless digital normalisation @@ -263,72 +519,3 @@ - MIRA resume: added "-r" - binary package for Linux: fixed issue where older Linux kernels needed to have 'export LC_ALL=C' or else they would not start. - - -dev3.9.0 & dev3.9.1 -------------------- -The 3.9 line of MIRA is the development line of MIRA which will ultimately -lead to MIRA 4. It's the result of 10 months of work since the last 3.4.x -versions and much has changed. A lot behind the scenes, but also interesting -things for everyone, most notably in speed and quality terms. The most -important changes for users: the interface. Please absolutely do consult the -section on manifest files in the documentation! - -Improvements made to simplify life: -- flexibilised parametrisation to easily define input data and assembly job: - the "manifest" configuration files allow using concepts of read groups as - well as segment orientation & segment placement -- SAM output via convert_project, simplifies interaction with outside world - (gap5, tablet etc.pp) -- full GFF3 input and output compatibility, using Sequence Ontology, - translation to and from gap4/gap5 -- CASAVA 1.8 read naming for the new Illumina read name scheme -- new sequencing "technology" TEXT for unspecified data, i.e., from databases - like NCBI etc. - -Speed improvements: -- faster contig handling routines, improves de-novo assembly times with Ion - Torrent or 454 / Solexa hybrid by 30% -- faster mapping routines, allows MIRA to more or less gracefully handle - projects with several thousand reference sequences. Useful for mapping - against EST / RNASeq assemblies. -- faster handling of deep coverage RNASeq and genome data (to be improved - still) -- faster kmer counting & smaller footprint in RAM and on disk -- faster checking of template restrictions -- optimized: faster data reading, does not need to count reads beforehand - anymore -- other improvements left and right which add up ;-) - -Assembly quality improvements: -- new "fire & forget" mode of MIRA which basically should reduce misassemblies - in result files to zero: earlier version of MIRA would dump out - misassemblied contigs (with markers pointing at the misassembly), now - contigs dumped out do not contain any misassembly (at least none which MIRA - could discover). -- improved assembly quality for ultra-high coverage Solexa RNASeq data contigs - (new parameter -CL:rkm) - -Documentation -- rewritten in large parts for manifest files -- started to update walkthrough for newer public data sets. - -Bugfixes affecting users: -- orientation in CAF consensus tags -- expat building on newer Linux systems, e.g. (K)Ubuntu 11.10 -- GenBank parsing of Vector NTI and DDBJ variants now working -- clearer error messages for users when parsing GenBank -- gap5 compatibility: CAF input allows for more weird characters in names - -convert_project: -- -N for sorting reads, not only contigs -- new output targets: sam (obvious), gcwig (WIG file of GC content) and fcov - (statistics for genome coverage respectively gene expression levels) - -Other internal changes: -- lots of reshuffled/reworked code -- improved gcc warnings -- improved build environment, now out-of-the box building on more Linux - distros -- better and simplified code due to transitioning to C++11 -- new MAF format v2 diff -Nru mira-3.9.18/src/mira/Makefile.am mira-4.0/src/mira/Makefile.am --- mira-3.9.18/src/mira/Makefile.am 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/Makefile.am 2014-02-02 12:05:18.000000000 +0000 @@ -22,53 +22,55 @@ dist_pkgdata_DATA = demoparam.prm pkgdatadir=$(prefix)/share/$(PACKAGE) -# put read and contig in front: with make -j .... they'll get made first +# put assembly, read, contig, etc. in front: with make -j .... they'll get made first # and won't block the rest. libmira_a_SOURCES= \ $(libmira_a_XXDSRC) \ - preventinitfiasco.C\ - sam_collect.C\ + assembly.C\ + contig.C\ read.C\ - parameters.C \ - pcrcontainer.C \ + contig_analysis.C\ ads.C\ + skim.C\ + \ adsfacts.C\ align.C\ - assembly_output.C\ assembly_info.C\ - contig_analysis.C\ + assembly_io.C\ + assembly_misc.C\ + assembly_output.C\ + assembly_reduceskimhits.C\ + assembly_swalign.C\ + bloomfilter.C\ contig_consensus.C\ contig_covanalysis.C\ contig_edit.C\ contig_featureinfo.C\ - contig_pairconsistency.C\ contig_output.C\ + contig_pairconsistency.C\ + dataprocessing.C\ dynamic.C\ gbf_parse.C\ gff_parse.C\ gff_save.C\ - parameters_flexer.ll\ + hashstats.C\ maf_parse.C\ + manifest.C\ multitag.C\ + parameters_flexer.ll\ + parameters.C \ + pcrcontainer.C \ + ppathfinder.C\ + preventinitfiasco.C\ readgrouplib.C\ - contig.C\ readpool.C\ - assembly.C\ - bloomfilter.C\ - ppathfinder.C\ - skim.C\ - hashstats.C\ - assembly_io.C\ - assembly_reduceskimhits.C\ - assembly_swalign.C\ - assembly_misc.C\ - dataprocessing.C\ - manifest.C\ + sam_collect.C\ scaffolder.C\ seqtohash.C\ skim_farc.C\ - skim_lowbph.C + skim_lowbph.C\ + warnings.C noinst_HEADERS= adsfacts.H\ ads.H\ assembly_output.H\ @@ -105,6 +107,7 @@ stringcontainer.H\ structs.H\ timerestrict.H\ - types_basic.H + types_basic.H\ + warnings.H libmiraestass_a_SOURCES= estassembly.C diff -Nru mira-3.9.18/src/mira/Makefile.in mira-4.0/src/mira/Makefile.in --- mira-3.9.18/src/mira/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/mira/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -40,22 +40,19 @@ $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO \ parameters_flexer.cc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -67,24 +64,25 @@ libmira_a_AR = $(AR) $(ARFLAGS) libmira_a_LIBADD = am__objects_1 = -am_libmira_a_OBJECTS = $(am__objects_1) preventinitfiasco.$(OBJEXT) \ - sam_collect.$(OBJEXT) read.$(OBJEXT) parameters.$(OBJEXT) \ - pcrcontainer.$(OBJEXT) ads.$(OBJEXT) adsfacts.$(OBJEXT) \ - align.$(OBJEXT) assembly_output.$(OBJEXT) \ - assembly_info.$(OBJEXT) contig_analysis.$(OBJEXT) \ - contig_consensus.$(OBJEXT) contig_covanalysis.$(OBJEXT) \ - contig_edit.$(OBJEXT) contig_featureinfo.$(OBJEXT) \ - contig_pairconsistency.$(OBJEXT) contig_output.$(OBJEXT) \ - dynamic.$(OBJEXT) gbf_parse.$(OBJEXT) gff_parse.$(OBJEXT) \ - gff_save.$(OBJEXT) parameters_flexer.$(OBJEXT) \ - maf_parse.$(OBJEXT) multitag.$(OBJEXT) readgrouplib.$(OBJEXT) \ - contig.$(OBJEXT) readpool.$(OBJEXT) assembly.$(OBJEXT) \ - bloomfilter.$(OBJEXT) ppathfinder.$(OBJEXT) skim.$(OBJEXT) \ - hashstats.$(OBJEXT) assembly_io.$(OBJEXT) \ +am_libmira_a_OBJECTS = $(am__objects_1) assembly.$(OBJEXT) \ + contig.$(OBJEXT) read.$(OBJEXT) contig_analysis.$(OBJEXT) \ + ads.$(OBJEXT) skim.$(OBJEXT) adsfacts.$(OBJEXT) \ + align.$(OBJEXT) assembly_info.$(OBJEXT) assembly_io.$(OBJEXT) \ + assembly_misc.$(OBJEXT) assembly_output.$(OBJEXT) \ assembly_reduceskimhits.$(OBJEXT) assembly_swalign.$(OBJEXT) \ - assembly_misc.$(OBJEXT) dataprocessing.$(OBJEXT) \ - manifest.$(OBJEXT) scaffolder.$(OBJEXT) seqtohash.$(OBJEXT) \ - skim_farc.$(OBJEXT) skim_lowbph.$(OBJEXT) + bloomfilter.$(OBJEXT) contig_consensus.$(OBJEXT) \ + contig_covanalysis.$(OBJEXT) contig_edit.$(OBJEXT) \ + contig_featureinfo.$(OBJEXT) contig_output.$(OBJEXT) \ + contig_pairconsistency.$(OBJEXT) dataprocessing.$(OBJEXT) \ + dynamic.$(OBJEXT) gbf_parse.$(OBJEXT) gff_parse.$(OBJEXT) \ + gff_save.$(OBJEXT) hashstats.$(OBJEXT) maf_parse.$(OBJEXT) \ + manifest.$(OBJEXT) multitag.$(OBJEXT) \ + parameters_flexer.$(OBJEXT) parameters.$(OBJEXT) \ + pcrcontainer.$(OBJEXT) ppathfinder.$(OBJEXT) \ + preventinitfiasco.$(OBJEXT) readgrouplib.$(OBJEXT) \ + readpool.$(OBJEXT) sam_collect.$(OBJEXT) scaffolder.$(OBJEXT) \ + seqtohash.$(OBJEXT) skim_farc.$(OBJEXT) skim_lowbph.$(OBJEXT) \ + warnings.$(OBJEXT) nodist_libmira_a_OBJECTS = $(am__objects_1) libmira_a_OBJECTS = $(am_libmira_a_OBJECTS) \ $(nodist_libmira_a_OBJECTS) @@ -171,6 +169,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -303,52 +302,54 @@ nodist_libmira_a_SOURCES = $(libmira_a_XXDSRC:.xxd=.xxd.H) dist_pkgdata_DATA = demoparam.prm -# put read and contig in front: with make -j .... they'll get made first +# put assembly, read, contig, etc. in front: with make -j .... they'll get made first # and won't block the rest. libmira_a_SOURCES = \ $(libmira_a_XXDSRC) \ - preventinitfiasco.C\ - sam_collect.C\ + assembly.C\ + contig.C\ read.C\ - parameters.C \ - pcrcontainer.C \ + contig_analysis.C\ ads.C\ + skim.C\ + \ adsfacts.C\ align.C\ - assembly_output.C\ assembly_info.C\ - contig_analysis.C\ + assembly_io.C\ + assembly_misc.C\ + assembly_output.C\ + assembly_reduceskimhits.C\ + assembly_swalign.C\ + bloomfilter.C\ contig_consensus.C\ contig_covanalysis.C\ contig_edit.C\ contig_featureinfo.C\ - contig_pairconsistency.C\ contig_output.C\ + contig_pairconsistency.C\ + dataprocessing.C\ dynamic.C\ gbf_parse.C\ gff_parse.C\ gff_save.C\ - parameters_flexer.ll\ + hashstats.C\ maf_parse.C\ + manifest.C\ multitag.C\ + parameters_flexer.ll\ + parameters.C \ + pcrcontainer.C \ + ppathfinder.C\ + preventinitfiasco.C\ readgrouplib.C\ - contig.C\ readpool.C\ - assembly.C\ - bloomfilter.C\ - ppathfinder.C\ - skim.C\ - hashstats.C\ - assembly_io.C\ - assembly_reduceskimhits.C\ - assembly_swalign.C\ - assembly_misc.C\ - dataprocessing.C\ - manifest.C\ + sam_collect.C\ scaffolder.C\ seqtohash.C\ skim_farc.C\ - skim_lowbph.C + skim_lowbph.C\ + warnings.C noinst_HEADERS = adsfacts.H\ ads.H\ @@ -386,7 +387,8 @@ stringcontainer.H\ structs.H\ timerestrict.H\ - types_basic.H + types_basic.H\ + warnings.H libmiraestass_a_SOURCES = estassembly.C all: $(BUILT_SOURCES) @@ -485,6 +487,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skim_farc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skim_lowbph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/warnings.Po@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff -Nru mira-3.9.18/src/mira/TODO mira-4.0/src/mira/TODO --- mira-3.9.18/src/mira/TODO 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/TODO 2014-02-02 12:05:18.000000000 +0000 @@ -1,3 +1,41 @@ + +Naming scheme SRA? (take 1st comment as readname?) + +----------------------------------- + +Assembly with -AS:nop=3, stopped in pass 2 and resumed: just calculates pass 2 +and stopps without a pass 3??? + +----------------------------------- + +neisseria: +paired-end wishlist + +----------------------------------- + +apropos function on manifest parameters + +----------------------------------- + +Loading of CAF/ MAF for assembly: + +if manifest like this +readgroup +technology=pcbiohq +data=... .maf + +but the MAF contains, e.g., Solexa, MIRA does not know about the +Solexas after the manifest parsed and hence did not prepared its +parameters! + +*sigh* + +----------------------------------- + +sam depad : no "allstrains" consensus embedded in MAF anymore? + +----------------------------------- + Read::getDigiNormMultiplier(); eventually cache a boolean for quick yes/no? diff -Nru mira-3.9.18/src/mira/adaptorsforclip.454.xxd mira-4.0/src/mira/adaptorsforclip.454.xxd --- mira-3.9.18/src/mira/adaptorsforclip.454.xxd 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/adaptorsforclip.454.xxd 2014-02-02 12:05:18.000000000 +0000 @@ -9,7 +9,7 @@ # sequences must be included extra in this file (see "rev_*" # down below # ->unkown_lookslike_adaptorB +>unknown_lookslike_adaptorB ACTCGTATAGTGACACGCAACAGGGGATAGACAAGGCACACAGGGGATA >unknown_from_cDNA_project_titanium450bp TTCGCAGTGAGTGACAGGCCACTGAGACTGCCAAGGCACACGAGGGGATAGG diff -Nru mira-3.9.18/src/mira/ads.C mira-4.0/src/mira/ads.C --- mira-3.9.18/src/mira/ads.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/ads.C 2014-02-02 12:05:18.000000000 +0000 @@ -36,14 +36,6 @@ #include "ads.H" -#include - -#include -#include - -#include - -#include #include "errorhandling/errorhandling.H" #include "util/dptools.H" @@ -1303,30 +1295,23 @@ { FUNCSTART("void AlignedDualSeq::acquireSequences(const char * seq1, const char * seq2, readid_t id1, readid_t id2, int8 id1dir, int8 id2dir, bool enforce_clean_ends, bool dontpenalisengaps)"); - ADSF_total_len= static_cast(strlen(seq1)); - if(ADSF_total_len!=strlen(seq2)){ - cerr << "\nlens1: " << strlen(seq1); - cerr << "\nlens2: " << strlen(seq2); - cerr << '\n'; - MIRANOTIFY(Notify::INTERNAL, " Sequence lengths unequal."); - } - if(ADSF_total_len==0){ - MIRANOTIFY(Notify::INTERNAL, " Sequence lengths 0?"); - } - if(ADSF_total_len>65530){ - MIRANOTIFY(Notify::INTERNAL, " Alignment of two sequences > 65530 bases, cannot handle, shouldn't have happened!"); + { + auto tmplen=strlen(seq1); + BUGIFTHROW(tmplen!=strlen(seq2)," Sequence lengths unequal: " << tmplen << " vs. " << strlen(seq2)); + BUGIFTHROW(tmplen==0, "Sequence lengths 0?"); + BUGIFTHROW(tmplen>65530, "Alignment of two sequences: " << tmplen << " > 65530 bases, cannot handle, shouldn't have happened!"); + ADSF_total_len= static_cast(tmplen); } - CEBUG("ADSF_total_len: " << ADSF_total_len << endl); if(ADS_aligned_seq1==nullptr || ADS_cursize(i); i=0; - while(*ptr++ != 0) i++; + while(*ptr++ != 0) ++i; ADSF_id1_rightdelta=static_cast(i); } @@ -1414,11 +1399,11 @@ uint32 i=0; while(*ptr != 0 && *ptr!=' '){ - i++; ptr++; + ++i; ++ptr; } ADS_len2=static_cast(i); i=0; - while(*ptr++ != 0) i++; + while(*ptr++ != 0) ++i; ADSF_id2_rightdelta=static_cast(i); } @@ -1593,8 +1578,8 @@ // For this last loop, the characters are set manually to ' ' // Reason for the extra loop included in loop: // I don't want the code for addpenpercent doubled after the loop - for(int32 oli=getOverlapLen(); oli>=0;oli--, ptr1++, ptr2++, ptrconsgap++, ngpI++){ - if(oli>0) { + for(int32 oli=getOverlapLen(); oli>=0;--oli, ++ptr1, ++ptr2, ++ptrconsgap, ++ngpI){ + if(likely(oli>0)) { a=static_cast(*ptr1); b=static_cast(*ptr2); } else { @@ -1606,7 +1591,7 @@ if(enforce_clean_ends){ if(oli // C-strings +#include "mira/align.H" #include "errorhandling/errorhandling.H" @@ -42,7 +40,7 @@ #define CEBUGF(bla) #endif - +#define CLOCK_STEPS1 #if __GNUC__ >= 3 @@ -68,35 +66,6 @@ * *************************************************************************/ -Align::Align(MIRAParameters * params, const char * seq1, uint32 len1, const char * seq2, uint32 len2, int32 id1, int32 id2, int8 id1dir, int8 id2dir, bool calcwithoffset, int32 expectedoffset) : Dynamic(params, seq1, len1, seq2, len2, calcwithoffset, expectedoffset) -{ - FUNCSTART("Align::Align(MIRAParameters * params, const char * seq1, uint32 len1, const char * seq2, uint32 len2, int32 id1, int32 id2, int8 id1dir, int8 id2dir) : Dynamic(params, seq1, len1, seq2, len2, bool calcwithoffset, int32 expectedoffset)"); - - AL_miraparams=params; - - AL_id1=id1; - AL_id2=id2; - AL_id1dir=id1dir; - AL_id2dir=id2dir; - - AL_tmpads=nullptr; - AL_alseq1=nullptr; - AL_alseq2=nullptr; - AL_as12size=0; - - - init(); - - FUNCEND(); -} - - -/************************************************************************* - * - * - * - *************************************************************************/ - Align::Align(MIRAParameters * params): Dynamic(params) { FUNCSTART("Align::Align(MIRAParameters * params): Dynamic(params)"); @@ -109,6 +78,7 @@ AL_as12size=0; init(); + resetTimings(); FUNCEND(); } @@ -173,26 +143,24 @@ { FUNCSTART("Align::acquireSequences(const char * seq1, uint32 len1, const char * seq2, uint32 len2, int32 id1, int32 id2, int8 id1dir, int8 id2dir, bool calcwithoffset, int32 expectedoffset)"); +#ifdef CLOCK_STEPS1 + timeval tv; + gettimeofday(&tv,nullptr); +#endif + Dynamic::setSequences(seq1, len1, seq2, len2, calcwithoffset, expectedoffset); - //for(uint32 i=0; i<5000; i++) { - // Dynamic::acquireSequences(seq1, len1, seq2, len2, calcwithoffset, expectedoffset, true); - // //Dynamic::acquireSequences(seq1, len1, seq2, len2, calcwithoffset, expectedoffset, false); - //} - //exit(0); AL_id1=id1; AL_id2=id2; AL_id1dir=id1dir; AL_id2dir=id2dir; - //if(AL_alseq1) delete [] AL_alseq1; - // REMOVEME (comment) - // AL_alseq1=nullptr; - //if(AL_alseq2) delete [] AL_alseq2; - // AL_alseq2=nullptr; - init(); +#ifdef CLOCK_STEPS1 + AL_timing_acquires+=diffsuseconds(tv); +#endif + FUNCEND(); } @@ -238,6 +206,11 @@ MIRANOTIFY(Notify::INTERNAL, ": Programming error. Tried to align without proper initialisation of Align-object."); } +#ifdef CLOCK_STEPS1 + timeval tv; + gettimeofday(&tv,nullptr); +#endif + AL_adslist=adslist; if(AL_tmpads==nullptr) AL_tmpads= new AlignedDualSeq(AL_miraparams); @@ -262,15 +235,20 @@ AL_error_hit_band=false; // clear the aligned sequences - for(uint32 i=0; i * adslist, bool enforce_clean_ends, bool dontpenalisengaps)"); +#ifdef CLOCK_STEPS1 + timeval tv; + gettimeofday(&tv,nullptr); +#endif + AL_enforce_clean_ends=enforce_clean_ends; AL_dont_penalise_ngaps=dontpenalisengaps; @@ -350,7 +333,9 @@ termAlign(); - //delete AL_tmpads; +#ifdef CLOCK_STEPS1 + AL_timing_fullalign+=diffsuseconds(tv); +#endif FUNCEND(); } @@ -396,10 +381,10 @@ uint32 maxvalcolpos=0; { CEBUG("\n\nLast row (left to right):\n"); - for(int32 i=1; i<=DYN_len_seq2; i++) { + for(uint32 i=1; i<=DYN_len_seq2; ++i) { int32 vAL_actpos=DYN_simmatrix[((DYN_len_seq1)*(DYN_len_seq2+1)+i)]; CEBUG("R-Looking: " << i << "\tval:" << vAL_actpos << '\n'); - int32 relscore=(vAL_actpos*10000)/min(i,static_cast(DYN_len_seq1)); + int32 relscore=(vAL_actpos*10000)/min(i,DYN_len_seq1); if(relscore >= AL_params.al_min_relscore && vAL_actpos>=AL_params.al_min_score && vAL_actpos>=maxvalrow){ @@ -409,10 +394,10 @@ } CEBUG("Last column:\n"); - for(int32 i=1; i<=DYN_len_seq1; i++) { + for(uint32 i=1; i<=DYN_len_seq1; ++i) { int32 vAL_actpos=(DYN_simmatrix[i*(DYN_len_seq2+1)+DYN_len_seq2]); CEBUG("C-Looking: " << i << "\tval: " << vAL_actpos << '\n'); - int32 relscore=(vAL_actpos*10000)/min(i,static_cast(DYN_len_seq2)); + int32 relscore=(vAL_actpos*10000)/min(i,DYN_len_seq2); if(relscore >= AL_params.al_min_relscore && vAL_actpos>=AL_params.al_min_score && vAL_actpos >= maxvalcol){ @@ -436,22 +421,36 @@ if(maxvalrow>maxvalcol){ if(maxvalrowpos>0) { CEBUG("maxvalrowpos: " << maxvalrowpos << '\t' << "DYN_len_seq2: " << DYN_len_seq2 << endl); - for(int32 i=maxvalrowpos; i0) { CEBUG("maxvalcolpos: " << maxvalcolpos << '\t' << "DYN_len_seq1: " << DYN_len_seq1 << endl); - for(int32 i=maxvalcolpos; isize(): " << AL_adslist->size() << endl;); @@ -511,33 +510,50 @@ }else{ CEBUG("seq2ptr points on: nullptr\n"); } - if(AL_allen>AL_align_maxlen) { + if(unlikely(AL_allen>AL_align_maxlen)) { cerr << "allen:: "<< AL_allen; MIRANOTIFY(Notify::INTERNAL, ": FOOOOOO!.") ; } - if(AL_cutoff_counter==AL_mpcache_al_max_cutoff) { + if(unlikely(AL_cutoff_counter==AL_mpcache_al_max_cutoff)) { CEBUG("back... (because of cutoff)\n"); return; } + if(unlikely(AL_error_hit_band)) { + CEBUG("back... (because of band hit)\n"); + return; + } - if(i==0 && j==0) { + if(unlikely(i==0 && j==0)) { if(AL_seq1ptr==DYN_sequence1-1 && AL_seq2ptr==DYN_sequence2-1){ +#ifdef CLOCK_STEPS1 + timeval tv; + gettimeofday(&tv,nullptr); +#endif AL_tmpads->acquireSequences(AL_alseq1+AL_allen, AL_alseq2+AL_allen, AL_id1, AL_id2, AL_id1dir, AL_id2dir, AL_enforce_clean_ends, AL_dont_penalise_ngaps); +#ifdef CLOCK_STEPS1 + AL_timing_ra_adsacquire+=diffsuseconds(tv); +#endif CEBUG("Solution\n"); CEBUG(*AL_tmpads); if(AL_tmpads->getScore() >= static_cast(AL_mpcache_al_min_score / AL_mpcache_dyn_score_multiplier) && AL_tmpads->getOverlapLen() >= static_cast(AL_mpcache_al_min_overlap) && AL_tmpads->getScoreRatio() >= static_cast(AL_mpcache_al_min_relscore)){ +#ifdef CLOCK_STEPS1 + gettimeofday(&tv,nullptr); +#endif AL_adslist->push_back(*AL_tmpads); +#ifdef CLOCK_STEPS1 + AL_timing_ra_adslist+=diffsuseconds(tv); +#endif } - AL_no_solutions++; - AL_cutoff_counter++; + ++AL_cutoff_counter; + ++AL_no_solutions; if(AL_new_solution){ AL_new_solution=0; - AL_no_diff_solutions++; + ++AL_no_diff_solutions; } } CEBUG("back...\n"); @@ -566,7 +582,11 @@ // AL_alseq2[AL_allen++]='%'; AL_allen++; AL_seq1ptr++; - } else { + } else if(j-(DYN_leftbandx+i) < 5 // bugfix parentheses; 5 as a gap-bridge while waiting for new code ft_pcbiolow / rle + || DYN_rightbandx+i-j < 5){ + AL_error_hit_band=true; + CEBUG("HIT BAND LIMIT: " << j-(DYN_leftbandx+i) << " " << DYN_rightbandx+i-j << endl); + }else{ int32 vgl=DYN_match_matrix[static_cast(*AL_seq1ptr)][static_cast(*AL_seq2ptr)]; CEBUG("vgl: " << vgl << endl); @@ -655,7 +675,7 @@ AL_seq2ptr++; } - if(upok){ + if(upok && !AL_error_hit_band){ CEBUG("up ...\n"); @@ -668,7 +688,7 @@ AL_seq1ptr++; } - if(leftok){ + if(leftok && !AL_error_hit_band){ CEBUG("left ...\n"); @@ -697,3 +717,42 @@ cout << "Align\n------\n"; } + + +void Align::resetTimings() +{ + DYN_timing_seqcopy=0; + DYN_timing_bswmatrix=0; + DYN_timing_bswm_setup=0; + DYN_timing_bswm_p1=0; + DYN_timing_bswm_p2a=0; + DYN_timing_bswm_p2b=0; + DYN_timing_bswm_p3=0; + DYN_timing_bswm_cleanband=0; + AL_timing_acquires=0; + AL_timing_fullalign=0; + AL_timing_prepalign=0; + AL_timing_raligntot=0; + AL_timing_ra_adsacquire=0; + AL_timing_ra_adslist=0; +} + +void Align::dumpTimings() +{ + cout << "Align timing DYN seqcpy : " << DYN_timing_seqcopy << endl; + cout << "Align timing DYN bsw su : " << DYN_timing_bswm_setup << endl; + cout << "Align timing DYN bsw p1 : " << DYN_timing_bswm_p1 << endl; + cout << "Align timing DYN bsw p2a: " << DYN_timing_bswm_p2a << endl; + cout << "Align timing DYN bsw p2b: " << DYN_timing_bswm_p2b << endl; + cout << "Align timing DYN bsw p3 : " << DYN_timing_bswm_p3 << endl; + cout << "Align timing DYN bsw cb : " << DYN_timing_bswm_cleanband << endl; + + cout << "Align timing DYN bsw : " << DYN_timing_bswmatrix << endl; + cout << "Align timing AL acqu s : " << AL_timing_acquires << endl; + cout << "Align timing AL full : " << AL_timing_fullalign << endl; + cout << "Align timing AL prep : " << AL_timing_prepalign << endl; + cout << "Align timing AL ralignt : " << AL_timing_raligntot << endl; + cout << "Align timing AL ralignc : " << AL_timing_raligntot-AL_timing_ra_adsacquire-AL_timing_ra_adslist << endl; + cout << "Align timing AL ads a : " << AL_timing_ra_adsacquire << endl; + cout << "Align timing AL ads s : " << AL_timing_ra_adslist << endl; +} diff -Nru mira-3.9.18/src/mira/align.H mira-4.0/src/mira/align.H --- mira-3.9.18/src/mira/align.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/align.H 2014-02-02 12:05:18.000000000 +0000 @@ -29,6 +29,8 @@ #include +#include + #include "stdinc/defines.H" #include "stdinc/stlincludes.H" @@ -53,7 +55,7 @@ the instance */ char * AL_alseq2; // dito for the second sequence - int32 AL_as12size; // size of alseq1 / alseq2 array + uint32 AL_as12size; // size of alseq1 / alseq2 array char * AL_seq1ptr; // ptr for the actual position in seq 1 char * AL_seq2ptr; // dito for sequence 2 @@ -95,6 +97,14 @@ uint32 AL_mpset_al_min_overlap; uint32 AL_mpset_al_min_relscore; + // Timing checks + suseconds_t AL_timing_acquires; + suseconds_t AL_timing_fullalign; + suseconds_t AL_timing_prepalign; + suseconds_t AL_timing_raligntot; + suseconds_t AL_timing_ra_adsacquire; + suseconds_t AL_timing_ra_adslist; + public: uint32 AL_no_solutions; // number of alignment solutions found uint32 AL_no_diff_solutions; // where no # these have different starting @@ -115,17 +125,6 @@ public: Align(MIRAParameters * params); - Align(MIRAParameters * params, - const char * seq1, - uint32 len1, - const char * seq2, - uint32 len2, - int32 id1, - int32 id2, - int8 id1dir, - int8 id2dir, - bool calcwithoffset=true, - int32 expectedoffset=0); ~Align(); void discard(); @@ -150,6 +149,9 @@ void MONITOR() {std::cout << "MONITOR: " << DYN_simmatrix << std::endl;} void coutWhatWasGiven(); + + void dumpTimings(); + void resetTimings(); }; diff -Nru mira-3.9.18/src/mira/assembly.C mira-4.0/src/mira/assembly.C --- mira-3.9.18/src/mira/assembly.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly.C 2014-02-02 12:05:18.000000000 +0000 @@ -27,41 +27,16 @@ #include "assembly.H" -// MIRA uses sleep(3) -#include - -// MIRA uses stat (2) -#include -#include - -// for perror (3C) and some routines that use the quick C I/O -// instead of the dog slow C++ streams -#include -//we use errno -#include - -// for getting username etc -#include - -// for time measurements -#include -#include -#include -#include - // BOOST #include #include -// for checking time restrictions -#include -#include "mira/timerestrict.H" -#include "util/progressindic.H" #include "util/dptools.H" -#include "util/misc.H" -#include "util/machineinfo.H" #include "util/fileanddisk.H" +#include "util/machineinfo.H" +#include "util/misc.H" +#include "util/progressindic.H" #include "errorhandling/errorhandling.H" #include "mira/dynamic.H" @@ -140,16 +115,6 @@ setExtendedLog(AS_miraparams[0].getSpecialParams().mi_extended_log); - // honour user supplied working directory - // will probably already be done by the parameter parsing already, but just in case - // this was done programatically ... - if(!AS_miraparams[0].getDirectoryParams().dir_cwd.empty()){ - int ret=chdir(AS_miraparams[0].getDirectoryParams().dir_cwd.c_str()); - if(ret){ - MIRANOTIFY(Notify::FATAL,"Changing working directory to '" << AS_miraparams[0].getDirectoryParams().dir_cwd << "' failed, system message is: " << strerror(errno) << endl); - } - } - // For resuming assemblies, do purge the results directory! if(resumeassembly && ensureDirectory(AS_miraparams[0].getDirectoryParams().dir_results, true)){ MIRANOTIFY(Notify::FATAL,"Could not delete and recreate results directory?"); @@ -157,6 +122,9 @@ // purge the the remaining directories (if we're not resuming) ensureStandardDirectories(!resumeassembly); + // after ensureStandardDirectories() as usually located in info directory + AS_warnings.setOutputPath(AS_miraparams[0].getDirectoryParams().dir_info+"/"+AS_miraparams[0].getAssemblyParams().as_outfile_stats_warnings); + setContigBuiltCallback(); AS_assemblyinfo.setLargeContigSize(500); @@ -206,6 +174,8 @@ AS_hasbackbones=false; AS_needsskimfornastyrepeats=false; + AS_hashstat_avghashfreq=0; + AS_doneskimchimera=false; AS_resumeisok=false; @@ -238,7 +208,10 @@ dumpMemInfo(); - cout << "Dynamic allocs: " << Dynamic::DYN_alloccount << endl; + AS_warnings.dumpWarnings(); + + cout << "Dynamic s allocs: " << Dynamic::DYN_alloccounts << endl; + cout << "Dynamic m allocs: " << Dynamic::DYN_alloccountm << endl; cout << "Align allocs: " << Align::AL_alloccount << endl; discard(); @@ -656,32 +629,67 @@ void Assembly::ensureStandardDirectories(bool purge){ FUNCSTART("void Assembly::ensureStandardDirectories(bool purge)"); - if(ensureDirectory(AS_miraparams[0].getDirectoryParams().dir_top, purge, true, false) - || ensureDirectory(AS_miraparams[0].getDirectoryParams().dir_tmp, purge, true, false) - || ensureDirectory(AS_miraparams[0].getDirectoryParams().dir_results, purge, true, false) - || ensureDirectory(AS_miraparams[0].getDirectoryParams().dir_info, purge, true, false) - || ensureDirectory(AS_miraparams[0].getDirectoryParams().dir_checkpoint, purge, true, false)){ - - MIRANOTIFY(Notify::FATAL, "Could not make sure that a needed directory exists, aborting MIRA."); - } - - if(AS_miraparams[0].getDirectoryParams().dir_tmp_symlink.size()){ - struct stat st; - int rc=lstat(AS_miraparams[0].getDirectoryParams().dir_tmp_symlink.c_str(),&st); - - if(rc){ - string system_lntmp = - static_cast("ln -s ") - +AS_miraparams[0].getDirectoryParams().dir_tmp - +" " - +AS_miraparams[0].getDirectoryParams().dir_tmp_symlink; + auto & dparams = AS_miraparams[0].getNonConstDirectoryParams(); - //cout << "LINKING: " << system_lntmp << endl; - - if(system(system_lntmp.c_str())) { - perror((static_cast("Could not link "+AS_miraparams[0].getDirectoryParams().dir_tmp_symlink+" to "+AS_miraparams[0].getDirectoryParams().dir_tmp)).c_str()) ; + string existingtmpdir; + // special purge logic to handle eventually existing symlinks to -DI:trt + if(!dparams.dir_tmp_symlink.empty() + && boost::filesystem::exists(dparams.dir_tmp_symlink) + && boost::filesystem::is_symlink(dparams.dir_tmp_symlink)){ + existingtmpdir=boost::filesystem::read_symlink(dparams.dir_tmp_symlink).native(); + }else if(boost::filesystem::exists(dparams.dir_tmp) + && boost::filesystem::is_symlink(dparams.dir_tmp)){ + existingtmpdir=boost::filesystem::read_symlink(dparams.dir_tmp).native(); + } + if(purge + && !existingtmpdir.empty()){ + boost::filesystem::remove_all(existingtmpdir); + existingtmpdir.clear(); + } + + // make sure the main directories exist or are created + if(ensureDirectory(dparams.dir_top, purge, true, false) + || ensureDirectory(dparams.dir_results, purge, true, false) + || ensureDirectory(dparams.dir_info, purge, true, false) + || ensureDirectory(dparams.dir_checkpoint, purge, true, false)){ + + MIRANOTIFY(Notify::FATAL, "Could not make sure that a needed directory exists (see log above for more info), aborting MIRA."); + } + + // make sure the tmp directory exists or is created + // either as directory or as symlinked directory (-DI:trt=...) + if(dparams.dir_tmp_symlink.empty()){ + if(ensureDirectory(dparams.dir_tmp, purge, true, false)){ + MIRANOTIFY(Notify::FATAL, "Could not make sure that the MIRA tmp directory exists, aborting."); + } + }else{ + if(!existingtmpdir.empty() && !boost::filesystem::is_directory(existingtmpdir)){ + // existing ist not a directory??? Should be very, very ... very rare + // but if yes, let's purge it + boost::filesystem::remove_all(existingtmpdir); + existingtmpdir.clear(); + } + if(existingtmpdir.empty()){ + existingtmpdir=dparams.dir_tmp+"_XXXXXX"; + auto * ptr=mkdtemp(const_cast(existingtmpdir.c_str())); + if(ptr==nullptr){ + perror(static_cast("Could not create directory for temporary MIRA data "+existingtmpdir).c_str()); } + // contrary to what "man mkdtemp" may lead to believe, mkdtemp() does not return NULL (failure) + // if given a path to a non-existing directory ("/bla/bla_XXXXXX") + // need to check ourselves + if(!boost::filesystem::exists(existingtmpdir)){ + MIRANOTIFY(Notify::FATAL, "Could not create MIRA tmp directory \"" << existingtmpdir << "\": is some part of the path not existing or access protected?"); + } + } + + dparams.dir_tmp=existingtmpdir; + + if(!boost::filesystem::exists(dparams.dir_tmp_symlink)){ + boost::filesystem::create_symlink(dparams.dir_tmp,dparams.dir_tmp_symlink); } + + cout << "Symlink " << dparams.dir_tmp_symlink << " now pointing to " << dparams.dir_tmp << endl;; } checkForNFSMountOnTmpDir(); @@ -719,13 +727,13 @@ "If you don't want that, you have three possibilities:\n\n" "1) RECOMMENDED! Use -DI:trt to redirect the tmp directory somewhere else on a\n" " local disk or even SSD.\n" - "2) ALSO POSSIBLE: put the whole project somewhere on your file system.\n" - "3) ABSOLUTELY NOT RECOMMENDED AT ALL: use \"-NW:sonfs=no\" to tell MIRA not\n" + "2) ALSO POSSIBLE: put the whole project somewhere else on your file system.\n" + "3) ABSOLUTELY NOT RECOMMENDED AT ALL: use \"-NW:cnfs=warn\" to tell MIRA not\n" " to stop when it finds the tmp directory on NFS.\n\n" "If you do not know what NFS is and which directory to use in \"-DI:trt\", ask\n" "your local system administrator to guide you.\n\n"; - if(AS_miraparams[0].getNagAndWarnParams().nw_stop_on_nfs){ + if(AS_miraparams[0].getNagAndWarnParams().nw_check_nfs==NWSTOP){ MIRANOTIFY(Notify::FATAL,"Tmp directory is on a NFS mount ... but we don't want that."); } } @@ -752,7 +760,7 @@ string tmpfname; tmpfname=buildFileName(0,"","", as_fixparams.as_tmpf_clippings, - ".txt"); + ".txt","",0); // doing it twice catches a few outliers missed the first time string logprefix="proposed cutback 1a: "; @@ -897,7 +905,7 @@ string tmpfname; tmpfname=buildFileName(0,"","", as_fixparams.as_tmpf_clippings, - ".txt"); + ".txt","",false); string logprefix="proposed cutback preassembly: "; performNewProposedCutbackClips(tmpfname,logprefix); @@ -969,6 +977,7 @@ basicDataChecks(); uint32 startpass=1; + AS_guessedtemplatevalues=false; ensureStandardDirectories(false); @@ -976,6 +985,10 @@ //directory_parameters const & dir_params= AS_miraparams->getDirectoryParams(); edit_parameters const & ed_params= AS_miraparams[0].getEditParams(); + AS_basesperhash_base=AS_miraparams[0].getSkimParams().sk_basesperhash; + + AS_donequickdenovocoveragecheck=false; + // fill quick lookup which sequencing types are present as well as whether backbones are there AS_seqtypespresent.clear(); AS_seqtypespresent.resize(ReadGroupLib::SEQTYPE_END,false); @@ -1019,6 +1032,13 @@ "", AS_miraparams); } + // look for template ids found + AS_maxtemplateid=-1; + for(uint32 rpi=0; rpiAS_maxtemplateid) AS_maxtemplateid=AS_readpool[rpi].getTemplateID(); + } + cout << "PRED MAXTID " << AS_maxtemplateid << endl; + // allocate or reserve memory that is quite static from the size, // reducing memory fragmentations at least a bit { @@ -1026,6 +1046,10 @@ cout << "\ndmi as_init 00\n"; dumpMemInfo(); #endif + if(AS_maxtemplateid>=0){ + AS_templateguesses.reserve(AS_maxtemplateid+1); + } + AS_multicopies.reserve(AS_readpool.size()); // do NOT init multicopies! AS_hasmcoverlaps.reserve(AS_readpool.size()); // does not need init @@ -1121,8 +1145,11 @@ //dumpMemInfo(); dumpFile("/proc/self/status",cout); + cout << "\n\nPass: " << actpass << " / " << as_fixparams.as_numpasses << endl; + AS_warnings.dumpWarnings(); + #ifdef VALGRIND_LEAKCHECK cout << "\n==MEMTRACK1 debugging start\n"; dumpMemInfo(); @@ -1156,6 +1183,21 @@ } #endif + // logic to increase the -SK:bph + // used the AS_hashstat_avghashfreq computed in earlier skim passes + if(actpass>=2 + && AS_miraparams[0].getSkimParams().sk_bph_increasestep>0 + && AS_hashstat_avghashfreq>AS_miraparams[0].getSkimParams().sk_bph_coveragethreshold){ + // we'll increase maximum of 3 per pass + uint32 maxbph=AS_basesperhash_base+(actpass-1)*3; + uint32 newbph=AS_basesperhash_base+(actpass-1)*static_cast(AS_hashstat_avghashfreq)/static_cast(AS_miraparams[0].getSkimParams().sk_bph_coveragethreshold); + if(newbph>maxbph) newbph=maxbph; + if(newbph>31) newbph=31; + AS_miraparams[0].getNonConstSkimParams().sk_basesperhash=newbph; + cout << "Automatic -SK:bph increased to " << newbph << endl; + } + + if(as_fixparams.as_skimeachpass || rerunSKIM // forced by new SRMs in previous pass || usereadextension @@ -1260,23 +1302,35 @@ // try to guess a good value for minimum coverage // for large contigs AS_assemblyinfo.calcCurrentInfo(); - if(AS_assemblyinfo.ASI_avgcoverage[1]>0){ - AS_assemblyinfo.setLargeTotalCov( - static_cast(.5+AS_assemblyinfo.ASI_avgcoverage[1]/3) - ); - }else{ + { + auto avc=AS_assemblyinfo.ASI_avgcoverage[1]; + if(avc==0){ + avc=AS_assemblyinfo.ASI_avgcoverage[0]; + } + double multval=0.5d; + if(avc<40) multval=1.0d/3; AS_assemblyinfo.setLargeTotalCov( - static_cast(.5+AS_assemblyinfo.ASI_avgcoverage[0]/3) - ); - } - for(uint8 st=0; st(.5+AS_assemblyinfo.ASI_avgcoverage_perst[0][st]/3), - st + static_cast(.5+avc*multval) ); + for(uint8 st=0; st(.5+avc*multval), + st + ); + } } saveAssemblyInfo(); + // save large contigs info only for genome de-novo, + // i.e., no backbones present and we're using genomic pathfinder (not EST) + // ah, and hunt for smile shape + if(AS_bbcontigs.empty() && AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms){ + saveLargeContigsInfo(); + warnAtSmileCoverage(); + } + #if TRACKMEMUSAGE cout << "\ndmi 90\n"; dumpMemInfo(); @@ -1374,8 +1428,16 @@ performSnapshot(actpass+1); } + + if(AS_hasbackbones && AS_guessedtemplatevalues){ + priv_hackMergeTwoResultMAFs(); + } + } + AS_warnings.dumpWarnings(); + + #ifdef MIRAMEMORC cout.flush(); MemORC::statistics(); @@ -1386,7 +1448,81 @@ return; } +/************************************************************************* + * + * In mapping assemblies, the results for guessing template numbers + * (size, segment placement) are available only after the MAF has been written + * Therefore, need to rewrite header of MAF (and CAF completely) + * Easiest way out: MAF header from chkpoint, body of 'usual' result MAF + * + * delete CAF, have outer caller recreate it from new MAF + * + *************************************************************************/ + +void Assembly::priv_hackMergeTwoResultMAFs() +{ + string headermaf(buildDefaultCheckpointFileName(AS_miraparams[0].getAssemblyParams().as_infile_chkptMAF)); + if(!fileExists(headermaf)) return; + + string bodymaf(getMAFFilename()); + if(!fileExists(bodymaf)) return; + + string newmaf(bodymaf+"tmp"); + + std::ifstream fin(headermaf, ios::in); + if(!fin.is_open()){ + cout << "MAFmerge: Could not open headermaf " << headermaf << endl; + return; + } + + std::ofstream fout(newmaf,ios::out); + if(!fout.is_open()){ + cout << "MAFmerge: Could not open newmaf " << newmaf << endl; + return; + } + + string actline; + actline.reserve(1000); + while(!fin.eof()){ + getline(fin,actline); + if(!actline.empty()){ + if(actline[0]=='@' + || actline[0]=='#'){ + fout << actline << '\n'; + }else{ + break; + } + } + } + fin.close(); + fin.open(bodymaf, ios::in); + if(!fin.is_open()){ + cout << "MAFmerge: Could not open bodymaf " << bodymaf << endl; + return; + } + while(!fin.eof()){ + getline(fin,actline); + if(actline.empty()) continue; + if(actline[0]!='@' + && actline[0]!='#') break; + } + fout << actline << '\n'; + fout << fin.rdbuf(); + + if(fout.bad()){ + cout << "MAFmerge: Could not finish copying to " << newmaf << endl; + } + fin.close(); + fout.close(); + fileRename(newmaf,bodymaf); + string caffile(getCAFFilename()); + if(fileExists(caffile)){ + removeFile(caffile,true); + fout.open(AS_miraparams[0].getDirectoryParams().dir_results+"/_tmprecreate"); + fout << caffile << endl; + } +} /************************************************************************* * @@ -1498,7 +1634,7 @@ void Assembly::ssdReadPool(const string & filename) { FUNCSTART("void Assembly::ssdReadPool(const string & filename)"); - ofstream fout(filename.c_str(),ios::out|ios::trunc); + ofstream fout(filename,ios::out|ios::trunc); Contig::dumpMAF_Head(fout); AS_readpool.dumpAs(fout,Read::AS_MAF,true); fout.close(); @@ -1941,12 +2077,21 @@ AS_deleteoldresultfiles=true; + AS_bfcstats.clear(); + AS_bfcstats.resize(2); // 0 for non-rep contigs, 1 for rep contigs + AS_contigs.clear(); Contig::setIDCounter(1); Contig::resetCERNumbering(); AS_assemblyinfo.zeroInfo(); + AS_templateguesses.clear(); + if(AS_maxtemplateid>=0){ + AS_templateguesses.resize(AS_maxtemplateid+1); + cout << "TGS: " << AS_templateguesses.size() << endl; + } + vector aligncache; setupAlignCache(aligncache); @@ -2050,6 +2195,10 @@ vector::iterator> tmp_lowerbound_oedges; + // TODO: currently filled by pathfinder, maybe good to have that already in skim? + AS_hasreptoverlap.clear(); + AS_hasnoreptoverlap.clear(); + // PathFinder object can be created ouside loop and re-used PPathfinder qaf(&AS_miraparams, @@ -2060,9 +2209,12 @@ &AS_used_ids, &AS_multicopies, &AS_hasmcoverlaps, + &AS_hasreptoverlap, + &AS_hasnoreptoverlap, &AS_istroublemaker, &AS_wellconnected, - &tmp_lowerbound_oedges); + &tmp_lowerbound_oedges, + &AS_templateguesses); // this vector will hold the read IDs added by pathfinder to contig // + backbone + rail IDs @@ -2177,9 +2329,9 @@ bool newreptmarked=true; bool wasovercalledited=false; bool wasmajorovercalledited=false; - bool mayeditovercalls=true; - bool mastermayeditovercalls=AS_miraparams[ReadGroupLib::SEQTYPE_454GS20].getEditParams().ed_automatic_contic_editing; + bool mastermayeditovercalls=ed_params.ed_mira_automatic_contic_editing; // may be changed in one of the iter + bool mayeditovercalls=mastermayeditovercalls; // recomputed after each contig build, just default init here // build a contig, repetitively until // ... maximum number of iterations has passed @@ -2430,7 +2582,6 @@ #ifdef CLOCK_STEPS2 cout << "Timing BFC cout constats: " << diffsuseconds(tv) << endl; #endif - if(as_fixparams.as_dateoutput) dateStamp(cout); } } @@ -2481,14 +2632,13 @@ } */ - if(goforit){ - // handling of 454 / Solexa data - mayeditovercalls=buildcon.hasEditableOvercallData() & mastermayeditovercalls; - + mayeditovercalls= mastermayeditovercalls & buildcon.hasEditableOvercallData(); + if(goforit){ + // handling of tricky overcalls (normally 454 & Ion) vector readsmarkedsrm; - // if 454 data present, mark areas with tricky overcalls + // mark areas with tricky overcalls // in those areas, no repeat marker may be set // do this always if(mayeditovercalls && buildcon.getNumReadsInContig() >1){ @@ -2504,7 +2654,9 @@ if(as_fixparams.as_mark_repeats && !as_fixparams.as_mark_repeats_onlyinresult && buildcon.getNumReadsInContig() >1){ - newreptmarked=markRepeats(buildcon, readsmarkedsrm); + Contig::repeatmarker_stats_t contigrepstats; + newreptmarked=markRepeats(buildcon, readsmarkedsrm, contigrepstats); + AS_bfcstats[buildcon.getLongRepeatStatus()].numnewsrm+=contigrepstats.numSRMs; foundSRMs|=newreptmarked; markrepeatsduringstore=false; } @@ -2531,6 +2683,7 @@ if(!newreptmarked && mayeditovercalls && buildcon.getNumReadsInContig() >1){ uint32 nummarks=buildcon.editTrickyOvercalls(false,false,readsmarkedsrm); cout << "Edited " << nummarks << " reads.\n"; + AS_bfcstats[buildcon.getLongRepeatStatus()].numeditovercall+=nummarks; wasovercalledited=nummarks>0; // major edit is edits in >=5% of the reads @@ -2556,10 +2709,21 @@ // that kind of edits all the time // - if(buildcon.getNumReadsInContig() >4){ - uint32 numedits=buildcon.editSingleDiscrepancyNoHAFTag(readsmarkedsrm); + if(ed_params.ed_mira_automatic_contic_editing + && ed_params.ed_kmer_singlets + && buildcon.getNumReadsInContig() >4){ + // editmode: increasingly less conservative (but still conservative enough) + uint32 editmode=passnr-1; + if(editmode>3) editmode=3; + // careful, editmode 3 not suited for EST/RNASeq! + if(!AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms + && editmode>2) { + editmode=2; + } + uint32 numedits=buildcon.editSingleDiscrepancyNoHAFTag(readsmarkedsrm,editmode); cout << "\nEdited " << numedits << " positions.\n"; if(numedits>0){ + AS_bfcstats[buildcon.getLongRepeatStatus()].numedithashfreq+=numedits; if(as_fixparams.as_dateoutput) dateStamp(cout); AS_needsskimfornastyrepeats=true; cout << "Deleting superfluous gap columns (2) ... "; @@ -2705,7 +2869,8 @@ // leading to long assembly times in later contigs. Not trimming away the // reads in first pass makes the 1st pass finish quicker and arrive to the // Smith-Waterman repeat disambiguation stage (SRMr->CRMr tags) - bfc_trimDenovoIfNecessary(buildcon,foundSRMs,basename_forextsave_iter,trackingunused); + contignotok=bfc_trimDenovoIfNecessary(buildcon,foundSRMs,basename_forextsave_iter,trackingunused); + if(contignotok) ++AS_bfcstats[buildcon.getLongRepeatStatus()].numdisassemblies; contigtrimmed=true; } @@ -2783,7 +2948,10 @@ gettimeofday(&tv,nullptr); #endif vector dummy; - newreptmarked=markRepeats(buildcon, dummy); + + Contig::repeatmarker_stats_t contigrepstats; + newreptmarked=markRepeats(buildcon, dummy,contigrepstats); + AS_bfcstats[buildcon.getLongRepeatStatus()].numnewsrm+=contigrepstats.numSRMs; foundSRMs|=newreptmarked; markrepeatsduringstore=false; #ifdef CLOCK_STEPS2 @@ -2893,13 +3061,29 @@ saveDebrisList(passnr, "", "_pass"); } + cout << "\nBuildstats - RM positions :\t" + << AS_bfcstats[0].numnewsrm << '\t' << AS_bfcstats[1].numnewsrm + << "\nBuildstats - overcall edits :\t" + << AS_bfcstats[0].numeditovercall << '\t' << AS_bfcstats[1].numeditovercall + << "\nBuildstats - hash edits :\t" + << AS_bfcstats[0].numedithashfreq << '\t' << AS_bfcstats[1].numedithashfreq + << "\nBuildstats - contig disassemblies:\t" + << AS_bfcstats[0].numdisassemblies << '\t' << AS_bfcstats[1].numdisassemblies + << endl << endl; + + analyseTemplateGuesses(); + if(lastpass && passnr==1){ + analyseTemplateGuesses(); + } + // reads that are debris or singlets apparently need every chance // they can get to align, therefore subsequent passes should not // reduce the overlaps - // Change: for Solexa reads ... sorry, we'll just miss out + // Change: for Solexa and Ion reads ... sorry, we'll just miss out { for(uint32 i=0; i::const_iterator clI=AS_contigs.begin(); @@ -3018,31 +3202,46 @@ CEBUG("assemblymode_mapping: " << assemblymode_mapping << '\n'); + bool wantbootstrap=false; + //if(assemblymode_mapping){ + // for(uint32 st=0; st=0 - && !AS_readpool[rid].isBackbone() - && !AS_readpool[rid].isRail()){ - AS_used_ids[rid]=0; - } - } - // chomp is needed here: - // removing reads from the contig may leave overhangs at the ends which are not - // covered by backbone. The alignment routines in Contig::addRead_wrapped() will not - // cope well with that as the calculation of the expected offset is then wrong - // (correct for indels *in* the reference, but not made for pseudo-indels at the - // ends of the contig) - cout << "done, chomping ... "; - buildcon.chompFront(-1); - buildcon.chompBack(-1); + if(wantbootstrap){ + CEBUG("mapping & solexa bootstrap\n"); + bfc_cp_mapWithSolexa(buildcon,qaf); + + cout << "Looking at what to throw away ... "; cout.flush(); + priv_removePotentiallyWrongBaseInserts(buildcon); + + cout << "stripping ... ";cout.flush(); + buildcon.stripToBackbone(); + for(auto & rid : qaf.getRIDsKnownInContig()){ + if(rid>=0 + && !AS_readpool[rid].isBackbone() + && !AS_readpool[rid].isRail()){ + AS_used_ids[rid]=0; + } + } + // chomp is needed here: + // removing reads from the contig may leave overhangs at the ends which are not + // covered by backbone. The alignment routines in Contig::addRead_wrapped() will not + // cope well with that as the calculation of the expected offset is then wrong + // (correct for indels *in* the reference, but not made for pseudo-indels at the + // ends of the contig) + cout << "done, chomping ... ";cout.flush(); + buildcon.chompFront(-1); + buildcon.chompBack(-1); + + cout << "done, synching ... ";cout.flush(); + qaf.resyncContig(); + cout << "done\n"; + } - cout << "done, synching ... "; - qaf.resyncContig(); - cout << "done\n"; bfc_cp_mapWithSolexa(buildcon,qaf); // TODO: hack until there's a routine that only clears tags set by the @@ -3422,9 +3621,17 @@ cout << "Found idx: " << foundidx << endl; } -void Assembly::bfc_trimDenovoIfNecessary(Contig & buildcon, bool foundSRMs, const string & basename_forextsave, uint32 & trackingunused) +/************************************************************************* + * + * return true if trimmed due to misassembly + * + *************************************************************************/ + +bool Assembly::bfc_trimDenovoIfNecessary(Contig & buildcon, bool foundSRMs, const string & basename_forextsave, uint32 & trackingunused) { - FUNCSTART("void Assembly::bfc_trimDenovoIfNecessary(Contig & buildcon, bool foundSRMs, uint32 & trackingunused)"); + FUNCSTART("bool Assembly::bfc_trimDenovoIfNecessary(Contig & buildcon, bool foundSRMs, uint32 & trackingunused)"); + + bool trimmedmisassembly=false; // if we have not been mapping: // 1) get misassembled parts out by looking at SRMc tags and trimming back to best range @@ -3437,6 +3644,7 @@ auto range=buildcon.findBestNonMisassembledRange(); if(range.first>=0){ cout<<"Found misassembly by repeat marker. Best range: " << range.first << ".." << range.second << '\t' << range.second-range.first << endl; + trimmedmisassembly=true; auto & cr=buildcon.getContigReads(); for(auto pcrI=cr.begin(); pcrI!=cr.end(); ++pcrI){ if(pcrI.getORPID()>=0){ @@ -3470,10 +3678,12 @@ // pair consistency analysis and contig breaking for genome assemblies, denovo if(AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms + && AS_miraparams[0].getSpecialParams().mi_extra_flag3 && (!AS_hasbackbones || AS_miraparams[0].getAssemblyParams().as_backbone_alsobuildnewcontigs)){ auto range=buildcon.findBestPairConsistencyRange(); if(range.first>0 || range.second < buildcon.getContigLength()){ cout<<"Found misassembly by pair consistency. Best range: " << range.first << ".." << range.second << '\t' << range.second-range.first << endl; + trimmedmisassembly=true; auto & cr=buildcon.getContigReads(); for(auto pcrI=cr.begin(); pcrI!=cr.end(); ++pcrI){ if(pcrI.getORPID()>=0){ @@ -3506,11 +3716,13 @@ // priv_tmpcheckroutine(buildcon); // coverage analysis and coverage reduction for genome assemblies, denovo - // TODO: switched off for release, still in development - - if(0){ + // note: + // has a bug for data which was digitally normalised ... + // ... and besides, does absolutely not make sense to do this on + // digitally normalised data. Therefore, not done if diginorm active. if(AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms && AS_miraparams[0].getSpecialParams().mi_extra_flag2 + && !AS_miraparams[0].getHashStatisticsParams().hs_apply_digitalnormalisation && (!AS_hasbackbones || AS_miraparams[0].getAssemblyParams().as_backbone_alsobuildnewcontigs)){ saveExtTmpContig(buildcon,(basename_forextsave+"_prered")); @@ -3546,9 +3758,10 @@ saveExtTmpContig(buildcon,(basename_forextsave+"_postred")); } } - } //priv_tmpcheckroutine(buildcon); } + + return trimmedmisassembly; } @@ -3584,6 +3797,18 @@ } } + if(as_fixparams.as_backbone_trimoverhangingreads){ + con.trimMapOverhang(); + } + + // store contig names only for de-novo genome assemblies + // used for listing large contigs at end of assembly + string cnameforstore; + if(!as_fixparams.as_assemblyjob_mapping + && AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms){ + cnameforstore=con.getContigName(); + } + // TODO: U13 hat 0 werte im ASCII? //Contig::setCoutType(Contig::AS_DEBUG); //cout << "Debug in bfc_storeContig()\n" << con; @@ -3591,7 +3816,9 @@ if(storecontig){ if(as_fixparams.as_mark_repeats&&mustmarkrepeats){ vector dummy; - markRepeats(con, dummy); + Contig::repeatmarker_stats_t contigrepstats; + markRepeats(con, dummy,contigrepstats); + AS_bfcstats[con.getLongRepeatStatus()].numnewsrm+=contigrepstats.numSRMs; } //bfc_markRepReads(con); @@ -3618,7 +3845,7 @@ con.updateStatsFromConsensusTags(true,true,true,true,true); // store the contig information - AS_assemblyinfo.storeContigStats(con.getStats()); + AS_assemblyinfo.storeContigStats(con.getStats(),cnameforstore); if(lastpass) { @@ -3783,7 +4010,7 @@ cout << "done." << endl; }else{ // store the contig information - AS_assemblyinfo.storeContigStats(con.getStats()); + AS_assemblyinfo.storeContigStats(con.getStats(),cnameforstore); if(conreads.begin().getORPID() >= 0) AS_isdebris[conreads.begin().getORPID()]=DEBRIS_UNSAVEDSINGLET; numcontigs--; @@ -3804,14 +4031,15 @@ *************************************************************************/ -bool Assembly::markRepeats(Contig & con, vector & readsmarkedsrm) +bool Assembly::markRepeats(Contig & con, vector & readsmarkedsrm, Contig::repeatmarker_stats_t & repstats) { FUNCSTART("void Assembly::markRepeats(Contig & con)"); + repstats.init(); + cout << "Marking possibly misassembled repeats: "; cout.flush(); - Contig::repeatmarker_stats_t repstats; con.newMarkPossibleRepeats(repstats, readsmarkedsrm); cout << "done step 1, starting step 2:"; con.codonSingleBaseRepeatMarker(6,repstats, readsmarkedsrm); @@ -4295,7 +4523,7 @@ //AS_logflag_oclevel=true; if(AS_logflag_oclevel){ string filename=buildFileName(version, "", "", - "elog.oclevel", + "elog.oclevel_pass", ".lst"); fout.open(filename.c_str(), ios::out); } @@ -4303,18 +4531,22 @@ for(uint32 i=0; i(AS_overlapcritlevell[i]) - << '\t' << static_cast(AS_overlapcritlevelr[i]) + << '\t' << static_cast(AS_overlapcritlevelvl[0][i]) + << '\t' << static_cast(AS_overlapcritlevelvr[0][i]) + << '\t' << static_cast(AS_overlapcritlevelvl[1][i]) + << '\t' << static_cast(AS_overlapcritlevelvr[1][i]) << '\n'; } // for Solexa, critlevel 0 is too harsch (because of special rule to calc // Solexa critlevels in Skim) - if(AS_readpool[i].isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA)){ - if(AS_overlapcritlevell[i] <= 2 && AS_overlapcritlevelr[i] <= 2 ){ + for(uint32 ocvi=0; ocvi<2;++ocvi){ + if(AS_readpool[i].isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA)){ + if(AS_overlapcritlevelvl[ocvi][i] <= 2 && AS_overlapcritlevelvr[ocvi][i] <= 2 ){ + AS_wellconnected[i]=true; + } + }else if(AS_overlapcritlevelvl[ocvi][i] == 0 && AS_overlapcritlevelvr[ocvi][i] == 0 ){ AS_wellconnected[i]=true; } - }else if(AS_overlapcritlevell[i] == 0 && AS_overlapcritlevelr[i] == 0 ){ - AS_wellconnected[i]=true; } } } @@ -4510,6 +4742,9 @@ AS_chimeracutflag.clear(); + // force taking strong good overlaps only for denovo genome + bool forcetakestronggood=!as_fixparams.as_assemblyjob_mapping & AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms; + Skim s2; s2.setExtendedLog(AS_miraparams[0].getSpecialParams().mi_extended_log); uint32 nummegahubs=s2.skimGo(AS_readpool, @@ -4521,8 +4756,8 @@ AS_writtenskimhitsperid, chuntleftcut, chuntrightcut, - AS_overlapcritlevell, - AS_overlapcritlevelr, + AS_overlapcritlevelvl, + AS_overlapcritlevelvr, skim_params.sk_numthreads, skim_params.sk_maxhashesinmem, onlyagainstrails, @@ -4531,7 +4766,8 @@ static_cast(skim_params.sk_hashsavestepping), prrequired, overlaplenrequired, - skim_params.sk_maxhitsperread + skim_params.sk_maxhitsperread, + forcetakestronggood ); cout << "Total megahubs: " << nummegahubs << endl; @@ -4561,10 +4797,11 @@ cout << "*ONLY* when you are sure that no (or only a very negligible number) of sequencing" "\nvector / adaptor sequence is remaining, try this:\n\n" "\t3) for organisms with complex repeats (eukaryots & some bacteria):\n"; - if(!AS_miraparams[0].getHashStatisticsParams().hs_masknastyrepeats) cout << "\t\t- use -SK:mnr=yes\n"; - cout << "\t\t- reduce the -SK:nrr parameter (divide by 2)\n" - "4) for EST projects, -SK:nrr will not really work, use -SK:nrr (start at\n" - " 10 and increase in steps of of 10)\n" + if(!AS_miraparams[0].getHashStatisticsParams().hs_masknastyrepeats) cout << "\t\t- use -HS:mnr=yes\n"; + cout << "\t\t- reduce the -HS:nrr parameter (divide by 2)\n" + // huh? + //"4) for EST projects, -SK:nrr will not really work, use -SK:nrr (start at\n" + //" 10 and increase in steps of of 10)\n" "\n" "*ONLY* if the above fails, try increasing the -SK:mmhr parameter\n" "Note that the number of present megahubs will increase computation time in\n" @@ -4584,7 +4821,9 @@ string cltmpfname; cltmpfname=buildFileName(0,"","", as_fixparams.as_tmpf_clippings, - ".txt"); + ".txt", + "", + false); string logprefix="skim detect: "; AS_chimeracutflag.resize(1); cutBackPossibleChimeras(cltmpfname, logprefix, chuntleftcut,chuntrightcut,AS_chimeracutflag); diff -Nru mira-3.9.18/src/mira/assembly.H mira-4.0/src/mira/assembly.H --- mira-3.9.18/src/mira/assembly.H 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly.H 2014-02-02 12:05:18.000000000 +0000 @@ -27,29 +27,21 @@ #ifndef _assembly_h_ #define _assembly_h_ -#include "mira/assembly_info.H" -#include "mira/assembly_output.H" - - - #include "stdinc/defines.H" #include "stdinc/stlincludes.H" +#include "mira/assembly_info.H" +#include "mira/assembly_output.H" +#include "mira/dataprocessing.H" #include "mira/manifest.H" +#include "mira/overlapedges.H" #include "mira/parameters.H" -#include "mira/read.H" +#include "mira/ppathfinder.H" #include "mira/readpool.H" -#include "mira/dataprocessing.H" #include "mira/skim.H" -#include "mira/overlapedges.H" -#include "mira/ppathfinder.H" - - +#include "mira/warnings.H" -//#include "mira/dna_sand32.H" -//#include "mira/blocksearch.H" - #ifdef MIRA_HAS_EDIT @@ -116,6 +108,8 @@ std::vector AS_miraparams; Manifest AS_manifest; + Warnings AS_warnings; + AssemblyInfo AS_assemblyinfo; DataProcessing AS_dataprocessing; @@ -201,6 +195,13 @@ vector is empty (==once every pass of MIRA) */ + std::vector AS_hasreptoverlap; /* reads that have ol_rept overlaps + init by pathfinder if empty (once every pass) + maybe unused atm + */ + std::vector AS_hasnoreptoverlap; /* reads that have ol_norept overlaps + init by pathfinder if empty (once every pass) + */ /***********************************************************************************/ @@ -253,8 +254,9 @@ // Skim will also give back info what the best overlap criterion levels // are for left and right overlaps // also used to reduce skim hits by getting rid of unnecessary matches - std::vector AS_overlapcritlevell; - std::vector AS_overlapcritlevelr; + // [0] is for norept overlaps, [1] for rept + std::vector> AS_overlapcritlevelvl; + std::vector> AS_overlapcritlevelvr; /* temporary use for vector clipping @@ -276,6 +278,8 @@ IDs not used yet are marked 0 */ + uint32 AS_hashstat_avghashfreq; // rough coverage estimator; if >0 then was set by performHashAnalysis() + std::vector AS_coverageperseqtype; /* This stores the median of all average coverages encountered in contigs at the end of the current round (per @@ -320,6 +324,33 @@ std::list AS_usedtmpfiles; + uint32 AS_basesperhash_base; // used when using the automatic -SK:bph increase + + /////////////// + + // stats for buildfirstcontigs; + struct bfcstats_t { + uint32 numnewsrm; + uint32 numeditovercall; + uint32 numedithashfreq; + uint32 numdisassemblies; + + bfcstats_t() : numnewsrm(0), numeditovercall(0), numedithashfreq(0), numdisassemblies(0) {}; + }; + std::vector AS_bfcstats; // vector of size 2: 0 for non-rep contigs, 1 for rep + + /////////////// + + bool AS_donequickdenovocoveragecheck; + + /////////////// + + int32 AS_maxtemplateid; + std::vector AS_templateguesses; + + bool AS_guessedtemplatevalues; + + /////////////// int64 AS_systemmemory; // initialised by constructor: how much mem the system has // is 0 if info not available @@ -353,7 +384,7 @@ /************************************************************************* * - * assembly_dataprocessing + * assembly_misc * *************************************************************************/ private: @@ -394,6 +425,13 @@ void analyseOverlapHashProfile(std::vector & profile, std::vector::const_iterator seI, ADSEstimator & adse); + void analyseTemplateGuesses(); + + bool warnAtSmileCoverage(); + bool warnAtHighCoverages(uint32 measuredcov); + + void priv_removePotentiallyWrongBaseInserts(Contig & con); + //void clipTo200(); //void performHashEditing(); @@ -511,7 +549,8 @@ void rsh4_takeNeedAllOverlaps_weakgood(const std::string & dnsfile, const std::vector & blockpos, const std::vector & blocklen); - void rsh4_takeSolexaByCritLevel(uint32 nbest, + void rsh4_takeSolexaByCritLevel(uint32 ocvi, + uint32 nbest, std::vector & nbestl, std::vector & nbestr, const std::string & dnsfile, @@ -531,7 +570,8 @@ void loadSequenceData_resume(); void loadSequenceData_new(); void basicDataChecks(); - void checkForReadNameLength(uint32 stoplength); + void basicReadGroupChecks(); + void checkForReadNameLength(uint32 stoplength, bool stop); //void loadExternalSCFQualities(); void loadSequenceDataFromManifest(); @@ -604,6 +644,15 @@ const std::string & postfix="", const std::string & statname="", bool deleteoldfile=false); + std::string getLargeContigsInfoFilename(int32 version=-1, + const std::string & prefix="", + const std::string & postfix="", + const std::string & statname=""); + void saveLargeContigsInfo(int32 version=-1, + const std::string & prefix="", + const std::string & postfix="", + const std::string & statname="", + bool deleteoldfile=false); void saveDebrisList(int32 version=-1, const std::string & prefix="", const std::string & postfix="", @@ -873,7 +922,7 @@ uint32 bfc_moveSmallClustersToDebris(); bool bfc_checkIfContigMeetsRequirements(Contig & con); void bfc_markRepReads(Contig & con); - void bfc_trimDenovoIfNecessary(Contig & buildcon, + bool bfc_trimDenovoIfNecessary(Contig & buildcon, bool foundSRMs, const std::string & basename_forextsave, uint32 & trackingunused); @@ -910,6 +959,7 @@ void editSimple454Overcalls(const uint32 pass); + void priv_hackMergeTwoResultMAFs(); //----------------------------------------------------------------- @@ -941,7 +991,9 @@ void saveResults(); void setEverythingWentFine(bool b) { AS_everythingwentfine=b; }; - static bool markRepeats(Contig & con, std::vector & readsmarkedsrm); + static bool markRepeats(Contig & con, + std::vector & readsmarkedsrm, + Contig::repeatmarker_stats_t & repstats); static void refreshContigAndReadpoolValuesAfterLoading( ReadPool & rp, diff -Nru mira-3.9.18/src/mira/assembly_info.C mira-4.0/src/mira/assembly_info.C --- mira-3.9.18/src/mira/assembly_info.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/assembly_info.C 2014-02-02 12:05:18.000000000 +0000 @@ -40,6 +40,7 @@ ASI_conf_large_mincontigsize=0; ASI_conf_large_consize4stats=5000; + ASI_conf_large_totalcov4stats=0; ASI_conf_large_mintotalcov=0; ASI_conf_large_minavgcov_perst.resize(ReadGroupLib::SEQTYPE_END,0); @@ -109,6 +110,8 @@ void AssemblyInfo::zeroInfo() { ASI_contigstats.clear(); + ASI_nameslargecontigs.clear(); + ASI_contignames.clear(); zeroStats(); } @@ -135,8 +138,10 @@ ASI_numSTMU[i]=0; ASI_maxcoverage[i]=0; + ASI_maxcoverage_perst[i].clear(); ASI_maxcoverage_perst[i].resize(ReadGroupLib::SEQTYPE_END,0); ASI_avgcoverage[i]=0; + ASI_avgcoverage_perst[i].clear(); ASI_avgcoverage_perst[i].resize(ReadGroupLib::SEQTYPE_END,0); ASI_largestconsize[i]=0; @@ -153,9 +158,12 @@ } -void AssemblyInfo::storeContigStats(const Contig::constats_t & cs) +void AssemblyInfo::storeContigStats(const Contig::constats_t & cs, const string & cname) { ASI_contigstats.push_back(cs); + if(!cname.empty()){ + ASI_contignames.push_back(cname); + } } void AssemblyInfo::setLargeContigCovPerST(uint32 cov, uint8 seqtype) @@ -185,9 +193,15 @@ vector consizes[2]; vector conquals[2]; - list::const_iterator csI=ASI_contigstats.begin(); - for(; csI != ASI_contigstats.end(); csI++){ - // 0 == all contigs, 1 == when minsize and cov have been reached + ASI_nameslargecontigs.clear(); + auto cnI=ASI_contignames.cend(); + if(ASI_contignames.size()==ASI_contigstats.size()){ + cnI=ASI_contignames.cbegin(); + } + + auto csI=ASI_contigstats.begin(); + for(; csI != ASI_contigstats.end(); ++csI){ + // 0 == all contigs, 1 == large contigs: when minsize and cov have been reached uint32 coninfooffset=0; if(csI->conlength_nogap >= ASI_conf_large_mincontigsize){ bool avgcovfound=false; @@ -206,12 +220,47 @@ if(avgcovfound) coninfooffset=1; } + // for bacteria in growth phase / projects with very uneven coverage across genome, + // the above may fail (contigs with several kb below 50% of avg. coverage) + // try a rescue strategy: + // - non-rep contigs with twice the needed min size and with 2/3 of needed coverage are also taken + // TODO: this could probably be merged with loop above, but kept apart atm in case logic needs to change + if(coninfooffset==0 // not taken yet + && !csI->contains_long_repeats_only // non reps + && csI->conlength_nogap >= 2*ASI_conf_large_mincontigsize){ // 2x min length large contigs + bool avgcovfound=false; + if(ASI_conf_large_mintotalcov>0 + && csI->avg_coverage>= ASI_conf_large_mintotalcov*(2.0d/3)){ + avgcovfound=true; + }else{ + for(uint32 st=0; st0 + && csI->avg_covperst[st] >= ASI_conf_large_minavgcov_perst[st]*(2.0d/3)){ + avgcovfound=true; + break; + } + } + } + if(avgcovfound) coninfooffset=1; + } + + if(coninfooffset && cnI!=ASI_contignames.end()){ + ASI_nameslargecontigs.push_back(*cnI); + csI->islargecontig=1; + }else{ + csI->islargecontig=-1; + } + + if(cnI!=ASI_contignames.end()){ + ++cnI; + } + ASI_numreads_assembled+=csI->total_reads; //ASI_numbases_assembled+=... // store stats for all contigs and also for large contigs // in second loop if we have a large contig - for(uint32 i=0; i<=coninfooffset; i++){ + for(uint32 i=0; i<=coninfooffset; ++i){ consizes[i].push_back(csI->conlength_nogap); conquals[i].push_back(csI->avg_conqual); @@ -235,14 +284,14 @@ ASI_sizeconsensus[i]+=csI->conlength_nogap; ASI_largestconsize[i]=max(ASI_largestconsize[i],csI->conlength_nogap); ASI_maxcoverage[i]=max(ASI_maxcoverage[i],csI->max_coverage); - if(csI->conlength_nogap>=ASI_conf_large_consize4stats) { + if(csI->conlength_nogap>=ASI_conf_large_consize4stats && csI->avg_coverage>= ASI_conf_large_totalcov4stats) { avgtotalcov[i].push_back(csI->avg_coverage); } for(uint32 st=0; stmax_covperst[st] ); - if(csI->conlength_nogap>=ASI_conf_large_consize4stats) { + if(csI->conlength_nogap>=ASI_conf_large_consize4stats && csI->avg_coverage>= ASI_conf_large_totalcov4stats) { avgcovperst[i][st].push_back(csI->avg_covperst[st]); } } @@ -302,6 +351,13 @@ } +void AssemblyInfo::dumpLargeContigNames(ostream & ostr) +{ + for(auto & lce : ASI_nameslargecontigs){ + ostr << lce << '\n'; + } +} + void AssemblyInfo::dumpCurrentInfo(ostream & ostr) { calcCurrentInfo(); @@ -323,6 +379,7 @@ if(i==1){ ostr << "\n\nCoverage assessment (calculated from contigs >= " << ASI_conf_large_consize4stats + << " with coverage >= " << ASI_conf_large_totalcov4stats << "):\n=========================================================\n"; ostr << " Avg. total coverage: " << ASI_avgcoverage[i]; ostr << "\n Avg. coverage per sequencing technology"; @@ -394,3 +451,73 @@ ostr << "\t(you might want to check these)"; } } + + + +/************************************************************************* + * + * return warning level of smile coverage, 0== no warning + * + *************************************************************************/ +uint32 AssemblyInfo::huntForSmileCoverage(string & warntext) +{ + FUNCSTART("uint32 AssemblyInfo::huntForSmileCoverage(string & warntext)"); + uint32 retvalue=0; + + auto covtotake=ASI_avgcoverage[1]; + if(covtotake==0.0) covtotake=ASI_avgcoverage[0]; + + auto thmin=covtotake*.75d; + auto thmax=covtotake*1.25d; + + uint32 num_lnr=0; // lnr= large, non-rep contigs + uint32 num_below=0; + uint32 num_above=0; + + uint64 sumsize_lnr=0; + uint64 sumsize_below=0; + uint64 sumsize_above=0; + + for(const auto & cse : ASI_contigstats){ + BUGIFTHROW(cse.islargecontig==0,"cse.islargecontig==0 ???"); + if(!cse.contains_long_repeats_only && cse.islargecontig>0){ + ++num_lnr; + sumsize_lnr+=cse.conlength_nogap; + if(cse.avg_coveragethmax){ + ++num_above; + sumsize_above+=cse.conlength_nogap; + } + } + } + + std::ostringstream wmsg; + + // test for proportion of contigs below ... + if(sumsize_below >= sumsize_lnr*0.15d){ + ++retvalue; + wmsg << "- " << num_below << " contig(s) with a total of " << sumsize_below << " bases (= " << 100.0d/sumsize_lnr*sumsize_below << "% of bases in all non-repetitive large contigs) have an average coverage less than 75% of the average coverage of all non-repetitive large contigs.\n"; + } + // test for proportion of contigs above ... + if(sumsize_above >= sumsize_lnr*0.15d){ + ++retvalue; + wmsg << "- " << num_above << " contig(s) with a total of " << sumsize_above << " bases (= " << 100.0d/sumsize_lnr*sumsize_above << "% of bases in all non-repetitive contigs) have an average coverage more than 125% of the average coverage of all non-repetitive large contigs.\n"; + } + + // test for proportion of contigs above ... + if(sumsize_above+sumsize_below >= sumsize_lnr*0.3d){ + ++retvalue; + wmsg << "- " << num_above+num_below << " contig(s) with a total of " << sumsize_above+sumsize_below << " bases (= " << 100.0d/sumsize_lnr*(sumsize_above+sumsize_below) << "% of bases in all non-repetitive contigs) have an average coverage 25% above or below the average coverage of all non-repetitive large contigs.\n"; + } + + warntext.clear(); + if(retvalue){ + wmsg << "Summary: found " << retvalue << " indicator(s) for coverage problem(s).\n\nIf the DNA you are assembling is bacterial, this could indicate that you sampled and sequenced DNA from exponential or late exponential phase of a bacterial population. This leads to a coverage bias toward the origin of replication, hence false positive detection of repeats, hence an assembly which is more fragmented than it could be or may have misassemblies in regions located toward the opposite of the origin of replication." + "\nOnly available countermeasure: for your next sequencing project, do not sample in exponential phase but sample in stationary phase (if possible).\n"; + warntext=wmsg.str(); + } + + return retvalue; +} diff -Nru mira-3.9.18/src/mira/assembly_info.H mira-4.0/src/mira/assembly_info.H --- mira-3.9.18/src/mira/assembly_info.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/assembly_info.H 2014-02-02 12:05:18.000000000 +0000 @@ -39,6 +39,8 @@ public: uint32 ASI_conf_large_consize4stats; /* min size to calc statistics for large contigs */ + uint32 ASI_conf_large_totalcov4stats; /* min total cov to calc statistics + for large contigs */ // this is what user considers as large contig uint32 ASI_conf_large_mincontigsize; // minimum size of large contigs @@ -46,7 +48,10 @@ std::vector ASI_conf_large_minavgcov_perst; /* minimum coverage per sequencing type for large contigs */ - std::list ASI_contigstats; + std::deque ASI_contigstats; + std::deque ASI_contignames; + + std::deque ASI_nameslargecontigs; uint32 ASI_numreads_total; uint32 ASI_numbases_total; @@ -106,9 +111,14 @@ inline void setLargeContigSize(uint32 s) { ASI_conf_large_mincontigsize=s;}; inline void setLargeTotalCov(uint32 s) { ASI_conf_large_mintotalcov=s;}; void setLargeContigCovPerST(uint32 cov, uint8 seqtype); + void setLargeContigSizeForStats(uint32 s) { ASI_conf_large_consize4stats=s;}; + void setLargeContigCovForStats(uint32 s) { ASI_conf_large_totalcov4stats=s;}; + + void storeContigStats(const Contig::constats_t & cs, const std::string & cname); + void dumpLargeContigNames(std::ostream & ostr); - void storeContigStats(const Contig::constats_t & cs); + uint32 huntForSmileCoverage(std::string & warntext); }; diff -Nru mira-3.9.18/src/mira/assembly_io.C mira-4.0/src/mira/assembly_io.C --- mira-3.9.18/src/mira/assembly_io.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly_io.C 2014-02-02 12:05:18.000000000 +0000 @@ -217,13 +217,14 @@ &AS_bbcontigs, &readsasbackbonecontigs); - checkForReadNameLength(AS_miraparams[0].getNagAndWarnParams().nw_stop_readnamelength); + checkForReadNameLength(AS_miraparams[0].getNagAndWarnParams().nw_check_mrnlvalue, + AS_miraparams[0].getNagAndWarnParams().nw_check_maxreadnamelength==NWSTOP); bool hassomeerror=false; { string logname(buildFileName(0,"","", AS_miraparams[0].getAssemblyParams().as_tmpf_clippings, - ".txt")); + ".txt","",false)); string logprefix("load ancillary: "); for(const auto & mle : manifestdata2load){ @@ -261,12 +262,10 @@ } } - if(!AS_bbcontigs.empty()){ postLoadBackbone(); } - // special handling for 454 data (20.09.2008) // as there's no separate seqvec clip in the XML files (until now) // and MIRA now uses a "clip back, extend later" strategy for 454 @@ -327,77 +326,19 @@ dumpSomeStatistics(); basicDataChecks(); + basicReadGroupChecks(); clipsAfterLoad(); dumpSomeStatistics(); + vector dummy; if(AS_bbcontigs.empty()) { - vector dummy; sortReadPool(dummy); }else{ addRailsToBackbones(); - -// cout << "BEFORE:\n"; -// AS_readpool.dumpAs(cout,Read::AS_TEXTSHORT,false); - - //cout << "ttt1\n"; - //for(uint32 ri=0; ri=0){ - // cout << ri - // << '\t' << AS_readpool[ri].getName() - // << '\t' << AS_readpool[ri].getTemplatePartnerID() - // << '\t' << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getName() - // << '\t' << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getTemplatePartnerID() - // << endl; - // } - //} - - vector dummy; sortReadPool(dummy); - //cout << "ttt2\n"; - //for(uint32 ri=0; ri=0){ - // cout << ri - // << '\t' << AS_readpool[ri].getName() - // << '\t' << AS_readpool[ri].getTemplatePartnerID() - // << '\t' << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getName() - // << '\t' << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getTemplatePartnerID() - // << endl; - // } - //} - - // adapt template partner IDs - { - vector reversemap(dummy.size(),-1); - for(uint32 ni=0; ni= reversemap.size(),"dummy[ni]>= reversemap.size() ???"); - reversemap[dummy[ni]]=ni; - } - for(uint32 ri=0; ri=0){ - AS_readpool[ri].setTemplatePartnerID(reversemap[AS_readpool[ri].getTemplatePartnerID()]); - } - } - } - - //cout << "ttt3\n"; - //for(uint32 ri=0; ri=0){ - // cout << ri - // << '\t' << AS_readpool[ri].getName() - // << '\t' << AS_readpool[ri].getTemplatePartnerID() - // << '\t' << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getName() - // << '\t' << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getTemplatePartnerID() - // << endl; - // } - //} - //exit(1); - -// cout << "AFTER:\n"; -// AS_readpool.dumpAs(cout,Read::AS_TEXTSHORT,false); - list::iterator bbcI=AS_bbcontigs.begin(); for(; bbcI!=AS_bbcontigs.end(); ++bbcI){ bbcI->exchangeReadIDs(dummy); @@ -421,6 +362,8 @@ { FUNCSTART("void Assembly::sortReadPool()"); + AS_readpool.checkTemplateIDs("Before sorting: template partners have template mismatch!"); + dummy.clear(); cout << "Sorting reads ... "; cout.flush(); AS_readpool.sortPoolToMIRAStandard(dummy); @@ -438,6 +381,28 @@ AS_debrisreason.swap(tmp); } + // The reads have Template Partner IDs internally which are now wrong + // Get them corrected + { + vector backmap(dummy.size(),-1); + for(uint32 ri=0;ri=0){ + CEBUG("\t" << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getName()); + AS_readpool[ri].setTemplatePartnerID(backmap[AS_readpool[ri].getTemplatePartnerID()]); + CEBUG("\t" << AS_readpool[AS_readpool[ri].getTemplatePartnerID()].getName()); + }else{ + CEBUG("\t-"); + } + CEBUG("\n"); + } + + AS_readpool.checkTemplateIDs("After sorting: template partners have template mismatch!"); + } } /************************************************************************* @@ -586,9 +551,9 @@ // add 15% to longest read (so accomodate insertion), then times 2 uint32 newraillength=(longestread*115/100) * 2; - if(newraillength > 18000){ - cout << "Optimal rail would be longer than 18k, adjusting down to 18k.\n"; - newraillength=18000; + if(newraillength > 32760){ + cout << "Optimal rail would be longer than 32k, adjusting down to 32k.\n"; + newraillength=32760; } AS_miraparams[0].getNonConstAssemblyParams().as_backbone_raillength=newraillength; cout << "brl: " @@ -670,7 +635,7 @@ string logname(buildFileName(0,"","", AS_miraparams[0].getAssemblyParams().as_tmpf_clippings + "_t" + boost::lexical_cast(ti), - ".txt")); + ".txt","",false)); cout << logname << endl; dpv[ti]->startLogging(logname,false); } @@ -743,6 +708,7 @@ } } } + if(nummsglr){ MIRANOTIFY(Notify::FATAL,"MIRA found " << nummsglr << " very long reads (too long for normal reads), see log above."); } @@ -759,7 +725,53 @@ * * *************************************************************************/ -void Assembly::checkForReadNameLength(uint32 stoplength) +void Assembly::basicReadGroupChecks() +{ + FUNCSTART("void Assembly::basicReadGroupChecks()"); + + bool haserror_ep=false; // expected pair + bool haserror_nsp=false; // no segment placement + for(uint32 rglid=1; rglid=0) ++numreadswithtpids; + } + } + cout << " found " << numreadswithtpids<0) { + string wstr("In readgroup "); + wstr+=boost::lexical_cast(rgid.getLibId())+" (named: '"+rgid.getGroupName()+"') paired reads were found but no pairing information given in the manifest. MIRA will estimate 'template_size' and 'segment_placement'.\nYou can suppress this warning by using the keyword 'autopairing' in the readgroup definition of the manifest file."; + AS_warnings.setWarning("READGROUP_UNEXPECTED_PAIRS",2,"Unexpected pairs in readgroup",wstr); + } + } + } + + if(haserror_ep){ + MIRANOTIFY(Notify::FATAL,"MIRA found readgroups where pairs are expected but no read has a partner. See log above and then check your input please (either manifest file or data files loaded or segment_naming scheme)."); + } + + FUNCEND(); +} + +/************************************************************************* + * + * + * + * + *************************************************************************/ +void Assembly::checkForReadNameLength(uint32 stoplength, bool stop) { FUNCSTART("void Assembly::checkForReadNameLength(uint32 stoplength)"); @@ -772,10 +784,11 @@ bool maybemore=false; for(uint32 ri=0; ristoplength){ - if(count==0) { - cout << "List of read names which have problems with name length:\n"; - }else if(countperrg[AS_readpool[ri].getReadGroupID().getLibId()]){ + if(countperrg[AS_readpool[ri].getReadGroupID().getLibId()]){ if(--countperrg[AS_readpool[ri].getReadGroupID().getLibId()] == 0) maybemore=true; + if(count==0) { + cout << "List of read names which have problems with name length:\n"; + } cout << "Name too long: " << AS_readpool[ri].getName() << '\n'; } ++count; @@ -785,19 +798,28 @@ cout << count << " reads had a long name length, for brevity's sake not all were listed.\n"; } if(count>0){ - MIRANOTIFY(Notify::FATAL, - "\nSome read names were detected with more than " << stoplength << " characters.\n\n" - "While MIRA and many other programs have no problem with that, some older " - "programs have restrictions concerning the length of the read name.\n" - "\nExample given: the pipeline\n" - " CAF -> caf2gap -> gap2caf\n" - "will stop working at the gap2caf stage if there are read names having > 40 characters " - "where the names differ only at >40 characters.\n" - "\nThis is a warning only, but as a couple of people were bitten by this, the default " - "behaviour of MIRA is to stop when it sees that potential problem.\n" - "\nYou might want to rename your reads to have <= " << stoplength << " characters.\n" - "\nOn the other hand, you also can ignore this potential problem and force MIRA to " - "continue by using the parameter: '-MI:somrnl=0'\n"); + string emsg=boost::lexical_cast(count)+ + " reads were detected with names longer than " + +boost::lexical_cast(stoplength)+ + " characters.\n\n" + "While MIRA and many other programs have no problem with that, some older " + "programs have restrictions concerning the length of the read name.\n" + "\nExample given: the pipeline\n" + " CAF -> caf2gap -> gap2caf\n" + "will stop working at the gap2caf stage if there are read names having > 40 characters " + "where the names differ only at >40 characters.\n" + "\nThis is a warning only, but as a couple of people were bitten by this, the default " + "behaviour of MIRA is to stop when it sees that potential problem.\n" + "\nYou might want to rename your reads to have <= " + +boost::lexical_cast(stoplength) + + " characters.\n" + "\nOn the other hand, you also can ignore this potential problem and force MIRA to " + "continue by using the parameter: '-NW:cmrnl=warn' or '-NW:cmrnl=no'\n"; + if(stop){ + MIRANOTIFY(Notify::FATAL,emsg); + }else{ + cout << "WARNING!\n" << endl; + } } FUNCEND(); return; @@ -982,8 +1004,8 @@ cout << endl; if(!can_edit) { - cout << "No SCF data present in any read, automatic contig editing for Sanger data is now switched off.\n"; - const_cast(AS_miraparams[0].getEditParams()).ed_automatic_contic_editing=false; + cout << "No SCF data present in any read, EdIt automatic contig editing for Sanger data is now switched off.\n"; + const_cast(AS_miraparams[0].getEditParams()).ed_edit_automatic_contic_editing=false; } fout.close(); } @@ -1494,6 +1516,29 @@ assout::saveAssemblyInfo(AS_assemblyinfo,filename, deleteoldfile); } + +/************************************************************************* + * + * + * + * + *************************************************************************/ + +string Assembly::getLargeContigsInfoFilename(int32 version, const string & prefix, const string & postfix, const string & basename) +{ + return buildDefaultInfoFileName( + version, prefix, postfix, basename, + AS_miraparams[0].getAssemblyParams().as_outfile_stats_largecontigs, + ".txt"); +} + +void Assembly::saveLargeContigsInfo(int32 version, const string & prefix, const string & postfix, const string & basename, bool deleteoldfile) +{ + string filename(getLargeContigsInfoFilename(version, prefix, postfix, basename)); + assout::saveLargeContigsInfo(AS_assemblyinfo,filename, deleteoldfile); +} + + /************************************************************************* * * diff -Nru mira-3.9.18/src/mira/assembly_misc.C mira-4.0/src/mira/assembly_misc.C --- mira-3.9.18/src/mira/assembly_misc.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly_misc.C 2014-02-02 12:05:18.000000000 +0000 @@ -31,11 +31,13 @@ #include "boost/unordered_map.hpp" #include #include +#include +#include -#include "assembly.H" -#include "dataprocessing.H" -#include "hashstats.H" -#include + +#include "mira/assembly.H" +#include "mira/dataprocessing.H" +#include "mira/hashstats.H" using namespace std; @@ -122,17 +124,35 @@ true, 1, basesperhash, + hs_params.hs_million_hashes_per_buffer, + hs_params.hs_rare_kmer_early_kill, filenameforhs ); } s3.showHashStatisticsInfo(); + + // very rough estimator of coverage for contigs + if(basesperhash>=15){ + AS_hashstat_avghashfreq=s3.getAvgHashFreqRaw(); + cout << "Estimator of average coverage: " << AS_hashstat_avghashfreq << endl; + AS_assemblyinfo.setLargeContigCovForStats(AS_hashstat_avghashfreq/3); + } + cout << "Assigning statistics values:\n"; if(AS_miraparams[0].getAssemblyParams().as_dateoutput) dateStamp(cout); - s3.assignReadBaseStatistics_MultiThread(skim_params.sk_numthreads, nastyrepeatratio>0,minkmer); + { + uint32 mincountkmerforks=2; + if(AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms){ + mincountkmerforks=AS_hashstat_avghashfreq/6; // /6 to conservative?? + if(mincountkmerforks<2) mincountkmerforks=2; + } + s3.assignReadBaseStatistics_MultiThread(skim_params.sk_numthreads, nastyrepeatratio>0,minkmer,mincountkmerforks); + } if(AS_miraparams[0].getAssemblyParams().as_dateoutput) dateStamp(cout); if(AS_miraparams[0].getAssemblyParams().as_buntify_reads){ AS_dataprocessing.buntifyReadsByHashFreq_Pool(AS_readpool,basesperhash); + AS_dataprocessing.addKMerForkTags_Pool(AS_readpool,basesperhash); } } @@ -229,17 +249,43 @@ cout << howmanys << " sequences with " << howmanyt << " masked stretches." << endl; } + // quick check for estimated coverage in genome data + if(!AS_donequickdenovocoveragecheck){ + // atm only for de-novo, think about doing it for mapping + // (though there may be good reasons for high coverage in mappings) + if(basesperhash>=17 + && warnAtHighCoverages(AS_hashstat_avghashfreq) + && AS_miraparams[0].getNagAndWarnParams().nw_check_coverage==NWSTOP){ + MIRANOTIFY(Notify::FATAL,"High average coverage detected, see output log above respectively the 'WARNING' files in the info directory for more information. In case you wish to force MIRA to disregard this safety check, consider using '-NW:cac=warn' or '-NW:cac=no'"); + } + AS_donequickdenovocoveragecheck=true; + } + if(dorarekmermask) { string tmpfname; tmpfname=buildFileName(version,"","", as_fixparams.as_tmpf_clippings, - ".txt"); + ".txt","",false); AS_dataprocessing.startLogging(tmpfname,true); AS_dataprocessing.performRareKMERMasking_Pool(AS_readpool,"pre-assembly"); AS_dataprocessing.stopLogging(); } + if(0){ + AS_dataprocessing.performKMERRepeatTagging_Pool(AS_readpool,basesperhash); + } + + if(0){ + Read::setCoutType(Read::AS_TEXT); + cout << "AFTER2\n"; + for(uint32 actid=0; actid(AS_miraparams[0].getAssemblyParams()).as_clip_pec_mkfr=2; } } + + // quick check for estimated coverage in genome data + if(!AS_donequickdenovocoveragecheck){ + // atm only for de-novo, think about doing it for mapping + // (though there may be good reasons for high coverage in mappings) + if(basesperhash>=17 + && warnAtHighCoverages(avgcov) + && AS_miraparams[0].getNagAndWarnParams().nw_check_coverage==NWSTOP){ + MIRANOTIFY(Notify::FATAL,"High average coverage detected, see output log above respectively the 'WARNING' files in the info directory for more information. In case you wish to force MIRA to disregard this safety check, consider using '-NW:cac=warn' or '-NW:cac=no'"); + } + // Nope, do not set that here. The hash statistics of the main loop have the final word! + // AS_donequickdenovocoveragecheck=true; + } + } ofstream logfout; @@ -391,7 +456,7 @@ int32 lpos=r.getLeftClipoff(); vector::const_iterator bhsI=r.getBPosHashStats().begin(); advance(bhsI,lpos); - for(; lpos(r.getLenSeq()); ++lpos, ++bhsI) { + for(int32 lend=static_cast(r.getLenClippedSeq()); lpos0 && (bhsI->fwd.getFrequency() > AS_miraparams[r.getSequencingType()].getAssemblyParams().as_clip_pec_ffreq || bhsI->rev.getFrequency() > AS_miraparams[r.getSequencingType()].getAssemblyParams().as_clip_pec_ffreq)) { @@ -443,7 +508,7 @@ vector::const_iterator bhsI=r.getBPosHashStats().begin(); advance(bhsI,rpos); - for(; rpos >0; --rpos){ + for(int32 rend=r.getLeftClipoff(); rpos >rend; --rpos){ --bhsI; if(AS_miraparams[r.getSequencingType()].getAssemblyParams().as_clip_pec_bfreq && (bhsI->fwd.getFrequency() > AS_miraparams[r.getSequencingType()].getAssemblyParams().as_clip_pec_bfreq @@ -1469,398 +1534,373 @@ - - - -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////// Obsolete /////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////// - - /************************************************************************* * - * expects reads to have baseflags set (by performHashAnalysis()) - * - * doesn't seem to be a good idea + * sorter to sort Contig::templateguessinfo_t from low to high + * first on readgroup id + * then segment_placement + * then on template size * *************************************************************************/ -//#define CEBUG(bla) {cout << bla; cout.flush();} - -/* - -void Assembly::performHashEditing() +inline bool Assembly__sortTemplateGuessInfo_(const Contig::templateguessinfo_t & a, + const Contig::templateguessinfo_t & b); +inline bool Assembly__sortTemplateGuessInfo_(const Contig::templateguessinfo_t & a, + const Contig::templateguessinfo_t & b) { - FUNCSTART("void Assembly::performHashEditing()"); - - cout << "Hash analysis for editing:"; - - skim_parameters const & skim_params= AS_miraparams[0].getSkimParams(); - assembly_parameters const & as_fixparams= AS_miraparams[0].getAssemblyParams(); - - uint32 basesperhash=as_fixparams.as_clip_pec_basesperhash; - if(sizeof(uint64) < 8 && basesperhash > 15) basesperhash=15; - { - - Skim s3; - - s3.setHashFrequencyRatios(skim_params.hs_freqest_minnormal, - skim_params.hs_freqest_maxnormal, - skim_params.hs_freqest_repeat, - skim_params.hs_freqest_heavyrepeat, - skim_params.hs_freqest_crazyrepeat, - skim_params.hs_nastyrepeatratio); - - s3.analyseHashes(AS_miraparams[0].getDirectoryParams().dir_tmp, - AS_readpool, - true, - false, - false, - true, - 1, - basesperhash, - 1, - false); - } - - if(as_fixparams.as_dateoutput) dateStamp(cout); - cout << '\n'; - - cout << "Looking for proposed edits ... "; cout.flush(); - - vector maxhf; - maxhf.reserve(10000); - - uint64 numbaseschanged=0; - uint64 numreadschanged=0; - - for(uint32 actid=0; actid::const_iterator bhsI=r.getBPosHashStats().begin(); - vector::iterator mhfI=maxhf.begin(); - advance(bhsI,lpos); - advance(mhfI,lpos); - - uint32 counter=basesperhash; - for(; lpos(r.getLenSeq()); lpos++, bhsI++, mhfI++) { - *mhfI=(bhsI->fwd.getFrequency())>1; - if(*mhfI) counter=basesperhash; - if(counter) { - *mhfI=4; - --counter; - } - } - - lpos=r.getLeftClipoff(); - mhfI=maxhf.begin(); - advance(mhfI,lpos); - - //for(; lpos(r.getLenSeq()); lpos++) { - // cout << (uint16) maxhf[lpos] << ' '; - //} - //cout << endl; - //lpos=r.getLeftClipoff(); - //for(; lpos(r.getLenSeq()); lpos++) { - // cout << r.getBaseInSequence(lpos) << ' '; - //} - //cout << endl; - //Read::setCoutType(Read::AS_TEXT); - //cout << r; - - lpos=r.getLeftClipoff(); - for(; lpos(r.getLenSeq()); lpos++, mhfI++) { - if(*mhfI) break; - } - - int32 editstart=-1; - for(; lpos(r.getLenSeq()); lpos++, mhfI++) { - if(editstart<0){ - if(*mhfI==0) { - editstart=lpos; - } - }else{ - if(*mhfI) { - for(int32 ii=editstart; ii(atgt.tg.splace_seen) + << "\tm: " << atgt.mean + << "\td: " << atgt.stdev + << "\ts: " << atgt.skewness + << "\t-: " << atgt.deduced_min + << "\t+: " << atgt.deduced_max; + return ostr; + } +}; - CEBUG("Building hash table ... "); cout.flush(); - typedef boost::unordered_map strmap; - strmap rnmap; - strmap::iterator rnI; +//#define CEBUG(bla) {cout << bla; cout.flush();} +void Assembly::analyseTemplateGuesses() +{ +// cout << "tgs: " << AS_templateguesses.size() << endl; + if(AS_templateguesses.empty()) return; + sort(AS_templateguesses.begin(),AS_templateguesses.end(),Assembly__sortTemplateGuessInfo_); - for(uint32 i=0; i(tge.splace_seen) + << "\tts: " << tge.tsize_seen + << '\n'; ++ind); + } + } + + + vector atgpred; + + // collapse AS_templateguesses into predictions grouped by rgid and segment_placement + auto tgI=AS_templateguesses.cbegin(); + for(; tgI!=AS_templateguesses.cend() && tgI->rgid.isDefaultNonValidReadGroupID(); ++tgI) {} + if(tgI!=AS_templateguesses.cend()){ + while(tgI!=AS_templateguesses.cend()){ + auto tgS=tgI; + // search end iterator for that grouping + for(; tgI!=AS_templateguesses.cend() && tgI->rgid==tgS->rgid && tgI->splace_seen == tgS->splace_seen; ++tgI) {}; + auto tgE=tgI; + auto numvals=tgI-tgS; + if(numvals>=100){ + atgpred.resize(atgpred.size()+1); + atgpred.back().count=numvals; + atgpred.back().tg=*tgS; + + uint64 sum=0; + for(tgI=tgS; tgI!=tgE; ++tgI) sum+=tgI->tsize_seen; + double mean=static_cast(sum)/static_cast(numvals); + double sp2sum=0.0d; + for(tgI=tgS; tgI!=tgE; ++tgI) { + auto m1=static_cast(tgI->tsize_seen - mean); + sp2sum+=m1*m1; // for stdev + } + double stdev=sqrt(sp2sum/(numvals-1)); + // skewness, see + // http://www.itl.nist.gov/div898/handbook/eda/section3/eda35b.htm + // http://www.tc3.edu/instruct/sbrown/stat/shape.htm + // + // skewness >0 left skew + // skewness <0 right skew + // abs skewness >= 1 very skewed + // skewness >= .5 mildly skewed + // skewness >= .25 slightly skewed (own definition as we're working with higher number of measurements + // + // but for large data sets with tens or hundreds of thousands of measurement, even a few outliers (<1%) on one side + // (like happens in misassembled contigs) can induce a skew >1 + // Solution: recalc skew on a subset of values which takes only values at 3*stdev + // also recalc new stdev on this subset + + sp2sum=0.0d; + double sp3sum=0.0d; + double sxstdev=stdev*3; + uint64 numvals2=0; + for(tgI=tgS; tgI!=tgE; ++tgI) { + auto m1=static_cast(tgI->tsize_seen - mean); + if(abs(m1)<=sxstdev){ + sp2sum+=m1*m1; // for stdev + sp3sum+=m1*m1*m1; // for skewness + ++numvals2; + } + } + stdev=sqrt(sp2sum/(numvals2-1)); + double skewness=0; + if(stdev>0) skewness=sp3sum/((numvals2-1)*stdev*stdev*stdev); + + // homebrew + double lefttailfactor=2.0d; + double righttailfactor=2.0d; + if(skewness<=-1.0d){ + lefttailfactor=2.4d; + righttailfactor=1.6d; + }else if(skewness<=-0.5d){ + lefttailfactor=2.2d; + righttailfactor=1.8d; + }else if(skewness<=-0.25d){ + lefttailfactor=2.1d; + righttailfactor=1.9d; + }else if(skewness>=1.0d){ + lefttailfactor=1.6d; + righttailfactor=2.4d; + }else if(skewness>=0.5d){ + lefttailfactor=1.8d; + righttailfactor=2.2d; + }else if(skewness>=0.25d){ + lefttailfactor=1.9dd; + righttailfactor=2.1d; + } + + atgpred.back().count=numvals2; + atgpred.back().mean=mean; + atgpred.back().stdev=stdev; + atgpred.back().skewness=skewness; + if(stdev>0){ + atgpred.back().deduced_min=(mean-lefttailfactor*stdev > 0) ? (mean-lefttailfactor*stdev) : 0; + atgpred.back().deduced_max=mean+righttailfactor*stdev; + }else{ + atgpred.back().deduced_min=mean-mean/10; + atgpred.back().deduced_max=mean+mean/10; + } + } } } - ifstream tifin; - tifin.open(tifile.c_str(), ios::in|ios::ate); - if(!tifin){ - MIRANOTIFY(Notify::FATAL, "File not found: " << tifile); + cout << "ATG PREDICTIONS\n"; + cout << std::fixed << std::setprecision(10); + for(auto & ae : atgpred){ + cout << ae << endl; } - streampos tifsize=tifin.tellg(); - tifin.seekg(0, ios::beg); - - ProgressIndicator P (0, tifsize,1000); - string token; + // per readgroup, search the prediction with the highest count: that's going to be our final prediction + auto atgpI=atgpred.cbegin(); + while(atgpI!=atgpred.cend()){ + auto best=*atgpI; + for(; atgpI!=atgpred.cend() && atgpI->tg.rgid==best.tg.rgid; ++atgpI){ + if(atgpI->count >best.count) best=*atgpI; + } + cout << "Final prediction: " << best << endl; + if(best.tg.rgid.wantSegmentPlacementEstimate()){ + best.tg.rgid.setSegmentPlacementCode(best.tg.splace_seen); + best.tg.rgid.setWantSegmentPlacementEstimate(false); + cout << "Set segment placement code.\n"; + AS_guessedtemplatevalues=true; + } else if(best.tg.rgid.wantTemplateInfoEstimate()){ + best.tg.rgid.setInsizeFrom(best.deduced_min); + best.tg.rgid.setInsizeTo(best.deduced_max); + best.tg.rgid.setWantTemplateSizeEstimate(false); + cout << "Set template size.\n"; + AS_guessedtemplatevalues=true; + } + } - while(!tifin.eof()){ - tifin >> token; - if(tifin.eof()) break; - if(P.delaytrigger()) P.progress(tifin.tellg()); + AS_templateguesses.empty(); +} +//#define CEBUG(bla) - //tifin >> sd_score >> sd_readname; - if(tifin.eof()) break; +bool Assembly::warnAtSmileCoverage() +{ + string wstr; + if(AS_assemblyinfo.huntForSmileCoverage(wstr)){ + AS_warnings.setWarning("CONCOV_SUSPICIOUS_DISTRIBUTION",0,"Suspicious distribution of contig coverages",wstr); + } + return !wstr.empty(); +} - if(token[0]=='+'){ - // new lib +bool Assembly::warnAtHighCoverages(uint32 measuredcov) +{ + bool retval=false; + if(AS_miraparams[0].getNagAndWarnParams().nw_check_coverage!=NWNONE + && AS_miraparams[0].getPathfinderParams().paf_use_genomic_algorithms + && measuredcov>AS_miraparams[0].getNagAndWarnParams().nw_check_covvalue){ + string wstr("You are running a genome "); + if(AS_miraparams[0].getAssemblyParams().as_assemblyjob_mapping){ + wstr+="mapping"; }else{ - // existing name - bool foundname=false; - rnI=rnmap.find(token); - if(rnI==rnmap.end()) { - CEBUG("Not found: " << token << endl); - continue; + wstr+="de-novo"; + } + wstr+=" assembly and the current best estimation for average coverage is " + +boost::lexical_cast(measuredcov) + +"x (note that this number can be +/- 20% off the real value). This is "; + if(measuredcov>=80) wstr+="a pretty high coverage,"; + wstr+="higher than the current warning threshold of " + +boost::lexical_cast(AS_miraparams[0].getNagAndWarnParams().nw_check_covvalue) + +"x." + "\n\nYou should try to get the average coverage not higher than, say, 60x to 100x for Illumina data or 40x to 60x for 454 and Ion Torrent data. Hybrid assemblies should target a total coverage of 80x to 100x as upper bound. For that, please downsample your input data." + "\n\nThis warning has two major reasons:" + "\n- for MIRA and other overlap based assemblers, the runtime and memory requirements for ultra-high coverage projects grow exponentially, so reducing the data helps you there" + "\n- for all assemblers, the contiguity of an assembly can also suffer if the coverage is too high, i.e. you get more contigs than you would otherwise. Causes for this effect can be non-random sequencing errors or low frequency sub-populations with SNPs which become strong enough to be mistaken for possible repeats."; + if(measuredcov>=150){ + if(measuredcov>=300){ + wstr+="\nA coverage of >300x ... no really, are you kidding me? *sigh*"; } - uint32 foundreadid=rnI->second; - if(!AS_readpool[foundreadid].hasValidData()) continue; - - Read actread(AS_readpool[foundreadid]); - assembly_parameters const & as_params= AS_miraparams[actread.getSequencingType()].getAssemblyParams(); + wstr+="\nWith the coverage you currently have, you *really* should downsample your data. You. Have. Been. Warned!"; } + AS_warnings.setWarning("ASCOV_VERY_HIGH",1,"Very high average coverage",wstr); + retval=true; } - P.finishAtOnce(); - - tifin.close(); - - if(!logname.empty()){ - logfout.close(); - } - - cout << "\nDone." << endl; - - - FUNCEND(); - return; + return retval; } -//#define CEBUG(bla) -*/ - /************************************************************************* * - * splits a sequence into overlapping subsequences + * mean function, with side-effect and definetely to be used only where + * it is currently called from + * + * Used to guess which inserts in a contigs are wrong after a first + * mapping round and makes sure they get removed * - * AND + * E.g.: + * bb cagtcatga***ctgcatgca + * r1 cag*catga***ctgcatgca + * r2 cag*catga***ctgcatgca + * r3 cag*catga***ctgcatgca + * ... + * rX cag*catgaTTTctgcatgca * - * saves pre-computed adsfacts file into log directory for later - * later reading - * number of generated adsfacts is put in AS_numADSFacts_fromshreds + * with rX being some weird read (maybe low frequency variant, or sequencing + * error, or ...) * + * Normally, the two stage mapping would calculate an intermediate new backbone + * to be * - * This saves enormous amount of time, but is not the "real" thing: - * matches between shreds that are non-overlapping from the start on are - * not made + * bbi cag*catga***ctgcatgca + * + * but that is obviously not really the best guess and currently leads to + * misalignments with reads ending in this area. E.g.: + * + * bbi cag*catga***ctgcatgca + * rY actgcatgca + * + * instead of + * + * bbi cag*catga***ctgcatgca + * rY a***ctgcatgca + * + * This function will fake the contig CON_counts structure to enable + * Contig::deleteStarOnlyColumns() to remove the probably wrong inserts, so + * that the new intermediate contig looks like this: + * + * bbi cag*catgactgcatgca + * + * Side-effects: + * - CON_counts of contig is probably not reflecting truth anymore + * - reads of the contig also get edited, but this routine + * is currently used just before all the reads are discarded anyway. * *************************************************************************/ -/* -void Assembly::shredReadsIntoReadPool(ReadPool & sourcepool, uint32 shredlen, uint32 shredoffsetinc, uint8 shredreadtype, const string & shredstrain) +void Assembly::priv_removePotentiallyWrongBaseInserts(Contig & con) { - FUNCSTART("void Assembly::shredReadsIntoReadPool(ReadPool & sourcepool, uint32 shredlen, uint32 shredoffsetinc, uint8 shredreadtype, const string & shredstrain)"); + FUNCSTART("void Assembly::priv_removePotentiallyWrongBaseInserts(Contig & con)"); - AS_numADSFacts_fromshreds=0; - string adsfshredsfilename=AS_miraparams[0].getDirectoryParams().dir_tmp+"/shred.adsfacts"; - ofstream adsfout; - adsfout.open((adsfshredsfilename+".adsfacts").c_str(), ios::out|ios::trunc); - - deque overlapfifo; - - string shredseq; - shredseq.reserve(shredlen); - vector shredqual; - shredqual.reserve(shredlen+10); - string shredname; - - for(uint32 actsourceid=0; actsourceid < sourcepool.size(); actsourceid++){ - Read & sourceread = sourcepool.getRead(actsourceid); - if(!sourceread.hasValidData()) continue; - if(sourceread.getLenSeq() < shredlen) continue; - - uint32 actoffset=0; - uint32 shredcounter=0; - for(bool doloop=true; doloop; actoffset+=shredoffsetinc){ - uint32 fromi=actoffset; - uint32 toi=actoffset+shredlen; - if(toi>=sourceread.getLenSeq()) { - toi=sourceread.getLenSeq(); - doloop=false; - } - shredseq.clear(); - shredqual.clear(); - for(; fromi0){ - vector::iterator qI=shredqual.begin(); - base_quality_t maxqual=AS_miraparams[0].getAssemblyParams().as_cap454consensusqual; - for(;qI != shredqual.end(); qI++){ - if(*qI>maxqual) *qI=maxqual; - } + // try to look for strains which are only not in backbone + vector straincons(ReadGroupLib::getNumOfStrains()); + vector dummyqual; + + for(uint32 sid=0; sid::iterator OFI=overlapfifo.begin(); - OFI++; - int32 overlaplen=shredlen-shredoffsetinc; - int32 totalshredoffset=shredoffsetinc; - uint32 numelements=1; - while(OFI != overlapfifo.end()) { - if(overlaplen<=0) break; - - AlignedDualSeqFacts tmpadsf; - tmpadsf.publicinit( - *OFI, - newreadid, - static_cast(totalshredoffset), - static_cast(totalshredoffset - -(AS_readpool.getRead(*OFI).getLenSeq() - -AS_readpool.getRead(newreadid).getLenSeq())), - 0, - static_cast((AS_readpool.getRead(*OFI).getLenSeq()+ - AS_readpool.getRead(newreadid).getLenSeq()-overlaplen)), - 1, - 1, - 100); - - // output of the ADSfacts to file - // TODO: real ouput - // first weight and direction - // TODO: reduce weight to favorise real reads in assembly??? - adsfout << overlaplen*10000 << "\t1\t"; - tmpadsf.serialiseOut(adsfout); - adsfout << '\n'; - - AS_numADSFacts_fromshreds++; - - OFI++; - overlaplen-=shredoffsetinc; - totalshredoffset+=shredoffsetinc; - numelements++; - } - if(overlapfifo.size()>numelements) overlapfifo.resize(numelements); + { + bool stillnocons=true; + for(auto & s : straincons){ + if(!s.empty()) { + stillnocons=false; + break; } - shredcounter++; } - cout << "Shredded " << sourceread.getName() << " into " << shredcounter << " pieces.\n"; + BUGIFTHROW(stillnocons,"Ummmm ... no cons built???"); } - adsfout.close(); + // fill up empty consensi + for(auto & s : straincons){ + if(s.empty()) s.resize(con.getContigLength(),'*'); + } - FUNCEND(); + Contig::cccontainer_t & cc = const_cast(con.getConsensusCounts()); + + auto ccI=cc.begin(); + for(uint32 actcontigpos=0; actcontigpostotal_cov=65535; + ccI->star=65535; + } + } + con.deleteStarOnlyColumns(0,con.getContigLength(),false,65535); } -*/ diff -Nru mira-3.9.18/src/mira/assembly_output.C mira-4.0/src/mira/assembly_output.C --- mira-3.9.18/src/mira/assembly_output.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly_output.C 2014-02-02 12:05:18.000000000 +0000 @@ -32,23 +32,12 @@ #include "assembly_output.H" -#include - -#include -#include -#include -// for getting username etc -#include - -// getting time in GBF output -#include #include -#include "util/fileanddisk.H" - #include "io/annotationmappings.H" +#include "util/fileanddisk.H" #include "mira/gff_parse.H" @@ -201,7 +190,26 @@ openFileForAppend(filename,infoout, true); dateStamp(infoout); infoout << '\n' << asi; - infoout.close(); + + FUNCEND(); +} + +/************************************************************************* + * + * + * + * + *************************************************************************/ + +void assout::saveLargeContigsInfo(AssemblyInfo & asi, const string & filename, bool deleteoldfile) +{ + FUNCSTART("void saveLargeContigsInfo(AssemblyInfo & asi, const string & filename, bool deleteoldfile)"); + + (void) deleteoldfile; + + ofstream infoout; + openFileForAppend(filename,infoout, true); + asi.dumpLargeContigNames(infoout); FUNCEND(); } @@ -1274,7 +1282,11 @@ // (makes the search loop afterwards easier) list allGBfeatures; - cle.getGBFSummary(allGBfeatures,allowedfeatures,forbiddenfeatures,true, true); + // BaCh 11.09.2013: don't take consensus features into analysis + // MIRA tags showing up (don't want to filter them atm) and gene /CDS features + // in consensus are not set by MIRA anyway. Therefore: save work, implement + // only if need arises (i.e. probably never) + cle.getGBFSummary(allGBfeatures,allowedfeatures,forbiddenfeatures,true, false); // continue with next contig if there are no features in here if(allGBfeatures.empty()) continue; @@ -1385,7 +1397,7 @@ const char * dnap=strain_consseq[strainid].c_str(); dnap+=fI->cfrom; for(uint32 ii=fI->cfrom; ii<= fI->cto; dnap++, ii++){ - if(*dnap=='X') basesnocov++; + if(toupper(*dnap)=='X') basesnocov++; } CEBUGNPQ("basesnocov: " << basesnocov << '\n'); @@ -2254,15 +2266,19 @@ { FUNCSTART("void assout::saveStrainsAsFASTAQ(Contig & outcon, const ReadPool & rp, const string & paddedfilename, bool asfastq, uint32 mincoverage, base_quality_t minqual, bool deleteoldfile, bool fillholesinstrain)"); + // make sure to dump "AllStrains" only if we have more than one strain + int32 startid=-1; + if(ReadGroupLib::getNumReadGroups()==1) startid=0; + for(int32 strainid=-1; strainid(ReadGroupLib::getNumOfStrains()); ++strainid){ //if(outcon.getNumReadsPerStrain(strainid)==0) continue; string strainfilename; if(strainid>=0){ strainfilename=ReadGroupLib::getStrainOfStrainID(strainid); - cout << "### doing " << strainfilename << " for strainid " << strainid << endl; }else{ strainfilename="AllStrains"; } + cout << "### calc " << strainfilename << " with strainid " << strainid << endl; try{ if(asfastq){ ofstream fastqpaddedout; @@ -3053,7 +3069,7 @@ // used for linking // // This might also be the reason for a reported crash of - // convert_project on a 2.6 kernel (with another glibc than my + // miraconvert on a 2.6 kernel (with another glibc than my // home machine // // Resolve: get back to getlogin() even if manual says it can be diff -Nru mira-3.9.18/src/mira/assembly_output.H mira-4.0/src/mira/assembly_output.H --- mira-3.9.18/src/mira/assembly_output.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/assembly_output.H 2014-02-02 12:05:18.000000000 +0000 @@ -159,6 +159,9 @@ void saveAssemblyInfo(AssemblyInfo & asi, const std::string & filename, bool deleteoldfile); + void saveLargeContigsInfo(AssemblyInfo & asi, + const std::string & filename, + bool deleteoldfile); void saveReadTagList(std::list & clist, const std::string & filename, bool deleteoldfile); diff -Nru mira-3.9.18/src/mira/assembly_reduceskimhits.C mira-4.0/src/mira/assembly_reduceskimhits.C --- mira-3.9.18/src/mira/assembly_reduceskimhits.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly_reduceskimhits.C 2014-02-02 12:05:18.000000000 +0000 @@ -26,24 +26,13 @@ #include "assembly.H" -// for time measurements -#include -#include -#include -#include - // BOOST #include -// for checking time restrictions -#include -#include "mira/timerestrict.H" - #include "errorhandling/errorhandling.H" #include "util/progressindic.H" #include "util/machineinfo.H" #include "util/fileanddisk.H" -#include "mira/structs.H" #if 0 @@ -546,7 +535,8 @@ } cout << "Step solexa by critlevel\n"; - rsh4_takeSolexaByCritLevel(3,nbestl,nbestr,fskimname, blockpos, blocklen); + rsh4_takeSolexaByCritLevel(0,3,nbestl,nbestr,fskimname, blockpos, blocklen); + rsh4_takeSolexaByCritLevel(1,3,nbestl,nbestr,fskimname, blockpos, blocklen); cout << "Step template overlaps\n"; rsh4_takeTemplateOverlaps(fskimname, blockpos, blocklen); @@ -2776,7 +2766,7 @@ #define CEBUG(bla) {cout << bla; cout.flush();} -void Assembly::rsh4_takeSolexaByCritLevel(uint32 nbest, vector & nbestl, vector & nbestr, const string & dnsfile, const vector & blockpos, const vector & blocklen) +void Assembly::rsh4_takeSolexaByCritLevel(uint32 ocvi, uint32 nbest, vector & nbestl, vector & nbestr, const string & dnsfile, const vector & blockpos, const vector & blocklen) { CEBUG("rsh4_takeSolexaByCritLevel." << endl); @@ -2808,11 +2798,11 @@ && (nbestl[seI->rid1]>0 || nbestr[seI->rid1]>0)){ if((AS_readpool.getRead(seI->rid1).isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA) - && (AS_overlapcritlevell[seI->rid1] != 0 - || AS_overlapcritlevelr[seI->rid1] != 0)) + && (AS_overlapcritlevelvl[ocvi][seI->rid1] != 0 + || AS_overlapcritlevelvr[ocvi][seI->rid1] != 0)) || (AS_readpool.getRead(seI->linked_with).isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA) - && (AS_overlapcritlevell[seI->linked_with] != 0 - || AS_overlapcritlevell[seI->linked_with] != 0))){ + && (AS_overlapcritlevelvl[ocvi][seI->linked_with] != 0 + || AS_overlapcritlevelvr[ocvi][seI->linked_with] != 0))){ adse.calcNewEstimateFromSkim( seI->eoffset, @@ -2830,13 +2820,13 @@ bool takeit=false; if(nbestl[seI->rid1]>0 && ocll <= 29 - && AS_overlapcritlevell[seI->rid1] != 0 + && AS_overlapcritlevelvl[ocvi][seI->rid1] != 0 && adse.getEstimatedLeftExpand(seI->rid1)>0){ --nbestl[seI->rid1]; takeit=true; }else if(nbestr[seI->rid1]>0 && oclr <= 29 - && AS_overlapcritlevelr[seI->rid1] != 0 + && AS_overlapcritlevelvr[ocvi][seI->rid1] != 0 && adse.getEstimatedRightExpand(seI->rid1)>0){ --nbestr[seI->rid1];; takeit=true; diff -Nru mira-3.9.18/src/mira/assembly_swalign.C mira-4.0/src/mira/assembly_swalign.C --- mira-3.9.18/src/mira/assembly_swalign.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/assembly_swalign.C 2014-02-02 12:05:18.000000000 +0000 @@ -25,26 +25,17 @@ */ -#include "assembly.H" - -// for time measurements -#include -#include -#include -#include +#include "mira/assembly.H" // BOOST #include #include "errorhandling/errorhandling.H" -#include "mira/dynamic.H" -#include "mira/ads.H" #include "util/progressindic.H" #include "util/dptools.H" #include "util/fileanddisk.H" #include "caf/caf.H" -#include "mira/structs.H" -#include "mira/contig.H" +#include "mira/ads.H" #if 0 @@ -229,6 +220,9 @@ bool swapped=false; if(posmatch.eoffset<0){ + // swap if this + // 1 -------- + // 2 ----------- swap(posmatch.rid1, posmatch.rid2); posmatch.eoffset=-posmatch.eoffset; swapped=true; @@ -238,6 +232,7 @@ int32 totallen; int32 rdls=AS_readpool.getRead(posmatch.rid1).getLenClippedSeq()-posmatch.eoffset-AS_readpool.getRead(posmatch.rid2).getLenClippedSeq(); + // only two cases left due to swapping of ids above if(rdls>=0) { // 1 ----------------- // 2 ---------- @@ -289,11 +284,21 @@ << '\t' << totallen << '\t' << static_cast(posmatch.percent_in_overlap); - AS_CUMADSLofstream << "\t0" - << '\t' << overlaplen - << '\t' << overlaplen - << '\t' << overlaplen - << '\t' << overlaplen; + if(rdls>=0) { + // 1 ----------------- + // 2 ---------- + AS_CUMADSLofstream << "\t0\t0\t0\t7\t7"; + }else{ + // 1 ----------------- + // 2 -------------- + if(direction>0){ + AS_CUMADSLofstream << "\t0\t0\t7\t7\t0"; + }else if(swapped){ + AS_CUMADSLofstream << "\t0\t7\t0\t7\t0"; + }else{ + AS_CUMADSLofstream << "\t0\t0\t7\t0\t7"; + } + } AS_CUMADSLofstream << '\n'; @@ -1253,25 +1258,30 @@ { FUNCSTART("uint32 Assembly::getOverlapMalusDivider(int32 id1, int32 id2)"); - if(AS_overlapcritlevell.empty()) return 1; + if(AS_overlapcritlevelvl.empty()) return 1; - BUGIFTHROW(id1>=AS_overlapcritlevell.size(),"id1>=AS_overlapcritlevell.size() ?"); - BUGIFTHROW(id2>=AS_overlapcritlevell.size(),"id2>=AS_overlapcritlevell.size() ?"); + BUGIFTHROW(id1>=AS_overlapcritlevelvl[1].size(),"id1>=AS_overlapcritlevell.size() ?"); + BUGIFTHROW(id2>=AS_overlapcritlevelvl[1].size(),"id2>=AS_overlapcritlevell.size() ?"); - if(AS_overlapcritlevell[id1]==0 - && AS_overlapcritlevelr[id1]==0 - && AS_overlapcritlevell[id2]==0 - && AS_overlapcritlevelr[id2]==0) return 1; - - if(AS_overlapcritlevell[id1]==255 - || AS_overlapcritlevelr[id1]==255 - || AS_overlapcritlevell[id2]==255 - || AS_overlapcritlevelr[id2]==255) return 1000; - - if(AS_overlapcritlevell[id1]==240 - || AS_overlapcritlevelr[id1]==240 - || AS_overlapcritlevell[id2]==240 - || AS_overlapcritlevelr[id2]==240) return 100; + auto ocll1=min(AS_overlapcritlevelvl[0][id1],AS_overlapcritlevelvl[1][id1]); + auto oclr1=min(AS_overlapcritlevelvr[0][id1],AS_overlapcritlevelvr[1][id1]); + auto ocll2=min(AS_overlapcritlevelvl[0][id2],AS_overlapcritlevelvl[1][id2]); + auto oclr2=min(AS_overlapcritlevelvr[0][id2],AS_overlapcritlevelvr[1][id2]); + + if(ocll1==0 + && oclr1==0 + && ocll2==0 + && oclr2==0) return 1; + + if(ocll1==255 + || oclr1==255 + || ocll2==255 + || oclr2==255) return 1000; + + if(ocll1==240 + || oclr1==240 + || ocll2==240 + || oclr2==240) return 100; FUNCEND(); return 10; @@ -1437,6 +1447,7 @@ { FUNCSTART("void Assembly::cleanupMADSL(list & madsl, uint32 rid1, uint32 rid2, int8 direction, bool flag_stronggood, bool flag_weakgood, bool flag_belowavgfreq, bool flag_norept, bool flag_rept)"); + CEBUG("calling minimise\n"); minimiseMADSL(madsl); CEBUG("cleanupMADSL() 3 madsl.size(): " << madsl.size() << endl); @@ -1485,7 +1496,9 @@ if(AS_miraparams[0].getAssemblyParams().as_clip_possible_vectors && ! AS_steps[ASVECTORSCLIPPED]) { + CEBUG("transcribing hits\n"); transcribeHits(*madsl.begin()); + CEBUG("th done\n"); } // if changing something here, do not forget to change at the 100% diff -Nru mira-3.9.18/src/mira/contig.C mira-4.0/src/mira/contig.C --- mira-3.9.18/src/mira/contig.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig.C 2014-02-02 12:05:18.000000000 +0000 @@ -265,6 +265,8 @@ CON_us_steps_iric.resize(USCLOIRIC_END,0); CON_us_steps_drfc.clear(); CON_us_steps_drfc.resize(USCLODRFC_END,0); + CON_us_steps_cons.clear(); + CON_us_steps_cons.resize(USCLOCONS_END,0); CON_track_numins=0; CON_track_numdels=0; @@ -618,7 +620,7 @@ CON_stats.max_covperst[i]=0; CON_stats.avg_covperst[i]=0.0; CON_stats.readsperst[i]=0; - CON_stats.readlenperst[i]=0; + CON_stats.totalbasesperst[i]=0; } } @@ -646,13 +648,6 @@ CON_stats.conlength=CON_counts.size(); - // avg. coverage of solexa and solid must be made differently than - // for sanger & 454 (because of merged reads) - uint64 actcovsxa=0; - uint64 sumcovsxa=0; - uint64 actcovsid=0; - uint64 sumcovsid=0; - // using a pointer to CON_counts is (a lot) faster than accessing it // via [] each time auto ccI=CON_counts.begin(); @@ -712,37 +707,26 @@ CON_stats.max_coverage=max(CON_stats.max_coverage, static_cast(ccI->total_cov)); - for(uint32 i=0; i(ccI->seqtype_cov[i]); CON_stats.max_covperst[i]=max(CON_stats.max_covperst[i], static_cast(ccI->seqtype_cov[i])); } - // 100% mapped Solexa/SOLiD reads must be accounted for a bit differently - - actcovsxa=static_cast(ccI->seqtype_cov[ReadGroupLib::SEQTYPE_SOLEXA]); - sumcovsxa+=actcovsxa; - - CON_stats.max_covperst[ReadGroupLib::SEQTYPE_SOLEXA]= - max(CON_stats.max_covperst[ReadGroupLib::SEQTYPE_SOLEXA],static_cast(actcovsxa)); - - actcovsid=static_cast(ccI->seqtype_cov[ReadGroupLib::SEQTYPE_ABISOLID]); - sumcovsid+=actcovsid; - - CON_stats.max_covperst[ReadGroupLib::SEQTYPE_ABISOLID]= - max(CON_stats.max_covperst[ReadGroupLib::SEQTYPE_ABISOLID],static_cast(actcovsid)); - CON_stats.starInR+=ccI->star; CON_stats.NinR+=ccI->N; } // ok, in the section above, rail reads would have been also counted in // (in .coverage) - // compute reads numbers + // compute reads statistics and remove rail bases from base statistics { auto cI=CON_reads.begin(); for(;cI!=CON_reads.end();++cI){ - if(!cI->isRail()){ + if(cI->isRail()){ + CON_stats.totalbasesperst[cI->getSequencingType()]-=cI->getLenClippedSeq(); + }else{ // Nono, backbones must be counted in! // Scenario: assembly at 6x used as backbone, assembled further 1x @@ -751,45 +735,30 @@ // would want // && !cI->read.isBackbone()) { - CON_stats.total_reads++; + ++CON_stats.total_reads; CON_stats.readsperst[cI->getSequencingType()]++; - if(cI.getORPID()>=0){ - CON_stats.readlenperst[cI->getSequencingType()]+=CON_readpool->getRead(cI.getORPID()).getLenClippedSeq(); - if(cI->hasQuality()){ - CON_stats.numreads_withqual++; - }else{ - CON_stats.numreads_noqual++; - } + if(cI->hasQuality()){ + CON_stats.numreads_withqual++; }else{ - CON_stats.readlenperst[cI->getSequencingType()]+=cI->getLenClippedSeq(); + CON_stats.numreads_noqual++; } } } } - CON_stats.readlenperst[ReadGroupLib::SEQTYPE_SOLEXA]=static_cast(sumcovsxa); - CON_stats.readlenperst[ReadGroupLib::SEQTYPE_ABISOLID]=static_cast(sumcovsid); - + CON_stats.avg_coverage=0.0; if(!CON_counts.empty()){ - CON_stats.avg_coverage=0.0; - for(uint32 i=0; i0.0){ - // subtracting the number of uncovered bases in the following firmula is a bad, bad idea and - // gives totally wrong numbers. - //CON_stats.avg_covperst[i]=static_cast(CON_stats.readlenperst[i])/(CON_counts.size()- CON_stats.numnocoverage); - CON_stats.avg_covperst[i]=static_cast(CON_stats.readlenperst[i])/(CON_counts.size()); - CON_stats.avg_coverage+=CON_stats.avg_covperst[i]; - } + uint64 totalbases=0; + for(uint32 sti=0; sti(CON_stats.totalbasesperst[sti])/CON_counts.size(); + totalbases+=CON_stats.totalbasesperst[sti]; } + CON_stats.avg_coverage=static_cast(totalbases)/CON_counts.size(); } { - vector::const_iterator I=consqual.begin(); double qual=0.0; - while(I!=consqual.end()){ - qual+=static_cast(*I); - I++; - } + for(auto & cqe : consqual) qual+=static_cast(cqe); CON_stats.avg_conqual=static_cast((qual/consseq.size())+.5); } @@ -800,6 +769,9 @@ // IUPACs are perhaps not set yet updateStatsFromConsensusTags(true, true, false, true, true); + CON_stats.contains_long_repeats_only=CON_contains_long_repeats_only; + CON_stats.islargecontig=0; // undefined, to be set by assembly_info + CON_stats.statsvalid=true; FUNCEND(); @@ -1132,6 +1104,11 @@ /************************************************************************* * * addRead_wrapped might change some alignment parameters + * + * returns: + * errstat for communicating errors + * templateguess for communicating measure template info + * * as it returns from a number of different points within the loop, * setting back original this function takes care to set everything back * to normal if needed. @@ -1140,15 +1117,17 @@ //#define BUGHUNT -void Contig::addRead(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, errorstatus_t & errstat) +void Contig::addRead(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, templateguessinfo_t & templateguess, errorstatus_t & errstat) { - FUNCSTART("void Contig::addRead(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, errorstatus_t & errstat)"); + FUNCSTART("void Contig::addRead(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, templateguess_t & templateguess, errorstatus_t & errstat)"); //setCEBUGFlag(newid,refid); paranoiaBUGIF(aligncache.size()!=ReadGroupLib::SEQTYPE_END, MIRANOTIFY(Notify::INTERNAL, "aligncache is not size of available sequencing types???")); + templateguess.rgid.resetLibId(); + // this is ugly: save the align params because // addRead_wrapped() might change some *sigh* align_parameters oldalignparams= @@ -1179,9 +1158,15 @@ direction_frnid, newid_ismulticopy, forcegrow, + templateguess, errstat); if(errstat.code!=ENOERROR){ + // remove an eventual guess for template placement + templateguess.rgid.resetLibId(); + templateguess.splace_seen=ReadGroupLib::SPLACE_UNKNOWN; + templateguess.tsize_seen=0; + // check if refid has been put into reads_affected by the contig // if not, warn and dump bool isin=false; @@ -1244,7 +1229,7 @@ #define CEBUG(bla) -void Contig::addRead_wrapped(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, errorstatus_t & errstat) +void Contig::addRead_wrapped(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, templateguessinfo_t & templateguess, errorstatus_t & errstat) { FUNCSTART("void Contig::addRead_wrapped(vector & aligncache, const AlignedDualSeqFacts * initialadsf, int32 refid, int32 newid, int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, errorstatus_t & errstat)"); @@ -1839,18 +1824,23 @@ bool havematchingtemplatepartner=false; - if(CON_readpool->getRead(newid).hasTemplateInfo() > 0){ + if(CON_readpool->getRead(newid).getTemplatePartnerID() != -1){ // 1st: direction #ifndef PUBLICQUIET cout << " tmplhand1 "; cout << CON_readpool->getRead(newid).getTemplatePartnerID() << " "; cout.flush(); #endif - auto pcrI=CON_reads.getIteratorOfReadpoolID(CON_readpool->getRead(newid).getTemplatePartnerID()); + auto tppcrI=CON_reads.getIteratorOfReadpoolID(CON_readpool->getRead(newid).getTemplatePartnerID()); // is partner already in contig? - if(pcrI==CON_reads.end()){ + if(tppcrI==CON_reads.end()){ #ifndef PUBLICQUIET - cout << "nic "; + cout << "nic(" + << CON_readpool->getRead(newid).getTemplatePartnerID(); + if(CON_readpool->getRead(newid).getTemplatePartnerID()>=0){ + cout << " - " << CON_readpool->getRead(CON_readpool->getRead(newid).getTemplatePartnerID()).getName(); + } + cout << ") "; cout.flush(); #endif }else{ @@ -1871,10 +1861,10 @@ #ifndef PUBLICQUIET cout << "\ndni: " << static_cast(direction_newid_incontig); - cout << "\npdi: " << static_cast(pcrI.getReadDirection()); + cout << "\npdi: " << static_cast(tppcrI.getReadDirection()); cout << "\ntbd: " << static_cast(CON_readpool->getRead(newid).getTemplateBuildDirection()); #endif - if(direction_newid_incontig*pcrI.getReadDirection() != CON_readpool->getRead(newid).getTemplateBuildDirection()){ + if(direction_newid_incontig*tppcrI.getReadDirection() != CON_readpool->getRead(newid).getTemplateBuildDirection()){ // not direction wanted, not good #ifndef PUBLICQUIET cout << "templ in wrong dir"; @@ -1899,13 +1889,153 @@ } } + // for segment placement and template size check, we need the positions in the contig + + bool newreadisleft=true; + + // Note: play it safe while adding right extend ... take only + // part of it + int32 leftrx=xcut; + int32 leftry=ycut; + if(direction_newid_incontig>0) { + leftry+=CON_readpool->getRead(newid).getRightExtend()*2/3; + }else{ + leftrx-=CON_readpool->getRead(newid).getRightExtend()*2/3; + } + + int32 rightrx=tppcrI.getReadStartOffset(); + int32 rightry=tppcrI.getReadStartOffset()+tppcrI->getLenClippedSeq(); + if(direction_refid>0) { + rightry+=tppcrI->getRightExtend()*2/3; + }else{ + rightrx-=tppcrI->getRightExtend()*2/3; + } + + if(rightrx + // <---------- + // which can become + // ----> + // <---- + // + // one should only guess on disjunct (non-overlapping) reads + // or if overlapping, the right read must start >= 10 bp + // later than the left read + if(leftry=rightrx){ + // and start of reads <= 10bp + guesstemplatesegplace=false; + } + } + + if(guesstemplatesegplace){ + templateguess.rgid=CON_readpool->getRead(newid).getReadGroupID(); // this validates the entry (else its rgid: 0) + templateguess.tsize_seen=actinsertsize; + // placement code is hardest + if(direction_newid_incontig*tppcrI.getReadDirection() < 0){ + // FR or RF + if(newreadisleft){ + if(direction_newid_incontig>0){ + templateguess.splace_seen=ReadGroupLib::SPLACE_FR; + }else{ + templateguess.splace_seen=ReadGroupLib::SPLACE_RF; + } + }else{ + if(direction_newid_incontig>0){ + templateguess.splace_seen=ReadGroupLib::SPLACE_RF; + }else{ + templateguess.splace_seen=ReadGroupLib::SPLACE_FR; + } + } + }else{ + // same direction ... + // + // I'm sure that some boolean logic could get through this, but I'm not inclined to think about it now + templateguess.splace_seen=ReadGroupLib::SPLACE_SU; // just as default + if((direction_newid_incontig>0 && newreadisleft==true) + || (direction_newid_incontig<0 && newreadisleft==false)){ + if(CON_readpool->getRead(newid).getTemplateSegment()==1){ + templateguess.splace_seen=ReadGroupLib::SPLACE_SF; + }else{ + templateguess.splace_seen=ReadGroupLib::SPLACE_SB; + } + }else{ + if(CON_readpool->getRead(newid).getTemplateSegment()==1){ + templateguess.splace_seen=ReadGroupLib::SPLACE_SB; + }else{ + templateguess.splace_seen=ReadGroupLib::SPLACE_SF; + } + } + } + } +#ifndef PUBLICQUIET + cout << " nril " << newreadisleft + << " " << leftrx << "-" << leftry + << " " << rightrx << "-" << rightry + << " " << templateguess; + cout.flush(); +#endif + + // ** Check for segment placement ** - if(CON_readpool->getRead(newid).getReadGroupID().getSegmentPlacementCode() == ReadGroupLib::SPLACE_SF - || CON_readpool->getRead(newid).getReadGroupID().getSegmentPlacementCode() == ReadGroupLib::SPLACE_SB){ + // unknown does obviously need no check, "samedir unknown" already checked implicitly by direction check above + { + auto spc=CON_readpool->getRead(newid).getReadGroupID().getSegmentPlacementCode(); + if(spc != ReadGroupLib::SPLACE_UNKNOWN + && spc != ReadGroupLib::SPLACE_SU + && templateguess.splace_seen != ReadGroupLib::SPLACE_UNKNOWN + && templateguess.splace_seen != ReadGroupLib::SPLACE_SU){ #ifndef PUBLICQUIET - cout << " spl"; - cout.flush(); + cout << " spl"; + cout.flush(); +#endif + // if reads overlap, stay cool and don't check as it could be that sequencing errors and clipping + // muddy the picture + // That is: the +10 bp criterion of above is not taken into account here, only the non-overlapping part + + bool hasplacementerror=false; + if(leftry(ycut)>CON_counts.size()){ + ycut=CON_counts.size(); + } + gettimeofday(&us_start,nullptr); + if(CON_readpool->getRead(refid).isRail()) { + getRailsAsReadsAffected(refid, errstat.reads_affected, xcut, ycut); + }else{ + getReadORPIDsAtContigPosition(errstat.reads_affected, xcut, ycut); + } + CON_us_steps[USCLO_GRACP]+=diffsuseconds(us_start); + FUNCEND(); + return; + } + } } // ** Check for template size ** @@ -1916,60 +2046,34 @@ cout.flush(); #endif - // Note: play it safe while adding right extend ... take only - // part of it - int32 leftrx=xcut; - int32 leftry=ycut; - if(direction_newid_incontig>0) { - leftry+=CON_readpool->getRead(newid).getRightExtend()*3/2; - }else{ - leftrx-=CON_readpool->getRead(newid).getRightExtend()*3/2; - } - - int32 rightrx=pcrI.getReadStartOffset(); - int32 rightry=pcrI.getReadStartOffset()+pcrI->getLenClippedSeq(); - if(direction_refid>0) { - rightry+=pcrI->getRightExtend()*3/2; - }else{ - rightrx-=pcrI->getRightExtend()*3/2; - } - - if(rightrxgetInsizeFrom(); - int32 tit=pcrI->getInsizeTo(); + int32 tif=tppcrI->getInsizeFrom(); + int32 tit=tppcrI->getInsizeTo(); - if(pcrI->getInsizeFrom() >=0 && aisp10 < tif){ + if(tppcrI->getInsizeFrom() >=0 && aisp10 < tif){ // distance too small #ifndef PUBLICQUIET - cout << "templ too small: " << tif << " min allowed, got " << aisp10; + cout << "templ too small: " << tif << " min allowed, got " << aism10 << "-" << aisp10; #endif havematchingtemplatepartner=false; if(!CON_readpool->getRead(newid).getReadGroupID().getTSInfoOnly()){ - errstat.code=ETEMPLATESIZE; + errstat.code=ETEMPLATESIZELT; } } - if(errstat.code != ETEMPLATESIZE && pcrI->getInsizeTo() >=0 && aism10 > tit){ + if(errstat.code == ENOERROR && tppcrI->getInsizeTo() >=0 && aism10 > tit){ // distance too big #ifndef PUBLICQUIET - cout << "templ too big: " << tit << " max allowed, got " << aism10; + cout << "templ too big: " << tit << " max allowed, got " << aism10 << "-" << aisp10; #endif havematchingtemplatepartner=false; if(!CON_readpool->getRead(newid).getReadGroupID().getTSInfoOnly()){ - errstat.code=ETEMPLATESIZE; + errstat.code=ETEMPLATESIZEGT; } } - if(errstat.code == ETEMPLATESIZE){ + if(errstat.code != ENOERROR){ if(xcut<0) xcut=0; if(static_cast(ycut)>CON_counts.size()){ ycut=CON_counts.size(); @@ -2771,6 +2875,8 @@ // canmap=false; // } + //cout << "\ncanmap2: " << canmap << endl; + // maybe we'd like to have reads at contig ends not mapped (e.g. // for scaffolding) if(canmap @@ -2788,26 +2894,26 @@ dist=CON_readpool->getRead(newid).getInsizeTo(); } -// cout << "mpl: " << CON_markerpositions[CON_mpindex_msrkceu_left] -// << "\tmpr: " << CON_markerpositions[CON_mpindex_msrkceu_right] -// << "\nxcut: " << xcut -// << "\tycut: " << ycut -// << "\tdist: " << dist -// << "\nl: " << dist+CON_markerpositions[CON_mpindex_msrkceu_left] -// << "\tl: " << CON_markerpositions[CON_mpindex_msrkceu_right]-dist -// ; + //cout << "mpl: " << CON_markerpositions[CON_mpindex_msrkceu_left] + // << "\tmpr: " << CON_markerpositions[CON_mpindex_msrkceu_right] + // << "\nxcut: " << xcut + // << "\tycut: " << ycut + // << "\tdist: " << dist + // << "\nl: " << dist+CON_markerpositions[CON_mpindex_msrkceu_left] + // << "\tl: " << CON_markerpositions[CON_mpindex_msrkceu_right]-dist + // ; // if no distance or when read has no paired-end partner, we could map // anyway and would not need to check further if(dist>0){ // check whether we are in boundaries, if yes, do not map if(xcut <= dist+CON_markerpositions[CON_mpindex_msrkceu_left] - || ycut >= CON_markerpositions[CON_mpindex_msrkceu_left]-dist){ + || ycut >= CON_markerpositions[CON_mpindex_msrkceu_right]-dist){ canmap=false; } } - //cout << "\ncanmap: " << canmap << endl; + //cout << "\ncanmap2: " << canmap << endl; } // map if possible, else the read will be normally added @@ -4515,15 +4621,15 @@ /************************************************************************* * - * - * + * "doshiftreads==false" is a hack for trimMapOverhang() which needs + * chompFront() functionality WITHOUT shifting reads * *************************************************************************/ //#define CEBUG(bla) {cout << bla; cout.flush();} -int32 Contig::chompFront(int32 maxchecklen) +int32 Contig::chompFront(int32 maxchecklen, bool doshiftreads) { - FUNCSTART("int32 Contig::chompFront(int32 maxchecklen)"); + FUNCSTART("int32 Contig::chompFront(int32 maxchecklen, bool doshiftreads)"); #ifdef CLOCK_STEPS_DRFC timeval us_tv; @@ -4569,9 +4675,11 @@ } if(CON_us_steps_drfc.size()) CON_us_steps_drfc[USCLODRFC_SDT]+=diffsuseconds(us_tv); // push down the offsets of the other reads - gettimeofday(&us_tv,nullptr); - CON_reads.shiftReads(1,-frontdeletions); - if(CON_us_steps_drfc.size()) CON_us_steps_drfc[USCLODRFC_SR]+=diffsuseconds(us_tv); + if(doshiftreads){ + gettimeofday(&us_tv,nullptr); + CON_reads.shiftReads(1,-frontdeletions); + if(CON_us_steps_drfc.size()) CON_us_steps_drfc[USCLODRFC_SR]+=diffsuseconds(us_tv); + } // same thing for contig marker positions gettimeofday(&us_tv,nullptr); shiftMarkerPositions(1,-frontdeletions); @@ -4653,6 +4761,125 @@ #define CEBUG(bla) +/************************************************************************* + * + * + * + * + *************************************************************************/ +//#define CEBUG(bla) {cout << bla; cout.flush();} +void Contig::trimMapOverhang() +{ + FUNCSTART("void Contig::trimMapOverhang()"); + + //cout << "MMMMMMMMMM\n"; + //CON_reads.debugDump(false); + + if(getNumBackbones()==0) return; + + int32 firstknownbbpos=-1; + int32 lastknownbbpos=-1; + for(auto crI= CON_reads.begin(); crI!=CON_reads.end(); ++crI){ + if(crI->isBackbone()){ + if(static_cast(crI.getReadStartOffset()+crI->getLenClippedSeq()) > lastknownbbpos){ + lastknownbbpos=crI.getReadStartOffset()+crI->getLenClippedSeq(); + } + if(firstknownbbpos<0){ + firstknownbbpos=crI.getReadStartOffset(); + } + } + } + + CEBUG("fkbb: " << firstknownbbpos << endl); + CEBUG("lkbb: " << lastknownbbpos << endl); + CEBUG("gcl: " << getContigLength() << endl); + + BUGIFTHROW(firstknownbbpos<0,"firstknownbbpos " << firstknownbbpos << " <0 ???"); + BUGIFTHROW(lastknownbbpos<0,"lastknownbbpos " << lastknownbbpos << " <0 ???"); + + // check: are there reads completely outside the backbone? if yes: no-can-do + for(auto crI= CON_reads.begin(); crI!=CON_reads.end(); ++crI){ + if(!crI->isBackbone()){ + if(crI.getReadStartOffset() < firstknownbbpos + && crI.getReadStartOffset()+crI->getLenClippedSeq() <= firstknownbbpos){ + // oooops, impossible at front + return; + } + if(crI.getReadStartOffset() >= lastknownbbpos){ + // oooops, impossible at end + return; + } + } + } + + bool docorrect=false; + // we're fine, now get things rolling + // + // first, the back of the contig if needed + if(lastknownbbpos < getContigLength()){ + docorrect=true; + // zero out CON_counts + auto ccI=CON_counts.end(); // cannot use rbegin, not implemented in HDeque + CEBUG("numdelsteps: " << getContigLength()-lastknownbbpos << endl); + for(auto numdelsteps=getContigLength()-lastknownbbpos; numdelsteps!=0; --numdelsteps){ + --ccI; + *ccI=CON_concounts_zero; + } + + // shorten overhanging reads + for(auto crI= CON_reads.begin(); crI!=CON_reads.end(); ++crI){ + int32 shorten=static_cast(crI.getReadStartOffset()+crI->getLenClippedSeq())-lastknownbbpos; + CEBUG(crI->getName() << " shortenb " << shorten << endl); + if(shorten>0){ + // very hacky, but we're forcing our hand on the reads of the PCR container here + Read & ncr=const_cast(*crI); + if(crI.getReadDirection()>0){ + ncr.setRQClipoff(crI->getRightClipoff()-shorten); + }else{ + ncr.setLQClipoff(crI->getLeftClipoff()+shorten); + } + } + } + } + + // now the front of the contig if needed + if(firstknownbbpos>0){ + docorrect=true; + // zero out CON_counts + auto ccI=CON_counts.begin(); + for(auto numdelsteps=firstknownbbpos; numdelsteps!=0; --numdelsteps, ++ccI){ + *ccI=CON_concounts_zero; + } + + // shorten overhanging reads + for(auto crI= CON_reads.begin(); crI!=CON_reads.end(); ++crI){ + int32 shorten=firstknownbbpos-static_cast(crI.getReadStartOffset()); + CEBUG(crI->getName() << "\tfkbbp: " << firstknownbbpos << "\trso: " << crI.getReadStartOffset() <<"\tshortenf " << shorten << endl); + if(shorten>0){ + // very hacky, but we're forcing our hand on the reads of the PCR container here + Read & ncr=const_cast(*crI); + if(crI.getReadDirection()>0){ + ncr.setLQClipoff(crI->getLeftClipoff()+shorten); + }else{ + ncr.setRQClipoff(crI->getRightClipoff()-shorten); + } + } + } + } + + if(docorrect){ + chompBack(-1); + + if(firstknownbbpos>0){ + // hacky thing + chompFront(-1,false); + // hacky thing + CON_reads.shiftReadsBounceZero(0,-firstknownbbpos); + } + } +} +//#define CEBUG(bla) + /************************************************************************* * @@ -4774,7 +5001,7 @@ CEBUG("New element:\t"); CEBUG("Offset: " << rle.offset_in_contig << "\tID: " << rle.id); CEBUG("\tDir: " << rle.direction << endl); - CEBUG("Read:\n" << CON_readpool->getRead(rle.id).getName() << endl); + CEBUG("Read: " << CON_readpool->getRead(rle.id).getName() << endl); auto pcrI=CON_reads.placeRead(CON_readpool->getRead(rle.id), rle.id, @@ -4782,7 +5009,7 @@ rle.direction); computedclen=max(computedclen,static_cast(pcrI.getReadStartOffset())+static_cast(pcrI->getLenClippedSeq())); - auto coveragemultiplier=CON_readpool->getRead(pcrI->getStrainID()).getDigiNormMultiplier(); + auto coveragemultiplier=CON_readpool->getRead(rle.id).getDigiNormMultiplier(); CON_readsperstrain[pcrI->getStrainID()]+=coveragemultiplier; CON_readsperreadgroup[pcrI->getReadGroupID().getLibId()]+=coveragemultiplier; if(pcrI->getLenClippedSeq() > CON_longestreadseen) CON_longestreadseen=pcrI->getLenClippedSeq(); @@ -4795,6 +5022,8 @@ } } + CEBUG("end of list" << endl); + // CAF as written by gap5 may start at another offset than 0 // MIRA expects the first read to have an offset of 0, therefore correct for that int32 shiftoffset=-CON_reads.begin().getReadStartOffset(); @@ -4854,6 +5083,8 @@ } } + CEBUG("CON_counts before trimming: " << CON_counts.size() << endl); + // trim end of contig if needed uint64 numpops=0; while(!CON_counts.empty() && @@ -4880,6 +5111,7 @@ CON_fixedconsqual.erase(CON_fixedconsqual.begin(),CON_fixedconsqual.begin()+numpops); } + BUGIFTHROW(CON_counts.empty(),"After trimming, contig has zero length?"); // must copy each tag as we have to "upgrade" a tag_t to a consensustag_t { @@ -6886,6 +7118,14 @@ } break; } + case Contig::ENOTCALLED : { + if(longmsg){ + cout << "\t-\tnot called\n"; + }else{ + cout << ' '; + } + break; + } case Contig::ENOALIGN : { if(longmsg){ cout << "\t-\tno align found\n"; @@ -6906,15 +7146,31 @@ if(longmsg){ cout << "\t-\ttemplate in wrong direction\n"; }else{ - cout << 't'; + cout << 'T'; + } + break; + } + case Contig::ESEGMENTPLACEMENT : { + if(longmsg){ + cout << "\t-\tplacement of segment wrong\n"; + }else{ + cout << 'P'; + } + break; + } + case Contig::ETEMPLATESIZELT : { + if(longmsg){ + cout << "\t-\tmismatch in template size (<)\n"; + }else{ + cout << '<'; } break; } - case Contig::ETEMPLATESIZE : { + case Contig::ETEMPLATESIZEGT : { if(longmsg){ - cout << "\t-\tmismatch in template size\n"; + cout << "\t-\tmismatch in template size (>)\n"; }else{ - cout << 's'; + cout << '>'; } break; } @@ -6922,7 +7178,7 @@ if(longmsg){ cout << "\t-\tmismatch in SRMB zone\n"; }else{ - cout << 'p'; + cout << 'R'; } break; } diff -Nru mira-3.9.18/src/mira/contig.H mira-4.0/src/mira/contig.H --- mira-3.9.18/src/mira/contig.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig.H 2014-02-02 12:05:18.000000000 +0000 @@ -28,10 +28,6 @@ #ifndef _mira_contig_h_ #define _mira_contig_h_ -#include - -#include - #include #include #include @@ -41,23 +37,16 @@ #include "stdinc/stlincludes.H" #include "stdinc/defines.H" -#include "errorhandling/errorhandling.H" -// for checking time restrictions -#include -#include "mira/timerestrict.H" - -#include "mira/pcrcontainer.H" -#include "mira/sam_collect.H" +#include "mira/align.H" +#include "mira/hdeque.H" #include "mira/parameters.H" +#include "mira/pcrcontainer.H" #include "mira/readpool.H" -#include "mira/align.H" -#include "mira/ads.H" -#include "io/exp.H" +#include "mira/sam_collect.H" #include "util/dptools.H" -#include "mira/hdeque.H" @@ -158,10 +147,13 @@ AS_DEBUG}; enum addreadcode{ENOERROR=0, + ENOTCALLED, ENOALIGN, EDROPINRELSCORE, ETEMPLATEDIRECTION, - ETEMPLATESIZE, + ETEMPLATESIZELT, + ETEMPLATESIZEGT, + ESEGMENTPLACEMENT, ESRMBMISMATCH, EDANGERZONE, ESPECIALSRADDFAIL, @@ -186,93 +178,6 @@ - -// struct contigread_t{ -// int32 orpid; /* id of the original read in the readpool -// can be < 0, then this means it is not -// in the readpool. -// At the moment this happens for coverage -// mapping of short read */ -// int32 offset; // offset of good, clipped part in the read -// int32 direction; // >0 forward, <0 complement -// Read read; /* read (might be modified and not be quite the -// same as in the readpool) */ -// -// friend std::ostream & operator<<(std::ostream &ostr, const contigread_t & cr){ -// ostr << "CR: " << cr.orpid << "\t" << cr.offset << "\t" << cr.direction << "\t" << cr.read.getName() << std::endl; -// return ostr; -// } - -// ****************************************************************** -// contigPosToUnclippedReadPos -// We have a contig position and we want to know which position in the -// UNCLIPPED FORWARD read corresponds to the contig position -// -// ****************************************************************** -// -// inline int32 contigPos2UnclippedReadPos(const int32 contigpos) const -// { -// if (direction > 0) { -// return contigpos - offset + read.getLeftClipoff(); -// } else { -// // FALSCH return ric.offset + ric.read.getRightClipoff() -1 - contigpos; -// return read.getLenSeq() - read.getRightClipoff() + contigpos - offset; -// } -// }; -// -// inline int32 contigPos2RawReadPos(const int32 contigpos) const -// { -// if (direction > 0) { -// return contigPos2UnclippedReadPos(contigpos); -// } else { -// return read.calcComplPos(contigPos2UnclippedReadPos(contigpos)); -// } -// }; -// -// -//// ******************************************************************* -//// unclippedReadPosToContigPos -//// We have a position in an UNCLIPPED read and we want to know the corresponding -//// position in the contig -//// -//// ****************************************************************** -// inline int32 unclippedReadPos2ContigPos(const int32 readpos) const -// { -// if (direction > 0) { -// return readpos - read.getLeftClipoff() + offset ; -// } else { -// return read.getRightClipoff()-readpos+offset -1 ; -// } -// } -// inline char getBase(const int32 contigpos) const -// { -// if(direction>0){ -// return read.getBaseInSequence(contigPos2UnclippedReadPos(contigpos)); -// }else{ -// return read.getBaseInComplementSequence(contigPos2UnclippedReadPos(contigpos)); -// } -// } -// inline void setBase(const int32 contigpos, const char base, const base_quality_t quality) -// { -// if(direction>0){ -// read.changeBaseInSequence(base,quality,contigPos2UnclippedReadPos(contigpos)); -// }else{ -// //std::cout << "cp: " << contigpos << "\tcp2urp: " << contigPos2UnclippedReadPos(contigpos) << std::endl; -// read.changeBaseInComplementSequence(base,quality,contigPos2UnclippedReadPos(contigpos)); -// } -// } -// inline base_quality_t getQuality(const int32 contigpos) const -// { -// if(direction>0){ -// return read.getQualityInSequence(contigPos2UnclippedReadPos(contigpos)); -// }else{ -// return read.getQualityInComplementSequence(contigPos2UnclippedReadPos(contigpos)); -// } -// } -// -// }; - - // we can currently merge 2 seqtypes: SOlexa, SOLiD // SOLiD currently not used #define NUMMERGESEQTYPES 2 @@ -478,6 +383,9 @@ struct constats_t { bool statsvalid; + bool contains_long_repeats_only; // copy of CON_contains_long_repeats_only for saving + int8 islargecontig; // -1=no; 0=undefined; 1=yes + uint32 conlength; uint32 conlength_nogap; @@ -503,7 +411,7 @@ uint32 total_reads; uint32 readsperst[ReadGroupLib::SEQTYPE_END]; // EXCLUDING rail reads!!! - uint32 readlenperst[ReadGroupLib::SEQTYPE_END]; + uint64 totalbasesperst[ReadGroupLib::SEQTYPE_END]; uint32 numreads_noqual; uint32 numreads_withqual; @@ -523,10 +431,27 @@ int32 code; // the addread error code std::vector reads_affected; + inline errorstatus_t() : code(ENOERROR) {}; + inline void reset() { code=ENOERROR; reads_affected.clear(); } void dumpStatus(bool longmsg=false, const char * additionalmsg=nullptr); }; + struct templateguessinfo_t { + uint32 tsize_seen; // outer template size seen + int8 splace_seen; // segment placement deduced + ReadGroupLib::ReadGroupID rgid; + + friend std::ostream & operator<<(std::ostream &ostr, const templateguessinfo_t & tgi){ + ostr << "tgi rgid: " << tgi.rgid.getLibId() + << "\t" << static_cast(tgi.splace_seen) + << "\t" << tgi.tsize_seen; + return ostr; + } + }; + + + // pacbio dark strobe edit struct pbdse_t { uint32 rid; // rid in readpool @@ -816,10 +741,27 @@ USCLODRFC_END }; + +//#define CLOCK_STEPS_CONS // careful with this one, 30% speed impact + enum{ + USCLOCONS_H1_MGROUPS, + USCLOCONS_H1_CP2URP, + USCLOCONS_H1_PCRI, + USCLOCONS_H1_EGROUP, + USCLOCONS_H1_GQUAL, + USCLOCONS_H1_CALLH2, + USCLOCONS_H1_TOTAL, + USCLOCONS_END + }; + + // track timing for insert read in contig std::vector CON_us_steps_iric; // track timing for delete read from contig std::vector CON_us_steps_drfc; + // track timing for consensus generation + std::vector CON_us_steps_cons; + // track number of delete calls size_t CON_track_numins; size_t CON_track_numdels; @@ -845,6 +787,7 @@ int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, + templateguessinfo_t & templateguess, errorstatus_t & errstat); void updateCountVectors(const int32 from, @@ -1107,6 +1050,9 @@ uint32 numSRMs; uint32 numWRMs; uint32 numSNPs; + + void init() {numSRMs=0;numWRMs=0;numSNPs=0;} + repeatmarker_stats_t() {init();} }; private: //////////////////////////////////////////////////////////////////////// @@ -1435,6 +1381,7 @@ int32 direction_frnid, bool newid_ismulticopy, int32 forcegrow, + templateguessinfo_t & templateguess, errorstatus_t & errstat); void addFirstRead(int32 id, int8 direction); void coutAddReadTimings(); @@ -1465,9 +1412,9 @@ base_quality_t quality=BQ_UNDEFINED); void deleteBaseInRead(int32 contigposition, int32 readindex); - int32 chompFront(int32 maxchecklen); + int32 chompFront(int32 maxchecklen, bool doshiftreads=true); int32 chompBack(int32 maxchecklen); - + void trimMapOverhang(); void adjustReadOffsets(int32 contigposition, int32 offset); @@ -1673,7 +1620,7 @@ std::vector & editcommands, const bool onlysetPSHPtags, const bool noSRMreadsallowed); - uint32 editSingleDiscrepancyNoHAFTag(std::vector & readsmarkedsrm); + uint32 editSingleDiscrepancyNoHAFTag(std::vector & readsmarkedsrm, uint8 editmode); void editPBSledgeHammer(std::vector & readsmarkedsrm, uint32 & numcoledits, uint32 & numreadedits); diff -Nru mira-3.9.18/src/mira/contig_analysis.C mira-4.0/src/mira/contig_analysis.C --- mira-3.9.18/src/mira/contig_analysis.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig_analysis.C 2014-02-02 12:05:18.000000000 +0000 @@ -1447,7 +1447,7 @@ vector maskshadow; vector masktagtypes; - masktagtypes.push_back(Read::REA_tagentry_idSOFApolyA_signal_sequence); + //masktagtypes.push_back(Read::REA_tagentry_idSOFApolyA_sequence); masktagtypes.push_back(Read::REA_defaulttag_PSHP.identifier); buildMaskShadow(maskshadow,masktagtypes,false); @@ -1995,7 +1995,7 @@ CEBUGF2("Looking at " << ercci.getContigPos() << " " << readpos << " " << tpcrI->getName()<< " "); // check whether this read has a tag that prohibits searching for repeats here - // (only FpAS & PSHP for the time being) + // (only PSHP for the time being) if(maskshadow[ercci.getContigPos()]) { // remember that the readpos computing routine doesn't take care // of direction, so we have to complement that position in reverse cases @@ -2392,7 +2392,7 @@ // check whether this read has a tag that prohibits searching // or tagging repeats here - // (only FpAS & PSHP for the time being) + // (only PSHP for the time being) if(maskshadow[ercci.getContigPos()]) { // remember that the readpos computing routine doesn't take care // of direction, so we have to complement that position in reverse cases @@ -2850,9 +2850,14 @@ base_quality_t max2r=0; // find two highest values for each direction + // using iterators in the loop below brings exactly nothing for(uint32 j=0; j0) { if(g.quals[j] >= max1f){ max2f=max1f; @@ -4054,7 +4059,7 @@ CEBUGF2("\nLooking at " << tpcrI->getName()<< " "); // check whether this read has a tag that prohibits searching for repeats here - // (only FpAS & PSHP for the time being) + // (only PSHP for the time being) if(maskshadow[ercci.getContigPos()]) { // remember that the readpos computing routine doesn't take care // of direction, so we have to complement that position in reverse cases @@ -4237,7 +4242,7 @@ vector maskshadow; vector masktagtypes; - masktagtypes.push_back(Read::REA_tagentry_idSOFApolyA_signal_sequence); + //masktagtypes.push_back(Read::REA_tagentry_idSOFApolyA_sequence); masktagtypes.push_back(Read::REA_defaulttag_PSHP.identifier); buildMaskShadow(maskshadow,masktagtypes,false); diff -Nru mira-3.9.18/src/mira/contig_consensus.C mira-4.0/src/mira/contig_consensus.C --- mira-3.9.18/src/mira/contig_consensus.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig_consensus.C 2014-02-02 12:05:18.000000000 +0000 @@ -60,7 +60,6 @@ //#define CEBUG(bla) {cout << bla;} void Contig::calcConsensi(int32 mincoverage, base_quality_t minqual, char missingcoveragechar) { - FUNCSTART("void Contig::calcConsensi(int32 mincoverage, base_quality_t minqual, char missingcoveragechar)"); //CON_cebugflag=true; @@ -79,15 +78,17 @@ || CON_conscalc_minqual!=minqual || CON_conscalc_missingchar!=missingcoveragechar || CON_strainconsseq.size()==0 - || CON_readsperstrain.size() >= CON_strainconsseq.size()){ + || CON_readsperstrain.size() > CON_strainconsseq.size()){ // BaCh 17.09.2013: bugfix ">=" into ">", else always needless recalcs - CEBUG("need recalc. old values: " << CON_conscalc_mincov << " " << static_cast(CON_conscalc_minqual) << " " << CON_conscalc_missingchar << endl); + CEBUG("need recalc.:\n"); + CEBUG("old values: " << CON_conscalc_mincov << " " << static_cast(CON_conscalc_minqual) << " " << CON_conscalc_missingchar << " " << CON_strainconsseq.size() << " " << CON_readsperstrain.size() << endl); + CEBUG("new values: " << mincoverage << " " << static_cast(minqual) << " " << missingcoveragechar << " " << CON_strainconsseq.size() << " " << CON_readsperstrain.size() << endl); CON_conscalc_mincov=mincoverage; CON_conscalc_minqual=minqual; CON_conscalc_missingchar=missingcoveragechar; - // make a common consensus for all strains + // make a consensus for every strain // cache them in CON_allconsseq and *qual makeIntelligentConsensus(CON_allconsseq, CON_allconsqual, @@ -117,7 +118,7 @@ // now for all strains. // strains not present in contig will have sequence, quality and adjustments // pre-filled with default values (@, 0 and -1) - // strains present will have empty seq+qual+adj ... to be claulated on demand + // strains present will have empty seq+qual+adj ... to be calculated on demand // Change: no precalculated strains, only pre-filled for clear cases! // Should getConsensus() ask for them later, they @@ -1352,6 +1353,12 @@ */ +#ifdef CLOCK_STEPS_CONS + timeval tv,tvtotal,tvsub; + gettimeofday(&tv,nullptr); + tvtotal=tv; +#endif + for(uint32 groupi=0; groupi < groups.size(); groupi++){ groups[groupi].groupquality=0; groups[groupi].valid=false; @@ -1378,8 +1385,13 @@ //maskedshadowgroups[groupi].countstrainids.clear(); } +#ifdef CLOCK_STEPS_CONS + CON_us_steps_cons[USCLOCONS_H1_MGROUPS]+=diffsuseconds(tv); + gettimeofday(&tv,nullptr); +#endif bool xonly=true; + bool hasmaskedset=false; if(nummapped>0 && ccI->getOriginalBBChar() != 'X') xonly=false; @@ -1389,44 +1401,41 @@ //if(ric.read.isShortReadMapping()) continue; +#ifdef CLOCK_STEPS_CONS + // way too expensive for this loop! + //gettimeofday(&tvsub,nullptr); +#endif int32 readpos=pcrI.contigPos2UnclippedReadPos(actcontigpos); +#ifdef CLOCK_STEPS_CONS + //CON_us_steps_cons[USCLOCONS_H1_CP2URP]+=diffsuseconds(tvsub); +#endif CEBUG("cc pcrI: " << pcrI << "\treadpos " << readpos); - //if(actcontigpos==682){ - // int32 lenit=pcrI->getLenClippedSeq(); - // cout << pcrI->getName() << "\t" << ric.offset << "\t" << readpos << endl; - // //if(readnr==49) cout << ric.read << endl; - // if(lenit != pcrI->getLenClippedSeq()) { - // cout << "newlen??? " << pcrI->getLenClippedSeq(); - // exit(0); - // } - //} + // yup, looks like this is better than using "pcrI->" all the time + // it is at least faster + // maybe too hard for GCC to optimise across whole function + + auto & actread=*pcrI; + auto rdir=pcrI.getReadDirection(); int32 realreadpos; - if(pcrI.getReadDirection()>0){ - base=toupper(pcrI->getBaseInSequence(readpos)); - qual=pcrI->getQualityInSequence(readpos); + if(rdir>0){ + base=toupper(actread.getBaseInSequence(readpos)); + qual=actread.getQualityInSequence(readpos); realreadpos=readpos; }else{ - base=toupper(pcrI->getBaseInComplementSequence(readpos)); - qual=pcrI->getQualityInComplementSequence(readpos); - realreadpos=pcrI->calcComplPos(readpos); - } - -// int32 realreadpos=readpos; -// base=pcrI.getBase(actcontigpos); -// qual=pcrI.getQuality(actcontigpos); -// if(pcrI.getReadDirection()>0){ -//// base=toupper(pcrI->getBaseInSequence(readpos)); -//// qual=pcrI->getQualityInSequence(readpos); -//// realreadpos=readpos; -// }else{ -//// base=toupper(pcrI->getBaseInComplementSequence(readpos)); -//// qual=pcrI->getQualityInComplementSequence(readpos); -// realreadpos=pcrI->calcComplPos(readpos); -// } + base=toupper(actread.getBaseInComplementSequence(readpos)); + qual=actread.getQualityInComplementSequence(readpos); + realreadpos=actread.calcComplPos(readpos); + } + // Bad idea, this is soooo slow compared to the above + //pcrI.getBaseAndQuality(actcontigpos,base,qual); + //base=toupper(base); + //if(rdir<0){ + // realreadpos=actread.calcComplPos(readpos); + //} columnbases.push_back(base); @@ -1449,57 +1458,43 @@ // (con_endreadmarkexclusionarea bases) of (eventually clipped) reads // must be regular read (i.e. not backbone, rail or shortreadmapping - if(!pcrI->isRail() - && !pcrI->isBackbone() - && !pcrI->isCoverageEquivalentRead()){ - if(read_pcrIs_in_col.size() >1) { - if((pcrI->getLSClipoff() >0 - && realreadpos < pcrI->getLSClipoff()+10) - || (pcrI->getRSClipoff() < pcrI->getLenSeq() - && realreadpos > pcrI->getRSClipoff()-10)){ - CEBUG(pcrI->getName()<< ": near seq vec in read, lowering the quality.\n"); + if(likely(!actread.isRail() + && !actread.isBackbone() + && !actread.isCoverageEquivalentRead())){ + if(likely(read_pcrIs_in_col.size() >1)) { + if((actread.getLSClipoff() >0 + && realreadpos < actread.getLSClipoff()+10) + || (actread.getRSClipoff() < actread.getLenSeq() + && realreadpos > actread.getRSClipoff()-10)){ + CEBUG(actread.getName()<< ": near seq vec in read, lowering the quality.\n"); int32 distance; - if(realreadpos < pcrI->getLSClipoff()+10){ - distance=realreadpos-pcrI->getLSClipoff(); + if(realreadpos < actread.getLSClipoff()+10){ + distance=realreadpos-actread.getLSClipoff(); }else{ - distance=pcrI->getRSClipoff()-realreadpos; + distance=actread.getRSClipoff()-realreadpos; } if(qual > distance*2){ qual=distance*2; } - } else if(realreadpos <= pcrI->getLeftClipoff()+con_rt_params.con_endreadmarkexclusionarea - || realreadpos >= pcrI->getRightClipoff()-con_rt_params.con_endreadmarkexclusionarea) { - CEBUG(pcrI->getName()<< ": near end of read, lowering the quality.\n"); + } else if(realreadpos <= actread.getLeftClipoff()+con_rt_params.con_endreadmarkexclusionarea + || realreadpos >= actread.getRightClipoff()-con_rt_params.con_endreadmarkexclusionarea) { + CEBUG(actread.getName()<< ": near end of read, lowering the quality.\n"); #if CPP_READ_SEQTYPE_END != 8 #error "This code is made for 8 sequencing types, adapt!" #endif - switch(pcrI->getSequencingType()){ - case ReadGroupLib::SEQTYPE_SANGER : - case ReadGroupLib::SEQTYPE_454GS20 : - case ReadGroupLib::SEQTYPE_IONTORRENT: - case ReadGroupLib::SEQTYPE_PACBIOHQ : - case ReadGroupLib::SEQTYPE_PACBIOLQ : { + + if(actread.getSequencingType()==ReadGroupLib::SEQTYPE_SOLEXA){ + // decrease by one + if(likely(qual)) --qual; + }else{ + // all other atm if(qual>=10) { qual-=10; } else { qual=5; } - if(qual<5) qual=5; - break; - } - case ReadGroupLib::SEQTYPE_SOLEXA : - case ReadGroupLib::SEQTYPE_ABISOLID : { - // decrease by one - if(qual) qual--; - break; - } - case ReadGroupLib::SEQTYPE_TEXT : { - // intentionally do nothing for text technology - break; - } - default: { - } + if(unlikely(qual<5)) qual=5; } } } @@ -1508,44 +1503,45 @@ // No railreads at all, have been taken out earlier! //// Quality of bases from railreads are set to 0 so as not //// to be counted twice (as bases are the same as in backbone) - //if(pcrI->isRail()) qual=0; + //if(actread.isRail()) qual=0; bool maskedset=false; - // TODO: rework the if(...hasTag(Read::REA_tagFpAS,realreadpos)) + // TODO: rework the if(...hasTag(Read::REA_tagFpas,realreadpos)) // to check for all mask taks in a masktagstring vector // if(maskshadow[actcontigpos]) { // // remember that the readpos computing routine doesn't take care // // of direction, so we have to complement that position in reverse cases // int32 realreadpos=readpos; -// if(pcrI.getReadDirection()<0){ -// realreadpos=pcrI->calcComplPos(readpos); +// if(rdir<0){ +// realreadpos=actread.calcComplPos(readpos); // } // // CEBUG("MASKED: " << actcontigpos << "\t"); -// CEBUG(pcrI->getName() << "\t" << realreadpos << "\t"); -// if(pcrI->hasTag(Read::REA_tagFpAS,realreadpos)) { +// CEBUG(actread.getName() << "\t" << realreadpos << "\t"); +// if(actread.hasTag(Read::REA_tagFpas,realreadpos)) { // CEBUG("in" << endl); // for(uint32 bindex=0; bindex0){ +// maskedshadowgroups[bindex].directions.push_back(rdir); +// if(rdir>0){ // maskedshadowgroups[bindex].hasforwarddir=true; // }else{ // maskedshadowgroups[bindex].hascomplementdir=true; // } // // special case: treat short read mapping as both forward and reverse -// if(pcrI->isCoverageEquivalentRead()){ +// if(actread.isCoverageEquivalentRead()){ // maskedshadowgroups[bindex].hasforwarddir=true; // maskedshadowgroups[bindex].hascomplementdir=true; // } // maskedset=true; +// hasmaskedset=true; // break; // } // } @@ -1553,22 +1549,22 @@ // } - if(maskedset==false) { + if(likely(maskedset==false)) { CEBUG("out" << endl); //for(uint32 bindex=0; bindex0){ + groupe.directions.push_back(rdir); + if(rdir>0){ groupe.forwarddircounter++; }else{ groupe.complementdircounter++; } // special case: treat short read mapping as both forward and reverse - if(pcrI->isCoverageEquivalentRead()){ + if(actread.isCoverageEquivalentRead()){ // we already counted forward //groupe.forwarddircounter++; groupe.complementdircounter++; @@ -1579,13 +1575,18 @@ } } - { +#ifdef CLOCK_STEPS_CONS + CON_us_steps_cons[USCLOCONS_H1_PCRI]+=diffsuseconds(tv); + gettimeofday(&tv,nullptr); +#endif + + if(hasmaskedset){ // check whether there is anything in groups // and maskedshadowgroups selected - // if groups emty and masked not, copy masked to groups + // if groups empty and masked not, copy masked to groups bool groupsempty=true; bool maskedempty=true; - for(uint32 bindex=0; bindex830 && actcontigpos <920) { CEBUG(actcontigpos << "maxqual: " << (uint16) maxqual << "\t" << "maxcount: " << maxcount << endl); //} @@ -1713,12 +1724,21 @@ } } +#ifdef CLOCK_STEPS_CONS + CON_us_steps_cons[USCLOCONS_H1_CALLH2]+=diffsuseconds(tv); + gettimeofday(&tv,nullptr); +#endif + if(!dptools::isValidIUPACStarBase(thisbase)){ CEBUG("ALERT! This is not a valid base: '" << thisbase << "'\t: " << static_cast(thisbase) << '\n'); } } +#ifdef CLOCK_STEPS_CONS + CON_us_steps_cons[USCLOCONS_H1_TOTAL]+=diffsuseconds(tvtotal); +#endif + FUNCEND(); } @@ -1906,15 +1926,20 @@ // Bach: 17.08.2008 // the new strategy of tagging poly-AT sites and keeping them in // the read (no clipping) makes it necessary to keep sequence - // under FpAS tags as full valid member of consensus somputation - // Therefore, FpAS may NOT be put into the masktagstrings anymore! - // masktagstrings.push_back(Read::REA_tagFpAS); + // under Fpas tags as full valid member of consensus somputation + // Therefore, Fpas may NOT be put into the masktagstrings anymore! + // masktagstrings.push_back(Read::REA_tagFpas); buildMaskShadow(maskshadow,masktagstrings,false); mict_shadow=diffsuseconds(us_start); gettimeofday(&us_start,nullptr); + vector cached_contigseqtypes(ReadGroupLib::getNumSequencingTypes(),0); + for(uint32 actseqtype=0; actseqtypegetReadStartOffset()+(*Ifrom)->getLenClippedSeq() > actcontigpos) { - ++Ito; - }else{ - CEBUG("cc thrown out " << *Ito << endl); + for(uint32 actseqtype=0; actseqtypegetReadStartOffset()+(*Ifrom)->getLenClippedSeq() > actcontigpos) { + ++Ito; + }else{ + needcopy=true; + CEBUG("cc thrown out " << *Ito << endl); + } + } + //if(Ito != Ifrom) { + // read_pcrIs_in_col[actseqtype].resize(Ito-read_pcrIs_in_col[actseqtype].begin()); + //} + // PlacedContigReads::const_iterator has no default constructor, + // i.e., resize cannot be used because it wants a default constructor + // though we always reduce the vector here + // but we can use erase() + CEBUG("loopend" << endl); + if(needcopy){ + CEBUG("cc popping " << Ito - Ifrom << " elements\n"); + read_pcrIs_in_col[actseqtype].erase(Ito,Ifrom); } - } - //if(Ito != Ifrom) { - // read_pcrIs_in_col[actreadtype].resize(Ito-read_pcrIs_in_col[actreadtype].begin()); - //} - // TODO: PlacedContigReads::const_iterator has no default constructor, - // i.e., resize cannot be used because it wants a default constructor - // though we always reduce the vector here - // Check whether this is a big time waster (don't think so) - CEBUG("loopend" << endl); - CEBUG("cc popping " << Ito - Ifrom << " elements\n"); - for(; Ifrom != Ito; --Ifrom) { - read_pcrIs_in_col[actreadtype].pop_back(); } } mict_fallout+=diffsuseconds(us_loop); @@ -1985,34 +2016,35 @@ //vector numsolutionsvec(ReadGroupLib::getNumSequencingTypes(),0); uint32 numreadtypeswithsolution=0; - for(uint32 actreadtype=0; actreadtype 0) numreadtypeswithsolution++; - if(predictedbases[actreadtype] != '!') numreadtypeswithsolution++; + if(predictedbases[actseqtype] != '!') numreadtypeswithsolution++; } +#ifndef CLOCK_STEPS_CONS mict_helper1+=diffsuseconds(us_loop); +#endif gettimeofday(&us_loop,nullptr); @@ -2457,12 +2489,23 @@ } mict_totalloop=diffsuseconds(us_start); - cout << "mict_fin " << mict_fin << endl; - cout << "mict_pre " << mict_pre << endl; - cout << "mict_shadow " << mict_shadow << endl; - cout << "mict_fallout " << mict_fallout << endl; + cout << "mict_fin " << mict_fin << endl; + cout << "mict_pre " << mict_pre << endl; + cout << "mict_shadow " << mict_shadow << endl; + cout << "mict_fallout " << mict_fallout << endl; + cout << "mict_newin " << mict_newin << endl; +#ifndef CLOCK_STEPS_CONS + cout << "mict_helper1 " << mict_helper1 << endl; +#else + cout << "mict_helper1 " << CON_us_steps_cons[USCLOCONS_H1_TOTAL] << endl; + cout << " H1_MGROUPS " << CON_us_steps_cons[USCLOCONS_H1_MGROUPS] << endl; + cout << " H1_PCRI " << CON_us_steps_cons[USCLOCONS_H1_PCRI] << endl; + cout << " H1_CP2URP " << CON_us_steps_cons[USCLOCONS_H1_CP2URP] << endl; + cout << " H1_EGROUP " << CON_us_steps_cons[USCLOCONS_H1_EGROUP] << endl; + cout << " H1_GQUAL " << CON_us_steps_cons[USCLOCONS_H1_GQUAL] << endl; + cout << " H1_CALLH2 " << CON_us_steps_cons[USCLOCONS_H1_CALLH2] << endl; +#endif cout << "mict_newin " << mict_newin << endl; - cout << "mict_helper1 " << mict_helper1 << endl; cout << "mict_restofloop " << mict_restofloop << endl; cout << "mict_totalloop " << mict_totalloop << endl; diff -Nru mira-3.9.18/src/mira/contig_edit.C mira-4.0/src/mira/contig_edit.C --- mira-3.9.18/src/mira/contig_edit.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig_edit.C 2014-02-02 12:05:18.000000000 +0000 @@ -58,13 +58,9 @@ #error "This code is made for 8 sequencing types, adapt!" #endif - // TODO: PacBio??? - for(uint32 rgid=0; rgid0 - && (ReadGroupLib::getReadGroupID(rgid).getSequencingType() == ReadGroupLib::SEQTYPE_454GS20 - || ReadGroupLib::getReadGroupID(rgid).getSequencingType() == ReadGroupLib::SEQTYPE_IONTORRENT - || ReadGroupLib::getReadGroupID(rgid).getSequencingType() == ReadGroupLib::SEQTYPE_SOLEXA)) return true; + && ((*CON_miraparams)[ReadGroupLib::getReadGroupID(rgid).getSequencingType()].getEditParams().ed_homopolymer_overcalls)) return true; } return false; @@ -634,20 +630,22 @@ } P.finishAtOnce(); - CEBUG("Generated " << all454editcommands.size() << " 454 edit commands.\n"); - - multitag_t tagPSHP; - tagPSHP.setIdentifierStr("PSHP"); - tagPSHP.source=multitag_t::MT_tagsrcentry_idMIRA; - multitag_t tagR454; - tagR454.setIdentifierStr("R454"); - tagR454.source=multitag_t::MT_tagsrcentry_idMIRA; + CEBUG("Generated " << all454editcommands.size() << " tricky mark/edit commands.\n"); + uint32 retval=all454editcommands.size(); if(all454editcommands.size()) { + uint32 numwedits=0; + static multitag_t tagPSHP; + tagPSHP.setIdentifierStr("PSHP"); + tagPSHP.source=multitag_t::MT_tagsrcentry_idMIRA; + static multitag_t tagR454; + tagR454.setIdentifierStr("R454"); + tagR454.source=multitag_t::MT_tagsrcentry_idMIRA; + if(onlysetPSHPtags){ - cout << "Marking tricky 454 runs in " << all454editcommands.size() << " cases.\n\n"; + cout << "Marking tricky overcall runs in " << all454editcommands.size() << " cases.\n"; }else{ - cout << "Performing 454 edits in " << all454editcommands.size() << " cases.\n\n"; + cout << "Checking for allowed edits in " << all454editcommands.size() << " cases.\n"; } sort(all454editcommands.begin(), all454editcommands.end(), Contig::edit454command_t_comparator); @@ -658,7 +656,12 @@ if(onlysetPSHPtags){ CEBUG("Mark read: " << pcrI->getName()); }else{ - CEBUG("EDIT read: " << pcrI->getName()); + if(((*CON_miraparams)[pcrI->getSequencingType()].getEditParams().ed_homopolymer_overcalls)){ + CEBUG("EDIT read: " << pcrI->getName()); + }else{ + // user does not want edits in this type of reads + continue; + } } CEBUG("\tbase: " << all454editcommands[aeci].base); CEBUG("\tpos: " << all454editcommands[aeci].readpos << endl); @@ -690,6 +693,8 @@ all454editcommands[aeci].readpos, true); + ++numwedits; + // just in case addTag decided to throw ... // too lazy to do it right at the moment try{ @@ -703,6 +708,10 @@ } + if(!onlysetPSHPtags){ + //cout << "Performed " << numwedits << " edits.\n"; + retval=numwedits; + } } cout << "\n"; @@ -710,7 +719,7 @@ FUNCEND(); - return static_cast(all454editcommands.size()); + return retval; } @@ -753,14 +762,17 @@ uint32 maxspan=0; + auto & ed_params = (*CON_miraparams)[ReadGroupLib::SEQTYPE_PACBIOLQ].getContigParams(); + bool lookedatread=false; for(auto & pcrI : pcrIs_in_col){ // do not analyse backbones and rails + // look also at reads the user does not want to have edited ... they can tilt the balance toward the + // right number for those which need an edit! if(pcrI->isBackbone() || pcrI->isRail()) continue; - // or reads that are not from 454 - //|| !pcrI->isSequencingType(ReadGroupLib::SEQTYPE_454GS20)) continue; - + //|| !((*CON_miraparams)[pcrI->getSequencingType()].getEditParams().ed_homopolymer_overcalls)) continue; + lookedatread=true; int32 readpos=pcrI.contigPos2UnclippedReadPos(actcontigpos); @@ -824,141 +836,143 @@ CEBUG("done" << endl); } - CEBUG("Cleanbasehypocolumn: " << cleanbasehypocolumn); - CEBUG("\nsearch zqa\n"); - - // search for maximum count_zeroqualadjusted in trh - // (but not in the zero-length counts) - uint32 maxcountzqa=0; - uint32 maxcountzqa_index=0; - for(uint32 i=0; i to >= favours longer runs with the exact same prediction - // of adjusted reads - if(trh[i].count_zeroqualadjusted>=maxcountzqa){ - maxcountzqa=trh[i].count_zeroqualadjusted; - maxcountzqa_index=i; - } - } - - CEBUG("search higher" << endl); - - uint32 runsatmczqa=static_cast(trh[maxcountzqa_index].seen_pcrIs.size()); - uint32 runslargermczqa=0; - uint32 runswillingtoshorten=0; - uint32 expectedlarger=0; - for(uint32 i=maxcountzqa_index+1; i(trh[i].seen_pcrIs.size()); - expectedlarger+=trh[i].count_zeroqualadjusted; - runswillingtoshorten+=trh[i].count_havezeroqual; - } - bool edit=false; - ostringstream ostr; + if(lookedatread){ + CEBUG("Cleanbasehypocolumn: " << cleanbasehypocolumn); + CEBUG("\nsearch zqa\n"); + + // search for maximum count_zeroqualadjusted in trh + // (but not in the zero-length counts) + uint32 maxcountzqa=0; + uint32 maxcountzqa_index=0; + for(uint32 i=0; i to >= favours longer runs with the exact same prediction + // of adjusted reads + if(trh[i].count_zeroqualadjusted>=maxcountzqa){ + maxcountzqa=trh[i].count_zeroqualadjusted; + maxcountzqa_index=i; + } + } - const uint32 ratiomultiplier=10; - //cout << "TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO \n"; - //cout << "TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO \n"; - //cout << "TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO \n"; - //cout << "Change multiplier back to 10!\n"; - - // General routines destined to get out most annoying things - // start them if edit not triggered previously - if(!edit){ - CEBUG("General rules.\n"); - CEBUG("trh.size(): " << trh.size()); - CEBUG("\nmaxcountzqa_index: " << maxcountzqa_index); - CEBUG("\ncleanbasehypocolumn: " << cleanbasehypocolumn); - CEBUG("\npcrIs_in_col.size(): " << pcrIs_in_col.size()); - CEBUG("\nrunsatmczqa: " << runsatmczqa); - CEBUG('\n'); - - if(trh.size()>maxcountzqa_index+2) { - CEBUG("Funny looking histogram, no edit!\n"); - ostr << "Funny histogram "; - }else{ - if(runslargermczqa>0){ - // we have some kind of overcalls - if(runsatmczqa >= runslargermczqa*5){ - /* if number of runs of probable length > 10x of the higher runs, - edit. E.g. - .....aAAA..... - .....*AAA..... - .....*AAA..... - .....*AAA..... - .....*AAA..... - etc. + CEBUG("search higher" << endl); + + uint32 runsatmczqa=static_cast(trh[maxcountzqa_index].seen_pcrIs.size()); + uint32 runslargermczqa=0; + uint32 runswillingtoshorten=0; + uint32 expectedlarger=0; + for(uint32 i=maxcountzqa_index+1; i(trh[i].seen_pcrIs.size()); + expectedlarger+=trh[i].count_zeroqualadjusted; + runswillingtoshorten+=trh[i].count_havezeroqual; + } + + ostringstream ostr; + + const uint32 ratiomultiplier=10; + //cout << "TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO \n"; + //cout << "TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO \n"; + //cout << "TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO \n"; + //cout << "Change multiplier back to 10!\n"; + + // General routines destined to get out most annoying things + // start them if edit not triggered previously + if(!edit){ + CEBUG("General rules.\n"); + CEBUG("trh.size(): " << trh.size()); + CEBUG("\nmaxcountzqa_index: " << maxcountzqa_index); + CEBUG("\ncleanbasehypocolumn: " << cleanbasehypocolumn); + CEBUG("\npcrIs_in_col.size(): " << pcrIs_in_col.size()); + CEBUG("\nrunsatmczqa: " << runsatmczqa); + CEBUG('\n'); + + if(trh.size()>maxcountzqa_index+2) { + CEBUG("Funny looking histogram, no edit!\n"); + ostr << "Funny histogram "; + }else{ + if(runslargermczqa>0){ + // we have some kind of overcalls + if(runsatmczqa >= runslargermczqa*5){ + /* if number of runs of probable length > 10x of the higher runs, + edit. E.g. + .....aAAA..... + .....*AAA..... + .....*AAA..... + .....*AAA..... + .....*AAA..... + etc. + */ + edit=true; + ostr << "Smoking gun "; + } + } else if(maxcountzqa_index==1 && cleanbasehypocolumn + && pcrIs_in_col.size() >= runsatmczqa*5){ + /* if it's a some unmotivated bases hanging around, being all + the same and less than 10% of the column. E.g. + + Edit Edit No edit + ....TaGGG..... ....TaGGG..... ....TaGGG..... + ....T*GGG..... ....TaGGG..... ....TcGGG..... + ....T*GGG..... ....T*GGG..... ....T*GGG..... + ....T*GGG..... ....T*GGG..... ....T*GGG..... + ....T*GGG..... ....T*GGG..... ....T*GGG..... + etc. etc. etc. */ edit=true; - ostr << "Smoking gun "; + ostr << "Lone ranger "; + maxcountzqa_index=0; } - } else if(maxcountzqa_index==1 && cleanbasehypocolumn - && pcrIs_in_col.size() >= runsatmczqa*5){ - /* if it's a some unmotivated bases hanging around, being all - the same and less than 10% of the column. E.g. - - Edit Edit No edit - ....TaGGG..... ....TaGGG..... ....TaGGG..... - ....T*GGG..... ....TaGGG..... ....TcGGG..... - ....T*GGG..... ....T*GGG..... ....T*GGG..... - ....T*GGG..... ....T*GGG..... ....T*GGG..... - ....T*GGG..... ....T*GGG..... ....T*GGG..... - etc. etc. etc. - */ - edit=true; - ostr << "Lone ranger "; - maxcountzqa_index=0; } } - } - if(edit) { - CEBUG("Editing!\n"); - ostr << "Edit: " << basehypo; - if(trh.size()>maxcountzqa_index+2) { - /* ??? strategie leicht ändern in: wenn auch edits bei - maxcountzqa_index+2, dann erst die */ - ostr << " Caution!"; - CEBUG("CAUTION!\n"); - maxcountzqa_index++; + if(edit) { + CEBUG("Editing!\n"); + ostr << "Edit: " << basehypo; + if(trh.size()>maxcountzqa_index+2) { + /* ??? strategie leicht ändern in: wenn auch edits bei + maxcountzqa_index+2, dann erst die */ + ostr << " Caution!"; + CEBUG("CAUTION!\n"); + maxcountzqa_index++; + } + }else{ + ostr << "No edit."; } - }else{ - ostr << "No edit."; - } - ostr << " PL: " << maxcountzqa_index; // probable length - ostr << " RS: " << runsatmczqa; // reads that are this length - ostr << " RL: " << runslargermczqa; // reads that are larger - ostr << " RWTS: " << runswillingtoshorten; // reads willing to shorten - ostr << " EL: " << expectedlarger; // reads expected to be larger - // after editing + ostr << " PL: " << maxcountzqa_index; // probable length + ostr << " RS: " << runsatmczqa; // reads that are this length + ostr << " RL: " << runslargermczqa; // reads that are larger + ostr << " RWTS: " << runswillingtoshorten; // reads willing to shorten + ostr << " EL: " << expectedlarger; // reads expected to be larger + // after editing - addTagToConsensus(actcontigpos, actcontigpos,'=',"H454",ostr.str().c_str(),true); + addTagToConsensus(actcontigpos, actcontigpos,'=',"H454",ostr.str().c_str(),true); - CEBUG(ostr.str() << '\n'); + CEBUG(ostr.str() << '\n'); - if(edit){ - // current strategy: - // now that we know that we need to shorten a few reads at this - // position, shorten *all* reads larger than the length we determined - // (maxcountzqa_index) by one base (the weakest base). However, the - // base quality of the weakest base now does not need to be 0. + if(edit){ + // current strategy: + // now that we know that we need to shorten a few reads at this + // position, shorten *all* reads larger than the length we determined + // (maxcountzqa_index) by one base (the weakest base). However, the + // base quality of the weakest base now does not need to be 0. - uint32 acttrh=maxcountzqa_index+1; + uint32 acttrh=maxcountzqa_index+1; - // addition: if only marking PSHP runs, mark all reads at that position - if(onlysetPSHPtags){ - acttrh=0; - } + // addition: if only marking PSHP runs, mark all reads at that position + if(onlysetPSHPtags){ + acttrh=0; + } - for(; acttrhgetName() << " " << pcrI->getBaseInSequence(trh[acttrh].realreadpos_of_reads[readnr]) << " (" << trh[acttrh].realbasehypo_of_reads[readnr] << ") at " << trh[acttrh].realreadpos_of_reads[readnr] << endl); - editcommands.push_back(edit454command_t(pcrI, - pcrI.getURDID(), - trh[acttrh].realreadpos_of_reads[readnr], //realreadpos - trh[acttrh].realbasehypo_of_reads[readnr]) //realbasehypo - ); - ++readnr; + for(; acttrhgetName() << " " << pcrI->getBaseInSequence(trh[acttrh].realreadpos_of_reads[readnr]) << " (" << trh[acttrh].realbasehypo_of_reads[readnr] << ") at " << trh[acttrh].realreadpos_of_reads[readnr] << endl); + editcommands.push_back(edit454command_t(pcrI, + pcrI.getURDID(), + trh[acttrh].realreadpos_of_reads[readnr], //realreadpos + trh[acttrh].realbasehypo_of_reads[readnr]) //realbasehypo + ); + ++readnr; + } } } } @@ -976,18 +990,28 @@ /************************************************************************* * + * Performs edits on bases in reads which lack a HAF2-7 (or HAF3-7) tag * - * + * editmode: + * 0 : very conservative, only columns with a single discrepancy + * 1 : conservative, only columns where non-consensus bases occur once + * 2 : slightly less conservative: edits where consensus base 8 times more + * frequent than non-cons base + * 3 : like 2, but also edits bases with count <=2 and a HAF2 tag which + * is directly bordered by HAF3-7 tags + * NOT SUITED FOR EST/RNASEQ assemblies!!! * *************************************************************************/ //#define CEBUG(bla) {cout << bla; cout.flush();} -uint32 Contig::editSingleDiscrepancyNoHAFTag(vector & readsmarkedsrm) +uint32 Contig::editSingleDiscrepancyNoHAFTag(vector & readsmarkedsrm, uint8 editmode) { FUNCSTART("uint32 Contig::editSingleDiscrepancyNoHAFTag(vector & readsmarkedsrm)"); + if(editmode>3) editmode=3; + cout << "\nSearching for single discr. without HAF tags:\n"; uint32 numedits=0; @@ -1045,6 +1069,7 @@ } + vector allowededits(6); vector basecounter(6); { static const string bases="ACGT*N"; @@ -1104,7 +1129,7 @@ char base; int32 readpos=tpcrI.contigPos2UnclippedReadPos(actcontigpos); - CEBUG("read: " << tpcrI->getName() << '\n'); + //CEBUG("read: " << tpcrI->getName() << '\n'); //int32 realreadpos; if(tpcrI.getReadDirection() > 0){ @@ -1126,10 +1151,14 @@ CEBUG("bc["<=0 int32 maxi=-1; - // singlei = index of single base if >=0 - int32 singlei=-1; + + uint32 nddb=0; // num different discrepancy bases for(uint32 bci=0; bci=0){ @@ -1138,64 +1167,123 @@ } maxi=bci; } - if(basecounter[bci].counter==1) { - if(singlei>=0){ - singlei=-1; - break; + if(editmode <=1){ + if(basecounter[bci].counter==1) { + allowededits[bci]=1; + ++nddb; + } + }else if(editmode==2){ + if(basecounter[bci].counter>0 && basecounter[bci].counter*8 < maxcount) { + allowededits[bci]=1; + ++nddb; } - singlei=bci; + }else if(editmode==3){ + if(basecounter[bci].counter>0 && basecounter[bci].counter<=2 && basecounter[bci].counter*8 < maxcount) { + allowededits[bci]=1; + ++nddb; + } + }else{ + MIRANOTIFY(Notify::INTERNAL,"unknown editmode " << static_cast(editmode)); } } - CEBUG("mc: " << maxcount << "\tsi: " << singlei << "\tmi: " << maxi << endl); + CEBUG("mc: " << maxcount << "\tmi: " << maxi << "\tnddb: " << nddb << '\t'); + for(uint32 bci=0;bci(allowededits[bci]) << ' '); + } + CEBUG(endl); - if(maxi>=0 && singlei>=0){ - char repbase=static_cast(tolower(basecounter[maxi].base)); + if(maxi<0 + || (editmode==0 && nddb>1)) continue; - for(auto & tpcrI : rcci.getPCRIsInCol()){ - if(tpcrI->isSequencingType(ReadGroupLib::SEQTYPE_PACBIOLQ)) continue; + char repbase=static_cast(tolower(basecounter[maxi].base)); - int32 readpos=tpcrI.contigPos2UnclippedReadPos(actcontigpos); + for(auto & tpcrI : rcci.getPCRIsInCol()){ + if(tpcrI->isSequencingType(ReadGroupLib::SEQTYPE_PACBIOLQ)) continue; - CEBUG("read: " << tpcrI->getName() << '\n'); + int32 readpos=tpcrI.contigPos2UnclippedReadPos(actcontigpos); - char base; - int32 realreadpos; - if(tpcrI.getReadDirection() > 0){ - base=static_cast(toupper(tpcrI->getBaseInSequence(readpos))); - realreadpos=readpos; - }else{ - base=static_cast(toupper(tpcrI->getBaseInComplementSequence(readpos))); - realreadpos=tpcrI->calcComplPos(readpos); + CEBUG("read: " << tpcrI->getName()); + + char base; + int32 realreadpos; + if(tpcrI.getReadDirection() > 0){ + base=static_cast(toupper(tpcrI->getBaseInSequence(readpos))); + realreadpos=readpos; + }else{ + base=static_cast(toupper(tpcrI->getBaseInComplementSequence(readpos))); + realreadpos=tpcrI->calcComplPos(readpos); + } + + CEBUG('\t' << base); + + // not optimal regarding speed, but let's not care atm + bool docheck=false; + for(uint32 bci=0;bcihasTag(Read::REA_tagentry_idHAF3,realreadpos); - if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF4,realreadpos); - if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF5,realreadpos); - if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF6,realreadpos); - if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF7,realreadpos); - - if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF2,realreadpos); - - if(!foundtag){ - if(tpcrI.getReadDirection() > 0){ - const_cast(*tpcrI).changeBaseInSequence(repbase,0,realreadpos); - }else{ - const_cast(*tpcrI).changeBaseInSequence(dptools::getComplementIUPACBase(repbase),0,realreadpos); - } - // replacing with a gap? technically, it's a deletion followed by an insertion - // therefore, the adjustment must be ... errr ... adjusted - if(repbase=='*' && tpcrI->usesAdjustments()){ - const_cast(*tpcrI).changeAdjustment(realreadpos,-1); + if(docheck){ + CEBUG("\tcheck"); + + bool doedit=false; + // not optimal regarding speed, but let's not care atm + bool foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF3,realreadpos); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF4,realreadpos); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF5,realreadpos); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF6,realreadpos); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF7,realreadpos); + + bool foundtag2=tpcrI->hasTag(Read::REA_tagentry_idHAF2,realreadpos); + + if(!(foundtag||foundtag2)){ + // no HAF tag at all + doedit=true; + }else if(editmode==3 && !foundtag && foundtag2){ + // HAF2 tag, check left and right for HAF3-7 + CEBUG("\tcheckh2"); + bool h2ok=false; + if(realreadpos>0){ + auto rrp2=realreadpos-1; + foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF3,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF4,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF5,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF6,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF7,rrp2); + + rrp2+=2; + if(foundtag && rrp2 < tpcrI->getLenSeq()){ + foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF3,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF4,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF5,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF6,rrp2); + if(!foundtag) foundtag=tpcrI->hasTag(Read::REA_tagentry_idHAF7,rrp2); + + if(foundtag){ + doedit=true; + } } - addTagToConsensus(actcontigpos, actcontigpos,'=',"ESDN","",true); - ++numedits; - break; } } + if(doedit){ + CEBUG("\tdoedit"); + if(tpcrI.getReadDirection() > 0){ + const_cast(*tpcrI).changeBaseInSequence(repbase,0,realreadpos); + }else{ + const_cast(*tpcrI).changeBaseInSequence(dptools::getComplementIUPACBase(repbase),0,realreadpos); + } + // replacing with a gap? technically, it's a deletion followed by an insertion + // therefore, the adjustment must be ... errr ... adjusted + if(repbase=='*' && tpcrI->usesAdjustments()){ + const_cast(*tpcrI).changeAdjustment(realreadpos,-1); + } + addTagToConsensus(actcontigpos, actcontigpos,'=',"ESDN","",true); + ++numedits; + } } + CEBUG(endl); } } } @@ -1207,6 +1295,7 @@ FUNCEND(); return numedits; } +//#define CEBUG(bla) diff -Nru mira-3.9.18/src/mira/contig_featureinfo.C mira-4.0/src/mira/contig_featureinfo.C --- mira-3.9.18/src/mira/contig_featureinfo.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig_featureinfo.C 2014-02-02 12:05:18.000000000 +0000 @@ -25,8 +25,6 @@ */ -#include - #include "contig.H" #include "io/annotationmappings.H" diff -Nru mira-3.9.18/src/mira/contig_output.C mira-4.0/src/mira/contig_output.C --- mira-3.9.18/src/mira/contig_output.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/contig_output.C 2014-02-02 12:05:18.000000000 +0000 @@ -102,21 +102,6 @@ << setw(12) << CON_nummergedreads_perseqtype[0] << setw(12) << CON_nummergedreads_perseqtype[1]; - ostr << "\nAvg. read len\t"; - for(uint32 i=0;i0){ - if(i==ReadGroupLib::SEQTYPE_SOLEXA){ - ostr << setw(12) << CON_stats.readlenperst[i]/(CON_stats.readsperst[i]+CON_nummergedreads_perseqtype[0]); - }else if(i==ReadGroupLib::SEQTYPE_ABISOLID){ - ostr << setw(12) << CON_stats.readlenperst[i]/(CON_stats.readsperst[i]+CON_nummergedreads_perseqtype[1]); - }else{ - ostr << setw(12) << CON_stats.readlenperst[i]/CON_stats.readsperst[i]; - } - }else{ - ostr << setw(12) << 0; - } - } - ostr << "\nMax. coverage\t"; for(uint32 i=0;i(CON_counts.size()) -// ,false,false); - - // for each readgroup present, dump the readgrouplib info // using the "save" so as not to dump readgroups multiple times - for(uint32 rgi=0; rgi0){ - ReadGroupLib::saveReadGroupAsMAF(rgi,ostr); - } - } + // + // because of SAM conversion woes (the MIRA sam converter does not like + // definition of new readgroups when reads were already defined), do + // this for all know readgroups, not only the ones we have in this contig + + ReadGroupLib::saveAllReadGroupsAsMAF(ostr); Read::setCoutType(Read::AS_MAF); @@ -1376,17 +1354,31 @@ // CIGAR, seq & qual string { - const char * seqptr=pcrI->getClippedSeqAsChar(); + // Calculate preceeding 'S' statement (if any) + // Cannot use the left and right clips as these may contain gaps! + // E.g.: through post alignment clipping + // Need to do this the hard way, i.e., walk and count. + + const char * seqptr=nullptr; + int32 needwalk=0; if(pcrI.getReadDirection()>0){ + seqptr=pcrI->getSeqAsChar(); if(pcrI->getLeftClipoff()){ - ostr << pcrI->getLeftClipoff() << 'S'; + needwalk=pcrI->getLeftClipoff(); } }else{ - seqptr=pcrI->getClippedComplementSeqAsChar(); + seqptr=pcrI->getComplementSeqAsChar(); if(pcrI->getLenSeq()-pcrI->getRightClipoff()>0){ - ostr << pcrI->getLenSeq()-pcrI->getRightClipoff() << 'S'; + needwalk=pcrI->getLenSeq()-pcrI->getRightClipoff(); } } + const char * endptr=seqptr+pcrI->getLenSeq(); + + uint32 scount=0; + for(; needwalk>0; --needwalk, ++seqptr){ + if(*seqptr != '*') ++scount; + } + if(scount>0) ostr << scount << "S"; uint32 mcount=0; uint32 dcount=0; @@ -1412,15 +1404,13 @@ ostr << mcount << "M"; } - if(pcrI.getReadDirection()>0){ - if(pcrI->getLenSeq()-pcrI->getRightClipoff()>0){ - ostr << pcrI->getLenSeq()-pcrI->getRightClipoff() << 'S'; - } - }else{ - if(pcrI->getLeftClipoff()){ - ostr << pcrI->getLeftClipoff() << 'S'; - } + // trailing S (if needed) + // again, cannot use clips, must walk. + scount=0; + for(; seqptr!=endptr; ++seqptr){ + if(*seqptr != '*') ++scount; } + if(scount>0) ostr << scount << "S"; } ostr << '\t' << samc.getRNextEntry(samri) @@ -2437,7 +2427,7 @@ } eout << "readgroups known:\n"; - ReadGroupLib::dumpReadGroupsAsMAF(eout); + ReadGroupLib::dumpAllReadGroupsAsMAF(eout); eout << "\n\nOffending read:\n" << CON_readpool->getRead(newid) << endl @@ -2527,7 +2517,11 @@ FUNCSTART("void Contig::debugDump()"); cout << "Contig::debugDump()" << endl; - //CON_counts.debugDumpDeep(); + uint32 cci=0; + for(auto & cce : CON_counts){ + cout << "cci: " << cci << cce << '\n'; + ++cci; + } FUNCEND(); } diff -Nru mira-3.9.18/src/mira/contig_pairconsistency.C mira-4.0/src/mira/contig_pairconsistency.C --- mira-3.9.18/src/mira/contig_pairconsistency.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/contig_pairconsistency.C 2014-02-02 12:05:18.000000000 +0000 @@ -35,17 +35,21 @@ { FUNCSTART("void Contig::checkPairConsistency()"); - pair ret(0,getContigLength()); +#define MAXINSIZETOCHECK 80000 - if(getContigLength()==0) return ret; + pair retval(0,getContigLength()); + + //return retval; + + if(getContigLength()==0) return retval; - bool runpeakfinder=false; vector rgtocheck; for(uint32 rgi=1; rgi=0 + && rgid.getInsizeTo()>=0){ rgtocheck.push_back(rgid); - if(rgid.getInsizeTo()>=0 && rgid.getInsizeTo()<=1000) runpeakfinder=true; } } @@ -57,17 +61,103 @@ vector > valleydepths(rgtocheck.size()); vector > peakheights(rgtocheck.size()); + bool hascuts=false; + + // create vectors with coverage data auto spanner12=spanner; auto nonspanner=spanner; for(auto rgi=0; rgi=0 && rgtocheck[rgi].getInsizeTo()<=MAXINSIZETOCHECK){ + // We won't search here, just need some numbers for the + // correct threshold in non-spanner down below + tmpforstats=spanner12[rgi]; + + coverageinfo_t tci; + calcStatsOnContainer(tci,tmpforstats); + cout << "spanner12 - normal:\n" << tci << endl; + calcSecondOrderStatsOnContainer(tci,tmpforstats); + cout << "spanner12 - 2n:\n" << tci << endl; + + uint64 nsthreshold=tci.mean/4; + + tmpforstats=nonspanner[rgi]; + calcStatsOnContainer(tci,tmpforstats); + cout << "nonspanner - normal:\n" << tci << endl; + calcSecondOrderStatsOnContainer(tci,tmpforstats); + cout << "nonspanner - 2n:\n" << tci << endl; + + bool inpeak=false; + auto vsI=nonspanner[rgi].cbegin(); + uint64 pos=0; + uint64 threshold=nsthreshold; + if(tci.mean*10>threshold) threshold=tci.mean*10; + + uint64 firsttpos=1; + uint64 lasttpos=getContigLength()-1; + + cout << "threshold=" << threshold << endl; + cout << "ftp: " << firsttpos << endl; + cout << "ltp: " << lasttpos << endl; + for(auto sI=nonspanner[rgi].cbegin(); sI!=nonspanner[rgi].cend(); ++sI, ++pos){ + bool peakstop=false; + if(pos=lasttpos){ + if(inpeak) { + peakstop=true; + }else{ + break; + } + } + if(inpeak){ + if(*sIthreshold){ + inpeak=true; + vsI=sI; + } + } + if(peakstop){ + auto veI=sI; + cout << "Potential peak: " << vsI-nonspanner[rgi].cbegin() << "\t" << veI-nonspanner[rgi].cbegin() << "\t" << veI-vsI << endl; + if(veI-nonspanner[rgi].cbegin() <= rgtocheck[rgi].getInsizeTo()){ + cout << "Near front, skip.\n"; + }else if(nonspanner[rgi].cend()-vsI <= rgtocheck[rgi].getInsizeTo()){ + cout << "Near end, skip.\n"; + }else{ + auto maxval=*vsI; + for(auto tI=vsI; tImaxval) maxval=*tI; + } + for(auto tI=vsI; tI= 0 && vstart-phe < peakvalleydist) + || (phe >= vstart && phe <= vstop) + || (phe-vstop>=0 && phe-vstop < peakvalleydist)){ + ++confirmedbypeak; + cout << "confirmedbypeak " << phe << endl; + phe=-1; } } - } - } - } - } - - if(runpeakfinder){ - // but search peaks only in areas not covered by found valleys - // create a peakmasker for this - vector peakmasker(getContigLength(),0); - for(auto rgi=0; rgigetContigLength()) to=getContigLength(); - for(; from=0 && rgtocheck[rgi].getInsizeTo()<=1000){ - // We won't search here, just need some numbers for the - // correct threshold in non-spanner down below - tmpforstats=spanner12[rgi]; - - coverageinfo_t tci; - calcStatsOnContainer(tci,tmpforstats); - cout << "spanner12 - normal:\n" << tci << endl; - calcSecondOrderStatsOnContainer(tci,tmpforstats); - cout << "spanner12 - 2n:\n" << tci << endl; - - uint64 nsthreshold=tci.mean/2; - - tmpforstats=nonspanner[rgi]; - calcStatsOnContainer(tci,tmpforstats); - cout << "nonspanner - normal:\n" << tci << endl; - calcSecondOrderStatsOnContainer(tci,tmpforstats); - cout << "nonspanner - 2n:\n" << tci << endl; - - bool inpeak=false; - auto vsI=nonspanner[rgi].cbegin(); - uint64 pos=0; - uint64 threshold=nsthreshold; - if(tci.mean*6>threshold) threshold=tci.mean*6; - - uint64 firsttpos=1; - uint64 lasttpos=getContigLength()-1; - - cout << "threshold=" << threshold << endl; - cout << "ftp: " << firsttpos << endl; - cout << "ltp: " << lasttpos << endl; - for(auto sI=nonspanner[rgi].cbegin(); sI!=nonspanner[rgi].cend(); ++sI, ++pos){ - bool peakstop=false; - if(pos=lasttpos){ - if(inpeak) { - peakstop=true; - }else{ - break; - } - } - if(inpeak){ - if(*sIthreshold){ - inpeak=true; - vsI=sI; + if(confirmedbypeak){ + // temove all -1 entries in this area as the valley will give better cutting places + // yeah, remove_if with a lambda, but let's wait a bit more so that newer C++ + // compilers get a broader base + for(auto phI=peakheights[rgi].begin(); phI!=peakheights[rgi].end();){ + if(*phI==-1) { + phI=peakheights[rgi].erase(phI); + }else{ + ++phI; + } } - } - if(peakstop){ - auto veI=sI; - cout << "New potential peak: " << vsI-nonspanner[rgi].cbegin() << "\t" << veI-nonspanner[rgi].cbegin() << "\t" << veI-vsI << endl; - auto maxval=*vsI; + + auto minval=*vsI; for(auto tI=vsI; tImaxval) maxval=*tI; + if(*tIgetContigLength()) to=getContigLength(); - for(; fromgetContigLength()) to=getContigLength(); + for(; from(breakmarker[bmi]); - if(inrange){ - if(breakmarker[bmi]) { - //cout << " stop range"; - tpair.second=bmi; - if(tpair.second-tpair.first > ret.second-ret.first){ - ret=tpair; - //cout << " best"; + // last step: find longest range without problems + retval.first=0; + retval.second=1; + auto tpair=retval; + bool inrange=!breakmarker[0]; + if(inrange) tpair.first=0; + for(int32 bmi=0; bmi(breakmarker[bmi]); + if(inrange){ + if(breakmarker[bmi]) { + //cout << " stop range"; + tpair.second=bmi; + if(tpair.second-tpair.first > retval.second-retval.first){ + retval=tpair; + //cout << " best"; + } + inrange=false; + } + }else{ + if(!breakmarker[bmi]) { + //cout << " starting range"; + inrange=true; + tpair.first=bmi; } - inrange=false; - } - }else{ - if(!breakmarker[bmi]) { - //cout << " starting range"; - inrange=true; - tpair.first=bmi; } + //cout << "\n"; } - //cout << "\n"; - } - if(inrange){ - tpair.second=getContigLength(); - if(tpair.second-tpair.first > ret.second-ret.first){ - ret=tpair; + if(inrange){ + tpair.second=getContigLength(); + if(tpair.second-tpair.first > retval.second-retval.first){ + retval=tpair; + } } } } - CEBUG("returning ret: " << ret.first << "\t" << ret.second << endl); - return ret; + CEBUG("returning ret: " << retval.first << "\t" << retval.second << endl); + return retval; } #define CEBUG(bla) @@ -302,7 +332,8 @@ || pcrI->isRail() || pcrI->isCoverageEquivalentRead()) continue; - opcrI=CON_reads.getIteratorOfReadpoolID(pcrI->getTemplatePartnerID()); + auto tpid=pcrI->getTemplatePartnerID(); + opcrI=CON_reads.getIteratorOfReadpoolID(tpid); bool tpartnerincontig=opcrI!=crE; //CEBUG("Looking at " << pcrI.getORPID() << "\t" << pcrI->getName() << endl); //CEBUG(pcrI->isBackbone() << '\t' << pcrI->isRail() << '\t' << pcrI->isCoverageEquivalentRead() << '\t' << pcrI->hasTemplateInfo() << '\t' << pcrI->getTemplatePartnerID() << '\t' << tpartnerincontig << endl); @@ -313,18 +344,55 @@ auto start2=opcrI.getReadStartOffset(); auto end2=start2+opcrI->getLenClippedSeq(); - auto start=min(start1,start2); - auto end=max(end1,end2); - - for(auto * ptr=&spanner[start]; ptr!=&spanner[end]; ++ptr) *ptr+=1; - for(auto * ptr=&spanner12[start1]; ptr!=&spanner12[end1]; ++ptr) *ptr+=1; - for(auto * ptr=&spanner12[start2]; ptr!=&spanner12[end2]; ++ptr) *ptr+=1; + if(start1<=start2){ + int64 addval=2; + if(start1==start2) addval=1; + + auto start=min(start1,start2); + auto end=max(end1,end2); + + for(auto * ptr=&spanner[start]; ptr!=&spanner[end]; ++ptr) *ptr+=addval; + for(auto * ptr=&spanner12[start1]; ptr!=&spanner12[end1]; ++ptr) *ptr+=addval; + for(auto * ptr=&spanner12[start2]; ptr!=&spanner12[end2]; ++ptr) *ptr+=addval; + } }else{ - auto start=pcrI.getReadStartOffset(); - auto end=start+pcrI->getLenClippedSeq(); - for(auto * ptr=&nonspanner[start]; ptr!=&nonspanner[end]; ++ptr) *ptr+=1; + // template partner not in contig + // + // but maybe the template partner was completely clipped away? + // then this read would not be a non-spanner, just a paired read + // which became a single read. How to treat this? + // TODO: cleanest solution: after loading / clipping, move + // widowed reads into own readgroup + // + // for the time being, just make a small workaround: if clipped + // length of partner <25, do not treat it as non-spanner + + bool isnonspanner=true; + + if(tpid>=0){ + if(!CON_readpool->getRead(tpid).hasValidData() + || CON_readpool->getRead(tpid).getLenClippedSeq()<=25){ + isnonspanner=false; + } + } + + if(isnonspanner){ + auto start=pcrI.getReadStartOffset(); + auto end=start+pcrI->getLenClippedSeq(); + for(auto * ptr=&nonspanner[start]; ptr!=&nonspanner[end]; ++ptr) *ptr+=1; + } } } + + // hacky hack + // templates having both reads in a contig should be counted only once and the + // "if(start1<=start2)" takes care of most cases ... but not when templates start + // at the same position. + // therefore, in the loop above the standard add is +2 for templates not starting + // at same position and +1 at same position (but these will run twice) + // aftererwards (well, here), we divide by 2 and get back what we want + for(auto & se : spanner) se/=2; + for(auto & se : spanner12) se/=2; } #define CEBUG(bla) diff -Nru mira-3.9.18/src/mira/dataprocessing.C mira-4.0/src/mira/dataprocessing.C --- mira-3.9.18/src/mira/dataprocessing.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/dataprocessing.C 2014-02-02 12:05:18.000000000 +0000 @@ -28,14 +28,16 @@ // currently in namespace and object assembly -#include "boost/unordered_map.hpp" +#include "mira/dataprocessing.H" + +#include #include #include +#include + -#include "assembly.H" -#include "dataprocessing.H" -#include "hashstats.H" -#include +#include "mira/assembly.H" +#include "mira/hashstats.H" using namespace std; @@ -69,7 +71,7 @@ } -DataProcessing::DataProcessing(std::vector * params) : DP_miraparams_ptr(params), DP_tmpmtpolyAT(Read::REA_defaulttag_SOFApolyA_signal_sequence) +DataProcessing::DataProcessing(std::vector * params) : DP_miraparams_ptr(params), DP_tmpmtpolyAT(Read::REA_defaulttag_SOFApolyA_sequence) { DP_threadid=-1; DP_tmpvu8.reserve(16300); // bit less than 16kb @@ -513,7 +515,7 @@ if(addedsomething){ string dummyfn; - DP_phix174hashstatistics.prepareHashStatistics((*DP_miraparams_ptr)[0].getDirectoryParams().dir_tmp,baitrp,false,false,true,true,1,31,dummyfn); + DP_phix174hashstatistics.prepareHashStatistics((*DP_miraparams_ptr)[0].getDirectoryParams().dir_tmp,baitrp,false,false,true,true,1,31,1,false,dummyfn); boost::mutex tmpm; boost::mutex::scoped_lock lock(tmpm); DP_px174hs_init=true; @@ -751,7 +753,136 @@ if(rp.size()>500000) cout << " (this may take a while)"; cout << " ... "; cout.flush(); - multitag_t tmpmt("","","MIRA"); + for(uint32 actid=0; actid::const_iterator bhsI=actread.getBPosHashStats().begin(); + vector::const_iterator bhsE=actread.getBPosHashStats().end(); + vector::iterator tfI=DP_tmpvu8.begin(); + vector::iterator tfE=DP_tmpvu8.end(); + + priv_buntifyHelper(2, basesperhash, bhsI, bhsE, tfI, tfE); + priv_buntifyHelper(3, basesperhash, bhsI, bhsE, tfI, tfE); + priv_buntifyHelper(4, basesperhash, bhsI, bhsE, tfI, tfE); + priv_buntifyHelper(5, basesperhash, bhsI, bhsE, tfI, tfE); + priv_buntifyHelper(6, basesperhash, bhsI, bhsE, tfI, tfE); + priv_buntifyHelper(7, basesperhash, bhsI, bhsE, tfI, tfE); + + vector telist; + telist.reserve(20); + + //{ + // cout << "bfr: " << actread.getName() << endl; + // for(uint32 i=0;i(DP_tmpvu8[i]) << endl; + // } + //} + + uint32 from=0; + uint32 to=0; + for(; from0){ + telist.resize(telist.size()+1); + telist.back().from=from; + telist.back().to=to; + telist.back().freq=actfreq; + } + } + + // for first or last entry, do not put tags for frequencies + // >=2 if their length is < basesperhash + // BaCh 03.06.2011: hmmm, why not. OK, makes CAF/MAF bigger, but else? + for(uint32 ti=0; ti=2 && +// (ti==0 || ti==telist.size()-1)){ +// if(telist[ti].to - telist[ti].from < basesperhash-1){ +// settag=false; +// } +// } + if(settag) { + tmpmt.identifier=DP_freqnames[telist[ti].freq]; + tmpmt.from=telist[ti].from; + tmpmt.to=telist[ti].to; + actread.addTagO(tmpmt); + } + } + } + +} +//#define CEBUG(bla) + + +void DataProcessing::priv_buntifyHelper(uint8 allowedfreq, uint8 basesperhash, vector::const_iterator bhsI, vector::const_iterator bhsE, vector::iterator tfI, vector::iterator tfE) +{ + for(; bhsI!= bhsE; bhsI++, tfI++){ + uint8 actfreq=bhsI->fwd.getFrequency(); + if(allowedfreq==actfreq){ + if(actfreq>0){ + vector::iterator ttfI=tfI; + for(uint32 i=0; i500000) cout << " (this may take a while)"; + cout << " ... "; cout.flush(); + + static multitag_t tmpmt("","","MIRA"); + tmpmt.identifier=Read::REA_tagentry_idKMRF; for(uint32 actid=0; actid::const_iterator bhsI=actread.getBPosHashStats().begin(); - vector::const_iterator bhsE=actread.getBPosHashStats().end(); - vector::iterator tfI=DP_tmpvu8.begin(); - vector::iterator tfE=DP_tmpvu8.end(); - - priv_buntifyHelper(2, basesperhash, bhsI, bhsE, tfI, tfE); - priv_buntifyHelper(3, basesperhash, bhsI, bhsE, tfI, tfE); - priv_buntifyHelper(4, basesperhash, bhsI, bhsE, tfI, tfE); - priv_buntifyHelper(5, basesperhash, bhsI, bhsE, tfI, tfE); - priv_buntifyHelper(6, basesperhash, bhsI, bhsE, tfI, tfE); - priv_buntifyHelper(7, basesperhash, bhsI, bhsE, tfI, tfE); - - vector telist; - telist.reserve(20); - - //{ - // cout << "bfr: " << actread.getName() << endl; - // for(uint32 i=0;i(DP_tmpvu8[i]) << endl; - // } - //} + auto bhsI=actread.getBPosHashStats().cbegin(); + auto bhsE=actread.getBPosHashStats().cend(); + auto tfI=DP_tmpvu8.begin(); + auto tfE=DP_tmpvu8.end(); + + for(; bhsI!= bhsE; bhsI++, tfI++){ + if(bhsI->fwd.isKMerFork()){ + auto ttfI=tfI; + for(uint32 i=0; irev.isKMerFork()){ + auto ttfI=tfI; + for(uint32 i=0; i0){ - telist.resize(telist.size()+1); - telist.back().from=from; - telist.back().to=to; - telist.back().freq=actfreq; - } - } - - // for first or last entry, do not put tags for frequencies - // >=2 if their length is < basesperhash - // BaCh 03.06.2011: hmmm, why not. OK, makes CAF/MAF bigger, but else? - for(uint32 ti=0; ti=2 && -// (ti==0 || ti==telist.size()-1)){ -// if(telist[ti].to - telist[ti].from < basesperhash-1){ -// settag=false; -// } -// } - if(settag) { - tmpmt.identifier=DP_freqnames[telist[ti].freq]; - tmpmt.from=telist[ti].from; - tmpmt.to=telist[ti].to; + if(DP_tmpvu8[to]){ + for(; to::const_iterator bhsI=actread.getBPosHashStats().begin(); - vector::const_iterator bhsE=actread.getBPosHashStats().end(); - vector::iterator tfI=DP_tmpvu8.begin(); - vector::iterator tfE=DP_tmpvu8.end(); + cout << "Adding RMB tags by fork"; + if(rp.size()>500000) cout << " (this may take a while)"; + cout << " ... "; cout.flush(); - for(uint8 il=2; il<8; ++il){ - priv_buntifyHelper(il, basesperhash, bhsI, bhsE, tfI, tfE); + for(uint32 actid=0; actid telist; - telist.reserve(20); + cout << "done." << endl; - uint32 from=0; - uint32 to=0; - for(; from0){ - telist.resize(telist.size()+1); - telist.back().from=from; - telist.back().to=to; - telist.back().freq=actfreq; - } - } + FUNCEND(); - // for first or last entry, do not put tags for frequencies - // >=2 if their length is < basesperhash - // BaCh 03.06.2011: hmmm, why not. OK, makes CAF/MAF bigger, but else? - for(uint32 ti=0; ti::const_iterator bhsI, vector::const_iterator bhsE, vector::iterator tfI, vector::iterator tfE) +void DataProcessing::performKMERRepeatTagging_Read(Read & actread, uint8 basesperhash) { - for(; bhsI!= bhsE; bhsI++, tfI++){ - uint8 actfreq=bhsI->fwd.getFrequency(); - if(allowedfreq==actfreq){ - if(actfreq>0){ - vector::iterator ttfI=tfI; - for(uint32 i=0; i= 2*basesperhash){ + + static multitag_t tmpmt("","addBla","MIRA"); + tmpmt.identifier=Read::REA_tagentry_idCRMr; + + DP_tmpvu8.clear(); + DP_tmpvu8.resize(actread.getLenSeq(),0); + + auto bhsE=actread.getBPosHashStats().cend(); + auto bhsIf=actread.getBPosHashStats().cbegin(); + uint32 tagpos=basesperhash-1; + auto bhsIr=bhsIf+2*tagpos; + auto tfI=DP_tmpvu8.begin()+tagpos; + + + for(; bhsIr!= bhsE; ++bhsIf, ++bhsIr, ++tfI, ++tagpos){ + if(bhsIf->fwd.isKMerFork() + && bhsIr->rev.isKMerFork()){ + *tfI=1; + } + } + + uint32 runcount=0; + for(tfI=DP_tmpvu8.begin(); tfI!=DP_tmpvu8.end(); ++tfI){ + if(*tfI){ + ++runcount; + }else{ + if(runcount==1){ + tmpmt.from=tfI-1-DP_tmpvu8.begin(); + tmpmt.to=tmpmt.from; + actread.addTagO(tmpmt); } + runcount=0; } } } } - /************************************************************************* * * @@ -1478,7 +1585,10 @@ /************************************************************************* * * clip poly-A in forward and poly-T in reverse direction - * or: clip only after the poly-stretches, and tag the stretches with FpAS + * or: clip only after the poly-stretches, and tag the stretches with Fpas + * + * If poly stretches are kept, they are also "cleaned", i.e., bases are + * forced to be A (or T) in the detected stretch * *************************************************************************/ @@ -1509,16 +1619,21 @@ uint32 mincount=as_params.as_clip_polyat_len; uint32 maxbad=as_params.as_clip_polyat_maxerrors; int32 grace=static_cast(as_params.as_clip_polyat_maxgap); - bool keepsignal=as_params.as_clip_polyat_keeppolysignal; + bool keepstretch=as_params.as_clip_polyat_keeppolystretch; // search poly-a in forwarddirection { int32 lpolystart=-1; int32 rpolyend=-1; if(searchPolyBaseFrom5Prime(actread,'a',lpolystart,rpolyend,mincount,maxbad,grace)){ - if(keepsignal){ + if(keepstretch){ actread.setRMClipoff(rpolyend+1); CEBUG("setting rm " << rpolyend+1 << endl); + for(auto i=lpolystart; i<=rpolyend; ++i){ + if(toupper(actread.getBaseInSequence(i))!='A'){ + actread.changeBaseInSequence('a',0,i); + } + } }else{ actread.setRMClipoff(lpolystart); CEBUG("setting rm " << lpolystart << endl); @@ -1543,9 +1658,14 @@ int32 rpolyend=-1; if(searchPolyBaseFrom3Prime(actread,'t',lpolystart,rpolyend,mincount,maxbad,grace)){ - if(keepsignal){ + if(keepstretch){ actread.setLMClipoff(lpolystart); CEBUG("setting lm " << lpolystart << endl); + for(auto i=lpolystart; i<=rpolyend; ++i){ + if(toupper(actread.getBaseInSequence(i))!='T'){ + actread.changeBaseInSequence('t',0,i); + } + } }else{ actread.setLMClipoff(rpolyend+1); CEBUG("setting lm " << rpolyend+1 << endl); diff -Nru mira-3.9.18/src/mira/dataprocessing.H mira-4.0/src/mira/dataprocessing.H --- mira-3.9.18/src/mira/dataprocessing.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/dataprocessing.H 2014-02-02 12:05:18.000000000 +0000 @@ -213,9 +213,14 @@ void performRareKMERMasking_Pool(ReadPool & rpool, const std::string & logprefix); void performRareKMERMasking_Read(Read & actread, uint8 basesperhash, const std::string & logprefix); + void performKMERRepeatTagging_Pool(ReadPool & rpool, uint8 basesperhash); + void performKMERRepeatTagging_Read(Read & actread, uint8 basesperhash); + void buntifyReadsByHashFreq_Pool(ReadPool & rpool, uint8 basesperhash); void buntifyReadsByHashFreq_Read(Read & actread, uint8 basesperhash); + void addKMerForkTags_Pool(ReadPool & rp, uint8 basesperhash); + void clipBadSolexaEnds_Pool(ReadPool & rpool, const std::string & logprefix); void clipBadSolexaEnds_Read(Read & actread, const std::string & logprefix); diff -Nru mira-3.9.18/src/mira/dynamic.C mira-4.0/src/mira/dynamic.C --- mira-3.9.18/src/mira/dynamic.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/dynamic.C 2014-02-02 12:05:18.000000000 +0000 @@ -27,11 +27,13 @@ #include "dynamic.H" +#include using namespace std; //#define CEBUGFLAG +#define CLOCK_STEPS1 #ifdef CEBUGFLAG #define CEBUG(bla) {cout << bla; cout.flush();} @@ -56,7 +58,8 @@ #endif -uint64 Dynamic::DYN_alloccount=0; +uint64 Dynamic::DYN_alloccounts=0; +uint64 Dynamic::DYN_alloccountm=0; int16 Dynamic::DYN_matvalid=0; int32 Dynamic::DYN_match_matrix[DYN_MATSIZE][DYN_MATSIZE]; @@ -499,6 +502,9 @@ { FUNCSTART("Dynamic::setSequences(const char * seq1, uint32 len1, const char * seq2, uint32 len2, bool calcwithoffset, int32 expectedoffset)"); + BUGIFTHROW(len1==0 || len2==0,"len1 (" << len1 << ") or len2 (" << len2 << ") == 0 ?"); + BUGIFTHROW(len1>40000 || len2>40000,"len1 (" << len1 << ") or len2 (" << len2 << ") >40000 ? Seems unbelievable."); + DYN_calcwithoffset=calcwithoffset; DYN_eoffset=expectedoffset; @@ -511,27 +517,20 @@ DYN_s1size=len1+1; if(DYN_s1size<2000) DYN_s1size=2000; DYN_sequence1= new char[DYN_s1size]; - DYN_alloccount++; + ++DYN_alloccounts; } if(DYN_sequence2 == nullptr || DYN_s2size<=len2+1){ if(DYN_sequence2 != nullptr) delete [] DYN_sequence2; DYN_s2size=len2+1; if(DYN_s2size<2000) DYN_s2size=2000; DYN_sequence2= new char[DYN_s2size]; - DYN_alloccount++; - } - - if(len1==0 || len2==0){ - cout << "Len1: " << len1 << endl; - cout << "Len2: " << len2 << endl; - MIRANOTIFY(Notify::INTERNAL, "len1 or len2 == 0 ?") ; + ++DYN_alloccounts; } - if(len1>=40000 || len2>=40000){ - cout << "Len1: " << len1 << endl; - cout << "Len2: " << len2 << endl; - MIRANOTIFY(Notify::INTERNAL, "Ummmm, those lengths >= 40000 seem really unbelievable?!") ; - } +#ifdef CLOCK_STEPS1 + timeval tv; + gettimeofday(&tv,nullptr); +#endif // Copy first sequence try{ @@ -540,7 +539,6 @@ DYN_len_seq1=len1; } catch(Notify n){ - cerr << "Error while copying sequence 1" << endl; cout << "Error while copying sequence 1" << endl; // n.handleError(THISFUNC); throw(n); @@ -553,36 +551,30 @@ DYN_len_seq2=len2; } catch(Notify n){ - cerr << "Error while copying sequence 2" << endl; cout << "Error while copying sequence 2" << endl; // n.handleError(THISFUNC); throw(n); } +#ifdef CLOCK_STEPS1 + DYN_timing_seqcopy+=diffsuseconds(tv); +#endif + + if(DYN_knowngaps<0) DYN_knowngaps=-DYN_knowngaps; // len+1 to get the 0 row and 0 column into the matrix // +1 at the end ta allow the matrix computation algorithm to be easier #if 1 -#if 0 - - int32 sizeneeded=(len1+1)*(len2+1) +1; - if (DYN_simmatrix==nullptr) { - DYN_simmatrix= new int32[sizeneeded]; - DYN_smsize=sizeneeded; - } - -#else - { - int32 sizeneeded=(len1+1)*(len2+1) +1; + uint32 sizeneeded=(len1+1)*(len2+1) +1; //cout << "sizeneeded1: " << sizeneeded << endl; if (DYN_simmatrix==nullptr) { // ok, on first use, we're taking at least 1024^2+1 bytes - sizeneeded=max(sizeneeded,(1024*1024+1)); + sizeneeded=max(sizeneeded,static_cast(1024*1024+1)); //cout << "DYN_simmatrix: " << DYN_simmatrix << "\tsizeneeded2: " << sizeneeded << endl; @@ -593,10 +585,10 @@ delete [] DYN_simmatrix; DYN_simmatrix= new int32[sizeneeded]; DYN_smsize=sizeneeded; + ++DYN_alloccountm; } } } -#endif #else #define SPECIALCEBUG @@ -624,7 +616,8 @@ // computeSimMatrix(); computeBSimMatrix(expectedoffset); }else{ - computeSimMatrix(); + BUGIFTHROW(true,"computeSimMatrix() not available atm, sorry. use calcwithoffset and large band."); + //computeSimMatrix(); } FUNCEND(); @@ -675,16 +668,16 @@ FUNCSTART("void Dynamic::sequenceCopy(char * to, const char * from, uint32 len)"); int32 numgaps=0; - - for(uint32 i=0;i(toupper(*from)); - if(dptools::isValidIUPACBase(base)){ + if(likely(dptools::isValidIUPACBase(base))){ *to=base; }else{ switch(base){ case '*':{ *to='#'; - numgaps++; + ++numgaps; break; } case '1': @@ -692,14 +685,14 @@ case '3': case '4':{ *to=base; - numgaps++; + ++numgaps; break; } case '-': *to='N'; break; default:{ - cout << "Position: " << i << "\t" << hex << static_cast(*from) << "\t" << from[i] << endl; + cout << "Position: " << from-ofrom << "\t" << hex << static_cast(*from) << "\t" << *from << endl; MIRANOTIFY(Notify::FATAL, "Unknown base in read: " << from); } } @@ -722,20 +715,20 @@ *************************************************************************/ /* expected offset of seq2 to seq1 - s1 ------- - s2 -------- eoffset =2 + s1 ------- s1 ------- + s2 -------- eoffset =2 s2 -------- eoffset =-2 - s2 - 0------ - 0 - | - ypos=2 - | - s1 | - | - | - | - ------- + s2 s2 + 0------ 0-^---- + 0 0 xpos=2 + | | + ypos=2 | + | | + s1 | s1 | + | | + | | + | | + ------- ------- */ @@ -743,7 +736,10 @@ { FUNCSTART("Dynamic::computeBSimMatrix()"); - //eoffset=-1 ; +#ifdef CLOCK_STEPS1 + timeval tv; + gettimeofday(&tv,nullptr); +#endif // xpos and ypos are the offsets computed from the expected overlap // xrun and yrun point to the cell in the matrix to be computed next @@ -756,15 +752,16 @@ int32 eoverlap; if(eoffset>=0){ - eoverlap=DYN_len_seq1-eoffset; - if(DYN_len_seq2(DYN_len_seq1)-eoffset; + if(static_cast(DYN_len_seq2)(DYN_len_seq2)+eoffset; + if(static_cast(DYN_len_seq1) length of one of the sequences reduce it @@ -772,22 +769,32 @@ // kerrors is the number of cells left and right from the // idel diagonal that are computed - int32 kerrors=DYN_knowngaps+eoverlap*DYN_miraparams->getAlignParams().al_kpercent/100; + int32 kerrors=DYN_knowngaps+static_cast(eoverlap*static_cast(DYN_miraparams->getAlignParams().al_kpercent)/100.0f); if(kerrorsgetAlignParams().al_kmin) kerrors=DYN_miraparams->getAlignParams().al_kmin; if(kerrors>DYN_miraparams->getAlignParams().al_kmax) { kerrors=DYN_miraparams->getAlignParams().al_kmax; } - if(kerrors>DYN_len_seq1) kerrors=DYN_len_seq1; - if(kerrors>DYN_len_seq2) kerrors=DYN_len_seq2; + if(kerrors>static_cast(DYN_len_seq1)) kerrors=DYN_len_seq1; + if(kerrors>static_cast(DYN_len_seq2)) kerrors=DYN_len_seq2; if(kerrors<5) kerrors=5; if(kerrors-DYN_knowngaps < 0) kerrors=DYN_miraparams->getAlignParams().al_kmin+DYN_knowngaps; + const int32 bandwidth=2*kerrors+1; + //cout << "KGAP: " << DYN_knowngaps << endl; //cout << "KERR: " << kerrors << endl; + if(eoffset>=0){ + DYN_leftbandx=-ypos-kerrors; + DYN_rightbandx=-ypos+kerrors; + }else{ + DYN_leftbandx=xpos-kerrors; + DYN_rightbandx=xpos+kerrors; + } + // xpos and ypos are the offsets computed from the expected overlap if(ypos>0){ yrun=ypos-kerrors; @@ -806,67 +813,98 @@ dynamic_parameters const & DYN_params = DYN_miraparams->getDynamicParams(); -#ifdef CEBUGFLAG -//#if 1 +#ifdef MATRIXDEBUG { // Fill the matrix with 666 for testing and debugging purposes int32 * ptr=DYN_simmatrix; - for(int32 i=0; i<(DYN_len_seq1+1)*(DYN_len_seq2+1); i++, ptr++) *ptr=666; + for(uint32 i=0; i<(DYN_len_seq1+1)*(DYN_len_seq2+1); ++i, ++ptr) *ptr=666; } #endif - // fill last row and first column with -1 +#ifdef CLOCK_STEPS1 + timeval tl; + gettimeofday(&tl,nullptr); +#endif + + // fill last row with -1 { int32 * ptrr=DYN_simmatrix+(DYN_len_seq1)*(DYN_len_seq2+1); - for(int32 i=0; i<=DYN_len_seq2;i++){ + for(uint32 i=0; i<=DYN_len_seq2; ++i){ *ptrr++= -1; } + // no measurable effect on PacBio 6k overlap + //memset(ptrr,-1,DYN_len_seq2*sizeof(int32)); } - { - int32 * ptrc=DYN_simmatrix+DYN_len_seq2; - for(int32 i=0; i<=DYN_len_seq1;i++){ - *ptrc= -1; - ptrc+=DYN_len_seq2+1; - } - } + //cout << "###1 " << diffsuseconds(tl) << endl; - // fill first row and first column with terminal gap penalties. + // fill first row terminal gap penalties. { int32 * ptrr=DYN_simmatrix; - for(int32 i=0; i<=DYN_len_seq2;i++){ + for(uint32 i=0; i<=DYN_len_seq2; ++i){ *ptrr++= DYN_params.dyn_score_ltermgap*i; } } + //cout << "###2 " << diffsuseconds(tl) << endl; + + // filling first and last column almost certainly will lead to cache misses + // on large sequences (pacbio, with 7 or 9 Kb), this is responsible for 1/8 + // to 1/4 of the total time spent in banded Smith-Waterman, depending on band-width + // + // therefore, perform a preloading beforehand so that the values will be + // at least in usual L3 caches, probably even in L2 + // remember, last column + 1 == first column (next row) + + // Apple MacAir corei7: this is *SO* absolutely, totally, utterly frustrating + // the prefetch below has exactly 0 effect. + // putting a prefetch in the main loop also 0 effect, regardless on + // how far I let it prefetch + // TODO: check on home Linux box + +// { +// int32 * ptrlc=DYN_simmatrix+DYN_len_seq2; +// for(uint32 i=0; i<=DYN_len_seq1; ++i, ptrlc+=DYN_len_seq2+1){ +// __builtin_prefetch (ptrlc); +// //prefetchwl(ptrlc); +// } +// } + //cout << "### " << diffsuseconds(tl) << endl; + + // fill first column with terminal gap penalties, last column with -1 { - int32 * ptrc=DYN_simmatrix; - for(int32 i=0; i<=DYN_len_seq1;i++){ - *ptrc= DYN_params.dyn_score_rtermgap*i; - ptrc+=DYN_len_seq2+1; + int32 * ptrfc=DYN_simmatrix; + int32 * ptrlc=DYN_simmatrix+DYN_len_seq2; + for(uint32 i=0; i<=DYN_len_seq1; ++i, ptrfc+=DYN_len_seq2+1, ptrlc+=DYN_len_seq2+1){ + *ptrfc= DYN_params.dyn_score_rtermgap*i; + *ptrlc= -1; + //prefetchwl(ptrlc+100*(DYN_len_seq2+1)); } } + //cout << "###4 " << diffsuseconds(tl) << endl; + +#ifdef CLOCK_STEPS1 + DYN_timing_bswm_setup+=diffsuseconds(tl); +#endif - if((xpos==0 && ypos-kerrors>DYN_len_seq1) - || (ypos==0 && xpos-kerrors>DYN_len_seq2)){ + if((xpos==0 && ypos-kerrors>static_cast(DYN_len_seq1)) + || (ypos==0 && xpos-kerrors>static_cast(DYN_len_seq2))){ DYN_lastrc_maxscore=0; DYN_maxscore=0; FUNCEND(); return; - } + }else{ -#ifdef CEBUGFLAG - int32 bandlimit=10000; -#else - int32 bandlimit=DYN_BANDLIMIT; +#ifdef MATRIXDEBUG + int32 bandlimit=DYN_BANDLIMIT; #endif - { // Local variables are faster than class variables - int32 s_sgap=DYN_params.dyn_score_gap; - - int32 bandwidth=2*kerrors+1; + const int32 s_sgap=DYN_params.dyn_score_gap; +#ifdef CLOCK_STEPS1 + gettimeofday(&tl,nullptr); +#endif { // Neu Teil 1 @@ -887,16 +925,16 @@ yrun=ypos-kerrors; dolen=0; doheight=2*kerrors; - if(yrun+doheight>DYN_len_seq1) doheight=DYN_len_seq1-yrun; + if(yrun+doheight>static_cast(DYN_len_seq1)) doheight=DYN_len_seq1-yrun; // xpos=0! - if(xrun+doheight>DYN_len_seq2) doheight=DYN_len_seq2-xrun; + if(xrun+doheight>static_cast(DYN_len_seq2)) doheight=DYN_len_seq2-xrun; }else{ // oben flaches Dreieck oder recht xrun=0; yrun=0; // ypos-kerrors < 0 ! dolen=-(ypos-kerrors); - if(dolen>=DYN_len_seq2){ + if(dolen>=static_cast(DYN_len_seq2)){ CEBUG("Rechteck\n"); // kein Dreieck, Rechteck. volle Zeile muss berechnet werden, später doheight=0; @@ -904,22 +942,22 @@ CEBUG("Flach\n"); doheight=2*kerrors+(ypos-kerrors); - if(yrun+doheight>DYN_len_seq1) doheight=DYN_len_seq1-yrun; - if(xrun+dolen+doheight>DYN_len_seq2) doheight=DYN_len_seq2-xrun-dolen; + if(yrun+doheight>static_cast(DYN_len_seq1)) doheight=DYN_len_seq1-yrun; + if(xrun+dolen+doheight>static_cast(DYN_len_seq2)) doheight=DYN_len_seq2-xrun-dolen; } } }else{ CEBUG("Rechts"); if(xpos-kerrors<0){ dolen=xpos+kerrors; - if(dolen>=DYN_len_seq1){ + if(dolen>=static_cast(DYN_len_seq2)){ CEBUG("Rechteck\n"); // kein Dreieck, Rechteck. volle Zeile muss berechnet werden, später doheight=0; } else { doheight=-(xpos-kerrors); - if(yrun+doheight>DYN_len_seq1) doheight=DYN_len_seq1-yrun; - if(xrun+dolen+doheight>DYN_len_seq2) doheight=DYN_len_seq2-xrun-dolen; + if(yrun+doheight>static_cast(DYN_len_seq1)) doheight=DYN_len_seq1-yrun; + if(xrun+dolen+doheight>static_cast(DYN_len_seq2)) doheight=DYN_len_seq2-xrun-dolen; } } } @@ -932,44 +970,60 @@ CEBUG("dolen: " << dolen<< endl); CEBUG("doheight: " << doheight<< endl); +#ifdef MATRIXDEBUG if(yrun>0) *(DYN_simmatrix+yrun*(DYN_len_seq2+1)+1)=bandlimit; +#endif int32 * ptrt=DYN_simmatrix+(yrun+1)*(DYN_len_seq2+1)+1; - for(int32 zeile=0; zeile(ptrl+1); - char * s_ds2s=DYN_sequence2; + const char * s_ds2s=DYN_sequence2; CEBUG("1 " << DYN_sequence1[yrun] << ":"); - int32 * mmp= (int32 *) &DYN_match_matrix+DYN_sequence1[yrun]*DYN_MATSIZE; - for(int32 spalte=0; spalte0 && xrun+dolen>=DYN_len_seq2) *(ptrt+1)=-212; + + //if(doheight >0 && xrun+dolen>=static_cast(DYN_len_seq2)) { + // BUGIFTHROW(true,"Is this dead code? Hopefully, but it was triggered anyway :-( It was"); + // *(ptrt+1)=-212; + //} } -#ifdef CEBUGFLAG +#ifdef CLOCK_STEPS1 + DYN_timing_bswm_p1+=diffsuseconds(tl); +#endif + +#ifdef MATRIXDEBUG cout << "Mathead\n"; dump(); #endif +#ifdef CLOCK_STEPS1 + gettimeofday(&tl,nullptr); +#endif + { /* Teil 2a: mittelteil voll? @@ -1005,7 +1059,7 @@ }else{ doheight=kerrors; } - }else if(bandwidth >= DYN_len_seq2){ + }else if(bandwidth >= static_cast(DYN_len_seq2)){ if(ypos>=0) { doheight=kerrors; }else{ @@ -1015,8 +1069,8 @@ CEBUG("\nTeil 2a\n"); CEBUG("doheight-pre: " << doheight<< endl); - if(doheight+yrun>DYN_len_seq1) doheight=DYN_len_seq1-yrun; - if(yrun>=DYN_len_seq1) doheight=0; // not necessary? + if(doheight+yrun>static_cast(DYN_len_seq1)) doheight=DYN_len_seq1-yrun; + if(yrun>=static_cast(DYN_len_seq1)) doheight=0; // not necessary? CEBUG("xpos: " << xpos<< endl); @@ -1025,39 +1079,43 @@ CEBUG("yrun: " << yrun<< endl); CEBUG("doheight: " << doheight<< endl); - int32 * ptrla=DYN_simmatrix+yrun*(DYN_len_seq2+1)+xrun; - int32 * ptra=ptrla+1; - int32 * ptrl=ptrla+DYN_len_seq2+1; - int32 * ptrt=ptrl+1; - for(int32 zeile=0; zeile(ptrl+1); + for(int32 zeile=0; zeile=DYN_len_seq2){ + if(xrun+doheight-1+bandwidth>=static_cast(DYN_len_seq2)){ doheight= DYN_len_seq2-xrun-bandwidth+1; } - if(yrun>DYN_len_seq1) doheight=0; + if(yrun>static_cast(DYN_len_seq1)) doheight=0; CEBUG("xpos: " << xpos<< endl); CEBUG("ypos: " << ypos<< endl); CEBUG("xrun: " << xrun<< endl); CEBUG("yrun: " << yrun<< endl); CEBUG("doheight: " << doheight<< endl); - int32 * ptrla=DYN_simmatrix+yrun*(DYN_len_seq2+1)+xrun; - int32 * ptra=ptrla+1; - int32 * ptrl=ptrla+DYN_len_seq2+1; - int32 * ptrt=ptrl+1; - for(int32 zeile=0; zeile(ptrl+1); + for(int32 zeile=0; zeile(ptrl+1); + // no effect? + //prefetchwl(ptrt-1); } } -#ifdef CEBUGFLAG +#ifdef CLOCK_STEPS1 + DYN_timing_bswm_p2b+=diffsuseconds(tl); +#endif + +#ifdef MATRIXDEBUG cout << "Matmid 2b\n"; dump(); #endif +#ifdef CLOCK_STEPS1 + gettimeofday(&tl,nullptr); +#endif { // Teil 3 int32 dolen=DYN_len_seq2-xrun-1; int32 doheight=dolen+1; // TODO: check 12.08.1999 >=DYN_len_seq1+1 changed to > DYN_len_seq1 - if(yrun+doheight>DYN_len_seq1) doheight=DYN_len_seq1-yrun; - if(yrun>=DYN_len_seq1) doheight=0; + if(yrun+doheight>static_cast(DYN_len_seq1)) doheight=DYN_len_seq1-yrun; + if(yrun>=static_cast(DYN_len_seq1)) doheight=0; CEBUG("\nTeil 3\n"); CEBUG("dolen: " << dolen<< endl); @@ -1144,66 +1228,73 @@ CEBUG("xrun: " << xrun<< endl); CEBUG("yrun: " << yrun<< endl); - for(int32 zeile=0; zeile(ptrl+1); - char * s_ds2s=DYN_sequence2+xrun; - int32 * mmp= (int32 *) &DYN_match_matrix+DYN_sequence1[yrun]*DYN_MATSIZE; + const char * s_ds2s=DYN_sequence2+xrun; + const int32 * mmp= (int32 *) &DYN_match_matrix+DYN_sequence1[yrun]*DYN_MATSIZE; CEBUG("3 " << DYN_sequence1[kerrors+zeile] << ":"); CEBUG(*s_ds2s << "(" << mmp[*s_ds2s] << ")"); +#ifdef MATRIXDEBUG *(ptrt-1)=bandlimit; +#endif *ptrt= max((*ptrla)+mmp[*s_ds2s], (*ptra)+s_sgap); - s_ds2s++,ptrla++,ptra++,ptrl++,ptrt++; + ++s_ds2s,++ptrla,++ptra,++ptrl,++ptrt; - for(int32 spalte=0; spalte>1; + // search for maximum in last column and row int32 tmpmax=0; { int32 * ptrr=DYN_simmatrix+(DYN_len_seq1)*(DYN_len_seq2+1); - for(int32 i=0; i<=DYN_len_seq2;i++, ptrr++){ - if(*ptrr>=bandlimit) *ptrr= -1; + for(uint32 i=0; i<=DYN_len_seq2; ++i, ++ptrr){ tmpmax= max(tmpmax, *ptrr); } } { int32 * ptrc=DYN_simmatrix+DYN_len_seq2; - for(int32 i=0; i<=DYN_len_seq1;i++, ptrc+=DYN_len_seq2+1){ - if(*ptrc>=bandlimit) *ptrc= -1; + for(uint32 i=0; i<=DYN_len_seq1; ++i, ptrc+=DYN_len_seq2+1){ tmpmax= max(tmpmax, *ptrc); } } +#ifdef CLOCK_STEPS1 + DYN_timing_bswm_cleanband+=diffsuseconds(tl); +#endif + DYN_lastrc_maxscore=tmpmax; DYN_maxscore=tmpmax; @@ -1262,6 +1353,10 @@ // } // } +#ifdef CLOCK_STEPS1 + DYN_timing_bswmatrix+=diffsuseconds(tv); +#endif + FUNCEND(); } @@ -1277,9 +1372,9 @@ void Dynamic::dump() { if(!DYN_valid) return; - int32 * ptr=DYN_simmatrix; - for(int32 i=0; i -#include -#include -#include // C-strings - -#include - -#include // STL max template - #include -#include #include +#include #define DYN_MATSIZE 128 #define DYN_BANDLIMIT 1<<30 @@ -70,7 +62,8 @@ { public: - static uint64 DYN_alloccount; + static uint64 DYN_alloccounts; + static uint64 DYN_alloccountm; int32 DYN_maxscore; // Max score within simmatrix int32 DYN_lastrc_maxscore; /* Max score within last row and column @@ -88,24 +81,36 @@ char * DYN_sequence1; // sequence 1 char * DYN_sequence2; // sequence 2 - int32 DYN_s1size; // size of seq1 array - int32 DYN_s2size; // size of seq2 array + uint32 DYN_s1size; // size of seq1 array + uint32 DYN_s2size; // size of seq2 array - int32 DYN_len_seq1; // and its length are the ROWS - int32 DYN_len_seq2; // and its length are the COLUMNS + uint32 DYN_len_seq1; // and its length are the ROWS + uint32 DYN_len_seq2; // and its length are the COLUMNS int32 DYN_knowngaps; /* number of gaps that need to be additionally accounted for as these were seen in the sequences */ - int32 * DYN_simmatrix; /* Similarity matrix, always - (ROWS+1)*(COLUMNS+1) big */ - int32 DYN_smsize; // size of the matrix; + int32 * DYN_simmatrix; /* Similarity matrix, always big enough to contain at least + (ROWS+1)*(COLUMNS+1) elements */ + uint32 DYN_smsize; // size of the matrix; + + int32 DYN_leftbandx; // x coordinate where left band diagonal cuts x axis (or DYN_BANDLIMIT if unused) + int32 DYN_rightbandx; // x coordinate where right band diagonal cuts x axis (or DYN_BANDLIMIT if unused) // for bug tracking in coutWhatWasGiven() bool DYN_calcwithoffset; int32 DYN_eoffset; + suseconds_t DYN_timing_bswmatrix; // time last bsw took + suseconds_t DYN_timing_bswm_setup; + suseconds_t DYN_timing_bswm_p1; + suseconds_t DYN_timing_bswm_p2a; + suseconds_t DYN_timing_bswm_p2b; + suseconds_t DYN_timing_bswm_p3; + suseconds_t DYN_timing_bswm_cleanband; + suseconds_t DYN_timing_seqcopy; + private: void foolCompiler(); diff -Nru mira-3.9.18/src/mira/gbf_parse.H mira-4.0/src/mira/gbf_parse.H --- mira-3.9.18/src/mira/gbf_parse.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/gbf_parse.H 2014-02-02 12:05:18.000000000 +0000 @@ -25,8 +25,6 @@ #ifndef _bas_gbf_h_ #define _bas_gbf_h_ -#include -#include #include #include @@ -37,16 +35,12 @@ #include "stdinc/defines.H" #include "errorhandling/errorhandling.H" -//#include "io/exp.H" #include "mira/multitag.H" //// apparently, some systems may lack isblank() although it's part //// of C99 //// patch kindly provided by //// Alfredo Jose Hernandez Alvarez -//#ifndef isblank -//#define isblank(c) ((c) == ' ' || (c) == '\t') -//#endif #if HAVE_ISBLANK == 0 #define isblank(c) ((c) == ' ' || (c) == '\t') diff -Nru mira-3.9.18/src/mira/gff_parse.C mira-4.0/src/mira/gff_parse.C --- mira-3.9.18/src/mira/gff_parse.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/gff_parse.C 2014-02-02 12:05:18.000000000 +0000 @@ -22,9 +22,6 @@ * */ -// for strtol -#include - // for boost::trim, split #include diff -Nru mira-3.9.18/src/mira/hashstats.C mira-4.0/src/mira/hashstats.C --- mira-3.9.18/src/mira/hashstats.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/hashstats.C 2014-02-02 12:05:18.000000000 +0000 @@ -24,9 +24,6 @@ #include #include -#include -#include - #include #include "errorhandling/errorhandling.H" @@ -116,7 +113,7 @@ *************************************************************************/ //#define CEBUG(bla) {cout << bla; cout.flush();} -void HashStatistics::prepareHashStatistics(const string & directory, ReadPool & rp, bool checkusedinassembly, bool onlyagainstrails, bool alsosavesinglehashes, bool fwdandrev, uint32 fwdrevmin, uint8 basesperhash, string & hashstatfilename) +void HashStatistics::prepareHashStatistics(const string & directory, ReadPool & rp, bool checkusedinassembly, bool onlyagainstrails, bool alsosavesinglehashes, bool fwdandrev, uint32 fwdrevmin, uint8 basesperhash, uint32 millionhashesperbuffer, bool rarekmerearlykill, string & hashstatfilename) { HS_readpoolptr=&rp; HS_hs_basesperhash=basesperhash; @@ -129,7 +126,10 @@ cout << "Writing temporary hstat files:\n"; hashes2disk(hashfilenames,elementsperfile, rp,checkusedinassembly,fwdandrev,fwdrevmin, - basesperhash,directory); + basesperhash, + millionhashesperbuffer, + rarekmerearlykill, + directory); dateStamp(cout); @@ -191,7 +191,7 @@ //#define CEBUG(bla) {cout << bla; cout.flush();} -void HashStatistics::hashes2disk(vector & hashfilenames, vector & elementsperfile, ReadPool & rp, bool checkusedinassembly, bool fwdandrev, uint32 fwdrevmin, uint8 basesperhash, const string & directory) +void HashStatistics::hashes2disk(vector & hashfilenames, vector & elementsperfile, ReadPool & rp, bool checkusedinassembly, bool fwdandrev, uint32 fwdrevmin, uint8 basesperhash, uint32 millionhashesperbuffer, bool rarekmerearlykill, const string & directory) { FUNCSTART("void HashStatistics::hashes2disk(uint32 basesperhash)"); @@ -213,7 +213,7 @@ // define how many elements to reserve if(HS_numelementsperbuffer==0){ // default fallback values - HS_numelementsperbuffer=1048576*16; // 16m elements, 16b each, 16 buffers == 4 GiB + HS_numelementsperbuffer=millionhashesperbuffer*1048576; // 16m elements, 16b each, 16 buffers == 4 GiB if(sizeof(void *)==4){ // on 32 bit systems, be careful with memory HS_numelementsperbuffer=1048576/2; @@ -331,7 +331,8 @@ elementsperfile[hashfilesindex]+=writeCompressedHFB(hashfilebuffer[hashfilesindex], fwdrevmin, hashfiles[hashfilesindex], - false); + false, + rarekmerearlykill); #ifdef CLOCKSTEPS timeval after,diff; gettimeofday(&after,nullptr); @@ -372,7 +373,8 @@ elementsperfile[hashfilesindex]+=writeCompressedHFB(hashfilebuffer[hashfilesindex], fwdrevmin, hashfiles[hashfilesindex], - false); + false, + rarekmerearlykill); #ifdef CLOCKSTEPS timeval after,diff; gettimeofday(&after,nullptr); @@ -405,7 +407,8 @@ elementsperfile[i]+=writeCompressedHFB(hashfilebuffer[i], fwdrevmin, hashfiles[i], - true); + true, + rarekmerearlykill); fclose(hashfiles[i]); } P.finishAtOnce(); @@ -425,12 +428,12 @@ * *************************************************************************/ -size_t HashStatistics::writeCompressedHFB(vector & hfb, uint32 fwdrevmin, FILE * fileptr, bool force) +size_t HashStatistics::writeCompressedHFB(vector & hfb, uint32 fwdrevmin, FILE * fileptr, bool force, bool rarekmerearlykill) { FUNCSTART("size_t HashStatistics::writeCompressedHFB(vector & hfb, FILE * fileptr)"); size_t retvalue=0; if(hfb.size()){ - compressHashStatBufferInPlace(hfb, fwdrevmin, true); + compressHashStatBufferInPlace(hfb, fwdrevmin, !rarekmerearlykill); if(force || hfb.size()>=hfb.capacity()*2/3){ CEBUG("Write buffer " << &hfb << " " << 100*hfb.size()/hfb.capacity() << endl); if(myFWrite(&(hfb[0]),sizeof(hashstat_t),hfb.size(),fileptr) != hfb.size()){ @@ -468,9 +471,9 @@ * *************************************************************************/ -inline bool Skim__sortDiskNewHashComparator_(const hashstat_t & a, +inline bool HashStat__sortDiskNewHashComparator_(const hashstat_t & a, const hashstat_t & b); -inline bool Skim__sortDiskNewHashComparator_(const hashstat_t & a, +inline bool HashStat__sortDiskNewHashComparator_(const hashstat_t & a, const hashstat_t & b) { if(a.vhash==b.vhash){ @@ -485,9 +488,9 @@ * *************************************************************************/ -inline bool Skim__sortHashStatComparatorByCount_(const hashstat_t & a, +inline bool HashStat__sortHashStatComparatorByCount_(const hashstat_t & a, const hashstat_t & b); -inline bool Skim__sortHashStatComparatorByCount_(const hashstat_t & a, +inline bool HashStat__sortHashStatComparatorByCount_(const hashstat_t & a, const hashstat_t & b) { return a.count < b.count; @@ -514,7 +517,7 @@ tvtotal=tv; #endif - sort(hsb.begin(), hsb.end(), Skim__sortDiskNewHashComparator_); + sort(hsb.begin(), hsb.end(), HashStat__sortDiskNewHashComparator_); CEBUG("done.\n"); TEBUG("\nTiming sort HFB: " << diffsuseconds(tv) << endl); @@ -774,7 +777,7 @@ } } - sort(HS_hs_hashstats.begin(),HS_hs_hashstats.end(),Skim__sortHashStatComparatorByCount_); + sort(HS_hs_hashstats.begin(),HS_hs_hashstats.end(),HashStat__sortHashStatComparatorByCount_); if(HS_logflag_hashcount){ string logfile=hashstatfilename+".shouldneverbeseen.hashcount.sort"; @@ -791,7 +794,6 @@ calcAvgHashFreq(); makeHashStatArrayShortcuts(); - } @@ -993,9 +995,7 @@ * *************************************************************************/ -inline bool Skim__sortHashStatComparatorByLow24bit_(const hashstat_t & a, - const hashstat_t & b); -inline bool Skim__sortHashStatComparatorByLow24bit_(const hashstat_t & a, +inline bool HashStat__sortHashStatComparatorByLow24bit_(const hashstat_t & a, const hashstat_t & b) { if((a.vhash & SKIM3_MAXVHASHMASK) != (b.vhash & SKIM3_MAXVHASHMASK)) { @@ -1004,6 +1004,95 @@ return a.vhash < b.vhash; } +/************************************************************************* + * + * sorter to sort from low to high, using a definable mask + * + * + *************************************************************************/ + +vhash_t HashStatistics__vhashmask; + +inline bool HashStatistics__sortHashStatComparatorByMask_(const hashstat_t & a, + const hashstat_t & b) +{ + if((a.vhash & HashStatistics__vhashmask) != (b.vhash & HashStatistics__vhashmask)) { + return (a.vhash & HashStatistics__vhashmask) < (b.vhash & HashStatistics__vhashmask); + } + return a.vhash < b.vhash; +} + +/************************************************************************* + * + * ideally, instead of using mincount, it should be mincount per + * direction. NHashStatistics will do that ... + * + *************************************************************************/ + +string laberbla; + +void HashStatistics::calcKMerForks(uint32 mincount) +{ + if(HS_hs_hashstats.empty()) return; + + for(auto & hse : HS_hs_hashstats) hse.iskmerfork=false; + + if(HS_hs_basesperhash<17) return; + + auto rollbases=HS_hs_basesperhash-1; + HashStatistics__vhashmask=1; + /* *grml* undefined behaviour of left shift for 64 shifts in a 64 bit type makes this cludge necessary */ + /* the same for 32 shift in 32 bit types etc.pp */ + if(HS_hs_basesperhash>=sizeof(vhash_t)*4){ + HashStatistics__vhashmask=0; + }else{ + HashStatistics__vhashmask<<=(rollbases*2); + } + + // vhashmask is now, e.g. for bph=31, 00010000000.... + --HashStatistics__vhashmask; + // vhashmask is now, e.g. for bph=31, 000011111.... + + // calc the status on ?.............. + sort(HS_hs_hashstats.begin(), HS_hs_hashstats.end(), HashStatistics__sortHashStatComparatorByMask_); + laberbla="fwd "; + ckmf_helper(HashStatistics__vhashmask,mincount); + + // calc the status on ..............? + HashStatistics__vhashmask<<=2; + // vhashmask is now, e.g. for bph=31, 0011111....00 + sort(HS_hs_hashstats.begin(), HS_hs_hashstats.end(), HashStatistics__sortHashStatComparatorByMask_); + + laberbla="rev "; + ckmf_helper(HashStatistics__vhashmask,mincount); + + sort(HS_hs_hashstats.begin(), HS_hs_hashstats.end(), HashStat__sortHashStatComparatorByLow24bit_); +} + +//#define CEBUG(bla) {cout << bla; cout.flush();} +void HashStatistics::ckmf_helper(vhash_t hashmask, uint32 mincount) +{ + auto hsI=HS_hs_hashstats.begin(); + auto hsJ=hsI+1; + + CEBUG("KMER DUMP:\n"); + + for(; hsJ!=HS_hs_hashstats.end(); ++hsI,++hsJ){ + if(hsI->hasfwdrevthresholdok + && hsJ->hasfwdrevthresholdok + && (hsI->vhash&hashmask) == (hsJ->vhash&hashmask) + && hsI->vhash != hsJ->vhash + && hsI->count >= mincount + && hsJ->count >= mincount){ + hsI->iskmerfork=true; + hsJ->iskmerfork=true; + } + CEBUG(laberbla << NHashStatistics::hash2string(hsI->vhash,HS_hs_basesperhash) << ' ' << *hsI << '\n'); + CEBUG(laberbla << NHashStatistics::hash2string(hsJ->vhash,HS_hs_basesperhash) << ' ' << *hsJ << '\n'); + } +} +//#define CEBUG(bla) + /************************************************************************* * @@ -1032,7 +1121,7 @@ CEBUG(HS_hs_hashstats[i] << '\n'); } - sort(HS_hs_hashstats.begin(), HS_hs_hashstats.end(), Skim__sortHashStatComparatorByLow24bit_); + sort(HS_hs_hashstats.begin(), HS_hs_hashstats.end(), HashStat__sortHashStatComparatorByLow24bit_); HS_hs_hsshortcuts.clear(); { @@ -1075,352 +1164,16 @@ * *************************************************************************/ -inline bool Skim__compareHashStatHashElem_(const hashstat_t & a, - const hashstat_t & b); -inline bool Skim__compareHashStatHashElem_(const hashstat_t & a, - const hashstat_t & b) +inline bool HashStat__compareHashStatHashElem_(const hashstat_t & a, + const hashstat_t & b); +inline bool HashStat__compareHashStatHashElem_(const hashstat_t & a, + const hashstat_t & b) { return a.vhash < b.vhash; } //#define CEBUG(bla) {cout << bla; cout.flush();} -/************************************************************************* - * - * - * - * - * - *************************************************************************/ - -/* -void HashStatistics::assignReadBaseStatistics(ReadPool & rp, size_t avghashcov, vector & hashstats, const uint8 basesperhash, vector::const_iterator > & hsshortcuts_begin, vector::const_iterator > & hsshortcuts_end, bool masknastyrepeats, vector & rarekmermasking) -{ - FUNCSTART("void HashStatistics::assignReadBaseStatistics(ReadPool & rp, size_t avghashcov, vector & hashstats, const uint8 basesperhash, vector::const_iterator > & hsshortcuts_begin, vector::const_iterator > & hsshortcuts_end)"); - - if(rarekmermasking.size() != ReadGroupLib::getNumSequencingTypes()){ - rarekmermasking.clear(); - rarekmermasking.resize(ReadGroupLib::getNumSequencingTypes(),0); - } - - uint32 minnormalhashcov=static_cast(static_cast(avghashcov)*HS_freqest_minnormal); - uint32 maxnormalhashcov=static_cast(static_cast(avghashcov)*HS_freqest_maxnormal); - uint32 repeathashcov=static_cast(static_cast(avghashcov)*HS_freqest_repeat); - uint32 heavyrepthashcov=static_cast(static_cast(avghashcov)*HS_freqest_heavyrepeat); - uint32 crazyrepthashcov=static_cast(static_cast(avghashcov)*HS_freqest_crazyrepeat); - uint32 maskhashcov=static_cast(static_cast(avghashcov)*HS_nastyrepeatratio); - - CEBUG("minnormalhashcov: " << minnormalhashcov << endl); - CEBUG("maxnormalhashcov: " << maxnormalhashcov << endl); - CEBUG("repeathashcov: " << repeathashcov << endl); - - vector singlereadvhraparray; - singlereadvhraparray.reserve(10000); - - // we will not use a mask, but - // we need to supply an empty one anyway - vector tagmaskvector; - - // stores in each read whether the given hash frequency was seen - vector hasfrequency(8); - - vector mcmask; - mcmask.reserve(10000); - - ProgressIndicator P(0, rp.size()); - - multitag_t tmpmt(Read::REA_defaulttag_MNRr); - - for(uint32 actreadid=0; actreadid100) return; - - Read & actread= rp.getRead(actreadid); - if(!actread.hasValidData() - || !actread.isUsedInAssembly()) continue; - - // get rid of old values - actread.clearAllBPosHashStats(); - -//#define CEBUG(bla) {if(cebugok) cout << bla; cout.flush();} -// bool cebugok=false; -// if(actread.getName()=="E0K6C4E01CTNQI") cebugok=true; - - uint32 slen=actread.getLenClippedSeq(); - - if(slen::iterator srvaI=singlereadvhraparray.begin(); - - vector & bposhashstats=const_cast &>(actread.getBPosHashStats()); - uint32 hashesmade; - - { - int32 bfpos=actread.calcClippedPos2RawPos(0); - int32 bfposinc=1; - - hashesmade=Skim::transformSeqToVariableHash( - actreadid, - actread, - actread.getClippedSeqAsChar(), - slen, - basesperhash, - srvaI, - false, - 1, - tagmaskvector, - bposhashstats, - bfpos, - bfposinc - ); - } - singlereadvhraparray.resize(hashesmade); - - CEBUG("hashesmade: " << hashesmade << endl); - - vector::const_iterator lowerbound; - vector::const_iterator upperbound; - - vector::const_iterator hssearchI; - srvaI=singlereadvhraparray.begin(); - - uint32 rarekmercount=rarekmermasking[actread.getSequencingType()]; - //uint32 rarekmercount=30; - - int32 bfpos1,bfpos2; - hashstat_t hstmp; - bool foundit; - for(; srvaI != singlereadvhraparray.end(); srvaI++){ - CEBUG(*srvaI << '\n'); - - foundit=false; - lowerbound=hsshortcuts_begin[srvaI->vhash & SKIM3_MAXVHASHMASK]; - upperbound=hsshortcuts_end[srvaI->vhash & SKIM3_MAXVHASHMASK]; - - // "HS_empty_vector_hashstat_t.end()" is the "nullptr" replacement - if(hashstats.end() != lowerbound){ - if(basesperhash>12){ - // with more than 12 bases in a hash, the array is subdivided - hstmp.vhash=srvaI->vhash; - hssearchI=lower_bound(lowerbound, - upperbound, - hstmp, - Skim__compareHashStatHashElem_); - if(hssearchI != hashstats.end() - && hssearchI->vhash == srvaI->vhash) foundit=true; - }else{ - hssearchI=lowerbound; - foundit=true; - } - }else{ - CEBUG("---------- NO LB HIT??? -------\n"); - } - - if(foundit) { - CEBUG("VHRAP: " << *srvaI << '\n'); - CEBUG("HashStat: " << *hssearchI << '\n'); - CEBUG("srvaI->hashpos: " << srvaI->hashpos << '\n'); - - bfpos1=actread.calcClippedPos2RawPos(srvaI->hashpos-(basesperhash-1)); - bfpos2=bfpos1+basesperhash-1; - - CEBUG("b bfpos1: " << bfpos1 << '\t' << bposhashstats[bfpos1] << endl); - CEBUG("b bfpos2: " << bfpos2 << '\t' << bposhashstats[bfpos2] << endl); - - bposhashstats[bfpos1].fwd.setValid(); - bposhashstats[bfpos2].rev.setValid(); - - if(hssearchI->hasfwdrevthresholdok) { - //bhs|=Read::BFLAGS_CONFIRMED_FWDREV; - CEBUG("Set ConfFWDREV\n"); - bposhashstats[bfpos1].fwd.setConfirmedFwdRev(); - bposhashstats[bfpos2].rev.setConfirmedFwdRev(); - } - if(hssearchI->lowpos<=4){ - //bhs|=Read::BFLAGS_SEENATLOWPOS; - CEBUG("Set SeenAtLowPos\n"); - bposhashstats[bfpos1].fwd.setSeenAtLowPos(); - bposhashstats[bfpos2].rev.setSeenAtLowPos(); - } - if(hssearchI->hasmultipleseqtype){ - //bhs|=Read::BFLAGS_CONFIRMED_MULTIPLESEQTYPE; - CEBUG("Set ConfMultSeqType\n"); - bposhashstats[bfpos1].fwd.setConfirmedMultipleSeqType(); - bposhashstats[bfpos2].rev.setConfirmedMultipleSeqType(); - } - uint8 frequency=2; - if(hssearchI->count == 1){ - frequency=1; - }else if(hssearchI->count <= rarekmercount ){ - // maybe additional checks ... ? - frequency=1; - }else if(hssearchI->countcount>=minnormalhashcov - && hssearchI->count<=maxnormalhashcov) { - frequency=3; - //}else if(hssearchI->count > minnormalhashcov*20){ - }else if(hssearchI->count > crazyrepthashcov){ - frequency=7; - }else if(hssearchI->count > heavyrepthashcov){ - frequency=6; - }else if(hssearchI->count>=repeathashcov){ - frequency=5; - }else{ - frequency=4; - } - CEBUG("Set frequency: " << static_cast(frequency) << endl); - - if(maskhashcov>0 && hssearchI->count>=maskhashcov){ - for(uint32 j=0; jhashpos-(basesperhash-1), - // basesperhash); - //actread.setHasBaseFlags(true); - } - } - - actread.setHasFreqAvg(false); - actread.setHasFreqRept(false); - - if(hasfrequency[3]){ - actread.setHasFreqAvg(true); - } - if(hasfrequency[5] || hasfrequency[6] || hasfrequency[7]){ - actread.setHasFreqRept(true); - } - - actread.setHasBaseHashStats(true); - - //cout << "After ...\n"; - //Read::setCoutType(Read::AS_TEXT); - //cout << actread; - - - // BaCh 07.04.2009 Bad Idea!!! - // BaCh 12.07.2009 Why? Forgot ... :-( - //// the fwd/rev of a read now looks like this (e.g.) - //// (for better viewing dot == 0) - //// - //// f ..........2222222233333....355555.................... - //// r ................2222222....33333355555............... - //// - //// in dubio pro reo and to allow for potential matches, - //// do this: - //// - //// f ..........2222222233333....355555->.................. - //// r ..............<-2222222....33333355555............... - //// - //// so that this - //// - //// f ..........2222222233333....35555555555............... - //// r ..........2222222222222....33333355555............... - //// - //// is generated - //// - //// - // - //{ - // uint32 bfposi=0; - // for(; bfposi0 && bposhashstats[bfposi].rev.getFrequency()==0; bfposi--) {}; - // bfpose=bfposi; - // for(; bfpose>0 && bposhashstats[bfpose].fwd.getFrequency()==0; bfpose--) {}; - // if(bfposi>0){ - // for(uint32 i=bfposi; i>bfpose; i--){ - // bposhashstats[i].fwd=bposhashstats[bfpose].rev; - // } - // } - //} - - - // go through multicopy array and set MNRr tags for - // consecutive positions in read tagged as multicopy - if(masknastyrepeats){ - bool inrun=false; - uint32 runstart=0; - uint32 pos=0; - for(; pos(mcmask[pos]) << '\t' << inrun << '\n'); - if(mcmask[pos]){ - if(!inrun){ - runstart=pos; - inrun=true; - } - }else{ - if(inrun){ - CEBUG("reprun " << actread.getName() << '\t' << runstart << '\t' << pos-1 << endl); - tmpmt.from=runstart; - tmpmt.to=pos-1; - actread.addTagO(tmpmt); - inrun=false; - } - } - } - if(inrun){ - CEBUG("reprun " << actread.getName() << '\t' << runstart << '\t' << pos-1 << endl); - tmpmt.from=runstart; - tmpmt.to=pos-1; - actread.addTagO(tmpmt); - } - } - - - - } - - P.finishAtOnce(); - cout << '\n'; - - //cout << "\nskim Needs redo!\n"; - //exit(0); - - FUNCEND(); -} -*/ -//#define CEBUG(bla) - /************************************************************************* @@ -1433,10 +1186,12 @@ //#define CEBUG(bla) {cout << bla; cout.flush();} //void HashStatistics::assignReadBaseStatistics_MultiThread(uint32 numthreads, ReadPool & rp, size_t avghashcov, vector & hashstats, const uint8 basesperhash, vector::const_iterator > & hsshortcuts_begin, vector::const_iterator > & hsshortcuts_end, bool masknastyrepeats, vector & rarekmermasking) -void HashStatistics::assignReadBaseStatistics_MultiThread(uint32 numthreads, bool masknastyrepeats, vector & rarekmermasking) +void HashStatistics::assignReadBaseStatistics_MultiThread(uint32 numthreads, bool masknastyrepeats, vector & rarekmermasking, uint32 mincountkmerforks) { FUNCSTART("void HashStatistics::assignReadBaseStatistics_MultiThread(uint32 numthreads, bool masknastyrepeats, vector & rarekmermasking)"); + if(mincountkmerforks>0) calcKMerForks(mincountkmerforks); + if(rarekmermasking.size() != ReadGroupLib::getNumSequencingTypes()){ rarekmermasking.clear(); rarekmermasking.resize(ReadGroupLib::getNumSequencingTypes(),0); @@ -1571,6 +1326,7 @@ actread.clearAllBPosHashStats(); actread.setHasFreqAvg(false); actread.setHasFreqRept(false); + actread.setHasKMerFork(false); actread.deleteTag(tmpmt.identifier); // whatever happens: this read was looked upon by this routine, so technically we "have" base hashstats @@ -1639,7 +1395,8 @@ int32 bfpos1,bfpos2; hashstat_t hstmp; - bool foundit; + bool foundit=false; + bool haskmerfork=false; for(; srvaI != singlereadvhraparray.end(); srvaI++){ CEBUG(*srvaI << '\n'); @@ -1654,7 +1411,7 @@ hssearchI=lower_bound(lowerbound, hsshortcuts[srvaI->vhash & SKIM3_MAXVHASHMASK].e, hstmp, - Skim__compareHashStatHashElem_); + HashStat__compareHashStatHashElem_); if(hssearchI != hashstats.end() && hssearchI->vhash == srvaI->vhash) foundit=true; }else{ @@ -1685,6 +1442,11 @@ bposhashstats[bfpos1].fwd.setConfirmedFwdRev(); bposhashstats[bfpos2].rev.setConfirmedFwdRev(); } + if(hssearchI->iskmerfork) { + haskmerfork=true; + bposhashstats[bfpos1].fwd.setKMerFork(); + bposhashstats[bfpos2].rev.setKMerFork(); + } if(hssearchI->lowpos<=4){ //bhs|=Read::BFLAGS_SEENATLOWPOS; CEBUG("Set SeenAtLowPos\n"); @@ -1752,6 +1514,7 @@ if(hasfrequency[5] || hasfrequency[6] || hasfrequency[7]){ actread.setHasFreqRept(true); } + actread.setHasKMerFork(haskmerfork); //Read::setCoutType(Read::AS_TEXT); //CEBUG("### After ...\n" << actread << endl); @@ -3102,14 +2865,14 @@ * *************************************************************************/ -void NHashStatistics::hash2string(vhash_t hash, std::string & str) +void NHashStatistics::hash2string(vhash_t hash, uint8 basesperhash, std::string & str) { static char acgtc[4]={'A','C','G','T'}; str.clear(); - str.resize(HSN_basesperhash,' '); + str.resize(basesperhash,' '); auto srI=str.rbegin(); - for(auto ci=0; ci>=2; } @@ -3127,7 +2890,7 @@ string tmpstr; for(auto & hse : HSN_hsv_hashstats){ - hash2string(hse.vhash,tmpstr); + hash2string(hse.vhash,HSN_basesperhash,tmpstr); cout << tmpstr << '\t' << hse.hsc.fcount << '\t' << hse.hsc.rcount diff -Nru mira-3.9.18/src/mira/hashstats.H mira-4.0/src/mira/hashstats.H --- mira-3.9.18/src/mira/hashstats.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/hashstats.H 2014-02-02 12:05:18.000000000 +0000 @@ -53,6 +53,8 @@ bool hasfwdrevthresholdok:1; bool hasmultipleseqtype:1; + bool iskmerfork:1; + //bool operator<(const vhrap_t & other) const {return vhash < other.vhash;}; friend std::ostream & operator<<(std::ostream &ostr, const hashstat_t & v){ ostr << "hash: " << std::hex << v.vhash << std::dec @@ -64,7 +66,8 @@ << "\trev: " << v.hasrev << "\trevto: " << v.hasrevthresholdok << "\tfrto: " << v.hasfwdrevthresholdok - << "\tmseq: " << v.hasmultipleseqtype; + << "\tmseq: " << v.hasmultipleseqtype + << "\tkmrf: " << v.iskmerfork; return ostr; } @@ -198,11 +201,14 @@ bool fwdandrev, uint32 fwdrevmin, uint8 basesperhash, + uint32 millionhashesperbuffer, + bool rarekmerearlykill, const std::string & directory); size_t writeCompressedHFB(std::vector & hfb, uint32 fwdrevmin, FILE * fileptr, - bool force); + bool force, + bool rarekmerearlykill); void compressHashStatBufferInPlace(std::vector & hsb, uint32 fwdrevmin, bool alsosavesinglehashes); @@ -223,16 +229,9 @@ return a.vhash < b.vhash; } - void assignReadBaseStatistics( - ReadPool & rp, - size_t avgcov, - std::vector & hashstats, - const uint8 basesperhash, - std::vector::const_iterator > & hsshortcuts_begin, - std::vector::const_iterator > & hsshortcuts_end, - bool masknastyrepeats, - std::vector & minkmer - ); + void calcKMerForks(uint32 mincount); + void ckmf_helper(vhash_t HashStatistics__vhashmask, uint32 mincount); + void priv_arb_thread(uint32 threadnum, arbs_threadsharecontrol_t * tscptr); void priv_arb_DoStuff( ReadPool & rp, @@ -290,11 +289,14 @@ bool fwdandrev, uint32 fwdrevmin, uint8 basesperhash, + uint32 millionhashesperbuffer, + bool rarekmerearlykill, std::string & hashstatfilename); void assignReadBaseStatistics_MultiThread(uint32 numthreads, bool masknastyrepeats, - std::vector & minkmer + std::vector & minkmer, + uint32 mincountkmerforks ); //void showHashStatisticsInfo(std::string & filename); @@ -508,7 +510,8 @@ void saveHashStatistics(const std::string & filename, bool deleteoldfile); void loadHashStatistics(const std::string & filename); - void hash2string(vhash_t hash, std::string & str); + static void hash2string(vhash_t hash, uint8 basesperhash, std::string & str); + static inline std::string hash2string(vhash_t hash, uint8 basesperhash) { std::string tmp; hash2string(hash,basesperhash,tmp); return tmp;} void sortLow24Bit(){ sortLow24Bit(HSN_hsv_hashstats, HSN_hs_sortstatus); diff -Nru mira-3.9.18/src/mira/hdeque.H mira-4.0/src/mira/hdeque.H --- mira-3.9.18/src/mira/hdeque.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/hdeque.H 2014-02-02 12:05:18.000000000 +0000 @@ -26,6 +26,15 @@ #ifndef _mira_hdeque_h_ #define _mira_hdeque_h_ +#include +#include +#include + +#include + +#include "stdinc/defines.H" +#include "errorhandling/errorhandling.H" + #ifndef likely #if __GNUC__ >= 4 #define likely(x) __builtin_expect((x),1) diff -Nru mira-3.9.18/src/mira/maf_parse.C mira-4.0/src/mira/maf_parse.C --- mira-3.9.18/src/mira/maf_parse.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/maf_parse.C 2014-02-02 12:05:18.000000000 +0000 @@ -24,9 +24,10 @@ */ -#include "maf_parse.H" -#include -#include +#include "mira/maf_parse.H" + +#include + #include "errorhandling/errorhandling.H" #include "util/progressindic.H" @@ -1200,6 +1201,7 @@ } } catch(Notify n){ + cout << "Error for contig " << MAF_contig_name << endl; n.handleError(THISFUNC); } @@ -1210,6 +1212,7 @@ } catch(Notify n){ cout << "Error while calling callback!\n"; + cout << "Error for contig " << MAF_contig_name << endl; n.handleError(THISFUNC); } } diff -Nru mira-3.9.18/src/mira/manifest.C mira-4.0/src/mira/manifest.C --- mira-3.9.18/src/mira/manifest.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/manifest.C 2014-02-02 12:05:18.000000000 +0000 @@ -114,7 +114,7 @@ //#define CEBUG(bla) {cout << bla; cout.flush(); } void Manifest::loadManifestFile(const string & mfilename, bool resume) { - FUNCSTART("void Assembly::loadManifestFile(string & mfilename)"); + FUNCSTART("void Manifest::loadManifestFile(string & mfilename)"); ifstream mfin(mfilename.c_str()); @@ -158,6 +158,7 @@ string tmpline; string actline; bool foundreadgroup=false; + uint32 numbackslashes=0; while(getline(mfin,tmpline)){ boost::trim(tmpline); if(tmpline.empty() @@ -166,6 +167,7 @@ actline=tmpline; while(!actline.empty() && actline[actline.size()-1]=='\\'){ + ++numbackslashes; actline.resize(actline.size()-1); tmpline.clear(); if(getline(mfin,tmpline)){ @@ -227,9 +229,13 @@ }else{ if(!foundreadgroup){ if(lastkeyok=="parameters"){ - MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nhas keyword '" << key << "' which is not recognised.\nThe last recognised keyword was 'parameters', is this a continuation line and\ndid you eventually forget the backslash in the line above?"); + if(numbackslashes==0){ + MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nhas keyword '" << key << "' which is not recognised.\nThe last recognised keyword was 'parameters', no continuation line was seen. Is this a continuation line and did you eventually forget the backslash in the line above?"); + }else{ + MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nhas keyword '" << key << "' which is not recognised.\nThe last recognised keyword was 'parameters' and there were continuation lines with backslashes. Did you eventually erroneously put a backslash in the last continuation line above?"); + } }else{ - MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nExpected keyword 'readgroup'"); + MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nExpected keyword 'readgroup' not found. Maybe you mistyped '" << key << "' and meant something else?\nAccepted keywords at this stage are 'include', 'project', 'job', 'parameters' and 'readgroup'."); } } @@ -237,6 +243,14 @@ || key=="is_reference"){ MAN_manifestdata2load.back().loadasbackbone=true; MAN_manifestdata2load.back().rgid.setBackbone(true); + }else if(key=="autopairing" + || key=="autopair" + || key=="autotemplate"){ + MAN_manifestdata2load.back().rgid.setInsizeFrom(-1); + MAN_manifestdata2load.back().rgid.setInsizeTo(-1); + MAN_manifestdata2load.back().rgid.setWantTemplateSizeEstimate(true); + MAN_manifestdata2load.back().rgid.setWantSegmentPlacementEstimate(true); + MAN_manifestdata2load.back().rgid.setExpectsReadPairs(true); }else if(key=="technology"){ try{ MAN_manifestdata2load.back().rgid.setSequencingType(value); @@ -245,7 +259,7 @@ MIRANOTIFY(Notify::FATAL,"In file " << origsource << ": line\n" << actline << "\nUnknown technology '" << value << "' found. Did you make a typo?"); } if(MAN_manifestdata2load.back().rgid.getSequencingType()==ReadGroupLib::SEQTYPE_PACBIOLQ){ - MIRANOTIFY(Notify::FATAL,"Sorry, PacBio low quality data currently not supported.\n"); + //MIRANOTIFY(Notify::FATAL,"Sorry, PacBio low quality data currently not supported.\n"); } }else if(key=="defaultqual" || key=="default_qual"){ @@ -263,49 +277,73 @@ } int32 dummy=atoi(tI->c_str()); MAN_manifestdata2load.back().rgid.setInsizeFrom(dummy); + MAN_manifestdata2load.back().rgid.setWantTemplateSizeEstimate(false); + MAN_manifestdata2load.back().rgid.setExpectsReadPairs(true); ++tI; if(tI==tok.end()){ MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nKeyword '" << key << "' expects exactly two or three values, found only one."); } dummy=atoi(tI->c_str()); MAN_manifestdata2load.back().rgid.setInsizeTo(dummy); - ++tI; - if(tI!=tok.end()){ - // oops, 3 values, maybe infoonly + bool foundautorefine=false; + while(++tI!=tok.end()){ + // oops, 3 or 4 values string tmpiostring(*tI); boost::to_lower(tmpiostring); - if(tmpiostring=="infoonly" || tmpiostring=="exclusion_criterion"){ + if(tmpiostring=="infoonly" || tmpiostring=="exclusion_criterion" + || tmpiostring=="autorefine"){ MAN_manifestdata2load.back().ts_infoonlygiven=true; - if(tmpiostring=="infoonly"){ + if(tmpiostring=="autorefine"){ + foundautorefine=true; + }else if(tmpiostring=="infoonly"){ MAN_manifestdata2load.back().rgid.setTSInfoOnly(true); }else{ MAN_manifestdata2load.back().rgid.setTSInfoOnly(false); } }else{ - MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nKeyword '" << key << "' expects exactly 'infoonly' or 'exclusion_criterion' as third value, found '" << tmpiostring << "'"); + MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nKeyword '" << key << "' expects exactly 'infoonly', 'exclusion_criterion' or 'autorefine' as third or fourth value, found '" << tmpiostring << "'"); } } + if(foundautorefine){ + MAN_manifestdata2load.back().rgid.setWantTemplateSizeEstimate(true); + } }else if(key=="segmentplacement" || key=="segment_placement"){ // handle "infoonly"/"exclusion_criterion" by parsing it out static boost::regex iostr( "infoonly" ) ; static boost::regex ecstr( "exclusion_criterion" ) ; + static boost::regex arstr( "autorefine" ) ; static string iostrrep; // empty auto newval = boost::regex_replace(value, iostr, iostrrep); if(newval!=value){ MAN_manifestdata2load.back().rgid.setSPInfoOnly(true); MAN_manifestdata2load.back().sp_infoonlygiven=true; + swap(value,newval); // we just want value=newval }else{ newval = boost::regex_replace(value, ecstr, iostrrep); if(newval!=value){ MAN_manifestdata2load.back().rgid.setSPInfoOnly(false); MAN_manifestdata2load.back().sp_infoonlygiven=true; + swap(value,newval); // we just want value=newval } } - if(!MAN_manifestdata2load.back().rgid.setSegmentPlacement(newval)){ + MAN_manifestdata2load.back().rgid.setWantSegmentPlacementEstimate(false); + MAN_manifestdata2load.back().rgid.setExpectsReadPairs(true); + newval = boost::regex_replace(value, arstr, iostrrep); + if(newval!=value){ + MAN_manifestdata2load.back().rgid.setWantSegmentPlacementEstimate(true); + swap(value,newval); // we just want value=newval + } + + if(!MAN_manifestdata2load.back().rgid.setSegmentPlacement(value)){ MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nUnrecognised value '" << value << "' for key '" << key << "'"); } + if(MAN_manifestdata2load.back().rgid.getSegmentPlacementCode()!=ReadGroupLib::SPLACE_UNKNOWN + && MAN_manifestdata2load.back().rgid.getSegmentPlacementCode()!=ReadGroupLib::SPLACE_SU + && MAN_manifestdata2load.back().rgid.wantSegmentPlacementEstimate()){ + MIRANOTIFY(Notify::FATAL, "In file " << origsource << ": line\n" << actline << "\nUsing 'autorefine' for segment_placement other than 'unknown' or 'samedir' does not make much sense. Please fix your manifest file."); + } }else if(key=="segmentnaming" || key=="segment_naming"){ if(!MAN_manifestdata2load.back().rgid.setSegmentNaming(value)){ @@ -381,7 +419,7 @@ if(seenbb){ MIRANOTIFY(Notify::FATAL,"Error in defining readgroups: there is no readgroup which is not defined as reference/backbone. Basically this says that while you defined a reference, you did not define what data should map to it."); }else{ - MIRANOTIFY(Notify::FATAL,"Error in defining readgroups: there is no readgroup defined containing data do load? What should MIRA assemble???"); + MIRANOTIFY(Notify::FATAL,"Error in defining readgroups: there is no readgroup defined containing data to load? What should MIRA assemble???"); } } @@ -497,7 +535,7 @@ } // now fill in maindata and ancillary, leaving out GFF3 file types - // then append the remaining files (weel, GFF3) to the main data + // then append the remaining files (well, GFF3) to the main data // this effectively splits the files into maindata and ancillary AND // shuffles GFF3 to the end of maindata // ... and keeps the order of files (not really needed, but good for diff -Nru mira-3.9.18/src/mira/manifest.H mira-4.0/src/mira/manifest.H --- mira-3.9.18/src/mira/manifest.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/manifest.H 2014-02-02 12:05:18.000000000 +0000 @@ -89,6 +89,9 @@ void loadManifestFile(const std::string & mfilename, bool resume); std::string getFullMIRAParameterString(); const std::string & getProjectName() const {return MAN_projectname;} + const std::string & getJob() const {return MAN_job;} + const std::string & getParameters() const {return MAN_parameters;} + const std::string & getTechnologies() const {return MAN_technologystring;} }; diff -Nru mira-3.9.18/src/mira/parameters.C mira-4.0/src/mira/parameters.C --- mira-3.9.18/src/mira/parameters.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/parameters.C 2014-02-02 13:28:53.000000000 +0000 @@ -25,16 +25,14 @@ */ -#include "util/machineinfo.H" - -#include "mira/parameters_tokens.h" #include -#include -// for chdir() in cwd of parameter parsing -#include -// for strerror() in cwd of parameter parsing -#include +#include + +#include "mira/parameters_tokens.h" +#include "mira/read.H" +#include "util/machineinfo.H" +#include "util/fmttext.H" using namespace std; @@ -55,20 +53,30 @@ MP_loadfilename.clear(); MP_loadfilename.reserve(12); + + // force the MIRAParameters object to check for presence of technologies + // in the manifest readgroups if a technology-dependend parameter was used + mp_special_params.sp_parse_checktechnologypresence=true; + // start step 0 is not a valid start step for miraSearchESTSNPs // but this at least catches errors if they occur mp_special_params.sp_est_startstep=0; - mp_special_params.mi_printversion=false; mp_special_params.mi_extended_log=false; + mp_special_params.mi_iknowwhatido=false; mp_special_params.mi_as_largecontigsize=500; mp_special_params.mi_as_largecontigsize4stats=5000; mp_special_params.mi_extra_flag1=false; mp_special_params.mi_extra_flag2=true; + mp_special_params.mi_extra_flag3=true; - mp_nagandwarn_params.nw_stop_readnamelength=40; - mp_nagandwarn_params.nw_stop_on_nfs=true; - mp_nagandwarn_params.nw_stop_templateproblems=true; - mp_nagandwarn_params.nw_stop_duplicatereadnames=true; + mp_nagandwarn_params.nw_check_maxreadnamelength=NWSTOP; + mp_nagandwarn_params.nw_check_mrnlvalue=40; + mp_nagandwarn_params.nw_check_nfs=NWSTOP; + mp_nagandwarn_params.nw_check_templateproblems=NWSTOP; + mp_nagandwarn_params.nw_check_duplicatereadnames=NWSTOP; + mp_nagandwarn_params.nw_check_multipassmapping=NWSTOP; + mp_nagandwarn_params.nw_check_coverage=NWSTOP; + mp_nagandwarn_params.nw_check_covvalue=80; mp_assembly_params.as_numthreads=2; mp_assembly_params.as_automemmanagement=true; @@ -77,6 +85,8 @@ mp_skim_params.sk_numthreads=mp_assembly_params.as_numthreads; mp_skim_params.sk_basesperhash=17; + mp_skim_params.sk_bph_coveragethreshold=20; + mp_skim_params.sk_bph_increasestep=1; mp_skim_params.sk_hashsavestepping=4; mp_skim_params.sk_percentrequired=50; mp_skim_params.sk_maxhitsperread=2000; @@ -97,6 +107,8 @@ mp_hashstatistics_params.hs_nastyrepeatcoverage=0; mp_hashstatistics_params.hs_repeatlevel_in_infofile=6; mp_hashstatistics_params.hs_apply_digitalnormalisation=false; + mp_hashstatistics_params.hs_rare_kmer_early_kill=false; + mp_hashstatistics_params.hs_million_hashes_per_buffer=16; mp_pathfinder_params.paf_use_genomic_algorithms=true; mp_pathfinder_params.paf_use_emergency_blacklist=true; @@ -117,7 +129,12 @@ setPathfinderMaxContigTime(mp_pathfinder_params.paf_max_contig_buildtime); setPathfinderNextReadMaxTimeToESS(1); - mp_edit_params.ed_automatic_contic_editing=true; + mp_edit_params.ed_mira_automatic_contic_editing=true; + mp_edit_params.ed_kmer_singlets=true; + mp_edit_params.ed_homopolymer_overcalls=false; + + // Thomas' editor, currently unused + mp_edit_params.ed_edit_automatic_contic_editing=false; mp_edit_params.ed_strict_editing_mode=false; mp_edit_params.ed_confirmation_threshold=50; @@ -134,6 +151,8 @@ mp_assembly_params.as_backbone_railoverlap=0; mp_assembly_params.as_backbone_outlen=30000; mp_assembly_params.as_backbone_alsobuildnewcontigs=true; + mp_assembly_params.as_backbone_trimoverhangingreads=true; + mp_assembly_params.as_backbone_bootstrapnewbackbone=true; mp_assembly_params.as_assemblyjob_mapping=false; @@ -143,7 +162,6 @@ mp_assembly_params.as_cleanup_tmpfiles=0; mp_assembly_params.as_spoilerdetection=true; mp_assembly_params.as_spdetect_lastpassonly=true; - mp_assembly_params.as_keep_long_repeats_separated=true; mp_assembly_params.as_automatic_repeat_detection=true; mp_assembly_params.as_ard_multicopythreshold=2.0; mp_assembly_params.as_ard_multicopyminlen=400; @@ -178,7 +196,7 @@ mp_assembly_params.as_output_caf=true; mp_assembly_params.as_output_maf=true; mp_assembly_params.as_output_fasta=true; - mp_assembly_params.as_output_gap4da=true; + mp_assembly_params.as_output_gap4da=false; mp_assembly_params.as_output_ace=false; mp_assembly_params.as_output_gff3=false; mp_assembly_params.as_output_wiggle=true; @@ -229,14 +247,14 @@ mp_assembly_params.as_clip_lowercase_back=false; mp_assembly_params.as_clip_polyat=false; - mp_assembly_params.as_clip_polyat_keeppolysignal=false; + mp_assembly_params.as_clip_polyat_keeppolystretch=false; mp_assembly_params.as_clip_polyat_len=12; mp_assembly_params.as_clip_polyat_maxerrors=1; mp_assembly_params.as_clip_polyat_maxgap=9; mp_assembly_params.as_clip_3ppolybase=false; - mp_assembly_params.as_clip_3ppolybase_len=12; - mp_assembly_params.as_clip_3ppolybase_maxerrors=2; + mp_assembly_params.as_clip_3ppolybase_len=15; + mp_assembly_params.as_clip_3ppolybase_maxerrors=3; mp_assembly_params.as_clip_3ppolybase_maxgap=9; mp_assembly_params.as_clip_possible_vectors=true; @@ -374,19 +392,19 @@ try { parseQuickmodeNoTechSettingsChange(apptr, "Default settings", - testPv, verbose, nullptr); + testPv, verbose); apptr=ms_dn_e; parseQuickmodeNoTechSettingsChange(apptr, "Default settings", - testPv, verbose, nullptr); + testPv, verbose); apptr=ms_m_g; parseQuickmodeNoTechSettingsChange(apptr, "Default settings", - testPv, verbose, nullptr); + testPv, verbose); apptr=ms_m_e; parseQuickmodeNoTechSettingsChange(apptr, "Default settings", - testPv, verbose, nullptr); + testPv, verbose); } catch (Notify n) { std::ostringstream my__emsg; @@ -413,7 +431,9 @@ FUNCSTART("void MIRAParameters::postParsingChanges(vector & Pv)"); BUGIFTHROW(Pv.empty(), "Empty MIRAParameters vector???"); - if(Pv[0].mp_assembly_params.as_clip_proposeendclips + assembly_parameters const & as_fixparams= Pv[0].mp_assembly_params; + + if(as_fixparams.as_clip_proposeendclips && Pv[0].mp_contig_params.con_emea_setzero_on_clipping_pec){ cout << "-CL:pec and -CO:emeas1clpec are set, setting -CO:emea values to 1.\n"; for(uint32 i=0; i1 + || as_fixparams.as_numrmbbreakloops>1)){ + string wmsg="You are running a mapping job with:"; + if(as_fixparams.as_numpasses>1){ + wmsg+="\n-AS:nop="+boost::lexical_cast(as_fixparams.as_numpasses); + } + if(as_fixparams.as_numrmbbreakloops>1){ + wmsg+="\n-AS:rbl="+boost::lexical_cast(as_fixparams.as_numrmbbreakloops); + } + wmsg+="\n\nA mapping assembly with the above parameter(s) >1 will probably not" + " produce what you expect. For haploid organisms or for simple SNP search in" + " multiploid organisms, maybe you should rethink your choice." + "\nHowever, certain use cases do benefit from the parameters you have chosen." + " E.g., doing clean mappings of multiploid organisms. If you think" + " you want this, please use the following parameter to let MIRA continue:" + "\n -NW:cmpm=warn" + "\nor" + "\n -NW:cmpm=no" + ; + if(Pv[0].mp_nagandwarn_params.nw_check_multipassmapping==NWSTOP){ + MIRANOTIFY(Notify::FATAL,wmsg); + }else{ + cout << "\nWARNING!\n" << FmtText::wordWrap(wmsg,80) << endl; + } + } + correctTmpDirectory(Pv); FUNCEND(); @@ -461,7 +509,7 @@ BUGIFTHROW(indexesInPv.empty(), "Trying to dump nothing?\n"); - cout << "------------------------------------------------------------------------------\nParameter settings seen for:\n"; + ostr << "------------------------------------------------------------------------------\nParameter settings seen for:\n"; #if CPP_READ_SEQTYPE_END != 8 #error "This code is made for 8 sequencing types, adapt!" @@ -469,8 +517,8 @@ for(uint32 i=0; i0) cout << ", "; - cout << ReadGroupLib::getNameOfSequencingType(i) << " data"; + if(i>0) ostr << ", "; + ostr << ReadGroupLib::getNameOfSequencingType(i) << " data"; } } @@ -762,10 +810,6 @@ ostr << "\n Directories (-DI):\n"; multiParamPrint(Pv, singlePvIndex, ostr, - Pv[0].mp_directory_params.dir_cwd, - "\t", "Working directory", - fieldlength); - multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_directory_params.dir_top, "\t", "Top directory for writing files", fieldlength); @@ -810,21 +854,36 @@ ostr << "\n Edit options (-ED):\n"; - multiParamPrintBool(Pv, indexesInPv, ostr, - Pv[0].mp_edit_params.ed_automatic_contic_editing, - "\t", "Automatic contig editing (ace)", + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_edit_params.ed_mira_automatic_contic_editing, + "\t", "Mira automatic contig editing (mace)", fieldlength); - ostr << " Sanger only:\n"; - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_edit_params.ed_strict_editing_mode, - "\t", "Strict editing mode (sem)", - fieldlength); - multiParamPrint(Pv, singlePvIndex, ostr, - Pv[0].mp_edit_params.ed_confirmation_threshold, - "\t", "Confirmation threshold in percent (ct)", - fieldlength); + Pv[0].mp_edit_params.ed_kmer_singlets, + "\t ", "Edit kmer singlets (eks)", + fieldlength-4); + + multiParamPrintBool(Pv, indexesInPv, ostr, + Pv[0].mp_edit_params.ed_homopolymer_overcalls, + "\t ", "Edit homopolymer overcalls (ehpo)", + fieldlength-4); + + +// ostr << " Sanger only:\n"; +// +// multiParamPrintBool(Pv, indexesInPv, ostr, +// Pv[0].mp_edit_params.ed_automatic_contic_editing, +// "\t", "EdIt automatic contig editing (eace)", +// fieldlength); +// multiParamPrintBool(Pv, singlePvIndex, ostr, +// Pv[0].mp_edit_params.ed_strict_editing_mode, +// "\t", "Strict editing mode (sem)", +// fieldlength); +// multiParamPrint(Pv, singlePvIndex, ostr, +// Pv[0].mp_edit_params.ed_confirmation_threshold, +// "\t", "Confirmation threshold in percent (ct)", +// fieldlength); } @@ -1033,6 +1092,14 @@ "\t", "Bases per hash (bph)", fieldlength); multiParamPrint(Pv, singlePvIndex, ostr, + Pv[0].mp_skim_params.sk_bph_increasestep, + "\t ", "Automatic increase per pass (bphaipp)", + fieldlength-4); + multiParamPrint(Pv, singlePvIndex, ostr, + Pv[0].mp_skim_params.sk_bph_coveragethreshold, + "\t ", "Automatic incr. cov. threshold (bphaict)", + fieldlength-4); + multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_skim_params.sk_hashsavestepping, "\t", "Hash save stepping (hss)", fieldlength); @@ -1130,6 +1197,16 @@ Pv[0].mp_hashstatistics_params.hs_repeatlevel_in_infofile, "\t", "Repeat level in info file (rliif)", fieldlength); + + ostr << '\n'; + multiParamPrint(Pv, singlePvIndex, ostr, + Pv[0].mp_hashstatistics_params.hs_million_hashes_per_buffer, + "\t", "Million hashes per buffer (mhpb)", + fieldlength); + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_hashstatistics_params.hs_rare_kmer_early_kill, + "\t", "Rare kmer early kill (rkek)", + fieldlength); } @@ -1248,7 +1325,7 @@ "\t", "Clip poly A/T at ends (cpat)", fieldlength); multiParamPrintBool(Pv, indexesInPv, ostr, - Pv[0].mp_assembly_params.as_clip_polyat_keeppolysignal, + Pv[0].mp_assembly_params.as_clip_polyat_keeppolystretch, "\t ", "Keep poly-a signal (cpkps)", fieldlength-4); multiParamPrint(Pv, indexesInPv, ostr, @@ -1312,7 +1389,7 @@ "\t ", "Set minimum right clip to (smrc)", fieldlength-4); - cout << '\n'; + ostr << '\n'; multiParamPrintBool(Pv, singlePvIndex, ostr, Pv[0].mp_assembly_params.as_clip_skimchimeradetection, @@ -1322,7 +1399,7 @@ Pv[0].mp_assembly_params.as_clip_skimjunkdetection, "\t", "Apply SKIM junk detection clip (asjdc)", fieldlength); - cout << '\n'; + ostr << '\n'; multiParamPrintBool(Pv, indexesInPv, ostr, Pv[0].mp_assembly_params.as_clip_proposeendclips, @@ -1373,7 +1450,7 @@ "\t ", "Back seen at low pos (pbsalp)", fieldlength-4); - cout << '\n'; + ostr << '\n'; multiParamPrintBool(Pv, indexesInPv, ostr, Pv[0].mp_assembly_params.as_clip_badsolexaends, @@ -1388,7 +1465,7 @@ "\t ", "Filter PhiX174 (fpx174)", fieldlength-4); - cout << '\n'; + ostr << '\n'; multiParamPrint(Pv, indexesInPv, ostr, Pv[0].mp_assembly_params.as_clipmask_rarekmers, @@ -1450,30 +1527,40 @@ ostr << "\n Strain and backbone options (-SB):\n"; + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_assembly_params.as_backbone_bootstrapnewbackbone, + "\t", "Bootstrap new backbone (bnb)", + fieldlength); + multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_assembly_params.as_startbackboneusage_inpass, - "\t ","Start backbone usage in pass (sbuip)", - fieldlength-4); - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_assembly_params.as_backbone_strainname_forceforall, - "\t ", "Force for all (bsnffa)", - fieldlength-8); + "\t","Start backbone usage in pass (sbuip)", + fieldlength); +// multiParamPrintBool(Pv, singlePvIndex, ostr, +// Pv[0].mp_assembly_params.as_backbone_strainname_forceforall, +// "\t ", "Force for all (bsnffa)", +// fieldlength-4); multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_assembly_params.as_backbone_rail_fromstrain, - "\t ", "Backbone rail from strain (brfs)", - fieldlength-4); + "\t", "Backbone rail from strain (brfs)", + fieldlength); multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_assembly_params.as_backbone_raillength, - "\t ", "Backbone rail length (brl)", - fieldlength-4); + "\t", "Backbone rail length (brl)", + fieldlength); multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_assembly_params.as_backbone_railoverlap, - "\t ", "Backbone rail overlap (bro)", - fieldlength-4); + "\t", "Backbone rail overlap (bro)", + fieldlength); + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_assembly_params.as_backbone_trimoverhangingreads, + "\t", "Trim overhanging reads (tor)", + fieldlength); + ostr << '\n'; multiParamPrintBool(Pv, singlePvIndex, ostr, Pv[0].mp_assembly_params.as_backbone_alsobuildnewcontigs, - "\t ", "Also build new contigs (abnc)", - fieldlength-4); + "\t", "(Also build new contigs (abnc))", + fieldlength); } @@ -1554,10 +1641,6 @@ Pv[0].mp_assembly_params.as_urd_cutoffmultiplier, "\t ", "Cutoff multiplier (urdcm)", fieldlength-6); - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_assembly_params.as_keep_long_repeats_separated, - "\t", "Keep long repeats separated (klrs)", - fieldlength); ostr << '\n'; @@ -1692,19 +1775,24 @@ ostr << "\n Misc (-MI):\n"; - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_special_params.mi_extended_log, - "\t", "Extended log (el)", - fieldlength); multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_special_params.mi_as_largecontigsize, "\t", "Large contig size (lcs)", fieldlength); multiParamPrint(Pv, singlePvIndex, ostr, Pv[0].mp_special_params.mi_as_largecontigsize4stats, - "\t", "Large contig size for stats(lcs4s)", + "\t", "Large contig size for stats (lcs4s)", fieldlength); + ostr << '\n'; + + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_special_params.mi_iknowwhatido, + "\t", "I know what I do (ikwid)", + fieldlength); + + ostr << '\n'; + multiParamPrintBool(Pv, singlePvIndex, ostr, Pv[0].mp_special_params.mi_extra_flag1, "\t", "Extra flag 1 / sanity track check (ef1)", @@ -1713,6 +1801,14 @@ Pv[0].mp_special_params.mi_extra_flag2, "\t", "Extra flag 2 / dnredreadsatpeaks (ef2)", fieldlength); + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_special_params.mi_extra_flag3, + "\t", "Extra flag 3 / pelibdisassemble (ef3)", + fieldlength); + multiParamPrintBool(Pv, singlePvIndex, ostr, + Pv[0].mp_special_params.mi_extended_log, + "\t", "Extended log (el)", + fieldlength); } void MIRAParameters::dumpNagAndWarnParams(vector & Pv, const vector & indexesInPv, ostream & ostr) @@ -1728,25 +1824,42 @@ ostr << "\n Nag and Warn (-NW):\n"; + multiParamPrintNagWarn(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_nfs, + "\t", "Check NFS (cnfs)", + fieldlength); + + multiParamPrintNagWarn(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_multipassmapping, + "\t", "Check multi pass mapping (cmpm)", + fieldlength); + + multiParamPrintNagWarn(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_templateproblems, + "\t", "Check template problems (ctp)", + fieldlength); + + multiParamPrintNagWarn(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_duplicatereadnames, + "\t", "Check duplicate read names (cdrn)", + fieldlength); + + multiParamPrintNagWarn(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_maxreadnamelength, + "\t", "Check max read name length (cmrnl)", + fieldlength); + multiParamPrint(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_mrnlvalue, + "\t ", "Max read name length (mrnl)", + fieldlength-4); + multiParamPrintNagWarn(Pv, singlePvIndex, ostr, + Pv[0].mp_nagandwarn_params.nw_check_coverage, + "\t", "Check average coverage (cac)", + fieldlength); multiParamPrint(Pv, singlePvIndex, ostr, - Pv[0].mp_nagandwarn_params.nw_stop_readnamelength, - "\t", "Stop on max read name length (somrnl)", - fieldlength); - - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_nagandwarn_params.nw_stop_on_nfs, - "\t", "Stop on NFS (sonfs)", - fieldlength); - - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_nagandwarn_params.nw_stop_templateproblems, - "\t", "Stop on template problems (sote)", - fieldlength); - - multiParamPrintBool(Pv, singlePvIndex, ostr, - Pv[0].mp_nagandwarn_params.nw_stop_duplicatereadnames, - "\t", "Stop on duplicate read names (sodrn)", - fieldlength); + Pv[0].mp_nagandwarn_params.nw_check_covvalue, + "\t ", "Average coverage value (acv)", + fieldlength-4); } // static func @@ -1841,35 +1954,35 @@ fieldlength-4); } -void MIRAParameters::consistencyCheck() +void MIRAParameters::consistencyCheck(bool verbose) { checkMin("-GE:not",mp_assembly_params.as_numthreads, static_cast(1), - static_cast(1)); + static_cast(1), verbose); checkMax("-GE:not",mp_assembly_params.as_numthreads, static_cast(256), - static_cast(256)); + static_cast(256), verbose); checkMin("-AS:mrl",mp_assembly_params.as_minimum_readlength, static_cast(20), - static_cast(20)); - checkMin("-AS:bts",mp_pathfinder_params.paf_max_contig_buildtime,60,120); + static_cast(20), verbose); + checkMin("-AS:bts",mp_pathfinder_params.paf_max_contig_buildtime,60,120, verbose); checkMin("-AS:rbl",mp_assembly_params.as_numrmbbreakloops, static_cast(1), - static_cast(1)); + static_cast(1), verbose); checkMin("-CL:pecbph",mp_assembly_params.as_clip_pec_basesperhash, static_cast(10), - static_cast(10)); + static_cast(10), verbose); if(sizeof(uint64) == 4) { checkMax("-SB:bph",mp_skim_params.sk_basesperhash, static_cast(16), - static_cast(16)); + static_cast(16), verbose); } if(sizeof(uint64) == 8) { checkMax("-SK:bph",mp_skim_params.sk_basesperhash, static_cast(32), - static_cast(32)); + static_cast(32), verbose); } // if(sizeof(unsigned long) == 4) { // if(mp_skim_params.sk_basesperhash>=16) { @@ -1877,16 +1990,16 @@ // } // checkMax("-SK:bph",mp_skim_params.sk_basesperhash, // static_cast(15), -// static_cast(15)); +// static_cast(15), verbose); // } checkMax("-SB:sbuip",mp_assembly_params.as_startbackboneusage_inpass, static_cast(mp_assembly_params.as_numpasses), - static_cast(mp_assembly_params.as_numpasses)); + static_cast(mp_assembly_params.as_numpasses), verbose); // TODO: more consistency checks down the parameter list - checkMin("-OUT:tcpl",mp_contig_params.con_output_text_cpl,10,60); - checkMin("-OUT:hcpl",mp_contig_params.con_output_html_cpl,10,60); + checkMin("-OUT:tcpl",mp_contig_params.con_output_text_cpl,10,60, verbose); + checkMin("-OUT:hcpl",mp_contig_params.con_output_html_cpl,10,60, verbose); } void MIRAParameters::generateProjectNames(vector & Pv, string name) @@ -1930,6 +2043,7 @@ Pv[0].mp_assembly_params.as_outfile_stats_reads_tooshort=name+"_info_reads_tooshort"; Pv[0].mp_assembly_params.as_outfile_stats_contigstats=name+"_info_contigstats"; Pv[0].mp_assembly_params.as_outfile_stats_info=name+"_info_assembly"; + Pv[0].mp_assembly_params.as_outfile_stats_warnings=name+"_info_WARNINGS"; Pv[0].mp_assembly_params.as_outfile_stats_debrislist=name+"_info_debrislist"; Pv[0].mp_assembly_params.as_outfile_stats_crlist=name+"_info_contigreadlist"; Pv[0].mp_assembly_params.as_outfile_stats_readtags=name+"_info_readtaglist"; @@ -1941,6 +2055,7 @@ Pv[0].mp_assembly_params.as_outfile_stats_featuresequences=name+"_info_featuresequences"; Pv[0].mp_assembly_params.as_outfile_stats_featurecoverage=name+"_info_featurecoverage"; Pv[0].mp_assembly_params.as_outfile_stats_readrepeats=name+"_info_readrepeats"; + Pv[0].mp_assembly_params.as_outfile_stats_largecontigs=name+"_info_largecontigs"; Pv[0].mp_assembly_params.as_tmpf_spoiler=name+"_int_contigjoinspoiler"; Pv[0].mp_assembly_params.as_tmpf_adsextend=name+"_int_alignextends"; @@ -2027,8 +2142,8 @@ void MIRAParameters::setContigForceNonIUPAC(bool perseq, bool amongseq) { - mp_contig_params.con_force_nonIUPACconsensus_perseqtype=false; - mp_contig_params.con_force_nonIUPACconsensus_amongseqtypes=false; + mp_contig_params.con_force_nonIUPACconsensus_perseqtype=perseq; + mp_contig_params.con_force_nonIUPACconsensus_amongseqtypes=amongseq; } void MIRAParameters::setAlignGapPenaltyLevel(uint32 level) @@ -2113,13 +2228,13 @@ MP_loadfilename.pop_back(); - Pv[0].consistencyCheck(); + Pv[0].consistencyCheck(true); FUNCEND(); return; } -void MIRAParameters::parse(int argc, char **argv, vector & Pv) +void MIRAParameters::parse(int argc, char **argv, vector & Pv, bool verbose) { stringstream tss; @@ -2131,17 +2246,17 @@ } cout << "\n\n"; - parse(tss, Pv, nullptr); + parse(tss, Pv, verbose); } -void MIRAParameters::parse(const char * params, vector & Pv) +void MIRAParameters::parse(const char * params, vector & Pv, bool verbose) { stringstream tss; tss << params; - parse(tss, Pv, nullptr); + parse(tss, Pv, verbose); } -void MIRAParameters::parseQuickmode(const char * params, const char * qm, vector & Pv, bool verbose,MIRAParameters * mp) +void MIRAParameters::parseQuickmode(const char * params, const char * qm, vector & Pv, bool verbose) { stringstream tss; @@ -2154,15 +2269,15 @@ cout << params << endl; } tss << params; - parse(tss, Pv, mp); + parse(tss, Pv, verbose); } -void MIRAParameters::parseQuickmodeNoTechSettingsChange(const char * params, const char * qm, vector & Pv, bool verbose,MIRAParameters * mp) +void MIRAParameters::parseQuickmodeNoTechSettingsChange(const char * params, const char * qm, vector & Pv, bool verbose) { vector save; - saveParsedSettingsValues(Pv, mp, save); - parseQuickmode(params, qm, Pv, verbose, mp); - restoreParsedSettingsValues(Pv, mp, save); + saveParsedSettingsValues(Pv, save); + parseQuickmode(params, qm, Pv, verbose); + restoreParsedSettingsValues(Pv, save); } int32 MIRAParameters::gimmeAnInt(FlexLexer * lexer, stringstream & errstream) @@ -2239,9 +2354,9 @@ // parses either into MIRAParameters Pv vector // or into single MIRAParameters object -void MIRAParameters::parse(istream & is, vector & Pv, MIRAParameters * singlemp) +void MIRAParameters::parse(istream & is, vector & Pv, bool verbose) { - FUNCSTART("void MIRAParameters::parse(istream & is, vector & Pv, MIRAParameters * singlemp)"); + FUNCSTART("void MIRAParameters::parse(istream & is, vector & Pv)"); stringstream errstream; @@ -2257,8 +2372,6 @@ if(!Pv.empty()){ actpar=&Pv[ReadGroupLib::SEQTYPE_SANGER]; - }else if(singlemp != nullptr){ - actpar=singlemp; }else{ MIRANOTIFY(Notify::INTERNAL, "No parameter object to parse into? Not good."); } @@ -2274,10 +2387,6 @@ CEBUG("******: " << yyretcode << "\t" << lexer->YYText() << endl); switch(yyretcode){ case 0: {break;} // do nothing, eof - case MP_version: { - Pv[0].mp_special_params.mi_printversion=true; - break; - } case MP_PARSING_SECTIONCHANGE: { MP_currentparametersection=lexer->YYText(); break; @@ -2311,14 +2420,24 @@ actpar->mp_assembly_params.as_amm_maxprocesssize=gimmeAnInt(lexer,errstream); break; } - case MP_ed_automatic_contig_editing:{ + case MP_ed_mira_automatic_contig_editing:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_edit_params.ed_mira_automatic_contic_editing=getFixedStringMode(lexer,errstream); + break; + } + case MP_ed_kmer_singlets:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_edit_params.ed_kmer_singlets=getFixedStringMode(lexer,errstream); + break; + } + case MP_ed_homopolymer_overcalls:{ checkNONCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_edit_params.ed_automatic_contic_editing=getFixedStringMode(lexer,errstream); + actpar->mp_edit_params.ed_homopolymer_overcalls=getFixedStringMode(lexer,errstream); break; } case MP_ed_strict:{ checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_edit_params.ed_strict_editing_mode=getFixedStringMode(lexer,errstream);; + actpar->mp_edit_params.ed_strict_editing_mode=getFixedStringMode(lexer,errstream); break; } case MP_ed_confirmation_threshold:{ @@ -2331,24 +2450,44 @@ actpar->mp_special_params.sp_est_startstep=gimmeAnInt(lexer,errstream); break; } - case MP_nw_stoponnfs:{ + case MP_nw_check_nfs:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_nagandwarn_params.nw_check_nfs=getFixedStringMode(lexer,errstream); + break; + } + case MP_nw_check_multipassmapping:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_nagandwarn_params.nw_check_multipassmapping=getFixedStringMode(lexer,errstream); + break; + } + case MP_nw_check_templateproblems:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_nagandwarn_params.nw_check_templateproblems=getFixedStringMode(lexer,errstream); + break; + } + case MP_nw_check_duplicatereadnames:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_nagandwarn_params.nw_check_duplicatereadnames=getFixedStringMode(lexer,errstream); + break; + } + case MP_nw_check_maxreadnamelength:{ checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_nagandwarn_params.nw_stop_on_nfs=getFixedStringMode(lexer,errstream); + actpar->mp_nagandwarn_params.nw_check_maxreadnamelength=getFixedStringMode(lexer,errstream); break; } - case MP_nw_stop_templateerror:{ + case MP_nw_check_mrnlvalue:{ checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_nagandwarn_params.nw_stop_templateproblems=getFixedStringMode(lexer,errstream); + actpar->mp_nagandwarn_params.nw_check_mrnlvalue=gimmeAnInt(lexer,errstream); break; } - case MP_nw_stop_duplicatereadnames:{ + case MP_nw_check_coverage:{ checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_nagandwarn_params.nw_stop_duplicatereadnames=getFixedStringMode(lexer,errstream); + actpar->mp_nagandwarn_params.nw_check_coverage=getFixedStringMode(lexer,errstream); break; } - case MP_nw_stop_maxreadnamelength:{ + case MP_nw_check_covvalue:{ checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_nagandwarn_params.nw_stop_readnamelength=gimmeAnInt(lexer,errstream); + actpar->mp_nagandwarn_params.nw_check_covvalue=gimmeAnInt(lexer,errstream); break; } case MP_mi_extendedlog:{ @@ -2356,6 +2495,11 @@ actpar->mp_special_params.mi_extended_log=getFixedStringMode(lexer,errstream); break; } + case MP_mi_iknowwhatido:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_special_params.mi_iknowwhatido=getFixedStringMode(lexer,errstream); + break; + } case MP_mi_as_largecontigsize:{ checkCOMMON(currentseqtypesettings, lexer, errstream); actpar->mp_special_params.mi_as_largecontigsize=gimmeAnInt(lexer,errstream); @@ -2376,6 +2520,11 @@ actpar->mp_special_params.mi_extra_flag2=getFixedStringMode(lexer,errstream); break; } + case MP_mi_extra_flag3:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_special_params.mi_extra_flag3=getFixedStringMode(lexer,errstream); + break; + } case MP_as_extend_reads:{ checkNONCOMMON(currentseqtypesettings, lexer, errstream); actpar->mp_assembly_params.as_use_read_extension=getFixedStringMode(lexer,errstream); @@ -2683,19 +2832,14 @@ actpar->mp_assembly_params.as_ard_multicopygrace=gimmeAnInt(lexer,errstream); break; } - case MP_as_keep_long_repeats_separated:{ - checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_assembly_params.as_keep_long_repeats_separated=getFixedStringMode(lexer,errstream); - break; - } case MP_as_clip_polyat:{ checkNONCOMMON(currentseqtypesettings, lexer, errstream); actpar->mp_assembly_params.as_clip_polyat=getFixedStringMode(lexer,errstream); break; } - case MP_as_clip_polyat_keeppolysignal:{ + case MP_as_clip_polyat_keeppolystretch:{ checkNONCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_assembly_params.as_clip_polyat_keeppolysignal=getFixedStringMode(lexer,errstream); + actpar->mp_assembly_params.as_clip_polyat_keeppolystretch=getFixedStringMode(lexer,errstream); break; } case MP_as_clip_polyat_len:{ @@ -2765,11 +2909,21 @@ actpar->mp_assembly_params.as_filecheck_only=getFixedStringMode(lexer,errstream); break; } + case MP_as_backbone_trimoverhangingreads:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_assembly_params.as_backbone_trimoverhangingreads=getFixedStringMode(lexer,errstream); + break; + } + case MP_as_backbone_bootstrapnewbackbone:{ + checkNONCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_assembly_params.as_backbone_bootstrapnewbackbone=getFixedStringMode(lexer,errstream); + break; + } case MP_as_backbone_alsobuildnewcontigs:{ checkCOMMON(currentseqtypesettings, lexer, errstream); actpar->mp_assembly_params.as_backbone_alsobuildnewcontigs=getFixedStringMode(lexer,errstream); if(actpar->mp_assembly_params.as_backbone_alsobuildnewcontigs){ - errstream << "* Oooooops, sorry, -SB:abnc is currently not supported as parameter!\n"; + errstream << "* Oooooops, sorry, -SB:abnc=on is currently not supported as parameter!\n"; } break; } @@ -3085,6 +3239,16 @@ actpar->mp_skim_params.sk_basesperhash=gimmeAnInt(lexer,errstream); break; } + case MP_sk_bph_increasestep:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_skim_params.sk_bph_increasestep=gimmeAnInt(lexer,errstream); + break; + } + case MP_sk_bph_coveragethreshold:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_skim_params.sk_bph_coveragethreshold=gimmeAnInt(lexer,errstream); + break; + } case MP_sk_hashsavestepping:{ checkCOMMON(currentseqtypesettings, lexer, errstream); actpar->mp_skim_params.sk_hashsavestepping=gimmeAnInt(lexer,errstream); @@ -3169,6 +3333,16 @@ actpar->mp_hashstatistics_params.hs_apply_digitalnormalisation=getFixedStringMode(lexer,errstream); break; } + case MP_hs_million_hashes_per_buffer:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_hashstatistics_params.hs_million_hashes_per_buffer=gimmeAnInt(lexer,errstream); + break; + } + case MP_hs_rare_kmer_early_kill:{ + checkCOMMON(currentseqtypesettings, lexer, errstream); + actpar->mp_hashstatistics_params.hs_rare_kmer_early_kill=getFixedStringMode(lexer,errstream); + break; + } case MP_al_bip:{ checkNONCOMMON(currentseqtypesettings, lexer, errstream); actpar->mp_align_params.al_kpercent=gimmeAnInt(lexer,errstream); @@ -3382,22 +3556,6 @@ actpar->mp_assembly_params.as_outfile_CAF=lexer->YYText(); break; } - case MP_dir_cwd: { - if(lexer->YYText()==nullptr){ - errstream << "ERROR Directory name cwd: name not found?\n"; - MP_errorinparams=true; - break; - } - checkCOMMON(currentseqtypesettings, lexer, errstream); - actpar->mp_directory_params.dir_cwd=lexer->YYText(); - if(!actpar->mp_directory_params.dir_cwd.empty()){ - int ret=chdir(actpar->mp_directory_params.dir_cwd.c_str()); - if(ret){ - MIRANOTIFY(Notify::FATAL,"Changing working directory to '" << actpar->mp_directory_params.dir_cwd << "' failed, system message is: " << strerror(errno) << endl); - } - } - break; - } case MP_dir_tmp: { if(lexer->YYText()==nullptr){ errstream << "ERROR Directory name tmp: name not found?\n"; @@ -3441,8 +3599,8 @@ + "\n_SOLEXA_SETTINGS\n\t " + noquality_string + "\n_SOLID_SETTINGS\n\t " + noquality_string; - parseQuickmodeNoTechSettingsChange(modestring.c_str(), "-noquality", Pv); - cout << "Adjusting -CO:mrpg to a minimum of 3\n"; + parseQuickmodeNoTechSettingsChange(modestring.c_str(), "-noquality", Pv, verbose); + if(verbose) cout << "Adjusting -CO:mrpg to a minimum of 3\n"; if(!Pv.empty()) { for(uint32 i=0; imp_assembly_params.as_numpasses<6){ - cout << " - increassing number of passes (-AS:nop) "; + if(verbose) cout << " - increassing number of passes (-AS:nop) "; tmpactpar->mp_assembly_params.as_numpasses++; if(tmpactpar->mp_assembly_params.as_numpasses<=5){ tmpactpar->mp_assembly_params.as_numpasses++; - cout << "by two.\n"; + if(verbose) cout << "by two.\n"; }else{ - cout << "by one.\n"; + if(verbose) cout << "by one.\n"; } } if(tmpactpar->mp_assembly_params.as_numrmbbreakloops<3){ - cout << " - increasing maximum of RMB break loop (-AS:rbl).\n"; + if(verbose) cout << " - increasing maximum of RMB break loop (-AS:rbl).\n"; tmpactpar->mp_assembly_params.as_numrmbbreakloops++; } - cout << "Done\n"; + if(verbose) cout << "Done\n"; + + break; + } + case MP_quickmode_highlyrepetitive: { + errstream << "I'm sorry, '--highlyrepetitive' has been replaced by either" + "\n 1) '--hirep_something' for \"give me something\" (fast)" + "\n 2) '--hirep_good' for \"give me good resolve\" (slow)" + "\n 3) '--hirep_best' for \"give me best resolve\" (very slow)" + "\n"; break; } case MP_quickmode_lowqualitydata: { - cout << "Adjusting parameters for low quality data (-lowqualitydata):\n" - " Increassing (-CO:mrpg) by 1.\n" - " Switching on -CO:amgbnbs=yes\n"; + if(verbose) cout << "Adjusting parameters for low quality data (-lowqualitydata):\n" + " Increassing (-CO:mrpg) by 1.\n" + " Switching on -CO:amgbnbs=yes\n"; //" Switching on read extension (-DP:ure=yes)" if(!Pv.empty()) { @@ -3662,10 +3799,10 @@ break; } case MP_quickmode_highqualitydata: { - cout << "Adjusting parameters for high quality data (-highqualitydata):\n" - " Increassing (-CL:qcmq) by 4.\n" - " Increassing (-CO:mnq) by 4.\n" - " Increassing (-CO:mgqrt) by 2.\n"; + if(verbose) cout << "Adjusting parameters for high quality data (-highqualitydata):\n" + " Increassing (-CL:qcmq) by 4.\n" + " Increassing (-CO:mnq) by 4.\n" + " Increassing (-CO:mgqrt) by 2.\n"; // why does gcc 4.3.2 warn // warning: conversion to ‘base_quality_t’ from ‘int’ may alter its value [-Wconversion] // in the next 6 lines with += ??? @@ -3804,8 +3941,8 @@ case MP_jobdef_accurate: { jobdefs[JA_QUALITY].push_back(yyretcode); if(yyretcode==MP_jobdef_normal){ - cout << "--job=normal is deprecated and will be removed in later versions of MIRA" - "\nPlease use only 'draft' or 'accurate'\n"; + if(verbose) cout << "--job=normal is deprecated and will be removed in later versions of MIRA" + "\nPlease use only 'draft' or 'accurate'\n"; } break; } @@ -3861,7 +3998,7 @@ case MP_ERROR_MOVED_SECTION_NW : { errstream << "* Parameter section: '" << MP_currentparametersection << "'\n*\tParameter: " << lexer->YYText() - << "\n*\tThis was moved to section '-NW', sorry about that."; + << "\n*\tThis was moved to section '-NW' (eventually also renamed), sorry about that."; if(MP_errorinparams){ errstream << "\n*\t(may be due to previous errors)"; } @@ -3872,7 +4009,7 @@ case MP_ERROR_MOVED_SECTION_HS : { errstream << "* Parameter section: '" << MP_currentparametersection << "'\n*\tParameter: " << lexer->YYText() - << "\n*\tThis was moved to section '-HS', sorry about that."; + << "\n*\tThis was moved to section '-HS' (eventually also renamed), sorry about that."; if(MP_errorinparams){ errstream << "\n*\t(may be due to previous errors)"; } @@ -3886,7 +4023,7 @@ if(MP_errorinparams){ errstream << "\n*\t(may be due to previous errors)"; } - errstream <<"\n\n";; + errstream <<"\n\n"; MP_errorinparams=true; break; } @@ -3896,7 +4033,7 @@ if(MP_errorinparams){ errstream << "\n*\t(may be due to previous errors)"; } - errstream <<"\n\n";; + errstream <<"\n\n"; MP_errorinparams=true; break; } @@ -3908,7 +4045,7 @@ if(MP_errorinparams){ errstream << "\n*\t(may be due to previous errors)"; } - errstream <<"\n\n";; + errstream <<"\n\n"; MP_errorinparams=true; break; } @@ -3924,9 +4061,11 @@ delete lexer; - for(uint32 st=0; stPv[st].mp_align_params.al_min_overlap){ - cout << "WARNING: -SK:bph=" << Pv[st].mp_skim_params.sk_basesperhash - << " is larger than -AL:mo=" << Pv[st].mp_align_params.al_min_overlap - << " for " << ReadGroupLib::getShortNameOfSequencingType(st) << ". Some overlaps will not be found.\n"; + if(verbose) cout << "WARNING: -SK:bph=" << Pv[st].mp_skim_params.sk_basesperhash + << " is larger than -AL:mo=" << Pv[st].mp_align_params.al_min_overlap + << " for " << ReadGroupLib::getShortNameOfSequencingType(st) << ". Some overlaps will not be found.\n"; } } @@ -4083,17 +4222,19 @@ string modestring= "\nCOMMON_SETTINGS" "\n\t-GE:not=0:crhf=yes:amm=yes:kpmf=15:mps=0" - "\n\t-MI:el=false:lcs=500:lcs4s=5000" - "\n\t-NW:sonfs=yes:sote=yes:sodrn=yes:somrnl=40" + "\n\t-MI:ikwid=no:el=false:lcs=500:lcs4s=5000" + "\n\t-NW:cnfs=stop:ctp=stop:cdrn=stop:cmrnl=stop:mrnl=40:cac=stop:acv=80" "\n\t-LR:fo=no" - "\n\t-AS:ugpf=yes:urd=no:urdsip=3:klrs=no:mcpp=0" + "\n\t-AS:ugpf=yes:urd=no:urdsip=3:mcpp=0" "\n\t-SB:bsnffa=no" "\n\t-CL:pecbph=17:pechsgp=yes:ascdc=yes:asjdc=no" "\n\t-CO:mr=yes:mroir=false:asir=no" "\n\t emeas1clpec=yes:fnicast=no" "\n\t-SK:acrc=yes:bph=17:pr=80:swcob=no:mmhr=0:mchr=2048" "\n\t-HS:ldn=no:mnr=yes:nrr=100:nrc=0:fenn=0.4:fexn=1.6:fer=1.9:fehr=8:fecr=20:fcem=0" + "\n\t-HS:mhpb=16:rkek=no" "\n\t-PF:mscft=5" + "\n\t-ED:mace=yes:eks=yes" "\n\t" "\n\t-OUT:ors=yes:otc=yes:orm=yes:otm=no:ora=no:rrot=yes:rtd=no" ; @@ -4103,6 +4244,7 @@ modestring+= "\nCOMMON_SETTINGS" "\n\t-CL:pmkfr=1" + "\n\t-OUT:org=no" "\nSANGER_SETTINGS" "\n\t-AS:mrl=80:mrpc=2" "\n\t urdcm=1.5:ardct=2.0:ardml=400:ardgl=40" @@ -4113,7 +4255,7 @@ "\n\t-CO:mrpg=2:emea=25" "\n\t amgb=yes:amgbemc=yes:amgbnbs=yes" "\n\t fnicpst=no" - "\n\t-ED:ace=no" + "\n\t-ED:ehpo=yes" "\n\t-AL:bip=15:bmin=25:bmax=70:mo=17:ms=30:mrs=65:egp=no" "\n\t-PF:uqr=yes:qrml1=200:qrms1=90:qrml2:100:qrms2=95:bqoml=150" "\n" @@ -4132,7 +4274,7 @@ "\n\t amgb=yes:amgbemc=yes:amgbnbs=yes" "\n\t fnicpst=no" "\n\t-CL:pec=no:pffreq=0:pbfreq=0:pffore=false:pbfore=false:pfcmst=false:pbcmst=false:pfsalp=false:pbsalp=false" - "\n\t-ED:ace=no" + "\n\t-ED:ehpo=yes" "\n\t-AL:bip=15:bmin=25:bmax=70:mo=17:ms=30:mrs=65:egp=no" "\n\t-PF:uqr=yes:qrml1=200:qrms1=90:qrml2:100:qrms2=95:bqoml=150" "\nTEXT_SETTINGS" @@ -4164,7 +4306,7 @@ "\n\t-AL:ms=15:mo=20:mrs=70:bip=20:bmin=20:bmax=80:egp=yes:egpl=reject_codongaps" "\n\t-CO:rodirs=30:mrpg=4:mnq=20:mgqrt=25:emea=10:amgb=no" "\n\t fnicpst=no:gor=66" - "\n\t-ED:ace=yes" + "\n\t-ED:ehpo=yes" "\n\t-PF:uqr=yes:qrml1=80:qrms1=90:qrml2=60:qrms2=95:bqoml=80" "\n\t-SK:pr=80" ; @@ -4190,7 +4332,7 @@ "\n\t-AL:ms=15:mo=20:mrs=70:bip=20:bmin=20:bmax=80:egp=yes:egpl=reject_codongaps" "\n\t-CO:rodirs=25:mrpg=4:mnq=20:mgqrt=25:emea=10:amgb=no" "\n\t fnicpst=no:gor=66" - "\n\t-ED:ace=yes" + "\n\t-ED:ehpo=yes" "\n\t-PF:uqr=yes:qrml1=80:qrms1=90:qrml2=60:qrms2=95:bqoml=80" "\n\t-SK:pr=80" ; @@ -4216,11 +4358,11 @@ "\n\t-DP:ure=no:rewl=15:rewme=2:feip=0;leip=0" "\n\t-CL:pvlc=no:qc=no:bsqc=no:emlc=no:mlcr=4:smlc=4:emrc=no:mrcr=10:smrc=15:mbc=yes:mbcgs=5:mbcmfg=12:mbcmeg=12" "\n\t msvsgs=8:msvsmfg=8:msvsmeg=12:msvssfc=0:msvssec=0:c3pp=no:cpat=no:lccf=yes:lccb=yes:ckar=no" - "\n\t pec=yes:pffreq=1:pbfreq=1:pffore=false:pbfore=false:pfcmst=false:pbcmst=false:pfsalp=false:pbsalp=false" + "\n\t pec=no:pffreq=1:pbfreq=1:pffore=false:pbfore=false:pfcmst=false:pbcmst=false:pfsalp=false:pbsalp=false" "\n\t-AL:ms=15:mo=20:mrs=70:bip=20:bmin=20:bmax=200:egp=yes:egpl=reject_codongaps" "\n\t-CO:rodirs=30:mrpg=3:mnq=20:mgqrt=25:emea=10:amgb=no" "\n\t fnicpst=no:gor=66" - "\n\t-ED:ace=yes" + "\n\t-ED:ehpo=yes" "\n\t-PF:uqr=yes:qrml1=80:qrms1=90:qrml2=60:qrms2=95:bqoml=80" "\n\t-SK:pr=80" ; @@ -4235,6 +4377,7 @@ "\n\t-OUT:org=no" "\n\t-SK:bph=6:mmhr=90" "\n\t-HS:fenn=0.4:fexn=1.6:fer=1.9:fehr=8:fecr=20" + "\n\t-ED:mace=no" "\n\t" "\nPCBIOLQ_SETTINGS" "\n\t-AL:bip=50:bmax=1000:mrs=10:egp=no" @@ -4245,7 +4388,7 @@ "\n\t fnicpst=no:gor=66" "\n\t-CL" "\n\t pec=no:pffreq=1:pbfreq=1:pffore=false:pbfore=false:pfcmst=false:pbcmst=false:pfsalp=false:pbsalp=false" - "\n\t-ED:ace=yes" + "\n\t-ED:ehpo=no" "\n\t-PF:uqr=yes:qrml1=80:qrms1=90:qrml2=60:qrms2=95:bqoml=80" "\n\t-SK:pr=80" "\n\t" @@ -4275,17 +4418,18 @@ "\n\t spx174=true" "\n\t fpx174=no" "\n\t msvsgs=1:msvsmfg=2:msvsmeg=2:msvssfc=0:msvssec=0:cpat=no:lccf=no:lccb=no:ckar=yes" - "\n\t c3pp=yes:c3ppmsl=12:c3ppmea=2:c3ppmgfe=9:cbse=yes" + "\n\t c3pp=yes:c3ppmsl=15:c3ppmea=3:c3ppmgfe=9:cbse=yes" // 27.04.2012 pbsalp=true is not good for Solexa due to GGCxG errors also very early in some reads // 27.04.2012 pbfreq=1 is not good for Solexa due to identical GGCxG error patterns in multiple reads // i.e., for front and back clipping, only forward/reverse is good // (maybe pbfreq=1 for low coverage data?) "\n\t pec=yes:pffreq=0:pbfreq=0:pffore=yes:pbfore=yes:pfcmst=yes:pbcmst=yes:pfsalp=false:pbsalp=false" - "\n\t-AL:ms=15:mo=25:mrs=90:bip=20:bmin=20:bmax=80:egp=no" + "\n\t-AL:ms=15:mo=25:mrs=90:bip=20:bmin=20:bmax=80" + "\n\t-AL:egp=yes:egpl=reject_codongaps" "\n\t-CO:rodirs=30:mrpg=4:mnq=20:mgqrt=30:emea=4:amgb=yes" "\n\t fnicpst=no" "\n\t msr=yes:msrme=0:msrkceu=-1" - "\n\t-ED:ace=no" + "\n\t-ED:ehpo=no" "\n\t-PF:uqr=yes:qrml1=-95:qrms1=100:qrml2=-85:qrms2=100:bqoml=20" "\n\t-SK:pr=90" ; @@ -4347,7 +4491,6 @@ "\n\t-AS:nop=3:rbl=2:sep=yes" "\n" "\n_454_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70" "\n\t-DP:ure=no" "\n\t-CL:emrc=no" @@ -4362,7 +4505,6 @@ "\n\t-SK:bph=21" "\n" "\n_IONTOR_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70:mo=21" "\n\t-DP:ure=no" "\n\t-CL:emrc=no" @@ -4439,7 +4581,6 @@ "\n\t-AL:mrs=70" "\n" "\n_454_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70" "\n\t-SK:pr=80" ; @@ -4455,7 +4596,6 @@ "\n\t-AL:mrs=70" "\n" "\n_IONTOR_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70:mo=19" "\n\t-SK:pr=50" ; @@ -4474,7 +4614,6 @@ "\n\t-AL:mrs=70" "\n" "\n_PCBIOHQ_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70" "\n\t-SK:pr=80" ; @@ -4526,7 +4665,6 @@ "\n\t-SK:pr=70" "\n" "\n_454_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70" "\n\t-SK:pr=80" ; @@ -4544,7 +4682,6 @@ "\n\t-SK:pr=70" "\n" "\n_IONTOR_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70:mo=19" "\n\t-SK:pr=50" ; @@ -4563,7 +4700,6 @@ "\n\t-SK:pr=70" "\n" "\n_PCBIOHQ_SETTINGS" - "\n\t-ED:ace=yes" "\n\t-AL:mrs=70" "\n\t-SK:pr=80" ; @@ -4607,7 +4743,7 @@ "\nCOMMON_SETTINGS" "\n\t-GE:crhf=no" "\n\t-MI:lcs=500:lcs4s=1000" - "\n\t-AS:sd=no:ard=no:urd=no:klrs=no:ugpf=no:uess=yes:esspd=500:umcbt=yes:bts=360" + "\n\t-AS:sd=no:ard=no:urd=no:ugpf=no:uess=yes:esspd=500:umcbt=yes:bts=360" "\n\t-CL:pecbph=17:ascdc=no:asjdc=no" "\n\t-SK:mhpr=30" "\n\t-HS:ldn=yes:mnr=yes:fcem=30:nrc=200" @@ -4620,7 +4756,7 @@ "\n\t-AL:mrs=85:egp=yes:egpl=reject_codongaps" "\n\t-DP:ure=no" "\n\t-CL:pvlc=no:qc=yes:bsqc=no:mbc=yes:c3pp=no:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" - "\n\t cpat=yes:cpkps=no:cpmsl=12:cpmea=1:cpmgfe=20000" + "\n\t cpat=yes:cpkps=yes:cpmsl=12:cpmea=1:cpmgfe=20000" "\n\t pec=no" "\n\t-CO:rodirs=10" ; @@ -4631,7 +4767,7 @@ "\n\t-AS:mrpc=2" "\n\t-AL:mrs=80:egp=yes:egpl=reject_codongaps" "\n\t-CL:pvlc=no:qc=no:bsqc=no:mbc=yes:c3pp=no:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" - "\n\t cpat=yes:cpkps=no:cpmsl=12:cpmea=1:cpmgfe=20000" + "\n\t cpat=yes:cpkps=yes:cpmsl=12:cpmea=1:cpmgfe=20000" "\n\t pec=no" "\n\t-CO:rodirs=15" ; @@ -4642,7 +4778,7 @@ "\n\t-AS:mrpc=2" "\n\t-AL:mrs=80:egp=yes:egpl=reject_codongaps" "\n\t-CL:pvlc=no:qc=no:bsqc=no:mbc=yes:c3pp=no:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" - "\n\t cpat=yes:cpkps=no:cpmsl=12:cpmea=1:cpmgfe=20000" + "\n\t cpat=yes:cpkps=yes:cpmsl=12:cpmea=1:cpmgfe=20000" "\n\t pec=no" "\n\t-CO:rodirs=15" ; @@ -4656,8 +4792,8 @@ "\n\t-AL:mrs=90:egp=yes:egpl=reject_codongaps" "\n\t-CL:pvlc=no:qc=no:bsqc=no:mbc=yes:emlc=no:emrc=no:mqtfer=5:mqtfernob=15" "\n\t spx174=yes:fpx174=yes" - "\n\t cpat=yes:cpkps=no:cpmsl=15:cpmea=1:cpmgfe=20000" - "\n\t c3pp=yes:c3ppmsl=12:c3ppmea=2:c3ppmgfe=9" + "\n\t cpat=yes:cpkps=yes:cpmsl=15:cpmea=1:cpmgfe=20000" + "\n\t c3pp=yes:c3ppmsl=15:c3ppmea=3:c3ppmgfe=9" "\n\t rkm=2" "\n\t pec=yes" "\n\t-CO:rodirs=15" @@ -4669,7 +4805,7 @@ "\n\t-AS:mrpc=2" "\n\t-AL:mrs=85:egp=yes:egpl=reject_codongaps" "\n\t-DP:ure=no" - "\n\t-CL:pvlc=no:qc=yes:bsqc=no:mbc=yes:c3pp=no:cpat=yes:cpkps=no:cpmsl=12:cpmea=1:cpmgfe=20000:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" + "\n\t-CL:pvlc=no:qc=yes:bsqc=no:mbc=yes:c3pp=no:cpat=yes:cpkps=yes:cpmsl=12:cpmea=1:cpmgfe=20000:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" "\n\t-CO:rodirs=10" ; } @@ -4679,7 +4815,7 @@ "\nPCBIOLQ_SETTINGS" "\n\t-AS:mrpc=2" "\n\t-DP:ure=no" - "\n\t-CL:pvlc=no:qc=yes:bsqc=no:mbc=yes:c3pp=no:cpat=yes:cpkps=no:cpmsl=12:cpmea=1:cpmgfe=20000:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" + "\n\t-CL:pvlc=no:qc=yes:bsqc=no:mbc=yes:c3pp=no:cpat=yes:cpkps=yes:cpmsl=12:cpmea=1:cpmgfe=20000:emlc=no:emrc=no:mqtfer=0:mqtfernob=0" "\n\t-CO:rodirs=30" ; } @@ -4714,6 +4850,7 @@ "\n\t-AS:nop=2:rbl=4" "\n\t-CO:mr=yes:mroir=no:asir=no" "\n\t-OUT:orc=yes:orf=yes:org=no:ora=no:ort=no:orh=no" + "\n\t-ED:mace=no" ; if(Pv[SEQTYPE_SANGER].MP_jobtechsettings){ @@ -4721,7 +4858,6 @@ "\nSANGER_SETTINGS" "\n\t-AL:ms=15:mo=17:mrs=65:egpl=low" "\n\t-CO:emea=15:rodirs=20:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } // TODO: PacBio LQ? @@ -4730,7 +4866,6 @@ "\nPCBIOLQ_SETTINGS" "\n\t-AL:ms=15:mo=17:mrs=10:egp=no" "\n\t-CO:emea=15:rodirs=20:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } if(Pv[SEQTYPE_PACBIOHQ].MP_jobtechsettings) { @@ -4738,7 +4873,6 @@ "\nPCBIOHQ_SETTINGS" "\n\t-AL:ms=15:mo=17:mrs=65:egpl=low" "\n\t-CO:emea=15:rodirs=20:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } if(Pv[SEQTYPE_454GS20].MP_jobtechsettings) { @@ -4746,7 +4880,6 @@ "\n454_SETTINGS" "\n\t-AL:ms=15:mo=17:mrs=65:egpl=low" "\n\t-CO:emea=5:rodirs=25:amgb=no" - "\n\t-ED:ace=no" ; } if(Pv[SEQTYPE_IONTORRENT].MP_jobtechsettings) { @@ -4754,7 +4887,6 @@ "\nIONTOR_SETTINGS" "\n\t-AL:ms=15:mo=17:mrs=65:egpl=low" "\n\t-CO:emea=5:rodirs=25:amgb=no" - "\n\t-ED:ace=no" ; } break; @@ -4768,6 +4900,7 @@ "\n\t-AS:nop=3:rbl=7" "\n\t-CO:mr=yes:mroir=no:asir=no" "\n\t-OUT:orc=yes:orf=yes:org=no:ora=no:ort=no:orh=no" + "\n\t-ED:mace=no" ; if(Pv[SEQTYPE_SANGER].MP_jobtechsettings){ modestring+= @@ -4775,7 +4908,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=75:egpl=reject_codongaps" "\n\t-CO:emea=15:rodirs=10:amgb=yes:amgbemc=yes:amgbnbs=yes:fnicpst=yes" - "\n\t-ED:ace=yes" ; } if(Pv[SEQTYPE_PACBIOHQ].MP_jobtechsettings){ @@ -4784,7 +4916,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=75:egpl=reject_codongaps" "\n\t-CO:emea=15:rodirs=10:amgb=yes:amgbemc=yes:amgbnbs=yes:fnicpst=yes" - "\n\t-ED:ace=yes" ; } // TODO: PacBio LQ ? @@ -4794,7 +4925,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=10:egp=no" "\n\t-CO:emea=15:rodirs=10:amgb=yes:amgbemc=yes:amgbnbs=yes:fnicpst=yes" - "\n\t-ED:ace=yes" ; } if(Pv[SEQTYPE_454GS20].MP_jobtechsettings){ @@ -4803,7 +4933,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=75:egpl=reject_codongaps" "\n\t-CO:emea=5:rodirs=15:amgb=no:fnicpst=yes" - "\n\t-ED:ace=yes" ; } if(Pv[SEQTYPE_IONTORRENT].MP_jobtechsettings){ @@ -4812,7 +4941,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=75:egpl=reject_codongaps" "\n\t-CO:emea=5:rodirs=15:amgb=no:fnicpst=yes" - "\n\t-ED:ace=yes" ; } break; @@ -4827,7 +4955,7 @@ "\n\t-AS:nop=1:rbl=1" "\n\t-CO:mr=yes:mroir=no:asir=yes" "\n\t-OUT:orc=yes:orf=yes:org=no:ora=no:ort=no:orh=no" - "\nSANGER_SETTINGS" + "\n\t-ED:mace=no" ; if(Pv[SEQTYPE_SANGER].MP_jobtechsettings){ modestring+= @@ -4835,7 +4963,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=70:egpl=low" "\n\t-CO:rodirs=12:mrpg=1:emea=3:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } // TODO: PacBio LQ ? @@ -4845,7 +4972,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=70:egpl=low" "\n\t-CO:rodirs=12:mrpg=1:emea=3:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } if(Pv[SEQTYPE_PACBIOHQ].MP_jobtechsettings){ @@ -4854,7 +4980,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=70:egpl=low" "\n\t-CO:rodirs=12:mrpg=1:emea=3:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } if(Pv[SEQTYPE_454GS20].MP_jobtechsettings){ @@ -4863,7 +4988,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=70:egpl=low" "\n\t-CO:rodirs=12:mrpg=1:emea=3:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } if(Pv[SEQTYPE_IONTORRENT].MP_jobtechsettings){ @@ -4872,7 +4996,6 @@ "\n\t" + noclipping_string + "\n\t-AL:ms=30:mo=30:mrs=70:egpl=low" "\n\t-CO:rodirs=12:mrpg=1:emea=3:amgb=yes:amgbemc=yes:amgbnbs=yes" - "\n\t-ED:ace=no" ; } break; @@ -4907,7 +5030,7 @@ "\n\t-OUT:otc=yes:ort=no" "\n\t-AS:ard=yes:urd=no:nop=1:rbl=1" "\n\t-CL:ascdc=no" - "\n\t-SB:sbuip=1:brl=0:bro=0:abnc=no" + "\n\t-SB:sbuip=1:brl=0:bro=0:abnc=no:tor=yes" "\n\t-SK:bph=16:hss=4:pr=60:mhpr=1000" "\n\t-HS:ldn=no:mnr=no" "\n\t-CO:mr=yes" @@ -4923,12 +5046,29 @@ if(Pv[SEQTYPE_SANGER].MP_jobtechsettings){ // empty atm + modestring+= + "\nSANGER_SETTINGS" + "\n\t-AL:egp=no" + "\n\t-SB:bnb=no" + ; } if(Pv[SEQTYPE_454GS20].MP_jobtechsettings){ // empty atm + modestring+= + "\n454_SETTINGS" + "\n\t-AL:egp=no" + "\n\t-SB:bnb=no" + ; } if(Pv[SEQTYPE_IONTORRENT].MP_jobtechsettings){ - // empty atm + modestring+= + "\n\t" + "\nCOMMON_SETTINGS" + "\n\t-NW:acv=120" + "\nIONTOR_SETTINGS" + "\n\t-AL:egp=no" + "\n\t-SB:bnb=no" + ; } if(Pv[SEQTYPE_SOLEXA].MP_jobtechsettings){ modestring+= @@ -4937,6 +5077,7 @@ "\n\t-SK:bph=17:hss=1:pr=60" "\n\t-CO:mr=yes" "\n\t-PF:swcs=12" + "\n\t-NW:acv=160" "\n\t" "\nSOLEXA_SETTINGS" "\n\t-AS:mrl=20" @@ -4948,9 +5089,9 @@ "\n\t-AL:ms=15:mo=20:mrs=80:bip=20:bmin=20:bmax=80:egp=no" "\n\t-CO:rodirs=30:mrpg=3:mnq=20:mgqrt=30:emea=4:amgb=yes" "\n\t fnicpst=no" - "\n\t-ED:ace=no" "\n\t-PF:uqr=yes:qrml1=-90:qrms1=100:qrml2=-80:qrms2=100:bqoml=20" "\n\t-SK:pr=60" + "\n\t-SB:bnb=yes" ; // moved to general mapping above. //if(!Pv[SEQTYPE_SANGER].MP_jobtechsettings && !Pv[SEQTYPE_454GS20].MP_jobtechsettings && !hasPACBIO){ @@ -5075,7 +5216,7 @@ } -void MIRAParameters::saveParsedSettingsValues(vector & Pv, MIRAParameters * actpar, vector & saved) +void MIRAParameters::saveParsedSettingsValues(vector & Pv, vector & saved) { saved.clear(); if(!Pv.empty()) { @@ -5083,18 +5224,14 @@ for(uint32 i=0; iMP_parsedsomesettings); } } -void MIRAParameters::restoreParsedSettingsValues(vector & Pv, MIRAParameters * actpar, vector & saved) +void MIRAParameters::restoreParsedSettingsValues(vector & Pv, vector & saved) { if(saved.size()==Pv.size()) { for(uint32 i=0; iMP_parsedsomesettings=saved[0]; } } diff -Nru mira-3.9.18/src/mira/parameters.H mira-4.0/src/mira/parameters.H --- mira-3.9.18/src/mira/parameters.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/parameters.H 2014-02-02 12:05:18.000000000 +0000 @@ -35,8 +35,10 @@ #include #include // STL min max template -// BOOST string functions -#include +// for strlen() +#include + + #include "errorhandling/errorhandling.H" @@ -77,18 +79,18 @@ void foolCompiler(); template - void checkMin(const char * parameter, T & var, const T & minval, const T & defaultval) + void checkMin(const char * parameter, T & var, const T & minval, const T & defaultval, bool verbose) { if(var < minval){ - std::cout << parameter << " is " << var << ", but must be at least " << minval << ". Setting to " << defaultval << std::endl; + if(verbose) std::cout << parameter << " is " << var << ", but must be at least " << minval << ". Setting to " << defaultval << std::endl; var=defaultval; } } template - void checkMax(const char * parameter, T & var, const T & maxval, const T & defaultval) + void checkMax(const char * parameter, T & var, const T & maxval, const T & defaultval, bool verbose) { if(var > maxval){ - std::cout << parameter << " is " << var << ", but must be no more than " << maxval << ". Setting to " << defaultval << std::endl; + if(verbose) std::cout << parameter << " is " << var << ", but must be no more than " << maxval << ". Setting to " << defaultval << std::endl; var=defaultval; } } @@ -99,23 +101,30 @@ static void multiParamPrint(std::vector & Pv, const std::vector & indexesInPv, std::ostream & ostr, T & varInPv0, const char * indent, const char * desc, int32 fieldlength){ multiParamPrint_(Pv, indexesInPv, ostr, varInPv0, indent, desc, fieldlength, - false, false); + 0); } template static void multiParamPrintNumericChar(std::vector & Pv, const std::vector & indexesInPv, std::ostream & ostr, T & varInPv0, const char * indent, const char * desc, int32 fieldlength){ multiParamPrint_(Pv, indexesInPv, ostr, varInPv0, indent, desc, fieldlength, - false, true); + 1); } template static void multiParamPrintBool(std::vector & Pv, const std::vector & indexesInPv, std::ostream & ostr, T & varInPv0, const char * indent, const char * desc, int32 fieldlength){ multiParamPrint_(Pv, indexesInPv, ostr, varInPv0, indent, desc, fieldlength, - true, false); + 2); + } + template + static void multiParamPrintNagWarn(std::vector & Pv, const std::vector & indexesInPv, std::ostream & ostr, T & varInPv0, const char * indent, const char * desc, int32 fieldlength){ + multiParamPrint_(Pv, indexesInPv, ostr, varInPv0, + indent, desc, fieldlength, + 3); } template - static void multiParamPrint_(std::vector & Pv, const std::vector & indexesInPv, std::ostream & ostr, T & varInPv0, const char * indent, const char * desc, int32 fieldlength, bool asboolean, bool numericcast){ + static void multiParamPrint_(std::vector & Pv, const std::vector & indexesInPv, std::ostream & ostr, T & varInPv0, const char * indent, const char * desc, int32 fieldlength, uint8 printhow){ +//bool asboolean, bool numericcast){ int32 offsetOfVarInPv0=static_cast(reinterpret_cast(&varInPv0) - reinterpret_cast(&(Pv[0]))); @@ -127,13 +136,21 @@ if(indexesInPv.size()==1){ char * addrPv0= reinterpret_cast(&Pv[indexesInPv[0]]); char * valInPv0= reinterpret_cast(&(addrPv0[offsetOfVarInPv0])); - if(asboolean) { + if(printhow==3) { + if(*valInPv0==0){ + ostr << " no\n"; + }else if(*valInPv0==1){ + ostr << " stop\n"; + }else{ + ostr << " warn\n"; + } + }else if(printhow==2) { if(*(reinterpret_cast(valInPv0))) { ostr << " yes\n"; }else{ ostr << " no\n"; } - }else if(numericcast) { + }else if(printhow==1) { ostr << ' '; charAsNum(ostr, valInPv0); ostr << '\n'; @@ -202,13 +219,21 @@ } ostr << ' '; - if(asboolean) { + if(printhow==3) { + if(*valInPvX==0){ + ostr << "no\n"; + }else if(*valInPvX==1){ + ostr << "stop\n"; + }else{ + ostr << "warn\n"; + } + }else if(printhow==2) { if(*(reinterpret_cast(valInPvX))==true) { ostr << "yes\n"; }else{ ostr << "no\n"; } - }else if(numericcast) { + }else if(printhow==1) { charAsNum(ostr, valInPvX); ostr << '\n'; }else{ @@ -244,10 +269,8 @@ bool hasSHORTREADS); static void saveParsedSettingsValues(std::vector & Pv, - MIRAParameters * actpar, std::vector & saved); static void restoreParsedSettingsValues(std::vector & Pv, - MIRAParameters * actpar, std::vector & saved); public: @@ -353,7 +376,7 @@ template static void multiParamPrint(std::vector & Pv, const T & var, const std::string & desc); - void consistencyCheck(); + void consistencyCheck(bool verbose); inline special_parameters const & getSpecialParams() const { return mp_special_params; } @@ -402,23 +425,21 @@ { return mp_edit_params; } static void loadParams(const std::string & pfile, std::vector & Pv); - static void parse(int argc, char **argv, std::vector & Pv); - static void parse(const char * params, std::vector & Pv); - static void parse(const std::string & params, std::vector & Pv) {parse(params.c_str(),Pv);}; + static void parse(int argc, char **argv, std::vector & Pv, bool verbose=true); + static void parse(const char * params, std::vector & Pv, bool verbose=true); + static void parse(const std::string & params, std::vector & Pv, bool verbose=true) {parse(params.c_str(),Pv,verbose);}; static void parse(std::istream & is, std::vector & Pv, - MIRAParameters * mp); + bool verbose=true); static void parseQuickmode(const char * params, const char * qm, std::vector & Pv, - bool verbose=true, - MIRAParameters * mp=nullptr); + bool verbose=true); static void parseQuickmodeNoTechSettingsChange( const char * params, const char * qm, std::vector & Pv, - bool verbose=true, - MIRAParameters * mp=nullptr); + bool verbose=true); static void generateProjectNames(std::vector & Pv, std::string name=""); static void generateProjectInNames(std::vector & Pv, std::string name=""); diff -Nru mira-3.9.18/src/mira/parameters_flexer.cc mira-4.0/src/mira/parameters_flexer.cc --- mira-3.9.18/src/mira/parameters_flexer.cc 2013-07-01 18:40:14.000000000 +0000 +++ mira-4.0/src/mira/parameters_flexer.cc 2014-02-02 16:59:36.000000000 +0000 @@ -334,8 +334,8 @@ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 590 -#define YY_END_OF_BUFFER 591 +#define YY_NUM_RULES 621 +#define YY_END_OF_BUFFER 622 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -343,7 +343,7 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[5882] = +static yyconst flex_int16_t yy_accept[6278] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -351,647 +351,690 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 591, 590, 587, 585, 590, 589, 589, 581, 581, 582, - 584, 583, 579, 579, 579, 579, 579, 579, 590, 495, - 494, 494, 495, 495, 495, 492, 495, 495, 495, 495, - 492, 495, 495, 495, 495, 495, 495, 495, 495, 495, - - 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 24, 589, 589, 23, 23, 21, 21, 21, - 21, 21, 21, 21, 21, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 585, 590, 581, 581, 579, 579, 579, 579, - 579, 579, 590, 219, 218, 219, 219, 219, 219, 219, - 219, 219, 219, 218, 219, 219, 217, 219, 217, 219, - 219, 219, 216, 216, 219, 216, 209, 208, 209, 209, - 209, 209, 209, 209, 209, 209, 205, 209, 205, 209, - - 209, 209, 209, 209, 209, 209, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 380, 589, 589, 371, 373, 375, 379, 379, - 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 389, 589, 589, 388, 388, 386, 386, 386, 386, 386, - 386, 386, 386, 386, 590, 587, 586, 585, 590, 589, - - 589, 581, 581, 582, 584, 583, 579, 579, 579, 579, - 579, 579, 590, 506, 581, 579, 579, 579, 579, 579, - 0, 581, 588, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 622, 621, 618, 616, 621, 620, 620, 612, + 612, 613, 615, 614, 610, 610, 610, 610, 610, 610, + 621, 526, 525, 525, 526, 526, 526, 523, 526, 526, + 526, 526, 523, 526, 526, 526, 526, 526, 526, 526, + + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 24, 620, 620, 23, 23, + 21, 21, 21, 21, 21, 21, 21, 21, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 616, 621, 612, 612, 610, + 610, 610, 610, 610, 610, 621, 223, 222, 223, 223, + 223, 223, 223, 223, 223, 223, 222, 223, 223, 221, + 223, 221, 223, 223, 223, 220, 220, 223, 220, 213, + 212, 213, 213, 213, 213, 213, 213, 213, 213, 209, + + 213, 209, 213, 213, 213, 213, 213, 213, 213, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 393, 620, 620, 384, + 386, 388, 392, 392, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 478, 620, 620, 481, 481, + 478, 479, 479, 479, 479, 479, 479, 479, 479, 479, + + 402, 620, 620, 401, 401, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 621, 618, 617, 616, 621, 620, + 620, 612, 612, 613, 615, 614, 610, 610, 610, 610, + 610, 610, 621, 537, 612, 610, 610, 610, 610, 610, + 0, 612, 619, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 577, 0, 581, 581, 579, 579, - 579, 579, 579, 579, 579, 0, 0, 0, 0, 0, - 0, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 12, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 26, 579, - 579, 23, 0, 23, 23, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 66, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - - 224, 224, 224, 579, 215, 579, 210, 579, 579, 0, - 205, 0, 0, 205, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 286, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 294, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 358, 579, 356, 579, 579, 379, 0, - 379, 369, 379, 377, 377, 377, 377, 377, 377, 377, - 377, 377, 377, 377, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 238, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 382, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 395, - 579, 579, 420, 579, 579, 579, 579, 579, 579, 579, - 579, 434, 579, 579, 579, 579, 579, 579, 388, 0, - 388, 388, 386, 386, 386, 386, 386, 386, 386, 386, - 386, 386, 0, 586, 0, 581, 588, 586, 0, 0, + 0, 0, 0, 0, 612, 612, 610, 610, 610, 610, + 610, 610, 610, 0, 0, 0, 0, 0, 0, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 12, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 26, 610, 610, 23, 0, 23, 23, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 70, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 610, 219, 610, 214, 610, + 610, 0, 209, 0, 0, 209, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 293, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 303, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 371, 610, 369, 610, 610, 392, 0, + 392, 382, 392, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 241, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 395, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 408, 610, 610, + 433, 610, 610, 610, 610, 610, 610, 610, 447, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 481, 0, 481, 481, 479, 479, + 479, 479, 479, 479, 479, 475, 479, 479, 401, 0, + 401, 401, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 0, 617, 0, 612, 619, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 577, - 0, 581, 581, 579, 579, 579, 579, 579, 579, 579, - 0, 0, 0, 0, 0, 0, 581, 579, 579, 579, - 579, 579, 579, 0, 0, 0, 532, 521, 514, 534, - 0, 537, 523, 525, 0, 519, 508, 0, 530, 0, - 510, 539, 0, 543, 517, 0, 545, 512, 527, 0, - 0, 0, 0, 0, 0, 0, 0, 580, 581, 579, - 579, 579, 579, 579, 579, 0, 0, 0, 0, 0, - 0, 0, 493, 478, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - - 493, 493, 493, 493, 493, 493, 493, 471, 493, 493, - 493, 493, 493, 493, 8, 579, 579, 579, 579, 10, - 579, 579, 579, 579, 579, 6, 2, 579, 579, 579, - 579, 579, 36, 579, 28, 30, 579, 579, 579, 579, - 579, 18, 22, 23, 21, 21, 21, 21, 21, 20, - 21, 21, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 74, 579, 579, 579, 579, 579, - 579, 579, 579, 115, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 140, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 186, 178, 196, - 194, 182, 180, 190, 184, 188, 160, 156, 164, 162, - 150, 158, 154, 152, 579, 579, 579, 148, 579, 579, - 579, 579, 579, 579, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 579, - 211, 579, 214, 207, 206, 579, 579, 579, 579, 579, - 579, 579, 579, 454, 579, 282, 579, 579, 284, 579, - 579, 579, 579, 290, 579, 579, 579, 579, 322, 579, - 579, 579, 292, 579, 579, 579, 579, 579, 579, 579, - 314, 579, 288, 310, 308, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 342, 579, 579, 348, 579, - 579, 334, 579, 330, 328, 579, 579, 579, 350, 579, - 579, 364, 579, 579, 579, 579, 360, 579, 579, 378, - 379, 377, 377, 377, 377, 377, 377, 377, 372, 377, - 377, 242, 579, 268, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 226, 579, 230, 579, - 234, 579, 579, 579, 232, 579, 579, 579, 579, 579, - 579, 579, 579, 254, 579, 579, 579, 579, 579, 579, - 579, 272, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 432, 579, 579, 579, 579, - - 403, 579, 579, 430, 579, 397, 579, 579, 579, 222, - 223, 221, 439, 440, 579, 579, 438, 579, 579, 579, - 579, 579, 579, 579, 387, 388, 386, 386, 386, 386, - 386, 386, 386, 386, 386, 0, 0, 0, 532, 521, - 514, 534, 0, 537, 523, 525, 0, 519, 508, 0, - 530, 0, 510, 539, 0, 543, 517, 0, 545, 512, - 527, 0, 0, 0, 0, 0, 0, 0, 0, 580, - 581, 579, 579, 579, 579, 579, 579, 0, 0, 0, - 0, 0, 0, 0, 499, 497, 579, 579, 579, 579, - 579, 0, 0, 0, 0, 0, 0, 0, 536, 0, - - 0, 0, 0, 0, 0, 0, 542, 516, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 612, + 612, 610, 610, 610, 610, 610, 610, 610, 0, 0, + 0, 0, 0, 0, 612, 610, 610, 610, 610, 610, + 610, 0, 0, 563, 552, 545, 565, 0, 568, 554, + 556, 0, 550, 539, 0, 561, 0, 541, 570, 0, + + 574, 548, 0, 576, 543, 558, 0, 0, 0, 0, + 0, 0, 0, 611, 612, 610, 610, 610, 610, 610, + 610, 0, 0, 0, 0, 0, 0, 0, 524, 509, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 502, 524, 524, 524, 524, 524, 524, + 8, 610, 610, 610, 610, 10, 610, 610, 610, 610, + 610, 6, 2, 610, 610, 610, 610, 610, 36, 44, + 610, 610, 28, 30, 610, 610, 610, 42, 610, 610, + 610, 18, 22, 23, 21, 21, 21, 21, 21, 20, + + 21, 21, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 78, 610, 610, 610, 610, 610, + 610, 610, 610, 119, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 144, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 190, 182, 200, + 198, 186, 184, 194, 188, 192, 164, 160, 168, 166, + 154, 162, 158, 156, 610, 610, 610, 152, 610, 610, + 610, 610, 610, 610, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 610, + + 215, 610, 218, 211, 210, 610, 610, 610, 610, 610, + 610, 610, 610, 485, 610, 610, 610, 610, 610, 285, + 610, 610, 291, 610, 610, 610, 610, 299, 610, 610, + 610, 610, 331, 610, 610, 610, 301, 610, 610, 610, + 610, 610, 610, 610, 323, 610, 295, 319, 317, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 351, + 610, 610, 357, 610, 610, 610, 610, 343, 610, 339, + 337, 610, 610, 610, 610, 610, 363, 610, 610, 377, + 610, 610, 610, 610, 373, 610, 610, 391, 392, 390, + 390, 390, 390, 390, 390, 390, 385, 390, 390, 245, + + 610, 269, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 229, 610, 233, 610, 237, 610, 610, 610, + 235, 610, 610, 610, 610, 610, 610, 610, 610, 257, + 610, 610, 610, 610, 610, 610, 610, 273, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 445, 610, 610, 610, 610, 416, 610, 610, 443, + 610, 410, 610, 610, 610, 226, 225, 454, 455, 456, + 610, 610, 610, 610, 453, 610, 610, 474, 610, 472, + 610, 610, 610, 610, 610, 462, 610, 610, 480, 481, + 479, 479, 479, 479, 479, 479, 479, 479, 400, 401, + + 399, 399, 399, 399, 399, 399, 399, 399, 399, 0, + 0, 563, 552, 545, 565, 0, 568, 554, 556, 0, + 550, 539, 0, 561, 0, 541, 570, 0, 574, 548, + 0, 576, 543, 558, 0, 0, 0, 0, 0, 0, + 0, 611, 612, 610, 610, 610, 610, 610, 610, 0, + 0, 0, 0, 0, 0, 0, 530, 528, 610, 610, + 610, 610, 610, 0, 0, 0, 0, 0, 0, 567, + 0, 0, 0, 0, 0, 0, 0, 573, 547, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 579, 579, 579, 579, 579, 579, 579, 0, 0, 0, - 0, 0, 0, 0, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 489, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 579, 579, 579, 16, - 14, 579, 579, 4, 579, 579, 579, 40, 579, 579, - 32, 579, 579, 579, 579, 579, 21, 21, 19, 19, - 21, 21, 21, 21, 21, 579, 579, 579, 579, 60, - - 95, 132, 138, 579, 579, 579, 103, 579, 579, 579, - 579, 80, 85, 579, 579, 579, 579, 78, 76, 579, - 579, 579, 579, 579, 579, 579, 82, 579, 87, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 52, 579, 579, 62, - 64, 579, 579, 579, 579, 84, 89, 579, 197, 579, - 579, 172, 170, 176, 174, 168, 192, 579, 579, 146, - 579, 579, 579, 199, 579, 579, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 579, 212, 579, 579, 579, 579, 579, 579, 579, - - 579, 452, 579, 579, 579, 579, 302, 579, 579, 316, - 326, 324, 318, 320, 579, 579, 579, 579, 579, 300, - 579, 298, 296, 306, 579, 579, 579, 579, 579, 579, - 579, 336, 346, 344, 338, 340, 579, 579, 579, 579, - 579, 579, 579, 352, 354, 579, 362, 579, 579, 579, - 579, 368, 579, 377, 377, 377, 377, 377, 377, 377, - 376, 377, 377, 579, 579, 579, 579, 579, 579, 579, - 579, 270, 579, 579, 579, 579, 256, 579, 236, 579, - 579, 228, 579, 579, 579, 579, 579, 579, 579, 262, - 260, 258, 579, 579, 579, 579, 579, 278, 579, 579, - - 280, 579, 274, 579, 579, 579, 417, 579, 400, 579, - 579, 393, 411, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 405, 579, 579, 579, 419, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 446, - 579, 386, 386, 386, 386, 386, 386, 386, 383, 386, - 384, 0, 0, 0, 0, 0, 0, 0, 536, 0, - 0, 0, 0, 0, 0, 0, 542, 516, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 579, 579, 579, 579, 579, 579, 579, 0, 0, 0, - 0, 0, 0, 0, 579, 579, 579, 579, 579, 503, + 0, 610, 610, 610, 610, 610, 610, 610, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 524, 0, - 0, 0, 0, 538, 0, 0, 0, 0, 526, 0, - 564, 0, 565, 0, 0, 496, 0, 0, 0, 0, - 0, 579, 579, 579, 579, 579, 579, 579, 0, 0, - 0, 0, 0, 0, 0, 0, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 491, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 467, 472, 473, 474, 493, 493, 493, 493, 493, 493, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 38, 579, 579, 579, 21, 21, 21, 21, 21, - - 21, 21, 579, 128, 130, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 105, 109, 579, 107, 579, - 579, 579, 579, 579, 579, 579, 579, 68, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 120, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 201, 579, 166, 579, 579, 579, 579, 142, 144, 203, - 579, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 213, 579, 464, - 579, 466, 456, 460, 458, 462, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 312, 579, 304, 579, 579, - 579, 579, 579, 332, 579, 579, 579, 579, 366, 579, - 579, 579, 579, 377, 377, 377, 377, 377, 377, 377, - 377, 377, 244, 248, 246, 579, 579, 579, 579, 579, - 579, 264, 579, 579, 579, 579, 579, 579, 579, 579, - 240, 579, 579, 579, 266, 579, 250, 579, 579, 579, - 579, 579, 579, 579, 276, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 407, 579, 579, 398, 579, 579, 579, 426, 579, - - 579, 579, 579, 579, 579, 579, 436, 579, 441, 448, - 579, 444, 579, 386, 386, 386, 386, 386, 386, 386, - 386, 0, 0, 0, 0, 0, 0, 0, 0, 524, - 0, 0, 0, 0, 538, 0, 0, 0, 0, 526, - 0, 564, 0, 565, 0, 0, 496, 0, 0, 0, - 0, 0, 579, 579, 579, 579, 579, 579, 579, 0, - 0, 0, 0, 0, 0, 0, 0, 579, 579, 579, - 579, 505, 0, 0, 531, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 520, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 610, 610, 610, + 16, 14, 610, 610, 4, 610, 610, 610, 40, 610, + 610, 610, 32, 610, 610, 610, 610, 610, 610, 21, + 21, 19, 19, 21, 21, 21, 21, 21, 610, 610, + 610, 610, 64, 99, 136, 142, 610, 610, 610, 107, + 610, 610, 610, 610, 84, 89, 610, 610, 610, 610, + 82, 80, 610, 610, 610, 610, 610, 610, 610, 86, + + 610, 91, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 56, + 610, 610, 66, 68, 610, 610, 610, 610, 88, 93, + 610, 201, 610, 610, 176, 174, 180, 178, 172, 196, + 610, 610, 150, 610, 610, 610, 203, 610, 610, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 610, 216, 610, 610, 610, 610, + 610, 610, 610, 610, 483, 610, 610, 289, 610, 287, + 283, 610, 610, 311, 610, 610, 610, 325, 335, 333, + 327, 329, 610, 610, 610, 610, 610, 309, 610, 307, + + 305, 315, 610, 610, 610, 610, 610, 610, 610, 345, + 355, 353, 347, 349, 610, 610, 610, 361, 610, 610, + 610, 610, 359, 610, 610, 365, 367, 610, 375, 610, + 610, 610, 610, 381, 610, 390, 390, 390, 390, 390, + 390, 390, 389, 390, 390, 610, 610, 610, 610, 610, + 610, 610, 610, 271, 610, 610, 610, 610, 239, 610, + 610, 231, 610, 610, 610, 610, 610, 610, 610, 263, + 261, 259, 610, 610, 610, 610, 610, 279, 610, 610, + 281, 610, 275, 610, 610, 610, 430, 610, 413, 610, + 610, 406, 424, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 418, 610, 610, 610, 432, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 464, + 610, 470, 610, 460, 610, 468, 479, 479, 479, 479, + 479, 479, 479, 476, 477, 399, 399, 399, 399, 399, + 399, 399, 396, 399, 397, 0, 0, 0, 0, 0, + 0, 567, 0, 0, 0, 0, 0, 0, 0, 573, + 547, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 610, 610, 610, 610, 610, 610, 610, + 0, 0, 0, 0, 0, 0, 0, 610, 610, 610, + 610, 610, 534, 0, 0, 0, 0, 0, 0, 0, + + 555, 0, 0, 0, 0, 569, 0, 0, 0, 0, + 557, 0, 595, 0, 0, 0, 527, 0, 0, 0, + 0, 0, 610, 610, 610, 610, 610, 610, 610, 0, + 0, 0, 0, 0, 0, 0, 0, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 522, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 498, 503, 504, 505, 524, 524, 524, 524, 524, + 524, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 38, 610, 610, 610, 610, 21, 21, + 21, 21, 21, 21, 21, 610, 132, 134, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 109, 113, + 610, 111, 610, 610, 610, 610, 610, 610, 610, 610, + 72, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 124, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 205, 610, 170, 610, 610, 610, 610, + 146, 148, 207, 610, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 217, 610, 495, 610, 497, 487, 491, 489, 493, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 321, 610, 313, 610, 610, 610, 610, 610, 610, 610, + 341, 610, 610, 610, 610, 379, 610, 610, 610, 610, + 390, 390, 390, 390, 390, 390, 390, 390, 390, 247, + 251, 249, 610, 610, 610, 610, 610, 610, 265, 610, + 610, 610, 610, 610, 610, 610, 243, 610, 610, 610, + 267, 610, 253, 610, 610, 610, 610, 610, 610, 610, + 277, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 420, 610, 610, + 411, 610, 610, 610, 439, 610, 610, 610, 610, 610, + + 610, 610, 449, 610, 451, 610, 457, 610, 610, 466, + 610, 479, 479, 479, 479, 479, 479, 479, 399, 399, + 399, 399, 399, 399, 399, 399, 0, 0, 0, 0, + 0, 0, 0, 555, 0, 0, 0, 0, 569, 0, + 0, 0, 0, 557, 0, 595, 0, 0, 0, 527, + 0, 0, 0, 0, 0, 610, 610, 610, 610, 610, + 610, 610, 0, 0, 0, 0, 0, 0, 0, 0, + 610, 610, 610, 610, 536, 0, 562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 579, 579, 579, 579, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 610, - 579, 579, 579, 579, 0, 0, 0, 0, 0, 0, - 0, 0, 493, 493, 493, 480, 493, 493, 493, 493, - 493, 493, 493, 493, 477, 490, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 475, 470, 479, 493, - 468, 493, 493, 493, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 33, 579, 579, 579, 21, 21, - 21, 21, 21, 21, 21, 21, 579, 579, 579, 579, - 56, 58, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 111, 579, 579, 136, 579, 579, 579, - 579, 579, 72, 70, 579, 579, 93, 579, 579, 579, - - 46, 579, 579, 579, 579, 124, 122, 119, 126, 579, - 113, 579, 123, 121, 118, 125, 579, 579, 579, 54, - 579, 579, 579, 579, 579, 579, 134, 579, 579, 579, - 579, 579, 579, 579, 579, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 377, - 377, 377, 377, 377, 377, 377, 377, 374, 377, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 252, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 391, - 579, 579, 579, 442, 450, 579, 386, 386, 386, 386, - 386, 386, 386, 386, 385, 0, 0, 531, 0, 0, + 610, 610, 610, 610, 610, 610, 610, 0, 0, 0, + 0, 0, 0, 0, 0, 524, 524, 524, 511, 524, + 524, 524, 524, 524, 524, 524, 524, 508, 521, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 506, + 501, 510, 524, 499, 524, 524, 524, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 33, 610, + 610, 610, 610, 21, 21, 21, 21, 21, 21, 21, + 21, 610, 610, 610, 610, 60, 62, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 115, 610, + 610, 140, 610, 610, 610, 610, 610, 76, 74, 610, + + 610, 97, 610, 610, 610, 50, 610, 610, 610, 610, + 128, 126, 123, 130, 610, 117, 610, 127, 125, 122, + 129, 610, 610, 610, 58, 610, 610, 610, 610, 610, + 610, 138, 610, 610, 610, 610, 610, 610, 610, 610, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 390, 390, 390, 390, 390, 390, 390, 390, 387, + 390, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 255, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 404, 610, 610, 610, 610, 458, 610, 610, 610, 479, + 479, 479, 479, 479, 479, 479, 479, 399, 399, 399, + 399, 399, 399, 399, 399, 398, 0, 562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, - 579, 579, 579, 579, 579, 579, 579, 0, 0, 0, - 0, 0, 0, 0, 0, 500, 579, 579, 498, 504, - 0, 0, 0, 0, 533, 0, 0, 0, 0, 0, - 0, 0, 0, 515, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 579, 579, 579, 579, 579, 579, - 579, 579, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 493, 493, 493, 493, 493, 493, 493, 487, 483, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 476, 493, 493, 488, 484, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 21, 21, 21, 21, 21, 21, 21, 21, - - 579, 579, 579, 579, 579, 579, 99, 579, 97, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 50, - 48, 44, 42, 579, 117, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 377, 377, 377, - 377, 377, 377, 377, 377, 377, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 413, 415, 579, 579, 579, 579, 579, 579, - 424, 422, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 428, 579, 579, 579, 579, 579, 579, 579, 386, - 386, 386, 386, 386, 386, 386, 386, 0, 0, 0, - 0, 533, 0, 0, 0, 0, 0, 0, 0, 0, - 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 579, 579, 579, 579, 579, 579, 579, 579, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 501, 502, - 0, 0, 0, 0, 0, 0, 0, 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 567, 0, 579, 579, 579, 579, 579, 579, 579, - 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 493, 493, 493, 493, 493, 485, 481, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 469, 486, 482, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 21, 21, 21, 21, - - 21, 21, 21, 21, 579, 579, 579, 579, 579, 579, - 101, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 377, 377, - 377, 377, 377, 377, 377, 377, 377, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 381, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 386, 386, 386, 386, 386, - 386, 386, 386, 0, 0, 0, 0, 0, 0, 0, - 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 567, 0, 579, 579, 579, 579, - - 579, 579, 579, 579, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 576, 520, 513, 0, 0, 518, - 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 579, 579, 579, 579, 579, 579, 579, - 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 21, 21, 21, 21, 21, 21, 21, 21, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 91, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 361, 579, 579, - 579, 579, 355, 579, 377, 377, 377, 377, 377, 377, - - 377, 377, 377, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 386, 386, 386, 386, 386, 386, 386, - 386, 0, 576, 520, 513, 0, 0, 518, 529, 0, + 610, 610, 610, 610, 610, 610, 610, 610, 0, 0, + 0, 0, 0, 0, 0, 0, 531, 610, 610, 529, + 535, 0, 0, 0, 564, 0, 0, 0, 0, 0, + 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 610, 610, 610, 610, 610, + 610, 610, 610, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 524, 524, 524, 524, 524, 524, 524, 518, + 514, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 507, 524, 524, 519, 515, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 21, 21, 21, 21, 21, + 21, 21, 21, 610, 610, 610, 610, 610, 610, 103, + 610, 101, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 54, 52, 48, 46, 610, 121, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 297, 296, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 390, 390, 390, + 390, 390, 390, 390, 390, 390, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 426, 428, 610, 610, 610, 610, 610, 610, 437, + 435, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 441, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 479, 479, 479, 479, 479, + 479, 479, 479, 399, 399, 399, 399, 399, 399, 399, + 399, 0, 0, 0, 564, 0, 0, 0, 0, 0, + 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 610, 610, 610, 610, 610, + 610, 610, 610, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 532, 533, 0, 0, 0, 0, 0, 0, + 538, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 597, 0, 610, + 610, 610, 610, 610, 610, 610, 610, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 524, 524, 524, 524, + 524, 516, 512, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 500, 517, 513, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 21, 21, 21, 21, 21, 21, + 21, 21, 610, 610, 610, 610, 610, 610, 105, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 390, 390, 390, 390, 390, 390, 390, 390, 390, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 394, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 479, 479, 479, 479, 479, + 479, 479, 479, 399, 399, 399, 399, 399, 399, 399, + 399, 0, 0, 0, 0, 0, 0, 538, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 597, 0, 610, 610, 610, 610, + 610, 610, 610, 610, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 551, 544, 0, 0, 549, 560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 579, 579, 579, 579, 579, 579, 579, 579, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, - 535, 0, 509, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 574, 0, 0, 579, 579, 579, 579, 579, - 579, 579, 579, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 579, 579, 579, 579, 579, 579, 579, 11, 579, 579, - 579, 579, 579, 579, 579, 21, 21, 21, 21, 21, - 21, 21, 21, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 377, 377, 377, 377, 377, 377, 377, - 377, 377, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 245, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 386, 386, 386, 386, 386, 386, 386, 386, - 578, 0, 535, 0, 509, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 574, 0, 0, 579, 579, 579, - 579, 579, 579, 579, 579, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 540, 0, 544, 0, - 0, 0, 0, 573, 0, 0, 0, 0, 579, 579, - - 579, 579, 579, 579, 579, 579, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 21, 21, 21, - 21, 21, 21, 21, 21, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 102, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 357, 579, 579, 377, 377, - 377, 377, 377, 377, 377, 377, 377, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 251, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 409, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 418, 579, 579, 579, - 579, 579, 579, 579, 443, 579, 386, 386, 386, 386, - 386, 386, 386, 386, 0, 0, 540, 0, 544, 0, - 0, 0, 0, 573, 0, 0, 0, 0, 579, 579, - 579, 579, 579, 579, 579, 579, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 610, 610, 610, 610, 610, + 610, 610, 610, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 21, 21, 21, 21, 21, + 21, 21, 21, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 95, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 374, 610, 610, 610, + 610, 368, 610, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 459, 610, 610, 479, 479, 479, 479, + 479, 479, 479, 479, 399, 399, 399, 399, 399, 399, + 399, 399, 0, 551, 544, 0, 0, 549, 560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 572, 573, 575, 0, 0, 568, 548, 579, - 579, 579, 579, 579, 579, 579, 579, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 493, 493, 493, 493, - - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 21, 21, - 21, 21, 21, 21, 21, 21, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 67, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 65, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - - 224, 224, 224, 224, 224, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 377, - 377, 377, 377, 377, 377, 377, 377, 377, 579, 579, - 579, 579, 579, 579, 247, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 394, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 433, 579, - - 579, 579, 579, 386, 386, 386, 386, 386, 386, 386, - 386, 0, 0, 0, 0, 0, 0, 0, 572, 573, - 575, 0, 0, 568, 548, 579, 579, 579, 579, 579, - 579, 579, 579, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 541, 0, 0, 0, 0, 0, - 579, 579, 579, 579, 579, 579, 579, 552, 557, 0, - 0, 0, 0, 0, 0, 0, 0, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 21, 21, - - 21, 21, 21, 21, 21, 21, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 45, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 351, 353, 579, 579, 579, 579, 377, 377, - 377, 377, 377, 377, 377, 377, 377, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 229, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 425, 579, 579, 579, 579, 579, 579, 579, - 386, 386, 386, 386, 386, 386, 386, 386, 0, 0, - 541, 0, 0, 0, 0, 0, 579, 579, 579, 579, - 579, 579, 579, 552, 557, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 610, 610, 610, 610, 610, 610, + 610, 610, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 609, 0, 566, 0, 540, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 607, 0, + 0, 610, 610, 610, 610, 610, 610, 610, 610, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 610, 610, 610, 610, + 610, 610, 610, 11, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 21, 21, 21, 21, 21, 21, 21, + 21, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 610, 610, 610, 610, 610, + + 610, 610, 610, 248, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 479, 479, + 479, 479, 479, 479, 479, 479, 399, 399, 399, 399, + 399, 399, 399, 399, 609, 0, 566, 0, 540, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 607, 0, 0, 610, 610, 610, 610, 610, 610, + 610, 610, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 571, 0, 575, 0, 0, 0, 601, + 600, 0, 0, 606, 0, 0, 0, 0, 610, 610, + 610, 610, 610, 610, 610, 610, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 21, + 21, 21, 21, 21, 21, 21, 21, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 106, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 370, 610, 610, 390, 390, 390, 390, 390, + + 390, 390, 390, 390, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 254, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 422, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 431, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 479, 479, 479, 479, + 479, 479, 479, 479, 399, 399, 399, 399, 399, 399, + 399, 399, 0, 0, 571, 0, 575, 0, 0, 0, + 601, 600, 0, 0, 606, 0, 0, 0, 0, 610, + 610, 610, 610, 610, 610, 610, 610, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 579, 579, 579, 579, 579, 579, 554, 0, 0, 0, - 0, 0, 0, 0, 561, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 25, 579, 21, 21, 21, 21, - 21, 21, 21, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 135, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 139, 133, - - 579, 579, 579, 579, 579, 579, 579, 579, 147, 579, - 579, 579, 579, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 579, 579, - 579, 579, 579, 453, 579, 579, 579, 579, 289, 315, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 335, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 377, 377, 377, 377, 377, 377, 377, - 377, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 231, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 396, 579, 579, 579, 579, - 579, 579, 386, 386, 386, 386, 386, 386, 386, 0, - 0, 0, 0, 0, 0, 0, 579, 579, 579, 579, - 579, 579, 554, 0, 0, 0, 0, 0, 0, 0, - 561, 522, 528, 0, 0, 0, 571, 0, 566, 546, - 549, 579, 579, 547, 553, 0, 0, 0, 0, 0, - 0, 563, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 579, 9, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 21, 21, 21, 21, 21, 21, 579, 579, 579, 579, - 579, 579, 579, 579, 94, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 73, 71, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 321, 579, 579, 579, 579, - 295, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 341, 579, 579, 579, 579, 579, 579, 579, - 365, 579, 579, 377, 377, 377, 377, 377, 377, 377, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 233, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 386, 386, 386, 386, 386, 386, 522, 528, 0, 0, - 0, 571, 0, 566, 546, 549, 579, 579, 547, 553, - 0, 0, 0, 0, 0, 0, 563, 511, 0, 570, - 551, 550, 555, 558, 0, 0, 556, 562, 493, 493, - - 493, 493, 493, 493, 493, 493, 579, 579, 579, 579, - 5, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 21, 21, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 49, 579, 579, 579, 579, 579, - 114, 579, 579, 63, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 224, 224, 224, 224, 224, - 224, 224, 224, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 293, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 377, 377, 370, 579, 579, 579, 579, 579, 263, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 386, 386, 511, 0, 570, 551, 550, - 555, 558, 0, 0, 556, 562, 569, 560, 559, 493, - 493, 579, 579, 579, 579, 1, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 106, 579, 579, - 579, 579, 69, 579, 579, 579, 579, 579, 579, 579, - 579, 53, 579, 579, 579, 579, 579, 579, 185, 177, - 579, 579, 579, 579, 179, 189, 579, 579, 579, 579, - 579, 579, 579, 579, 224, 224, 579, 579, 455, 459, - 457, 461, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 305, 297, 579, 579, 579, 287, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 363, 579, 579, 579, 579, 579, 249, 579, 579, - 579, 579, 579, 239, 237, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 429, 579, 579, 579, 579, 579, 579, 220, 437, - 579, 579, 579, 569, 560, 559, 579, 579, 579, 579, - 579, 35, 579, 579, 579, 579, 579, 17, 579, 579, - 579, 579, 57, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 47, 579, - 579, 112, 579, 61, 579, 579, 579, 579, 579, 579, - 579, 191, 181, 183, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 319, 317, 291, 313, - - 579, 579, 307, 579, 579, 579, 579, 339, 337, 579, - 333, 579, 327, 579, 579, 359, 579, 579, 579, 243, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 271, 579, 579, 579, 579, 579, 579, - 431, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 39, 579, 27, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 96, 131, 579, - 104, 579, 579, 579, 579, 77, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 198, 579, 579, 195, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 200, 579, 579, 579, 579, 579, 579, 283, - 579, 579, 579, 299, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 225, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 416, - 579, 579, 579, 579, 579, 579, 404, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 29, 579, 579, 579, 579, 579, 55, 579, 579, 579, - 579, 110, 579, 579, 75, 579, 579, 579, 43, 579, - 579, 579, 579, 202, 579, 193, 187, 159, 155, 579, - 579, 579, 157, 153, 579, 145, 579, 579, 204, 579, - - 579, 579, 579, 579, 579, 325, 323, 579, 579, 579, - 345, 343, 579, 579, 579, 349, 367, 579, 267, 579, - 579, 235, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 13, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 108, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 149, 151, 579, 579, - 579, 579, 579, 579, 579, 579, 309, 579, 303, 579, - 329, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 579, 579, 392, 579, 579, - 579, 579, 402, 579, 579, 390, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 100, 579, 579, 579, 579, 579, 579, 41, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 163, 579, 579, - 579, 579, 579, 451, 579, 285, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 257, 579, 579, - 279, 579, 579, 579, 579, 579, 579, 579, 579, 401, - 579, 579, 579, 579, 445, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 98, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 171, 579, 169, 579, 579, 579, - 161, 579, 579, 579, 465, 579, 579, 311, 579, 331, - 579, 579, 579, 579, 579, 261, 579, 579, 277, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 3, 31, 579, 579, 579, 579, - 59, 137, 79, 579, 579, 579, 579, 579, 83, 579, - 579, 579, 579, 167, 579, 579, 579, 281, 579, 579, - 579, 579, 579, 227, 579, 579, 265, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 37, 579, 579, 579, 579, 579, 579, - - 579, 88, 579, 175, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 253, 259, 273, 579, 579, 579, 399, - 408, 579, 579, 579, 579, 579, 579, 579, 449, 579, - 579, 579, 579, 579, 579, 579, 81, 579, 579, 579, - 173, 579, 579, 579, 579, 579, 241, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 427, 579, 579, 7, - 579, 579, 579, 579, 116, 579, 86, 579, 579, 141, - 143, 463, 579, 579, 579, 255, 579, 579, 579, 410, - 579, 579, 579, 435, 447, 579, 579, 579, 129, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - - 579, 579, 579, 579, 579, 51, 579, 579, 579, 269, - 579, 579, 579, 579, 579, 406, 15, 579, 579, 579, - 579, 579, 347, 579, 579, 579, 579, 579, 34, 127, - 579, 579, 579, 275, 579, 579, 579, 579, 579, 165, - 301, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 421, 579, 579, 414, 579, 579, - 412, 579, 92, 423, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 90, - 0 + 0, 0, 0, 0, 605, 606, 608, 0, 0, 598, + 579, 610, 610, 610, 610, 610, 610, 610, 610, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 21, 21, 21, 21, 21, 21, 21, 21, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 71, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 69, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 390, 390, + + 390, 390, 390, 390, 390, 390, 390, 610, 610, 610, + 610, 610, 610, 250, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 407, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 446, 448, 610, 610, + 610, 610, 610, 610, 610, 610, 479, 479, 479, 479, + 479, 479, 479, 479, 399, 399, 399, 399, 399, 399, + 399, 399, 0, 0, 0, 0, 0, 0, 0, 0, + 605, 606, 608, 0, 0, 598, 579, 610, 610, 610, + 610, 610, 610, 610, 610, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 572, 0, 0, 0, + 0, 0, 0, 610, 610, 610, 610, 610, 610, 610, + 583, 588, 0, 0, 0, 0, 0, 0, 0, 0, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 21, 21, 21, 21, 21, 21, 21, + 21, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 49, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 364, 366, 610, 610, 610, 610, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 232, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 438, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 479, 479, 479, 479, 479, 479, 479, + 479, 399, 399, 399, 399, 399, 399, 399, 399, 0, + 0, 572, 0, 0, 0, 0, 0, 0, 610, 610, + 610, 610, 610, 610, 610, 583, 588, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 610, 610, 610, 610, 610, 610, 585, + + 0, 0, 0, 0, 0, 0, 0, 592, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 25, + 610, 21, 21, 21, 21, 21, 21, 21, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 139, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 143, 137, 610, 610, 610, 610, 610, + 610, 610, 610, 151, 610, 610, 610, 610, 227, 227, + + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 610, 610, 610, 610, 610, 484, 610, + 610, 610, 610, 610, 610, 610, 298, 324, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 344, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 390, 390, 390, 390, 390, 390, 390, + 390, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 234, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 409, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 479, 479, 479, 479, 479, + 479, 479, 399, 399, 399, 399, 399, 399, 399, 0, + 0, 0, 0, 0, 0, 0, 0, 610, 610, 610, + 610, 610, 610, 585, 0, 0, 0, 0, 0, 0, + 0, 592, 553, 559, 0, 0, 0, 0, 604, 0, + 596, 577, 580, 610, 610, 578, 584, 0, 0, 0, + 0, 0, 0, 594, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 610, 9, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 21, 21, 21, 21, 21, 21, + 610, 610, 610, 610, 610, 610, 610, 610, 98, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 77, 75, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 330, 610, 610, 610, 610, 304, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 350, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 378, + 610, 610, 390, 390, 390, 390, 390, 390, 390, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 236, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 479, 479, 479, 479, 479, 479, 399, 399, + 399, 399, 399, 399, 553, 559, 0, 0, 0, 0, + 604, 0, 596, 577, 580, 610, 610, 578, 584, 0, + + 0, 0, 0, 0, 0, 594, 542, 0, 603, 599, + 582, 581, 586, 589, 0, 0, 587, 593, 524, 524, + 524, 524, 524, 524, 524, 524, 610, 610, 610, 610, + 5, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 21, 21, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 53, 610, 610, 610, + 610, 610, 118, 610, 610, 67, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 227, 227, 227, + + 227, 227, 227, 227, 227, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 302, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 390, 390, 383, + 610, 610, 610, 610, 610, 264, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 479, 479, 399, 399, 542, 0, 603, + + 599, 582, 581, 586, 589, 0, 0, 587, 593, 602, + 591, 590, 524, 524, 610, 610, 610, 610, 1, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 73, 610, 610, + 610, 610, 610, 610, 610, 610, 57, 610, 610, 610, + 610, 610, 610, 189, 181, 610, 610, 610, 610, 183, + 193, 610, 610, 610, 610, 610, 610, 610, 610, 227, + 227, 610, 610, 486, 490, 488, 492, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 314, 306, 610, 610, 610, 294, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 376, 610, 610, 610, 610, 610, 252, 610, 610, + 610, 610, 242, 240, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 442, 610, 610, 610, 610, 610, 610, 224, 452, 610, + 610, 610, 610, 610, 610, 467, 602, 591, 590, 610, + 610, 610, 610, 610, 35, 610, 610, 610, 610, 610, + 610, 610, 17, 610, 610, 610, 610, 61, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 51, 610, 610, 116, 610, 65, + 610, 610, 610, 610, 610, 610, 610, 195, 185, 187, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 284, + 610, 610, 610, 610, 610, 328, 326, 300, 322, 610, + 610, 316, 610, 610, 610, 610, 348, 346, 610, 342, + 610, 610, 336, 610, 610, 610, 372, 610, 610, 610, + 246, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 272, 610, 610, 610, 610, 610, 610, + 444, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 39, 610, + 27, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 100, 135, 610, 610, 610, 610, 110, 610, + 610, 81, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 202, 610, 610, 199, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 204, 610, + 610, 610, 610, 610, 610, 610, 610, 290, 610, 610, + 610, 308, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 228, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 429, 610, + + 610, 610, 610, 610, 610, 417, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 29, 610, 610, 610, 610, 610, 610, 610, + 59, 610, 610, 610, 108, 610, 114, 610, 610, 79, + 610, 610, 610, 47, 610, 610, 610, 610, 206, 610, + 197, 191, 163, 159, 610, 610, 610, 161, 157, 610, + 149, 610, 610, 208, 610, 610, 610, 610, 610, 610, + 610, 610, 334, 332, 610, 610, 610, 354, 352, 610, + 610, 610, 358, 610, 362, 380, 610, 268, 610, 238, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 13, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 112, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 153, + 155, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 318, 610, 312, 610, 610, 338, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 405, 610, 610, 610, 610, 415, 610, 610, + 403, 610, 610, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 610, 43, 610, 41, 610, 610, 610, 610, + 104, 610, 610, 610, 610, 610, 610, 45, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 167, 610, 610, + 610, 610, 610, 482, 292, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 258, + 610, 610, 280, 610, 610, 610, 610, 610, 610, 610, + 610, 414, 610, 610, 473, 471, 610, 610, 469, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 102, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 175, + 610, 173, 610, 610, 610, 165, 610, 610, 610, 496, + + 610, 610, 610, 610, 320, 610, 610, 340, 610, 610, + 610, 610, 262, 610, 610, 278, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 465, 461, + 610, 610, 3, 31, 610, 610, 610, 610, 63, 141, + 83, 610, 610, 610, 610, 610, 87, 610, 610, 610, + 610, 171, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 230, 610, 610, 266, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 37, 610, 610, 610, 610, 610, 610, 610, + 92, 610, 179, 610, 610, 610, 610, 610, 610, 610, + + 610, 610, 360, 610, 610, 256, 260, 274, 610, 610, + 610, 412, 421, 610, 610, 610, 610, 610, 610, 463, + 610, 610, 610, 610, 610, 610, 610, 85, 610, 610, + 610, 177, 610, 610, 610, 610, 286, 610, 610, 610, + 244, 610, 610, 610, 610, 610, 610, 610, 610, 440, + 610, 7, 610, 610, 610, 610, 120, 610, 90, 610, + 610, 145, 147, 494, 610, 610, 610, 610, 610, 610, + 610, 610, 423, 610, 610, 610, 450, 610, 610, 610, + 133, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 55, + + 610, 288, 282, 610, 610, 270, 610, 610, 610, 610, + 610, 419, 15, 610, 610, 610, 610, 610, 356, 610, + 610, 610, 610, 610, 34, 131, 610, 610, 610, 276, + 610, 610, 610, 610, 610, 169, 310, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 434, 610, 610, 427, 610, 610, 425, 610, 96, 436, + 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 94, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -1038,2333 +1081,2481 @@ 4, 4, 4, 4, 1 } ; -static yyconst flex_int16_t yy_base[5898] = +static yyconst flex_int16_t yy_base[6295] = { 0, 0, 75, 150, 0, 0, 0, 0, 7, 5, 53, 3, 45, 225, 0, 0, 0, 252, 271, 0, 0, - 0, 0, 59, 65, 338, 413, 488, 0, 563, 638, - 69, 74, 62, 316, 335, 344, 312, 387, 342, 390, - 713, 0, 409, 548, 413, 558, 567, 613, 258, 260, - 309, 315, 8946, 8945, 788, 0, 863, 938, 961, 966, - 9011, 9014, 9014, 9014, 8987, 674, 1033, 684, 899, 9014, - 9014, 9014, 0, 8971, 8970, 8981, 0, 8978, 950, 9014, - 9014, 9014, 0, 8982, 692, 9014, 0, 0, 909, 983, - 9014, 9014, 9014, 23, 35, 1027, 882, 1068, 1076, 1068, - - 886, 961, 1103, 582, 1111, 1114, 1122, 1130, 1133, 1141, - 39, 406, 8937, 84, 1, 41, 263, 254, 938, 2, - 49, 258, 9014, 1141, 1173, 1184, 1194, 0, 8965, 8964, - 325, 8975, 645, 8972, 353, 78, 414, 1112, 85, 380, - 8950, 387, 1166, 1114, 414, 428, 570, 956, 835, 868, - 973, 433, 0, 0, 1223, 1233, 1217, 1249, 1252, 1260, - 1264, 1268, 1265, 9014, 9014, 9014, 8975, 1296, 0, 1306, - 1316, 9014, 9014, 9014, 0, 8959, 363, 8958, 550, 1308, - 8969, 3, 978, 572, 1321, 866, 9014, 661, 0, 9014, - 0, 8971, 1358, 0, 1368, 1378, 8991, 9014, 8990, 0, - - 8953, 8952, 8963, 6, 8960, 1326, 920, 541, 264, 383, - 989, 939, 81, 958, 839, 967, 1215, 1009, 1293, 1033, - 538, 625, 8916, 1232, 574, 913, 341, 931, 1244, 940, - 1350, 1011, 9014, 1405, 1413, 1423, 1433, 1443, 1453, 1463, - 0, 8948, 8947, 8958, 941, 8955, 8925, 8918, 8927, 8926, - 951, 604, 1049, 1157, 8912, 1045, 1435, 1067, 1005, 1435, - 1443, 10, 56, 8924, 1081, 1344, 1088, 1104, 1155, 1120, - 1440, 1171, 423, 1192, 8905, 869, 1246, 1207, 8912, 1110, - 9014, 1498, 1506, 1516, 1526, 0, 8936, 8935, 8946, 1265, - 8943, 8907, 8912, 8915, 8964, 8963, 9014, 8962, 1325, 1535, - - 1554, 1612, 1630, 8961, 8960, 8959, 1650, 1725, 8923, 1313, - 1342, 1239, 1660, 9014, 1665, 8900, 8896, 8907, 1351, 8904, - 8931, 1691, 9014, 1710, 1257, 1007, 1555, 8928, 1193, 8926, - 1317, 1371, 8921, 1316, 8908, 7, 1552, 8888, 8879, 8892, - 8885, 8884, 8883, 8896, 9014, 1725, 1738, 1768, 0, 8908, - 8906, 8917, 8904, 8905, 8893, 8920, 8899, 8898, 8909, 1377, - 8906, 0, 1776, 1788, 1798, 1596, 1683, 1686, 1766, 1814, - 1822, 1825, 1833, 1836, 1844, 1847, 1855, 1864, 8915, 8894, - 8893, 8904, 1523, 8901, 1867, 1875, 1878, 1886, 1898, 1909, - 1912, 1920, 1923, 1933, 8867, 8859, 8873, 8865, 8868, 8869, - - 568, 8869, 8860, 8848, 8852, 8850, 8856, 0, 8859, 8853, - 8847, 8862, 8847, 1557, 8849, 8841, 8860, 8848, 0, 8845, - 8852, 1948, 1974, 1984, 1994, 0, 8869, 8867, 1373, 8878, - 8865, 1436, 8866, 8854, 8835, 1299, 8846, 8832, 8832, 8828, - 8845, 8836, 1833, 1342, 8825, 8831, 8818, 8827, 8837, 8816, - 8819, 8834, 8822, 8832, 8814, 8830, 8810, 1508, 8828, 1509, - 8819, 8810, 8813, 849, 1653, 8826, 8808, 8812, 1052, 1425, - 8800, 8807, 8815, 8808, 8800, 1966, 1974, 8799, 8805, 8802, - 8812, 8793, 8795, 8794, 8796, 1547, 0, 2030, 2040, 2050, - 1936, 1946, 2066, 2069, 2077, 2080, 2088, 8841, 8820, 8819, - - 8830, 1575, 8827, 1440, 0, 1568, 0, 1565, 1597, 1619, - 8852, 8849, 8846, 8849, 8799, 8786, 8776, 8796, 8785, 8788, - 8787, 8792, 8776, 8788, 8787, 8771, 8776, 0, 8776, 8770, - 8769, 8767, 8766, 8776, 8778, 2045, 8777, 8762, 8761, 1531, - 8771, 8765, 1501, 8769, 8758, 8756, 8754, 1623, 8760, 8754, - 0, 8755, 8761, 1587, 8764, 2046, 8763, 8753, 8747, 8746, - 8746, 8744, 1624, 8746, 8752, 8746, 8743, 1710, 8742, 8737, - 8732, 8748, 8740, 0, 8734, 0, 8739, 8739, 2106, 2122, - 2132, 2142, 2152, 0, 8762, 8760, 8771, 8758, 8759, 8747, - 8737, 8720, 8738, 8731, 8736, 8719, 8719, 8728, 8714, 8715, - - 8728, 8718, 8713, 8730, 8725, 8711, 8704, 8711, 8712, 1605, - 8709, 8711, 8711, 8720, 1540, 8705, 8711, 8704, 8717, 1620, - 8701, 8713, 8706, 8710, 8708, 8703, 8693, 8691, 8700, 1651, - 8703, 8702, 8687, 8698, 8703, 1227, 8689, 8697, 8696, 8696, - 8690, 8680, 8681, 8678, 8677, 8676, 8676, 8678, 8674, 1573, - 8672, 8676, 0, 8670, 8675, 8676, 8681, 8680, 8667, 8662, - 1652, 0, 8661, 8662, 8660, 1654, 1843, 8663, 2160, 2168, - 2178, 2188, 0, 8689, 8687, 8698, 8685, 8686, 8674, 8657, - 8663, 8645, 8713, 9014, 1772, 2197, 8712, 9014, 2216, 1826, - 1937, 1946, 307, 2072, 1770, 1860, 1939, 1718, 2028, 1106, - - 2081, 2206, 1759, 1828, 1766, 1837, 1850, 1890, 1715, 8711, - 2219, 2239, 2274, 8675, 1826, 1783, 1891, 1981, 1877, 1935, - 1966, 2092, 2126, 1364, 2222, 2103, 2284, 8652, 8649, 8660, - 8647, 8648, 8635, 8678, 2218, 8652, 8672, 8661, 8670, 8664, - 8657, 8658, 9014, 8666, 8662, 9014, 8659, 8653, 9014, 8670, - 9014, 8651, 1994, 9014, 8649, 8648, 9014, 9014, 8658, 8648, - 8622, 8635, 8631, 8635, 8613, 1975, 8617, 2292, 2302, 8646, - 8638, 8648, 8649, 1927, 8635, 8660, 8640, 8638, 8649, 8636, - 8637, 8625, 2310, 2320, 2336, 2344, 2347, 2359, 2258, 2355, - 2368, 2371, 2383, 2395, 2399, 2403, 8653, 8633, 8631, 8642, - - 8629, 8630, 8618, 2411, 2414, 2422, 2425, 2434, 2444, 2448, - 2456, 2452, 2473, 2476, 0, 8600, 8613, 8598, 8606, 0, - 8592, 8610, 8593, 8602, 8607, 0, 0, 8604, 8591, 8601, - 8588, 8591, 0, 8582, 0, 0, 8594, 8590, 8580, 8592, - 8576, 0, 2480, 2511, 8607, 8599, 2390, 8609, 8610, 0, - 2004, 8596, 8578, 8585, 8584, 8587, 8583, 8569, 8579, 8565, - 8566, 2168, 8561, 8564, 2229, 8576, 8575, 8556, 8556, 8609, - 8570, 2078, 8568, 8561, 2341, 1794, 8553, 8564, 8551, 8549, - 8554, 2020, 8565, 2195, 8552, 2050, 8563, 8557, 8543, 8545, - 1878, 8557, 1384, 8542, 8546, 8545, 8551, 0, 8537, 8554, - - 8550, 8549, 8585, 8538, 8543, 8536, 2454, 0, 0, 0, - 8579, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8530, 8530, 8524, 0, 8538, 8533, - 8532, 8528, 8533, 8518, 2521, 2531, 2507, 2550, 2553, 2561, - 2564, 2572, 8568, 8548, 8546, 8557, 8544, 8545, 8533, 2181, - 0, 2333, 0, 9014, 9014, 8519, 8516, 8528, 8521, 2204, - 8523, 8509, 8505, 0, 8523, 0, 8507, 8515, 0, 8511, - 8516, 8503, 8512, 0, 8503, 8497, 8496, 8499, 0, 8498, - 8494, 8502, 0, 8498, 2217, 8490, 8504, 8493, 8487, 8486, - 0, 8483, 0, 0, 0, 8500, 8498, 8495, 8490, 8495, - - 8482, 8483, 8477, 8476, 8479, 0, 8478, 8474, 0, 8471, - 8478, 0, 8468, 0, 0, 8482, 8477, 8481, 0, 8460, - 8469, 2284, 8464, 8481, 8464, 8479, 0, 8473, 8472, 2584, - 2594, 8488, 8480, 8490, 8491, 2247, 8477, 8463, 0, 8461, - 8464, 2418, 8453, 0, 8455, 87, 308, 383, 531, 2337, - 923, 957, 1010, 1091, 1142, 2294, 0, 1244, 0, 1308, - 0, 1460, 1468, 1502, 0, 1607, 1660, 1699, 1750, 1885, - 1925, 1946, 1952, 2380, 1968, 1974, 1995, 2004, 2063, 2081, - 2201, 0, 2096, 2091, 2140, 2164, 2164, 2172, 2189, 2181, - 2232, 2248, 2292, 2294, 2305, 0, 2303, 2308, 2308, 2327, - - 0, 2320, 2329, 2443, 2339, 0, 2324, 2369, 2363, 0, - 2380, 0, 0, 0, 2376, 2385, 2424, 2384, 2397, 2404, - 2406, 2420, 2422, 2418, 2603, 2613, 2453, 2447, 2469, 2476, - 2483, 2471, 2468, 2470, 2484, 2550, 2578, 2553, 2554, 2592, - 2622, 2632, 2551, 2633, 2564, 2634, 2635, 2565, 2636, 2637, - 2567, 2638, 2584, 2640, 2641, 2586, 2642, 2644, 2587, 2643, - 2645, 2647, 2646, 2648, 2649, 2652, 2650, 2654, 2656, 2677, - 2712, 2620, 2622, 2640, 2637, 2671, 2625, 2681, 2678, 2673, - 2686, 2680, 2698, 2661, 2723, 0, 2638, 2651, 2658, 2663, - 2650, 2694, 2669, 2714, 2717, 2707, 2704, 2724, 2721, 2707, - - 2723, 2724, 2722, 2727, 2729, 2732, 9014, 2718, 2727, 2723, - 2737, 2707, 2761, 2708, 2763, 2701, 2707, 2699, 2720, 2728, - 2734, 2735, 2736, 2747, 2730, 2750, 2730, 2731, 2745, 2739, - 2751, 2755, 2759, 2745, 2747, 2785, 2788, 2796, 2799, 2807, - 2810, 2819, 2822, 2830, 2833, 2841, 2844, 2855, 2864, 2744, - 2758, 2759, 2771, 2775, 2830, 2770, 2867, 2877, 2880, 2890, - 2904, 2907, 2915, 2918, 2926, 2929, 2753, 2754, 2756, 0, - 0, 2761, 2788, 0, 2775, 2795, 2782, 0, 2811, 2813, - 0, 2816, 2807, 2812, 2830, 2816, 2846, 2855, 0, 9014, - 2856, 2869, 2852, 2872, 2859, 2835, 2859, 2860, 2854, 2874, - - 2894, 0, 0, 2876, 2879, 2894, 0, 2877, 2897, 2895, - 2890, 0, 0, 2886, 2900, 2934, 2896, 0, 0, 2891, - 2905, 2905, 2892, 2908, 2898, 2903, 0, 2915, 0, 2921, - 2904, 2907, 2921, 2915, 2927, 2914, 2912, 2913, 2915, 2931, - 2925, 2920, 2930, 2926, 2929, 2931, 0, 2936, 2937, 0, - 0, 2938, 2948, 2946, 2937, 0, 0, 2979, 0, 2949, - 2953, 2935, 0, 0, 0, 0, 0, 2934, 2934, 0, - 2938, 2943, 2944, 0, 2958, 2962, 2969, 3007, 3010, 3018, - 3021, 3029, 3032, 3041, 2965, 2978, 2973, 2992, 2995, 3022, - 2984, 3007, 0, 2986, 2978, 2980, 2987, 3043, 3047, 3004, - - 3016, 0, 3000, 3005, 3010, 3017, 0, 3021, 3003, 0, - 0, 0, 0, 0, 3023, 3024, 3025, 3013, 3027, 0, - 3028, 0, 0, 0, 3005, 3026, 3027, 3032, 3028, 3027, - 3035, 0, 0, 0, 0, 0, 3038, 3027, 3040, 3017, - 3042, 3038, 3022, 0, 0, 3034, 0, 3046, 3043, 3033, - 3035, 0, 3027, 3062, 3065, 3066, 3077, 3060, 3080, 3060, - 0, 3040, 3059, 3043, 3052, 3053, 3053, 3063, 3050, 3063, - 3052, 0, 3055, 3068, 3068, 3074, 0, 3072, 0, 3064, - 3064, 0, 3063, 3077, 3079, 3066, 3082, 3071, 3064, 0, - 0, 0, 3065, 3071, 3074, 3079, 3084, 0, 3070, 3092, - - 0, 3093, 0, 3089, 3077, 3096, 3093, 3074, 0, 3087, - 3096, 0, 3102, 3098, 3103, 3100, 3091, 3108, 3104, 3090, - 3104, 3094, 0, 3102, 3111, 3111, 3117, 3118, 3105, 3105, - 3106, 3111, 3121, 3108, 3114, 3110, 3116, 3117, 3113, 0, - 3133, 3144, 3145, 3146, 3157, 3140, 3160, 3140, 0, 3140, - 0, 3187, 3188, 3189, 3190, 3191, 3192, 3196, 3193, 3194, - 3195, 3197, 3198, 3199, 3201, 3200, 3202, 3203, 3205, 3204, - 3207, 3206, 3209, 3210, 3236, 3211, 3212, 3213, 3219, 3225, - 3195, 3196, 3203, 3215, 3206, 3218, 3209, 3243, 3247, 3246, - 3248, 3255, 3260, 3252, 3197, 3199, 3211, 3193, 3217, 0, - - 3238, 3204, 3236, 3238, 3236, 3245, 3239, 3253, 9014, 3244, - 3243, 3244, 3246, 9014, 3253, 3269, 3250, 3267, 9014, 3265, - 9014, 3296, 9014, 3239, 3298, 9014, 3232, 3245, 3254, 3244, - 3278, 3270, 3267, 3278, 3269, 3287, 3264, 3272, 3273, 3278, - 3279, 3280, 3292, 3276, 3296, 3276, 3297, 3321, 3324, 3332, - 3335, 3343, 3351, 3362, 3366, 3382, 3390, 3399, 3402, 3410, - 3285, 3290, 3292, 3300, 3311, 3295, 3322, 3302, 3413, 3421, - 3424, 3432, 3435, 3448, 3456, 3459, 3467, 3470, 3478, 3482, - 3302, 3304, 3291, 3297, 3296, 3298, 3302, 3321, 3306, 3316, - 3331, 0, 3331, 3327, 3336, 3348, 3347, 3419, 3348, 3367, - - 3348, 3355, 3351, 0, 0, 3337, 3356, 3343, 3356, 3358, - 3396, 3441, 3375, 3366, 3377, 0, 0, 3388, 0, 3402, - 3399, 3456, 3421, 3425, 3433, 3437, 3446, 0, 3441, 3442, - 3429, 3430, 3435, 3447, 3436, 3453, 3457, 3436, 3459, 3448, - 3451, 3467, 3461, 3463, 3451, 3467, 3456, 3458, 0, 3473, - 3457, 3477, 3478, 3466, 3469, 3464, 3474, 3478, 3478, 3519, - 0, 3486, 0, 3472, 3490, 3487, 3496, 0, 0, 0, - 3495, 3519, 3544, 3547, 3555, 3558, 3567, 3582, 3590, 3508, - 3513, 3515, 3523, 3534, 3518, 3544, 3525, 0, 3511, 0, - 3507, 0, 0, 0, 0, 0, 3510, 3509, 3513, 3534, - - 3518, 3517, 3538, 3548, 3552, 3530, 3536, 3551, 3539, 3539, - 3544, 3561, 3544, 3549, 3544, 0, 3560, 0, 3563, 3562, - 3555, 3570, 3551, 0, 3563, 3568, 3574, 3568, 0, 3554, - 3572, 3575, 3578, 3591, 3588, 3600, 3592, 3610, 3588, 3595, - 3577, 3571, 0, 0, 0, 3591, 3573, 3593, 3589, 3593, - 3596, 0, 3598, 3587, 3585, 3596, 3581, 3597, 3586, 3586, - 0, 3601, 3602, 3599, 0, 3591, 0, 3594, 3598, 3607, - 3612, 3614, 3610, 3611, 0, 3612, 3605, 3606, 3618, 3602, - 3617, 3605, 3605, 3659, 3625, 3608, 3609, 3629, 3608, 3613, - 3632, 0, 3615, 3629, 0, 3630, 3635, 3632, 0, 3622, - - 3630, 3626, 3622, 3638, 3640, 3645, 0, 3634, 0, 0, - 3635, 0, 3633, 3660, 3657, 3668, 3659, 3677, 3654, 3662, - 3645, 3703, 3704, 3705, 3707, 3706, 3708, 3709, 3710, 3711, - 3712, 3713, 3714, 3716, 3715, 3718, 3717, 3719, 3721, 3720, - 3726, 3722, 3724, 3725, 3727, 3729, 3730, 3731, 3734, 3735, - 3736, 3741, 3722, 3723, 3735, 3724, 3729, 3730, 3734, 3743, - 3748, 3771, 3772, 3774, 3776, 3777, 3778, 3716, 3733, 3717, - 3739, 0, 3753, 3737, 9014, 3770, 3764, 3768, 3758, 3758, - 3779, 3781, 3763, 3779, 3781, 3774, 3769, 3781, 3777, 3742, - 3747, 3768, 3754, 3759, 3767, 3778, 3775, 3776, 3785, 3787, - - 3780, 3781, 3788, 3803, 3804, 3796, 3794, 3805, 3796, 3814, - 3791, 3799, 3799, 3838, 3841, 3849, 3852, 3860, 3863, 3871, - 3885, 3894, 3897, 3905, 3908, 3916, 3924, 3816, 3808, 3806, - 3849, 3814, 3832, 3810, 3824, 3927, 3938, 3946, 3949, 3957, - 3960, 3968, 3971, 3979, 3799, 3801, 3829, 3814, 3826, 3822, - 3839, 3836, 3834, 3831, 0, 3852, 3850, 3847, 3866, 3874, - 3883, 3884, 3882, 3883, 3891, 3912, 3874, 3878, 3889, 3896, - 0, 0, 3906, 3915, 3912, 3914, 3911, 3928, 3923, 3923, - 3923, 3940, 3944, 0, 3945, 3946, 0, 3948, 3948, 3948, - 3935, 3928, 0, 0, 3952, 3941, 3941, 3955, 3956, 3938, - - 0, 3952, 3953, 3958, 3959, 0, 0, 0, 0, 3944, - 0, 3949, 0, 0, 0, 0, 3954, 3962, 3944, 0, - 3960, 3966, 3946, 3959, 3973, 3960, 0, 3967, 3963, 3978, - 3979, 3968, 3975, 3975, 3970, 3990, 4029, 4037, 4040, 4048, - 4051, 4059, 4062, 4081, 4007, 4000, 3997, 4044, 4002, 4022, - 4006, 4013, 3995, 4016, 3997, 4012, 4019, 4010, 4020, 4034, - 4020, 4020, 4024, 4022, 4041, 4045, 4040, 4040, 4030, 4050, - 4034, 4053, 4034, 4043, 4054, 4043, 4041, 4043, 4062, 4046, - 4053, 4062, 4045, 4061, 4053, 4065, 4059, 4057, 4065, 4074, - 4075, 4084, 4085, 4078, 4079, 4086, 4101, 0, 4082, 4063, - - 4075, 4078, 4086, 4082, 4070, 4077, 4075, 4077, 4078, 4080, - 4094, 4090, 4076, 4096, 4080, 4085, 4087, 0, 4096, 4088, - 4079, 4099, 4081, 4082, 4106, 4107, 4106, 4091, 4102, 4112, - 4113, 4109, 4112, 4112, 4097, 4098, 4105, 4115, 4116, 4103, - 4108, 4123, 4123, 4121, 4103, 4107, 4111, 4116, 4131, 0, - 4128, 4128, 4131, 0, 0, 4121, 4136, 4137, 4146, 4147, - 4140, 4141, 4148, 4163, 0, 4189, 4190, 4191, 4192, 4193, - 4194, 4195, 4196, 4197, 4198, 4199, 4200, 4202, 4201, 4203, - 4205, 4204, 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4182, - 4185, 4178, 4194, 4197, 4202, 4189, 4215, 4216, 4245, 4246, - - 4249, 4248, 4251, 4253, 4255, 0, 4194, 4195, 0, 0, - 4248, 4199, 4228, 4228, 9014, 4228, 4229, 4232, 4234, 4247, - 4248, 4229, 4250, 9014, 4244, 4271, 4219, 4237, 4228, 4226, - 4234, 4224, 4291, 4251, 4253, 4254, 4250, 4251, 4258, 4260, - 4275, 4261, 4262, 4258, 4259, 4268, 4269, 4262, 4263, 4270, - 4285, 4272, 4311, 4314, 4322, 4325, 4334, 4337, 4347, 4350, - 4370, 4373, 4381, 4384, 4274, 4270, 4272, 4288, 4289, 4283, - 4290, 4298, 4313, 4392, 4395, 4406, 4409, 4418, 4421, 4286, - 4289, 4285, 4306, 4297, 4313, 4302, 4317, 4307, 4315, 4318, - 4320, 4303, 4334, 4337, 4339, 4340, 4348, 4356, 4371, 4358, - - 4349, 4357, 4351, 4360, 4352, 4363, 0, 4381, 0, 4371, - 4384, 4374, 4378, 4391, 4387, 4374, 4382, 4380, 4379, 4380, - 4399, 4401, 4402, 4391, 4404, 4390, 4390, 4383, 4390, 0, - 0, 0, 0, 4404, 0, 4405, 4411, 4400, 4400, 4399, - 4415, 4411, 4401, 4409, 4418, 4416, 4416, 4404, 4409, 4420, - 4427, 4425, 4435, 4475, 4478, 4486, 4489, 4497, 4500, 4513, - 4516, 4436, 4433, 4444, 4453, 4455, 4455, 4456, 4464, 4485, - 4461, 4449, 4456, 4456, 4471, 4472, 4481, 4478, 4471, 4480, - 4465, 4468, 4468, 4473, 4494, 4491, 4497, 4490, 4494, 4485, - 4501, 4497, 4492, 4482, 4485, 4487, 4488, 4503, 4504, 4490, - - 4507, 4512, 4514, 4497, 4515, 4499, 4517, 4525, 4526, 4521, - 4522, 4529, 4530, 4545, 4531, 4524, 4519, 4516, 4525, 4518, - 4532, 4513, 4529, 4521, 4516, 4530, 4538, 4523, 4539, 4541, - 4539, 4543, 4528, 4545, 4528, 4532, 4548, 4525, 4530, 4531, - 4548, 4535, 0, 0, 4535, 4536, 4543, 4537, 4546, 4559, - 0, 0, 4545, 4543, 4546, 4555, 4543, 4561, 4566, 4551, - 4563, 0, 4564, 4570, 4567, 4563, 4569, 4559, 4575, 4582, - 4583, 4578, 4579, 4586, 4587, 4602, 4588, 4629, 4630, 4631, - 4632, 4633, 4634, 4635, 4638, 4636, 4637, 4640, 4641, 4643, - 4642, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4653, - - 4655, 4621, 4637, 4629, 4630, 4642, 4645, 4654, 4622, 4659, - 4682, 4685, 4686, 4687, 4688, 4691, 4692, 4694, 0, 0, - 4676, 4638, 4654, 4673, 4678, 4664, 4678, 9014, 4666, 4683, - 4687, 4666, 4688, 4691, 4664, 4658, 4663, 4664, 4655, 4671, - 4723, 9014, 4696, 4701, 4703, 4690, 4693, 4709, 4710, 4697, - 4698, 4699, 4701, 4702, 4697, 4699, 4706, 4707, 4722, 4708, - 4720, 4748, 4751, 4759, 4762, 4770, 4773, 4781, 4784, 4795, - 4803, 4711, 4713, 4715, 4717, 4718, 4726, 4735, 4759, 4745, - 4806, 4814, 4817, 4739, 4733, 4745, 4735, 4751, 4750, 4756, - 4752, 4769, 4775, 4771, 4772, 4783, 4805, 4806, 4793, 4794, - - 4809, 4811, 4797, 4798, 4785, 4775, 4787, 4793, 4799, 4800, - 0, 4786, 4802, 4780, 4779, 4789, 4788, 4806, 4799, 4800, - 4802, 4796, 4807, 4794, 4795, 4810, 4808, 4806, 4817, 4820, - 4821, 4813, 4804, 4825, 4821, 4822, 4807, 4806, 4827, 4813, - 4824, 4820, 4816, 4828, 4812, 4832, 4825, 4824, 4827, 4829, - 4837, 4825, 4837, 4861, 4889, 4892, 4900, 4903, 4911, 4919, - 4922, 4938, 4852, 4854, 4856, 4858, 4859, 4867, 4876, 4891, - 4882, 4861, 4860, 4882, 4876, 4878, 4887, 4872, 4889, 4880, - 4880, 4898, 4904, 4900, 4886, 4899, 4889, 4893, 4901, 4895, - 4906, 4895, 4892, 4915, 4911, 4918, 4919, 4900, 4905, 4900, - - 4915, 4912, 4909, 4910, 4915, 4908, 4924, 4927, 4951, 4952, - 4940, 4941, 4956, 4957, 4943, 4944, 4925, 4938, 4937, 4943, - 4923, 4929, 4932, 4933, 4941, 4940, 4930, 4933, 4951, 4942, - 4938, 4947, 4952, 4956, 4940, 4952, 4947, 4958, 4942, 4958, - 4959, 4965, 4955, 0, 4953, 4967, 5003, 4954, 4958, 4958, - 4955, 4969, 4960, 4960, 4958, 4964, 4976, 4962, 4975, 4964, - 4965, 4966, 4985, 4972, 4983, 5008, 5009, 4996, 4997, 5012, - 5013, 4999, 5000, 5043, 5044, 5045, 5046, 5047, 5049, 5050, - 5051, 5052, 5053, 5055, 5054, 5056, 5057, 5058, 5059, 5060, - 5061, 5062, 5067, 5065, 5066, 5068, 5046, 5047, 5039, 5049, - - 5058, 5061, 5055, 5065, 5069, 5091, 5094, 5098, 5101, 5102, - 5106, 5104, 5107, 5106, 9014, 9014, 9014, 5086, 5068, 9014, - 5084, 5079, 5081, 5078, 5096, 5101, 5062, 5070, 5060, 5067, - 5074, 5068, 5098, 5094, 5095, 5111, 5112, 5098, 5099, 5100, - 5113, 5119, 5124, 5125, 5112, 5113, 5128, 5129, 5115, 5116, - 5123, 5156, 5159, 5167, 5170, 5178, 5181, 5195, 5198, 5130, - 5135, 5137, 5131, 5132, 5148, 5156, 5142, 5144, 5146, 5148, - 5148, 5144, 5151, 5144, 5164, 5160, 5152, 5165, 5166, 5169, - 5158, 5176, 5177, 5194, 5195, 5182, 5183, 5184, 5196, 5168, - 5182, 5173, 5172, 5184, 5169, 5180, 5174, 5180, 5194, 5181, - - 5179, 5182, 5192, 5186, 5192, 5190, 5203, 5199, 5196, 5192, - 5189, 5188, 5204, 5201, 0, 5192, 5207, 5211, 5215, 5194, - 5203, 5204, 5206, 5220, 5209, 5222, 5214, 5203, 5206, 5225, - 5207, 5209, 5213, 5218, 5215, 5227, 5229, 5215, 5234, 5247, - 5280, 5283, 5291, 5294, 5302, 5305, 5319, 5322, 5254, 5259, - 5261, 5255, 5256, 5272, 5280, 5266, 5268, 5249, 5269, 5273, - 5272, 5280, 5287, 5279, 5280, 5269, 5291, 5273, 5290, 5294, - 5270, 5275, 5290, 5296, 5282, 5299, 5305, 5302, 5304, 5295, - 5292, 5309, 5309, 5290, 5311, 5313, 5319, 0, 5320, 5316, - 5322, 5315, 0, 5314, 5331, 5333, 5349, 5350, 5336, 5337, - - 5338, 5350, 5331, 5336, 5337, 5318, 5327, 5322, 5336, 5335, - 5343, 5337, 5337, 5341, 5328, 5348, 5348, 5350, 5346, 5333, - 5348, 5349, 5346, 5341, 5352, 5344, 5345, 5355, 5361, 5346, - 5339, 5364, 5360, 5365, 5383, 5359, 5368, 5352, 5354, 5372, - 5368, 5359, 5357, 5367, 5372, 5363, 5374, 5368, 5361, 5361, - 5382, 5378, 5380, 5391, 5392, 5408, 5409, 5395, 5396, 5397, - 5409, 5439, 5440, 5441, 5442, 5444, 5445, 5446, 5447, 5448, - 5450, 5449, 5452, 5451, 5453, 5454, 5455, 5456, 5457, 5458, - 5459, 5425, 5426, 5438, 5439, 5427, 5435, 5443, 5450, 5468, - 5471, 5480, 5484, 5486, 5481, 5482, 5490, 5492, 9014, 5455, - - 9014, 5456, 9014, 5464, 5478, 5462, 5478, 5452, 5438, 5434, - 5457, 5460, 9014, 5462, 5485, 5476, 5477, 5478, 5479, 5482, - 5484, 5499, 5495, 5497, 5493, 5494, 5510, 5511, 5497, 5498, - 5499, 5511, 5514, 5540, 5543, 5551, 5554, 5562, 5565, 5577, - 5580, 5509, 5504, 5506, 5529, 5530, 5517, 5525, 5526, 5539, - 5517, 5525, 5528, 5517, 5522, 5526, 5527, 0, 5543, 5549, - 5550, 5532, 5538, 5539, 5546, 5561, 5563, 5564, 5567, 5568, - 5569, 5581, 5577, 5567, 5560, 5549, 5548, 5554, 5572, 5565, - 5550, 5561, 5577, 5558, 5567, 5565, 5581, 5568, 5574, 5560, - 5580, 5583, 5587, 5562, 5585, 5575, 5566, 5586, 5586, 5585, - - 5581, 5578, 5577, 5582, 5594, 5596, 5600, 5602, 5591, 5595, - 5592, 5582, 5594, 5608, 5593, 5590, 5590, 5594, 5601, 5614, - 5596, 5597, 5617, 5602, 5637, 5663, 5666, 5674, 5677, 5685, - 5688, 5700, 5703, 5632, 5627, 5629, 5652, 5653, 5640, 5648, - 5649, 5662, 5644, 5653, 5642, 5656, 5641, 5665, 5655, 5651, - 5653, 5666, 5655, 5658, 5672, 5677, 5674, 5662, 5682, 5683, - 5673, 5670, 5671, 5689, 5671, 5676, 5682, 5681, 5676, 5679, - 5693, 5698, 5695, 5692, 5702, 5702, 5692, 5696, 5690, 5690, - 5694, 5689, 5712, 5718, 5719, 5720, 5721, 5722, 5723, 5735, - 5731, 5706, 5704, 5714, 5716, 5705, 5721, 5709, 5708, 5711, - - 5711, 0, 5730, 5713, 5721, 5715, 5719, 5716, 5718, 5737, - 5725, 5737, 5727, 5728, 5724, 5725, 5721, 5739, 5747, 5748, - 5734, 5747, 5733, 5756, 5749, 5734, 5735, 5735, 5741, 5749, - 5745, 5745, 5737, 5743, 5747, 5761, 5750, 5757, 5751, 5744, - 5750, 5757, 5776, 5777, 5778, 5779, 5780, 5781, 5793, 5789, - 5824, 5825, 5826, 5827, 5828, 5829, 5830, 5831, 5832, 5833, - 5834, 5835, 5836, 5837, 5838, 5839, 5840, 5806, 5807, 5808, - 5809, 5810, 5817, 5824, 5826, 5858, 5854, 5856, 5868, 5870, - 5862, 5871, 5872, 5875, 5826, 5833, 9014, 5836, 9014, 5845, - 5812, 5808, 5830, 5860, 5817, 5828, 5886, 5845, 5857, 5860, - - 5851, 5857, 5869, 5871, 5867, 5880, 5881, 5869, 5870, 5873, - 5874, 5875, 5876, 5888, 5884, 5880, 5918, 5921, 5929, 5932, - 5944, 5947, 5955, 5958, 5894, 5882, 5892, 5893, 5895, 5902, - 5903, 5915, 5911, 5898, 5904, 5895, 5911, 5903, 5925, 5918, - 5906, 5911, 5923, 5915, 5920, 5921, 5916, 5953, 5954, 5944, - 5946, 5958, 5959, 5956, 5964, 5944, 5948, 5936, 5950, 5933, - 5936, 5946, 5953, 5944, 5956, 0, 5933, 5941, 5954, 5960, - 5949, 5997, 5940, 5953, 5963, 5962, 5968, 5955, 5970, 5951, - 5964, 5947, 5970, 5960, 5976, 5972, 5975, 5979, 5968, 5964, - 5977, 5967, 5983, 6019, 5986, 5971, 5988, 5976, 5978, 5986, - - 5977, 5989, 5985, 5986, 5980, 5997, 6004, 6042, 6045, 6053, - 6056, 6068, 6071, 6079, 6082, 6018, 6006, 6008, 6016, 6017, - 6019, 6026, 6038, 6034, 6021, 6024, 6028, 6035, 6019, 6032, - 6035, 6041, 6048, 6053, 6043, 6056, 6057, 6035, 6046, 6045, - 6042, 6045, 6065, 6053, 6049, 6064, 6050, 6063, 6051, 6073, - 6074, 6062, 6075, 6076, 6054, 6065, 6064, 6074, 6064, 6063, - 6084, 6071, 6085, 6082, 6085, 0, 6084, 6077, 6107, 6108, - 6098, 6100, 6112, 6113, 6109, 6117, 6086, 6096, 6088, 6085, - 6095, 6086, 6102, 6099, 6103, 6109, 6106, 6106, 6097, 6094, - 6113, 6110, 0, 6112, 6114, 6118, 6099, 6101, 6112, 6113, - - 6103, 6123, 6116, 6121, 6113, 0, 6117, 6138, 6125, 6112, - 6132, 6132, 6129, 6128, 6116, 6119, 0, 6117, 6130, 6120, - 6134, 6135, 6131, 6126, 0, 6129, 6162, 6163, 6153, 6154, - 6166, 6167, 6163, 6171, 6199, 6200, 6201, 6203, 6202, 6204, - 6205, 6206, 6207, 6208, 6209, 6210, 6212, 6213, 6185, 6186, - 6182, 6183, 6190, 6195, 6192, 6202, 6216, 6231, 6234, 6239, - 6242, 6244, 6245, 6233, 6246, 6207, 6218, 6214, 6227, 6196, - 6202, 6207, 9014, 6234, 9014, 6198, 6258, 9014, 9014, 6224, - 6225, 6231, 6232, 6229, 6231, 6239, 6228, 6229, 6240, 6246, - 6237, 6241, 6254, 6257, 6253, 6261, 0, 6287, 6290, 6298, - - 6301, 6309, 6324, 6327, 6337, 6251, 6262, 6264, 6261, 6262, - 6275, 6283, 6279, 6287, 6257, 6262, 6275, 6265, 6278, 6261, - 6265, 6289, 6288, 6283, 6295, 6292, 6290, 6278, 6315, 6316, - 6322, 6323, 6319, 6321, 6329, 6318, 6306, 6294, 6299, 6317, - 6306, 6304, 6320, 6307, 6321, 6318, 6320, 6325, 6307, 6309, - 6316, 6308, 6358, 6331, 6324, 6322, 0, 6328, 6316, 6317, - 6338, 6319, 6335, 6341, 6328, 6338, 6327, 6326, 6344, 6336, - 6328, 6336, 0, 6332, 6380, 6341, 6349, 6349, 6340, 6337, - 6339, 6338, 6352, 6348, 6349, 6359, 6359, 0, 6409, 6412, - 6420, 6423, 6431, 6446, 6449, 6459, 6373, 6384, 6386, 6383, - - 6384, 6397, 6405, 6401, 6409, 6381, 6388, 6383, 6384, 6388, - 6388, 6405, 6400, 6415, 6398, 6409, 6393, 6402, 6411, 6412, - 6422, 6423, 6424, 6412, 6427, 6428, 6430, 6436, 6419, 6429, - 6430, 6438, 6432, 6416, 6421, 6430, 6431, 6441, 6438, 6443, - 6449, 6441, 6451, 6428, 6440, 6441, 6451, 6457, 6457, 6470, - 6471, 6477, 6478, 6474, 6475, 6483, 6472, 6460, 6452, 6469, - 6465, 6455, 6467, 6468, 0, 6458, 6459, 6476, 6458, 6463, - 6479, 6461, 6478, 6482, 6458, 6468, 6476, 6477, 6472, 6473, - 6484, 6474, 6477, 6474, 6493, 6494, 6520, 6497, 0, 6480, - 6487, 6482, 6493, 6493, 6484, 6492, 6491, 6501, 0, 6507, - - 6499, 6504, 6498, 6522, 6523, 6529, 6530, 6526, 6527, 6535, - 6524, 6564, 6565, 6566, 6567, 6568, 6569, 6570, 6571, 6572, - 6573, 6574, 6576, 6577, 6578, 6545, 6547, 6555, 6556, 6552, - 6563, 6568, 6566, 6588, 6583, 6599, 6602, 6604, 6606, 6607, - 6609, 6610, 6574, 6588, 9014, 6578, 6549, 6569, 6552, 6569, - 6593, 6594, 6589, 6590, 6598, 6599, 6590, 0, 9014, 6596, - 6598, 6604, 6605, 6604, 6605, 6613, 6602, 6643, 6646, 6654, - 6657, 6667, 6670, 6678, 6691, 0, 6612, 6613, 6620, 6628, - 6624, 6626, 6640, 6629, 6611, 6631, 6635, 6629, 6626, 6635, - 6640, 6632, 6633, 6651, 6647, 6636, 6633, 6659, 6678, 6679, - - 6673, 6675, 6683, 6685, 6674, 0, 6660, 6656, 6650, 6656, - 6669, 6657, 6670, 6676, 6659, 6655, 6679, 6662, 6682, 6668, - 6684, 6672, 6717, 6687, 6672, 6680, 6689, 6691, 6684, 6690, - 6694, 0, 6688, 6676, 6683, 6680, 6699, 6685, 6689, 6687, - 6702, 6697, 6694, 6737, 6702, 6699, 6691, 6701, 6693, 6712, - 6692, 6709, 6697, 6709, 6710, 6700, 6710, 6763, 6766, 6774, - 6777, 6787, 6790, 6798, 6811, 0, 6732, 6733, 6740, 6748, - 6744, 6746, 6760, 6749, 6731, 6751, 6745, 6744, 6754, 6745, - 6747, 6763, 6753, 6768, 6763, 6753, 6754, 6765, 6766, 6781, - 6767, 6768, 6784, 6773, 6786, 6767, 6786, 6785, 6773, 6779, - - 6793, 6781, 6771, 6772, 6783, 6784, 6799, 6781, 6786, 6800, - 6791, 6790, 0, 0, 6806, 6794, 6790, 6786, 6829, 6830, - 6824, 6825, 6833, 6834, 6823, 0, 6818, 6815, 6802, 6803, - 6811, 6810, 6809, 6821, 6822, 6816, 6829, 0, 6814, 6816, - 6813, 6813, 6830, 6835, 6835, 6830, 6823, 6825, 6826, 6827, - 6842, 6824, 6826, 6842, 6841, 6869, 6830, 6844, 6850, 6851, - 6850, 6846, 0, 6834, 6837, 6852, 6838, 6855, 6858, 6859, - 6879, 6880, 6874, 6875, 6883, 6884, 6873, 0, 6913, 6914, - 6915, 6916, 6917, 6918, 6919, 6920, 6894, 6895, 6889, 6891, - 6900, 6901, 6899, 6896, 6932, 6933, 6939, 6940, 6942, 6941, - - 6943, 6945, 6944, 6919, 6909, 6915, 6896, 6887, 6907, 6956, - 6915, 6917, 6930, 6931, 6920, 6921, 0, 6934, 6935, 6929, - 6931, 6939, 6941, 6935, 9014, 6978, 6986, 6989, 6997, 7000, - 7011, 7019, 6951, 6952, 6947, 6955, 6963, 6965, 6961, 0, - 6938, 6939, 6940, 6952, 6962, 6943, 6969, 6963, 6957, 6978, - 6980, 6964, 6973, 6969, 0, 6983, 6996, 6997, 7010, 7011, - 7001, 7002, 0, 6984, 6987, 6998, 6979, 6987, 6983, 6985, - 6992, 7001, 7006, 6992, 7000, 7009, 6998, 7000, 7013, 0, - 7007, 7015, 7000, 7001, 7011, 7001, 7008, 7018, 7021, 7023, - 7020, 7010, 7018, 7009, 7019, 7006, 7018, 7011, 0, 0, - - 7026, 7026, 7034, 7023, 7031, 7036, 7026, 7022, 0, 7029, - 7033, 7046, 7035, 7091, 7100, 7104, 7108, 7112, 7116, 7120, - 7068, 7069, 7063, 7069, 7078, 7099, 7093, 0, 7066, 7089, - 7086, 7083, 7073, 0, 7086, 7088, 7097, 7093, 0, 0, - 7081, 7082, 7083, 7084, 7083, 7088, 7100, 7087, 7093, 7105, - 7108, 7097, 7112, 7113, 7110, 7116, 7114, 0, 7100, 7101, - 7102, 7103, 7102, 7122, 7119, 7110, 7125, 7127, 7123, 7117, - 7110, 7128, 7127, 7139, 7140, 7153, 7154, 7143, 7144, 0, - 7123, 7139, 7136, 7134, 7134, 7141, 7125, 7145, 7129, 7143, - 7133, 7131, 7137, 0, 7143, 7144, 7152, 7135, 7156, 7143, - - 7158, 7159, 7141, 7159, 7142, 7148, 7152, 7141, 7163, 7166, - 7167, 7163, 7163, 7157, 7168, 0, 7169, 7175, 7167, 7176, - 7174, 7159, 7186, 7187, 7200, 7201, 7190, 7191, 0, 7231, - 7232, 7233, 7234, 7235, 7236, 7239, 7202, 7205, 7215, 7216, - 7210, 7213, 7211, 7247, 7253, 7255, 7256, 7254, 7257, 7260, - 7261, 9014, 9014, 7237, 7196, 7218, 9014, 7266, 9014, 0, - 0, 7227, 7229, 0, 0, 7230, 7231, 7245, 7246, 7236, - 7237, 9014, 7285, 7289, 7299, 7302, 7310, 7313, 7238, 7239, - 7252, 7256, 7246, 7256, 0, 7232, 0, 7258, 7255, 7255, - 7264, 7267, 7258, 7278, 7262, 7267, 7277, 7269, 7283, 7276, - - 0, 0, 7292, 7293, 0, 0, 7283, 7285, 7278, 7290, - 7285, 7294, 7280, 7297, 0, 7293, 7279, 7293, 7289, 7302, - 7298, 7292, 7298, 7304, 0, 0, 7306, 7303, 7300, 7299, - 7296, 7306, 7314, 7301, 7315, 7317, 7302, 7314, 7311, 7313, - 7302, 7315, 7312, 7313, 7307, 7324, 7327, 7328, 7329, 7311, - 7331, 7331, 7324, 7317, 7338, 7334, 7335, 7329, 7330, 7386, - 7389, 7397, 7400, 7408, 7411, 7350, 7351, 7365, 7373, 7362, - 7364, 0, 7361, 7361, 7355, 7363, 7368, 7371, 7361, 7367, - 7359, 7377, 7378, 7371, 7372, 0, 7377, 7386, 7379, 7371, - 0, 7370, 7370, 7373, 7391, 7392, 7388, 7387, 7394, 7395, - - 7388, 7389, 0, 7391, 7403, 7383, 7386, 7398, 7390, 7389, - 0, 7395, 7393, 0, 0, 7418, 7419, 0, 0, 7395, - 7395, 7413, 7402, 7413, 7414, 7412, 7401, 7422, 7409, 7419, - 0, 7413, 7411, 7408, 7416, 7424, 7422, 7429, 7432, 7424, - 7411, 7426, 7435, 7432, 7420, 7430, 7437, 7426, 7422, 7439, - 7429, 7427, 7428, 7433, 7436, 7430, 7425, 7432, 7439, 7449, - 0, 0, 7461, 7462, 0, 0, 7502, 7503, 7504, 7505, - 7506, 7507, 7510, 7508, 7476, 7477, 7478, 7479, 7480, 7481, - 7519, 7520, 7521, 7522, 7523, 7524, 7525, 9014, 7476, 9014, - 0, 0, 9014, 9014, 7488, 7489, 9014, 9014, 7529, 7532, - - 0, 0, 7493, 7494, 0, 0, 7490, 7489, 7498, 7484, - 0, 7481, 7492, 7490, 7490, 7499, 7490, 7508, 7503, 7499, - 0, 0, 7494, 7510, 7507, 7507, 7500, 7520, 7509, 7511, - 7510, 7510, 7512, 7516, 7524, 7516, 7526, 7529, 7532, 7516, - 7519, 7517, 7521, 7529, 0, 7538, 7537, 7521, 7523, 7531, - 0, 7540, 7525, 0, 7546, 7527, 7539, 7546, 7529, 7546, - 7546, 7534, 7538, 7549, 7543, 7551, 7539, 7535, 7553, 7561, - 7542, 7543, 7544, 7556, 7563, 7610, 7613, 0, 0, 7574, - 7575, 0, 0, 7553, 7569, 7613, 7615, 7576, 7584, 7580, - 7571, 7582, 7572, 7573, 7589, 7590, 7578, 7573, 7579, 7570, - - 7587, 7592, 7589, 7580, 0, 7586, 7599, 7586, 7587, 7603, - 7604, 7606, 7587, 7603, 7600, 7596, 7608, 7587, 7595, 7596, - 0, 0, 0, 7615, 7601, 7605, 7600, 7619, 0, 7601, - 7605, 7615, 7605, 7599, 7611, 7606, 7626, 7627, 7623, 7609, - 7622, 7618, 7624, 7619, 7616, 7635, 7637, 7622, 7627, 7626, - 7632, 7623, 7625, 7629, 7645, 7628, 7643, 7629, 7634, 7645, - 7646, 7651, 7653, 0, 0, 7699, 7700, 7701, 7667, 7668, - 7704, 7705, 7706, 7707, 7708, 7709, 9014, 9014, 9014, 0, - 0, 7652, 7665, 7648, 7650, 0, 7662, 7651, 7658, 7652, - 7661, 7661, 7670, 7671, 7676, 7658, 7659, 7671, 7673, 7670, - - 7683, 7679, 7681, 7668, 7686, 7673, 7675, 0, 7684, 7667, - 7689, 7678, 0, 7686, 7695, 7680, 7681, 7686, 7699, 7694, - 7698, 0, 7679, 7703, 7707, 7694, 7701, 7698, 0, 0, - 7691, 7743, 7745, 7702, 0, 0, 7695, 7709, 7716, 7705, - 7701, 7702, 7711, 7718, 0, 0, 7715, 7716, 0, 0, - 0, 0, 7730, 7726, 7713, 7729, 7716, 7730, 7732, 7726, - 7727, 7733, 7722, 0, 0, 7727, 7725, 7729, 0, 7739, - 7731, 7742, 7743, 7737, 7738, 7737, 7733, 7735, 7739, 7749, - 7751, 0, 7752, 7743, 7755, 7746, 7757, 0, 7747, 7763, - 7763, 7745, 7766, 0, 0, 7749, 7765, 7751, 7761, 7762, - - 7758, 7773, 7760, 7761, 7771, 7773, 7760, 7763, 7759, 7762, - 7767, 0, 7783, 7763, 7768, 7786, 7768, 7785, 0, 7789, - 7790, 7778, 7787, 7838, 7839, 7840, 7795, 7778, 7778, 7774, - 7781, 0, 7782, 7794, 7802, 7799, 7805, 0, 7802, 7802, - 7783, 7789, 0, 7798, 7806, 7798, 7794, 7795, 7803, 7793, - 7813, 7798, 7812, 7809, 7807, 7807, 7805, 7824, 0, 7816, - 7823, 0, 7821, 0, 7816, 7826, 7825, 7830, 7812, 7832, - 7830, 0, 0, 0, 7823, 7833, 7836, 7837, 7838, 7820, - 7840, 7839, 7827, 7836, 7837, 7842, 7847, 7848, 7838, 7832, - 7848, 7845, 7849, 7836, 7855, 7856, 0, 0, 0, 0, - - 7844, 7858, 0, 7845, 7847, 7861, 7862, 0, 0, 7849, - 0, 7864, 0, 7851, 7853, 0, 7850, 7864, 7866, 0, - 7865, 7853, 7854, 7866, 7872, 7867, 7866, 7875, 7865, 7868, - 7881, 7866, 7879, 0, 7865, 7885, 7885, 7878, 7869, 7884, - 0, 7872, 7875, 7871, 7876, 7873, 7880, 7890, 7879, 7893, - 7881, 7886, 7893, 7897, 7903, 0, 7884, 0, 7889, 7906, - 7898, 7903, 7906, 7910, 7886, 7897, 7899, 0, 0, 7896, - 0, 7910, 7897, 7917, 7918, 0, 7899, 7908, 7916, 7904, - 7907, 7912, 7905, 7917, 7915, 0, 7910, 7929, 0, 7929, - 7926, 7927, 7927, 7915, 7919, 7923, 7931, 7919, 7915, 7921, - - 7927, 7928, 0, 7925, 7928, 7925, 7943, 7938, 7933, 0, - 7944, 7930, 7931, 0, 7945, 7947, 7949, 7935, 7936, 7939, - 7951, 7953, 7940, 7942, 7942, 7944, 7964, 7960, 7947, 0, - 7952, 7966, 7957, 7962, 7967, 7968, 7957, 7973, 7960, 7976, - 7959, 7958, 7965, 7971, 7967, 7969, 0, 7982, 7963, 7971, - 7968, 7972, 7983, 7977, 7972, 7990, 7992, 7977, 7988, 7977, - 0, 7990, 7983, 7978, 7979, 7997, 0, 7978, 7998, 7994, - 8000, 0, 8002, 7990, 0, 8003, 7991, 8004, 0, 8001, - 7996, 7996, 8004, 0, 8013, 0, 0, 0, 0, 7995, - 8048, 8006, 0, 0, 8002, 0, 8007, 8008, 0, 8025, - - 8017, 8026, 8008, 8017, 8030, 0, 0, 8026, 8023, 8014, - 0, 0, 8021, 8030, 8027, 0, 0, 8032, 0, 8021, - 8023, 0, 8026, 8020, 8033, 8043, 8039, 8025, 8045, 8028, - 8025, 8044, 8045, 8046, 8045, 8038, 8035, 8053, 8044, 8056, - 8046, 8055, 8043, 8061, 8058, 8049, 8058, 8060, 0, 8049, - 8067, 8054, 8054, 8066, 8063, 8061, 8069, 8056, 8069, 0, - 8065, 8060, 8079, 8059, 8064, 8066, 8061, 8084, 8069, 8083, - 8086, 8087, 8088, 8070, 8090, 8088, 0, 0, 8075, 8076, - 8083, 8084, 8084, 8090, 8096, 8098, 0, 8090, 0, 8102, - 0, 8092, 8102, 8085, 8106, 8088, 8089, 8091, 8092, 8094, - - 8104, 8095, 8096, 8116, 8095, 8113, 8103, 0, 8120, 8107, - 8101, 8123, 0, 8112, 8120, 0, 8126, 8123, 8114, 8111, - 8125, 8113, 8127, 8124, 8116, 8134, 8133, 8122, 8129, 8135, - 0, 8132, 8132, 8127, 8137, 8135, 8124, 0, 8141, 8127, - 8148, 8144, 8131, 8145, 8133, 8137, 8141, 0, 8154, 8141, - 8142, 8149, 8154, 0, 8146, 0, 8146, 8157, 8151, 8159, - 8145, 8165, 8149, 8159, 8160, 8150, 8151, 0, 8159, 8154, - 0, 8162, 8171, 8172, 8173, 8163, 8180, 8162, 8162, 0, - 8165, 8165, 8171, 8179, 0, 8174, 8183, 8184, 8176, 8188, - 8173, 8173, 8180, 8179, 0, 8176, 8181, 8196, 8184, 8182, - - 8192, 8184, 8188, 8184, 0, 8190, 0, 8186, 8238, 8196, - 0, 8199, 8200, 8197, 0, 8205, 8200, 0, 8205, 0, - 8206, 8204, 8216, 8211, 8204, 0, 8205, 8216, 0, 8217, - 8222, 8210, 8221, 8225, 8222, 8227, 8229, 8229, 8224, 8212, - 8232, 8214, 8230, 8219, 0, 0, 8232, 8219, 8230, 8237, - 0, 0, 0, 8229, 8224, 8238, 8226, 8245, 0, 8231, - 8228, 8247, 8245, 0, 8245, 8246, 8240, 0, 8237, 8235, - 8240, 8247, 8237, 0, 8244, 8243, 0, 8246, 8237, 8262, - 8261, 8244, 8262, 8248, 8266, 8261, 8264, 8269, 8258, 8264, - 8259, 8253, 8269, 0, 8261, 8265, 8273, 8279, 8276, 8276, - - 8280, 0, 8275, 0, 8284, 8283, 8284, 8283, 8277, 8289, - 8277, 8272, 8288, 0, 0, 0, 8289, 8282, 8281, 0, - 0, 8292, 8285, 8294, 8293, 8297, 8282, 8298, 0, 8284, - 8300, 8291, 8293, 8299, 8296, 8305, 0, 8307, 8300, 8299, - 0, 8294, 8295, 8302, 8312, 8298, 0, 8310, 8316, 8303, - 8301, 8303, 8323, 8310, 8308, 8318, 0, 8309, 8310, 0, - 8316, 8313, 8329, 8317, 0, 8320, 0, 8326, 8329, 0, - 0, 0, 8324, 8329, 8334, 0, 8322, 8329, 8334, 0, - 8329, 8325, 8331, 0, 0, 8343, 8346, 8336, 0, 8329, - 8334, 8339, 8347, 8338, 8335, 8340, 8336, 8338, 8351, 8354, - - 8353, 8336, 8350, 8354, 8355, 0, 8360, 8352, 8353, 0, - 8350, 8360, 8350, 8352, 8355, 0, 0, 8361, 8358, 8357, - 8356, 8357, 0, 8359, 8376, 8362, 8376, 8362, 0, 0, - 8378, 8365, 8366, 0, 8371, 8386, 8371, 8364, 8390, 0, - 0, 8379, 8378, 8373, 8378, 8377, 8375, 8393, 8373, 8394, - 8395, 8388, 8383, 8387, 0, 8403, 8391, 0, 8401, 8403, - 0, 8389, 8409, 0, 8396, 8390, 8399, 8411, 8409, 8397, - 8416, 8402, 8412, 8419, 8418, 8420, 8403, 8418, 8405, 0, - 9014, 8472, 8476, 8480, 8484, 8485, 8487, 8489, 8490, 8492, - 8494, 8498, 8502, 8496, 8500, 8506, 8510 + 0, 0, 59, 68, 338, 413, 488, 0, 563, 638, + 78, 79, 312, 315, 334, 343, 387, 397, 341, 393, + 713, 0, 415, 548, 553, 558, 613, 635, 9484, 9483, + 52, 318, 81, 389, 788, 0, 863, 0, 938, 1013, + 1036, 1041, 9550, 9553, 9553, 9553, 9526, 615, 1108, 689, + 974, 9553, 9553, 9553, 0, 9510, 9509, 9520, 0, 9517, + 1025, 9553, 9553, 9553, 0, 9521, 982, 9553, 0, 0, + 992, 1058, 9553, 9553, 9553, 23, 582, 1102, 1143, 1151, + + 1168, 1159, 318, 1036, 1172, 1176, 299, 1194, 1198, 1206, + 1214, 1222, 39, 412, 9476, 85, 1, 41, 337, 419, + 916, 2, 408, 349, 418, 9553, 1231, 1251, 1265, 1275, + 0, 9504, 9503, 399, 9514, 1068, 9511, 565, 559, 266, + 1237, 424, 49, 9489, 263, 1249, 1257, 539, 614, 630, + 642, 997, 1029, 1013, 321, 0, 0, 1315, 1325, 35, + 1341, 1344, 1226, 1352, 1230, 1341, 9553, 9553, 9553, 9514, + 1378, 0, 1388, 1398, 9553, 9553, 9553, 0, 9498, 572, + 9497, 562, 1390, 9508, 3, 1101, 1026, 1403, 1018, 9553, + 1094, 0, 9553, 0, 9510, 1440, 0, 1450, 1460, 9530, + + 9553, 9529, 0, 9492, 9491, 9502, 6, 9499, 1408, 539, + 1034, 603, 640, 377, 899, 1316, 84, 916, 912, 1067, + 1162, 1084, 1375, 1256, 1033, 618, 9455, 1251, 997, 1432, + 1021, 1328, 1251, 1102, 1433, 629, 9553, 1488, 1496, 1506, + 1516, 1526, 1536, 1546, 0, 9487, 9486, 9497, 449, 9494, + 9464, 9457, 9466, 9465, 902, 568, 1191, 1307, 9451, 1518, + 1193, 1080, 1518, 1526, 10, 991, 9463, 907, 1299, 1110, + 914, 1160, 1144, 1523, 1148, 1133, 1167, 1372, 1537, 9456, + 1223, 9451, 1319, 1546, 1373, 9553, 1602, 1610, 1620, 1630, + 9553, 0, 9475, 9474, 9485, 1235, 9482, 9446, 9440, 9458, + + 9553, 1638, 1646, 1656, 1666, 0, 9468, 9467, 9478, 1362, + 9475, 9439, 9444, 9447, 9496, 9495, 9553, 9494, 364, 1675, + 1694, 1746, 1764, 9493, 9492, 9491, 1784, 1859, 9455, 1446, + 1424, 1275, 1794, 9553, 1799, 9432, 9428, 9439, 1434, 9436, + 9463, 1825, 9553, 1844, 1343, 1114, 1572, 9460, 1455, 9458, + 1399, 1283, 9453, 1549, 9440, 7, 1692, 9420, 9425, 9418, + 9417, 9416, 9429, 1859, 1872, 1896, 0, 9441, 9439, 9450, + 9437, 9438, 9426, 9453, 9432, 9431, 9442, 1575, 9439, 0, + 1904, 1922, 1932, 1729, 1817, 1820, 1920, 1948, 1951, 1959, + 1967, 1975, 1978, 1986, 1989, 2001, 9448, 9427, 9426, 9437, + + 1663, 9434, 2004, 2012, 2015, 2026, 2037, 2040, 2048, 2051, + 2060, 2070, 9400, 9392, 9406, 9398, 9401, 9402, 1427, 9402, + 9393, 9381, 9385, 9383, 9389, 0, 9392, 9386, 9380, 9395, + 9380, 9394, 9380, 1683, 9380, 9372, 9391, 9373, 9381, 9377, + 0, 9374, 9381, 2090, 2108, 2118, 2128, 0, 9398, 9396, + 1456, 9407, 9394, 1529, 9395, 9383, 9364, 1552, 9375, 9361, + 9361, 9357, 9374, 9365, 1906, 1383, 9354, 9360, 9347, 9356, + 9366, 9345, 9348, 9363, 9351, 9361, 9343, 9359, 9339, 1648, + 9357, 1649, 9348, 9339, 9342, 1370, 1787, 9355, 9337, 9341, + 1670, 1508, 9329, 9336, 9344, 9337, 9329, 2100, 2108, 9328, + + 9334, 9331, 9341, 9322, 9324, 9323, 9325, 1673, 0, 2164, + 2174, 2184, 2073, 2200, 2081, 2203, 2211, 2214, 2222, 9370, + 9349, 9348, 9359, 1731, 9356, 1712, 0, 1719, 0, 1707, + 1732, 1800, 9381, 9378, 9375, 9378, 9328, 9315, 9305, 9325, + 9314, 9317, 9316, 9321, 9305, 9317, 9307, 0, 9317, 9310, + 9302, 9298, 9313, 9297, 9301, 9295, 9294, 9292, 9291, 9301, + 9303, 2179, 9302, 9287, 9286, 1533, 9296, 9290, 1641, 9294, + 9283, 9281, 9279, 1676, 9285, 9279, 0, 9280, 9286, 1299, + 9289, 2188, 9288, 9278, 9272, 9271, 9273, 9276, 9269, 9267, + 1702, 9267, 9268, 9278, 9273, 9267, 9264, 1751, 9263, 9258, + + 9253, 9269, 9261, 0, 9255, 0, 9260, 9260, 2256, 2264, + 2274, 2284, 2294, 0, 9283, 9281, 9292, 9279, 9280, 9268, + 9258, 9241, 9259, 9252, 9257, 9240, 9240, 9249, 9235, 9236, + 9249, 9239, 9234, 9251, 9227, 9234, 9235, 1791, 9232, 9234, + 9234, 9243, 1836, 9228, 9234, 9227, 9240, 1877, 9224, 9236, + 9229, 9233, 9231, 9226, 9216, 9214, 9223, 1361, 9226, 9225, + 9210, 9221, 9226, 1471, 9212, 9220, 9219, 9219, 9213, 9203, + 9204, 9201, 9200, 9199, 9199, 9201, 9197, 1707, 9195, 9199, + 0, 9193, 9198, 9199, 9204, 9191, 9186, 1960, 0, 9185, + 1895, 9186, 9184, 1742, 9180, 9196, 9197, 9181, 9193, 1786, + + 9191, 9180, 9171, 9180, 2302, 2310, 2320, 2330, 0, 9205, + 9203, 9214, 9201, 9202, 9190, 0, 9172, 9168, 2338, 2346, + 2356, 2366, 0, 9197, 9195, 9206, 9193, 9194, 9182, 9165, + 9171, 9153, 9221, 9553, 1831, 2375, 9220, 9553, 2394, 2054, + 2031, 2214, 1902, 2215, 1821, 2073, 1992, 1088, 2074, 1598, + 2015, 2384, 1965, 2038, 2004, 2005, 2016, 2051, 2397, 2417, + 2446, 9184, 1857, 1861, 1460, 1955, 1763, 1983, 2098, 2127, + 2169, 1900, 2400, 2085, 2456, 9161, 9158, 9169, 9156, 9157, + 9144, 9187, 2150, 9182, 9171, 9180, 9174, 9167, 9168, 9553, + 9176, 9172, 9553, 9169, 9163, 9553, 9180, 9553, 9161, 2128, + + 9553, 9159, 9158, 9553, 9553, 9168, 9158, 9132, 1282, 9147, + 9125, 2155, 9129, 2464, 2474, 9158, 9150, 9160, 9161, 2138, + 9147, 9172, 9152, 9150, 9161, 9148, 9149, 9137, 2482, 2492, + 2508, 2253, 2396, 2436, 2516, 2519, 2527, 2537, 2540, 2548, + 2551, 2561, 9165, 9145, 9143, 9154, 9141, 9142, 9130, 2569, + 2572, 2580, 2588, 2592, 2601, 2604, 2612, 2616, 2620, 2631, + 0, 9112, 9125, 9110, 9118, 0, 9104, 9122, 9105, 9114, + 9119, 0, 0, 9116, 9103, 9113, 9100, 9103, 0, 0, + 9093, 9093, 0, 0, 9105, 9101, 9091, 0, 9095, 9102, + 9086, 0, 2631, 2643, 9117, 9109, 2370, 9119, 9120, 0, + + 2227, 9106, 9088, 9095, 9094, 9097, 9093, 9079, 9089, 9075, + 9076, 1944, 9071, 9074, 2176, 9086, 9085, 9066, 9066, 9119, + 9080, 2207, 9078, 9071, 2618, 2394, 9063, 9074, 9061, 9059, + 9064, 2174, 9075, 2467, 9062, 2336, 9073, 9067, 9053, 9055, + 2148, 9067, 2079, 9052, 9056, 9055, 9061, 0, 9047, 9064, + 9060, 9059, 9095, 9048, 9053, 9046, 2629, 0, 0, 0, + 9089, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9040, 9040, 9034, 0, 9048, 9043, + 9042, 9038, 9043, 9028, 2679, 2689, 2705, 2708, 2716, 2719, + 2728, 2742, 9078, 9058, 9056, 9067, 9054, 9055, 9043, 2200, + + 0, 2515, 0, 9553, 9553, 9029, 9026, 9038, 9031, 2359, + 9033, 9019, 9015, 0, 9033, 9026, 9026, 9010, 9014, 0, + 9023, 9026, 0, 9017, 9022, 9009, 9018, 9021, 9008, 9002, + 9001, 9004, 0, 9003, 8999, 9007, 0, 9003, 2373, 8995, + 9009, 8998, 8992, 8991, 0, 8988, 0, 0, 0, 9005, + 9003, 58, 80, 256, 271, 350, 616, 646, 942, 0, + 975, 1095, 0, 1481, 1547, 1562, 1572, 0, 1600, 0, + 0, 1653, 1756, 1842, 1871, 1929, 0, 1960, 1981, 2126, + 2021, 2066, 2192, 2214, 0, 2213, 2233, 2748, 2758, 2270, + 2289, 2310, 2338, 2605, 2362, 2366, 0, 2368, 2387, 2614, + + 2380, 0, 2393, 2402, 2423, 2441, 2449, 2506, 2465, 2477, + 2469, 2498, 0, 2483, 0, 2487, 0, 2488, 2504, 2503, + 0, 2514, 2521, 2520, 2527, 2521, 2535, 2546, 2553, 2601, + 2560, 2546, 2551, 2551, 2556, 2587, 2621, 0, 2592, 2590, + 2617, 2611, 2608, 2617, 2632, 2623, 2641, 2635, 2660, 2661, + 2666, 0, 2663, 2668, 2659, 2684, 0, 2677, 2680, 2696, + 2683, 0, 2669, 2695, 2688, 2698, 0, 0, 0, 0, + 2697, 2695, 2702, 2715, 2762, 2714, 2727, 0, 2716, 0, + 2721, 2733, 2725, 2725, 2721, 0, 2723, 2730, 2778, 2794, + 2763, 2757, 2769, 2772, 2787, 2760, 2740, 2754, 2807, 2817, + + 2781, 2775, 2797, 2808, 2811, 2797, 2788, 2782, 2777, 2843, + 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2853, 2855, 2856, + 2854, 2857, 2858, 2859, 2860, 2861, 2863, 2865, 2864, 2866, + 2869, 2867, 2870, 2871, 2872, 2873, 2874, 2876, 2878, 2879, + 2880, 2901, 2939, 2852, 2858, 2870, 2868, 2895, 2893, 2882, + 2925, 2904, 2922, 2908, 2929, 2919, 2955, 0, 2829, 2867, + 2879, 2910, 2867, 2907, 2908, 2915, 2909, 2908, 2936, 2934, + 2933, 2949, 2950, 2948, 2953, 2955, 2958, 9553, 2944, 2953, + 2949, 2962, 2933, 2933, 2937, 2989, 2927, 2933, 2925, 2946, + 2954, 2959, 2960, 2961, 2972, 2955, 2975, 2956, 2957, 2971, + + 2965, 2977, 2980, 2983, 2970, 2972, 3011, 3014, 3022, 3025, + 3033, 3036, 3045, 3048, 3056, 3059, 3067, 3070, 3081, 3090, + 2969, 2982, 2977, 2996, 2999, 3056, 2988, 3093, 3103, 3106, + 3116, 3130, 3133, 3141, 3144, 3152, 3155, 2978, 2978, 2973, + 0, 0, 2984, 3006, 0, 2998, 3012, 3006, 0, 3026, + 3037, 3022, 0, 3042, 3033, 3038, 3059, 3058, 3043, 3081, + 3082, 0, 9553, 3085, 3096, 3079, 3106, 3086, 3063, 3086, + 3096, 3081, 3110, 3121, 0, 0, 3102, 3108, 3119, 0, + 3103, 3123, 3121, 3117, 0, 0, 3112, 3126, 3160, 3123, + 0, 0, 3118, 3132, 3131, 3120, 3135, 3125, 3133, 0, + + 3142, 0, 3149, 3132, 3134, 3148, 3142, 3153, 3141, 3139, + 3140, 3142, 3158, 3152, 3147, 3157, 3152, 3156, 3159, 0, + 3163, 3164, 0, 0, 3165, 3175, 3173, 3164, 0, 0, + 3206, 0, 3176, 3180, 3162, 0, 0, 0, 0, 0, + 3161, 3161, 0, 3165, 3170, 3171, 0, 3185, 3189, 3196, + 3234, 3237, 3245, 3248, 3256, 3259, 3268, 3192, 3205, 3200, + 3219, 3222, 3249, 3211, 3234, 0, 3213, 3205, 3207, 3214, + 3270, 3274, 3231, 3243, 0, 3227, 3236, 0, 3246, 0, + 0, 3247, 3245, 0, 3249, 3231, 3242, 0, 0, 0, + 0, 0, 3252, 3253, 3255, 3243, 3256, 0, 3257, 0, + + 0, 0, 3234, 3255, 3256, 3261, 3257, 3256, 3264, 0, + 0, 0, 0, 0, 3267, 3257, 3270, 0, 3262, 3247, + 3273, 3273, 0, 3269, 3253, 0, 0, 3265, 0, 3277, + 3274, 3264, 3266, 0, 3258, 3293, 3296, 3297, 3308, 3291, + 3311, 3291, 0, 3271, 3290, 3274, 3283, 3284, 3284, 3294, + 3281, 3294, 3283, 0, 3286, 3299, 3299, 3302, 0, 3294, + 3294, 0, 3293, 3307, 3309, 3296, 3312, 3301, 3294, 0, + 0, 0, 3295, 3301, 3304, 3309, 3314, 0, 3300, 3322, + 0, 3323, 0, 3319, 3307, 3326, 3323, 3304, 0, 3317, + 3326, 0, 3332, 3328, 3333, 3330, 3321, 3338, 3334, 3320, + + 3334, 3324, 0, 3332, 3341, 3341, 3347, 3348, 3335, 3335, + 3336, 3341, 3333, 3353, 3353, 3340, 3346, 3342, 3361, 0, + 3352, 0, 3352, 0, 3360, 0, 3376, 3377, 3378, 3389, + 3372, 3392, 3372, 0, 0, 3383, 3384, 3385, 3396, 3379, + 3399, 3379, 0, 3379, 0, 3426, 3427, 3430, 3428, 3429, + 3431, 3432, 3433, 3434, 3435, 3437, 3438, 3440, 3445, 3436, + 3439, 3442, 3441, 3446, 3443, 3444, 3448, 3451, 3447, 3449, + 3456, 3458, 3461, 3433, 3437, 3441, 3452, 3443, 3456, 3444, + 3481, 3482, 3483, 3484, 3485, 3492, 3488, 3433, 3434, 3446, + 3430, 3452, 0, 3473, 3469, 3472, 3471, 3479, 3474, 3488, + + 9553, 3480, 3478, 3479, 3481, 9553, 3486, 3503, 3484, 3501, + 9553, 3500, 9553, 3473, 3470, 3533, 9553, 3467, 3480, 3490, + 3479, 3513, 3505, 3502, 3513, 3504, 3522, 3499, 3507, 3508, + 3513, 3514, 3515, 3526, 3509, 3530, 3510, 3531, 3555, 3558, + 3566, 3569, 3577, 3585, 3596, 3600, 3616, 3624, 3633, 3636, + 3644, 3519, 3524, 3526, 3534, 3545, 3529, 3556, 3536, 3647, + 3655, 3658, 3666, 3669, 3682, 3690, 3693, 3701, 3704, 3712, + 3716, 3536, 3538, 3525, 3531, 3530, 3532, 3536, 3555, 3540, + 3550, 3546, 3566, 0, 3567, 3555, 3563, 3574, 3586, 3584, + 3653, 3589, 3607, 3585, 3597, 3594, 0, 0, 3582, 3590, + + 3588, 3602, 3611, 3630, 3675, 3620, 3603, 3627, 0, 0, + 3646, 0, 3654, 3642, 3693, 3666, 3669, 3677, 3681, 3682, + 0, 3677, 3678, 3666, 3667, 3671, 3683, 3673, 3688, 3692, + 3679, 3695, 3684, 3687, 3703, 3697, 3699, 3687, 3703, 3692, + 3694, 0, 3710, 3694, 3713, 3716, 3704, 3705, 3700, 3710, + 3714, 3714, 3756, 0, 3726, 0, 3706, 3725, 3723, 3732, + 0, 0, 0, 3731, 3755, 3780, 3783, 3791, 3794, 3803, + 3818, 3826, 3744, 3749, 3751, 3759, 3770, 3754, 3780, 3761, + 0, 3747, 0, 3743, 0, 0, 0, 0, 0, 3746, + 3745, 3749, 3753, 3783, 3771, 3753, 3774, 3785, 3783, 3790, + + 3773, 3782, 3792, 3779, 3780, 3785, 3802, 3785, 3790, 3785, + 0, 3801, 0, 3804, 3803, 3796, 3796, 3812, 3802, 3794, + 0, 3806, 3811, 3817, 3812, 0, 3799, 3817, 3820, 3823, + 3836, 3833, 3844, 3835, 3853, 3830, 3838, 3820, 3814, 0, + 0, 0, 3834, 3816, 3836, 3832, 3836, 3839, 0, 3841, + 3827, 3838, 3823, 3839, 3828, 3828, 0, 3843, 3844, 3841, + 0, 3833, 0, 3836, 3840, 3849, 3854, 3856, 3852, 3853, + 0, 3854, 3847, 3848, 3860, 3844, 3859, 3847, 3847, 3901, + 3867, 3850, 3851, 3871, 3850, 3855, 3874, 0, 3857, 3871, + 0, 3872, 3877, 3874, 0, 3864, 3872, 3868, 3864, 3880, + + 3882, 3864, 0, 3888, 0, 3877, 0, 3883, 3891, 0, + 3891, 3904, 3901, 3912, 3903, 3921, 3898, 3906, 3912, 3909, + 3920, 3911, 3929, 3906, 3914, 3897, 3955, 3956, 3958, 3957, + 3959, 3960, 3962, 3961, 3963, 3964, 3965, 3967, 3966, 3969, + 3968, 3970, 3972, 3971, 3977, 3973, 3974, 3976, 3979, 3975, + 3980, 3981, 3982, 3983, 3987, 3960, 3972, 3981, 3979, 3965, + 3973, 3980, 4001, 3992, 4020, 4021, 4022, 4023, 4024, 4025, + 3963, 3976, 3967, 3986, 0, 4000, 9553, 4016, 4010, 4015, + 4005, 4004, 4024, 4028, 4010, 4026, 4028, 4019, 4014, 4028, + 4024, 3989, 3994, 4016, 4016, 4002, 4007, 4015, 4027, 4023, + + 4024, 4034, 4035, 4028, 4029, 4036, 4051, 4052, 4044, 4042, + 4053, 4044, 4062, 4039, 4047, 4047, 4086, 4089, 4097, 4100, + 4108, 4111, 4119, 4133, 4142, 4145, 4153, 4156, 4164, 4172, + 4064, 4056, 4054, 4097, 4062, 4080, 4058, 4072, 4175, 4186, + 4194, 4197, 4205, 4208, 4216, 4219, 4227, 4047, 4049, 4077, + 4062, 4074, 4070, 4087, 4084, 4082, 4079, 4083, 0, 4102, + 4090, 4109, 4105, 4123, 4124, 4138, 4139, 4133, 4140, 4147, + 4164, 4127, 4135, 4146, 4154, 0, 0, 4165, 4163, 4169, + 4165, 4169, 4185, 4173, 4173, 4176, 4193, 4194, 0, 4196, + 4197, 0, 4198, 4198, 4198, 4185, 4178, 0, 0, 4202, + + 4191, 4191, 4205, 4206, 4188, 0, 4202, 4203, 4208, 4210, + 0, 0, 0, 0, 4195, 0, 4199, 0, 0, 0, + 0, 4204, 4212, 4194, 0, 4210, 4216, 4196, 4209, 4223, + 4211, 0, 4218, 4213, 4229, 4230, 4218, 4225, 4225, 4220, + 4240, 4283, 4286, 4295, 4298, 4306, 4309, 4317, 4332, 4257, + 4249, 4246, 4295, 4248, 4266, 4251, 4259, 4240, 4255, 4243, + 4257, 4258, 4262, 4255, 4262, 4271, 4264, 4288, 4276, 4276, + 4273, 4281, 4283, 4280, 4299, 4300, 4295, 4295, 4285, 4305, + 4289, 4308, 4290, 4301, 4311, 4300, 4297, 4298, 4317, 4305, + 4302, 4308, 4310, 4319, 4302, 4318, 4310, 4322, 4316, 4314, + + 4322, 4331, 4332, 4341, 4342, 4335, 4336, 4343, 4358, 0, + 4339, 4320, 4332, 4335, 4343, 4339, 4327, 4334, 4333, 4334, + 4336, 4350, 4346, 4332, 4352, 4336, 4341, 4343, 0, 4352, + 4344, 4335, 4355, 4337, 4338, 4362, 4363, 4362, 4347, 4358, + 4368, 4369, 4365, 4368, 4368, 4353, 4354, 4361, 4371, 4372, + 4359, 4364, 4379, 4379, 4377, 4359, 4363, 4367, 4372, 4387, + 0, 4384, 4384, 4382, 4388, 0, 4387, 4392, 4390, 4395, + 4397, 4406, 4407, 4400, 4401, 4408, 4423, 4404, 4407, 4416, + 4417, 4410, 4411, 4419, 4434, 0, 4460, 4461, 4462, 4463, + 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4472, 4471, 4473, + + 4475, 4474, 4476, 4477, 4478, 4479, 4480, 4481, 4483, 4482, + 4452, 4455, 4464, 4475, 4472, 4476, 4463, 4489, 4493, 4485, + 4515, 4516, 4520, 4528, 4486, 4526, 0, 4465, 4467, 0, + 0, 4520, 4500, 4500, 9553, 4500, 4501, 4504, 4507, 4519, + 4521, 4503, 4526, 9553, 4517, 4543, 4491, 4509, 4509, 4500, + 4498, 4506, 4497, 4564, 4524, 4527, 4528, 4523, 4524, 4531, + 4532, 4547, 4534, 4535, 4531, 4532, 4541, 4542, 4535, 4536, + 4543, 4558, 4545, 4584, 4587, 4595, 4598, 4607, 4610, 4620, + 4623, 4643, 4646, 4654, 4657, 4547, 4543, 4545, 4561, 4562, + 4556, 4563, 4571, 4586, 4665, 4668, 4679, 4682, 4691, 4694, + + 4559, 4562, 4558, 4579, 4570, 4586, 4575, 4590, 4580, 4588, + 4593, 4593, 4592, 4598, 4583, 4618, 4619, 4615, 4623, 4630, + 4632, 4653, 4640, 4627, 4642, 4635, 4636, 4635, 4646, 0, + 4656, 0, 4646, 4659, 4649, 4653, 4666, 4662, 4649, 4658, + 4656, 4654, 4655, 4674, 4676, 4677, 4666, 4679, 4665, 4665, + 4658, 4665, 0, 0, 0, 0, 4679, 0, 4680, 4686, + 4675, 4675, 4674, 4690, 4686, 4676, 4684, 4693, 4691, 4692, + 4680, 4685, 4695, 4702, 4700, 4710, 4751, 4754, 4762, 4765, + 4773, 4776, 4789, 4792, 4711, 4707, 4709, 4728, 4729, 4723, + 4731, 4738, 4754, 4736, 4724, 4731, 4729, 4744, 4749, 4737, + + 4745, 4754, 4740, 4756, 4750, 4759, 0, 0, 4744, 4748, + 4749, 4753, 4772, 4769, 4775, 4768, 4772, 4763, 4779, 4775, + 4770, 4760, 4763, 4765, 4766, 4786, 4783, 4784, 4785, 4771, + 4787, 4792, 4794, 4777, 4795, 4779, 4797, 4805, 4806, 4801, + 4802, 4809, 4810, 4825, 4811, 4804, 4799, 4796, 4805, 4798, + 4812, 4793, 4809, 4795, 4809, 4817, 4802, 4818, 4820, 4818, + 4822, 4807, 4824, 4807, 4811, 4827, 4804, 4809, 4810, 4827, + 4814, 0, 0, 4814, 4815, 4822, 4816, 4825, 4838, 0, + 0, 4824, 4822, 4825, 4834, 4822, 4840, 4845, 4830, 4842, + 0, 4843, 4849, 4846, 4842, 4848, 4852, 4839, 4855, 4834, + + 4836, 4857, 4853, 4855, 4847, 4868, 4869, 4864, 4865, 4872, + 4873, 4888, 4874, 4876, 4877, 4872, 4873, 4880, 4881, 4896, + 4882, 4924, 4925, 4926, 4927, 4928, 4929, 4932, 4930, 4931, + 4933, 4935, 4937, 4936, 4938, 4939, 4940, 4941, 4942, 4943, + 4944, 4945, 4946, 4950, 4951, 4920, 4932, 4921, 4923, 4934, + 4939, 4950, 4941, 4953, 4947, 4979, 4980, 4982, 4983, 4984, + 4986, 4988, 0, 0, 4970, 4951, 4969, 4974, 4960, 4976, + 9553, 4962, 4980, 4986, 4963, 4985, 4988, 4962, 4957, 4965, + 4956, 4958, 4966, 4967, 4957, 4973, 5027, 9553, 4998, 5005, + 5006, 4993, 4994, 5009, 5010, 4996, 4997, 4998, 5000, 5001, + + 4996, 4997, 5004, 5005, 5020, 5006, 5019, 5047, 5050, 5058, + 5061, 5069, 5072, 5080, 5083, 5094, 5102, 5010, 5012, 5014, + 5016, 5017, 5025, 5034, 5058, 5044, 5105, 5113, 5116, 5038, + 5032, 5044, 5034, 5050, 5049, 5055, 5051, 5068, 5074, 5065, + 5071, 5065, 5073, 5084, 5106, 5107, 5094, 5096, 5111, 5112, + 5098, 5099, 5086, 5076, 5089, 5095, 5100, 5101, 0, 5087, + 5103, 5081, 5080, 5090, 5089, 5107, 5104, 5101, 5103, 5097, + 5108, 5095, 5096, 5111, 5109, 5107, 5118, 5121, 5122, 5114, + 5105, 5126, 5122, 5123, 5108, 5107, 5128, 5114, 5125, 5121, + 5117, 5129, 5113, 5133, 5126, 5125, 5128, 5130, 5138, 5126, + + 5138, 5162, 5190, 5193, 5201, 5204, 5212, 5220, 5223, 5239, + 5153, 5155, 5157, 5159, 5160, 5168, 5177, 5192, 5183, 5162, + 5161, 5183, 5177, 5179, 5171, 5178, 5179, 5179, 5184, 5200, + 5189, 5188, 5202, 5208, 5204, 5190, 5203, 5193, 5197, 5205, + 5199, 5210, 5199, 5197, 5220, 5216, 5222, 5223, 5204, 5217, + 5210, 5209, 5206, 5221, 5218, 5215, 5216, 5221, 5215, 5231, + 5234, 5258, 5259, 5246, 5247, 5262, 5263, 5249, 5250, 5231, + 5244, 5243, 5249, 5229, 5235, 5238, 5239, 5245, 5235, 5238, + 5256, 5247, 5243, 5252, 5257, 5261, 5245, 5257, 5252, 5263, + 5247, 5263, 5264, 5270, 5260, 0, 5258, 5272, 5308, 5259, + + 5263, 5263, 5260, 5274, 5265, 5265, 5263, 5269, 5281, 5267, + 5280, 5269, 5270, 5271, 5290, 5271, 5278, 5290, 5289, 5279, + 5272, 5285, 5279, 5286, 5299, 5321, 5322, 5309, 5310, 5325, + 5326, 5312, 5313, 5329, 5330, 5317, 5318, 5333, 5334, 5320, + 5321, 5362, 5363, 5364, 5365, 5366, 5367, 5368, 5369, 5370, + 5372, 5371, 5373, 5374, 5375, 5376, 5377, 5378, 5379, 5380, + 5381, 5383, 5386, 5385, 5387, 5389, 5365, 5373, 5360, 5367, + 5376, 5378, 5375, 5377, 5414, 5419, 5420, 5421, 5422, 5423, + 5424, 5426, 5428, 5425, 9553, 9553, 5405, 5387, 9553, 5403, + 5398, 5402, 5399, 5417, 5422, 5383, 5391, 5382, 5387, 5391, + + 5385, 5393, 5399, 5392, 5422, 5417, 5420, 5436, 5439, 5425, + 5430, 5431, 5443, 5444, 5449, 5450, 5437, 5438, 5453, 5454, + 5440, 5441, 5448, 5481, 5484, 5492, 5495, 5503, 5506, 5520, + 5523, 5455, 5460, 5462, 5456, 5457, 5473, 5481, 5467, 5469, + 5471, 5473, 5473, 5469, 5476, 5469, 5489, 5485, 5477, 5490, + 5493, 5492, 5487, 5496, 5485, 5504, 5505, 5522, 5523, 5509, + 5510, 5511, 5526, 5498, 5509, 5500, 5499, 5511, 5498, 5507, + 5501, 5507, 5521, 5508, 5506, 5509, 5509, 5513, 5519, 5517, + 5530, 5526, 5523, 5519, 5516, 5515, 5531, 5528, 0, 5519, + 5534, 5538, 5542, 5521, 5530, 5531, 5533, 5547, 5536, 5549, + + 5541, 5530, 5533, 5552, 5534, 5536, 5540, 5545, 5542, 5554, + 5556, 5542, 5561, 5574, 5607, 5610, 5618, 5621, 5629, 5632, + 5646, 5649, 5581, 5586, 5588, 5582, 5583, 5599, 5607, 5593, + 5595, 5576, 5596, 5600, 5599, 5607, 5605, 5602, 5600, 5617, + 5605, 5610, 5599, 5621, 5603, 5622, 5623, 5601, 5607, 5620, + 5626, 5612, 5629, 5636, 5632, 5633, 5624, 5623, 5640, 5640, + 5620, 5645, 5642, 5649, 5645, 5651, 0, 5652, 5649, 5654, + 5647, 0, 5646, 5664, 5665, 5681, 5682, 5668, 5669, 5670, + 5682, 5663, 5668, 5669, 5650, 5659, 5654, 5668, 5667, 5668, + 5668, 5672, 5659, 5679, 5679, 5681, 5677, 5664, 5679, 5680, + + 5677, 5672, 5683, 5675, 5676, 5686, 5692, 5677, 5670, 5695, + 5691, 5696, 5714, 5690, 5699, 5683, 5685, 5703, 5699, 5690, + 5688, 5698, 5703, 5694, 5705, 5699, 5703, 5693, 5699, 5697, + 5704, 5699, 5698, 0, 5703, 5707, 5726, 5727, 5743, 5744, + 5730, 5731, 5732, 5744, 5734, 5735, 5751, 5752, 5738, 5739, + 5740, 5752, 5782, 5783, 5784, 5785, 5787, 5788, 5789, 5790, + 5792, 5791, 5794, 5793, 5795, 5796, 5797, 5798, 5799, 5800, + 5801, 5805, 5803, 5802, 5769, 5771, 5782, 5787, 5773, 5780, + 5781, 5797, 5823, 5824, 5828, 5825, 5834, 5837, 5838, 5827, + 5839, 9553, 5796, 9553, 5801, 9553, 5807, 5821, 5805, 5821, + + 5795, 5781, 5782, 5799, 5801, 5784, 5803, 5818, 9553, 5818, + 5843, 5831, 5832, 5834, 5836, 5837, 5838, 5851, 5847, 5849, + 5844, 5845, 5861, 5862, 5848, 5849, 5850, 5862, 5865, 5891, + 5894, 5902, 5905, 5913, 5916, 5928, 5931, 5860, 5855, 5857, + 5880, 5881, 5868, 5876, 5877, 5890, 5868, 5876, 5879, 5868, + 5873, 5877, 5878, 0, 5894, 5900, 5901, 5883, 5890, 5890, + 5905, 5892, 5900, 5915, 5918, 5919, 5920, 5921, 5922, 5934, + 5930, 5921, 5914, 5902, 5901, 5907, 5925, 5918, 5903, 5914, + 5930, 5911, 5920, 5918, 5934, 5914, 5927, 5913, 5933, 5936, + 5940, 5915, 5938, 5928, 5919, 5939, 5939, 5938, 5934, 5931, + + 5930, 5935, 5947, 5949, 5953, 5955, 5944, 5948, 5945, 5935, + 5947, 5961, 5946, 5943, 5943, 5947, 5954, 5967, 5949, 5950, + 5970, 5955, 5990, 6016, 6019, 6027, 6030, 6038, 6041, 6053, + 6056, 5985, 5980, 5982, 6005, 6006, 5993, 6001, 6002, 6015, + 5997, 6006, 5995, 6009, 5994, 6006, 6022, 6009, 6007, 6026, + 6008, 6009, 6022, 6011, 6014, 6029, 6034, 6033, 6020, 6040, + 6039, 6028, 6026, 6028, 6046, 6028, 6032, 6038, 6037, 6032, + 6035, 6049, 6054, 6051, 6048, 6058, 6040, 6059, 6056, 6050, + 6055, 6049, 6048, 6051, 6047, 6070, 6076, 6077, 6078, 6079, + 6080, 6081, 6093, 6089, 6064, 6062, 6072, 6074, 6063, 6079, + + 6067, 6066, 6068, 0, 6087, 6070, 6078, 6072, 6076, 6073, + 6075, 6094, 6082, 6094, 6084, 6085, 6081, 6082, 6078, 6096, + 6104, 6105, 6091, 6104, 6090, 6113, 6106, 6091, 6092, 6092, + 6098, 6106, 6102, 6102, 6094, 6100, 6104, 6118, 6107, 6119, + 6115, 6103, 6125, 6118, 6123, 6120, 6118, 6126, 6137, 6138, + 6139, 6140, 6141, 6142, 6154, 6150, 6145, 6146, 6147, 6148, + 6149, 6150, 6162, 6158, 6193, 6194, 6195, 6196, 6197, 6198, + 6199, 6200, 6201, 6202, 6203, 6204, 6205, 6206, 6207, 6208, + 6209, 6210, 6211, 6212, 6178, 6179, 6181, 6182, 6188, 6190, + 6202, 6192, 6215, 6234, 6236, 6240, 6241, 6242, 6243, 6244, + + 6229, 6206, 6206, 9553, 6209, 9553, 6217, 6185, 6181, 9553, + 9553, 6188, 6206, 6237, 6197, 6209, 6265, 6228, 6241, 6242, + 6232, 6233, 6249, 6250, 6246, 6254, 6259, 6247, 6248, 6249, + 6250, 6251, 6252, 6264, 6260, 6256, 6295, 6298, 6306, 6309, + 6321, 6324, 6332, 6335, 6269, 6258, 6259, 6269, 6270, 6272, + 6279, 6291, 6287, 6272, 6271, 6271, 6286, 6273, 6300, 6294, + 6280, 6287, 6298, 6291, 6305, 6297, 6298, 6299, 6294, 6331, + 6332, 6323, 6324, 6336, 6338, 6334, 6342, 6322, 6326, 6314, + 6328, 6311, 6314, 6324, 6331, 6322, 6334, 0, 6311, 6319, + 6332, 6334, 6327, 6375, 6318, 6331, 6341, 6340, 6346, 6333, + + 6348, 6329, 6342, 6325, 6348, 6338, 6354, 6350, 6353, 6357, + 6346, 6342, 6355, 6345, 6361, 6397, 6364, 6349, 6366, 6354, + 6356, 6364, 6355, 6367, 6363, 6364, 6358, 6375, 6382, 6420, + 6423, 6431, 6434, 6446, 6449, 6457, 6460, 6396, 6384, 6386, + 6394, 6395, 6397, 6404, 6416, 6412, 6399, 6402, 6406, 6413, + 6397, 6411, 6407, 6416, 6422, 6412, 6425, 6430, 6435, 6424, + 6437, 6438, 6416, 6427, 6427, 6424, 6427, 6447, 6435, 6431, + 6445, 6431, 6444, 6432, 6454, 6455, 6443, 6456, 6457, 6435, + 6446, 6445, 6455, 6445, 6456, 6445, 6465, 6467, 6454, 6468, + 6465, 6468, 0, 6467, 6460, 6490, 6491, 6481, 6483, 6495, + + 6496, 6492, 6500, 6469, 6479, 6471, 6468, 6478, 6469, 6485, + 6482, 6491, 6488, 6488, 6479, 6476, 6495, 6492, 0, 6494, + 6496, 6500, 6481, 6483, 6494, 6495, 6485, 6505, 6498, 6503, + 6495, 0, 6499, 6520, 6507, 6494, 6514, 6514, 6511, 6510, + 6498, 6501, 0, 6499, 6512, 6502, 6516, 6509, 6518, 6521, + 6520, 6525, 6528, 6514, 6530, 6520, 6549, 6550, 6540, 6541, + 6553, 6554, 6550, 6558, 6557, 6558, 6548, 6549, 6561, 6562, + 6558, 6566, 6594, 6595, 6596, 6598, 6597, 6599, 6600, 6601, + 6602, 6603, 6604, 6605, 6606, 6608, 6607, 6611, 6609, 6583, + 6584, 6580, 6581, 6588, 6593, 6590, 6602, 6614, 6627, 6634, + + 6638, 6639, 6640, 6642, 6644, 6632, 6614, 6616, 6612, 6625, + 6595, 6601, 6598, 6606, 9553, 6633, 9553, 6598, 6657, 9553, + 9553, 6623, 6624, 6630, 6631, 6628, 6629, 6637, 6629, 6636, + 6647, 6652, 6643, 6644, 6656, 6657, 6653, 6661, 0, 6687, + 6690, 6698, 6701, 6709, 6724, 6727, 6737, 6651, 6662, 6664, + 6661, 6662, 6675, 6683, 6679, 6687, 6657, 6662, 6675, 6665, + 6678, 6661, 6665, 6689, 6688, 6683, 6695, 6674, 6697, 6696, + 6692, 6680, 6717, 6718, 6724, 6726, 6722, 6723, 6732, 6721, + 6708, 6696, 6701, 6719, 6708, 6706, 6722, 6709, 6723, 6720, + 6722, 6727, 6709, 6711, 6716, 6711, 6761, 6733, 6726, 6724, + + 0, 6730, 6718, 6719, 6740, 6721, 6737, 6743, 6730, 6740, + 6729, 6728, 6746, 6738, 6730, 6738, 0, 6734, 6782, 6743, + 6751, 6751, 6742, 6739, 6741, 6740, 6754, 6750, 6751, 6761, + 6761, 0, 6811, 6814, 6822, 6825, 6833, 6848, 6851, 6861, + 6775, 6786, 6788, 6785, 6786, 6799, 6807, 6803, 6811, 6783, + 6790, 6785, 6786, 6790, 6804, 6798, 6791, 6803, 6810, 6806, + 6821, 6807, 6818, 6802, 6807, 6816, 6817, 6827, 6829, 6830, + 6818, 6833, 6834, 6836, 6841, 6824, 6834, 6835, 6843, 6837, + 6821, 6826, 6835, 6836, 6846, 6843, 6848, 6849, 6856, 6839, + 6849, 6859, 6836, 6847, 6848, 6858, 6864, 6864, 6877, 6878, + + 6884, 6885, 6881, 6882, 6890, 6879, 6867, 6859, 6876, 6872, + 6862, 6874, 6875, 0, 6865, 6882, 6864, 6869, 6885, 6867, + 6884, 6888, 6864, 6874, 6882, 6883, 6878, 6879, 6890, 6880, + 6883, 6880, 6899, 6900, 6926, 6903, 0, 6886, 6893, 6888, + 6899, 6899, 6890, 6898, 6897, 6907, 0, 0, 6913, 6896, + 6910, 6915, 6913, 6917, 6899, 6915, 6932, 6933, 6939, 6940, + 6936, 6937, 6945, 6934, 6940, 6941, 6947, 6948, 6944, 6945, + 6953, 6942, 6982, 6983, 6984, 6985, 6986, 6987, 6988, 6989, + 6990, 6993, 6991, 6992, 6995, 6996, 6997, 6964, 6966, 6973, + 6974, 6970, 6982, 6979, 6984, 7020, 7010, 7021, 7022, 7024, + + 7025, 7026, 7027, 7029, 6994, 7007, 9553, 6996, 6967, 6987, + 6980, 6972, 6988, 7015, 7016, 7010, 7011, 7019, 7020, 7009, + 0, 9553, 7017, 7018, 7024, 7028, 7024, 7026, 7036, 7026, + 7064, 7067, 7075, 7078, 7088, 7091, 7099, 7112, 0, 7033, + 7034, 7041, 7049, 7045, 7047, 7061, 7050, 7032, 7052, 7056, + 7050, 7047, 7056, 7061, 7053, 7054, 7072, 7068, 7078, 7058, + 7071, 7056, 7082, 7101, 7103, 7097, 7099, 7107, 7108, 7097, + 0, 7083, 7080, 7074, 7079, 7092, 7080, 7093, 7099, 7082, + 7078, 7102, 7085, 7105, 7091, 7104, 7095, 7140, 7110, 7095, + 7103, 7112, 7114, 7107, 7113, 7117, 0, 7111, 7099, 7106, + + 7103, 7122, 7108, 7112, 7110, 7125, 7120, 7117, 7160, 7125, + 7122, 7114, 7124, 7116, 7135, 7115, 7132, 7120, 7132, 7133, + 7123, 7133, 7186, 7189, 7197, 7200, 7210, 7213, 7221, 7234, + 0, 7155, 7156, 7163, 7171, 7167, 7169, 7183, 7172, 7154, + 7174, 7168, 7167, 7177, 7168, 7187, 7180, 7187, 7196, 7193, + 7183, 7194, 7189, 7179, 7180, 7191, 7192, 7207, 7193, 7194, + 7210, 7199, 7212, 7193, 7213, 7212, 7200, 7205, 7219, 7207, + 7197, 7198, 7209, 7210, 7225, 7207, 7212, 7210, 7227, 7220, + 7219, 7218, 0, 0, 7234, 7222, 7218, 7214, 7257, 7258, + 7252, 7253, 7261, 7262, 7252, 0, 7246, 7243, 7230, 7231, + + 7239, 7238, 7237, 7249, 7243, 7256, 0, 7241, 7243, 7240, + 7240, 7257, 7262, 7262, 7257, 7250, 7252, 7253, 7254, 7269, + 7251, 7253, 7269, 7268, 7296, 7257, 7271, 7277, 7278, 7277, + 7273, 0, 7261, 7264, 7279, 7265, 7284, 7286, 7267, 7274, + 7270, 7285, 7277, 7310, 7311, 7305, 7306, 7314, 7315, 7304, + 0, 7317, 7318, 7312, 7313, 7321, 7322, 7311, 0, 7351, + 7352, 7353, 7354, 7355, 7356, 7357, 7358, 7359, 7333, 7334, + 7328, 7330, 7339, 7343, 7332, 7337, 7373, 7376, 7379, 7377, + 7383, 7380, 7381, 7390, 7382, 7357, 7347, 7353, 7334, 7326, + 7333, 7347, 7396, 7355, 7357, 7370, 7371, 7360, 7361, 0, + + 7374, 7376, 7370, 7371, 7380, 7381, 7379, 9553, 7417, 7420, + 7428, 7431, 7439, 7442, 7455, 7404, 7405, 7400, 7408, 7416, + 7418, 7413, 0, 7390, 7390, 7390, 7402, 7415, 7395, 7421, + 7409, 7403, 7419, 7421, 7405, 7414, 7427, 7411, 7417, 0, + 7426, 7440, 7441, 7455, 7456, 7445, 7446, 0, 7428, 7431, + 7442, 7423, 7431, 7427, 7429, 7436, 7444, 7449, 7435, 7432, + 7452, 7441, 7450, 7456, 0, 7450, 7458, 7443, 7444, 7454, + 7444, 7451, 7461, 7464, 7466, 7463, 7453, 7461, 7452, 7462, + 7449, 7461, 7454, 0, 0, 7469, 7469, 7477, 7466, 7474, + 7479, 7469, 7465, 0, 7472, 7476, 7489, 7478, 7534, 7543, + + 7547, 7551, 7555, 7559, 7563, 7511, 7512, 7506, 7512, 7521, + 7542, 7536, 0, 7509, 7532, 7529, 7526, 7516, 0, 7530, + 7539, 7535, 7529, 7542, 7543, 7539, 0, 0, 7527, 7528, + 7529, 7530, 7530, 7535, 7547, 7534, 7540, 7552, 7554, 7543, + 7558, 7559, 7556, 7562, 7560, 0, 7546, 7547, 7548, 7549, + 7548, 7568, 7565, 7571, 7557, 7572, 7549, 7575, 7571, 7565, + 7558, 7576, 7575, 7587, 7588, 7601, 7602, 7591, 7592, 0, + 7571, 7587, 7584, 7582, 7582, 7589, 7573, 7576, 7590, 7580, + 7578, 7584, 0, 7590, 7591, 7599, 7582, 7603, 7590, 7605, + 7606, 7588, 7606, 7589, 7595, 7599, 7588, 7610, 7613, 7614, + + 7610, 7610, 7604, 7615, 0, 7616, 7622, 7614, 7617, 7622, + 7621, 7626, 7609, 7629, 7623, 7637, 7638, 7651, 7652, 7641, + 7642, 0, 7643, 7644, 7657, 7658, 7647, 7648, 0, 7688, + 7689, 7690, 7691, 7692, 7693, 7694, 7696, 7662, 7663, 7672, + 7673, 7670, 7671, 7668, 7704, 7711, 7712, 7713, 7714, 7717, + 7719, 7718, 9553, 9553, 7695, 7654, 7676, 7671, 9553, 7728, + 9553, 0, 0, 7686, 7687, 0, 0, 7690, 7691, 7705, + 7706, 7695, 7696, 9553, 7747, 7757, 7760, 7768, 7771, 7779, + 7697, 7698, 7712, 7715, 7704, 7711, 0, 7681, 0, 7708, + 7710, 7703, 7713, 7722, 7707, 7728, 7719, 7724, 7734, 7726, + + 7743, 7744, 7739, 7738, 0, 0, 7754, 7755, 0, 0, + 7745, 7747, 7740, 7752, 7748, 7756, 7742, 7758, 0, 7754, + 7740, 7743, 7751, 7764, 7765, 7754, 7760, 7766, 0, 0, + 7768, 7765, 7762, 7761, 7758, 7768, 7776, 7763, 7777, 7779, + 7764, 7776, 7773, 7775, 7764, 7777, 7774, 7775, 7769, 7786, + 7789, 7790, 7791, 7773, 7793, 7793, 7786, 7779, 7800, 7796, + 7797, 7791, 7792, 7848, 7851, 7859, 7862, 7870, 7873, 7812, + 7813, 7827, 7835, 7824, 7826, 0, 7823, 7823, 7817, 7825, + 7830, 7822, 7838, 7824, 7838, 7841, 7832, 7824, 7842, 7843, + 7836, 7837, 0, 7842, 7851, 7845, 7837, 0, 7837, 7836, + + 7839, 7856, 7857, 7853, 7852, 7859, 7860, 7853, 7854, 0, + 7856, 7868, 7854, 7849, 7852, 7873, 7865, 7857, 7856, 0, + 7862, 7860, 0, 0, 7885, 7886, 0, 0, 7862, 7862, + 7880, 7869, 7880, 7881, 7879, 7888, 7875, 7885, 0, 7879, + 7877, 7874, 7882, 7890, 7888, 7895, 7898, 7890, 7877, 7892, + 7901, 7898, 7886, 7896, 7903, 7892, 7888, 7905, 7895, 7893, + 7894, 7899, 7902, 7896, 7891, 7913, 7904, 7920, 7908, 7909, + 7907, 7904, 0, 0, 7931, 7932, 0, 0, 0, 0, + 7933, 7934, 0, 0, 7974, 7975, 7976, 7977, 7978, 7979, + 7980, 7982, 7983, 7949, 7950, 7951, 7952, 7953, 7954, 7993, + + 7994, 7992, 7995, 7996, 7997, 7998, 9553, 7949, 9553, 9553, + 0, 0, 9553, 9553, 7961, 7964, 9553, 9553, 8002, 8005, + 0, 0, 7966, 7967, 0, 0, 7963, 7962, 7971, 7957, + 0, 7954, 7966, 7964, 7963, 7973, 7963, 7981, 7980, 7977, + 7985, 7977, 0, 0, 7974, 7988, 7985, 7983, 7976, 7996, + 7985, 7988, 7987, 7987, 7998, 7992, 8000, 7994, 8002, 8005, + 8008, 7992, 7995, 7993, 7997, 8005, 0, 8014, 8013, 7997, + 7999, 8007, 0, 8016, 8001, 0, 8022, 8003, 8015, 8022, + 8005, 8022, 8022, 8010, 8014, 8025, 8019, 8027, 8015, 8011, + 8029, 8037, 8018, 8019, 8020, 8032, 8039, 8086, 8089, 0, + + 0, 8050, 8051, 0, 0, 8029, 8045, 8089, 8091, 8052, + 8055, 8046, 8062, 8043, 8049, 8050, 8061, 8051, 8052, 8068, + 8069, 8057, 8052, 8058, 8049, 8066, 8071, 8068, 8059, 0, + 8065, 8078, 8065, 8066, 8082, 8083, 8085, 8066, 8082, 8083, + 8080, 8079, 8077, 8089, 8068, 8076, 8077, 0, 0, 0, + 8096, 8082, 8086, 8081, 8100, 0, 8085, 8095, 8085, 8079, + 8091, 8086, 8106, 8107, 8103, 8089, 8102, 8098, 8104, 8099, + 8096, 8115, 8117, 8102, 8107, 8106, 8112, 8103, 8105, 8109, + 8125, 8108, 8123, 8109, 8114, 8125, 8131, 8110, 8115, 8129, + 8134, 8118, 8129, 0, 0, 0, 0, 8183, 8184, 8185, + + 8186, 8152, 8153, 8189, 8190, 8191, 8192, 8193, 8194, 9553, + 9553, 9553, 0, 0, 8137, 8150, 8133, 8135, 0, 8147, + 8136, 8143, 8137, 8146, 8146, 8149, 8156, 8144, 8158, 8163, + 8145, 8146, 8158, 8160, 8157, 8170, 8166, 8168, 8155, 8154, + 8160, 8162, 8172, 8172, 8155, 8177, 8166, 0, 8174, 8183, + 8168, 8171, 8176, 8190, 8183, 8187, 0, 8168, 8191, 8195, + 8182, 8189, 8186, 0, 0, 8179, 8231, 8233, 8190, 0, + 0, 8183, 8197, 8204, 8193, 8189, 8190, 8199, 8206, 0, + 0, 8203, 8204, 0, 0, 0, 0, 8218, 8200, 8206, + 8206, 8203, 8209, 8221, 8208, 8222, 8223, 8217, 8218, 8224, + + 8213, 0, 0, 8218, 8216, 8220, 0, 8230, 8222, 8233, + 8234, 8228, 8229, 8228, 8224, 8226, 8227, 8231, 8238, 8242, + 8244, 0, 8245, 8236, 8248, 8239, 8250, 0, 8240, 8255, + 8237, 8258, 0, 0, 8241, 8257, 8243, 8253, 8254, 8250, + 8265, 8252, 8253, 8263, 8265, 8252, 8255, 8251, 8254, 8259, + 0, 8275, 8255, 8260, 8278, 8260, 8277, 0, 8281, 8260, + 8278, 8279, 8273, 8270, 8272, 0, 8333, 8334, 8335, 8290, + 8273, 8273, 8269, 8276, 0, 8277, 8289, 8297, 8294, 8298, + 8301, 8297, 0, 8299, 8299, 8280, 8286, 0, 8295, 8303, + 8295, 8291, 8292, 8309, 8290, 8310, 8301, 8296, 8310, 8307, + + 8305, 8305, 8303, 8322, 0, 8314, 8321, 0, 8319, 0, + 8314, 8324, 8323, 8328, 8310, 8330, 8328, 0, 0, 0, + 8321, 8331, 8334, 8335, 8336, 8318, 8338, 8337, 8325, 8334, + 8335, 8340, 8345, 8346, 8336, 8330, 8342, 8331, 8330, 0, + 8333, 8349, 8336, 8355, 8356, 0, 0, 0, 0, 8344, + 8358, 0, 8345, 8347, 8361, 8362, 0, 0, 8349, 0, + 8365, 8365, 0, 8355, 8353, 8355, 0, 8352, 8366, 8368, + 0, 8367, 8355, 8367, 8373, 8368, 8367, 8376, 8366, 8369, + 8382, 8367, 8380, 0, 8366, 8386, 8386, 8379, 8370, 8385, + 0, 8373, 8376, 8372, 8377, 8374, 8381, 8391, 8397, 8381, + + 8399, 8396, 8386, 8401, 8390, 8397, 8401, 8407, 0, 8388, + 0, 8393, 8410, 8396, 8403, 8412, 8409, 8412, 8416, 8392, + 8403, 8405, 0, 0, 8402, 8413, 8417, 8404, 0, 8424, + 8425, 0, 8406, 8415, 8423, 8411, 8414, 8419, 8412, 8424, + 8422, 0, 8417, 8436, 0, 8436, 8433, 8434, 8434, 8422, + 8426, 8430, 8438, 8426, 8422, 8428, 8434, 8435, 0, 8432, + 8435, 8432, 8450, 8439, 8446, 8451, 8448, 0, 8453, 8439, + 8440, 0, 8454, 8456, 8458, 8444, 8445, 8448, 8465, 8461, + 8457, 8464, 8451, 8453, 8453, 8455, 8475, 8457, 0, 8462, + 8476, 8467, 8472, 8477, 8478, 8467, 8483, 8470, 8486, 8469, + + 8468, 8475, 8481, 8477, 8479, 0, 8492, 8473, 8481, 8478, + 8482, 8486, 8498, 8496, 8487, 8493, 8491, 8503, 8505, 8490, + 8501, 8490, 0, 8503, 8496, 8497, 8508, 8493, 8494, 8512, + 0, 8493, 8513, 8509, 0, 8515, 0, 8517, 8505, 0, + 8518, 8506, 8519, 0, 8516, 8511, 8511, 8519, 0, 8528, + 0, 0, 0, 0, 8510, 8563, 8521, 0, 0, 8517, + 0, 8522, 8523, 0, 8540, 8532, 8541, 8531, 8537, 8527, + 8539, 8547, 0, 0, 8543, 8540, 8531, 0, 0, 8538, + 8531, 8548, 0, 8545, 0, 0, 8550, 0, 8539, 0, + 8543, 8537, 8550, 8560, 8556, 8542, 8562, 8545, 8542, 8561, + + 8562, 8563, 8562, 8555, 8552, 8570, 8561, 8573, 8563, 8572, + 8560, 8558, 8573, 8567, 8575, 8569, 8579, 8578, 8580, 0, + 8569, 8587, 8574, 8585, 8575, 8573, 8588, 8585, 8583, 8591, + 8578, 8591, 0, 8587, 8582, 8601, 8581, 8586, 8588, 8583, + 8606, 8591, 8605, 8608, 8609, 8610, 8592, 8612, 8610, 0, + 0, 8597, 8598, 8605, 8606, 8606, 8617, 8622, 8620, 8624, + 8622, 0, 8614, 0, 8626, 8622, 0, 8617, 8627, 8610, + 8612, 8613, 8615, 8616, 8618, 8628, 8619, 8620, 8640, 8619, + 8637, 8627, 0, 8644, 8631, 8625, 8647, 0, 8636, 8644, + 0, 8650, 8646, 8647, 8652, 8634, 8648, 8643, 8652, 8640, + + 8654, 8651, 8643, 0, 8661, 0, 8660, 8649, 8656, 8662, + 0, 8659, 8659, 8654, 8664, 8662, 8651, 0, 8668, 8654, + 8675, 8671, 8658, 8672, 8660, 8664, 8668, 0, 8681, 8668, + 8669, 8676, 8681, 0, 0, 8682, 8687, 8684, 8675, 8686, + 8680, 8687, 8689, 8675, 8695, 8688, 8689, 8679, 8680, 0, + 8688, 8683, 0, 8691, 8700, 8701, 8702, 8692, 8709, 8691, + 8691, 0, 8694, 8694, 0, 0, 8701, 8707, 0, 8697, + 8704, 8713, 8714, 8706, 8718, 8703, 8703, 8710, 8709, 0, + 8706, 8711, 8726, 8714, 8712, 8722, 8714, 8718, 8714, 0, + 8720, 0, 8716, 8768, 8726, 0, 8729, 8730, 8727, 0, + + 8738, 8731, 8740, 8732, 0, 8737, 8742, 0, 8739, 8737, + 8743, 8736, 0, 8737, 8748, 0, 8749, 8754, 8742, 8753, + 8757, 8754, 8759, 8761, 8761, 8756, 8744, 8760, 0, 0, + 8761, 8750, 0, 0, 8763, 8750, 8761, 8768, 0, 0, + 0, 8760, 8755, 8769, 8757, 8776, 0, 8762, 8759, 8778, + 8776, 0, 8776, 8777, 8771, 8775, 8773, 8777, 8771, 8769, + 8771, 8775, 8782, 0, 8778, 8777, 0, 8780, 8771, 8796, + 8795, 8778, 8796, 8782, 8800, 8795, 8798, 8803, 8786, 8792, + 8786, 8802, 0, 8794, 8798, 8806, 8812, 8809, 8809, 8812, + 0, 8808, 0, 8817, 8816, 8817, 8816, 8802, 8804, 8804, + + 8813, 8825, 0, 8813, 8808, 0, 0, 0, 8824, 8817, + 8816, 0, 0, 8827, 8820, 8829, 8828, 8832, 8817, 0, + 8818, 8834, 8825, 8827, 8833, 8830, 8839, 0, 8841, 8834, + 8833, 0, 8828, 8829, 8836, 8842, 0, 8843, 8848, 8834, + 0, 8846, 8838, 8836, 8838, 8858, 8845, 8843, 8853, 0, + 8844, 0, 8850, 8847, 8863, 8851, 0, 8854, 0, 8860, + 8863, 0, 0, 0, 8857, 8858, 8860, 8865, 8870, 8858, + 8865, 8870, 0, 8865, 8861, 8867, 0, 8879, 8882, 8872, + 0, 8865, 8870, 8875, 8881, 8882, 8885, 8876, 8873, 8878, + 8874, 8876, 8889, 8892, 8891, 8874, 8888, 8892, 8893, 0, + + 8898, 0, 0, 8890, 8891, 0, 8888, 8898, 8888, 8890, + 8893, 0, 0, 8899, 8896, 8895, 8894, 8895, 0, 8897, + 8914, 8900, 8914, 8900, 0, 0, 8916, 8903, 8904, 0, + 8909, 8924, 8909, 8902, 8928, 0, 0, 8917, 8916, 8911, + 8916, 8915, 8913, 8931, 8911, 8932, 8933, 8926, 8921, 8925, + 0, 8941, 8929, 0, 8939, 8941, 0, 8927, 8947, 0, + 8934, 8928, 8937, 8949, 8947, 8935, 8954, 8940, 8950, 8957, + 8956, 8958, 8941, 8956, 8943, 0, 9553, 9010, 9014, 9018, + 9022, 9023, 9025, 9027, 9028, 9030, 9032, 9036, 9040, 9034, + 9038, 9041, 9045, 9049 } ; -static yyconst flex_int16_t yy_def[5898] = +static yyconst flex_int16_t yy_def[6295] = { 0, - 5882, 5882, 5881, 3, 2, 2, 2, 2, 2, 2, - 2, 2, 5881, 13, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 5883, 5883, 5881, 27, 5884, 5884, + 6278, 6278, 6277, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 6277, 13, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 6279, 6279, 6277, 27, 6280, 6280, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 5881, 41, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 5881, 55, 5885, 5885, 2, 2, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, - 5881, 5881, 5887, 5881, 5881, 5881, 67, 5887, 5887, 5887, - 5881, 5881, 5881, 5888, 5888, 5888, 5888, 5888, 5888, 5887, - - 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5881, 5881, 67, 5881, 5881, 5889, 5889, 5889, - 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5890, 5890, 5890, 5890, 5891, 5891, 5891, 5891, - 5891, 5891, 5890, 5881, 5881, 5881, 5881, 5881, 67, 5881, - 5881, 5881, 5881, 5881, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5881, 5886, 5881, 5881, 5892, 5881, - 5893, 5881, 5881, 67, 5881, 5881, 5881, 5881, 5881, 5886, - - 5886, 5886, 5886, 5886, 5886, 5881, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5881, 5881, 67, 5881, 5881, 5881, 5881, 5881, - 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5881, 5881, 67, 5881, 5881, 5895, 5895, 5895, 5895, 5895, - 5895, 5895, 5895, 5895, 5896, 5896, 5881, 5896, 5896, 5896, - - 5896, 5896, 5896, 5896, 5896, 5896, 5897, 5897, 308, 308, - 308, 308, 5896, 5881, 5881, 5886, 5886, 5886, 5886, 5886, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, 5881, 5881, - 5881, 5887, 5887, 5887, 5887, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5887, 5887, - 5887, 5887, 5887, 5887, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5881, 5881, 5881, 5881, 5889, 5889, 5889, 5889, 5889, - 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5890, 5890, 5890, 5890, - 5891, 5891, 5891, 5891, 5891, 5891, 5891, 5890, 5890, 5890, - - 5890, 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5881, - 5881, 5881, 5881, 5881, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, - 5881, 5881, 5881, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5894, 5894, 5894, 5894, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, - 5881, 5881, 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5895, - 5895, 5895, 5896, 5881, 5896, 5896, 5896, 5881, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 308, 308, 308, 308, 308, 308, 308, - 5896, 5896, 5896, 5896, 5896, 5896, 5881, 5886, 5886, 5886, - 5886, 5886, 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5886, - 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5887, 5887, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5887, 5887, 5887, 5887, - - 5887, 5887, 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5881, 5881, 5889, 5889, 5889, 5889, 5889, 5889, - 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5890, 5890, 5891, 5891, 5891, 5891, - 5891, 5891, 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5886, - 5886, 5886, 5886, 5881, 5881, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, - 5881, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5881, 5881, 5895, 5895, 5895, 5895, - 5895, 5895, 5895, 5895, 5895, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 308, 308, 308, 308, 308, 308, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5881, 5886, 5886, 5886, 5886, 5886, - 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5887, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5887, - 5887, 5887, 5887, 5887, 5887, 5887, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, 5889, 5881, - 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5890, 5891, 5891, 5891, - 5891, 5891, 5891, 5891, 5890, 5890, 5890, 5890, 5890, 5890, - 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5894, 5894, 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5895, - 5895, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 308, 308, 308, 308, 308, 308, 308, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5886, 5886, 5886, 5886, 5886, 5886, - - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5887, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5889, 5889, 5889, 5889, 5889, - - 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5890, 5891, 5891, 5891, 5891, 5891, 5891, 5891, 5890, - 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5894, 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5895, 5895, 5895, 5895, 5895, 5895, 5895, - 5895, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 308, 308, 308, 308, 308, 308, 308, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5886, 5886, 5886, - 5886, 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5887, 5887, 5887, - 5887, 5887, 5887, 5887, 5887, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, - 5889, 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5890, 5891, 5891, 5891, 5891, - 5891, 5891, 5891, 5891, 5890, 5890, 5890, 5890, 5890, 5890, - 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5894, - 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5895, 5895, 5895, 5895, - 5895, 5895, 5895, 5895, 5895, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 308, - 308, 308, 308, 308, 308, 308, 308, 5896, 5896, 5896, - - 5896, 5896, 5896, 5896, 5896, 5886, 5886, 5886, 5886, 5886, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5887, 5887, 5887, 5887, 5887, 5887, - 5887, 5887, 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5889, 5889, 5889, 5889, 5889, 5889, 5889, 5889, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5890, 5891, 5891, 5891, 5891, 5891, 5891, 5891, - 5891, 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5890, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5894, 5894, 5894, - 5894, 5894, 5894, 5894, 5894, 5894, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5895, - 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - - 5896, 308, 308, 308, 308, 308, 308, 308, 308, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5886, 5886, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, - 5888, 5888, 5888, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, 5889, 5889, - - 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5890, 5891, 5891, 5891, 5891, 5891, 5891, - 5891, 5891, 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5890, - 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5894, 5894, - 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5895, 5895, 5895, 5895, 5895, - 5895, 5895, 5895, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 308, 308, 308, 308, - - 308, 308, 308, 308, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5888, 5887, - 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5889, 5889, 5889, 5889, 5889, 5889, 5889, 5889, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5890, - 5891, 5891, 5891, 5891, 5891, 5891, 5891, 5891, 5890, 5890, - 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5894, 5894, 5894, 5894, 5894, 5894, - - 5894, 5894, 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5895, 5895, 5895, 5895, 5895, 5895, 5895, - 5895, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 308, 308, 308, 308, 308, 308, 308, 308, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5881, 5881, - - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5887, 5888, 5888, 5888, 5888, 5888, 5888, 5888, - 5888, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5889, 5889, 5889, 5889, 5889, - 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5890, 5891, 5891, 5891, 5891, 5891, - 5891, 5891, 5891, 5890, 5890, 5890, 5890, 5890, 5890, 5890, - 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5894, 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5895, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 308, 308, 308, - 308, 308, 308, 308, 308, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5887, 5888, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5887, 5887, 5887, 5887, 5887, 5887, - 5887, 5887, 5887, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, 5889, - 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5890, 5891, 5891, 5891, - 5891, 5891, 5891, 5891, 5891, 5890, 5890, 5890, 5890, 5890, - 5890, 5890, 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5894, 5894, - 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5895, 5895, 5895, 5895, - 5895, 5895, 5895, 5895, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 308, 308, - 308, 308, 308, 308, 308, 308, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5887, 5888, 5888, 5888, - - 5888, 5888, 5888, 5888, 5888, 5887, 5887, 5887, 5887, 5887, - 5887, 5887, 5887, 5887, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, - 5889, 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5890, 5891, 5891, - 5891, 5891, 5891, 5891, 5891, 5891, 5890, 5890, 5890, 5890, - - 5890, 5890, 5890, 5890, 5890, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5894, - 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5895, 5895, 5895, 5895, 5895, 5895, 5895, - 5895, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 308, 308, 308, 308, 308, - 308, 308, 308, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5896, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5888, 5888, 5888, - 5888, 5888, 5888, 5888, 5888, 5887, 5887, 5887, 5887, 5887, - 5887, 5887, 5887, 5887, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, - - 5889, 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5891, 5891, 5891, - 5891, 5891, 5891, 5891, 5891, 5890, 5890, 5890, 5890, 5890, - 5890, 5890, 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5894, 5894, - 5894, 5894, 5894, 5894, 5894, 5894, 5894, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5896, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 308, 308, 308, 308, - 308, 308, 308, 308, 5896, 5896, 5896, 5896, 5896, 5896, - - 5896, 5896, 5896, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5888, 5888, 5888, 5888, 5888, - 5888, 5888, 5887, 5887, 5887, 5887, 5887, 5887, 5887, 5887, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5889, 5889, 5889, 5889, - 5889, 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5891, 5891, 5891, 5891, 5891, 5891, 5891, - 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5890, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5895, 5895, 5895, 5895, 5895, 5895, 5895, 5896, - 5896, 5896, 5896, 5896, 5896, 5896, 308, 308, 308, 308, - 308, 308, 308, 5896, 5896, 5896, 5896, 5896, 5896, 5896, - 5896, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5886, - 5886, 5886, 5886, 5886, 5886, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5888, 5888, 5888, 5888, 5888, 5888, 5887, 5887, - 5887, 5887, 5887, 5887, 5887, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5889, 5889, 5889, 5889, 5889, 5889, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5891, - 5891, 5891, 5891, 5891, 5891, 5890, 5890, 5890, 5890, 5890, - 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5894, 5894, 5894, 5894, 5894, 5894, 5894, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5895, 5895, 5895, 5895, 5895, 5895, 5896, 5896, 5896, 5896, - 5896, 5896, 5896, 5896, 308, 308, 308, 308, 308, 308, - 5896, 5896, 5896, 5896, 5896, 5896, 5896, 5881, 5881, 5881, - 5886, 5886, 5881, 5881, 5881, 5881, 5881, 5881, 5888, 5888, - - 5887, 5887, 5887, 5887, 5887, 5887, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5889, 5889, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5891, 5891, 5890, 5890, 5890, - 5890, 5890, 5890, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5894, 5894, 5894, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5895, 5895, 5896, 5896, 5896, 308, 308, - 5896, 5896, 5896, 5896, 5896, 5896, 5881, 5881, 5881, 5887, - 5887, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5890, 5890, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5896, 5896, 5896, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, 5886, - 0, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881 + 6277, 41, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 6277, 55, 6277, 57, 6281, 6281, + 2, 2, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6282, 6282, 6282, 6282, 6282, 6282, + 6277, 6277, 6277, 6277, 6283, 6277, 6277, 6277, 69, 6283, + 6283, 6283, 6277, 6277, 6277, 6284, 6284, 6284, 6284, 6284, + + 6284, 6283, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6284, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6277, 6277, 69, 6277, 6277, + 6285, 6285, 6285, 6285, 6285, 6285, 6285, 6285, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6286, 6286, 6286, 6286, 6287, + 6287, 6287, 6287, 6287, 6287, 6286, 6277, 6277, 6277, 6277, + 6277, 69, 6277, 6277, 6277, 6277, 6277, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6282, 6277, + 6277, 6288, 6277, 6289, 6277, 6277, 69, 6277, 6277, 6277, + + 6277, 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, 69, 6277, + 6277, 6277, 6277, 6277, 6290, 6290, 6290, 6290, 6290, 6290, + 6290, 6290, 6290, 6290, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6277, 6277, 69, 6277, 6277, + 6277, 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6291, + + 6277, 6277, 69, 6277, 6277, 6292, 6292, 6292, 6292, 6292, + 6292, 6292, 6292, 6292, 6293, 6293, 6277, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6294, 6294, 328, 328, + 328, 328, 6293, 6277, 6277, 6282, 6282, 6282, 6282, 6282, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6283, + 6283, 6283, 6283, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6283, 6283, 6283, 6283, + + 6283, 6283, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6284, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6285, 6285, 6285, + 6285, 6285, 6285, 6285, 6285, 6285, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6286, 6286, + 6286, 6286, 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6286, + 6286, 6286, 6286, 6286, 6286, 6282, 6282, 6282, 6282, 6282, + 6282, 6277, 6277, 6277, 6277, 6277, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, + 6277, 6277, 6277, 6290, 6290, 6290, 6290, 6290, 6290, 6290, + 6290, 6290, 6290, 6290, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6291, 6291, + 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6277, 6277, + 6277, 6277, 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6292, + 6292, 6292, 6293, 6277, 6293, 6293, 6293, 6277, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 328, 328, 328, 328, 328, 328, 328, 6293, 6293, + 6293, 6293, 6293, 6293, 6277, 6282, 6282, 6282, 6282, 6282, + 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6282, 6282, 6282, 6282, 6282, + 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6283, 6283, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6284, 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6277, 6277, 6285, 6285, 6285, 6285, 6285, 6285, + + 6285, 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6286, 6286, 6287, 6287, 6287, 6287, + 6287, 6287, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6282, + + 6282, 6282, 6282, 6277, 6277, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, 6290, + 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, + 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6277, 6277, + + 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 328, 328, 328, 328, 328, 328, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6277, 6282, 6282, 6282, + 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6283, 6284, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6285, + 6285, 6285, 6277, 6285, 6285, 6285, 6285, 6285, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6286, + 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6286, 6286, 6286, + 6286, 6286, 6286, 6286, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6290, 6290, 6290, 6290, 6290, + 6290, 6290, 6290, 6290, 6290, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, + 6291, 6291, 6291, 6291, 6291, 6292, 6292, 6292, 6292, 6292, + 6292, 6292, 6292, 6292, 6292, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 328, 328, 328, 328, 328, 328, 328, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6282, 6282, 6282, + 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6283, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6285, 6285, + 6285, 6285, 6285, 6285, 6285, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6286, 6287, 6287, 6287, 6287, 6287, + 6287, 6287, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6292, 6292, + 6292, 6292, 6292, 6292, 6292, 6292, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 328, 328, 328, 328, 328, + 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6282, 6282, 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6283, 6284, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, 6285, 6285, + 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6286, 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6286, + 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, + 6290, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6291, + 6291, 6291, 6291, 6291, 6291, 6291, 6291, 6292, 6292, 6292, + 6292, 6292, 6292, 6292, 6292, 6292, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 328, 328, 328, 328, 328, 328, 328, 328, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6282, 6282, 6282, 6282, + 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6283, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6283, 6283, 6283, 6283, 6283, + 6283, 6283, 6283, 6283, 6284, 6284, 6284, 6284, 6284, 6284, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, + 6285, 6285, 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6286, 6287, 6287, 6287, 6287, + 6287, 6287, 6287, 6287, 6286, 6286, 6286, 6286, 6286, 6286, + 6286, 6286, 6286, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6290, 6290, 6290, + 6290, 6290, 6290, 6290, 6290, 6290, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, 6291, + 6291, 6291, 6291, 6292, 6292, 6292, 6292, 6292, 6292, 6292, + 6292, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 328, 328, 328, 328, 328, + 328, 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6277, 6283, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6283, 6283, 6283, + 6283, 6283, 6283, 6283, 6283, 6283, 6284, 6284, 6284, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, 6285, + 6285, 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6286, 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6287, + 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6290, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, 6291, + 6291, 6291, 6291, 6292, 6292, 6292, 6292, 6292, 6292, 6292, + 6292, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 328, 328, 328, 328, + 328, 328, 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6283, 6284, 6284, 6284, 6284, 6284, 6284, 6284, + 6284, 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6283, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, + 6285, 6285, 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6286, 6287, 6287, 6287, 6287, 6287, 6287, + 6287, 6287, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, + 6286, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6290, 6290, 6290, 6290, 6290, 6290, 6290, + 6290, 6290, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, + 6291, 6291, 6291, 6291, 6292, 6292, 6292, 6292, 6292, 6292, + 6292, 6292, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 328, 328, 328, 328, 328, 328, + 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6283, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6283, 6283, 6283, + 6283, 6283, 6283, 6283, 6283, 6283, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, 6285, 6285, + 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6286, 6287, 6287, 6287, 6287, 6287, 6287, 6287, + 6287, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6290, 6290, 6290, 6290, + 6290, 6290, 6290, 6290, 6290, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6291, 6291, + 6291, 6291, 6291, 6291, 6291, 6291, 6292, 6292, 6292, 6292, + 6292, 6292, 6292, 6292, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 328, 328, 328, 328, 328, 328, + 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + + 6293, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6283, 6284, 6284, 6284, 6284, + 6284, 6284, 6284, 6284, 6283, 6283, 6283, 6283, 6283, 6283, + 6283, 6283, 6283, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6285, + 6285, 6285, 6285, 6285, 6285, 6285, 6285, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6286, 6287, + 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6286, 6286, 6286, + 6286, 6286, 6286, 6286, 6286, 6286, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6290, 6290, 6290, 6290, 6290, + + 6290, 6290, 6290, 6290, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, + 6291, 6291, 6291, 6291, 6292, 6292, 6292, 6292, 6292, 6292, + 6292, 6292, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 328, + 328, 328, 328, 328, 328, 328, 328, 6293, 6293, 6293, + + 6293, 6293, 6293, 6293, 6293, 6293, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6283, 6284, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6283, 6283, 6283, + 6283, 6283, 6283, 6283, 6283, 6283, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6285, 6285, 6285, 6285, 6285, 6285, 6285, 6285, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6286, 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6287, + 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6290, 6290, + + 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, + 6291, 6291, 6291, 6291, 6292, 6292, 6292, 6292, 6292, 6292, + 6292, 6292, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 328, 328, 328, + 328, 328, 328, 328, 328, 6293, 6293, 6293, 6293, 6293, + + 6293, 6293, 6293, 6293, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6284, 6283, 6283, + 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, 6285, 6285, + 6285, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6287, 6287, 6287, 6287, 6287, 6287, 6287, 6287, + 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6286, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6290, 6290, + 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6291, 6291, 6291, 6291, 6291, 6291, 6291, + 6291, 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 6293, 328, 328, + 328, 328, 328, 328, 328, 328, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 6293, 6293, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6284, 6284, + 6284, 6284, 6284, 6284, 6284, 6283, 6283, 6283, 6283, 6283, + 6283, 6283, 6283, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6285, 6285, 6285, 6285, 6285, 6285, 6285, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6287, 6287, + + 6287, 6287, 6287, 6287, 6287, 6286, 6286, 6286, 6286, 6286, + 6286, 6286, 6286, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6290, 6290, 6290, 6290, 6290, 6290, 6290, + 6290, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6291, 6291, 6291, 6291, 6291, + 6291, 6291, 6292, 6292, 6292, 6292, 6292, 6292, 6292, 6293, + 6293, 6293, 6293, 6293, 6293, 6293, 6293, 328, 328, 328, + 328, 328, 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6282, 6282, 6282, 6282, 6282, 6282, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6284, 6284, 6284, 6284, 6284, 6284, + 6283, 6283, 6283, 6283, 6283, 6283, 6283, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6285, 6285, 6285, 6285, 6285, 6285, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6287, 6287, 6287, 6287, 6287, 6287, 6286, + 6286, 6286, 6286, 6286, 6286, 6286, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6290, 6290, 6290, 6290, 6290, 6290, 6290, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6291, 6291, 6291, 6291, 6291, 6291, 6292, 6292, + 6292, 6292, 6292, 6292, 6293, 6293, 6293, 6293, 6293, 6293, + 6293, 6293, 6293, 328, 328, 328, 328, 328, 328, 6293, + + 6293, 6293, 6293, 6293, 6293, 6293, 6277, 6277, 6277, 6277, + 6282, 6282, 6277, 6277, 6277, 6277, 6277, 6277, 6284, 6284, + 6283, 6283, 6283, 6283, 6283, 6283, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6285, 6285, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6287, 6287, 6286, + + 6286, 6286, 6286, 6286, 6286, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6290, 6290, 6290, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6291, 6291, 6292, 6292, 6293, 6293, 6293, + + 6293, 328, 328, 6293, 6293, 6293, 6293, 6293, 6293, 6277, + 6277, 6277, 6283, 6283, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6286, + 6286, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6293, 6293, 6293, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, 6282, + 6282, 6282, 6282, 6282, 6282, 6282, 0, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277 } ; -static yyconst flex_int16_t yy_nxt[9090] = +static yyconst flex_int16_t yy_nxt[9629] = { 0, - 62, 63, 63, 62, 64, 62, 65, 66, 62, 67, - 62, 62, 68, 68, 68, 68, 69, 68, 68, 68, - 70, 71, 72, 353, 5881, 74, 353, 362, 5881, 353, - 756, 75, 362, 362, 362, 757, 5881, 354, 76, 362, - 354, 77, 78, 354, 362, 362, 362, 79, 111, 404, - 112, 416, 113, 118, 119, 111, 121, 112, 114, 113, - 115, 116, 626, 117, 405, 114, 627, 115, 116, 417, - 117, 120, 367, 122, 62, 62, 63, 63, 62, 64, - 62, 65, 66, 62, 67, 62, 62, 68, 68, 68, - 68, 69, 68, 68, 68, 70, 71, 72, 121, 395, - - 74, 118, 119, 406, 628, 418, 75, 396, 629, 407, - 212, 419, 213, 76, 148, 122, 77, 78, 207, 120, - 148, 149, 79, 207, 150, 151, 152, 149, 214, 208, - 150, 151, 152, 209, 208, 210, 402, 211, 209, 1469, - 210, 435, 211, 527, 436, 444, 445, 403, 528, 62, - 80, 81, 82, 80, 83, 80, 84, 85, 86, 87, - 88, 88, 89, 89, 89, 89, 90, 89, 89, 89, - 91, 92, 93, 94, 94, 95, 94, 94, 94, 94, - 94, 96, 94, 94, 94, 94, 94, 94, 97, 94, - 94, 98, 99, 94, 94, 94, 94, 100, 101, 94, - - 94, 102, 103, 94, 104, 94, 105, 94, 94, 94, - 106, 107, 94, 108, 94, 94, 109, 110, 94, 94, - 94, 94, 94, 94, 80, 62, 63, 123, 62, 64, - 62, 65, 124, 62, 125, 62, 62, 126, 126, 126, - 126, 127, 126, 126, 126, 70, 71, 72, 128, 128, - 129, 128, 128, 128, 128, 128, 130, 128, 128, 128, - 128, 131, 128, 132, 128, 128, 133, 134, 128, 128, - 128, 128, 79, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 131, 128, 128, 128, - 128, 135, 128, 128, 128, 128, 128, 128, 128, 62, - - 136, 137, 138, 410, 139, 140, 420, 141, 275, 684, - 275, 142, 143, 411, 408, 144, 145, 146, 147, 136, - 137, 138, 421, 139, 140, 276, 141, 276, 409, 519, - 142, 143, 520, 1146, 144, 145, 146, 147, 62, 63, - 63, 62, 153, 62, 65, 66, 62, 67, 154, 154, - 155, 155, 155, 155, 156, 155, 155, 155, 70, 71, - 72, 277, 429, 158, 212, 224, 213, 277, 278, 159, - 1470, 225, 226, 227, 278, 279, 160, 228, 432, 161, - 162, 279, 214, 215, 216, 163, 504, 429, 217, 562, - 218, 229, 215, 216, 230, 219, 220, 217, 221, 218, - - 222, 223, 231, 432, 219, 220, 563, 221, 232, 222, - 223, 504, 62, 62, 63, 63, 62, 153, 62, 65, - 66, 62, 67, 154, 154, 155, 155, 155, 155, 156, - 155, 155, 155, 70, 71, 72, 446, 449, 158, 229, - 224, 521, 230, 447, 159, 1471, 225, 226, 227, 450, - 231, 160, 228, 522, 161, 162, 232, 251, 252, 253, - 163, 254, 437, 255, 465, 397, 262, 256, 398, 257, - 258, 399, 263, 400, 259, 260, 467, 261, 264, 654, - 438, 265, 466, 485, 655, 486, 468, 62, 164, 165, - 63, 164, 166, 164, 167, 168, 164, 169, 164, 164, - - 170, 170, 170, 170, 171, 170, 170, 170, 172, 173, - 174, 175, 175, 176, 175, 175, 177, 175, 175, 178, - 175, 175, 175, 175, 179, 180, 181, 175, 175, 182, - 183, 175, 175, 175, 184, 185, 175, 175, 175, 175, - 175, 177, 175, 175, 175, 175, 175, 175, 175, 179, - 180, 175, 175, 175, 175, 186, 175, 175, 175, 175, - 184, 175, 164, 187, 188, 63, 189, 190, 191, 192, - 193, 187, 194, 187, 187, 195, 195, 195, 195, 196, - 195, 195, 195, 197, 198, 199, 362, 505, 201, 517, - 550, 362, 362, 362, 202, 1472, 251, 252, 253, 509, - - 254, 203, 255, 551, 204, 205, 256, 518, 257, 258, - 206, 262, 505, 259, 260, 266, 261, 263, 267, 268, - 269, 270, 469, 264, 509, 558, 265, 271, 272, 273, - 470, 821, 274, 471, 389, 822, 559, 187, 187, 188, - 63, 189, 190, 191, 192, 193, 187, 194, 187, 187, - 195, 195, 195, 195, 196, 195, 195, 195, 197, 198, - 199, 266, 510, 201, 267, 268, 269, 270, 431, 202, - 432, 597, 598, 271, 272, 273, 203, 552, 274, 204, - 205, 511, 433, 511, 553, 206, 322, 322, 322, 322, - 322, 322, 322, 322, 346, 432, 347, 347, 347, 347, - - 347, 347, 347, 347, 322, 322, 322, 322, 322, 322, - 322, 322, 187, 62, 63, 233, 62, 64, 62, 65, - 234, 62, 235, 62, 62, 236, 237, 238, 239, 240, - 239, 239, 239, 70, 71, 72, 241, 241, 242, 241, - 241, 241, 241, 241, 243, 241, 241, 241, 241, 241, - 241, 244, 241, 241, 245, 246, 241, 241, 241, 241, - 79, 241, 241, 241, 241, 241, 241, 241, 247, 241, - 241, 241, 248, 249, 241, 241, 241, 241, 250, 241, - 241, 241, 241, 241, 241, 241, 241, 62, 62, 63, - 281, 62, 64, 62, 65, 282, 62, 283, 62, 62, - - 284, 284, 284, 284, 285, 284, 284, 284, 70, 71, - 72, 286, 286, 287, 286, 286, 286, 286, 286, 288, - 286, 286, 286, 286, 286, 286, 289, 286, 286, 290, - 291, 286, 286, 286, 286, 79, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 292, - 286, 286, 286, 286, 293, 294, 286, 286, 286, 286, - 286, 286, 62, 295, 296, 297, 295, 298, 295, 299, - 300, 295, 301, 295, 295, 302, 302, 302, 302, 303, - 302, 302, 302, 304, 305, 306, 362, 475, 308, 531, - 362, 362, 362, 362, 309, 362, 362, 362, 532, 891, - - 476, 310, 477, 478, 311, 312, 508, 370, 892, 346, - 313, 347, 347, 347, 347, 347, 348, 347, 347, 363, - 479, 364, 364, 364, 364, 364, 364, 364, 364, 659, - 371, 508, 372, 480, 660, 481, 385, 295, 295, 296, - 297, 295, 298, 295, 299, 300, 295, 301, 295, 295, - 302, 302, 302, 302, 303, 302, 302, 302, 304, 305, - 306, 560, 314, 308, 588, 362, 356, 314, 515, 309, - 362, 362, 362, 1475, 561, 357, 310, 315, 589, 311, - 312, 358, 315, 564, 516, 313, 412, 413, 359, 525, - 565, 360, 361, 363, 569, 364, 364, 364, 364, 364, - - 365, 364, 364, 414, 415, 355, 472, 526, 473, 316, - 529, 570, 295, 386, 316, 533, 595, 317, 508, 596, - 1476, 482, 317, 474, 318, 530, 387, 319, 320, 318, - 534, 362, 319, 320, 323, 323, 362, 362, 362, 483, - 484, 739, 324, 508, 740, 322, 322, 322, 322, 322, - 322, 322, 322, 523, 613, 524, 325, 538, 326, 327, - 328, 329, 330, 331, 368, 614, 577, 332, 333, 334, - 335, 336, 362, 578, 337, 539, 1477, 362, 362, 362, - 362, 546, 338, 339, 379, 362, 362, 362, 340, 369, - 341, 373, 342, 380, 343, 547, 344, 605, 548, 381, - - 899, 549, 345, 377, 606, 374, 382, 362, 684, 383, - 384, 599, 362, 362, 362, 362, 375, 600, 362, 900, - 362, 362, 362, 362, 362, 362, 362, 439, 378, 611, - 376, 362, 362, 362, 362, 612, 637, 362, 1478, 362, - 362, 362, 362, 362, 362, 362, 631, 632, 638, 1157, - 362, 362, 362, 422, 422, 422, 422, 422, 422, 422, - 422, 440, 391, 458, 639, 640, 459, 460, 643, 388, - 441, 442, 667, 390, 461, 443, 462, 668, 393, 463, - 394, 375, 644, 464, 392, 422, 422, 422, 422, 422, - 422, 422, 422, 378, 423, 376, 424, 424, 424, 424, - - 424, 424, 424, 424, 423, 1479, 424, 424, 424, 424, - 424, 425, 424, 424, 451, 452, 641, 642, 601, 652, - 602, 487, 453, 603, 745, 454, 487, 487, 487, 746, - 455, 456, 457, 488, 653, 489, 489, 489, 489, 489, - 489, 489, 489, 488, 656, 489, 489, 489, 489, 489, - 490, 489, 489, 487, 657, 664, 487, 665, 487, 487, - 487, 487, 487, 487, 487, 535, 720, 536, 487, 487, - 487, 487, 487, 487, 487, 487, 714, 487, 487, 487, - 537, 498, 555, 1087, 556, 494, 492, 495, 677, 493, - 499, 737, 566, 1088, 1482, 497, 500, 557, 738, 661, - - 567, 496, 678, 501, 568, 662, 502, 503, 322, 322, - 322, 322, 322, 322, 322, 322, 346, 663, 347, 347, - 347, 347, 347, 347, 347, 347, 346, 684, 347, 347, - 347, 347, 347, 348, 347, 347, 506, 356, 717, 753, - 748, 540, 356, 541, 507, 542, 357, 685, 543, 854, - 714, 357, 358, 544, 545, 1483, 855, 358, 749, 359, - 754, 506, 360, 361, 359, 718, 684, 360, 361, 507, - 322, 322, 322, 322, 322, 322, 322, 322, 346, 719, - 347, 347, 347, 347, 347, 347, 347, 347, 346, 1181, - 347, 347, 347, 347, 347, 348, 347, 347, 571, 731, - - 780, 866, 572, 633, 634, 635, 573, 867, 750, 847, - 636, 751, 574, 732, 781, 575, 576, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 580, 847, 581, 581, 581, 581, 581, - 581, 581, 581, 580, 1348, 582, 581, 581, 581, 581, - 581, 581, 581, 580, 1349, 581, 581, 581, 581, 581, - 581, 581, 581, 580, 850, 581, 581, 581, 581, 581, - 581, 581, 581, 580, 950, 581, 581, 581, 581, 581, - 583, 581, 581, 607, 901, 608, 615, 616, 645, 850, - 902, 609, 646, 617, 647, 620, 648, 621, 618, 950, - - 610, 649, 619, 622, 623, 650, 651, 1484, 624, 625, - 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, - 669, 669, 669, 669, 669, 669, 670, 1485, 671, 671, - 671, 671, 671, 671, 671, 671, 670, 684, 671, 671, - 671, 671, 671, 672, 671, 671, 801, 686, 686, 686, - 686, 686, 686, 686, 686, 687, 688, 988, 881, 885, - 802, 882, 886, 689, 989, 1486, 686, 686, 686, 686, - 686, 686, 686, 686, 883, 887, 758, 690, 741, 691, - 692, 693, 694, 695, 696, 759, 742, 1063, 697, 698, - 699, 700, 701, 743, 760, 702, 951, 984, 947, 1064, - - 362, 933, 985, 703, 704, 362, 362, 362, 952, 705, - 834, 706, 948, 707, 684, 708, 835, 709, 934, 836, - 510, 951, 711, 710, 712, 712, 712, 712, 712, 712, - 712, 712, 684, 952, 1000, 1102, 1103, 1001, 953, 511, - 711, 511, 712, 712, 712, 712, 712, 713, 712, 712, - 683, 683, 684, 683, 683, 683, 683, 683, 683, 683, - 683, 683, 684, 953, 1057, 1113, 1114, 1487, 1058, 1069, - 683, 683, 683, 994, 1014, 346, 721, 347, 347, 347, - 347, 347, 727, 347, 347, 722, 1070, 362, 995, 1015, - 362, 723, 362, 362, 362, 362, 362, 362, 724, 1080, - - 893, 725, 726, 322, 322, 322, 322, 322, 322, 322, - 322, 323, 323, 894, 1118, 1119, 1488, 684, 785, 735, - 684, 1081, 786, 895, 683, 683, 683, 684, 683, 683, - 683, 683, 683, 683, 683, 683, 683, 768, 768, 768, - 768, 768, 768, 768, 768, 683, 683, 683, 346, 1154, - 347, 347, 347, 347, 347, 347, 347, 347, 1020, 338, - 339, 684, 715, 1169, 1489, 340, 1021, 341, 684, 342, - 362, 343, 684, 344, 684, 362, 362, 362, 346, 736, - 347, 347, 347, 347, 769, 347, 347, 347, 783, 783, - 783, 783, 783, 783, 783, 783, 1136, 1149, 363, 683, - - 364, 364, 364, 364, 364, 364, 364, 364, 363, 1490, - 364, 364, 364, 364, 784, 364, 364, 364, 362, 1173, - 714, 1163, 1165, 362, 362, 362, 362, 787, 684, 362, - 684, 362, 362, 362, 362, 362, 362, 362, 788, 684, - 362, 1325, 362, 362, 362, 362, 362, 362, 362, 790, - 1326, 362, 684, 362, 362, 362, 362, 362, 362, 362, - 1139, 1172, 684, 714, 362, 362, 362, 1140, 362, 791, - 792, 362, 789, 362, 362, 362, 362, 362, 362, 362, - 862, 863, 362, 1150, 362, 362, 362, 362, 362, 362, - 362, 864, 684, 865, 1120, 362, 362, 362, 1164, 1166, - - 795, 1151, 362, 1121, 1122, 793, 794, 362, 362, 362, - 1123, 1176, 1167, 362, 714, 1174, 362, 804, 362, 362, - 362, 362, 362, 362, 362, 1345, 806, 362, 714, 362, - 362, 362, 362, 362, 362, 796, 805, 362, 1346, 684, - 487, 684, 362, 362, 362, 487, 487, 487, 684, 807, - 487, 1491, 1168, 808, 1225, 487, 487, 487, 1226, 809, - 422, 422, 422, 422, 422, 422, 422, 422, 684, 1143, - 810, 1141, 714, 813, 1142, 811, 1152, 1144, 1492, 1153, - 1177, 937, 814, 1178, 1145, 812, 843, 843, 843, 843, - 843, 843, 843, 843, 423, 1493, 424, 424, 424, 424, - - 424, 424, 424, 424, 423, 1494, 424, 424, 424, 424, - 844, 424, 424, 424, 908, 1497, 909, 1175, 714, 910, - 911, 912, 917, 1206, 918, 1217, 913, 919, 920, 921, - 684, 1293, 914, 915, 922, 1294, 916, 1498, 1207, 1218, - 923, 924, 935, 935, 935, 935, 935, 935, 935, 935, - 488, 1155, 489, 489, 489, 489, 489, 489, 489, 489, - 488, 1499, 489, 489, 489, 489, 936, 489, 489, 489, - 487, 1500, 1156, 487, 684, 487, 487, 487, 487, 487, - 487, 487, 1332, 684, 487, 1333, 487, 487, 487, 487, - 487, 487, 487, 939, 684, 976, 1003, 487, 487, 487, - - 977, 1004, 938, 1147, 1158, 684, 978, 1005, 1148, 1159, - 979, 1006, 1339, 940, 941, 1340, 980, 1007, 579, 579, - 579, 579, 579, 579, 579, 579, 1501, 1318, 684, 1179, - 1184, 1319, 1502, 942, 1030, 1030, 1030, 1030, 1030, 1030, - 1030, 1030, 580, 1505, 581, 581, 581, 581, 581, 581, - 581, 581, 580, 1506, 581, 581, 581, 581, 581, 581, - 581, 581, 580, 1180, 581, 581, 581, 581, 1031, 581, - 581, 581, 669, 669, 669, 669, 669, 669, 669, 669, - 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 670, 1507, - 671, 671, 671, 671, 671, 671, 671, 671, 670, 684, - - 671, 671, 671, 671, 1126, 671, 671, 671, 684, 686, - 686, 686, 686, 686, 686, 686, 686, 687, 688, 323, - 323, 684, 1392, 1508, 684, 1137, 1305, 735, 1306, 1509, - 1160, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1161, - 1510, 684, 1335, 1511, 1336, 1182, 1512, 1392, 1162, 711, - 1337, 712, 712, 712, 712, 712, 712, 712, 712, 1183, - 1503, 1504, 362, 1398, 1418, 703, 704, 362, 362, 362, - 1399, 705, 1419, 706, 1458, 707, 684, 708, 1459, 709, - 1513, 1309, 1240, 1310, 711, 1138, 712, 712, 712, 712, - 1171, 712, 712, 712, 346, 1311, 347, 347, 347, 347, - - 1185, 347, 347, 347, 768, 768, 768, 768, 768, 768, - 768, 768, 346, 1514, 347, 347, 347, 347, 347, 347, - 347, 347, 783, 783, 783, 783, 783, 783, 783, 783, - 363, 1446, 364, 364, 364, 364, 364, 364, 364, 364, - 362, 1480, 1515, 1447, 1516, 362, 362, 362, 362, 1220, - 1481, 362, 1517, 362, 362, 362, 362, 362, 362, 362, - 1393, 1518, 1519, 362, 362, 362, 362, 1235, 362, 362, - 362, 1236, 362, 1520, 1521, 362, 1522, 362, 362, 362, - 362, 362, 362, 1523, 1473, 1393, 1237, 362, 1322, 1238, - 1239, 1527, 362, 362, 362, 1323, 1528, 1242, 1243, 362, - - 1474, 1324, 1244, 362, 362, 362, 362, 362, 362, 362, - 362, 1241, 362, 362, 362, 362, 1529, 1289, 362, 1530, - 362, 362, 362, 362, 362, 362, 362, 1531, 1532, 362, - 1495, 362, 362, 362, 362, 362, 362, 1245, 362, 1533, - 1534, 1248, 1289, 362, 362, 362, 1496, 1246, 362, 1535, - 1536, 1247, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 1290, 362, 362, 362, 1464, 1537, - 1249, 1538, 1465, 1539, 1540, 1259, 1258, 362, 1466, 1257, - 362, 1541, 362, 362, 362, 362, 362, 362, 1542, 1543, - 1524, 1260, 843, 843, 843, 843, 843, 843, 843, 843, - - 1544, 1525, 1362, 1526, 1363, 1545, 1261, 1364, 1365, 1366, - 1546, 487, 1264, 1548, 1547, 1262, 487, 487, 487, 1263, - 1549, 423, 1265, 424, 424, 424, 424, 424, 424, 424, - 424, 1550, 1266, 935, 935, 935, 935, 935, 935, 935, - 935, 488, 1378, 489, 489, 489, 489, 489, 489, 489, - 489, 1551, 684, 684, 487, 684, 684, 487, 1220, 487, - 487, 487, 487, 487, 487, 487, 684, 684, 487, 684, - 487, 487, 487, 487, 487, 487, 487, 1552, 1377, 687, - 688, 487, 487, 487, 1380, 1554, 684, 1137, 684, 684, - 1381, 1382, 1379, 1558, 684, 1383, 1030, 1030, 1030, 1030, - - 1030, 1030, 1030, 1030, 580, 1553, 581, 581, 581, 581, - 581, 581, 581, 581, 1384, 1125, 1125, 1125, 1125, 1125, - 1125, 1125, 1125, 670, 684, 671, 671, 671, 671, 671, - 671, 671, 671, 1555, 684, 684, 684, 684, 684, 684, - 684, 1220, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 1556, 684, 1581, 684, 714, 684, 714, - 1220, 1564, 714, 684, 1582, 1560, 1584, 1587, 1557, 1561, - 1566, 1583, 1562, 1559, 714, 684, 1570, 714, 1563, 684, - 684, 1565, 684, 684, 1568, 1567, 1569, 1571, 684, 1170, - 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1588, 1585, 1573, - - 684, 1575, 1586, 1574, 1577, 1595, 1594, 1596, 714, 1590, - 1591, 1572, 1597, 1589, 684, 1598, 1592, 1600, 1578, 1599, - 1576, 1579, 711, 1601, 712, 712, 712, 712, 712, 712, - 712, 712, 1593, 346, 1602, 347, 347, 347, 347, 347, - 347, 347, 347, 1603, 1604, 1605, 1606, 1607, 1608, 1609, - 1610, 1611, 1612, 1613, 1614, 1615, 1617, 1618, 1619, 1580, - 1620, 1621, 1622, 1624, 1625, 1627, 1628, 1629, 1630, 1631, - 1220, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1616, - 1640, 1641, 1642, 1623, 1643, 1626, 1644, 1646, 1647, 362, - 1645, 1661, 362, 1662, 362, 362, 362, 362, 362, 362, - - 362, 1663, 1664, 362, 1665, 362, 362, 362, 362, 362, - 362, 362, 1668, 1681, 362, 1682, 362, 362, 362, 362, - 362, 362, 1648, 362, 1683, 1649, 362, 1684, 362, 362, - 362, 362, 362, 362, 362, 1685, 1651, 362, 1686, 362, - 362, 362, 362, 362, 362, 362, 1654, 1687, 362, 1688, - 362, 362, 362, 362, 362, 362, 1656, 1666, 1650, 362, - 1689, 1667, 1690, 1652, 362, 362, 362, 1655, 362, 1691, - 1692, 362, 1653, 362, 362, 362, 362, 362, 362, 1693, - 1694, 362, 1695, 1696, 362, 1657, 362, 362, 362, 362, - 362, 362, 1697, 1698, 362, 1659, 1699, 1700, 1701, 362, - - 362, 362, 1660, 1672, 1673, 1674, 1702, 1703, 362, 1704, - 1705, 362, 1658, 362, 362, 362, 362, 362, 362, 362, - 1706, 1707, 362, 1712, 362, 362, 362, 362, 362, 362, - 362, 1713, 1669, 362, 1708, 362, 362, 362, 362, 362, - 362, 1710, 1714, 1716, 1709, 1717, 1670, 1671, 1718, 1719, - 1715, 1720, 1721, 1722, 1711, 1723, 1724, 1725, 1728, 1726, - 1729, 1730, 1731, 1732, 1675, 1727, 1678, 1733, 1734, 1676, - 1738, 1677, 1739, 1740, 1741, 1735, 1742, 1743, 1744, 1745, - 1746, 1736, 1679, 1747, 1748, 1749, 1750, 1737, 1751, 1752, - 1753, 1680, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, - - 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, - 1772, 487, 1780, 1781, 487, 1782, 487, 487, 487, 487, - 487, 487, 487, 1783, 1784, 487, 1787, 487, 487, 487, - 487, 487, 487, 487, 1788, 1789, 487, 1790, 487, 487, - 487, 487, 487, 487, 1773, 487, 1791, 1774, 1776, 1785, - 487, 487, 487, 1786, 1792, 1775, 1793, 1794, 1778, 1788, - 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, - 1805, 1806, 1807, 1808, 1777, 1809, 1811, 1812, 1813, 1814, - 1815, 1816, 1817, 1810, 1818, 1819, 1820, 1821, 1779, 1822, - 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1833, 1834, - - 1831, 1832, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, - 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, - 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, - 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1872, 1870, 1873, - 1874, 1875, 1876, 1877, 1871, 1878, 1880, 1881, 1882, 1883, - 1885, 1886, 1888, 1889, 1879, 1890, 1891, 1892, 1893, 1895, - 1896, 1898, 1897, 1899, 1900, 1901, 1887, 1902, 1884, 1894, - 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, - 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 684, - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 1943, 684, 684, 684, 684, 684, 1922, 1925, 1924, 1928, - 1929, 684, 1931, 1936, 1932, 1934, 1935, 684, 1933, 1926, - 1941, 1944, 1953, 1954, 1927, 1939, 1930, 1946, 684, 1940, - 1955, 1938, 1956, 714, 1958, 684, 714, 1937, 684, 684, - 684, 1957, 714, 1923, 684, 714, 1959, 684, 1947, 1968, - 1942, 1969, 684, 1970, 1971, 1945, 1952, 1951, 1972, 1973, - 1974, 1949, 1975, 1976, 1977, 1948, 1978, 1979, 1980, 1963, - 1981, 1950, 1961, 1982, 1964, 1983, 1984, 1965, 1962, 1985, - 1960, 1966, 1986, 1987, 1967, 1988, 1989, 1622, 1990, 1625, - - 1992, 1993, 1994, 1991, 1995, 1996, 1997, 1998, 1999, 2001, - 2002, 2003, 2000, 2004, 2005, 2006, 2007, 2008, 1623, 2009, - 1626, 2010, 2011, 2012, 2013, 362, 2028, 2029, 362, 2030, - 362, 362, 362, 362, 362, 362, 362, 2031, 2032, 362, - 2033, 362, 362, 362, 362, 362, 362, 362, 2034, 2035, - 2045, 2046, 362, 362, 362, 362, 2047, 2014, 2048, 2049, - 362, 362, 362, 2050, 2015, 2017, 362, 2051, 2052, 2018, - 362, 362, 362, 362, 2053, 362, 362, 362, 2054, 2055, - 2056, 2020, 2057, 2058, 2059, 2021, 362, 2060, 2063, 2023, - 2064, 362, 362, 362, 362, 2065, 2066, 2016, 2067, 362, - - 362, 362, 2022, 362, 2068, 2019, 362, 2071, 362, 362, - 362, 362, 362, 362, 362, 2072, 2069, 362, 2073, 362, - 362, 362, 362, 362, 362, 362, 2070, 2081, 362, 2024, - 362, 362, 362, 362, 362, 362, 362, 2082, 2083, 362, - 2084, 362, 362, 362, 362, 362, 362, 2026, 2074, 2061, - 2075, 2027, 362, 2062, 2085, 2025, 2077, 362, 362, 362, - 362, 2036, 2076, 362, 2086, 362, 362, 362, 362, 362, - 362, 362, 2087, 2088, 362, 2089, 362, 362, 362, 362, - 362, 362, 362, 2037, 2090, 2091, 362, 362, 362, 362, - 2078, 362, 362, 362, 2092, 2093, 2094, 2095, 2096, 2079, - - 2097, 2098, 2101, 2106, 2080, 2102, 2103, 2099, 2038, 2104, - 2105, 2107, 2108, 2100, 2109, 2110, 2111, 2112, 2113, 2114, - 2115, 2116, 2117, 2118, 2039, 2119, 2120, 2121, 2040, 2041, - 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2043, 2129, 2130, - 2042, 2044, 2131, 2132, 2133, 2134, 2136, 2135, 487, 2145, - 2146, 487, 2147, 487, 487, 487, 487, 487, 487, 487, - 2148, 2149, 487, 2150, 487, 487, 487, 487, 487, 487, - 2151, 487, 2152, 2153, 2154, 2155, 487, 487, 487, 2156, - 2137, 2157, 2158, 2159, 2160, 2139, 487, 2138, 2161, 2140, - 2142, 487, 487, 487, 487, 2162, 2165, 2166, 2141, 487, - - 487, 487, 2163, 2167, 2164, 2168, 2169, 2170, 2171, 2172, - 2173, 2174, 2175, 2176, 2178, 2177, 2179, 2180, 2181, 2182, - 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2143, - 2192, 2144, 2194, 2195, 2193, 2196, 2197, 2198, 2199, 2200, - 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, - 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, - 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, - 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, - 2241, 2242, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2243, - 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2261, - - 2262, 2263, 2260, 2264, 2265, 684, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 1943, 684, 684, 684, 684, - 1946, 684, 684, 684, 2266, 2273, 684, 684, 684, 2271, - 2279, 2268, 2269, 684, 2270, 684, 1944, 2272, 2274, 2281, - 684, 1947, 2295, 2275, 2278, 2276, 2277, 2282, 2290, 714, - 714, 714, 2280, 2291, 2294, 2292, 714, 714, 2289, 2293, - 2267, 714, 714, 684, 684, 2297, 684, 2296, 684, 684, - 684, 2306, 2309, 2287, 2298, 2299, 2283, 2310, 2307, 2311, - 2286, 2284, 2308, 2312, 2313, 2314, 2288, 2315, 2316, 2285, - - 2317, 2302, 2318, 2304, 2319, 2320, 2321, 2322, 2300, 2301, - 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, - 2334, 2303, 2335, 2336, 2337, 2305, 2338, 2339, 2340, 2341, - 2342, 2343, 2344, 2333, 2345, 2346, 2348, 2349, 2350, 2347, - 2351, 2352, 362, 2365, 2366, 362, 2367, 362, 362, 362, - 362, 362, 362, 362, 2370, 2371, 362, 2372, 362, 362, - 362, 362, 362, 362, 362, 2373, 2380, 362, 2381, 362, - 362, 362, 362, 362, 362, 362, 2382, 2383, 2384, 2368, - 362, 362, 362, 2369, 2385, 2353, 2386, 2387, 2354, 362, - 2388, 2355, 2389, 2357, 362, 362, 362, 2358, 362, 2356, - - 2390, 362, 2391, 362, 362, 362, 362, 362, 362, 362, - 2359, 2392, 362, 2393, 362, 362, 362, 362, 362, 362, - 362, 2394, 2395, 2396, 2360, 362, 362, 362, 362, 2397, - 2398, 362, 2399, 362, 362, 362, 362, 362, 362, 2400, - 2401, 2361, 362, 2402, 2362, 2403, 2363, 362, 362, 362, - 362, 2364, 2404, 362, 2405, 362, 362, 362, 362, 362, - 362, 362, 2406, 2407, 362, 2408, 362, 362, 362, 362, - 362, 362, 362, 2409, 2410, 362, 2411, 362, 362, 362, - 362, 362, 362, 362, 2412, 2413, 2414, 2415, 362, 362, - 362, 2416, 2417, 2418, 2374, 2419, 2420, 2421, 2422, 2423, - - 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, - 2434, 2375, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, - 2443, 2444, 2445, 2376, 2446, 2447, 2448, 2377, 2449, 2450, - 2451, 2452, 2453, 487, 2462, 2378, 2463, 2464, 487, 487, - 487, 487, 2467, 2379, 487, 2468, 487, 487, 487, 487, - 487, 487, 487, 2469, 2470, 487, 2471, 487, 487, 487, - 487, 487, 487, 487, 2472, 2473, 487, 2474, 487, 487, - 487, 487, 487, 487, 2465, 2475, 2454, 2476, 2466, 2456, - 2477, 2478, 2479, 2480, 2455, 487, 2481, 2457, 2482, 2483, - 487, 487, 487, 2484, 2485, 2486, 2487, 2488, 2458, 2489, - - 2490, 2491, 2492, 2460, 2493, 2494, 2459, 2495, 2461, 2496, - 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, - 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, - 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, - 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, - 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, - 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, - 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, - 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, - 2577, 684, 684, 684, 684, 684, 684, 684, 684, 684, - - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 714, 2580, 2604, 684, 714, - 2585, 2586, 714, 2582, 2581, 2578, 714, 2588, 2589, 2602, - 2608, 714, 2603, 2605, 714, 2583, 2592, 2590, 2584, 714, - 2593, 2587, 2609, 2610, 2606, 2591, 2579, 684, 684, 2607, - 684, 684, 714, 684, 2601, 684, 2596, 684, 2619, 2620, - 2621, 2622, 2623, 2599, 2624, 2625, 2626, 2627, 2628, 2598, - 2629, 2630, 2597, 2631, 2616, 2595, 2632, 2600, 2594, 2613, - 2633, 2611, 2634, 2614, 2635, 2636, 2612, 2637, 2615, 2638, - 2639, 2640, 2641, 2643, 2644, 2645, 2618, 2646, 2647, 2648, - - 2617, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, - 2658, 2659, 2660, 2642, 2661, 362, 2672, 2673, 362, 2674, - 362, 362, 362, 362, 362, 362, 362, 2675, 2676, 362, - 2677, 362, 362, 362, 362, 362, 362, 2678, 362, 2679, - 2680, 362, 2684, 362, 362, 362, 362, 362, 362, 2685, - 2686, 362, 2662, 2687, 362, 2663, 362, 362, 362, 362, - 362, 362, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2664, - 2695, 2696, 2665, 2666, 362, 2697, 2667, 362, 2698, 362, - 362, 362, 362, 362, 362, 362, 2699, 2700, 362, 2701, - 362, 362, 362, 362, 362, 362, 362, 2702, 2703, 362, - - 2704, 362, 362, 362, 362, 362, 362, 2705, 2670, 2706, - 362, 2668, 2707, 362, 2669, 362, 362, 362, 362, 362, - 362, 2708, 362, 2709, 2710, 362, 2671, 362, 362, 362, - 362, 362, 362, 2711, 2712, 2713, 2714, 2715, 2716, 2717, - 2719, 2718, 2720, 2721, 2681, 2722, 2723, 2724, 2725, 2726, - 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, - 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2748, - 2682, 2749, 2750, 2683, 2751, 2752, 2753, 2754, 2763, 487, - 2764, 2746, 487, 2747, 487, 487, 487, 487, 487, 487, - 487, 2765, 2766, 487, 2767, 487, 487, 487, 487, 487, - - 487, 487, 2768, 2769, 487, 2770, 487, 487, 487, 487, - 487, 487, 2771, 2772, 2773, 2774, 2755, 487, 2775, 2756, - 487, 2776, 487, 487, 487, 487, 487, 487, 2777, 2778, - 2779, 2780, 2781, 2757, 2782, 2783, 2758, 2784, 2759, 2785, - 2761, 2760, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, - 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801, 2762, 2802, - 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, - 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, - 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, - 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, - - 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, - 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, - 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, - 2873, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 2874, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 684, 2894, 684, 2887, 684, 714, 714, - 2882, 684, 2897, 2883, 2904, 2876, 714, 714, 2877, 2885, - 2881, 2878, 2879, 2880, 714, 2895, 2899, 2900, 2898, 714, - 2886, 2903, 714, 2901, 684, 2884, 2902, 684, 684, 684, - 684, 714, 2875, 684, 684, 2889, 684, 2896, 2914, 2915, - - 2916, 2905, 2917, 2918, 2919, 2920, 2892, 2890, 2921, 2922, - 2923, 2888, 2891, 2924, 2925, 2926, 2927, 2928, 2893, 2929, - 2930, 2913, 2931, 2932, 2641, 2908, 2909, 2933, 2934, 2906, - 2935, 2936, 2907, 2912, 2937, 2910, 2938, 2939, 2911, 2940, - 2941, 2942, 2943, 2944, 2945, 2642, 2946, 2947, 2948, 2949, - 2950, 2951, 362, 2960, 2961, 362, 2962, 362, 362, 362, - 362, 362, 362, 362, 2963, 2964, 362, 2965, 362, 362, - 362, 362, 362, 362, 362, 2952, 2966, 362, 2953, 362, - 362, 362, 362, 362, 362, 362, 2967, 2968, 362, 2969, - 362, 362, 362, 362, 362, 362, 2970, 2971, 2972, 362, - - 2954, 2973, 2974, 2955, 362, 362, 362, 362, 2956, 2975, - 362, 2957, 362, 362, 362, 362, 362, 362, 362, 2976, - 2977, 362, 2978, 362, 362, 362, 362, 362, 362, 2979, - 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2958, 2987, 2988, - 2989, 2990, 2991, 2992, 2993, 2959, 2994, 2995, 2996, 2997, - 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, - 3008, 3009, 3010, 3011, 3012, 3013, 3015, 3016, 3017, 3018, - 3019, 3014, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, - 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, - 3038, 3039, 3040, 487, 3049, 3050, 487, 3051, 487, 487, + 64, 65, 65, 64, 66, 64, 67, 68, 64, 69, + 64, 64, 70, 70, 70, 70, 71, 70, 70, 70, + 72, 73, 74, 371, 6277, 76, 371, 380, 6277, 371, + 803, 77, 380, 380, 380, 804, 6277, 372, 78, 509, + 372, 79, 80, 372, 509, 509, 509, 81, 113, 422, + 114, 436, 115, 120, 121, 113, 124, 114, 116, 115, + 117, 118, 654, 119, 423, 116, 655, 117, 118, 437, + 119, 122, 123, 125, 64, 64, 65, 65, 64, 66, + 64, 67, 68, 64, 69, 64, 64, 70, 70, 70, + 70, 71, 70, 70, 70, 72, 73, 74, 124, 413, + + 76, 120, 121, 424, 279, 468, 77, 414, 280, 425, + 1506, 281, 469, 78, 151, 125, 79, 80, 282, 122, + 123, 152, 81, 151, 153, 154, 155, 210, 210, 283, + 152, 284, 553, 153, 154, 155, 1507, 420, 211, 211, + 554, 285, 212, 212, 213, 213, 214, 214, 421, 64, + 82, 83, 84, 82, 85, 82, 86, 87, 88, 89, + 90, 90, 91, 91, 91, 91, 92, 91, 91, 91, + 93, 94, 95, 96, 96, 97, 96, 96, 96, 96, + 96, 98, 96, 96, 96, 96, 96, 96, 99, 96, + 96, 100, 101, 96, 96, 96, 96, 102, 103, 96, + + 96, 104, 105, 96, 106, 96, 107, 96, 96, 96, + 108, 109, 96, 110, 96, 96, 111, 112, 96, 96, + 96, 96, 96, 96, 82, 64, 65, 126, 64, 66, + 64, 67, 127, 64, 128, 64, 64, 129, 129, 129, + 129, 130, 129, 129, 129, 72, 73, 74, 131, 131, + 132, 131, 131, 131, 131, 131, 133, 131, 131, 131, + 131, 134, 131, 135, 131, 131, 136, 137, 131, 131, + 131, 131, 81, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 134, 131, 131, 131, + 131, 138, 131, 131, 131, 131, 131, 131, 131, 64, + + 139, 140, 141, 380, 142, 143, 1508, 144, 380, 380, + 380, 145, 146, 471, 459, 147, 148, 149, 150, 139, + 140, 141, 380, 142, 143, 472, 144, 380, 380, 380, + 145, 146, 460, 1509, 147, 148, 149, 150, 64, 65, + 65, 64, 156, 64, 67, 68, 64, 69, 157, 157, + 158, 158, 158, 158, 159, 158, 158, 158, 72, 73, + 74, 408, 215, 161, 216, 215, 734, 216, 403, 162, + 279, 507, 217, 508, 280, 217, 163, 281, 218, 164, + 165, 218, 219, 220, 282, 166, 735, 221, 426, 222, + 233, 219, 220, 234, 223, 224, 221, 225, 222, 226, + + 227, 235, 427, 223, 224, 440, 225, 236, 226, 227, + 1510, 441, 64, 64, 65, 65, 64, 156, 64, 67, + 68, 64, 69, 157, 157, 158, 158, 158, 158, 159, + 158, 158, 158, 72, 73, 74, 451, 283, 161, 284, + 228, 545, 233, 546, 162, 234, 229, 230, 231, 285, + 228, 163, 232, 235, 164, 165, 229, 230, 231, 236, + 166, 451, 232, 255, 256, 257, 442, 258, 428, 259, + 438, 415, 618, 439, 416, 260, 261, 417, 429, 418, + 262, 263, 443, 264, 466, 467, 619, 64, 167, 168, + 65, 167, 169, 167, 170, 171, 167, 172, 167, 167, + + 173, 173, 173, 173, 174, 173, 173, 173, 175, 176, + 177, 178, 178, 179, 178, 178, 180, 178, 178, 181, + 178, 178, 178, 178, 182, 183, 184, 178, 178, 185, + 186, 178, 178, 178, 187, 188, 178, 178, 178, 178, + 178, 180, 178, 178, 178, 178, 178, 178, 178, 182, + 183, 178, 178, 178, 178, 189, 178, 178, 178, 178, + 187, 178, 167, 190, 191, 65, 192, 193, 194, 195, + 196, 190, 197, 190, 190, 198, 198, 198, 198, 199, + 198, 198, 198, 200, 201, 202, 380, 537, 204, 487, + 454, 380, 380, 380, 205, 526, 255, 256, 257, 527, + + 258, 206, 259, 538, 207, 208, 265, 488, 260, 261, + 209, 265, 266, 262, 263, 454, 264, 266, 267, 385, + 526, 268, 457, 267, 527, 458, 268, 342, 342, 342, + 342, 342, 342, 342, 342, 627, 628, 190, 190, 191, + 65, 192, 193, 194, 195, 196, 190, 197, 190, 190, + 198, 198, 198, 198, 199, 198, 198, 198, 200, 201, + 202, 269, 489, 204, 270, 271, 272, 273, 541, 205, + 578, 542, 490, 274, 275, 276, 206, 579, 277, 207, + 208, 1511, 491, 269, 607, 209, 270, 271, 272, 273, + 492, 608, 494, 493, 495, 274, 275, 276, 543, 364, + + 277, 365, 365, 365, 365, 365, 365, 365, 365, 496, + 544, 1512, 190, 64, 65, 237, 64, 66, 64, 67, + 238, 64, 239, 64, 64, 240, 241, 242, 243, 244, + 243, 243, 243, 72, 73, 74, 245, 245, 246, 245, + 245, 245, 245, 245, 247, 245, 245, 245, 245, 245, + 245, 248, 245, 245, 249, 250, 245, 245, 245, 245, + 81, 245, 245, 245, 245, 245, 245, 245, 251, 245, + 245, 245, 252, 253, 245, 245, 245, 245, 254, 245, + 245, 245, 245, 245, 245, 245, 245, 64, 64, 286, + 65, 64, 66, 64, 67, 287, 64, 288, 64, 64, + + 289, 289, 289, 289, 290, 289, 289, 289, 72, 73, + 291, 292, 292, 293, 292, 292, 292, 292, 292, 294, + 292, 292, 292, 292, 292, 292, 295, 292, 292, 296, + 297, 292, 292, 292, 292, 81, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 298, + 292, 292, 292, 292, 299, 292, 292, 292, 300, 292, + 292, 292, 64, 64, 65, 301, 64, 66, 64, 67, + 302, 64, 303, 64, 64, 304, 304, 304, 304, 305, + 304, 304, 304, 72, 73, 74, 306, 306, 307, 306, + 306, 306, 306, 306, 308, 306, 306, 306, 306, 306, + + 306, 309, 306, 306, 310, 311, 306, 306, 306, 306, + 81, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 312, 306, 306, 306, 306, 313, + 314, 306, 306, 306, 306, 306, 306, 64, 315, 316, + 317, 315, 318, 315, 319, 320, 315, 321, 315, 315, + 322, 322, 322, 322, 323, 322, 322, 322, 324, 325, + 326, 547, 557, 328, 430, 431, 548, 625, 555, 329, + 626, 558, 659, 660, 667, 668, 330, 432, 433, 331, + 332, 434, 435, 556, 364, 333, 365, 365, 365, 365, + 365, 366, 365, 365, 342, 342, 342, 342, 342, 342, + + 342, 342, 381, 1513, 382, 382, 382, 382, 382, 382, + 382, 382, 315, 315, 316, 317, 315, 318, 315, 319, + 320, 315, 321, 315, 315, 322, 322, 322, 322, 323, + 322, 322, 322, 324, 325, 326, 1514, 334, 328, 656, + 380, 374, 334, 657, 329, 380, 380, 380, 584, 497, + 375, 330, 335, 531, 331, 332, 376, 335, 530, 585, + 333, 504, 498, 377, 499, 500, 378, 379, 381, 590, + 382, 382, 382, 382, 382, 383, 382, 382, 531, 505, + 506, 501, 539, 530, 336, 576, 591, 315, 404, 336, + 734, 453, 337, 454, 502, 532, 503, 337, 577, 338, + + 540, 405, 339, 340, 338, 455, 380, 339, 340, 343, + 343, 380, 380, 380, 533, 559, 533, 344, 454, 1227, + 342, 342, 342, 342, 342, 342, 342, 342, 373, 641, + 560, 345, 564, 346, 347, 348, 349, 350, 351, 386, + 642, 530, 352, 353, 354, 355, 356, 380, 786, 357, + 565, 787, 380, 380, 380, 380, 599, 358, 665, 1515, + 380, 380, 380, 359, 387, 360, 530, 361, 388, 362, + 666, 363, 380, 600, 391, 397, 380, 380, 380, 380, + 380, 380, 380, 380, 398, 380, 380, 380, 392, 682, + 399, 389, 671, 390, 683, 395, 680, 400, 380, 393, + + 401, 402, 380, 380, 380, 380, 672, 380, 380, 380, + 380, 681, 561, 394, 562, 380, 380, 380, 380, 684, + 396, 669, 670, 380, 380, 380, 380, 563, 407, 685, + 509, 380, 380, 380, 509, 509, 509, 509, 406, 509, + 509, 509, 409, 444, 444, 444, 444, 444, 444, 444, + 444, 516, 461, 629, 411, 639, 412, 519, 713, 630, + 410, 640, 393, 444, 444, 444, 444, 444, 444, 444, + 444, 692, 714, 693, 396, 445, 394, 446, 446, 446, + 446, 446, 446, 446, 446, 445, 462, 446, 446, 446, + 446, 446, 447, 446, 446, 463, 464, 473, 474, 596, + + 465, 581, 768, 582, 572, 475, 480, 597, 476, 481, + 482, 598, 762, 477, 478, 479, 583, 483, 573, 484, + 797, 574, 485, 798, 575, 510, 486, 511, 511, 511, + 511, 511, 511, 511, 511, 510, 1284, 511, 511, 511, + 511, 511, 512, 511, 511, 509, 1054, 1285, 509, 1055, + 509, 509, 509, 509, 509, 509, 509, 520, 661, 662, + 663, 509, 509, 509, 549, 664, 521, 550, 631, 695, + 632, 551, 522, 633, 552, 517, 592, 784, 514, 523, + 593, 515, 524, 525, 785, 727, 594, 595, 696, 518, + 342, 342, 342, 342, 342, 342, 342, 342, 364, 728, + + 365, 365, 365, 365, 365, 365, 365, 365, 364, 1136, + 365, 365, 365, 365, 365, 366, 365, 365, 528, 374, + 941, 703, 795, 566, 374, 567, 529, 568, 375, 942, + 569, 1137, 686, 375, 376, 570, 571, 687, 704, 376, + 796, 377, 916, 528, 378, 379, 377, 766, 917, 378, + 379, 529, 342, 342, 342, 342, 342, 342, 342, 342, + 364, 767, 365, 365, 365, 365, 365, 365, 365, 365, + 364, 765, 365, 365, 365, 365, 365, 366, 365, 365, + 586, 601, 779, 762, 1246, 602, 792, 587, 588, 603, + 867, 793, 897, 589, 868, 604, 780, 762, 605, 606, + + 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, + 609, 609, 609, 609, 609, 609, 610, 897, 611, 611, + 611, 611, 611, 611, 611, 611, 610, 1143, 612, 611, + 611, 611, 611, 611, 611, 611, 610, 1144, 611, 611, + 611, 611, 611, 611, 611, 611, 610, 1516, 611, 611, + 611, 611, 611, 611, 611, 611, 610, 900, 611, 611, + 611, 611, 611, 613, 611, 611, 635, 951, 636, 643, + 644, 673, 800, 952, 637, 674, 645, 675, 648, 676, + 649, 646, 900, 638, 677, 647, 650, 651, 678, 679, + 688, 652, 653, 801, 697, 788, 689, 698, 826, 1038, + + 734, 699, 904, 789, 1039, 1517, 700, 701, 690, 905, + 790, 1518, 827, 702, 705, 705, 705, 705, 705, 705, + 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, + 706, 1519, 707, 707, 707, 707, 707, 707, 707, 707, + 706, 1230, 707, 707, 707, 707, 707, 708, 707, 707, + 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, + 719, 719, 719, 719, 719, 719, 720, 1520, 721, 721, + 721, 721, 721, 721, 721, 721, 720, 734, 721, 721, + 721, 721, 721, 722, 721, 721, 847, 736, 736, 736, + 736, 736, 736, 736, 736, 737, 738, 1042, 931, 935, + + 848, 932, 936, 739, 1043, 1521, 736, 736, 736, 736, + 736, 736, 736, 736, 933, 937, 805, 740, 949, 741, + 742, 743, 744, 745, 746, 806, 1048, 983, 747, 748, + 749, 750, 751, 380, 807, 752, 882, 950, 380, 380, + 380, 1049, 883, 753, 984, 884, 1000, 1001, 734, 754, + 1002, 755, 1070, 756, 997, 757, 759, 758, 760, 760, + 760, 760, 760, 760, 760, 760, 734, 1071, 998, 1158, + 1159, 1000, 1001, 1003, 759, 1002, 760, 760, 760, 760, + 760, 761, 760, 760, 733, 733, 734, 733, 733, 733, + 733, 733, 733, 733, 733, 733, 734, 1248, 1003, 1078, + + 762, 532, 1176, 1177, 733, 733, 733, 1079, 1522, 364, + 769, 365, 365, 365, 365, 365, 775, 365, 365, 770, + 533, 380, 533, 734, 380, 771, 380, 380, 380, 380, + 380, 380, 772, 734, 943, 773, 774, 342, 342, 342, + 342, 342, 342, 342, 342, 343, 343, 944, 1222, 1183, + 1113, 1184, 831, 783, 1114, 1210, 832, 945, 733, 733, + 733, 734, 733, 733, 733, 733, 733, 733, 733, 733, + 733, 814, 814, 814, 814, 814, 814, 814, 814, 733, + 733, 733, 364, 1119, 365, 365, 365, 365, 365, 365, + 365, 365, 1244, 358, 762, 1120, 763, 1245, 762, 359, + + 1523, 360, 734, 361, 734, 362, 364, 363, 365, 365, + 365, 365, 815, 365, 365, 365, 829, 829, 829, 829, + 829, 829, 829, 829, 380, 1253, 1125, 1524, 1219, 380, + 380, 380, 381, 733, 382, 382, 382, 382, 382, 382, + 382, 382, 381, 1126, 382, 382, 382, 382, 830, 382, + 382, 382, 380, 912, 913, 380, 1172, 380, 380, 380, + 380, 380, 380, 380, 914, 1173, 915, 734, 380, 380, + 380, 380, 834, 1168, 1169, 1170, 380, 380, 380, 380, + 1525, 833, 380, 836, 380, 380, 380, 380, 380, 380, + 380, 1247, 762, 380, 734, 380, 380, 380, 380, 380, + + 380, 835, 1378, 837, 1379, 380, 734, 734, 380, 838, + 380, 380, 380, 380, 380, 380, 380, 734, 734, 380, + 762, 380, 380, 380, 380, 380, 380, 1236, 1249, 1225, + 380, 1526, 1226, 734, 841, 380, 380, 380, 1231, 839, + 734, 380, 1527, 1232, 380, 840, 380, 380, 380, 380, + 380, 380, 380, 734, 850, 380, 734, 380, 380, 380, + 380, 380, 380, 852, 380, 1214, 1238, 1239, 1215, 380, + 380, 380, 842, 851, 380, 734, 734, 509, 1240, 380, + 380, 380, 509, 509, 509, 509, 1530, 734, 1212, 853, + 509, 509, 509, 854, 1237, 1213, 1223, 1228, 855, 1241, + + 734, 856, 444, 444, 444, 444, 444, 444, 444, 444, + 859, 857, 1256, 1531, 1224, 1250, 858, 988, 1229, 860, + 893, 893, 893, 893, 893, 893, 893, 893, 445, 734, + 446, 446, 446, 446, 446, 446, 446, 446, 445, 1421, + 446, 446, 446, 446, 894, 446, 446, 446, 958, 1422, + 959, 343, 343, 960, 961, 962, 967, 1277, 968, 783, + 963, 969, 970, 971, 1251, 1296, 964, 965, 972, 1297, + 966, 734, 1278, 1528, 973, 974, 985, 985, 985, 985, + 985, 985, 985, 985, 510, 1529, 511, 511, 511, 511, + 511, 511, 511, 511, 510, 1418, 511, 511, 511, 511, + + 986, 511, 511, 511, 509, 1288, 1252, 509, 1419, 509, + 509, 509, 509, 509, 509, 509, 734, 734, 509, 1289, + 509, 509, 509, 509, 509, 509, 509, 989, 1382, 1030, + 1383, 509, 509, 509, 1031, 987, 1405, 1216, 1057, 1406, + 1032, 1465, 1384, 1058, 1033, 1217, 1220, 990, 991, 1059, + 1034, 1221, 1218, 1060, 1366, 1532, 1391, 380, 1367, 1061, + 1392, 1533, 380, 380, 380, 1534, 1465, 992, 609, 609, + 609, 609, 609, 609, 609, 609, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 610, 1535, 611, 611, 611, 611, + 611, 611, 611, 611, 610, 1308, 611, 611, 611, 611, + + 611, 611, 611, 611, 610, 1536, 611, 611, 611, 611, + 1089, 611, 611, 611, 705, 705, 705, 705, 705, 705, + 705, 705, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, + 706, 1537, 707, 707, 707, 707, 707, 707, 707, 707, + 706, 1538, 707, 707, 707, 707, 1190, 707, 707, 707, + 719, 719, 719, 719, 719, 719, 719, 719, 1199, 1199, + 1199, 1199, 1199, 1199, 1199, 1199, 720, 1539, 721, 721, + 721, 721, 721, 721, 721, 721, 720, 734, 721, 721, + 721, 721, 1200, 721, 721, 721, 734, 736, 736, 736, + 736, 736, 736, 736, 736, 737, 738, 1362, 1412, 734, + + 380, 1413, 734, 1211, 1542, 380, 380, 380, 1233, 1242, + 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1234, 1471, 734, + 1496, 1543, 1362, 1254, 1544, 1472, 1235, 759, 1497, 760, + 760, 760, 760, 760, 760, 760, 760, 1255, 1309, 1545, + 380, 1398, 1549, 753, 1363, 380, 380, 380, 734, 754, + 1399, 755, 1550, 756, 1551, 757, 759, 758, 760, 760, + 760, 760, 1243, 760, 760, 760, 364, 1310, 365, 365, + 365, 365, 1257, 365, 365, 365, 814, 814, 814, 814, + 814, 814, 814, 814, 364, 1552, 365, 365, 365, 365, + 365, 365, 365, 365, 829, 829, 829, 829, 829, 829, + + 829, 829, 381, 1553, 382, 382, 382, 382, 382, 382, + 382, 382, 380, 1554, 1408, 1557, 1409, 380, 380, 380, + 380, 1291, 1410, 380, 1558, 380, 380, 380, 380, 380, + 380, 380, 1559, 1562, 1563, 1564, 380, 380, 380, 1306, + 1311, 380, 1466, 1307, 380, 1560, 380, 380, 380, 380, + 380, 380, 380, 1555, 1561, 380, 1313, 380, 380, 380, + 380, 380, 380, 1565, 1314, 380, 1566, 1466, 1315, 1556, + 380, 380, 380, 380, 1567, 1312, 380, 1568, 380, 380, + 380, 380, 380, 380, 380, 1569, 1570, 1571, 1572, 380, + 380, 380, 380, 1319, 1316, 1573, 380, 380, 380, 380, + + 1317, 380, 380, 380, 1318, 380, 1574, 1577, 380, 1578, + 380, 380, 380, 380, 380, 380, 380, 1579, 1580, 1581, + 380, 380, 380, 380, 380, 380, 380, 380, 1320, 380, + 380, 380, 1540, 1330, 1329, 380, 1541, 1328, 1582, 1585, + 380, 380, 380, 893, 893, 893, 893, 893, 893, 893, + 893, 1575, 1586, 445, 1331, 446, 446, 446, 446, 446, + 446, 446, 446, 1332, 1546, 1395, 1587, 1576, 1547, 1336, + 1588, 1333, 1396, 1589, 1548, 1334, 1335, 1435, 1397, 1436, + 1583, 1584, 1437, 1438, 1439, 1590, 1591, 1337, 1592, 1593, + 1291, 985, 985, 985, 985, 985, 985, 985, 985, 510, + + 1594, 511, 511, 511, 511, 511, 511, 511, 511, 509, + 1595, 1596, 509, 1597, 509, 509, 509, 509, 509, 509, + 509, 1598, 1599, 509, 1600, 509, 509, 509, 509, 509, + 509, 1601, 509, 1602, 1603, 1607, 1450, 509, 509, 509, + 1451, 1608, 1609, 1604, 1610, 1611, 509, 1453, 1454, 1612, + 1452, 509, 509, 509, 1605, 1455, 1606, 1613, 1614, 1456, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 610, 1615, + 611, 611, 611, 611, 611, 611, 611, 611, 1616, 1617, + 1618, 1619, 1620, 1621, 1457, 1622, 1623, 1624, 1625, 1626, + 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1627, 1628, + + 1629, 1630, 1633, 1634, 706, 1291, 707, 707, 707, 707, + 707, 707, 707, 707, 1631, 1635, 1636, 1637, 1632, 1199, + 1199, 1199, 1199, 1199, 1199, 1199, 1199, 720, 1638, 721, + 721, 721, 721, 721, 721, 721, 721, 1639, 1640, 1642, + 1643, 1291, 1641, 1644, 1645, 734, 737, 738, 734, 734, + 734, 734, 734, 734, 1211, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 1291, 734, 734, 734, 734, 734, + 1646, 734, 734, 734, 734, 734, 734, 1647, 734, 1649, + 734, 734, 734, 1657, 734, 1650, 1653, 1674, 1648, 762, + 1654, 1652, 1651, 1655, 1659, 762, 1688, 1677, 1681, 1656, + + 1675, 1676, 1663, 734, 1658, 762, 734, 762, 1661, 1660, + 734, 1662, 1664, 1242, 1242, 1242, 1242, 1242, 1242, 1242, + 1242, 734, 1678, 1689, 734, 1668, 1679, 734, 1666, 1670, + 762, 734, 762, 1690, 1693, 1680, 1694, 1695, 1665, 1667, + 1683, 734, 1696, 1671, 1685, 1672, 1684, 1697, 1669, 759, + 1698, 760, 760, 760, 760, 760, 760, 760, 760, 1699, + 1682, 1700, 1691, 1686, 1687, 364, 1692, 365, 365, 365, + 365, 365, 365, 365, 365, 1701, 1702, 1703, 1704, 1705, + 1706, 1707, 1709, 1710, 1711, 1712, 1673, 1713, 1714, 1715, + 1716, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, + + 1727, 1728, 1291, 1729, 1730, 1708, 1731, 1732, 1733, 1734, + 1735, 1717, 1737, 1738, 1736, 380, 1752, 1753, 380, 1754, + 380, 380, 380, 380, 380, 380, 380, 1755, 1756, 380, + 1759, 380, 380, 380, 380, 380, 380, 380, 1772, 1773, + 380, 1774, 380, 380, 380, 380, 380, 380, 1739, 380, + 1775, 1740, 380, 1776, 380, 380, 380, 380, 380, 380, + 380, 1777, 1742, 380, 1778, 380, 380, 380, 380, 380, + 380, 380, 1745, 1779, 380, 1780, 380, 380, 380, 380, + 380, 380, 1747, 1757, 1741, 380, 1781, 1758, 1782, 1743, + 380, 380, 380, 1746, 380, 1783, 1784, 380, 1744, 380, + + 380, 380, 380, 380, 380, 1785, 1786, 380, 1787, 1788, + 380, 1748, 380, 380, 380, 380, 380, 380, 1789, 1790, + 380, 1750, 1791, 1792, 1793, 380, 380, 380, 1751, 1763, + 1764, 1765, 1794, 1795, 380, 1796, 1797, 380, 1749, 380, + 380, 380, 380, 380, 380, 380, 1798, 1799, 380, 1805, + 380, 380, 380, 380, 380, 380, 380, 1800, 1760, 380, + 1806, 380, 380, 380, 380, 380, 380, 1807, 1803, 1809, + 1801, 1810, 1761, 1762, 1811, 1808, 1812, 1813, 1814, 1815, + 1802, 1804, 1816, 1817, 1818, 1819, 1821, 1822, 1823, 1824, + 1766, 1820, 1769, 1825, 1826, 1767, 1827, 1768, 1831, 1832, + + 1833, 1834, 1835, 1828, 1836, 1837, 1838, 1839, 1770, 1829, + 1840, 1841, 1842, 1843, 1844, 1830, 1845, 1771, 1846, 1847, + 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, + 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 509, 1873, + 1874, 509, 1875, 509, 509, 509, 509, 509, 509, 509, + 1876, 1877, 509, 1880, 509, 509, 509, 509, 509, 509, + 509, 1881, 1882, 509, 1883, 509, 509, 509, 509, 509, + 509, 1866, 509, 1884, 1867, 1869, 1878, 509, 509, 509, + 1879, 1885, 1868, 1886, 1887, 1871, 1881, 1888, 1889, 1890, + 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, + + 1901, 1870, 1902, 1903, 1904, 1906, 1907, 1908, 1909, 1910, + 1911, 1912, 1905, 1913, 1914, 1872, 1915, 1916, 1917, 1918, + 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1930, + 1931, 1928, 1929, 1932, 1933, 1934, 1935, 1936, 1937, 1938, + 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, + 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, + 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1968, 1966, 1969, + 1970, 1971, 1972, 1973, 1967, 1974, 1976, 1977, 1978, 1979, + 1981, 1982, 1984, 1985, 1975, 1986, 1987, 1988, 1989, 1991, + 1992, 1994, 1993, 1995, 1996, 1997, 1983, 1998, 1980, 1990, + + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, + 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 2049, 734, 2032, 2027, 2028, 2029, 734, 2033, + 734, 2035, 2036, 734, 2038, 2039, 2030, 2037, 2040, 2045, + 2056, 2031, 2043, 2050, 2057, 2034, 2044, 2042, 2058, 2059, + 762, 762, 2061, 734, 734, 734, 734, 734, 2060, 762, + 734, 2062, 2041, 762, 734, 2071, 2072, 2046, 2073, 2047, + + 2048, 2074, 2055, 2075, 2076, 2077, 2054, 2078, 2052, 2079, + 2080, 2051, 2081, 2082, 2067, 2066, 2083, 2064, 2084, 2068, + 2085, 2086, 2087, 2069, 2053, 2065, 2088, 2089, 2063, 2090, + 2070, 2091, 2092, 2094, 1716, 2095, 2096, 2093, 2097, 2098, + 2099, 2100, 2101, 2102, 2104, 2105, 2106, 2103, 2107, 2108, + 2109, 2110, 2111, 2112, 2113, 1717, 2114, 2115, 2116, 380, + 2131, 2132, 380, 2133, 380, 380, 380, 380, 380, 380, + 380, 2134, 2135, 380, 2136, 380, 380, 380, 380, 380, + 380, 380, 2137, 2138, 2148, 2149, 380, 380, 380, 380, + 2150, 2117, 2151, 2152, 380, 380, 380, 2153, 2118, 2120, + + 380, 2154, 2155, 2121, 380, 380, 380, 380, 2156, 380, + 380, 380, 2157, 2158, 2159, 2123, 2160, 2161, 2162, 2124, + 380, 2163, 2164, 2126, 2165, 380, 380, 380, 380, 2168, + 2169, 2119, 2170, 380, 380, 380, 2125, 380, 2171, 2122, + 380, 2172, 380, 380, 380, 380, 380, 380, 380, 2173, + 2174, 380, 2176, 380, 380, 380, 380, 380, 380, 380, + 2175, 2177, 380, 2127, 380, 380, 380, 380, 380, 380, + 380, 2178, 2186, 380, 2187, 380, 380, 380, 380, 380, + 380, 2129, 2179, 2166, 2180, 2130, 380, 2167, 2188, 2128, + 2182, 380, 380, 380, 380, 2139, 2181, 380, 2189, 380, + + 380, 380, 380, 380, 380, 380, 2190, 2191, 380, 2192, + 380, 380, 380, 380, 380, 380, 380, 2140, 2193, 2194, + 380, 380, 380, 380, 2183, 380, 380, 380, 2195, 2196, + 2197, 2198, 2199, 2184, 2200, 2201, 2202, 2203, 2185, 2206, + 2207, 2208, 2141, 2204, 2209, 2210, 2211, 2212, 2213, 2205, + 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2142, 2222, + 2223, 2224, 2143, 2144, 2225, 2226, 2227, 2228, 2229, 2230, + 2231, 2146, 2232, 2235, 2145, 2147, 2233, 2236, 2234, 2237, + 2238, 2239, 2241, 2240, 509, 2250, 2251, 509, 2252, 509, + 509, 509, 509, 509, 509, 509, 2253, 2254, 509, 2255, + + 509, 509, 509, 509, 509, 509, 2256, 509, 2257, 2258, + 2259, 2260, 509, 509, 509, 2261, 2242, 2262, 2263, 2267, + 2268, 2244, 509, 2243, 2269, 2245, 2247, 509, 509, 509, + 509, 2264, 2270, 2271, 2246, 509, 509, 509, 2265, 2275, + 2273, 2266, 2274, 2276, 2277, 2278, 2272, 2279, 2280, 2281, + 2282, 2283, 2284, 2285, 2286, 2288, 2287, 2289, 2290, 2291, + 2292, 2293, 2294, 2295, 2296, 2248, 2297, 2249, 2298, 2299, + 2300, 2301, 2302, 2303, 2304, 2306, 2307, 2308, 2305, 2309, + 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, + 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, + + 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, + 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, + 2350, 2351, 2352, 2353, 2355, 2356, 2357, 2358, 2359, 2360, + 2361, 2354, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, + 2370, 2371, 2372, 2374, 2375, 2376, 2373, 2377, 2378, 2379, + 2380, 2382, 2383, 2384, 2381, 2385, 2386, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 2049, 734, 734, 734, 734, 734, 2387, 2393, 2416, 734, + 2391, 2399, 2388, 2389, 734, 2390, 2411, 762, 2392, 2394, + + 2401, 2050, 762, 734, 2395, 2398, 2396, 2397, 2402, 762, + 762, 2413, 2412, 2400, 2410, 2414, 762, 762, 762, 2415, + 2417, 2418, 734, 734, 734, 734, 734, 734, 2427, 2420, + 2408, 2428, 2430, 2403, 2431, 2429, 2432, 2407, 2404, 2405, + 2433, 2434, 2419, 2409, 2435, 2436, 2437, 2438, 2406, 2423, + 2425, 2439, 2440, 2441, 2442, 2443, 2444, 2421, 2422, 2445, + 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2424, 2455, + 2456, 2457, 2426, 2458, 2459, 2460, 2461, 2462, 2463, 2464, + 2465, 2454, 2466, 2467, 2469, 2470, 2471, 2468, 2472, 2473, + 380, 2486, 2487, 380, 2488, 380, 380, 380, 380, 380, + + 380, 380, 2491, 2492, 380, 2493, 380, 380, 380, 380, + 380, 380, 380, 2494, 2501, 380, 2502, 380, 380, 380, + 380, 380, 380, 380, 2503, 2504, 2505, 2489, 380, 380, + 380, 2490, 2506, 2474, 2507, 2508, 2475, 380, 2509, 2476, + 2510, 2478, 380, 380, 380, 2479, 380, 2477, 2511, 380, + 2512, 380, 380, 380, 380, 380, 380, 380, 2480, 2513, + 380, 2514, 380, 380, 380, 380, 380, 380, 380, 2515, + 2516, 2517, 2481, 380, 380, 380, 380, 2518, 2519, 380, + 2520, 380, 380, 380, 380, 380, 380, 2521, 2522, 2482, + 380, 2523, 2483, 2524, 2484, 380, 380, 380, 380, 2485, + + 2525, 380, 2526, 380, 380, 380, 380, 380, 380, 380, + 2527, 2530, 380, 2528, 380, 380, 380, 380, 380, 380, + 380, 2529, 2531, 380, 2532, 380, 380, 380, 380, 380, + 380, 380, 2533, 2534, 2535, 2536, 380, 380, 380, 2537, + 2538, 2539, 2495, 2540, 2541, 2542, 2543, 2544, 2545, 2546, + 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2496, + 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, + 2566, 2497, 2567, 2568, 2569, 2498, 2570, 2571, 2572, 2573, + 2574, 2575, 2576, 2499, 2585, 2586, 2587, 509, 2590, 2591, + 509, 2500, 509, 509, 509, 509, 509, 509, 2592, 509, + + 2593, 2594, 509, 2595, 509, 509, 509, 509, 509, 509, + 509, 2596, 2597, 509, 2598, 509, 509, 509, 509, 509, + 509, 509, 2599, 2600, 2601, 2588, 509, 509, 509, 2589, + 2577, 2602, 2603, 2578, 2579, 2604, 509, 2580, 2605, 2606, + 2607, 509, 509, 509, 2608, 2609, 2610, 2611, 2612, 2613, + 2614, 2615, 2616, 2581, 2617, 2618, 2582, 2619, 2583, 2584, + 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, + 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, + 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, + 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, + + 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, + 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, + 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, + 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, + 2700, 2705, 2706, 2701, 2707, 2708, 2709, 2710, 2711, 2712, + 2713, 2714, 2702, 2703, 2715, 2716, 2717, 2718, 2719, 2704, + 2720, 2721, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 2723, 734, 734, 762, + 2728, 2729, 762, 2725, 2724, 734, 2722, 2731, 2732, 2746, + + 762, 762, 2747, 2748, 2752, 2726, 2735, 2733, 2727, 762, + 2736, 2730, 762, 762, 2749, 2734, 2753, 734, 734, 2750, + 2754, 2755, 734, 2751, 2745, 2739, 762, 2740, 734, 2763, + 734, 2764, 2765, 2761, 2766, 2743, 2767, 2768, 2769, 2770, + 2742, 2771, 2772, 2741, 2773, 2738, 2757, 2774, 2737, 2744, + 2758, 2760, 2775, 2776, 2777, 2756, 2778, 2779, 2780, 2783, + 2759, 2784, 2785, 2781, 2786, 2787, 2789, 2762, 2790, 2791, + 2792, 2793, 2794, 2795, 2796, 2782, 2797, 2798, 2799, 2800, + 2801, 2802, 2803, 2804, 2805, 2806, 2788, 2807, 380, 2818, + 2819, 380, 2820, 380, 380, 380, 380, 380, 380, 380, + + 2821, 2822, 380, 2823, 380, 380, 380, 380, 380, 380, + 2824, 380, 2825, 2826, 380, 2830, 380, 380, 380, 380, + 380, 380, 2831, 2832, 380, 2808, 2833, 380, 2809, 380, + 380, 380, 380, 380, 380, 2834, 2835, 2836, 2837, 2838, + 2839, 2840, 2810, 2841, 2842, 2811, 2812, 380, 2843, 2813, + 380, 2844, 380, 380, 380, 380, 380, 380, 380, 2845, + 2846, 380, 2847, 380, 380, 380, 380, 380, 380, 380, + 2848, 2849, 380, 2850, 380, 380, 380, 380, 380, 380, + 2851, 2816, 2852, 380, 2814, 2853, 380, 2815, 380, 380, + 380, 380, 380, 380, 2854, 380, 2855, 2856, 380, 2817, + + 380, 380, 380, 380, 380, 380, 2857, 2858, 2859, 2860, + 2861, 2862, 2863, 2864, 2865, 2867, 2866, 2827, 2868, 2869, + 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, + 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, + 2890, 2891, 2892, 2828, 2893, 2896, 2829, 2897, 2898, 2899, + 2900, 2901, 2902, 2911, 2912, 509, 2913, 2894, 509, 2895, + 509, 509, 509, 509, 509, 509, 509, 2914, 2915, 509, + 2916, 509, 509, 509, 509, 509, 509, 509, 2917, 2918, + 509, 2919, 509, 509, 509, 509, 509, 509, 2920, 2921, + 2922, 2923, 2903, 509, 2924, 2904, 509, 2925, 509, 509, + + 509, 509, 509, 509, 2926, 2927, 2928, 2929, 2930, 2905, + 2931, 2932, 2906, 2933, 2907, 2934, 2909, 2908, 2935, 2936, + 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, + 2947, 2948, 2949, 2950, 2910, 2951, 2952, 2953, 2954, 2955, + 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, + 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, + 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, + 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, + 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, + 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, - 487, 487, 487, 487, 487, 3052, 3053, 487, 3054, 487, - 487, 487, 487, 487, 487, 487, 3041, 3055, 3056, 3042, - 487, 487, 487, 487, 3057, 3058, 487, 3059, 487, 487, - 487, 487, 487, 487, 3060, 3061, 3062, 3063, 3045, 3064, - 3065, 3043, 487, 3066, 3044, 3067, 3046, 487, 487, 487, - 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, - 3078, 3079, 3080, 3081, 3047, 3082, 3083, 3084, 3085, 3086, - 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, - 3048, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, - 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, - - 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, - 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, - 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, - 3146, 3147, 3148, 3149, 3150, 3154, 3155, 3156, 3157, 3158, - 3159, 3160, 3161, 3151, 3152, 684, 684, 684, 684, 684, - 3153, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 3162, 2894, 684, 684, 684, - 684, 684, 3166, 3182, 3183, 3165, 714, 3168, 3171, 3170, - 3184, 3174, 3173, 714, 714, 3186, 714, 2895, 3187, 3167, - 3185, 3164, 714, 684, 3169, 714, 684, 3188, 714, 3181, - - 684, 3172, 714, 684, 684, 3163, 684, 3189, 684, 684, - 3175, 3190, 3199, 3200, 3201, 3202, 3177, 3178, 3176, 3180, - 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3179, - 3212, 3197, 3191, 3214, 3215, 3192, 3216, 3217, 3218, 3219, - 3220, 3221, 3222, 3195, 3223, 3193, 3213, 3196, 3194, 3198, - 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, - 362, 3242, 3243, 362, 3244, 362, 362, 362, 362, 362, - 362, 362, 3245, 3246, 362, 3247, 362, 362, 362, 362, - 362, 362, 362, 3248, 3249, 362, 3250, 362, 362, 362, - 362, 362, 362, 3251, 3236, 3252, 3253, 3237, 3234, 362, - - 3254, 3235, 362, 3255, 362, 362, 362, 362, 362, 362, - 3256, 3257, 3258, 3259, 3260, 3263, 3264, 3265, 3266, 3267, - 3238, 3268, 3269, 3239, 3270, 3271, 3272, 3273, 3274, 3241, - 3261, 3262, 3275, 3276, 3277, 3280, 3278, 3240, 3279, 3281, - 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, - 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 3300, 3301, - 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, - 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, 3321, - 3322, 3323, 3324, 3325, 487, 3334, 3335, 487, 3336, 487, - 487, 487, 487, 487, 487, 487, 3337, 3338, 487, 3339, - - 487, 487, 487, 487, 487, 487, 487, 3340, 3341, 487, - 3342, 487, 487, 487, 487, 487, 487, 3343, 3328, 3344, - 3345, 3329, 3326, 487, 3346, 3327, 487, 3347, 487, 487, - 487, 487, 487, 487, 3348, 3349, 3350, 3351, 3352, 3353, - 3354, 3358, 3359, 3360, 3330, 3355, 3361, 3331, 3362, 3363, - 3356, 3364, 3365, 3333, 3366, 3357, 3367, 3368, 3369, 3370, - 3374, 3332, 3375, 3376, 3371, 3377, 3378, 3379, 3380, 3372, - 3381, 3382, 3383, 3384, 3373, 3385, 3386, 3387, 3388, 3389, - 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, - 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, - - 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, - 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, - 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, - 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, - 3450, 684, 684, 684, 684, 3451, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 714, 714, 714, 3470, 3471, 3468, 3469, 3472, - 684, 3452, 714, 684, 3459, 714, 714, 3473, 3454, 3458, - 714, 3475, 684, 684, 684, 3474, 684, 714, 684, 3455, - 3456, 3453, 684, 3457, 684, 3467, 3485, 3486, 3477, 3476, - - 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3478, 3481, 3482, - 3461, 3494, 3495, 3464, 3498, 3496, 3460, 3463, 3499, 3500, - 3501, 3502, 3462, 3466, 3503, 3479, 3504, 3480, 3497, 3465, - 3505, 3506, 3483, 3507, 3484, 3508, 3509, 3510, 3511, 3512, - 3513, 3514, 3515, 3516, 362, 3525, 3526, 362, 3527, 362, - 362, 362, 362, 362, 362, 362, 3528, 3529, 362, 3530, - 362, 362, 362, 362, 362, 362, 362, 3531, 3532, 362, - 3533, 362, 362, 362, 362, 362, 362, 3534, 3535, 3536, - 3537, 362, 3517, 3538, 362, 3518, 362, 362, 362, 362, - 362, 362, 3539, 3519, 3540, 3541, 3520, 3542, 3543, 3544, - - 3545, 3546, 3547, 3548, 3521, 3549, 3550, 3522, 3523, 3551, - 3552, 3553, 3554, 3555, 3556, 3557, 3524, 3558, 3559, 3560, - 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, - 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, - 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, + 3016, 3017, 3018, 3019, 3020, 3021, 3023, 3024, 3025, 3026, + 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, + 3037, 3038, 3039, 3040, 3041, 3022, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 3042, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 3054, 3064, 734, 734, 3049, 734, 3050, 762, 762, 3043, + 762, 3067, 3044, 3052, 3048, 3045, 3046, 3047, 3069, 762, + 3070, 762, 3065, 3068, 3053, 3071, 762, 3073, 762, 3051, + 3072, 734, 734, 3074, 734, 734, 734, 762, 734, 3056, + 734, 3057, 3084, 3066, 3076, 3075, 3058, 3085, 3086, 3087, + + 3088, 3062, 3060, 3089, 3090, 3055, 3091, 3061, 3059, 3092, + 3093, 3094, 3095, 3063, 3096, 3083, 3097, 3098, 3099, 3078, + 3100, 3079, 3101, 3102, 3103, 3104, 3077, 3082, 2787, 3105, + 3080, 3081, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, + 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 2788, + 3123, 380, 3132, 3133, 380, 3134, 380, 380, 380, 380, + 380, 380, 380, 3135, 3136, 380, 3137, 380, 380, 380, + 380, 380, 380, 380, 3124, 3138, 380, 3125, 380, 380, + 380, 380, 380, 380, 380, 3139, 3140, 380, 3141, 380, + 380, 380, 380, 380, 380, 3142, 3143, 3144, 380, 3126, + + 3145, 3146, 3127, 380, 380, 380, 380, 3128, 3147, 380, + 3129, 380, 380, 380, 380, 380, 380, 380, 3148, 3149, + 380, 3150, 380, 380, 380, 380, 380, 380, 3151, 3152, + 3153, 3154, 3155, 3156, 3157, 3158, 3130, 3159, 3160, 3161, + 3162, 3163, 3164, 3165, 3131, 3166, 3167, 3168, 3169, 3170, + 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, + 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3189, 3190, 3191, + 3192, 3193, 3188, 3194, 3195, 3196, 3197, 3198, 3199, 3200, + 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, + 3211, 3212, 3213, 3214, 509, 3223, 3224, 509, 3225, 509, + + 509, 509, 509, 509, 509, 509, 3226, 3227, 509, 3228, + 509, 509, 509, 509, 509, 509, 509, 3215, 3229, 3230, + 3216, 509, 509, 509, 509, 3231, 3232, 509, 3233, 509, + 509, 509, 509, 509, 509, 3234, 3235, 3236, 3237, 3219, + 3238, 3239, 3217, 509, 3240, 3218, 3241, 3220, 509, 509, + 509, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, + 3251, 3252, 3253, 3254, 3255, 3221, 3256, 3257, 3258, 3259, + 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, + 3270, 3222, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, + 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, + + 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, + 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, + 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, + 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, + 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, + 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, + 3349, 3350, 3351, 3352, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 3353, 734, 3064, 734, 734, 734, + 3356, 734, 3375, 3355, 3358, 3361, 3360, 762, 3364, 3363, + + 3376, 3377, 762, 3379, 762, 3380, 3357, 3065, 3378, 3354, + 762, 3359, 762, 762, 762, 762, 734, 3381, 3362, 3382, + 3374, 734, 734, 734, 734, 734, 734, 3365, 734, 3367, + 734, 3392, 3393, 3394, 3395, 3366, 3370, 3371, 3373, 3396, + 3368, 3369, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, + 3372, 3405, 3406, 3390, 3407, 3408, 3383, 3410, 3411, 3412, + 3384, 3385, 3413, 3414, 3388, 3389, 3415, 3416, 3386, 3387, + 3391, 3409, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, + 3425, 3426, 3427, 3428, 3429, 380, 3438, 3439, 380, 3440, + 380, 380, 380, 380, 380, 380, 380, 3441, 3442, 380, + + 3443, 380, 380, 380, 380, 380, 380, 380, 3444, 3445, + 380, 3446, 380, 380, 380, 380, 380, 380, 3447, 3432, + 3448, 3449, 3433, 3430, 380, 3450, 3431, 380, 3451, 380, + 380, 380, 380, 380, 380, 3452, 3453, 3454, 3455, 3456, + 3459, 3460, 3461, 3462, 3463, 3434, 3464, 3465, 3435, 3466, + 3467, 3468, 3469, 3470, 3437, 3457, 3458, 3471, 3472, 3473, + 3474, 3475, 3436, 3476, 3478, 3477, 3479, 3480, 3481, 3482, + 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, + 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, + 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, + + 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, + 3523, 509, 3532, 3533, 509, 3534, 509, 509, 509, 509, + 509, 509, 509, 3535, 3536, 509, 3537, 509, 509, 509, + 509, 509, 509, 509, 3538, 3539, 509, 3540, 509, 509, + 509, 509, 509, 509, 3541, 3526, 3542, 3543, 3527, 3524, + 509, 3544, 3525, 509, 3545, 509, 509, 509, 509, 509, + 509, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, + 3559, 3528, 3555, 3560, 3529, 3561, 3562, 3556, 3563, 3564, + 3531, 3565, 3557, 3566, 3567, 3568, 3569, 3558, 3530, 3570, + 3571, 3575, 3576, 3577, 3578, 3572, 3579, 3580, 3581, 3582, + + 3573, 3583, 3584, 3585, 3586, 3574, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, - 3601, 3602, 3603, 3604, 3605, 3606, 3607, 487, 3616, 3617, - 487, 3618, 487, 487, 487, 487, 487, 487, 487, 3619, - 3620, 487, 3621, 487, 487, 487, 487, 487, 487, 487, - 3622, 3623, 487, 3624, 487, 487, 487, 487, 487, 487, - - 3625, 3626, 3627, 3628, 487, 3608, 3629, 487, 3609, 487, - 487, 487, 487, 487, 487, 3630, 3610, 3631, 3632, 3611, - 3633, 3634, 3635, 3636, 3637, 3638, 3640, 3612, 3641, 3642, - 3613, 3614, 3643, 3639, 3644, 3645, 3646, 3647, 3648, 3615, - 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3657, 3658, 3659, - 3660, 3661, 3662, 3664, 3656, 3665, 3663, 3666, 3667, 3668, - 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, - 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, - 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, - 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, - - 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, - 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, - 3729, 3730, 3731, 3732, 3733, 3734, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 714, 714, 714, 714, 714, 3749, 3750, - 3751, 3752, 3753, 3738, 714, 3755, 684, 3740, 684, 3754, - 684, 714, 3756, 714, 684, 3737, 3735, 3766, 3736, 3748, - 684, 3739, 684, 684, 684, 3767, 3768, 684, 3769, 3770, - 3771, 3772, 3773, 3775, 3776, 3741, 3779, 3777, 3780, 3745, - 3744, 3781, 3746, 3782, 3757, 3760, 3758, 3761, 3759, 3783, - - 3784, 3742, 3785, 3786, 3762, 3747, 3765, 3743, 3778, 3787, - 3788, 3789, 3790, 3763, 3764, 3791, 3792, 3793, 3794, 3795, - 3796, 3797, 362, 3806, 3807, 362, 3774, 362, 362, 362, - 362, 362, 362, 362, 3808, 3809, 362, 3810, 362, 362, - 362, 362, 362, 362, 3811, 3812, 3813, 3814, 362, 3798, - 3815, 362, 3799, 362, 362, 362, 362, 362, 362, 362, - 3816, 3817, 362, 3818, 362, 362, 362, 362, 362, 362, - 3819, 3800, 3820, 3821, 3801, 3802, 3822, 3823, 3803, 3824, - 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3805, 3832, 3833, - 3834, 3804, 3835, 3836, 3837, 3839, 3840, 3841, 3842, 3843, - - 3844, 3838, 3845, 3846, 3847, 3848, 3849, 3850, 3851, 3852, - 3853, 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861, 3862, - 3863, 3864, 3865, 3866, 3867, 3868, 3869, 3870, 3871, 3872, - 3873, 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, - 3883, 3884, 3885, 3886, 3887, 3888, 487, 3897, 3898, 487, - 3899, 487, 487, 487, 487, 487, 487, 487, 3900, 3901, - 487, 3902, 487, 487, 487, 487, 487, 487, 3903, 3904, - 3905, 3906, 487, 3889, 3907, 487, 3890, 487, 487, 487, - 487, 487, 487, 487, 3908, 3909, 487, 3910, 487, 487, - 487, 487, 487, 487, 3911, 3891, 3912, 3913, 3892, 3893, - - 3914, 3915, 3894, 3916, 3917, 3918, 3919, 3920, 3921, 3922, - 3923, 3896, 3924, 3925, 3926, 3895, 3927, 3928, 3929, 3930, - 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3940, - 3941, 3942, 3943, 3944, 3946, 3947, 3948, 3949, 3950, 3951, - 3952, 3945, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960, - 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, - 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 3980, - 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 3990, - 3991, 3992, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4000, - 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, - - 4011, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 684, 684, 4023, 684, 684, 4026, 4027, 684, 714, - 714, 4030, 714, 714, 4028, 4029, 4031, 714, 4032, 714, - 4019, 4033, 714, 684, 4024, 684, 684, 4015, 4043, 714, - 4012, 684, 4013, 4014, 684, 4034, 684, 684, 684, 4044, - 4045, 4046, 4047, 4048, 4025, 4049, 3773, 4050, 4018, 3777, - 4051, 4052, 4053, 4054, 4041, 4055, 4022, 4056, 4057, 4058, - 4059, 4060, 4016, 4035, 4020, 4021, 4036, 4061, 4017, 4062, - 3778, 4037, 4042, 4063, 4038, 4064, 4039, 4040, 4065, 4066, - 4067, 362, 4076, 4077, 362, 4078, 362, 362, 362, 362, - - 362, 362, 362, 4079, 4080, 362, 4081, 362, 362, 362, - 362, 362, 362, 362, 4082, 4083, 4084, 4085, 362, 362, - 362, 4086, 4087, 4068, 4088, 4089, 4069, 4090, 362, 4070, - 4091, 362, 4071, 362, 362, 362, 362, 362, 362, 4092, - 4093, 362, 4094, 4095, 4096, 4072, 362, 362, 362, 4097, - 4098, 4099, 4100, 4101, 4102, 4103, 4074, 4104, 4105, 4106, - 4073, 4107, 4108, 4109, 4110, 4111, 4112, 4113, 4114, 4115, - 4116, 4117, 4118, 4119, 4120, 4121, 4122, 4123, 4075, 4124, - 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, - 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, - - 4145, 4147, 4148, 4149, 4150, 4151, 4146, 4152, 4153, 4154, - 4155, 4156, 4157, 487, 4166, 4167, 487, 4168, 487, 487, - 487, 487, 487, 487, 487, 4169, 4170, 487, 4171, 487, - 487, 487, 487, 487, 487, 487, 4172, 4173, 4174, 4175, - 487, 487, 487, 4176, 4177, 4158, 4178, 4179, 4159, 4180, - 487, 4160, 4181, 487, 4161, 487, 487, 487, 487, 487, - 487, 4182, 4183, 487, 4184, 4185, 4186, 4162, 487, 487, - 487, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4164, 4194, - 4195, 4196, 4163, 4197, 4198, 4199, 4200, 4201, 4202, 4203, - 4204, 4205, 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4213, - - 4165, 4214, 4215, 4216, 4217, 4218, 4219, 4220, 4221, 4222, - 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, - 4233, 4234, 4235, 4236, 4238, 4239, 4240, 4241, 4242, 4243, - 4244, 4245, 4246, 4247, 4248, 4249, 4250, 4251, 4252, 4253, - 4254, 4255, 4237, 4256, 4257, 4258, 4259, 4260, 4261, 4262, - 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, - 4273, 4274, 4275, 4276, 4277, 4278, 684, 684, 684, 684, - 684, 684, 684, 684, 684, 684, 684, 4023, 684, 684, - 684, 4287, 714, 4288, 714, 684, 4289, 4290, 4291, 714, - 684, 4282, 714, 714, 4019, 4279, 4280, 4293, 4024, 4292, - - 714, 684, 4281, 714, 684, 714, 684, 4294, 684, 684, - 4304, 684, 684, 4305, 4296, 4306, 4307, 4308, 4285, 4309, - 4284, 4310, 4311, 4312, 4283, 4313, 4314, 4315, 4316, 4295, - 4297, 4317, 4318, 4286, 4319, 4320, 4321, 4300, 4301, 4303, - 4322, 4323, 4324, 4325, 4298, 4302, 4299, 362, 4333, 4334, - 362, 4335, 362, 362, 362, 362, 362, 362, 362, 4336, - 4337, 362, 4338, 362, 362, 362, 362, 362, 362, 4339, - 4340, 362, 4326, 4341, 362, 4327, 362, 362, 362, 362, - 362, 362, 362, 4342, 4343, 4344, 4345, 362, 362, 362, - 4328, 4346, 4347, 4329, 4348, 362, 4330, 4349, 4350, 4331, - - 362, 362, 362, 4353, 4354, 4355, 4356, 4357, 4358, 4359, - 4351, 4360, 4361, 4352, 4362, 4363, 4364, 4365, 4366, 4332, - 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, - 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, - 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, - 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, - 4407, 4408, 4409, 4410, 4411, 4412, 4413, 487, 4421, 4422, - 487, 4423, 487, 487, 487, 487, 487, 487, 487, 4424, - 4425, 487, 4426, 487, 487, 487, 487, 487, 487, 4427, - 4428, 487, 4414, 4429, 487, 4415, 487, 487, 487, 487, - - 487, 487, 487, 4430, 4431, 4433, 4434, 487, 487, 487, - 4416, 4432, 4435, 4417, 4436, 487, 4418, 4437, 4438, 4419, - 487, 487, 487, 4439, 4440, 4441, 4442, 4443, 4444, 4445, - 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4454, 4455, 4420, - 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, - 4466, 4453, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, - 4476, 4477, 4478, 4479, 4480, 4467, 4481, 4482, 4483, 4484, - 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4494, - 4495, 4496, 4497, 4498, 4499, 4500, 4501, 4502, 4503, 4504, - 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, - - 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, - 4525, 4526, 4527, 4528, 4529, 684, 684, 684, 684, 684, - 684, 684, 684, 4537, 4538, 4539, 714, 4540, 714, 4541, - 4542, 714, 714, 714, 684, 684, 714, 714, 714, 4531, - 4543, 684, 684, 684, 684, 684, 684, 684, 4552, 4530, - 4553, 4554, 4555, 4532, 4556, 4557, 4560, 4558, 4561, 4562, - 4563, 4564, 4565, 4566, 4567, 4568, 4534, 4569, 4570, 4544, - 4571, 4546, 4536, 4547, 4550, 4545, 4572, 4548, 4559, 4549, - 4579, 4580, 362, 4581, 4533, 4551, 4535, 362, 362, 362, - 362, 4582, 4583, 362, 4584, 362, 362, 362, 362, 362, - - 362, 362, 4585, 4586, 362, 4587, 362, 362, 362, 362, - 362, 362, 4588, 4589, 4590, 362, 4591, 4592, 4575, 4573, - 362, 362, 362, 362, 4593, 4594, 4576, 4574, 362, 362, - 362, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, - 4604, 4577, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, - 4613, 4614, 4578, 4615, 4616, 4617, 4618, 4619, 4620, 4621, - 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, - 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, - 4642, 4643, 4644, 4645, 4646, 4654, 4647, 4655, 4656, 4648, - 4649, 4650, 4657, 4658, 4659, 487, 4651, 4666, 4667, 4668, - - 487, 487, 487, 4652, 487, 4669, 4653, 4670, 487, 487, - 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, - 487, 487, 487, 487, 487, 487, 487, 487, 4671, 487, - 487, 487, 4660, 4662, 4672, 4673, 4674, 4663, 4675, 4676, - 4677, 4661, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, - 4686, 4687, 4688, 4664, 4689, 4690, 4691, 4665, 4692, 4693, - 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, - 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, - 4714, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, - 4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 4732, 4733, - - 4734, 4735, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, - 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4736, 4753, - 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, - 4764, 4765, 4766, 684, 684, 684, 684, 684, 684, 714, - 4773, 684, 714, 4775, 4777, 4778, 4776, 714, 714, 684, - 714, 4779, 714, 714, 4780, 684, 684, 684, 684, 684, - 4767, 4774, 684, 684, 4788, 4789, 4790, 4558, 4791, 4769, - 4792, 4793, 4794, 4768, 4795, 4796, 4781, 4797, 4798, 4801, - 4802, 4803, 4782, 4785, 4772, 4804, 4786, 4805, 4559, 362, - 4770, 4783, 4784, 362, 362, 362, 362, 4806, 362, 362, - - 362, 4787, 4771, 362, 4807, 4808, 362, 4809, 362, 362, - 362, 362, 362, 362, 362, 4810, 4811, 362, 4812, 362, - 362, 362, 362, 362, 362, 4813, 4814, 4815, 4816, 4817, - 4818, 4819, 4820, 4821, 4822, 4823, 4824, 4825, 4826, 4827, - 4799, 4828, 4829, 4800, 4830, 4831, 4832, 4833, 4834, 4835, - 4836, 4837, 4838, 4839, 4841, 4842, 4843, 4840, 4844, 4845, - 4846, 4847, 4848, 4849, 4850, 4851, 4852, 4853, 4854, 4855, - 4856, 4857, 4858, 4859, 4860, 4861, 4862, 4863, 4865, 4866, - 4869, 4867, 4864, 4868, 4870, 4871, 4872, 4873, 4874, 4875, - 487, 4878, 4879, 487, 4880, 487, 487, 487, 487, 487, - - 487, 487, 4881, 4882, 487, 4883, 487, 487, 487, 487, - 487, 487, 487, 4884, 4885, 487, 4886, 487, 487, 487, - 487, 487, 487, 4887, 4888, 4889, 4890, 4891, 4892, 4893, - 4894, 4895, 4896, 4897, 4898, 4899, 4900, 4901, 4876, 4902, - 4903, 4877, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4911, - 4912, 4913, 4914, 4915, 4916, 4917, 4918, 4919, 4920, 4921, - 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 4930, 4931, - 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, - 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, - 4952, 4953, 4954, 4955, 4957, 4958, 4956, 4959, 4960, 4961, - - 4962, 4963, 4964, 4965, 684, 684, 684, 684, 684, 684, - 684, 4773, 684, 714, 714, 714, 714, 714, 714, 4969, - 4970, 684, 684, 684, 684, 684, 684, 684, 4977, 4978, - 4979, 4966, 4774, 362, 4980, 4981, 362, 4982, 362, 362, - 362, 362, 362, 362, 4983, 4984, 4985, 4986, 4987, 4988, - 4973, 4974, 4989, 4990, 4968, 4991, 4992, 4993, 4994, 4995, - 4971, 4972, 4996, 4997, 4975, 4976, 4998, 4999, 5000, 5001, - 5002, 5003, 5004, 5005, 4967, 5006, 5007, 5008, 5009, 5010, - 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, - 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, - - 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040, - 5041, 5042, 5043, 5044, 487, 5045, 5046, 487, 5047, 487, - 487, 487, 487, 487, 487, 5048, 5049, 5050, 5051, 5052, - 5053, 5054, 5055, 5056, 5057, 5058, 5059, 5060, 5061, 5062, - 5063, 5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 5072, - 5073, 5074, 5075, 5076, 5077, 5078, 5079, 5080, 5081, 5082, - 5083, 5084, 5085, 5086, 5087, 5088, 5089, 5090, 5091, 5092, - 5093, 5094, 5095, 5096, 5097, 5098, 5099, 5100, 5101, 5102, - 5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110, 5111, 5112, - 5113, 5114, 5115, 5116, 5117, 5118, 5119, 5120, 5121, 5122, - - 5123, 684, 684, 684, 714, 714, 684, 684, 684, 684, - 684, 684, 5127, 5128, 5129, 5130, 5131, 5132, 5133, 5134, - 5135, 5136, 5137, 5138, 5139, 5140, 5141, 5142, 5143, 5144, - 5145, 5146, 5147, 5148, 5149, 5150, 5151, 5152, 5153, 5154, - 5155, 5156, 5157, 5158, 5159, 5160, 5161, 5125, 5126, 5162, - 5163, 5164, 5124, 5165, 5166, 5167, 5168, 5169, 5170, 5171, - 5172, 5173, 5174, 5175, 5176, 5183, 5177, 5184, 5185, 5178, - 5179, 5180, 5186, 5187, 5188, 5189, 5181, 5190, 5191, 5192, - 5193, 5194, 5195, 5182, 5196, 5197, 5198, 5199, 5200, 5201, - 5202, 5203, 5204, 5205, 5206, 5207, 5208, 5209, 5210, 5211, + 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, + 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, + 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 3630, + 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, + 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, + 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, + 3661, 3662, 3663, 3664, 734, 734, 734, 734, 3665, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + + 734, 734, 734, 734, 734, 734, 762, 734, 762, 3687, + 762, 3685, 3666, 3686, 3688, 3689, 3673, 762, 762, 762, + 3668, 3672, 3690, 3691, 762, 734, 734, 734, 3692, 734, + 734, 3669, 3670, 3667, 762, 3671, 734, 3702, 3684, 734, + 734, 734, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 3710, + 3711, 3694, 3675, 3712, 3693, 3695, 3713, 3714, 3674, 3678, + 3677, 3681, 3680, 3676, 3698, 3699, 3696, 3679, 3683, 3700, + 3715, 3716, 3718, 3719, 3720, 3697, 3721, 3682, 3722, 3723, + 3724, 3701, 3725, 3726, 3717, 3727, 3728, 3729, 3730, 3731, + 3732, 3733, 3734, 3735, 3736, 380, 3745, 3746, 380, 3747, + + 380, 380, 380, 380, 380, 380, 380, 3748, 3749, 380, + 3750, 380, 380, 380, 380, 380, 380, 380, 3751, 3752, + 380, 3753, 380, 380, 380, 380, 380, 380, 3754, 3755, + 3756, 3757, 380, 3737, 3758, 380, 3738, 380, 380, 380, + 380, 380, 380, 3759, 3739, 3760, 3761, 3740, 3762, 3763, + 3764, 3765, 3766, 3767, 3768, 3741, 3769, 3770, 3742, 3743, + 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3744, 3778, 3779, + 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, + 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, + 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, + + 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, + 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, + 509, 3838, 3839, 509, 3840, 509, 509, 509, 509, 509, + 509, 509, 3841, 3842, 509, 3843, 509, 509, 509, 509, + 509, 509, 509, 3844, 3845, 509, 3846, 509, 509, 509, + 509, 509, 509, 3847, 3848, 3849, 3850, 509, 3830, 3851, + 509, 3831, 509, 509, 509, 509, 509, 509, 3852, 3832, + 3853, 3854, 3833, 3855, 3856, 3857, 3858, 3859, 3860, 3861, + 3834, 3862, 3863, 3835, 3836, 3865, 3866, 3867, 3868, 3869, + 3864, 3870, 3837, 3871, 3872, 3873, 3874, 3875, 3876, 3877, + + 3878, 3879, 3880, 3882, 3883, 3884, 3885, 3886, 3887, 3888, + 3881, 3889, 3891, 3892, 3893, 3890, 3894, 3895, 3896, 3897, + 3898, 3899, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, + 3908, 3909, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, + 3918, 3919, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, + 3928, 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, + 3938, 3939, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, + 3948, 3949, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, + 3958, 3959, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, + 3968, 3969, 3970, 3971, 3972, 734, 734, 734, 734, 734, + + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 762, 762, 734, 762, 762, + 3990, 3991, 3976, 3992, 3993, 762, 3978, 762, 3997, 762, + 3994, 734, 3995, 3996, 3975, 3973, 734, 3974, 734, 762, + 3977, 3989, 734, 734, 734, 734, 734, 4007, 4008, 4009, + 4010, 3998, 4011, 4012, 3979, 4013, 3982, 4014, 3983, 4015, + 4006, 3986, 3985, 4017, 3987, 4018, 4019, 4001, 4002, 4021, + 3980, 3981, 4022, 4023, 4024, 4025, 3999, 3988, 4000, 3984, + 4026, 4027, 4028, 4029, 4003, 4004, 4005, 4020, 4030, 4031, + 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4048, 380, + + 4049, 4050, 380, 4016, 380, 380, 380, 380, 380, 380, + 380, 4051, 4052, 380, 4053, 380, 380, 380, 380, 380, + 380, 4054, 4055, 4056, 4057, 380, 4040, 4058, 380, 4041, + 380, 380, 380, 380, 380, 380, 380, 4059, 4060, 380, + 4061, 380, 380, 380, 380, 380, 380, 4062, 4042, 4063, + 4064, 4043, 4044, 4065, 4066, 4045, 4067, 4068, 4069, 4070, + 4071, 4072, 4073, 4074, 4047, 4075, 4076, 4077, 4046, 4078, + 4079, 4080, 4081, 4083, 4084, 4085, 4086, 4087, 4088, 4082, + 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, + 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, + + 4109, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, + 4119, 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, + 4129, 4130, 4131, 4132, 509, 4141, 4142, 509, 4143, 509, + 509, 509, 509, 509, 509, 509, 4144, 4145, 509, 4146, + 509, 509, 509, 509, 509, 509, 4147, 4148, 4149, 4150, + 509, 4133, 4151, 509, 4134, 509, 509, 509, 509, 509, + 509, 509, 4152, 4153, 509, 4154, 509, 509, 509, 509, + 509, 509, 4155, 4135, 4156, 4157, 4136, 4137, 4158, 4159, + 4138, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4140, + 4168, 4169, 4170, 4139, 4171, 4172, 4173, 4174, 4175, 4176, + + 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184, 4185, 4186, + 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4195, 4196, 4197, + 4198, 4199, 4200, 4201, 4194, 4202, 4203, 4204, 4205, 4206, + 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216, + 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, + 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, + 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, + 4247, 4248, 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, + 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, + 4267, 4268, 4269, 4270, 4271, 4272, 734, 734, 734, 734, + + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 4285, 734, 4288, 4289, 734, 762, 762, 4292, + 762, 762, 4290, 4291, 4293, 762, 4294, 762, 4281, 734, + 762, 4295, 4276, 4286, 734, 4273, 734, 4274, 4275, 762, + 734, 734, 734, 4296, 734, 4305, 734, 4306, 4307, 4308, + 4287, 4309, 4310, 4311, 4312, 4015, 4280, 4313, 4019, 4314, + 4315, 4316, 4317, 4284, 4318, 4319, 4320, 4277, 4304, 4297, + 4321, 4279, 4282, 4278, 4283, 4303, 4298, 4322, 4323, 4020, + 4299, 4300, 4301, 4324, 4302, 4325, 4326, 4327, 4328, 4329, + 4330, 380, 4339, 4340, 380, 4341, 380, 380, 380, 380, + + 380, 380, 380, 4342, 4343, 380, 4344, 380, 380, 380, + 380, 380, 380, 380, 4345, 4346, 4347, 4348, 380, 380, + 380, 4349, 4350, 4331, 4351, 4352, 4332, 4353, 380, 4333, + 4354, 380, 4334, 380, 380, 380, 380, 380, 380, 4355, + 4356, 380, 4357, 4358, 4359, 4335, 380, 380, 380, 4360, + 4361, 4362, 4363, 4364, 4365, 4366, 4337, 4367, 4368, 4369, + 4336, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, + 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4338, 4387, + 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, + 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, + + 4408, 4409, 4410, 4412, 4413, 4414, 4415, 4416, 4411, 4417, + 4418, 4419, 4420, 4421, 4422, 509, 4431, 4432, 509, 4433, + 509, 509, 509, 509, 509, 509, 509, 4434, 4435, 509, + 4436, 509, 509, 509, 509, 509, 509, 509, 4437, 4438, + 4439, 4440, 509, 509, 509, 4441, 4442, 4423, 4443, 4444, + 4424, 4445, 509, 4425, 4446, 509, 4426, 509, 509, 509, + 509, 509, 509, 4447, 4448, 509, 4449, 4450, 4451, 4427, + 509, 509, 509, 4452, 4453, 4454, 4455, 4456, 4457, 4458, + 4429, 4459, 4460, 4461, 4428, 4462, 4463, 4464, 4465, 4466, + 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, + + 4477, 4478, 4430, 4479, 4480, 4481, 4482, 4483, 4484, 4485, + 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4494, 4495, + 4496, 4497, 4498, 4499, 4500, 4501, 4502, 4503, 4504, 4505, + 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, + 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4506, 4525, + 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, + 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, + 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, + 4556, 4557, 4558, 4559, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 4285, 734, 734, 734, + + 4569, 762, 4570, 762, 4571, 4572, 4573, 762, 4575, 4563, + 762, 762, 734, 4560, 4561, 4281, 762, 4286, 4574, 762, + 4562, 762, 734, 734, 734, 4576, 734, 734, 734, 734, + 4586, 734, 4587, 4588, 4589, 4590, 4591, 4567, 4565, 4592, + 4593, 4578, 4564, 4566, 4594, 4595, 4596, 4597, 4598, 4599, + 4600, 4568, 4579, 4601, 4602, 4603, 4582, 4583, 4585, 4604, + 4605, 4577, 4606, 4584, 4580, 4607, 4581, 4608, 380, 4616, + 4617, 380, 4618, 380, 380, 380, 380, 380, 380, 380, + 4619, 4620, 380, 4621, 380, 380, 380, 380, 380, 380, + 4622, 4623, 380, 4609, 4624, 380, 4610, 380, 380, 380, + + 380, 380, 380, 380, 4625, 4626, 4627, 4628, 380, 380, + 380, 4611, 4629, 4630, 4612, 4631, 380, 4613, 4632, 4633, + 4614, 380, 380, 380, 4636, 4637, 4638, 4639, 4640, 4641, + 4642, 4634, 4643, 4644, 4635, 4645, 4646, 4647, 4648, 4649, + 4615, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, + 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, + 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, + 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, + 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, + 509, 4706, 4707, 509, 4708, 509, 509, 509, 509, 509, + + 509, 509, 4709, 4710, 509, 4711, 509, 509, 509, 509, + 509, 509, 4712, 4713, 509, 4699, 4714, 509, 4700, 509, + 509, 509, 509, 509, 509, 509, 4715, 4716, 4718, 4719, + 509, 509, 509, 4701, 4717, 4720, 4702, 4721, 509, 4703, + 4722, 4723, 4704, 509, 509, 509, 4724, 4725, 4726, 4727, + 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, + 4738, 4739, 4705, 4740, 4742, 4743, 4744, 4745, 4746, 4747, + 4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, 4741, 4757, + 4758, 4759, 4760, 4761, 4762, 4763, 4764, 4765, 4766, 4767, + 4768, 4769, 4756, 4770, 4771, 4772, 4773, 4774, 4775, 4776, + + 4777, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4785, 4786, + 4787, 4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, + 4797, 4798, 4799, 4800, 4801, 4802, 4803, 4804, 4805, 4806, + 4807, 4808, 4809, 4810, 4811, 4812, 4813, 4814, 4815, 4816, + 4817, 4818, 4819, 4820, 4821, 4822, 4823, 4824, 4825, 4826, + 4827, 4828, 4829, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 4838, 4839, 4840, 762, 4841, 762, 4842, 762, + 762, 762, 4843, 4844, 762, 734, 762, 4831, 734, 734, + 762, 734, 734, 734, 734, 734, 4853, 4830, 4854, 4855, + 4856, 4832, 734, 4857, 4858, 4859, 4862, 4860, 4863, 4864, + + 4865, 4866, 4867, 4868, 4834, 4869, 4870, 4871, 4847, 4872, + 4873, 4837, 4845, 4835, 4848, 4846, 4849, 4850, 4861, 4851, + 4874, 380, 4833, 4852, 380, 4836, 380, 380, 380, 380, + 380, 380, 380, 4881, 4882, 380, 4883, 380, 380, 380, + 380, 380, 380, 380, 4884, 4885, 380, 4886, 380, 380, + 380, 380, 380, 380, 4887, 4888, 4889, 4877, 4875, 380, + 4878, 4876, 4890, 4891, 380, 380, 380, 4892, 4893, 4894, + 4895, 4896, 4897, 4898, 4899, 4900, 4901, 4902, 4903, 4904, + 4879, 4905, 4906, 4880, 4907, 4908, 4909, 4910, 4911, 4912, + 4913, 4914, 4915, 4916, 4917, 4918, 4919, 4920, 4921, 4922, - 5212, 5213, 5214, 5215, 5216, 5217, 5218, 5219, 5220, 5221, - 5222, 5223, 5224, 5225, 5226, 5227, 5228, 5229, 5230, 5231, + 4923, 4924, 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, + 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, + 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4958, 4951, + 4959, 4960, 4952, 4953, 4954, 4961, 4962, 4963, 509, 4955, + 4970, 4971, 4972, 509, 509, 509, 4956, 509, 4973, 4957, + 4974, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 4975, 509, 509, 509, 4964, 4966, 4976, 4977, 4978, + 4967, 4979, 4980, 4981, 4965, 4982, 4983, 4984, 4985, 4986, + 4987, 4988, 4989, 4990, 4991, 4992, 4968, 4993, 4994, 4995, + + 4969, 4996, 4997, 4998, 4999, 5000, 5001, 5002, 5003, 5004, + 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, + 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, + 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, + 5035, 5036, 5037, 5038, 5039, 5040, 5041, 5042, 5043, 5045, + 5046, 5047, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055, + 5056, 5057, 5058, 5059, 5060, 5044, 5061, 5062, 5063, 5064, + 5065, 5066, 5067, 5068, 5069, 5070, 5071, 5072, 5073, 5074, + 5075, 5076, 5077, 5078, 5079, 5080, 5081, 5082, 5083, 5084, + 734, 734, 734, 734, 734, 734, 734, 5092, 734, 762, + + 762, 5096, 5097, 5094, 5095, 762, 734, 762, 762, 762, + 762, 5098, 5099, 734, 734, 734, 734, 5085, 5093, 734, + 734, 734, 5107, 5108, 5109, 5110, 5087, 5111, 5112, 4860, + 5086, 5113, 5114, 5100, 5115, 5116, 5117, 5118, 5121, 5122, + 5101, 5123, 5091, 5104, 5124, 5125, 5105, 5088, 5102, 5103, + 4861, 380, 5126, 5127, 5090, 5128, 380, 380, 380, 5089, + 5106, 380, 5129, 5130, 380, 5131, 380, 380, 380, 380, + 380, 380, 380, 5132, 5133, 380, 5134, 380, 380, 380, + 380, 380, 380, 380, 5135, 5136, 5137, 5138, 380, 380, + 380, 5139, 5140, 5141, 5142, 5143, 5144, 5145, 5146, 5147, + + 5148, 5119, 5149, 5150, 5151, 5152, 5153, 5154, 5155, 5120, + 5156, 5157, 5158, 5159, 5160, 5161, 5163, 5164, 5165, 5162, + 5166, 5167, 5168, 5169, 5170, 5171, 5172, 5173, 5174, 5175, + 5176, 5177, 5178, 5179, 5180, 5181, 5182, 5183, 5184, 5185, + 5187, 5188, 5191, 5189, 5186, 5190, 5192, 5193, 5194, 5195, + 5196, 5197, 509, 5200, 5201, 509, 5202, 509, 509, 509, + 509, 509, 509, 509, 5203, 5204, 509, 5205, 509, 509, + 509, 509, 509, 509, 509, 5206, 5207, 509, 5208, 509, + 509, 509, 509, 509, 509, 5209, 5210, 5211, 5212, 5213, + 5214, 5215, 5216, 5217, 5218, 5219, 5220, 5221, 5222, 5223, + + 5198, 5224, 5225, 5199, 5226, 5227, 5228, 5229, 5230, 5231, 5232, 5233, 5234, 5235, 5236, 5237, 5238, 5239, 5240, 5241, 5242, 5243, 5244, 5245, 5246, 5247, 5248, 5249, 5250, 5251, - 684, 684, 684, 5252, 5253, 5254, 5255, 5256, 5257, 5258, - 5259, 5260, 5261, 5262, 5263, 5264, 5265, 5266, 5267, 5268, - 5269, 5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277, 5278, - 5279, 5280, 5281, 5282, 5283, 5284, 5285, 5286, 5287, 5288, - 5289, 5290, 5291, 5292, 5293, 5294, 5295, 5296, 5297, 5298, - 5300, 5299, 5301, 5302, 5303, 5304, 5305, 5306, 5307, 5308, - - 5309, 5310, 5311, 5312, 5313, 5314, 5315, 5316, 5317, 5318, - 5319, 5320, 5321, 5322, 5323, 5324, 5325, 5326, 5327, 5328, - 5329, 5330, 5331, 5332, 5333, 5334, 5335, 5336, 5337, 5338, - 5339, 5340, 5341, 5342, 5343, 5344, 5345, 5346, 5347, 5348, - 5349, 5350, 5351, 5352, 5353, 5354, 5355, 5356, 5357, 5358, - 5359, 5360, 5361, 5362, 5363, 5364, 5365, 5366, 5367, 5368, - 5369, 5370, 5371, 5372, 5373, 5374, 5375, 5376, 5377, 5378, - 5379, 5380, 5381, 5382, 5383, 5384, 5385, 5386, 5387, 5388, - 5389, 5390, 5391, 5392, 5393, 5394, 5395, 5396, 5397, 5398, - 5399, 5400, 5401, 5402, 5403, 5404, 5405, 5406, 5407, 5408, - - 5409, 5410, 5411, 5412, 5413, 5414, 5415, 5416, 5417, 5418, - 5419, 5420, 5421, 5422, 5423, 5424, 5425, 5426, 5427, 5428, - 5429, 5430, 5431, 5432, 5433, 5434, 5435, 5436, 5437, 5438, - 5439, 5440, 5441, 5442, 5443, 5444, 5445, 5446, 5447, 5448, - 5449, 5450, 5451, 5452, 5453, 5454, 5455, 5456, 5457, 5458, - 5459, 5460, 5461, 5462, 5463, 5464, 5465, 5466, 5467, 5468, - 5469, 5470, 5475, 5471, 5476, 5477, 5472, 5473, 5474, 5478, - 5479, 5480, 5481, 5482, 5483, 5484, 5485, 5486, 5487, 5488, - 5489, 5490, 5491, 5492, 5493, 5494, 5495, 5496, 5497, 5498, - 5499, 5500, 5501, 5502, 5503, 5504, 5505, 5507, 5508, 5509, - - 5510, 5511, 5512, 5513, 5514, 5506, 5515, 5516, 5517, 5518, - 5519, 5520, 5521, 5522, 5523, 5524, 5525, 5526, 5527, 5528, - 5529, 5530, 5531, 5532, 5533, 5534, 5535, 5536, 5537, 5538, - 5539, 5540, 5541, 5542, 5544, 5545, 5546, 5547, 5548, 5549, - 5550, 5551, 5543, 5552, 5553, 5554, 5555, 5556, 5557, 5558, - 5559, 5560, 5561, 5562, 5563, 5564, 5565, 5566, 5567, 5568, - 5569, 5570, 5571, 5572, 5573, 5574, 5575, 5576, 5577, 5578, - 5579, 5580, 5581, 5582, 5583, 5584, 5585, 5586, 5587, 5588, - 5589, 5590, 5591, 5592, 5593, 5594, 5595, 5596, 5597, 5598, - 5599, 5600, 5601, 5602, 5603, 5604, 5605, 5606, 5607, 5608, - - 5609, 5610, 5611, 5612, 5613, 5614, 5615, 5616, 5617, 5618, - 5619, 5620, 5621, 5622, 5623, 5624, 5625, 5626, 5627, 5628, - 5629, 5630, 5631, 5632, 5633, 5634, 5635, 5636, 5637, 5638, - 5639, 5640, 5641, 5642, 5643, 5644, 5645, 5646, 5647, 5648, - 5649, 5650, 5651, 5652, 5653, 5654, 5655, 5656, 5657, 5658, - 5659, 5660, 5661, 5662, 5663, 5664, 5665, 5666, 5667, 5668, - 5669, 5670, 5671, 5672, 5673, 5674, 5675, 5676, 5677, 5678, - 5679, 5680, 5681, 5682, 5683, 5684, 5685, 5686, 5687, 5688, - 5689, 5690, 5691, 5692, 5693, 5694, 5695, 5696, 5697, 5698, - 5699, 5700, 5701, 5702, 5703, 5704, 5705, 5706, 5707, 5708, - - 5709, 5710, 5711, 5712, 5713, 5714, 5715, 5716, 5717, 5718, - 5719, 5720, 5721, 5722, 5723, 5725, 5726, 5727, 5728, 5729, - 5730, 5731, 5732, 5733, 5734, 5735, 5736, 5737, 5738, 5724, - 5739, 5740, 5741, 5742, 5743, 5744, 5745, 5746, 5747, 5748, - 5749, 5750, 5751, 5752, 5753, 5754, 5755, 5756, 5757, 5758, - 5759, 5760, 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768, - 5769, 5770, 5771, 5772, 5773, 5774, 5775, 5776, 5777, 5778, - 5779, 5780, 5781, 5782, 5783, 5784, 5785, 5786, 5787, 5788, - 5789, 5790, 5791, 5792, 5793, 5794, 5795, 5796, 5797, 5798, - 5799, 5800, 5801, 5802, 5803, 5804, 5805, 5806, 5807, 5808, - - 5809, 5810, 5811, 5812, 5813, 5814, 5815, 5816, 5817, 5818, - 5819, 5820, 5821, 5822, 5823, 5824, 5825, 5826, 5827, 5828, - 5829, 5830, 5831, 5832, 5833, 5834, 5835, 5836, 5837, 5838, - 5839, 5840, 5841, 5842, 5843, 5844, 5845, 5846, 5847, 5848, - 5849, 5850, 5851, 5852, 5853, 5854, 5855, 5856, 5857, 5858, - 5859, 5860, 5861, 5862, 5863, 5864, 5865, 5866, 5867, 5868, - 5869, 5870, 5871, 5872, 5873, 5874, 5875, 5876, 5877, 5878, - 5879, 5880, 73, 73, 73, 73, 157, 157, 157, 157, - 200, 200, 200, 200, 307, 307, 307, 307, 349, 362, - 362, 366, 366, 426, 487, 487, 491, 491, 512, 584, - - 512, 512, 513, 673, 513, 513, 683, 683, 683, 683, - 714, 714, 714, 714, 1468, 1467, 1463, 1462, 1461, 1460, - 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, - 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, - 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, - 1425, 1424, 1423, 1422, 1421, 1420, 1417, 1416, 1415, 1414, - 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, - 1403, 1402, 1401, 1400, 1397, 1396, 1395, 1394, 1391, 1390, - 1389, 1388, 1387, 1386, 1385, 1376, 1375, 1374, 1373, 1372, - 1371, 1370, 1369, 1368, 1367, 1361, 1360, 1359, 1358, 1357, - - 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1347, 1344, 1343, - 1342, 1341, 1338, 1334, 1331, 1330, 1329, 1328, 1327, 1321, - 1320, 1317, 1316, 1315, 1314, 1313, 1312, 1308, 1307, 1304, - 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1292, - 1291, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, - 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, - 1269, 1268, 1267, 1256, 1255, 1254, 1253, 1252, 1251, 1250, - 1234, 1233, 1232, 1231, 1230, 1229, 1228, 1227, 1224, 1223, - 1222, 1221, 1219, 1216, 1215, 1214, 1213, 1212, 1211, 1210, - 1209, 1208, 1205, 1204, 1203, 1202, 1201, 1200, 1199, 1198, - - 1197, 1196, 1195, 1194, 1193, 1192, 1191, 1190, 1189, 1188, - 1187, 1186, 714, 684, 684, 684, 1135, 1134, 1133, 1132, - 1131, 1130, 1129, 1128, 1127, 1124, 1117, 1116, 1115, 1112, - 1111, 1110, 1109, 1108, 1107, 1106, 1105, 1104, 1101, 1100, - 1099, 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, - 1089, 1086, 1085, 1084, 1083, 1082, 1079, 1078, 1077, 1076, - 1075, 1074, 1073, 1072, 1071, 1068, 1067, 1066, 1065, 1062, - 1061, 1060, 1059, 1056, 1055, 1054, 1053, 1052, 1051, 1050, - 1049, 1048, 1047, 1046, 1045, 1044, 1043, 1042, 1041, 1040, - 1039, 1038, 1037, 1036, 1035, 1034, 1033, 1032, 1029, 1028, - - 1027, 1026, 1025, 1024, 1023, 1022, 1019, 1018, 1017, 1016, - 1013, 1012, 1011, 1010, 1009, 1008, 1002, 999, 998, 997, - 996, 993, 992, 991, 990, 987, 986, 983, 982, 981, - 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, - 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, - 514, 955, 954, 514, 949, 946, 945, 944, 943, 932, - 931, 930, 929, 928, 927, 926, 925, 907, 906, 905, - 904, 903, 898, 897, 896, 890, 889, 888, 884, 880, - 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, - 869, 868, 861, 860, 859, 858, 857, 856, 853, 852, - - 851, 849, 848, 846, 845, 842, 841, 840, 839, 838, - 837, 833, 832, 831, 830, 829, 828, 827, 826, 825, - 824, 823, 820, 819, 818, 817, 816, 815, 803, 800, - 799, 798, 797, 782, 779, 778, 777, 776, 775, 774, - 773, 772, 771, 770, 767, 766, 765, 764, 763, 762, - 761, 755, 752, 747, 744, 734, 733, 730, 729, 728, - 716, 684, 684, 684, 684, 684, 684, 682, 681, 680, - 679, 676, 675, 674, 666, 658, 630, 604, 594, 593, - 592, 591, 590, 587, 586, 585, 554, 355, 352, 351, - 350, 514, 514, 321, 352, 351, 350, 321, 448, 434, - - 430, 428, 427, 401, 321, 355, 352, 351, 350, 321, - 5881, 280, 280, 61, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881 + 5252, 5253, 5254, 5255, 5256, 5257, 5258, 5259, 5260, 5261, + 5262, 5263, 5264, 5265, 5266, 5267, 5268, 5269, 5270, 5271, + 5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281, + 5283, 5284, 5282, 5285, 5286, 5287, 5288, 5289, 5290, 5291, + 5292, 5293, 5294, 5295, 5296, 5297, 734, 734, 734, 734, + 734, 734, 734, 5092, 734, 734, 762, 762, 762, 762, + 762, 762, 5302, 5303, 734, 734, 734, 734, 734, 734, + + 734, 5310, 5311, 5298, 5093, 5312, 380, 5313, 5314, 380, + 5315, 380, 380, 380, 380, 380, 380, 5316, 5317, 5318, + 5319, 5306, 5320, 5321, 5307, 5322, 5300, 5323, 5324, 5325, + 5326, 5327, 5328, 5301, 5304, 5305, 5329, 5308, 5309, 5330, + 5331, 5332, 5333, 5334, 5335, 5336, 5299, 5337, 5338, 5339, + 5340, 5341, 5342, 5343, 5344, 5345, 5346, 5347, 5348, 5349, + 5350, 5351, 5352, 5353, 5354, 5355, 5356, 5357, 5358, 5359, + 5360, 5361, 5362, 5363, 5364, 5365, 5366, 5367, 5368, 5369, + 5370, 5371, 5372, 5373, 5374, 5375, 5376, 5377, 5378, 5379, + 509, 5380, 5381, 509, 5382, 509, 509, 509, 509, 509, + + 509, 5383, 5384, 5385, 5386, 5387, 5388, 5389, 5390, 5391, + 5392, 5393, 5394, 5395, 5396, 5397, 5398, 5399, 5400, 5401, + 5402, 5403, 5404, 5405, 5406, 5407, 5408, 5409, 5410, 5411, + 5412, 5413, 5414, 5415, 5416, 5417, 5418, 5419, 5420, 5421, + 5422, 5423, 5424, 5425, 5426, 5427, 5428, 5429, 5430, 5431, + 5432, 5433, 5434, 5435, 5436, 5437, 5438, 5439, 5440, 5441, + 5442, 5443, 5444, 5445, 5446, 5447, 5448, 5449, 5450, 5451, + 5452, 5453, 5454, 5455, 5456, 5457, 5458, 5459, 5460, 5461, + 5462, 5463, 5464, 5465, 5466, 734, 734, 734, 734, 762, + 762, 734, 734, 734, 734, 734, 734, 5470, 5471, 5472, + + 5473, 5474, 5475, 5476, 5477, 5478, 5479, 5480, 5481, 5482, + 5483, 5484, 5485, 5486, 5487, 5488, 5489, 5490, 5491, 5492, + 5493, 5494, 5495, 5496, 5497, 5498, 5499, 5500, 5501, 5502, + 5503, 5504, 5468, 5469, 5505, 5506, 5467, 5507, 5508, 5509, + 5510, 5511, 5512, 5513, 5514, 5515, 5516, 5517, 5518, 5519, + 5520, 5521, 5522, 5529, 5523, 5530, 5531, 5524, 5525, 5526, + 5532, 5533, 5534, 5535, 5527, 5536, 5537, 5538, 5539, 5540, + 5541, 5528, 5542, 5543, 5544, 5545, 5546, 5547, 5548, 5549, + 5550, 5551, 5552, 5553, 5554, 5555, 5556, 5557, 5558, 5559, + 5560, 5561, 5562, 5563, 5564, 5565, 5566, 5567, 5568, 5569, + + 5570, 5571, 5572, 5573, 5574, 5575, 5576, 5577, 5578, 5579, + 5580, 5581, 5582, 5583, 5584, 5585, 5586, 5587, 5588, 5589, + 5590, 5591, 5592, 5593, 5594, 5595, 5596, 5597, 5598, 5599, + 5600, 5601, 5602, 5603, 5604, 734, 734, 734, 5605, 5606, + 5607, 5608, 5609, 5610, 5611, 5612, 5613, 5614, 5615, 5616, + 5617, 5618, 5619, 5620, 5621, 5622, 5623, 5624, 5625, 5626, + 5627, 5628, 5629, 5630, 5631, 5632, 5633, 5634, 5635, 5636, + 5637, 5638, 5639, 5640, 5641, 5642, 5643, 5644, 5645, 5646, + 5647, 5648, 5649, 5650, 5651, 5652, 5653, 5654, 5656, 5655, + 5657, 5658, 5659, 5660, 5661, 5662, 5663, 5664, 5665, 5666, + + 5667, 5668, 5669, 5670, 5671, 5672, 5673, 5674, 5675, 5676, + 5677, 5678, 5679, 5680, 5681, 5682, 5683, 5684, 5685, 5686, + 5687, 5688, 5689, 5690, 5691, 5692, 5693, 5694, 5695, 5696, + 5697, 5698, 5699, 5700, 5701, 5702, 5703, 5704, 5705, 5706, + 5707, 5708, 5709, 5710, 5711, 5712, 5713, 5714, 5715, 5716, + 5717, 5718, 5719, 5720, 5721, 5722, 5723, 5724, 5725, 5726, + 5727, 5728, 5729, 5730, 5731, 5732, 5733, 5734, 5735, 5736, + 5737, 5738, 5739, 5740, 5741, 5742, 5743, 5744, 5745, 5746, + 5747, 5748, 5749, 5750, 5751, 5752, 5753, 5754, 5755, 5756, + 5757, 5758, 5759, 5760, 5761, 5762, 5763, 5764, 5765, 5766, + + 5767, 5768, 5769, 5770, 5771, 5772, 5773, 5774, 5775, 5776, + 5777, 5778, 5779, 5780, 5781, 5782, 5783, 5784, 5785, 5786, + 5787, 5788, 5789, 5790, 5791, 5792, 5793, 5794, 5795, 5796, + 5797, 5798, 5799, 5800, 5801, 5802, 5803, 5804, 5805, 5806, + 5807, 5808, 5809, 5810, 5811, 5812, 5813, 5814, 5815, 5816, + 5817, 5818, 5819, 5820, 5821, 5822, 5823, 5824, 5825, 5826, + 5827, 5828, 5829, 5830, 5831, 5832, 5833, 5834, 5835, 5836, + 5837, 5838, 5839, 5840, 5841, 5842, 5843, 5848, 5844, 5849, + 5850, 5845, 5846, 5847, 5851, 5852, 5853, 5854, 5855, 5856, + 5857, 5858, 5859, 5860, 5861, 5862, 5863, 5864, 5865, 5866, + + 5867, 5868, 5869, 5870, 5871, 5872, 5873, 5874, 5875, 5876, + 5877, 5878, 5879, 5880, 5882, 5883, 5884, 5885, 5886, 5887, + 5888, 5889, 5881, 5890, 5891, 5892, 5893, 5894, 5895, 5896, + 5897, 5898, 5899, 5900, 5901, 5902, 5903, 5904, 5905, 5906, + 5907, 5908, 5909, 5910, 5911, 5912, 5913, 5914, 5915, 5916, + 5917, 5918, 5919, 5920, 5921, 5922, 5924, 5925, 5926, 5927, + 5928, 5929, 5930, 5931, 5923, 5932, 5933, 5934, 5935, 5936, + 5937, 5938, 5939, 5940, 5941, 5942, 5943, 5944, 5945, 5946, + 5947, 5948, 5949, 5950, 5951, 5952, 5953, 5954, 5955, 5956, + 5957, 5958, 5959, 5960, 5961, 5962, 5963, 5964, 5965, 5966, + + 5967, 5968, 5969, 5970, 5971, 5972, 5973, 5974, 5975, 5976, + 5977, 5978, 5979, 5980, 5981, 5982, 5983, 5984, 5985, 5986, + 5987, 5988, 5989, 5990, 5991, 5992, 5993, 5994, 5995, 5996, + 5997, 5998, 5999, 6000, 6001, 6002, 6003, 6004, 6005, 6006, + 6007, 6008, 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6016, + 6017, 6018, 6019, 6020, 6021, 6022, 6023, 6024, 6025, 6026, + 6027, 6028, 6029, 6030, 6031, 6032, 6033, 6034, 6035, 6036, + 6037, 6038, 6039, 6040, 6041, 6042, 6043, 6044, 6045, 6046, + 6047, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 6055, 6056, + 6057, 6058, 6059, 6060, 6061, 6062, 6063, 6064, 6065, 6066, + + 6067, 6068, 6069, 6070, 6071, 6072, 6073, 6074, 6075, 6076, + 6077, 6078, 6079, 6080, 6081, 6082, 6083, 6084, 6085, 6086, + 6087, 6088, 6089, 6090, 6091, 6092, 6093, 6094, 6095, 6096, + 6097, 6098, 6099, 6100, 6101, 6102, 6103, 6104, 6105, 6106, + 6107, 6108, 6109, 6110, 6111, 6112, 6113, 6114, 6115, 6117, + 6118, 6119, 6120, 6121, 6122, 6123, 6124, 6125, 6126, 6127, + 6128, 6129, 6130, 6116, 6131, 6132, 6133, 6134, 6135, 6136, + 6137, 6138, 6139, 6140, 6141, 6142, 6143, 6144, 6145, 6146, + 6147, 6148, 6149, 6150, 6151, 6152, 6153, 6154, 6155, 6156, + 6157, 6158, 6159, 6160, 6161, 6162, 6163, 6164, 6165, 6166, + + 6167, 6168, 6169, 6170, 6171, 6172, 6173, 6174, 6175, 6176, + 6177, 6178, 6179, 6180, 6181, 6182, 6183, 6184, 6185, 6186, + 6187, 6188, 6189, 6190, 6191, 6192, 6193, 6194, 6195, 6196, + 6197, 6198, 6199, 6200, 6201, 6202, 6203, 6204, 6205, 6206, + 6207, 6208, 6209, 6210, 6211, 6212, 6213, 6214, 6215, 6216, + 6217, 6218, 6219, 6220, 6221, 6222, 6223, 6224, 6225, 6226, + 6227, 6228, 6229, 6230, 6231, 6232, 6233, 6234, 6235, 6236, + 6237, 6238, 6239, 6240, 6241, 6242, 6243, 6244, 6245, 6246, + 6247, 6248, 6249, 6250, 6251, 6252, 6253, 6254, 6255, 6256, + 6257, 6258, 6259, 6260, 6261, 6262, 6263, 6264, 6265, 6266, + + 6267, 6268, 6269, 6270, 6271, 6272, 6273, 6274, 6275, 6276, + 75, 75, 75, 75, 160, 160, 160, 160, 203, 203, + 203, 203, 327, 327, 327, 327, 367, 380, 380, 384, + 384, 448, 509, 509, 513, 513, 534, 614, 534, 534, + 535, 709, 535, 535, 723, 733, 733, 733, 733, 762, + 762, 762, 762, 1505, 1504, 1503, 1502, 1501, 1500, 1499, + 1498, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, + 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, + 1476, 1475, 1474, 1473, 1470, 1469, 1468, 1467, 1464, 1463, + 1462, 1461, 1460, 1459, 1458, 1449, 1448, 1447, 1446, 1445, + + 1444, 1443, 1442, 1441, 1440, 1434, 1433, 1432, 1431, 1430, + 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1420, 1417, 1416, + 1415, 1414, 1411, 1407, 1404, 1403, 1402, 1401, 1400, 1394, + 1393, 1390, 1389, 1388, 1387, 1386, 1385, 1381, 1380, 1377, + 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1365, + 1364, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, + 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, + 1342, 1341, 1340, 1339, 1338, 1327, 1326, 1325, 1324, 1323, + 1322, 1321, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, + 1295, 1294, 1293, 1292, 1290, 1287, 1286, 1283, 1282, 1281, + + 1280, 1279, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, + 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, + 1258, 762, 734, 734, 1209, 1208, 1207, 1206, 1205, 1204, + 1203, 1202, 1201, 1198, 1197, 1196, 1195, 1194, 1193, 1192, + 1191, 1188, 1187, 1186, 1185, 1182, 1181, 1180, 1179, 1178, + 1175, 1174, 1171, 1167, 1166, 1165, 1164, 1163, 1162, 1161, + 1160, 1157, 1156, 1155, 1154, 1153, 1152, 1151, 1150, 1149, + 1148, 1147, 1146, 1145, 1142, 1141, 1140, 1139, 1138, 1135, + 1134, 1133, 1132, 1131, 1130, 1129, 1128, 1127, 1124, 1123, + 1122, 1121, 1118, 1117, 1116, 1115, 1112, 1111, 1110, 1109, + + 1108, 1107, 1106, 1105, 1104, 1103, 1102, 1101, 1100, 1099, + 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, 1087, + 1086, 1085, 1084, 1083, 1082, 1081, 1080, 1077, 1076, 1075, + 1074, 1073, 1072, 1069, 1068, 1067, 1066, 1065, 1064, 1063, + 1062, 1056, 1053, 1052, 1051, 1050, 1047, 1046, 1045, 1044, + 1041, 1040, 1037, 1036, 1035, 1029, 1028, 1027, 1026, 1025, + 1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, + 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 536, + 1005, 1004, 536, 999, 996, 995, 994, 993, 982, 981, + 980, 979, 978, 977, 976, 975, 957, 956, 955, 954, + + 953, 948, 947, 946, 940, 939, 938, 934, 930, 929, + 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, + 918, 911, 910, 909, 908, 907, 906, 903, 902, 901, + 899, 898, 896, 895, 892, 891, 890, 889, 888, 887, + 886, 885, 881, 880, 879, 878, 877, 876, 875, 874, + 873, 872, 871, 870, 869, 866, 865, 864, 863, 862, + 861, 849, 846, 845, 844, 843, 828, 825, 824, 823, + 822, 821, 820, 819, 818, 817, 816, 813, 812, 811, + 810, 809, 808, 802, 799, 794, 791, 782, 781, 778, + 777, 776, 764, 734, 734, 734, 734, 734, 734, 732, + + 731, 730, 729, 726, 725, 724, 718, 717, 716, 715, + 712, 711, 710, 694, 691, 658, 634, 624, 623, 622, + 621, 620, 617, 616, 615, 580, 373, 370, 369, 368, + 536, 536, 341, 370, 369, 368, 341, 470, 456, 452, + 450, 449, 419, 341, 373, 370, 369, 368, 341, 6277, + 278, 278, 63, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277 } ; -static yyconst flex_int16_t yy_chk[9090] = +static yyconst flex_int16_t yy_chk[9629] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 77, 0, 1, 182, 94, 0, 204, - 336, 1, 94, 94, 94, 336, 0, 77, 1, 95, - 182, 1, 1, 204, 95, 95, 95, 1, 7, 115, - 7, 120, 7, 9, 9, 8, 11, 8, 7, 8, - 7, 7, 262, 7, 115, 8, 262, 8, 8, 120, - 8, 9, 95, 11, 1, 2, 2, 2, 2, 2, + 1, 1, 1, 79, 0, 1, 185, 96, 0, 207, + 356, 1, 96, 96, 96, 356, 0, 79, 1, 160, + 185, 1, 1, 207, 160, 160, 160, 1, 7, 117, + 7, 122, 7, 9, 9, 8, 11, 8, 7, 8, + 7, 7, 265, 7, 117, 8, 265, 8, 8, 122, + 8, 9, 9, 11, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 12, 111, + 2, 2, 2, 2, 2, 2, 2, 2, 12, 113, - 2, 10, 10, 116, 263, 121, 2, 111, 263, 116, - 33, 121, 33, 2, 23, 12, 2, 2, 31, 10, - 24, 23, 2, 32, 23, 23, 23, 24, 33, 31, - 24, 24, 24, 31, 32, 31, 114, 31, 32, 1046, - 32, 136, 32, 213, 136, 139, 139, 114, 213, 2, + 2, 10, 10, 118, 51, 143, 2, 113, 51, 118, + 1052, 51, 143, 2, 23, 12, 2, 2, 51, 10, + 10, 23, 2, 24, 23, 23, 23, 31, 32, 53, + 24, 53, 217, 24, 24, 24, 1053, 116, 31, 32, + 217, 53, 31, 32, 31, 32, 31, 32, 116, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, @@ -3382,26 +3573,26 @@ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 17, 17, 17, 118, 17, 17, 122, 17, 49, 693, - 50, 17, 17, 118, 117, 17, 17, 17, 17, 18, - 18, 18, 122, 18, 18, 49, 18, 50, 117, 209, - 18, 18, 209, 693, 18, 18, 18, 18, 25, 25, + 17, 17, 17, 107, 17, 17, 1054, 17, 107, 107, + 107, 17, 17, 145, 140, 17, 17, 17, 17, 18, + 18, 18, 103, 18, 18, 145, 18, 103, 103, 103, + 18, 18, 140, 1055, 18, 18, 18, 18, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 51, 131, 25, 34, 37, 34, 52, 51, 25, - 1047, 37, 37, 37, 52, 51, 25, 37, 135, 25, - 25, 52, 34, 35, 35, 25, 177, 131, 35, 227, - 35, 39, 36, 36, 39, 35, 35, 36, 35, 36, + 25, 107, 33, 25, 33, 34, 319, 34, 103, 25, + 52, 155, 33, 155, 52, 34, 25, 52, 33, 25, + 25, 34, 35, 35, 52, 25, 319, 35, 119, 35, + 39, 36, 36, 39, 35, 35, 36, 35, 36, 35, - 35, 35, 39, 135, 36, 36, 227, 36, 39, 36, - 36, 177, 25, 26, 26, 26, 26, 26, 26, 26, + 35, 39, 119, 36, 36, 124, 36, 39, 36, 36, + 1056, 124, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 140, 142, 26, 40, - 38, 210, 40, 140, 26, 1048, 38, 38, 38, 142, - 40, 26, 38, 210, 26, 26, 40, 43, 43, 43, - 26, 43, 137, 43, 145, 112, 45, 43, 112, 43, - 43, 112, 45, 112, 43, 43, 146, 43, 45, 273, - 137, 45, 145, 152, 273, 152, 146, 26, 27, 27, + 26, 26, 26, 26, 26, 26, 134, 54, 26, 54, + 37, 214, 40, 214, 26, 40, 37, 37, 37, 54, + 38, 26, 37, 40, 26, 26, 38, 38, 38, 40, + 26, 134, 38, 43, 43, 43, 125, 43, 120, 43, + 123, 114, 249, 123, 114, 43, 43, 114, 120, 114, + 43, 43, 125, 43, 142, 142, 249, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, @@ -3412,22 +3603,22 @@ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 104, 179, 29, 208, - 221, 104, 104, 104, 29, 1049, 44, 44, 44, 184, + 29, 29, 29, 29, 29, 29, 97, 210, 29, 148, + 138, 97, 97, 97, 29, 180, 44, 44, 44, 182, - 44, 29, 44, 221, 29, 29, 44, 208, 44, 44, - 29, 46, 179, 44, 44, 47, 44, 46, 47, 47, - 47, 47, 147, 46, 184, 225, 46, 47, 47, 47, - 147, 401, 47, 147, 104, 401, 225, 29, 30, 30, + 44, 29, 44, 210, 29, 29, 45, 148, 44, 44, + 29, 46, 45, 44, 44, 138, 44, 46, 45, 97, + 180, 45, 139, 46, 182, 139, 46, 68, 68, 68, + 68, 68, 68, 68, 68, 256, 256, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 48, 188, 30, 48, 48, 48, 48, 133, 30, - 133, 252, 252, 48, 48, 48, 30, 222, 48, 30, - 30, 188, 133, 188, 222, 30, 66, 66, 66, 66, - 66, 66, 66, 66, 68, 133, 68, 68, 68, 68, + 30, 47, 149, 30, 47, 47, 47, 47, 212, 30, + 226, 212, 149, 47, 47, 47, 30, 226, 47, 30, + 30, 1057, 150, 48, 236, 30, 48, 48, 48, 48, + 150, 236, 151, 150, 151, 48, 48, 48, 213, 70, - 68, 68, 68, 68, 85, 85, 85, 85, 85, 85, - 85, 85, 30, 41, 41, 41, 41, 41, 41, 41, + 48, 70, 70, 70, 70, 70, 70, 70, 70, 151, + 213, 1058, 30, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, @@ -3445,909 +3636,969 @@ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 97, 149, 57, 215, - 101, 97, 97, 97, 57, 101, 101, 101, 215, 464, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 149, 57, 149, 149, 57, 57, 186, 97, 464, 69, - 57, 69, 69, 69, 69, 69, 69, 69, 69, 89, - 150, 89, 89, 89, 89, 89, 89, 89, 89, 276, - 97, 186, 97, 150, 276, 150, 101, 57, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 226, 59, 58, 245, 102, 79, 60, 207, 58, - 102, 102, 102, 1051, 226, 79, 58, 59, 245, 58, - 58, 79, 60, 228, 207, 58, 119, 119, 79, 212, - 228, 79, 79, 90, 230, 90, 90, 90, 90, 90, - - 90, 90, 90, 119, 119, 183, 148, 212, 148, 59, - 214, 230, 58, 102, 60, 216, 251, 59, 183, 251, - 1052, 151, 60, 148, 59, 214, 102, 59, 59, 60, - 216, 96, 60, 60, 67, 67, 96, 96, 96, 151, - 151, 326, 67, 183, 326, 67, 67, 67, 67, 67, - 67, 67, 67, 211, 259, 211, 67, 218, 67, 67, - 67, 67, 67, 67, 96, 259, 232, 67, 67, 67, - 67, 67, 98, 232, 67, 218, 1053, 98, 98, 98, - 99, 220, 67, 67, 100, 99, 99, 99, 67, 96, - 67, 98, 67, 100, 67, 220, 67, 256, 220, 100, - - 469, 220, 67, 99, 256, 98, 100, 103, 700, 100, - 100, 253, 103, 103, 103, 105, 98, 253, 106, 469, - 105, 105, 105, 106, 106, 106, 107, 138, 99, 258, - 98, 107, 107, 107, 108, 258, 267, 109, 1054, 108, - 108, 108, 109, 109, 109, 110, 265, 265, 267, 700, - 110, 110, 110, 124, 124, 124, 124, 124, 124, 124, - 124, 138, 106, 144, 268, 268, 144, 144, 270, 103, - 138, 138, 280, 105, 144, 138, 144, 280, 108, 144, - 108, 109, 270, 144, 107, 125, 125, 125, 125, 125, - 125, 125, 125, 110, 126, 109, 126, 126, 126, 126, - - 126, 126, 126, 126, 127, 1055, 127, 127, 127, 127, - 127, 127, 127, 127, 143, 143, 269, 269, 254, 272, - 254, 157, 143, 254, 329, 143, 157, 157, 157, 329, - 143, 143, 143, 155, 272, 155, 155, 155, 155, 155, - 155, 155, 155, 156, 274, 156, 156, 156, 156, 156, - 156, 156, 156, 158, 274, 278, 159, 278, 158, 158, - 158, 159, 159, 159, 160, 217, 312, 217, 161, 160, - 160, 160, 162, 161, 161, 161, 312, 162, 162, 162, - 217, 163, 224, 636, 224, 160, 158, 161, 290, 159, - 163, 325, 229, 636, 1058, 162, 163, 224, 325, 277, - - 229, 161, 290, 163, 229, 277, 163, 163, 168, 168, - 168, 168, 168, 168, 168, 168, 170, 277, 170, 170, - 170, 170, 170, 170, 170, 170, 171, 299, 171, 171, - 171, 171, 171, 171, 171, 171, 180, 185, 310, 334, - 331, 219, 206, 219, 180, 219, 185, 299, 219, 436, - 310, 206, 185, 219, 219, 1060, 436, 206, 331, 185, - 334, 180, 185, 185, 206, 311, 724, 206, 206, 180, - 193, 193, 193, 193, 193, 193, 193, 193, 195, 311, - 195, 195, 195, 195, 195, 195, 195, 195, 196, 724, - 196, 196, 196, 196, 196, 196, 196, 196, 231, 319, - - 360, 444, 231, 266, 266, 266, 231, 444, 332, 429, - 266, 332, 231, 319, 360, 231, 231, 234, 234, 234, - 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, - 235, 235, 235, 236, 429, 236, 236, 236, 236, 236, - 236, 236, 236, 237, 893, 237, 237, 237, 237, 237, - 237, 237, 237, 238, 893, 238, 238, 238, 238, 238, - 238, 238, 238, 239, 432, 239, 239, 239, 239, 239, - 239, 239, 239, 240, 504, 240, 240, 240, 240, 240, - 240, 240, 240, 257, 470, 257, 260, 260, 271, 432, - 470, 257, 271, 260, 271, 261, 271, 261, 260, 504, - - 257, 271, 260, 261, 261, 271, 271, 1062, 261, 261, - 282, 282, 282, 282, 282, 282, 282, 282, 283, 283, - 283, 283, 283, 283, 283, 283, 284, 1063, 284, 284, - 284, 284, 284, 284, 284, 284, 285, 300, 285, 285, - 285, 285, 285, 285, 285, 285, 383, 300, 300, 300, - 300, 300, 300, 300, 300, 301, 301, 543, 458, 460, - 383, 458, 460, 301, 543, 1064, 301, 301, 301, 301, - 301, 301, 301, 301, 458, 460, 337, 301, 327, 301, - 301, 301, 301, 301, 301, 337, 327, 615, 301, 301, - 301, 301, 301, 327, 337, 301, 506, 540, 502, 615, - - 366, 486, 540, 301, 301, 366, 366, 366, 508, 301, - 414, 301, 502, 301, 302, 301, 414, 301, 486, 414, - 510, 506, 302, 301, 302, 302, 302, 302, 302, 302, - 302, 302, 303, 508, 554, 650, 650, 554, 509, 510, - 303, 510, 303, 303, 303, 303, 303, 303, 303, 303, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 313, 509, 610, 661, 661, 1066, 610, 620, - 307, 307, 307, 548, 563, 315, 313, 315, 315, 315, - 315, 315, 315, 315, 315, 313, 620, 367, 548, 563, - 368, 313, 367, 367, 367, 368, 368, 368, 313, 630, - - 465, 313, 313, 322, 322, 322, 322, 322, 322, 322, - 322, 324, 324, 465, 666, 666, 1067, 709, 367, 324, - 698, 630, 368, 465, 307, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 308, 308, 346, 346, 346, - 346, 346, 346, 346, 346, 308, 308, 308, 347, 698, - 347, 347, 347, 347, 347, 347, 347, 347, 568, 324, - 324, 703, 308, 709, 1068, 324, 568, 324, 705, 324, - 369, 324, 695, 324, 685, 369, 369, 369, 348, 324, - 348, 348, 348, 348, 348, 348, 348, 348, 363, 363, - 363, 363, 363, 363, 363, 363, 685, 695, 364, 308, - - 364, 364, 364, 364, 364, 364, 364, 364, 365, 1069, - 365, 365, 365, 365, 365, 365, 365, 365, 370, 716, - 716, 703, 705, 370, 370, 370, 371, 369, 690, 372, - 704, 371, 371, 371, 372, 372, 372, 373, 370, 706, - 374, 876, 373, 373, 373, 374, 374, 374, 375, 372, - 876, 376, 707, 375, 375, 375, 376, 376, 376, 377, - 690, 715, 696, 715, 377, 377, 377, 690, 378, 373, - 374, 385, 371, 378, 378, 378, 385, 385, 385, 386, - 443, 443, 387, 696, 386, 386, 386, 387, 387, 387, - 388, 443, 708, 443, 667, 388, 388, 388, 704, 706, - - 377, 696, 389, 667, 667, 375, 376, 389, 389, 389, - 667, 719, 707, 390, 719, 717, 391, 385, 390, 390, - 390, 391, 391, 391, 392, 891, 387, 393, 717, 392, - 392, 392, 393, 393, 393, 378, 386, 394, 891, 691, - 491, 697, 394, 394, 394, 491, 491, 491, 692, 388, - 492, 1070, 708, 388, 774, 492, 492, 492, 774, 389, - 422, 422, 422, 422, 422, 422, 422, 422, 721, 692, - 390, 691, 720, 393, 691, 391, 697, 692, 1071, 697, - 720, 492, 394, 721, 692, 392, 423, 423, 423, 423, - 423, 423, 423, 423, 424, 1072, 424, 424, 424, 424, - - 424, 424, 424, 424, 425, 1073, 425, 425, 425, 425, - 425, 425, 425, 425, 476, 1075, 476, 718, 718, 476, - 476, 476, 477, 753, 477, 766, 476, 477, 477, 477, - 699, 851, 476, 476, 477, 851, 476, 1076, 753, 766, - 477, 477, 488, 488, 488, 488, 488, 488, 488, 488, - 489, 699, 489, 489, 489, 489, 489, 489, 489, 489, - 490, 1077, 490, 490, 490, 490, 490, 490, 490, 490, - 493, 1078, 699, 494, 694, 493, 493, 493, 494, 494, - 494, 495, 882, 701, 496, 882, 495, 495, 495, 496, - 496, 496, 497, 494, 722, 536, 556, 497, 497, 497, - - 536, 556, 493, 694, 701, 726, 536, 556, 694, 701, - 536, 556, 886, 495, 496, 886, 536, 556, 579, 579, - 579, 579, 579, 579, 579, 579, 1079, 872, 723, 722, - 726, 872, 1080, 497, 580, 580, 580, 580, 580, 580, - 580, 580, 581, 1083, 581, 581, 581, 581, 581, 581, - 581, 581, 582, 1084, 582, 582, 582, 582, 582, 582, - 582, 582, 583, 723, 583, 583, 583, 583, 583, 583, - 583, 583, 669, 669, 669, 669, 669, 669, 669, 669, - 670, 670, 670, 670, 670, 670, 670, 670, 671, 1085, - 671, 671, 671, 671, 671, 671, 671, 671, 672, 686, - - 672, 672, 672, 672, 672, 672, 672, 672, 702, 686, - 686, 686, 686, 686, 686, 686, 686, 689, 689, 735, - 735, 711, 950, 1086, 725, 689, 862, 735, 862, 1087, - 702, 711, 711, 711, 711, 711, 711, 711, 711, 702, - 1088, 712, 884, 1089, 884, 725, 1090, 950, 702, 712, - 884, 712, 712, 712, 712, 712, 712, 712, 712, 725, - 1081, 1081, 789, 960, 985, 689, 689, 789, 789, 789, - 960, 689, 985, 689, 1036, 689, 713, 689, 1036, 689, - 1091, 865, 789, 865, 713, 689, 713, 713, 713, 713, - 713, 713, 713, 713, 727, 865, 727, 727, 727, 727, - - 727, 727, 727, 727, 768, 768, 768, 768, 768, 768, - 768, 768, 769, 1092, 769, 769, 769, 769, 769, 769, - 769, 769, 783, 783, 783, 783, 783, 783, 783, 783, - 784, 1022, 784, 784, 784, 784, 784, 784, 784, 784, - 785, 1056, 1093, 1022, 1094, 785, 785, 785, 786, 769, - 1056, 787, 1095, 786, 786, 786, 787, 787, 787, 790, - 952, 1097, 1098, 788, 790, 790, 790, 784, 788, 788, - 788, 785, 791, 1099, 1100, 792, 1102, 791, 791, 791, - 792, 792, 792, 1103, 1050, 952, 786, 793, 875, 787, - 788, 1105, 793, 793, 793, 875, 1107, 791, 792, 794, - - 1050, 875, 792, 795, 794, 794, 794, 796, 795, 795, - 795, 790, 796, 796, 796, 804, 1108, 847, 805, 1109, - 804, 804, 804, 805, 805, 805, 806, 1111, 1115, 807, - 1074, 806, 806, 806, 807, 807, 807, 793, 808, 1116, - 1117, 795, 847, 808, 808, 808, 1074, 794, 809, 1118, - 1119, 794, 810, 809, 809, 809, 812, 810, 810, 810, - 811, 812, 812, 812, 847, 811, 811, 811, 1042, 1120, - 796, 1121, 1042, 1122, 1123, 806, 805, 813, 1042, 804, - 814, 1124, 813, 813, 813, 814, 814, 814, 1127, 1128, - 1104, 807, 843, 843, 843, 843, 843, 843, 843, 843, - - 1129, 1104, 907, 1104, 907, 1130, 809, 907, 907, 907, - 1131, 937, 812, 1132, 1131, 810, 937, 937, 937, 811, - 1133, 844, 813, 844, 844, 844, 844, 844, 844, 844, - 844, 1134, 814, 935, 935, 935, 935, 935, 935, 935, - 935, 936, 937, 936, 936, 936, 936, 936, 936, 936, - 936, 1135, 1136, 1143, 938, 1138, 1139, 939, 844, 938, - 938, 938, 939, 939, 939, 940, 1145, 1148, 941, 1151, - 940, 940, 940, 941, 941, 941, 942, 1136, 936, 1137, - 1137, 942, 942, 942, 939, 1139, 1153, 1137, 1156, 1159, - 940, 941, 938, 1143, 1140, 941, 1030, 1030, 1030, 1030, - - 1030, 1030, 1030, 1030, 1031, 1138, 1031, 1031, 1031, 1031, - 1031, 1031, 1031, 1031, 942, 1125, 1125, 1125, 1125, 1125, - 1125, 1125, 1125, 1126, 1141, 1126, 1126, 1126, 1126, 1126, - 1126, 1126, 1126, 1140, 1142, 1144, 1146, 1147, 1149, 1150, - 1152, 1031, 1154, 1155, 1157, 1160, 1158, 1161, 1163, 1162, - 1164, 1165, 1167, 1141, 1166, 1172, 1168, 1172, 1169, 1173, - 1126, 1152, 1177, 1184, 1173, 1146, 1175, 1177, 1142, 1147, - 1155, 1174, 1149, 1144, 1175, 1180, 1161, 1174, 1150, 1170, - 1179, 1154, 1182, 1178, 1157, 1155, 1158, 1162, 1181, 1170, - 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1178, 1176, 1164, - - 1183, 1166, 1176, 1165, 1168, 1187, 1184, 1188, 1176, 1180, - 1181, 1163, 1189, 1179, 1171, 1190, 1182, 1191, 1168, 1190, - 1167, 1169, 1171, 1192, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1183, 1185, 1193, 1185, 1185, 1185, 1185, 1185, - 1185, 1185, 1185, 1194, 1195, 1196, 1197, 1198, 1199, 1200, - 1201, 1202, 1203, 1204, 1205, 1206, 1208, 1209, 1210, 1171, - 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, - 1185, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1206, - 1229, 1230, 1231, 1213, 1232, 1215, 1233, 1234, 1235, 1236, - 1233, 1250, 1237, 1251, 1236, 1236, 1236, 1237, 1237, 1237, - - 1238, 1252, 1253, 1239, 1254, 1238, 1238, 1238, 1239, 1239, - 1239, 1240, 1256, 1267, 1241, 1268, 1240, 1240, 1240, 1241, - 1241, 1241, 1236, 1242, 1269, 1237, 1243, 1272, 1242, 1242, - 1242, 1243, 1243, 1243, 1244, 1273, 1239, 1245, 1275, 1244, - 1244, 1244, 1245, 1245, 1245, 1246, 1242, 1276, 1247, 1277, - 1246, 1246, 1246, 1247, 1247, 1247, 1244, 1255, 1238, 1248, - 1279, 1255, 1280, 1240, 1248, 1248, 1248, 1243, 1249, 1282, - 1283, 1257, 1241, 1249, 1249, 1249, 1257, 1257, 1257, 1284, - 1285, 1258, 1286, 1287, 1259, 1245, 1258, 1258, 1258, 1259, - 1259, 1259, 1288, 1291, 1260, 1247, 1292, 1293, 1294, 1260, - - 1260, 1260, 1248, 1260, 1260, 1260, 1295, 1296, 1261, 1297, - 1298, 1262, 1246, 1261, 1261, 1261, 1262, 1262, 1262, 1263, - 1299, 1300, 1264, 1304, 1263, 1263, 1263, 1264, 1264, 1264, - 1265, 1305, 1257, 1266, 1300, 1265, 1265, 1265, 1266, 1266, - 1266, 1301, 1306, 1308, 1300, 1309, 1258, 1259, 1310, 1311, - 1306, 1314, 1315, 1316, 1301, 1317, 1320, 1321, 1323, 1322, - 1324, 1324, 1325, 1326, 1261, 1322, 1264, 1328, 1330, 1262, - 1331, 1263, 1332, 1333, 1334, 1330, 1335, 1336, 1337, 1338, - 1339, 1330, 1265, 1340, 1341, 1342, 1343, 1330, 1344, 1345, - 1346, 1266, 1348, 1349, 1352, 1353, 1354, 1355, 1358, 1360, - - 1361, 1362, 1368, 1369, 1371, 1371, 1372, 1373, 1375, 1376, - 1377, 1378, 1385, 1386, 1379, 1387, 1378, 1378, 1378, 1379, - 1379, 1379, 1380, 1388, 1389, 1381, 1391, 1380, 1380, 1380, - 1381, 1381, 1381, 1382, 1392, 1394, 1383, 1395, 1382, 1382, - 1382, 1383, 1383, 1383, 1378, 1384, 1396, 1379, 1381, 1390, - 1384, 1384, 1384, 1390, 1397, 1380, 1398, 1398, 1383, 1392, - 1399, 1399, 1400, 1401, 1403, 1404, 1405, 1406, 1408, 1409, - 1415, 1416, 1417, 1418, 1382, 1419, 1421, 1425, 1426, 1427, - 1428, 1429, 1430, 1419, 1431, 1437, 1438, 1439, 1384, 1440, - 1441, 1442, 1443, 1446, 1448, 1449, 1450, 1451, 1453, 1454, - - 1451, 1451, 1455, 1456, 1457, 1458, 1459, 1460, 1462, 1463, - 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1473, 1474, - 1475, 1476, 1478, 1480, 1481, 1483, 1484, 1485, 1486, 1487, - 1488, 1489, 1493, 1494, 1495, 1496, 1497, 1499, 1497, 1500, - 1502, 1504, 1505, 1506, 1497, 1507, 1508, 1510, 1511, 1513, - 1514, 1515, 1516, 1517, 1507, 1518, 1519, 1520, 1521, 1522, - 1524, 1525, 1524, 1526, 1527, 1528, 1515, 1529, 1513, 1521, - 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, - 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1550, 1552, - 1553, 1554, 1555, 1556, 1557, 1559, 1560, 1561, 1558, 1562, - - 1563, 1564, 1566, 1565, 1567, 1568, 1570, 1569, 1572, 1571, - 1573, 1573, 1574, 1576, 1577, 1578, 1552, 1555, 1554, 1558, - 1559, 1579, 1561, 1566, 1562, 1564, 1565, 1580, 1563, 1556, - 1571, 1573, 1581, 1582, 1557, 1569, 1560, 1575, 1575, 1570, - 1583, 1568, 1584, 1585, 1586, 1588, 1587, 1566, 1590, 1589, - 1591, 1585, 1584, 1553, 1594, 1586, 1587, 1592, 1575, 1595, - 1572, 1596, 1593, 1597, 1598, 1574, 1580, 1579, 1599, 1601, - 1602, 1577, 1603, 1604, 1605, 1576, 1606, 1607, 1608, 1591, - 1610, 1578, 1589, 1611, 1592, 1612, 1613, 1593, 1590, 1615, - 1588, 1593, 1616, 1617, 1594, 1618, 1620, 1622, 1624, 1625, - - 1627, 1628, 1629, 1624, 1630, 1631, 1632, 1633, 1634, 1635, - 1636, 1637, 1634, 1638, 1639, 1640, 1641, 1642, 1622, 1643, - 1625, 1644, 1645, 1646, 1647, 1648, 1661, 1662, 1649, 1663, - 1648, 1648, 1648, 1649, 1649, 1649, 1650, 1664, 1665, 1651, - 1666, 1650, 1650, 1650, 1651, 1651, 1651, 1652, 1667, 1668, - 1681, 1682, 1652, 1652, 1652, 1653, 1683, 1648, 1684, 1685, - 1653, 1653, 1653, 1686, 1649, 1651, 1654, 1687, 1688, 1651, - 1655, 1654, 1654, 1654, 1689, 1655, 1655, 1655, 1690, 1691, - 1693, 1653, 1694, 1695, 1696, 1653, 1656, 1697, 1699, 1655, - 1700, 1656, 1656, 1656, 1657, 1701, 1702, 1650, 1703, 1657, - - 1657, 1657, 1654, 1658, 1706, 1652, 1659, 1708, 1658, 1658, - 1658, 1659, 1659, 1659, 1660, 1709, 1707, 1669, 1710, 1660, - 1660, 1660, 1669, 1669, 1669, 1670, 1707, 1713, 1671, 1656, - 1670, 1670, 1670, 1671, 1671, 1671, 1672, 1714, 1715, 1673, - 1718, 1672, 1672, 1672, 1673, 1673, 1673, 1658, 1711, 1698, - 1711, 1660, 1674, 1698, 1720, 1657, 1712, 1674, 1674, 1674, - 1675, 1669, 1711, 1676, 1721, 1675, 1675, 1675, 1676, 1676, - 1676, 1677, 1722, 1723, 1678, 1724, 1677, 1677, 1677, 1678, - 1678, 1678, 1679, 1670, 1725, 1726, 1680, 1679, 1679, 1679, - 1712, 1680, 1680, 1680, 1727, 1729, 1730, 1731, 1732, 1712, - - 1733, 1734, 1735, 1738, 1712, 1736, 1736, 1734, 1675, 1737, - 1737, 1739, 1740, 1734, 1741, 1742, 1743, 1744, 1745, 1746, - 1747, 1748, 1750, 1751, 1676, 1752, 1753, 1754, 1677, 1678, - 1755, 1756, 1757, 1758, 1759, 1760, 1762, 1680, 1762, 1764, - 1679, 1680, 1765, 1766, 1767, 1771, 1772, 1771, 1773, 1780, - 1781, 1774, 1782, 1773, 1773, 1773, 1774, 1774, 1774, 1775, - 1783, 1784, 1776, 1785, 1775, 1775, 1775, 1776, 1776, 1776, - 1786, 1777, 1787, 1789, 1791, 1797, 1777, 1777, 1777, 1798, - 1773, 1799, 1800, 1801, 1802, 1775, 1778, 1774, 1803, 1775, - 1777, 1778, 1778, 1778, 1779, 1804, 1806, 1807, 1776, 1779, - - 1779, 1779, 1805, 1808, 1805, 1809, 1810, 1811, 1812, 1813, - 1814, 1815, 1817, 1819, 1820, 1819, 1821, 1822, 1823, 1825, - 1826, 1827, 1828, 1830, 1831, 1832, 1833, 1834, 1835, 1778, - 1836, 1779, 1837, 1838, 1836, 1839, 1840, 1841, 1842, 1846, - 1847, 1848, 1849, 1850, 1851, 1853, 1854, 1855, 1856, 1857, - 1858, 1859, 1860, 1862, 1863, 1864, 1866, 1868, 1869, 1870, - 1871, 1872, 1873, 1874, 1876, 1877, 1878, 1879, 1880, 1881, - 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, - 1893, 1894, 1896, 1897, 1898, 1900, 1901, 1902, 1903, 1894, - 1904, 1905, 1906, 1908, 1911, 1913, 1914, 1915, 1916, 1917, - - 1918, 1919, 1916, 1920, 1921, 1922, 1923, 1924, 1926, 1925, - 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1935, 1934, 1937, - 1936, 1938, 1940, 1939, 1942, 1943, 1943, 1944, 1941, 1945, - 1946, 1946, 1947, 1948, 1922, 1929, 1949, 1950, 1951, 1927, - 1937, 1924, 1925, 1952, 1926, 1960, 1943, 1928, 1931, 1939, - 1961, 1946, 1957, 1932, 1936, 1933, 1934, 1941, 1953, 1953, - 1954, 1956, 1938, 1954, 1956, 1955, 1957, 1958, 1952, 1955, - 1923, 1959, 1955, 1962, 1963, 1959, 1964, 1958, 1965, 1966, - 1967, 1968, 1970, 1950, 1960, 1961, 1945, 1971, 1969, 1973, - 1949, 1945, 1969, 1974, 1976, 1977, 1951, 1978, 1979, 1948, - - 1980, 1964, 1981, 1966, 1982, 1983, 1984, 1985, 1962, 1963, - 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, - 1996, 1965, 1997, 1998, 1999, 1967, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 1995, 2007, 2008, 2009, 2010, 2011, 2008, - 2012, 2013, 2014, 2028, 2029, 2015, 2030, 2014, 2014, 2014, - 2015, 2015, 2015, 2016, 2032, 2033, 2017, 2034, 2016, 2016, - 2016, 2017, 2017, 2017, 2018, 2035, 2045, 2019, 2046, 2018, - 2018, 2018, 2019, 2019, 2019, 2020, 2047, 2048, 2049, 2031, - 2020, 2020, 2020, 2031, 2050, 2014, 2051, 2052, 2015, 2021, - 2053, 2017, 2054, 2019, 2021, 2021, 2021, 2019, 2022, 2018, - - 2056, 2023, 2057, 2022, 2022, 2022, 2023, 2023, 2023, 2024, - 2020, 2058, 2025, 2059, 2024, 2024, 2024, 2025, 2025, 2025, - 2026, 2060, 2061, 2062, 2021, 2026, 2026, 2026, 2027, 2063, - 2064, 2036, 2065, 2027, 2027, 2027, 2036, 2036, 2036, 2066, - 2067, 2022, 2037, 2068, 2023, 2069, 2024, 2037, 2037, 2037, - 2038, 2027, 2070, 2039, 2073, 2038, 2038, 2038, 2039, 2039, - 2039, 2040, 2073, 2074, 2041, 2075, 2040, 2040, 2040, 2041, - 2041, 2041, 2042, 2076, 2077, 2043, 2078, 2042, 2042, 2042, - 2043, 2043, 2043, 2044, 2079, 2080, 2081, 2082, 2044, 2044, - 2044, 2083, 2085, 2086, 2036, 2088, 2089, 2090, 2091, 2092, - - 2095, 2096, 2097, 2098, 2099, 2100, 2102, 2103, 2104, 2105, - 2110, 2040, 2112, 2117, 2118, 2119, 2121, 2122, 2123, 2124, - 2125, 2126, 2128, 2042, 2129, 2130, 2131, 2042, 2132, 2133, - 2134, 2135, 2136, 2137, 2145, 2043, 2146, 2147, 2137, 2137, - 2137, 2138, 2149, 2044, 2139, 2150, 2138, 2138, 2138, 2139, - 2139, 2139, 2140, 2151, 2152, 2141, 2153, 2140, 2140, 2140, - 2141, 2141, 2141, 2142, 2154, 2155, 2143, 2156, 2142, 2142, - 2142, 2143, 2143, 2143, 2148, 2157, 2137, 2158, 2148, 2139, - 2159, 2160, 2161, 2162, 2138, 2144, 2163, 2140, 2164, 2165, - 2144, 2144, 2144, 2166, 2167, 2168, 2169, 2170, 2141, 2171, - - 2172, 2173, 2174, 2143, 2175, 2176, 2142, 2177, 2144, 2178, - 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, - 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2199, - 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, - 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2219, 2220, - 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, - 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, - 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2251, - 2252, 2253, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, - 2264, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, - - 2275, 2276, 2277, 2279, 2278, 2280, 2282, 2281, 2283, 2284, - 2285, 2286, 2287, 2288, 2289, 2292, 2269, 2292, 2298, 2290, - 2274, 2275, 2291, 2271, 2270, 2266, 2296, 2277, 2278, 2290, - 2296, 2293, 2291, 2293, 2294, 2272, 2281, 2279, 2273, 2295, - 2282, 2276, 2297, 2298, 2294, 2280, 2267, 2299, 2300, 2295, - 2302, 2301, 2297, 2303, 2289, 2304, 2285, 2305, 2307, 2308, - 2311, 2312, 2313, 2288, 2314, 2316, 2317, 2318, 2319, 2287, - 2320, 2321, 2286, 2322, 2303, 2284, 2323, 2288, 2283, 2301, - 2325, 2299, 2326, 2301, 2327, 2328, 2300, 2329, 2302, 2330, - 2331, 2332, 2333, 2334, 2335, 2336, 2305, 2337, 2338, 2339, - - 2304, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, - 2349, 2350, 2351, 2333, 2352, 2353, 2365, 2366, 2354, 2367, - 2353, 2353, 2353, 2354, 2354, 2354, 2355, 2368, 2369, 2356, - 2370, 2355, 2355, 2355, 2356, 2356, 2356, 2371, 2357, 2372, - 2373, 2358, 2380, 2357, 2357, 2357, 2358, 2358, 2358, 2381, - 2382, 2359, 2353, 2383, 2360, 2354, 2359, 2359, 2359, 2360, - 2360, 2360, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2355, - 2391, 2392, 2356, 2357, 2361, 2393, 2358, 2362, 2394, 2361, - 2361, 2361, 2362, 2362, 2362, 2363, 2395, 2396, 2364, 2397, - 2363, 2363, 2363, 2364, 2364, 2364, 2374, 2398, 2399, 2375, - - 2400, 2374, 2374, 2374, 2375, 2375, 2375, 2401, 2363, 2402, - 2376, 2361, 2403, 2377, 2362, 2376, 2376, 2376, 2377, 2377, - 2377, 2404, 2378, 2405, 2406, 2379, 2364, 2378, 2378, 2378, - 2379, 2379, 2379, 2408, 2410, 2411, 2412, 2413, 2414, 2415, - 2416, 2415, 2417, 2418, 2374, 2419, 2420, 2421, 2422, 2423, - 2424, 2425, 2426, 2427, 2428, 2429, 2434, 2436, 2437, 2438, - 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, - 2376, 2448, 2449, 2377, 2450, 2451, 2452, 2453, 2462, 2454, - 2463, 2447, 2455, 2447, 2454, 2454, 2454, 2455, 2455, 2455, - 2456, 2464, 2465, 2457, 2466, 2456, 2456, 2456, 2457, 2457, - - 2457, 2458, 2467, 2468, 2459, 2469, 2458, 2458, 2458, 2459, - 2459, 2459, 2470, 2471, 2472, 2473, 2454, 2460, 2474, 2455, - 2461, 2475, 2460, 2460, 2460, 2461, 2461, 2461, 2476, 2477, - 2478, 2479, 2480, 2456, 2481, 2482, 2457, 2483, 2458, 2484, - 2460, 2459, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, - 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2461, 2501, - 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, - 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, - 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, - 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, - - 2542, 2545, 2546, 2547, 2548, 2549, 2550, 2553, 2554, 2555, - 2556, 2557, 2558, 2559, 2560, 2561, 2563, 2564, 2565, 2566, - 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, - 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2586, 2587, - 2585, 2578, 2588, 2589, 2591, 2590, 2592, 2593, 2594, 2595, - 2596, 2597, 2598, 2599, 2600, 2600, 2593, 2601, 2602, 2609, - 2587, 2610, 2602, 2588, 2609, 2580, 2604, 2605, 2581, 2590, - 2586, 2583, 2584, 2585, 2603, 2600, 2604, 2605, 2603, 2606, - 2592, 2608, 2607, 2606, 2611, 2589, 2607, 2612, 2613, 2614, - 2615, 2608, 2579, 2616, 2617, 2595, 2618, 2601, 2621, 2622, - - 2623, 2610, 2624, 2625, 2626, 2627, 2598, 2596, 2629, 2630, - 2631, 2594, 2597, 2632, 2633, 2634, 2635, 2636, 2599, 2637, - 2638, 2618, 2639, 2640, 2641, 2613, 2614, 2643, 2644, 2611, - 2645, 2646, 2612, 2617, 2647, 2615, 2648, 2649, 2616, 2650, - 2651, 2652, 2653, 2654, 2655, 2641, 2656, 2657, 2658, 2659, - 2660, 2661, 2662, 2672, 2673, 2663, 2674, 2662, 2662, 2662, - 2663, 2663, 2663, 2664, 2675, 2676, 2665, 2677, 2664, 2664, - 2664, 2665, 2665, 2665, 2666, 2662, 2678, 2667, 2663, 2666, - 2666, 2666, 2667, 2667, 2667, 2668, 2679, 2680, 2669, 2684, - 2668, 2668, 2668, 2669, 2669, 2669, 2685, 2686, 2687, 2670, - - 2664, 2688, 2689, 2665, 2670, 2670, 2670, 2671, 2668, 2690, - 2681, 2669, 2671, 2671, 2671, 2681, 2681, 2681, 2682, 2691, - 2692, 2683, 2693, 2682, 2682, 2682, 2683, 2683, 2683, 2694, - 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2670, 2702, 2703, - 2704, 2705, 2706, 2707, 2708, 2671, 2709, 2710, 2712, 2713, - 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, - 2724, 2725, 2726, 2726, 2727, 2728, 2729, 2730, 2731, 2732, - 2733, 2728, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, - 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, - 2752, 2753, 2754, 2755, 2763, 2764, 2756, 2765, 2755, 2755, - - 2755, 2756, 2756, 2756, 2757, 2766, 2767, 2758, 2768, 2757, - 2757, 2757, 2758, 2758, 2758, 2759, 2755, 2769, 2770, 2756, - 2759, 2759, 2759, 2760, 2771, 2772, 2761, 2773, 2760, 2760, - 2760, 2761, 2761, 2761, 2774, 2775, 2776, 2777, 2759, 2778, - 2779, 2757, 2762, 2780, 2758, 2781, 2760, 2762, 2762, 2762, - 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, - 2792, 2793, 2794, 2795, 2761, 2796, 2797, 2798, 2799, 2800, - 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, - 2762, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, - 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, - - 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, - 2840, 2841, 2842, 2843, 2845, 2846, 2847, 2848, 2849, 2850, - 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 215, 219, 59, 121, 121, 215, 255, 218, 59, + 255, 219, 268, 268, 271, 271, 59, 121, 121, 59, + 59, 121, 121, 218, 71, 59, 71, 71, 71, 71, + 71, 71, 71, 71, 87, 87, 87, 87, 87, 87, + + 87, 87, 91, 1059, 91, 91, 91, 91, 91, 91, + 91, 91, 59, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 1061, 61, 60, 266, + 104, 81, 62, 266, 60, 104, 104, 104, 229, 152, + 81, 60, 61, 187, 60, 60, 81, 62, 189, 229, + 60, 154, 152, 81, 152, 152, 81, 81, 92, 231, + 92, 92, 92, 92, 92, 92, 92, 92, 187, 154, + 154, 153, 211, 189, 61, 225, 231, 60, 104, 62, + 748, 136, 61, 136, 153, 191, 153, 62, 225, 61, + + 211, 104, 61, 61, 62, 136, 98, 62, 62, 69, + 69, 98, 98, 98, 191, 220, 191, 69, 136, 748, + 69, 69, 69, 69, 69, 69, 69, 69, 186, 262, + 220, 69, 222, 69, 69, 69, 69, 69, 69, 98, + 262, 186, 69, 69, 69, 69, 69, 99, 346, 69, + 222, 346, 99, 99, 99, 100, 234, 69, 270, 1062, + 100, 100, 100, 69, 98, 69, 186, 69, 99, 69, + 270, 69, 101, 234, 100, 102, 105, 101, 101, 101, + 106, 105, 105, 105, 102, 106, 106, 106, 100, 276, + 102, 99, 273, 99, 276, 101, 275, 102, 108, 100, + + 102, 102, 109, 108, 108, 108, 273, 109, 109, 109, + 110, 275, 221, 100, 221, 110, 110, 110, 111, 277, + 101, 272, 272, 111, 111, 111, 112, 221, 106, 277, + 163, 112, 112, 112, 165, 163, 163, 163, 105, 165, + 165, 165, 108, 127, 127, 127, 127, 127, 127, 127, + 127, 163, 141, 257, 110, 261, 110, 165, 296, 257, + 109, 261, 111, 128, 128, 128, 128, 128, 128, 128, + 128, 281, 296, 281, 112, 129, 111, 129, 129, 129, + 129, 129, 129, 129, 129, 130, 141, 130, 130, 130, + 130, 130, 130, 130, 130, 141, 141, 146, 146, 233, + + 141, 228, 332, 228, 224, 146, 147, 233, 146, 147, + 147, 233, 332, 146, 146, 146, 228, 147, 224, 147, + 352, 224, 147, 352, 224, 158, 147, 158, 158, 158, + 158, 158, 158, 158, 158, 159, 809, 159, 159, 159, + 159, 159, 159, 159, 159, 161, 580, 809, 162, 580, + 161, 161, 161, 162, 162, 162, 164, 166, 269, 269, + 269, 164, 164, 164, 216, 269, 166, 216, 258, 283, + 258, 216, 166, 258, 216, 164, 232, 345, 161, 166, + 232, 162, 166, 166, 345, 310, 232, 232, 283, 164, + 171, 171, 171, 171, 171, 171, 171, 171, 173, 310, + + 173, 173, 173, 173, 173, 173, 173, 173, 174, 658, + 174, 174, 174, 174, 174, 174, 174, 174, 183, 188, + 486, 285, 351, 223, 209, 223, 183, 223, 188, 486, + 223, 658, 278, 209, 188, 223, 223, 278, 285, 209, + 351, 188, 466, 183, 188, 188, 209, 331, 466, 209, + 209, 183, 196, 196, 196, 196, 196, 196, 196, 196, + 198, 331, 198, 198, 198, 198, 198, 198, 198, 198, + 199, 330, 199, 199, 199, 199, 199, 199, 199, 199, + 230, 235, 339, 330, 765, 235, 349, 230, 230, 235, + 419, 349, 451, 230, 419, 235, 339, 765, 235, 235, + + 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, + 239, 239, 239, 239, 239, 239, 240, 451, 240, 240, + 240, 240, 240, 240, 240, 240, 241, 664, 241, 241, + 241, 241, 241, 241, 241, 241, 242, 664, 242, 242, + 242, 242, 242, 242, 242, 242, 243, 1064, 243, 243, + 243, 243, 243, 243, 243, 243, 244, 454, 244, 244, + 244, 244, 244, 244, 244, 244, 260, 492, 260, 263, + 263, 274, 354, 492, 260, 274, 263, 274, 264, 274, + 264, 263, 454, 260, 274, 263, 264, 264, 274, 274, + 279, 264, 264, 354, 284, 347, 279, 284, 378, 566, + + 750, 284, 458, 347, 566, 1065, 284, 284, 279, 458, + 347, 1066, 378, 284, 287, 287, 287, 287, 287, 287, + 287, 287, 288, 288, 288, 288, 288, 288, 288, 288, + 289, 1067, 289, 289, 289, 289, 289, 289, 289, 289, + 290, 750, 290, 290, 290, 290, 290, 290, 290, 290, + 302, 302, 302, 302, 302, 302, 302, 302, 303, 303, + 303, 303, 303, 303, 303, 303, 304, 1069, 304, 304, + 304, 304, 304, 304, 304, 304, 305, 320, 305, 305, + 305, 305, 305, 305, 305, 305, 401, 320, 320, 320, + 320, 320, 320, 320, 320, 321, 321, 569, 480, 482, + + 401, 480, 482, 321, 569, 1072, 321, 321, 321, 321, + 321, 321, 321, 321, 480, 482, 357, 321, 491, 321, + 321, 321, 321, 321, 321, 357, 574, 508, 321, 321, + 321, 321, 321, 384, 357, 321, 434, 491, 384, 384, + 384, 574, 434, 321, 508, 434, 526, 528, 322, 321, + 530, 321, 591, 321, 524, 321, 322, 321, 322, 322, + 322, 322, 322, 322, 322, 322, 323, 591, 524, 678, + 678, 526, 528, 531, 323, 530, 323, 323, 323, 323, + 323, 323, 323, 323, 327, 327, 327, 327, 327, 327, + 327, 327, 327, 327, 327, 327, 333, 767, 531, 598, + + 767, 532, 694, 694, 327, 327, 327, 598, 1073, 335, + 333, 335, 335, 335, 335, 335, 335, 335, 335, 333, + 532, 385, 532, 745, 386, 333, 385, 385, 385, 386, + 386, 386, 333, 735, 487, 333, 333, 342, 342, 342, + 342, 342, 342, 342, 342, 344, 344, 487, 745, 700, + 638, 700, 385, 344, 638, 735, 386, 487, 327, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 364, 364, 364, 364, 364, 364, 364, 364, 328, + 328, 328, 365, 643, 365, 365, 365, 365, 365, 365, + 365, 365, 763, 344, 763, 643, 328, 764, 764, 344, + + 1074, 344, 772, 344, 743, 344, 366, 344, 366, 366, + 366, 366, 366, 366, 366, 366, 381, 381, 381, 381, + 381, 381, 381, 381, 387, 772, 648, 1075, 743, 387, + 387, 387, 382, 328, 382, 382, 382, 382, 382, 382, + 382, 382, 383, 648, 383, 383, 383, 383, 383, 383, + 383, 383, 388, 465, 465, 389, 691, 388, 388, 388, + 389, 389, 389, 390, 465, 691, 465, 753, 390, 390, + 390, 391, 388, 688, 688, 688, 391, 391, 391, 392, + 1076, 387, 393, 390, 392, 392, 392, 393, 393, 393, + 394, 766, 766, 395, 747, 394, 394, 394, 395, 395, + + 395, 389, 912, 391, 912, 396, 755, 756, 403, 392, + 396, 396, 396, 403, 403, 403, 404, 751, 757, 405, + 768, 404, 404, 404, 405, 405, 405, 753, 768, 747, + 406, 1078, 747, 741, 395, 406, 406, 406, 751, 393, + 754, 407, 1079, 751, 408, 394, 407, 407, 407, 408, + 408, 408, 409, 758, 403, 410, 740, 409, 409, 409, + 410, 410, 410, 405, 411, 741, 755, 756, 741, 411, + 411, 411, 396, 404, 412, 746, 749, 513, 757, 412, + 412, 412, 513, 513, 513, 515, 1081, 774, 740, 406, + 515, 515, 515, 406, 754, 740, 746, 749, 407, 758, + + 769, 408, 444, 444, 444, 444, 444, 444, 444, 444, + 411, 409, 774, 1082, 746, 769, 410, 515, 749, 412, + 445, 445, 445, 445, 445, 445, 445, 445, 446, 770, + 446, 446, 446, 446, 446, 446, 446, 446, 447, 943, + 447, 447, 447, 447, 447, 447, 447, 447, 498, 943, + 498, 783, 783, 498, 498, 498, 499, 800, 499, 783, + 498, 499, 499, 499, 770, 820, 498, 498, 499, 820, + 498, 771, 800, 1080, 499, 499, 510, 510, 510, 510, + 510, 510, 510, 510, 511, 1080, 511, 511, 511, 511, + 511, 511, 511, 511, 512, 941, 512, 512, 512, 512, + + 512, 512, 512, 512, 514, 812, 771, 516, 941, 514, + 514, 514, 516, 516, 516, 517, 742, 744, 518, 812, + 517, 517, 517, 518, 518, 518, 519, 516, 915, 562, + 915, 519, 519, 519, 562, 514, 932, 742, 582, 932, + 562, 1000, 915, 582, 562, 742, 744, 517, 518, 582, + 562, 744, 742, 582, 901, 1083, 922, 832, 901, 582, + 922, 1084, 832, 832, 832, 1086, 1000, 519, 609, 609, + 609, 609, 609, 609, 609, 609, 610, 610, 610, 610, + 610, 610, 610, 610, 611, 1087, 611, 611, 611, 611, + 611, 611, 611, 611, 612, 832, 612, 612, 612, 612, + + 612, 612, 612, 612, 613, 1090, 613, 613, 613, 613, + 613, 613, 613, 613, 705, 705, 705, 705, 705, 705, + 705, 705, 706, 706, 706, 706, 706, 706, 706, 706, + 707, 1091, 707, 707, 707, 707, 707, 707, 707, 707, + 708, 1092, 708, 708, 708, 708, 708, 708, 708, 708, + 719, 719, 719, 719, 719, 719, 719, 719, 720, 720, + 720, 720, 720, 720, 720, 720, 721, 1093, 721, 721, + 721, 721, 721, 721, 721, 721, 722, 736, 722, 722, + 722, 722, 722, 722, 722, 722, 752, 736, 736, 736, + 736, 736, 736, 736, 736, 739, 739, 897, 936, 759, + + 833, 936, 773, 739, 1095, 833, 833, 833, 752, 759, + 759, 759, 759, 759, 759, 759, 759, 752, 1010, 760, + 1039, 1096, 897, 773, 1098, 1010, 752, 760, 1039, 760, + 760, 760, 760, 760, 760, 760, 760, 773, 833, 1099, + 834, 926, 1101, 739, 897, 834, 834, 834, 761, 739, + 926, 739, 1103, 739, 1104, 739, 761, 739, 761, 761, + 761, 761, 761, 761, 761, 761, 775, 834, 775, 775, + 775, 775, 775, 775, 775, 775, 814, 814, 814, 814, + 814, 814, 814, 814, 815, 1105, 815, 815, 815, 815, + 815, 815, 815, 815, 829, 829, 829, 829, 829, 829, + + 829, 829, 830, 1106, 830, 830, 830, 830, 830, 830, + 830, 830, 831, 1107, 934, 1109, 934, 831, 831, 831, + 835, 815, 934, 836, 1110, 835, 835, 835, 836, 836, + 836, 837, 1111, 1114, 1116, 1118, 837, 837, 837, 830, + 835, 838, 1002, 831, 839, 1112, 838, 838, 838, 839, + 839, 839, 840, 1108, 1112, 841, 837, 840, 840, 840, + 841, 841, 841, 1119, 838, 842, 1120, 1002, 838, 1108, + 842, 842, 842, 850, 1122, 836, 851, 1123, 850, 850, + 850, 851, 851, 851, 852, 1124, 1125, 1126, 1127, 852, + 852, 852, 853, 841, 839, 1128, 854, 853, 853, 853, + + 840, 854, 854, 854, 840, 855, 1129, 1131, 856, 1132, + 855, 855, 855, 856, 856, 856, 857, 1133, 1134, 1135, + 858, 857, 857, 857, 859, 858, 858, 858, 842, 859, + 859, 859, 1094, 852, 851, 860, 1094, 850, 1136, 1139, + 860, 860, 860, 893, 893, 893, 893, 893, 893, 893, + 893, 1130, 1140, 894, 853, 894, 894, 894, 894, 894, + 894, 894, 894, 855, 1100, 925, 1141, 1130, 1100, 859, + 1142, 856, 925, 1143, 1100, 857, 858, 957, 925, 957, + 1137, 1137, 957, 957, 957, 1144, 1145, 860, 1146, 1147, + 894, 985, 985, 985, 985, 985, 985, 985, 985, 986, + + 1148, 986, 986, 986, 986, 986, 986, 986, 986, 987, + 1149, 1150, 988, 1151, 987, 987, 987, 988, 988, 988, + 989, 1153, 1154, 990, 1155, 989, 989, 989, 990, 990, + 990, 1156, 991, 1158, 1159, 1161, 986, 991, 991, 991, + 987, 1163, 1164, 1160, 1165, 1166, 992, 989, 990, 1171, + 988, 992, 992, 992, 1160, 991, 1160, 1172, 1173, 991, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1089, 1174, + 1089, 1089, 1089, 1089, 1089, 1089, 1089, 1089, 1175, 1176, + 1177, 1179, 1181, 1182, 992, 1183, 1184, 1185, 1187, 1188, + 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1191, 1192, + + 1193, 1194, 1196, 1197, 1190, 1089, 1190, 1190, 1190, 1190, + 1190, 1190, 1190, 1190, 1195, 1198, 1201, 1202, 1195, 1199, + 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1200, 1203, 1200, + 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1204, 1205, 1206, + 1207, 1190, 1205, 1208, 1209, 1210, 1211, 1211, 1212, 1213, + 1214, 1215, 1216, 1217, 1211, 1218, 1221, 1219, 1220, 1222, + 1223, 1224, 1225, 1226, 1200, 1227, 1229, 1228, 1230, 1232, + 1210, 1231, 1233, 1234, 1235, 1236, 1237, 1212, 1238, 1214, + 1239, 1240, 1241, 1225, 1250, 1215, 1219, 1244, 1213, 1244, + 1220, 1217, 1216, 1222, 1228, 1245, 1259, 1247, 1250, 1223, + + 1245, 1246, 1234, 1242, 1227, 1247, 1252, 1246, 1230, 1228, + 1254, 1231, 1235, 1242, 1242, 1242, 1242, 1242, 1242, 1242, + 1242, 1256, 1248, 1260, 1253, 1238, 1248, 1251, 1237, 1240, + 1249, 1255, 1248, 1261, 1263, 1249, 1264, 1265, 1236, 1237, + 1252, 1243, 1266, 1240, 1254, 1241, 1253, 1267, 1239, 1243, + 1268, 1243, 1243, 1243, 1243, 1243, 1243, 1243, 1243, 1269, + 1251, 1270, 1262, 1255, 1256, 1257, 1262, 1257, 1257, 1257, + 1257, 1257, 1257, 1257, 1257, 1271, 1272, 1273, 1274, 1275, + 1276, 1277, 1279, 1280, 1281, 1282, 1243, 1283, 1284, 1285, + 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, + + 1296, 1297, 1257, 1298, 1299, 1277, 1300, 1301, 1302, 1303, + 1304, 1286, 1305, 1306, 1304, 1307, 1321, 1322, 1308, 1323, + 1307, 1307, 1307, 1308, 1308, 1308, 1309, 1324, 1325, 1310, + 1327, 1309, 1309, 1309, 1310, 1310, 1310, 1311, 1338, 1339, + 1312, 1340, 1311, 1311, 1311, 1312, 1312, 1312, 1307, 1313, + 1343, 1308, 1314, 1344, 1313, 1313, 1313, 1314, 1314, 1314, + 1315, 1346, 1310, 1316, 1347, 1315, 1315, 1315, 1316, 1316, + 1316, 1317, 1313, 1348, 1318, 1350, 1317, 1317, 1317, 1318, + 1318, 1318, 1315, 1326, 1309, 1319, 1351, 1326, 1352, 1311, + 1319, 1319, 1319, 1314, 1320, 1354, 1355, 1328, 1312, 1320, + + 1320, 1320, 1328, 1328, 1328, 1356, 1357, 1329, 1358, 1359, + 1330, 1316, 1329, 1329, 1329, 1330, 1330, 1330, 1360, 1361, + 1331, 1318, 1364, 1365, 1366, 1331, 1331, 1331, 1319, 1331, + 1331, 1331, 1367, 1368, 1332, 1369, 1370, 1333, 1317, 1332, + 1332, 1332, 1333, 1333, 1333, 1334, 1371, 1372, 1335, 1377, + 1334, 1334, 1334, 1335, 1335, 1335, 1336, 1373, 1328, 1337, + 1378, 1336, 1336, 1336, 1337, 1337, 1337, 1379, 1374, 1381, + 1373, 1382, 1329, 1330, 1383, 1379, 1384, 1387, 1388, 1389, + 1373, 1374, 1390, 1393, 1394, 1395, 1396, 1397, 1397, 1398, + 1332, 1395, 1335, 1399, 1401, 1333, 1403, 1334, 1404, 1405, + + 1406, 1407, 1408, 1403, 1409, 1410, 1411, 1412, 1336, 1403, + 1413, 1414, 1415, 1416, 1417, 1403, 1418, 1337, 1419, 1421, + 1422, 1425, 1426, 1427, 1428, 1431, 1433, 1434, 1435, 1441, + 1442, 1444, 1444, 1445, 1446, 1448, 1449, 1450, 1451, 1458, + 1459, 1452, 1460, 1451, 1451, 1451, 1452, 1452, 1452, 1453, + 1461, 1462, 1454, 1464, 1453, 1453, 1453, 1454, 1454, 1454, + 1455, 1465, 1467, 1456, 1468, 1455, 1455, 1455, 1456, 1456, + 1456, 1451, 1457, 1469, 1452, 1454, 1463, 1457, 1457, 1457, + 1463, 1470, 1453, 1471, 1471, 1456, 1465, 1472, 1472, 1473, + 1474, 1476, 1477, 1479, 1482, 1483, 1485, 1486, 1487, 1493, + + 1494, 1455, 1495, 1496, 1497, 1499, 1503, 1504, 1505, 1506, + 1507, 1508, 1497, 1509, 1515, 1457, 1516, 1517, 1519, 1520, + 1521, 1522, 1524, 1525, 1528, 1530, 1531, 1532, 1533, 1535, + 1536, 1533, 1533, 1537, 1538, 1539, 1540, 1541, 1542, 1544, + 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1555, + 1556, 1557, 1558, 1560, 1561, 1563, 1564, 1565, 1566, 1567, + 1568, 1569, 1573, 1574, 1575, 1576, 1577, 1579, 1577, 1580, + 1582, 1584, 1585, 1586, 1577, 1587, 1588, 1590, 1591, 1593, + 1594, 1595, 1596, 1597, 1587, 1598, 1599, 1600, 1601, 1602, + 1604, 1605, 1604, 1606, 1607, 1608, 1595, 1609, 1593, 1601, + + 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, + 1621, 1623, 1625, 1627, 1628, 1629, 1630, 1631, 1632, 1633, + 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1644, 1646, 1647, + 1649, 1650, 1648, 1651, 1652, 1653, 1654, 1655, 1660, 1656, + 1657, 1661, 1658, 1663, 1662, 1665, 1666, 1659, 1664, 1669, + 1667, 1670, 1668, 1668, 1651, 1646, 1647, 1648, 1671, 1652, + 1672, 1654, 1655, 1673, 1657, 1658, 1649, 1656, 1659, 1664, + 1674, 1650, 1662, 1668, 1675, 1653, 1663, 1661, 1676, 1677, + 1678, 1680, 1679, 1681, 1682, 1683, 1684, 1685, 1678, 1677, + 1687, 1680, 1659, 1679, 1686, 1688, 1689, 1665, 1690, 1666, + + 1667, 1691, 1673, 1692, 1694, 1695, 1672, 1696, 1670, 1697, + 1698, 1669, 1699, 1700, 1685, 1684, 1702, 1682, 1703, 1686, + 1704, 1705, 1707, 1686, 1671, 1683, 1708, 1709, 1681, 1710, + 1687, 1712, 1714, 1715, 1716, 1718, 1719, 1714, 1720, 1721, + 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1725, 1729, 1730, + 1731, 1732, 1733, 1734, 1735, 1716, 1736, 1737, 1738, 1739, + 1752, 1753, 1740, 1754, 1739, 1739, 1739, 1740, 1740, 1740, + 1741, 1755, 1756, 1742, 1757, 1741, 1741, 1741, 1742, 1742, + 1742, 1743, 1758, 1759, 1772, 1773, 1743, 1743, 1743, 1744, + 1774, 1739, 1775, 1776, 1744, 1744, 1744, 1777, 1740, 1742, + + 1745, 1778, 1779, 1742, 1746, 1745, 1745, 1745, 1780, 1746, + 1746, 1746, 1781, 1782, 1783, 1744, 1785, 1786, 1787, 1744, + 1747, 1788, 1789, 1746, 1790, 1747, 1747, 1747, 1748, 1792, + 1793, 1741, 1794, 1748, 1748, 1748, 1745, 1749, 1795, 1743, + 1750, 1796, 1749, 1749, 1749, 1750, 1750, 1750, 1751, 1799, + 1800, 1760, 1801, 1751, 1751, 1751, 1760, 1760, 1760, 1761, + 1800, 1802, 1762, 1747, 1761, 1761, 1761, 1762, 1762, 1762, + 1763, 1803, 1806, 1764, 1807, 1763, 1763, 1763, 1764, 1764, + 1764, 1749, 1804, 1791, 1804, 1751, 1765, 1791, 1808, 1748, + 1805, 1765, 1765, 1765, 1766, 1760, 1804, 1767, 1811, 1766, + + 1766, 1766, 1767, 1767, 1767, 1768, 1813, 1814, 1769, 1815, + 1768, 1768, 1768, 1769, 1769, 1769, 1770, 1761, 1816, 1817, + 1771, 1770, 1770, 1770, 1805, 1771, 1771, 1771, 1818, 1819, + 1820, 1822, 1823, 1805, 1824, 1825, 1826, 1827, 1805, 1828, + 1829, 1829, 1766, 1827, 1830, 1830, 1831, 1832, 1833, 1827, + 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1767, 1843, + 1844, 1845, 1768, 1769, 1846, 1847, 1848, 1849, 1850, 1851, + 1852, 1771, 1853, 1857, 1770, 1771, 1855, 1858, 1855, 1859, + 1860, 1864, 1865, 1864, 1866, 1873, 1874, 1867, 1875, 1866, + 1866, 1866, 1867, 1867, 1867, 1868, 1876, 1877, 1869, 1878, + + 1868, 1868, 1868, 1869, 1869, 1869, 1879, 1870, 1880, 1882, + 1884, 1890, 1870, 1870, 1870, 1891, 1866, 1892, 1893, 1895, + 1896, 1868, 1871, 1867, 1897, 1868, 1870, 1871, 1871, 1871, + 1872, 1894, 1898, 1899, 1869, 1872, 1872, 1872, 1894, 1901, + 1900, 1894, 1900, 1902, 1903, 1904, 1899, 1905, 1906, 1907, + 1908, 1909, 1910, 1912, 1914, 1915, 1914, 1916, 1917, 1918, + 1919, 1920, 1922, 1923, 1924, 1871, 1925, 1872, 1927, 1928, + 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1933, 1937, + 1938, 1939, 1943, 1944, 1945, 1946, 1947, 1948, 1950, 1951, + 1952, 1953, 1954, 1955, 1956, 1958, 1959, 1960, 1962, 1964, + + 1965, 1966, 1967, 1968, 1969, 1970, 1972, 1973, 1974, 1975, + 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, + 1986, 1987, 1989, 1990, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 1990, 2000, 2001, 2002, 2004, 2006, 2008, 2009, 2011, + 2012, 2013, 2014, 2015, 2016, 2017, 2014, 2018, 2019, 2020, + 2021, 2022, 2023, 2024, 2021, 2025, 2026, 2027, 2028, 2030, + 2029, 2031, 2032, 2034, 2033, 2035, 2036, 2037, 2039, 2038, + 2041, 2040, 2042, 2044, 2043, 2046, 2047, 2050, 2048, 2045, + 2049, 2049, 2051, 2052, 2053, 2054, 2027, 2033, 2060, 2055, + 2031, 2041, 2028, 2029, 2064, 2030, 2056, 2056, 2032, 2035, + + 2043, 2049, 2060, 2063, 2036, 2040, 2037, 2038, 2045, 2057, + 2061, 2058, 2057, 2042, 2055, 2058, 2059, 2062, 2058, 2059, + 2061, 2062, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2064, + 2053, 2072, 2073, 2047, 2074, 2072, 2076, 2052, 2047, 2048, + 2078, 2079, 2063, 2054, 2080, 2081, 2082, 2083, 2051, 2067, + 2069, 2084, 2085, 2086, 2087, 2088, 2089, 2065, 2066, 2090, + 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2068, 2099, + 2100, 2101, 2070, 2102, 2103, 2104, 2105, 2106, 2107, 2108, + 2109, 2098, 2110, 2111, 2112, 2113, 2114, 2111, 2115, 2116, + 2117, 2131, 2132, 2118, 2133, 2117, 2117, 2117, 2118, 2118, + + 2118, 2119, 2135, 2136, 2120, 2137, 2119, 2119, 2119, 2120, + 2120, 2120, 2121, 2138, 2148, 2122, 2149, 2121, 2121, 2121, + 2122, 2122, 2122, 2123, 2150, 2151, 2152, 2134, 2123, 2123, + 2123, 2134, 2153, 2117, 2154, 2155, 2118, 2124, 2156, 2120, + 2157, 2122, 2124, 2124, 2124, 2122, 2125, 2121, 2158, 2126, + 2160, 2125, 2125, 2125, 2126, 2126, 2126, 2127, 2123, 2161, + 2128, 2162, 2127, 2127, 2127, 2128, 2128, 2128, 2129, 2163, + 2164, 2165, 2124, 2129, 2129, 2129, 2130, 2166, 2167, 2139, + 2168, 2130, 2130, 2130, 2139, 2139, 2139, 2169, 2170, 2125, + 2140, 2171, 2126, 2172, 2127, 2140, 2140, 2140, 2141, 2130, + + 2173, 2142, 2174, 2141, 2141, 2141, 2142, 2142, 2142, 2143, + 2175, 2179, 2144, 2178, 2143, 2143, 2143, 2144, 2144, 2144, + 2145, 2178, 2180, 2146, 2181, 2145, 2145, 2145, 2146, 2146, + 2146, 2147, 2182, 2183, 2184, 2185, 2147, 2147, 2147, 2186, + 2187, 2188, 2139, 2190, 2191, 2193, 2194, 2195, 2196, 2197, + 2200, 2201, 2202, 2203, 2204, 2205, 2207, 2208, 2209, 2143, + 2210, 2215, 2217, 2222, 2223, 2224, 2226, 2227, 2228, 2229, + 2230, 2145, 2231, 2233, 2234, 2145, 2235, 2236, 2237, 2238, + 2239, 2240, 2241, 2146, 2250, 2251, 2252, 2242, 2254, 2255, + 2243, 2147, 2242, 2242, 2242, 2243, 2243, 2243, 2256, 2244, + + 2257, 2258, 2245, 2259, 2244, 2244, 2244, 2245, 2245, 2245, + 2246, 2260, 2261, 2247, 2262, 2246, 2246, 2246, 2247, 2247, + 2247, 2248, 2263, 2264, 2265, 2253, 2248, 2248, 2248, 2253, + 2242, 2266, 2267, 2243, 2244, 2268, 2249, 2245, 2269, 2270, + 2271, 2249, 2249, 2249, 2272, 2273, 2274, 2275, 2276, 2277, + 2278, 2279, 2280, 2246, 2281, 2282, 2247, 2283, 2248, 2249, + 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, + 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, + 2304, 2305, 2306, 2307, 2308, 2309, 2311, 2312, 2313, 2314, + 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, + + 2325, 2326, 2327, 2328, 2330, 2331, 2332, 2333, 2334, 2335, + 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, + 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, + 2356, 2357, 2358, 2359, 2360, 2362, 2363, 2364, 2365, 2367, + 2368, 2369, 2370, 2368, 2371, 2372, 2373, 2374, 2375, 2376, + 2377, 2378, 2368, 2368, 2379, 2380, 2381, 2382, 2383, 2368, + 2384, 2385, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, + 2395, 2396, 2397, 2399, 2398, 2400, 2402, 2401, 2403, 2404, + 2405, 2406, 2407, 2408, 2410, 2409, 2389, 2420, 2425, 2411, + 2394, 2395, 2412, 2391, 2390, 2419, 2387, 2397, 2398, 2411, + + 2417, 2413, 2412, 2413, 2417, 2392, 2401, 2399, 2393, 2415, + 2402, 2396, 2414, 2416, 2414, 2400, 2418, 2421, 2422, 2415, + 2419, 2420, 2423, 2416, 2410, 2405, 2418, 2406, 2426, 2428, + 2424, 2429, 2432, 2425, 2433, 2409, 2434, 2436, 2437, 2438, + 2408, 2439, 2440, 2407, 2441, 2404, 2422, 2442, 2403, 2409, + 2422, 2424, 2443, 2445, 2446, 2421, 2447, 2448, 2449, 2450, + 2423, 2451, 2452, 2449, 2453, 2454, 2455, 2426, 2456, 2457, + 2458, 2459, 2460, 2461, 2462, 2449, 2463, 2464, 2465, 2466, + 2467, 2468, 2469, 2470, 2471, 2472, 2454, 2473, 2474, 2486, + 2487, 2475, 2488, 2474, 2474, 2474, 2475, 2475, 2475, 2476, + + 2489, 2490, 2477, 2491, 2476, 2476, 2476, 2477, 2477, 2477, + 2492, 2478, 2493, 2494, 2479, 2501, 2478, 2478, 2478, 2479, + 2479, 2479, 2502, 2503, 2480, 2474, 2504, 2481, 2475, 2480, + 2480, 2480, 2481, 2481, 2481, 2505, 2506, 2507, 2508, 2509, + 2510, 2511, 2476, 2512, 2513, 2477, 2478, 2482, 2514, 2479, + 2483, 2515, 2482, 2482, 2482, 2483, 2483, 2483, 2484, 2516, + 2517, 2485, 2518, 2484, 2484, 2484, 2485, 2485, 2485, 2495, + 2519, 2520, 2496, 2521, 2495, 2495, 2495, 2496, 2496, 2496, + 2522, 2484, 2523, 2497, 2482, 2524, 2498, 2483, 2497, 2497, + 2497, 2498, 2498, 2498, 2525, 2499, 2526, 2527, 2500, 2485, + + 2499, 2499, 2499, 2500, 2500, 2500, 2528, 2529, 2531, 2533, + 2534, 2535, 2536, 2537, 2538, 2539, 2538, 2495, 2540, 2541, + 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, + 2552, 2557, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, + 2567, 2568, 2569, 2497, 2570, 2571, 2498, 2571, 2572, 2573, + 2574, 2575, 2576, 2585, 2586, 2577, 2587, 2570, 2578, 2570, + 2577, 2577, 2577, 2578, 2578, 2578, 2579, 2588, 2589, 2580, + 2590, 2579, 2579, 2579, 2580, 2580, 2580, 2581, 2591, 2592, + 2582, 2593, 2581, 2581, 2581, 2582, 2582, 2582, 2594, 2595, + 2596, 2597, 2577, 2583, 2598, 2578, 2584, 2599, 2583, 2583, + + 2583, 2584, 2584, 2584, 2600, 2601, 2602, 2603, 2604, 2579, + 2605, 2606, 2580, 2609, 2581, 2610, 2583, 2582, 2611, 2612, + 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, + 2623, 2624, 2625, 2626, 2584, 2627, 2628, 2629, 2630, 2631, + 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, + 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, + 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, + 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, + 2674, 2675, 2676, 2677, 2678, 2679, 2682, 2683, 2684, 2685, + 2686, 2687, 2688, 2689, 2690, 2692, 2693, 2694, 2695, 2696, + + 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, + 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, + 2717, 2718, 2719, 2720, 2721, 2702, 2722, 2723, 2724, 2725, + 2726, 2727, 2729, 2730, 2728, 2731, 2722, 2732, 2734, 2733, + 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2755, + 2736, 2744, 2744, 2745, 2730, 2754, 2731, 2746, 2748, 2723, + 2749, 2746, 2724, 2733, 2729, 2726, 2727, 2728, 2748, 2747, + 2749, 2750, 2744, 2747, 2735, 2750, 2751, 2752, 2753, 2732, + 2751, 2756, 2757, 2753, 2758, 2759, 2760, 2752, 2761, 2738, + 2762, 2739, 2765, 2745, 2755, 2754, 2739, 2766, 2767, 2768, + + 2769, 2742, 2740, 2770, 2772, 2737, 2773, 2741, 2739, 2774, + 2775, 2776, 2777, 2743, 2778, 2762, 2779, 2780, 2781, 2757, + 2782, 2758, 2783, 2784, 2785, 2786, 2756, 2761, 2787, 2789, + 2759, 2760, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, + 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2787, + 2807, 2808, 2818, 2819, 2809, 2820, 2808, 2808, 2808, 2809, + 2809, 2809, 2810, 2821, 2822, 2811, 2823, 2810, 2810, 2810, + 2811, 2811, 2811, 2812, 2808, 2824, 2813, 2809, 2812, 2812, + 2812, 2813, 2813, 2813, 2814, 2825, 2826, 2815, 2830, 2814, + 2814, 2814, 2815, 2815, 2815, 2831, 2832, 2833, 2816, 2810, + + 2834, 2835, 2811, 2816, 2816, 2816, 2817, 2814, 2836, 2827, + 2815, 2817, 2817, 2817, 2827, 2827, 2827, 2828, 2837, 2838, + 2829, 2839, 2828, 2828, 2828, 2829, 2829, 2829, 2840, 2841, + 2842, 2843, 2844, 2845, 2846, 2847, 2816, 2848, 2849, 2850, + 2851, 2852, 2853, 2854, 2817, 2855, 2856, 2857, 2858, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, - 2871, 2872, 2873, 2865, 2865, 2874, 2875, 2876, 2877, 2878, - 2865, 2879, 2880, 2881, 2882, 2883, 2885, 2884, 2886, 2887, - 2888, 2889, 2890, 2891, 2892, 2874, 2894, 2894, 2895, 2893, - 2896, 2905, 2878, 2897, 2898, 2877, 2899, 2880, 2884, 2883, - 2899, 2887, 2886, 2897, 2898, 2901, 2900, 2894, 2902, 2879, - 2900, 2876, 2903, 2906, 2882, 2901, 2907, 2903, 2902, 2896, - - 2908, 2885, 2904, 2909, 2910, 2875, 2912, 2904, 2911, 2913, - 2888, 2905, 2914, 2918, 2919, 2921, 2890, 2891, 2889, 2893, - 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2892, - 2931, 2912, 2906, 2932, 2933, 2907, 2934, 2935, 2936, 2937, - 2938, 2939, 2940, 2910, 2941, 2908, 2931, 2911, 2909, 2913, - 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, - 2952, 2960, 2961, 2953, 2962, 2952, 2952, 2952, 2953, 2953, - 2953, 2954, 2963, 2964, 2955, 2965, 2954, 2954, 2954, 2955, - 2955, 2955, 2956, 2966, 2967, 2957, 2968, 2956, 2956, 2956, - 2957, 2957, 2957, 2969, 2954, 2970, 2971, 2955, 2952, 2958, - - 2972, 2953, 2959, 2973, 2958, 2958, 2958, 2959, 2959, 2959, - 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, - 2956, 2984, 2985, 2957, 2986, 2987, 2988, 2989, 2990, 2959, - 2978, 2978, 2991, 2992, 2993, 2995, 2994, 2958, 2994, 2996, - 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, - 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3016, 3017, - 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, - 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, - 3037, 3038, 3039, 3040, 3041, 3049, 3050, 3042, 3051, 3041, - 3041, 3041, 3042, 3042, 3042, 3043, 3052, 3053, 3044, 3054, + 2871, 2872, 2873, 2874, 2874, 2875, 2876, 2877, 2878, 2879, + 2880, 2881, 2876, 2882, 2883, 2884, 2885, 2886, 2887, 2888, + 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, + 2899, 2900, 2901, 2902, 2903, 2911, 2912, 2904, 2913, 2903, + + 2903, 2903, 2904, 2904, 2904, 2905, 2914, 2915, 2906, 2916, + 2905, 2905, 2905, 2906, 2906, 2906, 2907, 2903, 2917, 2918, + 2904, 2907, 2907, 2907, 2908, 2919, 2920, 2909, 2921, 2908, + 2908, 2908, 2909, 2909, 2909, 2922, 2923, 2924, 2925, 2907, + 2926, 2927, 2905, 2910, 2928, 2906, 2929, 2908, 2910, 2910, + 2910, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, + 2939, 2940, 2941, 2942, 2943, 2909, 2944, 2945, 2946, 2947, + 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, + 2958, 2910, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, + 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, - 3043, 3043, 3043, 3044, 3044, 3044, 3045, 3055, 3056, 3046, - 3057, 3045, 3045, 3045, 3046, 3046, 3046, 3058, 3043, 3059, - 3060, 3044, 3041, 3047, 3061, 3042, 3048, 3062, 3047, 3047, - 3047, 3048, 3048, 3048, 3063, 3064, 3065, 3066, 3067, 3068, - 3069, 3070, 3071, 3072, 3045, 3069, 3073, 3046, 3074, 3075, - 3069, 3076, 3077, 3048, 3078, 3069, 3079, 3080, 3081, 3082, - 3083, 3047, 3084, 3085, 3082, 3086, 3087, 3089, 3090, 3082, - 3091, 3092, 3094, 3095, 3082, 3096, 3097, 3098, 3099, 3100, - 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, - 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, - - 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, - 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, - 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, - 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, - 3161, 3162, 3163, 3164, 3165, 3162, 3166, 3167, 3168, 3169, - 3170, 3172, 3171, 3174, 3173, 3175, 3176, 3177, 3178, 3179, - 3180, 3181, 3182, 3183, 3186, 3184, 3185, 3182, 3183, 3186, - 3190, 3166, 3187, 3191, 3174, 3184, 3185, 3187, 3169, 3173, - 3188, 3189, 3192, 3195, 3196, 3188, 3193, 3189, 3194, 3170, - 3171, 3167, 3197, 3172, 3198, 3181, 3200, 3202, 3191, 3190, - - 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3192, 3195, 3196, - 3176, 3211, 3212, 3179, 3215, 3214, 3175, 3178, 3216, 3217, - 3218, 3219, 3177, 3180, 3220, 3193, 3221, 3194, 3214, 3179, - 3222, 3223, 3197, 3224, 3198, 3225, 3226, 3227, 3228, 3229, - 3230, 3231, 3232, 3233, 3234, 3242, 3243, 3235, 3244, 3234, - 3234, 3234, 3235, 3235, 3235, 3236, 3245, 3246, 3237, 3247, - 3236, 3236, 3236, 3237, 3237, 3237, 3238, 3248, 3249, 3239, - 3250, 3238, 3238, 3238, 3239, 3239, 3239, 3251, 3252, 3253, - 3254, 3240, 3234, 3255, 3241, 3235, 3240, 3240, 3240, 3241, - 3241, 3241, 3256, 3236, 3257, 3259, 3237, 3260, 3261, 3262, - - 3263, 3264, 3265, 3266, 3238, 3267, 3268, 3239, 3240, 3269, - 3270, 3271, 3272, 3273, 3274, 3275, 3241, 3276, 3277, 3278, - 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, - 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, - 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, - 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, - 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3334, 3335, - 3327, 3336, 3326, 3326, 3326, 3327, 3327, 3327, 3328, 3337, - 3338, 3329, 3339, 3328, 3328, 3328, 3329, 3329, 3329, 3330, - 3340, 3341, 3331, 3342, 3330, 3330, 3330, 3331, 3331, 3331, - - 3343, 3344, 3345, 3346, 3332, 3326, 3347, 3333, 3327, 3332, - 3332, 3332, 3333, 3333, 3333, 3348, 3328, 3349, 3350, 3329, - 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3330, 3358, 3359, - 3331, 3332, 3360, 3356, 3361, 3362, 3363, 3364, 3365, 3333, - 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, - 3376, 3377, 3378, 3379, 3372, 3380, 3378, 3381, 3382, 3383, - 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, - 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3403, 3404, - 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, - 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, - - 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, - 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, - 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, - 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, - 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3468, 3469, - 3470, 3471, 3472, 3457, 3473, 3474, 3477, 3459, 3478, 3473, - 3476, 3474, 3475, 3475, 3481, 3456, 3452, 3485, 3454, 3467, - 3479, 3458, 3480, 3482, 3483, 3486, 3488, 3484, 3490, 3491, - 3492, 3493, 3494, 3495, 3496, 3460, 3498, 3497, 3499, 3464, - 3463, 3500, 3466, 3501, 3476, 3479, 3477, 3480, 3478, 3502, - - 3503, 3461, 3504, 3505, 3481, 3466, 3484, 3462, 3497, 3506, - 3507, 3508, 3509, 3482, 3483, 3510, 3511, 3512, 3513, 3514, - 3515, 3516, 3517, 3525, 3526, 3518, 3494, 3517, 3517, 3517, - 3518, 3518, 3518, 3519, 3527, 3528, 3520, 3529, 3519, 3519, - 3519, 3520, 3520, 3520, 3530, 3531, 3532, 3533, 3521, 3517, - 3534, 3522, 3518, 3521, 3521, 3521, 3522, 3522, 3522, 3523, - 3535, 3536, 3524, 3537, 3523, 3523, 3523, 3524, 3524, 3524, - 3538, 3519, 3539, 3540, 3520, 3521, 3541, 3542, 3522, 3543, - 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3524, 3551, 3552, - 3553, 3523, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, - - 3562, 3556, 3563, 3564, 3565, 3567, 3568, 3569, 3570, 3571, - 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, - 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, - 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, - 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3616, 3617, 3609, - 3618, 3608, 3608, 3608, 3609, 3609, 3609, 3610, 3619, 3620, - 3611, 3621, 3610, 3610, 3610, 3611, 3611, 3611, 3622, 3623, - 3624, 3625, 3612, 3608, 3626, 3613, 3609, 3612, 3612, 3612, - 3613, 3613, 3613, 3614, 3627, 3628, 3615, 3629, 3614, 3614, - 3614, 3615, 3615, 3615, 3630, 3610, 3631, 3632, 3611, 3612, + 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, + 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2997, + 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, + 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, + 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, + 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, + 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, + 3048, 3049, 3050, 3052, 3051, 3053, 3054, 3055, 3056, 3057, + 3058, 3059, 3060, 3061, 3042, 3062, 3064, 3064, 3063, 3065, + 3045, 3066, 3067, 3044, 3047, 3051, 3050, 3069, 3054, 3053, + + 3068, 3069, 3067, 3071, 3070, 3072, 3046, 3064, 3070, 3043, + 3068, 3049, 3073, 3071, 3074, 3072, 3075, 3073, 3052, 3074, + 3066, 3076, 3077, 3078, 3079, 3080, 3081, 3055, 3082, 3057, + 3083, 3084, 3087, 3088, 3090, 3056, 3060, 3061, 3063, 3091, + 3058, 3059, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, + 3062, 3100, 3101, 3082, 3102, 3103, 3075, 3104, 3105, 3106, + 3076, 3077, 3107, 3108, 3080, 3081, 3109, 3110, 3078, 3079, + 3083, 3103, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, + 3119, 3120, 3121, 3122, 3123, 3124, 3132, 3133, 3125, 3134, + 3124, 3124, 3124, 3125, 3125, 3125, 3126, 3135, 3136, 3127, + + 3137, 3126, 3126, 3126, 3127, 3127, 3127, 3128, 3138, 3139, + 3129, 3140, 3128, 3128, 3128, 3129, 3129, 3129, 3141, 3126, + 3142, 3143, 3127, 3124, 3130, 3144, 3125, 3131, 3145, 3130, + 3130, 3130, 3131, 3131, 3131, 3146, 3147, 3148, 3149, 3150, + 3151, 3152, 3153, 3154, 3155, 3128, 3156, 3157, 3129, 3158, + 3159, 3160, 3161, 3162, 3131, 3150, 3150, 3163, 3164, 3165, + 3166, 3167, 3130, 3168, 3169, 3168, 3170, 3171, 3172, 3173, + 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, + 3184, 3185, 3186, 3187, 3188, 3190, 3191, 3191, 3192, 3193, + 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, + + 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, + 3214, 3215, 3223, 3224, 3216, 3225, 3215, 3215, 3215, 3216, + 3216, 3216, 3217, 3226, 3227, 3218, 3228, 3217, 3217, 3217, + 3218, 3218, 3218, 3219, 3229, 3230, 3220, 3231, 3219, 3219, + 3219, 3220, 3220, 3220, 3232, 3217, 3233, 3234, 3218, 3215, + 3221, 3235, 3216, 3222, 3236, 3221, 3221, 3221, 3222, 3222, + 3222, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, + 3247, 3219, 3246, 3248, 3220, 3249, 3250, 3246, 3251, 3252, + 3222, 3253, 3246, 3254, 3255, 3256, 3257, 3246, 3221, 3258, + 3259, 3260, 3261, 3262, 3263, 3259, 3264, 3265, 3266, 3268, + + 3259, 3269, 3270, 3271, 3273, 3259, 3274, 3275, 3276, 3277, + 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, + 3288, 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, + 3298, 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, + 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, + 3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, + 3328, 3329, 3330, 3331, 3332, 3333, 3335, 3336, 3337, 3338, + 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, + 3349, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3353, 3357, + 3358, 3359, 3360, 3362, 3361, 3364, 3363, 3365, 3366, 3367, + + 3368, 3369, 3370, 3371, 3374, 3373, 3375, 3372, 3376, 3377, + 3379, 3375, 3356, 3376, 3378, 3379, 3364, 3380, 3381, 3377, + 3359, 3363, 3380, 3381, 3378, 3383, 3384, 3386, 3382, 3390, + 3385, 3360, 3361, 3357, 3382, 3362, 3387, 3393, 3374, 3388, + 3389, 3391, 3395, 3397, 3398, 3399, 3400, 3401, 3402, 3403, + 3404, 3384, 3366, 3405, 3383, 3385, 3406, 3407, 3365, 3369, + 3368, 3372, 3371, 3367, 3388, 3389, 3386, 3370, 3373, 3390, + 3408, 3410, 3411, 3412, 3413, 3387, 3414, 3372, 3415, 3416, + 3417, 3391, 3418, 3419, 3410, 3420, 3421, 3422, 3423, 3424, + 3425, 3426, 3427, 3428, 3429, 3430, 3438, 3439, 3431, 3440, + + 3430, 3430, 3430, 3431, 3431, 3431, 3432, 3441, 3442, 3433, + 3443, 3432, 3432, 3432, 3433, 3433, 3433, 3434, 3444, 3445, + 3435, 3446, 3434, 3434, 3434, 3435, 3435, 3435, 3447, 3448, + 3449, 3450, 3436, 3430, 3451, 3437, 3431, 3436, 3436, 3436, + 3437, 3437, 3437, 3452, 3432, 3453, 3455, 3433, 3456, 3457, + 3458, 3459, 3460, 3461, 3462, 3434, 3463, 3464, 3435, 3436, + 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3437, 3472, 3473, + 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, + 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493, + 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, + + 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, + 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, + 3524, 3532, 3533, 3525, 3534, 3524, 3524, 3524, 3525, 3525, + 3525, 3526, 3535, 3536, 3527, 3537, 3526, 3526, 3526, 3527, + 3527, 3527, 3528, 3538, 3539, 3529, 3540, 3528, 3528, 3528, + 3529, 3529, 3529, 3541, 3542, 3543, 3544, 3530, 3524, 3545, + 3531, 3525, 3530, 3530, 3530, 3531, 3531, 3531, 3546, 3526, + 3547, 3548, 3527, 3549, 3550, 3551, 3552, 3553, 3554, 3555, + 3528, 3556, 3557, 3529, 3530, 3558, 3559, 3560, 3561, 3562, + 3557, 3563, 3531, 3564, 3565, 3566, 3567, 3568, 3569, 3570, - 3633, 3634, 3613, 3635, 3636, 3637, 3638, 3639, 3640, 3641, - 3642, 3615, 3643, 3644, 3645, 3614, 3646, 3647, 3648, 3649, + 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, + 3573, 3581, 3582, 3583, 3584, 3581, 3585, 3586, 3587, 3588, + 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, + 3599, 3600, 3601, 3602, 3603, 3605, 3606, 3607, 3608, 3609, + 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, + 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, + 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, + 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, - 3660, 3661, 3662, 3663, 3664, 3665, 3667, 3668, 3669, 3670, - 3671, 3663, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, - 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, - 3690, 3691, 3692, 3694, 3695, 3696, 3697, 3698, 3699, 3700, - 3701, 3702, 3703, 3704, 3705, 3707, 3708, 3709, 3710, 3711, - 3712, 3713, 3714, 3715, 3716, 3718, 3719, 3720, 3721, 3722, - 3723, 3724, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, - - 3734, 3735, 3736, 3737, 3739, 3738, 3740, 3741, 3742, 3743, - 3744, 3745, 3746, 3747, 3747, 3748, 3749, 3750, 3757, 3751, - 3752, 3753, 3749, 3750, 3751, 3752, 3754, 3753, 3755, 3755, - 3744, 3756, 3754, 3758, 3747, 3764, 3759, 3740, 3766, 3756, - 3735, 3760, 3736, 3738, 3761, 3757, 3762, 3763, 3765, 3767, - 3768, 3769, 3770, 3771, 3748, 3772, 3774, 3776, 3743, 3777, - 3780, 3781, 3782, 3783, 3764, 3784, 3746, 3785, 3786, 3787, - 3788, 3789, 3741, 3758, 3744, 3745, 3759, 3790, 3742, 3791, - 3777, 3760, 3765, 3792, 3761, 3793, 3762, 3763, 3794, 3795, - 3796, 3798, 3806, 3807, 3799, 3808, 3798, 3798, 3798, 3799, - - 3799, 3799, 3800, 3809, 3810, 3801, 3811, 3800, 3800, 3800, - 3801, 3801, 3801, 3802, 3812, 3813, 3814, 3815, 3802, 3802, - 3802, 3816, 3817, 3798, 3818, 3819, 3799, 3820, 3803, 3800, - 3821, 3804, 3801, 3803, 3803, 3803, 3804, 3804, 3804, 3822, - 3823, 3805, 3824, 3825, 3826, 3802, 3805, 3805, 3805, 3827, - 3828, 3829, 3830, 3831, 3832, 3833, 3804, 3834, 3835, 3836, - 3803, 3837, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845, - 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3853, 3805, 3854, - 3855, 3856, 3858, 3859, 3860, 3861, 3862, 3863, 3864, 3865, - 3866, 3866, 3867, 3868, 3869, 3870, 3871, 3872, 3874, 3875, - - 3876, 3877, 3878, 3879, 3880, 3881, 3876, 3882, 3883, 3884, - 3885, 3886, 3887, 3889, 3897, 3898, 3890, 3899, 3889, 3889, - 3889, 3890, 3890, 3890, 3891, 3900, 3901, 3892, 3902, 3891, - 3891, 3891, 3892, 3892, 3892, 3893, 3903, 3904, 3905, 3906, - 3893, 3893, 3893, 3907, 3908, 3889, 3909, 3910, 3890, 3911, - 3894, 3891, 3912, 3895, 3892, 3894, 3894, 3894, 3895, 3895, - 3895, 3913, 3914, 3896, 3915, 3916, 3917, 3893, 3896, 3896, - 3896, 3918, 3919, 3920, 3921, 3922, 3923, 3924, 3895, 3925, - 3926, 3927, 3894, 3928, 3929, 3930, 3931, 3932, 3933, 3934, - 3935, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3943, 3944, - - 3896, 3945, 3946, 3947, 3948, 3949, 3950, 3951, 3952, 3953, - 3954, 3955, 3956, 3957, 3958, 3959, 3960, 3961, 3962, 3963, - 3964, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 3974, - 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 3983, 3984, - 3985, 3986, 3968, 3987, 3988, 3990, 3991, 3992, 3993, 3994, - 3995, 3996, 3997, 3998, 4000, 4001, 4002, 4003, 4004, 4005, - 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, - 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4023, 4024, - 4025, 4026, 4026, 4027, 4027, 4035, 4028, 4029, 4030, 4030, - 4034, 4015, 4028, 4029, 4020, 4012, 4013, 4032, 4023, 4031, - - 4031, 4036, 4014, 4033, 4037, 4032, 4038, 4033, 4039, 4040, - 4043, 4041, 4042, 4044, 4035, 4046, 4047, 4048, 4018, 4049, - 4017, 4050, 4051, 4052, 4016, 4053, 4054, 4055, 4056, 4034, - 4036, 4057, 4060, 4022, 4061, 4062, 4063, 4039, 4040, 4042, - 4064, 4065, 4066, 4067, 4037, 4041, 4038, 4068, 4077, 4078, - 4069, 4079, 4068, 4068, 4068, 4069, 4069, 4069, 4070, 4080, - 4081, 4071, 4082, 4070, 4070, 4070, 4071, 4071, 4071, 4083, - 4084, 4072, 4068, 4085, 4073, 4069, 4072, 4072, 4072, 4073, - 4073, 4073, 4074, 4086, 4087, 4088, 4089, 4074, 4074, 4074, - 4070, 4090, 4091, 4071, 4092, 4075, 4072, 4093, 4094, 4073, - - 4075, 4075, 4075, 4095, 4096, 4097, 4098, 4099, 4100, 4101, - 4094, 4102, 4103, 4094, 4104, 4105, 4107, 4108, 4109, 4074, - 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, - 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, - 4130, 4131, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, - 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, - 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4167, 4168, - 4159, 4169, 4158, 4158, 4158, 4159, 4159, 4159, 4160, 4170, - 4171, 4161, 4172, 4160, 4160, 4160, 4161, 4161, 4161, 4173, - 4174, 4162, 4158, 4175, 4163, 4159, 4162, 4162, 4162, 4163, - - 4163, 4163, 4164, 4176, 4177, 4178, 4179, 4164, 4164, 4164, - 4160, 4177, 4180, 4161, 4181, 4165, 4162, 4182, 4183, 4163, - 4165, 4165, 4165, 4184, 4185, 4186, 4187, 4188, 4189, 4190, - 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4164, - 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, - 4210, 4197, 4211, 4212, 4215, 4216, 4217, 4218, 4219, 4220, - 4221, 4222, 4223, 4224, 4225, 4210, 4227, 4228, 4229, 4230, - 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4239, 4240, 4241, - 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 4250, 4251, - 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 4260, 4261, - - 4262, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, - 4273, 4274, 4275, 4276, 4277, 4279, 4280, 4281, 4282, 4283, - 4284, 4285, 4286, 4287, 4288, 4289, 4289, 4290, 4290, 4291, - 4292, 4287, 4288, 4294, 4295, 4296, 4293, 4291, 4292, 4280, - 4293, 4297, 4298, 4300, 4299, 4301, 4303, 4302, 4304, 4279, - 4305, 4306, 4307, 4282, 4308, 4309, 4311, 4310, 4312, 4313, - 4314, 4315, 4316, 4318, 4319, 4320, 4284, 4321, 4322, 4296, - 4323, 4298, 4286, 4299, 4302, 4297, 4324, 4300, 4310, 4301, - 4333, 4334, 4326, 4335, 4283, 4303, 4285, 4326, 4326, 4326, - 4327, 4336, 4337, 4328, 4338, 4327, 4327, 4327, 4328, 4328, - - 4328, 4329, 4339, 4341, 4330, 4342, 4329, 4329, 4329, 4330, - 4330, 4330, 4343, 4344, 4345, 4331, 4346, 4347, 4328, 4326, - 4331, 4331, 4331, 4332, 4348, 4349, 4329, 4327, 4332, 4332, - 4332, 4350, 4351, 4352, 4353, 4354, 4356, 4357, 4358, 4359, - 4360, 4330, 4361, 4362, 4364, 4365, 4366, 4367, 4368, 4369, - 4370, 4371, 4331, 4372, 4373, 4374, 4375, 4376, 4377, 4378, - 4379, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, - 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4401, - 4402, 4403, 4404, 4405, 4406, 4407, 4406, 4408, 4410, 4406, - 4406, 4406, 4411, 4412, 4413, 4414, 4406, 4421, 4422, 4423, - - 4414, 4414, 4414, 4406, 4415, 4424, 4406, 4425, 4416, 4415, - 4415, 4415, 4417, 4416, 4416, 4416, 4418, 4417, 4417, 4417, - 4419, 4418, 4418, 4418, 4420, 4419, 4419, 4419, 4426, 4420, - 4420, 4420, 4414, 4416, 4427, 4429, 4430, 4417, 4431, 4432, - 4433, 4415, 4435, 4436, 4437, 4438, 4441, 4442, 4443, 4444, - 4445, 4446, 4447, 4418, 4448, 4449, 4450, 4419, 4451, 4452, - 4453, 4454, 4455, 4456, 4457, 4459, 4460, 4461, 4462, 4463, - 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, - 4474, 4475, 4476, 4477, 4478, 4479, 4481, 4482, 4483, 4484, - 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4495, + 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, - 4496, 4497, 4498, 4499, 4500, 4501, 4502, 4503, 4504, 4505, - 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4497, 4514, - 4515, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, - 4526, 4527, 4528, 4530, 4531, 4532, 4533, 4534, 4535, 4537, - 4536, 4536, 4538, 4537, 4539, 4540, 4538, 4541, 4543, 4544, - 4542, 4541, 4539, 4540, 4542, 4545, 4548, 4546, 4547, 4549, - 4530, 4536, 4550, 4551, 4554, 4555, 4556, 4558, 4562, 4532, - 4563, 4566, 4567, 4531, 4568, 4569, 4544, 4570, 4571, 4579, - 4580, 4581, 4545, 4548, 4535, 4582, 4549, 4583, 4558, 4573, - 4533, 4546, 4547, 4574, 4573, 4573, 4573, 4584, 4574, 4574, - - 4574, 4550, 4534, 4575, 4586, 4588, 4576, 4589, 4575, 4575, - 4575, 4576, 4576, 4576, 4577, 4590, 4591, 4578, 4592, 4577, - 4577, 4577, 4578, 4578, 4578, 4593, 4594, 4595, 4596, 4597, - 4598, 4599, 4600, 4603, 4604, 4607, 4608, 4609, 4610, 4611, - 4575, 4612, 4613, 4576, 4614, 4616, 4617, 4618, 4619, 4620, - 4621, 4622, 4623, 4624, 4627, 4628, 4629, 4624, 4630, 4631, - 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, - 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, - 4653, 4652, 4649, 4652, 4654, 4655, 4656, 4657, 4658, 4659, - 4660, 4666, 4667, 4661, 4668, 4660, 4660, 4660, 4661, 4661, - - 4661, 4662, 4669, 4670, 4663, 4671, 4662, 4662, 4662, 4663, - 4663, 4663, 4664, 4673, 4674, 4665, 4675, 4664, 4664, 4664, - 4665, 4665, 4665, 4676, 4677, 4678, 4679, 4680, 4681, 4682, - 4683, 4684, 4685, 4687, 4688, 4689, 4690, 4692, 4662, 4693, - 4694, 4663, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, - 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4712, 4713, 4716, - 4717, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, - 4729, 4730, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, - 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, - 4750, 4751, 4752, 4753, 4754, 4755, 4753, 4756, 4757, 4758, - - 4759, 4760, 4763, 4764, 4767, 4768, 4769, 4770, 4771, 4772, - 4774, 4773, 4773, 4775, 4776, 4777, 4778, 4779, 4780, 4777, - 4778, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4789, 4795, - 4796, 4769, 4773, 4799, 4803, 4804, 4800, 4807, 4799, 4799, - 4799, 4800, 4800, 4800, 4808, 4809, 4810, 4812, 4813, 4814, - 4783, 4784, 4815, 4816, 4771, 4817, 4818, 4819, 4820, 4823, - 4781, 4782, 4824, 4825, 4785, 4786, 4826, 4827, 4828, 4829, - 4830, 4831, 4832, 4833, 4770, 4834, 4835, 4836, 4837, 4838, - 4839, 4840, 4841, 4842, 4843, 4844, 4846, 4847, 4848, 4849, - 4850, 4852, 4853, 4855, 4856, 4857, 4858, 4859, 4860, 4861, - - 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, 4870, 4871, - 4872, 4873, 4874, 4875, 4876, 4880, 4881, 4877, 4884, 4876, - 4876, 4876, 4877, 4877, 4877, 4885, 4886, 4886, 4887, 4887, - 4888, 4889, 4890, 4891, 4892, 4893, 4894, 4895, 4896, 4897, - 4898, 4899, 4900, 4901, 4902, 4903, 4904, 4906, 4907, 4908, - 4909, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, 4918, - 4919, 4920, 4924, 4925, 4926, 4927, 4928, 4930, 4931, 4932, - 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, - 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, - 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, + 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, + 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3693, 3687, 3688, + 3685, 3686, 3671, 3687, 3688, 3689, 3673, 3690, 3692, 3692, + 3689, 3701, 3690, 3691, 3670, 3666, 3694, 3668, 3695, 3691, + 3672, 3684, 3696, 3697, 3698, 3699, 3700, 3702, 3703, 3705, + 3707, 3693, 3708, 3709, 3674, 3712, 3677, 3713, 3678, 3714, + 3701, 3681, 3680, 3715, 3683, 3716, 3717, 3696, 3697, 3718, + 3675, 3676, 3719, 3720, 3721, 3722, 3694, 3683, 3695, 3679, + 3723, 3724, 3725, 3726, 3698, 3699, 3700, 3717, 3727, 3728, + 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3745, 3737, + + 3746, 3747, 3738, 3714, 3737, 3737, 3737, 3738, 3738, 3738, + 3739, 3748, 3749, 3740, 3750, 3739, 3739, 3739, 3740, 3740, + 3740, 3751, 3752, 3753, 3754, 3741, 3737, 3755, 3742, 3738, + 3741, 3741, 3741, 3742, 3742, 3742, 3743, 3756, 3757, 3744, + 3758, 3743, 3743, 3743, 3744, 3744, 3744, 3759, 3739, 3760, + 3761, 3740, 3741, 3762, 3763, 3742, 3764, 3765, 3766, 3767, + 3768, 3769, 3770, 3771, 3744, 3772, 3773, 3774, 3743, 3775, + 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, 3784, 3778, + 3785, 3786, 3787, 3789, 3790, 3791, 3792, 3793, 3794, 3795, + 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, + + 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, + 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, + 3826, 3827, 3828, 3829, 3830, 3838, 3839, 3831, 3840, 3830, + 3830, 3830, 3831, 3831, 3831, 3832, 3841, 3842, 3833, 3843, + 3832, 3832, 3832, 3833, 3833, 3833, 3844, 3845, 3846, 3847, + 3834, 3830, 3848, 3835, 3831, 3834, 3834, 3834, 3835, 3835, + 3835, 3836, 3849, 3850, 3837, 3851, 3836, 3836, 3836, 3837, + 3837, 3837, 3852, 3832, 3853, 3854, 3833, 3834, 3855, 3856, + 3835, 3857, 3858, 3859, 3860, 3861, 3862, 3863, 3864, 3837, + 3865, 3866, 3867, 3836, 3868, 3869, 3870, 3871, 3872, 3873, + + 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883, + 3884, 3885, 3886, 3887, 3888, 3889, 3890, 3891, 3892, 3894, + 3895, 3896, 3897, 3898, 3890, 3899, 3900, 3901, 3902, 3903, + 3904, 3905, 3906, 3907, 3908, 3909, 3910, 3911, 3912, 3913, + 3914, 3915, 3916, 3917, 3918, 3920, 3921, 3922, 3923, 3924, + 3925, 3926, 3927, 3928, 3929, 3930, 3931, 3933, 3934, 3935, + 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3944, 3945, 3946, + 3947, 3948, 3949, 3950, 3951, 3952, 3953, 3954, 3955, 3956, + 3957, 3958, 3959, 3960, 3961, 3962, 3963, 3964, 3965, 3966, + 3967, 3968, 3969, 3970, 3971, 3972, 3973, 3974, 3975, 3977, + + 3976, 3978, 3979, 3980, 3981, 3982, 3983, 3984, 3985, 3987, + 3986, 3989, 3988, 3988, 3990, 3991, 3998, 3992, 3993, 3994, + 3990, 3991, 3992, 3993, 3995, 3994, 3996, 3996, 3985, 3999, + 3995, 3997, 3978, 3988, 4006, 3973, 4000, 3974, 3976, 3997, + 4001, 4002, 4003, 3998, 4004, 4007, 4005, 4008, 4009, 4010, + 3989, 4011, 4012, 4013, 4014, 4016, 3984, 4018, 4019, 4022, + 4023, 4024, 4025, 3987, 4026, 4027, 4028, 3979, 4006, 3999, + 4029, 3983, 3985, 3980, 3986, 4005, 4000, 4030, 4031, 4019, + 4001, 4002, 4003, 4032, 4004, 4033, 4034, 4035, 4036, 4037, + 4038, 4040, 4048, 4049, 4041, 4050, 4040, 4040, 4040, 4041, + + 4041, 4041, 4042, 4051, 4052, 4043, 4053, 4042, 4042, 4042, + 4043, 4043, 4043, 4044, 4054, 4055, 4056, 4057, 4044, 4044, + 4044, 4058, 4059, 4040, 4060, 4061, 4041, 4062, 4045, 4042, + 4063, 4046, 4043, 4045, 4045, 4045, 4046, 4046, 4046, 4064, + 4065, 4047, 4066, 4067, 4068, 4044, 4047, 4047, 4047, 4069, + 4070, 4071, 4072, 4073, 4074, 4075, 4046, 4076, 4077, 4078, + 4045, 4079, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, + 4088, 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4047, 4096, + 4097, 4098, 4099, 4100, 4102, 4103, 4104, 4105, 4106, 4107, + 4108, 4109, 4110, 4110, 4111, 4112, 4113, 4114, 4115, 4116, + + 4118, 4119, 4120, 4121, 4122, 4123, 4124, 4125, 4120, 4126, + 4127, 4128, 4129, 4130, 4131, 4133, 4141, 4142, 4134, 4143, + 4133, 4133, 4133, 4134, 4134, 4134, 4135, 4144, 4145, 4136, + 4146, 4135, 4135, 4135, 4136, 4136, 4136, 4137, 4147, 4148, + 4149, 4150, 4137, 4137, 4137, 4151, 4152, 4133, 4153, 4154, + 4134, 4155, 4138, 4135, 4156, 4139, 4136, 4138, 4138, 4138, + 4139, 4139, 4139, 4157, 4158, 4140, 4159, 4160, 4161, 4137, + 4140, 4140, 4140, 4162, 4163, 4164, 4165, 4166, 4167, 4168, + 4139, 4169, 4170, 4171, 4138, 4172, 4173, 4174, 4175, 4176, + 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184, 4185, 4186, + + 4187, 4188, 4140, 4189, 4190, 4191, 4192, 4193, 4194, 4195, + 4196, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, + 4206, 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4215, 4216, + 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, + 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4216, 4235, + 4236, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, + 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, + 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, + 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, + 4279, 4280, 4281, 4283, 4284, 4282, 4285, 4285, 4286, 4287, + + 4288, 4288, 4289, 4289, 4290, 4291, 4292, 4292, 4294, 4276, + 4290, 4291, 4297, 4273, 4274, 4282, 4294, 4285, 4293, 4293, + 4275, 4295, 4296, 4298, 4299, 4295, 4300, 4301, 4302, 4303, + 4305, 4304, 4306, 4308, 4309, 4310, 4311, 4280, 4278, 4312, + 4313, 4297, 4277, 4279, 4314, 4315, 4316, 4317, 4318, 4319, + 4320, 4284, 4298, 4323, 4324, 4325, 4301, 4302, 4304, 4326, + 4327, 4296, 4328, 4303, 4299, 4329, 4300, 4330, 4331, 4340, + 4341, 4332, 4342, 4331, 4331, 4331, 4332, 4332, 4332, 4333, + 4343, 4344, 4334, 4345, 4333, 4333, 4333, 4334, 4334, 4334, + 4346, 4347, 4335, 4331, 4348, 4336, 4332, 4335, 4335, 4335, + + 4336, 4336, 4336, 4337, 4349, 4350, 4351, 4352, 4337, 4337, + 4337, 4333, 4353, 4354, 4334, 4355, 4338, 4335, 4356, 4357, + 4336, 4338, 4338, 4338, 4358, 4359, 4360, 4361, 4362, 4363, + 4364, 4357, 4365, 4366, 4357, 4367, 4368, 4369, 4370, 4372, + 4337, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, + 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, + 4392, 4393, 4394, 4395, 4396, 4398, 4399, 4400, 4401, 4402, + 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, + 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, + 4423, 4432, 4433, 4424, 4434, 4423, 4423, 4423, 4424, 4424, + + 4424, 4425, 4435, 4436, 4426, 4437, 4425, 4425, 4425, 4426, + 4426, 4426, 4438, 4439, 4427, 4423, 4440, 4428, 4424, 4427, + 4427, 4427, 4428, 4428, 4428, 4429, 4441, 4442, 4443, 4444, + 4429, 4429, 4429, 4425, 4442, 4445, 4426, 4446, 4430, 4427, + 4447, 4448, 4428, 4430, 4430, 4430, 4449, 4450, 4451, 4452, + 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, + 4463, 4464, 4429, 4465, 4466, 4467, 4468, 4469, 4470, 4471, + 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4465, 4480, + 4481, 4482, 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, + 4493, 4494, 4479, 4495, 4497, 4498, 4499, 4500, 4501, 4502, + + 4503, 4504, 4505, 4506, 4508, 4509, 4510, 4511, 4512, 4513, + 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, + 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4533, 4534, + 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, + 4545, 4546, 4547, 4548, 4549, 4550, 4552, 4553, 4554, 4555, + 4556, 4557, 4558, 4560, 4561, 4562, 4563, 4564, 4565, 4566, + 4567, 4568, 4569, 4570, 4571, 4571, 4572, 4572, 4573, 4575, + 4569, 4570, 4574, 4575, 4576, 4577, 4573, 4561, 4578, 4580, + 4574, 4579, 4582, 4583, 4585, 4581, 4586, 4560, 4587, 4588, + 4589, 4563, 4584, 4590, 4591, 4592, 4594, 4593, 4595, 4596, + + 4597, 4598, 4599, 4601, 4565, 4602, 4603, 4604, 4580, 4605, + 4606, 4568, 4578, 4566, 4581, 4579, 4582, 4583, 4593, 4584, + 4607, 4609, 4564, 4585, 4610, 4567, 4609, 4609, 4609, 4610, + 4610, 4610, 4611, 4616, 4617, 4612, 4618, 4611, 4611, 4611, + 4612, 4612, 4612, 4613, 4619, 4620, 4614, 4621, 4613, 4613, + 4613, 4614, 4614, 4614, 4622, 4624, 4625, 4611, 4609, 4615, + 4612, 4610, 4626, 4627, 4615, 4615, 4615, 4628, 4629, 4630, + 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4641, + 4613, 4642, 4643, 4614, 4644, 4645, 4646, 4647, 4649, 4650, + 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, + + 4661, 4662, 4663, 4664, 4666, 4667, 4668, 4669, 4670, 4671, + 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, + 4682, 4683, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4691, + 4693, 4695, 4691, 4691, 4691, 4696, 4697, 4698, 4699, 4691, + 4706, 4707, 4708, 4699, 4699, 4699, 4691, 4700, 4709, 4691, + 4710, 4701, 4700, 4700, 4700, 4702, 4701, 4701, 4701, 4703, + 4702, 4702, 4702, 4704, 4703, 4703, 4703, 4705, 4704, 4704, + 4704, 4711, 4705, 4705, 4705, 4699, 4701, 4712, 4714, 4715, + 4702, 4716, 4717, 4718, 4700, 4720, 4721, 4722, 4723, 4724, + 4725, 4726, 4729, 4730, 4731, 4732, 4703, 4733, 4734, 4735, + + 4704, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, + 4745, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, + 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, 4764, 4765, + 4766, 4767, 4768, 4769, 4771, 4772, 4773, 4774, 4775, 4776, + 4777, 4778, 4779, 4780, 4781, 4782, 4784, 4785, 4786, 4787, + 4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797, + 4798, 4799, 4800, 4801, 4802, 4786, 4803, 4804, 4806, 4807, + 4808, 4809, 4810, 4811, 4812, 4813, 4814, 4815, 4816, 4817, + 4818, 4819, 4820, 4821, 4823, 4824, 4825, 4826, 4827, 4828, + 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4837, 4838, + + 4839, 4840, 4841, 4838, 4839, 4844, 4845, 4842, 4843, 4840, + 4841, 4842, 4843, 4846, 4847, 4848, 4849, 4830, 4837, 4850, + 4852, 4851, 4855, 4856, 4857, 4858, 4832, 4864, 4865, 4860, + 4831, 4868, 4869, 4845, 4870, 4871, 4872, 4873, 4881, 4882, + 4846, 4883, 4836, 4849, 4884, 4885, 4850, 4833, 4847, 4848, + 4860, 4875, 4886, 4888, 4835, 4890, 4875, 4875, 4875, 4834, + 4851, 4876, 4891, 4892, 4877, 4893, 4876, 4876, 4876, 4877, + 4877, 4877, 4878, 4894, 4895, 4879, 4896, 4878, 4878, 4878, + 4879, 4879, 4879, 4880, 4897, 4898, 4899, 4900, 4880, 4880, + 4880, 4901, 4902, 4903, 4904, 4907, 4908, 4911, 4912, 4913, + + 4914, 4877, 4915, 4916, 4917, 4918, 4920, 4921, 4922, 4878, + 4923, 4924, 4925, 4926, 4927, 4928, 4931, 4932, 4933, 4928, + 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, + 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, + 4954, 4955, 4957, 4956, 4953, 4956, 4958, 4959, 4960, 4961, + 4962, 4963, 4964, 4970, 4971, 4965, 4972, 4964, 4964, 4964, + 4965, 4965, 4965, 4966, 4973, 4974, 4967, 4975, 4966, 4966, + 4966, 4967, 4967, 4967, 4968, 4977, 4978, 4969, 4979, 4968, + 4968, 4968, 4969, 4969, 4969, 4980, 4981, 4982, 4983, 4984, + 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4994, 4995, + + 4966, 4996, 4997, 4967, 4999, 5000, 5001, 5002, 5003, 5004, + 5005, 5006, 5007, 5008, 5009, 5011, 5012, 5013, 5014, 5015, + 5016, 5017, 5018, 5019, 5021, 5022, 5025, 5026, 5029, 5030, + 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5040, 5041, + 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050, 5051, + 5052, 5053, 5054, 5055, 5056, 5057, 5058, 5059, 5060, 5061, + 5062, 5063, 5061, 5064, 5065, 5066, 5067, 5068, 5069, 5070, + 5071, 5072, 5075, 5076, 5081, 5082, 5085, 5086, 5087, 5088, + 5089, 5090, 5091, 5092, 5092, 5093, 5094, 5095, 5096, 5097, + 5098, 5099, 5096, 5097, 5102, 5100, 5101, 5103, 5104, 5105, + + 5106, 5108, 5115, 5087, 5092, 5116, 5119, 5123, 5124, 5120, + 5127, 5119, 5119, 5119, 5120, 5120, 5120, 5128, 5129, 5130, + 5132, 5102, 5133, 5134, 5103, 5135, 5089, 5136, 5137, 5138, + 5139, 5140, 5141, 5090, 5100, 5101, 5142, 5104, 5105, 5145, + 5146, 5147, 5148, 5149, 5150, 5151, 5088, 5152, 5153, 5154, + 5155, 5156, 5157, 5158, 5159, 5160, 5161, 5162, 5163, 5164, + 5165, 5166, 5168, 5169, 5170, 5171, 5172, 5174, 5175, 5177, + 5178, 5179, 5180, 5181, 5182, 5183, 5184, 5185, 5186, 5187, + 5188, 5189, 5190, 5191, 5192, 5193, 5194, 5195, 5196, 5197, + 5198, 5202, 5203, 5199, 5206, 5198, 5198, 5198, 5199, 5199, + + 5199, 5207, 5208, 5208, 5209, 5209, 5210, 5211, 5212, 5213, + 5214, 5215, 5216, 5217, 5218, 5219, 5220, 5221, 5222, 5223, + 5224, 5225, 5226, 5227, 5228, 5229, 5231, 5232, 5233, 5234, + 5235, 5236, 5237, 5238, 5239, 5240, 5241, 5242, 5243, 5244, + 5245, 5246, 5247, 5251, 5252, 5253, 5254, 5255, 5257, 5258, + 5259, 5260, 5261, 5262, 5263, 5264, 5265, 5266, 5267, 5268, + 5269, 5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277, 5278, + 5279, 5280, 5281, 5282, 5283, 5284, 5285, 5286, 5287, 5288, + 5289, 5290, 5291, 5292, 5293, 5298, 5299, 5300, 5301, 5302, + 5303, 5304, 5305, 5306, 5307, 5308, 5309, 5315, 5316, 5317, + + 5318, 5320, 5321, 5322, 5323, 5324, 5325, 5326, 5327, 5328, + 5329, 5330, 5331, 5332, 5333, 5334, 5335, 5336, 5337, 5338, + 5339, 5340, 5341, 5342, 5343, 5344, 5345, 5346, 5347, 5349, + 5350, 5351, 5306, 5307, 5352, 5353, 5299, 5354, 5355, 5356, + 5358, 5359, 5360, 5361, 5362, 5363, 5366, 5367, 5368, 5369, + 5372, 5373, 5374, 5375, 5374, 5376, 5377, 5374, 5374, 5374, + 5378, 5379, 5382, 5383, 5374, 5388, 5389, 5390, 5391, 5392, + 5393, 5374, 5394, 5395, 5396, 5397, 5398, 5399, 5400, 5401, + 5404, 5405, 5406, 5408, 5409, 5410, 5411, 5412, 5413, 5414, + 5415, 5416, 5417, 5418, 5419, 5420, 5421, 5423, 5424, 5425, - 4963, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, - 4975, 4976, 4982, 4983, 4984, 4985, 4987, 4988, 4989, 4990, - 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000, - 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5009, 5010, 5011, - 5012, 5014, 5015, 5016, 5017, 5018, 5019, 4973, 4974, 5020, - 5021, 5023, 4967, 5024, 5025, 5026, 5027, 5028, 5031, 5032, - 5033, 5034, 5037, 5038, 5039, 5040, 5039, 5041, 5042, 5039, - 5039, 5039, 5043, 5044, 5047, 5048, 5039, 5053, 5054, 5055, - 5056, 5057, 5058, 5039, 5059, 5060, 5061, 5062, 5063, 5066, - 5067, 5068, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, - - 5078, 5079, 5080, 5081, 5083, 5084, 5085, 5086, 5087, 5089, - 5090, 5091, 5092, 5093, 5096, 5097, 5098, 5099, 5100, 5101, - 5102, 5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110, 5111, - 5113, 5114, 5115, 5116, 5117, 5118, 5120, 5121, 5122, 5123, - 5124, 5125, 5126, 5127, 5128, 5129, 5130, 5131, 5133, 5134, - 5135, 5136, 5137, 5139, 5140, 5141, 5142, 5144, 5145, 5146, - 5147, 5148, 5149, 5150, 5151, 5152, 5153, 5154, 5155, 5156, - 5157, 5158, 5160, 5161, 5163, 5165, 5166, 5167, 5168, 5169, - 5170, 5171, 5175, 5176, 5177, 5178, 5179, 5180, 5181, 5182, - 5183, 5182, 5184, 5185, 5186, 5187, 5188, 5189, 5190, 5191, - - 5192, 5193, 5194, 5195, 5196, 5201, 5202, 5204, 5205, 5206, - 5207, 5210, 5212, 5214, 5215, 5217, 5218, 5219, 5221, 5222, - 5223, 5224, 5225, 5226, 5227, 5228, 5229, 5230, 5231, 5232, - 5233, 5235, 5236, 5237, 5238, 5239, 5240, 5242, 5243, 5244, - 5245, 5246, 5247, 5248, 5249, 5250, 5251, 5252, 5253, 5254, - 5255, 5257, 5259, 5260, 5261, 5262, 5263, 5264, 5265, 5266, - 5267, 5270, 5272, 5273, 5274, 5275, 5277, 5278, 5279, 5280, - 5281, 5282, 5283, 5284, 5285, 5287, 5288, 5290, 5291, 5292, - 5293, 5294, 5295, 5296, 5297, 5298, 5299, 5300, 5301, 5302, - 5304, 5305, 5306, 5307, 5308, 5309, 5311, 5312, 5313, 5315, - - 5316, 5317, 5318, 5319, 5320, 5321, 5322, 5323, 5324, 5325, - 5326, 5327, 5328, 5329, 5331, 5332, 5333, 5334, 5335, 5336, - 5337, 5338, 5339, 5340, 5341, 5342, 5343, 5344, 5345, 5346, - 5348, 5349, 5350, 5351, 5352, 5353, 5354, 5355, 5356, 5357, - 5358, 5359, 5360, 5362, 5363, 5364, 5365, 5366, 5368, 5369, - 5370, 5371, 5373, 5374, 5376, 5377, 5378, 5380, 5381, 5382, - 5383, 5385, 5390, 5385, 5391, 5392, 5385, 5385, 5385, 5395, - 5397, 5398, 5400, 5401, 5402, 5403, 5404, 5405, 5408, 5409, - 5410, 5413, 5414, 5415, 5418, 5420, 5421, 5423, 5424, 5425, - 5426, 5427, 5428, 5429, 5430, 5431, 5432, 5433, 5434, 5435, - - 5436, 5437, 5438, 5439, 5440, 5432, 5441, 5442, 5443, 5444, - 5445, 5446, 5447, 5448, 5450, 5451, 5452, 5453, 5454, 5455, - 5456, 5457, 5458, 5459, 5461, 5462, 5463, 5464, 5465, 5466, - 5467, 5468, 5469, 5470, 5471, 5472, 5473, 5474, 5475, 5476, - 5479, 5480, 5470, 5481, 5482, 5483, 5484, 5485, 5486, 5488, - 5490, 5492, 5493, 5494, 5495, 5496, 5497, 5498, 5499, 5500, - 5501, 5502, 5503, 5504, 5505, 5506, 5507, 5509, 5510, 5511, - 5512, 5514, 5515, 5517, 5518, 5519, 5520, 5521, 5522, 5523, - 5524, 5525, 5526, 5527, 5528, 5529, 5530, 5532, 5533, 5534, - 5535, 5536, 5537, 5539, 5540, 5541, 5542, 5543, 5544, 5545, - - 5546, 5547, 5549, 5550, 5551, 5552, 5553, 5555, 5557, 5558, - 5559, 5560, 5561, 5562, 5563, 5564, 5565, 5566, 5567, 5569, - 5570, 5572, 5572, 5573, 5574, 5575, 5576, 5577, 5578, 5579, - 5581, 5582, 5583, 5584, 5586, 5587, 5588, 5589, 5590, 5591, - 5592, 5593, 5594, 5596, 5597, 5598, 5599, 5600, 5601, 5602, - 5603, 5604, 5606, 5608, 5609, 5610, 5612, 5613, 5614, 5616, - 5617, 5619, 5621, 5622, 5623, 5624, 5625, 5627, 5628, 5630, - 5631, 5632, 5633, 5634, 5635, 5636, 5637, 5638, 5639, 5640, - 5641, 5642, 5643, 5644, 5647, 5648, 5649, 5650, 5654, 5655, - 5656, 5657, 5658, 5660, 5661, 5662, 5663, 5665, 5666, 5667, - - 5669, 5670, 5671, 5672, 5673, 5675, 5676, 5678, 5679, 5680, - 5681, 5682, 5683, 5684, 5685, 5686, 5687, 5688, 5689, 5690, - 5691, 5692, 5693, 5695, 5696, 5697, 5698, 5699, 5700, 5685, - 5701, 5703, 5705, 5706, 5707, 5708, 5709, 5710, 5711, 5712, - 5713, 5717, 5718, 5719, 5722, 5723, 5724, 5725, 5726, 5727, - 5728, 5730, 5731, 5732, 5733, 5734, 5735, 5736, 5738, 5739, - 5740, 5742, 5743, 5744, 5745, 5746, 5748, 5749, 5750, 5751, - 5752, 5753, 5754, 5755, 5756, 5758, 5759, 5761, 5762, 5763, - 5764, 5766, 5768, 5769, 5773, 5774, 5775, 5777, 5778, 5779, - 5781, 5782, 5783, 5786, 5787, 5788, 5790, 5791, 5792, 5793, - - 5794, 5795, 5796, 5797, 5798, 5799, 5800, 5801, 5802, 5803, - 5804, 5805, 5807, 5808, 5809, 5811, 5812, 5813, 5814, 5815, - 5818, 5819, 5820, 5821, 5822, 5824, 5825, 5826, 5827, 5828, - 5831, 5832, 5833, 5835, 5836, 5837, 5838, 5839, 5842, 5843, - 5844, 5845, 5846, 5847, 5848, 5849, 5850, 5851, 5852, 5853, - 5854, 5856, 5857, 5859, 5860, 5862, 5863, 5865, 5866, 5867, - 5868, 5869, 5870, 5871, 5872, 5873, 5874, 5875, 5876, 5877, - 5878, 5879, 5882, 5882, 5882, 5882, 5883, 5883, 5883, 5883, - 5884, 5884, 5884, 5884, 5885, 5885, 5885, 5885, 5886, 5887, - 5887, 5888, 5888, 5889, 5890, 5890, 5891, 5891, 5892, 5894, - - 5892, 5892, 5893, 5895, 5893, 5893, 5896, 5896, 5896, 5896, - 5897, 5897, 5897, 5897, 1045, 1043, 1041, 1040, 1038, 1037, - 1035, 1034, 1033, 1032, 1029, 1028, 1026, 1025, 1024, 1023, - 1021, 1020, 1018, 1017, 1016, 1013, 1011, 1010, 1008, 1007, - 1005, 1004, 1003, 1002, 1001, 1000, 999, 998, 997, 996, - 992, 990, 989, 988, 987, 986, 984, 982, 981, 980, - 978, 977, 976, 975, 973, 972, 971, 970, 968, 967, - 965, 963, 962, 961, 959, 958, 957, 956, 949, 948, - 947, 946, 945, 944, 943, 934, 933, 932, 931, 930, - 929, 927, 926, 925, 911, 906, 905, 904, 903, 902, - - 901, 900, 899, 897, 896, 895, 894, 892, 890, 889, - 888, 887, 885, 883, 881, 880, 879, 878, 877, 874, - 873, 871, 870, 869, 868, 867, 866, 864, 863, 861, - 860, 859, 858, 857, 856, 855, 854, 853, 852, 849, - 848, 846, 845, 841, 840, 839, 838, 837, 834, 832, - 831, 830, 829, 828, 825, 824, 823, 822, 821, 819, - 818, 817, 816, 803, 802, 801, 800, 799, 798, 797, - 782, 781, 780, 779, 778, 777, 776, 775, 773, 772, - 771, 770, 767, 765, 764, 763, 762, 761, 760, 759, - 756, 755, 752, 750, 748, 747, 745, 744, 742, 741, - - 740, 739, 738, 737, 736, 734, 733, 732, 731, 730, - 729, 728, 714, 710, 687, 683, 682, 681, 680, 679, - 678, 677, 676, 675, 674, 668, 665, 664, 663, 660, - 659, 658, 657, 656, 655, 654, 652, 651, 649, 648, - 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, - 637, 635, 634, 633, 632, 631, 629, 628, 627, 626, - 625, 624, 623, 622, 621, 619, 618, 617, 616, 614, - 613, 612, 611, 609, 608, 607, 606, 605, 604, 603, - 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, - 592, 591, 590, 589, 588, 587, 586, 585, 578, 577, - - 575, 573, 572, 571, 570, 569, 567, 566, 565, 564, - 562, 561, 560, 559, 558, 557, 555, 553, 552, 550, - 549, 547, 546, 545, 544, 542, 541, 539, 538, 537, - 535, 534, 533, 532, 531, 530, 529, 527, 526, 525, - 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, - 514, 513, 512, 511, 503, 501, 500, 499, 498, 485, - 484, 483, 482, 481, 480, 479, 478, 475, 474, 473, - 472, 471, 468, 467, 466, 463, 462, 461, 459, 457, - 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, - 446, 445, 442, 441, 440, 439, 438, 437, 435, 434, - - 433, 431, 430, 428, 427, 421, 420, 418, 417, 416, - 415, 413, 412, 411, 410, 409, 407, 406, 405, 404, - 403, 402, 400, 399, 398, 397, 396, 395, 384, 382, - 381, 380, 379, 361, 359, 358, 357, 356, 355, 354, - 353, 352, 351, 350, 344, 343, 342, 341, 340, 339, - 338, 335, 333, 330, 328, 321, 320, 318, 317, 316, - 309, 306, 305, 304, 298, 296, 295, 294, 293, 292, - 291, 289, 288, 287, 279, 275, 264, 255, 250, 249, - 248, 247, 246, 244, 243, 242, 223, 205, 203, 202, - 201, 199, 197, 192, 181, 178, 176, 167, 141, 134, - - 132, 130, 129, 113, 84, 78, 76, 75, 74, 65, - 61, 54, 53, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, - 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881, 5881 + 5426, 5427, 5429, 5430, 5431, 5432, 5435, 5436, 5437, 5438, + 5439, 5440, 5441, 5442, 5443, 5444, 5445, 5446, 5447, 5448, + 5449, 5450, 5452, 5453, 5454, 5455, 5456, 5457, 5459, 5460, + 5461, 5462, 5463, 5464, 5465, 5467, 5468, 5469, 5470, 5471, + 5472, 5473, 5474, 5476, 5477, 5478, 5479, 5480, 5481, 5482, + 5484, 5485, 5486, 5487, 5489, 5490, 5491, 5492, 5493, 5494, + 5495, 5496, 5497, 5498, 5499, 5500, 5501, 5502, 5503, 5504, + 5506, 5507, 5509, 5511, 5512, 5513, 5514, 5515, 5516, 5517, + 5521, 5522, 5523, 5524, 5525, 5526, 5527, 5528, 5529, 5528, + 5530, 5531, 5532, 5533, 5534, 5535, 5536, 5537, 5538, 5539, + + 5541, 5542, 5543, 5544, 5545, 5550, 5551, 5553, 5554, 5555, + 5556, 5559, 5561, 5562, 5564, 5565, 5566, 5568, 5569, 5570, + 5572, 5573, 5574, 5575, 5576, 5577, 5578, 5579, 5580, 5581, + 5582, 5583, 5585, 5586, 5587, 5588, 5589, 5590, 5592, 5593, + 5594, 5595, 5596, 5597, 5598, 5599, 5600, 5601, 5602, 5603, + 5604, 5605, 5606, 5607, 5608, 5610, 5612, 5613, 5614, 5615, + 5616, 5617, 5618, 5619, 5620, 5621, 5622, 5625, 5626, 5627, + 5628, 5630, 5631, 5633, 5634, 5635, 5636, 5637, 5638, 5639, + 5640, 5641, 5643, 5644, 5646, 5647, 5648, 5649, 5650, 5651, + 5652, 5653, 5654, 5655, 5656, 5657, 5658, 5660, 5661, 5662, + + 5663, 5664, 5665, 5666, 5667, 5669, 5670, 5671, 5673, 5674, + 5675, 5676, 5677, 5678, 5679, 5680, 5681, 5682, 5683, 5684, + 5685, 5686, 5687, 5688, 5690, 5691, 5692, 5693, 5694, 5695, + 5696, 5697, 5698, 5699, 5700, 5701, 5702, 5703, 5704, 5705, + 5707, 5708, 5709, 5710, 5711, 5712, 5713, 5714, 5715, 5716, + 5717, 5718, 5719, 5720, 5721, 5722, 5724, 5725, 5726, 5727, + 5728, 5729, 5730, 5732, 5733, 5734, 5736, 5738, 5739, 5741, + 5742, 5743, 5745, 5746, 5747, 5748, 5750, 5755, 5750, 5756, + 5757, 5750, 5750, 5750, 5760, 5762, 5763, 5765, 5766, 5767, + 5768, 5769, 5770, 5771, 5772, 5775, 5776, 5777, 5780, 5781, + + 5782, 5784, 5787, 5789, 5791, 5792, 5793, 5794, 5795, 5796, + 5797, 5798, 5799, 5800, 5801, 5802, 5803, 5804, 5805, 5806, + 5807, 5808, 5800, 5809, 5810, 5811, 5812, 5813, 5814, 5815, + 5816, 5817, 5818, 5819, 5821, 5822, 5823, 5824, 5825, 5826, + 5827, 5828, 5829, 5830, 5831, 5832, 5834, 5835, 5836, 5837, + 5838, 5839, 5840, 5841, 5842, 5843, 5844, 5845, 5846, 5847, + 5848, 5849, 5852, 5853, 5843, 5854, 5855, 5856, 5857, 5858, + 5859, 5860, 5861, 5863, 5865, 5866, 5868, 5869, 5870, 5871, + 5872, 5873, 5874, 5875, 5876, 5877, 5878, 5879, 5880, 5881, + 5882, 5884, 5885, 5886, 5887, 5889, 5890, 5892, 5893, 5894, + + 5895, 5896, 5897, 5898, 5899, 5900, 5901, 5902, 5903, 5905, + 5907, 5908, 5909, 5910, 5912, 5913, 5914, 5915, 5916, 5917, + 5919, 5920, 5921, 5922, 5923, 5924, 5925, 5926, 5927, 5929, + 5930, 5931, 5932, 5933, 5936, 5937, 5938, 5939, 5940, 5941, + 5942, 5943, 5944, 5945, 5946, 5947, 5948, 5949, 5951, 5952, + 5954, 5954, 5955, 5956, 5957, 5958, 5959, 5960, 5961, 5963, + 5964, 5967, 5968, 5970, 5971, 5972, 5973, 5974, 5975, 5976, + 5977, 5978, 5979, 5981, 5982, 5983, 5984, 5985, 5986, 5987, + 5988, 5989, 5991, 5993, 5994, 5995, 5997, 5998, 5999, 6001, + 6002, 6003, 6004, 6006, 6007, 6009, 6010, 6011, 6012, 6014, + + 6015, 6017, 6018, 6019, 6020, 6021, 6022, 6023, 6024, 6025, + 6026, 6027, 6028, 6031, 6032, 6035, 6036, 6037, 6038, 6042, + 6043, 6044, 6045, 6046, 6048, 6049, 6050, 6051, 6053, 6054, + 6055, 6056, 6057, 6058, 6059, 6060, 6061, 6062, 6063, 6065, + 6066, 6068, 6069, 6070, 6071, 6072, 6073, 6074, 6075, 6076, + 6077, 6078, 6079, 6080, 6081, 6082, 6084, 6085, 6086, 6087, + 6088, 6089, 6090, 6075, 6092, 6094, 6095, 6096, 6097, 6098, + 6099, 6100, 6101, 6102, 6104, 6105, 6109, 6110, 6111, 6114, + 6115, 6116, 6117, 6118, 6119, 6121, 6122, 6123, 6124, 6125, + 6126, 6127, 6129, 6130, 6131, 6133, 6134, 6135, 6136, 6138, + + 6139, 6140, 6142, 6143, 6144, 6145, 6146, 6147, 6148, 6149, + 6151, 6153, 6154, 6155, 6156, 6158, 6160, 6161, 6165, 6166, + 6167, 6168, 6169, 6170, 6171, 6172, 6174, 6175, 6176, 6178, + 6179, 6180, 6182, 6183, 6184, 6185, 6186, 6187, 6188, 6189, + 6190, 6191, 6192, 6193, 6194, 6195, 6196, 6197, 6198, 6199, + 6201, 6204, 6205, 6207, 6208, 6209, 6210, 6211, 6214, 6215, + 6216, 6217, 6218, 6220, 6221, 6222, 6223, 6224, 6227, 6228, + 6229, 6231, 6232, 6233, 6234, 6235, 6238, 6239, 6240, 6241, + 6242, 6243, 6244, 6245, 6246, 6247, 6248, 6249, 6250, 6252, + 6253, 6255, 6256, 6258, 6259, 6261, 6262, 6263, 6264, 6265, + + 6266, 6267, 6268, 6269, 6270, 6271, 6272, 6273, 6274, 6275, + 6278, 6278, 6278, 6278, 6279, 6279, 6279, 6279, 6280, 6280, + 6280, 6280, 6281, 6281, 6281, 6281, 6282, 6283, 6283, 6284, + 6284, 6285, 6286, 6286, 6287, 6287, 6288, 6290, 6288, 6288, + 6289, 6291, 6289, 6289, 6292, 6293, 6293, 6293, 6293, 6294, + 6294, 6294, 6294, 1051, 1050, 1046, 1044, 1043, 1042, 1041, + 1040, 1038, 1036, 1035, 1034, 1032, 1031, 1030, 1029, 1028, + 1027, 1026, 1025, 1024, 1022, 1021, 1019, 1018, 1017, 1016, + 1015, 1013, 1012, 1011, 1009, 1008, 1007, 1006, 999, 998, + 997, 996, 995, 994, 993, 984, 983, 982, 981, 980, + + 979, 977, 976, 975, 961, 956, 955, 954, 953, 952, + 951, 950, 949, 947, 946, 945, 944, 942, 940, 939, + 938, 937, 935, 933, 931, 930, 929, 928, 927, 924, + 923, 921, 920, 919, 918, 917, 916, 914, 913, 911, + 910, 909, 908, 907, 906, 905, 904, 903, 902, 899, + 898, 896, 895, 891, 890, 889, 887, 886, 885, 882, + 881, 878, 877, 876, 875, 874, 871, 870, 869, 868, + 867, 865, 864, 863, 862, 849, 848, 847, 846, 845, + 844, 843, 828, 827, 826, 825, 824, 823, 822, 821, + 819, 818, 817, 816, 813, 811, 810, 808, 807, 806, + + 803, 802, 799, 797, 795, 794, 792, 791, 789, 788, + 787, 786, 785, 784, 782, 781, 780, 779, 778, 777, + 776, 762, 737, 733, 732, 731, 730, 729, 728, 727, + 726, 725, 724, 718, 717, 715, 714, 713, 712, 711, + 710, 704, 703, 702, 701, 699, 698, 697, 696, 695, + 693, 692, 690, 687, 686, 685, 684, 683, 682, 680, + 679, 677, 676, 675, 674, 673, 672, 671, 670, 669, + 668, 667, 666, 665, 663, 662, 661, 660, 659, 657, + 656, 655, 654, 653, 652, 651, 650, 649, 647, 646, + 645, 644, 642, 641, 640, 639, 637, 636, 635, 634, + + 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, + 623, 622, 621, 620, 619, 618, 617, 616, 615, 608, + 607, 605, 603, 602, 601, 600, 599, 597, 596, 595, + 594, 593, 592, 590, 589, 588, 587, 586, 585, 584, + 583, 581, 579, 578, 576, 575, 573, 572, 571, 570, + 568, 567, 565, 564, 563, 561, 560, 559, 558, 557, + 556, 555, 554, 553, 552, 551, 550, 549, 547, 546, + 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, + 535, 534, 533, 525, 523, 522, 521, 520, 507, 506, + 505, 504, 503, 502, 501, 500, 497, 496, 495, 494, + + 493, 490, 489, 488, 485, 484, 483, 481, 479, 478, + 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, + 467, 464, 463, 462, 461, 460, 459, 457, 456, 455, + 453, 452, 450, 449, 443, 442, 440, 439, 438, 437, + 436, 435, 433, 432, 431, 430, 429, 428, 427, 425, + 424, 423, 422, 421, 420, 418, 417, 416, 415, 414, + 413, 402, 400, 399, 398, 397, 379, 377, 376, 375, + 374, 373, 372, 371, 370, 369, 368, 363, 362, 361, + 360, 359, 358, 355, 353, 350, 348, 341, 340, 338, + 337, 336, 329, 326, 325, 324, 318, 316, 315, 314, + + 313, 312, 311, 309, 308, 307, 300, 299, 298, 297, + 295, 294, 293, 282, 280, 267, 259, 254, 253, 252, + 251, 250, 248, 247, 246, 227, 208, 206, 205, 204, + 202, 200, 195, 184, 181, 179, 170, 144, 137, 135, + 133, 132, 115, 86, 80, 78, 77, 76, 67, 63, + 50, 49, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277, + 6277, 6277, 6277, 6277, 6277, 6277, 6277, 6277 } ; /* The intent behind this definition is that it'll catch @@ -4428,7 +4679,8 @@ -#line 4432 "parameters_flexer.cc" + +#line 4684 "parameters_flexer.cc" #define INITIAL 0 #define JOB_MODE 1 @@ -4457,9 +4709,10 @@ #define DIR_MODE 24 #define MI_MODE 25 #define NW_MODE 26 -#define CO_VALMODE 27 -#define COMMENT_MODE 28 -#define ASKFORTECH_NOCLIPPING 29 +#define NW_CHOICEMODE 27 +#define CO_VALMODE 28 +#define COMMENT_MODE 29 +#define ASKFORTECH_NOCLIPPING 30 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way @@ -4562,10 +4815,10 @@ register char *yy_cp, *yy_bp; register int yy_act; -#line 84 "parameters_flexer.ll" +#line 85 "parameters_flexer.ll" -#line 4569 "parameters_flexer.cc" +#line 4822 "parameters_flexer.cc" if ( !(yy_init) ) { @@ -4618,13 +4871,13 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 5882 ) + if ( yy_current_state >= 6278 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 9014 ); + while ( yy_base[yy_current_state] != 9553 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -4649,2238 +4902,2369 @@ goto yy_find_action; case 1: -#line 87 "parameters_flexer.ll" +#line 88 "parameters_flexer.ll" case 2: YY_RULE_SETUP -#line 87 "parameters_flexer.ll" +#line 88 "parameters_flexer.ll" {return MP_as_numthreads;} YY_BREAK case 3: -#line 89 "parameters_flexer.ll" +#line 90 "parameters_flexer.ll" case 4: YY_RULE_SETUP -#line 89 "parameters_flexer.ll" +#line 90 "parameters_flexer.ll" {return MP_as_amm_keeppercentfree;} YY_BREAK case 5: -#line 91 "parameters_flexer.ll" +#line 92 "parameters_flexer.ll" case 6: YY_RULE_SETUP -#line 91 "parameters_flexer.ll" +#line 92 "parameters_flexer.ll" {return MP_as_amm_maxprocesssize;} YY_BREAK case 7: -#line 93 "parameters_flexer.ll" +#line 94 "parameters_flexer.ll" case 8: YY_RULE_SETUP -#line 93 "parameters_flexer.ll" +#line 94 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_automemmanagement;} YY_BREAK case 9: -#line 96 "parameters_flexer.ll" +#line 97 "parameters_flexer.ll" case 10: YY_RULE_SETUP -#line 96 "parameters_flexer.ll" +#line 97 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_cleanup_tmp_files;} YY_BREAK case 11: -#line 99 "parameters_flexer.ll" +#line 100 "parameters_flexer.ll" case 12: YY_RULE_SETUP -#line 99 "parameters_flexer.ll" +#line 100 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_nodateoutput;} YY_BREAK case 13: -#line 101 "parameters_flexer.ll" +#line 102 "parameters_flexer.ll" case 14: YY_RULE_SETUP -#line 101 "parameters_flexer.ll" +#line 102 "parameters_flexer.ll" { return MP_sp_est_startstep;} YY_BREAK case 15: -#line 103 "parameters_flexer.ll" +#line 104 "parameters_flexer.ll" case 16: YY_RULE_SETUP -#line 103 "parameters_flexer.ll" +#line 104 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_buntify_reads;} YY_BREAK case 17: -#line 107 "parameters_flexer.ll" +#line 108 "parameters_flexer.ll" case 18: YY_RULE_SETUP -#line 107 "parameters_flexer.ll" +#line 108 "parameters_flexer.ll" {yy_push_state(ASK_YN_MODE); return MP_as_wants_qualityfile;} YY_BREAK case 19: YY_RULE_SETUP -#line 109 "parameters_flexer.ll" +#line 110 "parameters_flexer.ll" { BEGIN(LR_MODE); return E_QUAL_NONE;} YY_BREAK case 20: YY_RULE_SETUP -#line 110 "parameters_flexer.ll" +#line 111 "parameters_flexer.ll" { BEGIN(LR_MODE); return E_QUAL_SCF;} YY_BREAK case 21: YY_RULE_SETUP -#line 111 "parameters_flexer.ll" +#line 112 "parameters_flexer.ll" { BEGIN(0); return MP_UNRECOGNISED_STRING;} YY_BREAK case 22: YY_RULE_SETUP -#line 112 "parameters_flexer.ll" +#line 113 "parameters_flexer.ll" { BEGIN(0); return MP_UNRECOGNISED_STRING;} YY_BREAK case 23: YY_RULE_SETUP -#line 113 "parameters_flexer.ll" +#line 114 "parameters_flexer.ll" { BEGIN(0); return MP_UNRECOGNISED_STRING;} YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP -#line 114 "parameters_flexer.ll" +#line 115 "parameters_flexer.ll" { BEGIN(0); return MP_UNRECOGNISED_STRING;} YY_BREAK case 25: -#line 116 "parameters_flexer.ll" +#line 117 "parameters_flexer.ll" case 26: YY_RULE_SETUP -#line 116 "parameters_flexer.ll" +#line 117 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_filecheck_only;} YY_BREAK case 27: -#line 120 "parameters_flexer.ll" +#line 121 "parameters_flexer.ll" case 28: YY_RULE_SETUP -#line 120 "parameters_flexer.ll" +#line 121 "parameters_flexer.ll" { return MP_as_backbone_raillength;} YY_BREAK case 29: -#line 122 "parameters_flexer.ll" +#line 123 "parameters_flexer.ll" case 30: YY_RULE_SETUP -#line 122 "parameters_flexer.ll" +#line 123 "parameters_flexer.ll" { return MP_as_backbone_railoverlap;} YY_BREAK case 31: -#line 124 "parameters_flexer.ll" +#line 125 "parameters_flexer.ll" case 32: YY_RULE_SETUP -#line 124 "parameters_flexer.ll" +#line 125 "parameters_flexer.ll" { filenameid=MP_as_backbone_rail_fromstrain; yy_push_state(FN_MODE);} YY_BREAK case 33: -#line 126 "parameters_flexer.ll" +#line 127 "parameters_flexer.ll" case 34: YY_RULE_SETUP -#line 126 "parameters_flexer.ll" +#line 127 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_backbone_strainname_forceforall;} YY_BREAK case 35: -#line 128 "parameters_flexer.ll" +#line 129 "parameters_flexer.ll" case 36: YY_RULE_SETUP -#line 128 "parameters_flexer.ll" +#line 129 "parameters_flexer.ll" { return MP_as_backbone_basequals;} YY_BREAK case 37: -#line 130 "parameters_flexer.ll" +#line 131 "parameters_flexer.ll" case 38: YY_RULE_SETUP -#line 130 "parameters_flexer.ll" +#line 131 "parameters_flexer.ll" { return MP_as_startbackboneusage_inpass;} YY_BREAK case 39: -#line 132 "parameters_flexer.ll" +#line 133 "parameters_flexer.ll" case 40: YY_RULE_SETUP -#line 132 "parameters_flexer.ll" +#line 133 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_backbone_alsobuildnewcontigs;} YY_BREAK case 41: -#line 136 "parameters_flexer.ll" +#line 135 "parameters_flexer.ll" case 42: YY_RULE_SETUP -#line 136 "parameters_flexer.ll" -{ return MP_as_clip_ssahamerge_strictfrontclip;} +#line 135 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_backbone_trimoverhangingreads;} YY_BREAK case 43: -#line 138 "parameters_flexer.ll" +#line 137 "parameters_flexer.ll" case 44: YY_RULE_SETUP -#line 138 "parameters_flexer.ll" -{ return MP_as_clip_ssahamerge_strictendclip;} +#line 137 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_backbone_bootstrapnewbackbone;} YY_BREAK case 45: -#line 140 "parameters_flexer.ll" +#line 141 "parameters_flexer.ll" case 46: YY_RULE_SETUP -#line 140 "parameters_flexer.ll" -{ return MP_as_clip_ssahamerge_gapsize;} +#line 141 "parameters_flexer.ll" +{ return MP_as_clip_ssahamerge_strictfrontclip;} YY_BREAK case 47: -#line 142 "parameters_flexer.ll" +#line 143 "parameters_flexer.ll" case 48: YY_RULE_SETUP -#line 142 "parameters_flexer.ll" -{ return MP_as_clip_ssahamerge_maxfrontgap;} +#line 143 "parameters_flexer.ll" +{ return MP_as_clip_ssahamerge_strictendclip;} YY_BREAK case 49: -#line 144 "parameters_flexer.ll" +#line 145 "parameters_flexer.ll" case 50: YY_RULE_SETUP -#line 144 "parameters_flexer.ll" -{ return MP_as_clip_ssahamerge_maxendgap;} +#line 145 "parameters_flexer.ll" +{ return MP_as_clip_ssahamerge_gapsize;} YY_BREAK case 51: -#line 146 "parameters_flexer.ll" +#line 147 "parameters_flexer.ll" case 52: YY_RULE_SETUP -#line 146 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_possible_vectors;} +#line 147 "parameters_flexer.ll" +{ return MP_as_clip_ssahamerge_maxfrontgap;} YY_BREAK case 53: -#line 148 "parameters_flexer.ll" +#line 149 "parameters_flexer.ll" case 54: YY_RULE_SETUP -#line 148 "parameters_flexer.ll" -{ return MP_as_clip_vector_maxlenallowed;} +#line 149 "parameters_flexer.ll" +{ return MP_as_clip_ssahamerge_maxendgap;} YY_BREAK case 55: -#line 150 "parameters_flexer.ll" +#line 151 "parameters_flexer.ll" case 56: YY_RULE_SETUP -#line 150 "parameters_flexer.ll" -{ return MP_as_clip_badstretchquality_minqual;} +#line 151 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_possible_vectors;} YY_BREAK case 57: -#line 152 "parameters_flexer.ll" +#line 153 "parameters_flexer.ll" case 58: YY_RULE_SETUP -#line 152 "parameters_flexer.ll" -{ return MP_as_clip_badstretchquality_winlen;} +#line 153 "parameters_flexer.ll" +{ return MP_as_clip_vector_maxlenallowed;} YY_BREAK case 59: -#line 154 "parameters_flexer.ll" +#line 155 "parameters_flexer.ll" case 60: YY_RULE_SETUP -#line 154 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_badstretchquality;} +#line 155 "parameters_flexer.ll" +{ return MP_as_clip_badstretchquality_minqual;} YY_BREAK case 61: -#line 156 "parameters_flexer.ll" +#line 157 "parameters_flexer.ll" case 62: YY_RULE_SETUP -#line 156 "parameters_flexer.ll" -{ return MP_as_clip_quality_minqual;} +#line 157 "parameters_flexer.ll" +{ return MP_as_clip_badstretchquality_winlen;} YY_BREAK case 63: -#line 158 "parameters_flexer.ll" +#line 159 "parameters_flexer.ll" case 64: YY_RULE_SETUP -#line 158 "parameters_flexer.ll" -{ return MP_as_clip_quality_winlen;} +#line 159 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_badstretchquality;} YY_BREAK case 65: -#line 160 "parameters_flexer.ll" +#line 161 "parameters_flexer.ll" case 66: YY_RULE_SETUP -#line 160 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_quality;} +#line 161 "parameters_flexer.ll" +{ return MP_as_clip_quality_minqual;} YY_BREAK case 67: -#line 162 "parameters_flexer.ll" +#line 163 "parameters_flexer.ll" case 68: YY_RULE_SETUP -#line 162 "parameters_flexer.ll" -{ return MP_as_clip_maskedbases_gapsize;} +#line 163 "parameters_flexer.ll" +{ return MP_as_clip_quality_winlen;} YY_BREAK case 69: -#line 164 "parameters_flexer.ll" +#line 165 "parameters_flexer.ll" case 70: YY_RULE_SETUP -#line 164 "parameters_flexer.ll" -{ return MP_as_clip_maskedbases_maxfrontgap;} +#line 165 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_quality;} YY_BREAK case 71: -#line 166 "parameters_flexer.ll" +#line 167 "parameters_flexer.ll" case 72: YY_RULE_SETUP -#line 166 "parameters_flexer.ll" -{ return MP_as_clip_maskedbases_maxendgap;} +#line 167 "parameters_flexer.ll" +{ return MP_as_clip_maskedbases_gapsize;} YY_BREAK case 73: -#line 168 "parameters_flexer.ll" +#line 169 "parameters_flexer.ll" case 74: YY_RULE_SETUP -#line 168 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_maskedbases;} +#line 169 "parameters_flexer.ll" +{ return MP_as_clip_maskedbases_maxfrontgap;} YY_BREAK case 75: -#line 170 "parameters_flexer.ll" +#line 171 "parameters_flexer.ll" case 76: YY_RULE_SETUP -#line 170 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_lowercase_front;} +#line 171 "parameters_flexer.ll" +{ return MP_as_clip_maskedbases_maxendgap;} YY_BREAK case 77: -#line 172 "parameters_flexer.ll" +#line 173 "parameters_flexer.ll" case 78: YY_RULE_SETUP -#line 172 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_lowercase_back;} +#line 173 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_maskedbases;} YY_BREAK case 79: -#line 174 "parameters_flexer.ll" +#line 175 "parameters_flexer.ll" case 80: YY_RULE_SETUP -#line 174 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_ensureminimumleftclip;} +#line 175 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_lowercase_front;} YY_BREAK case 81: -#line 176 "parameters_flexer.ll" +#line 177 "parameters_flexer.ll" case 82: YY_RULE_SETUP -#line 176 "parameters_flexer.ll" -{ return MP_as_clip_minimumleftcliprequired;} +#line 177 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_lowercase_back;} YY_BREAK case 83: -#line 178 "parameters_flexer.ll" +#line 179 "parameters_flexer.ll" case 84: YY_RULE_SETUP -#line 178 "parameters_flexer.ll" -{ return MP_as_clip_setminimumleftclip;} - YY_BREAK -case 85: -YY_RULE_SETUP #line 179 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_ensureminimumrightclip;} +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_ensureminimumleftclip;} YY_BREAK -case 86: +case 85: #line 181 "parameters_flexer.ll" -case 87: +case 86: YY_RULE_SETUP #line 181 "parameters_flexer.ll" -{ return MP_as_clip_minimumrightcliprequired;} +{ return MP_as_clip_minimumleftcliprequired;} YY_BREAK +case 87: +#line 183 "parameters_flexer.ll" case 88: +YY_RULE_SETUP #line 183 "parameters_flexer.ll" +{ return MP_as_clip_setminimumleftclip;} + YY_BREAK case 89: YY_RULE_SETUP -#line 183 "parameters_flexer.ll" -{ return MP_as_clip_setminimumrightclip;} +#line 184 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_ensureminimumrightclip;} YY_BREAK case 90: -#line 185 "parameters_flexer.ll" +#line 186 "parameters_flexer.ll" case 91: YY_RULE_SETUP -#line 185 "parameters_flexer.ll" -{ return MP_as_clip_quality_numminthreshold;} +#line 186 "parameters_flexer.ll" +{ return MP_as_clip_minimumrightcliprequired;} YY_BREAK case 92: -#line 187 "parameters_flexer.ll" +#line 188 "parameters_flexer.ll" case 93: YY_RULE_SETUP -#line 187 "parameters_flexer.ll" -{ return MP_as_clip_quality_minthreshold;} +#line 188 "parameters_flexer.ll" +{ return MP_as_clip_setminimumrightclip;} YY_BREAK case 94: #line 190 "parameters_flexer.ll" case 95: YY_RULE_SETUP #line 190 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_as_clip_3ppolybase;} +{ return MP_as_clip_quality_numminthreshold;} YY_BREAK case 96: #line 192 "parameters_flexer.ll" case 97: YY_RULE_SETUP #line 192 "parameters_flexer.ll" -{return MP_as_clip_3ppolybase_len;} +{ return MP_as_clip_quality_minthreshold;} YY_BREAK case 98: -#line 194 "parameters_flexer.ll" +#line 195 "parameters_flexer.ll" case 99: YY_RULE_SETUP -#line 194 "parameters_flexer.ll" -{return MP_as_clip_3ppolybase_maxerrors;} +#line 195 "parameters_flexer.ll" +{yy_push_state(ASK_YN_MODE); return MP_as_clip_3ppolybase;} YY_BREAK case 100: -#line 196 "parameters_flexer.ll" +#line 197 "parameters_flexer.ll" case 101: YY_RULE_SETUP -#line 196 "parameters_flexer.ll" -{return MP_as_clip_3ppolybase_maxgap;} +#line 197 "parameters_flexer.ll" +{return MP_as_clip_3ppolybase_len;} YY_BREAK case 102: #line 199 "parameters_flexer.ll" case 103: YY_RULE_SETUP #line 199 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat;} +{return MP_as_clip_3ppolybase_maxerrors;} YY_BREAK case 104: #line 201 "parameters_flexer.ll" case 105: YY_RULE_SETUP #line 201 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat_keeppolysignal;} +{return MP_as_clip_3ppolybase_maxgap;} YY_BREAK case 106: -#line 203 "parameters_flexer.ll" +#line 204 "parameters_flexer.ll" case 107: YY_RULE_SETUP -#line 203 "parameters_flexer.ll" -{return MP_as_clip_polyat_len;} +#line 204 "parameters_flexer.ll" +{yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat;} YY_BREAK case 108: -#line 205 "parameters_flexer.ll" +#line 206 "parameters_flexer.ll" case 109: YY_RULE_SETUP -#line 205 "parameters_flexer.ll" -{return MP_as_clip_polyat_maxerrors;} +#line 206 "parameters_flexer.ll" +{yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat_keeppolystretch;} YY_BREAK case 110: -#line 207 "parameters_flexer.ll" +#line 208 "parameters_flexer.ll" case 111: YY_RULE_SETUP -#line 207 "parameters_flexer.ll" -{return MP_as_clip_polyat_maxgap;} +#line 208 "parameters_flexer.ll" +{return MP_as_clip_polyat_len;} YY_BREAK case 112: #line 210 "parameters_flexer.ll" case 113: YY_RULE_SETUP #line 210 "parameters_flexer.ll" -{ return MP_as_clip_pec_basesperhash;} +{return MP_as_clip_polyat_maxerrors;} YY_BREAK case 114: #line 212 "parameters_flexer.ll" case 115: YY_RULE_SETUP #line 212 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_proposeendclips;} +{return MP_as_clip_polyat_maxgap;} YY_BREAK case 116: -#line 214 "parameters_flexer.ll" +#line 215 "parameters_flexer.ll" case 117: YY_RULE_SETUP -#line 214 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_sxaggcxg;} - YY_BREAK -case 118: -YY_RULE_SETUP #line 215 "parameters_flexer.ll" -{ return MP_as_clip_pec_ffreq;} +{ return MP_as_clip_pec_basesperhash;} YY_BREAK +case 118: +#line 217 "parameters_flexer.ll" case 119: YY_RULE_SETUP -#line 216 "parameters_flexer.ll" -{ return MP_as_clip_pec_bfreq;} - YY_BREAK -case 120: -YY_RULE_SETUP #line 217 "parameters_flexer.ll" -{ return MP_as_clip_pec_mkfr;} +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_proposeendclips;} YY_BREAK +case 120: +#line 219 "parameters_flexer.ll" case 121: YY_RULE_SETUP -#line 218 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_ffr;} +#line 219 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_sxaggcxg;} YY_BREAK case 122: YY_RULE_SETUP -#line 219 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_bfr;} +#line 220 "parameters_flexer.ll" +{ return MP_as_clip_pec_ffreq;} YY_BREAK case 123: YY_RULE_SETUP -#line 220 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_fcmst;} +#line 221 "parameters_flexer.ll" +{ return MP_as_clip_pec_bfreq;} YY_BREAK case 124: YY_RULE_SETUP -#line 221 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_bcmst;} +#line 222 "parameters_flexer.ll" +{ return MP_as_clip_pec_mkfr;} YY_BREAK case 125: YY_RULE_SETUP -#line 222 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_fsalp;} +#line 223 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_ffr;} YY_BREAK case 126: YY_RULE_SETUP -#line 223 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_bsalp;} +#line 224 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_bfr;} YY_BREAK case 127: +YY_RULE_SETUP #line 225 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_fcmst;} + YY_BREAK case 128: YY_RULE_SETUP -#line 225 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_skimchimeradetection;} +#line 226 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_bcmst;} YY_BREAK case 129: +YY_RULE_SETUP #line 227 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_fsalp;} + YY_BREAK case 130: YY_RULE_SETUP -#line 227 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_skimjunkdetection;} +#line 228 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_pec_bsalp;} YY_BREAK case 131: -#line 229 "parameters_flexer.ll" +#line 230 "parameters_flexer.ll" case 132: YY_RULE_SETUP -#line 229 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_badsolexaends;} +#line 230 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_skimchimeradetection;} YY_BREAK case 133: -#line 231 "parameters_flexer.ll" +#line 232 "parameters_flexer.ll" case 134: YY_RULE_SETUP -#line 231 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_search_phix174;} +#line 232 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_skimjunkdetection;} YY_BREAK case 135: -#line 233 "parameters_flexer.ll" +#line 234 "parameters_flexer.ll" case 136: YY_RULE_SETUP -#line 233 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_filter_phix174;} +#line 234 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_badsolexaends;} YY_BREAK case 137: -#line 235 "parameters_flexer.ll" +#line 236 "parameters_flexer.ll" case 138: YY_RULE_SETUP -#line 235 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_clip_knownadaptorsright;} +#line 236 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_search_phix174;} YY_BREAK case 139: -#line 237 "parameters_flexer.ll" +#line 238 "parameters_flexer.ll" case 140: YY_RULE_SETUP -#line 237 "parameters_flexer.ll" -{ return MP_as_clipmask_rarekmers;} +#line 238 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_filter_phix174;} YY_BREAK case 141: -#line 243 "parameters_flexer.ll" +#line 240 "parameters_flexer.ll" case 142: YY_RULE_SETUP -#line 243 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_savesimplesingletsinproject;} +#line 240 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_clip_knownadaptorsright;} YY_BREAK case 143: -#line 245 "parameters_flexer.ll" +#line 242 "parameters_flexer.ll" case 144: YY_RULE_SETUP -#line 245 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_savesimplesingletsinproject;} +#line 242 "parameters_flexer.ll" +{ return MP_as_clipmask_rarekmers;} YY_BREAK case 145: -#line 247 "parameters_flexer.ll" +#line 248 "parameters_flexer.ll" case 146: YY_RULE_SETUP -#line 247 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_removerollovertmps;} +#line 248 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_savesimplesingletsinproject;} YY_BREAK case 147: -#line 249 "parameters_flexer.ll" +#line 250 "parameters_flexer.ll" case 148: YY_RULE_SETUP -#line 249 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_removetmpdir;} +#line 250 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_savesimplesingletsinproject;} YY_BREAK case 149: #line 252 "parameters_flexer.ll" case 150: YY_RULE_SETUP #line 252 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_html;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_removerollovertmps;} YY_BREAK case 151: #line 254 "parameters_flexer.ll" case 152: YY_RULE_SETUP #line 254 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_text;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_removetmpdir;} YY_BREAK case 153: -#line 256 "parameters_flexer.ll" +#line 257 "parameters_flexer.ll" case 154: YY_RULE_SETUP -#line 256 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_tcs;} +#line 257 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_html;} YY_BREAK case 155: -#line 258 "parameters_flexer.ll" +#line 259 "parameters_flexer.ll" case 156: YY_RULE_SETUP -#line 258 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_caf;} +#line 259 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_text;} YY_BREAK case 157: -#line 260 "parameters_flexer.ll" +#line 261 "parameters_flexer.ll" case 158: YY_RULE_SETUP -#line 260 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_maf;} +#line 261 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_tcs;} YY_BREAK case 159: -#line 262 "parameters_flexer.ll" +#line 263 "parameters_flexer.ll" case 160: YY_RULE_SETUP -#line 262 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_ace;} +#line 263 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_caf;} YY_BREAK case 161: -#line 264 "parameters_flexer.ll" +#line 265 "parameters_flexer.ll" case 162: YY_RULE_SETUP -#line 264 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_gap4da;} +#line 265 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_maf;} YY_BREAK case 163: -#line 266 "parameters_flexer.ll" +#line 267 "parameters_flexer.ll" case 164: YY_RULE_SETUP -#line 266 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_fasta;} +#line 267 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_ace;} YY_BREAK case 165: #line 269 "parameters_flexer.ll" case 166: YY_RULE_SETUP #line 269 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_alsosinglets;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_gap4da;} YY_BREAK case 167: #line 271 "parameters_flexer.ll" case 168: YY_RULE_SETUP #line 271 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_html;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tmp_fasta;} YY_BREAK case 169: -#line 273 "parameters_flexer.ll" +#line 274 "parameters_flexer.ll" case 170: YY_RULE_SETUP -#line 273 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_caf;} +#line 274 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_alsosinglets;} YY_BREAK case 171: -#line 275 "parameters_flexer.ll" +#line 276 "parameters_flexer.ll" case 172: YY_RULE_SETUP -#line 275 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_ace;} +#line 276 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_html;} YY_BREAK case 173: -#line 277 "parameters_flexer.ll" +#line 278 "parameters_flexer.ll" case 174: YY_RULE_SETUP -#line 277 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_gap4da;} +#line 278 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_caf;} YY_BREAK case 175: -#line 279 "parameters_flexer.ll" +#line 280 "parameters_flexer.ll" case 176: YY_RULE_SETUP -#line 279 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_fasta;} +#line 280 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_ace;} YY_BREAK case 177: #line 282 "parameters_flexer.ll" case 178: YY_RULE_SETUP #line 282 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_caf;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_gap4da;} YY_BREAK case 179: #line 284 "parameters_flexer.ll" case 180: YY_RULE_SETUP #line 284 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_maf;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_exttmp_fasta;} YY_BREAK case 181: -#line 286 "parameters_flexer.ll" +#line 287 "parameters_flexer.ll" case 182: YY_RULE_SETUP -#line 286 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_html;} +#line 287 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_caf;} YY_BREAK case 183: -#line 288 "parameters_flexer.ll" +#line 289 "parameters_flexer.ll" case 184: YY_RULE_SETUP -#line 288 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_text;} +#line 289 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_maf;} YY_BREAK case 185: -#line 290 "parameters_flexer.ll" +#line 291 "parameters_flexer.ll" case 186: YY_RULE_SETUP -#line 290 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_ace;} +#line 291 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_html;} YY_BREAK case 187: -#line 292 "parameters_flexer.ll" +#line 293 "parameters_flexer.ll" case 188: YY_RULE_SETUP -#line 292 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_wiggle;} +#line 293 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_text;} YY_BREAK case 189: -#line 294 "parameters_flexer.ll" +#line 295 "parameters_flexer.ll" case 190: YY_RULE_SETUP -#line 294 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_tcs;} +#line 295 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_ace;} YY_BREAK case 191: -#line 296 "parameters_flexer.ll" +#line 297 "parameters_flexer.ll" case 192: YY_RULE_SETUP -#line 296 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_gff3;} +#line 297 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_wiggle;} YY_BREAK case 193: -#line 298 "parameters_flexer.ll" +#line 299 "parameters_flexer.ll" case 194: YY_RULE_SETUP -#line 298 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_gap4da;} +#line 299 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_tcs;} YY_BREAK case 195: -#line 300 "parameters_flexer.ll" +#line 301 "parameters_flexer.ll" case 196: YY_RULE_SETUP -#line 300 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_output_fasta;} +#line 301 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_output_gff3;} YY_BREAK case 197: #line 303 "parameters_flexer.ll" case 198: YY_RULE_SETUP #line 303 "parameters_flexer.ll" -{ return MP_con_output_html_cpl;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_gap4da;} YY_BREAK case 199: #line 305 "parameters_flexer.ll" case 200: YY_RULE_SETUP #line 305 "parameters_flexer.ll" -{ return MP_con_output_text_cpl;} +{ yy_push_state(ASK_YN_MODE); return MP_as_output_fasta;} YY_BREAK case 201: -#line 307 "parameters_flexer.ll" +#line 308 "parameters_flexer.ll" case 202: YY_RULE_SETUP -#line 307 "parameters_flexer.ll" -{ singlechar_id=MP_con_output_html_gapfill; yy_push_state(GET_SINGLECHAR_STRING_MODE);} +#line 308 "parameters_flexer.ll" +{ return MP_con_output_html_cpl;} YY_BREAK case 203: -#line 309 "parameters_flexer.ll" +#line 310 "parameters_flexer.ll" case 204: YY_RULE_SETUP -#line 309 "parameters_flexer.ll" -{ singlechar_id=MP_con_output_text_gapfill;yy_push_state(GET_SINGLECHAR_STRING_MODE);} +#line 310 "parameters_flexer.ll" +{ return MP_con_output_text_cpl;} YY_BREAK case 205: -YY_RULE_SETUP -#line 311 "parameters_flexer.ll" - - YY_BREAK +#line 312 "parameters_flexer.ll" case 206: YY_RULE_SETUP #line 312 "parameters_flexer.ll" -{yy_pop_state(); return singlechar_id;} +{ singlechar_id=MP_con_output_html_gapfill; yy_push_state(GET_SINGLECHAR_STRING_MODE);} YY_BREAK case 207: -YY_RULE_SETUP -#line 313 "parameters_flexer.ll" -{yy_pop_state(); return singlechar_id;} - YY_BREAK +#line 314 "parameters_flexer.ll" case 208: YY_RULE_SETUP #line 314 "parameters_flexer.ll" - +{ singlechar_id=MP_con_output_text_gapfill;yy_push_state(GET_SINGLECHAR_STRING_MODE);} YY_BREAK case 209: YY_RULE_SETUP -#line 315 "parameters_flexer.ll" -{yy_pop_state(); return singlechar_id;} +#line 316 "parameters_flexer.ll" + YY_BREAK case 210: YY_RULE_SETUP -#line 318 "parameters_flexer.ll" -{yy_pop_state(); return 1;} +#line 317 "parameters_flexer.ll" +{yy_pop_state(); return singlechar_id;} YY_BREAK case 211: YY_RULE_SETUP -#line 319 "parameters_flexer.ll" -{yy_pop_state(); return 0;} +#line 318 "parameters_flexer.ll" +{yy_pop_state(); return singlechar_id;} YY_BREAK case 212: YY_RULE_SETUP -#line 320 "parameters_flexer.ll" -{yy_pop_state(); return 1;} +#line 319 "parameters_flexer.ll" + YY_BREAK case 213: YY_RULE_SETUP -#line 321 "parameters_flexer.ll" -{yy_pop_state(); return 0;} +#line 320 "parameters_flexer.ll" +{yy_pop_state(); return singlechar_id;} YY_BREAK case 214: YY_RULE_SETUP -#line 322 "parameters_flexer.ll" +#line 323 "parameters_flexer.ll" {yy_pop_state(); return 1;} YY_BREAK case 215: YY_RULE_SETUP -#line 323 "parameters_flexer.ll" +#line 324 "parameters_flexer.ll" {yy_pop_state(); return 0;} YY_BREAK case 216: YY_RULE_SETUP -#line 324 "parameters_flexer.ll" +#line 325 "parameters_flexer.ll" {yy_pop_state(); return 1;} YY_BREAK case 217: YY_RULE_SETUP -#line 325 "parameters_flexer.ll" +#line 326 "parameters_flexer.ll" {yy_pop_state(); return 0;} YY_BREAK case 218: YY_RULE_SETUP -#line 326 "parameters_flexer.ll" -{} +#line 327 "parameters_flexer.ll" +{yy_pop_state(); return 1;} YY_BREAK case 219: YY_RULE_SETUP -#line 327 "parameters_flexer.ll" -{yy_pop_state(); return MP_UNRECOGNISED_STRING;} +#line 328 "parameters_flexer.ll" +{yy_pop_state(); return 0;} YY_BREAK case 220: -#line 330 "parameters_flexer.ll" +YY_RULE_SETUP +#line 329 "parameters_flexer.ll" +{yy_pop_state(); return 1;} + YY_BREAK case 221: YY_RULE_SETUP #line 330 "parameters_flexer.ll" -{filenameid=MP_dir_tmp_redirectedto; yy_push_state(FN_MODE); } +{yy_pop_state(); return 0;} YY_BREAK case 222: YY_RULE_SETUP #line 331 "parameters_flexer.ll" -{filenameid=MP_dir_cwd; yy_push_state(FN_MODE); } +{} YY_BREAK case 223: YY_RULE_SETUP #line 332 "parameters_flexer.ll" -{filenameid=MP_dir_tmp; yy_push_state(FN_MODE); } +{yy_pop_state(); return MP_UNRECOGNISED_STRING;} YY_BREAK case 224: +#line 335 "parameters_flexer.ll" +case 225: YY_RULE_SETUP -#line 334 "parameters_flexer.ll" -{ yy_pop_state(); return filenameid;} +#line 335 "parameters_flexer.ll" +{filenameid=MP_dir_tmp_redirectedto; yy_push_state(FN_MODE); } YY_BREAK -case 225: -#line 338 "parameters_flexer.ll" case 226: YY_RULE_SETUP -#line 338 "parameters_flexer.ll" -{ return MP_as_minimum_readlength;} +#line 336 "parameters_flexer.ll" +{filenameid=MP_dir_tmp; yy_push_state(FN_MODE); } YY_BREAK case 227: -#line 340 "parameters_flexer.ll" -case 228: YY_RULE_SETUP -#line 340 "parameters_flexer.ll" -{ return MP_as_minimum_readspercontig;} +#line 338 "parameters_flexer.ll" +{ yy_pop_state(); return filenameid;} YY_BREAK -case 229: +case 228: #line 342 "parameters_flexer.ll" -case 230: +case 229: YY_RULE_SETUP #line 342 "parameters_flexer.ll" -{ return(MP_as_numpasses);} +{ return MP_as_minimum_readlength;} YY_BREAK -case 231: +case 230: #line 344 "parameters_flexer.ll" -case 232: +case 231: YY_RULE_SETUP #line 344 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return(MP_as_skimeachpass);} +{ return MP_as_minimum_readspercontig;} YY_BREAK -case 233: +case 232: #line 346 "parameters_flexer.ll" -case 234: +case 233: YY_RULE_SETUP #line 346 "parameters_flexer.ll" -{ return MP_as_numrmbbreakloops;} +{ return(MP_as_numpasses);} YY_BREAK -case 235: +case 234: #line 348 "parameters_flexer.ll" -case 236: +case 235: YY_RULE_SETUP #line 348 "parameters_flexer.ll" -{ return MP_as_maxcontigsperpass;} +{ yy_push_state(ASK_YN_MODE); return(MP_as_skimeachpass);} YY_BREAK -case 237: +case 236: #line 350 "parameters_flexer.ll" -case 238: +case 237: YY_RULE_SETUP #line 350 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_spoiler_detection;} +{ return MP_as_numrmbbreakloops;} YY_BREAK -case 239: +case 238: #line 352 "parameters_flexer.ll" -case 240: +case 239: YY_RULE_SETUP #line 352 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_sd_lastpassonly;} +{ return MP_as_maxcontigsperpass;} YY_BREAK -case 241: +case 240: #line 354 "parameters_flexer.ll" -case 242: +case 241: YY_RULE_SETUP #line 354 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_automatic_repeat_detection;} +{ yy_push_state(ASK_YN_MODE); return MP_as_spoiler_detection;} YY_BREAK -case 243: +case 242: #line 356 "parameters_flexer.ll" -case 244: +case 243: YY_RULE_SETUP #line 356 "parameters_flexer.ll" -{ return MP_as_ard_multicopythreshold;} +{ yy_push_state(ASK_YN_MODE); return MP_as_sd_lastpassonly;} YY_BREAK -case 245: +case 244: #line 358 "parameters_flexer.ll" -case 246: +case 245: YY_RULE_SETUP #line 358 "parameters_flexer.ll" -{ return MP_as_ard_multicopyminlen;} +{ yy_push_state(ASK_YN_MODE); return MP_as_automatic_repeat_detection;} YY_BREAK -case 247: +case 246: #line 360 "parameters_flexer.ll" -case 248: +case 247: YY_RULE_SETUP #line 360 "parameters_flexer.ll" -{ return MP_as_ard_multicopygrace;} +{ return MP_as_ard_multicopythreshold;} YY_BREAK -case 249: +case 248: #line 362 "parameters_flexer.ll" -case 250: +case 249: YY_RULE_SETUP #line 362 "parameters_flexer.ll" -{ return MP_as_urd_cutoffmultiplier;} +{ return MP_as_ard_multicopyminlen;} YY_BREAK -case 251: +case 250: #line 364 "parameters_flexer.ll" -case 252: +case 251: YY_RULE_SETUP #line 364 "parameters_flexer.ll" -{ return MP_as_urd_startinpass;} +{ return MP_as_ard_multicopygrace;} YY_BREAK -case 253: +case 252: #line 366 "parameters_flexer.ll" -case 254: +case 253: YY_RULE_SETUP #line 366 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_uniform_read_distribution;} +{ return MP_as_urd_cutoffmultiplier;} YY_BREAK -case 255: +case 254: #line 368 "parameters_flexer.ll" -case 256: +case 255: YY_RULE_SETUP #line 368 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_keep_long_repeats_separated;} +{ return MP_as_urd_startinpass;} YY_BREAK -case 257: +case 256: #line 370 "parameters_flexer.ll" -case 258: +case 257: YY_RULE_SETUP #line 370 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_paf_use_genomic_pathfinder;} +{ yy_push_state(ASK_YN_MODE); return MP_as_uniform_read_distribution;} YY_BREAK -case 259: +case 258: #line 372 "parameters_flexer.ll" -case 260: +case 259: YY_RULE_SETUP #line 372 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_paf_use_emergency_search_stop;} +{ yy_push_state(ASK_YN_MODE); return MP_paf_use_genomic_pathfinder;} YY_BREAK -case 261: +case 260: #line 374 "parameters_flexer.ll" -case 262: +case 261: YY_RULE_SETUP #line 374 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_paf_use_emergency_blacklist;} +{ yy_push_state(ASK_YN_MODE); return MP_paf_use_emergency_search_stop;} YY_BREAK -case 263: +case 262: #line 376 "parameters_flexer.ll" -case 264: +case 263: YY_RULE_SETUP #line 376 "parameters_flexer.ll" -{return MP_paf_ess_partnerdepth;} +{ yy_push_state(ASK_YN_MODE); return MP_paf_use_emergency_blacklist;} YY_BREAK -case 265: +case 264: #line 378 "parameters_flexer.ll" -case 266: +case 265: YY_RULE_SETUP #line 378 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_paf_use_max_contig_buildtime;} +{return MP_paf_ess_partnerdepth;} YY_BREAK -case 267: +case 266: #line 380 "parameters_flexer.ll" -case 268: +case 267: YY_RULE_SETUP #line 380 "parameters_flexer.ll" -{return MP_paf_buildtime_inseconds;} +{yy_push_state(ASK_YN_MODE); return MP_paf_use_max_contig_buildtime;} YY_BREAK +case 268: +#line 382 "parameters_flexer.ll" case 269: +YY_RULE_SETUP #line 382 "parameters_flexer.ll" +{return MP_paf_buildtime_inseconds;} + YY_BREAK case 270: +#line 384 "parameters_flexer.ll" +case 271: YY_RULE_SETUP -#line 382 "parameters_flexer.ll" +#line 384 "parameters_flexer.ll" {yy_push_state(ASK_YN_MODE); return MP_as_enforce_qualsinreads;} YY_BREAK -case 271: -#line 386 "parameters_flexer.ll" case 272: +#line 388 "parameters_flexer.ll" +case 273: YY_RULE_SETUP -#line 386 "parameters_flexer.ll" +#line 388 "parameters_flexer.ll" { yy_push_state(ASK_YN_MODE); return MP_as_extend_reads;} YY_BREAK -case 273: -#line 388 "parameters_flexer.ll" case 274: +#line 390 "parameters_flexer.ll" +case 275: YY_RULE_SETUP -#line 388 "parameters_flexer.ll" +#line 390 "parameters_flexer.ll" {return MP_as_readextension_window_len;} YY_BREAK -case 275: -#line 390 "parameters_flexer.ll" case 276: +#line 392 "parameters_flexer.ll" +case 277: YY_RULE_SETUP -#line 390 "parameters_flexer.ll" +#line 392 "parameters_flexer.ll" {return MP_as_readextension_window_maxerrors;} YY_BREAK -case 277: -#line 392 "parameters_flexer.ll" case 278: +#line 394 "parameters_flexer.ll" +case 279: YY_RULE_SETUP -#line 392 "parameters_flexer.ll" +#line 394 "parameters_flexer.ll" {return MP_as_readextension_firstpassnum;} YY_BREAK -case 279: -#line 394 "parameters_flexer.ll" case 280: +#line 396 "parameters_flexer.ll" +case 281: YY_RULE_SETUP -#line 394 "parameters_flexer.ll" +#line 396 "parameters_flexer.ll" {return MP_as_readextension_lastpassnum;} YY_BREAK -case 281: -#line 398 "parameters_flexer.ll" case 282: -YY_RULE_SETUP -#line 398 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_ed_automatic_contig_editing;} - YY_BREAK +#line 400 "parameters_flexer.ll" case 283: +YY_RULE_SETUP #line 400 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_ed_mira_automatic_contig_editing;} + YY_BREAK case 284: YY_RULE_SETUP -#line 400 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_ed_strict;} +#line 401 "parameters_flexer.ll" + YY_BREAK case 285: +YY_RULE_SETUP #line 402 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_ed_kmer_singlets;} + YY_BREAK case 286: YY_RULE_SETUP -#line 402 "parameters_flexer.ll" -{ return MP_ed_confirmation_threshold;} +#line 403 "parameters_flexer.ll" + YY_BREAK case 287: -#line 405 "parameters_flexer.ll" -case 288: YY_RULE_SETUP -#line 405 "parameters_flexer.ll" -{return MP_sk_numthreads;} +#line 404 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_ed_homopolymer_overcalls;} YY_BREAK -case 289: +case 288: #line 407 "parameters_flexer.ll" -case 290: +case 289: YY_RULE_SETUP #line 407 "parameters_flexer.ll" -{return MP_sk_basesperhash;} +{ yy_push_state(ASK_YN_MODE); return MP_ed_edit_automatic_contig_editing;} YY_BREAK -case 291: +case 290: #line 409 "parameters_flexer.ll" -case 292: +case 291: YY_RULE_SETUP #line 409 "parameters_flexer.ll" -{return MP_sk_hashsavestepping;} +{ yy_push_state(ASK_YN_MODE); return MP_ed_strict;} YY_BREAK -case 293: +case 292: #line 411 "parameters_flexer.ll" -case 294: +case 293: YY_RULE_SETUP #line 411 "parameters_flexer.ll" -{return MP_sk_percentrequired;} +{ return MP_ed_confirmation_threshold;} YY_BREAK +case 294: +#line 414 "parameters_flexer.ll" case 295: -#line 413 "parameters_flexer.ll" +YY_RULE_SETUP +#line 414 "parameters_flexer.ll" +{return MP_sk_numthreads;} + YY_BREAK case 296: YY_RULE_SETUP -#line 413 "parameters_flexer.ll" -{return MP_sk_maxhitsperread;} +#line 415 "parameters_flexer.ll" +{return MP_sk_bph_increasestep;} YY_BREAK case 297: -#line 415 "parameters_flexer.ll" -case 298: YY_RULE_SETUP -#line 415 "parameters_flexer.ll" -{return MP_sk_maxhashesinmemory;} +#line 416 "parameters_flexer.ll" +{return MP_sk_bph_coveragethreshold;} YY_BREAK +case 298: +#line 418 "parameters_flexer.ll" case 299: -#line 417 "parameters_flexer.ll" -case 300: YY_RULE_SETUP -#line 417 "parameters_flexer.ll" -{return MP_sk_memcaphitreduction;} +#line 418 "parameters_flexer.ll" +{return MP_sk_basesperhash;} YY_BREAK +case 300: +#line 420 "parameters_flexer.ll" case 301: -#line 419 "parameters_flexer.ll" -case 302: YY_RULE_SETUP -#line 419 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_sk_alsoskimrevcomp;} +#line 420 "parameters_flexer.ll" +{return MP_sk_hashsavestepping;} YY_BREAK +case 302: +#line 422 "parameters_flexer.ll" case 303: -#line 421 "parameters_flexer.ll" -case 304: YY_RULE_SETUP -#line 421 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_sk_swcheckonbackbones;} +#line 422 "parameters_flexer.ll" +{return MP_sk_percentrequired;} YY_BREAK +case 304: +#line 424 "parameters_flexer.ll" case 305: -#line 423 "parameters_flexer.ll" -case 306: YY_RULE_SETUP -#line 423 "parameters_flexer.ll" -{return MP_sk_maxmegahubratio;} +#line 424 "parameters_flexer.ll" +{return MP_sk_maxhitsperread;} YY_BREAK -case 307: +case 306: #line 426 "parameters_flexer.ll" -case 308: +case 307: YY_RULE_SETUP #line 426 "parameters_flexer.ll" -{return MP_ERROR_MOVED_SECTION_HS;} +{return MP_sk_maxhashesinmemory;} YY_BREAK -case 309: +case 308: #line 428 "parameters_flexer.ll" -case 310: +case 309: YY_RULE_SETUP #line 428 "parameters_flexer.ll" -{return MP_ERROR_MOVED_SECTION_HS;} +{return MP_sk_memcaphitreduction;} YY_BREAK -case 311: +case 310: #line 430 "parameters_flexer.ll" -case 312: +case 311: YY_RULE_SETUP #line 430 "parameters_flexer.ll" -{return MP_ERROR_MOVED_SECTION_HS;} +{yy_push_state(ASK_YN_MODE); return MP_sk_alsoskimrevcomp;} YY_BREAK -case 313: +case 312: #line 432 "parameters_flexer.ll" -case 314: +case 313: YY_RULE_SETUP #line 432 "parameters_flexer.ll" -{ return MP_ERROR_MOVED_SECTION_HS;} +{yy_push_state(ASK_YN_MODE); return MP_sk_swcheckonbackbones;} YY_BREAK -case 315: +case 314: #line 434 "parameters_flexer.ll" -case 316: +case 315: YY_RULE_SETUP #line 434 "parameters_flexer.ll" -{return MP_ERROR_MOVED_SECTION_HS;} +{return MP_sk_maxmegahubratio;} YY_BREAK +case 316: +#line 437 "parameters_flexer.ll" case 317: -#line 436 "parameters_flexer.ll" -case 318: YY_RULE_SETUP -#line 436 "parameters_flexer.ll" +#line 437 "parameters_flexer.ll" {return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK +case 318: +#line 439 "parameters_flexer.ll" case 319: -#line 438 "parameters_flexer.ll" -case 320: YY_RULE_SETUP -#line 438 "parameters_flexer.ll" +#line 439 "parameters_flexer.ll" {return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK +case 320: +#line 441 "parameters_flexer.ll" case 321: -#line 440 "parameters_flexer.ll" -case 322: YY_RULE_SETUP -#line 440 "parameters_flexer.ll" +#line 441 "parameters_flexer.ll" {return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK +case 322: +#line 443 "parameters_flexer.ll" case 323: -#line 442 "parameters_flexer.ll" +YY_RULE_SETUP +#line 443 "parameters_flexer.ll" +{ return MP_ERROR_MOVED_SECTION_HS;} + YY_BREAK case 324: +#line 445 "parameters_flexer.ll" +case 325: YY_RULE_SETUP -#line 442 "parameters_flexer.ll" +#line 445 "parameters_flexer.ll" {return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK -case 325: -#line 444 "parameters_flexer.ll" case 326: +#line 447 "parameters_flexer.ll" +case 327: YY_RULE_SETUP -#line 444 "parameters_flexer.ll" +#line 447 "parameters_flexer.ll" {return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK -case 327: -#line 448 "parameters_flexer.ll" case 328: +#line 449 "parameters_flexer.ll" +case 329: YY_RULE_SETUP -#line 448 "parameters_flexer.ll" -{return MP_hs_nastyrepeatratio;} +#line 449 "parameters_flexer.ll" +{return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK -case 329: -#line 450 "parameters_flexer.ll" case 330: +#line 451 "parameters_flexer.ll" +case 331: YY_RULE_SETUP -#line 450 "parameters_flexer.ll" -{return MP_hs_nastyrepeatcoverage;} +#line 451 "parameters_flexer.ll" +{return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK -case 331: -#line 452 "parameters_flexer.ll" case 332: +#line 453 "parameters_flexer.ll" +case 333: YY_RULE_SETUP -#line 452 "parameters_flexer.ll" -{return MP_hs_repeatlevel_in_infofile;} +#line 453 "parameters_flexer.ll" +{return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK -case 333: -#line 454 "parameters_flexer.ll" case 334: +#line 455 "parameters_flexer.ll" +case 335: YY_RULE_SETUP -#line 454 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_hs_masknastyrepeats;} +#line 455 "parameters_flexer.ll" +{return MP_ERROR_MOVED_SECTION_HS;} YY_BREAK -case 335: -#line 456 "parameters_flexer.ll" case 336: +#line 459 "parameters_flexer.ll" +case 337: YY_RULE_SETUP -#line 456 "parameters_flexer.ll" -{return MP_hs_freq_covestmin;} +#line 459 "parameters_flexer.ll" +{return MP_hs_nastyrepeatratio;} YY_BREAK -case 337: -#line 458 "parameters_flexer.ll" case 338: +#line 461 "parameters_flexer.ll" +case 339: YY_RULE_SETUP -#line 458 "parameters_flexer.ll" -{return MP_hs_freqest_minnormal;} +#line 461 "parameters_flexer.ll" +{return MP_hs_nastyrepeatcoverage;} YY_BREAK -case 339: -#line 460 "parameters_flexer.ll" case 340: +#line 463 "parameters_flexer.ll" +case 341: YY_RULE_SETUP -#line 460 "parameters_flexer.ll" -{return MP_hs_freqest_maxnormal;} +#line 463 "parameters_flexer.ll" +{return MP_hs_repeatlevel_in_infofile;} YY_BREAK -case 341: -#line 462 "parameters_flexer.ll" case 342: +#line 465 "parameters_flexer.ll" +case 343: YY_RULE_SETUP -#line 462 "parameters_flexer.ll" -{return MP_hs_freqest_repeat;} +#line 465 "parameters_flexer.ll" +{yy_push_state(ASK_YN_MODE); return MP_hs_masknastyrepeats;} YY_BREAK -case 343: -#line 464 "parameters_flexer.ll" case 344: +#line 467 "parameters_flexer.ll" +case 345: YY_RULE_SETUP -#line 464 "parameters_flexer.ll" -{return MP_hs_freqest_heavyrepeat;} +#line 467 "parameters_flexer.ll" +{return MP_hs_freq_covestmin;} YY_BREAK -case 345: -#line 466 "parameters_flexer.ll" case 346: +#line 469 "parameters_flexer.ll" +case 347: YY_RULE_SETUP -#line 466 "parameters_flexer.ll" -{return MP_hs_freqest_crazyrepeat;} +#line 469 "parameters_flexer.ll" +{return MP_hs_freqest_minnormal;} YY_BREAK -case 347: -#line 468 "parameters_flexer.ll" case 348: +#line 471 "parameters_flexer.ll" +case 349: YY_RULE_SETUP -#line 468 "parameters_flexer.ll" -{yy_push_state(ASK_YN_MODE); return MP_hs_applydigitalnormalisation;} +#line 471 "parameters_flexer.ll" +{return MP_hs_freqest_maxnormal;} YY_BREAK -case 349: -#line 473 "parameters_flexer.ll" case 350: +#line 473 "parameters_flexer.ll" +case 351: YY_RULE_SETUP #line 473 "parameters_flexer.ll" -{return MP_al_bip;} +{return MP_hs_freqest_repeat;} YY_BREAK -case 351: -#line 475 "parameters_flexer.ll" case 352: +#line 475 "parameters_flexer.ll" +case 353: YY_RULE_SETUP #line 475 "parameters_flexer.ll" -{return MP_al_bmax;} +{return MP_hs_freqest_heavyrepeat;} YY_BREAK -case 353: -#line 477 "parameters_flexer.ll" case 354: +#line 477 "parameters_flexer.ll" +case 355: YY_RULE_SETUP #line 477 "parameters_flexer.ll" -{return MP_al_bmin;} +{return MP_hs_freqest_crazyrepeat;} YY_BREAK -case 355: -#line 479 "parameters_flexer.ll" case 356: +#line 479 "parameters_flexer.ll" +case 357: YY_RULE_SETUP #line 479 "parameters_flexer.ll" -{return MP_al_min_score;} +{yy_push_state(ASK_YN_MODE); return MP_hs_applydigitalnormalisation;} YY_BREAK -case 357: -#line 481 "parameters_flexer.ll" case 358: +#line 481 "parameters_flexer.ll" +case 359: YY_RULE_SETUP #line 481 "parameters_flexer.ll" -{return MP_al_min_overlap;} +{yy_push_state(ASK_YN_MODE); return MP_hs_rare_kmer_early_kill;} YY_BREAK -case 359: -#line 483 "parameters_flexer.ll" case 360: -YY_RULE_SETUP #line 483 "parameters_flexer.ll" -{return MP_al_min_relscore;} - YY_BREAK case 361: -#line 485 "parameters_flexer.ll" -case 362: YY_RULE_SETUP -#line 485 "parameters_flexer.ll" -{BEGIN(AL_GPLMODE); return MP_ads_gp_level;} +#line 483 "parameters_flexer.ll" +{return MP_hs_million_hashes_per_buffer;} YY_BREAK +case 362: +#line 488 "parameters_flexer.ll" case 363: -#line 487 "parameters_flexer.ll" -case 364: YY_RULE_SETUP -#line 487 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_ads_extra_gap_penalty;} +#line 488 "parameters_flexer.ll" +{return MP_al_bip;} YY_BREAK +case 364: +#line 490 "parameters_flexer.ll" case 365: -#line 489 "parameters_flexer.ll" -case 366: YY_RULE_SETUP -#line 489 "parameters_flexer.ll" -{return MP_ads_max_gppercent;} +#line 490 "parameters_flexer.ll" +{return MP_al_bmax;} YY_BREAK +case 366: +#line 492 "parameters_flexer.ll" case 367: -#line 491 "parameters_flexer.ll" -case 368: YY_RULE_SETUP -#line 491 "parameters_flexer.ll" -{return MP_al_solexahack_maxerrors;} +#line 492 "parameters_flexer.ll" +{return MP_al_bmin;} YY_BREAK +case 368: +#line 494 "parameters_flexer.ll" case 369: -#line 493 "parameters_flexer.ll" -case 370: YY_RULE_SETUP -#line 493 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return 10;} +#line 494 "parameters_flexer.ll" +{return MP_al_min_score;} YY_BREAK +case 370: +#line 496 "parameters_flexer.ll" case 371: -#line 495 "parameters_flexer.ll" -case 372: YY_RULE_SETUP -#line 495 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return 0;} +#line 496 "parameters_flexer.ll" +{return MP_al_min_overlap;} YY_BREAK +case 372: +#line 498 "parameters_flexer.ll" case 373: -#line 497 "parameters_flexer.ll" -case 374: YY_RULE_SETUP -#line 497 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return 1;} +#line 498 "parameters_flexer.ll" +{return MP_al_min_relscore;} YY_BREAK +case 374: +#line 500 "parameters_flexer.ll" case 375: -#line 499 "parameters_flexer.ll" -case 376: YY_RULE_SETUP -#line 499 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return 2;} +#line 500 "parameters_flexer.ll" +{BEGIN(AL_GPLMODE); return MP_ads_gp_level;} YY_BREAK +case 376: +#line 502 "parameters_flexer.ll" case 377: YY_RULE_SETUP -#line 500 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} +#line 502 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_ads_extra_gap_penalty;} YY_BREAK case 378: -YY_RULE_SETUP -#line 501 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} - YY_BREAK +#line 504 "parameters_flexer.ll" case 379: YY_RULE_SETUP -#line 502 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} +#line 504 "parameters_flexer.ll" +{return MP_ads_max_gppercent;} YY_BREAK case 380: -/* rule 380 can match eol */ -YY_RULE_SETUP -#line 503 "parameters_flexer.ll" -{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} - YY_BREAK -case 381: #line 506 "parameters_flexer.ll" -case 382: +case 381: YY_RULE_SETUP #line 506 "parameters_flexer.ll" -{BEGIN(CO_VALMODE); return MP_con_analyse_mode;} +{return MP_al_solexahack_maxerrors;} YY_BREAK +case 382: +#line 508 "parameters_flexer.ll" case 383: YY_RULE_SETUP -#line 507 "parameters_flexer.ll" -{BEGIN(CO_MODE); return 0;} - YY_BREAK -case 384: -YY_RULE_SETUP #line 508 "parameters_flexer.ll" -{BEGIN(CO_MODE); return 1;} +{BEGIN(ALIGN_MODE); return 10;} YY_BREAK +case 384: +#line 510 "parameters_flexer.ll" case 385: YY_RULE_SETUP -#line 509 "parameters_flexer.ll" -{BEGIN(CO_MODE); return 2;} - YY_BREAK -case 386: -YY_RULE_SETUP #line 510 "parameters_flexer.ll" -{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} +{BEGIN(ALIGN_MODE); return 0;} YY_BREAK +case 386: +#line 512 "parameters_flexer.ll" case 387: YY_RULE_SETUP -#line 511 "parameters_flexer.ll" -{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} - YY_BREAK -case 388: -YY_RULE_SETUP #line 512 "parameters_flexer.ll" -{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} +{BEGIN(ALIGN_MODE); return 1;} YY_BREAK +case 388: +#line 514 "parameters_flexer.ll" case 389: -/* rule 389 can match eol */ YY_RULE_SETUP -#line 513 "parameters_flexer.ll" -{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} +#line 514 "parameters_flexer.ll" +{BEGIN(ALIGN_MODE); return 2;} YY_BREAK case 390: +YY_RULE_SETUP #line 515 "parameters_flexer.ll" +{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} + YY_BREAK case 391: YY_RULE_SETUP -#line 515 "parameters_flexer.ll" -{return MP_con_rodirs;} +#line 516 "parameters_flexer.ll" +{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} YY_BREAK case 392: +YY_RULE_SETUP #line 517 "parameters_flexer.ll" +{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} + YY_BREAK case 393: +/* rule 393 can match eol */ YY_RULE_SETUP -#line 517 "parameters_flexer.ll" -{return MP_con_danger_max_error_rate;} +#line 518 "parameters_flexer.ll" +{BEGIN(ALIGN_MODE); return MP_UNRECOGNISED_STRING;} YY_BREAK case 394: -#line 519 "parameters_flexer.ll" +#line 521 "parameters_flexer.ll" case 395: YY_RULE_SETUP -#line 519 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_mark_repeats;} +#line 521 "parameters_flexer.ll" +{BEGIN(CO_VALMODE); return MP_con_analyse_mode;} YY_BREAK case 396: -#line 521 "parameters_flexer.ll" -case 397: -#line 522 "parameters_flexer.ll" -case 398: YY_RULE_SETUP #line 522 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_as_mark_repeats_only_in_result;} +{BEGIN(CO_MODE); return 0;} YY_BREAK -case 399: +case 397: +YY_RULE_SETUP +#line 523 "parameters_flexer.ll" +{BEGIN(CO_MODE); return 1;} + YY_BREAK +case 398: +YY_RULE_SETUP #line 524 "parameters_flexer.ll" +{BEGIN(CO_MODE); return 2;} + YY_BREAK +case 399: +YY_RULE_SETUP +#line 525 "parameters_flexer.ll" +{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} + YY_BREAK case 400: YY_RULE_SETUP -#line 524 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_assume_snp_insteadof_rmb;} +#line 526 "parameters_flexer.ll" +{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} YY_BREAK case 401: -#line 526 "parameters_flexer.ll" -case 402: -#line 527 "parameters_flexer.ll" -case 403: YY_RULE_SETUP #line 527 "parameters_flexer.ll" -{return MP_con_min_rmb_neighbourqual;} +{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} YY_BREAK +case 402: +/* rule 402 can match eol */ +YY_RULE_SETUP +#line 528 "parameters_flexer.ll" +{BEGIN(CO_MODE); return MP_UNRECOGNISED_STRING;} + YY_BREAK +case 403: +#line 530 "parameters_flexer.ll" case 404: -#line 529 "parameters_flexer.ll" -case 405: YY_RULE_SETUP -#line 529 "parameters_flexer.ll" -{return MP_con_min_readspergroup;} +#line 530 "parameters_flexer.ll" +{return MP_con_rodirs;} YY_BREAK +case 405: +#line 532 "parameters_flexer.ll" case 406: -#line 531 "parameters_flexer.ll" -case 407: YY_RULE_SETUP -#line 531 "parameters_flexer.ll" -{return MP_con_min_groupqual_for_rmb_tagging;} +#line 532 "parameters_flexer.ll" +{return MP_con_danger_max_error_rate;} YY_BREAK +case 407: +#line 534 "parameters_flexer.ll" case 408: -#line 533 "parameters_flexer.ll" -case 409: YY_RULE_SETUP -#line 533 "parameters_flexer.ll" -{return MP_con_emea_setzero_on_clipping_pec;} +#line 534 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_mark_repeats;} YY_BREAK +case 409: +#line 536 "parameters_flexer.ll" case 410: -#line 535 "parameters_flexer.ll" +#line 537 "parameters_flexer.ll" case 411: YY_RULE_SETUP -#line 535 "parameters_flexer.ll" -{return MP_con_endread_mark_exclusion_area;} +#line 537 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_as_mark_repeats_only_in_result;} YY_BREAK case 412: -#line 537 "parameters_flexer.ll" +#line 539 "parameters_flexer.ll" case 413: YY_RULE_SETUP -#line 537 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_also_mark_gap_bases_evenmc;} +#line 539 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_con_assume_snp_insteadof_rmb;} YY_BREAK case 414: -#line 539 "parameters_flexer.ll" +#line 541 "parameters_flexer.ll" case 415: -YY_RULE_SETUP -#line 539 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_also_mark_gap_bases_needbothstrands;} - YY_BREAK +#line 542 "parameters_flexer.ll" case 416: -#line 541 "parameters_flexer.ll" -case 417: YY_RULE_SETUP -#line 541 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_also_mark_gap_bases;} +#line 542 "parameters_flexer.ll" +{return MP_con_min_rmb_neighbourqual;} YY_BREAK -case 418: -#line 543 "parameters_flexer.ll" -case 419: +case 417: #line 544 "parameters_flexer.ll" -case 420: +case 418: YY_RULE_SETUP #line 544 "parameters_flexer.ll" -{filenameid=MP_con_name_prefix; yy_push_state(FN_MODE);} +{return MP_con_min_readspergroup;} YY_BREAK -case 421: +case 419: #line 546 "parameters_flexer.ll" -case 422: +case 420: YY_RULE_SETUP #line 546 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_force_nonIUPACconsensus_perseqtype;} +{return MP_con_min_groupqual_for_rmb_tagging;} YY_BREAK -case 423: +case 421: #line 548 "parameters_flexer.ll" -case 424: +case 422: YY_RULE_SETUP #line 548 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_force_nonIUPACconsensus_amongseqtypes;} +{return MP_con_emea_setzero_on_clipping_pec;} YY_BREAK -case 425: +case 423: #line 550 "parameters_flexer.ll" -case 426: +case 424: YY_RULE_SETUP #line 550 "parameters_flexer.ll" -{ return MP_con_msr_maxerrors;} +{return MP_con_endread_mark_exclusion_area;} YY_BREAK -case 427: +case 425: #line 552 "parameters_flexer.ll" -case 428: +case 426: YY_RULE_SETUP #line 552 "parameters_flexer.ll" -{ return MP_con_msr_keependsunmapped;} +{ yy_push_state(ASK_YN_MODE); return MP_con_also_mark_gap_bases_evenmc;} YY_BREAK -case 429: +case 427: #line 554 "parameters_flexer.ll" -case 430: +case 428: YY_RULE_SETUP #line 554 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_con_mergeshortreads;} +{ yy_push_state(ASK_YN_MODE); return MP_con_also_mark_gap_bases_needbothstrands;} YY_BREAK -case 431: +case 429: #line 556 "parameters_flexer.ll" -case 432: +case 430: YY_RULE_SETUP #line 556 "parameters_flexer.ll" -{return MP_con_gap_override_ratio;} +{ yy_push_state(ASK_YN_MODE); return MP_con_also_mark_gap_bases;} YY_BREAK -case 433: +case 431: +#line 558 "parameters_flexer.ll" +case 432: #line 559 "parameters_flexer.ll" -case 434: +case 433: YY_RULE_SETUP #line 559 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_mi_extendedlog;} +{filenameid=MP_con_name_prefix; yy_push_state(FN_MODE);} YY_BREAK -case 435: +case 434: #line 561 "parameters_flexer.ll" -case 436: +case 435: YY_RULE_SETUP #line 561 "parameters_flexer.ll" -{ return MP_mi_as_largecontigsize4stats;} +{ yy_push_state(ASK_YN_MODE); return MP_con_force_nonIUPACconsensus_perseqtype;} YY_BREAK -case 437: +case 436: #line 563 "parameters_flexer.ll" -case 438: +case 437: YY_RULE_SETUP #line 563 "parameters_flexer.ll" -{ return MP_mi_as_largecontigsize;} +{ yy_push_state(ASK_YN_MODE); return MP_con_force_nonIUPACconsensus_amongseqtypes;} YY_BREAK +case 438: +#line 565 "parameters_flexer.ll" case 439: YY_RULE_SETUP -#line 564 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag1;} - YY_BREAK -case 440: -YY_RULE_SETUP #line 565 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag2;} +{ return MP_con_msr_maxerrors;} YY_BREAK +case 440: +#line 567 "parameters_flexer.ll" case 441: YY_RULE_SETUP -#line 566 "parameters_flexer.ll" -{ return MP_ERROR_MOVED_SECTION_NW;} - YY_BREAK -case 442: -YY_RULE_SETUP #line 567 "parameters_flexer.ll" -{ return MP_ERROR_MOVED_SECTION_NW;} +{ return MP_con_msr_keependsunmapped;} YY_BREAK +case 442: +#line 569 "parameters_flexer.ll" case 443: -#line 570 "parameters_flexer.ll" -case 444: YY_RULE_SETUP -#line 570 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_nw_stoponnfs;} +#line 569 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_con_mergeshortreads;} YY_BREAK +case 444: +#line 571 "parameters_flexer.ll" case 445: -#line 572 "parameters_flexer.ll" -case 446: YY_RULE_SETUP -#line 572 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_nw_stop_templateerror;} +#line 571 "parameters_flexer.ll" +{return MP_con_gap_override_ratio;} YY_BREAK -case 447: +case 446: #line 574 "parameters_flexer.ll" -case 448: +case 447: YY_RULE_SETUP #line 574 "parameters_flexer.ll" -{ yy_push_state(ASK_YN_MODE); return MP_nw_stop_duplicatereadnames;} +{ yy_push_state(ASK_YN_MODE); return MP_mi_extendedlog;} YY_BREAK -case 449: +case 448: #line 576 "parameters_flexer.ll" -case 450: +case 449: YY_RULE_SETUP #line 576 "parameters_flexer.ll" -{ return MP_nw_stop_maxreadnamelength;} +{ yy_push_state(ASK_YN_MODE); return MP_mi_iknowwhatido;} YY_BREAK +case 450: +#line 578 "parameters_flexer.ll" case 451: -#line 580 "parameters_flexer.ll" +YY_RULE_SETUP +#line 578 "parameters_flexer.ll" +{ return MP_mi_as_largecontigsize4stats;} + YY_BREAK case 452: +#line 580 "parameters_flexer.ll" +case 453: YY_RULE_SETUP #line 580 "parameters_flexer.ll" -{ return MP_paf_skip_whole_contig_scan;} +{ return MP_mi_as_largecontigsize;} YY_BREAK -case 453: -#line 582 "parameters_flexer.ll" case 454: YY_RULE_SETUP -#line 582 "parameters_flexer.ll" -{ return MP_paf_use_quick_rule;} +#line 581 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag1;} YY_BREAK case 455: -#line 584 "parameters_flexer.ll" +YY_RULE_SETUP +#line 582 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag2;} + YY_BREAK case 456: YY_RULE_SETUP -#line 584 "parameters_flexer.ll" -{ return MP_paf_quickrule_minlen1;} +#line 583 "parameters_flexer.ll" +{ yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag3;} YY_BREAK case 457: -#line 586 "parameters_flexer.ll" +YY_RULE_SETUP +#line 584 "parameters_flexer.ll" +{ return MP_ERROR_MOVED_SECTION_NW;} + YY_BREAK case 458: YY_RULE_SETUP -#line 586 "parameters_flexer.ll" -{ return MP_paf_quickrule_minsim1;} +#line 585 "parameters_flexer.ll" +{ return MP_ERROR_MOVED_SECTION_NW;} YY_BREAK case 459: #line 588 "parameters_flexer.ll" case 460: YY_RULE_SETUP #line 588 "parameters_flexer.ll" -{ return MP_paf_quickrule_minlen2;} +{ yy_push_state(NW_CHOICEMODE); return MP_nw_check_nfs;} YY_BREAK case 461: #line 590 "parameters_flexer.ll" case 462: YY_RULE_SETUP #line 590 "parameters_flexer.ll" -{ return MP_paf_quickrule_minsim2;} +{ yy_push_state(NW_CHOICEMODE); return MP_nw_check_templateproblems;} YY_BREAK case 463: #line 592 "parameters_flexer.ll" case 464: YY_RULE_SETUP #line 592 "parameters_flexer.ll" -{ return MP_paf_bbquickoverlap_minlen;} +{ yy_push_state(NW_CHOICEMODE); return MP_nw_check_duplicatereadnames;} YY_BREAK case 465: #line 594 "parameters_flexer.ll" case 466: YY_RULE_SETUP #line 594 "parameters_flexer.ll" -{return MP_paf_max_startcache_filltime;} +{ yy_push_state(NW_CHOICEMODE); return MP_nw_check_maxreadnamelength;} YY_BREAK case 467: -YY_RULE_SETUP -#line 597 "parameters_flexer.ll" -{ return MP_jobdef_draft;} - YY_BREAK +#line 596 "parameters_flexer.ll" case 468: YY_RULE_SETUP -#line 598 "parameters_flexer.ll" -{ return MP_jobdef_normal ;} +#line 596 "parameters_flexer.ll" +{ return MP_nw_check_mrnlvalue;} YY_BREAK case 469: -YY_RULE_SETUP -#line 599 "parameters_flexer.ll" -{ return MP_jobdef_accurate ;} - YY_BREAK +#line 598 "parameters_flexer.ll" case 470: YY_RULE_SETUP -#line 600 "parameters_flexer.ll" -{ return MP_jobdef_genome ;} +#line 598 "parameters_flexer.ll" +{ yy_push_state(NW_CHOICEMODE); return MP_nw_check_multipassmapping;} YY_BREAK case 471: -YY_RULE_SETUP -#line 601 "parameters_flexer.ll" -{ return MP_jobdef_est ;} - YY_BREAK +#line 600 "parameters_flexer.ll" case 472: YY_RULE_SETUP -#line 602 "parameters_flexer.ll" -{ return MP_jobdef_estsnppipeline1 ;} +#line 600 "parameters_flexer.ll" +{ yy_push_state(NW_CHOICEMODE); return MP_nw_check_coverage;} YY_BREAK case 473: +#line 602 "parameters_flexer.ll" +case 474: YY_RULE_SETUP -#line 603 "parameters_flexer.ll" -{ return MP_jobdef_estsnppipeline2 ;} +#line 602 "parameters_flexer.ll" +{ return MP_nw_check_covvalue;} YY_BREAK -case 474: +case 475: YY_RULE_SETUP #line 604 "parameters_flexer.ll" -{ return MP_jobdef_estsnppipeline3 ;} +{yy_pop_state(); return 0;} YY_BREAK -case 475: +case 476: YY_RULE_SETUP #line 605 "parameters_flexer.ll" -{ return MP_jobdef_denovo ;} +{yy_pop_state(); return 1;} YY_BREAK -case 476: +case 477: YY_RULE_SETUP #line 606 "parameters_flexer.ll" -{ return MP_jobdef_mapping ;} +{yy_pop_state(); return 2;} YY_BREAK -case 477: +case 478: YY_RULE_SETUP #line 607 "parameters_flexer.ll" -{ return MP_jobdef_sanger ;} +{} YY_BREAK -case 478: +case 479: YY_RULE_SETUP #line 608 "parameters_flexer.ll" -{ return MP_jobdef_454 ;} +{ BEGIN(0); return MP_UNRECOGNISED_STRING;} YY_BREAK -case 479: -#line 610 "parameters_flexer.ll" case 480: YY_RULE_SETUP -#line 610 "parameters_flexer.ll" -{ return MP_jobdef_iontor ;} +#line 609 "parameters_flexer.ll" +{ BEGIN(0); return MP_UNRECOGNISED_STRING;} YY_BREAK case 481: -#line 612 "parameters_flexer.ll" +YY_RULE_SETUP +#line 610 "parameters_flexer.ll" +{ BEGIN(0); return MP_UNRECOGNISED_STRING;} + YY_BREAK case 482: -#line 613 "parameters_flexer.ll" -case 483: #line 614 "parameters_flexer.ll" -case 484: +case 483: YY_RULE_SETUP #line 614 "parameters_flexer.ll" -{ return MP_jobdef_pacbiolq ;} +{ return MP_paf_skip_whole_contig_scan;} YY_BREAK +case 484: +#line 616 "parameters_flexer.ll" case 485: +YY_RULE_SETUP #line 616 "parameters_flexer.ll" +{ return MP_paf_use_quick_rule;} + YY_BREAK case 486: -#line 617 "parameters_flexer.ll" +#line 618 "parameters_flexer.ll" case 487: +YY_RULE_SETUP #line 618 "parameters_flexer.ll" +{ return MP_paf_quickrule_minlen1;} + YY_BREAK case 488: +#line 620 "parameters_flexer.ll" +case 489: YY_RULE_SETUP -#line 618 "parameters_flexer.ll" +#line 620 "parameters_flexer.ll" +{ return MP_paf_quickrule_minsim1;} + YY_BREAK +case 490: +#line 622 "parameters_flexer.ll" +case 491: +YY_RULE_SETUP +#line 622 "parameters_flexer.ll" +{ return MP_paf_quickrule_minlen2;} + YY_BREAK +case 492: +#line 624 "parameters_flexer.ll" +case 493: +YY_RULE_SETUP +#line 624 "parameters_flexer.ll" +{ return MP_paf_quickrule_minsim2;} + YY_BREAK +case 494: +#line 626 "parameters_flexer.ll" +case 495: +YY_RULE_SETUP +#line 626 "parameters_flexer.ll" +{ return MP_paf_bbquickoverlap_minlen;} + YY_BREAK +case 496: +#line 628 "parameters_flexer.ll" +case 497: +YY_RULE_SETUP +#line 628 "parameters_flexer.ll" +{return MP_paf_max_startcache_filltime;} + YY_BREAK +case 498: +YY_RULE_SETUP +#line 631 "parameters_flexer.ll" +{ return MP_jobdef_draft;} + YY_BREAK +case 499: +YY_RULE_SETUP +#line 632 "parameters_flexer.ll" +{ return MP_jobdef_normal ;} + YY_BREAK +case 500: +YY_RULE_SETUP +#line 633 "parameters_flexer.ll" +{ return MP_jobdef_accurate ;} + YY_BREAK +case 501: +YY_RULE_SETUP +#line 634 "parameters_flexer.ll" +{ return MP_jobdef_genome ;} + YY_BREAK +case 502: +YY_RULE_SETUP +#line 635 "parameters_flexer.ll" +{ return MP_jobdef_est ;} + YY_BREAK +case 503: +YY_RULE_SETUP +#line 636 "parameters_flexer.ll" +{ return MP_jobdef_estsnppipeline1 ;} + YY_BREAK +case 504: +YY_RULE_SETUP +#line 637 "parameters_flexer.ll" +{ return MP_jobdef_estsnppipeline2 ;} + YY_BREAK +case 505: +YY_RULE_SETUP +#line 638 "parameters_flexer.ll" +{ return MP_jobdef_estsnppipeline3 ;} + YY_BREAK +case 506: +YY_RULE_SETUP +#line 639 "parameters_flexer.ll" +{ return MP_jobdef_denovo ;} + YY_BREAK +case 507: +YY_RULE_SETUP +#line 640 "parameters_flexer.ll" +{ return MP_jobdef_mapping ;} + YY_BREAK +case 508: +YY_RULE_SETUP +#line 641 "parameters_flexer.ll" +{ return MP_jobdef_sanger ;} + YY_BREAK +case 509: +YY_RULE_SETUP +#line 642 "parameters_flexer.ll" +{ return MP_jobdef_454 ;} + YY_BREAK +case 510: +#line 644 "parameters_flexer.ll" +case 511: +YY_RULE_SETUP +#line 644 "parameters_flexer.ll" +{ return MP_jobdef_iontor ;} + YY_BREAK +case 512: +#line 646 "parameters_flexer.ll" +case 513: +#line 647 "parameters_flexer.ll" +case 514: +#line 648 "parameters_flexer.ll" +case 515: +YY_RULE_SETUP +#line 648 "parameters_flexer.ll" +{ return MP_jobdef_pacbiolq ;} + YY_BREAK +case 516: +#line 650 "parameters_flexer.ll" +case 517: +#line 651 "parameters_flexer.ll" +case 518: +#line 652 "parameters_flexer.ll" +case 519: +YY_RULE_SETUP +#line 652 "parameters_flexer.ll" { return MP_jobdef_pacbiohq ;} YY_BREAK -case 489: +case 520: YY_RULE_SETUP -#line 619 "parameters_flexer.ll" +#line 653 "parameters_flexer.ll" { return MP_jobdef_text ;} YY_BREAK -case 490: +case 521: YY_RULE_SETUP -#line 620 "parameters_flexer.ll" +#line 654 "parameters_flexer.ll" { return MP_jobdef_solexa ;} YY_BREAK -case 491: +case 522: YY_RULE_SETUP -#line 621 "parameters_flexer.ll" +#line 655 "parameters_flexer.ll" { return MP_jobdef_solid ;} YY_BREAK -case 492: +case 523: YY_RULE_SETUP -#line 622 "parameters_flexer.ll" +#line 656 "parameters_flexer.ll" YY_BREAK -case 493: +case 524: YY_RULE_SETUP -#line 623 "parameters_flexer.ll" +#line 657 "parameters_flexer.ll" { return MP_UNRECOGNISED_STRING;} YY_BREAK -case 494: -/* rule 494 can match eol */ +case 525: +/* rule 525 can match eol */ YY_RULE_SETUP -#line 624 "parameters_flexer.ll" +#line 658 "parameters_flexer.ll" { BEGIN(0); return MP_jobdefend;} YY_BREAK -case 495: -#line 626 "parameters_flexer.ll" +case 526: +#line 660 "parameters_flexer.ll" case YY_STATE_EOF(JOB_MODE): -#line 626 "parameters_flexer.ll" +#line 660 "parameters_flexer.ll" { BEGIN(0); return MP_jobdefend;} YY_BREAK -case 496: +case 527: YY_RULE_SETUP -#line 627 "parameters_flexer.ll" +#line 661 "parameters_flexer.ll" { BEGIN(JOB_MODE); return MP_jobdefstart;} YY_BREAK -case 497: +case 528: YY_RULE_SETUP -#line 630 "parameters_flexer.ll" +#line 664 "parameters_flexer.ll" { return MP_quickmode_noclipping_all;} YY_BREAK -case 498: +case 529: YY_RULE_SETUP -#line 631 "parameters_flexer.ll" +#line 665 "parameters_flexer.ll" { return MP_quickmode_noclipping_sanger;} YY_BREAK -case 499: +case 530: YY_RULE_SETUP -#line 632 "parameters_flexer.ll" +#line 666 "parameters_flexer.ll" { return MP_quickmode_noclipping_454;} YY_BREAK -case 500: +case 531: YY_RULE_SETUP -#line 633 "parameters_flexer.ll" +#line 667 "parameters_flexer.ll" { return MP_quickmode_noclipping_iontor;} YY_BREAK -case 501: +case 532: YY_RULE_SETUP -#line 634 "parameters_flexer.ll" +#line 668 "parameters_flexer.ll" { return MP_quickmode_noclipping_pacbiohq;} YY_BREAK -case 502: +case 533: YY_RULE_SETUP -#line 635 "parameters_flexer.ll" +#line 669 "parameters_flexer.ll" { return MP_quickmode_noclipping_pacbiolq;} YY_BREAK -case 503: +case 534: YY_RULE_SETUP -#line 636 "parameters_flexer.ll" +#line 670 "parameters_flexer.ll" { return MP_quickmode_noclipping_text;} YY_BREAK -case 504: +case 535: YY_RULE_SETUP -#line 637 "parameters_flexer.ll" +#line 671 "parameters_flexer.ll" { return MP_quickmode_noclipping_solexa;} YY_BREAK -case 505: +case 536: YY_RULE_SETUP -#line 638 "parameters_flexer.ll" +#line 672 "parameters_flexer.ll" { return MP_quickmode_noclipping_solid;} YY_BREAK -case 506: +case 537: YY_RULE_SETUP -#line 639 "parameters_flexer.ll" +#line 673 "parameters_flexer.ll" { BEGIN(0); } YY_BREAK -case 507: -#line 643 "parameters_flexer.ll" -case 508: +case 538: +#line 677 "parameters_flexer.ll" +case 539: YY_RULE_SETUP -#line 643 "parameters_flexer.ll" +#line 677 "parameters_flexer.ll" {BEGIN(GE_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 509: -#line 645 "parameters_flexer.ll" -case 510: +case 540: +#line 679 "parameters_flexer.ll" +case 541: YY_RULE_SETUP -#line 645 "parameters_flexer.ll" +#line 679 "parameters_flexer.ll" {BEGIN(LR_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 511: -#line 647 "parameters_flexer.ll" -case 512: +case 542: +#line 681 "parameters_flexer.ll" +case 543: YY_RULE_SETUP -#line 647 "parameters_flexer.ll" +#line 681 "parameters_flexer.ll" {BEGIN(SB_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 513: -#line 649 "parameters_flexer.ll" -case 514: +case 544: +#line 683 "parameters_flexer.ll" +case 545: YY_RULE_SETUP -#line 649 "parameters_flexer.ll" +#line 683 "parameters_flexer.ll" {BEGIN(CL_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 515: -#line 651 "parameters_flexer.ll" -case 516: -#line 652 "parameters_flexer.ll" -case 517: +case 546: +#line 685 "parameters_flexer.ll" +case 547: +#line 686 "parameters_flexer.ll" +case 548: YY_RULE_SETUP -#line 652 "parameters_flexer.ll" +#line 686 "parameters_flexer.ll" {BEGIN(OUTPUT_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 518: -#line 654 "parameters_flexer.ll" -case 519: +case 549: +#line 688 "parameters_flexer.ll" +case 550: YY_RULE_SETUP -#line 654 "parameters_flexer.ll" +#line 688 "parameters_flexer.ll" { BEGIN(FILE_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 520: -#line 656 "parameters_flexer.ll" -case 521: +case 551: +#line 690 "parameters_flexer.ll" +case 552: YY_RULE_SETUP -#line 656 "parameters_flexer.ll" +#line 690 "parameters_flexer.ll" {BEGIN(AS_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 522: -#line 658 "parameters_flexer.ll" -case 523: +case 553: +#line 692 "parameters_flexer.ll" +case 554: YY_RULE_SETUP -#line 658 "parameters_flexer.ll" +#line 692 "parameters_flexer.ll" {BEGIN(DP_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 524: -#line 660 "parameters_flexer.ll" -case 525: +case 555: +#line 694 "parameters_flexer.ll" +case 556: YY_RULE_SETUP -#line 660 "parameters_flexer.ll" +#line 694 "parameters_flexer.ll" {BEGIN(EDIT_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 526: -#line 662 "parameters_flexer.ll" -case 527: +case 557: +#line 696 "parameters_flexer.ll" +case 558: YY_RULE_SETUP -#line 662 "parameters_flexer.ll" +#line 696 "parameters_flexer.ll" {BEGIN(SKIM_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 528: -#line 664 "parameters_flexer.ll" -case 529: -#line 665 "parameters_flexer.ll" -case 530: +case 559: +#line 698 "parameters_flexer.ll" +case 560: +#line 699 "parameters_flexer.ll" +case 561: YY_RULE_SETUP -#line 665 "parameters_flexer.ll" +#line 699 "parameters_flexer.ll" {BEGIN(HASHSTAT_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 531: -#line 667 "parameters_flexer.ll" -case 532: +case 562: +#line 701 "parameters_flexer.ll" +case 563: YY_RULE_SETUP -#line 667 "parameters_flexer.ll" +#line 701 "parameters_flexer.ll" {BEGIN(ALIGN_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 533: -#line 669 "parameters_flexer.ll" -case 534: +case 564: +#line 703 "parameters_flexer.ll" +case 565: YY_RULE_SETUP -#line 669 "parameters_flexer.ll" +#line 703 "parameters_flexer.ll" {BEGIN(CO_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 535: -#line 671 "parameters_flexer.ll" -case 536: -#line 672 "parameters_flexer.ll" -case 537: +case 566: +#line 705 "parameters_flexer.ll" +case 567: +#line 706 "parameters_flexer.ll" +case 568: YY_RULE_SETUP -#line 672 "parameters_flexer.ll" +#line 706 "parameters_flexer.ll" {BEGIN(DIR_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 538: -#line 674 "parameters_flexer.ll" -case 539: +case 569: +#line 708 "parameters_flexer.ll" +case 570: YY_RULE_SETUP -#line 674 "parameters_flexer.ll" +#line 708 "parameters_flexer.ll" {BEGIN(MI_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 540: -#line 676 "parameters_flexer.ll" -case 541: -#line 677 "parameters_flexer.ll" -case 542: -#line 678 "parameters_flexer.ll" -case 543: +case 571: +#line 710 "parameters_flexer.ll" +case 572: +#line 711 "parameters_flexer.ll" +case 573: +#line 712 "parameters_flexer.ll" +case 574: YY_RULE_SETUP -#line 678 "parameters_flexer.ll" +#line 712 "parameters_flexer.ll" {BEGIN(NW_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 544: -#line 680 "parameters_flexer.ll" -case 545: +case 575: +#line 714 "parameters_flexer.ll" +case 576: YY_RULE_SETUP -#line 680 "parameters_flexer.ll" +#line 714 "parameters_flexer.ll" { BEGIN(PAF_MODE); return MP_PARSING_SECTIONCHANGE;} YY_BREAK -case 546: +case 577: YY_RULE_SETUP -#line 682 "parameters_flexer.ll" +#line 716 "parameters_flexer.ll" { return MP_params_for_common;} YY_BREAK -case 547: +case 578: YY_RULE_SETUP -#line 683 "parameters_flexer.ll" +#line 717 "parameters_flexer.ll" { return MP_params_for_sanger;} YY_BREAK -case 548: +case 579: YY_RULE_SETUP -#line 684 "parameters_flexer.ll" +#line 718 "parameters_flexer.ll" { return MP_params_for_454;} YY_BREAK -case 549: +case 580: YY_RULE_SETUP -#line 685 "parameters_flexer.ll" +#line 719 "parameters_flexer.ll" { return MP_params_for_iontor;} YY_BREAK -case 550: +case 581: YY_RULE_SETUP -#line 686 "parameters_flexer.ll" +#line 720 "parameters_flexer.ll" { return MP_params_for_pacbiolq;} YY_BREAK -case 551: +case 582: YY_RULE_SETUP -#line 687 "parameters_flexer.ll" +#line 721 "parameters_flexer.ll" { return MP_params_for_pacbiohq;} YY_BREAK -case 552: +case 583: YY_RULE_SETUP -#line 688 "parameters_flexer.ll" +#line 722 "parameters_flexer.ll" { return MP_params_for_text;} YY_BREAK -case 553: +case 584: YY_RULE_SETUP -#line 689 "parameters_flexer.ll" +#line 723 "parameters_flexer.ll" { return MP_params_for_solexa;} YY_BREAK -case 554: +case 585: YY_RULE_SETUP -#line 690 "parameters_flexer.ll" +#line 724 "parameters_flexer.ll" { return MP_params_for_solid;} YY_BREAK -case 555: +case 586: YY_RULE_SETUP -#line 692 "parameters_flexer.ll" +#line 726 "parameters_flexer.ll" { return MP_silentparams_for_common;} YY_BREAK -case 556: +case 587: YY_RULE_SETUP -#line 693 "parameters_flexer.ll" +#line 727 "parameters_flexer.ll" { return MP_silentparams_for_sanger;} YY_BREAK -case 557: +case 588: YY_RULE_SETUP -#line 694 "parameters_flexer.ll" +#line 728 "parameters_flexer.ll" { return MP_silentparams_for_454;} YY_BREAK -case 558: +case 589: YY_RULE_SETUP -#line 695 "parameters_flexer.ll" +#line 729 "parameters_flexer.ll" { return MP_silentparams_for_iontor;} YY_BREAK -case 559: +case 590: YY_RULE_SETUP -#line 696 "parameters_flexer.ll" +#line 730 "parameters_flexer.ll" { return MP_silentparams_for_pacbiolq;} YY_BREAK -case 560: +case 591: YY_RULE_SETUP -#line 697 "parameters_flexer.ll" +#line 731 "parameters_flexer.ll" { return MP_silentparams_for_pacbiohq;} YY_BREAK -case 561: +case 592: YY_RULE_SETUP -#line 698 "parameters_flexer.ll" +#line 732 "parameters_flexer.ll" { return MP_silentparams_for_text;} YY_BREAK -case 562: +case 593: YY_RULE_SETUP -#line 699 "parameters_flexer.ll" +#line 733 "parameters_flexer.ll" { return MP_silentparams_for_solexa;} YY_BREAK -case 563: +case 594: YY_RULE_SETUP -#line 700 "parameters_flexer.ll" +#line 734 "parameters_flexer.ll" { return MP_silentparams_for_solid;} YY_BREAK -case 564: +case 595: YY_RULE_SETUP -#line 703 "parameters_flexer.ll" +#line 737 "parameters_flexer.ll" { return MP_quickmode_borg;} YY_BREAK -case 565: +case 596: +#line 740 "parameters_flexer.ll" +case 597: +#line 741 "parameters_flexer.ll" +case 598: YY_RULE_SETUP -#line 705 "parameters_flexer.ll" -{ filenameid=MP_dir_cwd; yy_push_state(FN_MODE);} +#line 741 "parameters_flexer.ll" +{ filenameid=MP_quickmode_loadparam; yy_push_state(FN_MODE);} YY_BREAK -case 566: -#line 708 "parameters_flexer.ll" -case 567: -#line 709 "parameters_flexer.ll" -case 568: +case 599: YY_RULE_SETUP -#line 709 "parameters_flexer.ll" -{ filenameid=MP_quickmode_loadparam; yy_push_state(FN_MODE);} +#line 743 "parameters_flexer.ll" +{ return MP_quickmode_hirep_something;} YY_BREAK -case 569: +case 600: YY_RULE_SETUP -#line 711 "parameters_flexer.ll" +#line 744 "parameters_flexer.ll" +{ return MP_quickmode_hirep_good;} + YY_BREAK +case 601: +YY_RULE_SETUP +#line 745 "parameters_flexer.ll" +{ return MP_quickmode_hirep_best;} + YY_BREAK +case 602: +YY_RULE_SETUP +#line 746 "parameters_flexer.ll" { return MP_quickmode_highlyrepetitive;} YY_BREAK -case 570: +case 603: YY_RULE_SETUP -#line 712 "parameters_flexer.ll" +#line 747 "parameters_flexer.ll" { return MP_quickmode_highqualitydata;} YY_BREAK -case 571: +case 604: YY_RULE_SETUP -#line 713 "parameters_flexer.ll" +#line 748 "parameters_flexer.ll" { return MP_quickmode_lowqualitydata;} YY_BREAK -case 572: +case 605: YY_RULE_SETUP -#line 716 "parameters_flexer.ll" +#line 751 "parameters_flexer.ll" { BEGIN(ASKFORTECH_NOCLIPPING);} YY_BREAK -case 573: +case 606: YY_RULE_SETUP -#line 718 "parameters_flexer.ll" +#line 753 "parameters_flexer.ll" { return MP_quickmode_noclipping_all;} YY_BREAK -case 574: -#line 721 "parameters_flexer.ll" -case 575: +case 607: +#line 756 "parameters_flexer.ll" +case 608: YY_RULE_SETUP -#line 721 "parameters_flexer.ll" +#line 756 "parameters_flexer.ll" { return MP_quickmode_noquality_all;} YY_BREAK -case 576: -#line 724 "parameters_flexer.ll" -case 577: -YY_RULE_SETUP -#line 724 "parameters_flexer.ll" -{ return MP_version;} - YY_BREAK -case 578: +case 609: YY_RULE_SETUP -#line 726 "parameters_flexer.ll" +#line 758 "parameters_flexer.ll" {BEGIN(0); return MP_PARSING_SECTIONRESET;} /*Hack for parsing command lines where each blank resets the state */ YY_BREAK -case 579: +case 610: YY_RULE_SETUP -#line 730 "parameters_flexer.ll" +#line 762 "parameters_flexer.ll" {return MP_ANID;} YY_BREAK -case 580: +case 611: YY_RULE_SETUP -#line 731 "parameters_flexer.ll" +#line 763 "parameters_flexer.ll" {return MP_FLOAT;} YY_BREAK -case 581: +case 612: YY_RULE_SETUP -#line 732 "parameters_flexer.ll" +#line 764 "parameters_flexer.ll" {return MP_INT;} YY_BREAK -case 582: +case 613: YY_RULE_SETUP -#line 734 "parameters_flexer.ll" +#line 766 "parameters_flexer.ll" YY_BREAK -case 583: +case 614: YY_RULE_SETUP -#line 735 "parameters_flexer.ll" +#line 767 "parameters_flexer.ll" YY_BREAK -case 584: +case 615: YY_RULE_SETUP -#line 736 "parameters_flexer.ll" +#line 768 "parameters_flexer.ll" YY_BREAK -case 585: +case 616: YY_RULE_SETUP -#line 738 "parameters_flexer.ll" +#line 770 "parameters_flexer.ll" {yy_push_state(COMMENT_MODE);} /* munch commentline, # is start of comment */ YY_BREAK -case 586: -/* rule 586 can match eol */ +case 617: +/* rule 617 can match eol */ YY_RULE_SETUP -#line 739 "parameters_flexer.ll" +#line 771 "parameters_flexer.ll" { yy_pop_state();} YY_BREAK -case 587: -/* rule 587 can match eol */ +case 618: +/* rule 618 can match eol */ YY_RULE_SETUP -#line 741 "parameters_flexer.ll" +#line 773 "parameters_flexer.ll" {/* munch these, if not recognised earlier */ } YY_BREAK -case 588: -/* rule 588 can match eol */ +case 619: +/* rule 619 can match eol */ YY_RULE_SETUP -#line 743 "parameters_flexer.ll" +#line 775 "parameters_flexer.ll" {return MP_ERROR_DASHES;} YY_BREAK -case 589: +case 620: YY_RULE_SETUP -#line 744 "parameters_flexer.ll" +#line 776 "parameters_flexer.ll" {return MP_ERROR;} YY_BREAK -case 590: +case 621: YY_RULE_SETUP -#line 746 "parameters_flexer.ll" +#line 778 "parameters_flexer.ll" ECHO; YY_BREAK -#line 6884 "parameters_flexer.cc" +#line 7268 "parameters_flexer.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(GET_UNTIL_NEWLINE): case YY_STATE_EOF(GE_MODE): @@ -6907,6 +7291,7 @@ case YY_STATE_EOF(DIR_MODE): case YY_STATE_EOF(MI_MODE): case YY_STATE_EOF(NW_MODE): +case YY_STATE_EOF(NW_CHOICEMODE): case YY_STATE_EOF(CO_VALMODE): case YY_STATE_EOF(COMMENT_MODE): case YY_STATE_EOF(ASKFORTECH_NOCLIPPING): @@ -7289,7 +7674,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 5882 ) + if ( yy_current_state >= 6278 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -7317,11 +7702,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 5882 ) + if ( yy_current_state >= 6278 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 5881); + yy_is_jam = (yy_current_state == 6277); return yy_is_jam ? 0 : yy_current_state; } @@ -7808,7 +8193,7 @@ #define YYTABLES_NAME "yytables" -#line 746 "parameters_flexer.ll" +#line 778 "parameters_flexer.ll" diff -Nru mira-3.9.18/src/mira/parameters_flexer.ll mira-4.0/src/mira/parameters_flexer.ll --- mira-3.9.18/src/mira/parameters_flexer.ll 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/parameters_flexer.ll 2014-02-02 12:05:18.000000000 +0000 @@ -1,4 +1,4 @@ -%option stack +option stack %option noyywrap %option c++ %option outfile="lex.yy.c" @@ -78,6 +78,7 @@ %x DIR_MODE %x MI_MODE %x NW_MODE +%x NW_CHOICEMODE %x CO_VALMODE %x COMMENT_MODE %x ASKFORTECH_NOCLIPPING @@ -130,6 +131,10 @@ "sbuip" { return MP_as_startbackboneusage_inpass;} "alsobuildnewcontigs" | "abnc" { yy_push_state(ASK_YN_MODE); return MP_as_backbone_alsobuildnewcontigs;} +"trim_overhanging_reads" | +"tor" { yy_push_state(ASK_YN_MODE); return MP_as_backbone_trimoverhangingreads;} +"bootstrap_new_backbone" | +"bnb" { yy_push_state(ASK_YN_MODE); return MP_as_backbone_bootstrapnewbackbone;} "msvs_strict_front_clip" | @@ -197,9 +202,9 @@ "clip_polyat" | "cpat" {yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat;} -"cp_keep_poly_signal" | -"cpkps" {yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat_keeppolysignal;} -"cp_min_signal_len" | +"cp_keep_poly_stretch" | +"cpkps" {yy_push_state(ASK_YN_MODE); return MP_as_clip_polyat_keeppolystretch;} +"cp_min_sequence_len" | "cpmsl" {return MP_as_clip_polyat_len;} "cp_max_errors_allowed" | "cpmea" {return MP_as_clip_polyat_maxerrors;} @@ -328,7 +333,6 @@ "tmp_redirected_to" | "trt" {filenameid=MP_dir_tmp_redirectedto; yy_push_state(FN_MODE); } -"cwd" {filenameid=MP_dir_cwd; yy_push_state(FN_MODE); } "tmp" {filenameid=MP_dir_tmp; yy_push_state(FN_MODE); } {FILENAME} { yy_pop_state(); return filenameid;} @@ -364,8 +368,6 @@ "urdsip" { return MP_as_urd_startinpass;} "uniform_read_distribution" | "urd" { yy_push_state(ASK_YN_MODE); return MP_as_uniform_read_distribution;} -"keep_long_repeats_separated" | -"klrs" { yy_push_state(ASK_YN_MODE); return MP_as_keep_long_repeats_separated;} "use_genomic_pathfinder" | "ugpf" { yy_push_state(ASK_YN_MODE); return MP_paf_use_genomic_pathfinder;} "use_emergency_search_stop" | @@ -394,8 +396,15 @@ "leip" {return MP_as_readextension_lastpassnum;} -"automatic_contig_editing" | -"ace" { yy_push_state(ASK_YN_MODE); return MP_ed_automatic_contig_editing;} +"mira_automatic_contig_editing" | +"mace" { yy_push_state(ASK_YN_MODE); return MP_ed_mira_automatic_contig_editing;} +"edit_kmer_singlets" +"eks" { yy_push_state(ASK_YN_MODE); return MP_ed_kmer_singlets;} +"edit_homopolymer_overcalls" +"ehpo" { yy_push_state(ASK_YN_MODE); return MP_ed_homopolymer_overcalls;} + +"edit_automatic_contig_editing" | +"eace" { yy_push_state(ASK_YN_MODE); return MP_ed_edit_automatic_contig_editing;} "strict_editing_mode" | "sem" { yy_push_state(ASK_YN_MODE); return MP_ed_strict;} "confirmation_threshold" | @@ -403,6 +412,8 @@ "number_of_threads" | "not" {return MP_sk_numthreads;} +"bphaipp" {return MP_sk_bph_increasestep;} +"bphaict" {return MP_sk_bph_coveragethreshold;} "bases_per_hash" | "bph" {return MP_sk_basesperhash;} "hash_save_stepping" | @@ -466,6 +477,10 @@ "fecr" {return MP_hs_freqest_crazyrepeat;} "lossless_digital_normalisation" | "ldn" {yy_push_state(ASK_YN_MODE); return MP_hs_applydigitalnormalisation;} +"rare_kmer_early_kill" | +"rkek" {yy_push_state(ASK_YN_MODE); return MP_hs_rare_kmer_early_kill;} +"million_hashes_per_buffer" | +"mhpb" {return MP_hs_million_hashes_per_buffer;} @@ -557,23 +572,42 @@ "extended_log" | "el" { yy_push_state(ASK_YN_MODE); return MP_mi_extendedlog;} +"iknowwhatido" | +"ikwid" { yy_push_state(ASK_YN_MODE); return MP_mi_iknowwhatido;} "large_contig_size_for_stats" | "lcs4s" { return MP_mi_as_largecontigsize4stats;} "large_contig_size" | "lcs" { return MP_mi_as_largecontigsize;} "ef1" { yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag1;} "ef2" { yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag2;} +"ef3" { yy_push_state(ASK_YN_MODE); return MP_mi_extra_flag3;} "sonfs" { return MP_ERROR_MOVED_SECTION_NW;} "somrnl" { return MP_ERROR_MOVED_SECTION_NW;} -"stop_on_nfs" | -"sonfs" { yy_push_state(ASK_YN_MODE); return MP_nw_stoponnfs;} -"stop_on_template_error" | -"sote" { yy_push_state(ASK_YN_MODE); return MP_nw_stop_templateerror;} -"stop_on_duplicate_readnames" | -"sodrn" { yy_push_state(ASK_YN_MODE); return MP_nw_stop_duplicatereadnames;} -"stop_on_maxreadnamelength" | -"somrnl" { return MP_nw_stop_maxreadnamelength;} +"check_nfs" | +"cnfs" { yy_push_state(NW_CHOICEMODE); return MP_nw_check_nfs;} +"check_template_problems" | +"ctp" { yy_push_state(NW_CHOICEMODE); return MP_nw_check_templateproblems;} +"check_duplicate_readnames" | +"cdrn" { yy_push_state(NW_CHOICEMODE); return MP_nw_check_duplicatereadnames;} +"check_maxreadnamelength" | +"cmrnl" { yy_push_state(NW_CHOICEMODE); return MP_nw_check_maxreadnamelength;} +"maxreadnamelength" | +"mrnl" { return MP_nw_check_mrnlvalue;} +"check_multipassmapping" | +"cmpm" { yy_push_state(NW_CHOICEMODE); return MP_nw_check_multipassmapping;} +"check_average_coverage" | +"cac" { yy_push_state(NW_CHOICEMODE); return MP_nw_check_coverage;} +"average_coverage_value" | +"acv" { return MP_nw_check_covvalue;} + +"no" {yy_pop_state(); return 0;} +"stop" {yy_pop_state(); return 1;} +"warn" {yy_pop_state(); return 2;} +[= \t] {} +{ANID} { BEGIN(0); return MP_UNRECOGNISED_STRING;} +{FLOAT} { BEGIN(0); return MP_UNRECOGNISED_STRING;} +{INT} { BEGIN(0); return MP_UNRECOGNISED_STRING;} "skip_whole_contig_scan" | @@ -702,12 +736,13 @@ <*>-{1,2}borg { return MP_quickmode_borg;} -<*>-{1,2}cwd[\t ]*= { filenameid=MP_dir_cwd; yy_push_state(FN_MODE);} - <*>-{1,2}parameterfile[\t ]*= | <*>-{1,2}params[\t ]*= | <*>-{1,2}parameters[\t ]*= { filenameid=MP_quickmode_loadparam; yy_push_state(FN_MODE);} +<*>-{1,2}hirep_something { return MP_quickmode_hirep_something;} +<*>-{1,2}hirep_good { return MP_quickmode_hirep_good;} +<*>-{1,2}hirep_best { return MP_quickmode_hirep_best;} <*>-{1,2}highlyrepetitive { return MP_quickmode_highlyrepetitive;} <*>-{1,2}highqualitydata { return MP_quickmode_highqualitydata;} <*>-{1,2}lowqualitydata { return MP_quickmode_lowqualitydata;} @@ -720,9 +755,6 @@ <*>-{1,2}noquality | <*>-{1,2}noqualities { return MP_quickmode_noquality_all;} -<*>--version | -<*>-v { return MP_version;} - <*>"*=BEGIN0=*" {BEGIN(0); return MP_PARSING_SECTIONRESET;} /*Hack for parsing command lines diff -Nru mira-3.9.18/src/mira/parameters_tokens.h mira-4.0/src/mira/parameters_tokens.h --- mira-3.9.18/src/mira/parameters_tokens.h 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/parameters_tokens.h 2014-02-02 12:05:18.000000000 +0000 @@ -24,8 +24,10 @@ * */ -enum { MP_version=1000, - MP_ed_automatic_contig_editing, +enum { MP_ed_mira_automatic_contig_editing=1000, + MP_ed_kmer_singlets, + MP_ed_homopolymer_overcalls, + MP_ed_edit_automatic_contig_editing, MP_ed_strict, MP_ed_confirmation_threshold, @@ -57,7 +59,6 @@ MP_as_uniform_read_distribution, MP_as_urd_startinpass, MP_as_urd_cutoffmultiplier, - MP_as_keep_long_repeats_separated, MP_as_cleanup_tmp_files, MP_as_savesimplesingletsinproject, MP_as_savetaggedsingletsinproject, @@ -137,7 +138,7 @@ MP_as_clip_ssahamerge_strictfrontclip, MP_as_clip_ssahamerge_strictendclip, MP_as_clip_polyat, - MP_as_clip_polyat_keeppolysignal, + MP_as_clip_polyat_keeppolystretch, MP_as_clip_polyat_len, MP_as_clip_polyat_maxerrors, MP_as_clip_polyat_maxgap, @@ -162,9 +163,13 @@ MP_as_backbone_rail_fromstrain, MP_as_startbackboneusage_inpass, MP_as_backbone_alsobuildnewcontigs, + MP_as_backbone_trimoverhangingreads, + MP_as_backbone_bootstrapnewbackbone, MP_sk_numthreads=5000, MP_sk_basesperhash, + MP_sk_bph_increasestep, + MP_sk_bph_coveragethreshold, MP_sk_hashsavestepping, MP_sk_percentrequired, MP_sk_maxhitsperread, @@ -185,6 +190,8 @@ MP_hs_nastyrepeatcoverage, MP_hs_repeatlevel_in_infofile, MP_hs_applydigitalnormalisation, + MP_hs_million_hashes_per_buffer, + MP_hs_rare_kmer_early_kill, MP_al_bip=5500, MP_al_bmax, @@ -247,21 +254,26 @@ MP_con_gap_override_ratio, MP_mi_extendedlog=7700, + MP_mi_iknowwhatido, MP_mi_as_largecontigsize, MP_mi_as_largecontigsize4stats, MP_mi_extra_flag1, MP_mi_extra_flag2, + MP_mi_extra_flag3, - MP_nw_stoponnfs=7800, - MP_nw_stop_templateerror, - MP_nw_stop_duplicatereadnames, - MP_nw_stop_maxreadnamelength, + MP_nw_check_nfs=7800, + MP_nw_check_templateproblems, + MP_nw_check_duplicatereadnames, + MP_nw_check_maxreadnamelength, + MP_nw_check_multipassmapping, + MP_nw_check_mrnlvalue, + MP_nw_check_coverage, + MP_nw_check_covvalue, MP_fn_cafin=7900, MP_fn_cafout, - MP_dir_cwd=8000, - MP_dir_tmp, + MP_dir_tmp=8000, MP_dir_tmp_redirectedto, MP_quickmode_borg=8200, @@ -276,9 +288,12 @@ MP_quickmode_noclipping_text, MP_quickmode_noclipping_solexa, MP_quickmode_noclipping_solid, - MP_quickmode_highlyrepetitive, + MP_quickmode_hirep_something, + MP_quickmode_hirep_good, + MP_quickmode_hirep_best, MP_quickmode_highqualitydata, MP_quickmode_lowqualitydata, + MP_quickmode_highlyrepetitive, MP_jobdefstart=8300, MP_jobdef_draft, diff -Nru mira-3.9.18/src/mira/pcrcontainer.C mira-4.0/src/mira/pcrcontainer.C --- mira-3.9.18/src/mira/pcrcontainer.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/pcrcontainer.C 2014-02-02 12:05:18.000000000 +0000 @@ -593,6 +593,11 @@ * 1,2,3,4,3,4,5,6,7 * It's up to the caller to make sure the logic is OK. * + * Having negative positions after the shift is possible. E.g.: shift(0,5) on + * 0,1,2,3,4,5,6,7,8 + * gives + * -5,-4,-3,-2,-1,0,1,2,3 + * *************************************************************************/ void PlacedContigReads::shiftReads(int32 position, int32 offsetdiff) @@ -673,6 +678,69 @@ } + +/************************************************************************* + * + * shift all reads at "position" or higher by the given offset, but bounce + * negative offsets back to 0 + * + * E.g.: shiftReadsBounceZero(0,5) on + * 0,1,2,3,4,5,6,7,8 + * becomes an intermediate (from shiftReads(0,-5)) + * -5,-4,-3,-2,-1,0,1,2,3 + * and finally a + * 0,0,0,0,0,0,1,2,3 + * + * This is a hacky thing helping to implement cutting back overhanging + * front reads in mapping assemblies (Contig::trimMapOverhang()) + * + * Like for shiftReads(), there is no reordering of the container, so doing + * a shiftReadsBounceZero(2,-5) will wreak havoc on + * 0,1,2,3,4,5,6,7,8 + * producing + * 0,1,-3,-2,-1,0,1,2,3 + * + *************************************************************************/ + +//#define CEBUG(bla) {cout << bla; cout.flush();} +void PlacedContigReads::shiftReadsBounceZero(int32 position, int32 offsetdiff) +{ + FUNCSTART("void PlacedContigReads::shiftReads(int32 position, int32 offsetdiff)"); + + //CEBUG("BEFORE1\n"); + //debugDump(false); + + shiftReads(position,offsetdiff); + + //CEBUG("BEFORE2\n"); + //debugDump(false); + + // need to bounce? + if(PCR_offsetmap.front().from<=0){ + // yes + CEBUG("BOUNCE!\n"); + auto omI=PCR_offsetmap.begin(); + for(; omI!=PCR_offsetmap.end(); ++omI){ // TODO: eventually more intelligent, earlier stop, but don't care ATM + for(auto & raoe : omI->rpbI->readao){ + CEBUG("test bounce " << PCR_readdump[raoe.urdid].getName()); + CEBUG("\tof: " << omI->from); + CEBUG("\tao: " << raoe.addoffset); + CEBUG(endl); + if(omI->from+raoe.addoffset < 0){ + CEBUG("bounceit!\n"); + raoe.addoffset=-omI->from; + } + } + } + } + + //CEBUG("AFTER\n"); + //debugDump(false); + + FUNCEND(); +} +//#define CEBUG(bla) + /************************************************************************* * * remove a placed read, return iterator to element after diff -Nru mira-3.9.18/src/mira/pcrcontainer.H mira-4.0/src/mira/pcrcontainer.H --- mira-3.9.18/src/mira/pcrcontainer.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/pcrcontainer.H 2014-02-02 12:05:18.000000000 +0000 @@ -252,6 +252,21 @@ } } + // this is a bad idea ... incredibly slow compared to currently used methods outside pcrI + // (calc read pos, then access base and qual directly on read) + // + //inline void getBaseAndQuality(const int32 contigpos, char & base, base_quality_t & qual) const + // { + // auto urp=contigPos2UnclippedReadPos(contigpos); + // if(getReadDirection()>0){ + // base=(*this)->getBaseInSequence(urp); + // qual=(*this)->getQualityInSequence(urp); + // }else{ + // base=(*this)->getBaseInComplementSequence(urp); + // qual=(*this)->getQualityInComplementSequence(urp); + // + // } + private: // Everything Boost's iterator facade needs @@ -408,6 +423,7 @@ const_iterator removeRead(const_iterator pcrI); void shiftReads(int32 position, int32 offsetdiff); + void shiftReadsBounceZero(int32 position, int32 offsetdiff); const_iterator getPCRIForReadsStartingAtPos(int32 position) const; diff -Nru mira-3.9.18/src/mira/ppathfinder.C mira-4.0/src/mira/ppathfinder.C --- mira-3.9.18/src/mira/ppathfinder.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/ppathfinder.C 2014-02-02 12:05:18.000000000 +0000 @@ -69,7 +69,7 @@ *************************************************************************/ // Plain vanilla constructor -PPathfinder::PPathfinder(vector * params, ReadPool * readpool, vector * overlap_edges, vector * adsfacts, vector * aligncache, vector * used_ids, vector * multicopies, vector * hasmcoverlaps, vector * istroublemaker, vector * wellconnected,vector::iterator > * lowerbound_oedges_ptr) +PPathfinder::PPathfinder(vector * params, ReadPool * readpool, vector * overlap_edges, vector * adsfacts, vector * aligncache, vector * used_ids, vector * multicopies, vector * hasmcoverlaps, vector * hasreptoverlaps, vector * hasnoreptoverlaps, vector * istroublemaker, vector * wellconnected,vector::iterator > * lowerbound_oedges_ptr, std::vector * astemplateguesses) { FUNCSTART("PPathfinder::PPathfinder()"); @@ -83,11 +83,21 @@ PPF_used_ids_ptr=used_ids; PPF_multicopies_ptr=multicopies; PPF_hasmcoverlap_ptr=hasmcoverlaps; + PPF_hasreptoverlap_ptr=hasreptoverlaps; + PPF_hasnoreptoverlap_ptr=hasnoreptoverlaps; PPF_istroublemaker_ptr=istroublemaker; PPF_wellconnected_ptr=wellconnected; PPF_lowerbound_oedges_ptr=lowerbound_oedges_ptr; + PPF_astemplateguesses_ptr=astemplateguesses; ////// + if(PPF_hasnoreptoverlap_ptr->empty()){ + priv_ppFillNoRept(); + } + if(PPF_hasreptoverlap_ptr->empty()){ + priv_ppFillRept(); + } + ////// PPF_pafparams_ptr=&((*PPF_miraparams_ptr)[0].getPathfinderParams()); @@ -124,6 +134,40 @@ * * *************************************************************************/ +void PPathfinder::priv_ppFillNoRept() +{ + PPF_hasnoreptoverlap_ptr->clear(); + PPF_hasnoreptoverlap_ptr->resize(PPF_readpool_ptr->size()); + for(auto & oee : *PPF_overlap_edges_ptr){ + if(oee.ol_norept){ + (*PPF_hasnoreptoverlap_ptr)[oee.rid1]=true; + (*PPF_hasnoreptoverlap_ptr)[oee.linked_with]=true; + } + } +} + +/************************************************************************* + * + * + * + *************************************************************************/ +void PPathfinder::priv_ppFillRept() +{ + PPF_hasreptoverlap_ptr->clear(); + PPF_hasreptoverlap_ptr->resize(PPF_readpool_ptr->size()); + for(auto & oee : *PPF_overlap_edges_ptr){ + if(oee.ol_rept){ + (*PPF_hasreptoverlap_ptr)[oee.rid1]=true; + (*PPF_hasreptoverlap_ptr)[oee.linked_with]=true; + } + } +} + +/************************************************************************* + * + * + * + *************************************************************************/ //#define CEBUG(bla) {cout << bla; cout.flush(); } void PPathfinder::prepareForNewContig(Contig & con) @@ -137,7 +181,7 @@ } for(auto rid : PPF_ids_in_contig_list){ - PPF_ids_added_oltype[rid]=0; + PPF_ids_added_oltype[rid]=ADDED_NOTADDED; } PPF_ids_in_contig_list.clear(); PPF_rails_in_contig_list.clear(); @@ -224,6 +268,8 @@ { FUNCSTART("void PPathfinder::denovo()"); + Contig::templateguessinfo_t tguess; + if(PPF_ids_in_contig_list.size() &&(PPF_actcontig_ptr->getContigReads().size()==0 || PPF_actcontig_ptr->getContigLength()==0)){ @@ -258,6 +304,7 @@ nullptr, startid, startid, 1, (*PPF_multicopies_ptr)[startid], 0, + tguess, PPF_contigerrstat); (*PPF_used_ids_ptr)[startid]=1; PPF_ids_in_contig_list.push_back(startid); @@ -451,17 +498,21 @@ #endif PPF_bsccontent=BSCC_GENOME_BESTQUAL; - priv_fdns_g_subFillCache(true,true,true,true); + priv_fdns_g_subFillCache(true,true,true,true,true); if(PPF_beststartcache.empty()){ - PPF_bsccontent=BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_NOTMULTICOPY_WELLCONNECTED; - priv_fdns_g_subFillCache(false,false,true,true); + PPF_bsccontent=BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_NOTMULTICOPY_WELLCONNECTED_NOKMERFORK; + priv_fdns_g_subFillCache(false,false,true,true,true); if(PPF_beststartcache.empty()){ - PPF_bsccontent=BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_MULTICOPY_WELLCONNECTED; - priv_fdns_g_subFillCache(false,false,false,true); + PPF_bsccontent=BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_NOTMULTICOPY_WELLCONNECTED_NOKMERFORK; + priv_fdns_g_subFillCache(false,false,true,true,true); if(PPF_beststartcache.empty()){ - PPF_bsccontent=BSCC_GENOME_BADQUAL_NOTWELLCONNECTED; - priv_fdns_g_subFillCache(false,false,false,false); + PPF_bsccontent=BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_MULTICOPY_WELLCONNECTED_NOKMERFORK; + priv_fdns_g_subFillCache(false,false,false,true,true); + if(PPF_beststartcache.empty()){ + PPF_bsccontent=BSCC_GENOME_BADQUAL_NOTWELLCONNECTED; + priv_fdns_g_subFillCache(false,false,false,false,false); + } } } } @@ -539,9 +590,9 @@ //#define CEBUG(bla) {cout << bla; cout.flush(); } -void PPathfinder::priv_fdns_g_subFillCache(bool wanttroublemakercheck, bool wantstronggoodcheck, bool wantmulticopycheck, bool wantwellconnectedcheck) +void PPathfinder::priv_fdns_g_subFillCache(bool wanttroublemakercheck, bool wantstronggoodcheck, bool wantmulticopycheck, bool wantwellconnectedcheck, bool wantnokmerfork) { - FUNCSTART("void PPathfinder::priv_fdns_g_subFillCache(bool wanttroublemakercheck, bool wantstronggoodcheck, bool wantmulticopycheck, bool wantwellconnectedcheck)"); + FUNCSTART("void PPathfinder::priv_fdns_g_subFillCache(bool wanttroublemakercheck, bool wantstronggoodcheck, bool wantmulticopycheck, bool wantwellconnectedcheck, bool wantnokmerfork)"); #ifdef CLOCK_STEPS2 timeval tv; @@ -589,6 +640,7 @@ || (wanttroublemakercheck && PPF_istroublemaker[actid]!=0) || (wantmulticopycheck && PPF_multicopies[actid]!=0) || (wantwellconnectedcheck && !PPF_wellconnected[actid]) + || (wantnokmerfork && PPF_readpool_ptr->getRead(actid).hasKMerFork()) || uid_in_cluster[actid]) continue; uint32 goodclustersize=0; @@ -1031,159 +1083,210 @@ readid_t linkedwith_partnerid=PPF_readpool_ptr->getRead(linkedwithid).getTemplatePartnerID(); bool swb=oeI->ol_stronggood | oeI->ol_weakgood | oeI->ol_belowavgfreq; // swb: overlap is Strong / Weak / Belowavg - if(swb && linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && lr_wellconnected[linkedwithid]){ - if(oeI->ol_stronggood){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTSTRONG_WELLCONNECTED){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTSTRONG_WELLCONNECTED; - bestoeI=oeI; - break; // early termination of for loop, we won't find something better. + + bool havedecision=false; + + if(swb && oeI->ol_norept){ + // 0-14 + if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && lr_wellconnected[linkedwithid]){ + // 0-2 + havedecision=true; + if(oeI->ol_stronggood){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTSTRONG_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTSTRONG_WELLCONNECTED; + bestoeI=oeI; + break; // early termination of for loop, we won't find something better. + } + }else if(oeI->ol_weakgood){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTWEAK_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTWEAK_WELLCONNECTED; + bestoeI=oeI; + } + }else{ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG_WELLCONNECTED; + bestoeI=oeI; + } } - }else if(oeI->ol_weakgood){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTWEAK_WELLCONNECTED){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTWEAK_WELLCONNECTED; - bestoeI=oeI; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT){ + // 3-5 + havedecision=true; + if(oeI->ol_stronggood){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTSTRONG){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTSTRONG; + bestoeI=oeI; + } + }else if(oeI->ol_weakgood){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTWEAK){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTWEAK; + bestoeI=oeI; + } + }else{ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG; + bestoeI=oeI; + } } - }else{ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG_WELLCONNECTED){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG_WELLCONNECTED; - bestoeI=oeI; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && lr_wellconnected[linkedwithid]){ + // 6-8 + havedecision=true; + if(oeI->ol_stronggood){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTSTRONG_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTSTRONG_WELLCONNECTED; + bestoeI=oeI; + } + }else if(oeI->ol_weakgood){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTWEAK_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTWEAK_WELLCONNECTED; + bestoeI=oeI; + } + }else{ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG_WELLCONNECTED; + bestoeI=oeI; + } + } + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT){ + // 9-11 + havedecision=true; + if(oeI->ol_stronggood){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTSTRONG){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTSTRONG; + bestoeI=oeI; + } + }else if(oeI->ol_weakgood){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTWEAK){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTWEAK; + bestoeI=oeI; + } + }else{ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG; + bestoeI=oeI; + } + } + }else if(swb && lr_wellconnected[linkedwithid]){ + // 12-14 + havedecision=true; + if(oeI->ol_stronggood){ + if(bestoelevel>QTG_OLNOREPTSTRONG_WELLCONNECTED){ + bestoelevel=QTG_OLNOREPTSTRONG_WELLCONNECTED; + bestoeI=oeI; + } + }else if(oeI->ol_weakgood){ + if(bestoelevel>QTG_OLNOREPTWEAK_WELLCONNECTED){ + bestoelevel=QTG_OLNOREPTWEAK_WELLCONNECTED; + bestoeI=oeI; + } + }else{ + if(bestoelevel>QTG_OLNOREPTBELOWAVG_WELLCONNECTED){ + bestoelevel=QTG_OLNOREPTBELOWAVG_WELLCONNECTED; + bestoeI=oeI; + } } } - }else if(swb && linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT){ + } + + if(!havedecision + && oeI->ol_stronggood + && linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && lr_wellconnected[linkedwithid]){ + // 14a + havedecision=true; + if(bestoelevel>QTG_TPARTNERNOREPT_STRONG_WELLCONNECTED){ + bestoelevel=QTG_TPARTNERNOREPT_STRONG_WELLCONNECTED; + bestoeI=oeI; + } + } + + if(!havedecision + && swb && oeI->ol_norept){ + // 15-17 + havedecision=true; if(oeI->ol_stronggood){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTSTRONG){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTSTRONG; + if(bestoelevel>QTG_OLNOREPTSTRONG){ + bestoelevel=QTG_OLNOREPTSTRONG; bestoeI=oeI; } }else if(oeI->ol_weakgood){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTWEAK){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTWEAK; + if(bestoelevel>QTG_OLNOREPTWEAK){ + bestoelevel=QTG_OLNOREPTWEAK; bestoeI=oeI; } }else{ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG; + if(bestoelevel>QTG_OLNOREPTBELOWAVG){ + bestoelevel=QTG_OLNOREPTBELOWAVG; bestoeI=oeI; } } - }else if(swb && linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && lr_wellconnected[linkedwithid]){ - if(oeI->ol_stronggood){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTSTRONG_WELLCONNECTED){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTSTRONG_WELLCONNECTED; + } + + if(!havedecision){ + // rest, 18-27 + + if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && oeI->ol_norept){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTOTHER){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTOTHER; bestoeI=oeI; } - }else if(oeI->ol_weakgood){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTWEAK_WELLCONNECTED){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTWEAK_WELLCONNECTED; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && !oeI->ol_norept && !oeI->ol_rept){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLNOTREPTOTHER){ + bestoelevel=QTG_TPARTNERNOREPT_OLNOTREPTOTHER; bestoeI=oeI; } - }else{ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG_WELLCONNECTED){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG_WELLCONNECTED; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && oeI->ol_norept){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTOTHER){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTOTHER; bestoeI=oeI; } - } - }else if(swb && linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT){ - if(oeI->ol_stronggood){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTSTRONG){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTSTRONG; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && !oeI->ol_norept && !oeI->ol_norept && !oeI->ol_rept){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOTREPTOTHER){ + bestoelevel=QTG_TPARTNERNOTREPT_OLNOTREPTOTHER; bestoeI=oeI; } - }else if(oeI->ol_weakgood){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTWEAK){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTWEAK; + }else if(oeI->ol_norept){ + // 22 + if(bestoelevel>QTG_OLNOREPTOTHER){ + bestoelevel=QTG_OLNOREPTOTHER; bestoeI=oeI; } - }else{ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTBELOWAVG; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && oeI->ol_rept){ + if(bestoelevel>QTG_TPARTNERNOREPT_OLREPT){ + bestoelevel=QTG_TPARTNERNOREPT_OLREPT; bestoeI=oeI; } - } - }else if(swb && lr_wellconnected[linkedwithid]){ - if(oeI->ol_stronggood){ - if(bestoelevel>QTG_OLNOREPTSTRONG_WELLCONNECTED){ - bestoelevel=QTG_OLNOREPTSTRONG_WELLCONNECTED; + }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && oeI->ol_rept){ + if(bestoelevel>QTG_TPARTNERNOTREPT_OLREPT){ + bestoelevel=QTG_TPARTNERNOTREPT_OLREPT; bestoeI=oeI; } - }else if(oeI->ol_weakgood){ - if(bestoelevel>QTG_OLNOREPTWEAK_WELLCONNECTED){ - bestoelevel=QTG_OLNOREPTWEAK_WELLCONNECTED; + }else if(!oeI->ol_norept & !oeI->ol_rept){ + if(bestoelevel>QTG_OLNOTREPT){ + bestoelevel=QTG_OLNOTREPT; bestoeI=oeI; } - }else{ - if(bestoelevel>QTG_OLNOREPTBELOWAVG_WELLCONNECTED){ - bestoelevel=QTG_OLNOREPTBELOWAVG_WELLCONNECTED; + }else if(oeI->ol_rept){ + if(bestoelevel>QTG_OLREPTSTRONG_WELLCONNECTED && lr_wellconnected[linkedwithid] && oeI->ol_stronggood){ + bestoelevel=QTG_OLREPTSTRONG_WELLCONNECTED; bestoeI=oeI; - } - } - }else if(swb){ - if(oeI->ol_stronggood){ - if(bestoelevel>QTG_OLNOREPTSTRONG){ - bestoelevel=QTG_OLNOREPTSTRONG; + }else if(bestoelevel>QTG_OLREPTWEAK_WELLCONNECTED && lr_wellconnected[linkedwithid] && oeI->ol_weakgood){ + bestoelevel=QTG_OLREPTWEAK_WELLCONNECTED; bestoeI=oeI; - } - }else if(oeI->ol_weakgood){ - if(bestoelevel>QTG_OLNOREPTWEAK){ - bestoelevel=QTG_OLNOREPTWEAK; + }else if(bestoelevel>QTG_OLREPTSTRONG && oeI->ol_stronggood){ + bestoelevel=QTG_OLREPTSTRONG; + bestoeI=oeI; + }else if(bestoelevel>QTG_OLREPTWEAK && oeI->ol_weakgood){ + bestoelevel=QTG_OLREPTWEAK; + bestoeI=oeI; + }else if(bestoelevel>QTG_OLREPT){ + bestoelevel=QTG_OLREPT; bestoeI=oeI; } }else{ - if(bestoelevel>QTG_OLNOREPTBELOWAVG){ - bestoelevel=QTG_OLNOREPTBELOWAVG; + if(bestoelevel>QTG_OLOTHER){ + bestoelevel=QTG_OLOTHER; bestoeI=oeI; } } - }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && oeI->ol_norept){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOREPTOTHER){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOREPTOTHER; - bestoeI=oeI; - } - }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && !oeI->ol_norept){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLNOTREPTOTHER){ - bestoelevel=QTG_TPARTNERNOREPT_OLNOTREPTOTHER; - bestoeI=oeI; - } - }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && oeI->ol_norept){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOREPTOTHER){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOREPTOTHER; - bestoeI=oeI; - } - }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && !oeI->ol_norept){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLNOTREPTOTHER){ - bestoelevel=QTG_TPARTNERNOTREPT_OLNOTREPTOTHER; - bestoeI=oeI; - } - }else if(oeI->ol_norept){ - if(bestoelevel>QTG_OLNOREPTOTHER){ - bestoelevel=QTG_OLNOREPTOTHER; - bestoeI=oeI; - } - }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOREPT && oeI->ol_rept){ - if(bestoelevel>QTG_TPARTNERNOREPT_OLREPT){ - bestoelevel=QTG_TPARTNERNOREPT_OLREPT; - bestoeI=oeI; - } - }else if(linkedwith_partnerid>=0 && PPF_ids_added_oltype[linkedwith_partnerid]==ADDED_BY_NOTREPT && oeI->ol_rept){ - if(bestoelevel>QTG_TPARTNERNOTREPT_OLREPT){ - bestoelevel=QTG_TPARTNERNOTREPT_OLREPT; - bestoeI=oeI; - } - }else if(!oeI->ol_norept & !oeI->ol_rept){ - if(bestoelevel>QTG_OLNOTREPT){ - bestoelevel=QTG_OLNOTREPT; - bestoeI=oeI; - } - }else if(oeI->ol_rept){ - if(bestoelevel>QTG_OLREPT){ - bestoelevel=QTG_OLREPT; - bestoeI=oeI; - } - }else{ - if(bestoelevel>QTG_OLOTHER){ - bestoelevel=QTG_OLOTHER; - bestoeI=oeI; - } } } @@ -1567,6 +1670,8 @@ { FUNCSTART("void PPathfinder::priv_ld_genome()"); + Contig::templateguessinfo_t tguess; + #ifdef CLOCK_STEPS1 timeval tv; @@ -1593,6 +1698,18 @@ int32 forcegrow=0; + bool buildprematurestop=false; + + // noaligncounter counts how many times the pathfinder itself skipped over calling Contig::addRead() + // when it saw it made no sense. Though every time a read is added to the contig, the counter is + // reset to 0 + // if noaligncounter reaches a threshold (2400 atm), we'll stop contig building + // + // This speeds up abortion a contig build process in hopeless situations, + // i.e., when both ends of a contig end in repeats which very probably + // cannot be crossed. + + uint32 noaligncounter=0; while(true){ #ifdef CLOCK_STEPS1 gettimeofday(&tv,nullptr); @@ -1607,6 +1724,7 @@ #endif if(oeI==PPF_overlap_edges_ptr->end()) { CEBUG("breaking out\n"); + // queues are empty, this is a totally normal stopping of the build break; } nrta.refid=oeI->rid1; @@ -1614,37 +1732,132 @@ nrta.direction_newid=oeI->direction; nrta.ads_node=&(*PPF_adsfacts_ptr)[oeI->adsfindex]; nrta.weight=oeI->best_weight; + PPF_contigerrstat.reset(); + PPF_contigerrstat.code=Contig::ENOTCALLED; forcegrow=0; - // for genomes, disallow growth of contig if if this gets too dangerous, - // i.e., the overlap is repetitive and no paired-end in sight - // BUT: only if this is a "regular" contig that was started from a non-multicopy - // read - if(PPF_pafparams_ptr->paf_use_genomic_algorithms - && nrta.foundqueuenum>=QTG_TPARTNERNOTREPT_OLREPT - && !PPF_actcontig_ptr->getLongRepeatStatus()){ - forcegrow=-1; + + // for genomes, disallow growth of contig if ... + bool doalign=true; + if(PPF_pafparams_ptr->paf_use_genomic_algorithms && !PPF_actcontig_ptr->getLongRepeatStatus()){ + // this gets too dangerous, i.e., the overlap is repetitive and no + // paired-end in sight. BUT: only if this is a "regular" contig that + // was started from a non-multicopy read + + auto & newread = PPF_readpool_ptr->getRead(nrta.newid); + auto tpid=newread.getTemplatePartnerID(); + if(newread.getSequencingType()==ReadGroupLib::SEQTYPE_SOLEXA){ + if(!(oeI->ol_stronggood || oeI->ol_weakgood)){ + if(tpid>=0){ + auto & tpread=PPF_readpool_ptr->getRead(tpid); + if(!PPF_ids_added_oltype[tpid] + && (tpread.hasFreqAvg() || !tpread.hasFreqRept())){ + // so ... this Solexa overlap is not strong- or weakgood + // and its template-partner has average frequency (or not + // rept freq), but is not in the contig yet + // we could say "wait for a later timepoint to include this, + // this may be safer" by simply doing + // doalign=false; + // but this can stop the building of a contig at places where, + // for some reason or another, we have a "longer stretch with + // less coverage than average. Longer means: > ~2x avg + // read length. + // + // For this reason, we will take a detour: + // if overlap ratio=100 and overlap length>=35 and new read has no rept, + // kmer we will still allow incorporation of read + // TODO: maybe disallow growth? + // TODO: 35 maybe too small? On the other hand: we're already pretty low in the queues + if(nrta.ads_node->getScoreRatio()==100 + && nrta.ads_node->getOverlapLen()>=35 + && !PPF_readpool_ptr->getRead(nrta.newid).hasFreqRept()){ + //forcegrow=-1; + }else{ + doalign=false; + } + }else if(PPF_ids_added_oltype[tpid] != ADDED_BY_NOREPT){ + forcegrow=-1; + } + }else{ + if((!oeI->ol_norept || oeI->ol_rept) + && newread.hasKMerFork()){ + forcegrow=-1; + } + } + } + }else if(nrta.foundqueuenum>=QTG_TPARTNERNOTREPT_OLREPT){ + if(!(oeI->ol_stronggood || oeI->ol_weakgood)){ // 05.11.2013: let's test that + forcegrow=-1; + }else if(!oeI->ol_stronggood + && oeI->ol_weakgood + && newread.hasKMerFork()){ + forcegrow=-1; + } + } + + // rule for rept(!) overlap with non-overlapping template partners + if(oeI->ol_rept + && tpid>=0 + && tpid != nrta.refid){ // this is the non-pair overlap clause + + // if template partner not in contig (or added otherwise than by norept), + // do not add + if(PPF_ids_added_oltype[tpid]!=ADDED_BY_NOREPT){ + doalign=false; + } + +/* + // if template partner with a non-rept overlap exists + // but is not used yet, do not align! + if((*PPF_hasnoreptoverlap_ptr)[tpid] + && !(*PPF_used_ids_ptr)[tpid]){ + doalign=false; + }else if((*PPF_hasnoreptoverlap_ptr)[tpid] + && (*PPF_used_ids_ptr)[tpid] + && PPF_ids_added_oltype[tpid]==ADDED_NOTADDED){ + // if template partner with a non-rept overlap exists + // but is not in this contig, do not align! + doalign=false; + }else if(!(*PPF_hasnoreptoverlap_ptr)[tpid] + && !(*PPF_hasnoreptoverlap_ptr)[nrta.newid]){ + // if both partner have no no-rept overlap (i.e., are completely + // in a repeat), do not align + // TODO: 1. this of course leads to problems with PCR duplicates *sigh* + // TODO: 2. maybe better to blacklist that via ol_ flag? + doalign=false; + } +//*/ + + } } +#ifndef PUBLICQUIET + cout << "doalign\t" << doalign << "\t" << PPF_readpool_ptr->getRead(nrta.newid).getName() << "\toechosen\tsg: " << oeI->ol_stronggood << " wg: " << oeI->ol_weakgood << " baf: " << oeI->ol_belowavgfreq << " nrp: " << oeI->ol_norept << " rep: " << oeI->ol_rept << endl; +#endif + + if(doalign){ #ifdef CLOCK_STEPS1 - gettimeofday(&tv,nullptr); + gettimeofday(&tv,nullptr); #endif - ++PPF_readaddattempts; - BUGIFTHROW(static_cast(lr_used_ids[nrta.newid]),"PFcheck: newid already used??? " << nrta.newid << " " << static_cast(lr_used_ids[nrta.newid]) << '\n'); - PPF_actcontig_ptr->addRead(*PPF_aligncache_ptr, - nrta.ads_node, nrta.refid, nrta.newid, nrta.direction_newid, - (*PPF_multicopies_ptr)[nrta.newid], - forcegrow, - PPF_contigerrstat); + ++PPF_readaddattempts; + BUGIFTHROW(static_cast(lr_used_ids[nrta.newid]),"PFcheck: newid already used??? " << nrta.newid << " " << static_cast(lr_used_ids[nrta.newid]) << '\n'); + PPF_actcontig_ptr->addRead(*PPF_aligncache_ptr, + nrta.ads_node, nrta.refid, nrta.newid, nrta.direction_newid, + (*PPF_multicopies_ptr)[nrta.newid], + forcegrow, + tguess, + PPF_contigerrstat); #ifdef CLOCK_STEPS1 - { - auto tmpx=diffsuseconds(tv); - PPF_timing_connadd+=tmpx; - ldtimear+=tmpx; - } + { + auto tmpx=diffsuseconds(tv); + PPF_timing_connadd+=tmpx; + ldtimear+=tmpx; + } #endif + } - if(PPF_contigerrstat.code == Contig::ENOERROR) { + if(doalign && PPF_contigerrstat.code == Contig::ENOERROR) { CEBUG("\nok, added" << endl); + noaligncounter=0; PPF_ids_in_contig_list.push_back(nrta.newid); lr_used_ids[nrta.newid]=1; if(oeI->ol_norept){ @@ -1662,8 +1875,11 @@ PPF_timing_pathsearch+=diffsuseconds(tv); #endif priv_munchBlacklist(false); + //cout << "\nTGUESS " << tguess << endl; + priv_storeTemplateGuess(nrta.newid,tguess); }else{ priv_handleReadNotAligned(oeI,nrta); + if(!doalign) ++noaligncounter; } CEBUG("\npost ar" << endl); // keep this here so that a possible ban above is taken into account @@ -1682,15 +1898,26 @@ actclocks=mytms.tms_utime+mytms.tms_stime; if(actclocks>maxallowedclocks){ cout << "\nMaximum build time for this contig reached, aborting build.\n"; - // cleanup the priority queues, we need to be tidy - for(auto & pq : PPF_queues){ - while(!pq.empty()) pq.pop(); - } + buildprematurestop=true; break; } } + if(noaligncounter>=4800){ + cout << "\nProbable dead end, aborting build.\n"; + buildprematurestop=true; + break; + } + } + + // in case we stopped the build prematurely + // cleanup the priority queues ... we need to be tidy + if(buildprematurestop){ + for(auto & pq : PPF_queues){ + while(!pq.empty()) pq.pop(); + } } + #ifdef CLOCK_STEPS1 cout << "priv_ld addRead: " << ldtimear << endl; cout << "priv_ld total: " << diffsuseconds(tvtotal) << endl; @@ -1713,10 +1940,13 @@ FUNCSTART("void Pathfinder::priv_handleReadNotAligned(nextreadtoadd_t const &nrta)"); // CEBUG("Banning " << oeI->rid1 << " (" << PPF_readpool_ptr->getRead(oeI->rid1).getName() << ")\t" << oeI->linked_with << " (" << PPF_readpool_ptr->getRead(oeI->linked_with).getName() << ")" << endl); -// oeI->pf_banned=true; -// if(PPF_overlapsbanned_smallstore.size()pf_banned=true; + if(PPF_overlapsbanned_smallstore.size()getContigName() << endl; for(auto qi=0; qiempty() + || tguess.rgid.isDefaultNonValidReadGroupID()) return; + + auto tpid=PPF_readpool_ptr->getRead(newid).getTemplatePartnerID(); + BUGIFTHROW(tpid == -1, "tpid == -1?"); + if( PPF_ids_added_oltype[newid]!=ADDED_BY_BACKBONE + && (PPF_ids_added_oltype[tpid]!=ADDED_BY_NOREPT + || PPF_ids_added_oltype[newid]!=ADDED_BY_NOREPT)){ + return; + } + + BUGIFTHROW(PPF_readpool_ptr->getRead(tpid).getTemplateID() != PPF_readpool_ptr->getRead(newid).getTemplateID(), "PPF_readpool_ptr->getRead(tpid).getTemplateID() " << PPF_readpool_ptr->getRead(tpid).getTemplateID() << " != " << PPF_readpool_ptr->getRead(newid).getTemplateID() << " PPF_readpool_ptr->getRead(newid).getTemplateID() ???"); + (*PPF_astemplateguesses_ptr)[PPF_readpool_ptr->getRead(newid).getTemplateID()]=tguess; +} diff -Nru mira-3.9.18/src/mira/ppathfinder.H mira-4.0/src/mira/ppathfinder.H --- mira-3.9.18/src/mira/ppathfinder.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/ppathfinder.H 2014-02-02 12:05:18.000000000 +0000 @@ -81,11 +81,11 @@ //Variables private: enum queue_types { - QTG_TPARTNERNOREPT_OLNOREPTSTRONG_WELLCONNECTED=0, // 0 // TPARTNER: not rept; THIS OVERLAP: norept; NEW READ: well connected + QTG_TPARTNERNOREPT_OLNOREPTSTRONG_WELLCONNECTED=0, // 0 // TPARTNER: no rept; THIS OVERLAP: norept; NEW READ: well connected QTG_TPARTNERNOREPT_OLNOREPTWEAK_WELLCONNECTED, // 1 QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG_WELLCONNECTED, // 2 - QTG_TPARTNERNOREPT_OLNOREPTSTRONG, // 3 // TPARTNER: not rept; THIS OVERLAP: norept + QTG_TPARTNERNOREPT_OLNOREPTSTRONG, // 3 // TPARTNER: no rept; THIS OVERLAP: norept QTG_TPARTNERNOREPT_OLNOREPTWEAK, // 4 QTG_TPARTNERNOREPT_OLNOREPTBELOWAVG, // 5 @@ -101,6 +101,8 @@ QTG_OLNOREPTWEAK_WELLCONNECTED, // 13 QTG_OLNOREPTBELOWAVG_WELLCONNECTED, // 14 + QTG_TPARTNERNOREPT_STRONG_WELLCONNECTED, // 14a, maybe also a 14b and c (weak/belowavg)? + QTG_OLNOREPTSTRONG, // 15 QTG_OLNOREPTWEAK, // 16 QTG_OLNOREPTBELOWAVG, // 17 @@ -115,11 +117,16 @@ QTG_TPARTNERNOTREPT_OLREPT, // 24 QTG_OLNOTREPT, // 25 // norept==false, but also rept==false (HAF4) - QTG_OLREPT, // 26 - QTG_OLOTHER, // 27 // should stay empty?? + QTG_OLREPTSTRONG_WELLCONNECTED, // 26 + QTG_OLREPTWEAK_WELLCONNECTED, // 27 + QTG_OLREPTSTRONG, // 28 + QTG_OLREPTWEAK, // 29 + QTG_OLREPT, // 30 + + QTG_OLOTHER, // 31 // should stay empty?? - QTG_END = 32, + QTG_END = 36, QTE_TPARTNERWCREPT6P_WCREPT6P_OLREPT_REPT6PWC=0, // 0 @@ -189,7 +196,15 @@ initialised by pathfinder if vector is empty (==once every pass of MIRA) + // TODO: unused now??? */ + std::vector * PPF_hasreptoverlap_ptr; /* reads that have ol_rept overlaps + init by pathfinder if empty (once every pass) + maybe unused atm + */ + std::vector * PPF_hasnoreptoverlap_ptr; /* reads that have ol_norept overlaps + init by pathfinder if empty (once every pass) + */ std::vector * PPF_istroublemaker_ptr; std::vector * PPF_wellconnected_ptr; /* vector of bool values reads having a level 0 overlap @@ -205,6 +220,7 @@ speeds the things up */ std::vector::iterator> * PPF_lowerbound_oedges_ptr; + std::vector * PPF_astemplateguesses_ptr; // beware, may be rightfully empty // atm only for mapping @@ -268,8 +284,8 @@ */ enum { BSCC_GENOME_BESTQUAL=0, - BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_NOTMULTICOPY_WELLCONNECTED, - BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_MULTICOPY_WELLCONNECTED, + BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_NOTMULTICOPY_WELLCONNECTED_NOKMERFORK, + BSCC_GENOME_MEDQUAL_TROUBLEMAKER_NOTSTRONG_MULTICOPY_WELLCONNECTED_NOKMERFORK, BSCC_GENOME_BADQUAL_NOTWELLCONNECTED, BSCC_EST_WELLCONNECTED_REPT6P, BSCC_EST_WELLCONNECTED_REPT, @@ -340,6 +356,9 @@ return a.rid1 < b.rid1; }; + void priv_ppFillNoRept(); + void priv_ppFillRept(); + void priv_initialiseLowerBoundOEdges(); void priv_showProgress(); void priv_basicSetup(); @@ -358,7 +377,8 @@ void priv_fdns_g_subFillCache(bool wanttroublemakercheck, bool wantstronggoodcheck, bool wantmulticopycheck, - bool wantwellconnectedcheck); + bool wantwellconnectedcheck, + bool wantnokmerfork); void priv_fdns_est(); void priv_fdns_e_subFillCache(bool wantwellconnectedcheck, uint8 minallowedfreq); @@ -396,6 +416,8 @@ bool allowtroublemakers, bool allowsmallhits); + void priv_storeTemplateGuess(readid_t newid, Contig::templateguessinfo_t & tguess); + public: PPathfinder(std::vector * params, ReadPool * readpool, @@ -405,9 +427,13 @@ std::vector * used_ids, std::vector * multicopies, std::vector * hasmcoverlaps, + std::vector * hasreptoverlaps, + std::vector * hasnoreptoverlaps, std::vector * istroublemaker, std::vector * wellconnected, - std::vector::iterator > * lowerbound_oedges_ptr); + std::vector::iterator > * lowerbound_oedges_ptr, + std::vector * astemplateguess + ); ~PPathfinder(); diff -Nru mira-3.9.18/src/mira/preventinitfiasco.C mira-4.0/src/mira/preventinitfiasco.C --- mira-3.9.18/src/mira/preventinitfiasco.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/preventinitfiasco.C 2014-02-02 12:05:18.000000000 +0000 @@ -173,6 +173,8 @@ const multitag_t::mte_id_t Read::REA_tagentry_idHAF6=multitag_t::newIdentifier("HAF6"); const multitag_t::mte_id_t Read::REA_tagentry_idHAF7=multitag_t::newIdentifier("HAF7"); +const multitag_t::mte_id_t Read::REA_tagentry_idKMRF=multitag_t::newIdentifier("KMRF"); + const multitag_t::mte_id_t Read::REA_tagentry_idDGNr=multitag_t::newIdentifier("DGNr"); const multitag_t::mte_id_t Read::REA_tagentry_idMFSM=multitag_t::newIdentifier("MFSM"); // MIRA Force Short-Read Merge @@ -188,7 +190,7 @@ const multitag_t::mte_id_t Read::REA_tagentry_idSOFACDS =multitag_t::newIdentifier("CDS"); const multitag_t::mte_id_t Read::REA_tagentry_idSOFAexon =multitag_t::newIdentifier("exon"); const multitag_t::mte_id_t Read::REA_tagentry_idSOFAintron =multitag_t::newIdentifier("intron"); -const multitag_t::mte_id_t Read::REA_tagentry_idSOFApolyA_signal_sequence =multitag_t::newIdentifier("polyA_signal_sequence"); +const multitag_t::mte_id_t Read::REA_tagentry_idSOFApolyA_sequence =multitag_t::newIdentifier("polyA_sequence"); const multitag_t::mte_id_t Read::REA_tagentry_idSOFAmRNA =multitag_t::newIdentifier("mRNA"); const multitag_t::mte_id_t Read::REA_tagentry_idSOFAtranscript =multitag_t::newIdentifier("transcript"); @@ -217,7 +219,7 @@ const multitag_t Read::REA_defaulttag_PSHP("PSHP","","MIRA"); const multitag_t Read::REA_defaulttag_CJSP("CJSP","","MIRA"); -const multitag_t Read::REA_defaulttag_SOFApolyA_signal_sequence("polyA_signal_sequence","","MIRA"); +const multitag_t Read::REA_defaulttag_SOFApolyA_sequence("polyA_sequence","","MIRA"); const multitag_t::mte_co_t Read::REA_tagentry_coEmpty=multitag_t::newComment(""); diff -Nru mira-3.9.18/src/mira/read.C mira-4.0/src/mira/read.C --- mira-3.9.18/src/mira/read.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/read.C 2014-02-02 12:05:18.000000000 +0000 @@ -143,6 +143,8 @@ REA_has_freqavg=false; REA_has_freqrept=false; + REA_has_kmerfork=false; + REA_scf_available=false; REA_scf_loadattempted=false; @@ -388,7 +390,7 @@ MIRANOTIFY(Notify::INTERNAL, "Read " << getName() << " has no valid data?"); } - BUGIFTHROW(checkRead(), checkRead()); + BUGIFTHROW(checkRead()!=nullptr, checkRead()); FUNCEND(); } @@ -556,6 +558,8 @@ REA_has_freqavg=other.REA_has_freqavg; REA_has_freqrept=other.REA_has_freqrept; + REA_has_kmerfork=other.REA_has_kmerfork; + REA_scf_available=other.REA_scf_available; REA_scf_loadattempted=other.REA_scf_loadattempted; @@ -3208,7 +3212,7 @@ return REA_adjustments[position]; } - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); if(REA_padded_sequence[position]=='*') return -1; return position; @@ -3235,7 +3239,7 @@ return REA_adjustments[position]; } - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); while(position>0 && REA_padded_sequence[position] == '*') position--; int32 adjpos=0; @@ -3269,7 +3273,7 @@ return REA_adjustments[position]; } - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); while(position(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(position>=REA_padded_sequence.size(),getName() << ": position (" << position << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); @@ -3317,7 +3321,7 @@ { FUNCSTART("int32 Read::getUpperNonGapPosOfReadPos(const uint32 position) const"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(position>=REA_padded_sequence.size(),getName() << ": position (" << position << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); while(position & Read::getActualSequence() const"); paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); FUNCEND(); return REA_padded_sequence; @@ -4708,7 +4712,7 @@ FUNCSTART("const vector & Read::getActualComplementSequence() const"); paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); FUNCEND(); return REA_padded_complementsequence; @@ -4730,7 +4734,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); if(REA_padded_sequence.empty()||getLeftClipoff()==REA_padded_sequence.size()) return &REA_zerostring; @@ -4754,7 +4758,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); if(REA_padded_sequence.empty()) return &REA_zerostring; @@ -4775,7 +4779,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); if(REA_padded_complementsequence.empty()) return &REA_zerostring; @@ -4794,7 +4798,7 @@ { paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); vector::const_iterator cI=REA_padded_sequence.begin(); result.resize(getLenSeq()); @@ -4823,7 +4827,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); if(REA_padded_complementsequence.empty()) return &REA_zerostring; @@ -4851,8 +4855,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - // const_cast(this)->refreshPaddedSequence(); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); vector::const_iterator I=REA_padded_sequence.begin(); @@ -4886,8 +4889,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - // const_cast(this)->refreshPaddedSequence(); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); FUNCEND(); @@ -4900,8 +4902,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - // const_cast(this)->refreshPaddedSequence(); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); FUNCEND(); @@ -4924,8 +4925,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - //const_cast(this)->refreshPaddedComplementSequence(); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); FUNCEND(); @@ -4938,8 +4938,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - //const_cast(this)->refreshPaddedComplementSequence(); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); FUNCEND(); @@ -4962,8 +4961,7 @@ paranoiaBUGIF(checkRead()!=nullptr, MIRANOTIFY(Notify::FATAL, checkRead())); - //const_cast(this)->refreshPaddedComplementSequence(); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); vector::const_iterator I=REA_padded_complementsequence.begin(); @@ -4988,7 +4986,7 @@ { FUNCSTART("char Read::getBaseInSequence(uint32 pos)"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(pos >= REA_padded_sequence.size(), getName() << ": pos (" << pos << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); @@ -5001,7 +4999,7 @@ { FUNCSTART("char Read::getBaseInClippedSequence(uint32 pos)"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(pos >= REA_padded_sequence.size(), getName() << ": pos (" << pos << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); @@ -5014,7 +5012,7 @@ { FUNCSTART("char Read::getBaseInComplementSequence(int32 pos)"); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); FUNCEND(); @@ -5025,7 +5023,7 @@ { FUNCSTART("char Read::getQualityInSequence(int32 pos)"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(pos >= REA_qualities.size(), getName() << ": pos (" << pos << ") >= REA_qualities.size (" << REA_qualities.size() << ") ?"); @@ -5038,7 +5036,7 @@ { FUNCSTART("char Read::getQualityInComplementSequence(int32 pos)"); - const_cast(this)->refreshPaddedComplementSequence(); + refreshPaddedComplementSequence(); BUGIFTHROW(pos >= static_cast(REA_qualities.size()), getName() << ": pos (" << pos << ") >= REA_qualities.size (" << REA_qualities.size() << ") ?"); @@ -5080,7 +5078,7 @@ { FUNCSTART("uint32 Read::getLowerBoundPosOfBaseRun(uint32 pos, char base, const bool alsotakegap) const"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(pos >= REA_padded_sequence.size(), getName() << ": pos (" << pos << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); @@ -5110,7 +5108,7 @@ { FUNCSTART("uint32 Read::getUpperBoundPosOfBaseRun(uint32 pos, char base, const bool alsotakegap) const"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(pos >= REA_padded_sequence.size(), getName() << ": pos (" << pos << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); @@ -5140,7 +5138,7 @@ { FUNCSTART("uint32 Read::getLenOfGapRun(uint32 pos) const"); - const_cast(this)->refreshPaddedSequence(); + refreshPaddedSequence(); BUGIFTHROW(pos >= REA_padded_sequence.size(), getName() << ": pos (" << pos << ") >= REA_padded_sequence.size (" << REA_padded_sequence.size() << ") ?"); @@ -6204,7 +6202,7 @@ } vector::const_iterator RF2=F1; avgquald=static_cast(qualtotal)/winlen_2d; - while(RF1 >= F2 && avgquald < minqualm5d){ + while(RF1!=REA_qualities.begin() && RF1 >= F2 && avgquald < minqualm5d){ qualtotal+=*RF1; qualtotal-=*RF2; avgquald=static_cast(qualtotal)/winlend; @@ -6907,7 +6905,7 @@ * * *************************************************************************/ -void Read::loadDataFromEXP(const string & filename, const string & path) +void Read::loadDataFromEXP(string filename, string path) { FUNCSTART("void Read::loadDataFromEXP()"); @@ -6915,9 +6913,15 @@ EXP tmpexp; - string dummy(path+"/"+filename); + boost::trim(path); + boost::trim(filename); + string fullpath(path); + if(!fullpath.empty()){ + fullpath+="/"; + } + fullpath+=filename; - tmpexp.load(dummy.c_str()); + tmpexp.load(fullpath.c_str()); // ok, get the name and SCFname from the exp file { @@ -7145,8 +7149,13 @@ int32 Read::getDigiNormMultiplier() const { + FUNCSTART("int32 Read::getDigiNormMultiplier() const"); + + static string notestr("Note"); + int32 retvalue=1; + string dnrstr; for(auto & te : REA_tags){ // Note: must also check whether DGNr tag covers the complete current sequence // because sometimes reads get cut back in parts (e.g. those covered by DGNr) @@ -7155,9 +7164,16 @@ && !te.getCommentStr().empty() && getLeftClipoff() >= te.from && getRightClipoff()-1 <= te.to){ - retvalue=atoi(te.getCommentStr().c_str()); + if(te.commentisgff3){ + retvalue=atoi(GFFParse::extractKeytag(notestr,te.getCommentStr()).c_str()); + }else{ + retvalue=atoi(te.getCommentStr().c_str()); + } + break; } } + BUGIFTHROW(retvalue==0,getName() << ": Found diginorm multiplier of 0?"); + return retvalue; } diff -Nru mira-3.9.18/src/mira/read.H mira-4.0/src/mira/read.H --- mira-3.9.18/src/mira/read.H 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/read.H 2014-02-02 12:05:18.000000000 +0000 @@ -28,11 +28,6 @@ #define _mira_read_h_ -#include - -#include -#include - #include #include "stdinc/defines.H" @@ -60,8 +55,9 @@ BHSBITS_SEENATLOWPOS=8, BHSBITS_CONFIRMED_FWDREV=0x10, BHSBITS_CONFIRMED_MULTIPLESEQTYPE=0x20, - BHSBITS_BITSAREVALID=0x40, - BHSBITS_ALL=0x7f}; + BHSBITS_KMERFORK=0x40, + BHSBITS_BITSAREVALID=0x80, + BHSBITS_ALL=0xff}; /* the three bits for frequency above are used like this: 0 no info @@ -124,6 +120,12 @@ inline bool hasConfirmedMultipleSeqType() const { return flags&Read::BHSBITS_CONFIRMED_MULTIPLESEQTYPE; } + inline void setKMerFork() { + flags=flags|Read::BHSBITS_KMERFORK; + } + inline bool isKMerFork() const { + return flags&Read::BHSBITS_KMERFORK; + } friend std::ostream & operator<<(std::ostream &ostr, const bhashstat_t & bhs){ //ostr << hex << static_cast(bhs.flags) << dec << ' '; @@ -135,6 +137,7 @@ if(bhs.hasSeenAtLowPos()) ostr << "slp "; if(bhs.hasConfirmedFwdRev()) ostr << "fr "; if(bhs.hasConfirmedMultipleSeqType()) ostr << "mst "; + if(bhs.isKMerFork()) ostr << "kmrf "; ostr << '#' << static_cast(bhs.getFrequency()) << ' '; return ostr; @@ -193,6 +196,14 @@ if(direction>0) return fwd.hasConfirmedMultipleSeqType(); return rev.hasConfirmedMultipleSeqType(); } + inline void setKMerFork(int8 direction) { + if(direction>0) fwd.setKMerFork(); + rev.setKMerFork(); + } + inline bool isKMerFork(int8 direction) const { + if(direction>0) return fwd.isKMerFork(); + return rev.isKMerFork(); + } friend std::ostream & operator<<(std::ostream &ostr, const bposhashstat_t & bhs){ ostr << "f: " << bhs.fwd << ' '; @@ -248,6 +259,8 @@ static const multitag_t::mte_id_t REA_tagentry_idHAF6; static const multitag_t::mte_id_t REA_tagentry_idHAF7; + static const multitag_t::mte_id_t REA_tagentry_idKMRF; + static const multitag_t::mte_id_t REA_tagentry_idDGNr; static const multitag_t::mte_id_t REA_tagentry_idMFSM; @@ -264,7 +277,7 @@ static const multitag_t::mte_id_t REA_tagentry_idSOFACDS; static const multitag_t::mte_id_t REA_tagentry_idSOFAexon; static const multitag_t::mte_id_t REA_tagentry_idSOFAintron; - static const multitag_t::mte_id_t REA_tagentry_idSOFApolyA_signal_sequence; + static const multitag_t::mte_id_t REA_tagentry_idSOFApolyA_sequence; static const multitag_t::mte_id_t REA_tagentry_idSOFAmRNA; static const multitag_t::mte_id_t REA_tagentry_idSOFAtranscript; @@ -303,7 +316,7 @@ static const multitag_t REA_defaulttag_ED_D; static const multitag_t REA_defaulttag_ED_I; - static const multitag_t REA_defaulttag_SOFApolyA_signal_sequence; + static const multitag_t REA_defaulttag_SOFApolyA_sequence; private: @@ -419,6 +432,8 @@ bool REA_has_freqavg:1; bool REA_has_freqrept:1; + bool REA_has_kmerfork:1; + // has the SCF been found and do the data seem valid? bool REA_scf_available:1; bool REA_scf_loadattempted:1; @@ -474,8 +489,10 @@ inline void updateClipoffs() const {}; void updateTagBaseInserted(uint32 position); void updateTagBaseDeleted(uint32 position); - void refreshPaddedSequence() const; - void refreshPaddedComplementSequence() const; + inline void refreshPaddedSequence() const {if(REA_ps_dirty) helper_refreshPaddedSequence();} + inline void refreshPaddedComplementSequence() const {if(REA_pcs_dirty) helper_refreshPaddedComplementSequence();} + void helper_refreshPaddedSequence() const; + void helper_refreshPaddedComplementSequence() const; const char * processEXPTag(const char * ptr); void getInternalTemplateName_Sanger(std::string & tname, uint8 & segment); @@ -678,6 +695,9 @@ inline void setHasFreqRept(bool b) { REA_has_freqrept=b;} inline bool hasFreqRept() const {return REA_has_freqrept;} + inline void setHasKMerFork(bool b) { REA_has_kmerfork=b;} + inline bool hasKMerFork() const {return REA_has_kmerfork;} + void setTags(const std::vector & tags); void addTagO(const multitag_t & tag); // TODO: rename back to addTag() const multitag_t & getTag(uint32 tagnumber) const; @@ -722,7 +742,7 @@ void getSCFFullPathName(std::string & path) const; void getEXPFullPathName(std::string & path) const; - void loadDataFromEXP(const std::string & filename, const std::string & path); + void loadDataFromEXP(std::string filename, std::string path); void loadDataFromSCF(const std::string & scfname); void checkSCFAndLoadQual(bool justcheck, bool loadfailnoerror=false); @@ -760,6 +780,7 @@ inline int32 getInsizeTo() const {return REA_rgid.getInsizeTo();}; inline bool hasTemplateInfo() const {return REA_rgid.hasTemplateInfo();}; + inline bool wantTemplateInfoEstimate() const {return REA_rgid.wantTemplateInfoEstimate();}; inline bool hasUserDefaultQuality() const {return REA_rgid.hasUserDefaultQual();}; inline int32 getTemplatePartnerID() const {return REA_templatepartnerid;}; @@ -801,7 +822,7 @@ inline int32 getLeftClipoff() const { return std::max(REA_ql, REA_sl);} inline int32 getRightClipoff() const { return std::min(REA_qr, REA_sr);} inline uint32 getLenClippedSeq() const { - if(getLeftClipoff()>getRightClipoff()) return 0; + if(unlikely(getLeftClipoff()>getRightClipoff())) return 0; return getRightClipoff()-getLeftClipoff(); }; @@ -866,12 +887,12 @@ base_quality_t queryAverageQualInClippedSequence(int32 posl, int32 posr, bool skipNs, bool skipStars) const; base_quality_t queryAverageQualInClippedComplementSequence(int32 posl, int32 posr, bool skipNs, bool skipStars) const; + // inlining these makes things slower int32 calcComplPos(int32 pos) const; int32 calcClippedPos2RawPos(int32 pos) const; - int32 calcRawPos2ClippedPos(int32 pos) const; - int32 calcClippedComplPos2RawPos(int32 pos) const; + // inline static double qualityToErrorRate(base_quality_t qual) { if(qual>100) qual=100; diff -Nru mira-3.9.18/src/mira/readgrouplib.C mira-4.0/src/mira/readgrouplib.C --- mira-3.9.18/src/mira/readgrouplib.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/readgrouplib.C 2014-02-02 12:05:18.000000000 +0000 @@ -518,6 +518,14 @@ +void ReadGroupLib::saveAllReadGroupsAsMAF(ostream & ostr) +{ + for(uint32 rgi=1; rgi -#include -#include +#include "mira/readpool.H" #include "errorhandling/errorhandling.H" -#include "util/fileanddisk.H" -#include "util/progressindic.H" #include "io/generalio.H" #include "io/fasta.H" @@ -42,10 +36,14 @@ #include "io/phd.H" #include "io/ncbiinfoxml.H" +#include "util/fileanddisk.H" +#include "util/progressindic.H" + +#include "caf/caf.H" + #include "mira/gbf_parse.H" #include "mira/gff_parse.H" #include "mira/maf_parse.H" -#include "caf/caf.H" #include #include @@ -252,7 +250,13 @@ int32 acttid=0; int32 validreads=0; - uint32 outlines=0; + uint32 outlines_fatal=0; + uint32 outlines_warn=0; + uint32 ol_emptytn=0; + uint32 ol_gt2reads=0; + uint32 ol_unknownsegment=0; + uint32 ol_unknownsegmentfixed=0; + uint32 ol_samesegment=0; for(uint32 rid=0; ridsecond]==2){ getRead(rid).setTemplatePartnerID(firstpartner); getRead(firstpartner).setTemplatePartnerID(rid); + + // look out for unknown segments ("0"), try to fix if possible, else dump error message + uint8 numunknownseg=(getRead(rid).getTemplateSegment()==0)+(getRead(firstpartner).getTemplateSegment()==0); + if(numunknownseg){ + bool couldfix=false; + if(numunknownseg==1){ + Read * tofix=&getRead(rid); + Read * other=&getRead(firstpartner); + uint8 segmenttoset=0; + if(tofix->getTemplateSegment()>0) swap(tofix,other); + if(other->getTemplateSegment()==1){ + segmenttoset=255; + }else if(other->getTemplateSegment()==255){ + segmenttoset=1; + } + if(segmenttoset){ + couldfix=true; + tofix->setTemplateSegment(segmenttoset); + ol_unknownsegmentfixed++; + if(ol_unknownsegmentfixed<200){ + cout << "Read " << tofix->getName() << ": fixed unrecognised template segment.\n"; + } + if(++ol_unknownsegmentfixed==200){ + cout << "More than 200 cases like the above, will not report more.\n"; + } + } + } + if(!couldfix){ + if(ol_unknownsegment<200){ + ++outlines_fatal; + if(getRead(rid).getTemplateSegment()==0){ + cout << "DNA template " << tnI->first << ", read " << getRead(rid).getName() << ": template segment not recognised.\n"; + } + if(getRead(firstpartner).getTemplateSegment()==0){ + cout << "DNA template " << tnI->first << ", read " << getRead(firstpartner).getName() << ": template segment not recognised.\n"; + } + if(++ol_unknownsegment==200){ + cout << "More than 200 cases like the above, will not report more.\n"; + } + } + } + } + + // the folowing is almost impossible when reading FASTA/FASTQ and other simple files, + // but it may happen in CAF/MAF (and maybe SAM?) + if(getRead(rid).getTemplateSegment()==getRead(firstpartner).getTemplateSegment()){ + if(ol_samesegment<200){ + ++outlines_fatal; + cout << "Reads " << getRead(rid).getName() << " and " << getRead(firstpartner).getName() << " have the same template segments.\n"; + if(++ol_samesegment==200){ + cout << "More than 200 cases like the above, will not report more.\n"; + } + } + } + }else{ - // Ooooops ... not good: more than one read for this template + // Ooooops ... not good: more than two reads for this template getRead(rid).setTemplatePartnerID(-1); getRead(firstpartner).setTemplatePartnerID(-1); - if(outlines<200){ + if(ol_gt2reads<200){ + ++outlines_fatal; cout << tidcounter[tnI->second] << " "; cout << "DNA template " << tnI->first << " has more than two reads, template info not used. Read at fault: " << getRead(rid).getName() << endl; - if(++outlines==200){ + if(++ol_gt2reads==200){ cout << "More than 200 cases like the above, will not report more.\n"; } } @@ -302,8 +363,13 @@ } } - if(outlines>0 && (*REP_miraparams)[0].getNagAndWarnParams().nw_stop_templateproblems){ - MIRANOTIFY(Notify::FATAL,"Problems found with the template data, see output log for more info. This points some serious problem either with read naming (like unrecognised read naming scheme) or broken template information, please fix your input files!\nOr switch off this warning with -NW:sote=no (but you'll do this at own risk!)") + if(outlines_fatal>0 && (*REP_miraparams)[0].getNagAndWarnParams().nw_check_templateproblems){ + static string emsg="Problems found with the template data, see output log for more info. This points some serious problem either with read naming (like unrecognised read naming scheme) or broken template information, please fix your input files!\nOr switch off this warning with -NW:ctp=no (but you'll do this at own risk!)"; + if((*REP_miraparams)[0].getNagAndWarnParams().nw_check_templateproblems==NWSTOP) { + MIRANOTIFY(Notify::FATAL,emsg); + }else{ + cout << "WARNING!\n" << emsg << endl; + } } if(verbose){ @@ -315,6 +381,24 @@ } +/************************************************************************* + * + * + * + *************************************************************************/ + +void ReadPool::checkTemplateIDs(const string & errmsg) +{ + FUNCSTART("void ReadPool::checkTemplateIDs(string & errmsg)"); + for(uint32 ri=0;ri< REP_thepool3.size(); ++ri){ + if(REP_thepool3.getRead(ri).getTemplatePartnerID()>=0 + && REP_thepool3.getRead(ri).getTemplateID() != REP_thepool3.getRead(REP_thepool3.getRead(ri).getTemplatePartnerID()).getTemplateID()){ + cout << "Ouch, template problem for read " << ri << " " << REP_thepool3.getRead(ri).getName() << ", dumping readpool for debug\n"; + dumpAs(cout,Read::AS_TEXT,true); + BUGIFTHROW(true, errmsg); + } + } +} /************************************************************************* * @@ -349,11 +433,15 @@ } } - if(outlines>0 && (*REP_miraparams)[0].getNagAndWarnParams().nw_stop_duplicatereadnames){ - MIRANOTIFY(Notify::FATAL,"Some read names were found more than once (see log above). This usually hints to a serious problem with your input and should really, really be fixed. You can choose to ignore this error with '-NW:sodrn=no', but this will almost certainly lead to problems with result files (ACE and CAF for sure, maybe also SAM) and probably to other unexpected effects."); + if(outlines>0 && (*REP_miraparams)[0].getNagAndWarnParams().nw_check_duplicatereadnames){ + static string emsg="Some read names were found more than once (see log above). This usually hints to a serious problem with your input and should really, really be fixed. You can choose to ignore this error with '-NW:cdrn=no', but this will almost certainly lead to problems with result files (ACE and CAF for sure, maybe also SAM) and probably to other unexpected effects."; + if((*REP_miraparams)[0].getNagAndWarnParams().nw_check_duplicatereadnames==NWSTOP){ + MIRANOTIFY(Notify::FATAL,emsg); + }else{ + cout << "WARNING!\n" << emsg << endl; + } } - FUNCEND(); return allok; } @@ -383,14 +471,16 @@ loadDataFromFASTQ_rgid(filename1, fqqualoffset, rgid, countonly, callback); }else if(filetype=="fasta"){ loadDataFromFASTA_rgid(filename1, rgid, true, optfilename2, countonly, callback); - }else if(filetype=="fna" || filetype == "fastanoqual"){ // FASTA, but no qual. fna to be used by users, fastanoqual internally + }else if(filetype=="fna" || filetype == "fastanoqual" || filetype=="fa"){ // FASTA, but no qual. fna to be used by users, fastanoqual internally loadDataFromFASTA_rgid(filename1, rgid, false, "", countonly, callback); }else if(filetype=="gbf"){ loadDataFromGBF_rgid(filename1, rgid, countonly, callback); }else if(filetype=="gff3"){ loadDataFromGFF3_rgid(filename1, rgid, countonly, callback); }else if(filetype=="fofnexp"){ - loadDataFromEXPs_rgid(filename1, rgid, countonly, callback); + loadDataFromFOFNEXP_rgid(filename1, rgid, countonly, callback); + }else if(filetype=="exp"){ + loadDataFromEXP_rgid(filename1, rgid, countonly, callback); }else if(filetype=="caf"){ loadDataFromCAF_rgid(filename1, rgid, countonly, callback); }else if(filetype=="maf"){ @@ -420,9 +510,9 @@ * *************************************************************************/ -size_t ReadPool::loadDataFromEXPs_rgid(const string & fofn, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &)) +size_t ReadPool::loadDataFromFOFNEXP_rgid(const string & fofn, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &)) { - FUNCSTART("size_t ReadPool::loadEXPs(const string & fofn, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &))"); + FUNCSTART("size_t ReadPool::loadDataFromFOFNEXP(const string & fofn, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &))"); string justfilename, justpath; splitFullPathAndFileName(fofn,justpath,justfilename); @@ -536,6 +626,43 @@ * * * + * + *************************************************************************/ + +size_t ReadPool::loadDataFromEXP_rgid(const string & filename, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &)) +{ + FUNCSTART("size_t ReadPool::loadEXP(const string & filename, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &))"); + + uint32 no_files_ok=0; + try{ + Read & actread = getRead(provideEmptyRead()); + actread.setReadGroupID(rgid); + + actread.loadDataFromEXP(filename,""); + actread.transferSVTagsToClip(20,60); + + no_files_ok++; + + if(callback!=nullptr) { + (*callback)(*this); + } + } + catch(Flow){ + } + catch(Notify n){ + n.handleError(THISFUNC); + } + + FUNCEND(); + + return no_files_ok; +} + + +/************************************************************************* + * + * + * *************************************************************************/ size_t ReadPool::loadDataFromFASTQ_rgid(const string & filename, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &)) { @@ -1869,7 +1996,7 @@ /************************************************************************* * * like above, but using save() - * This is for convert_project + * This is for miraconvert * *************************************************************************/ void ReadPool::saveAsMAF(ostream & ostr, bool alsoinvalids) const diff -Nru mira-3.9.18/src/mira/readpool.H mira-4.0/src/mira/readpool.H --- mira-3.9.18/src/mira/readpool.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/readpool.H 2014-02-02 12:05:18.000000000 +0000 @@ -195,11 +195,16 @@ }; } - size_t loadDataFromEXPs_rgid(const std::string & fofn, + size_t loadDataFromFOFNEXP_rgid(const std::string & fofn, const ReadGroupLib::ReadGroupID rgid, bool countonly, void (*callback)(ReadPool &)); + size_t loadDataFromEXP_rgid(const std::string & fofn, + const ReadGroupLib::ReadGroupID rgid, + bool countonly, + void (*callback)(ReadPool &)); + size_t loadDataFromFASTQ_rgid(const std::string & filename, const ReadGroupLib::ReadGroupID rgid, bool countonly=false, @@ -299,6 +304,7 @@ bool makeTemplateIDs(bool verbose=true); + void checkTemplateIDs(const std::string & errmsg); void sortPoolToMIRAStandard(std::vector & sortorder) {REP_thepool3.sortContainerToMIRAStandard(sortorder);} void sortPoolToGivenOrder(const std::vector & sortorder) {REP_thepool3.sortContainerToGivenOrder(sortorder);} diff -Nru mira-3.9.18/src/mira/sam_collect.C mira-4.0/src/mira/sam_collect.C --- mira-3.9.18/src/mira/sam_collect.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/sam_collect.C 2014-02-02 12:05:18.000000000 +0000 @@ -453,7 +453,7 @@ && mafline.substr(0,10)==cpsHReadGroup ){ if(sawreadrg){ - errorMsgMAFFormat(mafname,linenumber,mafline,"found @Readgroup in MAF while other reads has already been defined. Cannot do that yet.\n\nUse 'convert_project -f maf -t maf ...' to create a MAF which can be converted to SAM."); + errorMsgMAFFormat(mafname,linenumber,mafline,"found @Readgroup in MAF while other reads have already been defined. Cannot do that yet.\n\nUse 'grep ^@ old.maf >new.maf; grep -v ^@ old.maf >>new.maf; ' to create a MAF which can be converted to SAM."); } vector dummy_externalidmapper; auto dummy_rgid=ReadGroupLib::newReadGroup(); diff -Nru mira-3.9.18/src/mira/skim.C mira-4.0/src/mira/skim.C --- mira-3.9.18/src/mira/skim.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/skim.C 2014-02-02 12:05:18.000000000 +0000 @@ -21,15 +21,11 @@ */ +#include "mira/skim.H" + #include #include -#include -#include - - -#include "mira/skim.H" - #include "errorhandling/errorhandling.H" #include "util/fileanddisk.H" @@ -185,8 +181,8 @@ // vector & rawhashhitcounter, vector & chuntleftcut, vector & chuntrightcut, - vector & overlapcritlevell, - vector & overlapcritlevelr, + vector> & overlapcritlevell, + vector> & overlapcritlevelr, uint32 numthreads, uint32 maxmemusage, bool onlyagainstrails, @@ -196,7 +192,8 @@ //int32 percentrequired, const vector & percentrequired, const vector & overlaplenrequired, - uint32 maxhitsperread) + uint32 maxhitsperread, + bool forcetakestronggood) { FUNCSTART("uint32 Skim::skimGo( ... )"); @@ -231,17 +228,22 @@ SKIM3_percentrequired=percentrequired; SKIM3_overlaplenrequired=overlaplenrequired; SKIM3_maxhitsperread=maxhitsperread; + SKIM3_forcetakestronggood=forcetakestronggood; - SKIM3_overlapcritlevell=&overlapcritlevell; - SKIM3_overlapcritlevelr=&overlapcritlevelr; + SKIM3_overlapcritlevelvl=&overlapcritlevell; + SKIM3_overlapcritlevelvr=&overlapcritlevelr; // TODO: check whether these can be re-used between assembly passes // would reduce skim files even a bit further in later passes // Question: can an overlap criterion level become worse through editing??? - SKIM3_overlapcritlevell->clear(); - SKIM3_overlapcritlevell->resize(SKIM3_readpool->size(),255); - SKIM3_overlapcritlevelr->clear(); - SKIM3_overlapcritlevelr->resize(SKIM3_readpool->size(),255); + SKIM3_overlapcritlevelvl->clear(); + SKIM3_overlapcritlevelvl->resize(2); + (*SKIM3_overlapcritlevelvl)[0].resize(SKIM3_readpool->size(),255); + (*SKIM3_overlapcritlevelvl)[1].resize(SKIM3_readpool->size(),255); + SKIM3_overlapcritlevelvr->clear(); + SKIM3_overlapcritlevelvr->resize(2); + (*SKIM3_overlapcritlevelvr)[0].resize(SKIM3_readpool->size(),255); + (*SKIM3_overlapcritlevelvr)[1].resize(SKIM3_readpool->size(),255); SKIM3_largestencasementscoretodate.clear(); SKIM3_largestencasementscoretodate.resize(SKIM3_readpool->size(),0); SKIM3_nomorehitseie.clear(); @@ -353,9 +355,19 @@ SKIM3_writtenhitsperid->resize(SKIM3_readpool->size(),0); { - vector perfectrailmatches(SKIM3_readpool->size(),0); - findPerfectRailMatchesInSkimFile(SKIM3_posfmatchfname,1,perfectrailmatches); - findPerfectRailMatchesInSkimFile(SKIM3_poscmatchfname,-1,perfectrailmatches); + vector perfectrailmatches; + bool hasrails=false; + for(uint32 ri=0; risize(); ++ri){ + if(SKIM3_readpool->getRead(ri).isRail()){ + hasrails=true; + break; + } + } + if(hasrails){ + perfectrailmatches.resize(SKIM3_readpool->size(),0); + findPerfectRailMatchesInSkimFile(SKIM3_posfmatchfname,1,perfectrailmatches); + findPerfectRailMatchesInSkimFile(SKIM3_poscmatchfname,-1,perfectrailmatches); + } purgeUnnecessaryHitsFromSkimFile(SKIM3_posfmatchfname,1,perfectrailmatches); purgeUnnecessaryHitsFromSkimFile(SKIM3_poscmatchfname,-1,perfectrailmatches); } @@ -406,16 +418,16 @@ { SKIM3_hasMNRr.clear(); SKIM3_hasSRMr.clear(); - SKIM3_hasFpAS.clear(); + SKIM3_hasFpas.clear(); SKIM3_hasMNRr.resize(SKIM3_readpool->size(),0); SKIM3_hasSRMr.resize(SKIM3_readpool->size(),0); - SKIM3_hasFpAS.resize(SKIM3_readpool->size(),0); + SKIM3_hasFpas.resize(SKIM3_readpool->size(),0); for(uint32 actreadid=0; actreadidsize(); actreadid++){ for(uint32 tn=0; tngetRead(actreadid).getNumOfTags(); tn++){ if(SKIM3_readpool->getRead(actreadid).getTag(tn).identifier==Read::REA_tagentry_idMNRr) SKIM3_hasMNRr[actreadid]=1; if(SKIM3_readpool->getRead(actreadid).getTag(tn).identifier==Read::REA_tagentry_idSRMr) SKIM3_hasSRMr[actreadid]=1; - if(SKIM3_readpool->getRead(actreadid).getTag(tn).identifier==Read::REA_tagentry_idSOFApolyA_signal_sequence) SKIM3_hasFpAS[actreadid]=1; + if(SKIM3_readpool->getRead(actreadid).getTag(tn).identifier==Read::REA_tagentry_idSOFApolyA_sequence) SKIM3_hasFpas[actreadid]=1; } } } @@ -904,13 +916,19 @@ (*SKIM3_readpool)[readI->rid1].getSequencingType(), adse,readI->percent_in_overlap, ocll,oclr); + uint32 ocvi=0; // overlap criterion vector index 0 is for norept overlaps + if(!readI->ol_norept) ocvi=1; // index 1 is for all other rept overlaps (among them the rept) + + auto & oclvl = (*SKIM3_overlapcritlevelvl)[ocvi]; + auto & oclvr = (*SKIM3_overlapcritlevelvr)[ocvi]; + CEBUG("OCL: " << readI->rid1 << " " << static_cast(ocll) << " " << static_cast(oclr) << endl); // if it's a rail, then the read has no saying in the decision whether this skim should be deleted // if not, look at overlap criterion level left and right if((*SKIM3_readpool)[readI->rid1].isRail() - || (ocll>(*SKIM3_overlapcritlevell)[readI->rid1] - && oclr>(*SKIM3_overlapcritlevelr)[readI->rid1])){ + || (ocll>oclvl[readI->rid1] + && oclr>oclvr[readI->rid1])){ del1=true; } // if it's a Solexa and the best overlapcritlevel is not 0, we are probably in a under-coverage @@ -925,12 +943,12 @@ // Therefore: we'll take all 100% matches for that read if(del1 && SKIM3_readpool->getRead(readI->rid1).isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA)){ if(ocll <= 29 - && (*SKIM3_overlapcritlevell)[readI->rid1]!= 0 - && (*SKIM3_overlapcritlevell)[readI->rid1] <= 29){ + && oclvl[readI->rid1]!= 0 + && oclvl[readI->rid1] <= 29){ del1=false; }else if(oclr <= 29 - && (*SKIM3_overlapcritlevelr)[readI->rid1]!= 0 - && (*SKIM3_overlapcritlevelr)[readI->rid1] <= 29){ + && oclvr[readI->rid1]!= 0 + && oclvr[readI->rid1] <= 29){ del1=false; } } @@ -943,8 +961,8 @@ // if it's a rail, then the read has no saying in the decision whether this skim should be deleted // if not, look at overlap criterion level left and right if((*SKIM3_readpool)[readI->rid2].isRail() - || (ocll>(*SKIM3_overlapcritlevell)[readI->rid2] - && oclr>(*SKIM3_overlapcritlevelr)[readI->rid2])){ + || (ocll>oclvl[readI->rid2] + && oclr>oclvr[readI->rid2])){ del2=true; } @@ -952,12 +970,12 @@ // situation ... try to account for that by being less harsh if(del2 && SKIM3_readpool->getRead(readI->rid2).isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA)){ if(ocll <= 29 - && (*SKIM3_overlapcritlevell)[readI->rid2]!= 0 - && (*SKIM3_overlapcritlevell)[readI->rid2] <= 29){ + && oclvl[readI->rid2]!= 0 + && oclvl[readI->rid2] <= 29){ del2=false; }else if(oclr <= 29 - && (*SKIM3_overlapcritlevelr)[readI->rid2]!= 0 - && (*SKIM3_overlapcritlevelr)[readI->rid2] <= 29){ + && oclvr[readI->rid2]!= 0 + && oclvr[readI->rid2] <= 29){ del2=false; } } @@ -968,59 +986,69 @@ // Solexa elitist tests // Solexa elitists (<=5 left/right) do not want to play with pariahs (both >+5 levels left/right) - if((*SKIM3_overlapcritlevell)[readI->rid1] <= 5 - && (*SKIM3_overlapcritlevelr)[readI->rid1] <= 5){ + if(oclvl[readI->rid1] <= 5 + && oclvr[readI->rid1] <= 5){ - if((*SKIM3_overlapcritlevell)[readI->rid2] > (*SKIM3_overlapcritlevell)[readI->rid1]+5 - && (*SKIM3_overlapcritlevelr)[readI->rid2] > (*SKIM3_overlapcritlevelr)[readI->rid1]+5){ + if(oclvl[readI->rid2] > oclvl[readI->rid1]+5 + && oclvr[readI->rid2] > oclvr[readI->rid1]+5){ del3=true; } - }else if((*SKIM3_overlapcritlevell)[readI->rid2] <= 5 - && (*SKIM3_overlapcritlevelr)[readI->rid2] <= 5){ + }else if(oclvl[readI->rid2] <= 5 + && oclvr[readI->rid2] <= 5){ - if((*SKIM3_overlapcritlevell)[readI->rid1] > (*SKIM3_overlapcritlevell)[readI->rid2]+5 - && (*SKIM3_overlapcritlevelr)[readI->rid1] > (*SKIM3_overlapcritlevelr)[readI->rid2]+5){ + if(oclvl[readI->rid1] > oclvl[readI->rid2]+5 + && oclvr[readI->rid1] > oclvr[readI->rid2]+5){ del3=true; } } // Solexa enough is enough tests - bool sdel1=false; - bool sdel2=false; - const uint8 ocritthresh=3; - if(hitstats[readI->rid1] >= 350){ - SKIM3_nomorehitseie[readI->rid1]=1; - sdel1=true; - }else if(hitstats[readI->rid1] >= 50 - && (*SKIM3_overlapcritlevell)[readI->rid1]<=ocritthresh - && (*SKIM3_overlapcritlevelr)[readI->rid1]<=ocritthresh - ){ - SKIM3_nomorehitseie[readI->rid1]=1; - sdel1=true; - }else if(hitstats[readI->rid1] >= 100 - && ((*SKIM3_overlapcritlevell)[readI->rid1]<=ocritthresh - || (*SKIM3_overlapcritlevelr)[readI->rid1]<=ocritthresh)){ - SKIM3_nomorehitseie[readI->rid1]=1; - sdel1=true; - } + // but only if there is no strong good overlap - if(hitstats[readI->rid2] >= 350){ - SKIM3_nomorehitseie[readI->rid2]=1; - sdel2=true; - }else if(hitstats[readI->rid2] >= 50 - && (*SKIM3_overlapcritlevell)[readI->rid2]<=ocritthresh - && (*SKIM3_overlapcritlevelr)[readI->rid2]<=ocritthresh - ){ - SKIM3_nomorehitseie[readI->rid2]=1; - sdel2=true; - } else if(hitstats[readI->rid2] >= 100 - && ((*SKIM3_overlapcritlevell)[readI->rid2]<=ocritthresh - || (*SKIM3_overlapcritlevelr)[readI->rid2]<=ocritthresh)){ - SKIM3_nomorehitseie[readI->rid2]=1; - sdel2=true; - } + //bang here: take presence of HAF5-7 / MNRr into account. How? + + if(readI->ol_stronggood && SKIM3_forcetakestronggood){ + // forced take of strong good overlaps regardless of enough-is-enough + // to ensure sg hits in highly repetitive reads get taken (should be on for de-novo genome only) + // TODO: do we need to do something or is this branch really empty? Think about it. + }else{ + bool sdel1=false; + bool sdel2=false; + const uint8 ocritthresh=3; + if(hitstats[readI->rid1] >= 350){ + SKIM3_nomorehitseie[readI->rid1]=1; + sdel1=true; + }else if(hitstats[readI->rid1] >= 50 + && oclvl[readI->rid1]<=ocritthresh + && oclvr[readI->rid1]<=ocritthresh + ){ + SKIM3_nomorehitseie[readI->rid1]=1; + sdel1=true; + }else if(hitstats[readI->rid1] >= 100 + && (oclvl[readI->rid1]<=ocritthresh + || oclvr[readI->rid1]<=ocritthresh)){ + SKIM3_nomorehitseie[readI->rid1]=1; + sdel1=true; + } + + if(hitstats[readI->rid2] >= 350){ + SKIM3_nomorehitseie[readI->rid2]=1; + sdel2=true; + }else if(hitstats[readI->rid2] >= 50 + && oclvl[readI->rid2]<=ocritthresh + && oclvr[readI->rid2]<=ocritthresh + ){ + SKIM3_nomorehitseie[readI->rid2]=1; + sdel2=true; + } else if(hitstats[readI->rid2] >= 100 + && (oclvl[readI->rid2]<=ocritthresh + || oclvr[readI->rid2]<=ocritthresh)){ + SKIM3_nomorehitseie[readI->rid2]=1; + sdel2=true; + } - if(sdel1&&sdel2) del4=true; + if(sdel1&&sdel2) del4=true; + } } } @@ -1053,8 +1081,8 @@ } ++writeI; CEBUG("DEL: " << del1 << " " << del2 << " " << del3 << " " << del4 << " " << del5 << endl); - CEBUG(readI->rid1 << ": " << static_cast((*SKIM3_overlapcritlevell)[readI->rid1]) << " " << static_cast((*SKIM3_overlapcritlevelr)[readI->rid1]) - << "\t\t" << readI->rid2 << ": " << static_cast((*SKIM3_overlapcritlevell)[readI->rid2]) << " " << static_cast((*SKIM3_overlapcritlevelr)[readI->rid2]) << endl); + //CEBUG(readI->rid1 << ": " << static_cast(oclvl[readI->rid1]) << " " << static_cast(oclvr[readI->rid1]) + // << "\t\t" << readI->rid2 << ": " << static_cast(oclvl[readI->rid2]) << " " << static_cast(oclvr[readI->rid2]) << endl); if((del1 && del2) || del3 || del4 || del5){ //if(0){ @@ -1062,11 +1090,15 @@ CEBUG("Purged: " << *readI); if(SKIM3_logflag_purgeunnecessaryhits){ logfout << "Purged:\t" << SKIM3_readpool->getRead(readI->rid1).getName() - << " (" << static_cast((*SKIM3_overlapcritlevell)[readI->rid1]) - << "," << static_cast((*SKIM3_overlapcritlevelr)[readI->rid1]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[0][readI->rid1]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[0][readI->rid1]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[1][readI->rid1]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[1][readI->rid1]) << ")" << '\t' << SKIM3_readpool->getRead(readI->rid2).getName() - << " (" << static_cast((*SKIM3_overlapcritlevell)[readI->rid2]) - << "," << static_cast((*SKIM3_overlapcritlevelr)[readI->rid2]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[0][readI->rid2]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[0][readI->rid2]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[1][readI->rid2]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[1][readI->rid2]) << ")" << "\t(" << static_cast(ocll) << "," << static_cast(oclr) << ")" << '\t' << *readI; @@ -1076,11 +1108,15 @@ CEBUG("Kept: " << *readI); if(SKIM3_logflag_purgeunnecessaryhits){ logfout << "Kept:\t" << SKIM3_readpool->getRead(readI->rid1).getName() - << " (" << static_cast((*SKIM3_overlapcritlevell)[readI->rid1]) - << "," << static_cast((*SKIM3_overlapcritlevelr)[readI->rid1]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[0][readI->rid1]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[0][readI->rid1]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[1][readI->rid1]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[1][readI->rid1]) << ")" << '\t' << SKIM3_readpool->getRead(readI->rid2).getName() - << " (" << static_cast((*SKIM3_overlapcritlevell)[readI->rid2]) - << "," << static_cast((*SKIM3_overlapcritlevelr)[readI->rid2]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[0][readI->rid2]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[0][readI->rid2]) << ")" + << " (" << static_cast((*SKIM3_overlapcritlevelvl)[1][readI->rid2]) + << "," << static_cast((*SKIM3_overlapcritlevelvr)[1][readI->rid2]) << ")" << "\t(" << static_cast(ocll) << "," << static_cast(oclr) << ")" << '\t' << *readI; @@ -1123,8 +1159,10 @@ for(uint32 ri=0; rigetRead(ri).getName() << "\t" << hitstats[ri] << "\t" - << static_cast((*SKIM3_overlapcritlevell)[ri]) << "\t" - << static_cast((*SKIM3_overlapcritlevelr)[ri]) << "\t"; + << static_cast((*SKIM3_overlapcritlevelvl)[0][ri]) << "\t" + << static_cast((*SKIM3_overlapcritlevelvr)[0][ri]) << "\t" + << static_cast((*SKIM3_overlapcritlevelvl)[1][ri]) << "\t" + << static_cast((*SKIM3_overlapcritlevelvr)[1][ri]) << "\t"; if(SKIM3_nomorehitseie[ri]) logcount << "enough"; logcount << '\n'; @@ -1217,7 +1255,11 @@ BUGIFTHROW(basesperhash>32, "basesperhash > 32 ?"); BUGIFTHROW(hashsavestepping<1, "hashsavestepping < 1 ?"); if(slen>SKIM3_MAXREADSIZEALLOWED){ - MIRANOTIFY(Notify::FATAL,"Read " << actread.getName() << " is " << slen << " bp long and thus longer than SKIM3_MAXREADSIZEALLOWED (" << SKIM3_MAXREADSIZEALLOWED << ") bases. Skim cannot handle than, sorry."); + MIRANOTIFY(Notify::FATAL,"Read " << actread.getName() << " is " << slen << " bp long and thus longer than SKIM3_MAXREADSIZEALLOWED (" << SKIM3_MAXREADSIZEALLOWED << ") bases. Skim cannot handle that, sorry."); + } + + if(!tagmaskvector.empty()){ + BUGIFTHROW(tagmaskvector.size()!=slen,"tagmaskvector.size() " << tagmaskvector.size() << " != slen " << slen); } // Read::setCoutType(Read::AS_TEXT); @@ -1325,9 +1367,14 @@ if(nonmaskedposbitvector) lastposhadunmasked=true; nonmaskedposbitvector<<=1; nonmaskedposbitvector&=nmpmask; - if(tmvI==tagmaskvector.end() || *tmvI==0){ - if(tmvI!=tagmaskvector.end()) ++tmvI; + + if(tagmaskvector.empty()){ nonmaskedposbitvector|=1; + }else{ + if(*tmvI==0){ + nonmaskedposbitvector|=1; + } + ++tmvI; } // using "continue" is now allowed (if needed) @@ -1535,14 +1582,21 @@ SKIM3_cfhd_vector[ti].shfsv.reserve(100000); SKIM3_cfhd_vector[ti].ridswithmatches.clear(); SKIM3_cfhd_vector[ti].ridswithmatches.reserve(10000); - SKIM3_cfhd_vector[ti].uidswithnewcritlevell.clear(); - SKIM3_cfhd_vector[ti].uidswithnewcritlevell.reserve(10000); - SKIM3_cfhd_vector[ti].uidswithnewcritlevelr.clear(); - SKIM3_cfhd_vector[ti].uidswithnewcritlevelr.reserve(10000); - SKIM3_cfhd_vector[ti].critlevellofnewuids.clear(); - SKIM3_cfhd_vector[ti].critlevellofnewuids.reserve(10000); - SKIM3_cfhd_vector[ti].critlevelrofnewuids.clear(); - SKIM3_cfhd_vector[ti].critlevelrofnewuids.reserve(10000); + + SKIM3_cfhd_vector[ti].uidswithnewcritlevelvl.clear(); + SKIM3_cfhd_vector[ti].uidswithnewcritlevelvl.resize(2); + SKIM3_cfhd_vector[ti].uidswithnewcritlevelvr.clear(); + SKIM3_cfhd_vector[ti].uidswithnewcritlevelvr.resize(2); + SKIM3_cfhd_vector[ti].critlevellofnewuidsv.clear(); + SKIM3_cfhd_vector[ti].critlevellofnewuidsv.resize(2); + SKIM3_cfhd_vector[ti].critlevelrofnewuidsv.clear(); + SKIM3_cfhd_vector[ti].critlevelrofnewuidsv.resize(2); + for(uint32 ocvi=0; ocvi<2; ++ocvi){ + SKIM3_cfhd_vector[ti].uidswithnewcritlevelvl[ocvi].reserve(10000); + SKIM3_cfhd_vector[ti].uidswithnewcritlevelvr[ocvi].reserve(10000); + SKIM3_cfhd_vector[ti].critlevellofnewuidsv[ocvi].reserve(10000); + SKIM3_cfhd_vector[ti].critlevelrofnewuidsv[ocvi].reserve(10000); + } } FUNCEND(); } @@ -1654,11 +1708,12 @@ cfhd.tagmaskvector.clear();; // do NOT clear vector shfsv !!! cfhd.ridswithmatches.clear(); - cfhd.uidswithnewcritlevell.clear(); - cfhd.uidswithnewcritlevelr.clear(); - cfhd.critlevellofnewuids.clear(); - cfhd.critlevelrofnewuids.clear(); - + for(uint32 ocvi=0; ocvi<2; ++ocvi){ + cfhd.uidswithnewcritlevelvl[ocvi].clear(); + cfhd.uidswithnewcritlevelvr[ocvi].clear(); + cfhd.critlevellofnewuidsv[ocvi].clear(); + cfhd.critlevelrofnewuidsv[ocvi].clear(); + } for(uint32 actreadid=fromid; actreadid100) return; @@ -1869,7 +1924,7 @@ bool takenrailfulllength=false; - CEBUG("actreadid critlevel: " << static_cast((*SKIM3_overlapcritlevell)[actreadid]) << " " << static_cast((*SKIM3_overlapcritlevelr)[actreadid]) << '\n'); + CEBUG("actreadid critlevel: " << static_cast((*SKIM3_overlapcritlevell)[actreadid]) << " " << static_cast(oclvr[actreadid]) << '\n'); // take all which have the same or lower level (if it is not 255) @@ -1895,28 +1950,34 @@ oclr); CEBUG("ocll: " << static_cast(ocll) << " " << static_cast(oclr) << '\n'); + uint32 ocvi=0; // overlap criterion vector index 0 is for norept overlaps + if(!tmwI->ol_norept) ocvi=1; // index 1 is for all other rept overlaps (among them the rept) + + auto & oclvl = (*SKIM3_overlapcritlevelvl)[ocvi]; + auto & oclvr = (*SKIM3_overlapcritlevelvr)[ocvi]; + bool regulartake=false; - if((ocll!=255 && ocll<=(*SKIM3_overlapcritlevell)[actreadid]) - || (oclr!=255 && oclr<=(*SKIM3_overlapcritlevelr)[actreadid])){ + if((ocll!=255 && ocll<=oclvl[actreadid]) + || (oclr!=255 && oclr<=oclvr[actreadid])){ regulartake=true; }else if(SKIM3_readpool->getRead(actreadid).isSequencingType(ReadGroupLib::SEQTYPE_SOLEXA)){ // if it's a Solexa and the best overlapcritlevel is not 0, we are probably in a under-coverage // situation ... try to account for that by being less harsh // see purgeUnnecessaryHitsFromSkimFile() for the value "29" if(ocll <= 29 - && (*SKIM3_overlapcritlevell)[actreadid]!= 0 - && (*SKIM3_overlapcritlevell)[actreadid] <= 29){ + && oclvl[actreadid]!= 0 + && oclvl[actreadid] <= 29){ regulartake=true; }else if(oclr <= 29 - && (*SKIM3_overlapcritlevelr)[actreadid]!= 0 - && (*SKIM3_overlapcritlevelr)[actreadid] <= 29){ + && oclvr[actreadid]!= 0 + && oclvr[actreadid] <= 29){ regulartake=true; } } if(regulartake){ - CEBUG("actreadid critlevel: " << static_cast((*SKIM3_overlapcritlevell)[actreadid]) << " " << static_cast((*SKIM3_overlapcritlevelr)[actreadid]) << '\n'); + CEBUG("actreadid critlevel: " << static_cast(oclvl[actreadid]) << " " << static_cast(oclvr[actreadid]) << '\n'); tmwI->taken=true; if(numleftext>0 && adse.getEstimatedLeftExpand(actreadid)>0) --numleftext; if(numrightext>0 && adse.getEstimatedRightExpand(actreadid)>0) --numrightext; @@ -2076,15 +2137,17 @@ ADSEstimator adse; - cfhd.uidswithnewcritlevell.clear(); - cfhd.uidswithnewcritlevelr.clear(); - cfhd.critlevellofnewuids.clear(); - cfhd.critlevelrofnewuids.clear(); - - uint8 actreadcritlevell=255; - uint8 actreadcritlevelr=255; - uint8 newcll=255; - uint8 newclr=255; + for(uint32 ocvi=0; ocvi<2; ++ocvi){ + cfhd.uidswithnewcritlevelvl[ocvi].clear(); + cfhd.uidswithnewcritlevelvr[ocvi].clear(); + cfhd.critlevellofnewuidsv[ocvi].clear(); + cfhd.critlevelrofnewuidsv[ocvi].clear(); + } + + uint8 actreadcritlevell[2]={255,255}; + uint8 actreadcritlevelr[2]={255,255}; + uint8 tmpnewcll=255; + uint8 tmpnewclr=255; vector::iterator tmwI=cfhd.tmpmatchwith.begin(); for(;tmwI!=cfhd.tmpmatchwith.end(); tmwI++) { @@ -2114,66 +2177,73 @@ CEBUG("tmwI after: " << *tmwI << endl); - if(actreadcritlevell>0 || actreadcritlevelr>0){ - CEBUG("old: " << static_cast(actreadcritlevell) << " " << static_cast(actreadcritlevelr) << '\n'); + uint32 ocvi=0; // overlap criterion vector index 0 is for norept overlaps + if(!tmwI->ol_norept) ocvi=1; // index 1 is for all other rept overlaps (among them the rept) + + if(actreadcritlevell[ocvi]>0 || actreadcritlevelr[ocvi]>0){ + CEBUG("old: " << static_cast(actreadcritlevell[ocvi]) << " " << static_cast(actreadcritlevelr[ocvi]) << '\n'); getOverlapCriterionLevel(actreadid, SKIM3_readpool->getRead(actreadid).getSequencingType(), adse, static_cast(tmwI->percent_in_overlap), - newcll,newclr); - if(newcll(actreadcritlevell) << " " << static_cast(actreadcritlevelr) << '\n'); + tmpnewcll,tmpnewclr); + if(tmpnewcll(actreadcritlevell[ocvi]) << " " << static_cast(actreadcritlevelr[ocvi]) << '\n'); } // then for other id getOverlapCriterionLevel(tmwI->otherid,SKIM3_readpool->getRead(tmwI->otherid).getSequencingType(), adse, static_cast(tmwI->percent_in_overlap), - newcll,newclr); - if(newcll<(*SKIM3_overlapcritlevell)[tmwI->otherid]){ - cfhd.uidswithnewcritlevell.push_back(tmwI->otherid); - cfhd.critlevellofnewuids.push_back(newcll); - CEBUG("newcll: pushback " << cfhd.uidswithnewcritlevell.back() << "\t" << static_cast(cfhd.critlevellofnewuids.back()) << '\n'); - } - if(newclr<(*SKIM3_overlapcritlevelr)[tmwI->otherid]){ - cfhd.uidswithnewcritlevelr.push_back(tmwI->otherid); - cfhd.critlevelrofnewuids.push_back(newclr); - CEBUG("newclr: pushback " << cfhd.uidswithnewcritlevelr.back() << "\t" << static_cast(cfhd.critlevelrofnewuids.back()) << '\n'); + tmpnewcll,tmpnewclr); + if(tmpnewcll<(*SKIM3_overlapcritlevelvl)[ocvi][tmwI->otherid]){ + cfhd.uidswithnewcritlevelvl[ocvi].push_back(tmwI->otherid); + cfhd.critlevellofnewuidsv[ocvi].push_back(tmpnewcll); + CEBUG("tmpnewcll: pushback " << cfhd.uidswithnewcritlevelvl[ocvi].back() << "\t" << static_cast(cfhd.critlevellofnewuidsv[ocvi].back()) << '\n'); + } + if(tmpnewclr<(*SKIM3_overlapcritlevelvr)[ocvi][tmwI->otherid]){ + cfhd.uidswithnewcritlevelvr[ocvi].push_back(tmwI->otherid); + cfhd.critlevelrofnewuidsv[ocvi].push_back(tmpnewclr); + CEBUG("tmpnewclr: pushback " << cfhd.uidswithnewcritlevelvr[ocvi].back() << "\t" << static_cast(cfhd.critlevelrofnewuidsv[ocvi].back()) << '\n'); } } { boost::mutex::scoped_lock lock(SKIM3_critlevelwrite_mutex); - if(actreadcritlevell<(*SKIM3_overlapcritlevell)[actreadid]){ - CEBUG("ari: update critlevell " << actreadid << " " << static_cast((*SKIM3_overlapcritlevell)[actreadid])); - (*SKIM3_overlapcritlevell)[actreadid]=actreadcritlevell; - CEBUG(" to " << static_cast((*SKIM3_overlapcritlevell)[actreadid]) << '\n'); - } - if(actreadcritlevelr<(*SKIM3_overlapcritlevelr)[actreadid]){ - CEBUG("ari: update critlevelr " << actreadid << " " << static_cast((*SKIM3_overlapcritlevelr)[actreadid])); - (*SKIM3_overlapcritlevelr)[actreadid]=actreadcritlevelr; - CEBUG(" to " << static_cast((*SKIM3_overlapcritlevelr)[actreadid]) << '\n'); - } - - vector::const_iterator nI=cfhd.uidswithnewcritlevell.begin(); - vector::const_iterator cI=cfhd.critlevellofnewuids.begin(); - for(; nI != cfhd.uidswithnewcritlevell.end(); ++nI, ++cI){ - // still check ... might have changed in the mean time by another thread - if(*cI < (*SKIM3_overlapcritlevell)[*nI]){ - CEBUG("ori: update critlevell " << *nI << " " << static_cast((*SKIM3_overlapcritlevell)[*nI])); - (*SKIM3_overlapcritlevell)[*nI]=*cI; - CEBUG(" to " << static_cast((*SKIM3_overlapcritlevell)[*nI]) << '\n'); - } - } - nI=cfhd.uidswithnewcritlevelr.begin(); - cI=cfhd.critlevelrofnewuids.begin(); - for(; nI != cfhd.uidswithnewcritlevelr.end(); ++nI, ++cI){ - // still check ... might have changed in the mean time by another thread - if(*cI < (*SKIM3_overlapcritlevelr)[*nI]){ - CEBUG("ori: update critlevelr " << *nI << " " << static_cast((*SKIM3_overlapcritlevelr)[*nI])); - (*SKIM3_overlapcritlevelr)[*nI]=*cI; - CEBUG(" to " << static_cast((*SKIM3_overlapcritlevelr)[*nI]) << '\n'); + for(uint32 ocvi=0; ocvi<2; ++ocvi){ + if(actreadcritlevell[ocvi]<(*SKIM3_overlapcritlevelvl)[ocvi][actreadid]){ + CEBUG("ari: update critlevell " << actreadid << " " << static_cast((*SKIM3_overlapcritlevelvl)[ocvi][actreadid])); + (*SKIM3_overlapcritlevelvl)[ocvi][actreadid]=actreadcritlevell[ocvi]; + CEBUG(" to " << static_cast((*SKIM3_overlapcritlevelvl)[ocvi][actreadid]) << '\n'); + } + if(actreadcritlevelr[ocvi]<(*SKIM3_overlapcritlevelvr)[ocvi][actreadid]){ + CEBUG("ari: update critlevelr " << actreadid << " " << static_cast((*SKIM3_overlapcritlevelvr)[ocvi][actreadid])); + (*SKIM3_overlapcritlevelvr)[ocvi][actreadid]=actreadcritlevelr[ocvi]; + CEBUG(" to " << static_cast((*SKIM3_overlapcritlevelvr)[ocvi][actreadid]) << '\n'); + } + } + + for(uint32 ocvi=0; ocvi<2; ++ocvi){ + vector::const_iterator nI=cfhd.uidswithnewcritlevelvl[ocvi].begin(); + vector::const_iterator cI=cfhd.critlevellofnewuidsv[ocvi].begin(); + for(; nI != cfhd.uidswithnewcritlevelvl[ocvi].end(); ++nI, ++cI){ + // still check ... might have changed in the mean time by another thread + if(*cI < (*SKIM3_overlapcritlevelvl)[ocvi][*nI]){ + CEBUG("ori: update critlevell " << *nI << " " << static_cast((*SKIM3_overlapcritlevelvl)[ocvi][*nI])); + (*SKIM3_overlapcritlevelvl)[ocvi][*nI]=*cI; + CEBUG(" to " << static_cast((*SKIM3_overlapcritlevelvl)[ocvi][*nI]) << '\n'); + } + } + nI=cfhd.uidswithnewcritlevelvr[ocvi].begin(); + cI=cfhd.critlevelrofnewuidsv[ocvi].begin(); + for(; nI != cfhd.uidswithnewcritlevelvr[ocvi].end(); ++nI, ++cI){ + // still check ... might have changed in the mean time by another thread + if(*cI < (*SKIM3_overlapcritlevelvr)[ocvi][*nI]){ + CEBUG("ori: update critlevelr " << *nI << " " << static_cast((*SKIM3_overlapcritlevelvr)[ocvi][*nI])); + (*SKIM3_overlapcritlevelvr)[ocvi][*nI]=*cI; + CEBUG(" to " << static_cast((*SKIM3_overlapcritlevelvr)[ocvi][*nI]) << '\n'); + } } } @@ -2368,11 +2438,7 @@ continue; } // 3) both reads have the "enough-is-enough" status - if(actreadhasenough && SKIM3_nomorehitseie[rid2]!=0){ - for(;sI!=readhashmatches.end() && sI->rid2==rid2; ++sI); - if(sI!=readhashmatches.end()) countid=sI->rid2; - continue; - } + // nope, don't do that here! Do it when we know whether a strong match exists // 4) this read pair has been banned previously if((*SKIM3_bannedoverlaps).checkIfBanned(actreadid,rid2)){ @@ -2509,28 +2575,6 @@ oldhashpos=sI->hashpos1; } - // disregard this potential match if - // 1) both reads are rails - if((actreadisrail && SKIM3_readpool->getRead(rid2).isRail())){ - if(sI!=readhashmatches.end()) countid=sI->rid2; - continue; - } - // 2) we scan only against rails and both reads are non-rails - if((SKIM3_onlyagainstrails - && (!actreadisrail && !SKIM3_readpool->getRead(rid2).isRail()))){ - if(sI!=readhashmatches.end()) countid=sI->rid2; - continue; - } - // 3) this read pair has been banned previously - if((*SKIM3_bannedoverlaps).checkIfBanned(actreadid,rid2)){ - if(sI!=readhashmatches.end()) countid=sI->rid2; -// { -// boost::mutex::scoped_lock lock(SKIM3_globalclassdatamutex); -// SKIM3_totalpermbans++; -// } - continue; - } - int32 maxoverlap; // adjust min positions for the hash length @@ -2797,13 +2841,16 @@ if(maxcontiguousfreq32counter){ tmp.ol_belowavgfreq=(SKIM3_basesperhash+(maxcontiguousfreq32counter-1)*SKIM3_hashsavestepping) >= 26; } - tmp.ol_weakgood=false; if(maxcontiguousfreq3counter){ tmp.ol_weakgood=(SKIM3_basesperhash+(maxcontiguousfreq3counter-1)*SKIM3_hashsavestepping) >= 20; + tmp.ol_stronggood=(SKIM3_basesperhash+(maxcontiguousfreq3counter-1)*SKIM3_hashsavestepping) >= SKIM3_basesperhash*2-1; + }else{ + tmp.ol_weakgood=false; + tmp.ol_stronggood=false; } + //tmp.ol_stronggood=tmp.ol_weakgood & (maxcontiguousfreq3counter-1 >= SKIM3_basesperhash*2/SKIM3_hashsavestepping); - tmp.ol_stronggood=tmp.ol_weakgood & (totalfreq3counter > (SKIM3_basesperhash*2/SKIM3_hashsavestepping-1)); /* still too harsh sometimes @@ -2826,62 +2873,51 @@ } */ + /* Nope, too lenient // all contiguous HAF33 overlaps >= 30 are stronggood if(!tmp.ol_stronggood){ tmp.ol_stronggood=(SKIM3_basesperhash+(maxcontiguousfreq3counter-1)*SKIM3_hashsavestepping) >= 30; } + */ + // 3) save only if there's a strong overlap or if both reads are not enough-is-enough together + if(tmp.ol_stronggood || !(actreadhasenough && SKIM3_nomorehitseie[rid2]!=0)){ + tmp.ol_norept=flag_norept; + tmp.ol_rept=(totalfreq5counter > 0); - tmp.ol_norept=flag_norept; - tmp.ol_rept=(totalfreq5counter > 0); - - tmp.ol_fulllength=false; - tmp.ol_fullencased=false; - - // not 100% accurate, moved to updateCriterionLevels() - // - //if(hashesoverlap>=SKIM3_readpool->getRead(actreadid).getLenClippedSeq()-SKIM3_hashsavestepping - // || hashesoverlap>=SKIM3_readpool->getRead(rid2).getLenClippedSeq()-SKIM3_hashsavestepping){ - // tmp.ol_fulllength=true; - // - // if(perc == 100 - // && tmp.ol_norept){ - // int32 lendiff=abs(static_cast(SKIM3_readpool->getRead(actreadid).getLenClippedSeq()) - // -static_cast(SKIM3_readpool->getRead(tmp.otherid).getLenClippedSeq())); - // if(lendiff>=8){ - // tmp.ol_fullencased=true; - // } - // } - //} - - tmpmatchwith.push_back(tmp); - - if(tmp.ol_rept) {CEBUG("\nREPT!!!\n")}; - CEBUG("Pushing possible hit with offset: " << tmp.eoffset << endl - << rid2 - << "\t" << actreadid - << "\t" << SKIM3_readpool->getRead(rid2).getLenClippedSeq() - << "\t" << hp1min - << "\t" << hp1max - << "\t" << eoffsetmin - << "\t" << eoffsetmax - << "\t" << maxoverlap - << "\t" << hashesoverlap - << "\t" << numhashes - << "\t" << minoverlaprequired - << "\t" << perc << '%' - << "\t" << maxcontiguousfreq3counter - << "\t" << maxcontiguousfreq32counter - << "\t" << totalfreq3counter - << "\t" << totalfreq5counter - << "\n" << tmp.ol_stronggood << ' ' << tmp.ol_weakgood << ' ' << tmp.ol_belowavgfreq << ' ' << tmp.ol_norept << ' ' << tmp.ol_rept - << '\n'); + // calc of these two would not be 100% accurate here, moved to updateCriterionLevels() + tmp.ol_fulllength=false; + tmp.ol_fullencased=false; + + tmpmatchwith.push_back(tmp); + + if(tmp.ol_rept) {CEBUG("\nREPT!!!\n")}; + CEBUG("Pushing possible hit with offset: " << tmp.eoffset << endl + << rid2 + << "\t" << actreadid + << "\t" << SKIM3_readpool->getRead(rid2).getLenClippedSeq() + << "\t" << hp1min + << "\t" << hp1max + << "\t" << eoffsetmin + << "\t" << eoffsetmax + << "\t" << maxoverlap + << "\t" << hashesoverlap + << "\t" << numhashes + << "\t" << minoverlaprequired + << "\t" << perc << '%' + << "\t" << maxcontiguousfreq3counter + << "\t" << maxcontiguousfreq32counter + << "\t" << totalfreq3counter + << "\t" << totalfreq5counter + << "\n" << tmp.ol_stronggood << ' ' << tmp.ol_weakgood << ' ' << tmp.ol_belowavgfreq << ' ' << tmp.ol_norept << ' ' << tmp.ol_rept + << '\n'); //#define CEBUG(bla) - if(SKIM3_chimerahunt.size()){ - chimeraHuntStoreOverlapCoverage(direction, actreadid, rid2, - hp1min,hp1max,hp2min,hp2max); + if(SKIM3_chimerahunt.size()){ + chimeraHuntStoreOverlapCoverage(direction, actreadid, rid2, + hp1min,hp1max,hp2min,hp2max); + } } } } @@ -3065,7 +3101,12 @@ proposedright--; }; - // search for holes with 0s >= 2*SKIM3_hashsavestepping + // not only look at holes in the alignments, but also make sure they correlate to + // rare or unique kmers by looking at the hash statistics + auto & bposhashstats=SKIM3_readpool->getRead(actreadid).getBPosHashStats(); + uint32 bphsi=SKIM3_readpool->getRead(actreadid).getLeftClipoff(); + + // search for holes with 0s >= 2*basesperhash-2 int32 consecutivezeroes=0; int32 leftcut=0; int32 longestleftcut=0; @@ -3073,12 +3114,12 @@ int32 acti=0; bool foundcuts=false; - for(; acti=2*SKIM3_hashsavestepping){ + if(consecutivezeroes>=2*SKIM3_basesperhash-2){ foundcuts=true; CEBUG("Chimera candidate " << SKIM3_readpool->getRead(actreadid).getName() @@ -3093,7 +3134,7 @@ } } }else{ - if(hunt[acti]==0){ + if(hunt[acti]==0 && bposhashstats[bphsi].fwd.getFrequency()<2){ consecutivezeroes++; }else{ if(acti-leftcut>longestrightcut-longestleftcut){ @@ -3133,11 +3174,11 @@ if(SKIM3_hasMNRr[readid] - || SKIM3_hasFpAS[readid]){ + || SKIM3_hasFpas[readid]){ for(uint32 tn=0; tngetRead(readid).getNumOfTags(); tn++){ if(SKIM3_readpool->getRead(readid).getTag(tn).identifier==Read::REA_tagentry_idMNRr - || SKIM3_readpool->getRead(readid).getTag(tn).identifier==Read::REA_tagentry_idSOFApolyA_signal_sequence){ + || SKIM3_readpool->getRead(readid).getTag(tn).identifier==Read::REA_tagentry_idSOFApolyA_sequence){ CEBUG("MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASK!\n"); int32 from=SKIM3_readpool->getRead(readid).getTag(tn).from; @@ -3153,11 +3194,11 @@ to still make hashes that have the "A" in them - But for FpAS (poly A), we want stop dead at the beginning + But for Fpas (poly A), we want stop dead at the beginning of the poly A. Therefore, we need to expand the masked area by (number of bases in a hash)-1 */ - if(SKIM3_readpool->getRead(readid).getTag(tn).identifier==Read::REA_tagentry_idSOFApolyA_signal_sequence){ + if(SKIM3_readpool->getRead(readid).getTag(tn).identifier==Read::REA_tagentry_idSOFApolyA_sequence){ from-=(SKIM3_basesperhash-1); to+=(SKIM3_basesperhash-1); } diff -Nru mira-3.9.18/src/mira/skim.H mira-4.0/src/mira/skim.H --- mira-3.9.18/src/mira/skim.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/skim.H 2014-02-02 12:05:18.000000000 +0000 @@ -22,6 +22,7 @@ #ifndef _bas_skim_h_ #define _bas_skim_h_ +#include #include #include @@ -107,14 +108,14 @@ friend std::ostream & operator<<(std::ostream &ostr, const skimhitforsave_t & e){ ostr << "SHFS:\t" << e.rid1 << '\t' << e.rid2 - << '\t' << e.eoffset - << '\t' << e.percent_in_overlap - << '\t' << e.numhashes + << "\teo " << e.eoffset + << "\t% " << e.percent_in_overlap + << "\tnh " << e.numhashes << "\tsg " << e.ol_stronggood << "\twg " << e.ol_weakgood << "\tbaf " << e.ol_belowavgfreq - << "\trp" << e.ol_norept - << "\tnrp" << e.ol_rept + << "\tnrp " << e.ol_norept + << "\trp " << e.ol_rept << '\n'; return ostr; } @@ -221,7 +222,7 @@ struct farc_threaddata_t { std::vector readhashmatches; std::vector singlereadvhraparray; - std::vector tagmaskvector; + std::vector unused_tagmaskvector; std::vector tmpmatchwith; }; @@ -368,7 +369,7 @@ // TODO: eventuall compress this with megahubs into uint8 having 8 boolean std::vector SKIM3_hasMNRr; std::vector SKIM3_hasSRMr; - std::vector SKIM3_hasFpAS; + std::vector SKIM3_hasFpas; // counts how many times a read has excellent hits with other reads std::vector * SKIM3_overlapcounter; @@ -408,8 +409,9 @@ // overlap criterion levels for left and right extend // used to take overlaps only if they reach a given level - std::vector * SKIM3_overlapcritlevell; - std::vector * SKIM3_overlapcritlevelr; + // [0] is for norept overlaps, [1] for rept + std::vector> * SKIM3_overlapcritlevelvl; + std::vector> * SKIM3_overlapcritlevelvr; std::vector SKIM3_largestencasementscoretodate; @@ -421,7 +423,7 @@ std::vector SKIM3_nomorehitseie; uint32 SKIM3_maxhitsperread; - + bool SKIM3_forcetakestronggood; uint64 SKIM3_totalhitschosen; @@ -446,10 +448,10 @@ // this vector is used to collect read ids which have a match // and then quickly update SKIM3_writtenhitsperid inside a mutex std::vector ridswithmatches; - std::vector uidswithnewcritlevell; - std::vector uidswithnewcritlevelr; - std::vector critlevellofnewuids; - std::vector critlevelrofnewuids; + std::vector> uidswithnewcritlevelvl; // 0 for norept, 1 for rept overlaps + std::vector> uidswithnewcritlevelvr; + std::vector> critlevellofnewuidsv; + std::vector> critlevelrofnewuidsv; }; std::vector SKIM3_cfhd_vector; @@ -634,8 +636,8 @@ std::vector & writtenhitsperid, std::vector & chuntleftcut, std::vector & chuntrightcut, - std::vector & overlapcritlevell, - std::vector & overlapcritlevelr, + std::vector> & overlapcritlevell, + std::vector> & overlapcritlevelr, uint32 numthreads, //2 uint32 maxmemusage, // = 15000000 @@ -648,7 +650,8 @@ //int32 percentrequired, // = 50 const std::vector & percentrequired, // = 30 for each st const std::vector & overlaplenrequired, // = 30 for each st - uint32 maxhitsperread); // = 200 + uint32 maxhitsperread, + bool forcetakestronggood); // = 200 void skimStreamPrepare(ReadPool & rp, uint8 bph, uint8 hss, const char * additionalregexp=nullptr); diff -Nru mira-3.9.18/src/mira/skim_farc.C mira-4.0/src/mira/skim_farc.C --- mira-3.9.18/src/mira/skim_farc.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/skim_farc.C 2014-02-02 12:05:18.000000000 +0000 @@ -20,15 +20,11 @@ * */ +#include "skim.H" + #include #include -#include -#include - - -#include "skim.H" - #include "errorhandling/errorhandling.H" @@ -145,13 +141,9 @@ uint32 slen=actread.getLenClippedSeq(); if(slengetRead(ssmwsI->otherid).getName() << " : " << *ssmwsI); - if(ssmwsI->numhashes>=minhashes){ + // have at least an estimated 50% identity, false positive adaptor identifications normally have well below 50% + if(ssmwsI->numhashes>=minhashes && ssmwsI->percent_in_overlap>=50){ int32 numhashes=ssmwsI->numhashes; if(ssmwsI->eoffset < 0) numhashes+=ssmwsI->eoffset; if(numhashes>=minhashes){ @@ -279,7 +272,7 @@ return retvalue; } -#define CEBUG(bla) +//#define CEBUG(bla) @@ -428,7 +421,10 @@ } } - int32 minoverlaprequired=13; + // 13 was a bit too small, still produces rare false positives even if percent_in_overlap >= 60 + // only workable countermeasure: 16 (and that is also more in-line with minimm overlaps one + // should use) + int32 minoverlaprequired=16; #ifdef CEBUG_extra_cFPH { @@ -503,8 +499,8 @@ SKIM3_farcd_vector[ti].readhashmatches.reserve(2000); SKIM3_farcd_vector[ti].singlereadvhraparray.clear(); SKIM3_farcd_vector[ti].singlereadvhraparray.reserve(2000); - SKIM3_farcd_vector[ti].tagmaskvector.clear(); - SKIM3_farcd_vector[ti].tagmaskvector.reserve(2000); + SKIM3_farcd_vector[ti].unused_tagmaskvector.clear(); + //SKIM3_farcd_vector[ti].unused_tagmaskvector.reserve(2000); SKIM3_farcd_vector[ti].tmpmatchwith.clear(); SKIM3_farcd_vector[ti].tmpmatchwith.reserve(2000); @@ -526,7 +522,7 @@ farcd.readhashmatches.clear(); farcd.singlereadvhraparray.clear(); - farcd.tagmaskvector.clear(); + farcd.unused_tagmaskvector.clear(); farcd.tmpmatchwith.clear(); readid_t dummy=0; // in this version, we do not give back the read id of the adaptor found, but need a variable to call the internal routine diff -Nru mira-3.9.18/src/mira/skim_lowbph.C mira-4.0/src/mira/skim_lowbph.C --- mira-3.9.18/src/mira/skim_lowbph.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/mira/skim_lowbph.C 2014-02-02 12:05:18.000000000 +0000 @@ -20,15 +20,11 @@ * */ +#include "skim.H" + #include #include -#include -#include - - -#include "skim.H" - #include "errorhandling/errorhandling.H" #include "util/dptools.H" diff -Nru mira-3.9.18/src/mira/structs.H mira-4.0/src/mira/structs.H --- mira-3.9.18/src/mira/structs.H 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/mira/structs.H 2014-02-02 12:05:18.000000000 +0000 @@ -43,24 +43,33 @@ { uint32 sp_est_startstep; - bool mi_printversion; + bool mi_iknowwhatido; + bool mi_extended_log; - bool mi_extra_flag1; // currently for check of unused reads in Assembly::bfc_sanityCheckASUSEDIDS - bool mi_extra_flag2; // currently for reducing reads at coverage peaks in dn genome assembly (called: Assembly::buildFirstContigs()) + bool mi_extra_flag1; + bool mi_extra_flag2; + bool mi_extra_flag3; uint32 mi_as_largecontigsize; uint32 mi_as_largecontigsize4stats; + bool sp_parse_checktechnologypresence; }; +enum { NWNONE=0, NWSTOP, NWWARN }; struct nagandwarn_parameters { - uint32 nw_stop_readnamelength; + uint8 nw_check_nfs; + uint8 nw_check_templateproblems; + uint8 nw_check_duplicatereadnames; + uint8 nw_check_multipassmapping; + + uint8 nw_check_maxreadnamelength; + uint32 nw_check_mrnlvalue; - bool nw_stop_on_nfs; - bool nw_stop_templateproblems; - bool nw_stop_duplicatereadnames; + uint8 nw_check_coverage; + uint32 nw_check_covvalue; }; struct assembly_parameters @@ -85,6 +94,8 @@ uint32 as_backbone_outlen; // "rail"length for backbone in output int32 as_startbackboneusage_inpass; // in which pass to use backbones first + bool as_backbone_bootstrapnewbackbone; + bool as_backbone_trimoverhangingreads; bool as_automemmanagement; bool as_assemblyjob_mapping; @@ -186,7 +197,7 @@ bool as_clip_ensureminimumrightclipoff; bool as_clip_polyat; - bool as_clip_polyat_keeppolysignal; + bool as_clip_polyat_keeppolystretch; uint32 as_clip_polyat_len; uint32 as_clip_polyat_maxerrors; uint32 as_clip_polyat_maxgap; @@ -211,7 +222,6 @@ bool as_spoilerdetection; int32 as_spdetect_lastpassonly; - bool as_keep_long_repeats_separated; bool as_automatic_repeat_detection; double as_ard_multicopythreshold; int32 as_ard_multicopyminlen; @@ -272,27 +282,27 @@ std::string as_outdir_GAP4DA; std::string as_outfile_callparams; - std::string as_outfile_stats_reads_invalid; - std::string as_outfile_stats_reads_tooshort; std::string as_outfile_stats_contigstats; - std::string as_outfile_stats_info; - std::string as_outfile_stats_debrislist; - std::string as_outfile_stats_crlist; - std::string as_outfile_stats_readtags; std::string as_outfile_stats_contigtags; - std::string as_outfile_stats_snpanalysis; - std::string as_outfile_stats_snpenvironment; + std::string as_outfile_stats_crlist; + std::string as_outfile_stats_debrislist; std::string as_outfile_stats_featureanalysis; std::string as_outfile_stats_featuresummary; std::string as_outfile_stats_featuresequences; std::string as_outfile_stats_featurecoverage; - //std::string as_tmp_skimmarknastyrepeats; + std::string as_outfile_stats_info; + std::string as_outfile_stats_warnings; + std::string as_outfile_stats_largecontigs; + std::string as_outfile_stats_snpanalysis; + std::string as_outfile_stats_snpenvironment; + std::string as_outfile_stats_reads_invalid; + std::string as_outfile_stats_reads_tooshort; std::string as_outfile_stats_readrepeats; + std::string as_outfile_stats_readtags; }; struct directory_parameters { - std::string dir_cwd; std::string dir_top; std::string dir_tmp; std::string dir_tmp_redirectedto; @@ -309,6 +319,8 @@ { uint32 sk_numthreads; uint32 sk_basesperhash; + uint32 sk_bph_coveragethreshold; + uint32 sk_bph_increasestep; uint32 sk_hashsavestepping; int32 sk_percentrequired; uint32 sk_maxhitsperread; @@ -340,6 +352,9 @@ uint32 hs_repeatlevel_in_infofile; bool hs_apply_digitalnormalisation; + + uint32 hs_million_hashes_per_buffer; + bool hs_rare_kmer_early_kill; }; @@ -479,9 +494,12 @@ struct edit_parameters { - bool ed_automatic_contic_editing; - bool ed_strict_editing_mode; + bool ed_mira_automatic_contic_editing; + bool ed_homopolymer_overcalls; + bool ed_kmer_singlets; + bool ed_edit_automatic_contic_editing; + bool ed_strict_editing_mode; uint32 ed_confirmation_threshold; }; diff -Nru mira-3.9.18/src/mira/warnings.C mira-4.0/src/mira/warnings.C --- mira-3.9.18/src/mira/warnings.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/mira/warnings.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 2003 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "mira/warnings.H" + +#include "errorhandling/errorhandling.H" +#include "util/fmttext.H" + +using namespace std; + +// Plain vanilla constructor +Warnings::Warnings() +{ + FUNCSTART("Warnings::Warnings()"); + + zeroVars(); + init(); + + FUNCEND(); +} + +void Warnings::zeroVars() +{ + FUNCSTART("void Warnings::zeroVars()"); + FUNCEND(); +} + +void Warnings::init() +{ + FUNCSTART("void Warnings::init()"); + FUNCEND(); +} + + + +Warnings::~Warnings() +{ + FUNCSTART("Warnings::~Warnings()"); + + discard(); + + FUNCEND(); +} + + +void Warnings::discard() +{ + FUNCSTART("Warnings::discard()"); + + zeroVars(); + + FUNCEND(); +} + +void Warnings::priv_setWarning(std::string & shortcode,uint32 level,std::string & title,std::string & message,bool donotdump,bool add) +{ + FUNCSTART("void Warnings::priv_setWarning(std::string & shortcode,uint32 level,std::string & title,std::string & message,bool add)"); + + BUGIFTHROW(level>2,"level>2 ???"); + if(add){ + auto mI=WA_messages.find(shortcode); + if(mI==WA_messages.end()){ + WA_messages[shortcode]=warnmsg_t(title,message,level); + }else{ + mI->second.warnlevel=level; + mI->second.title=title; + mI->second.message+=message; + } + }else{ + WA_messages[shortcode]=warnmsg_t(title,message,level); + } + priv_dumpSingleWarning(*(WA_messages.find(shortcode)),true,cout); +} + +ostream & operator<<(ostream &ostr, Warnings const &war) +{ + FUNCSTART("friend ostream & Warnings::operator<<(ostream &ostr, const &war)"); + + for(uint32 wl=0; wl<3; ++wl){ + for(auto & wme : war.WA_messages){ + if(wme.second.warnlevel==wl){ + war.priv_dumpSingleWarning(wme,true,ostr); + } + } + } + + FUNCEND(); + return ostr; +} + +void Warnings::priv_dumpSingleWarning(const std::pair & wm, bool withheader, ostream & ostr) const +{ + if(withheader){ + ostr << "-------- "; + if(wm.second.warnlevel==0){ + ostr << "CRITICAL"; + }else if(wm.second.warnlevel==1){ + ostr << "MEDIUM"; + }else if(wm.second.warnlevel==2){ + ostr << "MINOR"; + } + ostr << " warning --------\n\n"; + } + ostr << "MIRA warncode: " << wm.first << "\nTitle: " << wm.second.title << "\n\n"; + ostr << FmtText::wordWrap(wm.second.message,80) << '\n'; +} + + +void Warnings::dumpWarnings() const +{ + FUNCSTART("void Warnings::dumpWarnings() const"); + + if(WA_filebasename.empty()){ + cout << *this; + }else{ + for(uint32 wl=0; wl<3; ++wl){ + string fname(WA_filebasename); + if(wl==0){ + fname+="_critical"; + }else if(wl==1){ + fname+="_medium"; + }else if(wl==2){ + fname+="_minor"; + } + fname+=".txt"; + ofstream fout(fname, ios::out | ios::trunc); + bool hadoutput=false; + for(auto & wme : WA_messages){ + if(wme.second.warnlevel==wl){ + if(hadoutput) fout << "\n"; + hadoutput=true; + priv_dumpSingleWarning(wme,false,fout); + fout << "\n--------------------------------------------------------------------------------\n"; + } + } + fout.close(); + if(fout.fail()){ + MIRANOTIFY(Notify::FATAL,"Could not write to " << fname << " ?"); + } + } + } +} + +void Warnings::dumpWarning(std::string & shortcode, ostream & ostr) const +{ + auto mI=WA_messages.find(shortcode); + if(mI!=WA_messages.end()){ + priv_dumpSingleWarning(*mI,true,ostr); + } +} diff -Nru mira-3.9.18/src/mira/warnings.H mira-4.0/src/mira/warnings.H --- mira-3.9.18/src/mira/warnings.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/mira/warnings.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 2013 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#ifndef _mira_warnings_h_ +#define _mira_warnings_h_ + +#include + +#include "stdinc/defines.H" + +#include + + +class Warnings +{ + //Variables +private: + + struct warnmsg_t { + std::string title; + std::string message; + uint32 warnlevel; + + warnmsg_t(std::string & t,std::string & m,uint32 wl) : title(t), message(m), warnlevel(wl) {}; + warnmsg_t() {}; // need this for emplace, should however never be used "normally" + }; + + std::unordered_map WA_messages; + + std::string WA_filebasename; + +public: + + + //Functions +private: + void init(); + void zeroVars(); + + void priv_setWarning(std::string & shortcode, + uint32 level, + std::string & title, + std::string & message, + bool donotdump, + bool add); + + void priv_dumpSingleWarning(const std::pair & wm, + bool withheader, std::ostream & ostr) const; + +public: + Warnings(); + Warnings(Warnings const &other); + ~Warnings(); + + Warnings const & operator=(Warnings const & other); + friend std::ostream & operator<<(std::ostream &ostr, Warnings const &war); + + void discard(); + + inline void setWarning(std::string & shortcode, + uint32 level, + std::string & title, + std::string & message) {priv_setWarning(shortcode,level,title,message,false,false);} + inline void setWarning(const char * shortcode, + uint32 level, + const char * title, + std::string & message) { + std::string sc(shortcode); + std::string ti(title); + priv_setWarning(sc,level,ti,message,false,false); + } + inline void setWarning(const char * shortcode, + uint32 level, + const char * title, + const char * message) { + std::string sc(shortcode); + std::string ti(title); + std::string mg(message); + priv_setWarning(sc,level,ti,mg,false,false); + } + inline void addToWarning(std::string & shortcode, + uint32 level, + std::string & title, + std::string & message) {priv_setWarning(shortcode,level,title,message,false,true);} + + void dumpWarnings() const; + void dumpWarning(std::string & shortcode, std::ostream & ostr) const; + void dumpWarning(const char * shortcode, std::ostream & ostr) const { + std::string sc(shortcode); dumpWarning(sc,ostr); + } + void setOutputPath(const std::string & p) {WA_filebasename=p;} + void setOutputPath(const char * p) {WA_filebasename=p;} +}; + + +#endif diff -Nru mira-3.9.18/src/modules/Makefile.am mira-4.0/src/modules/Makefile.am --- mira-3.9.18/src/modules/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/Makefile.am 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,5 @@ +AM_CPPFLAGS = -I$(top_srcdir)/src $(all_includes) + +noinst_LIBRARIES = libmiramodules.a +libmiramodules_a_SOURCES= mod_bait.C mod_dbgreplay.C mod_mira.C mod_convert.C mod_memestim.C mod_tagsnp.C misc.C +noinst_HEADERS= mod_bait.H mod_mira.H mod_convert.H mod_memestim.H mod_tagsnp.H misc.H diff -Nru mira-3.9.18/src/modules/Makefile.in mira-4.0/src/modules/Makefile.in --- mira-3.9.18/src/modules/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -0,0 +1,520 @@ +# Makefile.in generated by automake 1.11.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libmiramodules_a_AR = $(AR) $(ARFLAGS) +libmiramodules_a_LIBADD = +am_libmiramodules_a_OBJECTS = mod_bait.$(OBJEXT) \ + mod_dbgreplay.$(OBJEXT) mod_mira.$(OBJEXT) \ + mod_convert.$(OBJEXT) mod_memestim.$(OBJEXT) \ + mod_tagsnp.$(OBJEXT) misc.$(OBJEXT) +libmiramodules_a_OBJECTS = $(am_libmiramodules_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libmiramodules_a_SOURCES) +DIST_SOURCES = $(libmiramodules_a_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BITPACKAGE = @BITPACKAGE@ +BLOODYDARWINSTATLIBDIRHACK = @BLOODYDARWINSTATLIBDIRHACK@ +BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ +BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ +BOOST_LDFLAGS = @BOOST_LDFLAGS@ +BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ +BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ +BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPAT_CFLAGS = @EXPAT_CFLAGS@ +EXPAT_LDFLAGS = @EXPAT_LDFLAGS@ +EXPAT_LIBS = @EXPAT_LIBS@ +EXPAT_VERSION = @EXPAT_VERSION@ +FGREP = @FGREP@ +FLEX = @FLEX@ +FLEXPP = @FLEXPP@ +GREP = @GREP@ +HAVE_XXD = @HAVE_XXD@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIRASTATIC = @MIRASTATIC@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir)/src $(all_includes) +noinst_LIBRARIES = libmiramodules.a +libmiramodules_a_SOURCES = mod_bait.C mod_dbgreplay.C mod_mira.C mod_convert.C mod_memestim.C mod_tagsnp.C misc.C +noinst_HEADERS = mod_bait.H mod_mira.H mod_convert.H mod_memestim.H mod_tagsnp.H misc.H +all: all-am + +.SUFFIXES: +.SUFFIXES: .C .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libmiramodules.a: $(libmiramodules_a_OBJECTS) $(libmiramodules_a_DEPENDENCIES) $(EXTRA_libmiramodules_a_DEPENDENCIES) + -rm -f libmiramodules.a + $(libmiramodules_a_AR) libmiramodules.a $(libmiramodules_a_OBJECTS) $(libmiramodules_a_LIBADD) + $(RANLIB) libmiramodules.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_bait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_convert.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_dbgreplay.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_memestim.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_mira.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_tagsnp.Po@am__quote@ + +.C.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.C.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.C.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru mira-3.9.18/src/modules/misc.C mira-4.0/src/modules/misc.C --- mira-3.9.18/src/modules/misc.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/misc.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,162 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include +#include + +#include "stdinc/defines.H" +#include "stdinc/types.H" +#include "io/generalio.H" +#include "errorhandling/errorhandling.H" + +#include "modules/misc.H" + +using namespace std; + + +extern const char compileinfo[]; + + +void dumpStdMsg() +{ + cout << + "To (un-)subscribe the MIRA mailing lists, see:\n" + "\thttp://www.chevreux.org/mira_mailinglists.html\n\n" + "After subscribing, mail general questions to the MIRA talk mailing list:\n" + "\tmira_talk@freelists.org\n\n" + "\nTo report bugs or ask for features, please use the SourceForge ticketing\nsystem at:\n" + "\thttp://sourceforge.net/p/mira-assembler/tickets/\n" + "This ensures that requests do not get lost.\n\n\n"; + + bool addnl=false; + + cout << compileinfo; +#ifdef CEBUGFLAG + cout << "Compiled in debug output mode.\n"; + addnl=true; +#endif +#ifdef TRACEFLAG + cout << "Compiled with trace mode.\n"; + addnl=true; +#endif +#ifdef BOUNDTRACKFLAG + cout << "Compiled in boundtracking mode.\n"; + addnl=true; +#endif +#ifdef BUGTRACKFLAG + cout << "Compiled in bugtracking mode.\n"; + addnl=true; +#endif +#ifdef PARANOIABUGTRACKFLAG + cout << "Compiled in paranoia bugtracking mode.\n"; + addnl=true; +#endif +#ifdef ENABLE64 + cout << "Compiled with ENABLE64 activated.\n"; + addnl=true; +#else + cout << "Compiled with ENABLE64 de-activated.\n"; + addnl=true; +#endif +#ifdef MIRAMEMORC + cout << "Compiled with memory overrun checks, MIRA *will* be slower.\n"; + addnl=true; +#endif + + cout << "Runtime settings (sorry, for debug):" + << "\n\tSize of size_t : " << sizeof(size_t) + << "\n\tSize of uint32 : " << sizeof(uint32) + << "\n\tSize of uint32_t: " << sizeof(uint32_t) + << "\n\tSize of uint64 : " << sizeof(uint64) + << "\n\tSize of uint64_t: " << sizeof(uint64_t) + << "\nCurrent system: "; + { + cout.flush(); + int tmp=system("uname -a"); + // don't complain about unused variable + (void) tmp; + } + + if(addnl) cout << endl; +} + + +General::strintmap General::GE_nameselectionmap; +bool General::GE_namesread=false; + +void General::makeSelectionStringSet(string & filename) +{ + FUNCSTART("void makeSelectionStringSet(string & filename)"); + + ifstream fin; + fin.open(filename.c_str(), ios::in); + if(!fin){ + MIRANOTIFY(Notify::FATAL, "File not found: " << filename); + } + fin.seekg(0, ios::beg); + + string elemname, dummy; + strintmap::iterator nI; + uint32 numread=0; + while(GeneralIO::readKeyValue(fin, elemname,dummy)){ + nI=GE_nameselectionmap.find(elemname); + if(nI==GE_nameselectionmap.end()) { + GE_nameselectionmap[elemname]=numread; + numread++; + } + } + fin.close(); + GE_namesread=true; + + if(numread>0 && GE_nameselectionmap.empty()) { + cerr << "ehhh?"; + exit(10); + } + + FUNCEND(); +} + + + +bool General::checkNamePresence(string & name) +{ + if(!GE_namesread) return true; + return (GE_nameselectionmap.find(name) != GE_nameselectionmap.end()); +} + +bool General::hasNames() +{ + return GE_namesread; +} + +size_t General::getNameOrder(const string & name) +{ + if(GE_nameselectionmap.empty()) return (0-1); + strintmap::iterator nI=GE_nameselectionmap.find(name); + if (nI == GE_nameselectionmap.end()) return (0-1); + return nI->second; +} + diff -Nru mira-3.9.18/src/modules/misc.H mira-4.0/src/modules/misc.H --- mira-3.9.18/src/modules/misc.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/misc.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#ifndef _modmira_h_ +#define _modmira_h_ + +#include + +#include + +#include "stdinc/types.H" + + +void dumpStdMsg(); + +class General { + typedef boost::unordered_map strintmap; + static strintmap GE_nameselectionmap; + static bool GE_namesread; + +public: + static void makeSelectionStringSet(std::string & filename); + static bool checkNamePresence(std::string & name); + static bool hasNames(); + static size_t getNameOrder(const std::string & name); +}; + + +#endif diff -Nru mira-3.9.18/src/modules/mod_bait.C mira-4.0/src/modules/mod_bait.C --- mira-3.9.18/src/modules/mod_bait.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_bait.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,503 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include + +#include "modules/mod_bait.H" +#include "modules/mod_convert.H" + +#include "caf/caf.H" +#include "mira/maf_parse.H" +#include "version.H" + + +using namespace std; + + +vector MiraBait::MB_Pv; + +string MiraBait::MB_fromtype; +list MiraBait::MB_totype; +list MiraBait::MB_ofs; + +string MiraBait::MB_infile; +string MiraBait::MB_baitfile; +string MiraBait::MB_outbasename; + +bool MiraBait::MB_loadhashstat=false; +bool MiraBait::MB_deletestaronlycolumns=false; +bool MiraBait::MB_mustdeletetargetfiles=true; +bool MiraBait::MB_inversehit=false; +bool MiraBait::MB_fwdandrev=true; +uint32 MiraBait::MB_numbaithits=1; + +list MiraBait::MB_clist; // needed for CAF conversion (and GBF) + +HashStatistics MiraBait::MB_hashstatistics;; + +uint64 MiraBait::MB_numreadsread=0; +uint64 MiraBait::MB_numreadswritten=0; + +MiraBait::~MiraBait() +{ + ConvPro::closeOpenStreams(MB_ofs); +} + +void MiraBait::usage() +{ + cout << "mirabait\t(MIRALIB version " << MIRALIBVERSION << ")\n"; + cout << "Author: Bastien Chevreux\t(bach@chevreux.org)\n\n"; + + cout << "... baiting ...\n"; + cout << "Usage:\n"; + //cout << "\tconvert_project [-f ] [-t ] [-s strainfile] [-q] infile outfile\n\n"; + cout << "mirabait [-f ] [-t [-t ...]] [-ikLor] baitfile infile \n\n"; + cout << "Options:\n"; + cout << "\t-f \tload this type of project files, where fromtype is:\n" + "\t caf\t\t sequences from CAF\n" + "\t maf\t\t sequences from MAF\n" + "\t phd\t\t sequences from a PHD\n" + "\t gbf\t\t sequences from a GBF\n" + "\t fasta\t sequences from a FASTA\n" + "\t fastq\t sequences from a FASTQ\n"; + cout << "\t-t \twrite the sequences to this type (multiple mentions\n" + "\t\t\tof -t are allowed):\n" + "\t fasta\t sequences to FASTA\n" + "\t fastq\t sequences to FASTQ\n" + "\t caf\t\t sequences to CAF\n" + "\t maf\t\t sequences to MAF\n" + "\t txt\t\t sequence names to text file\n"; + + cout << "\n" + "\t-L\t\tDo not compute hash statistics, load from baitfile\n" + "\t\t\t (which the must be a mirabait hash statistics file).\n"; + + cout << "\n" + "\t-k\t\tk-mer, length of bait in bases (<32, default=31)\n" + "\t-n\t\tMin. number of k-mer baits needed (default=1)\n" + "\t-i\t\tInverse hit: writes only sequences that do not hit bait\n" + "\t-r\t\tNo checking of reverse complement direction\n"; + + cout << "\n" + "\t-o\t\tfastq quality Offset (only for -f = 'fastq')\n" + "\t\t\t Offset of quality values in FASTQ file. Default: 33\n" + "\t\t\t A value of 0 tries to automatically recognise.\n"; + + + +// cout << "\t-a \tString with MIRA parameters to be parsed\n" +// "\t\t\t Useful when setting parameters affecting consensus\n" +// "\t\t\t calling like -CO:mrpg etc.\n" +// "\t\t\t E.g.: -a \"454_SETTINGS -CO:mrpg=3\"\n"; + + cout << "\nExamples:\n" + "\t...\n" + "\t...\n"; +} + + +void MiraBait::checkTypes(string & fromtype,list & totype) +{ + if(fromtype.empty()){ + fromtype="fastq"; + } + if(fromtype=="gbk" || fromtype=="gbff"){ + fromtype="gbf"; + } + if(!(fromtype=="caf" + || fromtype=="maf" + || fromtype=="phd" + || fromtype=="gbf" + || fromtype=="exp" + || fromtype=="fasta" + || fromtype=="fastq" + )){ + usage(); + cout << endl; + cerr << "Unknown or illegal file type '" << fromtype << "' defined as \n"; + exit(1); + } + if(MB_totype.empty()){ + if(fromtype=="caf" + || fromtype=="maf" + || fromtype=="fasta" + || fromtype=="fastq" + ){ + MB_totype.push_back(fromtype); + }else{ + MB_totype.push_back("fastq"); + } + } + for(list::iterator ttI= MB_totype.begin(); ttI!=MB_totype.end(); ++ttI){ + if(*ttI=="scaf") *ttI="caf"; + if(!(*ttI=="fasta" + || *ttI=="fastq" + || *ttI=="caf" + || *ttI=="maf" + || *ttI=="txt" + )){ + usage(); + cout << endl; + cerr << "MiraBait::checkTypes(): Unknown or illegal file type '" << *ttI << "' defined as \n"; + exit(1); + } + } +} + +// Note: clears the readpool after saving! +void MiraBait::saveReadPool(ReadPool & rp) +{ + MB_numreadsread+=rp.size(); + MB_numreadswritten+=rp.size(); + + // first, bait all reads. Those who bite, discard. + for(uint32 i=0; i= MB_numbaithits) ^ !MB_inversehit){ + rp[i].discard(); + --MB_numreadswritten; + } + } + + // then save the read pool + list::iterator ttI= MB_totype.begin(); + list::iterator ofsI= MB_ofs.begin(); + for(; ttI!=MB_totype.end(); ++ttI, ++ofsI){ + if(*ttI=="fasta"){ + // double indirection because iterator needs one and it is a list of ofstream pointers ... + rp.dumpAs(*(*ofsI),Read::AS_FASTA,false); + } else if(*ttI=="fastaqual"){ + rp.dumpAs(*(*ofsI),Read::AS_FASTAQUAL,false); + } else if(*ttI=="fastq"){ + rp.dumpAs(*(*ofsI),Read::AS_FASTQ,false); + } else if(*ttI=="caf" || *ttI=="scaf" ){ + rp.dumpAs(*(*ofsI),Read::AS_CAF,false); + } else if(*ttI=="maf"){ + rp.dumpAs(*(*ofsI),Read::AS_MAF,false); + } else if(*ttI=="txt"){ + rp.dumpAs(*(*ofsI),Read::AS_READNAME,false); + } else { + cout.flush(); + cerr << "\n\n-t " << *ttI << " is not a valid type when the source file does not contain a full assembly!\n"; + //usage(); + exit(1); + } + } +} + + +void MiraBait::cafmafload_callback(list & clist, ReadPool & rp) +{ + // TODO: check if needed + Assembly::refreshContigAndReadpoolValuesAfterLoading(rp,clist); + + saveReadPool(rp); + + Read::trashReadNameContainer(); + clist.clear(); + rp.discard(); +} + +void MiraBait::readpoolload_callback(ReadPool & rp) +{ + // TODO: check if needed (slows loading by ~30 to 50% +// rp.makeTemplateIDs(false); +// rp.makeStrainIDs(false); + + saveReadPool(rp); + + Read::trashReadNameContainer(); + rp.discard(); +} + + + +int MiraBait::mainMiraBait(int argc, char ** argv) +{ + //CALLGRIND_STOP_INSTRUMENTATION; + + FUNCSTART("int mainMiraBait(int argc, char ** argv)"); + + int c; + extern char *optarg; + extern int optind; + + + string fqqualoffset="33"; + + string path; + string convertprog; + splitFullPathAndFileName(argv[0],path,convertprog); + + string miraparams; + + uint8 basesperhash=31; + + while (true){ + static struct option long_options[] = + { + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'v'}, + {"loadhsf", no_argument, 0, 'L'}, + {0, 0, 0, 0} + }; + /* getopt_long stores the option index here. */ + int option_index = 0; + + int c = getopt_long (argc, argv, "hdiLrvf:t:o:a:k:n:", + long_options, &option_index); + if(c == -1) break; + + switch (c) { + case 'a': { + miraparams=optarg; + break; + } + case 'f': { + MB_fromtype=optarg; + break; + } + case 'L': { + MB_loadhashstat=true; + break; + } + case 'n': { + MB_numbaithits=atoi(optarg); + break; + } + case 'k': { + uint64 bla=atoi(optarg); + if(bla>31) bla=31; + basesperhash=bla; + break; + } + case 't': { + MB_totype.push_back(optarg); + break; + } + case 'o': { + fqqualoffset=optarg; + break; + } + case 'd': { + MB_deletestaronlycolumns=true; + break; + } + case 'i': { + MB_inversehit=true; + break; + } + case 'r': { + MB_fwdandrev=false; + break; + } + case 'h': + case '?': { + usage(); + exit(0); + } + case 'v': + cout << MIRAVERSION << endl; + exit(0); + default : {} + } + } + + if(argc-optind < 1) { + cerr << argv[0] << ": " << "Missing baitfile, infile and out-basename as arguments!\n"; + usage(); + exit(1); + } + + if(argc-optind < 3) { + cerr << argv[0] << ": " << "Missing one of baitfile, infile or out-basename as argument!\n"; + usage(); + exit(1); + } + + if(argc-optind > 3) { + cerr << argv[0] << ": " << "Whoops, found more than baitfile, infile and out-basename as arguments left on the command line!\n"; + cerr << "Unparsed command line: "; + for(;optind::iterator ttI= MB_totype.begin(); ttI!=MB_totype.end(); ++ttI){ + cout << ' ' << *ttI; + ofstmp=new ofstream; + MB_ofs.push_back(ofstmp); + if(*ttI=="fasta"){ + MB_ofs.back()->open((MB_outbasename + ".fasta").c_str(), ios::out); + } else if(*ttI=="fastq"){ + MB_ofs.back()->open((MB_outbasename + ".fastq").c_str(), ios::out); + } else if(*ttI=="caf" || *ttI=="scaf" ){ + MB_ofs.back()->open((MB_outbasename + ".caf").c_str(), ios::out); + } else if(*ttI=="maf"){ + MB_ofs.back()->open((MB_outbasename + ".maf").c_str(), ios::out); + } else if(*ttI=="txt"){ + MB_ofs.back()->open((MB_outbasename + ".txt").c_str(), ios::out); + } else { + cout.flush(); + cerr << "\n\n-t " << *ttI << " is not a valid type\n"; + //usage(); + exit(1); + } + } + cout << '\n'; + + try{ + if(MB_fromtype=="caf") { + CAF tcaf(&loadrp, &MB_clist, &MB_Pv); + vector dummy; + tcaf.load(MB_infile.c_str(), + ReadGroupLib::SEQTYPE_SANGER, + 1, + dummy, + false, + cafmafload_callback, + nullptr + ); + }else if(MB_fromtype=="maf") { + MAFParse mafp(&loadrp, &MB_clist, &MB_Pv); + vector dummy; + mafp.load(MB_infile.c_str(), + ReadGroupLib::SEQTYPE_SANGER, + 1, + dummy, + false, + cafmafload_callback, + nullptr + ); + }else{ + + uint32 dummy=0; + if(MB_fromtype=="fasta" + || MB_fromtype=="fastq" + || MB_fromtype=="gbf" + || MB_fromtype=="gff3"){ + cout << "Loading data from " << MB_fromtype << " ..."; + + string fn2; + if(MB_fromtype=="fasta"){ + fn2=MB_infile+".qual"; + }else if(MB_fromtype=="fastq"){ + fn2=fqqualoffset; + } + string loadtype(MB_fromtype); + if(loadtype=="fasta"){ + loadtype="fastanoqual"; + } + + ReadGroupLib::ReadGroupID rgid=ReadGroupLib::newReadGroup(); + rgid.setSequencingType(ReadGroupLib::SEQTYPE_TEXT); + loadrp.loadData_rgid(loadtype, MB_infile, fn2, rgid, false, readpoolload_callback); + } else { + cerr << "\n\n-f " << MB_fromtype << " is not a valid from type!\n"; + //usage(); + exit(1); + } + cout << " done.\n"; + } + } + catch(Notify n){ + // Need to close by hand as handleError() will perform a hard exit + ConvPro::closeOpenStreams(MB_ofs); + n.handleError("main"); + } + catch(Flow f){ + cerr << "Unexpected exception: Flow()\n"; + } + catch(...){ + cerr << "Unknown exception caught, aborting the process.\n\nPlease contact: bach@chevreux.org\n\n"; + abort(); + } + + cout << "\nBaiting process finished.\n\n"; + if(baitpoolsize>0){ + cout << "Number of bait sequences: " << baitpoolsize << endl; + } + cout << "Number of sequences baited: " << MB_numreadswritten << " / " << MB_numreadsread << " (" << fixed << setprecision(2) << 100.0f*MB_numreadswritten/MB_numreadsread << "%)\n"; + + FUNCEND(); + return 0; +} + diff -Nru mira-3.9.18/src/modules/mod_bait.H mira-4.0/src/modules/mod_bait.H --- mira-3.9.18/src/modules/mod_bait.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_bait.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,88 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + + +#include + +#include +#include +#include + +#include "mira/parameters.H" +#include "mira/contig.H" +#include "mira/readpool.H" +#include "mira/hashstats.H" + + +class MiraBait +{ +private: + + + static std::vector MB_Pv; + + static std::string MB_fromtype; + static std::list MB_totype; + + static std::list MB_ofs; + + + static std::string MB_baitfile; + static std::string MB_infile; + static std::string MB_outbasename; + + static bool MB_loadhashstat; + static bool MB_deletestaronlycolumns; + static bool MB_inversehit; + static bool MB_fwdandrev; + static uint32 MB_numbaithits; + + static bool MB_mustdeletetargetfiles; + + static std::list MB_clist; // needed for CAF conversion (and GBF) + + static HashStatistics MB_hashstatistics; + + static uint64 MB_numreadsread; + static uint64 MB_numreadswritten; + +private: + static void usage(); + static void checkTypes(std::string & fromtype,std::list & totype); + static void putReadsInContigsAndSave(std::vector & Pv, ReadPool & rp); + static void specialTestCode(std::list & clist, ReadPool & rp); + + static void saveReadPool(ReadPool & rp); + static void cafmafload_callback(std::list & clist, ReadPool & rp); + static void readpoolload_callback(ReadPool & rp); + +public: + ~MiraBait(); + + int mainMiraBait(int argc, char ** argv); + +}; + diff -Nru mira-3.9.18/src/modules/mod_convert.C mira-4.0/src/modules/mod_convert.C --- mira-3.9.18/src/modules/mod_convert.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_convert.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,1911 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + + + +#include "modules/mod_convert.H" + +#include + +#include "io/generalio.H" +#include "caf/caf.H" +#include "mira/maf_parse.H" + +#include "modules/misc.H" +#include "version.H" + + + +using namespace std; + + +vector ConvPro::CP_Pv; + +string ConvPro::CP_fromtype; +list ConvPro::CP_totype; +list ConvPro::CP_ofs; + +string ConvPro::CP_infile; +string ConvPro::CP_outbasename; + +string ConvPro::CP_renamesequences; +string ConvPro::CP_renamenamescheme; + +bool ConvPro::CP_splitcontigs2singlefiles=false; +bool ConvPro::CP_deletestaronlycolumns=false; +bool ConvPro::CP_blinddata=false; +bool ConvPro::CP_fillholesinstraingenomes=false; +bool ConvPro::CP_makecontigs=false; +bool ConvPro::CP_extractreadsinsteadcontigs=false; +bool ConvPro::CP_hardtrim=false; + +string ConvPro::CP_namefile; +bool ConvPro::CP_sortbyname=false; +bool ConvPro::CP_keepnamesfromfile=true; + +bool ConvPro::CP_mustdeletetargetfiles=true; + +bool ConvPro::CP_specialtestcode=false; +bool ConvPro::CP_filter2readgroup=false; + +base_quality_t ConvPro::CP_minqual=0; +bool ConvPro::CP_needsquality=true; +base_quality_t ConvPro::CP_defaultqual=30; + +char ConvPro::CP_recalcconopt=' '; +char ConvPro::CP_recalcfeatureopt=' '; + +uint32 ConvPro::CP_minbasecoverage=0; + +uint32 ConvPro::CP_mincontiglength=0; +bool ConvPro::CP_minlengthisclipped=false; +uint32 ConvPro::CP_mincontigcoverage=1; +uint32 ConvPro::CP_minnumreads=0; + +list ConvPro::CP_clist; // needed for CAF conversion (and GBF) +AssemblyInfo ConvPro::CP_assemblyinfo; + + +uint64 ConvPro::CP_readrenamecounter=1; + +GFFSave ConvPro::CP_gffsave; +SAMCollect ConvPro::CP_samcollect; + + + +ConvPro::~ConvPro() +{ + closeOpenStreams(CP_ofs); +} + +void ConvPro::usage() +{ + cout << "miraconvert\t(MIRALIB version " << MIRAVERSION << ")\n" + "Author: Bastien Chevreux\t(bach@chevreux.org)\n" + "Purpose: convert assembly and sequencing file types.\n\n"; + cout << "Usage:\n" + "miraconvert [-f ] [-t [-t ...]]\n" + "\t[-aChimMsuZ]\n" + "\t[-AcflnNoqrtvxXyz {...}]\n" + "\t{infile} {outfile} [ ...]\n\n"; + cout << "Options:\n"; + cout << + "\t-f \tload this type of project files, where fromtype is:\n" + "\t caf\t\t a complete assembly or single sequences from CAF\n" + "\t maf\t\t a complete assembly or single sequences from CAF\n" + "\t fasta\t sequences from a FASTA file\n" + "\t fastq\t sequences from a FASTQ file\n" + "\t gbf\t\t sequences from a GBF file\n" + "\t phd\t\t sequences from a PHD file\n" + "\t fofnexp\t sequences in EXP files from file of filenames\n"; + cout << "\t-t \twrite the sequences/assembly to this type (multiple\n" + "\t\t\tmentions of -t are allowed):\n" + "\t ace\t\t sequences or complete assembly to ACE\n" + "\t caf\t\t sequences or complete assembly to CAF\n" + "\t maf\t\t sequences or complete assembly to MAF\n" + "\t sam\t\t complete assembly to SAM\n" + "\t samnbb\t like above, but leaving out reference (backbones) in mapping assemblies\n" + "\t gbf\t\t sequences or consensus to GBF\n" + "\t gff3\t\t consensus to GFF3\n" + "\t wig\t\t assembly coverage info to wiggle file\n" + "\t gcwig\t assembly gc content info to wiggle file\n" + "\t fasta\t sequences or consensus to FASTA file (qualities to\n" + "\t\t\t .qual)\n" + "\t fastq\t sequences or consensus to FASTQ file\n" + "\t exp\t\t sequences or complete assembly to EXP files in\n" + "\t\t\t directories. Complete assemblies are suited for gap4\n" + "\t\t\t import as directed assembly.\n" + "\t\t\t Note: using caf2gap to import into gap4 is recommended though\n" + "\t text\t\t complete assembly to text alignment (only when -f is\n" + "\t\t\t caf, maf or gbf)\n" + "\t html\t\t complete assembly to HTML (only when -f is caf, maf or\n" + "\t\t\t gbf)\n" + "\t tcs\t\t complete assembly to tcs\n" + "\t hsnp\t\t surrounding of SNP tags (SROc, SAOc, SIOc) to HTML\n" + "\t\t\t (only when -f is caf, maf or gbf)\n" + "\t asnp\t\t analysis of SNP tags\n" + "\t\t\t (only when -f is caf, maf or gbf)\n" + "\t cstats\t contig statistics file like from MIRA\n" + "\t\t\t (only when source contains contigs)\n" + "\t crlist\t contig read list file like from MIRA\n" + "\t\t\t (only when source contains contigs)\n" + "\t maskedfasta\t reads where sequencing vector is masked out\n" + "\t\t\t (with X) to FASTA file (qualities to .qual)\n" + "\t scaf\t\t sequences or complete assembly to single sequences CAF\n"; + + cout << "\t-a\t\tAppend to target files instead of rewriting\n"; + + cout << + "\t-A \tString with MIRA parameters to be parsed\n" + "\t\t\t Useful when setting parameters affecting consensus\n" + "\t\t\t calling like -CO:mrpg etc.\n" + "\t\t\t E.g.: -a \"454_SETTINGS -CO:mrpg=3\"\n"; + + cout << + "\t-b\t\tBlind data\n" + "\t\t\t Replaces all bases in reads/contigs with a 'c'\n"; + + cout << "\t-C\t\tPerform hard clip to reads\n" + "\t\t\t When reading formats which define clipping points, will\n" + "\t\t\t save only the unclipped part into the result file.\n" + "\t\t\t Applies only to files/formats which do not contain\n" + "\t\t\t contigs.\n"; + + cout << + "\t-d\t\tDelete gap only columns\n" + "\t\t\t When output is contigs: delete columns that are\n" + "\t\t\t entirely gaps (like after having deleted reads during\n" + "\t\t\t editing in gap4 or similar)\n" + "\t\t\t When output is reads: delete gaps in reads\n"; + + cout << + "\t-F\t\tFilter to read groups\n" + "\t\t\t Special use case, do not use yet.\n"; + + + cout << + "\t-m\t\tMake contigs (only for -t = caf or maf)\n" + "\t\t\t Encase single reads as contig singlets into the CAF/MAF\n" + "\t\t\t file.\n"; + cout << + "\t-n \twhen given, selects only reads or contigs given by\n" + "\t\t\t name in that file.\n"; + cout << + "\t-i\t\twhen -n is used, inverts the selection\n"; + cout << + "\t-o\t\tfastq quality Offset (only for -f = 'fastq')\n" + "\t\t\t Offset of quality values in FASTQ file. Default of 0\n" + "\t\t\t tries to automatically recognise.\n"; + + cout << + "\t-Q \tSet default quality for bases in file types without quality values\n" + "\t\t\t Furthermore, do not stop if expected quality files are missing (e.g. '.fasta')\n"; + + cout << + "\t-R \tRename contigs/singlets/reads with given name string\n" + "\t\t\t to which a counter is appended.\n" + "\t\t\t Known bug: will create duplicate names if input\n" + "\t\t\t contains contigs/singlets as well as free reads, i.e.\n" + "\t\t\t reads not in contigs nor singlets.\n"; + + cout << + "\t-S \t(name)Scheme for renaming reads, important for paired-ends\n" + "\t\t\t Only 'solexa' is currently supported.\n"; + + + // TODO: re-adapt these switches to >2.9.8 +// cout << "\t-s \twhen loading assemblies from files that do not contain\n"; +// cout << "\t\t\t strain information (e.g. CAF), load the strain\n"; +// cout << "\t\t\t information from this file. (2 columns, tab delimited:\n"; +// cout << "\t\t\t readname left, strain name right)\n"; +// + +// + + cout << + "\n\t--------------------------------------------------------\n" + "\tThe following switches work only when input (CAF or MAF)\n" + "\tcontains contigs. Beware: CAF and MAf can also contain\n" + "\tjust reads.\n" + "\t--------------------------------------------------------\n\n"; + + // TODO: check if ok for >2.9.8 + cout << + "\t-M\t\tDo not extract contigs (or their consensus), but the\n" + "\t\t\t sequence of the reads they are composed of.\n"; + cout << + "\t-N \tlike -n, but sorts output according to order given\n" + "\t\t\t in file.\n"; + cout << + "\t-r [cCqf]\tRecalculate consensus and / or consensus quality values\n" + "\t\t\t and / or SNP feature tags.\n" + "\t\t\t 'c' recalc cons & cons qualities (with IUPAC)\n" + "\t\t\t 'C' recalc cons & cons qualities (forcing non-IUPAC)\n" + "\t\t\t 'q' recalc consensus qualities only\n" + "\t\t\t 'f' recalc SNP features\n" + "\t\t\t Note: only the last of cCq is relevant, f works as a\n" + "\t\t\t switch and can be combined with cQq (e.g. \"-r C -r f\")\n" + "\t\t\t Note: if the CAF/MAF contains multiple strains,\n" + "\t\t\t recalculation of cons & cons qualities is forced, you\n" + "\t\t\t can just influence whether IUPACs are used or not.\n"; + cout << + "\t-s\t\tsplit output into multiple files instead of creating a\n" + "\t\t\t single file\n"; + cout << + "\t-u\t\t'fillUp strain genomes'\n" + "\t\t\t Fill holes in the genome of one strain (N or @)\n" + "\t\t\t with sequence from a consensus of other strains\n" + "\t\t\t Takes effect only with -r and -t gbf or fasta/q\n" + "\t\t\t in FASTA/Q: bases filled up are in lower case\n" + "\t\t\t in GBF: bases filled up are in upper case\n"; + + cout << + "\t-q \tDefines minimum quality a consensus base of a strain\n" + "\t\t\t must have, consensus bases below this will be 'N'\n" + "\t\t\t Default: 0\n" + "\t\t\t Only used with -r, and -f is caf/maf and -t is (fasta\n" + "\t\t\t or gbf)\n"; +// cout << +// "\t-v \tDefines minimum coverage a consensus base of a strain\n" +// "\t\t\t must have, bases with coverage below this will be 'N'\n" +// "\t\t\t Default: 0\n" +// "\t\t\t Only used with -r, and -t is (fasta\n" +// "\t\t\t or gbf)\n"; + + cout << + "\t-v\t\tPrint version number and exit\n"; + + cout << + "\t-x \tMinimum contig or read length\n" + "\t\t\t When loading, discard all contigs / reads with a\n" + "\t\t\t length less than this value. Default: 0 (=switched off)\n" + "\t\t\t Note: not applied to reads in contigs!\n"; + cout << + "\t-X \tSimilar to -x but applies only to reads and\n" + "\t\t\t then to the clipped length.\n"; + + cout << + "\t-y \tMinimum average contig coverage\n" + "\t\t\t When loading, discard all contigs with an\n" + "\t\t\t average coverage less than this value.\n" + "\t\t\t Default: 1\n"; + + cout << + "\t-z \tMinimum number of reads in contig\n" + "\t\t\t When loading, discard all contigs with a\n" + "\t\t\t number of reads less than this value.\n" + "\t\t\t Default: 0 (=switched off)\n"; + + + cout << + "\t-l \twhen output as text or HTML: number of bases shown in\n" + "\t\t\t one alignment line. Default: 60.\n" + "\t-c \twhen output as text or HTML: character used to pad\n" + "\t\t\t endgaps. Default: ' ' (blank)\n"; + + cout << "\nExamples:\n" + "\tmiraconvert source.maf dest.sam\n" + "\tmiraconvert source.caf dest.fasta wig ace\n" + "\tmiraconvert -x 2000 -y 10 source.caf dest.caf\n"; +} + + +bool ConvPro::checkForFromType(const string & ftype) +{ + static set ftypes={ + "caf", + "maf", + "phd", + "gbf", + "gbff", + "gbfk", + "gff3", + "fasta", + "fastq", + "fofnexp" + }; + return ftypes.find(ftype)!=ftypes.end(); +} + +bool ConvPro::checkForToType(const string & ttype) +{ + static set ttypes={ + "fasta", + "fastq", + "maskedfasta", + "caf", + "maf", + "sam", + "samnbb", + "ace", + "scaf", + "exp", + "gbf", + "gff3", + "tcs", + "text", + "txt", + "html", + "wiggle", + "wig", + "gcwiggle", + "gcwig", + "asnp", + "fcov", + "hsnp", + "cstats", + "crlist", + "null" + }; + return ttypes.find(ttype)!=ttypes.end(); +} + +void ConvPro::checkTypes(const string & fromtype,list & totype) +{ + if(!checkForFromType(fromtype)){ + usage(); + cout << endl; + cerr << "Unknown or illegal file type '" << fromtype << "' defined as \n"; + exit(1); + } + if(CP_totype.empty()){ + CP_totype.push_back(fromtype); + } + for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI){ + if(!checkForToType(*ttI)){ + usage(); + cout << endl; + cerr << "ConvPro::checkTypes: Unknown or illegal file type '" << *ttI << "' defined as \n"; + exit(1); + } + } +} + +// comfort function: parse fromtype and totype from name of infile, outfile +void ConvPro::guessFromAndToType(const string & fnamefrom, string & fromtype, string * fromstem, const string & fnameto, list & totypes, string * tostem) +{ + uint8 ziptype=0; + string ft; + string dummyfromstem; + string dummypathto; + guessFileAndZipType(fnamefrom,dummypathto,dummyfromstem,ft,ziptype); + if(fromtype.empty()){ + fromtype.swap(ft); + } + if(fromstem != nullptr) { + fromstem->swap(dummypathto); + if(!dummypathto.empty() && dummypathto!="/"){ + *fromstem+='/'; + } + *fromstem+=dummyfromstem; + } + + string dummytostem; + ft.clear(); + guessFileAndZipType(fnameto,dummypathto,dummytostem,ft,ziptype); + if(!ft.empty() && checkForToType(ft)){ + totypes.push_back(ft); + if(dummytostem.empty()) dummytostem=dummyfromstem; + if(tostem != nullptr) { + *tostem=dummypathto; + if(!dummypathto.empty() && dummypathto!="/"){ + *tostem+='/'; + } + *tostem+=dummytostem; + } + } + //cout << "dfs: " << dummyfromstem << " dpt: " << dummypathto << " dts: " << dummytostem << endl; +} + + +void ConvPro::filterToReadGroup(ReadPool & rp) +{ + FUNCSTART("void ConvPro::filterToReadGroup(ReadPool & rp)"); + + vector ofspassed(ReadGroupLib::getNumReadGroups()); + vector ofswidow(ReadGroupLib::getNumReadGroups()); + vector ofsdebris(ReadGroupLib::getNumReadGroups()); + + deque seenrgnames; + for(uint32 rglid=1; rglid(rglid)+"_passed.fastq"; + } + for(auto & sn : seenrgnames){ + if(sn==rgname){ + cout << "\nReadgroup '"< sortdummy; + rp.sortPoolToMIRAStandard(sortdummy); + } + vector hasmultisegmentemplates(ReadGroupLib::getNumReadGroups(),false); + for(uint32 rpi=0; rpi< rp.size(); ++rpi){ + if(rp[rpi].getTemplatePartnerID()!=-1){ + hasmultisegmentemplates[rp[rpi].getReadGroupID().getLibId()]=true; + } + } + hasmultisegmentemplates[0]=false; + + for(uint32 rpi=0; rpi< rp.size(); ){ + bool allok=true; + auto lasti=rpi; + for(; lasti0 && rp[lasti].getLenSeq()0 && rp[rpi].getLenSeq()>=CP_mincontiglength){ + ofswidow[rp[rpi].getReadGroupID().getLibId()] << rp[rpi]; + }else{ + ofsdebris[rp[rpi].getReadGroupID().getLibId()] << rp[rpi]; + } + } + } + } + +} + + +#define CEBUG(bla) //{cout << bla; cout.flush();} +void ConvPro::specialTestCode(list & clist, ReadPool & rp) +{ + FUNCSTART("void ConvPro::specialTestCode(list & clist, ReadPool & rp)"); + try { + for(auto cI=clist.begin(); cI!=clist.end(); ++cI){ + cI->findBestNonMisassembledRange(); + cout << "CHecking: " << cI->getContigName() << endl; + if(cI->getContigLength()>=1000){ + auto p=cI->findBestPairConsistencyRange(); + if(p.first>=0) cout << "Found best range: " << cI->getContigName() << "\t" << p.first << "\t" << p.second << "\t" << p.second-p.first << endl; + } + + + if(1){ + auto range=cI->findBestNonMisassembledRange(); + if(range.first>=0){ + cout<<"Found misassembly by repeat marker. Best range: " << range.first << ".." << range.second << '\t' << range.second-range.first << endl; + cI->trimContigToRange(range.first,range.second); + + } + } + + if(1){ + coverageinfo_t cinfo; + vector covvals; + cI->collectCoverage(covvals); + cI->calcStatsOnContainer(cinfo,covvals); + cout << "1st covnum: " << cinfo << endl; + + // TODO: perhaps make this dependend of ratio mean vs stddev ? + cI->calcSecondOrderStatsOnContainer(cinfo,covvals); + cout << "2nd covnum: " << cinfo << endl; + + vector peakindicator; + cI->findPeaks(cinfo.median,peakindicator); + unordered_set readsremoved; + cI->reduceReadsAtCoveragePeaks(cinfo.median,peakindicator,readsremoved); + cout << "Removed " << readsremoved.size() << endl; + } + + +// vector readsmarkedsrm; +// if(1){ +// cout << "\nMarking tricky 454 / Solexa overcalls in temporary contig.\n"; +// cout << "Marked " << I->editTrickyOvercalls(true,false,readsmarkedsrm) << " reads.\n"; +// bool newreptmarked=Assembly::markRepeats(*I, readsmarkedsrm); +// cout << "Edited " << I->editTrickyOvercalls(false,false,readsmarkedsrm) << " reads.\n"; +// I->deleteStarOnlyColumns(0, I->getContigLength()-1); +// I->deleteTagsInReads(Read::REA_defaulttag_PSHP.identifier); +// } +// I->markFeaturesByConsensus(true,true,true); +// I->editSingleDiscrepancyNoHAFTag(readsmarkedsrm); +// assout::saveReadTagList(*I, +// "blabla", +// true); + + +// uint32 numcoledits=0; +// uint32 numreadedits=0; +// for(uint32 i=0; i<5; ++i){ +// I->editPBSledgeHammer(readsmarkedsrm,numcoledits,numreadedits); +// cout <<"### i " << i << " " << numcoledits << " " << numreadedits << endl; +// I->deleteStarOnlyColumns(0,I->getContigLength()); +// //I->upDownCase(5); +// } + + } + } +// try{ +// for(auto & cle : clist){ +// auto & cr=cle.getContigReads(); +// for(auto & cre : cr){ +// Read & r=const_cast(cre); +// if(r.isBackbone()){ +// cout << "Sorting " << r.getName() << endl; +// r.sortTagsForGFF3(); +// } +// } +// } +// } + catch(Notify n){ + n.handleError(THISFUNC); + } + FUNCEND(); +} +#undef CEBUG + + + +void ConvPro::putReadsInContigsAndSave(vector & Pv, ReadPool & rp) +{ + for(uint32 i=0; i & Pv, ReadPool & rp, uint32 minlength, bool fromclipped) +{ + for(uint32 i=0; igetContigName(); + }else if(actread != nullptr){ + if(!filename.empty()) filename+='_'; + filename+=actread->getName(); + } + filename+=postfix; + return filename; +} + + +bool ConvPro::contig__nameordercomp(const Contig & a, const Contig & b) +{ + return General::getNameOrder(a.getContigName()) < General::getNameOrder(b.getContigName()); +} + + +void ConvPro::sortContigsByName(list & clist) +{ + clist.sort(contig__nameordercomp); +} + + +void ConvPro::sortPoolByName(ReadPool & rp, string & filename) +{ + FUNCSTART("void ConvPro::sortPoolByName(ReadPool & rp, string & filename)"); + + cout << "Sorting pool ..."; cout.flush(); + + rp.allowNameIndex(true); + + ifstream fin; + openIFStream(fin,filename, ios::in); + + vector newsortorder; + + string elemname, dummy; + uint32 numread=0; + while(GeneralIO::readKeyValue(fin, elemname,dummy)){ + int32 newpos=rp.getReadIndex(elemname); + if(newpos>=0) newsortorder.push_back(static_cast(newpos)); + } + fin.close(); + + rp.sortPoolToGivenOrder(newsortorder); + + rp.allowNameIndex(false); + + cout << "done.\n"; + + FUNCEND(); +} + +void ConvPro::saveContigList_helper(list & clist, ReadPool & rp) +{ + FUNCSTART("void ConvPro::saveContigList_helper(list & clist, ReadPool & rp)"); + + if(CP_specialtestcode) specialTestCode(clist,rp); + + //{ + // cout << "CLISTSIZE: " << clist.size() << endl; + // list::iterator cI=clist.begin(); + // for(; cI != clist.end(); cI++){ + // cout << "cname: " << cI->getContigName() << endl; + // } + //} + + BUGIFTHROW(!CP_ofs.empty() && CP_ofs.size() != CP_totype.size(), "Ooops? !CP_ofs.empty() && CP_ofs.size() != CP_totype.size() ???"); + + list::iterator ofsI= CP_ofs.begin(); + list::iterator ttI= CP_totype.begin(); + for(; ttI!=CP_totype.end(); ++ttI, ++ofsI){ + if(*ttI=="null"){ + // do nothing + }else if(*ttI=="scaf"){ + //clear_conandrp=false; + }else if(*ttI=="hsnp"){ + MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); + string fn; + if(CP_splitcontigs2singlefiles){ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_snpenvironment, + ".html", + &clist.front()); + }else{ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_snpenvironment, + ".html"); + } + assout::saveSNPSurroundingAsHTML(clist,fn,CP_mustdeletetargetfiles); + }else if(*ttI=="cstats"){ + MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); + string fn; + if(CP_splitcontigs2singlefiles){ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_contigstats, + ".txt", + &clist.front()); + }else{ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_contigstats, + ".txt"); + } + assout::saveStatistics(clist,fn,CP_mustdeletetargetfiles); + if(CP_splitcontigs2singlefiles){ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_contigtags, + ".txt", + &clist.front()); + }else{ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_contigtags, + ".txt"); + } + assout::saveConsensusTagList(clist,fn,CP_mustdeletetargetfiles); + }else if(*ttI=="crlist"){ + MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); + string fn; + if(CP_splitcontigs2singlefiles){ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_crlist, + ".txt", + &clist.front()); + }else{ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_crlist, + ".txt"); + } + assout::saveContigReadList(clist,fn,CP_mustdeletetargetfiles); + }else if(*ttI=="asnp"){ + MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); + string fn,fa,fs,fc; + + if(CP_splitcontigs2singlefiles){ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_snpanalysis, + ".txt", + &clist.front()); + fa=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featureanalysis, + ".txt", + &clist.front()); + fs=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresummary, + ".txt", + &clist.front()); + fc=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresequences, + ".txt", + &clist.front()); + }else{ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_snpanalysis, + ".txt"); + fa=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featureanalysis, + ".txt"); + fs=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresummary, + ".txt"); + fc=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresequences, + ".txt"); + } + + assout::saveSNPList(clist,fn,CP_mustdeletetargetfiles); + assout::saveFeatureAnalysis(clist,rp, + fa,fs,fc, + CP_mustdeletetargetfiles); + + }else if(*ttI=="fcov"){ + MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); + string fn,fa,fs,fc; + + if(CP_splitcontigs2singlefiles){ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featurecoverage, +// "coveragei", + ".txt", + &clist.front()); + }else{ + fn=createFileNameFromBasePostfixContigAndRead( + CP_Pv[0].getAssemblyParams().as_outfile_stats_featurecoverage, +// "coveragei", + ".txt"); + } + + assout::saveCoverageInfo(clist,fn,CP_mustdeletetargetfiles); + }else if(*ttI=="fasta"){ + //CALLGRIND_START_INSTRUMENTATION; + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ""); + } + assout::saveStrainsAsFASTAQ(clist, + rp, + bn, + false, + CP_minbasecoverage, + CP_minqual, + CP_mustdeletetargetfiles, + CP_fillholesinstraingenomes); + }else if(*ttI=="fastaqual"){ + // fastaqual is "do-nothing" as "fasta" also write fastaqual here! + }else if(*ttI=="fastq"){ + //CALLGRIND_START_INSTRUMENTATION; + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ""); + } + assout::saveStrainsAsFASTAQ(clist, + rp, + bn, + true, + CP_minbasecoverage, + CP_minqual, + CP_mustdeletetargetfiles, + CP_fillholesinstraingenomes); + } else if(*ttI=="caf"){ + Contig::setCoutType(Contig::AS_CAF); + list::iterator I=clist.begin(); + for(;I!=clist.end(); I++){ + if(CP_recalcfeatureopt=='f') I->markFeaturesByConsensus(true,true,true); + if(CP_recalcfeatureopt=='r') { + vector dummy; + Contig::repeatmarker_stats_t contigrepstats; + Assembly::markRepeats(*I,dummy,contigrepstats); + } + bool mustclose=false; + if(!(*ofsI)->is_open()){ + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".caf", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".caf", + nullptr); + } + openOFStream(*(*ofsI),bn,ios::out); + mustclose=true; + } + *(*ofsI) << *I; + if(mustclose){ + (*ofsI)->close(); + } + } + } else if(*ttI=="sam"){ + BUGIFTHROW(!(*ofsI)->is_open(),"Ooops, SAM stream not open?"); + for(auto & cle : clist){ + cle.dumpAsSAM(*(*ofsI),CP_samcollect,true); + } + } else if(*ttI=="samnbb"){ + BUGIFTHROW(!(*ofsI)->is_open(),"Ooops, SAM stream not open?"); + for(auto & cle : clist){ + cle.dumpAsSAM(*(*ofsI),CP_samcollect,false); + } + } else if(*ttI=="maf"){ + Contig::setCoutType(Contig::AS_MAF); + list::iterator I=clist.begin(); + for(;I!=clist.end(); I++){ + if(CP_recalcfeatureopt=='f') I->markFeaturesByConsensus(true,true,true); + if(CP_recalcfeatureopt=='r') { + vector dummy; + Contig::repeatmarker_stats_t contigrepstats; + Assembly::markRepeats(*I,dummy,contigrepstats); + } + if(!(*ofsI)->is_open()){ + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".maf", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".maf", + nullptr); + } + openOFStream(*(*ofsI),bn,ios::out); + Contig::dumpMAF_Head(*(*ofsI)); + } + *(*ofsI) << *I; + if(CP_splitcontigs2singlefiles){ + (*ofsI)->close(); + } + } + } else if(*ttI=="html"){ + //cerr << "HTML output currently deactivated in development version!\n"; + //exit(1); + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".html", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".html"); + } + assout::dumpContigListAsHTML(clist, bn, CP_mustdeletetargetfiles, CP_outbasename); + } else if(*ttI=="text" + || *ttI=="txt"){ + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".txt", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".txt"); + } + assout::saveAsTXT(clist, bn, CP_mustdeletetargetfiles); + } else if(*ttI=="exp"){ + // outbasename is in this case a directory name + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ""); + } + assout::saveAsGAP4DA(clist,bn,CP_mustdeletetargetfiles); + } else if(*ttI=="gbf"){ + // outbasename is in this case the basename name + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ""); + } + assout::saveStrainsAsGBF(clist, + rp, + bn, + CP_minqual, + CP_fillholesinstraingenomes, + CP_mustdeletetargetfiles); + } else if(*ttI=="gff3"){ + // outbasename is in this case the basename name + list::iterator cI=clist.begin(); + for(; cI != clist.end(); ++cI){ + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "", + &clist.front()); + if(CP_gffsave.is_open()){ + CP_gffsave.close(); + } + CP_gffsave.open(bn); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ""); + if(!CP_gffsave.is_open()){ + CP_gffsave.open(bn); + } + } + CP_gffsave.acquireContig(*cI,rp); + } + } else if(*ttI=="ace"){ + // outbasename is in this case the basename name + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".ace", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".ace"); + } + assout::saveAsACE(clist,bn,CP_mustdeletetargetfiles); + } else if(*ttI=="tcs"){ + // outbasename is in this case the basename name + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".tcs", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".tcs"); + } + assout::saveAsTCS(clist,bn,CP_mustdeletetargetfiles); + } else if(*ttI=="wiggle" || *ttI=="wig"){ + // outbasename is in this case the basename name + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".wig", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + ".wig"); + } + assout::saveAsWiggle(clist,bn,CP_mustdeletetargetfiles,false); + } else if(*ttI=="gcwiggle" || *ttI=="gcwig"){ + // outbasename is in this case the basename name + string bn; + if(CP_splitcontigs2singlefiles){ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "_gccontent.wig", + &clist.front()); + }else{ + bn=createFileNameFromBasePostfixContigAndRead( + CP_outbasename, + "_gccontent.wig"); + } + assout::saveAsWiggle(clist,bn,CP_mustdeletetargetfiles,true); + } else { + cerr << "\n\n-t " << *ttI << " is not a valid 'to' type when converting contigs (sorry). But maybe something went wrong, please contact the author.\n"; + exit(1); + } + } + + if(!CP_splitcontigs2singlefiles){ + CP_mustdeletetargetfiles=false; + } + + FUNCEND(); +} + +void ConvPro::saveContigList(list & clist, ReadPool & rp) +{ + FUNCSTART("void ConvPro::saveContigList(list & clist, ReadPool & rp)"); + bool dosomeoutput=false; + + list::iterator cI=clist.begin(); + for(; cI != clist.end(); cI++){ + bool conout=true; + + if(CP_mincontiglength>0 + && cI->getContigLength() < CP_mincontiglength){ + conout=false; + } else { + Contig::constats_t constats(cI->getStats()); + + //cI->stats(cout); + + if(CP_mincontigcoverage>0 + && constats.avg_coverage < CP_mincontigcoverage){ + conout=false; + } else if(CP_minnumreads>0 + && constats.total_reads < CP_minnumreads){ + conout=false; + } + } + + if(conout){ + if(General::hasNames()){ + string cname(cI->getContigName()); + if(!General::checkNamePresence(cname)){ + conout=false; + } + if(!CP_keepnamesfromfile) conout=!conout; + } + } + + // delete contigs which should not be output + // TODO: + // would generally be better to have that in some loading callback (and + // would work for contigs well enough), but readpool mechanisms would + // not at the moment, too primitive + if(!conout){ + cI=clist.erase(cI); + if(cI != clist.begin()) --cI; + } + + dosomeoutput|=conout; + } + + if(dosomeoutput){ + for(cI=clist.begin(); cI != clist.end(); cI++){ + if(CP_deletestaronlycolumns) { + cI->deleteStarOnlyColumns(0,cI->getContigLength()); + } + if(CP_blinddata){ + cI->blindContig(); + } + } + + Assembly::refreshContigAndReadpoolValuesAfterLoading(rp,clist); + + string dummyempty; + // TODO: ! make autoconfigure: on several strains, this is needed! + // else, let user define via switch + for(cI=clist.begin(); cI != clist.end(); cI++){ + if(CP_recalcconopt=='c' + || CP_recalcconopt=='C'){ + cI->trashConsensusCache(false); + } + if(CP_recalcconopt=='q'){ + cI->trashConsensusCache(true); + } + + CP_assemblyinfo.storeContigStats(cI->getStats(), dummyempty); + } + + try{ + saveContigList_helper(CP_clist, rp); + } + catch(Notify n){ + n.handleError(THISFUNC); + } + } +} + +void ConvPro::saveReadPool(ReadPool & rp, list & ofs) +{ + FUNCSTART("void ConvPro::saveReadPool(ReadPool & rp, list & ofs)"); + + rp.adjustIllegalQualities(30); + + if(CP_deletestaronlycolumns) { + for(uint32 i=0; i0 && !CP_filter2readgroup){ + discardShortReads(CP_Pv,rp,CP_mincontiglength,CP_minlengthisclipped); + } + + if(!CP_renamesequences.empty()){ + if(!CP_renamenamescheme.empty()){ + for(size_t i=1; i readrenamed(rp.size(),0); + string tmpname; + for(uint32 rpi=0; rpi=0 && readrenamed[rp[rpi].getTemplatePartnerID()]){ + tmpname=rp[rp[rpi].getTemplatePartnerID()].getTemplate(); + }else{ + tmpname=CP_renamesequences+"_"+boost::lexical_cast(CP_readrenamecounter++); + } + auto segment=rp[rpi].getTemplateSegment(); + if(rp[rpi].getReadNamingScheme()==ReadGroupLib::SCHEME_SOLEXA){ + if(rp[rpi].getTemplateSegment()==1){ + tmpname+="/1"; + }else if(rp[rpi].getTemplateSegment()==255){ + tmpname+="/2"; + }else if(rp[rpi].getTemplateSegment()!=0){ + BUGIFTHROW(true,"Read " << rp[rpi].getName() << " has illegal segment " << static_cast(rp[rpi].getTemplateSegment()) << " ???"); + } + } + rp[rpi].setTemplate(""); + rp[rpi].setTemplateSegment(0); + rp[rpi].setName(tmpname); + readrenamed[rpi]=1; + } + } + + if(CP_makecontigs) { + putReadsInContigsAndSave(CP_Pv, rp); + }else if(CP_filter2readgroup){ + filterToReadGroup(rp); + }else{ + list::iterator ttI= CP_totype.begin(); + list::iterator ofsI= ofs.begin(); + for(; ttI!=CP_totype.end(); ++ttI, ++ofsI){ + bool needofsIclose=false; + // BaCh 16.01.2012: changed != below to == ... was probably a simple programming error (I hope) + if(*ttI=="gff3"){ + if(!CP_splitcontigs2singlefiles){ + BUGIFTHROW(!(*(*ofsI)).is_open(), *ttI << " file stream not open???"); + } + openOFStream((*(*ofsI)),rp[0].getName()+'.'+*ttI,ios::out); + needofsIclose=true; + } + if(*ttI=="fasta"){ + // double indirection because iterator needs one and it is a list of ofstream pointers ... + rp.dumpAs(*(*ofsI),Read::AS_FASTA,false); + } else if(*ttI=="fastaqual"){ + rp.dumpAs(*(*ofsI),Read::AS_FASTAQUAL,false); + } else if(*ttI=="maskedfasta"){ + rp.dumpAs(*(*ofsI),Read::AS_MASKEDMASKFASTA,false); + } else if(*ttI=="maskedfastaqual"){ + rp.dumpAs(*(*ofsI),Read::AS_MASKEDMASKFASTAQUAL,false); + } else if(*ttI=="fastq"){ + rp.dumpAs(*(*ofsI),Read::AS_FASTQ,false); + } else if(*ttI=="caf" || *ttI=="scaf" ){ + rp.dumpAs(*(*ofsI),Read::AS_CAF,false); + } else if(*ttI=="maf"){ + //rp.dumpAs(*(*ofsI),Read::AS_MAF,false); + rp.saveAsMAF(*(*ofsI),false); + } else if(*ttI=="gff3"){ + for(uint32 rpi=0; rpi & ofs) +{ + FUNCSTART("uint32 ConvPro::openOFSlist(Contig * optcontig, list & ofs)"); + BUGIFTHROW(CP_totype.empty(), " CP_totype.empty() ???"); + + uint32 mustclose=0; + ofstream * ofstmp; + + for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI){ + + cout << "opening " << *ttI << endl; + + ofstmp=new ofstream; + ofs.push_back(ofstmp); + if(*ttI=="fasta"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="fastaqual"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="maskedfasta"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="maskedfastaqual"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="fastq"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fastq",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="caf" || *ttI=="scaf" ){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".caf",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="maf"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".maf",optcontig),ios::out); + Contig::dumpMAF_Head(*(ofs.back())); + ++mustclose; + } else if(*ttI=="sam" || *ttI=="samnbb"){ + openOFStream(*ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".sam",optcontig),ios::out); + ++mustclose; + } else if(*ttI=="gff3"){ + if(CP_gffsave.is_open()) CP_gffsave.close(); + CP_gffsave.open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".gff3",optcontig)); + } + } + return mustclose; +} + +void ConvPro::closeOFSList(uint32 howmany, list & ofs) +{ + FUNCSTART("uint32 ConvPro::closeOFSList(uint32 howmany)"); + BUGIFTHROW(howmany>ofs.size(),"howmany>ofs.size() ???"); + for(uint32 i=0; i & clist, ReadPool & rp) +{ + FUNCSTART("void ConvPro::cafmafload_callback(list & clist, ReadPool & rp)"); + BUGIFTHROW(clist.empty() && rp.size()==0,"clist.empty() && rp.size()==0"); + { + list::iterator cI=clist.begin(); + for(; cI != clist.end(); ++cI){ + if(!CP_renamesequences.empty()){ + cI->setContigName(""); + cI->setContigNamePrefix(CP_renamesequences); + } + } + } + if(!clist.empty() && !CP_extractreadsinsteadcontigs){ + saveContigList(clist,rp); + }else{ + list ofs; + uint32 mustclose=0; + if(CP_splitcontigs2singlefiles && !clist.empty()){ + mustclose=openOFSlist(&clist.front(),ofs); + saveReadPool(rp,ofs); + }else{ + saveReadPool(rp,CP_ofs); + } + closeOFSList(mustclose,ofs); + } + + Read::trashReadNameContainer(); + clist.clear(); + rp.discard(); +} + +void ConvPro::readpoolload_callback(ReadPool & rp) +{ + saveReadPool(rp,CP_ofs); + + Read::trashReadNameContainer(); + rp.discard(); +} + + +void ConvPro::closeOpenStreams(list & ofsl) +{ + list::iterator ofsI= ofsl.begin(); + for(; ofsI!=ofsl.end(); ++ofsI){ + delete *ofsI; + } +} + +void ConvPro::openOFStream(std::ofstream & ofs, std::string fname, std::ios_base::openmode mode) +{ + FUNCSTART("void ConvPro::openOFStream(std::ofstream & ofs, std::string fname, std::ios_base::openmode mode)"); + ofs.open(fname,mode); + if(ofs.fail()){ + MIRANOTIFY(Notify::FATAL,"File " << fname << " could not be opened for writing. Possible causes: non-existing or write protected directory; disk quota exceeded; others."); + } +} + +void ConvPro::openIFStream(std::ifstream & ifs, std::string fname, std::ios_base::openmode mode) +{ + FUNCSTART("void ConvPro::openOFStream(std::ofstream & ofs, std::string fname, std::ios_base::openmode mode)"); + ifs.open(fname,mode); + if(ifs.fail()){ + MIRANOTIFY(Notify::FATAL,"File " << fname << " could not be opened for reading. Possible causes: non-existing directory; not allowed to read directory or file; others."); + } +} + + +int ConvPro::mainConvPro(int argc, char ** argv) +{ + //CALLGRIND_STOP_INSTRUMENTATION; + + FUNCSTART("int mainConvPro(int argc, char ** argv)"); + + int c; + extern char *optarg; + extern int optind; + + //base_quality_t fqqualoffset=0; + string fqqualoffset("33"); + + string strainfile=""; + + int32 linelen=60; + char endgap_fillchar=' '; + + string miraparams; + + //"CZihumMsl:r:c:f:t:s:q:n:N:v:x:X:y:z:o:a:" + const char pstring[]= + "abCdFhimMsuvZ" + "A:c:f:l:n:N:o:q:Q:r:R:S:t:x:X:y:z:"; + + while (1){ + c = getopt(argc, argv, pstring); + if(c == -1) break; + + switch (c) { + case 'v': { + cout << MIRAVERSION << endl; + exit(0); + } + case '?': { + cerr << "Use '-h' to get a short online help." << endl; + exit(100); + } + case 'h': { + usage(); + exit(0); + } + + case 'a': { + CP_mustdeletetargetfiles=false; + break; + } + case 'A': { + miraparams=optarg; + break; + } + case 'b': { + CP_blinddata=true; + break; + } + case 'c': { + string egfc=optarg; + if(egfc.size()!=1){ + usage(); + cout << endl; + cerr << "ERROR: -c must be a single character\n"; + exit(1); + } + endgap_fillchar=egfc[0]; + break; + } + case 'C': { + CP_hardtrim=true; + break; + } + case 'd': { + CP_deletestaronlycolumns=true; + break; + } + case 'f': { + CP_fromtype=optarg; + break; + } + case 'F': { + CP_filter2readgroup=true; + break; + } + case 'i': { + CP_keepnamesfromfile=false; + break; + } + case 'l': { + linelen=atoi(optarg); + if(linelen <= 0) { + usage(); + cout << endl; + cerr << "ERROR: -l must be >=0\n"; + exit(1); + } + break; + } + case 'm': { + CP_makecontigs=true; + CP_extractreadsinsteadcontigs=false; + break; + } + case 'M': { + CP_extractreadsinsteadcontigs=true; + CP_makecontigs=false; + break; + } + case 'n': { + CP_namefile=optarg; + break; + } + case 'N': { + CP_namefile=optarg; + CP_sortbyname=true; + break; + } + case 'o': { + fqqualoffset=optarg; + break; + } + case 'q': { + CP_minqual=atoi(optarg); + if(CP_minqual >100) { + usage(); + cout << endl; + cerr << "ERROR: -q must be <= 100\n"; + exit(1); + } + break; + } + case 'Q': { + auto tmpv=atoi(optarg); + if(tmpv<0 || tmpv > 100) { + usage(); + cout << endl; + cerr << "ERROR: -Q must be 0 <= value <= 100\n"; + exit(1); + } + CP_defaultqual=tmpv; + CP_needsquality=false; + break; + } + case 'r': { + string rrr=optarg; + for(size_t si=0; si::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI){ + ofstmp=new ofstream; + CP_ofs.push_back(ofstmp); + cout << ' ' << *ttI; + if(*ttI=="fasta"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta"),ios::out); + } + CP_totype.push_back("fastaqual"); + } else if(*ttI=="fastaqual"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual"),ios::out); + } + } else if(*ttI=="maskedfasta"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta"),ios::out); + } + CP_totype.push_back("maskedfastaqual"); + } else if(*ttI=="maskedfastaqual"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual"),ios::out); + } + } else if(*ttI=="fastq"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fastq"),ios::out); + } + } else if(*ttI=="caf" || *ttI=="scaf" ){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".caf"),ios::out); + } + } else if(*ttI=="maf"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".maf"),ios::out); + Contig::dumpMAF_Head(*(CP_ofs.back())); + } + } else if(*ttI=="sam" || *ttI=="samnbb"){ + if(!CP_splitcontigs2singlefiles){ + openOFStream(*CP_ofs.back(),createFileNameFromBasePostfixContigAndRead(CP_outbasename,".sam"),ios::out); + } + } else if(*ttI=="gff3"){ + if(!CP_splitcontigs2singlefiles){ + CP_gffsave.open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,"").c_str()); + } + } else if(*ttI=="hsnp"){ + } else if(*ttI=="asnp"){ + } else if(*ttI=="fcov"){ + } else if(*ttI=="cstats"){ + } else if(*ttI=="crlist"){ + } else if(*ttI=="html"){ + } else if(*ttI=="text"){ + } else if(*ttI=="txt"){ + } else if(*ttI=="exp"){ + } else if(*ttI=="gbf"){ + } else if(*ttI=="gff3"){ + } else if(*ttI=="ace"){ + } else if(*ttI=="tcs"){ + } else if(*ttI=="wiggle" || *ttI=="wig"){ + } else if(*ttI=="gcwiggle" || *ttI=="gcwig"){ + } else if(*ttI=="null"){ + } else { + BUGIFTHROW(true,"should never arrive here!"); + } + } + cout << '\n'; + + auto cpofsI=CP_ofs.begin(); + for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI, ++cpofsI){ + if(*ttI=="sam" || *ttI=="samnbb"){ + if(CP_fromtype=="maf"){ + cout << "Collecting basic SAM info from MAF file" << endl; + CP_samcollect.processMAF(CP_infile); + CP_samcollect.createSAMHeader(); + *(*cpofsI) << CP_samcollect.SAMC_headerstring; + ReadGroupLib::discard(); + }else{ + cout.flush(); + cerr << "\n\ncan only convert MAF to SAM for the time being, sorry\n"; + exit(1); + } + } + } + + try{ + if(CP_fromtype=="caf" || CP_fromtype=="maf") { + void (*usecallback)(list &, ReadPool &) = cafmafload_callback; + if(CP_sortbyname){ + usecallback=nullptr; + } + + if(CP_fromtype=="caf") { + CAF tcaf(&thepool, &CP_clist, &CP_Pv); + vector dummy; + tcaf.load(CP_infile.c_str(), + ReadGroupLib::SEQTYPE_SANGER, + 1, + dummy, + false, + usecallback + ); + }else if(CP_fromtype=="maf") { + MAFParse mafp(&thepool, &CP_clist, &CP_Pv); + vector dummy; + mafp.load(CP_infile.c_str(), + ReadGroupLib::SEQTYPE_SANGER, + 1, + dummy, + false, + usecallback, + nullptr + ); + } + if(!CP_clist.empty() && usecallback==nullptr){ + sortContigsByName(CP_clist); + cafmafload_callback(CP_clist,thepool); + }else if(thepool.size()!=0){ + if(CP_sortbyname) sortPoolByName(thepool,CP_namefile); + cafmafload_callback(CP_clist,thepool); + } + }else{ + if(CP_fromtype=="fasta" + || CP_fromtype=="fastq" + || CP_fromtype=="fofnexp" + || CP_fromtype=="gbf" + || CP_fromtype=="gff3"){ + cout << "Loading data from " << CP_fromtype << " ..."; + + string fn2; + if(CP_fromtype=="fasta"){ + fn2=CP_infile+".qual"; + }else if(CP_fromtype=="fastq"){ + fn2=fqqualoffset; + } + + ReadGroupLib::ReadGroupID rgid=ReadGroupLib::newReadGroup(); + rgid.setSequencingType(ReadGroupLib::SEQTYPE_TEXT); + rgid.setDefaultQual(CP_defaultqual); + + string loadtype(CP_fromtype); + if(loadtype=="fasta" && !CP_needsquality){ + loadtype="fastanoqual"; + } + + bool canusecallback=true; + if(CP_sortbyname){ + canusecallback=false; + }else{ + int32 dummy=-1; + if(!fqqualoffset.empty()){ + dummy=atoi(fqqualoffset.c_str()); + } + if(0==dummy){ + cout << "\nFor guessing the FASTQ offset, more RAM will be used as the full file needs to load into memory."; + canusecallback=false; + } + } + + if(canusecallback){ + thepool.loadData_rgid(loadtype, CP_infile, fn2, rgid, false, readpoolload_callback); + }else{ + thepool.loadData_rgid(loadtype, CP_infile, fn2, rgid, false, nullptr); + if(CP_sortbyname){ + sortPoolByName(thepool,CP_namefile); + } + readpoolload_callback(thepool); + } + } else { + cerr << "\n\n-f " << CP_fromtype << " is not a valid from type! (simple pool)\n"; + //usage(); + exit(1); + } + cout << " done.\n"; + } + } + catch(Notify n){ + // Need to close by hand as handleError() will perform a hard exit + closeOpenStreams(CP_ofs); + n.handleError(THISFUNC); + } + catch(Flow f){ + cerr << "Unexpected exception: Flow()\n"; + } + catch(...){ + cout.flush(); + cerr.flush(); + cerr << "Unknown exception caught, aborting the process.\n\nPlease contact: bach@chevreux.org\n\n"; + abort(); + } + + cout << "\nData conversion process finished, no obvious errors encountered.\n"; + + FUNCEND(); + return 0; +} diff -Nru mira-3.9.18/src/modules/mod_convert.H mira-4.0/src/modules/mod_convert.H --- mira-3.9.18/src/modules/mod_convert.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_convert.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,143 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include + +#include +#include +#include + +#include "mira/parameters.H" +#include "mira/readpool.H" +#include "mira/contig.H" +#include "mira/assembly.H" +#include "mira/sam_collect.H" +#include "mira/gff_save.H" + +class ConvPro +{ +private: + static std::vector CP_Pv; + + static std::string CP_fromtype; + static std::list CP_totype; + + static std::list CP_ofs; + + + static std::string CP_infile; + static std::string CP_outbasename; + + static std::string CP_renamesequences; + static std::string CP_renamenamescheme; + + static bool CP_splitcontigs2singlefiles; + + static bool CP_deletestaronlycolumns; + static bool CP_blinddata; + static bool CP_fillholesinstraingenomes; + static bool CP_makecontigs; + static bool CP_extractreadsinsteadcontigs; + static bool CP_hardtrim; + + static std::string CP_namefile; + static bool CP_keepnamesfromfile; + static bool CP_sortbyname; + + static bool CP_mustdeletetargetfiles; + + static bool CP_specialtestcode; + + static bool CP_filter2readgroup; + + static base_quality_t CP_minqual; + static bool CP_needsquality; + static base_quality_t CP_defaultqual; + + static char CP_recalcconopt; + static char CP_recalcfeatureopt; + + static uint32 CP_minbasecoverage; + + static uint32 CP_mincontiglength; + static bool CP_minlengthisclipped; + + static uint32 CP_mincontigcoverage; + static uint32 CP_minnumreads; + + static std::list CP_clist; // needed for CAF & MAF conversion (and GBF) + static AssemblyInfo CP_assemblyinfo; + + static uint64 CP_readrenamecounter; + static GFFSave CP_gffsave; + static SAMCollect CP_samcollect; + +private: + static void usage(); + static void checkTypes(const std::string & fromtype,std::list & totype); + static void putReadsInContigsAndSave(std::vector & Pv, ReadPool & rp); + static void discardShortReads(std::vector & Pv, ReadPool & rp, uint32 minlength, bool fromclipped); + static void specialTestCode(std::list & clist, ReadPool & rp); + + static void filterToReadGroup(ReadPool & rp); + + static bool contig__nameordercomp(const Contig & a, const Contig & b); + static void sortContigsByName(std::list & clist); + static void sortPoolByName(ReadPool & rp, std::string & filename); + + static void saveContigList(std::list & clist, ReadPool & rp); + static void saveContigList_helper(std::list & clist, ReadPool & rp); + + static void saveReadPool(ReadPool & rp, std::list & ofs); + static void cafmafload_callback(std::list & clist, ReadPool & rp); + static void readpoolload_callback(ReadPool & rp); + static std::string createFileNameFromBasePostfixContigAndRead(const std::string & basename, + char * postfix, + Contig * actcon = nullptr, + Read * actread = nullptr); + static uint32 openOFSlist(Contig * optcontig, std::list & ofs); + static void closeOFSList(uint32 howmany, std::list & ofs); + + static void openIFStream(std::ifstream & ifs, std::string fname, std::ios_base::openmode mode); + static void openOFStream(std::ofstream & ofs, std::string fname, std::ios_base::openmode mode); + +public: + ~ConvPro(); + + int mainConvPro(int argc, char ** argv); + + static void closeOpenStreams(std::list & ofsl); + + static bool checkForFromType(const std::string & ftype); + static bool checkForToType(const std::string & ttype); + static void guessFromAndToType(const std::string & fnamefrom, + std::string & fromtype, + std::string * fromstem, + const std::string & fnameto, + std::list & totypes, + std::string * tostem); +}; + diff -Nru mira-3.9.18/src/modules/mod_dbgreplay.C mira-4.0/src/modules/mod_dbgreplay.C --- mira-3.9.18/src/modules/mod_dbgreplay.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_dbgreplay.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,89 @@ +#include +#include + +#include "mira/assembly.H" +#include "mira/parameters.H" +#include "mira/maf_parse.H" + + + +using namespace std; + + +int dbgReplayMain(int argc, char ** argv) +{ + FUNCSTART("dbgReplayMain"); + + string datafile="e.maf"; + string refrname="HUZ85:2416:1763"; + string newrname="HUZ85:1578:1024"; + string paramstring="--job=denovo,genome,accurate,iontor"; + + vector MPv; + MIRAParameters::setupStdMIRAParameters(MPv); + + if(!paramstring.empty()){ + MIRAParameters::parse(paramstring.c_str(),MPv); + } + + ReadPool greadpool(&MPv); + list gcontigs; + + // not used, but needed for linking *sigh* + Manifest manifest; + Assembly as(manifest,MPv,false); + + MAFParse tmaf(&greadpool, &gcontigs, &MPv); + vector dummy; + tmaf.load(datafile, ReadGroupLib::SEQTYPE_SANGER, 1, dummy, false); + greadpool.makeTemplateIDs(); + + greadpool.allowNameIndex(true); + int32 refid=greadpool.getReadIndex(refrname); + BUGIFTHROW(refid<0,"Ref " << refrname << " not in readpool?"); + int32 newid=greadpool.getReadIndex(newrname); + BUGIFTHROW(newid<0,"New " << newrname << " not in readpool?"); + + AlignedDualSeqFacts adsf; + // refid, newid, + // delta,id1_rightdelta, id2_rightdelta, totallen, id1_direction, id2_direction, score_ratio + //adsf.publicinit(refid,newid,2,0,9,91,1,1,100); + int8 dirnewid=-1; + bool newid_ismulticopy=true; + adsf.publicinit(newid,refid,14,41,0,242,1,1,94,4,0,0,28,0); + + cout << adsf << endl; + + Contig::errorstatus_t errstat; + vector aligncache; + for(uint32 i=0; i +#include +#include + + +#include "modules/mod_memestim.H" +#include "modules/misc.H" + + +#include "mira/assembly.H" +#include "version.H" + + +using namespace std; + + +void mme_askChar(const string & question, const string & possibilities, char & answer, const char defchar) +{ + bool doloop=true; + while(doloop){ + cout << question << ' '; + if(!possibilities.empty()){ + cout <<"("; + std::copy(possibilities.begin(), + possibilities.end(), + ostream_iterator (cout, "/")); + cout << ") "; + } + if(defchar!=0){ + cout << "[" << defchar << "] "; + } + string input; + getline(cin,input); + + // empty input, try to get defchar from possibilities if it exists + if(input.empty() && defchar!=0) input=defchar; + input.resize(1); + for(uint32 i=0; i(tmp); + cout << answer << endl; +} + + +void miraMemEstimate(int argc, char ** argv) +{ + int c; + extern char *optarg; + extern int optind; + + while (1){ + c = getopt(argc, argv, "v"); + if(c == -1) break; + + switch (c) { + case 'v': + cout << MIRAVERSION << endl; + exit(0); + default : {} + } + } + + + cout << "This is MIRA " MIRAVERSION ".\n\n"; + + cout << "Please cite: Chevreux, B., Wetter, T. and Suhai, S. (1999), Genome Sequence\nAssembly Using Trace Signals and Additional Sequence Information.\nComputer Science and Biology: Proceedings of the German Conference on\nBioinformatics (GCB) 99, pp. 45-56.\n\n"; + dumpStdMsg(); + + cout << "\n\nmiraMEM helps you to estimate the memory needed to assemble a project.\n" + "Please answer the questions below.\n\n" + "Defaults are give in square brackets and chosen if you just press return.\n" + "Hint: you can add k/m/g modifiers to your numbers to say kilo, mega or giga.\n\n"; + + char yesno; + char ptype=' '; + char denovomapping; + int64 seqsize=0; + + int64 numsanreads=0; + int64 num454gs20reads=0; + int64 num454flxreads=0; + int64 num454titaniumreads=0; + int64 numsxareads=0; + int64 avgsxalen=0; + int64 numpbsreads=0; + int64 avgpbslen=0; + int64 largestcontigexpected=0; + + // computed + int64 totalexpectedbases=0; + int64 totalreads=0; + int64 readsinlargestcontig=0; + int64 readbasesinlargestcontig=0; + + mme_askChar("Is it a genome or transcript (EST/tag/etc.) project?", + "ge", + ptype, + 'g'); + if(ptype=='g'){ + mme_askInt("Size of genome?", + seqsize, + "4.5m"); + if(seqsize<100) { + cout << "A sequence size of less than 100 bases is pretty improbable.\n" + << "Did you forget a modifier (k, m or g) to the number you gave?\n"; + exit(10); + } + largestcontigexpected=seqsize; + if(largestcontigexpected>30*1000*1000){ + cout << "Looks like a larger eukaryote, guessing largest chromosome size: 30m\nChange if needed!\n"; + largestcontigexpected=30*1000*1000; + } + + { + string tmplc; + ostringstream ostr; + ostr << largestcontigexpected; + tmplc=ostr.str(); + mme_askInt("Size of largest chromosome?", + largestcontigexpected, + tmplc); + } + + mme_askChar("Is it a denovo or mapping assembly?", + "dm", + denovomapping, + 'd'); + } + + + mme_askInt("Number of Sanger reads?", + numsanreads, + "0"); + mme_askChar("Are there 454 reads?", + "yn", + yesno, + 'n'); + if(yesno=='y'){ + mme_askInt("Number of 454 GS20 reads?", + num454gs20reads, + "0"); + mme_askInt("Number of 454 FLX reads?", + num454flxreads, + "0"); + mme_askInt("Number of 454 Titanium reads?", + num454titaniumreads, + "0"); + } + mme_askChar("Are there PacBio reads?", + "yn", + yesno, + 'n'); + if(yesno=='y'){ + mme_askInt("Number of PacBio reads?", + numpbsreads, + "0"); + mme_askInt("Average PacBio length?", + avgpbslen, + "1100"); + } + mme_askChar("Are there Solexa reads?", + "yn", + yesno, + 'n'); + if(yesno=='y'){ + mme_askInt("Number of Solexa reads?", + numsxareads, + "0"); + mme_askInt("Average Solexe length?", + avgsxalen, + "75"); + } + + totalexpectedbases=numsanreads*1000; + totalexpectedbases+=num454gs20reads*120; + totalexpectedbases+=num454flxreads*260; + totalexpectedbases+=num454titaniumreads*460; + totalexpectedbases+=numsxareads*avgsxalen; + totalexpectedbases+=numpbsreads*avgpbslen; + + totalreads=numsanreads; + totalreads+=num454gs20reads; + totalreads+=num454flxreads; + totalreads+=num454titaniumreads; + totalreads+=numsxareads; + totalreads+=numpbsreads; + + if(ptype=='g'){ + if(denovomapping=='d'){ + readsinlargestcontig=totalreads/2; + readbasesinlargestcontig=totalexpectedbases/2; + }else{ + largestcontigexpected=seqsize; + readsinlargestcontig=totalreads; + readbasesinlargestcontig=totalexpectedbases; + + // if solexa is mapped, there are less reads due to + // coverage equivalent mapping and virtual long reads + // be conservative, reduce only by 50% + if(numsxareads>0){ + readsinlargestcontig-=numsxareads/2; + } + } + }else{ + seqsize=50000; + largestcontigexpected=seqsize; + readsinlargestcontig=50000; + readbasesinlargestcontig=readsinlargestcontig*1000; //10k reads times sanger length + } + + // account for gaps with 454 reads + if(num454flxreads>0 || num454gs20reads>0){ + largestcontigexpected+=largestcontigexpected/10; + readbasesinlargestcontig+=readbasesinlargestcontig/10; + } + + //cout << "totalreads: " << totalreads + // << "\nreadsinlargestcontig: " << readsinlargestcontig + // << "\ntotalexpectedbases: " << totalexpectedbases + // << "\nreadbasesinlargestcontig: " << readbasesinlargestcontig + // << endl; + + int64 livereads=totalreads+readsinlargestcontig; + int64 livebases=totalexpectedbases+readbasesinlargestcontig; + + //cout << "livereads: " << livereads + // << "\nlivebases: " << livebases << endl; + + double avgcov=static_cast(totalexpectedbases/seqsize); + avgcov-=avgcov/8; // in general we have 12% loss of usable data + + int64 numskimhits=static_cast(avgcov*850000); // estimate skim hits, very rough + + int64 memneeded=0; + + // what do the reads need? + memneeded= + livereads*sizeof(Read) // class size + +livereads*200 // additional strings etc. + +livereads*4*sizeof(tag_t) // on average 4 tags per read + +livebases*8; // sequences, qualities, adjustments, base flags + + // new: solexa reads don't have adjustments + // yeah, but estimate is already small enough, keep it + //memneeded-=(numsxareads*avgsxalen) * 2; + + + // what does a contig need? + // (note: the needs for the reads themselves are already + // accounted for in the section above) + memneeded+= + //readsinlargestcontig*sizeof(Contig::contigread_t) + //+readsinlargestcontig*sizeof(Contig::out_order_t) + + readsinlargestcontig*40 // 40 == rough guesstimate for PlacedContigReads + +totalreads*9 /* templates, mapping + allowedrefids */ + +largestcontigexpected*sizeof(Contig::consensus_counts_t) + +largestcontigexpected*10; // adjustments and some reserve + + int64 memforlargetables=0; + // some more overhead by the assembly class + memforlargetables+= totalreads*20; + + // get the skim edges accounted + int64 skimhitsmem=numskimhits*2*sizeof(skimedges_t); + // since 2.9.40 there's the possibility to cap that memory + // use default value + if(skimhitsmem>1024L*1024*1024){ + skimhitsmem=2LL*1024*1024*1024; + if(numsxareads>0) skimhitsmem*=2; + } + + // mem needed for temporary skim need + int64 tmpskim=500*1000*1000; + + memforlargetables+=max(skimhitsmem,tmpskim); + + // possible vector leftover clip + int64 memforpvlc=0; + { + // AS_readhitmiss & AS_readhmcovered + memforpvlc=totalexpectedbases*8; + // overhead of the structures above + memforpvlc+=sizeof(vector)*totalreads*2; + + // AS_count_rhm + memforpvlc+=totalreads*4; + } + + // ok, 1MB of additional small things + int64 memneededfordata=memneeded+(1024*1024); + + // experience shows that not all has been accounted for + // and internal mem caching of memory allocators add another + // layer of RAM needs + // + // add 40% to estimates + // but not if whe have mapping with Solexas + if(denovomapping!='m' && numsxareads==0){ + memneededfordata+=memneededfordata/100*40; + memforlargetables+=memforlargetables/100*40; + } + + cout.setf(ios::fixed, ios::floatfield); + //cout.setf(ios::showpoint); + cout.precision(1); + + cout << "\n\n************************* Estimates *************************\n\n"; + // last, if it's an EST assembly, there is no seqsize + + if(ptype=='e'){ + cout << "EST assembly, cannot give coverage estimate. Also, estimates" + "\nmay be way off for pathological cases.\n"; + + }else{ + cout << "The contigs will have an average coverage of ~ " << avgcov + << " (+/- 10%)" + "\nEstimates may be way off for pathological cases.\n"; + } + + cout << "\nRAM estimates:" + "\n" << setw(40) << "reads+contigs (unavoidable): "; + byteToHumanReadableSize(memneededfordata,cout); + cout << "\n" << setw(40) << "large tables (tunable): "; + byteToHumanReadableSize(memforlargetables,cout); + cout << "\n" << setw(40) << "" << "---------" + "\n" << setw(40) << "total (peak): "; + byteToHumanReadableSize(memforlargetables+memneededfordata, + cout); + cout << "\n\n" << setw(40) << "add if using -CL:pvlc=yes : "; + byteToHumanReadableSize(memforpvlc,cout); + if(denovomapping=='m' && numsxareads>0){ + int64 notusingmerge=memneededfordata/100*40; + cout << "\n" << setw(40) << "add if setting -CO:msr=no : "; + byteToHumanReadableSize(notusingmerge,cout); + } + cout << "\n\n" + "Note that some algorithms might try to grab more memory if" + "\nthe need arises and the system has enough RAM. The options" + "\nfor automatic memory management control this:" + "\n -AS:amm, -AS:kpmf, -AS:mps" + "\nFurther switches that might reduce RAM (at cost of run time" + "\nor accuracy):" + "\n -SK:mhim, -SK:mchr (both runtime); -SK:mhpr (accuracy)\n" + "*************************************************************\n"; + +} + + diff -Nru mira-3.9.18/src/modules/mod_memestim.H mira-4.0/src/modules/mod_memestim.H --- mira-3.9.18/src/modules/mod_memestim.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_memestim.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +void miraMemEstimate(int argc, char ** argv); diff -Nru mira-3.9.18/src/modules/mod_mira.C mira-4.0/src/modules/mod_mira.C --- mira-3.9.18/src/modules/mod_mira.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_mira.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,442 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + + +#include + +#include +#include + +#include "boost/filesystem/operations.hpp" +#include "boost/filesystem/path.hpp" + +#include "util/fileanddisk.H" +#include "mira/assembly.H" +#include "mira/parameters.H" +#include "mira/manifest.H" + +#include "modules/misc.H" + + +#include "version.H" + +using namespace std; + + + + +bool opt_mira_wrapped=false; // 'secret' option +bool opt_mira_resumeassembly=false; +string opt_mira_cwd; + +uint32 opt_mira_numthreads=0; +bool opt_mira_checkmanifestonly=false; +bool opt_mira_checkmanifestandfilesonly=false; + + +void miraParseCmdLine(int argc, char ** argv) +{ + // that loop is straight from the GNU getopt_long example + // http://www.gnu.org/s/hello/manual/libc/Getopt-Long-Option-Example.html + while (1){ + static struct option long_options[] = + { + {"help", no_argument, 0, 'h'}, + {"resume", no_argument, 0, 'r'}, + {"version", no_argument, 0, 'v'}, + {"mcheck", no_argument, 0, 'm'}, + {"mdcheck", no_argument, 0, 'M'}, + {"cwd", required_argument, 0, 'c'}, + {"threads", required_argument, 0, 't'}, + + {"nowrap", no_argument, 0, 'W'}, + {"job", optional_argument, 0, ' '}, // catch old command line + {"project", optional_argument, 0, ' '}, // catch old command line + {0, 0, 0, 0} + }; + /* getopt_long stores the option index here. */ + int option_index = 0; + + int c = getopt_long (argc, argv, "WhmMrvc:t: ", + long_options, &option_index); + + if (c == -1) break; + + switch (c) { + case 'W': { + opt_mira_wrapped=true; + break; + } + case 'M': + opt_mira_checkmanifestandfilesonly=true; + // fall through + case 'm': + opt_mira_wrapped=true; // we need this: checks of manifest should not be run wrapped + opt_mira_checkmanifestonly=true; + break; + case 'c': + if(optarg){ + opt_mira_cwd=optarg; + }else{ + cout << "Missing directory name for option -c / --cwd=" << endl; + exit(100); + } + break; + case 'h': + cout << "mira\t\tMIRALIB version " << MIRAVERSION << "\n" + "Author:\t\tBastien Chevreux (bach@chevreux.org)\n" + "Purpose:\tassemble sequencing data.\n\n"; + + dumpStdMsg(); + cout << "Usage:\n" + "mira [options] manifest_file [manifest_file ...]\n"; + cout << "\nOptions:\n"; + cout << + " -c / --cwd=\t\tdirectory\tChange working directory\n" + " -h / --help\t\t\t\tPrint short help and exit\n" + " -m / --mcheck\t\t\t\tOnly check the manifest file, then exit.\n" + " -M / --mdcheck\t\t\tLike -m, but also check existence of\n" + "\t\t\t\t\t data files.\n" + " -r / --resume\t\t\t\tResume/restart an interrupted assembly\n" + " -t / --threads=\tinteger\t\tForce number of threads (overrides\n" + "\t\t\t\t\t equivalent -GE:not manifest entry)\n" + " -v / --version\t\t\tPrint version and exit\n" + ; + exit(0); + case 'r': + opt_mira_resumeassembly=true; + break; + case 't': + opt_mira_numthreads=atoi(optarg); + break; + case 'v': + cout << MIRAVERSION << endl; + exit(0); + case ' ': + cout << "It looks like you are using the old command line format of MIRA 3.4.x and earlier." + "\nPlease look up in the manual on how to use manifest files for MIRA 3.9.x and later.\n"; + exit(0); + default: + abort (); + } + } + + if (optind == argc) { + cout << "You did not specify a manifest file to load?\n"; + exit(100); + } +} + +void miraMain_wrapped(int argc, char ** argv) +{ + FUNCSTART("void mira(int argc, char ** argv)"); + + cout << "This is MIRA " MIRAVERSION ".\n\n"; + + cout << "Please cite: Chevreux, B., Wetter, T. and Suhai, S. (1999), Genome Sequence\nAssembly Using Trace Signals and Additional Sequence Information.\nComputer Science and Biology: Proceedings of the German Conference on\nBioinformatics (GCB) 99, pp. 45-56.\n\n"; + + if(!opt_mira_cwd.empty() && chdir(opt_mira_cwd.c_str())){ + cout << "Changing working directory to '" << opt_mira_cwd << "' failed, system message is: " << strerror(errno) << endl; + exit(100); + } + + dumpStdMsg(); + + Manifest manifest; + { + bool tmprflag=opt_mira_resumeassembly; + if(opt_mira_checkmanifestonly) tmprflag|=!opt_mira_checkmanifestandfilesonly; + for(; optind < argc; ++optind) { + manifest.loadManifestFile(argv[optind],tmprflag); + } + } + + // if we are just to check the manifest (and maybe data) and we came this far: exit + if(opt_mira_checkmanifestonly) { + cout << "\nManifest looks OK"; + if(opt_mira_checkmanifestandfilesonly){ + cout << " and the data files referenced within were found"; + } + cout << ".\n"; + exit(0); + } + + cout << manifest; + + vector Pv; + MIRAParameters::setupStdMIRAParameters(Pv); + + MIRAParameters::generateProjectNames(Pv,manifest.getProjectName()); + + string mparams(manifest.getFullMIRAParameterString()); + //cout << "Seen parameters in manifest: " << mparams << endl; + MIRAParameters::parse(mparams, Pv); + + // some users make the error to use "mira" instead of miraSearchESTSNPs + // this code takes care of it: + // if start_step >0, then the miraSearchESTSNPs pipeline is used, + // else the normal mira + if(Pv[0].getSpecialParams().sp_est_startstep){ + MIRANOTIFY(Notify::FATAL,"Oooooops? You called the 'mira' executable but have parameters set for the" + "EST-SNP-Search pipeline set. For this, you have to use the 'miraSearchESTSNPs'" + "executable (sorry)."); + } + + cout << "\nParameters parsed without error, perfect.\n"; + + if(opt_mira_numthreads>0){ + cout << "Overriding number of threads via '-t' with " << opt_mira_numthreads << endl; + Pv[0].getNonConstAssemblyParams().as_numthreads=opt_mira_numthreads; + Pv[0].getNonConstSkimParams().sk_numthreads=opt_mira_numthreads; + } + + cout << '\n'; + + MIRAParameters::postParsingChanges(Pv); + MIRAParameters::dumpAllParams(Pv, cout); + + + + //exit(0); + + { + Assembly as(manifest, Pv, opt_mira_resumeassembly); + + as.loadSequenceData(); + + //doAbort(); + + if(Pv[0].getAssemblyParams().as_filecheck_only==false){ + try { + as.assemble(); + cout << "\n\n"; + as.setEverythingWentFine(true); + } + catch(const std::bad_alloc & e){ + cout << "Ouch, out of memory detected.\n"; + as.dumpMemInfo(); + throw; + } + catch(...){ + throw; + } + } + } + //Read::dumpStringContainerStats(cout); + + cout << "\n\nEnd of assembly process, thank you for using MIRA." << endl; + + return; +} + +void miraMain_launchWrapped(int argc, char ** argv) +{ + // find out where the called binary is installed, then recreate a full command line + string calledbin; + findLocationOfSelfBinary(calledbin); + + string newcmdline(calledbin); + newcmdline+=" -W"; + for(int32 i=1; i0){ + // do nothing, just exit as the wrapped call already printed out all there is to say in case of an error + cout << "Failure, wrapped MIRA process aborted.\n"; + exit(100); + }else{ + bool couldextractlargecontigs=false; + + Manifest manifest; + + for(; optind < argc; ++optind) { + manifest.loadManifestFile(argv[optind],opt_mira_resumeassembly); + } + vector Pv; + MIRAParameters::setupStdMIRAParameters(Pv); + MIRAParameters::generateProjectNames(Pv,manifest.getProjectName()); + + MIRAParameters::parse(manifest.getFullMIRAParameterString(), Pv, false); + + auto & as_fixparams=Pv[0].getAssemblyParams(); + auto & di_fixparams=Pv[0].getDirectoryParams(); + + string mcprog(boost::filesystem::path(calledbin).parent_path().native()+"/miraconvert"); + if(system((mcprog+" -v >/dev/null 2>&1").c_str())){ + // try the 'd' version (just my personal setup on some machines) + mcprog+='d'; + if(system((mcprog+" -v >/dev/null 2>&1").c_str())){ + mcprog="miraconvert"; + if(system((mcprog+" -v >/dev/null 2>&1").c_str())){ + mcprog.clear(); + } + } + } + + string lcfile(di_fixparams.dir_info+"/"+as_fixparams.as_outfile_stats_largecontigs+".txt"); + if(fileExists(lcfile)){ + //cout << "found large contigs file " << lcfile << ", extracting now ..." << endl; + string convertstr; + if(as_fixparams.as_output_html) convertstr+=" -t html"; + if(as_fixparams.as_output_txt) convertstr+=" -t txt"; + if(as_fixparams.as_output_caf) convertstr+=" -t caf"; + if(as_fixparams.as_output_maf) convertstr+=" -t maf"; + if(as_fixparams.as_output_tcs) convertstr+=" -t tcs"; + if(as_fixparams.as_output_ace) convertstr+=" -t ace"; + if(as_fixparams.as_output_gff3) convertstr+=" -t gff3"; + if(as_fixparams.as_output_wiggle) convertstr+=" -t wig"; + if(as_fixparams.as_output_fasta) convertstr+=" -t fasta"; + if(as_fixparams.as_output_gap4da) convertstr+=" -t exp"; + + string relativelcfile("../"+manifest.getProjectName()+"_d_info/"+as_fixparams.as_outfile_stats_largecontigs+".txt"); + convertstr+=" -n "+relativelcfile; + + convertstr+=" -A \"--job="+manifest.getJob()+","+manifest.getTechnologies()+" "; + // just to be really sure ... + for(auto pc : manifest.getParameters()){ + if(pc=='"'){ + convertstr+="\\\""; + }else if(pc<32 || pc==0x7f){ + // do nothing + }else{ + convertstr+=pc; + } + } + convertstr+="\" "; + + convertstr+=as_fixparams.as_outfile_MAF+".maf"; + convertstr+=" "+manifest.getProjectName()+"_LargeContigs_out"; + + { + string elcshname=di_fixparams.dir_results+"/extractLargeContigs.sh"; + ofstream fout(elcshname); + fout << "#!/bin/sh" + "\n" + "\necho" + "\necho This is how MIRA extracted 'large contigs' from the total assembly for you:" + "\necho it made a list of contigs \\(see info file " << relativelcfile << "\\)" + "\necho which reached a certain length \\(usually 500, see -MI:lcs=...\\) and had at least 1/3 of" + "\necho the average coverage \\(per sequencing technology\\)." + "\necho" + "\necho Note that you can redefine what large contigs are for you by simply using any" + "\necho combination of -n, -x, -y and -z parameters of 'miraconvert' instead of only the" + "\necho '-n' parameter as used in this example." + "\necho" + "\necho You can follow the progress of the conversion in the file \"ec.log\"" + "\necho" + "\n\nmiraconvert " << convertstr << " >ec.log 2>&1" + "\n" + "\nif [ $? -eq 0 ];then" + "\n rm ec.log" + "\n echo Finished, all done." + "\nelse" + "\n tail -50 ec.log" + "\n echo" + "\n echo Ooops, something went wrong. Please consult the file 'ec-log' in this directory." + "\nfi" + ; + chmod(elcshname.c_str(),S_IRWXU|S_IRGRP|S_IROTH); + } + + if(mcprog.empty()){ + cout << "Could not find executable 'miraconvert' for extracting large contigs?\n"; + }else{ + if(chdir(di_fixparams.dir_results.c_str())){ + cout << "Changing working directory to '" << di_fixparams.dir_results << "' failed, system message is: " << strerror(errno) << endl; + }else{ + cout << "Starting extraction of large contigs now (this may take a while, please be patient)." << endl; + if(system((mcprog+" "+convertstr+" >ec.log 2>&1").c_str())){ + cout << "\nExtraction failed, please consult " << di_fixparams.dir_results << "/ec.log" + "\nfor more information on why.\n"; + }else{ + cout << "\nDone.\n"; + couldextractlargecontigs=true; + removeFile("ec.log",false); + } + } + } + if(!couldextractlargecontigs){ + cout << "Large contigs could not be extracted, sorry.\n" + "\nDON'T PANIC! In the directory\n '" << di_fixparams.dir_results << "'" + "\nyou will find a script called" + " 'extractLargeContigs.sh'\n" + "which shows you how to extract large contigs from your assembly. Either" + "read it to understand how it's done or ... just run it :-)\n"; + } + chdir("../.."); + } + + string rcfile(di_fixparams.dir_results+"/_tmprecreate"); + if(fileExists(rcfile)){ + string convertstr; + convertstr+=as_fixparams.as_outfile_MAF+".maf"; + convertstr+=" "+as_fixparams.as_outfile_CAF+".caf"; + if(mcprog.empty()){ + cout << "Could not find executable 'miraconvert' for re-creating CAF results file?\n"; + }else{ + if(chdir(di_fixparams.dir_results.c_str())){ + cout << "Changing working directory to '" << di_fixparams.dir_results << "' failed, system message is: " << strerror(errno) << endl; + }else{ + cout << "Starting recreating CAF results file (please be patient)." << endl; + if(system((mcprog+" "+convertstr+" >rc.log 2>&1").c_str())){ + cout << "\nOooops, that failed, please consult " << di_fixparams.dir_results << "/rc.log" + "\nfor more information on why.\n"; + }else{ + cout << "\nDone.\n"; + removeFile("rc.log",false); + removeFile(rcfile,false); + } + } + } + chdir("../.."); + } + + cout << "\n\nWe're done here, thank you for using MIRA." << endl; + } +} + +int miraMain(int argc, char ** argv) +{ + FUNCSTART("void miraMain(int argc, char ** argv)"); + + miraParseCmdLine(argc,argv); + if(opt_mira_wrapped){ + miraMain_wrapped(argc,argv); + }else{ + miraMain_launchWrapped(argc,argv); + } + + return 0; +} diff -Nru mira-3.9.18/src/modules/mod_mira.H mira-4.0/src/modules/mod_mira.H --- mira-3.9.18/src/modules/mod_mira.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_mira.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,8 @@ + +#ifndef _modmira_h_ +#define _modmira_h_ + +int miraMain(int argc, char ** argv); +int dbgReplayMain(int argc, char ** argv); + +#endif diff -Nru mira-3.9.18/src/modules/mod_tagsnp.C mira-4.0/src/modules/mod_tagsnp.C --- mira-3.9.18/src/modules/mod_tagsnp.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_tagsnp.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,254 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include + +#include "caf/caf.H" +#include "mira/assembly.H" + +#include "modules/misc.H" +#include "modules/mod_tagsnp.H" + +#include "version.H" + + +using namespace std; + + + +list tagsnp::TS_clist; +ofstream tagsnp::TS_fout; + +void tagsnp::usage() +{ + cerr << "tagsnp\t(MIRALIB version " << MIRALIBVERSION << ")\n\n"; + cerr << "Usage:\n"; + cerr << " tagsnp [-xxx] cafin cafout [optional MIRA settings]\n\n"; + cerr << "Options:\n"; + cerr << "\t-n\t\tnuke all existing SNP and RMB tags in file\n"; +// cerr << "\t-s \tload strain data from file\n"; +// cerr << "\t-a\t\tassume SNPs instead of repeats\n"; +// cerr << "\t-r \tminimum reads per group (default: 1)\n"; +// cerr << "\t-q \tminimum qual for tagging (default: 30)\n"; +// cerr << "\t-n \tminimum neighbour qual for tagging (default: 20)\n"; +// cerr << "\t-e \tend read exclusion area (default: 25)\n"; +// cerr << "\t-g\t\talso mark gap bases\n"; +// cerr << "\t-m\t\talso mark multicolumn gap bases\n"; + +} + + +//void tagsnp::save(string & cafout) +//{ +// +// if(!cafout.empty()){ +// assout::saveAsCAF(contigs,cafout); +// } else { +// assout::dumpAsCAF(contigs,cout); +// } +// +// // +// //filename="out.tcs"; +// //assout::saveAsTCS(contigs,filename); +// +// //filename="tagsnp_out.gap4da"; +// //assout::saveAsGAP4DA(contigs,filename); +// +// //filename="featureanalysis.txt"; +// //assout::saveFeatureAnalysis(400,100,contigs,readpool, +// // filename, +// // "featuresummary.txt", +// // "featureprot.txt"); +// +// //{ +// // string filename="out.html"; +// // cout << "Saving contigs to htmlfile: " << filename << endl; +// // ofstream out(filename.c_str(), ios::out | ios::trunc); +// // assout::dumpContigListAsHTML(contigs, "Super project", out); +// // out.close(); +// //} +//} + +//void tagsnp::load (MIRAParameters * mp, string & cafin, string & strainin) +//{ +// cerr << "Loading project from CAF file: " << cafin << endl; +// +// CAF tcaf(readpool, contigs, mp); +// tcaf.load(cafin); +// +// if(!strainin.empty()){ +// cerr << "Loading strain data"; +// readpool.loadStrainData(strainin); +// } +// +// Assembly::refreshContigAndReadpoolValuesAfterLoading(readpool,contigs); +//} + +//void tagsnp::doit(list & contigs) +//{ +// cout << "Tagging reads ..." << endl; +// list::iterator I=contigs.begin(); +// for(;I!=contigs.end(); I++){ +// //I->setParams(&P); +// // +// //uint32 numSRMB=0; +// //uint32 numWRMB=0; +// //uint32 numSNP=0; +// //I->transposeReadSRMTagsToContig(); +// ////I->markPossibleRepeats(numSRMB, numWRMB, numSNP); +// //vector readsmarkedsrm; +// //I->newMarkPossibleRepeats(numSRMB,readsmarkedsrm); +// } +//} + + +void tagsnp::saveCList(list & clist, ReadPool & rp) +{ + Contig::setCoutType(Contig::AS_CAF); + list::iterator I=clist.begin(); + for(;I!=clist.end(); I++){ + TS_fout << *I; + } +} + +void tagsnp::cafload_callback(list & clist, ReadPool & rp) +{ + bool dooutput=true; + + Assembly::refreshContigAndReadpoolValuesAfterLoading(rp,clist); + clist.back().trashConsensusCache(false); + + doit2(clist); + saveCList(clist, rp); + + clist.clear(); + rp.discard(); +} + +void tagsnp::doit2(list & contigs) +{ + cout << "Tagging reads ..." << endl; + list::iterator I=contigs.begin(); + for(;I!=contigs.end(); I++){ + I->trashConsensusCache(false); + + Contig::repeatmarker_stats_t repstats; + vector readsmarkedsrm; + I->newMarkPossibleRepeats(repstats, readsmarkedsrm); + + I->markFeaturesByConsensus(true,true,true); + } +} + + + +int tagsnp::mainTagSNP(int argc, char ** argv) +{ + FUNCSTART("int mainTagSNP(int argc, char ** argv)"); + + vector Pv; + MIRAParameters::setupStdMIRAParameters(Pv); + + const_cast(Pv[0].getContigParams()).con_disregard_spurious_rmb_mismatches=false; + + ReadPool thepool(&Pv); + + int c; + extern char *optarg; + extern int optind; + + + string cafin=""; + string strainin=""; + + while (1){ + c = getopt(argc, argv, "+h"); + if(c == -1) break; + + switch (c) { + case 'h': + case '?': { + usage(); + exit(0); + } + default : {} + } + } + + if(argc-optind < 2) { + cerr << argv[0] << ": " << "Missing at least infile or outfile as argument!\n"; + usage(); + exit(1); + } + + string infile=argv[optind++]; + string outfile=argv[optind++]; + + if(argc-optind > 0) { + stringstream tss; + for(int32 i=optind; i dummy; + CAF tcaf(&thepool, &TS_clist, &Pv); + tcaf.load(infile, + ReadGroupLib::SEQTYPE_SANGER, + 1, + dummy, + false, + cafload_callback + ); + + //load(&P, infile, strainin); + // + //doit(); + //save(outfile); + + } + catch(Notify n){ + n.handleError("main"); + } + catch(Flow f){ + cerr << "Unexpected exception: Flow()\n"; + } + + TS_fout.close(); + + FUNCEND(); + return 0; +} + + + diff -Nru mira-3.9.18/src/modules/mod_tagsnp.H mira-4.0/src/modules/mod_tagsnp.H --- mira-3.9.18/src/modules/mod_tagsnp.H 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/modules/mod_tagsnp.H 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches + * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux + * Copyright (C) 2000 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include +#include + +#include + +#include "mira/readpool.H" +#include "mira/contig.H" + + +class tagsnp +{ +private: + static std::ofstream TS_fout; + + static std::list TS_clist; // needed for CAF conversion (and GBF) + +private: + void usage(); + + + static void doit2(std::list & contigs); + static void saveCList(std::list & clist, ReadPool & rp); + static void cafload_callback(std::list & clist, ReadPool & rp); + +public: + int mainTagSNP(int argc, char ** argv); +}; + diff -Nru mira-3.9.18/src/progs/Makefile.am mira-4.0/src/progs/Makefile.am --- mira-3.9.18/src/progs/Makefile.am 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/progs/Makefile.am 2014-02-02 12:05:18.000000000 +0000 @@ -2,14 +2,15 @@ AM_CXXFLAGS = $(BOOST_CPPFLAGS) -SUFFIXES= .itxt - #LINKEDITLIB= -lmiraEdIt -lmiraExamine -lmiraKNN_abi373 #LINKEDITDIR= -L../examine -L../EdIt -L../knn_abi373 -L../knn_alf LINKEDITLIB= LINKEDITDIR= + +SUFFIXES= .itxt + ciclean: -@rm -f compileinfo.itxt @@ -25,35 +26,32 @@ -#bin_PROGRAMS= mira fastatool scftool uncover_at convert_project tagsnp -bin_PROGRAMS= mira convert_project miramer - -# tagsnp ace2caf -noinst_PROGRAMS= miratest dbgreplay -noinst_HEADERS = quirks.H +bin_PROGRAMS= mira +noinst_PROGRAMS= miratest miramer -#noinst_PROGRAMS+= mirazip -# EdIt_abi373 EdIt_alf skimmer +noinst_HEADERS= quirks.H if BUILDMIRASTATIC -AM_LDFLAGS= $(BLOODYDARWINSTATLIBDIRHACK) -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) -all-static +AM_LDFLAGS= $(BLOODYDARWINSTATLIBDIRHACK) -L../modules -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) -all-static else -AM_LDFLAGS= -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) +AM_LDFLAGS= -L../modules -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) endif if BUILDMIRAMEMORC MEMORC= -lmemorc endif -MIRALIBS=-lmiradebuggersupport $(MEMORC) -lmira -lmiraestass -lmiracaf -lmirautil -lmiradptools -lmirafio -lmiraerrorhandling -lmiradebuggersupport $(LINKEDITLIB) +MIRALIBS= -lmiramodules -lmiradebuggersupport $(MEMORC) -lmira -lmiraestass -lmiracaf -lmirautil -lmiradptools -lmirafio -lmiraerrorhandling -lmiradebuggersupport -lmirafmttext $(LINKEDITLIB) install-exec-hook: cd $(DESTDIR)$(bindir) && \ rm -f miramem$(EXEEXT) && \ $(LN_S) mira$(EXEEXT) miramem$(EXEEXT) && \ rm -f mirabait$(EXEEXT) && \ - $(LN_S) convert_project$(EXEEXT) mirabait$(EXEEXT) + $(LN_S) mira$(EXEEXT) mirabait$(EXEEXT) &&\ + rm -f miraconvert$(EXEEXT) && \ + $(LN_S) mira$(EXEEXT) miraconvert$(EXEEXT) # $(LN_S) miramer$(EXEEXT) miradiff$(EXEEXT) && \ # $(LN_S) mira$(EXEEXT) miraSearchESTSNPs$(EXEEXT) && \ @@ -85,43 +83,14 @@ mira.C: ciclean compileinfo.itxt -mira_SOURCES= mira.C +mira_SOURCES= mira.C quirks.C mira_LDADD= $(MIRALIBS) -convert_project.C: -convert_project_SOURCES= convert_project.C -convert_project_LDADD= $(MIRALIBS) - miramer.C: miramer_SOURCES= miramer.C miramer_LDADD= $(MIRALIBS) -dbgreplay_SOURCES= dbgreplay.C -dbgreplay_LDADD= $(MIRALIBS) - +miratest.C: miratest_SOURCES= miratest.C miratest_LDADD= $(MIRALIBS) -#sw.C: -#sw_SOURCES= sw.C -#sw_LDADD= $(MIRALIBS) -# -#mirazip.C: ciclean compileinfo.itxt -#nodist_mirazip_SOURCES= mirazip.C -#mirazip_LDADD= $(MIRALIBS) -# -#uncover_at_SOURCES= uncover_at.C -#uncover_at_LDADD= $(MIRALIBS) -# -# -#fastatool_SOURCES= fastatool.C -#fastatool_LDADD= -lmiradebuggersupport -lmiraerrorhandling -lmirautil -lmirafio -lexpat -lmiradebuggersupport -# -#scftool_SOURCES= scftool.C -#scftool_LDADD= $(MIRALIBS) -# -#ace2caf_SOURCES= ace2caf.C -#ace2caf_LDADD= $(MIRALIBS) -# -#tagsnp_SOURCES= tagsnp.C -#tagsnp_LDADD= $(MIRALIBS) diff -Nru mira-3.9.18/src/progs/Makefile.in mira-4.0/src/progs/Makefile.in --- mira-3.9.18/src/progs/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/progs/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -35,28 +35,25 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = mira$(EXEEXT) convert_project$(EXEEXT) miramer$(EXEEXT) -noinst_PROGRAMS = miratest$(EXEEXT) dbgreplay$(EXEEXT) +bin_PROGRAMS = mira$(EXEEXT) +noinst_PROGRAMS = miratest$(EXEEXT) miramer$(EXEEXT) subdir = src/progs DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -65,16 +62,10 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am_convert_project_OBJECTS = convert_project.$(OBJEXT) -convert_project_OBJECTS = $(am_convert_project_OBJECTS) +am_mira_OBJECTS = mira.$(OBJEXT) quirks.$(OBJEXT) +mira_OBJECTS = $(am_mira_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -convert_project_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_dbgreplay_OBJECTS = dbgreplay.$(OBJEXT) -dbgreplay_OBJECTS = $(am_dbgreplay_OBJECTS) -dbgreplay_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_mira_OBJECTS = mira.$(OBJEXT) -mira_OBJECTS = $(am_mira_OBJECTS) mira_DEPENDENCIES = $(am__DEPENDENCIES_2) am_miramer_OBJECTS = miramer.$(OBJEXT) miramer_OBJECTS = $(am_miramer_OBJECTS) @@ -95,10 +86,8 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(convert_project_SOURCES) $(dbgreplay_SOURCES) \ - $(mira_SOURCES) $(miramer_SOURCES) $(miratest_SOURCES) -DIST_SOURCES = $(convert_project_SOURCES) $(dbgreplay_SOURCES) \ - $(mira_SOURCES) $(miramer_SOURCES) $(miratest_SOURCES) +SOURCES = $(mira_SOURCES) $(miramer_SOURCES) $(miratest_SOURCES) +DIST_SOURCES = $(mira_SOURCES) $(miramer_SOURCES) $(miratest_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -119,6 +108,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -243,28 +233,21 @@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/src $(all_includes) AM_CXXFLAGS = $(BOOST_CPPFLAGS) -SUFFIXES = .itxt #LINKEDITLIB= -lmiraEdIt -lmiraExamine -lmiraKNN_abi373 #LINKEDITDIR= -L../examine -L../EdIt -L../knn_abi373 -L../knn_alf LINKEDITLIB = LINKEDITDIR = +SUFFIXES = .itxt noinst_HEADERS = quirks.H -@BUILDMIRASTATIC_FALSE@AM_LDFLAGS = -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) - -#noinst_PROGRAMS+= mirazip -# EdIt_abi373 EdIt_alf skimmer -@BUILDMIRASTATIC_TRUE@AM_LDFLAGS = $(BLOODYDARWINSTATLIBDIRHACK) -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) -all-static +@BUILDMIRASTATIC_FALSE@AM_LDFLAGS = -L../modules -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) +@BUILDMIRASTATIC_TRUE@AM_LDFLAGS = $(BLOODYDARWINSTATLIBDIRHACK) -L../modules -L../debuggersupport -L../memorc -L../io/ -L../util/ -L../errorhandling/ -L../mira -L../caf $(LINKEDITDIR) $(BOOST_LDFLAGS) -all-static @BUILDMIRAMEMORC_TRUE@MEMORC = -lmemorc -MIRALIBS = -lmiradebuggersupport $(MEMORC) -lmira -lmiraestass -lmiracaf -lmirautil -lmiradptools -lmirafio -lmiraerrorhandling -lmiradebuggersupport $(LINKEDITLIB) -mira_SOURCES = mira.C +MIRALIBS = -lmiramodules -lmiradebuggersupport $(MEMORC) -lmira -lmiraestass -lmiracaf -lmirautil -lmiradptools -lmirafio -lmiraerrorhandling -lmiradebuggersupport -lmirafmttext $(LINKEDITLIB) +mira_SOURCES = mira.C quirks.C mira_LDADD = $(MIRALIBS) -convert_project_SOURCES = convert_project.C -convert_project_LDADD = $(MIRALIBS) miramer_SOURCES = miramer.C miramer_LDADD = $(MIRALIBS) -dbgreplay_SOURCES = dbgreplay.C -dbgreplay_LDADD = $(MIRALIBS) miratest_SOURCES = miratest.C miratest_LDADD = $(MIRALIBS) all: all-am @@ -353,12 +336,6 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -convert_project$(EXEEXT): $(convert_project_OBJECTS) $(convert_project_DEPENDENCIES) $(EXTRA_convert_project_DEPENDENCIES) - @rm -f convert_project$(EXEEXT) - $(CXXLINK) $(convert_project_OBJECTS) $(convert_project_LDADD) $(LIBS) -dbgreplay$(EXEEXT): $(dbgreplay_OBJECTS) $(dbgreplay_DEPENDENCIES) $(EXTRA_dbgreplay_DEPENDENCIES) - @rm -f dbgreplay$(EXEEXT) - $(CXXLINK) $(dbgreplay_OBJECTS) $(dbgreplay_LDADD) $(LIBS) mira$(EXEEXT): $(mira_OBJECTS) $(mira_DEPENDENCIES) $(EXTRA_mira_DEPENDENCIES) @rm -f mira$(EXEEXT) $(CXXLINK) $(mira_OBJECTS) $(mira_LDADD) $(LIBS) @@ -375,11 +352,10 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert_project.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbgreplay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mira.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miramer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miratest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quirks.Po@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -636,7 +612,9 @@ rm -f miramem$(EXEEXT) && \ $(LN_S) mira$(EXEEXT) miramem$(EXEEXT) && \ rm -f mirabait$(EXEEXT) && \ - $(LN_S) convert_project$(EXEEXT) mirabait$(EXEEXT) + $(LN_S) mira$(EXEEXT) mirabait$(EXEEXT) &&\ + rm -f miraconvert$(EXEEXT) && \ + $(LN_S) mira$(EXEEXT) miraconvert$(EXEEXT) # $(LN_S) miramer$(EXEEXT) miradiff$(EXEEXT) && \ # $(LN_S) mira$(EXEEXT) miraSearchESTSNPs$(EXEEXT) && \ @@ -667,33 +645,9 @@ mira.C: ciclean compileinfo.itxt -convert_project.C: - miramer.C: -#sw.C: -#sw_SOURCES= sw.C -#sw_LDADD= $(MIRALIBS) -# -#mirazip.C: ciclean compileinfo.itxt -#nodist_mirazip_SOURCES= mirazip.C -#mirazip_LDADD= $(MIRALIBS) -# -#uncover_at_SOURCES= uncover_at.C -#uncover_at_LDADD= $(MIRALIBS) -# -# -#fastatool_SOURCES= fastatool.C -#fastatool_LDADD= -lmiradebuggersupport -lmiraerrorhandling -lmirautil -lmirafio -lexpat -lmiradebuggersupport -# -#scftool_SOURCES= scftool.C -#scftool_LDADD= $(MIRALIBS) -# -#ace2caf_SOURCES= ace2caf.C -#ace2caf_LDADD= $(MIRALIBS) -# -#tagsnp_SOURCES= tagsnp.C -#tagsnp_LDADD= $(MIRALIBS) +miratest.C: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru mira-3.9.18/src/progs/convert_project.C mira-4.0/src/progs/convert_project.C --- mira-3.9.18/src/progs/convert_project.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/progs/convert_project.C 1970-01-01 00:00:00.000000000 +0000 @@ -1,2884 +0,0 @@ -/* - * Written by Bastien Chevreux (BaCh) - * - * Copyright (C) 1997-2000 by the German Cancer Research Center (Deutsches - * Krebsforschungszentrum, DKFZ Heidelberg) and Bastien Chevreux - * Copyright (C) 2000 and later by Bastien Chevreux - * - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - -#include - -#include -#include - -//#include - -#include "io/generalio.H" -#include "util/fileanddisk.H" -#include "mira/parameters.H" -#include "mira/assembly.H" -#include "mira/assembly_output.H" -#include "mira/maf_parse.H" -#include "mira/sam_collect.H" -#include "mira/gff_save.H" -#include "mira/hashstats.H" -#include "caf/caf.H" - -#include "progs/quirks.H" - -#ifdef MIRAMEMORC -#include "memorc/memorc.H" -#endif - -#include "version.H" - - -using namespace std; - - - -class General { - typedef boost::unordered_map strintmap; - static strintmap GE_nameselectionmap; - -public: - static void makeSelectionStringSet(string & filename); - static bool checkNamePresence(string & name); - static bool hasNames(); - static size_t getNameOrder(const string & name); -}; - -General::strintmap General::GE_nameselectionmap; - - -void General::makeSelectionStringSet(string & filename) -{ - FUNCSTART("void makeSelectionStringSet(string & filename)"); - - ifstream fin; - fin.open(filename.c_str(), ios::in); - if(!fin){ - MIRANOTIFY(Notify::FATAL, "File not found: " << filename); - } - fin.seekg(0, ios::beg); - - string elemname, dummy; - strintmap::iterator nI; - uint32 numread=0; - while(GeneralIO::readKeyValue(fin, elemname,dummy)){ - nI=GE_nameselectionmap.find(elemname); - if(nI==GE_nameselectionmap.end()) { - GE_nameselectionmap[elemname]=numread; - numread++; - } - } - fin.close(); - - if(GE_nameselectionmap.empty()) { - cerr << "ehhh?"; - exit(10); - } - - FUNCEND(); -} - - - -bool General::checkNamePresence(string & name) -{ - if(GE_nameselectionmap.empty()) return true; - return (GE_nameselectionmap.find(name) != GE_nameselectionmap.end()); -} - -bool General::hasNames() -{ - return !GE_nameselectionmap.empty(); -} - -size_t General::getNameOrder(const string & name) -{ - if(GE_nameselectionmap.empty()) return (0-1); - strintmap::iterator nI=GE_nameselectionmap.find(name); - if (nI == GE_nameselectionmap.end()) return (0-1); - return nI->second; -} - - - - - - -class tagsnp -{ -private: - static ofstream TS_fout; - - static list TS_clist; // needed for CAF conversion (and GBF) - -private: - void usage(); - - - static void doit2(list & contigs); - static void saveCList(list & clist, ReadPool & rp); - static void cafload_callback(list & clist, ReadPool & rp); - -public: - int main(int argc, char ** argv); -}; - - -list tagsnp::TS_clist; -ofstream tagsnp::TS_fout; - -void tagsnp::usage() -{ - cerr << "tagsnp\t(MIRALIB version " << MIRALIBVERSION << ")\n\n"; - cerr << "Usage:\n"; - cerr << " tagsnp [-xxx] cafin cafout [optional MIRA settings]\n\n"; - cerr << "Options:\n"; - cerr << "\t-n\t\tnuke all existing SNP and RMB tags in file\n"; -// cerr << "\t-s \tload strain data from file\n"; -// cerr << "\t-a\t\tassume SNPs instead of repeats\n"; -// cerr << "\t-r \tminimum reads per group (default: 1)\n"; -// cerr << "\t-q \tminimum qual for tagging (default: 30)\n"; -// cerr << "\t-n \tminimum neighbour qual for tagging (default: 20)\n"; -// cerr << "\t-e \tend read exclusion area (default: 25)\n"; -// cerr << "\t-g\t\talso mark gap bases\n"; -// cerr << "\t-m\t\talso mark multicolumn gap bases\n"; - -} - - -//void tagsnp::save(string & cafout) -//{ -// -// if(!cafout.empty()){ -// assout::saveAsCAF(contigs,cafout); -// } else { -// assout::dumpAsCAF(contigs,cout); -// } -// -// // -// //filename="out.tcs"; -// //assout::saveAsTCS(contigs,filename); -// -// //filename="tagsnp_out.gap4da"; -// //assout::saveAsGAP4DA(contigs,filename); -// -// //filename="featureanalysis.txt"; -// //assout::saveFeatureAnalysis(400,100,contigs,readpool, -// // filename, -// // "featuresummary.txt", -// // "featureprot.txt"); -// -// //{ -// // string filename="out.html"; -// // cout << "Saving contigs to htmlfile: " << filename << endl; -// // ofstream out(filename.c_str(), ios::out | ios::trunc); -// // assout::dumpContigListAsHTML(contigs, "Super project", out); -// // out.close(); -// //} -//} - -//void tagsnp::load (MIRAParameters * mp, string & cafin, string & strainin) -//{ -// cerr << "Loading project from CAF file: " << cafin << endl; -// -// CAF tcaf(readpool, contigs, mp); -// tcaf.load(cafin); -// -// if(!strainin.empty()){ -// cerr << "Loading strain data"; -// readpool.loadStrainData(strainin); -// } -// -// Assembly::refreshContigAndReadpoolValuesAfterLoading(readpool,contigs); -//} - -//void tagsnp::doit(list & contigs) -//{ -// cout << "Tagging reads ..." << endl; -// list::iterator I=contigs.begin(); -// for(;I!=contigs.end(); I++){ -// //I->setParams(&P); -// // -// //uint32 numSRMB=0; -// //uint32 numWRMB=0; -// //uint32 numSNP=0; -// //I->transposeReadSRMTagsToContig(); -// ////I->markPossibleRepeats(numSRMB, numWRMB, numSNP); -// //vector readsmarkedsrm; -// //I->newMarkPossibleRepeats(numSRMB,readsmarkedsrm); -// } -//} - - -void tagsnp::saveCList(list & clist, ReadPool & rp) -{ - Contig::setCoutType(Contig::AS_CAF); - list::iterator I=clist.begin(); - for(;I!=clist.end(); I++){ - TS_fout << *I; - } -} - -void tagsnp::cafload_callback(list & clist, ReadPool & rp) -{ - bool dooutput=true; - - Assembly::refreshContigAndReadpoolValuesAfterLoading(rp,clist); - clist.back().trashConsensusCache(false); - - doit2(clist); - saveCList(clist, rp); - - clist.clear(); - rp.discard(); -} - -void tagsnp::doit2(list & contigs) -{ - cout << "Tagging reads ..." << endl; - list::iterator I=contigs.begin(); - for(;I!=contigs.end(); I++){ - I->trashConsensusCache(false); - - Contig::repeatmarker_stats_t repstats; - vector readsmarkedsrm; - I->newMarkPossibleRepeats(repstats, readsmarkedsrm); - - I->markFeaturesByConsensus(true,true,true); - } -} - - - -int tagsnp::main(int argc, char ** argv) -{ - FUNCSTART("int main(int argc, char ** argv)"); - - vector Pv; - MIRAParameters::setupStdMIRAParameters(Pv); - - const_cast(Pv[0].getContigParams()).con_disregard_spurious_rmb_mismatches=false; - - ReadPool thepool(&Pv); - - int c; - extern char *optarg; - extern int optind; - - - string cafin=""; - string strainin=""; - - while (1){ - c = getopt(argc, argv, "+h"); - if(c == -1) break; - - switch (c) { - case 'h': - case '?': { - usage(); - exit(0); - } - default : {} - } - } - - if(argc-optind < 2) { - cerr << argv[0] << ": " << "Missing at least infile or outfile as argument!\n"; - usage(); - exit(1); - } - - string infile=argv[optind++]; - string outfile=argv[optind++]; - - if(argc-optind > 0) { - stringstream tss; - for(int32 i=optind; i dummy; - CAF tcaf(&thepool, &TS_clist, &Pv); - tcaf.load(infile, - ReadGroupLib::SEQTYPE_SANGER, - 1, - dummy, - false, - cafload_callback - ); - - //load(&P, infile, strainin); - // - //doit(); - //save(outfile); - - } - catch(Notify n){ - n.handleError("main"); - } - catch(Flow f){ - cerr << "Unexpected exception: Flow()\n"; - } - - TS_fout.close(); - - FUNCEND(); - return 0; -} - - - - - - - - -class ConvPro -{ -private: - static vector CP_Pv; - - static string CP_fromtype; - static list CP_totype; - - static list CP_ofs; - - - static string CP_infile; - static string CP_outbasename; - - static string CP_renamesequences; - static string CP_renamenamescheme; - - static bool CP_splitcontigs2singlefiles; - - static bool CP_deletestaronlycolumns; - static bool CP_blinddata; - static bool CP_fillholesinstraingenomes; - static bool CP_makecontigs; - static bool CP_extractreadsinsteadcontigs; - static bool CP_hardtrim; - - static string CP_namefile; - static bool CP_keepnamesfromfile; - static bool CP_sortbyname; - - static bool CP_mustdeletetargetfiles; - - static bool CP_specialtestcode; - - static bool CP_filter2readgroup; - - static base_quality_t CP_minqual; - static bool CP_needsquality; - static base_quality_t CP_defaultqual; - - static char CP_recalcconopt; - static char CP_recalcfeatureopt; - - static uint32 CP_minbasecoverage; - - static uint32 CP_mincontiglength; - static bool CP_minlengthisclipped; - - static uint32 CP_mincontigcoverage; - static uint32 CP_minnumreads; - - static list CP_clist; // needed for CAF & MAF conversion (and GBF) - static AssemblyInfo CP_assemblyinfo; - - static uint64 CP_readrenamecounter; - static GFFSave CP_gffsave; - static SAMCollect CP_samcollect; - -private: - static void usage(); - static void checkTypes(const string & fromtype,list & totype); - static void putReadsInContigsAndSave(vector & Pv, ReadPool & rp); - static void discardShortReads(vector & Pv, ReadPool & rp, uint32 minlength, bool fromclipped); - static void specialTestCode(list & clist, ReadPool & rp); - - static void filterToReadGroup(ReadPool & rp); - - static bool contig__nameordercomp(const Contig & a, const Contig & b); - static void sortContigsByName(list & clist); - static void sortPoolByName(ReadPool & rp, string & filename); - - static void saveContigList(list & clist, ReadPool & rp); - static void saveContigList_helper(list & clist, ReadPool & rp); - - static void saveReadPool(ReadPool & rp, list & ofs); - static void cafmafload_callback(list & clist, ReadPool & rp); - static void readpoolload_callback(ReadPool & rp); - static string createFileNameFromBasePostfixContigAndRead(const string & basename, - char * postfix, - Contig * actcon = nullptr, - Read * actread = nullptr); - static uint32 openOFSlist(Contig * optcontig, list & ofs); - static void closeOFSList(uint32 howmany, list & ofs); - -public: - ~ConvPro(); - - int main2(int argc, char ** argv); - - static void closeOpenStreams(list & ofsl); - - static bool checkForFromType(const string & ftype); - static bool checkForToType(const string & ttype); - static void guessFromAndToType(const string & fnamefrom, - string & fromtype, - string * fromstem, - const string & fnameto, - list & totypes, - string * tostem); -}; - -vector ConvPro::CP_Pv; - -string ConvPro::CP_fromtype; -list ConvPro::CP_totype; -list ConvPro::CP_ofs; - -string ConvPro::CP_infile; -string ConvPro::CP_outbasename; - -string ConvPro::CP_renamesequences; -string ConvPro::CP_renamenamescheme; - -bool ConvPro::CP_splitcontigs2singlefiles=false; -bool ConvPro::CP_deletestaronlycolumns=false; -bool ConvPro::CP_blinddata=false; -bool ConvPro::CP_fillholesinstraingenomes=false; -bool ConvPro::CP_makecontigs=false; -bool ConvPro::CP_extractreadsinsteadcontigs=false; -bool ConvPro::CP_hardtrim=false; - -string ConvPro::CP_namefile; -bool ConvPro::CP_sortbyname=false; -bool ConvPro::CP_keepnamesfromfile=true; - -bool ConvPro::CP_mustdeletetargetfiles=true; - -bool ConvPro::CP_specialtestcode=false; -bool ConvPro::CP_filter2readgroup=false; - -base_quality_t ConvPro::CP_minqual=0; -bool ConvPro::CP_needsquality=true; -base_quality_t ConvPro::CP_defaultqual=30; - -char ConvPro::CP_recalcconopt=' '; -char ConvPro::CP_recalcfeatureopt=' '; - -uint32 ConvPro::CP_minbasecoverage=0; - -uint32 ConvPro::CP_mincontiglength=0; -bool ConvPro::CP_minlengthisclipped=false; -uint32 ConvPro::CP_mincontigcoverage=1; -uint32 ConvPro::CP_minnumreads=0; - -list ConvPro::CP_clist; // needed for CAF conversion (and GBF) -AssemblyInfo ConvPro::CP_assemblyinfo; - - -uint64 ConvPro::CP_readrenamecounter=1; - -GFFSave ConvPro::CP_gffsave; -SAMCollect ConvPro::CP_samcollect; - - - -ConvPro::~ConvPro() -{ - closeOpenStreams(CP_ofs); -} - -void ConvPro::usage() -{ - cout << "convert_project\t(MIRALIB version " << MIRAVERSION << ")\n" - "Author: Bastien Chevreux\t(bach@chevreux.org)\n" - "Purpose: convert assembly and sequencing file types.\n\n"; - cout << "Usage:\n" - "convert_project [-f ] [-t [-t ...]]\n" - "\t[-aChimMsuZ]\n" - "\t[-AcflnNoqrtvxXyz {...}]\n" - "\t{infile} {outfile} [ ...]\n\n"; - cout << "Options:\n"; - cout << - "\t-f \tload this type of project files, where fromtype is:\n" - "\t caf\t\t a complete assembly or single sequences from CAF\n" - "\t maf\t\t a complete assembly or single sequences from CAF\n" - "\t fasta\t sequences from a FASTA file\n" - "\t fastq\t sequences from a FASTQ file\n" - "\t gbf\t\t sequences from a GBF file\n" - "\t phd\t\t sequences from a PHD file\n" - "\t fofnexp\t sequences in EXP files from file of filenames\n"; - cout << "\t-t \twrite the sequences/assembly to this type (multiple\n" - "\t\t\tmentions of -t are allowed):\n" - "\t ace\t\t sequences or complete assembly to ACE\n" - "\t caf\t\t sequences or complete assembly to CAF\n" - "\t maf\t\t sequences or complete assembly to MAF\n" - "\t sam\t\t complete assembly to SAM\n" - "\t samnbb\t like above, but leaving out reference (backbones) in mapping assemblies\n" - "\t gbf\t\t sequences or consensus to GBF\n" - "\t gff3\t\t consensus to GFF3\n" - "\t wig\t\t assembly coverage info to wiggle file\n" - "\t gcwig\t assembly gc content info to wiggle file\n" - "\t fasta\t sequences or consensus to FASTA file (qualities to\n" - "\t\t\t .qual)\n" - "\t fastq\t sequences or consensus to FASTQ file\n" - "\t exp\t\t sequences or complete assembly to EXP files in\n" - "\t\t\t directories. Complete assemblies are suited for gap4\n" - "\t\t\t import as directed assembly.\n" - "\t\t\t Note: using caf2gap to import into gap4 is recommended though\n" - "\t text\t\t complete assembly to text alignment (only when -f is\n" - "\t\t\t caf, maf or gbf)\n" - "\t html\t\t complete assembly to HTML (only when -f is caf, maf or\n" - "\t\t\t gbf)\n" - "\t tcs\t\t complete assembly to tcs\n" - "\t hsnp\t\t surrounding of SNP tags (SROc, SAOc, SIOc) to HTML\n" - "\t\t\t (only when -f is caf, maf or gbf)\n" - "\t asnp\t\t analysis of SNP tags\n" - "\t\t\t (only when -f is caf, maf or gbf)\n" - "\t cstats\t contig statistics file like from MIRA\n" - "\t\t\t (only when source contains contigs)\n" - "\t crlist\t contig read list file like from MIRA\n" - "\t\t\t (only when source contains contigs)\n" - "\t maskedfasta\t reads where sequencing vector is masked out\n" - "\t\t\t (with X) to FASTA file (qualities to .qual)\n" - "\t scaf\t\t sequences or complete assembly to single sequences CAF\n"; - - cout << "\t-a\t\tAppend to target files instead of rewriting\n"; - - cout << - "\t-A \tString with MIRA parameters to be parsed\n" - "\t\t\t Useful when setting parameters affecting consensus\n" - "\t\t\t calling like -CO:mrpg etc.\n" - "\t\t\t E.g.: -a \"454_SETTINGS -CO:mrpg=3\"\n"; - - cout << - "\t-b\t\tBlind data\n" - "\t\t\t Replaces all bases in reads/contigs with a 'c'\n"; - - cout << "\t-C\t\tPerform hard clip to reads\n" - "\t\t\t When reading formats which define clipping points, will\n" - "\t\t\t save only the unclipped part into the result file.\n" - "\t\t\t Applies only to files/formats which do not contain\n" - "\t\t\t contigs.\n"; - - cout << - "\t-d\t\tDelete gap only columns\n" - "\t\t\t When output is contigs: delete columns that are\n" - "\t\t\t entirely gaps (like after having deleted reads during\n" - "\t\t\t editing in gap4 or similar)\n" - "\t\t\t When output is reads: delete gaps in reads\n"; - - cout << - "\t-F\t\tFilter to read groups\n" - "\t\t\t Special use case, do not use yet.\n"; - - - cout << - "\t-m\t\tMake contigs (only for -t = caf or maf)\n" - "\t\t\t Encase single reads as contig singlets into the CAF/MAF\n" - "\t\t\t file.\n"; - cout << - "\t-n \twhen given, selects only reads or contigs given by\n" - "\t\t\t name in that file.\n"; - cout << - "\t-i\t\twhen -n is used, inverts the selection\n"; - cout << - "\t-o\t\tfastq quality Offset (only for -f = 'fastq')\n" - "\t\t\t Offset of quality values in FASTQ file. Default of 0\n" - "\t\t\t tries to automatically recognise.\n"; - - cout << - "\t-Q \t\tSet default quality for bases in file types without quality values\n" - "\t\t\t Furthermore, do not stop if expected quality files are missing (e.g. '.fasta')\n"; - - cout << - "\t-R \tRename contigs/singlets/reads with given name string\n" - "\t\t\t to which a counter is appended.\n" - "\t\t\t Known bug: will create duplicate names if input\n" - "\t\t\t contains contigs/singlets as well as free reads, i.e.\n" - "\t\t\t reads not in contigs nor singlets.\n"; - - cout << - "\t-S \t(name)Scheme for renaming reads, important for paired-ends\n" - "\t\t\t Only 'solexa' is currently supported.\n"; - - - // TODO: re-adapt these switches to >2.9.8 -// cout << "\t-s \twhen loading assemblies from files that do not contain\n"; -// cout << "\t\t\t strain information (e.g. CAF), load the strain\n"; -// cout << "\t\t\t information from this file. (2 columns, tab delimited:\n"; -// cout << "\t\t\t readname left, strain name right)\n"; -// - -// - - cout << - "\n\t--------------------------------------------------------\n" - "\tThe following switches work only when input (CAF or MAF)\n" - "\tcontains contigs. Beware: CAF and MAf can also contain\n" - "\tjust reads.\n" - "\t--------------------------------------------------------\n\n"; - - // TODO: check if ok for >2.9.8 - cout << - "\t-M\t\tDo not extract contigs (or their consensus), but the\n" - "\t\t\t sequence of the reads they are composed of.\n"; - cout << - "\t-N \tlike -n, but sorts output according to order given\n" - "\t\t\t in file.\n"; - cout << - "\t-r [cCqf]\tRecalculate consensus and / or consensus quality values\n" - "\t\t\t and / or SNP feature tags.\n" - "\t\t\t 'c' recalc cons & cons qualities (with IUPAC)\n" - "\t\t\t 'C' recalc cons & cons qualities (forcing non-IUPAC)\n" - "\t\t\t 'q' recalc consensus qualities only\n" - "\t\t\t 'f' recalc SNP features\n" - "\t\t\t Note: only the last of cCq is relevant, f works as a\n" - "\t\t\t switch and can be combined with cQq (e.g. \"-r C -r f\")\n" - "\t\t\t Note: if the CAF/MAF contains multiple strains,\n" - "\t\t\t recalculation of cons & cons qualities is forced, you\n" - "\t\t\t can just influence whether IUPACs are used or not.\n"; - cout << - "\t-s\t\tsplit output into multiple files instead of creating a\n" - "\t\t\t single file\n"; - cout << - "\t-u\t\t'fillUp strain genomes'\n" - "\t\t\t Fill holes in the genome of one strain (N or @)\n" - "\t\t\t with sequence from a consensus of other strains\n" - "\t\t\t Takes effect only with -r and -t gbf or fasta/q\n" - "\t\t\t in FASTA/Q: bases filled up are in lower case\n" - "\t\t\t in GBF: bases filled up are in upper case\n"; - - cout << - "\t-q \tDefines minimum quality a consensus base of a strain\n" - "\t\t\t must have, consensus bases below this will be 'N'\n" - "\t\t\t Default: 0\n" - "\t\t\t Only used with -r, and -f is caf/maf and -t is (fasta\n" - "\t\t\t or gbf)\n"; -// cout << -// "\t-v \tDefines minimum coverage a consensus base of a strain\n" -// "\t\t\t must have, bases with coverage below this will be 'N'\n" -// "\t\t\t Default: 0\n" -// "\t\t\t Only used with -r, and -t is (fasta\n" -// "\t\t\t or gbf)\n"; - - cout << - "\t-v\t\tPrint version number and exit\n"; - - cout << - "\t-x \tMinimum contig or read length\n" - "\t\t\t When loading, discard all contigs / reads with a\n" - "\t\t\t length less than this value. Default: 0 (=switched off)\n" - "\t\t\t Note: not applied to reads in contigs!\n"; - cout << - "\t-X \tSimilar to -x but applies only to reads and\n" - "\t\t\t then to the clipped length.\n"; - - cout << - "\t-y \tMinimum average contig coverage\n" - "\t\t\t When loading, discard all contigs with an\n" - "\t\t\t average coverage less than this value.\n" - "\t\t\t Default: 1\n"; - - cout << - "\t-z \tMinimum number of reads in contig\n" - "\t\t\t When loading, discard all contigs with a\n" - "\t\t\t number of reads less than this value.\n" - "\t\t\t Default: 0 (=switched off)\n"; - - - cout << - "\t-l \twhen output as text or HTML: number of bases shown in\n" - "\t\t\t one alignment line. Default: 60.\n" - "\t-c \twhen output as text or HTML: character used to pad\n" - "\t\t\t endgaps. Default: ' ' (blank)\n"; - - cout << "\nAliases:\n" - "caf2html, exp2fasta, ... etc. Any combination of \"2\"\ncan be used as program name (also using links) so as that convert_project\nautomatically sets -f and -t accordingly.\n"; - - cout << "\nExamples:\n" - "\tconvert_project source.maf dest.sam\n" - "\tconvert_project source.caf dest.fasta wig ace\n" - "\tconvert_project -x 2000 -y 10 source.caf dest.caf\n" - "\tcaf2html -l 100 -c . source.caf dest\n"; -} - - -bool ConvPro::checkForFromType(const string & ftype) -{ - static set ftypes={ - "caf", - "maf", - "phd", - "gbf", - "gbff", - "gbfk", - "gff3", - "fasta", - "fastq", - "fofnexp" - }; - return ftypes.find(ftype)!=ftypes.end(); -} - -bool ConvPro::checkForToType(const string & ttype) -{ - static set ttypes={ - "fasta", - "fastq", - "maskedfasta", - "caf", - "maf", - "sam", - "samnbb", - "ace", - "scaf", - "exp", - "gbf", - "gff3", - "tcs", - "text", - "txt", - "html", - "wiggle", - "wig", - "gcwiggle", - "gcwig", - "asnp", - "fcov", - "hsnp", - "cstats", - "crlist", - "null" - }; - return ttypes.find(ttype)!=ttypes.end(); -} - -void ConvPro::checkTypes(const string & fromtype,list & totype) -{ - if(!checkForFromType(fromtype)){ - usage(); - cout << endl; - cerr << "Unknown or illegal file type '" << fromtype << "' defined as \n"; - exit(1); - } - if(CP_totype.empty()){ - CP_totype.push_back(fromtype); - } - for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI){ - if(!checkForToType(*ttI)){ - usage(); - cout << endl; - cerr << "ConvPro::checkTypes: Unknown or illegal file type '" << *ttI << "' defined as \n"; - exit(1); - } - } -} - -// comfort function: parse fromtype and totype from name of infile, outfile -void ConvPro::guessFromAndToType(const string & fnamefrom, string & fromtype, string * fromstem, const string & fnameto, list & totypes, string * tostem) -{ - uint8 ziptype=0; - string ft; - string dummystem; - guessFileAndZipType(fnamefrom,dummystem,ft,ziptype); - if(fromtype.empty()){ - fromtype.swap(ft); - if(fromstem != nullptr) fromstem->swap(dummystem); - } - - ft.clear(); - dummystem.clear(); - guessFileAndZipType(fnameto,dummystem,ft,ziptype); - if(!ft.empty() && checkForToType(ft)){ - totypes.push_back(ft); - if(tostem != nullptr) tostem->swap(dummystem); - } - -} - - -void ConvPro::filterToReadGroup(ReadPool & rp) -{ - FUNCSTART("void ConvPro::filterToReadGroup(ReadPool & rp)"); - - vector ofspassed(ReadGroupLib::getNumReadGroups()); - vector ofswidow(ReadGroupLib::getNumReadGroups()); - vector ofsdebris(ReadGroupLib::getNumReadGroups()); - - deque seenrgnames; - for(uint32 rglid=1; rglid(rglid)+"_passed.fastq"; - } - for(auto & sn : seenrgnames){ - if(sn==rgname){ - cout << "\nReadgroup '"< sortdummy; - rp.sortPoolToMIRAStandard(sortdummy); - } - vector hasmultisegmentemplates(ReadGroupLib::getNumReadGroups(),false); - for(uint32 rpi=0; rpi< rp.size(); ++rpi){ - if(rp[rpi].getTemplatePartnerID()!=-1){ - hasmultisegmentemplates[rp[rpi].getReadGroupID().getLibId()]=true; - } - } - hasmultisegmentemplates[0]=false; - - for(uint32 rpi=0; rpi< rp.size(); ){ - bool allok=true; - auto lasti=rpi; - for(; lasti0 && rp[lasti].getLenSeq()0 && rp[rpi].getLenSeq()>=CP_mincontiglength){ - ofswidow[rp[rpi].getReadGroupID().getLibId()] << rp[rpi]; - }else{ - ofsdebris[rp[rpi].getReadGroupID().getLibId()] << rp[rpi]; - } - } - } - } - -} - - -#define CEBUG(bla) //{cout << bla; cout.flush();} -void ConvPro::specialTestCode(list & clist, ReadPool & rp) -{ - FUNCSTART("void ConvPro::specialTestCode(list & clist, ReadPool & rp)"); - try { - for(auto cI=clist.begin(); cI!=clist.end(); ++cI){ - cI->findBestNonMisassembledRange(); - cout << "CHecking: " << cI->getContigName() << endl; - if(cI->getContigLength()>=1000){ - auto p=cI->findBestPairConsistencyRange(); - if(p.first>=0) cout << "Found best range: " << cI->getContigName() << "\t" << p.first << "\t" << p.second << "\t" << p.second-p.first << endl; - } - - - if(1){ - auto range=cI->findBestNonMisassembledRange(); - if(range.first>=0){ - cout<<"Found misassembly by repeat marker. Best range: " << range.first << ".." << range.second << '\t' << range.second-range.first << endl; - cI->trimContigToRange(range.first,range.second); - - } - } - - if(1){ - coverageinfo_t cinfo; - vector covvals; - cI->collectCoverage(covvals); - cI->calcStatsOnContainer(cinfo,covvals); - cout << "1st covnum: " << cinfo << endl; - - // TODO: perhaps make this dependend of ratio mean vs stddev ? - cI->calcSecondOrderStatsOnContainer(cinfo,covvals); - cout << "2nd covnum: " << cinfo << endl; - - vector peakindicator; - cI->findPeaks(cinfo.median,peakindicator); - unordered_set readsremoved; - cI->reduceReadsAtCoveragePeaks(cinfo.median,peakindicator,readsremoved); - cout << "Removed " << readsremoved.size() << endl; - } - - -// vector readsmarkedsrm; -// if(1){ -// cout << "\nMarking tricky 454 / Solexa overcalls in temporary contig.\n"; -// cout << "Marked " << I->editTrickyOvercalls(true,false,readsmarkedsrm) << " reads.\n"; -// bool newreptmarked=Assembly::markRepeats(*I, readsmarkedsrm); -// cout << "Edited " << I->editTrickyOvercalls(false,false,readsmarkedsrm) << " reads.\n"; -// I->deleteStarOnlyColumns(0, I->getContigLength()-1); -// I->deleteTagsInReads(Read::REA_defaulttag_PSHP.identifier); -// } -// I->markFeaturesByConsensus(true,true,true); -// I->editSingleDiscrepancyNoHAFTag(readsmarkedsrm); -// assout::saveReadTagList(*I, -// "blabla", -// true); - - -// uint32 numcoledits=0; -// uint32 numreadedits=0; -// for(uint32 i=0; i<5; ++i){ -// I->editPBSledgeHammer(readsmarkedsrm,numcoledits,numreadedits); -// cout <<"### i " << i << " " << numcoledits << " " << numreadedits << endl; -// I->deleteStarOnlyColumns(0,I->getContigLength()); -// //I->upDownCase(5); -// } - - } - } -// try{ -// for(auto & cle : clist){ -// auto & cr=cle.getContigReads(); -// for(auto & cre : cr){ -// Read & r=const_cast(cre); -// if(r.isBackbone()){ -// cout << "Sorting " << r.getName() << endl; -// r.sortTagsForGFF3(); -// } -// } -// } -// } - catch(Notify n){ - n.handleError(THISFUNC); - } - FUNCEND(); -} -#undef CEBUG - - - -void ConvPro::putReadsInContigsAndSave(vector & Pv, ReadPool & rp) -{ - for(uint32 i=0; i & Pv, ReadPool & rp, uint32 minlength, bool fromclipped) -{ - for(uint32 i=0; igetContigName(); - }else if(actread != nullptr){ - if(!filename.empty()) filename+='_'; - filename+=actread->getName(); - } - filename+=postfix; - return filename; -} - - -bool ConvPro::contig__nameordercomp(const Contig & a, const Contig & b) -{ - return General::getNameOrder(a.getContigName()) < General::getNameOrder(b.getContigName()); -} - - -void ConvPro::sortContigsByName(list & clist) -{ - clist.sort(contig__nameordercomp); -} - - -void ConvPro::sortPoolByName(ReadPool & rp, string & filename) -{ - FUNCSTART("void ConvPro::sortPoolByName(ReadPool & rp, string & filename)"); - - cout << "Sorting pool ..."; cout.flush(); - - rp.allowNameIndex(true); - - ifstream fin; - fin.open(filename.c_str(), ios::in); - if(!fin){ - MIRANOTIFY(Notify::FATAL, "File not found: " << filename); - } - fin.seekg(0, ios::beg); - - vector newsortorder; - - string elemname, dummy; - uint32 numread=0; - while(GeneralIO::readKeyValue(fin, elemname,dummy)){ - int32 newpos=rp.getReadIndex(elemname); - if(newpos>=0) newsortorder.push_back(static_cast(newpos)); - } - fin.close(); - - rp.sortPoolToGivenOrder(newsortorder); - - rp.allowNameIndex(false); - - cout << "done.\n"; - - FUNCEND(); -} - -void ConvPro::saveContigList_helper(list & clist, ReadPool & rp) -{ - FUNCSTART("void ConvPro::saveContigList_helper(list & clist, ReadPool & rp)"); - - if(CP_specialtestcode) specialTestCode(clist,rp); - - //{ - // cout << "CLISTSIZE: " << clist.size() << endl; - // list::iterator cI=clist.begin(); - // for(; cI != clist.end(); cI++){ - // cout << "cname: " << cI->getContigName() << endl; - // } - //} - - BUGIFTHROW(!CP_ofs.empty() && CP_ofs.size() != CP_totype.size(), "Ooops? !CP_ofs.empty() && CP_ofs.size() != CP_totype.size() ???"); - - list::iterator ofsI= CP_ofs.begin(); - list::iterator ttI= CP_totype.begin(); - for(; ttI!=CP_totype.end(); ++ttI, ++ofsI){ - if(*ttI=="null"){ - // do nothing - }else if(*ttI=="scaf"){ - //clear_conandrp=false; - }else if(*ttI=="hsnp"){ - MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); - string fn; - if(CP_splitcontigs2singlefiles){ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_snpenvironment, - ".html", - &clist.front()); - }else{ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_snpenvironment, - ".html"); - } - assout::saveSNPSurroundingAsHTML(clist,fn,CP_mustdeletetargetfiles); - }else if(*ttI=="cstats"){ - MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); - string fn; - if(CP_splitcontigs2singlefiles){ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_contigstats, - ".txt", - &clist.front()); - }else{ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_contigstats, - ".txt"); - } - assout::saveStatistics(clist,fn,CP_mustdeletetargetfiles); - if(CP_splitcontigs2singlefiles){ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_contigtags, - ".txt", - &clist.front()); - }else{ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_contigtags, - ".txt"); - } - assout::saveConsensusTagList(clist,fn,CP_mustdeletetargetfiles); - }else if(*ttI=="crlist"){ - MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); - string fn; - if(CP_splitcontigs2singlefiles){ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_crlist, - ".txt", - &clist.front()); - }else{ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_crlist, - ".txt"); - } - assout::saveContigReadList(clist,fn,CP_mustdeletetargetfiles); - }else if(*ttI=="asnp"){ - MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); - string fn,fa,fs,fc; - - if(CP_splitcontigs2singlefiles){ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_snpanalysis, - ".txt", - &clist.front()); - fa=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featureanalysis, - ".txt", - &clist.front()); - fs=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresummary, - ".txt", - &clist.front()); - fc=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresequences, - ".txt", - &clist.front()); - }else{ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_snpanalysis, - ".txt"); - fa=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featureanalysis, - ".txt"); - fs=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresummary, - ".txt"); - fc=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featuresequences, - ".txt"); - } - - assout::saveSNPList(clist,fn,CP_mustdeletetargetfiles); - assout::saveFeatureAnalysis(clist,rp, - fa,fs,fc, - CP_mustdeletetargetfiles); - - }else if(*ttI=="fcov"){ - MIRAParameters::generateProjectOutNames(CP_Pv,CP_outbasename); - string fn,fa,fs,fc; - - if(CP_splitcontigs2singlefiles){ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featurecoverage, -// "coveragei", - ".txt", - &clist.front()); - }else{ - fn=createFileNameFromBasePostfixContigAndRead( - CP_Pv[0].getAssemblyParams().as_outfile_stats_featurecoverage, -// "coveragei", - ".txt"); - } - - assout::saveCoverageInfo(clist,fn,CP_mustdeletetargetfiles); - }else if(*ttI=="fasta"){ - //CALLGRIND_START_INSTRUMENTATION; - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ""); - } - assout::saveStrainsAsFASTAQ(clist, - rp, - bn, - false, - CP_minbasecoverage, - CP_minqual, - CP_mustdeletetargetfiles, - CP_fillholesinstraingenomes); - }else if(*ttI=="fastaqual"){ - // fastaqual is "do-nothing" as "fasta" also write fastaqual here! - }else if(*ttI=="fastq"){ - //CALLGRIND_START_INSTRUMENTATION; - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ""); - } - assout::saveStrainsAsFASTAQ(clist, - rp, - bn, - true, - CP_minbasecoverage, - CP_minqual, - CP_mustdeletetargetfiles, - CP_fillholesinstraingenomes); - } else if(*ttI=="caf"){ - Contig::setCoutType(Contig::AS_CAF); - list::iterator I=clist.begin(); - for(;I!=clist.end(); I++){ - if(CP_recalcfeatureopt=='f') I->markFeaturesByConsensus(true,true,true); - if(CP_recalcfeatureopt=='r') { - vector dummy; - Assembly::markRepeats(*I,dummy); - } - bool mustclose=false; - if(!(*ofsI)->is_open()){ - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".caf", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".caf", - nullptr); - } - (*ofsI)->open(bn.c_str(), ios::out); - mustclose=true; - } - *(*ofsI) << *I; - if(mustclose){ - (*ofsI)->close(); - } - } - } else if(*ttI=="sam"){ - BUGIFTHROW(!(*ofsI)->is_open(),"Ooops, SAM stream not open?"); - for(auto & cle : clist){ - cle.dumpAsSAM(*(*ofsI),CP_samcollect,true); - } - } else if(*ttI=="samnbb"){ - BUGIFTHROW(!(*ofsI)->is_open(),"Ooops, SAM stream not open?"); - for(auto & cle : clist){ - cle.dumpAsSAM(*(*ofsI),CP_samcollect,false); - } - } else if(*ttI=="maf"){ - Contig::setCoutType(Contig::AS_MAF); - list::iterator I=clist.begin(); - for(;I!=clist.end(); I++){ - if(CP_recalcfeatureopt=='f') I->markFeaturesByConsensus(true,true,true); - if(CP_recalcfeatureopt=='r') { - vector dummy; - Assembly::markRepeats(*I,dummy); - } - if(!(*ofsI)->is_open()){ - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".maf", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".maf", - nullptr); - } - (*ofsI)->open(bn.c_str(), ios::out); - Contig::dumpMAF_Head(*(*ofsI)); - } - *(*ofsI) << *I; - if(CP_splitcontigs2singlefiles){ - (*ofsI)->close(); - } - } - } else if(*ttI=="html"){ - //cerr << "HTML output currently deactivated in development version!\n"; - //exit(1); - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".html", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".html"); - } - assout::dumpContigListAsHTML(clist, bn, CP_mustdeletetargetfiles, CP_outbasename); - } else if(*ttI=="text" - || *ttI=="txt"){ - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".txt", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".txt"); - } - assout::saveAsTXT(clist, bn, CP_mustdeletetargetfiles); - } else if(*ttI=="exp"){ - // outbasename is in this case a directory name - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ""); - } - assout::saveAsGAP4DA(clist,bn,CP_mustdeletetargetfiles); - } else if(*ttI=="gbf"){ - // outbasename is in this case the basename name - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ""); - } - assout::saveStrainsAsGBF(clist, - rp, - bn, - CP_minqual, - CP_fillholesinstraingenomes, - CP_mustdeletetargetfiles); - } else if(*ttI=="gff3"){ - // outbasename is in this case the basename name - list::iterator cI=clist.begin(); - for(; cI != clist.end(); ++cI){ - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "", - &clist.front()); - if(CP_gffsave.is_open()){ - CP_gffsave.close(); - } - CP_gffsave.open(bn); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ""); - if(!CP_gffsave.is_open()){ - CP_gffsave.open(bn); - } - } - CP_gffsave.acquireContig(*cI,rp); - } - } else if(*ttI=="ace"){ - // outbasename is in this case the basename name - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".ace", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".ace"); - } - assout::saveAsACE(clist,bn,CP_mustdeletetargetfiles); - } else if(*ttI=="tcs"){ - // outbasename is in this case the basename name - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".tcs", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".tcs"); - } - assout::saveAsTCS(clist,bn,CP_mustdeletetargetfiles); - } else if(*ttI=="wiggle" || *ttI=="wig"){ - // outbasename is in this case the basename name - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".wig", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - ".wig"); - } - assout::saveAsWiggle(clist,bn,CP_mustdeletetargetfiles,false); - } else if(*ttI=="gcwiggle" || *ttI=="gcwig"){ - // outbasename is in this case the basename name - string bn; - if(CP_splitcontigs2singlefiles){ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "_gccontent.wig", - &clist.front()); - }else{ - bn=createFileNameFromBasePostfixContigAndRead( - CP_outbasename, - "_gccontent.wig"); - } - assout::saveAsWiggle(clist,bn,CP_mustdeletetargetfiles,true); - } else { - cerr << "\n\n-t " << *ttI << " is not a valid 'to' type when converting contigs (sorry). But maybe something went wrong, please contact the author.\n"; - exit(1); - } - } - - if(!CP_splitcontigs2singlefiles){ - CP_mustdeletetargetfiles=false; - } - - FUNCEND(); -} - -void ConvPro::saveContigList(list & clist, ReadPool & rp) -{ - FUNCSTART("void ConvPro::saveContigList(list & clist, ReadPool & rp)"); - bool dosomeoutput=false; - - list::iterator cI=clist.begin(); - for(; cI != clist.end(); cI++){ - bool conout=true; - - if(CP_mincontiglength>0 - && cI->getContigLength() < CP_mincontiglength){ - conout=false; - } else { - Contig::constats_t constats(cI->getStats()); - - //cI->stats(cout); - - if(CP_mincontigcoverage>0 - && constats.avg_coverage < CP_mincontigcoverage){ - conout=false; - } else if(CP_minnumreads>0 - && constats.total_reads < CP_minnumreads){ - conout=false; - } - } - - if(conout){ - if(General::hasNames()){ - string cname(cI->getContigName()); - if(!General::checkNamePresence(cname)){ - conout=false; - } - if(!CP_keepnamesfromfile) conout=!conout; - } - } - - // delete contigs which should not be output - // TODO: - // would generally be better to have that in some loading callback (and - // would work for contigs well enough), but readpool mechanisms would - // not at the moment, too primitive - if(!conout){ - cI=clist.erase(cI); - if(cI != clist.begin()) --cI; - } - - dosomeoutput|=conout; - } - - if(dosomeoutput){ - for(cI=clist.begin(); cI != clist.end(); cI++){ - if(CP_deletestaronlycolumns) { - cI->deleteStarOnlyColumns(0,cI->getContigLength()); - } - if(CP_blinddata){ - cI->blindContig(); - } - } - - Assembly::refreshContigAndReadpoolValuesAfterLoading(rp,clist); - - // TODO: ! make autoconfigure: on several strains, this is needed! - // else, let user define via switch - for(cI=clist.begin(); cI != clist.end(); cI++){ - if(CP_recalcconopt=='c' - || CP_recalcconopt=='C'){ - cI->trashConsensusCache(false); - } - if(CP_recalcconopt=='q'){ - cI->trashConsensusCache(true); - } - - CP_assemblyinfo.storeContigStats(cI->getStats()); - } - - try{ - saveContigList_helper(CP_clist, rp); - } - catch(Notify n){ - n.handleError(THISFUNC); - } - } -} - -void ConvPro::saveReadPool(ReadPool & rp, list & ofs) -{ - FUNCSTART("void ConvPro::saveReadPool(ReadPool & rp, list & ofs)"); - - rp.adjustIllegalQualities(30); - - if(CP_deletestaronlycolumns) { - for(uint32 i=0; i0 && !CP_filter2readgroup){ - discardShortReads(CP_Pv,rp,CP_mincontiglength,CP_minlengthisclipped); - } - - if(!CP_renamesequences.empty()){ - if(!CP_renamenamescheme.empty()){ - for(size_t i=1; i readrenamed(rp.size(),0); - string tmpname; - for(uint32 rpi=0; rpi=0 && readrenamed[rp[rpi].getTemplatePartnerID()]){ - tmpname=rp[rp[rpi].getTemplatePartnerID()].getTemplate(); - }else{ - tmpname=CP_renamesequences+"_"+boost::lexical_cast(CP_readrenamecounter++); - } - auto segment=rp[rpi].getTemplateSegment(); - if(rp[rpi].getReadNamingScheme()==ReadGroupLib::SCHEME_SOLEXA){ - if(rp[rpi].getTemplateSegment()==1){ - tmpname+="/1"; - }else if(rp[rpi].getTemplateSegment()==255){ - tmpname+="/2"; - }else if(rp[rpi].getTemplateSegment()!=0){ - BUGIFTHROW(true,"Read " << rp[rpi].getName() << " has illegal segment " << static_cast(rp[rpi].getTemplateSegment()) << " ???"); - } - } - rp[rpi].setTemplate(""); - rp[rpi].setTemplateSegment(0); - rp[rpi].setName(tmpname); - readrenamed[rpi]=1; - } - } - - if(CP_makecontigs) { - putReadsInContigsAndSave(CP_Pv, rp); - }else if(CP_filter2readgroup){ - filterToReadGroup(rp); - }else{ - list::iterator ttI= CP_totype.begin(); - list::iterator ofsI= ofs.begin(); - for(; ttI!=CP_totype.end(); ++ttI, ++ofsI){ - bool needofsIclose=false; - // BaCh 16.01.2012: changed != below to == ... was probably a simple programming error (I hope) - if(*ttI=="gff3"){ - if(!CP_splitcontigs2singlefiles){ - BUGIFTHROW(!(*(*ofsI)).is_open(), *ttI << " file stream not open???"); - } - (*(*ofsI)).open((rp[0].getName()+'.'+*ttI).c_str(),ios::out); - needofsIclose=true; - } - if(*ttI=="fasta"){ - // double indirection because iterator needs one and it is a list of ofstream pointers ... - rp.dumpAs(*(*ofsI),Read::AS_FASTA,false); - } else if(*ttI=="fastaqual"){ - rp.dumpAs(*(*ofsI),Read::AS_FASTAQUAL,false); - } else if(*ttI=="maskedfasta"){ - rp.dumpAs(*(*ofsI),Read::AS_MASKEDMASKFASTA,false); - } else if(*ttI=="maskedfastaqual"){ - rp.dumpAs(*(*ofsI),Read::AS_MASKEDMASKFASTAQUAL,false); - } else if(*ttI=="fastq"){ - rp.dumpAs(*(*ofsI),Read::AS_FASTQ,false); - } else if(*ttI=="caf" || *ttI=="scaf" ){ - rp.dumpAs(*(*ofsI),Read::AS_CAF,false); - } else if(*ttI=="maf"){ - //rp.dumpAs(*(*ofsI),Read::AS_MAF,false); - rp.saveAsMAF(*(*ofsI),false); - } else if(*ttI=="gff3"){ - for(uint32 rpi=0; rpi & ofs) -{ - FUNCSTART("uint32 ConvPro::openOFSlist(Contig * optcontig, list & ofs)"); - BUGIFTHROW(CP_totype.empty(), " CP_totype.empty() ???"); - - uint32 mustclose=0; - ofstream * ofstmp; - - for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI){ - - cout << "opening " << *ttI << endl; - - ofstmp=new ofstream; - ofs.push_back(ofstmp); - if(*ttI=="fasta"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="fastaqual"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="maskedfasta"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="maskedfastaqual"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="fastq"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fastq",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="caf" || *ttI=="scaf" ){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".caf",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="maf"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".maf",optcontig).c_str(), ios::out); - Contig::dumpMAF_Head(*(ofs.back())); - ++mustclose; - } else if(*ttI=="sam" || *ttI=="samnbb"){ - ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".sam",optcontig).c_str(), ios::out); - ++mustclose; - } else if(*ttI=="gff3"){ - if(CP_gffsave.is_open()) CP_gffsave.close(); - CP_gffsave.open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".gff3",optcontig).c_str()); - } - } - return mustclose; -} - -void ConvPro::closeOFSList(uint32 howmany, list & ofs) -{ - FUNCSTART("uint32 ConvPro::closeOFSList(uint32 howmany)"); - BUGIFTHROW(howmany>ofs.size(),"howmany>ofs.size() ???"); - for(uint32 i=0; i & clist, ReadPool & rp) -{ - FUNCSTART("void ConvPro::cafmafload_callback(list & clist, ReadPool & rp)"); - BUGIFTHROW(clist.empty() && rp.size()==0,"clist.empty() && rp.size()==0"); - { - list::iterator cI=clist.begin(); - for(; cI != clist.end(); ++cI){ - if(!CP_renamesequences.empty()){ - cI->setContigName(""); - cI->setContigNamePrefix(CP_renamesequences); - } - } - } - if(!clist.empty() && !CP_extractreadsinsteadcontigs){ - saveContigList(clist,rp); - }else{ - list ofs; - uint32 mustclose=0; - if(CP_splitcontigs2singlefiles && !clist.empty()){ - mustclose=openOFSlist(&clist.front(),ofs); - saveReadPool(rp,ofs); - }else{ - saveReadPool(rp,CP_ofs); - } - closeOFSList(mustclose,ofs); - } - - Read::trashReadNameContainer(); - clist.clear(); - rp.discard(); -} - -void ConvPro::readpoolload_callback(ReadPool & rp) -{ - saveReadPool(rp,CP_ofs); - - Read::trashReadNameContainer(); - rp.discard(); -} - - -void ConvPro::closeOpenStreams(list & ofsl) -{ - list::iterator ofsI= ofsl.begin(); - for(; ofsI!=ofsl.end(); ++ofsI){ - delete *ofsI; - } -} - -int ConvPro::main2(int argc, char ** argv) -{ - //CALLGRIND_STOP_INSTRUMENTATION; - - FUNCSTART("int main2(int argc, char ** argv)"); - - fixQuirks(); - - int c; - extern char *optarg; - extern int optind; - - //base_quality_t fqqualoffset=0; - string fqqualoffset("33"); - - string strainfile=""; - - int32 linelen=60; - char endgap_fillchar=' '; - - string path; - string convertprog; - splitFullPathAndFileName(argv[0],path,convertprog); - - { - boost::to_lower(convertprog); - string sep="2"; - string::size_type seppos=string::npos; - seppos=convertprog.find_first_of(sep,0); - if(seppos!=string::npos){ - CP_fromtype=convertprog.substr(0, seppos); - CP_totype.push_back(convertprog.substr(seppos+1,100)); - } - } - - string miraparams; - - //"CZihumMsl:r:c:f:t:s:q:n:N:v:x:X:y:z:o:a:" - const char pstring[]= - "abCdFhimMsuvZ" - "A:c:f:l:n:N:o:q:Q:r:R:S:t:x:X:y:z:"; - - while (1){ - c = getopt(argc, argv, pstring); - if(c == -1) break; - - switch (c) { - case 'v': { - cout << MIRAVERSION << endl; - exit(0); - } - case 'h': - case '?': { - usage(); - exit(0); - } - - case 'a': { - CP_mustdeletetargetfiles=false; - break; - } - case 'A': { - miraparams=optarg; - break; - } - case 'b': { - CP_blinddata=true; - break; - } - case 'c': { - string egfc=optarg; - if(egfc.size()!=1){ - usage(); - cout << endl; - cerr << "ERROR: -c must be a single character\n"; - exit(1); - } - endgap_fillchar=egfc[0]; - break; - } - case 'C': { - CP_hardtrim=true; - break; - } - case 'd': { - CP_deletestaronlycolumns=true; - break; - } - case 'f': { - CP_fromtype=optarg; - break; - } - case 'F': { - CP_filter2readgroup=true; - break; - } - case 'i': { - CP_keepnamesfromfile=false; - break; - } - case 'l': { - linelen=atoi(optarg); - if(linelen <= 0) { - usage(); - cout << endl; - cerr << "ERROR: -l must be >=0\n"; - exit(1); - } - break; - } - case 'm': { - CP_makecontigs=true; - CP_extractreadsinsteadcontigs=false; - break; - } - case 'M': { - CP_extractreadsinsteadcontigs=true; - CP_makecontigs=false; - break; - } - case 'n': { - CP_namefile=optarg; - break; - } - case 'N': { - CP_namefile=optarg; - CP_sortbyname=true; - break; - } - case 'o': { - fqqualoffset=optarg; - break; - } - case 'q': { - CP_minqual=atoi(optarg); - if(CP_minqual >100) { - usage(); - cout << endl; - cerr << "ERROR: -q must be <= 100\n"; - exit(1); - } - break; - } - case 'Q': { - auto tmpv=atoi(optarg); - if(tmpv<0 || tmpv > 100) { - usage(); - cout << endl; - cerr << "ERROR: -Q must be 0 <= value <= 100\n"; - exit(1); - } - CP_defaultqual=tmpv; - CP_needsquality=false; - break; - } - case 'r': { - string rrr=optarg; - for(size_t si=0; si(CP_Pv[0].getContigParams()).con_output_text_cpl=linelen; - const_cast(CP_Pv[0].getContigParams()).con_output_html_cpl=linelen; - const_cast(CP_Pv[0].getContigParams()).con_output_text_gapfill=endgap_fillchar; - const_cast(CP_Pv[0].getContigParams()).con_output_html_gapfill=endgap_fillchar; - - ReadPool thepool(&CP_Pv); - thepool.setMissingFASTAQualFileResolveMsg("use -Q"); - - CP_assemblyinfo.setLargeContigSize(CP_mincontiglength); - CP_assemblyinfo.setLargeTotalCov(CP_mincontigcoverage); - - if(CP_recalcconopt=='C'){ - for(uint32 i=0; i< CP_Pv.size(); i++){ - CP_Pv[i].setContigForceNonIUPAC(true,true); - } - } - - if(!CP_namefile.empty()){ - General::makeSelectionStringSet(CP_namefile); - } - - cout << "Loading from " << CP_fromtype << ", saving to:"; - ofstream * ofstmp; - for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI){ - ofstmp=new ofstream; - CP_ofs.push_back(ofstmp); - cout << ' ' << *ttI; - if(*ttI=="fasta"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta").c_str(), ios::out); - } - CP_totype.push_back("fastaqual"); - } else if(*ttI=="fastaqual"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual").c_str(), ios::out); - } - } else if(*ttI=="maskedfasta"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta").c_str(), ios::out); - } - CP_totype.push_back("maskedfastaqual"); - } else if(*ttI=="maskedfastaqual"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fasta.qual").c_str(), ios::out); - } - } else if(*ttI=="fastq"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".fastq").c_str(), ios::out); - } - } else if(*ttI=="caf" || *ttI=="scaf" ){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".caf").c_str(), ios::out); - } - } else if(*ttI=="maf"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".maf").c_str(), ios::out); - Contig::dumpMAF_Head(*(CP_ofs.back())); - } - } else if(*ttI=="sam" || *ttI=="samnbb"){ - if(!CP_splitcontigs2singlefiles){ - CP_ofs.back()->open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,".sam").c_str(), ios::out); - } - } else if(*ttI=="gff3"){ - if(!CP_splitcontigs2singlefiles){ - CP_gffsave.open(createFileNameFromBasePostfixContigAndRead(CP_outbasename,"").c_str()); - } - } else if(*ttI=="hsnp"){ - } else if(*ttI=="asnp"){ - } else if(*ttI=="fcov"){ - } else if(*ttI=="cstats"){ - } else if(*ttI=="crlist"){ - } else if(*ttI=="html"){ - } else if(*ttI=="text"){ - } else if(*ttI=="txt"){ - } else if(*ttI=="exp"){ - } else if(*ttI=="gbf"){ - } else if(*ttI=="gff3"){ - } else if(*ttI=="ace"){ - } else if(*ttI=="tcs"){ - } else if(*ttI=="wiggle" || *ttI=="wig"){ - } else if(*ttI=="gcwiggle" || *ttI=="gcwig"){ - } else if(*ttI=="null"){ - } else { - BUGIFTHROW(true,"should never arrive here!"); - } - } - cout << '\n'; - - auto cpofsI=CP_ofs.begin(); - for(list::iterator ttI= CP_totype.begin(); ttI!=CP_totype.end(); ++ttI, ++cpofsI){ - if(*ttI=="sam" || *ttI=="samnbb"){ - if(CP_fromtype=="maf"){ - cout << "Collecting basic SAM info from MAF file" << endl; - CP_samcollect.processMAF(CP_infile); - CP_samcollect.createSAMHeader(); - *(*cpofsI) << CP_samcollect.SAMC_headerstring; - ReadGroupLib::discard(); - }else{ - cout.flush(); - cerr << "\n\ncan only convert MAF to SAM for the time being, sorry\n"; - exit(1); - } - } - } - - try{ - if(CP_fromtype=="caf" || CP_fromtype=="maf") { - void (*usecallback)(list &, ReadPool &) = cafmafload_callback; - if(CP_sortbyname){ - usecallback=nullptr; - } - - if(CP_fromtype=="caf") { - CAF tcaf(&thepool, &CP_clist, &CP_Pv); - vector dummy; - tcaf.load(CP_infile.c_str(), - ReadGroupLib::SEQTYPE_SANGER, - 1, - dummy, - false, - usecallback - ); - }else if(CP_fromtype=="maf") { - MAFParse mafp(&thepool, &CP_clist, &CP_Pv); - vector dummy; - mafp.load(CP_infile.c_str(), - ReadGroupLib::SEQTYPE_SANGER, - 1, - dummy, - false, - usecallback, - nullptr - ); - } - if(!CP_clist.empty() && usecallback==nullptr){ - sortContigsByName(CP_clist); - cafmafload_callback(CP_clist,thepool); - }else if(thepool.size()!=0){ - if(CP_sortbyname) sortPoolByName(thepool,CP_namefile); - cafmafload_callback(CP_clist,thepool); - } - }else{ - if(CP_fromtype=="fasta" - || CP_fromtype=="fastq" - || CP_fromtype=="gbf" - || CP_fromtype=="gff3"){ - cout << "Loading data from " << CP_fromtype << " ..."; - - string fn2; - if(CP_fromtype=="fasta"){ - fn2=CP_infile+".qual"; - }else if(CP_fromtype=="fastq"){ - fn2=fqqualoffset; - } - - ReadGroupLib::ReadGroupID rgid=ReadGroupLib::newReadGroup(); - rgid.setSequencingType(ReadGroupLib::SEQTYPE_TEXT); - rgid.setDefaultQual(CP_defaultqual); - - string loadtype(CP_fromtype); - if(loadtype=="fasta" && !CP_needsquality){ - loadtype="fastanoqual"; - } - - bool canusecallback=true; - if(CP_sortbyname){ - canusecallback=false; - }else{ - int32 dummy=-1; - if(!fqqualoffset.empty()){ - dummy=atoi(fqqualoffset.c_str()); - } - if(0==dummy){ - cout << "\nFor guessing the FASTQ offset, more RAM will be used as the full file needs to load into memory."; - canusecallback=false; - } - } - - if(canusecallback){ - thepool.loadData_rgid(loadtype, CP_infile, fn2, rgid, false, readpoolload_callback); - }else{ - thepool.loadData_rgid(loadtype, CP_infile, fn2, rgid, false, nullptr); - if(CP_sortbyname){ - sortPoolByName(thepool,CP_namefile); - } - readpoolload_callback(thepool); - } - } else { - cerr << "\n\n-f " << CP_fromtype << " is not a valid from type! (simple pool)\n"; - //usage(); - exit(1); - } - cout << " done.\n"; - } - } - catch(Notify n){ - // Need to close by hand as handleError() will perform a hard exit - closeOpenStreams(CP_ofs); - n.handleError("main"); - } - catch(Flow f){ - cerr << "Unexpected exception: Flow()\n"; - } - catch(...){ - cout.flush(); - cerr.flush(); - cerr << "Unknown exception caught, aborting the process.\n\nPlease contact: bach@chevreux.org\n\n"; - abort(); - } - - cout << "\nData conversion process finished, no obvious errors encountered.\n"; - - FUNCEND(); - return 0; -} - - - - -class MiraBait -{ -private: - - - static vector MB_Pv; - - static string MB_fromtype; - static list MB_totype; - - static list MB_ofs; - - - static string MB_baitfile; - static string MB_infile; - static string MB_outbasename; - - static bool MB_deletestaronlycolumns; - static bool MB_inversehit; - static bool MB_fwdandrev; - static uint32 MB_numbaithits; - - static bool MB_mustdeletetargetfiles; - - static list MB_clist; // needed for CAF conversion (and GBF) - - static HashStatistics MB_hashstatistics; - -private: - static void usage(); - static void checkTypes(string & fromtype,list & totype); - static void putReadsInContigsAndSave(vector & Pv, ReadPool & rp); - static void specialTestCode(list & clist, ReadPool & rp); - - static void saveReadPool(ReadPool & rp); - static void cafmafload_callback(list & clist, ReadPool & rp); - static void readpoolload_callback(ReadPool & rp); - -public: - ~MiraBait(); - - int main(int argc, char ** argv); - -}; - -vector MiraBait::MB_Pv; - -string MiraBait::MB_fromtype; -list MiraBait::MB_totype; -list MiraBait::MB_ofs; - -string MiraBait::MB_infile; -string MiraBait::MB_baitfile; -string MiraBait::MB_outbasename; - -bool MiraBait::MB_deletestaronlycolumns=false; -bool MiraBait::MB_mustdeletetargetfiles=true; -bool MiraBait::MB_inversehit=false; -bool MiraBait::MB_fwdandrev=true; -uint32 MiraBait::MB_numbaithits=1; - -list MiraBait::MB_clist; // needed for CAF conversion (and GBF) - -HashStatistics MiraBait::MB_hashstatistics;; - - -MiraBait::~MiraBait() -{ - ConvPro::closeOpenStreams(MB_ofs); -} - -void MiraBait::usage() -{ - cout << "mirabait\t(MIRALIB version " << MIRALIBVERSION << ")\n"; - cout << "Author: Bastien Chevreux\t(bach@chevreux.org)\n\n"; - - cout << "... baiting ...\n"; - cout << "Usage:\n"; - //cout << "\tconvert_project [-f ] [-t ] [-s strainfile] [-q] infile outfile\n\n"; - cout << "mirabait [-f ] [-t [-t ...]] [-iklor] baitfile infile \n\n"; - cout << "Options:\n"; - cout << "\t-f \tload this type of project files, where fromtype is:\n" - "\t caf\t\t sequences from CAF\n" - "\t maf\t\t sequences from MAF\n" - "\t phd\t\t sequences from a PHD\n" - "\t gbf\t\t sequences from a GBF\n" - "\t fasta\t sequences from a FASTA\n" - "\t fastq\t sequences from a FASTQ\n"; - cout << "\t-t \twrite the sequences to this type (multiple mentions\n" - "\t\t\tof -t are allowed):\n" - "\t fasta\t sequences to FASTA\n" - "\t fastq\t sequences to FASTQ\n" - "\t caf\t\t sequences to CAF\n" - "\t maf\t\t sequences to MAF\n" - "\t txt\t\t sequence names to text file\n"; - - cout << "\n" - "\t-k\t\tk-mer, length of bait in bases (<32, default=31)\n" - "\t-n\t\tMin. number of k-mer baits needed (default=1)\n" - "\t-i\t\tInverse hit: writes only sequences that do not hit bait\n" - "\t-r\t\tNo checking of reverse complement direction\n"; - - cout << "\n" - "\t-o\t\tfastq quality Offset (only for -f = 'fastq')\n" - "\t\t\t Offset of quality values in FASTQ file. Default: 33\n" - "\t\t\t A value of 0 tries to automatically recognise.\n"; - - - -// cout << "\t-a \tString with MIRA parameters to be parsed\n" -// "\t\t\t Useful when setting parameters affecting consensus\n" -// "\t\t\t calling like -CO:mrpg etc.\n" -// "\t\t\t E.g.: -a \"454_SETTINGS -CO:mrpg=3\"\n"; - - cout << "\nExamples:\n" - "\t...\n" - "\t...\n"; -} - - -void MiraBait::checkTypes(string & fromtype,list & totype) -{ - if(fromtype.empty()){ - fromtype="fastq"; - } - if(fromtype=="gbk" || fromtype=="gbff"){ - fromtype="gbf"; - } - if(!(fromtype=="caf" - || fromtype=="maf" - || fromtype=="phd" - || fromtype=="gbf" - || fromtype=="exp" - || fromtype=="fasta" - || fromtype=="fastq" - )){ - usage(); - cout << endl; - cerr << "Unknown or illegal file type '" << fromtype << "' defined as \n"; - exit(1); - } - if(MB_totype.empty()){ - if(fromtype=="caf" - || fromtype=="maf" - || fromtype=="fasta" - || fromtype=="fastq" - ){ - MB_totype.push_back(fromtype); - }else{ - MB_totype.push_back("fastq"); - } - } - for(list::iterator ttI= MB_totype.begin(); ttI!=MB_totype.end(); ++ttI){ - if(*ttI=="scaf") *ttI="caf"; - if(!(*ttI=="fasta" - || *ttI=="fastq" - || *ttI=="caf" - || *ttI=="maf" - || *ttI=="txt" - )){ - usage(); - cout << endl; - cerr << "MiraBait::checkTypes(): Unknown or illegal file type '" << *ttI << "' defined as \n"; - exit(1); - } - } -} - -// Note: clears the readpool after saving! -void MiraBait::saveReadPool(ReadPool & rp) -{ - // first, bait all reads. Those who bite, discard. - for(uint32 i=0; i= MB_numbaithits) ^ !MB_inversehit){ - rp[i].discard(); - } - } - - // then save the read pool - list::iterator ttI= MB_totype.begin(); - list::iterator ofsI= MB_ofs.begin(); - for(; ttI!=MB_totype.end(); ++ttI, ++ofsI){ - if(*ttI=="fasta"){ - // double indirection because iterator needs one and it is a list of ofstream pointers ... - rp.dumpAs(*(*ofsI),Read::AS_FASTA,false); - } else if(*ttI=="fastaqual"){ - rp.dumpAs(*(*ofsI),Read::AS_FASTAQUAL,false); - } else if(*ttI=="fastq"){ - rp.dumpAs(*(*ofsI),Read::AS_FASTQ,false); - } else if(*ttI=="caf" || *ttI=="scaf" ){ - rp.dumpAs(*(*ofsI),Read::AS_CAF,false); - } else if(*ttI=="maf"){ - rp.dumpAs(*(*ofsI),Read::AS_MAF,false); - } else if(*ttI=="txt"){ - rp.dumpAs(*(*ofsI),Read::AS_READNAME,false); - } else { - cout.flush(); - cerr << "\n\n-t " << *ttI << " is not a valid type when the source file does not contain a full assembly!\n"; - //usage(); - exit(1); - } - } -} - - -void MiraBait::cafmafload_callback(list & clist, ReadPool & rp) -{ - // TODO: check if needed - Assembly::refreshContigAndReadpoolValuesAfterLoading(rp,clist); - - saveReadPool(rp); - - Read::trashReadNameContainer(); - clist.clear(); - rp.discard(); -} - -void MiraBait::readpoolload_callback(ReadPool & rp) -{ - // TODO: check if needed (slows loading by ~30 to 50% -// rp.makeTemplateIDs(false); -// rp.makeStrainIDs(false); - - saveReadPool(rp); - - Read::trashReadNameContainer(); - rp.discard(); -} - - - -int MiraBait::main(int argc, char ** argv) -{ - //CALLGRIND_STOP_INSTRUMENTATION; - - FUNCSTART("int main(int argc, char ** argv)"); - - fixQuirks(); - - int c; - extern char *optarg; - extern int optind; - - - string fqqualoffset="33"; - - string path; - string convertprog; - splitFullPathAndFileName(argv[0],path,convertprog); - - string miraparams; - - uint8 basesperhash=31; - - while (1){ - c = getopt(argc, argv, "hdirf:t:o:a:k:n:"); - if(c == -1) break; - - switch (c) { - case 'a': { - miraparams=optarg; - break; - } - case 'f': { - MB_fromtype=optarg; - break; - } - case 'n': { - MB_numbaithits=atoi(optarg); - break; - } - case 'k': { - uint64 bla=atoi(optarg); - if(bla>31) bla=31; - basesperhash=bla; - break; - } - case 't': { - MB_totype.push_back(optarg); - break; - } - case 'o': { - fqqualoffset=optarg; - break; - } - case 'd': { - MB_deletestaronlycolumns=true; - break; - } - case 'i': { - MB_inversehit=true; - break; - } - case 'r': { - MB_fwdandrev=false; - break; - } - case 'h': - case '?': { - usage(); - exit(0); - } - default : {} - } - } - - if(argc-optind < 1) { - cerr << argv[0] << ": " << "Missing baitfile, infile and out-basename as arguments!\n"; - usage(); - exit(1); - } - - if(argc-optind < 3) { - cerr << argv[0] << ": " << "Missing one of baitfile, infile or out-basename as argument!\n"; - usage(); - exit(1); - } - - if(argc-optind > 3) { - cerr << argv[0] << ": " << "Whoops, found more than baitfile, infile and out-basename as arguments left on the command line!\n"; - cerr << "Unparsed command line: "; - for(;optind::iterator ttI= MB_totype.begin(); ttI!=MB_totype.end(); ++ttI){ - cout << ' ' << *ttI; - ofstmp=new ofstream; - MB_ofs.push_back(ofstmp); - if(*ttI=="fasta"){ - MB_ofs.back()->open((MB_outbasename + ".fasta").c_str(), ios::out); - } else if(*ttI=="fastq"){ - MB_ofs.back()->open((MB_outbasename + ".fastq").c_str(), ios::out); - } else if(*ttI=="caf" || *ttI=="scaf" ){ - MB_ofs.back()->open((MB_outbasename + ".caf").c_str(), ios::out); - } else if(*ttI=="maf"){ - MB_ofs.back()->open((MB_outbasename + ".maf").c_str(), ios::out); - } else if(*ttI=="txt"){ - MB_ofs.back()->open((MB_outbasename + ".txt").c_str(), ios::out); - } else { - cout.flush(); - cerr << "\n\n-t " << *ttI << " is not a valid type\n"; - //usage(); - exit(1); - } - } - cout << '\n'; - - try{ - if(MB_fromtype=="caf") { - CAF tcaf(&loadrp, &MB_clist, &MB_Pv); - vector dummy; - tcaf.load(MB_infile.c_str(), - ReadGroupLib::SEQTYPE_SANGER, - 1, - dummy, - false, - cafmafload_callback, - nullptr - ); - }else if(MB_fromtype=="maf") { - MAFParse mafp(&loadrp, &MB_clist, &MB_Pv); - vector dummy; - mafp.load(MB_infile.c_str(), - ReadGroupLib::SEQTYPE_SANGER, - 1, - dummy, - false, - cafmafload_callback, - nullptr - ); - }else{ - - uint32 dummy=0; - if(MB_fromtype=="fasta" - || MB_fromtype=="fastq" - || MB_fromtype=="gbf" - || MB_fromtype=="gff3"){ - cout << "Loading data from " << MB_fromtype << " ..."; - - string fn2; - if(MB_fromtype=="fasta"){ - fn2=MB_infile+".qual"; - }else if(MB_fromtype=="fastq"){ - fn2=fqqualoffset; - } - string loadtype(MB_fromtype); - if(loadtype=="fasta"){ - loadtype="fastanoqual"; - } - - ReadGroupLib::ReadGroupID rgid=ReadGroupLib::newReadGroup(); - rgid.setSequencingType(ReadGroupLib::SEQTYPE_TEXT); - loadrp.loadData_rgid(loadtype, MB_infile, fn2, rgid, false, readpoolload_callback); - } else { - cerr << "\n\n-f " << MB_fromtype << " is not a valid from type!\n"; - //usage(); - exit(1); - } - cout << " done.\n"; - } - } - catch(Notify n){ - // Need to close by hand as handleError() will perform a hard exit - ConvPro::closeOpenStreams(MB_ofs); - n.handleError("main"); - } - catch(Flow f){ - cerr << "Unexpected exception: Flow()\n"; - } - catch(...){ - cerr << "Unknown exception caught, aborting the process.\n\nPlease contact: bach@chevreux.org\n\n"; - abort(); - } - - cout << "\nBaiting process finished.\n"; - - FUNCEND(); - return 0; -} - - - -int main(int argc, char ** argv) -{ - //CALLGRIND_STOP_INSTRUMENTATION; - - FUNCSTART("int main(int argc, char ** argv)"); - -#ifdef MIRAMEMORC - MemORC::setChecking(true); -#endif - - string path; - string convertprog; - splitFullPathAndFileName(argv[0],path,convertprog); - - boost::to_lower(convertprog); - - try { - if(convertprog=="tagsnp"){ - tagsnp t; - t.main(argc, argv); - }else if(convertprog=="mirabait"){ - MiraBait m; - m.main(argc, argv); - }else{ - ConvPro cp; - cp.main2(argc, argv); - } - } - catch(Notify n){ - n.handleError("main"); - } - catch(Flow f){ - cout << "INTERNAL ERROR: Unexpected exception: Flow()\n"; - exit(100); - } - catch(const std::bad_alloc & e){ - cout << "Out of memory detected, exception message is: "; - cout << e.what() << endl; - - if(sizeof(size_t) == sizeof(int32)){ - cout << "\nYou are running a 32 bit executable. Please note that the maximum" - "\ntheoretical memory a 32 bit programm can use (be it in Linux, Windows or" - "\nother) is 4 GiB, in practice less: between 2.7 and 3.3 GiB. This is valid" - "\neven if your machine has hundreds of GiB." - "\nShould your machine have more that 4 GiB, use a 64 bit OS and a 64 bit" - "\nversion of MIRA."; - } - - cout << "\n\nIf you have questions on why this happened, please send the last 1000" - "\nlines of the output log (or better: the complete file) to the author" - "\ntogether with a short summary of your assembly project.\n\n"; - - exit(100); - } - catch(const ios_base::failure & e){ - cout << "Failure in IO stream detected, exception message is: " - << e.what() << endl - << "\nWe perhaps ran out of disk space or hit a disk quota?\n"; - exit(100); - } - catch (exception& e) - { - cout << "A 'standard' exception occured (that's NOT normal):\n" << e.what() << "\n\nIf the cause is not immediatly obvious, please contact: bach@chevreux.org\n\n"; - exit(100); - } - catch(...){ - cout << "Unknown exception caught, aborting the process.\n\nPlease contact: bach@chevreux.org\n\n"; - exit(100); - } - - Read::dumpStringContainerStats(cout); - - return 0; -} diff -Nru mira-3.9.18/src/progs/dbgreplay.C mira-4.0/src/progs/dbgreplay.C --- mira-3.9.18/src/progs/dbgreplay.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/progs/dbgreplay.C 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -#include -#include -#include - -//#include - -#include "io/generalio.H" -#include "mira/assembly.H" -#include "mira/parameters.H" -#include "mira/maf_parse.H" - - - -using namespace std; - - -void doAbort() -{ - abort(); -} - -int main(int argc, char ** argv) -{ - FUNCSTART("main"); - - try{ - string datafile="e.maf"; - string refrname="B66P8:1722:275"; - string newrname="S5ITQ:952:982"; - string paramstring="--job=denovo,genome,accurate,iontor"; - - vector MPv; - MIRAParameters::setupStdMIRAParameters(MPv); - - if(!paramstring.empty()){ - MIRAParameters::parse(paramstring.c_str(),MPv); - } - - ReadPool greadpool(&MPv); - list gcontigs; - - // not used, but needed for linking *sigh* - Manifest manifest; - Assembly as(manifest,MPv,false); - - MAFParse tmaf(&greadpool, &gcontigs, &MPv); - vector dummy; - tmaf.load(datafile, ReadGroupLib::SEQTYPE_SANGER, 1, dummy, false); - greadpool.makeTemplateIDs(); - - greadpool.allowNameIndex(true); - int32 refid=greadpool.getReadIndex(refrname); - BUGIFTHROW(refid<0,"Ref " << refrname << " not in readpool?"); - int32 newid=greadpool.getReadIndex(newrname); - BUGIFTHROW(newid<0,"New " << newrname << " not in readpool?"); - - AlignedDualSeqFacts adsf; - // refid, newid, - // delta,id1_rightdelta, id2_rightdelta, totallen, id1_direction, id2_direction, score_ratio - //adsf.publicinit(refid,newid,2,0,9,91,1,1,100); - int8 dirnewid=-1; - bool newid_ismulticopy=true; - adsf.publicinit(newid,refid,193,158,0,403,-1,1,100,0,16,16,16,16); - - cout << adsf << endl; - - Contig::errorstatus_t errstat; - vector aligncache; - for(uint32 i=0; i +#include // defines rlimit for getMoreStack() -#include +#include -#include -#include -#include - -//#include - -#include "io/generalio.H" +#include "errorhandling/errorhandling.H" #include "util/fileanddisk.H" -#include "mira/assembly.H" -#include "mira/parameters.H" -#include "mira/manifest.H" - #include "progs/quirks.H" +#include "modules/mod_mira.H" +#include "modules/mod_bait.H" +#include "modules/mod_convert.H" +#include "modules/mod_memestim.H" +#include "modules/mod_tagsnp.H" + #ifdef MIRAMEMORC #include "memorc/memorc.H" #endif -#include "version.H" - - using namespace std; +// This strange double declaration/definition is no error +// If the declaration is not there, then for some strange +// reason the gcc linker (at least 4.8) will not resolve +// the extern declaration in modules/misc.C +// This occurs only for "char[]" types, not for normal types +// like int etc. +// +// Very strange + +extern const char compileinfo[]; const char compileinfo[] = { #include "compileinfo.itxt.xxd.H" }; -const char step1par[] = { -//#include "me_step1.par.H" -}; -const char step2par[] = { -//#include "me_step2.par.H" -}; -const char step3par[] = { -//#include "me_step3.par.H" -}; - void doAbort() @@ -78,1120 +71,18 @@ cout << "\n\nFor general help, you will probably get a quicker response on the\n" " MIRA talk mailing list\n" "than if you mailed the author directly.\n" - "\nTo report bugs or ask for features, please use the new ticketing system at:\n" - "\thttp://sourceforge.net/apps/trac/mira-assembler/\n" - "This ensures that requests don't get lost.\n"; + "\nTo report bugs or ask for features, please use the SourceForge ticketing\nsystem at:\n" + "\thttp://sourceforge.net/p/mira-assembler/tickets/\n" + "This ensures that requests do not get lost.\n"; abort(); } -void loadparams(vector & Pv, const string & filename, const char * def) -{ - try{ - if(filename.size()){ - MIRAParameters::loadParams(filename, Pv); - } else if(def!=nullptr) { - MIRAParameters::parse(def, Pv); - } - } - catch(...) { - if(filename.size()){ - cout << "Error while trying to load parameter file " << filename << endl; - cout << "Setting defaults for this step."; - } - if(def!=nullptr) { - MIRAParameters::parse(def, Pv); - } - } -} - - -void dumpStdMsg() -{ - cout << - "To (un-)subscribe the MIRA mailing lists, see:\n" - "\thttp://www.chevreux.org/mira_mailinglists.html\n\n" - "After subscribing, mail general questions to the MIRA talk mailing list:\n" - "\tmira_talk@freelists.org\n\n" - "To report bugs or ask for features, please use the new ticketing system at:\n" - "\thttp://sourceforge.net/apps/trac/mira-assembler/\n" - "This ensures that requests don't get lost.\n\n\n"; - - bool addnl=false; - - //if(sizeof(size_t) == 4){ - // cout << "Compiled in 32 bit mode.\n"; - //}else if(sizeof(size_t) == 8){ - // cout << "Compiled in 64 bit mode.\n"; - //}else{ - // cout << "Compiled in ??? bit mode.\n"; - //} - - cout << compileinfo; -#ifdef CEBUGFLAG - cout << "Compiled in debug output mode.\n"; - addnl=true; -#endif -#ifdef TRACEFLAG - cout << "Compiled with trace mode.\n"; - addnl=true; -#endif -#ifdef BOUNDTRACKFLAG - cout << "Compiled in boundtracking mode.\n"; - addnl=true; -#endif -#ifdef BUGTRACKFLAG - cout << "Compiled in bugtracking mode.\n"; - addnl=true; -#endif -#ifdef PARANOIABUGTRACKFLAG - cout << "Compiled in paranoia bugtracking mode.\n"; - addnl=true; -#endif -#ifdef ENABLE64 - cout << "Compiled with ENABLE64 activated.\n"; - addnl=true; -#else - cout << "Compiled with ENABLE64 de-activated.\n"; - addnl=true; -#endif -#ifdef MIRAMEMORC - cout << "Compiled with memory overrun checks, MIRA *will* be slower.\n"; - addnl=true; -#endif - - cout << "Runtime settings (sorry, for debug):" - << "\n\tSize of size_t : " << sizeof(size_t) - << "\n\tSize of uint32 : " << sizeof(uint32) - << "\n\tSize of uint32_t: " << sizeof(uint32_t) - << "\n\tSize of uint64 : " << sizeof(uint64) - << "\n\tSize of uint64_t: " << sizeof(uint64_t) - << "\nCurrent system: "; - { - cout.flush(); - int tmp=system("uname -a"); - // don't complain about unused variable - (void) tmp; - } - - if(addnl) cout << endl; -} - - - -void dumpCommandlineToFile(Assembly & as, vector & Pv, int argc, char ** argv) -{ - string filename; - filename=as.buildFileName(-1,"","", - Pv[0].getAssemblyParams().as_outfile_callparams, - "", - Pv[0].getDirectoryParams().dir_info); - - ofstream fout(filename.c_str(), ios::out | ios::trunc); - fout << argv[0]; - for(int32 i=1; i & Pv, const string & csfile, int argc, char ** argv) -{ - cout << "De-activated atm, sorry." << endl; - exit(0); - -// // step 1 -// // assemble _all_ reads to squeeze out most of the data -// // assembled reads will be written per strain to a CAF file -// // if they're in a contig >= 2 reads or have SRMr/WRMr tags -// -// // by setting the AssumeSNPInsteadofRepeats to false, we will have -// // SRMB tags set and the assembler will try to resolve what -// // it thinks are repeats. -// -// vector strainfiles; -// -// //loadparams(Pv,"me_step1.par", &step1par[0]); -// -// const_cast(Pv[0].getAssemblyParams()).as_put_asswithmira_tags=true; -// -// cout << "Starting step 1: assembling all reads of all strains." << endl; -// cout << "Setting some standard parameters.\n"; -// //as.assemble(); -// -// MIRAParameters::postParsingChanges(Pv); -// MIRAParameters::dumpAllParams(Pv, cout); -// -// Assembly as(Pv, false); -// dumpCommandlineToFile(as, Pv, argc, argv); -// -// as.loadSequenceData(); -// -// if(Pv[0].getAssemblyParams().as_filecheck_only==true){ -// cout << "File check only was selected, exiting."; -// } -// strainfiles=as.assembleESTs(); -// as.discard(); -// cout << "Finished step 1" << endl; -// -// ofstream fout; -// fout.open(csfile.c_str(), ios::out| ios::trunc); -// -// for(uint32 i=0; i mests2_strainfiles; - -void miraESTstep2_contigBuiltCallback(Contig & con, const ReadPool & rp) -{ - ++mests2_contigcount; - - ostringstream ostr; - if(con.getNumReadsInContig() > 1){ - ostr << mests2_strainfiles[mests2_straini+1] << "_c" << mests2_contigcount; - } else { - ostr << mests2_strainfiles[mests2_straini+1] << "_s" << mests2_contigcount; - } - - Read dummy; - - string cons; - vector quals; - con.newConsensusGet(cons, quals); - dummy.setSequenceFromString(cons); - dummy.setQualities(quals); - - //cout << "My consensus is: " << cons << endl; - //cout << "My read is: " << dummy << endl; - - for(uint32 j=0; j & ctags=con.getConsensusTags(); - for(uint32 j=0; j(con.getConsensusCounts()); - size_t lbound=0; - size_t rbound=concounts.size(); - Contig::cccontainer_t::iterator ccI=concounts.begin(); - for(; ccI!=concounts.end(); lbound++, ccI++){ - if(ccI->total_cov > 1) break; - } - - ccI=concounts.end(); - for(; ccI!=concounts.begin(); rbound--){ - if((--ccI)->total_cov>1) break; - } - - - //cout << "Clip bounds: " << lbound << "\t" << rbound << endl; - - //Read::setCoutType(Read::AS_TEXTSHORT); - //cout << "Before clipping:\n" << dummy; - - // single reads will have reversed bounds, but we still - // want them as they had some marks in the combined assembly, - // so don't set bound for them as it would get them - // completely removed from assembly - - //if(lbound>rbound) { - // dummy.setClipoffs(0, 1, false); - //}else{ - // dummy.setClipoffs(lbound, rbound, false); - //} - - //Read::setCoutType(Read::AS_TEXTSHORT); - //cout << "After clipping:\n" << dummy; - - } - - dummy.removeGapsFromRead(); - Read::setCoutType(Read::AS_CAF); - mests2_step2out << dummy; - mests2_step2strout << dummy.getName() << "\t"<< mests2_strainfiles[mests2_straini+1] << '\n'; - -} - -void miraESTstep2(vector & Pv, const string & csfile, int argc, char ** argv) -{ - cout << "De-activated atm, sorry." << endl; - exit(0); - -// -// -// // assemble each strain for itself taking only the good -// // reads identified in the previous step -// // the resulting contigs are transformed into virtual 'reads': -// // single coverage at the ends is clipped (exception: reads that -// // are completely in single coverage), tags are taken -// // and together with virtual base quality the 'read' gets -// // written to a CAF file -// -// //loadparams(Pv,"me_step2.par", &step2par[0]); -// -// Pv[0].setAssemblyPutAssembledWithMIRATags(false); -// -// cout << "Starting step 2: assembling each strain for itself" << endl; -// -// MIRAParameters::postParsingChanges(Pv); -// MIRAParameters::dumpAllParams(Pv, cout); -// -// // Load the file of with caf names and strain names -// ifstream fin; -// fin.open(csfile.c_str(), ios::in|ios::ate); -// if(!fin){ -// throw Notify(Notify::FATAL, "main", (static_cast("File not found: ")+csfile.c_str()).c_str()); -// } -// -// std::streamoff len_fofn=fin.tellg(); -// if(len_fofn==1){ -// throw Notify(Notify::FATAL, "main", (static_cast("Zero length file: ")+csfile.c_str()).c_str()); -// } -// fin.seekg(0, ios::beg); -// -// string filename, sname; -// while(GeneralIO::readKeyValue(fin, filename, sname)){ -// mests2_strainfiles.push_back(filename); -// mests2_strainfiles.push_back(sname); -// } -// fin.close(); -// -// -// -// mests2_step2out.open("step2_reads.caf", ios::out | ios::trunc); -// mests2_step2strout.open("step2_straindata_in.txt", ios::out | ios::trunc); -// -// mests2_step2strout << "# Automatically generated file" << endl; -// mests2_step2strout << "# You probably don't want to edit it.\n" << endl; -// for(mests2_straini=0; mests2_straini(mests2_strainfiles[mests2_straini].c_str())); -// Pv[0].setAssemblyInfileStrainData("step2_straindata_in.txt"); -// -// //P.setAssemblyOutfileCAF((char *)strainfiles[i+1].c_str()); -// //P.setAssemblyOutdirGAP4DA(strainfiles[i+1].c_str()); -// //cout << P; -// -// Assembly as(Pv, false); -// -// bool loadok=true; -// try{ -// as.loadSequenceData(); -// } -// catch(Notify n){ -// loadok=false; -// n.setGravity(Notify::WARNING); -// n.handleError(" miraESTstep2()"); -// } -// if(!loadok) continue; -// -// as.setContigBuiltCallback(miraESTstep2_contigBuiltCallback); -// as.assemble(); -// //as.saveResults(); -// -// cout << "Finished assembly, extracting contigs." << endl; -// -// } -// cout << "Closing step2out." << endl; -// mests2_step2out.close(); -// cout << "Closing step2strout." << endl; -// mests2_step2strout.close(); -// -// cout << "Done with step 2." << endl; -} - - -void miraESTstep3(vector & Pv, int argc, char ** argv) -{ - cout << "De-activated atm, sorry." << endl; - exit(0); - -// // in the last step, the virtual 'reads' get assembled -// // by setting AssumeSNPInsteadofRepeats to true, PALV (possible -// // allellic variation) or PAVS (possible allellic variation -// // with SNP) will be set when conflicts occur instead of SRMB -// // the assembler will therefore work in cluster-mode and not -// // break those 'misassemblies' -// -// cout << "Starting step 3:\n\tclustering contigs\n\tfinding possible allelic variances\n\tfinding possible allelic variances with SNP\n\n"; -// -// //loadparams(Pv,"me_step3.par", &step3par[0]); -// -// const_cast(Pv[0].getAssemblyParams()).as_put_asswithmira_tags=true; -// -// Assembly as(Pv, false); -// -// as.loadSequenceData(); -// as.assemble(); -// as.saveResults(); -} - -void miraEST(int argc, char ** argv) -{ - cout << "De-activated atm, sorry." << endl; - exit(0); - -// cout << "This is miraEST "MIRAVERSION" for EST SNP analysis in strains.\n\n"; -// -// cout << "De-activated atm, step 2&3 need to adapt to new loading system, sorry." << endl; -// exit(0); -// -// cout << "Please cite: Chevreux, B., Pfisterer, T., Drescher, B., Driesel, A. J.,\nMueller, W. E., Wetter, T. and Suhai, S. (2004),\nUsing the miraEST Assembler for Reliable and Automated mRNA Transcript\nAssembly and SNP Detection in Sequenced ESTs. Genome Research, 14(6).\n\n"; -// -// //cout << "miraEST has been de-activated in this development version as necessary adaptations there have not been made yet, sorry.\n"; -// //doAbort(); -// -// dumpStdMsg(); -// -// try{ -// vector X; -// //loadparams(X,"", &step1par[0]); -// //loadparams(X,"", &step2par[0]); -// //loadparams(X,"", &step3par[0]); -// } -// catch(...){ -// cout << "Internal error: one of the default parameter files caused an error while parsing, aborting.\n"; -// exit(1000); -// } -// -// vector Pv; -// MIRAParameters::setupStdMIRAParameters(Pv); -// { -// MIRAParameters::parse(argc, argv, Pv); -// cout << "\nParameters parsed without error, perfect.\n\n"; -// MIRAParameters::postParsingChanges(Pv); -// } -// -// string csfile="step1_res_cafstrainnames.txt"; -// -// uint32 startstep=Pv[0].getSpecialParams().sp_est_startstep; -// -// switch(startstep) { -// case 1 : { -// miraESTstep1(Pv, csfile, argc, argv); -// break; -// } -// case 2 : { -// miraESTstep2(Pv, csfile, argc, argv); -// break; -// } -// case 3 : { -// miraESTstep3(Pv, argc, argv); -// break; -// } -// default : { -// throw Notify(Notify::FATAL, "main", ": miraEST SNP pipeline.step is not 1,2 or 3"); -// } -// } -// -// cout << "\n\nEnd of assembly process, thank you for using miraEST." << endl; -// - return; -} - - - -void miraMain(int argc, char ** argv, bool resumeassembly) -{ - FUNCSTART("void mira(int argc, char ** argv, bool resumeassembly)"); - - // that loop is straight from the GNU getopt_long example - // http://www.gnu.org/s/hello/manual/libc/Getopt-Long-Option-Example.html - while (1){ - static struct option long_options[] = - { - {"help", no_argument, 0, 'h'}, - {"resume", no_argument, 0, 'r'}, - {"version", no_argument, 0, 'v'}, - {"cwd", required_argument, 0, 'c'}, - {"job", optional_argument, 0, ' '}, // catch old command line - {"project", optional_argument, 0, ' '}, // catch old command line - {0, 0, 0, 0} - }; - /* getopt_long stores the option index here. */ - int option_index = 0; - - int c = getopt_long (argc, argv, "hrvc: ", - long_options, &option_index); - - if (c == -1) break; - - switch (c) { - case 'c': - if(optarg){ - int ret=chdir(optarg); - if(ret){ - cout << "Changing working directory to '" << optarg << "' failed, system message is: " << strerror(errno) << endl; - exit(100); - } - }else{ - cout << "Missing directory name for option -c / --cwd=" << endl; - exit(100); - } - break; - case 'h': - cout << "mira\t\tMIRALIB version " << MIRAVERSION << "\n" - "Author:\t\tBastien Chevreux (bach@chevreux.org)\n" - "Purpose:\tassemble sequencing data.\n\n"; - - dumpStdMsg(); - cout << "Usage:\n" - "mira [options] manifest_file [manifest_file ...]\n"; - cout << "\nOptions:\n"; - cout << - " -c / --cwd=\t\tdirectory\tChange working directory\n" - " -r / --resume\t\t\t\tResume an interrupted assembly\n" - " -h / --help\t\t\t\tPrint short help and exit\n" - " -v / --version\t\t\tPrint version and exit\n" - ; - exit(0); - case 'r': - resumeassembly=true; - break; - case 'v': - cout << MIRAVERSION << endl; - exit(0); - case ' ': - cout << "It looks like you are using the old command line format of MIRA 3.4.x and earlier." - "\nPlease look up in the manual on how to use manifest files for MIRA 3.9.x and later.\n"; - exit(0); - default: - abort (); - } - } - - if (optind == argc) { - cout << "You did not specify a manifest file to load?\n"; - exit(100); - } - - cout << "This is MIRA " MIRAVERSION ".\n\n"; - - cout << "Please cite: Chevreux, B., Wetter, T. and Suhai, S. (1999), Genome Sequence\nAssembly Using Trace Signals and Additional Sequence Information.\nComputer Science and Biology: Proceedings of the German Conference on\nBioinformatics (GCB) 99, pp. 45-56.\n\n"; - - dumpStdMsg(); - - Manifest manifest; - - for(; optind < argc; ++optind) { - manifest.loadManifestFile(argv[optind],resumeassembly); - } - - cout << manifest; - - vector Pv; - MIRAParameters::setupStdMIRAParameters(Pv); - - MIRAParameters::generateProjectNames(Pv,manifest.getProjectName()); - - string mparams(manifest.getFullMIRAParameterString()); - //cout << "Seen parameters in manifest: " << mparams << endl; - MIRAParameters::parse(mparams, Pv); - - if(Pv[0].getSpecialParams().mi_printversion) exit(0); - - // some users make the error to use "mira" instead of miraSearchESTSNPs - // this code takes care of it: - // if start_step >0, then the miraSearchESTSNPs pipeline is used, - // else the normal mira - if(Pv[0].getSpecialParams().sp_est_startstep){ - cout << "\nOooooops? You called the 'mira' executable but have parameters set for the" - "\nEST-SNP-Search pipeline set. For this, you have to use the 'miraSearchESTSNPs'" - "\nexecutable (sorry).\n\n"; - doAbort(); - } - - cout << "\nParameters parsed without error, perfect.\n\n"; - - MIRAParameters::postParsingChanges(Pv); - MIRAParameters::dumpAllParams(Pv, cout); - - - - //exit(0); - - { - Assembly as(manifest, Pv, resumeassembly); - - //if(!resumeassembly) dumpCommandlineToFile(as, Pv, argc, argv); - - as.loadSequenceData(); - - //doAbort(); - - if(Pv[0].getAssemblyParams().as_filecheck_only==false){ - try { - as.assemble(); - cout << "\n\n"; - as.setEverythingWentFine(true); - } - catch(const std::bad_alloc & e){ - cout << "Ouch, out of memory detected.\n"; - as.dumpMemInfo(); - throw; - } - catch(...){ - throw; - } - } - } - //Read::dumpStringContainerStats(cout); - - - cout << "\n\nEnd of assembly process, thank you for using MIRA." << endl; - - return; -} - - - -void miraPre(int argc, char ** argv) -{ - cout << "De-activated atm, sorry." << endl; - exit(0); - -// cout << "This is MIRA preprocessing "MIRAVERSION".\n\n"; -// -// cout << "Please cite: Chevreux, B., Wetter, T. and Suhai, S. (1999), Genome Sequence\nAssembly Using Trace Signals and Additional Sequence Information.\nComputer Science and Biology: Proceedings of the German Conference on\nBioinformatics (GCB) 99, pp. 45-56.\n\n"; -// -// dumpStdMsg(); -// -// vector Pv; -// MIRAParameters::setupStdMIRAParameters(Pv); -// Pv[0].generateProjectOutNames(Pv, "pre"); -// MIRAParameters::parseQuickmode( -// "\n\t-AS:nop=10:rbl=1:sd=no -GE:uti=no" -// "\n\t-CO:mr=yes:mroir=no:asir=no" -// "\n\t-SB:lb=0" -// "\n\t-OUT:orc=no:orf=no:org=no:ora=no:orh=no:ors=no:ort=no" -// "\n\t-OUT:otc=no:otf=no:otg=no:ota=no:oth=no:ots=no:ott=no" -// "\n\t-OUT:oetc=no:oetf=no:oetg=no:oeta=no:oeth=no", -// "", Pv, false, nullptr); -// -// MIRAParameters::parse(argc, argv, Pv); -// cout << "\nParameters parsed without error, perfect.\n\n"; -// MIRAParameters::postParsingChanges(Pv); -// MIRAParameters::dumpAllParams(Pv, cout); -// -// MIRAParameters paramscopy(Pv[0]); -// -// Assembly as(Pv, false); -// { -// string filename; -// filename=as.buildFileName(-1,"","", -// Pv[0].getAssemblyParams().as_outfile_callparams, -// "", -// Pv[0].getDirectoryParams().dir_info); -// -// ofstream fout(filename.c_str(), ios::out | ios::trunc); -// fout << argv[0]; -// for(int32 i=1; i Pv; -// MIRAParameters::setupStdMIRAParameters(Pv); -// { -// MIRAParameters::parseQuickmode("--project=miraclip --noclipping","", Pv, false, nullptr); -// MIRAParameters::parse(argc, argv, Pv); -// cout << "\nParameters parsed without error, perfect.\n\n"; -// -// vector indexesInPv; -// indexesInPv.push_back(ReadGroupLib::SEQTYPE_SANGER); -// indexesInPv.push_back(ReadGroupLib::SEQTYPE_454GS20); -// indexesInPv.push_back(ReadGroupLib::SEQTYPE_SOLEXA); -// -// cout << "\nMIRA settings specific for MIRAclip:\n"; -// MIRAParameters::dumpDataProcessingParams(Pv, indexesInPv, cout); -// MIRAParameters::dumpClippingParams(Pv, indexesInPv, cout); -// -// } -// -// -// -// Assembly as(Pv, false); -// { -// string filename; -// filename=as.buildFileName(-1,"","", -// Pv[0].getAssemblyParams().as_outfile_callparams, -// "", -// Pv[0].getDirectoryParams().dir_info); -// -// ofstream fout(filename.c_str(), ios::out | ios::trunc); -// fout << argv[0]; -// for(int32 i=1; i (cout, "/")); - cout << ") "; - } - if(defchar!=0){ - cout << "[" << defchar << "] "; - } - string input; - getline(cin,input); - - // empty input, try to get defchar from possibilities if it exists - if(input.empty() && defchar!=0) input=defchar; - input.resize(1); - for(uint32 i=0; i(tmp); - cout << answer << endl; -} - - -void miraMemEstimate() -{ - cout << "This is MIRA " MIRAVERSION ".\n\n"; - - cout << "Please cite: Chevreux, B., Wetter, T. and Suhai, S. (1999), Genome Sequence\nAssembly Using Trace Signals and Additional Sequence Information.\nComputer Science and Biology: Proceedings of the German Conference on\nBioinformatics (GCB) 99, pp. 45-56.\n\n"; - dumpStdMsg(); - - cout << "\n\nmiraMEM helps you to estimate the memory needed to assemble a project.\n" - "Please answer the questions below.\n\n" - "Defaults are give in square brackets and chosen if you just press return.\n" - "Hint: you can add k/m/g modifiers to your numbers to say kilo, mega or giga.\n\n"; - - char yesno; - char ptype=' '; - char denovomapping; - int64 seqsize=0; - - int64 numsanreads=0; - int64 num454gs20reads=0; - int64 num454flxreads=0; - int64 num454titaniumreads=0; - int64 numsxareads=0; - int64 avgsxalen=0; - int64 numpbsreads=0; - int64 avgpbslen=0; - int64 largestcontigexpected=0; - - // computed - int64 totalexpectedbases=0; - int64 totalreads=0; - int64 readsinlargestcontig=0; - int64 readbasesinlargestcontig=0; - - mme_askChar("Is it a genome or transcript (EST/tag/etc.) project?", - "ge", - ptype, - 'g'); - if(ptype=='g'){ - mme_askInt("Size of genome?", - seqsize, - "4.5m"); - if(seqsize<100) { - cout << "A sequence size of less than 100 bases is pretty improbable.\n" - << "Did you forget a modifier (k, m or g) to the number you gave?\n"; - exit(10); - } - largestcontigexpected=seqsize; - if(largestcontigexpected>30*1000*1000){ - cout << "Looks like a larger eukaryote, guessing largest chromosome size: 30m\nChange if needed!\n"; - largestcontigexpected=30*1000*1000; - } - - { - string tmplc; - ostringstream ostr; - ostr << largestcontigexpected; - tmplc=ostr.str(); - mme_askInt("Size of largest chromosome?", - largestcontigexpected, - tmplc); - } - - mme_askChar("Is it a denovo or mapping assembly?", - "dm", - denovomapping, - 'd'); - } - - - mme_askInt("Number of Sanger reads?", - numsanreads, - "0"); - mme_askChar("Are there 454 reads?", - "yn", - yesno, - 'n'); - if(yesno=='y'){ - mme_askInt("Number of 454 GS20 reads?", - num454gs20reads, - "0"); - mme_askInt("Number of 454 FLX reads?", - num454flxreads, - "0"); - mme_askInt("Number of 454 Titanium reads?", - num454titaniumreads, - "0"); - } - mme_askChar("Are there PacBio reads?", - "yn", - yesno, - 'n'); - if(yesno=='y'){ - mme_askInt("Number of PacBio reads?", - numpbsreads, - "0"); - mme_askInt("Average PacBio length?", - avgpbslen, - "1100"); - } - mme_askChar("Are there Solexa reads?", - "yn", - yesno, - 'n'); - if(yesno=='y'){ - mme_askInt("Number of Solexa reads?", - numsxareads, - "0"); - mme_askInt("Average Solexe length?", - avgsxalen, - "75"); - } - - totalexpectedbases=numsanreads*1000; - totalexpectedbases+=num454gs20reads*120; - totalexpectedbases+=num454flxreads*260; - totalexpectedbases+=num454titaniumreads*460; - totalexpectedbases+=numsxareads*avgsxalen; - totalexpectedbases+=numpbsreads*avgpbslen; - - totalreads=numsanreads; - totalreads+=num454gs20reads; - totalreads+=num454flxreads; - totalreads+=num454titaniumreads; - totalreads+=numsxareads; - totalreads+=numpbsreads; - - if(ptype=='g'){ - if(denovomapping=='d'){ - readsinlargestcontig=totalreads/2; - readbasesinlargestcontig=totalexpectedbases/2; - }else{ - largestcontigexpected=seqsize; - readsinlargestcontig=totalreads; - readbasesinlargestcontig=totalexpectedbases; - - // if solexa is mapped, there are less reads due to - // coverage equivalent mapping and virtual long reads - // be conservative, reduce only by 50% - if(numsxareads>0){ - readsinlargestcontig-=numsxareads/2; - } - } - }else{ - seqsize=50000; - largestcontigexpected=seqsize; - readsinlargestcontig=50000; - readbasesinlargestcontig=readsinlargestcontig*1000; //10k reads times sanger length - } - - // account for gaps with 454 reads - if(num454flxreads>0 || num454gs20reads>0){ - largestcontigexpected+=largestcontigexpected/10; - readbasesinlargestcontig+=readbasesinlargestcontig/10; - } - - //cout << "totalreads: " << totalreads - // << "\nreadsinlargestcontig: " << readsinlargestcontig - // << "\ntotalexpectedbases: " << totalexpectedbases - // << "\nreadbasesinlargestcontig: " << readbasesinlargestcontig - // << endl; - - int64 livereads=totalreads+readsinlargestcontig; - int64 livebases=totalexpectedbases+readbasesinlargestcontig; - - //cout << "livereads: " << livereads - // << "\nlivebases: " << livebases << endl; - - double avgcov=static_cast(totalexpectedbases/seqsize); - avgcov-=avgcov/8; // in general we have 12% loss of usable data - - int64 numskimhits=static_cast(avgcov*850000); // estimate skim hits, very rough - - int64 memneeded=0; - - // what do the reads need? - memneeded= - livereads*sizeof(Read) // class size - +livereads*200 // additional strings etc. - +livereads*4*sizeof(tag_t) // on average 4 tags per read - +livebases*8; // sequences, qualities, adjustments, base flags - - // new: solexa reads don't have adjustments - // yeah, but estimate is already small enough, keep it - //memneeded-=(numsxareads*avgsxalen) * 2; - - - // what does a contig need? - // (note: the needs for the reads themselves are already - // accounted for in the section above) - memneeded+= - //readsinlargestcontig*sizeof(Contig::contigread_t) - //+readsinlargestcontig*sizeof(Contig::out_order_t) - - readsinlargestcontig*40 // 40 == rough guesstimate for PlacedContigReads - +totalreads*9 /* templates, mapping - allowedrefids */ - +largestcontigexpected*sizeof(Contig::consensus_counts_t) - +largestcontigexpected*10; // adjustments and some reserve - - int64 memforlargetables=0; - // some more overhead by the assembly class - memforlargetables+= totalreads*20; - - // get the skim edges accounted - int64 skimhitsmem=numskimhits*2*sizeof(skimedges_t); - // since 2.9.40 there's the possibility to cap that memory - // use default value - if(skimhitsmem>1024L*1024*1024){ - skimhitsmem=2LL*1024*1024*1024; - if(numsxareads>0) skimhitsmem*=2; - } - - // mem needed for temporary skim need - int64 tmpskim=500*1000*1000; - - memforlargetables+=max(skimhitsmem,tmpskim); - - // possible vector leftover clip - int64 memforpvlc=0; - { - // AS_readhitmiss & AS_readhmcovered - memforpvlc=totalexpectedbases*8; - // overhead of the structures above - memforpvlc+=sizeof(vector)*totalreads*2; - - // AS_count_rhm - memforpvlc+=totalreads*4; - } - - // ok, 1MB of additional small things - int64 memneededfordata=memneeded+(1024*1024); - - // experience shows that not all has been accounted for - // and internal mem caching of memory allocators add another - // layer of RAM needs - // - // add 40% to estimates - // but not if whe have mapping with Solexas - if(denovomapping!='m' && numsxareads==0){ - memneededfordata+=memneededfordata/100*40; - memforlargetables+=memforlargetables/100*40; - } - - cout.setf(ios::fixed, ios::floatfield); - //cout.setf(ios::showpoint); - cout.precision(1); - - cout << "\n\n************************* Estimates *************************\n\n"; - // last, if it's an EST assembly, there is no seqsize - - if(ptype=='e'){ - cout << "EST assembly, cannot give coverage estimate. Also, estimates" - "\nmay be way off for pathological cases.\n"; - - }else{ - cout << "The contigs will have an average coverage of ~ " << avgcov - << " (+/- 10%)" - "\nEstimates may be way off for pathological cases.\n"; - } - - cout << "\nRAM estimates:" - "\n" << setw(40) << "reads+contigs (unavoidable): "; - byteToHumanReadableSize(memneededfordata,cout); - cout << "\n" << setw(40) << "large tables (tunable): "; - byteToHumanReadableSize(memforlargetables,cout); - cout << "\n" << setw(40) << "" << "---------" - "\n" << setw(40) << "total (peak): "; - byteToHumanReadableSize(memforlargetables+memneededfordata, - cout); - cout << "\n\n" << setw(40) << "add if using -CL:pvlc=yes : "; - byteToHumanReadableSize(memforpvlc,cout); - if(denovomapping=='m' && numsxareads>0){ - int64 notusingmerge=memneededfordata/100*40; - cout << "\n" << setw(40) << "add if setting -CO:msr=no : "; - byteToHumanReadableSize(notusingmerge,cout); - } - cout << "\n\n" - "Note that some algorithms might try to grab more memory if" - "\nthe need arises and the system has enough RAM. The options" - "\nfor automatic memory management control this:" - "\n -AS:amm, -AS:kpmf, -AS:mps" - "\nFurther switches that might reduce RAM (at cost of run time" - "\nor accuracy):" - "\n -SK:mhim, -SK:mchr (both runtime); -SK:mhpr (accuracy)\n" - "*************************************************************\n"; - -} // usual linux stack size of 8Mb will lead to segfaults in very long // alignments (>15-18k) in align.C // therefore, get some more stack, atm 64 Mb -#include void getMoreStack() { struct rlimit rl; @@ -1249,25 +140,43 @@ boost::to_lower(miraprog); try{ - if(miraprog=="mira"){ - miraMain(argc,argv, false); - } else if(miraprog=="miraresume"){ - miraMain(argc,argv, true); - } else if(miraprog=="mirasearchestsnps"){ - miraEST(argc,argv); - } else if(miraprog=="miraclip"){ - miraClip(argc,argv); - } else if(miraprog=="mirapre"){ - miraPre(argc,argv); - } else if(miraprog=="miramem"){ - miraMemEstimate(); + if(miraprog=="mira" + || miraprog=="mira4"){ + miraMain(argc,argv); +// } else if(miraprog=="mirasearchestsnps"){ +// //miraEST(argc,argv); +// } else if(miraprog=="miraclip"){ +// //miraClip(argc,argv); +// } else if(miraprog=="mirapre"){ +// //miraPre(argc,argv); +// } else if(miraprog=="tagsnp"){ +// tagsnp t; +// t.mainTagSNP(argc, argv); + } else if(miraprog=="miramem" + ||miraprog=="mira4mem"){ + miraMemEstimate(argc, argv); + } else if(miraprog=="dbgreplay"){ + dbgReplayMain(argc, argv); + }else if(miraprog=="mirabait" + || miraprog=="mira4bait"){ + MiraBait m; + m.mainMiraBait(argc, argv); + }else if(miraprog=="miraconvert" + || miraprog=="mira4convert" + || miraprog=="convert_project" + || miraprog=="convert_projectd"){ + if(miraprog.front()=='c'){ + cout << "convert_project is a deprecated name for miraconvert, please switch to new name.\n"; + } + ConvPro cp; + cp.mainConvPro(argc, argv); } else { cout << miraprog << " is a non-recognised program name of MIRA.\n" "The programs SHOULD be named either\n" - "\"mira\", \"miraResume\", \"miraSearchESTSNPs\", \"miraCLIP\", \"miraPRE\" or \"miraMEM\"" - "\nAssuming 'mira'\n" << endl; + "\"mira\", \"miraconvert\", \"miramem\", \"mirabait\"" + "\nAssuming 'mira'\n" << endl; - miraMain(argc,argv, false); + miraMain(argc,argv); } } catch(Notify n){ diff -Nru mira-3.9.18/src/progs/miramer.C mira-4.0/src/progs/miramer.C --- mira-3.9.18/src/progs/miramer.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/progs/miramer.C 2014-02-02 12:05:18.000000000 +0000 @@ -22,35 +22,31 @@ * */ -//#include - #include -#include // setenv(); - -#include -#include -#include #include +#include + #include "io/generalio.H" #include "util/fileanddisk.H" -#include "mira/assembly.H" -#include "mira/parameters.H" -#include "mira/manifest.H" - #include "util/machineinfo.H" + +#include "mira/assembly.H" #include "mira/hashstats.H" +#include "mira/manifest.H" +#include "mira/parameters.H" #include "mira/seqtohash.H" - #include "version.H" + using namespace std; + // make the "tcmalloc: large alloc" messages from TCMallom disappear // by setting the reporting environment variable to a very large value // see: http://groups.google.com/group/google-perftools/browse_thread/thread/24a003fc35f3d470?pli=1 @@ -201,8 +197,8 @@ nhs.setupNewAnalysis(32,4,MER_basesperhash,MER_numlearnsteps); { uint8 ziptype=0; - string ft,stem; - guessFileAndZipType(loadfn,stem,ft,ziptype); + string ft,pathto,stem; + guessFileAndZipType(loadfn,pathto,stem,ft,ziptype); ReadPool rp1(&Pv); rp1.loadData_rgid( diff -Nru mira-3.9.18/src/progs/quirks.C mira-4.0/src/progs/quirks.C --- mira-3.9.18/src/progs/quirks.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/progs/quirks.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 2013 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + + +#include + +// make the "tcmalloc: large alloc" messages from TCMallom disappear +// by setting the reporting environment variable to a very large value +// see: http://groups.google.com/group/google-perftools/browse_thread/thread/24a003fc35f3d470?pli=1 +void quietenTCMALLOC() +{ + setenv("TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD", + "1099511627776", // 1 TiB, should be enough to quieten almost everything + 0); // "0" means "do not overwrite if already existing" +} + +/* + On some systems, Boost::filesystem (at least up to 1.50) throws a standard + exception when using some functions: locale::facet::_S_create_c_locale name not valid + Only countermeasure possible: setenv + Using setlocale or std::locale::global does *NOT* work as workaround (tried and tested) + */ +void fixLocaleQuirk() +{ + try{ + // this must work + boost::filesystem::path fp = boost::filesystem::current_path(); + } + catch(...){ + // if not, we're on a system with quirks + setenv("LC_ALL", + "C", + 1); + + std::cout << "Your system seems to be older or have some quirks with locale settings." + "\nUsing the LC_ALL=C workaround." + "\nIf you don't want that, fix your system ;-)\n"; + } +} + + +void fixQuirks() +{ + quietenTCMALLOC(); + fixLocaleQuirk(); +} + diff -Nru mira-3.9.18/src/progs/quirks.H mira-4.0/src/progs/quirks.H --- mira-3.9.18/src/progs/quirks.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/progs/quirks.H 2014-02-02 12:05:18.000000000 +0000 @@ -26,49 +26,9 @@ #ifndef _quirks_h_ #define _quirks_h_ -#include // setenv(); -#include - -// make the "tcmalloc: large alloc" messages from TCMallom disappear -// by setting the reporting environment variable to a very large value -// see: http://groups.google.com/group/google-perftools/browse_thread/thread/24a003fc35f3d470?pli=1 -void quietenTCMALLOC() -{ - setenv("TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD", - "1099511627776", // 1 TiB, should be enough to quieten almost everything - 0); // "0" means "do not overwrite if already existing" -} - -/* - On some systems, Boost::filesystem (at least up to 1.50) throws a standard - exception when using some functions: locale::facet::_S_create_c_locale name not valid - Only countermeasure possible: setenv - Using setlocale or std::locale::global does *NOT* work as workaround (tried and tested) - */ -void fixLocaleQuirk() -{ - try{ - // this must work - boost::filesystem::path fp = boost::filesystem::current_path(); - } - catch(...){ - // if not, we're on a system with quirks - setenv("LC_ALL", - "C", - 1); - - std::cout << "Your system seems to be older or have some quirks with locale settings." - "\nUsing the LC_ALL=C workaround." - "\nIf you don't want that, fix your system ;-)\n"; - } -} - - -void fixQuirks() -{ - quietenTCMALLOC(); - fixLocaleQuirk(); -} +void quietenTCMALLOC(); +void fixLocaleQuirk(); +void fixQuirks(); #endif diff -Nru mira-3.9.18/src/scripts/Makefile.am mira-4.0/src/scripts/Makefile.am --- mira-3.9.18/src/scripts/Makefile.am 2013-05-24 19:52:19.000000000 +0000 +++ mira-4.0/src/scripts/Makefile.am 2014-02-02 12:05:18.000000000 +0000 @@ -1,19 +1,13 @@ -EXTRA_DIST = fastaselect.tcl fastqselect.tcl fixACE4consed.tcl fasta2frag.tcl +EXTRA_DIST = fixACE4consed.tcl fasta2frag.tcl install-exec-hook: - rm -f $(DESTDIR)$(bindir)/fastaselect.tcl && \ - cp fastaselect.tcl $(DESTDIR)$(bindir) - rm -f $(DESTDIR)$(bindir)/fastqselect.tcl && \ - cp fastqselect.tcl $(DESTDIR)$(bindir) rm -f $(DESTDIR)$(bindir)/fixACE4consed.tcl && \ cp fixACE4consed.tcl $(DESTDIR)$(bindir) rm -f $(DESTDIR)$(bindir)/fasta2frag.tcl && \ cp fasta2frag.tcl $(DESTDIR)$(bindir) uninstall-hook: - rm -f $(DESTDIR)$(bindir)/fastaselect.tcl - rm -f $(DESTDIR)$(bindir)/fastqselect.tcl rm -f $(DESTDIR)$(bindir)/fixACE4consed.tcl rm -f $(DESTDIR)$(bindir)/fasta2frag.tcl diff -Nru mira-3.9.18/src/scripts/Makefile.in mira-4.0/src/scripts/Makefile.in --- mira-3.9.18/src/scripts/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/scripts/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -36,22 +36,19 @@ subdir = src/scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -77,6 +74,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -199,7 +197,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = fastaselect.tcl fastqselect.tcl fixACE4consed.tcl fasta2frag.tcl +EXTRA_DIST = fixACE4consed.tcl fasta2frag.tcl all: all-am .SUFFIXES: @@ -394,18 +392,12 @@ install-exec-hook: - rm -f $(DESTDIR)$(bindir)/fastaselect.tcl && \ - cp fastaselect.tcl $(DESTDIR)$(bindir) - rm -f $(DESTDIR)$(bindir)/fastqselect.tcl && \ - cp fastqselect.tcl $(DESTDIR)$(bindir) rm -f $(DESTDIR)$(bindir)/fixACE4consed.tcl && \ cp fixACE4consed.tcl $(DESTDIR)$(bindir) rm -f $(DESTDIR)$(bindir)/fasta2frag.tcl && \ cp fasta2frag.tcl $(DESTDIR)$(bindir) uninstall-hook: - rm -f $(DESTDIR)$(bindir)/fastaselect.tcl - rm -f $(DESTDIR)$(bindir)/fastqselect.tcl rm -f $(DESTDIR)$(bindir)/fixACE4consed.tcl rm -f $(DESTDIR)$(bindir)/fasta2frag.tcl diff -Nru mira-3.9.18/src/scripts/fasta2frag.tcl mira-4.0/src/scripts/fasta2frag.tcl --- mira-3.9.18/src/scripts/fasta2frag.tcl 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/scripts/fasta2frag.tcl 2014-02-02 12:05:18.000000000 +0000 @@ -13,17 +13,17 @@ # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., +# along with this program; if not, write to the +# Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# +# # #set min 3 @@ -69,7 +69,7 @@ incr i } } - + puts "oldseq: $dnaseq" set dnaseq [string replace $dnaseq $cpos $cpos $newbase] puts "newseq: $dnaseq" @@ -99,7 +99,7 @@ for {set i 1} {$i <= $nummut} {incr i} { puts "mut $i" #set dnaseq [dnamut_basechange $dnaseq] - + #set muttype [expr {int(rand()*3)}] #switch -exact -- $muttype { # 0 { set $dnaseq [dnamut_basechange $dnaseq] } @@ -117,69 +117,13 @@ if {$opts(-minmut) || $opts(-maxmut)} { set dnaseq [dnamut $dnaseq $opts(-minmut) $opts(-maxmut)] } - + puts $fout ">$name $descline\n$dnaseq" if {[llength $qualseq]} { puts $qout ">$name\n$qualseq" } } -proc fasta2frag::getStrobeData {dnaseq quals from len} { - variable opts - - set retseq "" - set retquals {} - - set dnalen [string length $dnaseq] - - set thisstrobe $opts(-strobeon) - set totalbases 0 - set ii 0 - - for {} {$totalbases < $len} {incr ii} { - incr totalbases - set dnapos [expr {($from+$ii)}] - - if {$dnapos < $dnalen || $opts(-c)} { - set realindex [expr {$dnapos%$dnalen}] - append retseq [string index $dnaseq $realindex ] - if {[llength $quals]>0} { - lappend retquals [lindex $quals $realindex] - } else { - lappend retquals $opts(-q) - } - incr thisstrobe -1 - if {$thisstrobe ==0 && $totalbases < $len} { - if {1} { - # fixed number of 'N', +/- 20% real advance - # this is how I expect PacBio data to be - for {set i 0} {$i < $opts(-strobeoff)} {incr i} { - append retseq n - lappend retquals 0 - } - # variance of +/- 20% - set iiincr [expr {int($opts(-strobeoff)+(rand() * $opts(-strobeoff) * .4)-($opts(-strobeoff)*.2))}] - incr ii $iiincr - set thisstrobe $opts(-strobeon) - } else { - # +/- 20% number of 'N', fixed real advance - # for testing only, this should never be a real world case! - - set fto [expr {int($opts(-strobeoff)+(rand() * $opts(-strobeoff) * .4)-($opts(-strobeoff)*.2))}] - for {set i 0} {$i < $fto} {incr i} { - append retseq n - lappend retquals 0 - } - - incr ii $opts(-strobeoff) - set thisstrobe $opts(-strobeon) - } - } - } - } - - return [list $retseq $retquals] -} #proc fasta2frag::getdnafromto {dnaseq from to} { # variable opts @@ -206,7 +150,7 @@ proc fasta2frag::getqualfromto {dnaseq quals from to} { variable opts - + set qualslen [llength $quals] set qualseq {} @@ -216,12 +160,12 @@ catch { set thisqual [expr {int([lindex $quals [expr {$i%$qualslen}] ] / $opts(-qualdivisor))}] } - + # noqual? if {$thisqual < 0} { set thisqual $opts(-minqual) } - + if {$thisqual < $opts(-minqual)} { set thisqual $opts(-minqual) } @@ -254,15 +198,15 @@ #close $fid puts "fragging $name" - + #if {[regsub -all -line {^>(.*?)$} $data "" nonamedata] >1} { # puts stderr "More than one sequence in fasta file, aborting." # exit 500 #} - + regsub -all {\n} $nonamedata "" data unset nonamedata - + # when circularising is on, append first $opts(-l)-1 bases # of sequence to end of sequence (and also quals if present) # if strobing, also add $opts(-l)-$opts(-strobeoff) bases @@ -305,10 +249,13 @@ set fwdname "TF" set revname "TR" } - default { + sanger { set fwdname "_pe.p1" set revname "_pe.q1" } + default { + error "Unrecognised -pairednaming $opt(-pairednaming)" + } } set seqid 1 @@ -330,82 +277,22 @@ return [expr {$from+$opts(-l)}] } - #for { } {$from < $datalen} { incr from $opts(-i); incr to $opts(-i); incr seqid} + #for { } {$from < $datalen} { incr from $opts(-i); incr to $opts(-i); incr seqid} for { } {$from < $datalen} { incr from $opts(-i); incr seqid} { #set to [expr {$from+$opts(-l)}] set to [getFragLen $from] if {$lastflag == 0} { #puts "$from $to" - + if {$to >= $datalen} { set lastflag 1 } - + if {$opts(-p) > 0 } { set pairnamef ${name}_${seqid}${fwdname} set pairnamer ${name}_${seqid}${revname} if { $opts(-s) > 0 } { - set to2 [expr {$from + $opts(-insert_size)}] - - if {$to > $datalen} { - set to $datalen - } - if {$to2 > $datalen} { - set to2 $datalen - } - - set fractionoff [expr {1.0/$opts(-strobeon)*$opts(-strobeoff)}] - set mult [expr {1.0+$fractionoff}] - set from2 [expr {int($to2 - ($opts(-l)*$mult)) }] - - if {$to2 <= $datalen} { - - set rev1 0 - set rev2 0 - if { $opts(-r) > 0 } { - if { [expr {$seqid % $opts(-r)}] == 0} { - set rev1 1 - set rev2 1 - } - } - if {$opts(-P)} { - set rev2 [expr {$rev2 ^ 1}] - } - - #putz "F: $from $opts(-l)" - set bla [getStrobeData $data $quals $from $opts(-l)] - set dnaseq [lindex $bla 0] - set qualseq [lindex $bla 1] - - set descline "[expr {$opts(-insert_size)-$opts(-insert_stdev)}] $opts(-insert_size) [expr {$opts(-insert_size)+$opts(-insert_stdev)}] 1 [string length $dnaseq]" - - if {$rev1} { - reverse_seq_qual dnaseq qualseq - } - dumpfasta $pairnamef$opts(-namesuffix) $descline $dnaseq $fout $qualseq $qout - - if {$seqid == 1} { - # if we a re working with reversing sequences, - # force a reverse of the sequence - if { $opts(-r) > 0 } { - reverse_seq_qual dnaseq qualseq - } - dumpfasta ${name}$opts(-namesuffix)_${seqid}_a $descline $dnaseq $fout $qualseq $qout - } - - #putz "R: $from2 $opts(-l)" - set bla [getStrobeData $data $quals $from2 $opts(-l)] - set dnaseq [lindex $bla 0] - set qualseq [lindex $bla 1] - - if {$rev2} { - reverse_seq_qual dnaseq qualseq - } - dumpfasta $pairnamer$opts(-namesuffix) $descline $dnaseq $fout $qualseq $qout - - puts $mpout "$pairnamef$opts(-namesuffix)\t$pairnamer$opts(-namesuffix)" - puts $mbout "$pairnamef$opts(-namesuffix)\t$pairnamer$opts(-namesuffix)\tsimplepair" - } + error "forget about that strobe thingy" } else { set to2 [expr {$from + $opts(-insert_size)}] set from2 [expr {$to2 - $opts(-l)}] @@ -419,15 +306,28 @@ set rev1 0 set rev2 0 - if { $opts(-r) > 0 } { - if { [expr {$seqid % $opts(-r)}] == 0} { - set rev1 1 - set rev2 1 + if { [expr {$seqid % 2}] == 0 } { + switch -exact -- $opts(-r) { + FF { } + RF { set rev1 1} + FR { set rev2 1} + RR { set rev1 1; set rev2 1 } + default { error "-r $opts(-r) is not known, please use FF, RR, FR, RF."} + } + } else { + set tmp $pairnamef + set pairnamef $pairnamer + set pairnamer $tmp + switch -exact -- $opts(-r) { + FF { set rev1 1; set rev2 1 } + RF { set rev1 1} + FR { set rev2 1} + RR { } + default { error "-r $opts(-r) is not known, please use FF, RR, FR, RF."} } } - if {$opts(-P)} { - set rev2 [expr {$rev2 ^ 1}] - } + + #putz "$pairnamef $rev1\t$pairnamer $rev2" set dnaseq [string range $data $from [expr {$to-1}]] set qualseq [getqualfromto $dnaseq $quals $from $to] @@ -439,12 +339,13 @@ if {$rev1} { reverse_seq_qual dnaseq qualseq } + #putz "$pairnamef $rev1 $dnaseq" dumpfasta $pairnamef$opts(-namesuffix) $descline $dnaseq $fout $qualseq $qout - + if {$seqid == 1} { - # if we a re working with reversing sequences, + # if we are working with reversing sequences, # force a reverse of the sequence - if { $opts(-r) > 0 } { + if { $opts(-r) != "FF" } { reverse_seq_qual dnaseq qualseq } dumpfasta ${name}$opts(-namesuffix)_${seqid}_a $descline $dnaseq $fout $qualseq $qout @@ -455,6 +356,7 @@ if {$rev2} { reverse_seq_qual dnaseq qualseq } + #putz "$pairnamer $rev2 $dnaseq" dumpfasta $pairnamer$opts(-namesuffix) $descline $dnaseq $fout $qualseq $qout puts $mpout "$pairnamef\t$pairnamer" @@ -462,31 +364,25 @@ } } } else { - if { $opts(-s) > 0 } { - set bla [getStrobeData $data $quals $from $opts(-l)] - set dnaseq [lindex $bla 0] - set qualseq [lindex $bla 1] - } else { - set dnaseq [string range $data $from [expr {$to-1}]] - set qualseq [getqualfromto $dnaseq $quals $from $to] - } - - if { $opts(-r) > 0 } { - if { [expr {$seqid % $opts(-r)}] == 0} { + set dnaseq [string range $data $from [expr {$to-1}]] + set qualseq [getqualfromto $dnaseq $quals $from $to] + + if { $opts(-r) != "FF" } { + if { [expr {$seqid % 2}] == 0} { reverse_seq_qual dnaseq qualseq } } set descline "1 [string length $dnaseq]" dumpfasta ${name}$opts(-namesuffix)_$seqid $descline $dnaseq $fout $qualseq $qout - + # the very first and very last fragment will be put twice # into the data set so that every part of the contig # is covered at least twice if {$seqid == 1 || $lastflag >0 } { # if we a re working with reversing sequences, # force a reverse of the sequence - if { $opts(-r) > 0 } { + if { $opts(-r) != "FF" } { reverse_seq_qual dnaseq qualseq } dumpfasta ${name}$opts(-namesuffix)_${seqid}_a $descline $dnaseq $fout $qualseq $qout @@ -520,7 +416,7 @@ set fin [open $opts(-infile) r] set fout [open $opts(-outfile) w] - + set havequal 0 if {[file exist ${opts(-infile)}.qual]} { puts "have qual" @@ -560,7 +456,7 @@ } set quals [loadNextQuals $qin] } - + fragASeq $actseq $seqname $fout $quals $qout $mpout $mbout incr cid set actseq "" @@ -588,18 +484,30 @@ } } +proc fasta2frag::sanitycheck {} { + variable opts +} + +proc fasta2frag::parsequick {qstr} { + variable opts +} + proc usage {prgname} { puts stderr "$prgname: Splits a single fasta sequence into several overlapping fragments.\n" puts stderr "Usage: $prgname ?options? infile outfile +\t-quick string '' \t-l int Length of fragments (default=3000) \t-i int Increment of fragment start site (default=2500) -\t-p int Paired end (default=0 is off, 1 is on) -\t-P int In paired-end mode, reverse one of the reads -\t (0 is off, default=1 is on) +\t-p int Paired reads (default=0 is off, 1 is on) +\t-r string In shotgun: 'FF' to not to reverse every second read +\t In paired reads mode: + FF: forward-forward + RR: reverse-reverse (Ion Torrent, 454) + FR: forward-reverse (Solexa paired-end) + RF: reverse-forward (Solexa mate-pair) \t-s int Strobe sequencing (default=0 is off, 1 is on) \t-q int Default quality when no quality data present (default=30) -\t-r int Reverse every nth fragment (default=2) \t-c int Circularise fragments so that they form a ring (default=0 is is off, 1 would be on) @@ -608,8 +516,8 @@ \t-insert_size int paired-end: insert size (default=3000) \t-insert_stdev int paired-end: standard dev (default=900) \t this is not working at the moment -\t-pairednaming string naming scheme for paired-end: -\t sanger, 454 (default) or solexa +\t-pairednaming string naming scheme for paired-end: +\t sanger, tigr, 454 or solexa (default) \t-minmut int min. number of mutations/seq. errors (def=0) \t-maxmut int max. number of mutations/seq. errors (def=0) \t-strobeon int number of bases read during strobe on @@ -624,9 +532,8 @@ set fasta2frag::opts(-l) 3000 set fasta2frag::opts(-i) 2500 -set fasta2frag::opts(-r) 2 +set fasta2frag::opts(-r) FR set fasta2frag::opts(-p) 0 -set fasta2frag::opts(-P) 1 set fasta2frag::opts(-s) 0 set fasta2frag::opts(-q) 30 set fasta2frag::opts(-c) 0 @@ -634,7 +541,7 @@ #set fasta2frag::opts(-maxmut) 2 set fasta2frag::opts(-minmut) 0 set fasta2frag::opts(-maxmut) 0 -set fasta2frag::opts(-pairednaming) 454 +set fasta2frag::opts(-pairednaming) solexa set fasta2frag::opts(-qualdivisor) 1 set fasta2frag::opts(-minqual) 0 set fasta2frag::opts(-insert_size) 3000 @@ -650,23 +557,27 @@ foreach {key val} $argv { if {![info exists fasta2frag::opts($key)]} { - if {[string compare [string index $key 0] "-"] == 0} { + if {[string compare [string index $key 0] "-"] == 0} { puts stderr "Bad key $key\n" usage $argv0 } set val $key set key -infile } + if { $key == "-quick" } { + fasta2frag::parsequick $val + } set fasta2frag::opts($key) $val } -if {[string length $fasta2frag::opts(-infile)] ==0} { +if {[string length $fasta2frag::opts(-infile)] ==0} { puts "Missing '-infile' as keyword" usage $argv0 ; } -if {[string length $fasta2frag::opts(-outfile)] ==0} { +if {[string length $fasta2frag::opts(-outfile)] ==0} { puts "Missing '-outfile' as keyword" - usage $argv0 ; + usage $argv0 ; } +fasta2frag::sanitycheck fasta2frag::processit diff -Nru mira-3.9.18/src/scripts/fastaselect.tcl mira-4.0/src/scripts/fastaselect.tcl --- mira-3.9.18/src/scripts/fastaselect.tcl 2013-05-24 19:52:19.000000000 +0000 +++ mira-4.0/src/scripts/fastaselect.tcl 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -#!/bin/sh -# \ - exec tclsh "$0" ${1+"$@"} - -# -# Written by Bastien Chevreux (BaCh) -# -# Copyright (C) 2006 and later by Bastien Chevreux -# -# All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# - -namespace eval fassel { - variable opts - -} - - -proc fassel::conditionalFASTACopy {fin fout} { - variable names - - gets $fin data - set seqname "[string map {> ""} [lindex $data 0]]" - set mustout 0 - if {[info exists names($seqname)]} { - puts $fout ">$seqname" - set mustout 1 - } - - while {[gets $fin line] != -1} { - if {[string compare [string index $line 0] ">"] == 0} { - - set seqname "[string map {> ""} [lindex $line 0]]" - if {[info exists names($seqname)]} { - puts $fout "\n>$seqname" - set mustout 1 - } else { - set mustout 0 - } - } elseif {$mustout >0} { - puts -nonewline $fout $line - } - } -} - -proc fassel::processit {} { - variable opts - variable names - - puts "Reading names" - set fin [open $opts(-name) r] - while {[gets $fin line] != -1} { -# set names([string trim $line]) 1 - set names([lindex $line 0]) 1 - } - close $fin - - puts "Copying sequence data" - set fin [open $opts(-infile) r] - set fout [open $opts(-outfile) w] - conditionalFASTACopy $fin $fout - close $fout - close $fin - - if {[file exists ${opts(-infile)}.qual]} { - puts "Copying quality data" - set fin [open ${opts(-infile)}.qual r] - set fout [open ${opts(-outfile)}.qual w] - conditionalFASTACopy $fin $fout - close $fout - close $fin - } - -} - -proc usage {prgname} { - puts stderr "fastaselect: Select fasta sequences in a file according to names given - in a name file.\n -If fasta quality file is present (same basename, but with .qual appended), -then also selects sequences from there.\n" - puts stderr "Usage: fastaselect ?options? -\t-infile name filename containing all fasta sequences -\t-name name filename containing all names of sequences to select -\t-outfile name filename where to write selcted sequences to -" - exit -} - -set fassel::opts(-infile) "" -set fassel::opts(-outfile) "" -set fassel::opts(-name) "" - -foreach {key val} $argv { - if {![info exists fassel::opts($key)]} { - if {[string compare [string index $key 0] "-"] == 0} { - puts stderr "Bad key $key\n" - usage $argv0 - } - set val $key - set key -infile - } - set fassel::opts($key) $val -} - -if {[string length $fassel::opts(-infile)] ==0} { usage $argv0 ; } -if {[string length $fassel::opts(-outfile)] ==0} { usage $argv0 ; } -if {[string length $fassel::opts(-name)] ==0} { usage $argv0 ; } - -fassel::processit diff -Nru mira-3.9.18/src/scripts/fastqselect.tcl mira-4.0/src/scripts/fastqselect.tcl --- mira-3.9.18/src/scripts/fastqselect.tcl 2013-05-24 19:52:19.000000000 +0000 +++ mira-4.0/src/scripts/fastqselect.tcl 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -#!/bin/sh -# \ - exec tclsh "$0" ${1+"$@"} - -# -# Written by Bastien Chevreux (BaCh) -# -# Copyright (C) 2010 and later by Bastien Chevreux -# -# All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# - -namespace eval faqsel { - variable opts - -} - - -proc faqsel::conditionalFASTQCopy {fin fout} { - variable names - - gets $fin line - set seqname "[string range [lindex $line 0] 1 end]" - set mustout 0 - if {[info exists names($seqname)]} { - set seqname "[string range [lindex $line 0] 1 end]" - set mustout 1 - } - - set seqdata "" - set qualdata "" - - set inseq 1 - - while {[gets $fin line] != -1} { - #puts "l: $line" - #puts "sn: $seqname" - #puts "sd: $seqdata" - #puts "qd: $qualdata" - #puts "fl: $mustout $inseq" - if {$inseq} { - if {[string compare [string index $line 0] "+"] == 0} { - set inseq 0 - if {[string compare $line "+"] != 0} { - set sname "[string range [lindex $line 0] 1 end]" - if {[string length sname] && $sname != $seqname} { - error "Last sequence name: $seqname\nNow reading line: $line\nThe names don't match?!" - } - } else { - set sname $seqname - } - } elseif {[string compare [string index $line 0] "@"] == 0} { - # sequence without qual - if {$mustout} { - puts $fout "@$seqname" - puts $fout $seqdata - } - set seqdata "" - set seqname "[string range [lindex $line 0] 1 end]" - set mustout 0 - if {[info exists names($seqname)]} { - set mustout 1 - } - } else { - append seqdata $line - } - } else { - if {[string compare [string index $line 0] "@"] == 0} { - if {[string length $seqdata] == [string length $qualdata]} { - if {$mustout} { - puts $fout "@$seqname" - puts $fout $seqdata - puts $fout "+" - puts $fout $qualdata - } - set seqdata "" - set qualdata "" - set seqname "[string range [lindex $line 0] 1 end]" - set inseq 1 - set mustout 0 - if {[info exists names($seqname)]} { - set mustout 1 - } - } else { - append qualdata $line - } - } else { - append qualdata $line - } - } - } - - if {$mustout && [string length $seqdata]} { - puts $fout "@$seqname" - puts $fout $seqdata - if {[string length $qualdata]} { - puts $fout "+" - puts $fout $qualdata - } - } -} - -proc faqsel::processit {} { - variable opts - variable names - - puts "Reading names" - set fin [open $opts(-name) r] - while {[gets $fin line] != -1} { -# set names([string trim $line]) 1 - set names([lindex $line 0]) 1 - } - close $fin - - puts "Copying sequence data" - set fin [open $opts(-infile) r] - set fout [open $opts(-outfile) w] - conditionalFASTQCopy $fin $fout - close $fout - close $fin -} - -proc usage {prgname} { - puts stderr "fastqselect: Select fastq sequences in a file according to names given - in a name file.\n" - puts stderr "Usage: fastqselect ?options? -\t-infile name filename containing all fasta sequences -\t-name name filename containing all names of sequences to select -\t-outfile name filename where to write selcted sequences to -" - exit -} - -set faqsel::opts(-infile) "" -set faqsel::opts(-outfile) "" -set faqsel::opts(-name) "" - -foreach {key val} $argv { - if {![info exists faqsel::opts($key)]} { - if {[string compare [string index $key 0] "-"] == 0} { - puts stderr "Bad key $key\n" - usage $argv0 - } - set val $key - set key -infile - } - set faqsel::opts($key) $val -} - -if {[string length $faqsel::opts(-infile)] ==0} { usage $argv0 ; } -if {[string length $faqsel::opts(-outfile)] ==0} { usage $argv0 ; } -if {[string length $faqsel::opts(-name)] ==0} { usage $argv0 ; } - -faqsel::processit diff -Nru mira-3.9.18/src/stdinc/Makefile.in mira-4.0/src/stdinc/Makefile.in --- mira-3.9.18/src/stdinc/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/stdinc/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -38,22 +38,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -82,6 +79,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/stdinc/defines.H mira-4.0/src/stdinc/defines.H --- mira-3.9.18/src/stdinc/defines.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/stdinc/defines.H 2014-02-02 12:05:18.000000000 +0000 @@ -26,12 +26,12 @@ #ifndef _mira_std_defines_h_ #define _mira_std_defines_h_ -#include #include -#include "types.H" +#include "stdinc/types.H" #include "debuggersupport/dbgsupport.H" + #if __GNUC__ >= 4 #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) @@ -77,8 +77,8 @@ #endif -#define ERROR(bla) { cout.flush(); cerr << "\nFatal error in: " << THISFUNC << ": " << bla; exit(1);} -#define WARNING(bla) { cout.flush(); cerr << "Warning in: " << THISFUNC << ": " << bla << endl;} +#define ERROR(bla) { std::cout.flush(); std::cerr << "\nFatal error in: " << THISFUNC << ": " << bla; exit(1);} +#define WARNING(bla) { std::cout.flush(); std::cerr << "Warning in: " << THISFUNC << ": " << bla << endl;} #define FUNCSTART(bla) static const char * THISFUNC = bla; (void) THISFUNC; #define FUNCEND() @@ -88,7 +88,7 @@ #ifdef BUGTRACKFLAG -#define BUGIFTHROW(ifcond, throwmsg) { if(ifcond) {std::ostringstream my__emsg; my__emsg << throwmsg; COUTERRMSG; if(seenDebugger()) {raise(SIGTRAP);};BANGNOW; throw Notify(Notify::INTERNAL, THISFUNC, my__emsg.str().c_str());}} +#define BUGIFTHROW(ifcond, throwmsg) { if(unlikely(ifcond)) {std::ostringstream my__emsg; my__emsg << throwmsg; COUTERRMSG; if(seenDebugger()) {raise(SIGTRAP);};BANGNOW; throw Notify(Notify::INTERNAL, THISFUNC, my__emsg.str().c_str());}} #define BUGIF(ifcond, statement) { if(ifcond) {statement;}} #define BUGSTAT(statement) {statement;} #else @@ -99,7 +99,7 @@ #ifdef BOUNDTRACKFLAG //#define BOUNDCHECK(x, l, h) assert((x) >= (l) && (x) < (h)); -#define BOUNDCHECK(x, l, h) if(!((x) >= (l) && (x) < (h))) MIRANOTIFY(Notify::FATAL, "Oooops, boundcheck failed: " << x << ' ' << l << ' ' << h ); +#define BOUNDCHECK(x, l, h) if(unlikely(!((x) >= (l) && (x) < (h)))) MIRANOTIFY(Notify::FATAL, "Oooops, boundcheck failed: " << x << ' ' << l << ' ' << h ); #else #define BOUNDCHECK(x, l, h) #endif diff -Nru mira-3.9.18/src/stdinc/stlincludes.H mira-4.0/src/stdinc/stlincludes.H --- mira-3.9.18/src/stdinc/stlincludes.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/stdinc/stlincludes.H 2014-02-02 12:05:18.000000000 +0000 @@ -9,17 +9,17 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., + * along with this program; if not, write to the + * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * + * */ #ifndef STL_H @@ -71,8 +71,8 @@ //#if __GNUC__ >= 3 //#include //using namespace __gnu_cxx; // hashes are in this namespace of gcc3 -//#endif +//#endif -#include +//#include -#endif +#endif diff -Nru mira-3.9.18/src/stdinc/types.H mira-4.0/src/stdinc/types.H --- mira-3.9.18/src/stdinc/types.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/stdinc/types.H 2014-02-02 12:05:18.000000000 +0000 @@ -1,9 +1,7 @@ #ifndef _bastypes_defines_h_ #define _bastypes_defines_h_ -#include //??? -//#include -//#include +#include //??? typedef uint8_t uint8; typedef int8_t int8; diff -Nru mira-3.9.18/src/support/GTAGDB mira-4.0/src/support/GTAGDB --- mira-3.9.18/src/support/GTAGDB 2013-05-24 19:52:19.000000000 +0000 +++ mira-4.0/src/support/GTAGDB 2014-02-02 12:05:18.000000000 +0000 @@ -4,35 +4,31 @@ # Add these lines to the file $STADENROOT/tables/GTAGDB # so that GAP4 also knows them the next time you start -"Strong Repeat Marker in Consensus":id="SRMc":bg=OrangeRed + +# --------------- Read tags, set only in reads + +# one additional feature (non-GenBank, I admit) +"FEATURE: polyA_sequence": id="Fpas": bg="#04AC80" + + "Strong Repeat Marker in Read":id="SRMr":bg=OrangeRed -"Weak Repeat Marker in Consensus":id="WRMc":bg=Orange "Weak Repeat Marker in Read":id="WRMr":bg=Orange "Old Repeat Marker Base":id="ORMB":bg=orange1 "Carbon Copy Repeat Marker in Read":id="CRMr":bg=palegoldenrod -"Masked Nasty Repeat":id="MNRr":bg=black:fg=white "Unsure in read":id="UNSr":bg=Yellow -"Unsure in consensus":id="UNSc":bg=Yellow - -"IUPAC code consensus":id="IUPc":bg=royalblue3 -"Missing coverage in consensus":id="MCVc":bg=firebrick3 "SNP inteR Organism on Read":id="SROr":bg=DarkTurquoise -"SNP inteR Organism on Consensus":id="SROc":bg=DarkTurquoise "SNP intrA Organism on Read":id="SAOr":bg=SeaGreen -"SNP intrA Organism on Consensus":id="SAOc":bg=SeaGreen "SNP Intra- and inter Organism on Read":id="SIOr":bg=PaleGreen -"SNP Intra- and inter Organism on Consensus":id="SIOc":bg=PaleGreen "EdIt: insertion":id="ED_I":bg=pink "EdIt: deletion":id="ED_D":bg=pink "EdIt: base change":id="ED_C":bg=pink +"454 read edit, tricky":id="R454":bg=green +"Edit single discr., no HAF tag":id="ESDN":bg=green "Pyrosequencing Suspicious HomoPolymer":id="PSHP":bg=orange1 -"Dubious Gap Position on Consensus":id="DGPc":bg=orange1 -"Sequencing Type Mismatch Solved":id="STMS":bg=lightblue -"Sequencing Type Mismatch Unresolved":id="STMU":bg=lightblue # HAsh Frequency tags "HAF no info":id="HAF0":bg=grey @@ -43,7 +39,9 @@ "HAF rept":id="HAF5":bg=red "HAF heavy rept":id="HAF6":bg=indianred4 "HAF crazy rept":id="HAF7":bg=red4 +"Masked Nasty Repeat":id="MNRr":bg=black:fg=white +"KMer Fork":id="KMRF":bg=pink # other tags, mostly for development & debugging "454 edit, qual too high":id="Q454":bg=yellow @@ -51,6 +49,30 @@ "454 test tag":id="T454":bg=yellow "454 hypothesis tag":id="H454":bg=green +# MIRA info tags +"MIRA info":id="MINF":bg=gray +"MIRA info 2":id="MIT2":bg=gray + + +"RLE 1":id="RLE1":bg=Green +"RLE 2":id="RLE2":bg=palegreen1 +"RLE 3":id="RLE3":bg=yellow2 +"RLE 4":id="RLE4":bg=orange +"RLE 5":id="RLE5":bg=red +"RLE 6":id="RLE6":bg=indianred4 +"RLE 7":id="RLE7":bg=red4:fg=white +"RLE 8+":id="RLE8":bg=grey:fg=white -"454 read edit, tricky":id="R454":bg=green -"Edit single discr., no HAF tag":id="ESDN":bg=green + +# --------------- Consensus tags, set only in consensus + +"Strong Repeat Marker in Consensus":id="SRMc":bg=OrangeRed +"Weak Repeat Marker in Consensus":id="WRMc":bg=Orange +"Unsure in consensus":id="UNSc":bg=Yellow +"IUPAC code consensus":id="IUPc":bg=royalblue3 +"Missing coverage in consensus":id="MCVc":bg=firebrick3 +"SNP inteR Organism on Consensus":id="SROc":bg=DarkTurquoise +"SNP intrA Organism on Consensus":id="SAOc":bg=SeaGreen +"SNP Intra- and inter Organism on Consensus":id="SIOc":bg=PaleGreen +"Sequencing Type Mismatch Solved":id="STMS":bg=lightblue +"Sequencing Type Mismatch Unresolved":id="STMU":bg=lightblue diff -Nru mira-3.9.18/src/support/Makefile.in mira-4.0/src/support/Makefile.in --- mira-3.9.18/src/support/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/support/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -38,22 +38,19 @@ DIST_COMMON = README $(dist_supportdata_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -108,6 +105,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ diff -Nru mira-3.9.18/src/util/Makefile.am mira-4.0/src/util/Makefile.am --- mira-3.9.18/src/util/Makefile.am 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/util/Makefile.am 2014-02-02 12:05:18.000000000 +0000 @@ -1,6 +1,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src $(all_includes) -noinst_LIBRARIES = libmirautil.a libmiradptools.a +noinst_LIBRARIES = libmirautil.a libmiradptools.a libmirafmttext.a libmirautil_a_SOURCES= machineinfo.C fileanddisk.C misc.C libmiradptools_a_SOURCES= dptools.C -noinst_HEADERS= misc.H dptools.H progressindic.H memusage.H machineinfo.H fileanddisk.H stlimprove.H boostiostrutil.H +libmirafmttext_a_SOURCES= fmttext.C +noinst_HEADERS= misc.H dptools.H progressindic.H memusage.H machineinfo.H fileanddisk.H stlimprove.H boostiostrutil.H fmttext.H diff -Nru mira-3.9.18/src/util/Makefile.in mira-4.0/src/util/Makefile.in --- mira-3.9.18/src/util/Makefile.in 2013-07-01 18:38:15.000000000 +0000 +++ mira-4.0/src/util/Makefile.in 2014-02-02 17:08:14.000000000 +0000 @@ -39,22 +39,19 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/ax_boost_base.m4 \ - $(top_srcdir)/config/m4/ax_boost_filesystem.m4 \ - $(top_srcdir)/config/m4/ax_boost_iostreams.m4 \ - $(top_srcdir)/config/m4/ax_boost_regex.m4 \ - $(top_srcdir)/config/m4/ax_boost_system.m4 \ - $(top_srcdir)/config/m4/ax_boost_thread.m4 \ - $(top_srcdir)/config/m4/ax_check_zlib.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_std.m4 \ - $(top_srcdir)/config/m4/ax_cxx_have_stl.m4 \ - $(top_srcdir)/config/m4/ax_cxx_namespaces.m4 \ - $(top_srcdir)/config/m4/ax_lib_expat.m4 \ - $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_filesystem.m4 \ + $(top_srcdir)/m4/ax_boost_iostreams.m4 \ + $(top_srcdir)/m4/ax_boost_regex.m4 \ + $(top_srcdir)/m4/ax_boost_system.m4 \ + $(top_srcdir)/m4/ax_boost_thread.m4 \ + $(top_srcdir)/m4/ax_check_zlib.m4 \ + $(top_srcdir)/m4/ax_cxx_have_std.m4 \ + $(top_srcdir)/m4/ax_cxx_have_stl.m4 \ + $(top_srcdir)/m4/ax_cxx_namespaces.m4 \ + $(top_srcdir)/m4/ax_lib_expat.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -67,6 +64,10 @@ libmiradptools_a_LIBADD = am_libmiradptools_a_OBJECTS = dptools.$(OBJEXT) libmiradptools_a_OBJECTS = $(am_libmiradptools_a_OBJECTS) +libmirafmttext_a_AR = $(AR) $(ARFLAGS) +libmirafmttext_a_LIBADD = +am_libmirafmttext_a_OBJECTS = fmttext.$(OBJEXT) +libmirafmttext_a_OBJECTS = $(am_libmirafmttext_a_OBJECTS) libmirautil_a_AR = $(AR) $(ARFLAGS) libmirautil_a_LIBADD = am_libmirautil_a_OBJECTS = machineinfo.$(OBJEXT) fileanddisk.$(OBJEXT) \ @@ -85,8 +86,10 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libmiradptools_a_SOURCES) $(libmirautil_a_SOURCES) -DIST_SOURCES = $(libmiradptools_a_SOURCES) $(libmirautil_a_SOURCES) +SOURCES = $(libmiradptools_a_SOURCES) $(libmirafmttext_a_SOURCES) \ + $(libmirautil_a_SOURCES) +DIST_SOURCES = $(libmiradptools_a_SOURCES) $(libmirafmttext_a_SOURCES) \ + $(libmirautil_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -107,6 +110,7 @@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ +BUNDLETARGET = @BUNDLETARGET@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -230,10 +234,11 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/src $(all_includes) -noinst_LIBRARIES = libmirautil.a libmiradptools.a +noinst_LIBRARIES = libmirautil.a libmiradptools.a libmirafmttext.a libmirautil_a_SOURCES = machineinfo.C fileanddisk.C misc.C libmiradptools_a_SOURCES = dptools.C -noinst_HEADERS = misc.H dptools.H progressindic.H memusage.H machineinfo.H fileanddisk.H stlimprove.H boostiostrutil.H +libmirafmttext_a_SOURCES = fmttext.C +noinst_HEADERS = misc.H dptools.H progressindic.H memusage.H machineinfo.H fileanddisk.H stlimprove.H boostiostrutil.H fmttext.H all: all-am .SUFFIXES: @@ -275,6 +280,10 @@ -rm -f libmiradptools.a $(libmiradptools_a_AR) libmiradptools.a $(libmiradptools_a_OBJECTS) $(libmiradptools_a_LIBADD) $(RANLIB) libmiradptools.a +libmirafmttext.a: $(libmirafmttext_a_OBJECTS) $(libmirafmttext_a_DEPENDENCIES) $(EXTRA_libmirafmttext_a_DEPENDENCIES) + -rm -f libmirafmttext.a + $(libmirafmttext_a_AR) libmirafmttext.a $(libmirafmttext_a_OBJECTS) $(libmirafmttext_a_LIBADD) + $(RANLIB) libmirafmttext.a libmirautil.a: $(libmirautil_a_OBJECTS) $(libmirautil_a_DEPENDENCIES) $(EXTRA_libmirautil_a_DEPENDENCIES) -rm -f libmirautil.a $(libmirautil_a_AR) libmirautil.a $(libmirautil_a_OBJECTS) $(libmirautil_a_LIBADD) @@ -288,6 +297,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dptools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileanddisk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmttext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machineinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ diff -Nru mira-3.9.18/src/util/dptools.H mira-4.0/src/util/dptools.H --- mira-3.9.18/src/util/dptools.H 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/util/dptools.H 2014-02-02 12:05:18.000000000 +0000 @@ -26,11 +26,13 @@ #ifndef _util_dptools_h #define _util_dptools_h -#include -#include +#include +#include #include +#include + #include "stdinc/defines.H" #include "stdinc/stlincludes.H" diff -Nru mira-3.9.18/src/util/fileanddisk.C mira-4.0/src/util/fileanddisk.C --- mira-3.9.18/src/util/fileanddisk.C 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/util/fileanddisk.C 2014-02-02 12:05:18.000000000 +0000 @@ -25,18 +25,12 @@ #include "util/fileanddisk.H" #include "util/misc.H" -// use sleep() -#include - -// use stat (2) -#include -#include - -// for perror (3C), fopen, fclose & fwrite -#include - #include +#ifdef __APPLE__ +#include // for _NSGetExecutablePath +#endif + #include // globWalkPath() uses this @@ -141,6 +135,57 @@ } +/************************************************************************* + * + * + * + *************************************************************************/ + +void findLocationOfSelfBinary(string & location) +{ + location.clear(); + + const char * self=nullptr; + +#ifdef __APPLE__ +//#error "need to implement findLocationOfSelfBinary _NSGetExecutablePath() (man 3 dyld)" + char path[16384]; + uint32 size = static_cast(sizeof(path)); + if (_NSGetExecutablePath(path, &size) == 0){ + self=path; + }else{ + cout << "Uhhh, could not determine binary path because too small buffer??? Need to program workaround with new/free.\n"; + exit(100); + } +#else + const static string selfpse("/proc/self/exe"); // Linux + const static string selfpcf("/proc/curproc/file"); // FreeBSD / DragonFlyBSD if they have /proc + const static string selfpce("/proc/curproc/exe"); // NetBSD + + if(boost::filesystem::exists(selfpse)){ + self=selfpse.c_str(); + }else if(boost::filesystem::exists(selfpcf)){ + self=selfpcf.c_str(); + }else if(boost::filesystem::exists(selfpce)){ + self=selfpce.c_str(); + } + +#endif + + if(self!=nullptr){ + boost::filesystem::path bpath(self); + while(boost::filesystem::is_symlink(bpath)) { + bpath=boost::filesystem::read_symlink(bpath); + } + location=bpath.native(); + }else{ + cout << "Uhhh, could not determine binary path on this OS, needs programming!\n"; + exit(100); + } + + return; +} + /************************************************************************* * @@ -263,7 +308,7 @@ while(!isok){ isok=true; // remove_all should not throw according to docs when error_code is used, - // but does at least for BOOST 1.50 if directory is write protected + // but does at least for BOOST 1.50 (on OSX? Not on Linux) if directory is write protected // so play it safe for all boost::filesystem functions try{ boost::filesystem::remove_all(dirname,ec); @@ -528,14 +573,18 @@ /************************************************************************* * - * example: name stem filetype ziptype - * "foo.bar.gz" "foo" "bar" 2 - * "fo.bar.baz" "fo.bar" "baz" 0 - * "bla.bz2" "bla" "" 3 + * Input: filename + * Output: pathto, stem, filetype, ziptype + * + * example: name pathto stem filetype ziptype + * "foo.bar.gz" "foo" "bar" 2 + * "fo.bar.baz" "fo.bar" "baz" 0 + * "ble/bla.bz2" ble "bla" "" 3 + * "/ble/bla.z" /ble "bla" "" 1 * *************************************************************************/ -void guessFileAndZipType(const std::string & filename, std::string & stem, std::string & filetype, uint8 & ziptype) +void guessFileAndZipType(const std::string & filename, std::string & pathto, std::string & stem, std::string & filetype, uint8 & ziptype) { ziptype=0; filetype.clear(); @@ -563,7 +612,12 @@ filetype=mypath.extension().native().substr(1,mypath.extension().native().size()); } } + pathto=mypath.parent_path().native(); stem=mypath.stem().native(); + // bug in BOOST: filename entries like "tmp/" give "." as stem while an empty entry is expected + if(stem==".") stem.clear(); + + //cout << "gfazt ## fn: " << filename << " pt: " << pathto << " st: " << stem << " ft: " << filetype << " zt: " << static_cast(ziptype) << endl; } @@ -575,12 +629,13 @@ *************************************************************************/ -void getCanonicalFileAndZipType(const std::string & filename, std::string & stem, std::string & filetype, uint8 & ziptype) +void getCanonicalFileAndZipType(const std::string & filename, std::string & pathto, std::string & stem, std::string & filetype, uint8 & ziptype) { - guessFileAndZipType(filename,stem,filetype,ziptype); + guessFileAndZipType(filename,pathto,stem,filetype,ziptype); if(!filetype.empty()){ if(filetype == "fastq" || filetype == "fasta" + || filetype == "fa" || filetype == "fna" || filetype == "caf" || filetype == "maf" @@ -611,7 +666,19 @@ /************************************************************************* * - * returns true if error encountered + * for a given path which may contain directories and/or glob-characters + * with special meaning like ? or * (e.g. "something/some?re/file.*"), + * returns a list of fnft_t (file name/ file type) for every single file + * which matches + * + * expansion: to allow MIRA to load data which does not have a file-type + * postfix (needed e.g. for Galaxy), also parse special double-colon + * format borrowed from EMBOSS: format::path + * E.g.: "fastq.gz::something/some?re/*.dat" + * This allows complete misdirections ("fastq::directory/somefile.fasta"), + * but then this really is a problem of the user. + * + * return: true if error encountered * * appends(!) list of filenames & deduced types to "fnftl" * @@ -622,12 +689,42 @@ *************************************************************************/ #define CEBUG(bla) {cout << bla; cout.flush(); } -bool globWalkPath(const string & dn, list & fnftl) +bool globWalkPath(string dn, list & fnftl) { FUNCSTART("bool globWalkPath(const string & dn, list& fnftl)"); bool hassomeerror=false; + // parse the double-colon part if present + string overridetype; + + { + string tmptype; + auto dnI=dn.cbegin(); + for(; dnI!=dn.cend(); ++dnI){ + if(*dnI==':' && dnI+1!=dn.cend() && *(dnI+1)==':'){ + auto tlen=dnI-dn.cbegin(); + // to be able to use guessFileAndZipType(), we need to prepend a dot to + // the string to be parsed for file types + tmptype=string(".")+dn.substr(0,tlen); + dn=dn.substr(tlen+2,dn.size()-(tlen+2)); + //cout << "### " << dn << " ###" << tmptype << "###\n"; + break; + } + } + if(!tmptype.empty()){ + uint8 ziptype; + string dummypathto; + string dummystem; + getCanonicalFileAndZipType(tmptype,dummypathto,dummystem,overridetype,ziptype); + if(overridetype.empty()){ + tmptype=tmptype.substr(1,999); + MIRANOTIFY(Notify::FATAL,"You tried to explicitely define a file type via " << tmptype << "::" << dn << ", however the type '" << tmptype << "' is not known to MIRA."); + } + //cout << "###" << overridetype << "###\n"; + } + } + // unfortunately, boost::filesystem has no glob and boost no glob-like regex glob_t globpaths; globpaths.gl_offs = 0; @@ -658,8 +755,9 @@ filepaths.push_back(path); } - uint8 ziptype; + uint8 ziptype=0; string filetype; + string dummypathto; string dummystem; fnft_t tmpfnft; for(auto mypath : filepaths){ @@ -671,11 +769,15 @@ CEBUG("Pushing back filename: " << mypath << endl); tmpfnft.fn=mypath.native(); - getCanonicalFileAndZipType(tmpfnft.fn,dummystem,filetype,ziptype); - tmpfnft.ft=filetype; + if(overridetype.empty()){ + getCanonicalFileAndZipType(tmpfnft.fn,dummypathto,dummystem,filetype,ziptype); + tmpfnft.ft=filetype; + }else{ + tmpfnft.ft=overridetype; + } fnftl.push_back(tmpfnft); - if(filetype.empty()){ + if(tmpfnft.ft.empty()){ cout << "Could not determine filetype from data '" << dn << "' (" << mypath << ")\n"; hassomeerror=true; }else if(ziptype>0 && filetype!="fastq"){ diff -Nru mira-3.9.18/src/util/fileanddisk.H mira-4.0/src/util/fileanddisk.H --- mira-3.9.18/src/util/fileanddisk.H 2013-07-01 18:31:04.000000000 +0000 +++ mira-4.0/src/util/fileanddisk.H 2014-02-02 12:05:18.000000000 +0000 @@ -72,6 +72,8 @@ std::string & path, std::string & filename ); +void findLocationOfSelfBinary(std::string & result); + uint64 countLinesInFile(const std::string & filename); void dumpFile(const char * fname, std::ostream & ostr); @@ -89,10 +91,12 @@ bool openFileForAppend(const std::string & filename, std::ofstream & fout, bool deleteanyway); void guessFileAndZipType(const std::string & filename, + std::string & pathto, std::string & stem, std::string & filetype, uint8 & ziptype); void getCanonicalFileAndZipType(const std::string & filename, + std::string & pathto, std::string & stem, std::string & filetype, uint8 & ziptype); @@ -103,7 +107,7 @@ std::string fn; // filename std::string ft; // filetype }; -bool globWalkPath(const std::string & dn, std::list & fnftl); +bool globWalkPath(std::string dn, std::list & fnftl); int checkForNFSMountOnDirectory(const std::string & dir, bool verbose); diff -Nru mira-3.9.18/src/util/fmttext.C mira-4.0/src/util/fmttext.C --- mira-3.9.18/src/util/fmttext.C 1970-01-01 00:00:00.000000000 +0000 +++ mira-4.0/src/util/fmttext.C 2014-02-02 12:05:18.000000000 +0000 @@ -0,0 +1,115 @@ +/* + * Written by Bastien Chevreux (BaCh) + * + * Copyright (C) 2003 and later by Bastien Chevreux + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + + +#include "util/fmttext.H" + +using namespace std; + +namespace FmtText +{ + string wordWrap(const char * intxt, uint32_t llen) + { + string result; + if(intxt!=nullptr){ + uint32_t colcount=0; + bool addinsert=false; + string word; + while(true){ + word.clear(); + // blanks at beginning of line are taken verbatim + // tabs are converted to 8 blanks + if(colcount==0){ + for(; *intxt!=0; ++intxt){ + if(*intxt==' '){ + word+=*intxt; + }else if(*intxt=='\t'){ + word+=" "; + }else{ + break; + } + } + }else{ + // munch blanks + for(; *intxt!=0 && (*intxt==' ' || *intxt=='\t'); ++intxt); + } + // build word + for(; *intxt!=0 && *intxt!=' ' && *intxt!='\t' && *intxt!='\n'; ++intxt) word+=*intxt; + if(colcount==0 && word=="-"){ + addinsert=true; + llen-=2; + } + if(colcount>0 && !word.empty() && colcount+word.size()+1 > llen){ + result+='\n'; + colcount=0; + if(addinsert) result+=" "; + } + if(colcount>0) { + result+=' '; + ++colcount; + } + colcount+=static_cast(word.size()); + result+=word; + if(*intxt=='\n'){ + result+='\n'; + colcount=0; + if(addinsert){ + addinsert=false; + llen+=2; + } + } + if(*intxt==0) break; + ++intxt; + } + } + return result; + } + + string makeTextSign(const char * intxt, uint32_t llen) + { + string result; + auto wrapped=wordWrap(intxt,llen-4); + if(!wrapped.empty() && wrapped.back()!='\n') wrapped+='\n'; + for(uint32_t xi=0; xi +#include + +namespace FmtText +{ + std::string wordWrap(const char * intxt, uint32_t llen); + inline std::string wordWrap(const std::string & intxt, uint32_t llen) { return wordWrap(intxt.c_str(),llen);} + inline std::string wordWrap(const std::ostringstream & intxt, uint32_t llen) { return wordWrap(intxt.str().c_str(),llen);} + + std::string makeTextSign(const char * intxt, uint32_t llen); + inline std::string makeTextSign(const std::string & intxt, uint32_t llen) { return makeTextSign(intxt.c_str(),llen);} + inline std::string makeTextSign(const std::ostringstream & intxt, uint32_t llen) { return makeTextSign(intxt.str().c_str(),llen);} +} + +#endif diff -Nru mira-3.9.18/src/util/misc.C mira-4.0/src/util/misc.C --- mira-3.9.18/src/util/misc.C 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/util/misc.C 2014-02-02 12:05:18.000000000 +0000 @@ -32,14 +32,11 @@ #include // time() in dateStamp -#include - - -//#include +#include #include - +#include #include "errorhandling/errorhandling.H" diff -Nru mira-3.9.18/src/version.H mira-4.0/src/version.H --- mira-3.9.18/src/version.H 2013-07-01 18:41:07.000000000 +0000 +++ mira-4.0/src/version.H 2014-02-02 17:08:32.000000000 +0000 @@ -3,16 +3,16 @@ #ifdef PUBLICQUIET #define MLV_QUIET #else -#define MLV_QUIET "debugmsg " +#define MLV_QUIET "(debugmsg) " #endif #ifdef TIMERESTRICTED -#define MLV_TIME "time restricted " +#define MLV_TIME "(time restricted) " #else #define MLV_TIME #endif -#define GITBUILD "3.9.18_0+g60dcc76" +#define GITBUILD "4.0_0+gea25053" #define MIRALIBVERSION GITBUILD -#define MIRAVERSION MIRALIBVERSION " (" MLV_QUIET MLV_TIME")" +#define MIRAVERSION MIRALIBVERSION " " MLV_QUIET MLV_TIME"" diff -Nru mira-3.9.18/src/version.stub mira-4.0/src/version.stub --- mira-3.9.18/src/version.stub 2013-05-24 19:52:22.000000000 +0000 +++ mira-4.0/src/version.stub 2014-02-02 12:05:18.000000000 +0000 @@ -3,11 +3,11 @@ #ifdef PUBLICQUIET #define MLV_QUIET #else -#define MLV_QUIET "debugmsg " +#define MLV_QUIET "(debugmsg) " #endif #ifdef TIMERESTRICTED -#define MLV_TIME "time restricted " +#define MLV_TIME "(time restricted) " #else #define MLV_TIME #endif