[med-svn] [seer] 10/13: Imported Upstream version 1.1.0

Andreas Tille tille at debian.org
Thu Apr 14 09:49:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository seer.

commit e7649c6c0cd13c18a322aafbc25793e1f7427089
Author: Andreas Tille <tille at debian.org>
Date:   Thu Apr 14 11:46:56 2016 +0200

    Imported Upstream version 1.1.0
---
 .gitignore                                    |   45 +
 .gitmodules                                   |    3 +
 LICENSE                                       |  340 +++
 Makefile                                      |   19 +
 README.md                                     |   91 +
 debian/README.Debian                          |   12 -
 debian/changelog                              |   11 -
 debian/compat                                 |    1 -
 debian/control                                |   38 -
 debian/copyright                              |   26 -
 debian/examples                               |    1 -
 debian/manpages                               |    1 -
 debian/mans/blast_top_hits.1                  |   28 -
 debian/mans/combineKmers.1                    |   26 -
 debian/mans/filter_seer.1                     |   41 -
 debian/mans/kmds.1                            |   74 -
 debian/mans/map_back.1                        |   26 -
 debian/mans/seer.1                            |   75 -
 debian/patches/fix_lib_location.patch         |   20 -
 debian/patches/hardening.patch                |   39 -
 debian/patches/pthread_versus_hardening.patch |   20 -
 debian/patches/series                         |    3 -
 debian/rules                                  |   21 -
 debian/source/format                          |    1 -
 debian/upstream/metadata                      |    8 -
 debian/watch                                  |    3 -
 example_wrapper.py                            |  185 ++
 scripts/blast_top_hits.pl                     |  130 ++
 src/Makefile                                  |   84 +
 src/combineCmdLine.cpp                        |   63 +
 src/combineInit.cpp                           |   47 +
 src/combineKmers.cpp                          |  104 +
 src/combineKmers.hpp                          |   25 +
 src/covar.cpp                                 |   28 +
 src/covar.hpp                                 |   27 +
 src/fasta.cpp                                 |  113 +
 src/fasta.hpp                                 |   42 +
 src/filterCmdLine.cpp                         |  160 ++
 src/filter_seer.cpp                           |  148 ++
 src/filter_seer.hpp                           |   34 +
 src/kmds.hpp                                  |   39 +
 src/kmdsCmdLine.cpp                           |   95 +
 src/kmdsMain.cpp                              |  264 +++
 src/kmdsStruct.cpp                            |  161 ++
 src/kmer.cpp                                  |  149 ++
 src/kmer.hpp                                  |   55 +
 src/linearFunction.cpp                        |   39 +
 src/linkFunction.hpp                          |   72 +
 src/logitFunction.cpp                         |   76 +
 src/mapCmdLine.cpp                            |   67 +
 src/mapMain.cpp                               |  157 ++
 src/map_back.hpp                              |   43 +
 src/sample.cpp                                |   44 +
 src/sample.hpp                                |   31 +
 src/seer.hpp                                  |   45 +
 src/seerBinaryAssoc.cpp                       |  199 ++
 src/seerChiFilter.cpp                         |  127 +
 src/seerCmdLine.cpp                           |  102 +
 src/seerCommon.cpp                            |  243 ++
 src/seerContinuousAssoc.cpp                   |  100 +
 src/seerErr.cpp                               |   14 +
 src/seerFilter.cpp                            |   82 +
 src/seerIO.cpp                                |  317 +++
 src/seerMain.cpp                              |  209 ++
 src/seercommon.hpp                            |  117 +
 src/significant_kmer.cpp                      |  133 ++
 src/significant_kmer.hpp                      |   73 +
 test/Makefile                                 |   10 +
 test/example.pheno                            | 3069 +++++++++++++++++++++++++
 test/example_kmers.gz                         |  Bin 0 -> 63488 bytes
 test/generate_test.pl                         |   49 +
 test/subset.pheno                             |  200 ++
 72 files changed, 8069 insertions(+), 475 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb54d6c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,45 @@
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+seer
+kmds
+map_back
+combineKmers
+filter_seer
+
+# Editors
+.vimrc
+.lvimrc
+.ycm_extra_conf.py*
+
+# Submodules
+armadillo-4.*
+armadillo-5.*
+mlpack-1.0.*
+boost_1_*
+gzstream
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..8c53a00
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "dlib"]
+	path = dlib
+	url = git at github.com:davisking/dlib.git
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d6a9326
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,340 @@
+GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    {description}
+    Copyright (C) {year}  {fullname}
+
+    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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  {signature of Ty Coon}, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..611137e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+export PREFIX=${HOME}/software
+export BINDIR=$(PREFIX)/bin
+
+all:
+	cd src && $(MAKE) all
+	cd test && $(MAKE) all
+
+clean:
+	cd src && $(MAKE) clean
+	cd test && $(MAKE) clean
+
+install: all
+	cd src && $(MAKE) install
+
+test: all
+	cd test && $(MAKE) test
+
+.PHONY: all clean install test
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..67f2442
--- /dev/null
+++ b/README.md
@@ -0,0 +1,91 @@
+# seer
+Sequence element enrichment analysis. This document contains
+installation instuctions. Usage can be found on the [wiki](https://github.com/johnlees/seer/wiki/Usage)
+
+Installation
+==============
+First clone the repository
+
+    git clone --recursive https://github.com/johnlees/seer    
+
+If you already have dlib:
+
+    git clone https://github.com/johnlees/seer
+
+Currently tested on Linux only, installation should proceed as
+
+    make
+    make install
+
+Dependencies
+--------------
+seer currently depends on
+
+- gzstream <http://www.cs.unc.edu/Research/compgeom/gzstream/>
+- armadillo <http://arma.sourceforge.net/>
+- boost <http://www.boost.org/>
+- dlib <http://www.dlib.net/>
+- HDF5 <https://www.hdfgroup.org/HDF5/>
+
+You will also require
+
+- gcc >4.9 or equivalent
+- gcc libstdc++ >4.9
+
+You probably already have boost, HDF5 and dlib (as long as you did clone --recursive).
+
+###Brief installation instructions
+
+**gzstream**
+
+Download and unpack to a folder gzstream in the root of the repository. Change into the directory and type
+
+    make
+
+**armadillo**
+
+Download and unpack. Change into directory and type
+
+    cmake .
+    make
+    make install
+
+**boost**
+
+Best installed with your distribution's package manager, and you should use the c++11 version if possible.
+
+For a manual installation, see <http://www.boost.org/doc/libs/1_57_0/more/getting_started/unix-variants.html> for details on how to use ./b2 to install. I reccommend that you create a user-config.jam file in the boost root which modifies the gcc compilation:
+
+    using gcc:
+      : std11
+      : g++
+      : <cxxflags>-std=c++11
+
+Then run
+
+    ./bootstrap.sh
+    ./b2 install toolset=gcc-std11
+
+
+**dlib**
+
+If not installed use the above git clone command to include with the
+repository. Otherwise unpack header files to $(PREFIX)/include
+
+**HDF5**
+
+Best installed with your distribution's package manager. Otherwise use
+a binary from <https://www.hdfgroup.org/HDF5/release/obtain5.html>, or
+if you wish to compile from source
+
+    gunzip < hdf5-X.Y.Z.tar.gz | tar xf -
+    cd hdf5-X.Y.Z
+    ./configure --prefix=/usr/local/hdf5 <more configure_flags>
+    make
+    make check
+    make install
+    make check-install
+
+Usage, interpretation of results, and troubleshooting
+=============
+See the [wiki](https://github.com/johnlees/seer/wiki/Usage)
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 144dcff..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,12 +0,0 @@
-seer for Debian
-===============
-
-For more detailed documentation please see the seer Wiki page:
-
-    https://github.com/johnlees/seer/wiki/Usage
-
-There is also an example wrapper script in
-
-    examples/example_wrapper.py
-
- -- Andreas Tille <tille at debian.org>  Tue, 29 Mar 2016 19:32:29 +0200
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index bd6789a..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,11 +0,0 @@
-seer (1.1.0-2) UNRELEASED; urgency=medium
-
-  * Suggests: fsm-lite
-
- -- Andreas Tille <tille at debian.org>  Tue, 12 Apr 2016 10:52:38 +0200
-
-seer (1.1.0-1) unstable; urgency=medium
-
-  * Initial release (Closes: #819674)
-
- -- Andreas Tille <tille at debian.org>  Thu, 31 Mar 2016 22:35:05 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 0de04bc..0000000
--- a/debian/control
+++ /dev/null
@@ -1,38 +0,0 @@
-Source: seer
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
-Section: science
-Priority: optional
-Build-Depends: debhelper (>= 9),
-               libarmadillo-dev,
-               libdlib-dev,
-               libhdf5-dev,
-#              libhdf5-mpi-dev,
-               libgzstream-dev,
-               libboost-dev,
-               libboost-program-options-dev
-Standards-Version: 3.9.7
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/seer/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/seer/trunk/
-Homepage: https://github.com/johnlees/seer
-
-Package: seer
-Architecture: any
-Depends: ${shlibs:Depends},
-         ${misc:Depends},
-         libtext-csv-perl
-Suggests: fsm-lite
-Description: genomic sequence element (kmer) enrichment analysis
- Bacterial genomes vary extensively in terms of both gene content and
- gene sequence - this plasticity hampers the use of traditional SNP-based
- methods for identifying all genetic associations with phenotypic
- variation. SEER provides a computationally scalable and widely
- applicable statistical method for the identification of sequence
- elements that are significantly enriched in a phenotype of interest.
- SEER is applicable to even tens of thousands of genomes by counting variable-
- length k-mers using a distributed string-mining algorithm. Robust
- options are provided for association analysis that also correct for the
- clonal population structure of bacteria. Using large collections of
- genomes of the major human pathogen Streptococcus pneumoniae, SEER
- identifies relevant previously characterised resistance determinants for
- several antibiotics.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 1c56362..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,26 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Contact: John Lees <john at johnlees.me>
-Upstream-Name: seer
-Source: https://github.com/johnlees/seer/releases
-
-Files: *
-Copyright: 2015-2016 John Lees <john at johnlees.me>
-License: GPL-2+
-
-Files: debian/*
-Copyright: 2016 Andreas Tille <tille at debian.org>
-License: GPL-2+
-
-License: GPL-2+
-    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.
- .
- On Debian systems you can find a copy of the GNU General Public License
- version 2 or later at /usr/share/common-licenses/GPL-2.
diff --git a/debian/examples b/debian/examples
deleted file mode 100644
index 436566d..0000000
--- a/debian/examples
+++ /dev/null
@@ -1 +0,0 @@
-example_wrapper.py
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index 4f4649b..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/mans/*.1
diff --git a/debian/mans/blast_top_hits.1 b/debian/mans/blast_top_hits.1
deleted file mode 100644
index 15ce157..0000000
--- a/debian/mans/blast_top_hits.1
+++ /dev/null
@@ -1,28 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH BLAST_TOP_HITS "1" "March 2016" "blast_top_hits 1.1.0" "User Commands"
-.SH NAME
-blast_top_hits \- reduces a blast or blat output file to the top hit for each query sequence only
-.SH SYNOPSIS
-.B blast_top_hits.pl
-\fI\,--input blast_out --mode blast <options>\/\fR
-.SH DESCRIPTION
-Reduces a blast or blat output file to the top hit for each query sequence only.
-.P
-This program belongs to seer(1) (Sequence Element (kmer) Enrichment Analysis).
-.SH OPTIONS
-.SS Required
-.TP
-\fB\-\-input\fR
-BLAST output file in \fB\-m\fR 6/\-outfmt 6 or BLAT .psl file
-.TP
-\fB\-\-mode\fR
-Either blast or blat
-.SS Optional
-.TP
-\fB\-\-full_query\fR
-The entire query must be reported as a match to appear in the output
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Shows this help.
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/mans/combineKmers.1 b/debian/mans/combineKmers.1
deleted file mode 100644
index 51aaa5a..0000000
--- a/debian/mans/combineKmers.1
+++ /dev/null
@@ -1,26 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH COMBINEKMERS "1" "March 2016" "combineKmers 1.1.0" "User Commands"
-.SH NAME
-combineKmers \- basic algorithm to combine kmer counts across samples
-.P
-This program belongs to seer(1) (Sequence Element (kmer) Enrichment Analysis).
-.SH DESCRIPTION
-Basic algorithm to combine kmer counts across samples
-.SH OPTIONS
-.SS "Required options:"
-.TP
-\fB\-r\fR [ \fB\-\-samples\fR ] arg
-file with tab separated sample name and kmer file
-.TP
-\fB\-o\fR [ \fB\-\-output\fR ] arg
-output file prefix
-.SS "Other options:"
-.TP
-\fB\-\-min_samples\fR arg (=1)
-minimum number of samples kmer must occur in to be
-printed
-.TP
-\fB\-h\fR [ \fB\-\-help\fR ]
-full help message
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/mans/filter_seer.1 b/debian/mans/filter_seer.1
deleted file mode 100644
index f0c272b..0000000
--- a/debian/mans/filter_seer.1
+++ /dev/null
@@ -1,41 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH FILTER_SEER "1" "March 2016" "filter_seer 1.1.0" "User Commands"
-.SH NAME
-filter_seer \- post filtering of significant kmers
-.SH DESCRIPTION
-Post filtering of significant kmers.
-.P
-This program belongs to seer(1) (Sequence Element (kmer) Enrichment Analysis).
-.SH OPTIONS
-.SS "Required options:"
-.TP
-\fB\-k\fR [ \fB\-\-kmers\fR ] arg
-file of output from seer
-.SS "Filtering options:"
-.TP
-\fB\-\-chisq\fR arg
-minimum unadjusted p\-value to output
-.TP
-\fB\-\-pval\fR arg
-minimum adjusted p\-value to output
-.TP
-\fB\-\-maf\fR arg
-minimum maf/max 1\-maf to output
-.TP
-\fB\-\-beta\fR arg
-minimum |beta| to output
-.TP
-\fB\-\-substr\fR
-remove smaller kmers completely represented elsewhere
-.TP
-\fB\-\-pos_beta\fR
-output positive effect sizes only
-.SS "Other options:"
-.TP
-\fB\-s\fR [ \fB\-\-sort\fR ] arg
-field to sort on: chisq, pval, maf or beta
-.TP
-\fB\-h\fR [ \fB\-\-help\fR ]
-full help message
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/mans/kmds.1 b/debian/mans/kmds.1
deleted file mode 100644
index c02e1c9..0000000
--- a/debian/mans/kmds.1
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH KMDS "1" "March 2016" "kmds 1.1.0" "User Commands"
-.SH NAME
-kmds \- control for population structure
-.SH DESCRIPTION
-Control for population structure.  Filter kmers and create a matrix representing population structure.
-.P
-This program belongs to seer(1) (Sequence Element (kmer) Enrichment Analysis).
-.SH OPTIONS
-1) filter and subsample with \fB\-\-no_mds\fR and \fB\-\-size\fR
-.P
-2) combine, and do metric multidimensional scaling with \fB\-\-combine_mds\fR
-.SS "Required options:"
-.TP
-\fB\-k\fR [ \fB\-\-kmers\fR ] arg
-dsm kmer output file
-.TP
-\fB\-p\fR [ \fB\-\-pheno\fR ] arg
-\&.pheno metadata
-.SS "MDS options:"
-.TP
-\fB\-o\fR [ \fB\-\-output\fR ] arg
-output prefix for new dsm file
-.TP
-\fB\-\-no_mds\fR
-do not perform MDS; output subsampled matrix instead
-.TP
-\fB\-\-write_distances\fR
-write csv of distance matrix
-.TP
-\fB\-\-mds_concat\fR arg
-list of subsampled matrices to use in MDS. Performs
-only MDS; implies \fB\-\-no_filtering\fR
-.TP
-\fB\-\-pc\fR arg (=3)
-number of principal coordinates to output
-.TP
-\fB\-\-size\fR arg (=1000000)
-number of kmers to use in MDS
-.TP
-\fB\-\-threads\fR arg (=1)
-number of threads. Suggested: 4
-.SS "Filtering options:"
-.TP
-\fB\-\-no_filtering\fR
-turn off all filtering and do not output new kmer
-file
-.TP
-\fB\-\-max_length\fR arg (=100)
-maximum kmer length
-.TP
-\fB\-\-maf\fR arg (=0.01)
-minimum kmer frequency
-.TP
-\fB\-\-min_words\fR arg
-minimum kmer occurrences. Overrides \fB\-\-maf\fR
-.TP
-\fB\-\-chisq\fR arg (=10e\-5)
-p\-value threshold for initial chi squared test. Set
-to 1 to show all
-.SS "Other options:"
-.TP
-\fB\-h\fR [ \fB\-\-help\fR ]
-full help message
-.SH EXAMPLE
-Filter kmers and create a matrix representing population structure with kmds
-.IP
-kmds -k dsm_input.txt.gz --pheno metadata.pheno -o filtered
-.P
-To spread this process out, run the following command on each dsm file
-.IP
-kmds -k dsm_input.txt.gz --pheno metadata.pheno --no_mds --size 10000
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/mans/map_back.1 b/debian/mans/map_back.1
deleted file mode 100644
index ca1c85a..0000000
--- a/debian/mans/map_back.1
+++ /dev/null
@@ -1,26 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH MAP_BACK "1" "March 2016" "map_back 1.1.0" "User Commands"
-.SH NAME
-map_back \- context of significant kmers
-.SH DESCRIPTION
-Context of significant kmers.
-.P
-This program belongs to seer(1) (Sequence Element (kmer) Enrichment Analysis).
-.SH OPTIONS
-.SS "Required options:"
-.TP
-\fB\-k\fR [ \fB\-\-kmers\fR ] arg
-seer kmer output file
-.TP
-\fB\-r\fR [ \fB\-\-references\fR ] arg
-file with tab separated reference name and fasta
-file
-.SS "Other options:"
-.TP
-\fB\-\-threads\fR arg (=1)
-number of threads. Suggested: 4
-.TP
-\fB\-h\fR [ \fB\-\-help\fR ]
-full help message
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/mans/seer.1 b/debian/mans/seer.1
deleted file mode 100644
index 888a132..0000000
--- a/debian/mans/seer.1
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
-.TH SEER "1" "March 2016" "seer 1.1.0" "User Commands"
-.SH NAME
-seer \- sequence element enrichment analysis
-.SH DESCRIPTION
-Sequence Element Enrichment Analysis
-.P
-The .pheno file format is tab separated, two columns with sample name, one with phenotype. Phenotypes of only 0 or 1 will be treated as binary, any other value and the phenotype will be treated as quantitative. Therefore for missing phenotype values the sample should simply be excluded from this file.
-.SH OPTIONS
-.SS "Required options:"
-.TP
-\fB\-k\fR [ \fB\-\-kmers\fR ] arg
-dsm kmer output file
-.TP
-\fB\-p\fR [ \fB\-\-pheno\fR ] arg
-\&.pheno metadata
-.SS "Covariate options:"
-.TP
-\fB\-\-struct\fR arg
-mds values from kmds
-.TP
-\fB\-\-covar_file\fR arg
-file containing covariates
-.TP
-\fB\-\-covar_list\fR arg
-list of columns covariates to use. Format is 1,2q,3
-(use q for quantitative)
-.SS "Performance options:"
-.TP
-\fB\-\-threads\fR arg (=1)
-number of threads. Suggested: 4
-.SS "Filtering options:"
-.TP
-\fB\-\-no_filtering\fR
-turn off all filtering and peform tests on all kmers
-input
-.TP
-\fB\-\-max_length\fR arg (=100)
-maximum kmer length
-.TP
-\fB\-\-maf\fR arg (=0.01)
-minimum kmer frequency
-.TP
-\fB\-\-min_words\fR arg
-minimum kmer occurrences. Overrides \fB\-\-maf\fR
-.TP
-\fB\-\-positive_only\fR
-only test words with a predicted positive effect
-direction
-.TP
-\fB\-\-chisq\fR arg (=10e\-5)
-p\-value threshold for initial chi squared test. Set
-to 1 to show all
-.TP
-\fB\-\-pval\fR arg (=10e\-8)
-p\-value threshold for final logistic test. Set to 1
-to show all
-.SS "Other options:"
-.TP
-\fB\-\-print_samples\fR
-print lists of samples significant kmers were found
-in
-.TP
-\fB\-h\fR [ \fB\-\-help\fR ]
-full help message
-.SH EXAMPLES
-Basic usage:
-.IP
-seer -k dsm_input.txt.gz --pheno metadata.pheno > significant_kmers.txt
-.P
-To use the kmds output, increase execution speed and give the most complete output
-.IP
-seer -k filtered.gz --pheno metadata.pheno --struct filtered.dsm --threads 4 --print_samples
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/patches/fix_lib_location.patch b/debian/patches/fix_lib_location.patch
deleted file mode 100644
index e27b273..0000000
--- a/debian/patches/fix_lib_location.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 29 Mar 2016 19:32:29 +0200
-Description: Remove non-existing library pathes
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -11,10 +11,10 @@ BINDIR=$(PREFIX)/bin
- #COMBINE_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lgzstream -lz -lboost_program_options
- #FILTER_LDLIBS=-L$(PREFIX)/lib -lboost_program_options -mkl
- # gcc
--CXXFLAGS=-Wall -O3 -std=c++11
--SEER_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas
-+CXXFLAGS+=-Wall -O3 -std=c++11
-+SEER_LDLIBS=-lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas $(LDFLAGS)
- MAP_LDLIBS=-L$(PREFIX)/lib -lboost_program_options
--COMBINE_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lgzstream -lz -lboost_program_options
-+COMBINE_LDLIBS=-lgzstream -lz -lboost_program_options
- FILTER_LDLIBS=-L$(PREFIX)/lib -lboost_program_options
- 
- CPPFLAGS=-I$(PREFIX)/include -I../gzstream -I../dlib -D DLIB_NO_GUI_SUPPORT=1 -D DLIB_USE_BLAS=1 -D DLIB_USE_LAPACK=1
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
deleted file mode 100644
index a667367..0000000
--- a/debian/patches/hardening.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 29 Mar 2016 19:32:29 +0200
-Description: Propagate hardening options
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -13,11 +13,11 @@ BINDIR=$(PREFIX)/bin
- # gcc
- CXXFLAGS+=-Wall -O3 -std=c++11
- SEER_LDLIBS=-lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas $(LDFLAGS)
--MAP_LDLIBS=-L$(PREFIX)/lib -lboost_program_options
--COMBINE_LDLIBS=-lgzstream -lz -lboost_program_options
--FILTER_LDLIBS=-L$(PREFIX)/lib -lboost_program_options
-+MAP_LDLIBS=-lboost_program_options $(LDFLAGS)
-+COMBINE_LDLIBS=-lgzstream -lz -lboost_program_options $(LDFLAGS)
-+FILTER_LDLIBS=-lboost_program_options $(LDFLAGS)
- 
--CPPFLAGS=-I$(PREFIX)/include -I../gzstream -I../dlib -D DLIB_NO_GUI_SUPPORT=1 -D DLIB_USE_BLAS=1 -D DLIB_USE_LAPACK=1
-+CPPFLAGS+=-I$(PREFIX)/include -I../gzstream -I../dlib -D DLIB_NO_GUI_SUPPORT=1 -D DLIB_USE_BLAS=1 -D DLIB_USE_LAPACK=1
- 
- # For static linking. To use type 'make static'
- # Requires icpc and mkl
-@@ -56,13 +56,13 @@ kmds: $(KMDS_OBJECTS)
- 	$(LINK.cpp) $^ $(SEER_LDLIBS) -o $@
- 
- map_back: $(MAP_OBJECTS)
--	$(LINK.cpp) $^ $(MAP_LDLIBS) -o $@
-+	$(LINK.cpp) $^ $(MAP_LDLIBS) $(LDFLAGS) -o $@
- 
- combineKmers: $(COMBINE_OBJECTS)
--	$(LINK.cpp) $^ $(COMBINE_LDLIBS) -o $@
-+	$(LINK.cpp) $^ $(COMBINE_LDLIBS) $(LDFLAGS) -o $@
- 
- filter_seer: $(FILTER_OBJECTS)
--	$(LINK.cpp) $^ $(FILTER_LDLIBS) -o $@
-+	$(LINK.cpp) $^ $(FILTER_LDLIBS) $(LDFLAGS) -o $@
- 
- seer_static: $(SEER_OBJECTS)
- 	$(LINK.cpp) $^ $(SEER_STATIC_LDLIBS) -o $@
diff --git a/debian/patches/pthread_versus_hardening.patch b/debian/patches/pthread_versus_hardening.patch
deleted file mode 100644
index e0864a4..0000000
--- a/debian/patches/pthread_versus_hardening.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 29 Mar 2016 19:32:29 +0200
-Description: Set -pthread inside Makefile
- When doing this in debian/rules via
-   export LDFLAGS := -pthread $(LDFLAGS)
- the hardening options are overriden
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -12,8 +12,8 @@ BINDIR=$(PREFIX)/bin
- #FILTER_LDLIBS=-L$(PREFIX)/lib -lboost_program_options -mkl
- # gcc
- CXXFLAGS+=-Wall -O3 -std=c++11
--SEER_LDLIBS=-lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas $(LDFLAGS)
--MAP_LDLIBS=-lboost_program_options $(LDFLAGS)
-+SEER_LDLIBS=-lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas -pthread $(LDFLAGS)
-+MAP_LDLIBS=-lboost_program_options -pthread $(LDFLAGS)
- COMBINE_LDLIBS=-lgzstream -lz -lboost_program_options $(LDFLAGS)
- FILTER_LDLIBS=-lboost_program_options $(LDFLAGS)
- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9762ec0..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-fix_lib_location.patch
-hardening.patch
-pthread_versus_hardening.patch
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 46ddc59..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/make -f
-
-# DH_VERBOSE := 1
-DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-
-include /usr/share/dpkg/architecture.mk
-export CPATH := /usr/include/hdf5/serial
-export LIBRARY_PATH := /usr/lib/$(DEB_TARGET_MULTIARCH)/hdf5/serial
-
-## The following destroys hardening flags.
-##  --> see debian/patches/pthread_versus_hardening.patch
-##export LDFLAGS := -pthread $(LDFLAGS)
-
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-override_dh_auto_install:
-	dh_auto_install -- PREFIX=$(CURDIR)/debian/$(DEBPKGNAME)/usr
-	cp -a scripts/blast_top_hits.pl $(CURDIR)/debian/$(DEBPKGNAME)/usr/bin/blast_top_hits
-
-%:
-	dh $@
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
deleted file mode 100644
index 848f276..0000000
--- a/debian/upstream/metadata
+++ /dev/null
@@ -1,8 +0,0 @@
-Reference:
-  Author: John A Lees and Minna Vehkala and Niko Välimäki and Simon R Harris and Claire Chewapreecha and Nicholas J Croucher and Pekka Marttinen and Mark R Davies and Andrew C Steer and Stephen Y C Tong and Antti Honkela and Julian Parkhill and Stephen D Bentley and Jukka Corander
-  Title: Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes
-  Journal: bioRxiv
-  Year: 2016
-  DOI: 10.1101/038463 
-  URL: http://biorxiv.org/content/biorxiv/early/2016/03/02/038463
-  eprint: http://biorxiv.org/content/biorxiv/early/2016/03/02/038463.full.pdf
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 01bbc15..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=3
-
-https://github.com/johnlees/seer/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
diff --git a/example_wrapper.py b/example_wrapper.py
new file mode 100755
index 0000000..59f72ec
--- /dev/null
+++ b/example_wrapper.py
@@ -0,0 +1,185 @@
+#!/usr/bin/env python
+
+#
+# This is an example of a wrapper script for the whole seer analysis pipeline,
+# based on having a cluster with LSF
+#
+
+# imports
+import os,sys
+from __future__ import print_function
+import re
+import argparse
+import subprocess
+
+# globals
+subsampled_list = "kmds_tmp_files.txt"
+job_num = re.compile('^Job <(\d+)>')
+
+# subroutines
+
+# Checks, for a list of job numbers, whether they are all done (or failed)
+def check_done(jobs):
+    done = 1
+    for job in jobs:
+        bsub_ret = subprocess.check_call("bjobs -a -noheader -o \"stat exit_code delimiter=','\" " + str(job), shell=True)
+
+        status = bsub_ret.split(",")
+        if bsub_ret[1] == "RUN" | bsub_ret[1] == "PEND" | bsub_ret[1] == "WAIT":
+            done = 0
+            break
+
+    return done
+
+# Command line arguments
+parser = argparse.ArgumentParser()
+parser.add_argument("infile", help="A file containing a list of dsm output files")
+parser.add_argument("pheno", help=".pheno file containing metadata")
+parser.add_argument("-o", "--out_prefix", help="Prefix for output files",default="seer")
+parser.add_argument("-t", "--threads", help="Threads to use",type=int,default=4)
+parser.add_argument("--LSF", help="Submit over LSF",action="store_true",default=False)
+parser.add_argument("--pcs", help="Number of principal coordinates to use in population structure",type=int,default=3)
+parser.add_argument("--subsample", help="Proportion of total kmers to use in mds calculation",type=float,default=0.001)
+parser.add_argument("--maf", help="Minimum minor allele frequency",type=float,default=0.01)
+parser.add_argument("--chisq",help="Chi^2 filter cutoff",type=float,default=10e-5)
+parser.add_argument("--pval", help="pvalue cutoff",type=float,default=10e-8)
+parser.add_argument("--assemble", help="assemble significant kmers, and perform association",action="store_true",default=False)
+parser.add_argument("--reference", help="map kmers back to this reference file")
+parser.add_argument("--drafts", help="file of annotated draft assemblies to map kmers back to")
+args = parser.parse_args()
+
+# Read in dsm files
+if not (os.path.isfile(args.infile) & os.path.isfile(args.pheno)):
+    raise Exception("Mandatory input files do not exist")
+
+with open(args.infile,'r') as f:
+    dsm_files = f.readlines()
+
+dsm_files = [x.strip('\n') for x in dsm_files]
+
+# Run kmds --no_mds on each file in parallel
+# Collect output
+print("Filtering " + str(len(dsm_files)) + " files\n")
+i = 0
+subsampled_output = []
+jobs = []
+
+for dsm in dsm_files:
+    i += 1
+
+    length = args.subsample * int(subprocess.check_output("gzip -d -c " + dsm + " | wc -l", shell=True))
+    try:
+        kmds_command = ""
+        if args.LSF:
+            kmds_command = "bsub -o kmds.step1.%J." + str(i) + ".o -e kmds.step1.%J." + str(i) + ".e "
+
+        kmds_command += "kmds -k " + str(dsm) + " -p " + str(args.pheno) + " -o kmds.step1." + str(i) + " --no_mds --maf " + str(args.maf) + " --chisq " + str(args.chi2) + " --size " + str(length)
+
+        print(kmds_command)
+
+        if args.LSF:
+            job_return = subprocess.check_output(kmds_command, shell=True)
+            m = job_num.match(job_return)
+
+            jobs.append(m.group())
+        else:
+            retcode = subprocess.call(kmds_command, shell=True)
+            if retcode < 0:
+                print("kmds step 1 file " + str(i) + " failed with ", -retcode, file=sys.stderr)
+
+        subsampled_output.append("kmds.step1." + str(i))
+    except OSError as e:
+        print("Execution failed:", e, file=sys.stderr)
+
+# Check all jobs have finished
+if args.LSF:
+    while not (check_done(jobs)):
+        os.sleep(30)
+    jobs = []
+
+write_list = open(subsampled_list,'w')
+for subsample in subsampled_output:
+    write_list.write(subsample + "\n")
+
+write_list.close()
+
+# Run kmds --mds_concat on output
+print("Calculating MDS components\n")
+try:
+    kmds_command = ""
+    if args.LSF:
+        kmds_command = "bsub -o kmds.step2.%J.o -e kmds.step2.%J..e -n" + str(args.threads) + " -R \"span[hosts=1]\" -R \"select[mem>4000] rusage[mem=4000]\" -M4000 "
+
+    kmds_command += "kmds --mds_concat " + str(subsampled_list) + " -o all_structure --threads " + str(args.threads) + " --pc " + str(args.pcs)
+
+    print(kmds_command)
+
+    if args.LSF:
+        job_return = subprocess.check_output(kmds_command, shell=True)
+        m = job_num.match(job_return)
+
+        jobs.append(m.group())
+    else:
+        retcode = subprocess.call(kmds_command, shell=True)
+        if retcode < 0:
+            print("kmds step 2 file failed with ", -retcode, file=sys.stderr)
+except OSError as e:
+    print("Execution failed:", e, file=sys.stderr)
+
+if args.LSF:
+    while not (check_done(jobs)):
+        os.sleep(30)
+    jobs = []
+
+# Run seer on each file in parallel
+print("Association on " + str(len(dsm_files)) + " files\n")
+i = 0
+seer_output = []
+for dsm in dsm_files:
+    i += 1
+
+    try:
+        seer_command = ""
+        if args.LSF:
+            seer_command = "bsub -o kmds.step1.%J." + str(i) + ".o -e kmds.step1.%J." + str(i) + ".e -n" + str(args.threads) + " -R \"span[hosts=1]\""
+
+        seer_command += "'seer -k " + str(dsm) + " -p " + str(args.pheno) + " --no_filtering --pval " + str(args.pval) + " --struct all_structure.dsm --threads " + str(args.threads) + " --print_samples > seer." + str(i) + ".result'"
+
+        print(seer_command)
+
+        if args.LSF:
+            job_return = subprocess.check_output(seer_command, shell=True)
+            m = job_num.match(job_return)
+
+            jobs.append(m.group())
+        else:
+            retcode = subprocess.call(seer_command, shell=True)
+            if retcode < 0:
+                print("seer file " + str(i) + " failed with ", -retcode, file=sys.stderr)
+
+        seer_output.append("kmds." + str(i))
+    except OSError as e:
+        print("Execution failed:", e, file=sys.stderr)
+
+if args.LSF:
+    while not (check_done(jobs)):
+        os.sleep(30)
+    jobs = []
+
+# TODO post-processing:
+subprocess.check_call("cat seer.*.result > seer.result", shell=True)
+for i in range(1, len(dsm_files)):
+    subprocess.check_call("rm seer." + str(i) + ".result", shell=True)
+
+# map back to references
+subprocess.call("map_back -k seer.result -r " + args.drafts + " > kmer_draft_locations.txt")
+
+# assembly of significant kmers
+if (args.assemble):
+    subprocess.call("VelvetOptimiser.pl --s 11 --e 71 --t 1 -f '-short -fasta ../../resultErytrhomycin.fa' --m -1 --k max --c tbp")
+
+# use blat by default
+# fall back to blast
+
+print("All pans piped\nAssocation results written to seer.result")
+
diff --git a/scripts/blast_top_hits.pl b/scripts/blast_top_hits.pl
new file mode 100755
index 0000000..f0365b6
--- /dev/null
+++ b/scripts/blast_top_hits.pl
@@ -0,0 +1,130 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use Getopt::Long;
+use Text::CSV;
+
+# Features
+# BLAST and BLAT
+# Exact/full query matches only
+#
+
+my $clean = 0;
+my $tmp_sort = "tmp_blat.psl";
+
+my $help_message = <<HELP;
+Usage: ./blast_top_hits.pl --input blast_out --mode blast <options>
+
+Reduces a blast or blat output file to the top hit for each query sequence
+only
+
+   Options
+
+   Required
+   --input              BLAST output file in -m 6/-outfmt 6 or BLAT .psl file
+   --mode               Either blast or blat
+
+   Optional
+   --full_query        The entire query must be reported as a match to appear
+                       in the output
+
+   -h, --help          Shows this help.
+
+HELP
+#****************************************************************************************#
+#* Main                                                                                 *#
+#****************************************************************************************#
+
+#* gets input parameters
+my ($file_in, $mode, $full_query, $help);
+GetOptions( "input|f=s" => \$file_in,
+            "mode=s" => \$mode,
+            "full_query" => \$full_query,
+            "help|h" => \$help
+		   ) or die($help_message);
+
+# Basic error check on inputs
+if (defined($help))
+{
+   print STDERR $help_message;
+}
+elsif (!defined($file_in) || !-e $file_in)
+{
+   print STDERR "Input file not found\n";
+   print STDERR $help_message;
+}
+elsif (!defined($mode))
+{
+   print STDERR "Operation mode must be either blast or blat\n";
+   print STDERR $help_message;
+}
+else
+{
+   my (@columns, $qseqid, $qstart, $qend, $length);
+   if ($mode =~ /blat/i)
+   {
+      # psl format
+      # match   mis-    rep.    N's     Q gap   Q gap   T gap   T gap   strand  Q               Q       Q       Q       T               T       T       T       block   blockSizes      qStarts  tStarts
+      #         match   match           count   bases   count   bases           name            size    start   end     name            size    start   end     count
+      @columns = qw( match mismatch repmatch Ns Qgapcount Qgapbases Tgapcount Tgapbases strand Qname Qsize Qstart Qend Tname Tsize Tstart Tend blockcount blocksizes qstarts tstarts );
+
+      $mode = "blat";
+      $qseqid = "Qname";
+      $qstart = "Qstart";
+      $qend = "Qend";
+      $length = "match";
+
+      # Ensure sorted by query, then match score
+      system("sort -k10,10 -k1,1nr $file_in > $tmp_sort");
+
+      $file_in = $tmp_sort;
+      $clean = 1;
+   }
+   elsif ($mode =~ /blast/i)
+   {
+      # blast outfmt 6
+      #qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore
+      @columns = qw( qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore );
+
+      $mode = "blast";
+      $qseqid = "qseqid";
+      $qstart = "qstart";
+      $qend = "qend";
+      $length = "length;"
+   }
+   else
+   {
+      die("Operation mode $mode not supported. Use either blast or blat\n");
+   }
+
+   my $csv = Text::CSV->new ( { binary => 1, sep_char => "\t", auto_diag => 1, eol => $/ } )  # should set binary attribute.
+                 or die "Cannot use CSV: ".Text::CSV->error_diag ();
+   my %rec;
+   $csv->bind_columns (\@rec{@columns});
+
+   open my $blast_in, "<:encoding(utf8)", "$file_in" or die "$file_in: $!";
+
+   my $previous_query = "";
+   while ($csv->getline($blast_in))
+   {
+      # Using speed advice from http://www.perlmonks.org/?node_id=937023
+      if ($rec{$qseqid} ne $previous_query)
+      {
+         if (!$full_query || ((($mode eq "blast" && $rec{$qstart} == 1) || $rec{$qstart} == 0) && $rec{$qend} == $rec{$length}))
+         {
+            $csv->print(*STDOUT, [ @rec{@columns} ]);
+         }
+         $previous_query = $rec{$qseqid};
+      }
+   }
+
+   if ($clean)
+   {
+      unlink $file_in;
+   }
+}
+
+exit(0);
+
diff --git a/src/Makefile b/src/Makefile
new file mode 100755
index 0000000..d74a82f
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,84 @@
+# Default prefix. Can change this to system directories if needed
+PREFIX=${HOME}/software
+BINDIR=$(PREFIX)/bin
+
+# Intel compiler - uncomment if you have icpc and mkl. Comment out lines below
+# gcc
+#CXX=icpc
+#CXXFLAGS=-Wall -O3 -parallel -ipo -std=c++11
+#SEER_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -mkl
+#MAP_LDLIBS=-L$(PREFIX)/lib -lboost_program_options -mkl
+#COMBINE_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lgzstream -lz -lboost_program_options
+#FILTER_LDLIBS=-L$(PREFIX)/lib -lboost_program_options -mkl
+# gcc
+CXXFLAGS=-Wall -O3 -std=c++11
+SEER_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas
+MAP_LDLIBS=-L$(PREFIX)/lib -lboost_program_options
+COMBINE_LDLIBS=-L../gzstream -L$(PREFIX)/lib -lgzstream -lz -lboost_program_options
+FILTER_LDLIBS=-L$(PREFIX)/lib -lboost_program_options
+
+CPPFLAGS=-I$(PREFIX)/include -I../gzstream -I../dlib -D DLIB_NO_GUI_SUPPORT=1 -D DLIB_USE_BLAS=1 -D DLIB_USE_LAPACK=1
+
+# For static linking. To use type 'make static'
+# Requires icpc and mkl
+COMMON_LDLIBS=-L../gzstream -L$(PREFIX)/lib -static-libstdc++ -static-libgcc -static-intel
+SEER_STATIC_LDLIBS=$(COMMON_LDLIBS) -Wl,-Bstatic -lhdf5 -lgzstream -larmadillo -lboost_program_options -Wl,-Bdynamic -lz -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group
+MAP_STATIC_LDLIBS=$(COMMON_LDLIBS) -Wl,-Bstatic -lboost_program_options -Wl,-Bdynamic
+COMBINE_STATIC_LDLIBS=$(COMMON_LDLIBS) -Wl,-Bstatic -lgzstream -lboost_program_options -Wl,-Bdynamic -lz
+FILTER_STATIC_LDLIBS=-$(COMMON_LDLIBS) -Wl,-Bstatic -lboost_program_options -Wl,-Bdynamic
+
+PROGRAMS=seer kmds map_back combineKmers filter_seer
+STATIC_PROGRAMS=seer_static kmds_static map_back_static combineKmers_static filter_seer_static
+
+CLASSES=sample.o significant_kmer.o kmer.o covar.o
+COMMON_OBJECTS=$(CLASSES) seerCommon.o seerErr.o seerFilter.o seerIO.o seerChiFilter.o
+SEER_OBJECTS=$(COMMON_OBJECTS) seerMain.o seerCmdLine.o seerContinuousAssoc.o seerBinaryAssoc.o logitFunction.o linearFunction.o
+KMDS_OBJECTS=$(COMMON_OBJECTS) kmdsMain.o kmdsStruct.o kmdsCmdLine.o
+MAP_OBJECTS=fasta.o significant_kmer.o mapMain.o mapCmdLine.o
+COMBINE_OBJECTS=combineInit.o combineCmdLine.o combineKmers.o
+FILTER_OBJECTS=significant_kmer.o filter_seer.o filterCmdLine.o
+
+all: $(PROGRAMS)
+
+static: $(STATIC_PROGRAMS)
+
+clean:
+	$(RM) *.o ~* $(PROGRAMS)
+
+install: all
+	install -d $(BINDIR)
+	install $(PROGRAMS) $(BINDIR)
+
+seer: $(SEER_OBJECTS)
+	$(LINK.cpp) $^ $(SEER_LDLIBS) -o $@
+
+kmds: $(KMDS_OBJECTS)
+	$(LINK.cpp) $^ $(SEER_LDLIBS) -o $@
+
+map_back: $(MAP_OBJECTS)
+	$(LINK.cpp) $^ $(MAP_LDLIBS) -o $@
+
+combineKmers: $(COMBINE_OBJECTS)
+	$(LINK.cpp) $^ $(COMBINE_LDLIBS) -o $@
+
+filter_seer: $(FILTER_OBJECTS)
+	$(LINK.cpp) $^ $(FILTER_LDLIBS) -o $@
+
+seer_static: $(SEER_OBJECTS)
+	$(LINK.cpp) $^ $(SEER_STATIC_LDLIBS) -o $@
+
+kmds_static: $(KMDS_OBJECTS)
+	$(LINK.cpp) $^ $(SEER_STATIC_LDLIBS) -o $@
+
+map_back_static: $(MAP_OBJECTS)
+	$(LINK.cpp) $^ $(MAP_STATIC_LDLIBS) -o $@
+
+combineKmers_static: $(COMBINE_OBJECTS)
+	$(LINK.cpp) $^ $(COMBINE_STATIC_LDLIBS) -o $@
+
+filter_seer_static: $(FILTER_OBJECTS)
+	$(LINK.cpp) $^ $(FILTER_STATIC_LDLIBS) -o $@
+
+
+.PHONY: all static test clean install
+
diff --git a/src/combineCmdLine.cpp b/src/combineCmdLine.cpp
new file mode 100644
index 0000000..4cd6345
--- /dev/null
+++ b/src/combineCmdLine.cpp
@@ -0,0 +1,63 @@
+/*
+ * combineCmdLine.cpp
+ * Parses cmd line options for combineKmers
+ *
+ */
+
+#include "combineKmers.hpp"
+
+namespace po = boost::program_options; // Save some typing
+
+// Parse command line options using boost program options
+int parseCommandLine (int argc, char *argv[], po::variables_map& vm)
+{
+   int failed = 0;
+
+   //Required options
+   po::options_description required("Required options");
+   required.add_options()
+    ("samples,r", po::value<std::string>()->required(), "file with tab separated sample name and kmer file")
+    ("output,o", po::value<std::string>()->required(), "output file prefix");
+
+   po::options_description other("Other options");
+   other.add_options()
+    ("min_samples", po::value<int>()->default_value(1), "minimum number of samples kmer must occur in to be printed")
+    ("help,h", "full help message");
+
+   po::options_description all;
+   all.add(required).add(other);
+
+   try
+   {
+      po::store(po::command_line_parser(argc, argv).options(all).run(), vm);
+
+      if (vm.count("help"))
+      {
+         printHelp(all);
+         failed = 1;
+      }
+      else
+      {
+         po::notify(vm);
+         failed = 0;
+      }
+
+   }
+   catch (po::error& e)
+   {
+      // Report errors from boost library
+      std::cerr << "Error in command line input: " << e.what() << "\n";
+      std::cerr << "Run 'combineKmers --help' for full option listing\n\n";
+      std::cerr << required << "\n" << other << "\n";
+
+      failed = 1;
+   }
+
+   return failed;
+}
+
+// Print long help message
+void printHelp(po::options_description& help)
+{
+   std::cerr << help << "\n";
+}
diff --git a/src/combineInit.cpp b/src/combineInit.cpp
new file mode 100644
index 0000000..8a0b168
--- /dev/null
+++ b/src/combineInit.cpp
@@ -0,0 +1,47 @@
+/*
+ * combineInit.cpp
+ * Functions to initialise inpit for combineKmers
+ *
+ */
+
+#include "combineKmers.hpp"
+
+std::vector<std::tuple<std::string, std::string> > readSamples(const std::string& sample_file)
+{
+   // Check input file can be opened, and so so
+   std::ifstream ist(sample_file.c_str());
+
+   if (!ist)
+   {
+      throw std::runtime_error("Could not open sample file " + sample_file + "\n");
+   }
+
+   // Structure to store in
+   std::vector<std::tuple<std::string, std::string> > samples;
+   while(ist)
+   {
+      std::string sample, file;
+      ist >> sample >> file;
+
+      // Don't add after final line
+      if (ist)
+      {
+         samples.push_back(std::make_tuple(sample, file));
+      }
+   }
+
+   return samples;
+}
+
+size_t checkMin(const size_t num_samples, const int input_min_samples)
+{
+   size_t return_min = input_min_samples;
+
+   if (input_min_samples < 1 || return_min > num_samples)
+   {
+      return_min = 1;
+   }
+
+   return return_min;
+}
+
diff --git a/src/combineKmers.cpp b/src/combineKmers.cpp
new file mode 100644
index 0000000..caa5dd3
--- /dev/null
+++ b/src/combineKmers.cpp
@@ -0,0 +1,104 @@
+/*
+ * combineKmers.cpp
+ * Takes the union of kmer counts generated by dsk
+ *
+ */
+
+
+//
+// Consider transforming bases to a more compact representation
+//
+// Just use sample index vs. use full sample name
+//
+// TODO read dsk output directly
+
+#include "combineKmers.hpp"
+
+int main (int argc, char *argv[])
+{
+   // Program description
+   std::cerr << "combineKmers: basic algorithm to combine kmer counts across samples\n";
+
+   // Do parsing and checking of command line params
+   // If no input options, give quick usage rather than full help
+   boost::program_options::variables_map vm;
+   if (argc == 1)
+   {
+      std::cerr << "Usage: combineKmers -s samples.txt -o all_kmers --min_samples 2\n\n"
+         << "For full option details run combineKmers -h\n";
+      return 0;
+   }
+   else if (parseCommandLine(argc, argv, vm))
+   {
+      return 1;
+   }
+
+   // Read in list of sample kmer files and their names
+   std::vector<std::tuple<std::string, std::string> > samples = readSamples(vm["samples"].as<std::string>());
+   std::unordered_map<int, std::string> sample_names;
+   size_t min_samples = checkMin(samples.size(), vm["min_samples"].as<int>());
+
+   // Open the output file before counting kmers
+   ogzstream out_file((vm["output"].as<std::string>() + ".gz").c_str());
+
+   // Map to store kmers
+   // TODO this would be neater if written with objects
+   std::unordered_map<std::string, std::vector<std::tuple<int, int>>> kmer_union;
+
+   // Add kmers to map
+   std::cerr << "Reading and mapping kmers..." << std::endl;
+   for (unsigned int i = 0; i < samples.size(); ++i)
+   {
+      std::string sample_name, filename;
+      std::tie(sample_name, filename) = samples[i];
+
+      // Rather than storing lots of copies of sample names as strings, just
+      // store hash keys
+      sample_names[i] = sample_name;
+
+      std::ifstream kmer_counts(filename.c_str());
+
+      if (kmer_counts)
+      {
+         std::cerr << "File " << i + 1 << "/" << samples.size() << "\r";
+         std::cerr.flush();
+
+         std::string kmer, abundance;
+         while (kmer_counts)
+         {
+            kmer_counts >> kmer >> abundance;
+
+            kmer_union[kmer].push_back(std::make_tuple(i, stoi(abundance)));
+         }
+      }
+      else
+      {
+         std::cerr << "Could not open " + filename << std::endl;
+         std::cerr << "Skipping..." << std::endl;
+      }
+   }
+   std::cerr << std::endl;
+
+   // Print results
+   std::cerr << "Printing union of kmers" << std::endl;
+   for(auto kmer_it = kmer_union.cbegin(); kmer_it != kmer_union.cend(); ++kmer_it)
+   {
+      if (kmer_it->second.size() >= min_samples)
+      {
+         out_file << kmer_it->first;
+         for (auto sample_it = kmer_it->second.cbegin(); sample_it != kmer_it->second.cend(); ++sample_it)
+         {
+            int sample, abundance;
+            std::tie (sample, abundance) = *sample_it;
+
+            out_file << " " << sample_names[sample] + ":" + std::to_string(abundance);
+         }
+         out_file << std::endl;
+      }
+   }
+
+   std::cerr << "Done." << std::endl;
+
+   return(0);
+}
+
diff --git a/src/combineKmers.hpp b/src/combineKmers.hpp
new file mode 100644
index 0000000..f12caaa
--- /dev/null
+++ b/src/combineKmers.hpp
@@ -0,0 +1,25 @@
+/*
+ * Header file for combineKmers.cpp
+ * Takes union of dsk counted kmers
+ *
+ */
+
+// C++ stl includes
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <tuple>
+#include <unordered_map>
+#include <iterator>
+
+// Library includes
+#include <boost/program_options.hpp>
+#include <gzstream.h>
+
+// Function prototypes
+int parseCommandLine (int argc, char *argv[], boost::program_options::variables_map& vm);
+void printHelp(boost::program_options::options_description& help);
+
+std::vector<std::tuple<std::string, std::string> > readSamples(const std::string& sample_file);
+size_t checkMin(const size_t num_samples, const int input_min_samples);
+
diff --git a/src/covar.cpp b/src/covar.cpp
new file mode 100644
index 0000000..07d0129
--- /dev/null
+++ b/src/covar.cpp
@@ -0,0 +1,28 @@
+/*
+ * covar.chpp
+ * Helper functions for covar class
+ */
+
+#include "covar.hpp"
+
+// Sorts covariates on sample name, returns only values
+std::vector<std::string> Covar::sortCovars()
+{
+   // Sort on sample name
+   std::sort(covariates.begin(), covariates.end(),
+         [](const std::tuple<std::string, std::string>& lhs, const std::tuple<std::string, std::string>& rhs)
+         {
+            return std::get<0>(lhs) < std::get<0>(rhs);
+         });
+
+   // Return a vector without sample names
+   std::vector<std::string> sorted;
+   sorted.reserve(covariates.size());
+   for (auto it = covariates.begin(); it != covariates.end(); ++it)
+   {
+      sorted.push_back(std::get<1>(*it));
+   }
+
+   return sorted;
+}
+
diff --git a/src/covar.hpp b/src/covar.hpp
new file mode 100644
index 0000000..2289806
--- /dev/null
+++ b/src/covar.hpp
@@ -0,0 +1,27 @@
+/*
+ * covar.hpp
+ * Header file for covar class
+ */
+
+#include <string>
+#include <vector>
+#include <tuple>
+#include <algorithm>
+
+// Samples have a name and phenotype
+// Covariates will be added later
+class Covar
+{
+   public:
+      // Initialisation
+      Covar() {}
+
+      // Add values, and read back
+      std::vector<std::string> sortCovars();
+      void addCovarValue (const std::string& sample, const std::string& value)
+         {covariates.push_back(std::make_tuple(sample, value));}
+
+   private:
+      std::vector<std::tuple<std::string, std::string>> covariates;
+};
+
diff --git a/src/fasta.cpp b/src/fasta.cpp
new file mode 100644
index 0000000..cf15a0d
--- /dev/null
+++ b/src/fasta.cpp
@@ -0,0 +1,113 @@
+/*
+ * File: fasta.cpp
+ *
+ * Helper functions for the fasta sequence class
+ *
+ */
+
+#include "fasta.hpp"
+
+// Read in sequences to memory from file
+Fasta::Fasta(const std::string& obj_name, const std::string& filename)
+   :name(obj_name)
+{
+   std::ifstream ist(filename.c_str());
+
+   if (!ist)
+   {
+      throw std::runtime_error("Could not open fasta file " + filename + "\n");
+   }
+
+   std::string line_in;
+   std::string seq, contig_name = "";
+
+   std::getline(ist, line_in);
+
+   if (ist.eof())
+   {
+       throw std::runtime_error("Could not read fasta file " + filename + "\n");
+   }
+   // Read header line, which starts with >
+   else if (line_in[0] == '>')
+   {
+      contig_name = line_in.substr(1);
+   }
+   else
+   {
+      throw std::runtime_error("Error reading fasta file " + filename + "\n"
+         "Header should start with '>', but has:\n" + line_in + "\n");
+   }
+
+   while (!ist.eof())
+   {
+      // New contig, new sequence
+      if (ist.peek() == '>')
+      {
+         sequence_names.push_back(contig_name);
+         sequences.push_back(seq);
+
+         seq = "";
+         std::getline(ist, line_in);
+         contig_name = line_in.substr(1);
+      }
+      else
+      {
+         // Concatenate sequence lines
+         std::getline(ist, line_in);
+         seq += line_in;
+      }
+   }
+
+   // Add in final contig
+   sequence_names.push_back(contig_name);
+   sequences.push_back(seq);
+
+}
+
+// All exact matches to search sequence in all sequences in fasta
+std::vector<Mapping> Fasta::hasSeq(const std::string& search)
+{
+   std::vector<Mapping> results;
+   Mapping hit;
+
+   // Search each sequence in fasta
+   std::vector<std::string>::iterator name_it = Fasta::sequence_names.begin();
+   for (std::vector<std::string>::iterator it = Fasta::sequences.begin(); it != Fasta::sequences.end(); ++it)
+   {
+      size_t hit_position = it->find(search);
+
+      // Search allowing for multiple hits
+      while (hit_position != std::string::npos)
+      {
+         hit.sequence_name = *name_it;
+         hit.position = hit_position;
+         results.push_back(hit);
+
+         hit_position = it->find(search, hit_position + 1);
+      }
+
+      // Move forward in name vector
+      ++name_it;
+   }
+
+   return results;
+}
+
+// Prints results to hasSeq
+// a nicer output than hasSeq: use this function
+void Fasta::printMappings(std::ostream &os, const std::string search, std::mutex& mtx)
+{
+   std::vector<Mapping> hits = hasSeq(search);
+
+   if (hits.size() > 0)
+   {
+      // Lock use of std::out to make sure output isn't mangled
+      mtx.lock();
+      for (std::vector<Mapping>::iterator it = hits.begin(); it != hits.end(); ++it)
+      {
+         os << "\t" << Fasta::name << ":" << it->sequence_name << ":" << it->position << "-" << it->position + search.length() - 1;
+      }
+      mtx.unlock();
+   }
+}
+
diff --git a/src/fasta.hpp b/src/fasta.hpp
new file mode 100644
index 0000000..a053761
--- /dev/null
+++ b/src/fasta.hpp
@@ -0,0 +1,42 @@
+/*
+ * fasta.hpp
+ * Header file for fasta class
+ */
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <stdexcept>
+#include <vector>
+#include <iterator>
+#include <mutex>
+
+// Container for a successful mapping result
+struct Mapping
+{
+   std::string sequence_name;
+   long int position;
+};
+
+// Contains sequences and contig names
+class Fasta
+{
+   public:
+      // Initialisation
+      Fasta(const std::string& obj_name, const std::string& file);
+
+      // Complex operations
+      std::vector<Mapping> hasSeq(const std::string& search);
+      void printMappings(std::ostream &os, const std::string search, std::mutex& mtx);
+
+      // nonmodifying operations
+      std::string get_name() const { return name; }
+      static bool compareFasta(Fasta lhs, Fasta rhs) { return (lhs.name < rhs.name); }
+
+   private:
+      // Sequences and sequence names necessarily in same order as read in
+      std::vector<std::string> sequences;
+      std::vector<std::string> sequence_names;
+
+      std::string name;
+};
diff --git a/src/filterCmdLine.cpp b/src/filterCmdLine.cpp
new file mode 100644
index 0000000..b4ad480
--- /dev/null
+++ b/src/filterCmdLine.cpp
@@ -0,0 +1,160 @@
+/*
+ * filterCmdLine.cpp
+ * Parses cmd line options for filter_seer
+ *
+ */
+
+#include "filter_seer.hpp"
+
+namespace po = boost::program_options; // Save some typing
+
+// Parse command line options using boost program options
+int parseCommandLine (int argc, char *argv[], po::variables_map& vm)
+{
+   int failed = 0;
+
+   //Required options
+   po::options_description required("Required options");
+   required.add_options()
+    ("kmers,k", po::value<std::string>()->required(), "file of output from seer");
+
+   po::options_description filters("Filtering options");
+   filters.add_options()
+    ("chisq", po::value<std::string>(), "minimum unadjusted p-value to output")
+    ("pval", po::value<std::string>(), "minimum adjusted p-value to output")
+    ("maf", po::value<std::string>(), "minimum maf/max 1-maf to output")
+    ("beta", po::value<std::string>(), "minimum |beta| to output")
+    ("substr", "remove smaller kmers completely represented elsewhere")
+    ("pos_beta", "output positive effect sizes only");
+
+   po::options_description other("Other options");
+   other.add_options()
+    ("sort,s", po::value<std::string>(), "field to sort on: chisq, pval, maf or beta")
+    ("help,h", "full help message");
+
+   po::options_description all;
+   all.add(required).add(filters).add(other);
+
+   try
+   {
+      po::store(po::command_line_parser(argc, argv).options(all).run(), vm);
+
+      if (vm.count("help"))
+      {
+         printHelp(all);
+         failed = 1;
+      }
+      else
+      {
+         po::notify(vm);
+         failed = 0;
+      }
+
+   }
+   catch (po::error& e)
+   {
+      // Report errors from boost library
+      std::cerr << "Error in command line input: " << e.what() << "\n";
+      std::cerr << "Run 'combineKmers --help' for full option listing\n\n";
+      std::cerr << required << "\n" << other << "\n";
+
+      failed = 1;
+   }
+
+   return failed;
+}
+
+// Makes sure command line options are valid. Casts into correct variables
+cmdOptions processCmdLine(po::variables_map& vm)
+{
+   cmdOptions processed_options;
+
+   processed_options.input_file = vm["kmers"].as<std::string>();
+
+   if (vm.count("chisq"))
+   {
+      processed_options.chi_filter = fractionFilter(vm["chisq"].as<std::string>());
+   }
+   else
+   {
+      processed_options.chi_filter = 0;
+   }
+
+   if (vm.count("pval"))
+   {
+      processed_options.p_filter = fractionFilter(vm["pval"].as<std::string>());
+   }
+   else
+   {
+      processed_options.p_filter = 0;
+   }
+
+   if (vm.count("maf"))
+   {
+      processed_options.maf_filter = fractionFilter(vm["maf"].as<std::string>());
+      if (processed_options.maf_filter > 0.5)
+      {
+         processed_options.maf_filter = 1 - processed_options.maf_filter;
+      }
+   }
+   else
+   {
+      processed_options.maf_filter = 0;
+   }
+
+   if (vm.count("beta"))
+   {
+      processed_options.beta_filter = stod(vm["beta"].as<std::string>());
+   }
+   else
+   {
+      processed_options.beta_filter = 0;
+   }
+
+   if (vm.count("pos_beta"))
+   {
+      processed_options.neg_beta = 0;
+   }
+   else
+   {
+      processed_options.neg_beta = 1;
+   }
+
+   if (vm.count("substr"))
+   {
+      processed_options.substr_kmers = 0;
+   }
+   else
+   {
+      processed_options.substr_kmers = 1;
+   }
+
+   if (vm.count("sort"))
+   {
+      processed_options.sort_field = vm["sort"].as<std::string>();
+   }
+   else
+   {
+      processed_options.sort_field = "";
+   }
+
+   return processed_options;
+}
+
+// Turns a string into a double between 0 and 1
+double fractionFilter(const std::string& filter_input)
+{
+   double parsed_filter = stod(filter_input);
+   if (parsed_filter < 0 || parsed_filter > 1)
+   {
+      parsed_filter = 0;
+   }
+
+   return parsed_filter;
+}
+
+// Print long help message
+void printHelp(po::options_description& help)
+{
+   std::cerr << help << "\n";
+}
diff --git a/src/filter_seer.cpp b/src/filter_seer.cpp
new file mode 100644
index 0000000..7355c01
--- /dev/null
+++ b/src/filter_seer.cpp
@@ -0,0 +1,148 @@
+/*
+ * filter_seer.cpp
+ * Filters significant kmers produced by seer
+ *
+ */
+
+#include "filter_seer.hpp"
+
+int main (int argc, char *argv[])
+{
+   // Program description
+   std::cerr << "filter_seer: post filtering of significant kmers\n";
+
+   // Do parsing and checking of command line params
+   // If no input options, give quick usage rather than full help
+   boost::program_options::variables_map vm;
+   if (argc == 1)
+   {
+      std::cerr << "Usage: filter_seer -k seer_kmers.txt --pos_beta > filtered_output.txt\n\n"
+         << "For full option details run 'filter_seer -h'\n";
+      return 0;
+   }
+   else if (parseCommandLine(argc, argv, vm))
+   {
+      return 1;
+   }
+
+   cmdOptions options = processCmdLine(vm);
+
+   // Define sorting function object
+   sortSigKmer sort_kmers;
+   if (options.sort_field != "")
+   {
+      sort_kmers.addSortField(options.sort_field);
+   }
+
+   sortSigKmer substr_sort;
+   if (!options.substr_kmers)
+   {
+      substr_sort.addSortField("sequence");
+   }
+
+   std::list<Significant_kmer> filtered_kmers;
+
+   // Open input file, check opened ok
+   try
+   {
+      std::ifstream kmers_in(options.input_file.c_str());
+      if (!kmers_in)
+      {
+         throw std::runtime_error("Could not open input file " + options.input_file);
+      }
+      else
+      {
+         while (kmers_in)
+         {
+            // Read in each kmer
+            Significant_kmer kmer;
+            kmers_in >> kmer;
+
+            if (kmers_in)
+            {
+               // Filter fields. MAF needs to include max, beta needs modulus
+               if (options.maf_filter && (kmer.maf() < options.maf_filter || 1-kmer.maf() < options.maf_filter))
+               {
+                  continue;
+               }
+               else if (!options.neg_beta && kmer.beta() < 0)
+               {
+                  continue;
+               }
+               else if (options.beta_filter && fabs(kmer.beta()) < options.beta_filter)
+               {
+                  continue;
+               }
+               else if (options.chi_filter && kmer.unadj() > options.chi_filter)
+               {
+                  continue;
+               }
+               else if (options.p_filter && kmer.p_val() > options.p_filter)
+               {
+                  continue;
+               }
+               // If sorted, store in mem. Otherwise print immediately
+               else if (!sort_kmers && !substr_sort)
+               {
+                  std::cout << kmer << std::endl;
+               }
+               else
+               {
+                  filtered_kmers.push_back(kmer);
+               }
+            }
+         }
+         // Remove substr if necessary
+         if (substr_sort)
+         {
+            // Sort largest to smallest
+            filtered_kmers.sort(substr_sort);
+
+            auto list_it = filtered_kmers.begin();
+            while (list_it != filtered_kmers.end())
+            {
+               // Check in all the larger kmers that this one isn't
+               // a substring
+               bool found = 0;
+               for (auto sub_it = filtered_kmers.begin(); sub_it != list_it; ++sub_it)
+               {
+                  if (sub_it->sequence().find(list_it->sequence()) != std::string::npos)
+                  {
+                     list_it = filtered_kmers.erase(list_it);
+                     found = 1;
+                     break;
+                  }
+               }
+
+               if (!found)
+               {
+                  ++list_it;
+               }
+            }
+         }
+
+         // If sorting, sort, then print
+         if (sort_kmers)
+         {
+            filtered_kmers.sort(sort_kmers);
+         }
+
+         if (sort_kmers || substr_sort)
+         {
+            for (auto out_it = filtered_kmers.begin(); out_it != filtered_kmers.end(); ++out_it)
+            {
+               std::cout << *out_it << std::endl;
+            }
+         }
+
+         std::cerr << "Done." << std::endl;
+      }
+   }
+   catch (std::exception& e)
+   {
+      std::cerr << "Error: " << e.what() << std::endl;
+   }
+
+   return(0);
+}
+
diff --git a/src/filter_seer.hpp b/src/filter_seer.hpp
new file mode 100644
index 0000000..86e2895
--- /dev/null
+++ b/src/filter_seer.hpp
@@ -0,0 +1,34 @@
+/*
+ * Header file for filter_seer.cpp
+ * Filters significant kmers from seer
+ *
+ */
+
+// C++ stl includes
+#include <iostream>
+#include <fstream>
+#include <algorithm>
+#include <list>
+#include <iterator>
+#include <stdexcept>
+#include <math.h>
+
+// Library includes
+#include <boost/program_options.hpp>
+
+#include "significant_kmer.hpp"
+
+// Structures
+struct cmdOptions
+{
+   std::string input_file, output_file, sort_field;
+   double maf_filter, chi_filter, p_filter, beta_filter;
+   bool neg_beta, substr_kmers;
+};
+
+// Function prototypes
+int parseCommandLine (int argc, char *argv[], boost::program_options::variables_map& vm);
+cmdOptions processCmdLine(boost::program_options::variables_map& vm);
+double fractionFilter(const std::string& filter_input);
+void printHelp(boost::program_options::options_description& help);
+
diff --git a/src/kmds.hpp b/src/kmds.hpp
new file mode 100644
index 0000000..1bd910f
--- /dev/null
+++ b/src/kmds.hpp
@@ -0,0 +1,39 @@
+/*
+ *
+ * kmds.hpp
+ * Header file for kmds
+ *
+ */
+
+// Common headers
+#include "seercommon.hpp"
+
+// C/C++ std headers
+#include <random>
+#include <queue>
+#include <future>
+
+// Constants
+//    Default options
+const int pc_default = 3;
+const long int size_default = 1000000;
+
+// Structs
+struct DistanceElement
+{
+   unsigned int row;
+   unsigned int col;
+   double distance;
+};
+
+// kmdsCmdLine headers
+int parseCommandLine (int argc, char *argv[], boost::program_options::variables_map& vm);
+void printHelp(boost::program_options::options_description& help);
+
+// kmdsStruct headers
+arma::mat metricMDS(const arma::mat& populationMatrix, const int dimensions, const unsigned int threads, const std::string& distances_file = "");
+arma::mat dissimiliarityMatrix(const arma::mat& inMat, const unsigned int threads);
+
+std::vector<DistanceElement> threadDistance(std::vector<DistanceElement> element_list, const arma::mat& rectangular_matrix);
+double distanceFunction(const arma::rowvec& vec_1, const arma::rowvec& vec_2);
+
diff --git a/src/kmdsCmdLine.cpp b/src/kmdsCmdLine.cpp
new file mode 100644
index 0000000..0dac636
--- /dev/null
+++ b/src/kmdsCmdLine.cpp
@@ -0,0 +1,95 @@
+/*
+ * File: kmdsCmdLine.cpp
+ *
+ * Reads command line input to kmds
+ *
+ */
+
+#include "kmds.hpp"
+
+namespace po = boost::program_options; // Save some typing
+
+// Use boost::program_options to parse command line input
+// This does pretty much all the parameter checking needed
+int parseCommandLine (int argc, char *argv[], po::variables_map& vm)
+{
+   int failed = 0;
+
+   //Required options
+   po::options_description required("Required options");
+   required.add_options()
+    ("kmers,k", po::value<std::string>(), "dsm kmer output file")
+    ("pheno,p", po::value<std::string>(), ".pheno metadata");
+
+   po::options_description mds("MDS options");
+   mds.add_options()
+    ("output,o", po::value<std::string>(), "output prefix for new dsm file")
+    ("no_mds", "do not perform MDS; output subsampled matrix instead")
+    ("write_distances",  "write csv of distance matrix")
+    ("mds_concat", po::value<std::string>(), "list of subsampled matrices to use in MDS. Performs only MDS; implies --no_filtering")
+    ("pc", po::value<int>()->default_value(pc_default), "number of principal coordinates to output")
+    ("size", po::value<long int>()->default_value(size_default), "number of kmers to use in MDS")
+    ("threads", po::value<int>()->default_value(1), ("number of threads. Suggested: " + std::to_string(std::thread::hardware_concurrency())).c_str());
+
+   //Optional filtering parameters
+   //NB pval cutoffs are strings for display, and are converted to floats later
+   po::options_description filtering("Filtering options");
+   filtering.add_options()
+    ("no_filtering", "turn off all filtering and do not output new kmer file")
+    ("max_length", po::value<long int>()->default_value(max_length_default), "maximum kmer length")
+    ("maf", po::value<double>()->default_value(maf_default), "minimum kmer frequency")
+    ("min_words", po::value<int>(), "minimum kmer occurences. Overrides --maf")
+    ("chisq", po::value<std::string>()->default_value(chisq_default), "p-value threshold for initial chi squared test. Set to 1 to show all");
+
+   po::options_description other("Other options");
+   other.add_options()
+    ("help,h", "full help message");
+
+   po::options_description all;
+   all.add(required).add(mds).add(filtering).add(other);
+
+   try
+   {
+      po::store(po::command_line_parser(argc, argv).options(all).run(), vm);
+
+      if (vm.count("help"))
+      {
+         printHelp(all);
+         failed = 1;
+      }
+      else
+      {
+         po::notify(vm);
+         failed = 0;
+
+         // Check input files exist, and can stat
+         if ((vm.count("kmers") && !fileStat(vm["kmers"].as<std::string>())) || (vm.count("pheno") && !fileStat(vm["pheno"].as<std::string>())))
+         {
+            failed = 1;
+         }
+      }
+
+   }
+   catch (po::error& e)
+   {
+      // Report errors from boost library
+      std::cerr << "Error in command line input: " << e.what() << "\n";
+      std::cerr << "Run 'kmds --help' for full option listing\n\n";
+      std::cerr << required << "\n" << other << "\n";
+
+      failed = 1;
+   }
+
+   return failed;
+}
+
+// Print long help message
+void printHelp(po::options_description& help)
+{
+   std::cerr << "kmds" << "\n";
+   std::cerr << "\t1) filter and subsample with --no_mds and --size\n";
+   std::cerr << "\t2) combine, and do metric multidimensional scaling with --combine_mds\n";
+
+   std::cerr << help << "\n";
+}
+
diff --git a/src/kmdsMain.cpp b/src/kmdsMain.cpp
new file mode 100644
index 0000000..011ad59
--- /dev/null
+++ b/src/kmdsMain.cpp
@@ -0,0 +1,264 @@
+/*
+ * File: kmdsMain.cpp
+ *
+ * Control process of kmds (mds of kmers)
+ *
+ */
+
+#include "kmds.hpp"
+
+// globals
+std::default_random_engine rand_gen;
+
+// $1 file location, $2 file name, $3 file ending
+const std::regex file_format_e ("^(.+)\\/(.+)\\.([^\\.]+)$");
+const std::regex file_format_within_e ("^(.+)\\.([^\\.]+)$"); // When in same directory, but not with a ./ prefix
+
+int main (int argc, char *argv[])
+{
+   // STRUCTURE
+   // Read in command line
+   //    dsm and pheno file
+   //    Matrix size
+   //    No. of prin components
+   //    Have a no_filter option
+   //    Output prefix, with default (same as input)
+   //
+   // Read a dsm line, convert to stringstream
+   //    Parse as kmer
+   //    Write out if passes filters
+   //
+   // Build large matrix using reservoir sampler
+   //    Reserve enough space
+   //    While under reserved space, add kmer to vector
+   //    Then reservoir sample
+   //
+   // Convert kmers into matrix
+   //
+   // PCoA on matrix
+   //    Save matrix of top 3 eigenvals (parameter input)
+
+   // Program description
+   std::cerr << "kmds: control for population structure\n";
+
+   // Do parsing and checking of command line params
+   // If no input options, give quick usage rather than full help
+   boost::program_options::variables_map vm;
+   if (argc == 1)
+   {
+      std::cerr << "Usage: kmds -k dsm.txt.gz -p data.pheno\n\n"
+         << "For full option details run kmds -h\n";
+      return 0;
+   }
+   else if (parseCommandLine(argc, argv, vm))
+   {
+      return 1;
+   }
+
+   // Normal operation
+   if (!vm.count("mds_concat"))
+   {
+      // Check compulsory paramters provided
+      if (!vm.count("kmers") || !vm.count("pheno"))
+      {
+         std::cerr << "Either -k and -p must be provided, or --mds_concat\n";
+         return 1;
+      }
+
+      // Open .pheno file, parse into vector of samples
+      std::vector<Sample> samples;
+      std::unordered_map<std::string,int> sample_map;
+      readPheno(vm["pheno"].as<std::string>(), samples, sample_map);
+      arma::vec y = constructVecY(samples);
+      int continuous_phenotype = continuousPhenotype(samples);
+
+      cmdOptions parameters = verifyCommandLine(vm, samples);
+
+      // Open the dsm kmer ifstream, and read through the whole thing
+      igzstream kmer_file;
+      openDsmFile(kmer_file, parameters.kmers.c_str());
+
+      // Set up output files
+      ogzstream filtered_file;
+      std::string output_file_name, dsm_file_name, distances_file_name;
+      if (parameters.filter)
+      {
+         if (vm.count("output"))
+         {
+            output_file_name = parameters.output + ".kmers.gz";
+         }
+         else
+         {
+            output_file_name = std::regex_replace(parameters.kmers, file_format_e, std::string("$1/filtered.$2.gz"));
+            if (output_file_name == parameters.kmers) // If first match fails
+            {
+               output_file_name = std::regex_replace(parameters.kmers, file_format_within_e, std::string("filtered.$1.gz"));
+            }
+
+         }
+
+         filtered_file.open(output_file_name.c_str());
+      }
+
+      if (vm.count("output"))
+      {
+         dsm_file_name = parameters.output + ".dsm";
+         distances_file_name = parameters.output + "distances.csv";
+      }
+      else
+      {
+         dsm_file_name = std::regex_replace(parameters.kmers, file_format_e, std::string("$1/$2.dsm"));
+         if (dsm_file_name == parameters.kmers) // If first match fails
+         {
+            dsm_file_name = std::regex_replace(parameters.kmers, file_format_within_e, std::string("$1.dsm"));
+         }
+
+         distances_file_name = std::regex_replace(parameters.kmers, file_format_e, std::string("$1/$2.distances.csv"));
+         if (distances_file_name == parameters.kmers) // If first match fails
+         {
+            distances_file_name  = std::regex_replace(parameters.kmers, file_format_within_e, std::string("$1.distances.csv"));
+         }
+      }
+
+      // vector of subsampled kmers
+      std::vector<arma::vec> dsm_kmers;
+      dsm_kmers.reserve(parameters.size);
+
+      long int kmer_index = 0;
+      while (kmer_file)
+      {
+         // Allow output of entire dsm line
+         std::string dsm_line;
+         std::getline(kmer_file, dsm_line);
+         std::stringstream dsm_stream(dsm_line);
+
+         Kmer k;
+         if (kmer_file)
+         {
+            dsm_stream >> k;
+            k.add_x(sample_map, samples.size());
+
+            // apply filters here
+            int passed_filters = 0;
+            if (parameters.filter && passFilters(parameters, k, samples, y, continuous_phenotype))
+            {
+               passed_filters = 1;
+               filtered_file << dsm_line << "\n";
+            }
+            else if (!parameters.filter)
+            {
+               passed_filters = 1;
+            }
+
+            // kmer has passed basic filters, so is a candidate for mds
+            // subsampling
+            if (passed_filters)
+            {
+               // Resevoir sampler for parameters.size kmers
+               kmer_index++;
+               if (dsm_kmers.size() < dsm_kmers.capacity())
+               {
+                  dsm_kmers.push_back(k.get_x());
+               }
+               else
+               {
+                  std::uniform_int_distribution<int> dist(0, kmer_index);
+                  int r = dist(rand_gen);
+                  if (r < parameters.size)
+                  {
+                     dsm_kmers[r] = k.get_x();
+                  }
+               }
+            }
+         }
+      }
+
+      // Convert into arma::mat before MDS
+      arma::mat subsampledMatrix(samples.size(), dsm_kmers.size());
+      for (unsigned int i = 0; i < dsm_kmers.size(); ++i)
+      {
+         subsampledMatrix.col(i) = dsm_kmers[i];
+      }
+
+      // Write output
+      if (vm.count("no_mds"))
+      {
+         writeMDS(dsm_file_name, subsampledMatrix);
+      }
+      else
+      {
+
+         // Run metric MDS, then output to file
+         if (parameters.write_distances)
+         {
+            writeMDS(dsm_file_name, metricMDS(subsampledMatrix, parameters.pc, parameters.num_threads, distances_file_name));
+         }
+         else
+         {
+            writeMDS(dsm_file_name, metricMDS(subsampledMatrix, parameters.pc, parameters.num_threads));
+         }
+
+      }
+
+      std::cerr << "Done.\n";
+      if (!vm.count("no_mds"))
+      {
+         if (parameters.filter)
+         {
+            std::cerr << "You may now want to run:\n\tseer -k " << output_file_name
+               << " -p " << vm["pheno"].as<std::string>() << " --struct " << dsm_file_name
+               << " > significant_kmers.txt\n";
+         }
+         else
+         {
+            std::cerr << "You may now want to run:\n\tseer -k " << parameters.kmers
+               << " -p " << vm["pheno"].as<std::string>() << " --struct " << dsm_file_name
+               << " > significant_kmers.txt\n";
+         }
+      }
+   }
+   // Matrices already subsampled. Concatenate and perform MDS
+   else
+   {
+      std::string matrix_input = vm["mds_concat"].as<std::string>();
+
+      // Check number of principal coordinates ok
+      cmdOptions mdsOptions;
+      verifyMDSOptions(mdsOptions, vm);
+
+      std::string dsm_file_name, distances_file_name;
+      if (fileStat(matrix_input))
+      {
+         if (vm.count("output"))
+         {
+            dsm_file_name = vm["output"].as<std::string>();
+            distances_file_name = vm["output"].as<std::string>() + ".distances.csv";
+         }
+         else
+         {
+            dsm_file_name = matrix_input + ".dsm";
+            distances_file_name = matrix_input + ".distances.csv";
+         }
+
+         // Run metric MDS, then output to file
+         if (mdsOptions.write_distances)
+         {
+            writeMDS(dsm_file_name, metricMDS(readMDSList(matrix_input), mdsOptions.pc, mdsOptions.num_threads, distances_file_name));
+         }
+         else
+         {
+            writeMDS(dsm_file_name, metricMDS(readMDSList(matrix_input), mdsOptions.pc, mdsOptions.num_threads));
+         }
+      }
+      else
+      {
+         throw std::runtime_error("Couldn't open list of matrices " + matrix_input);
+      }
+
+      std::cerr << "Done.\n";
+
+      std::cerr << "Output written to " << dsm_file_name << "\n"
+         << "Use this as the --struct option of seer\n";
+   }
+}
+
diff --git a/src/kmdsStruct.cpp b/src/kmdsStruct.cpp
new file mode 100644
index 0000000..534064a
--- /dev/null
+++ b/src/kmdsStruct.cpp
@@ -0,0 +1,161 @@
+/*
+ * File: kmdsStruct.cpp
+ *
+ * Implements metric MDS (multi-dimensional scaling)
+ * for kmds kmers
+ */
+
+#include "kmds.hpp"
+
+arma::mat metricMDS(const arma::mat& populationMatrix, const int dimensions, const unsigned int threads, const std::string& distances_file)
+{
+   /*
+    * Metric MDS
+    *
+    * 1) P^2 -> matrix with elements which are distances squared
+    * 2) J = I - n^-1(II') - II' is a square matrix of ones
+    * 3) B = -0.5JP^2J
+    * 4) Decompose B into eigenvalues
+    * 5) MDS components = eigenvectors * eigenvalues
+    * 6) Normalise components
+    */
+   const unsigned int matSize = populationMatrix.n_rows;
+
+   // Step 1)
+   arma::mat P = arma::square(dissimiliarityMatrix(populationMatrix, threads));
+
+   // If supplied as an optional parameter, write distance matrix to file
+   if (!distances_file.empty())
+   {
+      writeDistances(distances_file, P);
+   }
+
+   // Step 2)
+   arma::mat J = arma::eye<arma::mat>(matSize, matSize)
+      - 1/double(matSize)*arma::ones<arma::mat>(matSize, matSize);
+
+   // Step 3)
+   arma::mat B = -0.5 * J * P * J;
+
+   // Step 4)
+   arma::vec eigval;
+   arma::mat eigvec;
+
+   arma::eig_sym(eigval, eigvec, B);
+
+   // Step 5)
+   // Eigenvalues returned are sorted ascending, so want to reverse order
+   arma::mat mds = fliplr(eigvec * diagmat(sqrt(eigval)));
+
+   // Step 6)
+   // All values will lie in the interval [-1,1]
+   arma::mat norm_mds(matSize, dimensions);
+   for (int i = 0; i < dimensions; ++i)
+   {
+      if (pow(max(mds.col(i)), 2) > pow(min(mds.col(i)), 2))
+      {
+         norm_mds.col(i) = mds.col(i)/max(mds.col(i));
+      }
+      else
+      {
+         norm_mds.col(i) = mds.col(i)/fabs(min(mds.col(i)));
+      }
+   }
+
+   return norm_mds;
+}
+
+// Distance between all rows. 0/1 elements only
+arma::mat dissimiliarityMatrix(const arma::mat& inMat, const unsigned int threads)
+{
+   const unsigned int matSize = inMat.n_rows;
+   arma::mat dist = arma::zeros<arma::mat>(matSize, matSize);
+
+   // Time parallelisation
+   std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now();
+
+   // Create queue for distance calculations
+   std::queue<std::future<std::vector<DistanceElement>>> distance_calculations;
+
+   // Set up number of jobs per thread
+   const unsigned long int num_calculations = 0.5*matSize*(matSize - 1);
+   const unsigned long int calc_per_thread = (unsigned long int)num_calculations / threads;
+   const unsigned int num_big_threads = num_calculations % threads;
+
+   // Keep track of row and column outside of outer loop
+   unsigned int row = 0;
+   unsigned int col = 0;
+   for (unsigned int thread_idx = 0; thread_idx < threads; ++thread_idx) // Loop over threads
+   {
+      // First 'big' threads have an extra job
+      unsigned long int thread_jobs;
+      if (distance_calculations.size() < num_big_threads)
+      {
+         thread_jobs = calc_per_thread + 1;
+      }
+      else
+      {
+         thread_jobs = calc_per_thread;
+      }
+
+      // Each thread is assigned elements to calculated scanning left to right,
+      // top to bottom on the upper triangle of the matrix
+      std::vector<DistanceElement> thread_elements;
+      thread_elements.reserve(thread_jobs);
+      for (unsigned int element = 0; element < calc_per_thread; ++element)
+      {
+         DistanceElement d;
+         d.row = row;
+         d.col = ++col;
+
+         thread_elements.push_back(d);
+
+         if (col + 1 == matSize)
+         {
+            ++row;
+            col = row;
+         }
+      }
+
+      // Set the thread off
+      distance_calculations.push(std::async(std::launch::async, threadDistance, thread_elements, std::cref(inMat)));
+   }
+
+   // Wait for thread results to return, and put the results in the distance
+   // matrix
+   while(!distance_calculations.empty())
+   {
+      std::vector<DistanceElement> distance_elements = distance_calculations.front().get();
+      distance_calculations.pop();
+
+      for(std::vector<DistanceElement>::iterator it = distance_elements.begin() ; it < distance_elements.end(); ++it)
+      {
+         dist(it->row, it->col) = it->distance;
+         dist(it->col, it->row) = it->distance;
+      }
+   }
+
+   // Print time taken
+   std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
+   std::chrono::duration<double> diff = std::chrono::duration_cast<std::chrono::duration<double>>(end - start);
+   std::cerr << "Distance matrix calculated in: " << diff.count() << " s\n";
+
+   return dist;
+}
+
+std::vector<DistanceElement> threadDistance(std::vector<DistanceElement> element_list, const arma::mat& rectangular_matrix)
+{
+   for(std::vector<DistanceElement>::iterator it = element_list.begin() ; it < element_list.end(); ++it)
+   {
+      it->distance = distanceFunction(rectangular_matrix.row(it->row), rectangular_matrix.row(it->col));
+   }
+
+   return element_list;
+}
+
+double distanceFunction(const arma::rowvec& vec_1, const arma::rowvec& vec_2)
+{
+   // Slow
+   // return accu(abs(vec_1 - vec_2));
+   return dot(vec_1 - vec_2, vec_1 - vec_2);
+}
diff --git a/src/kmer.cpp b/src/kmer.cpp
new file mode 100644
index 0000000..d80debc
--- /dev/null
+++ b/src/kmer.cpp
@@ -0,0 +1,149 @@
+/*
+ * File: kmer.cpp
+ *
+ * Helper functions for the kmer class
+ *
+ */
+
+#include "kmer.hpp"
+
+// Initialisation
+Kmer::Kmer(const std::string& sequence, const std::vector<std::string>& occurrences, const double pvalue, const double beta, const double se, const double maf)
+   : Significant_kmer(sequence, occurrences, maf, kmer_chi_pvalue_default, pvalue, beta, se, kmer_comment_default), _x_set(0)
+{
+}
+
+// Initialise without calculated information
+Kmer::Kmer(const std::string& sequence, const std::vector<std::string>& occurrences)
+   : Significant_kmer(sequence, occurrences, kmer_maf_default, kmer_chi_pvalue_default, kmer_pvalue_default, kmer_beta_default, kmer_se_default, kmer_comment_default), _x_set(0)
+{
+}
+
+// Initialise with default info only
+Kmer::Kmer()
+    : Significant_kmer(kmer_seq_default, kmer_occ_default, kmer_maf_default, kmer_chi_pvalue_default, kmer_pvalue_default, kmer_beta_default, kmer_se_default, kmer_comment_default), _x_set(0)
+{
+}
+
+// Output
+std::ostream& operator<<(std::ostream &os, const Kmer& k)
+{
+   return os << std::fixed << std::setprecision(3) << k.sequence() << "\t" << k.maf()
+      << "\t" << std::scientific << k.unadj() << "\t" << k.p_val() << "\t" << k.beta()
+      << "\t" << k.se() << "\t" << k.comments();
+}
+
+// Input
+std::istream& operator>>(std::istream &is, Kmer& k)
+{
+   std::vector<std::string> samples;
+   std::string word, s_buffer, kmer_line;
+   char c_buffer;
+
+   /*
+    * Example dsm file line AAAAAAAAAAAAAAAAAATGCATATTTATCTTAG 5.172314 0.175087 100 0 100
+    * 0.164875 100 | 6925_3#7:9 6823_4#17:26 6871_2#9:8
+    *
+    * OR
+    *
+    * AAAAAAAAAAAAAAAAAATGCATATTTATCTTAG 5.172314 6925_3#7:9 6823_4#17:26 6871_2#9:8
+    *
+    */
+   if (is)
+   {
+      std::getline(is, kmer_line);
+      std::stringstream line(kmer_line);
+
+      // First field is the kmer
+      line >> word;
+
+      // Skip entropy fields
+      while (line >> s_buffer)
+      {
+         if (s_buffer == "|")
+         {
+            break;
+         }
+         // Gone one too far in a string w/out | separator
+         else
+         {
+            size_t occurence_pos = s_buffer.find(":");
+            if (s_buffer.find(":") != std::string::npos)
+            {
+               samples.push_back(s_buffer.substr(0, occurence_pos));
+               break;
+            }
+         }
+      }
+      s_buffer = "";
+
+      while (line >> c_buffer)
+      {
+         // Found end of sample. Read forward to next one
+         if (c_buffer == ':')
+         {
+            samples.push_back(s_buffer);
+            line >> s_buffer;
+
+            s_buffer = "";
+         }
+         else
+         {
+            s_buffer += c_buffer;
+         }
+      }
+   }
+
+   k = Kmer(word, samples);
+
+   return is;
+}
+
+// Set the x and maf of the kmer
+void Kmer::add_x(const std::unordered_map<std::string,int>& sample_map, const int num_samples)
+{
+   _x.zeros(num_samples);
+
+   for (auto it = _samples.begin(); it < _samples.end(); ++it)
+   {
+      auto sample_index_it = sample_map.find(*it);
+
+      if (sample_index_it != sample_map.end())
+      {
+         _x[sample_index_it->second] = 1;
+      }
+   }
+
+   // Set object values
+   _x_set = 1;
+   _maf = (double)num_occurrences()/num_samples;
+}
+
+// Add a new comment in
+void Kmer::add_comment(const std::string& new_comment)
+{
+   if (_comment == kmer_comment_default)
+   {
+      _comment = new_comment;
+   }
+   else
+   {
+      _comment += "," + new_comment;
+   }
+}
+
+int Kmer::num_occurrences() const
+{
+   int total_occurrences;
+   if (_x_set)
+   {
+      total_occurrences = (int) accu(_x);
+   }
+   else
+   {
+      total_occurrences = _samples.size();
+   }
+
+   return total_occurrences;
+}
+
diff --git a/src/kmer.hpp b/src/kmer.hpp
new file mode 100644
index 0000000..6ddd569
--- /dev/null
+++ b/src/kmer.hpp
@@ -0,0 +1,55 @@
+/*
+ * kmer.hpp
+ * Header file for kmer class
+ */
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <vector>
+#include <unordered_map>
+
+#define ARMA_DONT_PRINT_ERRORS
+#include <armadillo>
+
+#include "significant_kmer.hpp"
+
+const std::string kmer_seq_default = "";
+const std::vector<std::string> kmer_occ_default;
+const double kmer_pvalue_default = 1;
+const double kmer_chi_pvalue_default = 1;
+const double kmer_beta_default = 0;
+const double kmer_maf_default = 0;
+const double kmer_se_default = 0;
+const std::string kmer_comment_default = "NA";
+
+class Kmer: public Significant_kmer
+{
+   public:
+      // Initialisation
+      Kmer(const std::string& sequence, const std::vector<std::string>& occurrences, const double pvalue, const double beta, const double se, const double maf);
+      Kmer(const std::string& sequence, const std::vector<std::string>& occurrences); // Initialise without calculated information
+      Kmer(); // defaults
+
+      // nonmodifying operations
+      int length() const { return _word.length(); }
+      int num_occurrences() const;
+      std::string occurrence(int i) const { return _samples[i]; }
+      std::vector<std::string> occurrence_vector() const { return _samples; }
+      arma::vec get_x() const { return _x; }
+      int has_x() const { return _x_set; }
+
+      // Modifying operations
+      void add_comment(const std::string& new_comment); // this is defined in kmer.cpp
+      void add_x(const std::unordered_map<std::string,int>& sample_map, const int num_samples); // this is defined in kmer.cpp
+
+   private:
+      arma::vec _x;
+      int _x_set;
+
+};
+
+// Overload output and input operators
+std::ostream& operator<<(std::ostream &os, const Kmer& k);
+
+std::istream& operator>>(std::istream &is, Kmer& k);
diff --git a/src/linearFunction.cpp b/src/linearFunction.cpp
new file mode 100644
index 0000000..b9c837b
--- /dev/null
+++ b/src/linearFunction.cpp
@@ -0,0 +1,39 @@
+/*
+ * File: linearFunction.cpp
+ *
+ * Likelihood, gradient and initialisation of linear function
+ * Functor, based on mlpack: www.mlpack.org
+ */
+
+#include "linkFunction.hpp"
+
+/**
+ * Evaluate the logistic regression objective function given the estimated
+ * parameters.
+ */
+double LinearLikelihood::operator()(const column_vector& parameters_in)
+   const
+{
+   // Convert from dlib column matrix to armadillo column matrix
+   arma::vec parameters = dlib_to_arma(parameters_in);
+
+   // L(b) = 1/2*||y-Xb||^2
+   double result = 0.5 * accu(square(responses - predictors * parameters));
+
+   return result;
+}
+
+// Evaluate the gradient of the logistic regression objective function.
+column_vector LinearLikelihoodGradient::operator()(const column_vector& parameters_in)
+   const
+{
+   // Convert from dlib column matrix to armadillo column matrix
+   arma::vec parameters = dlib_to_arma(parameters_in);
+   arma::vec gradient(parameters.n_elem);
+
+   // dL(b)/db = X.t()(Xb - y)
+   gradient = predictors.t() * (predictors * parameters - responses);
+
+   return arma_to_dlib(gradient);
+}
+
diff --git a/src/linkFunction.hpp b/src/linkFunction.hpp
new file mode 100644
index 0000000..65498f4
--- /dev/null
+++ b/src/linkFunction.hpp
@@ -0,0 +1,72 @@
+/*
+ * linkFunction.hpp
+ * Header file for logitFunction and linearFunction class
+*/
+
+#include "seercommon.hpp"
+
+class LinkFunction
+{
+   public:
+      // Initialisation
+      LinkFunction(const arma::mat& _predictors, const arma::vec& _responses, const double _lambda = 0)
+         : predictors(_predictors), responses(_responses), lambda(_lambda)
+      {
+      }
+
+      // Likelihood and first derivative
+      double likelihood(const column_vector& b)
+         const;
+      column_vector gradient(const column_vector& b)
+         const;
+
+   protected:
+      arma::mat predictors;
+      arma::vec responses;
+
+      double lambda;
+};
+
+class LogitLikelihood : public LinkFunction
+{
+   public:
+      LogitLikelihood(const arma::mat& _predictors, const arma::vec& _responses, const double _lambda = 0)
+         : LinkFunction(_predictors, _responses, _lambda)
+      {
+      }
+
+      double operator() (const column_vector& parameters_in) const;
+};
+
+class LogitLikelihoodGradient : public LinkFunction
+{
+   public:
+      LogitLikelihoodGradient(const arma::mat& _predictors, const arma::vec& _responses, const double _lambda = 0)
+         : LinkFunction(_predictors, _responses, _lambda)
+      {
+      }
+
+      column_vector operator() (const column_vector& parameters_in) const;
+};
+
+class LinearLikelihood : public LinkFunction
+{
+   public:
+      LinearLikelihood(const arma::mat& _predictors, const arma::vec& _responses, const double _lambda = 0)
+         : LinkFunction(_predictors, _responses, _lambda)
+      {
+      }
+
+      double operator() (const column_vector& parameters_in) const;
+};
+
+class LinearLikelihoodGradient : public LinkFunction
+{
+   public:
+      LinearLikelihoodGradient(const arma::mat& _predictors, const arma::vec& _responses, const double _lambda = 0)
+         : LinkFunction(_predictors, _responses, _lambda)
+      {
+      }
+
+      column_vector operator() (const column_vector& parameters_in) const;
+};
diff --git a/src/logitFunction.cpp b/src/logitFunction.cpp
new file mode 100644
index 0000000..2ae3546
--- /dev/null
+++ b/src/logitFunction.cpp
@@ -0,0 +1,76 @@
+/*
+ * File: logitFunction.cpp
+ *
+ * Likelihood, gradient and initialisation of logit function
+ * Functor, based on mlpack: www.mlpack.org
+ */
+
+#include "linkFunction.hpp"
+
+/**
+ * Evaluate the logistic regression objective function given the estimated
+ * parameters.
+ */
+double LogitLikelihood::operator()(const column_vector& parameters_in)
+   const
+{
+   // Convert from dlib column matrix to armadillo column matrix
+   arma::vec parameters = dlib_to_arma(parameters_in);
+
+   // The objective function is the log-likelihood function (w is the parameters
+   // vector for the model; y is the responses; x is the predictors; sig() is the
+   // sigmoid function):
+   //   f(w) = sum(y log(sig(w'x)) + (1 - y) log(sig(1 - w'x))).
+   // We want to minimize this function.  L2-regularization is just lambda
+   // multiplied by the squared l2-norm of the parameters then divided by two.
+
+   // For the regularization, we ignore the first term, which is the intercept
+   // term.
+   const double regularization = 0.5 * lambda *
+       arma::dot(parameters.col(0).subvec(1, parameters.n_elem - 1),
+                 parameters.col(0).subvec(1, parameters.n_elem - 1));
+
+   // Calculate vectors of sigmoids.  The intercept term is parameters(0, 0) and
+   // does not need to be multiplied by any of the predictors.
+   const arma::vec exponents = parameters(0) + predictors *
+       parameters.col(0).subvec(1, parameters.n_elem - 1);
+   const arma::vec sigmoid = 1.0 / (1.0 + arma::exp(-exponents));
+
+   // Assemble full objective function.  Often the objective function and the
+   // regularization as given are divided by the number of features, but this
+   // doesn't actually affect the optimization result, so we'll just ignore those
+   // terms for computational efficiency.
+   double result = 0.0;
+   for (size_t i = 0; i < responses.n_elem; ++i)
+   {
+     if (responses[i] == 1)
+       result += log(sigmoid[i]);
+     else
+       result += log(1.0 - sigmoid[i]);
+   }
+
+   return result - regularization;
+}
+
+// Evaluate the gradient of the logistic regression objective function.
+column_vector LogitLikelihoodGradient::operator()(const column_vector& parameters_in)
+   const
+{
+   // Convert from dlib column matrix to armadillo column matrix
+   arma::vec parameters = dlib_to_arma(parameters_in);
+   arma::vec gradient(parameters.n_elem);
+
+   // Regularization term.
+   arma::mat regularization;
+   regularization = lambda * parameters.col(0).subvec(1, parameters.n_elem - 1);
+
+   const arma::vec sigmoids = 1 / (1 + arma::exp(-parameters(0, 0)
+       - predictors * parameters.col(0).subvec(1, parameters.n_elem - 1)));
+
+   gradient[0] = arma::accu(responses - sigmoids);
+   gradient.col(0).subvec(1, parameters.n_elem - 1) = predictors.t() * (responses -
+       sigmoids) - regularization;
+
+   return arma_to_dlib(gradient);
+}
+
diff --git a/src/mapCmdLine.cpp b/src/mapCmdLine.cpp
new file mode 100644
index 0000000..fc8af12
--- /dev/null
+++ b/src/mapCmdLine.cpp
@@ -0,0 +1,67 @@
+/*
+ * File: mapCmdLine.cpp
+ *
+ * Reads command line input to map_back using boost
+ * program options
+ *
+ */
+
+#include "map_back.hpp"
+
+namespace po = boost::program_options; // Save some typing
+
+// Use boost::program_options to parse command line input
+// This does pretty much all the parameter checking needed
+int parseCommandLine (int argc, char *argv[], po::variables_map& vm)
+{
+   int failed = 0;
+
+   //Required options
+   po::options_description required("Required options");
+   required.add_options()
+    ("kmers,k", po::value<std::string>()->required(), "seer kmer output file")
+    ("references,r", po::value<std::string>()->required(), "file with tab separated reference name and fasta file");
+
+   po::options_description other("Other options");
+   other.add_options()
+    ("threads", po::value<size_t>()->default_value(1), ("number of threads. Suggested: " + std::to_string(std::thread::hardware_concurrency())).c_str())
+    ("help,h", "full help message");
+
+   po::options_description all;
+   all.add(required).add(other);
+
+   try
+   {
+      po::store(po::command_line_parser(argc, argv).options(all).run(), vm);
+
+      if (vm.count("help"))
+      {
+         printHelp(all);
+         failed = 1;
+      }
+      else
+      {
+         po::notify(vm);
+         failed = 0;
+      }
+
+   }
+   catch (po::error& e)
+   {
+      // Report errors from boost library
+      std::cerr << "Error in command line input: " << e.what() << "\n";
+      std::cerr << "Run 'map_back --help' for full option listing\n\n";
+      std::cerr << required << "\n" << other << "\n";
+
+      failed = 1;
+   }
+
+   return failed;
+}
+
+// Print long help message
+void printHelp(po::options_description& help)
+{
+   std::cerr << help << "\n";
+}
+
diff --git a/src/mapMain.cpp b/src/mapMain.cpp
new file mode 100644
index 0000000..b4ac2a9
--- /dev/null
+++ b/src/mapMain.cpp
@@ -0,0 +1,157 @@
+/*
+ * File: mapMain.cpp
+ *
+ * Reports exact matches of kmers to assemblies
+ *
+ */
+
+#include "map_back.hpp"
+
+int main (int argc, char *argv[])
+{
+   // Program description
+   std::cerr << "map_back: context of significant kmers\n";
+
+   // Do parsing and checking of command line params
+   // If no input options, give quick usage rather than full help
+   boost::program_options::variables_map vm;
+   if (argc == 1)
+   {
+      std::cerr << "Usage: map_back -k seer_output.txt -r references.txt > mappings.txt\n\n"
+         << "For full option details run map_back -h\n";
+      return 0;
+   }
+   else if (parseCommandLine(argc, argv, vm))
+   {
+      return 1;
+   }
+
+   // Set number of threads
+   size_t num_threads = vm["threads"].as<size_t>();
+   if (num_threads < 1)
+   {
+      num_threads = 1;
+   }
+
+   // Read all sequences into memory as Fasta objects
+   std::cerr << "Reading reference sequences into memory...\n";
+   std::vector<Fasta> sequence_cache = readSequences(vm["references"].as<std::string>());
+
+   // Loop through significant kmers
+   std::cerr << "Now mapping significant kmers...\n";
+   std::ifstream kmer_file(vm["kmers"].as<std::string>().c_str());
+   if (!kmer_file)
+   {
+      throw std::runtime_error("Could not open kmer_file " + vm["kmers"].as<std::string>() + "\n");
+   }
+   else
+   {
+      // Set up list of threads, and mutex lock on std out
+      std::mutex out_mtx;
+      std::list<std::future<void>> threads;
+
+      Significant_kmer sig_kmer;
+      while(kmer_file)
+      {
+         kmer_file >> sig_kmer;
+
+         // Check the read into sig_kmer hasn't reached end of file
+         if (!kmer_file.eof())
+         {
+            assert(num_threads >= 1);
+
+            std::cout << sig_kmer.sequence();
+
+            // sig_kmer samples and sample cache are sorted in the same order, so
+            // can go through linearly
+            std::vector<std::string> search_names = sig_kmer.samples_found();
+            std::vector<std::string>::iterator search_names_it = search_names.begin();
+
+            for (std::vector<Fasta>::iterator all_names_it = sequence_cache.begin(); all_names_it != sequence_cache.end(); ++all_names_it)
+            {
+               // For each sample we know the kmer is in, print all matches to
+               // the kmer
+               if (all_names_it->get_name() == *search_names_it)
+               {
+                  // Thread each search (i.e. per sample per kmer)
+                  if (num_threads > 1)
+                  {
+                     // Check if four searches are running. If so, wait for the
+                     // next one to finish. Wait (for a max of 100ms) so this
+                     // thread doesn't consume processing
+                     waitForThreads(threads, num_threads - 1);
+
+                     // Start a new thread asynchronously, at the back of the
+                     // queue
+                     threads.push_back(std::async(std::launch::async,
+                              &Fasta::printMappings, *all_names_it, std::ref(std::cout), sig_kmer.sequence(), std::ref(out_mtx)));
+                  }
+                  else
+                  {
+                     all_names_it->printMappings(std::cout, sig_kmer.sequence(), out_mtx);
+                  }
+
+                  ++search_names_it;
+                  if (search_names_it == search_names.end())
+                  {
+                     break;
+                  }
+               }
+            }
+
+            // Tab between every sample, line break after every kmer
+            if (num_threads > 1)
+            {
+               waitForThreads(threads, 0);
+            }
+
+            std::cout << std::endl;
+         }
+      }
+
+      std::cerr << "Done.\n";
+   }
+
+}
+
+// Stores all fasta sequences in a vector of Fasta objects
+std::vector<Fasta> readSequences(const std::string& reference_file)
+{
+   std::vector<Fasta> sequences;
+
+   std::ifstream ifs(reference_file.c_str());
+   if (!ifs)
+   {
+      throw std::runtime_error("Could not open reference file: " + reference_file + "\n");
+   }
+   else
+   {
+      std::string name, fasta_file = "";
+      while(ifs)
+      {
+         ifs >> name >> fasta_file;
+         sequences.push_back(Fasta(name, fasta_file));
+      }
+   }
+
+   std::sort(sequences.begin(), sequences.end(), Fasta::compareFasta);
+   return sequences;
+}
+
+// Waits until there are #spaces threads left unfinished
+void waitForThreads(std::list<std::future<void>>& thread_list, const size_t leave_running)
+{
+   auto list_it = thread_list.begin();
+   while (thread_list.size() > leave_running)
+   {
+      auto status = list_it->wait_for(std::chrono::milliseconds(thread_wait));
+      if (status == std::future_status::ready)
+      {
+         list_it = thread_list.erase(list_it);
+      }
+      else if (list_it++ == thread_list.end())
+      {
+         list_it = thread_list.begin();
+      }
+   }
+}
diff --git a/src/map_back.hpp b/src/map_back.hpp
new file mode 100644
index 0000000..357a556
--- /dev/null
+++ b/src/map_back.hpp
@@ -0,0 +1,43 @@
+/*
+ *
+ * map_back.hpp
+ * Header file for map_back
+ *
+ */
+
+// C/C++/C++11 headers
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+#include <string>
+#include <iterator>
+#include <vector>
+#include <functional>
+#include <stdexcept>
+#include <future>
+#include <thread>
+#include <chrono>
+#include <list>
+#include <assert.h>
+
+// Boost headers
+#include <boost/program_options.hpp>
+
+// Classes
+#include "fasta.hpp"
+#include "significant_kmer.hpp"
+
+// Constants
+const int thread_wait = 100; //time to wait for each thread in ms
+
+// Structs
+
+// Function headers
+// mapMain.cpp
+std::vector<Fasta> readSequences(const std::string& reference_file);
+void waitForThreads(std::list<std::future<void>>& thread_list, const size_t leave_running);
+
+// mapCmdLine.cpp
+int parseCommandLine (int argc, char *argv[], boost::program_options::variables_map& vm);
+void printHelp(boost::program_options::options_description& help);
+
diff --git a/src/sample.cpp b/src/sample.cpp
new file mode 100644
index 0000000..9a551aa
--- /dev/null
+++ b/src/sample.cpp
@@ -0,0 +1,44 @@
+/*
+ * File: sample.cpp
+ *
+ * Helper functions for the sample class
+ *
+ */
+
+#include "sample.hpp"
+
+const double default_pheno = 0;
+const std::string default_name = "";
+const int default_continuous = 0;
+
+Sample::Sample(double p, std::string n)
+   :phenotype(p), name(n)
+{
+   if (p != 0 && p != 1)
+   {
+      continuous_pheno = 1;
+   }
+   else
+   {
+      continuous_pheno = 0;
+   }
+}
+
+Sample::Sample()
+   :phenotype(default_pheno), continuous_pheno(default_continuous), name(default_name)
+{
+}
+
+std::istream& operator>>(std::istream &is, Sample& s)
+{
+   double phenotype;
+   std::string FID, IID;
+
+   is >> FID >> IID >> phenotype;
+   if (is)
+   {
+      s = Sample(phenotype, IID);
+   }
+
+   return is;
+}
diff --git a/src/sample.hpp b/src/sample.hpp
new file mode 100644
index 0000000..6812a0b
--- /dev/null
+++ b/src/sample.hpp
@@ -0,0 +1,31 @@
+/*
+ * sample.hpp
+ * Header file for sample class
+ */
+
+#include <iostream>
+#include <string>
+
+// Samples have a name and phenotype
+// Covariates will be added later
+class Sample
+{
+   public:
+      // Initialisation
+      Sample(double phenotype, std::string name);
+      Sample();
+
+      // nonmodifying operations
+      double pheno() const { return phenotype; }
+      int continuous() const { return continuous_pheno; }
+      std::string iid() const { return name; }
+      static bool compareSamples(Sample lhs, Sample rhs) { return (lhs.name < rhs.name); }
+
+   private:
+      double phenotype;
+      int continuous_pheno;
+      std::string name;
+};
+
+// Overload input operator
+std::istream& operator>>(std::istream &is, Sample& s);
diff --git a/src/seer.hpp b/src/seer.hpp
new file mode 100644
index 0000000..3273ae0
--- /dev/null
+++ b/src/seer.hpp
@@ -0,0 +1,45 @@
+/*
+ *
+ * seer.hpp
+ * Header file for seer package
+ *
+ */
+
+// Common headers
+//#include "seercommon.hpp"
+#include "linkFunction.hpp" // This includes seercommon.hpp
+
+// dlib headers
+#include <dlib/optimization.h>
+
+// Constants
+//    Default options
+const std::string pval_default = "10e-8";
+const double convergence_limit = 10e-8;
+const unsigned int max_nr_iterations = 1000;
+
+// Starting value for beta vectors (except intercept)
+// Should be >0. This value is based on RMS in example study
+const double bfgs_start_beta = 0.12;
+
+// seerCmdLine headers
+int parseCommandLine (int argc, char *argv[], boost::program_options::variables_map& vm);
+void printHelp(boost::program_options::options_description& help);
+
+// seerBinaryAssoc headers
+void logisticTest(Kmer& k, const arma::vec& y);
+void logisticTest(Kmer& k, const arma::vec& y_train, const arma::mat& mds);
+
+void doLogit(Kmer& k, const arma::vec& y_train, const arma::mat& x_train);
+void newtonRaphson(Kmer& k, const arma::vec& y_train, const arma::mat& x_design, const bool firth = 0);
+
+arma::mat varCovarMat(const arma::mat& x, const arma::mat& b);
+arma::vec predictLogitProbs(const arma::mat& x, const arma::vec& b);
+
+// seerContinuousAssoc headers
+void linearTest(Kmer& k, const arma::vec& y_train);
+void linearTest(Kmer& k, const arma::vec& y_train, const arma::mat& mds);
+
+void doLinear(Kmer& k, const arma::vec& y_train, const arma::mat& x_train);
+arma::vec predictLinearProbs(const arma::mat& x, const arma::vec& b);
+
diff --git a/src/seerBinaryAssoc.cpp b/src/seerBinaryAssoc.cpp
new file mode 100644
index 0000000..ec4f128
--- /dev/null
+++ b/src/seerBinaryAssoc.cpp
@@ -0,0 +1,199 @@
+/*
+ * File: seerBinaryAssoc.cpp
+ *
+ * Implements logistic regression association tests for seer
+ *
+ */
+
+#include "seer.hpp"
+
+// Logistic fit without covariates
+void logisticTest(Kmer& k, const arma::vec& y_train)
+{
+   // Train classifier
+   arma::mat x_train = k.get_x();
+   doLogit(k, y_train, x_train);
+}
+
+// Logistic fit with covariates
+void logisticTest(Kmer& k, const arma::vec& y_train, const arma::mat& mds)
+{
+   // Train classifier
+   arma::mat x_train = arma::join_rows(k.get_x(), mds);
+   doLogit(k, y_train, x_train);
+}
+
+void doLogit(Kmer& k, const arma::vec& y_train, const arma::mat& x_train)
+{
+   arma::mat x_design = join_rows(arma::mat(x_train.n_rows,1,arma::fill::ones), x_train);
+   column_vector starting_point(x_design.n_cols);
+
+   starting_point(0) = log(mean(y_train)/(1 - mean(y_train)));
+   for (size_t i = 1; i < x_design.n_cols; ++i)
+   {
+      starting_point(i) = bfgs_start_beta;
+   }
+
+   try
+   {
+      // Use BFGS optimiser in dlib to maximise likelihood function by chaging the
+      // b vector, which will end in starting_point
+      dlib::find_max(dlib::bfgs_search_strategy(),
+                  dlib::objective_delta_stop_strategy(convergence_limit),
+                  LogitLikelihood(x_train, y_train), LogitLikelihoodGradient(x_train, y_train),
+                  starting_point, -1);
+
+      // Extract beta
+      arma::vec b_vector = dlib_to_arma(starting_point);
+      k.beta(b_vector(1));
+
+      // Extract p-value
+      //
+      //
+      // W = B_1 / SE(B_1) ~ N(0,1)
+      //
+      // In the special case of a logistic regression, abs can be taken rather
+      // than ^2 as responses are 0 or 1
+      //
+      double se = pow(varCovarMat(x_design, b_vector)(1,1), 0.5);
+      k.standard_error(se);
+
+      double W = std::abs(b_vector(1)) / se; // null hypothesis b_1 = 0
+      k.p_val(normalPval(W));
+
+#ifdef SEER_DEBUG
+      std::cerr << "Wald statistic: " << W << "\n";
+      std::cerr << "p-value: " << k.p_val() << "\n";
+#endif
+   }
+   // Sometimes won't converge, use N-R instead
+   catch (std::exception& e)
+   {
+      k.add_comment("bfgs-fail");
+      newtonRaphson(k, y_train, x_design);
+   }
+}
+
+void newtonRaphson(Kmer& k, const arma::vec& y_train, const arma::mat& x_design, const bool firth)
+{
+   // Keep iterations to track convergence
+   // Also useful to keep second derivative, for calculating p-value
+   std::vector<arma::vec> parameter_iterations;
+   arma::mat var_covar_mat;
+
+   // Could get starting point from a linear regression, which is fast
+   // and will reduce number of n-r iterations
+   // Set up design matrix, and calculate (X'X)^-1
+   // Seems more reliable to go for b = 0, plus a non-zero intercept
+   // See: doi:10.1016/S0169-2607(02)00088-3
+   arma::vec starting_point = arma::zeros(x_design.n_cols);
+   starting_point(0) = log(mean(y_train)/(1 - mean(y_train)));
+
+   parameter_iterations.push_back(starting_point);
+
+   for (unsigned int i = 0; i < max_nr_iterations; ++i)
+   {
+      arma::vec b0 = parameter_iterations.back();
+      arma::vec y_pred = predictLogitProbs(x_design, b0);
+
+      arma::vec b1 = b0;
+      var_covar_mat = inv_covar(x_design.t() * diagmat(y_pred % (arma::ones(y_pred.n_rows) - y_pred)) * x_design);
+      if (firth)
+      {
+         // Firth logistic regression
+         // See: DOI: 10.1002/sim.1047
+         arma::mat W = diagmat(y_pred * (1 - y_pred));
+         // Hat matrix
+         // Note: W is diagonal so X.t() * W * X is still sympd
+         arma::mat H = sqrt(W) * x_design * inv_covar(x_design.t() * W * x_design) * x_design.t() * sqrt(W);
+
+         arma::vec correction(y_train.n_rows);
+         correction.fill(0.5);
+
+         b1 += var_covar_mat * (y_train - y_pred + diagmat(H) % (correction - y_pred));
+      }
+      else
+      {
+         b1 += var_covar_mat * x_design.t() * (y_train - y_pred);
+      }
+      parameter_iterations.push_back(b1);
+
+      if (std::abs(b1(1) - b0(1)) < convergence_limit)
+      {
+         break;
+      }
+   }
+
+#ifdef SEER_DEBUG
+   std::cerr << "Number of iterations: " << parameter_iterations.size() << "\n";
+#endif
+   // If convergence not reached, try Firth logistic regression
+   if (parameter_iterations.size() == max_nr_iterations)
+   {
+      if (!firth)
+      {
+         k.add_comment("nr-fail");
+         newtonRaphson(k, y_train, x_design, 1);
+      }
+      else
+      {
+         k.add_comment("firth-fail");
+      }
+   }
+   else
+   {
+      k.beta(parameter_iterations.back()(1));
+
+      double se = pow(var_covar_mat(1,1), 0.5);
+      k.standard_error(se);
+
+      double W = std::abs(k.beta()) / se;
+      k.p_val(normalPval(W));
+
+#ifdef SEER_DEBUG
+      std::cerr << "Wald statistic: " << W << "\n";
+      std::cerr << "p-value: " << k.p_val() << "\n";
+#endif
+   }
+}
+
+// Returns var-covar matrix for logistic function
+arma::mat varCovarMat(const arma::mat& x, const arma::mat& b)
+{
+   // var-covar matrix = inv(I)
+   // where I is the Fisher information matrix
+   // I = d^2/d(b^2)[log L]
+   //
+   // see http://czep.net/stat/mlelr.pdf
+
+   // First get logit of x values using parameters from fit, and transform to
+   // p(1-p)
+   arma::vec y_pred = predictLogitProbs(x, b);
+   arma::vec y_trans = y_pred % (1 - y_pred);
+
+   // Fill elements of I, which are sums of element by element vector multiples
+   arma::mat I(b.n_elem, b.n_elem);
+   unsigned int j_max = I.n_rows;
+   for (unsigned int i = 0; i<I.n_cols; ++i)
+   {
+      for (unsigned int j = i; j < j_max; j++)
+      {
+         I(i,j) = accu(y_trans % x.col(i) % x.col(j));
+         if (i != j)
+         {
+            I(j,i) = I(i,j); // I is symmetric - only need to calculate upper triangle
+         }
+      }
+   }
+
+   return inv_covar(I);
+}
+
+// returns y = logit(bx)
+arma::vec predictLogitProbs(const arma::mat& x, const arma::vec& b)
+{
+   const arma::vec exponents = x * b;
+   const arma::vec y = 1.0 / (1.0 + arma::exp(-exponents));
+
+   return y;
+}
diff --git a/src/seerChiFilter.cpp b/src/seerChiFilter.cpp
new file mode 100644
index 0000000..ed7b87f
--- /dev/null
+++ b/src/seerChiFilter.cpp
@@ -0,0 +1,127 @@
+/*
+ * File: seerChiFilter
+ *
+ * Implements chi^2 and welch two sample t test for seer and kmds filtering
+ *
+ */
+
+#include "seercommon.hpp"
+
+const double normalArea = pow(2*M_PI, -0.5);
+
+// Basic chi^2 test, using contingency table
+double chiTest(const arma::vec& x, const arma::vec& y)
+{
+   double chisq = 0;
+
+   // Contigency table
+   //         unaffected affected
+   // present a          b
+   // absent  c          d
+   //
+   // Use doubles for compatibility with det function in arma::mat
+   double a = 0, b = 0, c = 0, d = 0;
+
+   arma::vec::const_iterator j = y.begin();
+   for (arma::vec::const_iterator i = x.begin(); i!=x.end(); ++i)
+   {
+      if (*j == 0) {
+         if (*i == 0){
+            c++;
+         } else {
+            a++;
+         }
+      } else {
+         if (*i == 0){
+            d++;
+         } else {
+            b++;
+         }
+      }
+      j++;
+   }
+
+   arma::mat::fixed<2, 2> table = {a, b, c, d};
+#ifdef SEER_DEBUG
+   arma::Mat<int>::fixed<2, 2> tab_out = {int (a), int (b), int (c), int(d)};
+   std::cerr << tab_out << "\n";
+#endif
+
+   int N = accu(table);
+
+   if (N == 0)
+   {
+      throw std::logic_error("Empty table for chisq test\n");
+   }
+
+   // Without Yates' continuity correction
+   chisq = N * pow(det(table), 2);
+   for (int i = 0; i < 2; ++i)
+   {
+      chisq /= accu(table.row(i)) * accu(table.col(i));
+   }
+
+   // For df = 1, as here, chi^2 == N(0,1)^2 (standard normal dist.)
+   double p_value = normalPval(pow(chisq, 0.5));
+#ifdef SEER_DEBUG
+   std::cerr << "chisq:" << chisq << "\n";
+   std::cerr << "chisq p: " << p_value << "\n";
+#endif
+   return p_value;
+}
+
+// Welch two sample t-test, for continuous phenotypes
+double welchTwoSamplet(const arma::vec& x, const arma::vec& y)
+{
+   // Subset into present and absent groups
+   arma::vec group1 = y.elem(find(x==0));
+   arma::vec group2 = y.elem(find(x==1));
+
+   // Calculate group means and variances
+   double x1 = mean(group1);
+   double x2 = mean(group2);
+   double v1 = var(group1);
+   double v2 = var(group2);
+
+   // t and degrees freedom for test
+   double t = (x1 - x2)*pow((v1/group1.n_rows + v2/group2.n_rows), -0.5);
+   double df = pow((v1/group1.n_rows + v2/group2.n_rows), 2) / (pow(v1/group1.n_rows,2)/(group1.n_rows-1) + pow(v2/group2.n_rows,2)/(group2.n_rows-1));
+
+   // Calculate p-value from t distribution
+   boost::math::students_t t_dist(df);
+   double p_val = 2 * (1 - boost::math::cdf(t_dist, t));
+#ifdef SEER_DEBUG
+   std::cerr << "welch t:" << t << "df:" << df << "\n";
+   std::cerr << "welch p-val:" << p_val << "\n";
+#endif
+
+   return p_val;
+}
+
+// Returns p-value for a test statistic that is >0 and standard normally distributed
+double normalPval(double testStatistic)
+{
+   double p_val = 0;
+   if (testStatistic < 5)
+   {
+      boost::math::normal s;
+
+      p_val = 2 * (1 - boost::math::cdf(s, testStatistic));
+   }
+   else
+   {
+      // For large z need to use a bound
+      // See http://stats.stackexchange.com/questions/13690/how-to-compute-the-probability-associated-with-absurdly-large-z-scores
+      //
+      // Upper bound
+      // S(z) <= phi(z)/z
+      // cdf = 1-(0.5 * S(z))
+      // At z = 5 correct to +/- 2.5%
+#ifdef SEER_DEBUG
+      std::cerr << "using erfc bound rather than 'exact' function\n";
+#endif
+      p_val = 2 * exp(-0.5*pow(testStatistic,2))*normalArea/testStatistic;
+   }
+
+   return p_val;
+}
diff --git a/src/seerCmdLine.cpp b/src/seerCmdLine.cpp
new file mode 100644
index 0000000..efb34bb
--- /dev/null
+++ b/src/seerCmdLine.cpp
@@ -0,0 +1,102 @@
+/*
+ * File: seerCmdLine.cpp
+ *
+ * Reads command line input to seer using boost
+ * program options
+ *
+ */
+
+#include "seer.hpp"
+
+namespace po = boost::program_options; // Save some typing
+
+// Use boost::program_options to parse command line input
+// This does pretty much all the parameter checking needed
+int parseCommandLine (int argc, char *argv[], po::variables_map& vm)
+{
+   int failed = 0;
+
+   //Required options
+   po::options_description required("Required options");
+   required.add_options()
+    ("kmers,k", po::value<std::string>()->required(), "dsm kmer output file")
+    ("pheno,p", po::value<std::string>()->required(), ".pheno metadata");
+
+   // kmds options
+   po::options_description covar("Covariate options");
+   covar.add_options()
+    ("struct", po::value<std::string>(), "mds values from kmds")
+    ("covar_file", po::value<std::string>(), "file containing covariates")
+    ("covar_list", po::value<std::string>(), "list of columns covariates to use. Format is 1,2q,3 (use q for quantitative)");
+
+   //Optional filtering parameters
+   //NB pval cutoffs are strings for display, and are converted to floats later
+   po::options_description performance("Performance options");
+   performance.add_options()
+    ("threads", po::value<int>()->default_value(1), ("number of threads. Suggested: " + std::to_string(std::thread::hardware_concurrency())).c_str());
+
+   //Optional filtering parameters
+   //NB pval cutoffs are strings for display, and are converted to floats later
+   po::options_description filtering("Filtering options");
+   filtering.add_options()
+    ("no_filtering", "turn off all filtering and peform tests on all kmers input")
+    ("max_length", po::value<long int>()->default_value(max_length_default), "maximum kmer length")
+    ("maf", po::value<double>()->default_value(maf_default), "minimum kmer frequency")
+    ("min_words", po::value<int>(), "minimum kmer occurences. Overrides --maf")
+    ("positive_only", "only test words with a predicted positive effect direction")
+    ("chisq", po::value<std::string>()->default_value(chisq_default), "p-value threshold for initial chi squared test. Set to 1 to show all")
+    ("pval", po::value<std::string>()->default_value(pval_default), "p-value threshold for final logistic test. Set to 1 to show all");
+
+   po::options_description other("Other options");
+   other.add_options()
+    ("print_samples", "print lists of samples significant kmers were found in")
+    ("help,h", "full help message");
+
+   po::options_description all;
+   all.add(required).add(covar).add(performance).add(filtering).add(other);
+
+   try
+   {
+      po::store(po::command_line_parser(argc, argv).options(all).run(), vm);
+
+      if (vm.count("help"))
+      {
+         printHelp(all);
+         failed = 1;
+      }
+      else
+      {
+         po::notify(vm);
+         failed = 0;
+
+         // Check input files exist, and can stat
+         if (!fileStat(vm["kmers"].as<std::string>()) || !fileStat(vm["pheno"].as<std::string>()))
+         {
+            failed = 1;
+         }
+         else if (vm.count("struct") && !fileStat(vm["struct"].as<std::string>()))
+         {
+            failed = 1;
+         }
+      }
+
+   }
+   catch (po::error& e)
+   {
+      // Report errors from boost library
+      std::cerr << "Error in command line input: " << e.what() << "\n";
+      std::cerr << "Run 'seer --help' for full option listing\n\n";
+      std::cerr << required << "\n" << other << "\n";
+
+      failed = 1;
+   }
+
+   return failed;
+}
+
+// Print long help message
+void printHelp(po::options_description& help)
+{
+   std::cerr << help << "\n";
+}
+
diff --git a/src/seerCommon.cpp b/src/seerCommon.cpp
new file mode 100644
index 0000000..b3907a3
--- /dev/null
+++ b/src/seerCommon.cpp
@@ -0,0 +1,243 @@
+/*
+ * File: seerCommon.cpp
+ *
+ * Functions common to seer and kmds
+ * Program options parsing
+ *
+ */
+
+#include "seercommon.hpp"
+
+// Parse command line parameters into usable program parameters
+cmdOptions verifyCommandLine(boost::program_options::variables_map& vm, const std::vector<Sample>& samples)
+{
+   cmdOptions verified;
+
+   verified.chi_cutoff = stod(vm["chisq"].as<std::string>());
+   verified.max_length = vm["max_length"].as<long int>();
+
+   if(vm.count("kmers"))
+   {
+      verified.kmers = vm["kmers"].as<std::string>();
+   }
+
+   if(vm.count("output"))
+   {
+      verified.output = vm["output"].as<std::string>();
+   }
+
+   if (vm.count("pval"))
+   {
+      verified.log_cutoff = stod(vm["pval"].as<std::string>());
+   }
+
+   // Verify MDS options in a separate function
+   // This is pc, size and number of threads
+   verifyMDSOptions(verified, vm);
+
+   verified.filter = 1;
+   if (vm.count("no_filtering"))
+   {
+      verified.filter = 0;
+   }
+   else
+   {
+      // Error check filtering options
+      if(vm.count("positive_only"))
+      {
+         verified.positive = 1;
+      }
+      else
+      {
+         verified.positive = 0;
+      }
+
+      verified.min_words = 0;
+      if (vm.count("min_words"))
+      {
+         int min_words_in = vm["min_words"].as<int>();
+         if (min_words_in >= 0)
+         {
+            verified.min_words = min_words_in;
+         }
+         else
+         {
+            badCommand("min_words", std::to_string(min_words_in));
+         }
+      }
+      else
+      {
+         double maf_in = vm["maf"].as<double>();
+         if (maf_in >= 0)
+         {
+            verified.min_words = static_cast<unsigned int>(samples.size() * maf_in);
+         }
+         else
+         {
+            badCommand("maf", std::to_string(maf_in));
+         }
+      }
+
+      if (verified.min_words > samples.size())
+      {
+         badCommand("min_words/maf", std::to_string(verified.min_words));
+      }
+      verified.max_words = samples.size() - verified.min_words;
+   }
+
+   verified.print_samples = 0;
+   if (vm.count("print_samples"))
+   {
+      verified.print_samples = 1;
+   }
+
+   return verified;
+}
+
+// Check these options in a separate function, which is also usable by kmds
+// in mds_concat mode
+void verifyMDSOptions(cmdOptions& verified, boost::program_options::variables_map& vm)
+{
+   // Number of threads is also needed by both
+   if (vm.count("threads") && vm["threads"].as<int>() > 0)
+   {
+      verified.num_threads = vm["threads"].as<int>();
+   }
+   else
+   {
+      verified.num_threads = 1;
+   }
+
+   if (vm.count("pc"))
+   {
+      if (vm["pc"].as<int>() > 0)
+      {
+         verified.pc = vm["pc"].as<int>();
+      }
+      else
+      {
+         badCommand("pc", std::to_string(vm["pc"].as<int>()));
+      }
+   }
+
+   if (vm.count("size"))
+   {
+      if (vm["size"].as<long int>() > 0)
+      {
+         verified.size = vm["size"].as<long int>();
+      }
+      else
+      {
+         badCommand("size", std::to_string(vm["size"].as<long int>()));
+      }
+   }
+
+   if (vm.count("write_distances"))
+   {
+      verified.write_distances = 1;
+   }
+   else
+   {
+      verified.write_distances = 0;
+   }
+}
+
+// Check for continuous phenotype. If even one sample has neither 0 or 1 as
+// phenotype
+int continuousPhenotype (const std::vector<Sample>& sample_list)
+{
+   int cont_pheno = 0;
+   for (std::vector<Sample>::const_iterator it = sample_list.begin(); it != sample_list.end(); ++it)
+   {
+      if (it->continuous())
+      {
+         cont_pheno = 1;
+         break;
+      }
+   }
+
+   // Write inferred output to terminal
+   if (cont_pheno)
+   {
+      std::cerr << "Detected continuous phenotype\n";
+   }
+   else
+   {
+      std::cerr << "Detected binary phenotype\n";
+   }
+
+   return cont_pheno;
+}
+
+// Conversion functions required as code is a mix of dlib and armadillo
+// matrices
+// This could obviously be improved...
+arma::vec dlib_to_arma(const column_vector& dlib_vec)
+{
+   arma::vec converted(dlib_vec.nr());
+
+   for (unsigned int i = 0; i < dlib_vec.nr(); ++i)
+   {
+      converted(i) = dlib_vec(i);
+   }
+
+   return converted;
+}
+
+column_vector arma_to_dlib(const arma::vec& arma_vec)
+{
+   column_vector converted;
+   converted.set_size(arma_vec.n_elem);
+
+   for (unsigned int i = 0; i < arma_vec.n_elem; ++i)
+   {
+      converted(i) = arma_vec(i);
+   }
+
+   return converted;
+}
+
+// Converts a stl vector of strings to an arma mat of doubles
+arma::mat vecToMat(const std::vector<std::string>& in_col)
+{
+   arma::mat out_mat(in_col.size(), 1);
+
+   for (unsigned int i = 0; i < in_col.size(); ++i)
+   {
+      out_mat(i, 0) = std::stof(in_col[i]);
+   }
+
+   return out_mat;
+}
+
+// Normalises a matrix's columns: subtract mean, divide by std dev
+void normaliseMatCols(arma::mat& matrix_in)
+{
+   arma::mat means = arma::mean(matrix_in);
+   arma::mat stddevs = arma::stddev(matrix_in);
+
+   matrix_in.each_row() -= means;
+   matrix_in.each_row() /= stddevs;
+}
+
+// Inverts a symmetric positive matrix, checking for errors
+// Not passed by ref, creates a copy. Right thing to do?
+arma::mat inv_covar(arma::mat A)
+{
+   // Try the default. Internally this uses Cholesky decomposition and back
+   // solves. For large condition numbers it fails.
+   arma::mat B;
+   if (!inv_sympd(B, A))
+   {
+      // If the Cholesky decomposition fails, try pseudo-inverse
+      // This uses SVD:
+      // A = U*S*V.t() => A^-1 = V*S^-1*U.t()
+      // and ignores small values in the S matrix
+      if (!arma::pinv(B, A))
+      {
+         std::cerr << "A matrix inversion failed!" << std::endl;
+      }
+   }
+
+   return B;
+}
diff --git a/src/seerContinuousAssoc.cpp b/src/seerContinuousAssoc.cpp
new file mode 100644
index 0000000..2b35b5a
--- /dev/null
+++ b/src/seerContinuousAssoc.cpp
@@ -0,0 +1,100 @@
+/*
+ * File: seerContinuousAssoc.cpp
+ *
+ * Implements linear regression association test for seer
+ *
+ */
+
+#include "seer.hpp"
+
+// Linear fit without covariates
+void linearTest(Kmer& k, const arma::vec& y_train)
+{
+   // Train classifier
+   arma::mat x_train = k.get_x();
+   doLinear(k, y_train, x_train);
+}
+
+// Linear fit with covariates
+void linearTest(Kmer& k, const arma::vec& y_train, const arma::mat& mds)
+{
+   // Train classifier
+   arma::mat x_train = arma::join_rows(k.get_x(), mds);
+   doLinear(k, y_train, x_train);
+}
+
+// Run linear fit
+void doLinear(Kmer& k, const arma::vec& y_train, const arma::mat& x_train)
+{
+   // Set up design matrix
+   arma::mat x_design = join_rows(arma::mat(x_train.n_rows,1,arma::fill::ones), x_train);
+   arma::vec b;
+
+   try
+   {
+      // A starting point for the optimiser
+      column_vector starting_point(x_design.n_cols);
+      starting_point(0) = mean(y_train);
+      for (size_t i = 1; i < x_design.n_cols; ++i)
+      {
+         starting_point(i) = bfgs_start_beta;
+      }
+
+      // Use BFGS optimiser in dlib to minimise OLS difference by chaging the
+      // b vector, which will end in starting_point
+      dlib::find_min(dlib::bfgs_search_strategy(),
+                  dlib::objective_delta_stop_strategy(convergence_limit),
+                  LinearLikelihood(x_design, y_train), LinearLikelihoodGradient(x_design, y_train),
+                  starting_point, -1);
+
+      // Extract beta
+      b = dlib_to_arma(starting_point);
+
+   }
+   catch (std::exception& e)
+   {
+#ifdef SEER_DEBUG
+      std::cerr << "bfgs failed with " << e.what() << std::endl;
+#endif
+      k.add_comment("bfgs-fail");
+
+      // Calculate (X'X)^-1. Use QR decomposition to solve.
+      // Might be slower than Cholesky, but numerically is more stable
+      arma::mat Q, R;
+
+      // Regress beta: b = (X'X)^-1*Xy
+      // i.e. solve Rb = Q.t() * y where X=QR
+      arma::qr(Q, R, x_design);
+      arma::solve(b, R, Q.t() * y_train);
+   }
+
+   k.beta(b(1));
+
+   // Extract p-value
+   //
+   // W = B_1 / SE(B_1) ~ N(0,1)
+   //
+   // SE(B_1) = MSE * (X'X)^-1
+   // MSE = sum(Y_i-Y'_i)^2 / n-2
+   //
+   double MSE = accu(square(y_train - predictLinearProbs(x_design, b))) / (x_train.n_rows - 2);
+   double se = pow((inv_covar(x_design.t()*x_design)(1,1) * MSE), 0.5);
+   k.standard_error(se);
+
+   double W = std::abs(k.beta()) / (se); // null hypothesis b_1 = 0
+   k.p_val(normalPval(W));
+
+#ifdef SEER_DEBUG
+   std::cerr << "Wald statistic: " << W << "\n";
+   std::cerr << "p-value: " << k.p_val() << "\n";
+#endif
+}
+
+// returns y' = bx
+arma::vec predictLinearProbs(const arma::mat& x, const arma::vec& b)
+{
+   const arma::vec y = x * b;
+
+   return y;
+}
+
diff --git a/src/seerErr.cpp b/src/seerErr.cpp
new file mode 100644
index 0000000..dce2cd4
--- /dev/null
+++ b/src/seerErr.cpp
@@ -0,0 +1,14 @@
+/*
+ * File: seerErr.cpp
+ *
+ * Throws error messages
+ *
+ */
+
+#include "seercommon.hpp"
+
+void badCommand(const std::string& command, const std::string& value)
+{
+   throw std::runtime_error("Bad " + command + " specified: " + value + "\n");
+}
+
diff --git a/src/seerFilter.cpp b/src/seerFilter.cpp
new file mode 100644
index 0000000..085b214
--- /dev/null
+++ b/src/seerFilter.cpp
@@ -0,0 +1,82 @@
+/*
+ * File: seerFilter.cpp
+ *
+ * Filters kmers that won't be meaningfully associated.
+ * Saves time over performing regressions on all, and reduces false positives
+ *
+ */
+
+#include "seercommon.hpp"
+
+// Wrapper to all filter functions
+int passFilters(const cmdOptions& filterOptions, Kmer& k, const std::vector<Sample>& samples, const arma::vec& y, const int continuous_phenotype)
+{
+   int pass = 0;
+
+   if (passBasicFilters(k, filterOptions.max_length, filterOptions.min_words, filterOptions.max_words))
+   {
+      // Don't bother with this if not running stats tests
+      pass = 1;
+
+      try  // Some chi^2 tests may diverge - proceed anyway for now
+      {
+         pass = passStatsFilters(k.get_x(), y, filterOptions.chi_cutoff, continuous_phenotype, filterOptions.positive);
+      }
+      catch (std::exception& e)
+      {
+         std::cerr << "kmer " + k.sequence() + " failed chisq test with error: " + e.what() + "\n";
+         pass = 1;
+      }
+   }
+
+   return pass;
+}
+
+int passBasicFilters(const Kmer& k, const int max_length, const int min_words, const int max_words)
+{
+   int passed = 1;
+
+   // Don't test long kmers
+   if (k.length() > max_length)
+   {
+      passed = 0;
+   }
+
+   // Impose min words
+   // TODO may want to make this more sophisticated, make sure there are at
+   // least ten words in each category
+   if (passed && (k.num_occurrences() < min_words || k.num_occurrences() > max_words))
+   {
+      passed = 0;
+   }
+
+   return passed;
+}
+
+int passStatsFilters(const arma::vec& x, const arma::vec& y, const double chi_cutoff, const int continuous_phenotype, const int positive_only)
+{
+   int passed = 1;
+
+   if (continuous_phenotype)
+   {
+      if (welchTwoSamplet(x, y) > chi_cutoff)
+      {
+         passed = 0;
+      }
+   }
+   else
+   {
+      // Test positive effects only
+      // i.e. having kmer associates with having phenotype
+      if (positive_only && dot(y - x, y - x) <= 0.5*y.n_rows)
+      {
+         passed = 0;
+      }
+      else if (chiTest(x, y) > chi_cutoff)
+      {
+         passed = 0;
+      }
+   }
+
+   return passed;
+}
diff --git a/src/seerIO.cpp b/src/seerIO.cpp
new file mode 100644
index 0000000..82e39a2
--- /dev/null
+++ b/src/seerIO.cpp
@@ -0,0 +1,317 @@
+/*
+ * File: seerIO.cpp
+ *
+ * Controls: reading in pheno to sample object
+ * Open (zipped) dsm file
+ * Internal format conversion
+ *
+ * NB: some input and output used overridden operators in
+ * <class>.cpp files
+ *
+ */
+#include "seercommon.hpp"
+
+std::regex gzipped(".+\\.gz"); // matches .gz at the end of a string (as regex match
+                               // matches a whole string)
+std::regex covar_regex("^(\\d+)$");
+std::regex q_covar_regex("^(\\d+)q$");
+
+/* .pheno files
+ * space separated:
+ * FID, IID, phenotype (1 control, 2 case)
+ */
+void readPheno(const std::string& filename, std::vector<Sample>& samples, std::unordered_map<std::string,int>& sample_map)
+{
+   std::ifstream ist(filename.c_str());
+
+   if (!ist)
+   {
+      throw std::runtime_error("Could not open pheno file " + filename + "\n");
+   }
+
+   Sample s;
+   int sample_index = 0;
+   while (ist >> s)
+   {
+      samples.push_back(s);
+
+      sample_map[s.iid()] = sample_index;
+      sample_index++;
+   }
+
+   // Always keep samples sorted, for consistency between programs
+   std::sort(samples.begin(), samples.end(), Sample::compareSamples);
+}
+
+// Open dsm files, which are possibly zipped
+void openDsmFile(igzstream& dsm_stream, const std::string& file_name)
+{
+   // Check for a .gz extension
+   if (!std::regex_match(file_name, gzipped))
+   {
+      // Warn
+      std::cerr << "WARNING: Input file " + file_name
+         + " is not gzip compressed, which is recommended\n";
+   }
+
+   dsm_stream.open(file_name.c_str()); // Push binary file into buffer
+
+   // Set stream buffer of istream to the one just opened, and check ok
+   if (!dsm_stream.good())
+   {
+      throw std::runtime_error("Could not open kmer file " + file_name + "\n");
+   }
+
+}
+
+arma::vec constructVecY(const std::vector<Sample>& samples)
+{
+   arma::vec y;
+   y.zeros(samples.size());
+
+   for (unsigned int i = 0; i < samples.size(); ++i)
+   {
+      y[i] = samples[i].pheno();
+   }
+
+   return y;
+}
+
+void writeMDS(const std::string& file_name, const arma::mat& MDS)
+{
+   MDS.save(file_name, arma::hdf5_binary);
+}
+
+void writeDistances(const std::string& file_name, const arma::mat& distances)
+{
+   distances.save(file_name, arma::csv_ascii);
+}
+
+arma::mat readMDS(const std::string& file_name)
+{
+   arma::mat MDS;
+
+   if (fileStat(file_name))
+   {
+      MDS.load(file_name, arma::hdf5_binary);
+   }
+   else
+   {
+      throw std::runtime_error("Problem with loading MDS input file " + file_name);
+   }
+
+   return MDS;
+}
+
+arma::mat readMDSList(const std::string& filename)
+{
+   std::ifstream ist(filename.c_str());
+   if (!ist)
+   {
+      throw std::runtime_error("Could not open mds list file " + filename + "\n");
+   }
+   else
+   {
+      std::cerr << "Reading subsampled matrices from " + filename + "\n";
+   }
+
+   std::string matrix_file;
+   arma::mat combined_matrix;
+   int i = 0;
+   while (ist >> matrix_file)
+   {
+      combined_matrix = join_rows(combined_matrix, readMDS(matrix_file));
+
+      std::cerr << "Joined matrix " << ++i << "\n";
+   }
+
+   return combined_matrix;
+}
+
+// Opens a text file containing covariates, and reads the specified columns
+// into a matrix. Categorical covariates use dummy coding
+arma::mat parseCovars(const std::string& file, const std::string& columns)
+{
+   // Check file exists
+   if (!fileStat(file))
+   {
+      throw std::runtime_error("Covariate file " + file + " not found");
+   }
+
+   // First parse columns required
+   std::vector<std::tuple<int,bool>> column_list = parseCovarColumns(columns);
+
+   // Open file, and read in required columns
+   std::vector<Covar> covars_in(column_list.size()); // Vector of covariates (each of which is internally a vector)
+
+   std::ifstream ist(file.c_str());
+   if (ist)
+   {
+      std::string line_buf;
+      while (std::getline(ist, line_buf)) // Read a line in
+      {
+         std::string sample_name;
+         std::stringstream line_stream(line_buf);
+
+         // Read in sample name for the line
+         line_stream >> sample_name;
+
+         auto col_it = column_list.begin();
+         size_t row = 0;
+         while (col_it != column_list.end()) // Go through all required columns
+         {
+            std::string col_buf; // Work out how many fields to read
+            int skip_cols = std::get<0>(*col_it);
+            if (col_it != column_list.begin())
+            {
+               skip_cols -= std::get<0>(*(col_it-1));
+            }
+            else
+            {
+               skip_cols -= 1; // Sample name already read
+            }
+
+            for (int i = 0; i<skip_cols; ++i)
+            {
+               line_stream >> col_buf;
+            }
+
+            covars_in[row].addCovarValue(sample_name, col_buf);
+            ++col_it; // Move to next column
+            ++row;
+         }
+      }
+   }
+   else
+   {
+      throw std::runtime_error("Could not open covariate file" + file);
+   }
+
+   // Encode categorical columns. Convert strings to doubles
+   // All in arma::mat
+   arma::mat covar_matrix;
+   auto mat_col = covars_in.begin();
+   for (auto col_it = column_list.begin(); col_it != column_list.end(); ++col_it)
+   {
+      // When converting, first sort on sample name so in the same order as
+      // pheno vector that will be merged with
+      arma::mat new_col;
+      if (std::get<1>(*col_it))
+      {
+         // Categorical covars need dummy encoding
+         new_col = encodeDummy(mat_col->sortCovars());
+      }
+      else
+      {
+         // Quantitative covars need normalising
+         new_col = vecToMat(mat_col->sortCovars());
+         normaliseMatCols(new_col);
+      }
+
+      // Add the row in
+      if (covar_matrix.n_cols > 0)
+      {
+         covar_matrix = arma::join_rows(covar_matrix, new_col);
+      }
+      else
+      {
+         covar_matrix = new_col;
+      }
+      ++mat_col;
+   }
+
+   return covar_matrix;
+}
+
+std::vector<std::tuple<int,bool>> parseCovarColumns(const std::string& columns)
+{
+   std::vector<std::tuple<int,bool>> column_list; // A vector of column numbers, and whether they
+                                                  // are categorical and need
+                                                  // dummy encoding
+   std::string col_buf;
+   std::stringstream ss(columns);
+   while(std::getline(ss, col_buf, ','))
+   {
+      if (std::regex_match(col_buf, q_covar_regex))
+      {
+         auto new_col = std::make_tuple(stoi(std::regex_replace(col_buf, q_covar_regex, "$1")), 0);
+         column_list.push_back(new_col);
+      }
+      else if (std::regex_match(col_buf, covar_regex))
+      {
+         auto new_col = std::make_tuple(stoi(std::regex_replace(col_buf, covar_regex, "$1")), 1);
+         column_list.push_back(new_col);
+      }
+      else
+      {
+         std::cerr << "Warning: couldn't parse covariate column " + col_buf << std::endl;
+      }
+   }
+
+   if (column_list.size() == 0)
+   {
+      throw std::runtime_error("No covariate columns selected, but file provided");
+   }
+
+   // Sort by column number. Use a lambda function
+   std::sort(column_list.begin(), column_list.end(),
+         [](const std::tuple<int,bool>& a, const std::tuple<int,bool>& b)
+         {
+            return std::get<0>(a) < std::get<0>(b);
+         });
+
+   return column_list;
+}
+
+// Converts categorical variates into columns using dummy encoding
+arma::mat encodeDummy(const std::vector<std::string>& in_col)
+{
+   // Find the possible categories, and put them into an associative array (unordered
+   // map)
+   std::vector<std::string> col_copy = in_col;
+   std::sort(col_copy.begin(), col_copy.end());
+   auto unique_it = std::unique(col_copy.begin(), col_copy.end());
+
+   std::unordered_map<std::string, int> dummy_map;
+   unsigned int dummy_col = 0;
+   for (auto cat_it = col_copy.begin(); cat_it != unique_it; ++cat_it)
+   {
+      dummy_map[*cat_it] = dummy_col++;
+   }
+
+   // For each variable, find the category and code this column as 1
+   // There will be n-1 categories, as the control is coded as all zeros
+   arma::mat out_mat(in_col.size(), dummy_map.size() - 1);
+   for (unsigned int i = 0; i < in_col.size(); ++i)
+   {
+      unsigned int true_col = dummy_map[in_col[i]];
+      for (unsigned int j = 0; j < dummy_map.size() - 1; ++j)
+      {
+         int out_val = 0;
+         if (true_col > 0 && true_col - 1 == j)
+         {
+            out_val = 1;
+         }
+         out_mat(i, j) = out_val;
+      }
+   }
+
+   return out_mat;
+}
+
+// Check for file existence
+int fileStat(const std::string& filename)
+{
+   struct stat buffer;
+   int success = 1;
+
+   if (stat (filename.c_str(), &buffer) != 0)
+   {
+      std::cerr << "Can't stat input file: " << filename << "\n";
+
+      success = 0;
+   }
+
+   return success;
+}
+
diff --git a/src/seerMain.cpp b/src/seerMain.cpp
new file mode 100644
index 0000000..b35fbbb
--- /dev/null
+++ b/src/seerMain.cpp
@@ -0,0 +1,209 @@
+/*
+ * File: seerMain.cpp
+ *
+ * Reads command line input to seer, and controls relevant functions
+ *
+ */
+
+#include "seer.hpp"
+
+int main (int argc, char *argv[])
+{
+   // Program description
+   std::cerr << "seer: sequence element enrichment analysis\n";
+
+   // Do parsing and checking of command line params
+   // If no input options, give quick usage rather than full help
+   boost::program_options::variables_map vm;
+   if (argc == 1)
+   {
+      std::cerr << "Usage: seer -k dsm.txt.gz -p data.pheno --struct mds.dsm.txt.gz\n\n"
+         << "For full option details run seer -h\n";
+      return 0;
+   }
+   else if (parseCommandLine(argc, argv, vm))
+   {
+      return 1;
+   }
+
+   // Open .pheno file, parse into vector of samples
+   std::vector<Sample> samples;
+   std::unordered_map<std::string,int> sample_map;
+   readPheno(vm["pheno"].as<std::string>(), samples, sample_map);
+   arma::vec y = constructVecY(samples);
+   int continuous_phenotype = continuousPhenotype(samples);
+
+   // Get mds values
+   arma::mat mds;
+   int use_mds = 0;
+   if (vm.count("struct"))
+   {
+      mds = readMDS(vm["struct"].as<std::string>());
+      use_mds = 1;
+
+      if (mds.n_rows != samples.size())
+      {
+         throw std::runtime_error("Number of rows in MDS matrix does not match number of samples");
+      }
+   }
+
+   // Set up covariates
+   if (vm.count("covar_file") && vm.count("covar_list"))
+   {
+      // File reading/parsing may fail
+      try
+      {
+         arma::mat covariate_matrix =
+            parseCovars(vm["covar_file"].as<std::string>(), vm["covar_list"].as<std::string>());
+
+         if (covariate_matrix.n_rows != samples.size())
+         {
+            throw std::runtime_error("Covariate row size does not match number of samples");
+         }
+
+         if (use_mds)
+         {
+            mds = arma::join_rows(mds, covariate_matrix);
+         }
+         else
+         {
+            mds = covariate_matrix;
+            use_mds = 1;
+         }
+      }
+      catch (std::exception& e)
+      {
+         std::cerr << "Could not process covariates: " << std::endl;
+         std::cerr << e.what() << std::endl;
+      }
+   }
+
+   // Disambiguate overloaded logistic functions by the type of parameter they
+   // take
+   void (*mdsLogitFunc)(Kmer&, const arma::vec&, const arma::mat&) = &logisticTest;
+   void (*logitFunc)(Kmer&, const arma::vec&) = &logisticTest;
+
+   void (*mdsLinearFunc)(Kmer&, const arma::vec&, const arma::mat&) = &linearTest;
+   void (*linearFunc)(Kmer&, const arma::vec&) = &linearTest;
+
+   // Error check command line options
+   cmdOptions parameters = verifyCommandLine(vm, samples);
+
+   // Open the dsm kmer ifstream, and read through the whole thing
+   igzstream kmer_file;
+   openDsmFile(kmer_file, parameters.kmers);
+
+   // Write a header
+   std::cout << "sequence\tmaf\tunadj_p_val\tp_val\tbeta\tse\tcomments";
+   if (parameters.print_samples)
+   {
+      std::cout << "samples_present";
+   }
+   std::cout << std::endl;
+
+   while (kmer_file)
+   {
+      // Parse a set of dsm lines
+      std::vector<Kmer> kmer_lines;
+      kmer_lines.reserve(parameters.num_threads);
+
+      Kmer k;
+      while(kmer_lines.size() < parameters.num_threads && kmer_file)
+      {
+         kmer_file >> k;
+         if (kmer_file)
+         {
+            k.add_x(sample_map, samples.size());
+
+            // apply filters here
+            if (!parameters.filter)
+            {
+               kmer_lines.push_back(k);
+            }
+            else if (passFilters(parameters, k, samples, y, continuous_phenotype))
+            {
+#ifdef SEER_DEBUG
+               std::cerr << "kmer " + k.sequence() + " seems significant\n";
+#endif
+               kmer_lines.push_back(k);
+            }
+         }
+      }
+
+      // Thread from here...
+      std::vector<std::thread> threads;
+      threads.reserve(kmer_lines.size());
+
+      for (unsigned int i = 0; i<kmer_lines.size(); ++i)
+      {
+         // Association test
+         // Note threads must be passed values as they are copied
+         // std::reference_wrapper allows references to be passed
+         if (use_mds)
+         {
+            if (continuous_phenotype)
+            {
+               threads.push_back(std::thread(mdsLinearFunc, std::ref(kmer_lines[i]), std::cref(y), std::cref(mds)));
+            }
+            else
+            {
+               threads.push_back(std::thread(mdsLogitFunc, std::ref(kmer_lines[i]), std::cref(y), std::cref(mds)));
+            }
+         }
+         else
+         {
+            if (continuous_phenotype)
+            {
+               threads.push_back(std::thread(linearFunc, std::ref(kmer_lines[i]), std::cref(y)));
+            }
+            else
+            {
+               threads.push_back(std::thread(logitFunc, std::ref(kmer_lines[i]), std::cref(y)));
+            }
+         }
+      }
+
+      for (unsigned int i = 0; i<threads.size(); ++i)
+      {
+         // Rejoin in order
+         threads[i].join();
+
+         // Print in order when all threads complete
+         if (kmer_lines[i].p_val() < parameters.log_cutoff)
+         {
+            // Caclculate chisq value if not already done so in filtering
+            if (kmer_lines[i].unadj() == kmer_chi_pvalue_default)
+            {
+               if (continuous_phenotype)
+               {
+                  kmer_lines[i].unadj_p_val(welchTwoSamplet(kmer_lines[i].get_x(), y));
+               }
+               else
+               {
+                  kmer_lines[i].unadj_p_val(chiTest(kmer_lines[i].get_x(), y));
+               }
+            }
+
+            std::cout << kmer_lines[i];
+            if (parameters.print_samples)
+            {
+               std::vector<std::string> samples_found = kmer_lines[i].occurrence_vector();
+               std::cout << "\t";
+               // Doing this for all samples leaves trailing whitespace, so
+               // write the last sample separately
+               if (samples_found.size() > 1)
+               {
+                  std::copy(samples_found.begin(), samples_found.end() - 1, std::ostream_iterator<std::string>(std::cout, "\t"));
+               }
+               std::cout << samples_found.back();
+            }
+            std::cout << "\n";
+
+         }
+      }
+      // ...to here
+   }
+
+   std::cerr << "Done.\n";
+}
+
diff --git a/src/seercommon.hpp b/src/seercommon.hpp
new file mode 100644
index 0000000..32f81a6
--- /dev/null
+++ b/src/seercommon.hpp
@@ -0,0 +1,117 @@
+/*
+ *
+ * seercommon.hpp
+ * Header file for seercommon
+ * Shared functions between seer and kmds
+ *
+ */
+
+// C/C++/C++11 headers
+#include <iostream>
+#include <fstream>
+#include <cmath>
+#include <cstdlib>
+#include <string>
+#include <algorithm>
+#include <chrono>
+#include <iterator>
+#include <vector>
+#include <unordered_map>
+#include <thread>
+#include <exception>
+#include <sys/stat.h>
+#include <regex>
+
+// gzstream headers
+#include <gzstream.h>
+
+// Boost headers
+#include <boost/program_options.hpp>
+#include <boost/math/distributions/normal.hpp>
+#include <boost/math/distributions/students_t.hpp>
+
+// Armadillo/dlib headers
+#define ARMA_DONT_PRINT_ERRORS
+#include <armadillo>
+#include <dlib/matrix.h>
+
+// Classes
+#include "kmer.hpp"
+#include "sample.hpp"
+#include "covar.hpp"
+
+// Constants
+//    Default options
+const double maf_default = 0.01;
+const long int max_length_default = 100;
+const std::string chisq_default = "10e-5";
+
+typedef dlib::matrix<double,0,1> column_vector;
+
+// Structs
+struct cmdOptions
+{
+   double log_cutoff;
+   double chi_cutoff;
+
+   long int max_length;
+   long int size;
+   int filter;
+   int positive;
+   int pc;
+   int print_samples;
+   int write_distances;
+   unsigned int num_threads;
+   size_t min_words;
+   size_t max_words;
+
+   std::string pheno;
+   std::string kmers;
+   std::string output;
+};
+
+// Function headers
+//    seerCommon.cpp
+cmdOptions verifyCommandLine(boost::program_options::variables_map& vm, const std::vector<Sample>& samples);
+void verifyMDSOptions(cmdOptions& verified, boost::program_options::variables_map& vm);
+
+arma::vec dlib_to_arma(const column_vector& dlib_vec);
+column_vector arma_to_dlib(const arma::vec& arma_vec);
+arma::mat vecToMat(const std::vector<std::string>& in_col);
+void normaliseMatCols(arma::mat& matrix_in);
+
+int continuousPhenotype (const std::vector<Sample>& sample_list);
+
+arma::mat inv_covar(arma::mat A);
+
+// seerErr headers
+void badCommand(const std::string& command, const std::string& value);
+
+// seerIO headers
+void readPheno(const std::string& filename, std::vector<Sample>& samples, std::unordered_map<std::string,int>& sample_map);
+void openDsmFile(igzstream& dsm_file, const std::string& file_name);
+
+arma::vec constructVecY(const std::vector<Sample>& samples);
+arma::vec constructVecX(const Kmer& k, const std::vector<Sample>& samples);
+
+void writeMDS(const std::string& file_name, const arma::mat& MDS);
+void writeDistances(const std::string& file_name, const arma::mat& distances);
+arma::mat readMDS(const std::string& file_name);
+arma::mat readMDSList(const std::string& filename);
+
+arma::mat parseCovars(const std::string& file, const std::string& columns);
+std::vector<std::tuple<int,bool>> parseCovarColumns(const std::string& columns);
+arma::mat encodeDummy(const std::vector<std::string>& in_col);
+
+int fileStat(const std::string& filename);
+
+// seerFilter headers
+int passFilters(const cmdOptions& filterOptions, Kmer& k, const std::vector<Sample>& samples, const arma::vec& y, const int continuous_phenotype);
+int passBasicFilters(const Kmer& k, const int max_length, const int min_words, const int max_words);
+int passStatsFilters(const arma::vec& x, const arma::vec& y, const double chi_cutoff, const int continuous_phenotype, const int positive_only);
+
+// seerChiFilter headers
+double chiTest(const arma::vec& x, const arma::vec& y);
+double welchTwoSamplet(const arma::vec& x, const arma::vec& y);
+double normalPval(double testStatistic);
+
diff --git a/src/significant_kmer.cpp b/src/significant_kmer.cpp
new file mode 100644
index 0000000..ccf2223
--- /dev/null
+++ b/src/significant_kmer.cpp
@@ -0,0 +1,133 @@
+/*
+ * File: significant_kmer.cpp
+ *
+ * Helper functions for the significant kmer class
+ * Reads input into class
+ *
+ */
+
+#include "significant_kmer.hpp"
+
+Significant_kmer::Significant_kmer()
+{
+}
+
+Significant_kmer::Significant_kmer(const std::string& word, const std::vector<std::string>& samples, const double maf, const double unadj_p, const double adj_p, const double beta, const double se, const std::string& comments)
+   :_word(word), _samples(samples), _maf(maf), _unadj_p(unadj_p), _adj_p(adj_p), _beta(beta), _se(se), _comment(comments)
+{
+}
+
+// Fills significant kmer object from seer output file
+// Sample vector is returned sorted
+std::istream& operator>>(std::istream &is, Significant_kmer& sk)
+{
+   double maf, unadj_p, adj_p, beta, se;
+   std::string sequence, sample, line_in, comments = "";
+   std::vector<std::string> sample_list;
+
+   // Read the line convert to stringstream, extract sequence and stats fields
+   std::getline(is, line_in);
+   std::stringstream line_stream(line_in);
+
+   line_stream >> sequence;
+
+   line_stream >> maf;
+   line_stream >> unadj_p;
+   line_stream >> adj_p;
+   line_stream >> beta;
+   line_stream >> se;
+
+   line_stream >> comments;
+
+   // Read remainder of line, which is sample names, in the same way they were
+   // written
+   std::copy(std::istream_iterator<std::string>(line_stream), std::istream_iterator<std::string>(), std::back_inserter(sample_list));
+
+   // Ensure vector remains sorted on sample name
+   std::sort(sample_list.begin(), sample_list.end());
+   sk = Significant_kmer(sequence, sample_list, maf, unadj_p, adj_p, beta, se, comments);
+
+   return is;
+}
+
+// Print fields tab sep, identical to input. Doesn't print newline
+std::ostream& operator<<(std::ostream &os, const Significant_kmer& k)
+{
+   os << k.sequence() << "\t"
+      << std::fixed << std::setprecision(3) << k.maf() << "\t"
+      << std::scientific << k.unadj() << "\t" << k.p_val() << "\t" << k.beta() << "\t" << k.se()
+      << k.comments();
+
+   std::vector<std::string> samples_found = k.samples_found();
+   std::copy(samples_found.begin(), samples_found.end() - 1, std::ostream_iterator<std::string>(os, "\t"));
+   os << samples_found.back();
+
+   return os;
+}
+
+sortSigKmer::sortSigKmer()
+   :_sort_field(0)
+{
+}
+
+sortSigKmer::sortSigKmer(const std::string& sort_field)
+   :_sort_field(0)
+{
+   this->addSortField(sort_field);
+}
+
+
+// Sets the sort field for sig kmers
+void sortSigKmer::addSortField(const std::string& sort_field)
+{
+   if (sort_field == "maf")
+   {
+      this->_sort_field = 1;
+   }
+   else if (sort_field == "chisq")
+   {
+      this->_sort_field = 2;
+   }
+   else if (sort_field == "pval")
+   {
+      this->_sort_field = 3;
+   }
+   else if (sort_field == "beta")
+   {
+      this->_sort_field = 4;
+   }
+   else if (sort_field == "sequence")
+   {
+      this->_sort_field = 5;
+   }
+   else
+   {
+      this->_sort_field = 3;
+   }
+}
+
+bool sortSigKmer::operator() (const Significant_kmer& sk1, const Significant_kmer& sk2) const
+{
+   bool compare;
+   switch (_sort_field)
+   {
+      case 1:
+         compare = sk1.maf() < sk2.maf();
+         break;
+      case 2:
+         compare = sk1.unadj() < sk2.unadj();
+         break;
+      case 3:
+         compare = sk1.p_val() < sk2.p_val();
+         break;
+      case 4:
+         compare = sk1.beta() < sk2.beta();
+         break;
+      case 5:
+         compare = sk1.sequence().length() < sk2.sequence().length();
+         break;
+      default:
+         compare = sk1.p_val() < sk2.p_val();
+   }
+   return compare;
+}
diff --git a/src/significant_kmer.hpp b/src/significant_kmer.hpp
new file mode 100644
index 0000000..c9df3de
--- /dev/null
+++ b/src/significant_kmer.hpp
@@ -0,0 +1,73 @@
+/*
+ * significant_kmer.hpp
+ * Header file for significant_kmer class
+ *
+ */
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <string>
+#include <vector>
+#include <iterator>
+#include <algorithm>
+
+// kmers have a sequence, and a list of samples they appear in
+class Significant_kmer
+{
+   public:
+      // Initialisation
+      Significant_kmer();
+      Significant_kmer(const std::string& word, const std::vector<std::string>& samples, const double maf, const double unadj_p, const double adj_p, const double beta, const double se, const std::string& comments);
+
+      // nonmodifying operations
+      std::vector<std::string> samples_found() const { return _samples; }
+      std::string sequence() const { return _word; }
+      double maf() const { return _maf; }
+      double unadj() const { return _unadj_p; }
+      double p_val() const { return _adj_p; }
+      double beta() const { return _beta; }
+      double se() const { return _se; }
+      std::string comments() const { return _comment; }
+
+      // Modifying operations
+      void p_val(const double pvalue) { _adj_p = pvalue; }
+      void unadj_p_val(const double chi_pvalue) { _unadj_p = chi_pvalue; }
+      void beta(const double b) { _beta = b; }
+      void standard_error(const double se) { _se = se; }
+      void set_maf(const double maf) { _maf = maf; }
+
+
+   protected:
+      std::string _word;
+      std::vector<std::string> _samples;
+
+      double _maf;
+      double _unadj_p;
+      double _adj_p;
+      double _beta;
+      double _se;
+      std::string _comment;
+};
+
+class sortSigKmer
+{
+   public:
+      sortSigKmer();
+      sortSigKmer(const std::string& sort_field);
+
+      void addSortField(const std::string& sort_field);
+
+      // Overload for sort
+      bool operator() (const Significant_kmer& sk1, const Significant_kmer& sk2) const;
+      explicit operator bool() const { return (_sort_field > 0); };
+
+   private:
+      int _sort_field;
+};
+
+// Overload input and output operators
+std::istream& operator>>(std::istream &is, Significant_kmer& sk);
+
+std::ostream& operator<<(std::ostream &os, const Significant_kmer& k);
+
diff --git a/test/Makefile b/test/Makefile
new file mode 100755
index 0000000..074d155
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,10 @@
+all:
+	echo "Tests not yet implemented" > tests_passed.txt
+
+clean:
+	$(RM) *.o ~* tests_passed.txt
+
+test: all
+
+.PHONY: all clean install test
+
diff --git a/test/example.pheno b/test/example.pheno
new file mode 100644
index 0000000..066dbe4
--- /dev/null
+++ b/test/example.pheno
@@ -0,0 +1,3069 @@
+6259_5#1	6259_5#1	1
+6259_5#2	6259_5#2	1
+6259_5#3	6259_5#3	0
+6259_5#4	6259_5#4	0
+6259_5#5	6259_5#5	0
+6259_5#6	6259_5#6	1
+6259_5#7	6259_5#7	1
+6259_5#8	6259_5#8	1
+6259_5#9	6259_5#9	0
+6259_5#10	6259_5#10	1
+6259_5#12	6259_5#12	1
+6259_5#13	6259_5#13	1
+6259_5#14	6259_5#14	0
+6259_5#15	6259_5#15	0
+6259_5#16	6259_5#16	1
+6259_5#17	6259_5#17	1
+6259_5#18	6259_5#18	1
+6259_5#19	6259_5#19	0
+6259_5#20	6259_5#20	0
+6259_5#21	6259_5#21	0
+6259_5#22	6259_5#22	0
+6259_5#23	6259_5#23	1
+6259_5#24	6259_5#24	1
+6259_6#1	6259_6#1	1
+6259_6#2	6259_6#2	1
+6259_6#3	6259_6#3	1
+6259_6#4	6259_6#4	1
+6259_6#5	6259_6#5	1
+6259_6#6	6259_6#6	0
+6259_6#7	6259_6#7	1
+6259_6#8	6259_6#8	1
+6259_6#9	6259_6#9	1
+6259_6#10	6259_6#10	1
+6259_6#11	6259_6#11	0
+6259_6#12	6259_6#12	0
+6259_6#13	6259_6#13	1
+6259_6#14	6259_6#14	0
+6259_6#15	6259_6#15	0
+6259_6#16	6259_6#16	1
+6259_6#17	6259_6#17	1
+6259_6#18	6259_6#18	1
+6259_6#19	6259_6#19	0
+6259_6#20	6259_6#20	1
+6259_6#21	6259_6#21	1
+6259_6#22	6259_6#22	0
+6259_6#23	6259_6#23	1
+6259_6#24	6259_6#24	1
+6259_7#1	6259_7#1	0
+6259_7#2	6259_7#2	1
+6259_7#3	6259_7#3	0
+6259_7#4	6259_7#4	1
+6259_7#5	6259_7#5	0
+6259_7#6	6259_7#6	1
+6259_7#7	6259_7#7	1
+6259_7#8	6259_7#8	1
+6259_7#9	6259_7#9	0
+6259_7#10	6259_7#10	0
+6259_7#11	6259_7#11	1
+6259_7#12	6259_7#12	0
+6259_7#13	6259_7#13	1
+6259_7#14	6259_7#14	1
+6259_7#15	6259_7#15	1
+6259_7#16	6259_7#16	0
+6259_7#17	6259_7#17	0
+6259_7#18	6259_7#18	1
+6259_7#19	6259_7#19	0
+6259_7#20	6259_7#20	0
+6259_7#21	6259_7#21	0
+6259_7#22	6259_7#22	1
+6259_7#23	6259_7#23	0
+6259_7#24	6259_7#24	1
+6259_8#1	6259_8#1	0
+6259_8#2	6259_8#2	1
+6259_8#3	6259_8#3	1
+6259_8#4	6259_8#4	1
+6259_8#5	6259_8#5	0
+6259_8#6	6259_8#6	0
+6259_8#7	6259_8#7	0
+6259_8#8	6259_8#8	1
+6259_8#9	6259_8#9	0
+6259_8#10	6259_8#10	0
+6259_8#11	6259_8#11	0
+6259_8#12	6259_8#12	1
+6259_8#13	6259_8#13	1
+6259_8#14	6259_8#14	0
+6259_8#15	6259_8#15	0
+6259_8#16	6259_8#16	1
+6259_8#17	6259_8#17	0
+6259_8#18	6259_8#18	1
+6259_8#19	6259_8#19	0
+6259_8#20	6259_8#20	1
+6259_8#21	6259_8#21	1
+6259_8#22	6259_8#22	1
+6259_8#23	6259_8#23	0
+6259_8#24	6259_8#24	0
+6593_4#1	6593_4#1	0
+6593_4#2	6593_4#2	0
+6593_4#3	6593_4#3	1
+6593_4#4	6593_4#4	1
+6593_4#5	6593_4#5	1
+6593_4#6	6593_4#6	0
+6593_4#7	6593_4#7	1
+6593_4#8	6593_4#8	1
+6593_4#9	6593_4#9	1
+6593_4#10	6593_4#10	0
+6593_4#11	6593_4#11	0
+6593_4#12	6593_4#12	1
+6593_4#13	6593_4#13	0
+6593_4#14	6593_4#14	0
+6593_4#15	6593_4#15	0
+6593_4#16	6593_4#16	0
+6593_4#17	6593_4#17	1
+6593_4#18	6593_4#18	1
+6593_4#19	6593_4#19	0
+6593_4#20	6593_4#20	1
+6593_4#21	6593_4#21	1
+6593_4#22	6593_4#22	1
+6593_4#23	6593_4#23	1
+6593_4#24	6593_4#24	0
+6593_5#1	6593_5#1	1
+6593_5#2	6593_5#2	1
+6593_5#3	6593_5#3	1
+6593_5#4	6593_5#4	1
+6593_5#5	6593_5#5	1
+6593_5#6	6593_5#6	1
+6593_5#7	6593_5#7	0
+6593_5#8	6593_5#8	0
+6593_5#9	6593_5#9	0
+6593_5#10	6593_5#10	1
+6593_5#11	6593_5#11	1
+6593_5#12	6593_5#12	0
+6593_5#13	6593_5#13	1
+6593_5#14	6593_5#14	0
+6593_5#15	6593_5#15	0
+6593_5#16	6593_5#16	0
+6593_5#17	6593_5#17	0
+6593_5#18	6593_5#18	1
+6593_5#19	6593_5#19	1
+6593_5#20	6593_5#20	1
+6593_5#21	6593_5#21	0
+6593_5#22	6593_5#22	0
+6593_5#23	6593_5#23	0
+6593_5#24	6593_5#24	1
+6641_6#1	6641_6#1	0
+6641_6#2	6641_6#2	1
+6641_6#3	6641_6#3	1
+6641_6#4	6641_6#4	1
+6641_6#5	6641_6#5	0
+6641_6#6	6641_6#6	1
+6641_6#7	6641_6#7	1
+6641_6#8	6641_6#8	0
+6641_6#9	6641_6#9	1
+6641_6#10	6641_6#10	1
+6641_6#11	6641_6#11	1
+6641_6#12	6641_6#12	0
+6641_6#13	6641_6#13	0
+6641_6#14	6641_6#14	0
+6641_6#15	6641_6#15	1
+6641_6#16	6641_6#16	0
+6641_6#17	6641_6#17	0
+6641_6#18	6641_6#18	0
+6641_6#19	6641_6#19	1
+6641_6#20	6641_6#20	0
+6641_6#21	6641_6#21	0
+6641_6#22	6641_6#22	0
+6641_6#23	6641_6#23	0
+6641_6#24	6641_6#24	1
+6649_8#1	6649_8#1	1
+6649_8#2	6649_8#2	1
+6649_8#3	6649_8#3	0
+6649_8#4	6649_8#4	1
+6649_8#5	6649_8#5	1
+6649_8#6	6649_8#6	0
+6649_8#7	6649_8#7	1
+6649_8#8	6649_8#8	1
+6649_8#9	6649_8#9	1
+6649_8#10	6649_8#10	0
+6649_8#11	6649_8#11	1
+6649_8#12	6649_8#12	0
+6649_8#13	6649_8#13	0
+6649_8#14	6649_8#14	0
+6649_8#15	6649_8#15	1
+6649_8#16	6649_8#16	1
+6649_8#17	6649_8#17	1
+6649_8#18	6649_8#18	1
+6649_8#19	6649_8#19	1
+6649_8#20	6649_8#20	0
+6649_8#21	6649_8#21	1
+6649_8#22	6649_8#22	1
+6649_8#23	6649_8#23	1
+6649_8#24	6649_8#24	1
+6680_8#1	6680_8#1	1
+6680_8#2	6680_8#2	1
+6680_8#3	6680_8#3	0
+6680_8#4	6680_8#4	1
+6680_8#5	6680_8#5	0
+6680_8#6	6680_8#6	0
+6680_8#7	6680_8#7	0
+6680_8#8	6680_8#8	0
+6680_8#9	6680_8#9	0
+6680_8#10	6680_8#10	1
+6680_8#11	6680_8#11	1
+6680_8#12	6680_8#12	1
+6680_8#13	6680_8#13	1
+6680_8#14	6680_8#14	1
+6680_8#15	6680_8#15	1
+6680_8#16	6680_8#16	1
+6680_8#17	6680_8#17	1
+6680_8#18	6680_8#18	1
+6680_8#19	6680_8#19	0
+6680_8#20	6680_8#20	1
+6680_8#21	6680_8#21	1
+6680_8#22	6680_8#22	0
+6680_8#23	6680_8#23	1
+6680_8#24	6680_8#24	1
+6664_1#1	6664_1#1	0
+6664_1#2	6664_1#2	1
+6664_1#3	6664_1#3	1
+6664_1#4	6664_1#4	0
+6664_1#5	6664_1#5	0
+6664_1#6	6664_1#6	1
+6664_1#7	6664_1#7	0
+6664_1#8	6664_1#8	1
+6664_1#9	6664_1#9	1
+6664_1#10	6664_1#10	0
+6664_1#11	6664_1#11	0
+6664_1#12	6664_1#12	1
+6664_1#13	6664_1#13	0
+6664_1#14	6664_1#14	1
+6664_1#15	6664_1#15	1
+6664_1#16	6664_1#16	1
+6664_1#17	6664_1#17	1
+6664_1#18	6664_1#18	1
+6664_1#19	6664_1#19	1
+6664_1#20	6664_1#20	0
+6664_1#21	6664_1#21	0
+6664_1#22	6664_1#22	0
+6664_1#23	6664_1#23	0
+6664_1#24	6664_1#24	0
+6673_8#1	6673_8#1	1
+6673_8#2	6673_8#2	0
+6673_8#3	6673_8#3	1
+6673_8#4	6673_8#4	1
+6673_8#5	6673_8#5	1
+6673_8#6	6673_8#6	1
+6673_8#7	6673_8#7	0
+6673_8#8	6673_8#8	0
+6673_8#9	6673_8#9	1
+6673_8#10	6673_8#10	1
+6673_8#11	6673_8#11	0
+6673_8#12	6673_8#12	0
+6673_8#13	6673_8#13	1
+6673_8#14	6673_8#14	0
+6673_8#15	6673_8#15	0
+6673_8#16	6673_8#16	0
+6673_8#17	6673_8#17	1
+6673_8#18	6673_8#18	0
+6673_8#19	6673_8#19	1
+6673_8#20	6673_8#20	1
+6673_8#21	6673_8#21	1
+6673_8#22	6673_8#22	0
+6673_8#23	6673_8#23	0
+6673_8#24	6673_8#24	1
+6630_1#1	6630_1#1	0
+6630_1#2	6630_1#2	0
+6630_1#3	6630_1#3	1
+6630_1#4	6630_1#4	1
+6630_1#5	6630_1#5	0
+6630_1#6	6630_1#6	1
+6630_1#7	6630_1#7	1
+6630_1#8	6630_1#8	1
+6630_1#9	6630_1#9	0
+6630_1#10	6630_1#10	0
+6630_1#11	6630_1#11	0
+6630_1#12	6630_1#12	1
+6630_1#13	6630_1#13	1
+6630_1#14	6630_1#14	1
+6630_1#15	6630_1#15	1
+6630_1#16	6630_1#16	1
+6630_1#17	6630_1#17	1
+6630_1#18	6630_1#18	1
+6630_1#19	6630_1#19	1
+6630_1#20	6630_1#20	1
+6630_1#21	6630_1#21	0
+6630_1#23	6630_1#23	1
+6630_1#24	6630_1#24	1
+6630_2#1	6630_2#1	0
+6630_2#2	6630_2#2	1
+6630_2#3	6630_2#3	0
+6630_2#4	6630_2#4	0
+6630_2#5	6630_2#5	1
+6630_2#6	6630_2#6	1
+6630_2#7	6630_2#7	0
+6630_2#8	6630_2#8	0
+6630_2#9	6630_2#9	0
+6630_2#10	6630_2#10	0
+6630_2#11	6630_2#11	1
+6630_2#12	6630_2#12	1
+6630_2#13	6630_2#13	0
+6630_2#14	6630_2#14	1
+6630_2#15	6630_2#15	1
+6630_2#16	6630_2#16	1
+6630_2#17	6630_2#17	1
+6630_2#18	6630_2#18	1
+6630_2#19	6630_2#19	1
+6630_2#20	6630_2#20	1
+6630_2#21	6630_2#21	0
+6630_2#22	6630_2#22	0
+6630_2#23	6630_2#23	0
+6630_2#24	6630_2#24	0
+6631_1#1	6631_1#1	1
+6631_1#2	6631_1#2	1
+6631_1#3	6631_1#3	1
+6631_1#4	6631_1#4	1
+6631_1#5	6631_1#5	1
+6631_1#6	6631_1#6	1
+6631_1#7	6631_1#7	0
+6631_1#8	6631_1#8	0
+6631_1#9	6631_1#9	1
+6631_1#11	6631_1#11	0
+6631_1#12	6631_1#12	0
+6631_1#13	6631_1#13	0
+6631_1#14	6631_1#14	1
+6631_1#15	6631_1#15	1
+6631_1#16	6631_1#16	0
+6631_1#17	6631_1#17	0
+6631_1#18	6631_1#18	0
+6631_1#19	6631_1#19	0
+6631_1#20	6631_1#20	0
+6631_1#21	6631_1#21	1
+6631_1#22	6631_1#22	0
+6631_1#23	6631_1#23	1
+6631_1#24	6631_1#24	0
+6631_2#1	6631_2#1	0
+6631_2#2	6631_2#2	0
+6631_2#3	6631_2#3	0
+6631_2#4	6631_2#4	0
+6631_2#5	6631_2#5	1
+6631_2#6	6631_2#6	0
+6631_2#7	6631_2#7	0
+6631_2#8	6631_2#8	0
+6631_2#9	6631_2#9	1
+6631_2#10	6631_2#10	1
+6631_2#11	6631_2#11	0
+6631_2#12	6631_2#12	0
+6631_2#13	6631_2#13	0
+6631_2#14	6631_2#14	1
+6631_2#15	6631_2#15	1
+6631_2#16	6631_2#16	1
+6631_2#17	6631_2#17	0
+6631_2#18	6631_2#18	0
+6631_2#19	6631_2#19	1
+6631_2#20	6631_2#20	0
+6631_2#21	6631_2#21	1
+6631_2#22	6631_2#22	0
+6631_2#23	6631_2#23	0
+6631_2#24	6631_2#24	1
+6630_3#1	6630_3#1	0
+6630_3#2	6630_3#2	0
+6630_3#3	6630_3#3	1
+6630_3#4	6630_3#4	1
+6630_3#5	6630_3#5	0
+6630_3#6	6630_3#6	1
+6630_3#7	6630_3#7	1
+6630_3#8	6630_3#8	1
+6630_3#9	6630_3#9	1
+6630_3#10	6630_3#10	0
+6630_3#11	6630_3#11	1
+6630_3#12	6630_3#12	1
+6630_3#13	6630_3#13	0
+6630_3#14	6630_3#14	1
+6630_3#15	6630_3#15	0
+6630_3#16	6630_3#16	1
+6630_3#17	6630_3#17	0
+6630_3#18	6630_3#18	1
+6630_3#19	6630_3#19	1
+6630_3#20	6630_3#20	1
+6630_3#21	6630_3#21	1
+6630_3#22	6630_3#22	1
+6630_3#23	6630_3#23	0
+6630_3#24	6630_3#24	1
+6630_4#1	6630_4#1	1
+6630_4#2	6630_4#2	1
+6630_4#3	6630_4#3	0
+6630_4#4	6630_4#4	0
+6630_4#5	6630_4#5	0
+6630_4#6	6630_4#6	0
+6630_4#7	6630_4#7	0
+6630_4#8	6630_4#8	1
+6630_4#9	6630_4#9	1
+6630_4#10	6630_4#10	0
+6630_4#11	6630_4#11	0
+6630_4#12	6630_4#12	1
+6630_4#13	6630_4#13	0
+6630_4#14	6630_4#14	1
+6630_4#15	6630_4#15	0
+6630_4#16	6630_4#16	0
+6630_4#17	6630_4#17	0
+6630_4#18	6630_4#18	0
+6630_4#19	6630_4#19	1
+6630_4#20	6630_4#20	0
+6630_4#21	6630_4#21	1
+6630_4#22	6630_4#22	0
+6630_4#23	6630_4#23	1
+6630_4#24	6630_4#24	1
+6631_3#1	6631_3#1	1
+6631_3#2	6631_3#2	1
+6631_3#3	6631_3#3	0
+6631_3#4	6631_3#4	1
+6631_3#5	6631_3#5	1
+6631_3#6	6631_3#6	1
+6631_3#7	6631_3#7	0
+6631_3#8	6631_3#8	0
+6631_3#9	6631_3#9	0
+6631_3#10	6631_3#10	1
+6631_3#11	6631_3#11	1
+6631_3#12	6631_3#12	0
+6631_3#13	6631_3#13	1
+6631_3#14	6631_3#14	0
+6631_3#15	6631_3#15	1
+6631_3#16	6631_3#16	1
+6631_3#17	6631_3#17	0
+6631_3#18	6631_3#18	0
+6631_3#19	6631_3#19	1
+6631_3#20	6631_3#20	1
+6631_3#21	6631_3#21	0
+6631_3#22	6631_3#22	0
+6631_3#23	6631_3#23	0
+6631_3#24	6631_3#24	0
+6631_4#1	6631_4#1	1
+6631_4#2	6631_4#2	0
+6631_4#3	6631_4#3	0
+6631_4#4	6631_4#4	1
+6631_4#5	6631_4#5	0
+6631_4#6	6631_4#6	1
+6631_4#7	6631_4#7	0
+6631_4#8	6631_4#8	1
+6631_4#9	6631_4#9	1
+6631_4#10	6631_4#10	0
+6631_4#11	6631_4#11	1
+6631_4#12	6631_4#12	1
+6631_4#13	6631_4#13	0
+6631_4#14	6631_4#14	0
+6631_4#15	6631_4#15	1
+6631_4#16	6631_4#16	0
+6631_4#17	6631_4#17	0
+6631_4#18	6631_4#18	0
+6631_4#19	6631_4#19	1
+6631_4#20	6631_4#20	0
+6631_4#21	6631_4#21	1
+6631_4#22	6631_4#22	1
+6631_4#23	6631_4#23	0
+6631_4#24	6631_4#24	0
+6631_5#1	6631_5#1	0
+6631_5#2	6631_5#2	1
+6631_5#3	6631_5#3	0
+6631_5#4	6631_5#4	0
+6631_5#5	6631_5#5	1
+6631_5#6	6631_5#6	1
+6631_5#7	6631_5#7	1
+6631_5#8	6631_5#8	0
+6631_5#9	6631_5#9	1
+6631_5#10	6631_5#10	1
+6631_5#11	6631_5#11	1
+6631_5#12	6631_5#12	0
+6631_5#13	6631_5#13	1
+6631_5#14	6631_5#14	1
+6631_5#15	6631_5#15	1
+6631_5#16	6631_5#16	1
+6631_5#17	6631_5#17	0
+6631_5#18	6631_5#18	0
+6631_5#19	6631_5#19	0
+6631_5#20	6631_5#20	0
+6631_5#21	6631_5#21	1
+6631_5#22	6631_5#22	1
+6631_5#23	6631_5#23	1
+6631_5#24	6631_5#24	0
+6631_6#1	6631_6#1	1
+6631_6#2	6631_6#2	1
+6631_6#3	6631_6#3	1
+6631_6#4	6631_6#4	1
+6631_6#5	6631_6#5	1
+6631_6#6	6631_6#6	1
+6631_6#7	6631_6#7	1
+6631_6#8	6631_6#8	1
+6631_6#9	6631_6#9	1
+6631_6#10	6631_6#10	1
+6631_6#11	6631_6#11	0
+6631_6#12	6631_6#12	1
+6631_6#13	6631_6#13	0
+6631_6#14	6631_6#14	1
+6631_6#15	6631_6#15	1
+6631_6#16	6631_6#16	1
+6631_6#17	6631_6#17	1
+6631_6#18	6631_6#18	1
+6631_6#19	6631_6#19	0
+6631_6#20	6631_6#20	0
+6631_6#21	6631_6#21	0
+6631_6#22	6631_6#22	1
+6631_6#23	6631_6#23	1
+6631_6#24	6631_6#24	1
+6631_7#1	6631_7#1	1
+6631_7#2	6631_7#2	0
+6631_7#3	6631_7#3	0
+6631_7#4	6631_7#4	1
+6631_7#5	6631_7#5	0
+6631_7#6	6631_7#6	0
+6631_7#7	6631_7#7	1
+6631_7#8	6631_7#8	0
+6631_7#9	6631_7#9	0
+6631_7#10	6631_7#10	1
+6631_7#11	6631_7#11	1
+6631_7#12	6631_7#12	1
+6649_7#6	6649_7#6	1
+6649_7#7	6649_7#7	1
+6649_7#8	6649_7#8	1
+6649_7#9	6649_7#9	1
+6649_7#10	6649_7#10	0
+6649_7#11	6649_7#11	1
+6649_7#12	6649_7#12	1
+6649_7#13	6649_7#13	0
+6649_7#14	6649_7#14	1
+6649_7#15	6649_7#15	0
+6649_7#16	6649_7#16	1
+6649_7#17	6649_7#17	1
+6649_7#18	6649_7#18	1
+6649_7#19	6649_7#19	1
+6649_7#20	6649_7#20	0
+6649_7#21	6649_7#21	0
+6649_7#22	6649_7#22	0
+6649_7#23	6649_7#23	0
+6649_7#24	6649_7#24	1
+6714_8#1	6714_8#1	1
+6714_8#2	6714_8#2	1
+6714_8#3	6714_8#3	0
+6714_8#4	6714_8#4	0
+6714_8#5	6714_8#5	1
+6714_8#6	6714_8#6	1
+6714_8#7	6714_8#7	0
+6714_8#8	6714_8#8	0
+6714_8#9	6714_8#9	0
+6714_8#10	6714_8#10	0
+6714_8#11	6714_8#11	0
+6714_8#12	6714_8#12	1
+6714_8#13	6714_8#13	0
+6714_8#14	6714_8#14	1
+6714_8#15	6714_8#15	1
+6714_8#16	6714_8#16	1
+6714_8#17	6714_8#17	1
+6714_8#18	6714_8#18	1
+6714_8#19	6714_8#19	1
+6714_8#20	6714_8#20	1
+6714_8#21	6714_8#21	1
+6714_8#22	6714_8#22	1
+6714_8#23	6714_8#23	1
+6714_8#24	6714_8#24	1
+6730_1#1	6730_1#1	1
+6730_1#2	6730_1#2	1
+6730_1#3	6730_1#3	1
+6730_1#4	6730_1#4	1
+6730_1#5	6730_1#5	1
+6730_1#6	6730_1#6	1
+6730_1#7	6730_1#7	1
+6730_1#8	6730_1#8	1
+6730_1#9	6730_1#9	0
+6730_1#10	6730_1#10	1
+6730_1#11	6730_1#11	0
+6730_1#12	6730_1#12	0
+6730_1#13	6730_1#13	1
+6730_1#14	6730_1#14	0
+6730_1#15	6730_1#15	1
+6730_1#16	6730_1#16	0
+6730_1#17	6730_1#17	1
+6730_1#18	6730_1#18	0
+6730_1#19	6730_1#19	1
+6730_1#20	6730_1#20	1
+6730_1#21	6730_1#21	1
+6730_1#22	6730_1#22	0
+6730_1#23	6730_1#23	1
+6730_1#24	6730_1#24	0
+6730_3#1	6730_3#1	1
+6730_3#2	6730_3#2	1
+6730_3#3	6730_3#3	1
+6730_3#4	6730_3#4	1
+6730_3#5	6730_3#5	0
+6730_3#6	6730_3#6	1
+6730_3#7	6730_3#7	1
+6730_3#8	6730_3#8	1
+6730_3#9	6730_3#9	1
+6730_3#10	6730_3#10	0
+6730_3#11	6730_3#11	1
+6730_3#12	6730_3#12	0
+6730_3#13	6730_3#13	1
+6730_3#14	6730_3#14	0
+6730_3#15	6730_3#15	0
+6730_3#16	6730_3#16	0
+6730_3#17	6730_3#17	0
+6730_3#18	6730_3#18	1
+6730_3#19	6730_3#19	0
+6730_3#20	6730_3#20	1
+6730_3#21	6730_3#21	1
+6730_3#22	6730_3#22	1
+6730_3#23	6730_3#23	1
+6730_3#24	6730_3#24	0
+6730_4#1	6730_4#1	1
+6730_4#2	6730_4#2	1
+6730_4#3	6730_4#3	0
+6730_4#4	6730_4#4	1
+6730_4#5	6730_4#5	0
+6730_4#6	6730_4#6	0
+6730_4#7	6730_4#7	1
+6730_4#8	6730_4#8	1
+6730_4#9	6730_4#9	1
+6730_4#10	6730_4#10	1
+6730_4#11	6730_4#11	1
+6730_4#12	6730_4#12	1
+6730_4#13	6730_4#13	1
+6730_4#14	6730_4#14	0
+6730_4#15	6730_4#15	0
+6730_4#16	6730_4#16	1
+6730_4#17	6730_4#17	0
+6730_4#18	6730_4#18	1
+6730_4#19	6730_4#19	1
+6730_4#20	6730_4#20	0
+6730_4#21	6730_4#21	1
+6730_4#22	6730_4#22	1
+6730_4#23	6730_4#23	1
+6730_4#24	6730_4#24	1
+6730_5#1	6730_5#1	0
+6730_5#2	6730_5#2	1
+6730_5#3	6730_5#3	1
+6730_5#4	6730_5#4	1
+6730_5#5	6730_5#5	1
+6730_5#6	6730_5#6	1
+6730_5#7	6730_5#7	1
+6730_5#8	6730_5#8	0
+6730_5#9	6730_5#9	1
+6730_5#10	6730_5#10	0
+6730_5#11	6730_5#11	1
+6730_5#12	6730_5#12	1
+6730_5#13	6730_5#13	1
+6730_5#14	6730_5#14	1
+6730_5#15	6730_5#15	1
+6730_5#16	6730_5#16	0
+6730_5#17	6730_5#17	1
+6730_5#18	6730_5#18	1
+6730_5#19	6730_5#19	1
+6730_5#20	6730_5#20	1
+6730_5#21	6730_5#21	1
+6730_5#22	6730_5#22	0
+6730_5#23	6730_5#23	1
+6730_5#24	6730_5#24	1
+6730_6#1	6730_6#1	1
+6730_6#2	6730_6#2	0
+6730_6#3	6730_6#3	0
+6730_6#4	6730_6#4	1
+6730_6#5	6730_6#5	1
+6730_6#6	6730_6#6	0
+6730_6#7	6730_6#7	1
+6730_6#8	6730_6#8	1
+6730_6#9	6730_6#9	0
+6730_6#10	6730_6#10	1
+6730_6#11	6730_6#11	1
+6730_6#12	6730_6#12	1
+6730_6#13	6730_6#13	0
+6730_6#14	6730_6#14	0
+6730_6#15	6730_6#15	1
+6730_6#16	6730_6#16	1
+6730_6#17	6730_6#17	1
+6730_6#18	6730_6#18	1
+6730_6#19	6730_6#19	1
+6730_6#20	6730_6#20	1
+6730_6#21	6730_6#21	0
+6730_6#22	6730_6#22	1
+6730_6#23	6730_6#23	1
+6730_6#24	6730_6#24	1
+6730_7#1	6730_7#1	0
+6730_7#2	6730_7#2	0
+6730_7#3	6730_7#3	1
+6730_7#4	6730_7#4	0
+6730_7#5	6730_7#5	1
+6730_7#6	6730_7#6	0
+6730_7#7	6730_7#7	1
+6730_7#8	6730_7#8	1
+6730_7#9	6730_7#9	1
+6730_7#10	6730_7#10	0
+6730_7#11	6730_7#11	0
+6730_7#12	6730_7#12	1
+6730_7#13	6730_7#13	1
+6730_7#14	6730_7#14	1
+6730_7#15	6730_7#15	1
+6730_7#16	6730_7#16	0
+6730_7#17	6730_7#17	0
+6730_7#18	6730_7#18	1
+6730_7#19	6730_7#19	1
+6730_7#20	6730_7#20	1
+6730_7#21	6730_7#21	1
+6730_7#22	6730_7#22	0
+6730_7#23	6730_7#23	0
+6730_7#24	6730_7#24	0
+6730_8#1	6730_8#1	1
+6730_8#2	6730_8#2	1
+6730_8#3	6730_8#3	1
+6730_8#4	6730_8#4	1
+6730_8#5	6730_8#5	0
+6730_8#6	6730_8#6	1
+6730_8#7	6730_8#7	0
+6730_8#8	6730_8#8	1
+6730_8#9	6730_8#9	0
+6730_8#10	6730_8#10	1
+6730_8#11	6730_8#11	1
+6730_8#12	6730_8#12	1
+6730_8#13	6730_8#13	1
+6730_8#14	6730_8#14	0
+6730_8#15	6730_8#15	1
+6730_8#16	6730_8#16	1
+6730_8#17	6730_8#17	1
+6730_8#18	6730_8#18	1
+6730_8#19	6730_8#19	1
+6730_8#20	6730_8#20	0
+6730_8#21	6730_8#21	1
+6730_8#22	6730_8#22	0
+6730_8#23	6730_8#23	1
+6730_8#24	6730_8#24	0
+6714_7#1	6714_7#1	1
+6714_7#2	6714_7#2	0
+6714_7#3	6714_7#3	1
+6714_7#4	6714_7#4	1
+6714_7#5	6714_7#5	0
+6714_7#6	6714_7#6	0
+6714_7#7	6714_7#7	1
+6714_7#8	6714_7#8	0
+6714_7#9	6714_7#9	1
+6714_7#10	6714_7#10	1
+6714_7#11	6714_7#11	1
+6714_7#12	6714_7#12	0
+6714_7#13	6714_7#13	1
+6714_7#14	6714_7#14	1
+6714_7#15	6714_7#15	1
+6714_7#16	6714_7#16	1
+6714_7#17	6714_7#17	0
+6714_7#18	6714_7#18	0
+6714_7#19	6714_7#19	0
+6714_7#20	6714_7#20	0
+6714_7#21	6714_7#21	0
+6714_7#23	6714_7#23	1
+6714_7#24	6714_7#24	1
+6755_1#1	6755_1#1	0
+6755_1#2	6755_1#2	1
+6755_1#3	6755_1#3	0
+6755_1#4	6755_1#4	1
+6755_1#5	6755_1#5	1
+6755_1#6	6755_1#6	0
+6755_1#7	6755_1#7	1
+6755_1#8	6755_1#8	0
+6755_1#9	6755_1#9	1
+6755_1#10	6755_1#10	1
+6755_1#11	6755_1#11	1
+6755_1#12	6755_1#12	1
+6755_1#13	6755_1#13	1
+6755_1#14	6755_1#14	1
+6755_1#15	6755_1#15	0
+6755_1#16	6755_1#16	1
+6755_1#17	6755_1#17	1
+6755_1#18	6755_1#18	0
+6755_1#19	6755_1#19	0
+6755_1#20	6755_1#20	1
+6755_1#22	6755_1#22	1
+6755_1#23	6755_1#23	0
+6755_1#24	6755_1#24	1
+6755_2#1	6755_2#1	0
+6755_2#2	6755_2#2	0
+6755_2#3	6755_2#3	1
+6755_2#4	6755_2#4	1
+6755_2#5	6755_2#5	0
+6755_2#6	6755_2#6	1
+6755_2#7	6755_2#7	0
+6755_2#8	6755_2#8	0
+6755_2#9	6755_2#9	1
+6755_2#10	6755_2#10	0
+6755_2#11	6755_2#11	1
+6755_2#12	6755_2#12	1
+6755_2#13	6755_2#13	0
+6755_2#14	6755_2#14	0
+6755_2#15	6755_2#15	1
+6755_2#16	6755_2#16	1
+6755_2#17	6755_2#17	1
+6755_2#18	6755_2#18	1
+6755_2#19	6755_2#19	0
+6755_2#20	6755_2#20	0
+6755_2#21	6755_2#21	0
+6755_2#22	6755_2#22	0
+6755_2#23	6755_2#23	1
+6755_2#24	6755_2#24	1
+6775_1#1	6775_1#1	1
+6775_1#2	6775_1#2	1
+6775_1#3	6775_1#3	1
+6775_1#4	6775_1#4	1
+6775_1#5	6775_1#5	1
+6775_1#6	6775_1#6	0
+6775_1#7	6775_1#7	1
+6775_1#8	6775_1#8	1
+6775_1#9	6775_1#9	1
+6775_1#10	6775_1#10	1
+6775_1#11	6775_1#11	0
+6775_1#12	6775_1#12	0
+6775_1#13	6775_1#13	1
+6775_1#14	6775_1#14	1
+6775_1#15	6775_1#15	0
+6775_1#16	6775_1#16	0
+6775_1#17	6775_1#17	1
+6775_1#18	6775_1#18	0
+6775_1#19	6775_1#19	0
+6775_1#20	6775_1#20	0
+6775_1#21	6775_1#21	0
+6775_1#22	6775_1#22	1
+6775_1#23	6775_1#23	1
+6775_1#24	6775_1#24	0
+6775_2#1	6775_2#1	0
+6775_2#2	6775_2#2	0
+6775_2#3	6775_2#3	1
+6775_2#4	6775_2#4	1
+6775_2#5	6775_2#5	1
+6775_2#6	6775_2#6	1
+6775_2#7	6775_2#7	0
+6775_2#8	6775_2#8	1
+6775_2#9	6775_2#9	1
+6775_2#10	6775_2#10	0
+6775_2#11	6775_2#11	1
+6775_2#12	6775_2#12	1
+6775_2#13	6775_2#13	1
+6775_2#14	6775_2#14	1
+6775_2#15	6775_2#15	1
+6775_2#16	6775_2#16	1
+6775_2#17	6775_2#17	1
+6775_2#18	6775_2#18	0
+6775_2#19	6775_2#19	1
+6775_2#20	6775_2#20	1
+6775_2#21	6775_2#21	1
+6775_2#22	6775_2#22	0
+6775_2#23	6775_2#23	1
+6775_2#24	6775_2#24	1
+6755_3#1	6755_3#1	0
+6755_3#2	6755_3#2	1
+6755_3#3	6755_3#3	0
+6755_3#4	6755_3#4	1
+6755_3#5	6755_3#5	0
+6755_3#7	6755_3#7	1
+6755_3#8	6755_3#8	0
+6755_3#9	6755_3#9	1
+6755_3#10	6755_3#10	0
+6755_3#11	6755_3#11	1
+6755_3#12	6755_3#12	0
+6755_3#13	6755_3#13	1
+6755_3#14	6755_3#14	1
+6755_3#15	6755_3#15	0
+6755_3#16	6755_3#16	1
+6755_3#17	6755_3#17	1
+6755_3#18	6755_3#18	0
+6755_3#19	6755_3#19	1
+6755_3#20	6755_3#20	1
+6755_3#22	6755_3#22	0
+6755_3#23	6755_3#23	1
+6755_3#24	6755_3#24	0
+6680_4#1	6680_4#1	1
+6680_4#2	6680_4#2	1
+6680_4#3	6680_4#3	1
+6680_4#4	6680_4#4	0
+6680_4#5	6680_4#5	1
+6680_4#6	6680_4#6	1
+6680_4#7	6680_4#7	0
+6680_4#8	6680_4#8	0
+6680_4#9	6680_4#9	1
+6680_4#10	6680_4#10	0
+6680_4#11	6680_4#11	0
+6680_4#12	6680_4#12	0
+6680_4#13	6680_4#13	1
+6680_4#14	6680_4#14	1
+6680_4#15	6680_4#15	0
+6680_4#16	6680_4#16	1
+6680_4#17	6680_4#17	0
+6680_4#18	6680_4#18	1
+6680_4#19	6680_4#19	0
+6680_4#20	6680_4#20	1
+6680_4#21	6680_4#21	1
+6680_4#22	6680_4#22	1
+6680_4#23	6680_4#23	1
+6680_4#24	6680_4#24	1
+6680_5#1	6680_5#1	0
+6680_5#2	6680_5#2	1
+6680_5#3	6680_5#3	1
+6680_5#4	6680_5#4	1
+6680_5#5	6680_5#5	1
+6680_5#6	6680_5#6	1
+6680_5#7	6680_5#7	1
+6680_5#8	6680_5#8	1
+6680_5#9	6680_5#9	1
+6680_5#10	6680_5#10	0
+6680_5#11	6680_5#11	1
+6680_5#12	6680_5#12	0
+6680_5#13	6680_5#13	1
+6680_5#14	6680_5#14	0
+6680_5#15	6680_5#15	1
+6680_5#16	6680_5#16	0
+6680_5#17	6680_5#17	1
+6680_5#18	6680_5#18	1
+6680_5#19	6680_5#19	1
+6680_5#20	6680_5#20	0
+6680_5#21	6680_5#21	1
+6680_5#22	6680_5#22	1
+6680_5#23	6680_5#23	1
+6680_5#24	6680_5#24	1
+6680_6#2	6680_6#2	1
+6680_6#3	6680_6#3	1
+6680_6#4	6680_6#4	0
+6680_6#5	6680_6#5	1
+6680_6#6	6680_6#6	1
+6680_6#7	6680_6#7	0
+6680_6#8	6680_6#8	1
+6680_6#9	6680_6#9	0
+6680_6#10	6680_6#10	1
+6680_6#11	6680_6#11	1
+6680_6#12	6680_6#12	0
+6680_6#13	6680_6#13	1
+6680_6#14	6680_6#14	1
+6680_6#15	6680_6#15	0
+6680_6#16	6680_6#16	0
+6680_6#17	6680_6#17	1
+6680_6#18	6680_6#18	1
+6680_6#19	6680_6#19	0
+6680_6#20	6680_6#20	1
+6680_6#21	6680_6#21	1
+6680_6#22	6680_6#22	1
+6680_6#23	6680_6#23	0
+6680_6#24	6680_6#24	1
+6680_7#1	6680_7#1	1
+6680_7#2	6680_7#2	0
+6680_7#3	6680_7#3	1
+6680_7#4	6680_7#4	0
+6680_7#5	6680_7#5	1
+6680_7#6	6680_7#6	0
+6680_7#7	6680_7#7	1
+6680_7#9	6680_7#9	1
+6680_7#10	6680_7#10	1
+6680_7#11	6680_7#11	1
+6680_7#12	6680_7#12	0
+6680_7#13	6680_7#13	0
+6680_7#14	6680_7#14	0
+6680_7#15	6680_7#15	1
+6680_7#16	6680_7#16	1
+6680_7#17	6680_7#17	1
+6680_7#18	6680_7#18	1
+6680_7#19	6680_7#19	1
+6680_7#20	6680_7#20	1
+6680_7#21	6680_7#21	1
+6680_7#22	6680_7#22	1
+6680_7#23	6680_7#23	1
+6680_7#24	6680_7#24	1
+6731_1#1	6731_1#1	1
+6731_1#2	6731_1#2	1
+6731_1#3	6731_1#3	0
+6731_1#4	6731_1#4	1
+6731_1#5	6731_1#5	0
+6731_1#6	6731_1#6	0
+6731_1#7	6731_1#7	1
+6731_1#8	6731_1#8	1
+6731_1#9	6731_1#9	1
+6731_1#10	6731_1#10	1
+6731_1#11	6731_1#11	1
+6731_1#12	6731_1#12	1
+6731_1#14	6731_1#14	1
+6731_1#15	6731_1#15	1
+6731_1#17	6731_1#17	1
+6731_1#18	6731_1#18	1
+6731_1#19	6731_1#19	1
+6731_1#20	6731_1#20	0
+6731_1#22	6731_1#22	1
+6731_1#23	6731_1#23	1
+6731_1#24	6731_1#24	1
+6731_2#1	6731_2#1	0
+6731_2#2	6731_2#2	1
+6731_2#3	6731_2#3	0
+6731_2#4	6731_2#4	0
+6731_2#5	6731_2#5	0
+6731_2#6	6731_2#6	1
+6731_2#7	6731_2#7	1
+6731_2#8	6731_2#8	1
+6731_2#9	6731_2#9	0
+6731_2#10	6731_2#10	1
+6731_2#12	6731_2#12	0
+6731_2#13	6731_2#13	1
+6731_2#14	6731_2#14	1
+6731_2#15	6731_2#15	0
+6731_2#16	6731_2#16	1
+6731_2#17	6731_2#17	1
+6731_2#18	6731_2#18	0
+6731_2#19	6731_2#19	0
+6731_2#20	6731_2#20	0
+6731_2#21	6731_2#21	1
+6731_2#22	6731_2#22	1
+6731_2#23	6731_2#23	0
+6731_2#24	6731_2#24	0
+6731_3#1	6731_3#1	1
+6731_3#2	6731_3#2	1
+6731_3#3	6731_3#3	1
+6731_3#4	6731_3#4	1
+6731_3#5	6731_3#5	1
+6731_3#6	6731_3#6	1
+6731_3#7	6731_3#7	1
+6731_3#8	6731_3#8	0
+6731_3#9	6731_3#9	1
+6731_3#10	6731_3#10	0
+6731_3#11	6731_3#11	1
+6731_3#12	6731_3#12	1
+6731_3#13	6731_3#13	1
+6731_3#14	6731_3#14	1
+6731_3#15	6731_3#15	0
+6731_3#16	6731_3#16	0
+6731_3#17	6731_3#17	0
+6731_3#18	6731_3#18	1
+6731_3#19	6731_3#19	1
+6731_3#20	6731_3#20	0
+6731_3#21	6731_3#21	0
+6731_3#22	6731_3#22	1
+6731_3#23	6731_3#23	1
+6731_3#24	6731_3#24	1
+6731_4#1	6731_4#1	1
+6731_4#2	6731_4#2	1
+6731_4#3	6731_4#3	1
+6731_4#4	6731_4#4	1
+6731_4#5	6731_4#5	1
+6731_4#6	6731_4#6	1
+6731_4#7	6731_4#7	1
+6731_4#8	6731_4#8	1
+6731_4#9	6731_4#9	1
+6731_4#10	6731_4#10	1
+6731_4#11	6731_4#11	1
+6731_4#12	6731_4#12	1
+6731_4#13	6731_4#13	0
+6731_4#14	6731_4#14	1
+6731_4#15	6731_4#15	1
+6731_4#16	6731_4#16	1
+6731_4#17	6731_4#17	0
+6731_4#18	6731_4#18	1
+6731_4#19	6731_4#19	1
+6731_4#20	6731_4#20	1
+6731_4#21	6731_4#21	1
+6731_4#22	6731_4#22	1
+6731_4#23	6731_4#23	1
+6731_4#24	6731_4#24	1
+6731_5#1	6731_5#1	0
+6731_5#2	6731_5#2	0
+6731_5#3	6731_5#3	1
+6731_5#4	6731_5#4	0
+6731_5#5	6731_5#5	0
+6731_5#6	6731_5#6	1
+6731_5#7	6731_5#7	1
+6731_5#8	6731_5#8	1
+6731_5#9	6731_5#9	1
+6731_5#10	6731_5#10	0
+6731_5#11	6731_5#11	0
+6731_5#12	6731_5#12	0
+6731_5#13	6731_5#13	0
+6731_5#14	6731_5#14	0
+6731_5#15	6731_5#15	1
+6731_5#16	6731_5#16	0
+6731_5#17	6731_5#17	1
+6731_5#18	6731_5#18	1
+6731_5#19	6731_5#19	1
+6731_5#20	6731_5#20	1
+6731_5#21	6731_5#21	1
+6731_5#22	6731_5#22	1
+6731_5#23	6731_5#23	0
+6731_5#24	6731_5#24	0
+6731_6#1	6731_6#1	0
+6731_6#2	6731_6#2	1
+6731_6#3	6731_6#3	1
+6731_6#4	6731_6#4	1
+6731_6#5	6731_6#5	0
+6731_6#6	6731_6#6	1
+6731_6#7	6731_6#7	0
+6731_6#8	6731_6#8	0
+6731_6#9	6731_6#9	1
+6731_6#10	6731_6#10	0
+6731_6#11	6731_6#11	1
+6731_6#12	6731_6#12	1
+6731_6#13	6731_6#13	1
+6731_6#14	6731_6#14	1
+6731_6#15	6731_6#15	1
+6731_6#16	6731_6#16	1
+6731_6#17	6731_6#17	0
+6731_6#18	6731_6#18	0
+6731_6#19	6731_6#19	1
+6731_6#20	6731_6#20	0
+6731_6#21	6731_6#21	1
+6731_6#22	6731_6#22	0
+6731_6#23	6731_6#23	0
+6731_6#24	6731_6#24	0
+6755_4#1	6755_4#1	1
+6755_4#2	6755_4#2	0
+6755_4#3	6755_4#3	0
+6755_4#4	6755_4#4	1
+6755_4#5	6755_4#5	1
+6755_4#6	6755_4#6	0
+6755_4#7	6755_4#7	1
+6755_4#8	6755_4#8	1
+6755_4#9	6755_4#9	0
+6755_4#10	6755_4#10	1
+6755_4#11	6755_4#11	1
+6755_4#12	6755_4#12	1
+6755_4#13	6755_4#13	1
+6755_4#15	6755_4#15	0
+6755_4#16	6755_4#16	1
+6755_4#17	6755_4#17	0
+6755_4#18	6755_4#18	1
+6755_4#19	6755_4#19	1
+6755_4#21	6755_4#21	1
+6755_4#22	6755_4#22	1
+6755_4#23	6755_4#23	1
+6755_4#24	6755_4#24	1
+6755_5#1	6755_5#1	1
+6755_5#2	6755_5#2	1
+6755_5#3	6755_5#3	1
+6755_5#4	6755_5#4	0
+6755_5#5	6755_5#5	1
+6755_5#6	6755_5#6	0
+6755_5#7	6755_5#7	1
+6755_5#8	6755_5#8	0
+6755_5#9	6755_5#9	1
+6755_5#10	6755_5#10	0
+6755_5#11	6755_5#11	1
+6755_5#12	6755_5#12	0
+6755_5#13	6755_5#13	1
+6755_5#14	6755_5#14	0
+6755_5#15	6755_5#15	0
+6755_5#16	6755_5#16	1
+6755_5#17	6755_5#17	1
+6755_5#18	6755_5#18	0
+6755_5#19	6755_5#19	0
+6755_5#20	6755_5#20	1
+6755_5#21	6755_5#21	1
+6755_5#22	6755_5#22	1
+6755_5#23	6755_5#23	0
+6755_5#24	6755_5#24	1
+6755_6#1	6755_6#1	0
+6755_6#2	6755_6#2	1
+6755_6#3	6755_6#3	0
+6755_6#4	6755_6#4	0
+6755_6#5	6755_6#5	1
+6755_6#7	6755_6#7	0
+6755_6#8	6755_6#8	1
+6755_6#10	6755_6#10	1
+6755_6#11	6755_6#11	1
+6755_6#12	6755_6#12	0
+6755_6#13	6755_6#13	1
+6755_6#14	6755_6#14	1
+6755_6#15	6755_6#15	1
+6755_6#16	6755_6#16	0
+6755_6#17	6755_6#17	0
+6755_6#19	6755_6#19	1
+6755_6#20	6755_6#20	1
+6755_6#21	6755_6#21	1
+6755_6#22	6755_6#22	0
+6755_6#23	6755_6#23	0
+6736_4#1	6736_4#1	0
+6736_4#2	6736_4#2	1
+6736_4#3	6736_4#3	0
+6736_4#4	6736_4#4	0
+6736_4#5	6736_4#5	0
+6736_4#6	6736_4#6	0
+6736_4#7	6736_4#7	0
+6736_4#8	6736_4#8	0
+6736_4#9	6736_4#9	0
+6736_4#10	6736_4#10	0
+6736_4#11	6736_4#11	1
+6736_4#12	6736_4#12	0
+6736_4#13	6736_4#13	1
+6736_4#14	6736_4#14	0
+6736_4#15	6736_4#15	1
+6736_4#16	6736_4#16	1
+6736_4#17	6736_4#17	0
+6736_4#18	6736_4#18	1
+6736_4#19	6736_4#19	1
+6736_4#20	6736_4#20	0
+6736_4#21	6736_4#21	0
+6736_4#22	6736_4#22	1
+6736_4#23	6736_4#23	1
+6736_4#24	6736_4#24	0
+6736_5#1	6736_5#1	1
+6736_5#2	6736_5#2	1
+6736_5#3	6736_5#3	1
+6736_5#4	6736_5#4	0
+6736_5#5	6736_5#5	1
+6736_5#6	6736_5#6	1
+6736_5#7	6736_5#7	0
+6736_5#8	6736_5#8	1
+6736_5#9	6736_5#9	1
+6736_5#10	6736_5#10	1
+6736_5#11	6736_5#11	0
+6736_5#12	6736_5#12	0
+6736_5#13	6736_5#13	0
+6736_5#15	6736_5#15	0
+6736_5#16	6736_5#16	0
+6736_5#17	6736_5#17	0
+6736_5#19	6736_5#19	1
+6736_5#20	6736_5#20	1
+6736_5#21	6736_5#21	0
+6736_5#22	6736_5#22	0
+6736_5#23	6736_5#23	0
+6736_5#24	6736_5#24	1
+6736_6#1	6736_6#1	1
+6736_6#2	6736_6#2	1
+6736_6#3	6736_6#3	0
+6736_6#4	6736_6#4	0
+6736_6#5	6736_6#5	0
+6736_6#6	6736_6#6	0
+6736_6#7	6736_6#7	0
+6736_6#8	6736_6#8	1
+6736_6#9	6736_6#9	1
+6736_6#10	6736_6#10	1
+6736_6#11	6736_6#11	1
+6736_6#12	6736_6#12	0
+6736_6#13	6736_6#13	0
+6736_6#14	6736_6#14	1
+6736_6#15	6736_6#15	0
+6736_6#16	6736_6#16	1
+6736_6#17	6736_6#17	0
+6736_6#18	6736_6#18	0
+6736_6#19	6736_6#19	1
+6736_6#20	6736_6#20	0
+6736_6#21	6736_6#21	0
+6736_6#22	6736_6#22	0
+6736_6#23	6736_6#23	0
+6736_6#24	6736_6#24	1
+6736_7#1	6736_7#1	1
+6736_7#2	6736_7#2	0
+6736_7#3	6736_7#3	1
+6736_7#4	6736_7#4	0
+6736_7#5	6736_7#5	1
+6736_7#6	6736_7#6	1
+6736_7#7	6736_7#7	1
+6736_7#8	6736_7#8	0
+6736_7#9	6736_7#9	1
+6736_7#10	6736_7#10	1
+6736_7#11	6736_7#11	1
+6736_7#12	6736_7#12	1
+6736_7#13	6736_7#13	1
+6736_7#14	6736_7#14	1
+6736_7#15	6736_7#15	1
+6736_7#16	6736_7#16	1
+6736_7#17	6736_7#17	0
+6736_7#19	6736_7#19	1
+6736_7#20	6736_7#20	1
+6736_7#21	6736_7#21	1
+6736_7#22	6736_7#22	1
+6736_7#23	6736_7#23	0
+6736_7#24	6736_7#24	1
+6736_8#1	6736_8#1	0
+6736_8#2	6736_8#2	0
+6736_8#3	6736_8#3	1
+6736_8#4	6736_8#4	0
+6736_8#5	6736_8#5	0
+6736_8#6	6736_8#6	0
+6736_8#7	6736_8#7	0
+6736_8#8	6736_8#8	1
+6736_8#9	6736_8#9	1
+6736_8#10	6736_8#10	1
+6736_8#11	6736_8#11	1
+6736_8#12	6736_8#12	1
+6736_8#13	6736_8#13	0
+6736_8#14	6736_8#14	1
+6736_8#15	6736_8#15	1
+6736_8#16	6736_8#16	1
+6736_8#17	6736_8#17	1
+6736_8#18	6736_8#18	1
+6736_8#19	6736_8#19	1
+6736_8#20	6736_8#20	0
+6736_8#21	6736_8#21	1
+6736_8#22	6736_8#22	1
+6736_8#23	6736_8#23	0
+6736_8#24	6736_8#24	1
+6841_7#1	6841_7#1	0
+6841_7#2	6841_7#2	1
+6841_7#3	6841_7#3	0
+6841_7#4	6841_7#4	0
+6841_7#5	6841_7#5	1
+6841_7#6	6841_7#6	1
+6841_7#7	6841_7#7	1
+6841_7#8	6841_7#8	1
+6841_7#9	6841_7#9	1
+6841_7#10	6841_7#10	1
+6841_7#11	6841_7#11	1
+6841_7#12	6841_7#12	0
+6841_7#13	6841_7#13	1
+6841_7#14	6841_7#14	0
+6841_7#15	6841_7#15	1
+6841_7#16	6841_7#16	0
+6841_7#17	6841_7#17	0
+6841_7#18	6841_7#18	0
+6841_7#19	6841_7#19	1
+6841_7#20	6841_7#20	1
+6841_7#21	6841_7#21	1
+6841_7#22	6841_7#22	0
+6841_7#23	6841_7#23	1
+6841_7#24	6841_7#24	0
+6710_6#1	6710_6#1	1
+6710_6#2	6710_6#2	1
+6710_6#3	6710_6#3	0
+6710_6#4	6710_6#4	1
+6710_6#6	6710_6#6	0
+6710_6#7	6710_6#7	0
+6710_6#8	6710_6#8	0
+6710_6#9	6710_6#9	1
+6710_6#10	6710_6#10	1
+6710_6#11	6710_6#11	1
+6710_6#12	6710_6#12	0
+6710_6#13	6710_6#13	1
+6710_6#14	6710_6#14	1
+6710_6#15	6710_6#15	1
+6710_6#16	6710_6#16	0
+6710_6#17	6710_6#17	0
+6710_6#18	6710_6#18	1
+6710_6#19	6710_6#19	1
+6710_6#20	6710_6#20	1
+6710_6#21	6710_6#21	1
+6710_6#22	6710_6#22	0
+6710_6#23	6710_6#23	1
+6710_6#24	6710_6#24	0
+6710_7#1	6710_7#1	1
+6710_7#2	6710_7#2	1
+6710_7#4	6710_7#4	1
+6710_7#5	6710_7#5	0
+6710_7#6	6710_7#6	1
+6710_7#7	6710_7#7	0
+6710_7#8	6710_7#8	1
+6710_7#9	6710_7#9	0
+6710_7#10	6710_7#10	0
+6710_7#11	6710_7#11	1
+6710_7#12	6710_7#12	0
+6710_7#13	6710_7#13	0
+6710_7#14	6710_7#14	0
+6710_7#15	6710_7#15	1
+6710_7#16	6710_7#16	1
+6710_7#17	6710_7#17	1
+6710_7#18	6710_7#18	1
+6710_7#19	6710_7#19	0
+6710_7#20	6710_7#20	1
+6710_7#21	6710_7#21	1
+6710_7#22	6710_7#22	0
+6710_7#23	6710_7#23	0
+6710_7#24	6710_7#24	1
+6710_8#1	6710_8#1	0
+6710_8#2	6710_8#2	0
+6710_8#3	6710_8#3	0
+6710_8#5	6710_8#5	0
+6710_8#6	6710_8#6	1
+6710_8#7	6710_8#7	1
+6710_8#8	6710_8#8	0
+6710_8#9	6710_8#9	1
+6710_8#10	6710_8#10	1
+6710_8#11	6710_8#11	1
+6710_8#12	6710_8#12	0
+6710_8#13	6710_8#13	1
+6710_8#14	6710_8#14	0
+6710_8#15	6710_8#15	1
+6710_8#16	6710_8#16	1
+6710_8#17	6710_8#17	1
+6710_8#18	6710_8#18	0
+6710_8#19	6710_8#19	1
+6710_8#20	6710_8#20	1
+6710_8#21	6710_8#21	1
+6710_8#22	6710_8#22	1
+6710_8#23	6710_8#23	1
+6710_8#24	6710_8#24	0
+6805_2#1	6805_2#1	1
+6805_2#2	6805_2#2	1
+6805_2#3	6805_2#3	0
+6805_2#4	6805_2#4	0
+6805_2#5	6805_2#5	0
+6805_2#6	6805_2#6	0
+6805_2#7	6805_2#7	1
+6805_2#8	6805_2#8	0
+6805_2#9	6805_2#9	0
+6805_2#10	6805_2#10	0
+6805_2#11	6805_2#11	0
+6805_2#12	6805_2#12	0
+6805_2#13	6805_2#13	1
+6805_2#14	6805_2#14	0
+6805_2#15	6805_2#15	1
+6805_2#16	6805_2#16	0
+6805_2#17	6805_2#17	1
+6805_2#18	6805_2#18	1
+6805_2#19	6805_2#19	0
+6805_2#20	6805_2#20	0
+6805_2#21	6805_2#21	0
+6805_2#22	6805_2#22	0
+6805_2#23	6805_2#23	1
+6805_2#24	6805_2#24	1
+6805_3#1	6805_3#1	1
+6805_3#2	6805_3#2	0
+6805_3#3	6805_3#3	0
+6805_3#4	6805_3#4	1
+6805_3#5	6805_3#5	0
+6805_3#6	6805_3#6	1
+6805_3#7	6805_3#7	0
+6805_3#8	6805_3#8	1
+6805_3#9	6805_3#9	0
+6805_3#10	6805_3#10	1
+6805_3#11	6805_3#11	1
+6805_3#12	6805_3#12	1
+6805_3#13	6805_3#13	1
+6805_3#14	6805_3#14	0
+6805_3#15	6805_3#15	1
+6805_3#16	6805_3#16	0
+6805_3#17	6805_3#17	1
+6805_3#18	6805_3#18	1
+6805_3#19	6805_3#19	0
+6805_3#20	6805_3#20	1
+6805_3#21	6805_3#21	0
+6805_3#22	6805_3#22	0
+6805_3#23	6805_3#23	1
+6805_3#24	6805_3#24	1
+6753_1#1	6753_1#1	1
+6753_1#2	6753_1#2	1
+6753_1#3	6753_1#3	1
+6753_1#4	6753_1#4	1
+6753_1#5	6753_1#5	0
+6753_1#6	6753_1#6	1
+6753_1#7	6753_1#7	0
+6753_1#8	6753_1#8	1
+6753_1#9	6753_1#9	1
+6753_1#10	6753_1#10	0
+6753_1#11	6753_1#11	0
+6753_1#12	6753_1#12	1
+6753_1#13	6753_1#13	0
+6753_1#14	6753_1#14	0
+6753_1#15	6753_1#15	1
+6753_1#16	6753_1#16	0
+6753_1#17	6753_1#17	1
+6753_1#18	6753_1#18	1
+6753_1#19	6753_1#19	1
+6753_1#20	6753_1#20	1
+6753_1#21	6753_1#21	1
+6753_1#22	6753_1#22	1
+6753_1#23	6753_1#23	1
+6753_1#24	6753_1#24	0
+6753_2#1	6753_2#1	0
+6753_2#2	6753_2#2	1
+6753_2#3	6753_2#3	0
+6753_2#4	6753_2#4	1
+6753_2#5	6753_2#5	1
+6753_2#6	6753_2#6	1
+6753_2#7	6753_2#7	0
+6753_2#8	6753_2#8	1
+6753_2#9	6753_2#9	1
+6753_2#10	6753_2#10	0
+6753_2#11	6753_2#11	0
+6753_2#12	6753_2#12	1
+6753_2#13	6753_2#13	0
+6753_2#14	6753_2#14	1
+6753_2#15	6753_2#15	0
+6753_2#16	6753_2#16	0
+6753_2#17	6753_2#17	1
+6753_2#18	6753_2#18	0
+6753_2#19	6753_2#19	0
+6753_2#20	6753_2#20	0
+6753_2#21	6753_2#21	0
+6753_2#22	6753_2#22	0
+6753_2#23	6753_2#23	0
+6753_3#1	6753_3#1	1
+6753_3#2	6753_3#2	0
+6753_3#3	6753_3#3	1
+6753_3#4	6753_3#4	1
+6753_3#5	6753_3#5	1
+6753_3#6	6753_3#6	1
+6753_3#7	6753_3#7	0
+6753_3#8	6753_3#8	0
+6753_3#9	6753_3#9	0
+6753_3#10	6753_3#10	1
+6753_3#11	6753_3#11	1
+6753_3#12	6753_3#12	1
+6753_3#13	6753_3#13	1
+6753_3#14	6753_3#14	1
+6753_3#15	6753_3#15	0
+6753_3#16	6753_3#16	1
+6753_3#17	6753_3#17	1
+6753_3#19	6753_3#19	1
+6753_3#20	6753_3#20	1
+6753_3#21	6753_3#21	1
+6753_3#22	6753_3#22	0
+6753_3#23	6753_3#23	0
+6753_3#24	6753_3#24	1
+6753_4#1	6753_4#1	0
+6753_4#2	6753_4#2	0
+6753_4#3	6753_4#3	0
+6753_4#4	6753_4#4	1
+6753_4#5	6753_4#5	0
+6753_4#6	6753_4#6	0
+6753_4#7	6753_4#7	1
+6753_4#8	6753_4#8	0
+6753_4#9	6753_4#9	1
+6753_4#10	6753_4#10	1
+6753_4#11	6753_4#11	1
+6753_4#12	6753_4#12	0
+6753_4#13	6753_4#13	1
+6753_4#14	6753_4#14	1
+6753_4#15	6753_4#15	0
+6753_4#16	6753_4#16	1
+6753_4#17	6753_4#17	1
+6753_4#18	6753_4#18	1
+6753_4#19	6753_4#19	0
+6753_4#20	6753_4#20	0
+6753_4#21	6753_4#21	0
+6753_4#22	6753_4#22	1
+6753_4#23	6753_4#23	0
+6753_4#24	6753_4#24	1
+6807_1#1	6807_1#1	1
+6807_1#2	6807_1#2	1
+6807_1#3	6807_1#3	0
+6807_1#4	6807_1#4	0
+6807_1#5	6807_1#5	0
+6807_1#6	6807_1#6	1
+6807_1#7	6807_1#7	0
+6807_1#8	6807_1#8	1
+6807_1#9	6807_1#9	1
+6807_1#10	6807_1#10	0
+6807_1#11	6807_1#11	1
+6807_1#12	6807_1#12	1
+6807_1#13	6807_1#13	1
+6807_1#14	6807_1#14	0
+6807_1#15	6807_1#15	1
+6807_1#16	6807_1#16	1
+6807_1#17	6807_1#17	0
+6807_1#18	6807_1#18	0
+6807_1#19	6807_1#19	1
+6807_1#20	6807_1#20	1
+6807_1#21	6807_1#21	1
+6807_1#22	6807_1#22	0
+6807_1#24	6807_1#24	1
+6807_2#1	6807_2#1	1
+6807_2#2	6807_2#2	0
+6807_2#3	6807_2#3	1
+6807_2#4	6807_2#4	1
+6807_2#5	6807_2#5	1
+6807_2#6	6807_2#6	1
+6807_2#7	6807_2#7	1
+6807_2#8	6807_2#8	0
+6807_2#9	6807_2#9	1
+6807_2#10	6807_2#10	1
+6807_2#11	6807_2#11	0
+6807_2#12	6807_2#12	0
+6807_2#13	6807_2#13	1
+6807_2#14	6807_2#14	1
+6807_2#15	6807_2#15	0
+6807_2#16	6807_2#16	1
+6807_2#17	6807_2#17	1
+6807_2#18	6807_2#18	1
+6807_2#19	6807_2#19	1
+6807_2#20	6807_2#20	1
+6807_2#21	6807_2#21	0
+6807_2#22	6807_2#22	0
+6807_2#23	6807_2#23	1
+6807_2#24	6807_2#24	1
+6807_3#1	6807_3#1	1
+6807_3#2	6807_3#2	1
+6807_3#3	6807_3#3	1
+6807_3#4	6807_3#4	0
+6807_3#5	6807_3#5	1
+6807_3#6	6807_3#6	1
+6807_3#7	6807_3#7	1
+6807_3#8	6807_3#8	1
+6807_3#9	6807_3#9	1
+6807_3#10	6807_3#10	0
+6807_3#11	6807_3#11	0
+6807_3#12	6807_3#12	0
+6807_3#13	6807_3#13	0
+6807_3#15	6807_3#15	0
+6807_3#16	6807_3#16	0
+6807_3#17	6807_3#17	0
+6807_3#18	6807_3#18	1
+6807_3#19	6807_3#19	1
+6807_3#20	6807_3#20	0
+6807_3#21	6807_3#21	1
+6807_3#22	6807_3#22	1
+6807_3#23	6807_3#23	1
+6830_3#1	6830_3#1	0
+6830_3#2	6830_3#2	0
+6830_3#3	6830_3#3	0
+6830_3#4	6830_3#4	0
+6830_3#5	6830_3#5	1
+6830_3#6	6830_3#6	1
+6830_3#7	6830_3#7	0
+6830_3#8	6830_3#8	1
+6830_3#10	6830_3#10	1
+6830_3#13	6830_3#13	1
+6830_3#14	6830_3#14	0
+6830_3#15	6830_3#15	1
+6830_3#16	6830_3#16	1
+6830_3#17	6830_3#17	0
+6830_3#18	6830_3#18	0
+6830_3#20	6830_3#20	1
+6830_3#21	6830_3#21	1
+6830_3#23	6830_3#23	1
+6830_3#24	6830_3#24	1
+6805_4#1	6805_4#1	0
+6805_4#2	6805_4#2	1
+6805_4#3	6805_4#3	1
+6805_4#4	6805_4#4	1
+6805_4#5	6805_4#5	1
+6805_4#6	6805_4#6	0
+6805_4#7	6805_4#7	1
+6805_4#8	6805_4#8	1
+6805_4#9	6805_4#9	1
+6805_4#10	6805_4#10	1
+6805_4#11	6805_4#11	1
+6805_4#12	6805_4#12	1
+6805_4#13	6805_4#13	1
+6805_4#14	6805_4#14	0
+6805_4#15	6805_4#15	1
+6805_4#16	6805_4#16	1
+6805_4#17	6805_4#17	1
+6805_4#18	6805_4#18	0
+6805_4#19	6805_4#19	0
+6805_4#20	6805_4#20	1
+6805_4#21	6805_4#21	0
+6805_4#22	6805_4#22	1
+6805_4#23	6805_4#23	0
+6805_4#24	6805_4#24	1
+6805_5#1	6805_5#1	1
+6805_5#2	6805_5#2	0
+6805_5#3	6805_5#3	1
+6805_5#4	6805_5#4	0
+6805_5#5	6805_5#5	1
+6805_5#6	6805_5#6	0
+6805_5#7	6805_5#7	1
+6805_5#8	6805_5#8	0
+6805_5#9	6805_5#9	1
+6805_5#10	6805_5#10	1
+6805_5#11	6805_5#11	1
+6805_5#12	6805_5#12	1
+6805_5#13	6805_5#13	1
+6805_5#14	6805_5#14	1
+6805_5#15	6805_5#15	0
+6805_5#16	6805_5#16	1
+6805_5#17	6805_5#17	1
+6805_5#19	6805_5#19	1
+6805_5#20	6805_5#20	1
+6805_5#21	6805_5#21	0
+6805_5#22	6805_5#22	0
+6805_5#23	6805_5#23	0
+6805_6#1	6805_6#1	1
+6805_6#2	6805_6#2	1
+6805_6#3	6805_6#3	1
+6805_6#4	6805_6#4	0
+6805_6#5	6805_6#5	1
+6805_6#6	6805_6#6	1
+6805_6#8	6805_6#8	0
+6805_6#9	6805_6#9	0
+6805_6#10	6805_6#10	1
+6805_6#11	6805_6#11	1
+6805_6#12	6805_6#12	1
+6805_6#13	6805_6#13	1
+6805_6#14	6805_6#14	1
+6805_6#15	6805_6#15	1
+6805_6#16	6805_6#16	0
+6805_6#17	6805_6#17	1
+6805_6#18	6805_6#18	1
+6805_6#19	6805_6#19	1
+6805_6#20	6805_6#20	1
+6805_6#21	6805_6#21	1
+6805_6#22	6805_6#22	1
+6805_6#23	6805_6#23	0
+6805_6#24	6805_6#24	0
+6805_7#1	6805_7#1	1
+6805_7#2	6805_7#2	1
+6805_7#3	6805_7#3	1
+6805_7#4	6805_7#4	0
+6805_7#5	6805_7#5	1
+6805_7#6	6805_7#6	1
+6805_7#7	6805_7#7	1
+6805_7#9	6805_7#9	1
+6805_7#10	6805_7#10	1
+6805_7#11	6805_7#11	0
+6805_7#12	6805_7#12	0
+6805_7#13	6805_7#13	0
+6805_7#14	6805_7#14	1
+6805_7#15	6805_7#15	1
+6805_7#16	6805_7#16	1
+6805_7#17	6805_7#17	0
+6805_7#18	6805_7#18	0
+6805_7#19	6805_7#19	1
+6805_7#20	6805_7#20	1
+6805_7#21	6805_7#21	0
+6805_7#22	6805_7#22	1
+6805_7#23	6805_7#23	1
+6840_1#1	6840_1#1	0
+6840_1#2	6840_1#2	1
+6840_1#3	6840_1#3	1
+6840_1#4	6840_1#4	0
+6840_1#5	6840_1#5	1
+6840_1#6	6840_1#6	0
+6840_1#7	6840_1#7	1
+6840_1#8	6840_1#8	1
+6840_1#9	6840_1#9	1
+6840_1#10	6840_1#10	1
+6840_1#11	6840_1#11	0
+6840_1#12	6840_1#12	1
+6840_1#13	6840_1#13	1
+6840_1#14	6840_1#14	1
+6840_1#15	6840_1#15	1
+6840_1#16	6840_1#16	1
+6840_1#17	6840_1#17	0
+6840_1#18	6840_1#18	0
+6840_1#19	6840_1#19	0
+6840_1#20	6840_1#20	1
+6840_1#21	6840_1#21	1
+6840_1#22	6840_1#22	1
+6840_1#23	6840_1#23	1
+6840_1#24	6840_1#24	0
+6871_1#1	6871_1#1	1
+6871_1#2	6871_1#2	0
+6871_1#3	6871_1#3	1
+6871_1#4	6871_1#4	1
+6871_1#5	6871_1#5	0
+6871_1#6	6871_1#6	0
+6871_1#7	6871_1#7	1
+6871_1#8	6871_1#8	1
+6871_1#9	6871_1#9	0
+6871_1#10	6871_1#10	1
+6871_1#11	6871_1#11	1
+6871_1#12	6871_1#12	1
+6871_1#13	6871_1#13	1
+6871_1#14	6871_1#14	0
+6871_1#15	6871_1#15	0
+6871_1#16	6871_1#16	1
+6871_1#17	6871_1#17	1
+6871_1#18	6871_1#18	1
+6871_1#19	6871_1#19	1
+6871_1#20	6871_1#20	1
+6871_1#22	6871_1#22	0
+6871_1#23	6871_1#23	1
+6871_1#24	6871_1#24	1
+6840_3#1	6840_3#1	1
+6840_3#2	6840_3#2	1
+6840_3#3	6840_3#3	0
+6840_3#4	6840_3#4	1
+6840_3#5	6840_3#5	0
+6840_3#6	6840_3#6	1
+6840_3#7	6840_3#7	1
+6840_3#8	6840_3#8	1
+6840_3#9	6840_3#9	1
+6840_3#10	6840_3#10	1
+6840_3#11	6840_3#11	1
+6840_3#12	6840_3#12	1
+6840_3#13	6840_3#13	0
+6840_3#14	6840_3#14	1
+6840_3#15	6840_3#15	1
+6840_3#16	6840_3#16	1
+6840_3#17	6840_3#17	0
+6840_3#18	6840_3#18	0
+6840_3#19	6840_3#19	0
+6840_3#20	6840_3#20	0
+6840_3#21	6840_3#21	0
+6840_3#22	6840_3#22	0
+6840_3#23	6840_3#23	1
+6840_3#24	6840_3#24	1
+6871_2#1	6871_2#1	0
+6871_2#2	6871_2#2	0
+6871_2#3	6871_2#3	0
+6871_2#4	6871_2#4	0
+6871_2#5	6871_2#5	1
+6871_2#6	6871_2#6	1
+6871_2#7	6871_2#7	0
+6871_2#8	6871_2#8	1
+6871_2#9	6871_2#9	1
+6871_2#13	6871_2#13	1
+6871_2#14	6871_2#14	1
+6871_2#15	6871_2#15	1
+6871_2#19	6871_2#19	0
+6871_2#20	6871_2#20	1
+6871_2#21	6871_2#21	1
+6823_1#2	6823_1#2	1
+6823_1#3	6823_1#3	1
+6823_1#5	6823_1#5	1
+6823_1#7	6823_1#7	0
+6823_1#8	6823_1#8	1
+6823_1#9	6823_1#9	1
+6823_1#10	6823_1#10	1
+6823_1#11	6823_1#11	0
+6823_1#12	6823_1#12	1
+6823_1#13	6823_1#13	1
+6823_1#14	6823_1#14	1
+6823_1#15	6823_1#15	1
+6823_1#16	6823_1#16	1
+6823_1#17	6823_1#17	1
+6823_1#18	6823_1#18	1
+6823_1#19	6823_1#19	0
+6823_1#20	6823_1#20	1
+6823_1#21	6823_1#21	1
+6823_1#22	6823_1#22	0
+6823_1#23	6823_1#23	0
+6823_1#24	6823_1#24	1
+6823_2#1	6823_2#1	1
+6823_2#2	6823_2#2	1
+6823_2#3	6823_2#3	1
+6823_2#4	6823_2#4	1
+6823_2#5	6823_2#5	1
+6823_2#6	6823_2#6	1
+6823_2#7	6823_2#7	0
+6823_2#8	6823_2#8	0
+6823_2#9	6823_2#9	1
+6823_2#10	6823_2#10	1
+6823_2#11	6823_2#11	0
+6823_2#12	6823_2#12	0
+6823_2#13	6823_2#13	1
+6823_2#14	6823_2#14	0
+6823_2#15	6823_2#15	1
+6823_2#16	6823_2#16	1
+6823_2#17	6823_2#17	0
+6823_2#18	6823_2#18	1
+6823_2#19	6823_2#19	1
+6823_2#20	6823_2#20	0
+6823_2#21	6823_2#21	0
+6823_2#22	6823_2#22	0
+6823_2#23	6823_2#23	1
+6823_2#24	6823_2#24	1
+6823_3#1	6823_3#1	1
+6823_3#2	6823_3#2	1
+6823_3#3	6823_3#3	1
+6823_3#4	6823_3#4	0
+6823_3#5	6823_3#5	1
+6823_3#6	6823_3#6	1
+6823_3#7	6823_3#7	0
+6823_3#8	6823_3#8	1
+6823_3#9	6823_3#9	1
+6823_3#10	6823_3#10	1
+6823_3#11	6823_3#11	1
+6823_3#12	6823_3#12	1
+6823_3#13	6823_3#13	1
+6823_3#14	6823_3#14	1
+6823_3#15	6823_3#15	1
+6823_3#16	6823_3#16	1
+6823_3#17	6823_3#17	1
+6823_3#18	6823_3#18	1
+6823_3#19	6823_3#19	0
+6823_3#20	6823_3#20	1
+6823_3#21	6823_3#21	1
+6823_3#22	6823_3#22	1
+6823_3#23	6823_3#23	0
+6823_3#24	6823_3#24	1
+6823_4#1	6823_4#1	1
+6823_4#2	6823_4#2	1
+6823_4#3	6823_4#3	1
+6823_4#4	6823_4#4	1
+6823_4#5	6823_4#5	1
+6823_4#6	6823_4#6	1
+6823_4#7	6823_4#7	1
+6823_4#8	6823_4#8	1
+6823_4#9	6823_4#9	1
+6823_4#10	6823_4#10	0
+6823_4#11	6823_4#11	0
+6823_4#12	6823_4#12	1
+6823_4#13	6823_4#13	1
+6823_4#14	6823_4#14	1
+6823_4#15	6823_4#15	1
+6823_4#16	6823_4#16	1
+6823_4#17	6823_4#17	1
+6823_4#18	6823_4#18	0
+6823_4#19	6823_4#19	0
+6823_4#20	6823_4#20	0
+6823_4#21	6823_4#21	0
+6823_4#22	6823_4#22	1
+6823_4#23	6823_4#23	0
+6823_4#24	6823_4#24	1
+6823_5#1	6823_5#1	0
+6823_5#2	6823_5#2	1
+6823_5#3	6823_5#3	0
+6823_5#4	6823_5#4	1
+6823_5#5	6823_5#5	1
+6823_5#6	6823_5#6	1
+6823_5#7	6823_5#7	1
+6823_5#8	6823_5#8	1
+6823_5#9	6823_5#9	0
+6823_5#10	6823_5#10	1
+6823_5#11	6823_5#11	0
+6823_5#12	6823_5#12	1
+6823_5#13	6823_5#13	0
+6823_5#14	6823_5#14	0
+6823_5#15	6823_5#15	0
+6823_5#16	6823_5#16	0
+6823_5#17	6823_5#17	1
+6823_5#18	6823_5#18	1
+6823_5#19	6823_5#19	0
+6823_5#20	6823_5#20	1
+6823_5#21	6823_5#21	1
+6823_5#22	6823_5#22	1
+6823_5#23	6823_5#23	0
+6823_5#24	6823_5#24	1
+6823_6#1	6823_6#1	1
+6823_6#2	6823_6#2	0
+6823_6#3	6823_6#3	1
+6823_6#4	6823_6#4	1
+6823_6#5	6823_6#5	1
+6823_6#6	6823_6#6	1
+6823_6#7	6823_6#7	1
+6823_6#8	6823_6#8	1
+6823_6#9	6823_6#9	0
+6823_6#10	6823_6#10	1
+6823_6#11	6823_6#11	1
+6823_6#12	6823_6#12	1
+6823_6#13	6823_6#13	1
+6823_6#14	6823_6#14	1
+6823_6#15	6823_6#15	1
+6823_6#16	6823_6#16	1
+6823_6#17	6823_6#17	1
+6823_6#18	6823_6#18	0
+6823_6#19	6823_6#19	0
+6823_6#20	6823_6#20	0
+6823_6#21	6823_6#21	0
+6823_6#22	6823_6#22	1
+6823_6#23	6823_6#23	0
+6823_6#24	6823_6#24	1
+6823_7#1	6823_7#1	1
+6823_7#2	6823_7#2	1
+6823_7#3	6823_7#3	1
+6823_7#4	6823_7#4	0
+6823_7#5	6823_7#5	1
+6823_7#6	6823_7#6	0
+6823_7#7	6823_7#7	0
+6823_7#8	6823_7#8	1
+6823_7#9	6823_7#9	1
+6823_7#10	6823_7#10	1
+6823_7#11	6823_7#11	1
+6823_7#12	6823_7#12	1
+6823_7#13	6823_7#13	0
+6823_7#14	6823_7#14	0
+6823_7#15	6823_7#15	1
+6823_7#16	6823_7#16	1
+6823_7#17	6823_7#17	1
+6823_7#18	6823_7#18	0
+6823_7#19	6823_7#19	1
+6823_7#20	6823_7#20	1
+6823_7#21	6823_7#21	1
+6823_7#22	6823_7#22	1
+6823_7#23	6823_7#23	0
+6823_7#24	6823_7#24	1
+6899_4#1	6899_4#1	1
+6899_4#2	6899_4#2	1
+6899_4#3	6899_4#3	0
+6899_4#4	6899_4#4	1
+6899_4#5	6899_4#5	1
+6899_4#6	6899_4#6	1
+6899_4#7	6899_4#7	0
+6899_4#8	6899_4#8	0
+6899_4#9	6899_4#9	1
+6899_4#10	6899_4#10	1
+6899_4#11	6899_4#11	1
+6899_4#12	6899_4#12	0
+6899_4#13	6899_4#13	0
+6899_4#14	6899_4#14	1
+6899_4#15	6899_4#15	1
+6899_4#16	6899_4#16	0
+6899_4#17	6899_4#17	1
+6899_4#18	6899_4#18	0
+6899_4#19	6899_4#19	0
+6899_4#20	6899_4#20	1
+6899_4#21	6899_4#21	1
+6899_4#22	6899_4#22	0
+6899_4#23	6899_4#23	0
+6899_4#24	6899_4#24	0
+6899_5#1	6899_5#1	0
+6899_5#2	6899_5#2	0
+6899_5#3	6899_5#3	0
+6899_5#4	6899_5#4	1
+6899_5#5	6899_5#5	0
+6899_5#6	6899_5#6	0
+6899_5#7	6899_5#7	1
+6899_5#8	6899_5#8	1
+6899_5#9	6899_5#9	1
+6899_5#10	6899_5#10	0
+6899_5#11	6899_5#11	0
+6899_5#12	6899_5#12	1
+6899_5#13	6899_5#13	1
+6899_5#14	6899_5#14	0
+6899_5#15	6899_5#15	1
+6899_5#16	6899_5#16	1
+6899_5#17	6899_5#17	1
+6899_5#18	6899_5#18	1
+6899_5#19	6899_5#19	1
+6899_5#20	6899_5#20	0
+6899_5#21	6899_5#21	0
+6899_5#22	6899_5#22	0
+6899_5#23	6899_5#23	1
+6899_5#24	6899_5#24	1
+6899_6#1	6899_6#1	1
+6899_6#2	6899_6#2	0
+6899_6#3	6899_6#3	1
+6899_6#4	6899_6#4	0
+6899_6#5	6899_6#5	0
+6899_6#6	6899_6#6	1
+6899_6#7	6899_6#7	1
+6899_6#8	6899_6#8	0
+6899_6#9	6899_6#9	0
+6899_6#10	6899_6#10	1
+6899_6#11	6899_6#11	0
+6899_6#12	6899_6#12	1
+6899_6#13	6899_6#13	0
+6899_6#14	6899_6#14	1
+6899_6#15	6899_6#15	1
+6899_6#16	6899_6#16	0
+6899_6#17	6899_6#17	0
+6899_6#18	6899_6#18	1
+6899_6#19	6899_6#19	1
+6899_6#20	6899_6#20	0
+6899_6#21	6899_6#21	1
+6899_6#22	6899_6#22	1
+6899_6#23	6899_6#23	0
+6899_6#24	6899_6#24	1
+6899_7#1	6899_7#1	0
+6899_7#2	6899_7#2	1
+6899_7#3	6899_7#3	1
+6899_7#4	6899_7#4	1
+6899_7#5	6899_7#5	0
+6899_7#6	6899_7#6	1
+6899_7#7	6899_7#7	1
+6899_7#8	6899_7#8	0
+6899_7#9	6899_7#9	1
+6899_7#10	6899_7#10	0
+6899_7#11	6899_7#11	0
+6899_7#12	6899_7#12	1
+6899_7#13	6899_7#13	0
+6899_7#14	6899_7#14	1
+6899_7#15	6899_7#15	1
+6899_7#16	6899_7#16	1
+6899_7#17	6899_7#17	1
+6899_7#18	6899_7#18	1
+6899_7#19	6899_7#19	1
+6899_7#20	6899_7#20	1
+6899_7#21	6899_7#21	1
+6899_7#22	6899_7#22	1
+6899_7#23	6899_7#23	1
+6899_7#24	6899_7#24	1
+6925_3#1	6925_3#1	1
+6925_3#2	6925_3#2	1
+6925_3#3	6925_3#3	0
+6925_3#4	6925_3#4	1
+6925_3#5	6925_3#5	0
+6925_3#6	6925_3#6	1
+6925_3#7	6925_3#7	0
+6925_3#8	6925_3#8	1
+6925_3#9	6925_3#9	1
+6925_3#10	6925_3#10	1
+6925_3#11	6925_3#11	1
+6925_3#13	6925_3#13	0
+6925_3#14	6925_3#14	1
+6925_3#15	6925_3#15	0
+6925_3#16	6925_3#16	1
+6925_3#17	6925_3#17	0
+6925_3#18	6925_3#18	0
+6925_3#19	6925_3#19	1
+6925_3#20	6925_3#20	0
+6925_3#21	6925_3#21	0
+6925_3#22	6925_3#22	1
+6925_3#23	6925_3#23	1
+6925_3#24	6925_3#24	0
+6925_4#1	6925_4#1	1
+6925_4#2	6925_4#2	0
+6925_4#3	6925_4#3	1
+6925_4#4	6925_4#4	1
+6925_4#5	6925_4#5	0
+6925_4#6	6925_4#6	1
+6925_4#7	6925_4#7	1
+6925_4#8	6925_4#8	1
+6925_4#9	6925_4#9	1
+6925_4#10	6925_4#10	0
+6925_4#11	6925_4#11	1
+6925_4#12	6925_4#12	1
+6925_4#14	6925_4#14	0
+6925_4#15	6925_4#15	1
+6925_4#16	6925_4#16	1
+6925_4#17	6925_4#17	0
+6925_4#18	6925_4#18	1
+6925_4#19	6925_4#19	0
+6925_4#20	6925_4#20	1
+6925_4#21	6925_4#21	0
+6925_4#22	6925_4#22	1
+6925_4#23	6925_4#23	1
+6925_4#24	6925_4#24	0
+6925_5#1	6925_5#1	1
+6925_5#2	6925_5#2	1
+6925_5#3	6925_5#3	0
+6925_5#4	6925_5#4	1
+6925_5#5	6925_5#5	1
+6925_5#6	6925_5#6	1
+6925_5#8	6925_5#8	1
+6925_5#9	6925_5#9	0
+6925_5#10	6925_5#10	0
+6925_5#11	6925_5#11	0
+6925_5#12	6925_5#12	1
+6925_5#13	6925_5#13	1
+6925_5#14	6925_5#14	1
+6925_5#16	6925_5#16	0
+6925_5#17	6925_5#17	0
+6925_5#18	6925_5#18	0
+6925_5#19	6925_5#19	1
+6925_5#20	6925_5#20	1
+6925_5#21	6925_5#21	0
+6925_5#22	6925_5#22	0
+6925_5#23	6925_5#23	1
+6925_5#24	6925_5#24	1
+6925_6#1	6925_6#1	0
+6925_6#2	6925_6#2	1
+6925_6#3	6925_6#3	1
+6925_6#4	6925_6#4	1
+6925_6#5	6925_6#5	1
+6925_6#6	6925_6#6	1
+6925_6#7	6925_6#7	1
+6925_6#8	6925_6#8	1
+6925_6#9	6925_6#9	1
+6925_6#10	6925_6#10	1
+6925_6#11	6925_6#11	0
+6925_6#12	6925_6#12	1
+6925_6#13	6925_6#13	1
+6925_6#14	6925_6#14	1
+6925_6#15	6925_6#15	0
+6925_6#16	6925_6#16	1
+6925_6#17	6925_6#17	0
+6925_6#18	6925_6#18	0
+6925_6#19	6925_6#19	1
+6925_6#20	6925_6#20	0
+6925_6#21	6925_6#21	1
+6925_6#22	6925_6#22	1
+6925_6#23	6925_6#23	0
+6925_6#24	6925_6#24	1
+6983_2#1	6983_2#1	1
+6983_2#2	6983_2#2	1
+6983_2#3	6983_2#3	0
+6983_2#4	6983_2#4	1
+6983_2#5	6983_2#5	0
+6983_2#6	6983_2#6	1
+6983_2#7	6983_2#7	1
+6983_2#8	6983_2#8	1
+6983_2#9	6983_2#9	0
+6983_2#10	6983_2#10	1
+6983_2#11	6983_2#11	0
+6983_2#12	6983_2#12	1
+6983_2#13	6983_2#13	1
+6983_2#14	6983_2#14	1
+6983_2#15	6983_2#15	0
+6983_2#16	6983_2#16	1
+6983_2#17	6983_2#17	0
+6983_2#18	6983_2#18	1
+6983_2#19	6983_2#19	0
+6983_2#20	6983_2#20	0
+6983_2#21	6983_2#21	1
+6983_2#22	6983_2#22	0
+6983_2#23	6983_2#23	1
+6983_2#24	6983_2#24	1
+7038_8#25	7038_8#25	0
+7038_8#26	7038_8#26	1
+7038_8#27	7038_8#27	1
+7038_8#28	7038_8#28	1
+7038_8#29	7038_8#29	1
+7038_8#30	7038_8#30	1
+7038_8#31	7038_8#31	1
+7038_8#32	7038_8#32	1
+7038_8#33	7038_8#33	1
+7038_8#34	7038_8#34	1
+7038_8#35	7038_8#35	1
+7038_8#36	7038_8#36	1
+7038_8#37	7038_8#37	0
+7038_8#38	7038_8#38	1
+7038_8#39	7038_8#39	1
+7038_8#40	7038_8#40	1
+7038_8#41	7038_8#41	1
+7038_8#42	7038_8#42	1
+7038_8#43	7038_8#43	0
+7038_8#44	7038_8#44	1
+7038_8#45	7038_8#45	1
+7038_8#47	7038_8#47	1
+7038_8#48	7038_8#48	1
+6983_3#49	6983_3#49	1
+6983_3#50	6983_3#50	0
+6983_3#51	6983_3#51	0
+6983_3#52	6983_3#52	0
+6983_3#53	6983_3#53	1
+6983_3#54	6983_3#54	0
+6983_3#55	6983_3#55	1
+6983_3#56	6983_3#56	1
+6983_3#57	6983_3#57	1
+6983_3#58	6983_3#58	0
+6983_3#59	6983_3#59	0
+6983_3#60	6983_3#60	0
+6983_3#61	6983_3#61	1
+6983_3#62	6983_3#62	1
+6983_3#63	6983_3#63	1
+6983_3#64	6983_3#64	1
+6983_3#65	6983_3#65	1
+6983_3#66	6983_3#66	0
+6983_3#67	6983_3#67	0
+6983_3#68	6983_3#68	0
+6983_3#69	6983_3#69	0
+6983_3#70	6983_3#70	0
+6983_3#71	6983_3#71	1
+6983_3#72	6983_3#72	0
+6983_4#73	6983_4#73	1
+6983_4#74	6983_4#74	0
+6983_4#75	6983_4#75	0
+6983_4#76	6983_4#76	1
+6983_4#77	6983_4#77	1
+6983_4#78	6983_4#78	0
+6983_4#79	6983_4#79	0
+6983_4#80	6983_4#80	1
+6983_4#81	6983_4#81	1
+6983_4#82	6983_4#82	1
+6983_4#83	6983_4#83	1
+6983_4#84	6983_4#84	1
+6983_4#85	6983_4#85	1
+6983_4#86	6983_4#86	1
+6983_4#87	6983_4#87	0
+6983_4#88	6983_4#88	0
+6983_4#89	6983_4#89	1
+6983_4#90	6983_4#90	0
+6983_4#91	6983_4#91	1
+6983_4#92	6983_4#92	0
+6983_4#93	6983_4#93	0
+6983_4#94	6983_4#94	0
+6983_4#95	6983_4#95	0
+6983_4#96	6983_4#96	0
+6983_5#1	6983_5#1	1
+6983_5#2	6983_5#2	1
+6983_5#3	6983_5#3	1
+6983_5#4	6983_5#4	1
+6983_5#5	6983_5#5	1
+6983_5#6	6983_5#6	1
+6983_5#7	6983_5#7	1
+6983_5#8	6983_5#8	0
+6983_5#9	6983_5#9	1
+6983_5#10	6983_5#10	1
+6983_5#11	6983_5#11	1
+6983_5#12	6983_5#12	0
+6983_5#13	6983_5#13	1
+6983_5#14	6983_5#14	1
+6983_5#15	6983_5#15	1
+6983_5#16	6983_5#16	0
+6983_5#17	6983_5#17	1
+6983_5#18	6983_5#18	0
+6983_5#19	6983_5#19	1
+6983_5#20	6983_5#20	1
+6983_5#21	6983_5#21	0
+6983_5#22	6983_5#22	0
+6983_5#23	6983_5#23	1
+6983_5#24	6983_5#24	0
+6983_6#25	6983_6#25	0
+6983_6#26	6983_6#26	1
+6983_6#27	6983_6#27	1
+6983_6#28	6983_6#28	1
+6983_6#29	6983_6#29	1
+6983_6#30	6983_6#30	1
+6983_6#31	6983_6#31	1
+6983_6#32	6983_6#32	0
+6983_6#33	6983_6#33	1
+6983_6#34	6983_6#34	1
+6983_6#35	6983_6#35	1
+6983_6#36	6983_6#36	1
+6983_6#37	6983_6#37	0
+6983_6#38	6983_6#38	1
+6983_6#39	6983_6#39	1
+6983_6#40	6983_6#40	0
+6983_6#41	6983_6#41	1
+6983_6#42	6983_6#42	1
+6983_6#43	6983_6#43	1
+6983_6#44	6983_6#44	0
+6983_6#45	6983_6#45	1
+6983_6#47	6983_6#47	1
+6983_6#48	6983_6#48	0
+6983_7#49	6983_7#49	1
+6983_7#50	6983_7#50	1
+6983_7#51	6983_7#51	1
+6983_7#52	6983_7#52	1
+6983_7#53	6983_7#53	1
+6983_7#54	6983_7#54	0
+6983_7#55	6983_7#55	0
+6983_7#56	6983_7#56	0
+6983_7#57	6983_7#57	0
+6983_7#58	6983_7#58	1
+6983_7#59	6983_7#59	0
+6983_7#60	6983_7#60	1
+6983_7#61	6983_7#61	0
+6983_7#62	6983_7#62	0
+6983_7#63	6983_7#63	1
+6983_7#64	6983_7#64	0
+6983_7#65	6983_7#65	0
+6983_7#66	6983_7#66	1
+6983_7#67	6983_7#67	1
+6983_7#68	6983_7#68	1
+6983_7#69	6983_7#69	1
+6983_7#70	6983_7#70	1
+6983_7#71	6983_7#71	1
+6983_7#72	6983_7#72	1
+6983_8#73	6983_8#73	1
+6983_8#74	6983_8#74	1
+6983_8#75	6983_8#75	1
+6983_8#76	6983_8#76	1
+6983_8#77	6983_8#77	1
+6983_8#78	6983_8#78	1
+6983_8#79	6983_8#79	0
+6983_8#80	6983_8#80	1
+6983_8#81	6983_8#81	0
+6983_8#82	6983_8#82	1
+6983_8#83	6983_8#83	0
+6983_8#84	6983_8#84	0
+6983_8#85	6983_8#85	1
+6983_8#86	6983_8#86	1
+6983_8#87	6983_8#87	0
+6983_8#88	6983_8#88	0
+6983_8#89	6983_8#89	0
+6983_8#90	6983_8#90	1
+6983_8#91	6983_8#91	1
+6983_8#92	6983_8#92	1
+6983_8#93	6983_8#93	0
+6983_8#94	6983_8#94	1
+6983_8#95	6983_8#95	1
+6983_8#96	6983_8#96	0
+6949_1#1	6949_1#1	1
+6949_1#2	6949_1#2	1
+6949_1#3	6949_1#3	0
+6949_1#4	6949_1#4	1
+6949_1#5	6949_1#5	1
+6949_1#6	6949_1#6	1
+6949_1#7	6949_1#7	1
+6949_1#8	6949_1#8	0
+6949_1#9	6949_1#9	1
+6949_1#10	6949_1#10	1
+6949_1#11	6949_1#11	1
+6949_1#12	6949_1#12	1
+6949_1#13	6949_1#13	1
+6949_1#14	6949_1#14	0
+6949_1#15	6949_1#15	0
+6949_1#16	6949_1#16	1
+6949_1#17	6949_1#17	1
+6949_1#18	6949_1#18	0
+6949_1#19	6949_1#19	0
+6949_1#20	6949_1#20	1
+6949_1#21	6949_1#21	0
+6949_1#22	6949_1#22	1
+6949_1#23	6949_1#23	0
+6949_1#24	6949_1#24	0
+6949_2#1	6949_2#1	0
+6949_2#2	6949_2#2	1
+6949_2#3	6949_2#3	1
+6949_2#4	6949_2#4	1
+6949_2#5	6949_2#5	1
+6949_2#6	6949_2#6	1
+6949_2#7	6949_2#7	1
+6949_2#8	6949_2#8	0
+6949_2#9	6949_2#9	0
+6949_2#10	6949_2#10	1
+6949_2#11	6949_2#11	0
+6949_2#12	6949_2#12	1
+6949_2#13	6949_2#13	1
+6949_2#14	6949_2#14	1
+6949_2#15	6949_2#15	1
+6949_2#16	6949_2#16	1
+6949_2#17	6949_2#17	0
+6949_2#18	6949_2#18	1
+6949_2#19	6949_2#19	1
+6949_2#20	6949_2#20	1
+6949_2#21	6949_2#21	0
+6949_2#22	6949_2#22	1
+6949_2#23	6949_2#23	1
+6949_2#24	6949_2#24	1
+6949_3#1	6949_3#1	0
+6949_3#2	6949_3#2	1
+6949_3#3	6949_3#3	0
+6949_3#4	6949_3#4	1
+6949_3#5	6949_3#5	1
+6949_3#6	6949_3#6	0
+6949_3#7	6949_3#7	1
+6949_3#8	6949_3#8	1
+6949_3#9	6949_3#9	0
+6949_3#10	6949_3#10	0
+6949_3#11	6949_3#11	1
+6949_3#12	6949_3#12	1
+6949_3#13	6949_3#13	0
+6949_3#14	6949_3#14	1
+6949_3#15	6949_3#15	1
+6949_3#16	6949_3#16	0
+6949_3#17	6949_3#17	1
+6949_3#18	6949_3#18	1
+6949_3#19	6949_3#19	0
+6949_3#20	6949_3#20	0
+6949_3#21	6949_3#21	1
+6949_3#22	6949_3#22	1
+6949_3#23	6949_3#23	1
+6949_3#24	6949_3#24	1
+6949_4#1	6949_4#1	1
+6949_4#2	6949_4#2	0
+6949_4#3	6949_4#3	1
+6949_4#4	6949_4#4	0
+6949_4#5	6949_4#5	0
+6949_4#6	6949_4#6	1
+6949_4#7	6949_4#7	1
+6949_4#8	6949_4#8	1
+6949_4#9	6949_4#9	0
+6949_4#10	6949_4#10	0
+6949_4#11	6949_4#11	1
+6949_4#12	6949_4#12	0
+6949_4#13	6949_4#13	0
+6949_4#14	6949_4#14	0
+6949_4#16	6949_4#16	0
+6949_4#17	6949_4#17	1
+6949_4#18	6949_4#18	0
+6949_4#19	6949_4#19	0
+6949_4#20	6949_4#20	1
+6949_4#21	6949_4#21	0
+6949_4#22	6949_4#22	1
+6949_4#23	6949_4#23	1
+6949_4#24	6949_4#24	1
+6925_7#1	6925_7#1	1
+6925_7#2	6925_7#2	0
+6925_7#3	6925_7#3	0
+6925_7#4	6925_7#4	1
+6925_7#5	6925_7#5	1
+6925_7#6	6925_7#6	1
+6925_7#7	6925_7#7	0
+6925_7#8	6925_7#8	1
+6925_7#9	6925_7#9	1
+6925_7#10	6925_7#10	1
+6925_7#11	6925_7#11	1
+6925_7#12	6925_7#12	0
+6925_7#13	6925_7#13	0
+6925_7#14	6925_7#14	1
+6925_7#15	6925_7#15	1
+6925_7#16	6925_7#16	1
+6925_7#17	6925_7#17	1
+6925_7#18	6925_7#18	1
+6925_7#19	6925_7#19	1
+6925_7#20	6925_7#20	1
+6925_7#21	6925_7#21	0
+6925_7#22	6925_7#22	1
+6925_7#23	6925_7#23	1
+6925_7#24	6925_7#24	0
+6925_8#1	6925_8#1	1
+6925_8#2	6925_8#2	1
+6925_8#3	6925_8#3	1
+6925_8#4	6925_8#4	0
+6925_8#5	6925_8#5	1
+6925_8#6	6925_8#6	1
+6925_8#7	6925_8#7	0
+6925_8#8	6925_8#8	1
+6925_8#9	6925_8#9	0
+6925_8#10	6925_8#10	1
+6925_8#11	6925_8#11	1
+6925_8#12	6925_8#12	1
+6925_8#13	6925_8#13	0
+6925_8#14	6925_8#14	0
+6925_8#15	6925_8#15	0
+6925_8#16	6925_8#16	0
+6925_8#17	6925_8#17	0
+6925_8#18	6925_8#18	1
+6925_8#19	6925_8#19	1
+6925_8#20	6925_8#20	1
+6925_8#21	6925_8#21	1
+6925_8#22	6925_8#22	1
+6925_8#23	6925_8#23	0
+6925_8#24	6925_8#24	0
+6972_2#1	6972_2#1	1
+6972_2#3	6972_2#3	0
+6972_2#4	6972_2#4	0
+6972_2#5	6972_2#5	1
+6972_2#6	6972_2#6	1
+6972_2#7	6972_2#7	0
+6972_2#8	6972_2#8	1
+6972_2#9	6972_2#9	1
+6972_2#10	6972_2#10	1
+6972_2#11	6972_2#11	1
+6972_2#12	6972_2#12	1
+6972_2#13	6972_2#13	1
+6972_2#14	6972_2#14	1
+6972_2#15	6972_2#15	0
+6972_2#16	6972_2#16	1
+6972_2#17	6972_2#17	1
+6972_2#18	6972_2#18	1
+6972_2#19	6972_2#19	0
+6972_2#20	6972_2#20	1
+6972_2#21	6972_2#21	1
+6972_2#22	6972_2#22	0
+6972_2#23	6972_2#23	1
+6972_2#24	6972_2#24	1
+6972_3#1	6972_3#1	1
+6972_3#2	6972_3#2	0
+6972_3#3	6972_3#3	0
+6972_3#4	6972_3#4	0
+6972_3#5	6972_3#5	0
+6972_3#6	6972_3#6	1
+6972_3#7	6972_3#7	1
+6972_3#8	6972_3#8	0
+6972_3#9	6972_3#9	0
+6972_3#10	6972_3#10	1
+6972_3#11	6972_3#11	0
+6972_3#12	6972_3#12	1
+6972_3#13	6972_3#13	1
+6972_3#14	6972_3#14	1
+6972_3#15	6972_3#15	0
+6972_3#16	6972_3#16	1
+6972_3#17	6972_3#17	1
+6972_3#18	6972_3#18	0
+6972_3#19	6972_3#19	1
+6972_3#20	6972_3#20	1
+6972_3#21	6972_3#21	1
+6972_3#22	6972_3#22	1
+6972_3#23	6972_3#23	0
+6972_3#24	6972_3#24	1
+6972_4#3	6972_4#3	1
+6972_4#4	6972_4#4	1
+6972_4#5	6972_4#5	1
+6972_4#6	6972_4#6	0
+6972_4#7	6972_4#7	1
+6972_4#8	6972_4#8	1
+6972_4#9	6972_4#9	0
+6972_4#10	6972_4#10	0
+6972_4#11	6972_4#11	1
+6972_4#13	6972_4#13	0
+6972_4#14	6972_4#14	1
+6972_4#15	6972_4#15	0
+6972_4#16	6972_4#16	0
+6972_4#17	6972_4#17	0
+6972_4#18	6972_4#18	1
+6972_4#19	6972_4#19	1
+6972_4#20	6972_4#20	1
+6972_4#21	6972_4#21	0
+6972_4#22	6972_4#22	1
+6972_4#23	6972_4#23	1
+6972_4#24	6972_4#24	1
+6972_5#1	6972_5#1	1
+6972_5#2	6972_5#2	0
+6972_5#3	6972_5#3	1
+6972_5#4	6972_5#4	1
+6972_5#5	6972_5#5	1
+6972_5#6	6972_5#6	1
+6972_5#7	6972_5#7	0
+6972_5#8	6972_5#8	1
+6972_5#9	6972_5#9	1
+6972_5#10	6972_5#10	0
+6972_5#11	6972_5#11	1
+6972_5#12	6972_5#12	0
+6972_5#13	6972_5#13	0
+6972_5#14	6972_5#14	0
+6972_5#15	6972_5#15	1
+6972_5#16	6972_5#16	0
+6972_5#17	6972_5#17	0
+6972_5#18	6972_5#18	0
+6972_5#19	6972_5#19	1
+6972_5#21	6972_5#21	1
+6972_5#22	6972_5#22	0
+6972_5#23	6972_5#23	1
+6972_5#24	6972_5#24	1
+6938_5#1	6938_5#1	0
+6938_5#2	6938_5#2	0
+6938_5#3	6938_5#3	1
+6938_5#4	6938_5#4	0
+6938_5#5	6938_5#5	1
+6938_5#6	6938_5#6	1
+6938_5#7	6938_5#7	1
+6938_5#8	6938_5#8	1
+6938_5#9	6938_5#9	0
+6938_5#10	6938_5#10	0
+6938_5#11	6938_5#11	0
+6938_5#12	6938_5#12	0
+6938_5#13	6938_5#13	1
+6938_5#14	6938_5#14	1
+6938_5#15	6938_5#15	0
+6938_5#16	6938_5#16	1
+6938_5#17	6938_5#17	1
+6938_5#18	6938_5#18	1
+6938_5#19	6938_5#19	0
+6938_5#21	6938_5#21	1
+6938_5#22	6938_5#22	1
+6938_5#23	6938_5#23	1
+6938_5#24	6938_5#24	0
+6938_6#1	6938_6#1	1
+6938_6#2	6938_6#2	1
+6938_6#3	6938_6#3	0
+6938_6#4	6938_6#4	1
+6938_6#5	6938_6#5	1
+6938_6#6	6938_6#6	1
+6938_6#8	6938_6#8	0
+6938_6#9	6938_6#9	0
+6938_6#11	6938_6#11	1
+6938_6#12	6938_6#12	1
+6938_6#13	6938_6#13	1
+6938_6#14	6938_6#14	1
+6938_6#15	6938_6#15	1
+6938_6#16	6938_6#16	1
+6938_6#17	6938_6#17	0
+6938_6#19	6938_6#19	0
+6938_6#20	6938_6#20	0
+6938_6#21	6938_6#21	0
+6938_6#22	6938_6#22	1
+6938_6#23	6938_6#23	0
+6938_6#24	6938_6#24	1
+6938_7#1	6938_7#1	1
+6938_7#2	6938_7#2	1
+6938_7#3	6938_7#3	1
+6938_7#4	6938_7#4	1
+6938_7#5	6938_7#5	0
+6938_7#6	6938_7#6	0
+6938_7#7	6938_7#7	0
+6938_7#8	6938_7#8	1
+6938_7#9	6938_7#9	1
+6938_7#10	6938_7#10	1
+6938_7#11	6938_7#11	0
+6938_7#12	6938_7#12	0
+6938_7#13	6938_7#13	0
+6938_7#15	6938_7#15	1
+6938_7#16	6938_7#16	1
+6938_7#17	6938_7#17	1
+6938_7#18	6938_7#18	1
+6938_7#19	6938_7#19	1
+6938_7#20	6938_7#20	0
+6938_7#21	6938_7#21	0
+6938_7#22	6938_7#22	1
+6938_7#23	6938_7#23	1
+6938_7#24	6938_7#24	1
+6938_8#1	6938_8#1	0
+6938_8#2	6938_8#2	1
+6938_8#3	6938_8#3	0
+6938_8#4	6938_8#4	1
+6938_8#5	6938_8#5	0
+6938_8#6	6938_8#6	0
+6938_8#7	6938_8#7	1
+6938_8#8	6938_8#8	0
+6938_8#9	6938_8#9	0
+6938_8#10	6938_8#10	1
+6938_8#11	6938_8#11	1
+6938_8#12	6938_8#12	1
+6938_8#13	6938_8#13	0
+6938_8#14	6938_8#14	0
+6938_8#15	6938_8#15	0
+6938_8#16	6938_8#16	0
+6938_8#17	6938_8#17	1
+6938_8#18	6938_8#18	0
+6938_8#19	6938_8#19	0
+6938_8#21	6938_8#21	1
+6938_8#22	6938_8#22	0
+6938_8#23	6938_8#23	1
+6938_8#24	6938_8#24	1
+7011_3#1	7011_3#1	1
+7011_3#2	7011_3#2	0
+7011_3#3	7011_3#3	1
+7011_3#4	7011_3#4	1
+7011_3#5	7011_3#5	0
+7011_3#6	7011_3#6	1
+7011_3#7	7011_3#7	1
+7011_3#8	7011_3#8	1
+7011_3#9	7011_3#9	1
+7011_3#10	7011_3#10	1
+7011_3#11	7011_3#11	0
+7011_3#12	7011_3#12	1
+7011_3#13	7011_3#13	0
+7011_3#14	7011_3#14	1
+7011_3#15	7011_3#15	0
+7011_3#17	7011_3#17	0
+7011_3#18	7011_3#18	1
+7011_3#19	7011_3#19	0
+7011_3#20	7011_3#20	1
+7011_3#21	7011_3#21	1
+7011_3#22	7011_3#22	0
+7011_3#23	7011_3#23	0
+7011_3#24	7011_3#24	1
+7011_4#1	7011_4#1	1
+7011_4#2	7011_4#2	0
+7011_4#3	7011_4#3	1
+7011_4#4	7011_4#4	0
+7011_4#5	7011_4#5	1
+7011_4#6	7011_4#6	1
+7011_4#7	7011_4#7	1
+7011_4#8	7011_4#8	1
+7011_4#9	7011_4#9	1
+7011_4#10	7011_4#10	1
+7011_4#11	7011_4#11	1
+7011_4#12	7011_4#12	1
+7011_4#13	7011_4#13	0
+7011_4#14	7011_4#14	0
+7011_4#15	7011_4#15	1
+7011_4#16	7011_4#16	1
+7011_4#17	7011_4#17	1
+7011_4#18	7011_4#18	0
+7011_4#19	7011_4#19	1
+7011_4#20	7011_4#20	1
+7011_4#21	7011_4#21	0
+7011_4#22	7011_4#22	1
+7011_4#23	7011_4#23	1
+7011_4#24	7011_4#24	1
+7011_5#1	7011_5#1	0
+7011_5#2	7011_5#2	0
+7011_5#3	7011_5#3	1
+7011_5#4	7011_5#4	0
+7011_5#5	7011_5#5	1
+7011_5#6	7011_5#6	0
+7011_5#7	7011_5#7	0
+7011_5#8	7011_5#8	0
+7011_5#9	7011_5#9	1
+7011_5#10	7011_5#10	1
+7011_5#11	7011_5#11	0
+7011_5#12	7011_5#12	1
+7011_5#13	7011_5#13	0
+7011_5#14	7011_5#14	1
+7011_5#15	7011_5#15	1
+7011_5#16	7011_5#16	0
+7011_5#17	7011_5#17	0
+7011_5#18	7011_5#18	0
+7011_5#19	7011_5#19	0
+7011_5#20	7011_5#20	0
+7011_5#21	7011_5#21	0
+7011_5#22	7011_5#22	0
+7011_5#23	7011_5#23	1
+7011_5#24	7011_5#24	1
+7011_6#1	7011_6#1	1
+7011_6#2	7011_6#2	0
+7011_6#3	7011_6#3	1
+7011_6#4	7011_6#4	1
+7011_6#5	7011_6#5	1
+7011_6#6	7011_6#6	0
+7011_6#7	7011_6#7	1
+7011_6#8	7011_6#8	0
+7011_6#9	7011_6#9	1
+7011_6#10	7011_6#10	1
+7011_6#11	7011_6#11	1
+7011_6#12	7011_6#12	1
+7011_6#13	7011_6#13	1
+7011_6#14	7011_6#14	1
+7011_6#15	7011_6#15	1
+7011_6#16	7011_6#16	1
+7011_6#17	7011_6#17	0
+7011_6#18	7011_6#18	0
+7011_6#19	7011_6#19	1
+7011_6#20	7011_6#20	1
+7011_6#21	7011_6#21	1
+7011_6#22	7011_6#22	1
+7011_6#23	7011_6#23	1
+7011_6#24	7011_6#24	0
+7004_6#25	7004_6#25	1
+7004_6#26	7004_6#26	1
+7004_6#27	7004_6#27	1
+7004_6#28	7004_6#28	1
+7004_6#29	7004_6#29	0
+7004_6#30	7004_6#30	0
+7004_6#31	7004_6#31	1
+7004_6#32	7004_6#32	1
+7004_6#33	7004_6#33	1
+7004_6#34	7004_6#34	0
+7004_6#35	7004_6#35	0
+7004_6#36	7004_6#36	0
+7004_6#37	7004_6#37	1
+7004_6#38	7004_6#38	0
+7004_6#39	7004_6#39	1
+7004_6#40	7004_6#40	1
+7004_6#41	7004_6#41	1
+7004_6#42	7004_6#42	1
+7004_6#43	7004_6#43	1
+7004_6#44	7004_6#44	1
+7004_6#45	7004_6#45	1
+7004_6#46	7004_6#46	0
+7004_6#47	7004_6#47	1
+7004_6#48	7004_6#48	1
+7004_5#1	7004_5#1	1
+7004_5#2	7004_5#2	0
+7004_5#3	7004_5#3	1
+7004_5#4	7004_5#4	1
+7004_5#5	7004_5#5	0
+7004_5#6	7004_5#6	1
+7004_5#7	7004_5#7	0
+7004_5#8	7004_5#8	1
+7004_5#9	7004_5#9	1
+7004_5#10	7004_5#10	0
+7004_5#11	7004_5#11	1
+7004_5#12	7004_5#12	1
+7004_5#13	7004_5#13	1
+7004_5#14	7004_5#14	1
+7004_5#15	7004_5#15	0
+7004_5#16	7004_5#16	0
+7004_5#17	7004_5#17	0
+7004_5#18	7004_5#18	1
+7004_5#19	7004_5#19	1
+7004_5#20	7004_5#20	1
+7004_5#21	7004_5#21	1
+7004_5#22	7004_5#22	1
+7004_5#23	7004_5#23	1
+7004_5#24	7004_5#24	1
+7004_7#49	7004_7#49	0
+7004_7#50	7004_7#50	1
+7004_7#51	7004_7#51	1
+7004_7#52	7004_7#52	1
+7004_7#53	7004_7#53	0
+7004_7#54	7004_7#54	1
+7004_7#55	7004_7#55	1
+7004_7#56	7004_7#56	1
+7004_7#57	7004_7#57	1
+7004_7#58	7004_7#58	1
+7004_7#59	7004_7#59	1
+7004_7#60	7004_7#60	0
+7004_7#61	7004_7#61	1
+7004_7#62	7004_7#62	1
+7004_7#63	7004_7#63	0
+7004_7#64	7004_7#64	0
+7004_7#65	7004_7#65	0
+7004_7#66	7004_7#66	1
+7004_7#67	7004_7#67	0
+7004_7#68	7004_7#68	1
+7004_7#69	7004_7#69	1
+7004_7#70	7004_7#70	1
+7004_7#71	7004_7#71	1
+7004_7#72	7004_7#72	0
+7004_8#73	7004_8#73	0
+7004_8#74	7004_8#74	1
+7004_8#75	7004_8#75	0
+7004_8#76	7004_8#76	0
+7004_8#77	7004_8#77	0
+7004_8#78	7004_8#78	1
+7004_8#79	7004_8#79	0
+7004_8#80	7004_8#80	0
+7004_8#81	7004_8#81	1
+7004_8#82	7004_8#82	1
+7004_8#83	7004_8#83	0
+7004_8#84	7004_8#84	1
+7004_8#85	7004_8#85	1
+7004_8#86	7004_8#86	0
+7004_8#87	7004_8#87	1
+7004_8#88	7004_8#88	0
+7004_8#89	7004_8#89	1
+7004_8#90	7004_8#90	0
+7004_8#91	7004_8#91	0
+7004_8#92	7004_8#92	1
+7004_8#93	7004_8#93	1
+7004_8#95	7004_8#95	0
+7004_8#96	7004_8#96	1
+7038_4#1	7038_4#1	0
+7038_4#2	7038_4#2	1
+7038_4#3	7038_4#3	0
+7038_4#4	7038_4#4	1
+7038_4#5	7038_4#5	1
+7038_4#6	7038_4#6	1
+7038_4#7	7038_4#7	1
+7038_4#8	7038_4#8	1
+7038_4#9	7038_4#9	0
+7038_4#10	7038_4#10	1
+7038_4#11	7038_4#11	1
+7038_4#12	7038_4#12	0
+7038_4#13	7038_4#13	1
+7038_4#14	7038_4#14	1
+7038_4#15	7038_4#15	0
+7038_4#16	7038_4#16	1
+7038_4#17	7038_4#17	1
+7038_4#18	7038_4#18	1
+7038_4#19	7038_4#19	0
+7038_4#20	7038_4#20	1
+7038_4#21	7038_4#21	0
+7038_4#22	7038_4#22	1
+7038_4#23	7038_4#23	1
+7038_4#24	7038_4#24	1
+7038_5#1	7038_5#1	1
+7038_5#2	7038_5#2	1
+7038_5#3	7038_5#3	0
+7038_5#4	7038_5#4	1
+7038_5#5	7038_5#5	0
+7038_5#6	7038_5#6	1
+7038_5#7	7038_5#7	0
+7038_5#8	7038_5#8	1
+7038_5#9	7038_5#9	1
+7038_5#10	7038_5#10	1
+7038_5#11	7038_5#11	0
+7038_5#12	7038_5#12	1
+7038_5#13	7038_5#13	1
+7038_5#14	7038_5#14	1
+7038_5#15	7038_5#15	1
+7038_5#16	7038_5#16	1
+7038_5#17	7038_5#17	0
+7038_5#18	7038_5#18	0
+7038_5#19	7038_5#19	0
+7038_5#20	7038_5#20	1
+7038_5#21	7038_5#21	0
+7038_5#22	7038_5#22	1
+7038_5#23	7038_5#23	1
+7038_5#24	7038_5#24	1
+7038_6#1	7038_6#1	1
+7038_6#2	7038_6#2	1
+7038_6#3	7038_6#3	0
+7038_6#4	7038_6#4	1
+7038_6#5	7038_6#5	0
+7038_6#6	7038_6#6	1
+7038_6#7	7038_6#7	1
+7038_6#8	7038_6#8	0
+7038_6#9	7038_6#9	1
+7038_6#10	7038_6#10	1
+7038_6#11	7038_6#11	1
+7038_6#12	7038_6#12	1
+7038_6#13	7038_6#13	1
+7038_6#14	7038_6#14	1
+7038_6#15	7038_6#15	1
+7038_6#16	7038_6#16	0
+7038_6#17	7038_6#17	0
+7038_6#18	7038_6#18	1
+7038_6#19	7038_6#19	1
+7038_6#20	7038_6#20	1
+7038_6#21	7038_6#21	0
+7038_6#22	7038_6#22	0
+7038_6#23	7038_6#23	1
+7038_6#24	7038_6#24	1
+7038_7#1	7038_7#1	1
+7038_7#2	7038_7#2	1
+7038_7#3	7038_7#3	0
+7038_7#4	7038_7#4	1
+7038_7#5	7038_7#5	0
+7038_7#6	7038_7#6	0
+7038_7#7	7038_7#7	0
+7038_7#8	7038_7#8	0
+7038_7#9	7038_7#9	0
+7038_7#10	7038_7#10	1
+7038_7#11	7038_7#11	0
+7038_7#13	7038_7#13	0
+7038_7#14	7038_7#14	0
+7038_7#15	7038_7#15	0
+7038_7#16	7038_7#16	1
+7038_7#17	7038_7#17	0
+7038_7#18	7038_7#18	0
+7038_7#19	7038_7#19	0
+7038_7#20	7038_7#20	0
+7038_7#21	7038_7#21	0
+7038_7#22	7038_7#22	1
+7038_7#23	7038_7#23	1
+7038_7#24	7038_7#24	1
+7054_4#1	7054_4#1	1
+7054_4#2	7054_4#2	1
+7054_4#3	7054_4#3	1
+7054_4#4	7054_4#4	1
+7054_4#5	7054_4#5	1
+7054_4#6	7054_4#6	1
+7054_4#7	7054_4#7	1
+7054_4#8	7054_4#8	0
+7054_4#9	7054_4#9	0
+7054_4#10	7054_4#10	0
+7054_4#11	7054_4#11	1
+7054_4#12	7054_4#12	1
+7054_4#13	7054_4#13	1
+7054_4#14	7054_4#14	1
+7054_4#15	7054_4#15	1
+7054_4#16	7054_4#16	1
+7054_4#17	7054_4#17	1
+7054_4#18	7054_4#18	1
+7054_4#19	7054_4#19	1
+7054_4#20	7054_4#20	1
+7054_4#21	7054_4#21	0
+7054_4#22	7054_4#22	1
+7054_4#23	7054_4#23	1
+7054_4#24	7054_4#24	1
+7054_5#1	7054_5#1	0
+7054_5#2	7054_5#2	1
+7054_5#3	7054_5#3	1
+7054_5#4	7054_5#4	0
+7054_5#5	7054_5#5	0
+7054_5#6	7054_5#6	1
+7054_5#7	7054_5#7	1
+7054_5#8	7054_5#8	0
+7054_5#9	7054_5#9	1
+7054_5#10	7054_5#10	0
+7054_5#11	7054_5#11	1
+7054_5#12	7054_5#12	0
+7054_5#13	7054_5#13	0
+7054_5#14	7054_5#14	1
+7054_5#15	7054_5#15	1
+7054_5#16	7054_5#16	0
+7054_5#17	7054_5#17	1
+7054_5#18	7054_5#18	1
+7054_5#19	7054_5#19	0
+7054_5#20	7054_5#20	1
+7054_5#21	7054_5#21	0
+7054_5#22	7054_5#22	1
+7054_5#23	7054_5#23	0
+7054_5#24	7054_5#24	1
+7054_6#1	7054_6#1	1
+7054_6#2	7054_6#2	0
+7054_6#3	7054_6#3	0
+7054_6#4	7054_6#4	1
+7054_6#5	7054_6#5	0
+7054_6#6	7054_6#6	1
+7054_6#7	7054_6#7	1
+7054_6#8	7054_6#8	1
+7054_6#9	7054_6#9	1
+7054_6#10	7054_6#10	1
+7054_6#11	7054_6#11	0
+7054_6#12	7054_6#12	0
+7054_6#13	7054_6#13	1
+7054_6#14	7054_6#14	0
+7054_6#15	7054_6#15	1
+7054_6#16	7054_6#16	1
+7054_6#17	7054_6#17	1
+7054_6#18	7054_6#18	1
+7054_6#19	7054_6#19	1
+7054_6#20	7054_6#20	0
+7054_6#21	7054_6#21	1
+7054_6#22	7054_6#22	1
+7054_6#23	7054_6#23	0
+7054_6#24	7054_6#24	1
+7092_6#2	7092_6#2	1
+7092_6#3	7092_6#3	1
+7092_6#4	7092_6#4	1
+7092_6#5	7092_6#5	0
+7092_6#6	7092_6#6	0
+7092_6#7	7092_6#7	1
+7092_6#8	7092_6#8	1
+7092_6#9	7092_6#9	0
+7092_6#10	7092_6#10	1
+7092_6#11	7092_6#11	1
+7092_6#12	7092_6#12	0
+7092_6#13	7092_6#13	0
+7092_6#14	7092_6#14	1
+7092_6#15	7092_6#15	1
+7092_6#16	7092_6#16	0
+7092_6#17	7092_6#17	0
+7092_6#18	7092_6#18	1
+7092_6#19	7092_6#19	1
+7092_6#20	7092_6#20	1
+7092_6#21	7092_6#21	1
+7092_6#22	7092_6#22	1
+7092_6#23	7092_6#23	0
+7092_6#24	7092_6#24	1
+7068_4#1	7068_4#1	1
+7068_4#2	7068_4#2	1
+7068_4#3	7068_4#3	0
+7068_4#4	7068_4#4	1
+7068_4#5	7068_4#5	1
+7068_4#6	7068_4#6	0
+7068_4#7	7068_4#7	1
+7068_4#8	7068_4#8	1
+7068_4#9	7068_4#9	1
+7068_4#10	7068_4#10	0
+7068_4#11	7068_4#11	1
+7068_4#12	7068_4#12	1
+7068_4#13	7068_4#13	1
+7068_4#14	7068_4#14	0
+7068_4#15	7068_4#15	1
+7068_4#16	7068_4#16	1
+7068_4#17	7068_4#17	0
+7068_4#18	7068_4#18	0
+7068_4#19	7068_4#19	1
+7068_4#20	7068_4#20	0
+7068_4#21	7068_4#21	0
+7068_4#22	7068_4#22	1
+7068_4#23	7068_4#23	0
+7068_4#24	7068_4#24	1
+6938_3#20	6938_3#20	0
+6938_3#21	6938_3#21	1
+6938_3#22	6938_3#22	1
+6938_3#23	6938_3#23	1
+6938_3#24	6938_3#24	0
+6938_3#25	6938_3#25	1
+6938_3#26	6938_3#26	1
+6938_3#27	6938_3#27	1
+6938_3#28	6938_3#28	1
+6938_3#29	6938_3#29	1
+6938_3#30	6938_3#30	1
+6938_3#31	6938_3#31	1
+6938_3#32	6938_3#32	0
+6938_3#33	6938_3#33	1
+6938_3#34	6938_3#34	1
+6938_3#35	6938_3#35	1
+6938_3#36	6938_3#36	1
diff --git a/test/example_kmers.gz b/test/example_kmers.gz
new file mode 100644
index 0000000..ea1b273
Binary files /dev/null and b/test/example_kmers.gz differ
diff --git a/test/generate_test.pl b/test/generate_test.pl
new file mode 100755
index 0000000..bcc7315
--- /dev/null
+++ b/test/generate_test.pl
@@ -0,0 +1,49 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+my $sample_file = $ARGV[0];
+my $sites = $ARGV[1];
+
+my (@samples, %phenotypes);
+open(PHENO, $sample_file) || die("Could not open $sample_file\n");
+while (my $pheno_line = <PHENO>)
+{
+   chomp $pheno_line;
+   my ($FID, $IID, $pheno) = split("\t", $pheno_line);
+
+   push(@samples, "$IID:1");
+   $phenotypes{"$IID:1"} = $pheno;
+}
+close PHENO;
+
+# Sites increase in minor allele count (mac)
+for (my $site_idx = 1; $site_idx <= $sites; $site_idx++)
+{
+   my @sampled_samples;
+
+   my $mac = int(scalar(@samples) * ($site_idx/$sites));
+
+   # Reservoir sampler over all samples for each site
+   for (my $sample_idx = 0; $sample_idx < scalar(@samples); $sample_idx++)
+   {
+      if (scalar(@sampled_samples) < $mac)
+      {
+         push(@sampled_samples, $samples[$sample_idx]);
+      }
+      else
+      {
+         my $r = int(rand($sample_idx));
+         if ($r < $mac)
+         {
+            $sampled_samples[$r] = $samples[$sample_idx];
+         }
+      }
+   }
+
+   print join(" ", $site_idx, "5.033430 0.161246 100 0 100 0.151841 100 |", @sampled_samples) . "\n";
+}
+
+exit(0);
+
diff --git a/test/subset.pheno b/test/subset.pheno
new file mode 100644
index 0000000..223df0c
--- /dev/null
+++ b/test/subset.pheno
@@ -0,0 +1,200 @@
+6259_5#1	6259_5#1	1
+6259_5#2	6259_5#2	1
+6259_5#3	6259_5#3	0
+6259_5#4	6259_5#4	0
+6259_5#5	6259_5#5	0
+6259_5#6	6259_5#6	1
+6259_5#7	6259_5#7	1
+6259_5#8	6259_5#8	1
+6259_5#9	6259_5#9	0
+6259_5#10	6259_5#10	1
+6259_5#12	6259_5#12	1
+6259_5#13	6259_5#13	1
+6259_5#14	6259_5#14	0
+6259_5#15	6259_5#15	0
+6259_5#16	6259_5#16	1
+6259_5#17	6259_5#17	1
+6259_5#18	6259_5#18	1
+6259_5#19	6259_5#19	0
+6259_5#20	6259_5#20	0
+6259_5#21	6259_5#21	0
+6259_5#22	6259_5#22	0
+6259_5#23	6259_5#23	1
+6259_5#24	6259_5#24	1
+6259_6#1	6259_6#1	1
+6259_6#2	6259_6#2	1
+6259_6#3	6259_6#3	1
+6259_6#4	6259_6#4	1
+6259_6#5	6259_6#5	1
+6259_6#6	6259_6#6	0
+6259_6#7	6259_6#7	1
+6259_6#8	6259_6#8	1
+6259_6#9	6259_6#9	1
+6259_6#10	6259_6#10	1
+6259_6#11	6259_6#11	0
+6259_6#12	6259_6#12	0
+6259_6#13	6259_6#13	1
+6259_6#14	6259_6#14	0
+6259_6#15	6259_6#15	0
+6259_6#16	6259_6#16	1
+6259_6#17	6259_6#17	1
+6259_6#18	6259_6#18	1
+6259_6#19	6259_6#19	0
+6259_6#20	6259_6#20	1
+6259_6#21	6259_6#21	1
+6259_6#22	6259_6#22	0
+6259_6#23	6259_6#23	1
+6259_6#24	6259_6#24	1
+6259_7#1	6259_7#1	0
+6259_7#2	6259_7#2	1
+6259_7#3	6259_7#3	0
+6259_7#4	6259_7#4	1
+6259_7#5	6259_7#5	0
+6259_7#6	6259_7#6	1
+6259_7#7	6259_7#7	1
+6259_7#8	6259_7#8	1
+6259_7#9	6259_7#9	0
+6259_7#10	6259_7#10	0
+6259_7#11	6259_7#11	1
+6259_7#12	6259_7#12	0
+6259_7#13	6259_7#13	1
+6259_7#14	6259_7#14	1
+6259_7#15	6259_7#15	1
+6259_7#16	6259_7#16	0
+6259_7#17	6259_7#17	0
+6259_7#18	6259_7#18	1
+6259_7#19	6259_7#19	0
+6259_7#20	6259_7#20	0
+6259_7#21	6259_7#21	0
+6259_7#22	6259_7#22	1
+6259_7#23	6259_7#23	0
+6259_7#24	6259_7#24	1
+6259_8#1	6259_8#1	0
+6259_8#2	6259_8#2	1
+6259_8#3	6259_8#3	1
+6259_8#4	6259_8#4	1
+6259_8#5	6259_8#5	0
+6259_8#6	6259_8#6	0
+6259_8#7	6259_8#7	0
+6259_8#8	6259_8#8	1
+6259_8#9	6259_8#9	0
+6259_8#10	6259_8#10	0
+6259_8#11	6259_8#11	0
+6259_8#12	6259_8#12	1
+6259_8#13	6259_8#13	1
+6259_8#14	6259_8#14	0
+6259_8#15	6259_8#15	0
+6259_8#16	6259_8#16	1
+6259_8#17	6259_8#17	0
+6259_8#18	6259_8#18	1
+6259_8#19	6259_8#19	0
+6259_8#20	6259_8#20	1
+6259_8#21	6259_8#21	1
+6259_8#22	6259_8#22	1
+6259_8#23	6259_8#23	0
+6259_8#24	6259_8#24	0
+6593_4#1	6593_4#1	0
+6593_4#2	6593_4#2	0
+6593_4#3	6593_4#3	1
+6593_4#4	6593_4#4	1
+6593_4#5	6593_4#5	1
+6593_4#6	6593_4#6	0
+6593_4#7	6593_4#7	1
+6593_4#8	6593_4#8	1
+6593_4#9	6593_4#9	1
+6593_4#10	6593_4#10	0
+6593_4#11	6593_4#11	0
+6593_4#12	6593_4#12	1
+6593_4#13	6593_4#13	0
+6593_4#14	6593_4#14	0
+6593_4#15	6593_4#15	0
+6593_4#16	6593_4#16	0
+6593_4#17	6593_4#17	1
+6593_4#18	6593_4#18	1
+6593_4#19	6593_4#19	0
+6593_4#20	6593_4#20	1
+6593_4#21	6593_4#21	1
+6593_4#22	6593_4#22	1
+6593_4#23	6593_4#23	1
+6593_4#24	6593_4#24	0
+6593_5#1	6593_5#1	1
+6593_5#2	6593_5#2	1
+6593_5#3	6593_5#3	1
+6593_5#4	6593_5#4	1
+6593_5#5	6593_5#5	1
+6593_5#6	6593_5#6	1
+6593_5#7	6593_5#7	0
+6593_5#8	6593_5#8	0
+6593_5#9	6593_5#9	0
+6593_5#10	6593_5#10	1
+6593_5#11	6593_5#11	1
+6593_5#12	6593_5#12	0
+6593_5#13	6593_5#13	1
+6593_5#14	6593_5#14	0
+6593_5#15	6593_5#15	0
+6593_5#16	6593_5#16	0
+6593_5#17	6593_5#17	0
+6593_5#18	6593_5#18	1
+6593_5#19	6593_5#19	1
+6593_5#20	6593_5#20	1
+6593_5#21	6593_5#21	0
+6593_5#22	6593_5#22	0
+6593_5#23	6593_5#23	0
+6593_5#24	6593_5#24	1
+6641_6#1	6641_6#1	0
+6641_6#2	6641_6#2	1
+6641_6#3	6641_6#3	1
+6641_6#4	6641_6#4	1
+6641_6#5	6641_6#5	0
+6641_6#6	6641_6#6	1
+6641_6#7	6641_6#7	1
+6641_6#8	6641_6#8	0
+6641_6#9	6641_6#9	1
+6641_6#10	6641_6#10	1
+6641_6#11	6641_6#11	1
+6641_6#12	6641_6#12	0
+6641_6#13	6641_6#13	0
+6641_6#14	6641_6#14	0
+6641_6#15	6641_6#15	1
+6641_6#16	6641_6#16	0
+6641_6#17	6641_6#17	0
+6641_6#18	6641_6#18	0
+6641_6#19	6641_6#19	1
+6641_6#20	6641_6#20	0
+6641_6#21	6641_6#21	0
+6641_6#22	6641_6#22	0
+6641_6#23	6641_6#23	0
+6641_6#24	6641_6#24	1
+6649_8#1	6649_8#1	1
+6649_8#2	6649_8#2	1
+6649_8#3	6649_8#3	0
+6649_8#4	6649_8#4	1
+6649_8#5	6649_8#5	1
+6649_8#6	6649_8#6	0
+6649_8#7	6649_8#7	1
+6649_8#8	6649_8#8	1
+6649_8#9	6649_8#9	1
+6649_8#10	6649_8#10	0
+6649_8#11	6649_8#11	1
+6649_8#12	6649_8#12	0
+6649_8#13	6649_8#13	0
+6649_8#14	6649_8#14	0
+6649_8#15	6649_8#15	1
+6649_8#16	6649_8#16	1
+6649_8#17	6649_8#17	1
+6649_8#18	6649_8#18	1
+6649_8#19	6649_8#19	1
+6649_8#20	6649_8#20	0
+6649_8#21	6649_8#21	1
+6649_8#22	6649_8#22	1
+6649_8#23	6649_8#23	1
+6649_8#24	6649_8#24	1
+6680_8#1	6680_8#1	1
+6680_8#2	6680_8#2	1
+6680_8#3	6680_8#3	0
+6680_8#4	6680_8#4	1
+6680_8#5	6680_8#5	0
+6680_8#6	6680_8#6	0
+6680_8#7	6680_8#7	0
+6680_8#8	6680_8#8	0
+6680_8#9	6680_8#9	0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/seer.git



More information about the debian-med-commit mailing list