tree-puzzle-5.2/0000777000076400001440000000000010075312110007401 5tree-puzzle-5.2/doc/0000777000076400001440000000000010075312110010146 5tree-puzzle-5.2/doc/Makefile.am0000644000076400001440000000101010075304620012115 # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # EXTRA_DIST = tree-puzzle.pdf SUBDIRS = tree-puzzle-5.2/doc/Makefile.in0000644000076400001440000002377210075305507012156 # Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MPICC = @MPICC@ MPICC0 = @MPICC0@ MPICC1 = @MPICC1@ MPICC2 = @MPICC2@ MPICC3 = @MPICC3@ MPICC4 = @MPICC4@ MPICC5 = @MPICC5@ MPICC6 = @MPICC6@ MPICFLAGS = @MPICFLAGS@ MPIDEFS = @MPIDEFS@ MPILIBS = @MPILIBS@ PACKAGE = @PACKAGE@ PPUZZLE = @PPUZZLE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ EXTRA_DIST = tree-puzzle.pdf SUBDIRS = subdir = doc mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ uninstall-info-recursive all-recursive install-data-recursive \ install-exec-recursive installdirs-recursive install-recursive \ uninstall-recursive check-recursive installcheck-recursive DIST_COMMON = Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ clean-generic clean-recursive distclean distclean-generic \ distclean-recursive distclean-tags distdir dvi dvi-am \ dvi-recursive info info-am info-recursive install install-am \ install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive tags tags-recursive uninstall \ uninstall-am uninstall-info-am uninstall-info-recursive \ uninstall-recursive # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tree-puzzle-5.2/doc/tree-puzzle.pdf0000644000076400001440000170416610075311461013072 %PDF-1.4 5 0 obj << /S /GoTo /D (chapter.1) >> endobj 8 0 obj (Legal Stuff) endobj 9 0 obj << /S /GoTo /D (chapter.2) >> endobj 12 0 obj (Installation) endobj 13 0 obj << /S /GoTo /D (section.2.1) >> endobj 16 0 obj (UNIX/Source Distribution) endobj 17 0 obj << /S /GoTo /D (subsection.2.1.1) >> endobj 20 0 obj (Linux \(binary distribution\)) endobj 21 0 obj << /S /GoTo /D (subsection.2.1.2) >> endobj 24 0 obj (Mac OS X \(binary distribution\)) endobj 25 0 obj << /S /GoTo /D (subsection.2.1.3) >> endobj 28 0 obj (Older Mac OSes) endobj 29 0 obj << /S /GoTo /D (subsection.2.1.4) >> endobj 32 0 obj (Windows 95/98/NT/\203\(binary distribution\)) endobj 33 0 obj << /S /GoTo /D (subsection.2.1.5) >> endobj 36 0 obj (VMS) endobj 37 0 obj << /S /GoTo /D (subsection.2.1.6) >> endobj 40 0 obj (Parallel TREE-PUZZLE) endobj 41 0 obj << /S /GoTo /D (section.2.2) >> endobj 44 0 obj (ANSI/ISO C Compilers) endobj 45 0 obj << /S /GoTo /D (section.2.3) >> endobj 48 0 obj (Contributed TREE-PUZZLE Packages) endobj 49 0 obj << /S /GoTo /D (chapter.3) >> endobj 52 0 obj (Introduction) endobj 53 0 obj << /S /GoTo /D (section.3.1) >> endobj 56 0 obj (Input/Output Conventions) endobj 57 0 obj << /S /GoTo /D (subsection.3.1.1) >> endobj 60 0 obj (Sequence Input) endobj 61 0 obj << /S /GoTo /D (subsection.3.1.2) >> endobj 64 0 obj (General Output) endobj 65 0 obj << /S /GoTo /D (subsection.3.1.3) >> endobj 68 0 obj (Distance Output) endobj 69 0 obj << /S /GoTo /D (subsection.3.1.4) >> endobj 72 0 obj (Tree Output) endobj 73 0 obj << /S /GoTo /D (subsection.3.1.5) >> endobj 76 0 obj (Tree Input) endobj 77 0 obj << /S /GoTo /D (subsection.3.1.6) >> endobj 80 0 obj (Likelihood Mapping Output) endobj 81 0 obj << /S /GoTo /D (chapter.4) >> endobj 84 0 obj (Quick Start) endobj 85 0 obj << /S /GoTo /D (chapter.5) >> endobj 88 0 obj (Models of Sequence Evolution) endobj 89 0 obj << /S /GoTo /D (section.5.1) >> endobj 92 0 obj (Models of Substitution) endobj 93 0 obj << /S /GoTo /D (section.5.2) >> endobj 96 0 obj (Models of Rate Heterogeneity) endobj 97 0 obj << /S /GoTo /D (chapter.6) >> endobj 100 0 obj (Possible Analysis) endobj 101 0 obj << /S /GoTo /D (section.6.1) >> endobj 104 0 obj (Tree Reconstruction Using Quartet Puzzling) endobj 105 0 obj << /S /GoTo /D (section.6.2) >> endobj 108 0 obj (Likelihood Mapping) endobj 109 0 obj << /S /GoTo /D (section.6.3) >> endobj 112 0 obj (Usertree Evaluation and Testing) endobj 113 0 obj << /S /GoTo /D (section.6.4) >> endobj 116 0 obj (Consensus Tree Construction) endobj 117 0 obj << /S /GoTo /D (section.6.5) >> endobj 120 0 obj (Parameter Estimation and Pairwise Distances) endobj 121 0 obj << /S /GoTo /D (chapter.7) >> endobj 124 0 obj (Available Options) endobj 125 0 obj << /S /GoTo /D (chapter.8) >> endobj 128 0 obj (Other Features) endobj 129 0 obj << /S /GoTo /D (chapter.9) >> endobj 132 0 obj (Interpretation and Hints) endobj 133 0 obj << /S /GoTo /D (section.9.1) >> endobj 136 0 obj (Quartet Puzzling Support Values) endobj 137 0 obj << /S /GoTo /D (section.9.2) >> endobj 140 0 obj (Percentage of Unresolved Quartets) endobj 141 0 obj << /S /GoTo /D (section.9.3) >> endobj 144 0 obj (Percentage of Ambiguous Characters in the Alignment) endobj 145 0 obj << /S /GoTo /D (section.9.4) >> endobj 148 0 obj (Automatic Parameter Estimation) endobj 149 0 obj << /S /GoTo /D (section.9.5) >> endobj 152 0 obj (Batch Mode) endobj 153 0 obj << /S /GoTo /D (chapter.10) >> endobj 156 0 obj (Limits and Error Messages) endobj 157 0 obj << /S /GoTo /D (chapter.11) >> endobj 160 0 obj (Are Quartets Reliable?) endobj 161 0 obj << /S /GoTo /D (chapter.12) >> endobj 164 0 obj (Other Programs) endobj 165 0 obj << /S /GoTo /D (section.12.1) >> endobj 168 0 obj (Related Links and Programs) endobj 169 0 obj << /S /GoTo /D (section.12.2) >> endobj 172 0 obj (Supporting Programs) endobj 173 0 obj << /S /GoTo /D (section.12.3) >> endobj 176 0 obj (Other Phylogenetic Programs) endobj 177 0 obj << /S /GoTo /D (section.12.4) >> endobj 180 0 obj (Compilers and Other Software) endobj 181 0 obj << /S /GoTo /D (chapter.13) >> endobj 184 0 obj (TREE-PUZZLE References and Further Reading) endobj 185 0 obj << /S /GoTo /D (chapter.14) >> endobj 188 0 obj (Acknowledgments and Credits) endobj 189 0 obj << /S /GoTo /D (chapter.15) >> endobj 192 0 obj (Known Bugs) endobj 193 0 obj << /S /GoTo /D (chapter.16) >> endobj 196 0 obj (Version History) endobj 197 0 obj << /S /GoTo /D [198 0 R /Fit ] >> endobj 202 0 obj << /Length 1544 /Filter /FlateDecode >> stream xXYs6~ׯ`ߨ!`ypZ%IOdKvt;K|iaCoI;8A N[G^jq8CT;F]Gn;F)vĜR-̣:LT·C-$+ -$`:a *X/(Be%šJYM!ځ4@$:$Bnd[EDR0VLO4)jm[hjD?N(&oWto 7dΨlj3XZ$\; aj/8|P*]@w2Z|;$*֮ӍP-el14{ME]=QEXޟ; dĹ/%+ ( u8:JM2xl8D̳f;Kqax6 u5#䕡3,QD@ g75n ɶ_h:ro ;q\Z5:h->Һxz/ mCKY5B=Φ,G \a &r ZS q +t+]{8> endobj 199 0 obj << /Type /XObject /Subtype /Image /Width 32 /Height 32 /BitsPerComponent 1 /ColorSpace [/Indexed /DeviceRGB 1 235 0 R] /Length 74 /Filter /FlateDecode >> stream x- 1P_g x6 6%.r, Dnl$VAN/IRn> stream xc```.endstream endobj 200 0 obj << /Type /XObject /Subtype /Image /Width 32 /Height 32 /BitsPerComponent 1 /ColorSpace [/Indexed /DeviceRGB 1 236 0 R] /Length 73 /Filter /FlateDecode >> stream xc```Wϩɩ).®::KA!_?& ;+USwy<:<:ŽcJ4Mendstream endobj 236 0 obj << /Length 14 /Filter /FlateDecode >> stream xc```.endstream endobj 217 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 404.412 357.624 416.368] /Subtype/Link/A<> >> endobj 218 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 393.011 259.962 403.859] /Subtype/Link/A<> >> endobj 222 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 349.175 262.563 360.023] /Subtype/Link/A<> >> endobj 223 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [266.659 349.175 360.613 360.023] /Subtype/Link/A<> >> endobj 224 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 292.831 357.624 304.786] /Subtype/Link/A<> >> endobj 225 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 281.429 259.962 292.277] /Subtype/Link/A<> >> endobj 229 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 257.519 222.99 268.367] /Subtype/Link/A<> >> endobj 230 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [227.085 257.519 322.699 268.367] /Subtype/Link/A<> >> endobj 203 0 obj << /D [198 0 R /XYZ 133.768 692.105 null] >> endobj 204 0 obj << /D [198 0 R /XYZ 133.768 667.198 null] >> endobj 201 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F19 213 0 R /F17 216 0 R /F20 221 0 R /F21 228 0 R /F22 233 0 R >> /XObject << /Im1 199 0 R /Im2 200 0 R >> /ProcSet [ /PDF /Text /ImageC /ImageI ] >> endobj 239 0 obj << /Length 2529 /Filter /FlateDecode >> stream xYYs8~ϯ#UeQ$s)Ofg PI ;>:Rq4^/$HrA|,kyZI3S7; ȏ̮BD~ϋy7z2 J7j;4nU= T| ͮɫqg _]9A/[{-6O'HUf:0w׍*[l4,j/Dd^JwfiY Nn 5ϱ:l32\fG&L k5=>nu&ުn z{kw$  td#490w{6't\=ٺx{Bb-3 G9fܲI֯HZorcY*4Kg~K_MEc` s\HYfCڊ|8"Uyf~CswyῶuEg}x4jeKβ  MTĩ+)yCQȎF/tw',d޻<|{ o#.M3PKSX#HaClȽB@SOپzI*(D)Tzv];` .6-,]" Q+ihcިD)B231zR$P{zpܥiXCԠ=)c.l sdDe4LgtEH;uA騻QCeHF%֦Z߰uHetZi{((:E߫q?+lyyfEbt9+:.d\͇!ďDrQ qn)X_zeCN#"8eݿf'LxJGѿг,1 S@jFK=>Tm'Qu:hJYTy" _UxlFg4{v_~mY6>7Ua~֫nuLc}g;SO6N/~o'S݊4N&bvܩ5bCը^-pLeKdU ](D#AXzObuwog/>u.,p0vme=Ao7@))RþRJ|3Iq 4T)7IظBQ'\fvWW5/+ 3H6! ET'k_|4O, |) 8NBa|c9em/~ۿN ;-%%H> uXcC$¯v+ ,%(#[B%Jg=4^8.QӜ> V[Q[? 0ϳs6'^Au Y>:-"2=1q*.Lx{qwϫ8z&imS՞`c[MMͷ˯µ%eP[{3y4 h+b\e:N$; |((溔Ǒ&m-m*W/äav3|LQ@NI ȗQrOendstream endobj 238 0 obj << /Type /Page /Contents 239 0 R /Resources 237 0 R /MediaBox [0 0 612 792] /Parent 234 0 R /Annots [ 244 0 R 245 0 R 246 0 R 247 0 R 248 0 R 249 0 R 250 0 R 251 0 R 252 0 R ] >> endobj 244 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 287.621 296.158 299.577] /Subtype/Link/A<> >> endobj 245 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 268.692 401.263 280.648] /Subtype/Link/A<> >> endobj 246 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 237.808 405.497 249.763] /Subtype/Link/A<> >> endobj 247 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 206.924 327.042 218.879] /Subtype/Link/A<> >> endobj 248 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [317.117 151.631 361.802 163.587] /Subtype /Link /A << /S /GoTo /D (cite.snir1998) >> >> endobj 249 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [365.629 151.631 387.547 163.587] /Subtype /Link /A << /S /GoTo /D (cite.snir1998) >> >> endobj 250 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [391.373 151.631 446.09 163.587] /Subtype /Link /A << /S /GoTo /D (cite.gropp1998) >> >> endobj 251 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [449.916 151.631 471.834 163.587] /Subtype /Link /A << /S /GoTo /D (cite.gropp1998) >> >> endobj 252 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [467.627 127.721 474.601 139.676] /Subtype /Link /A << /S /GoTo /D (chapter.2) >> >> endobj 240 0 obj << /D [238 0 R /XYZ 133.768 537.684 null] >> endobj 237 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F14 243 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 257 0 obj << /Length 800 /Filter /FlateDecode >> stream xuU[o0~Dqn MbbMۈ4ℲϹ8] UXy!HI%*vzkP})g0QȽ "#MeD^"bS|3#*?0I$^WPǦ$J@MmYv~S@[$יʡIײth,}{3}UXYn_3WܡU|edn JqL~AιB:2v`伥a&W| ˀYb:LĦD?0z;Q"I 6ے6 +å'E'0a[IVZ Cu19:2ܣWZ/.zbݍ'<@4kTn+\AN\ha$e^LF#U7 (B='RgQP!6kyJDZ: cD<PW>69Z,xw dWdXS[ Yz8oZ y.(& :}] ׀>aW?noY!98J®'MV02EcU bno9tM!A<60)(,ѱEd= =&So,mgQ29 S 'ۺk9ƮhQrѝKPZ;XSr>~IYڌ5O/6F$9EnS n6/qg%RI.$go>wR##>ntendstream endobj 256 0 obj << /Type /Page /Contents 257 0 R /Resources 255 0 R /MediaBox [0 0 612 792] /Parent 234 0 R /Annots [ 259 0 R 260 0 R 261 0 R ] >> endobj 259 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [440.827 629.838 455.549 641.793] /Subtype /Link /A << /S /GoTo /D (section.3.1) >> >> endobj 260 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [192.932 617.883 199.906 629.838] /Subtype /Link /A << /S /GoTo /D (chapter.4) >> >> endobj 261 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [169.911 570.062 181.866 582.017] /Subtype /Link /A << /S /GoTo /D (chapter.16) >> >> endobj 258 0 obj << /D [256 0 R /XYZ 133.768 692.105 null] >> endobj 255 0 obj << /Font << /F8 210 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 264 0 obj << /Length 1315 /Filter /FlateDecode >> stream xKs6:Q8WlͤAcZrp| %-סm9͈bK҉C:HIݑF$Nܙ­w;?8M@C1]whįg+J=q kF/\^n^oΖIhT 8`b`Tm^JAiC6\4E@y̒|7C vt#~ZlxɠYVbe[d\+a`^Qۛ?hݼѰW?O^^6svd_X"8EP]^ZU>] 0Lm+W3s,uT-\>Ͼz|-c_՟ dri=C*> endobj 267 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 512.832 204.019 523.681] /Subtype /Link /A << /S /GoTo /D (chapter.1) >> >> endobj 268 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 492.852 206.628 501.763] /Subtype /Link /A << /S /GoTo /D (chapter.2) >> >> endobj 269 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 478.406 288.826 490.361] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 270 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 466.451 322.921 478.406] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.1) >> >> endobj 271 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 454.496 343.814 466.451] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.2) >> >> endobj 272 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 445.031 275.709 453.942] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.3) >> >> endobj 273 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 430.585 400.602 442.54] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.4) >> >> endobj 274 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 421.121 226.642 429.921] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.5) >> >> endobj 275 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 409.166 311.768 418.077] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.6) >> >> endobj 276 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 394.72 276.207 406.675] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 277 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 383.318 341.656 394.166] /Subtype /Link /A << /S /GoTo /D (section.2.3) >> >> endobj 278 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 363.337 212.874 372.248] /Subtype /Link /A << /S /GoTo /D (chapter.3) >> >> endobj 279 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 348.892 290.293 360.847] /Subtype /Link /A << /S /GoTo /D (section.3.1) >> >> endobj 280 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 337.49 271.474 348.227] /Subtype /Link /A << /S /GoTo /D (subsection.3.1.1) >> >> endobj 281 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 325.535 273.785 336.383] /Subtype /Link /A << /S /GoTo /D (subsection.3.1.2) >> >> endobj 282 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 313.58 277.48 324.317] /Subtype /Link /A << /S /GoTo /D (subsection.3.1.3) >> >> endobj 283 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 301.624 259.049 312.362] /Subtype /Link /A << /S /GoTo /D (subsection.3.1.4) >> >> endobj 284 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 289.669 251.023 300.407] /Subtype /Link /A << /S /GoTo /D (subsection.3.1.5) >> >> endobj 285 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [170.63 277.714 327.238 288.562] /Subtype /Link /A << /S /GoTo /D (subsection.3.1.6) >> >> endobj 286 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 255.796 208.066 266.644] /Subtype /Link /A << /S /GoTo /D (chapter.4) >> >> endobj 287 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 233.878 300.885 244.727] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 288 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 223.86 272.083 232.771] /Subtype /Link /A << /S /GoTo /D (section.5.1) >> >> endobj 289 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 209.968 302.359 220.816] /Subtype /Link /A << /S /GoTo /D (section.5.2) >> >> endobj 290 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 188.05 235.835 198.898] /Subtype /Link /A << /S /GoTo /D (chapter.6) >> >> endobj 291 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 176.095 366.811 186.943] /Subtype /Link /A << /S /GoTo /D (section.6.1) >> >> endobj 292 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 164.14 259.934 174.988] /Subtype /Link /A << /S /GoTo /D (section.6.2) >> >> endobj 293 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 152.185 313.788 163.033] /Subtype /Link /A << /S /GoTo /D (section.6.3) >> >> endobj 294 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 142.167 299.923 150.967] /Subtype /Link /A << /S /GoTo /D (section.6.4) >> >> endobj 295 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 130.212 373.011 139.123] /Subtype /Link /A << /S /GoTo /D (section.6.5) >> >> endobj 265 0 obj << /D [263 0 R /XYZ 133.768 692.105 null] >> endobj 266 0 obj << /D [263 0 R /XYZ 133.768 537.684 null] >> endobj 262 0 obj << /Font << /F18 207 0 R /F17 216 0 R /F8 210 0 R >> /ProcSet [ /PDF /Text ] >> endobj 298 0 obj << /Length 969 /Filter /FlateDecode >> stream xWMo8WH"O 'pH=tуj+drwCv Pw- XRfxG\$362N$?{tɳ%h~gΗ,8Cl˫xYYi%Ul6SL)XOOD/\#VZ+a8zkGOX &ycK S)8ѥ"WS*pXIkZ)` ^`q)%gth^Wmo`Y[ &obU^4#M;?Fmp46),R.hd' [.>pɄf_sDz.@,EAG( [5!g8kbICSQ@MO 1O8}U"nKo/bGoɶjhVVߴ4~dHuCYg{s&E3:,e Z=E,2`Ї%0IIpEca{ƠA\$<uʞWkQdvQk2Eҗ>4[aAu͈sN] ^gj2O5Lfc9;H-ۇi4V؟Q.P5s q^XvfZx'ؑ󟢙=ѝANfQdQ(#US_@Ԫ?ntIín اڃ;L:Sљ_@N"/.dUw Ր)\ 89Jr'{$z-4>])nhBK](((_PZ0 %g(MǺXB9*1 ij _,+_ Ke4-,x'jTp ٽ"*|~W5S>ׯP6d*=G(4L HM3HeYtendstream endobj 297 0 obj << /Type /Page /Contents 298 0 R /Resources 296 0 R /MediaBox [0 0 612 792] /Parent 234 0 R /Annots [ 300 0 R 301 0 R 302 0 R 303 0 R 304 0 R 305 0 R 306 0 R 307 0 R 308 0 R 309 0 R 310 0 R 311 0 R 312 0 R 313 0 R 314 0 R 315 0 R 316 0 R 317 0 R 318 0 R ] >> endobj 300 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 654.302 239.124 665.15] /Subtype /Link /A << /S /GoTo /D (chapter.7) >> >> endobj 301 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 634.321 225.308 643.232] /Subtype /Link /A << /S /GoTo /D (chapter.8) >> >> endobj 302 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 610.466 273.723 621.314] /Subtype /Link /A << /S /GoTo /D (chapter.9) >> >> endobj 303 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 598.511 317.607 609.359] /Subtype /Link /A << /S /GoTo /D (section.9.1) >> >> endobj 304 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 586.556 324.055 597.404] /Subtype /Link /A << /S /GoTo /D (section.9.2) >> >> endobj 305 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 574.601 411.228 585.449] /Subtype /Link /A << /S /GoTo /D (section.9.3) >> >> endobj 306 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 564.583 318.576 573.383] /Subtype /Link /A << /S /GoTo /D (section.9.4) >> >> endobj 307 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 552.628 225.895 561.539] /Subtype /Link /A << /S /GoTo /D (section.9.5) >> >> endobj 308 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 528.773 284.887 539.621] /Subtype /Link /A << /S /GoTo /D (chapter.10) >> >> endobj 309 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 506.855 265.906 517.703] /Subtype /Link /A << /S /GoTo /D (chapter.11) >> >> endobj 310 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 484.937 231.286 495.785] /Subtype /Link /A << /S /GoTo /D (chapter.12) >> >> endobj 311 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 472.982 297.46 483.83] /Subtype /Link /A << /S /GoTo /D (section.12.1) >> >> endobj 312 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 461.027 266.161 471.764] /Subtype /Link /A << /S /GoTo /D (section.12.2) >> >> endobj 313 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 449.071 301.999 459.92] /Subtype /Link /A << /S /GoTo /D (section.12.3) >> >> endobj 314 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [147.716 437.116 305.32 447.964] /Subtype /Link /A << /S /GoTo /D (section.12.4) >> >> endobj 315 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 415.198 396.761 426.047] /Subtype /Link /A << /S /GoTo /D (chapter.13) >> >> endobj 316 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 393.281 302.291 404.129] /Subtype /Link /A << /S /GoTo /D (chapter.14) >> >> endobj 317 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 371.363 213.685 382.128] /Subtype /Link /A << /S /GoTo /D (chapter.15) >> >> endobj 318 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 349.445 228.616 360.293] /Subtype /Link /A << /S /GoTo /D (chapter.16) >> >> endobj 299 0 obj << /D [297 0 R /XYZ 133.768 692.105 null] >> endobj 296 0 obj << /Font << /F17 216 0 R /F8 210 0 R >> /ProcSet [ /PDF /Text ] >> endobj 321 0 obj << /Length 1051 /Filter /FlateDecode >> stream xڕVK6БVHz ,(NIsڲ%DyP~nѼ83̈*e>P,f> RE8'WͷP;eL@1f # ~|l5e6y﹆BT",CB6>04ƈPb7e^mCՎGF"Sd}YiD(ʥ_ҡm&*-[`)ՏXjh$L~ MNx1)6 / ^@l${ x12GF#@ȅk$# a +܍3PZ3P@QM돜Ձ|urOh"Bgl0p"|Wͫ/ 5mOM]F>F5+CG+G-I7Lcdn5]40 cn!25w328H;wt6\K9tZ.gӆile;Ǚ86 I=jWۣ?P=19=Wa&ayBivT5dcBѱۊ톒[hSQ#mS7jÆ znrHpx׌vpsVI'J[i3y3/ӆ/8ܨ~F+wpϳĿbU@C46 "ɪEFhYKyP5? n0&x瀷[]7T,-Y;7Z,#f4/*d?i/=ggSжK+voņ.!F*^?NuO},&IoR?COendstream endobj 320 0 obj << /Type /Page /Contents 321 0 R /Resources 319 0 R /MediaBox [0 0 612 792] /Parent 234 0 R /Annots [ 323 0 R 324 0 R ] >> endobj 323 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [418.949 370.09 478.476 381.215] /Subtype/Link/A<> >> endobj 324 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 358.135 344.476 369.26] /Subtype/Link/A<> >> endobj 322 0 obj << /D [320 0 R /XYZ 133.768 692.105 null] >> endobj 6 0 obj << /D [320 0 R /XYZ 133.768 667.198 null] >> endobj 319 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F14 243 0 R /F21 228 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 327 0 obj << /Length 1595 /Filter /FlateDecode >> stream xڥXYoF~K 0܃{<ȅZA4})Jb+EE}gve2r€H=̚#.%3ڎ'(_]$9l\@"p،ݘ'!/_i-G'L^-M3yTX_߈X1c 1˕?r6ce%6%Vk:eGV@rf<3Y^eU;8S~IGy5ѳiL~O~O_rb30QVg`]n'Oa62ϖVe8YfM53joͬBҕdX eo/DZ&*k ]Wb$Ƌ{ )|b۠(~MQ˺ &fV;I:\M]#NVQ&iBa1Ydiꢈ7eL&=ym¹>[83lPM/dp<_ql^` n;@䉓%xt_1Gu ՚"$Jq*r{`?+͔r?xsLgXʼn{ؗiߢr 3]5ڗ4U4гKl_t-DDh+NDﰪq=?_Op+k> J*[ۍ"oc# >:b6,"sFg|{L.=5{72VFgnH Gp \Qb|1 Gjv(*)R ֯RB Jh6SPGBb0D5&^S*V1/B+T5@\3-n=d"-}AI` @ʺj3gnoj:e`6`uγMv۱B9E[ԡ ~*e$pl֝է$xpZ\\OÑH`OK3%X~zښ(N{Cg֫͆Os{i};h /q%4ߥj V?ff zX@eyRvh# fG/DW0-i_anI[aڶq5YQd -ˤl YpG[1g|Cm|'a<N 2|!_ 9 ɻ UրAFs9 8[2N*![mQ덟?}9(ԙ@<`v/Tv*+? ==~{oS;8o4 i\Еi&Dߣ7ޘyU2 xV89k?"{!TŁ˶@{j V' $7?ܓL(@< wN0- $ڄ< WD` P-vQ~0w lsܹW?@e<\b2 ˄=O괣k3憆 Y endstream endobj 326 0 obj << /Type /Page /Contents 327 0 R /Resources 325 0 R /MediaBox [0 0 612 792] /Parent 329 0 R >> endobj 328 0 obj << /D [326 0 R /XYZ 133.768 692.105 null] >> endobj 10 0 obj << /D [326 0 R /XYZ 133.768 667.198 null] >> endobj 14 0 obj << /D [326 0 R /XYZ 133.768 404.171 null] >> endobj 325 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 332 0 obj << /Length 2798 /Filter /FlateDecode >> stream xZ[ۺ~ϯGiuiq4I8' ZY G If;,m6}im8W!WRkU)!CsUW{zL):){ kR F$uz,W7;xG7:&Jl|du%Q:u7Ux#MDFӷonmQS|D;cC29`hURi03R+6mכ[XZ%"3l$憶*Ձs$ޭ iO {#E.J/8ȯReOHK={.ǒCNBsnZ+*mw>,ܨIZ PN%Rv˦m@'7tnپ %ld9yGl' F򁯧2#4|GU+Sn6bSͮڟ%FƽZuP\HZJ7hz*cލ^f"sU0k:-w/5Ni₪wT\ /4G=hW8$j=񜲮#QPB?&"f:?Ii0{kn{.͙|@q" koӉ MXPQĊ_=3n5opjMA _F"0=^;YVgn(-A{hG/=E"{B?JV΢.%Ѓ]2PyZ+U2gZG= έupRU>r˝qz 'B"< k0Gs@4Λ/ A9@mu?e\U jEOj6 K,bNCJ0"\Zx: Nf:! #D40D2M#z=}nY( ^]Ej0|_Vp\4@g!b/=wˡln9؀]s'Z P'rA5Z>ճ+B&vi)t"L~)?3c 1lƼ/2)u%3 ,qp3_Xշz8[ݵ]8ⲱf>;*"0¾[> Qԑe6!ygԝӎxȞ# M,x]5L@.`MCus`-y=.$`-TM|ҹ\Çwݵ YDA ,?X+œwB.Cz4Hr{d-nDps)Fv*M FmO#饉FX=te,imZC}$U y'@ !Se3/ЁS[ Y<&3QeҪ)wMXxN*Pijk:Э,{4sɰ[#T{=^0: G2=*P檇/e=#'dDEX0X`ؼ}⥧R% s>azwy% 9Q}Kb)1>'x2I3]̽yEm;i$4.rgW~' mD;@ჯ ,<!,3>mC-gٶs`wbԤ ^Ҷ%>!^oe43 a[mA"r%Ӫ{'³=(Cȣ$B{/ coIS+8ADMi0;~xBoSnNyi(S}8Pm)s lJ,GŵK4) gv pÞ)WW5b ҀlZdrP-<wHҾȧ }\piX-CQf 6E0xcnD eY)G"(#Ie&Q*+A6GMɓvA>L tC> jO_F cl+'OilM>vѴtUV{8;ۥӕGn[OU"Iz{ >o>HqA)0n |Q|C@d L$e%nD8D)8D䷼`G~ODR(w>1JNTo8Q&s?OGBe:rȋ|d$$#ҥ tcʆI*GyRYN=[ISHD}xvwpi8N?N?TvaB_ jN@AW׀`=~eJYd?#Wݧr 3~5s ,hgM9(h"vB$ E֟v[.4E3GD㿓~L~u5(8:6zd'Y†~6modendstream endobj 331 0 obj << /Type /Page /Contents 332 0 R /Resources 330 0 R /MediaBox [0 0 612 792] /Parent 329 0 R /Annots [ 334 0 R 335 0 R 336 0 R 337 0 R 341 0 R ] >> endobj 334 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [151.314 593.973 173.785 605.928] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.6) >> >> endobj 335 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [450.332 300.621 478.476 312.577] /Subtype/Link/A<> >> endobj 336 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 288.666 202.759 300.621] /Subtype/Link/A<> >> endobj 337 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [339.778 276.711 354.501 288.666] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 341 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [338.467 264.756 353.189 276.711] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 333 0 obj << /D [331 0 R /XYZ 133.768 692.105 null] >> endobj 18 0 obj << /D [331 0 R /XYZ 133.768 441.551 null] >> endobj 22 0 obj << /D [331 0 R /XYZ 133.768 251.811 null] >> endobj 330 0 obj << /Font << /F8 210 0 R /F20 221 0 R /F18 207 0 R /F30 340 0 R >> /ProcSet [ /PDF /Text ] >> endobj 344 0 obj << /Length 2760 /Filter /FlateDecode >> stream xڕY[sJ~ϯ[PUnqRފWc,*HP";m9g\efzfuOK,yiNH0`CwW Ѿ-NrO~))ظQ ˋ(n x`/V]pSH}4H>srjqJ4V_xt[xB3-`PǼP@SrMZB2.@ /M! ]Aq0~9h'üCgz'|{re} -4*,a@nD>U<(f\ߗwALv\ r/+DMubn HJ נvTSFɸHӾ' /Z, 4`MLT:V:"zhEToxXǩaNi%iaY9Ith+% lH!DlKH@\,q @Uo+cC:}<`D<;|>C9 bWRfzh}3e^jk@Ys?1^l=m(A'-uu=<X1+@:Rc)rqQɎ @rbxFeg:Wc CZy*N8)PTr'<|"xP!ɾ&D罄)*$ gL.?p,>[Cֈjʷw3VA8ĵ^mruEK0 l3r *rrIP;q}> :Qk44_>{qj/UшKG[ o몦R]*N*J*.O1O)e2 M׸3 [[P>|~>VzmNL)X+:^ 3)2l1J!|YB=n@GW!gЂvqbFDTkR+LF$~=a"ypwKU;&8*"X޾Ei($|QK7- ^p- $#PqT܅o͠xB'Ήil6V"[oud`\ĉ[܎̹}q\ANp/4[AVD.{ߊ3Dʟ^AKGB lG JO*7Biów3)wwRqX!I@Ş 9z\E_4<yՏJ=e"gzL-wdNdzbxcm5BʅOv.qE:MpixЅ+6'? OxŎ0}Iq:#v>ì TK^Jq88p RGtwj&mGF!p';7xA-lrH) |[#=2ۼ%7=H;Ĕ G 퉿iYڟte0a7} l>  ;TذV 0\.vpuHZ\0DgKnM sya-qzJ,p0HG񊇆}gEG-t ; > endobj 346 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [136.646 641.793 316.471 653.748] /Subtype/Link/A<> >> endobj 347 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 617.883 147.495 629.838] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 348 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [457.111 617.883 471.834 629.838] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 349 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [343.963 523.784 358.686 535.74] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 350 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [418.949 369.91 478.476 381.865] /Subtype/Link/A<> >> endobj 351 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 357.955 181.838 369.91] /Subtype/Link/A<> >> endobj 352 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [339.778 346 354.501 357.955] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 353 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [338.467 334.045 353.189 346] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 354 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [312.422 310.134 334.893 322.09] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.1) >> >> endobj 355 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [425.648 239.946 440.371 251.901] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 345 0 obj << /D [343 0 R /XYZ 133.768 692.105 null] >> endobj 26 0 obj << /D [343 0 R /XYZ 133.768 604.938 null] >> endobj 30 0 obj << /D [343 0 R /XYZ 133.768 499.438 null] >> endobj 34 0 obj << /D [343 0 R /XYZ 133.768 287.725 null] >> endobj 38 0 obj << /D [343 0 R /XYZ 133.768 215.047 null] >> endobj 342 0 obj << /Font << /F8 210 0 R /F20 221 0 R /F21 228 0 R /F18 207 0 R /F30 340 0 R >> /ProcSet [ /PDF /Text ] >> endobj 358 0 obj << /Length 2789 /Filter /FlateDecode >> stream xZ[o8~ϯ[Eԥyh6mRtyF$7=R"%b@DS|ʅBx&JH,6剿«7'. 4,k2P1`EWW'E"0X\«߼8ӥ #_թgZ>8/N+T^vyMKCȻt]3ػa0{T/"v乯ywwW _[X=U]?8Ulh*PC9/g}ռ} = s"8X!Ce#P/PMug`n|{h1?vY#؅QxKzxTs\E2)  Mc)HFZJK mU[ttvg.y%@}$Y%0AsFO9^YYũ |d(]8@+AT">.! Eٸai{˃a.}o/%D޿mҮg͠}Vسcȓ09ځ(]A ZsVOA hUD{` |ZӖA 2I`^mKFvB À> 졈NdǨgjez(i{^$+`"I dދ6JB͂ә9N *J~ ]Vg2sӇǹ sH IVY5jW3R|h䄏ei!LH elha%ccon k;EA:d5*p&?}^ւ #s[^G=1OA.JI@{4@a԰~3jaP&(u< `0c|m->}ZD,yfhX((޽"1rF}XTdCdQAX叓~,6ƾI $ޅ~''K)e~KǑW4,SQlYPɸ Da T9"\6Ɓ8jl)- ͺʁO*W%sV"vaS㬙d*6ơ[PK<2b#ߘ 3}tKMp 0c~4 W̕R XqE2l*890b*HNFDP]DXXt/.1?Y2+\/ Nr0_= oF>wg߿_ Z>0A0@ w۬lѤE& {tp͊wGrnsEJ.| WdTϊ,ߐt3yQ3̦Q  0`(fH ρ_ˉ@W񣠁ԩ5HQy,P]^` iMPdylcP1p8?~֟lz8 ;OH$y?FiX?=كӤ1+<]_ә 4Fb4J0 ds1-K4 ƣl*"yybUC|8まf%-8\$5ɶ! ŷqoa;v Z䃆 nM+(2;:bL{^NvuY -ImoNp"> Ċub8e`~(H\ |:a,%eKrMד)nRJ }VE)/Ӷc"uwFj$6}<9)ʺ~Lqn}u>^~QM?\`ֵ<~s5gPsD70!85l۰HNbv]Ĥ>>>ƨ<4҂_ yH#s@1u@?V:endstream endobj 357 0 obj << /Type /Page /Contents 358 0 R /Resources 356 0 R /MediaBox [0 0 612 792] /Parent 329 0 R /Annots [ 360 0 R 361 0 R 362 0 R 363 0 R 364 0 R 365 0 R ] >> endobj 360 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 622.145 385.074 633.27] /Subtype/Link/A<> >> endobj 361 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 602.219 432.147 613.344] /Subtype/Link/A<> >> endobj 362 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 582.294 478.476 593.419] /Subtype/Link/A<> >> endobj 363 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 572.553 180.593 580.634] /Subtype/Link/A<> >> endobj 364 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [200.35 502.316 215.072 514.271] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 365 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [300.2 351.438 314.923 362.286] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 359 0 obj << /D [357 0 R /XYZ 133.768 692.105 null] >> endobj 356 0 obj << /Font << /F8 210 0 R /F14 243 0 R /F20 221 0 R /F17 216 0 R /F11 368 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 371 0 obj << /Length 2938 /Filter /FlateDecode >> stream xڽYnH}WB"ݼ[֛x'ځZ%%(:Ui^ WNUVgԙ}7(ծ³w7tPh:bn?n,>&gFwY\3T|66T2mvUNrvM=Y.oߢE;+iUUI=&LvdstB=J}WlwyR0]yfl7 J!o]Ψ}0{dva]E6Wm(;MeHCAӚ0xg|ZTkm6ZaJqne.)Fi6}dQ*pkFndU-WkGG`%h@wRՒ8 a}MDNp'Szi4: "xG-Z-eUXEyPוI3Iv, P"i=K'pZZ v(Z.H xFP9dv0A7RGRsެuX[vǖNTIoMk60{o~ID~lk#3 /~~4,GjOnH+ \գzIQzQ 4< Vv+M(:)rAg=a%EmoWědMt~Zb9x ?H@Ħ=[1 "#:ŇڌgEu> \ZX*AjRowOyf\=cޢ`G:^5> Z>>,h!%, 4(e>s竜-'ҁFY cqVhϿAcC5ƃz]uL6ܕlh;ג޽b @|`g@(XHj7zXԻ!vIu޾C6%϶'nw3&Iهq[BK5;ov41j9lzy+_/b .QR4vÉ+vQb+imqnu5ISm-5=%L3[F.+#M1 ceA9eD=M~Y,˥nݜtS XYqw)E'C[iG49)̿!4ay$ҕ8 (PG[Xjn xDZ o8 \7*cAB}W)5I32Y}(jYr8bIZ+ ~j/d]ךrHY}0v%í@6%t܊ykָR ;Qd?ZVV툗p-)SqL_ӈXV?Kέ.B )꓈% 1\.<_R. (YM^|q6O7WèN &3W|*>qjöKpwMyh!DK^{_odF:Pw?IXSO_o5mhOB d h@c:"-{tRuK{9Gm}&Srqy8h6)g%/(`hB*FkuvOyM'-3p]nc|c$8JOUqIT ҹ<(\/[3t} 5C&6I:<@`㶑XKL&rW"YtW־+U>{ ~r4ϳkq<2/aH)ڣH; MP(א&|>7 c|RMxXf-=#(ýBjUR$.Qwl4SQQ&qTIG _#endstream endobj 370 0 obj << /Type /Page /Contents 371 0 R /Resources 369 0 R /MediaBox [0 0 612 792] /Parent 329 0 R /Annots [ 373 0 R 374 0 R 375 0 R 376 0 R 377 0 R 378 0 R 379 0 R 380 0 R 381 0 R ] >> endobj 373 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [286.446 433.602 382.585 445.557] /Subtype/Link/A<> >> endobj 374 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [450.331 401.721 478.476 413.677] /Subtype/Link/A<> >> endobj 375 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 389.766 389.806 401.721] /Subtype/Link/A<> >> endobj 376 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [279.099 345.931 385.698 357.886] /Subtype/Link/A<> >> endobj 377 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [195.952 278.185 307.782 290.14] /Subtype/Link/A<> >> endobj 378 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [241.033 234.349 420.857 246.304] /Subtype/Link/A<> >> endobj 379 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [248.745 178.558 478.476 190.513] /Subtype/Link/A<> >> endobj 380 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 166.603 175.362 178.558] /Subtype/Link/A<> >> endobj 381 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [136.646 120.775 159.118 132.73] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.6) >> >> endobj 372 0 obj << /D [370 0 R /XYZ 133.768 692.105 null] >> endobj 42 0 obj << /D [370 0 R /XYZ 133.768 568.554 null] >> endobj 369 0 obj << /Font << /F8 210 0 R /F20 221 0 R /F11 368 0 R /F21 228 0 R /F18 207 0 R /F17 216 0 R >> /ProcSet [ /PDF /Text ] >> endobj 384 0 obj << /Length 825 /Filter /FlateDecode >> stream xڭVn8}WRE.-ӶY2$wR8rv0 99sfI ?6aBP9et36 ! W'  .Β MBbBӈŌqEށԑķaEVQ,"3\⫿ <.g "\GZ]}1&9͵achY_l] "3>ҤxFdqCQ -moorJp÷`A%c<~Kp6C~| Y*mkĺRdDQ!>i- lfu f9-~(iK)syJ> !yLsl.KDQ9CnP@ 3cWIrssCeS55-A[(V)*G~WZ9t-ҽ m} sCs9s|w@~_r|O(d2z|~2A*e9&Fr 9W:w]6`?9B]5*t.+tE KCs2!ohO \V-0F󇻨_bmw<\ .ߕ"upl:)4OXvاA}.k6̕0T|HXJs*Š.rړ|>ٯA ~k Z;eKֿm !3)1MOBC8OQ_P{>}{,[pGg(53pLc.jendstream endobj 383 0 obj << /Type /Page /Contents 384 0 R /Resources 382 0 R /MediaBox [0 0 612 792] /Parent 329 0 R /Annots [ 386 0 R 387 0 R 388 0 R 389 0 R ] >> endobj 386 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [202.704 598.055 414.408 610.01] /Subtype/Link/A<> >> endobj 387 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [205.624 566.451 485.322 577.576] /Subtype/Link/A<> >> endobj 388 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [182.53 534.294 419.888 546.249] /Subtype/Link/A<> >> endobj 389 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [179.728 502.413 396.164 514.368] /Subtype/Link/A<> >> endobj 385 0 obj << /D [383 0 R /XYZ 133.768 692.105 null] >> endobj 46 0 obj << /D [383 0 R /XYZ 133.768 667.198 null] >> endobj 382 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F17 216 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 392 0 obj << /Length 2332 /Filter /FlateDecode >> stream xڝXKs6ϯ-T!"{qLʣ$i#뷿nI3, 4uƧ?uqrfw|2,:$kS/JR0}yJnߋc}ybMCvWrvu7 s譓0a%*dzӯB!9ɇ]_RS|rz=ʍ] y'>?~~a蔝fa;h*wY_6Fo%J]Sw};ti/dVAVyϬ9}[k(Qx ͑־sl9UFf OCQ ɉ| ;3e %071 <"P},jH29 wq7[\LY:ŏ V7mXSb7js{M\}2XHBeOD7f[CުR53:^7+b$P;kЏ'$]r6(H/, 5KJ _]WN&13)d0l,i_;īXX)űEP%0լEБvhP&8P9/b2&mh ա:wz{2BaAU]Mz״'eNC}jpF!(9/*!B%]_qgXr&a,Uen^q;oh|ѻ$; [;7-Z@-kċF9C=4J [mnExKo@1~_F^BWpוRʹ"]W2CH9#4&S SFڹtb$*(Fˎ}2#c1/^[s|B$ ԘJl_Zr@͘V PdHUJAJ=Em8 ]gה2]#`v8/5 ̲}.-,}C) @3)/lҜd7 Y0ŠglWP4\IorN= of௔o܉& =sdE7,gU,޻?Y3g9׻rrJ͛VJ?P> #u@f"O]yiMb/L6D -&r\&\+VX :=+Oc g)_.iM604}f=q4r\D֪alSxi(ȥ=#P*'.o?PwQ-.h.(]k~j~ɱ8N XgV'Si*AL]^. 7MŽ zAHkgSd-͕0JqgquC _X sFoQZ;cxl+;: cT"Ihpؗ^v#IŠz,fHǚܧT۪o=+%b{\`^- tDtVKVG+G#:8!xUUoO^S|e`ɟ[R@|F2sY?UY#!y~'\MBr 4$:.uJB#"b*K@ԉHfml _=C/EvJ0GM?k(4kJMVx  am?&U!"ʴ@lիHquLe9a2IT%6Sa0 : z,6(dy-ˈi^M?%Ī4_`fsi'tITike\ J9"V'Vz*4YE[zpTg `L- /ƈhdDyQ^v6rRS? Nj8dO1Mk|SEP'l^u^s[U6 sgI/pR/ rpw2g_=—*t0[9h{`{õ$^BИ0hF9,˲ q4΋"/;Sw?t?hm5T.W4ayTa+sp fmcƏtu7vk%sfzic-cl^x܎R_C7 ߻"u]ű#y~E/M՚}tVendstream endobj 391 0 obj << /Type /Page /Contents 392 0 R /Resources 390 0 R /MediaBox [0 0 612 792] /Parent 394 0 R >> endobj 393 0 obj << /D [391 0 R /XYZ 133.768 692.105 null] >> endobj 50 0 obj << /D [391 0 R /XYZ 133.768 667.198 null] >> endobj 54 0 obj << /D [391 0 R /XYZ 133.768 320.484 null] >> endobj 390 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F11 368 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 397 0 obj << /Length 3079 /Filter /FlateDecode >> stream xڝvF]_0h4 6%ֱdЀf8b_~\fٻꦻ{]ϵUk׻3|[?i4=O&V!+:Uwzw>--9N8v} ~8quP2xKE0kx.a糫Q@OSKQ.-%%u!5Y6KOϟsg֍yORϓ o{ ѕ2,[ I^C".|aDHDO{"ۡVeHܠلNہVhbrW]: ".M}^6,qGV|Ɯc"V;r=Вo* tUd-XZl0xCNL$k5Vj8%pY9=?Ϥ+tH;&ks6DL9PvV N2RD1a[- pŘ%u9J(")4m޲U'bYnIjj>yg,)IЮ{`Z YaQ! εvTBr7^[i;_߾|}u] 9XYYEr0ԍv}X;qUel"K>9iVe#/kt?@큪A"=}Bz5B1iFtt3(f-02Kʃ5+xM<<㼣aWD[CR?~6\Gs"ݵ׎68XC@ 㛟~ۻ7W ^}]*Fζڑ|[BV<['EaKWO* p`Q(lZ{s(/@ky-)SvIo5v +A>5Ն\NT2(PoF7[a?I;>~@!H^/S6pd!{7v#㦄FqR@&&SzMg<֥YOiyBfyaj`P*y#!UQ`CꦨR e1.iڏUy|J|Hs"4* &9f$&$8MWw78b:9XiaPIdˊtSr e,0mv`bOHa>jeЁIBZYpdó–J^N:{Sk!r}\//3t{౮x5)ʘ4mvMc >~̻-s脥4֕=a嬃8Ŕj li@Ea8шY3RJcC{Ie Nh: I,mpd%XacsQpPPyhN¤㤮3A:vq_P9=L\!d᥅ͤ>D,oZGŦRҎIE TV~|wCp ^BB%륙N):+HcT,{u=$ .S7%(91cF)KurHF5~UO]fN`ɛ&YEa$L !?Νͼ _c\pHFPKנLA[d7I;}-tdžPFb&qel#N""+d'O(O|d (iB8sȣ15LVMgʍ{/]bR%ϭ**IRR)x5//x^e8)/&[mɱF<"yJv%CAF,X.f Wi'eE_/X0 RVw.v*/ɃۡeA+SnSdY1"\Q&BfQc DMRHJ.ȕ l{\+N 8q]Q P{@@p{%uRz/P'WQ.9[g+dُQn߁s+vdV sd ȰPgpFx%ŸIÛj8"cS<:϶G>'>6sRr K^`C- |(I?ھPT?~偲{T&ڨ FܯcjO2TeÃvy=p> {|8礣jڌfj G.ƾh&: U27YCn8endstream endobj 396 0 obj << /Type /Page /Contents 397 0 R /Resources 395 0 R /MediaBox [0 0 612 792] /Parent 394 0 R >> endobj 398 0 obj << /D [396 0 R /XYZ 133.768 692.105 null] >> endobj 58 0 obj << /D [396 0 R /XYZ 133.768 488.259 null] >> endobj 62 0 obj << /D [396 0 R /XYZ 133.768 251.368 null] >> endobj 395 0 obj << /Font << /F17 216 0 R /F20 221 0 R /F8 210 0 R /F21 228 0 R /F18 207 0 R >> /ProcSet [ /PDF /Text ] >> endobj 401 0 obj << /Length 1950 /Filter /FlateDecode >> stream xY[o6~ϯ0 )Q6C5Cn{m9"[,K΅ŒÀd(jI߹}3ə Gf%JH_ֻ v ]_H;$aįEg(L#[^xY"(-4p~y(fPݡ9Btk EhBIȘd,o"seʳ#7tx^vH:p GhDJZ8zK{|ϣawQ]ֶ.v-QzQO8d-d(0'MGt4XTz_cX"A ҁp }ʆyFMd_d<Hc2:T+`@pwSRz4Q!!JخKDd hcs]E/PRLVhZr0WljxBMۉa;5Z:ѭ~;Gj^q x]A MH4L?<*FXcS`N=D $t#_笋yD$GǠ@D&WPH~Oo_ [ xZ2+gvt@a:@\?(2;~x6F}~~ wqAݷhm(@UC \&"%PA8wC3lcp(u*OPS~ A*XW1i:64+oӌtSlO;֯!DBp#F)Li뫷^x):;m0عC?c0arFnxBCH}a0mT@4Ӳrʼnw${)L"TH:r` yq}-T,o%:5+6 . T|63?{D 0P`/aUN nfȎwV"Baq!w<7"gal{rq3aYⰚcǪU6(cb'cI$VӚQb%0LQ&:)獠h $;}?U;3?!,5,la}QB!NQD& As;n;:.m$,GgБ">Q܏~v"sk+.xUnO|h:|ehumaEѮ%ǞJS}?ԡPQh]t=7IA(  H(q= R-Pqa(=/C8"_vUj Q5V&zߘKAcgRFun7ZLqT:AegJ֚,B+JI8}6GGxS]DmN]&3a=sl}'tF ե +` R%}E;(xS(i.?_^B~/~NcPJ,ؚ1 6TpWr;hإCdiE~K@9ڪ;BR&Љ։ȑooO0EƆVKA-+Wv*n51 `Uf#rURᇰ[o ~a?b"b­.^qͧ<TC)pE'?K 7?|ۿ([,6`L-GH2>`E 20)̙kǎh5o~{{9#o|.X"y.zj_5&o#Һ @݅M;J!p+:d]M x/p){ VnPihtnCPqb)n7+T?OCl ԭ)fĺC5cx*Z0- Q endstream endobj 400 0 obj << /Type /Page /Contents 401 0 R /Resources 399 0 R /MediaBox [0 0 612 792] /Parent 394 0 R >> endobj 402 0 obj << /D [400 0 R /XYZ 133.768 692.105 null] >> endobj 66 0 obj << /D [400 0 R /XYZ 133.768 224.919 null] >> endobj 399 0 obj << /Font << /F20 221 0 R /F8 210 0 R /F14 243 0 R /F17 216 0 R /F21 228 0 R /F18 207 0 R >> /ProcSet [ /PDF /Text ] >> endobj 405 0 obj << /Length 3259 /Filter /FlateDecode >> stream xڥksꙌ/gAueKlkl8I ew_ u; }̃LiFa|&l{m`%(·ɹG'?TRngwkB[hwl8w858Y6(pv_gIU8!Bwی1|գ e?i D8to ~eq[iLd[|N6!>Gr`[ҥ,>\ FCSD*e6VBHQ=a2Ԥ. L{P5(#MlDa|)eg3Ȓ1]8jح34=Ǎyø7p>諡wǝrGOQcvn_d]v7qEՐ 2 ܐ\MǦuF*_,SD\:9s=p;2bi-` /IEE^ԯYJQD1U H-~shS:is{nd9AW}t!ȷ}D9o ZQ~,쥈o#tLWA,NdpփhH|:@j+pBԦK%ޘT1S2v.<.x{*v$quԅels[rX}fd<;Y!hyW6M@5&%P !n*GV^#iڳ\Z2j`J iT;ZN%RFe0#3"W S3vJ#ePq#35]qh/\Dg"Amӱ.*і X>'K 5 =OPkH-X[Ӱ ?EaA 'K-!Ix,dPWQE(NǹVWU#bm|a]HG'&6nȪ(VEӬd d_ WE@rxKx`odBZqHlD'bd01('j>x~ ջ _1!fRe>fb'$> i2TI|n߷9"r oFe/s ,]5n(iS#e<W4XCިh ϊ$]kۆwJt W:#ICnOeU",ڬ.۔WV8g8 GxRaʉGƿ(qod>W}&2'B?Ik*yRh[%CT 2_|o7>M7೾{ӱQt4Tc+)!ӡ|g˼םHuk@8E7UtR"oAS8JU  F9P0"L|DB냺[I5{xw]uvVIAY&62"|BcΠr'jwZK TKZmDzyxYP~hp2:_h#c JJldK^l6cVcF<Bpϳ` lpSeT!w|^,yeaT\e}KY>0N$ `![Y"`'?q-&E&Znhg2Pfr%h"N;+ (K7d R\9=vC:9#}1&ْP7(K4q=*}H_7 ^϶Gc\HuOWC1vN軮\GݸbNPAB}_Rb `A='4J˴RY(1K? UM&2S?Q!~ c*e:Xiendstream endobj 404 0 obj << /Type /Page /Contents 405 0 R /Resources 403 0 R /MediaBox [0 0 612 792] /Parent 394 0 R /Annots [ 407 0 R 408 0 R 409 0 R 410 0 R ] >> endobj 407 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [233.405 401.629 276.383 412.477] /Subtype/Link/A<> >> endobj 408 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [296.389 401.629 336.876 412.477] /Subtype/Link/A<> >> endobj 409 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [407.551 115.766 478.476 127.721] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 410 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 88.369 478.476 96.782] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 406 0 obj << /D [404 0 R /XYZ 133.768 692.105 null] >> endobj 70 0 obj << /D [404 0 R /XYZ 133.768 667.198 null] >> endobj 74 0 obj << /D [404 0 R /XYZ 133.768 328.98 null] >> endobj 403 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 414 0 obj << /Length 1728 /Filter /FlateDecode >> stream xڝn6=_IfF$uݞ!鲥]zuBeI%n;Rcsx7J.<ɅZDa%,݅(Bķ3BHBXjSR:E_ G&I $9fģ}qCT6jZn)mY!&2 7lA<:k3(R$A@Oz/iB |ܫ.嵒HRPD:i%ufE%0QXI ejvI5MrHOo%Һ_6c2Uh9= }C(divO4с+t~g`+w;2n8q3ݡ)ht9(=cdxh۰j+ksWGZF$=2zs⬵ /Pf")<o ]7;me57  abH +RE"U 8&/R-yՠ`<(yK@mY;C;'Ƽ6Vהw+8^5<g6^z1,Al٥ K,=/֐|PJU~KXB^B8$'ev#@GrRM*SB%QciY;Pjx6C׈ְ-=Ú{>+Gʶ/Yq` ATQLKVg6E2C"2~(籞VS΀vy6Ŕ͞2c4X K7c2.'(3SVeQ8.}_9cR3݀il*)1RN Eؐ@?R*ąw.Z| ~'-~e]ظyw}s{+юOOU~*R,i[+1PB6CrIlBޗg؀PT6*GQd'sИw~@"tv\sƀz"> endobj 415 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 691.108 478.476 693.101] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 417 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 653.748 177.161 665.704] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 418 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [181.411 653.748 203.329 665.704] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 419 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [443.219 653.748 478.476 665.704] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 420 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 641.793 195.811 653.748] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 421 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [199.185 641.793 221.103 653.748] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 422 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [224.477 641.793 290.475 653.748] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 423 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [293.849 641.793 315.767 653.748] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 424 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [197.932 629.838 304.267 641.793] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 425 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [308.548 629.838 330.466 641.793] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 426 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [218.202 428.143 356.183 440.098] /Subtype/Link/A<> >> endobj 416 0 obj << /D [413 0 R /XYZ 133.768 692.105 null] >> endobj 78 0 obj << /D [413 0 R /XYZ 133.768 605.492 null] >> endobj 412 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F18 207 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 432 0 obj << /Length 2643 /Filter /FlateDecode >> stream xڕko{~a0X.~)w64&)E*|kIdݙyJ_/1* 0vl̽gZH$g ȵŮ NwϞ Uah.6D|yKj]M:?wgb_Eqk?Qi?rleilz^_$*;bP߶@Z s\y j:e(jkMD){jfS0I Y K5@1vAX,my6 cϘǾ'GFɊ:ά@;"6PFƯ t*^{"3vˎ, ~'X9 |86E{E @.3֐o{b&{t\A)SF N?[j tȑSS 1[2}K?L_=Fg9Q7J[0 Wsb)eCurϤl^7!&5ެy ) O.l,~P Ɲ48*[_!WLi8/|pC1H-X:l, Kj5P;uPF{xtleM6kmNb ,=2 PgP3D egBy[>ѾJ|L40F# *J[_VCyNk:2|)ȃMl,֌:>Drk! 4 \.ڢP)Fr沶FC<ס=B$m-48sd:-=v)rʈY`[xO'f7e5&TD \GcNtMJE-FX0 B/FH+6|* ̖$2jєd@ sooڼhg_iߚ68v{r9+r %yѕgy96mwdb7=V<^q=zؽv|G?;kɗZ@{PP2ATft0|WH;Fx`Cܯo*sAp?8~ )B +_b%wKplPҺ">ߠ2޽g7a>Re :q]9d]ж-҃ yU;خ~O6u?oMS5#*Ui&8N}5;^ȏ)>..8D D&Bրޯ178x;x̀ l?> zy 4uwɮ@o|]7 v]|rHݫ%膌GZIm'oE3tqݡJm-!RPOg$pa7`i%VV 'S>5zA{:56λÔmu\h,UŲN_2O~txC{yJ)-Hi/|8$2&~9DžhpСOo(AUPC9dӳG(_'5d8 KUBFG.=endstream endobj 431 0 obj << /Type /Page /Contents 432 0 R /Resources 430 0 R /MediaBox [0 0 612 792] /Parent 394 0 R /Annots [ 434 0 R 435 0 R 436 0 R ] >> endobj 434 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.631 178.807 426.371 189.932] /Subtype/Link/A<> >> endobj 435 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [371.876 118.755 478.476 130.71] /Subtype/Link/A<> >> endobj 436 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 88.369 478.476 96.782] /Subtype/Link/A<> >> endobj 433 0 obj << /D [431 0 R /XYZ 133.768 692.105 null] >> endobj 82 0 obj << /D [431 0 R /XYZ 133.768 667.198 null] >> endobj 430 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 439 0 obj << /Length 459 /Filter /FlateDecode >> stream xuSn0+t$DIZ)P*=0m -q );@43oyADL@1 * }[%IEN(\gXWq> endobj 440 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 691.108 478.476 693.101] /Subtype/Link/A<> >> endobj 442 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 653.748 286.444 665.704] /Subtype/Link/A<> >> endobj 443 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [418.949 630.115 478.476 641.24] /Subtype/Link/A<> >> endobj 444 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 618.16 208.488 628.454] /Subtype/Link/A<> >> endobj 441 0 obj << /D [438 0 R /XYZ 133.768 692.105 null] >> endobj 437 0 obj << /Font << /F20 221 0 R /F8 210 0 R >> /ProcSet [ /PDF /Text ] >> endobj 448 0 obj << /Length 2268 /Filter /FlateDecode >> stream xYKsFWp}k03l^"'{ K2Zv~cGiULTS T# Sid:\ON'* $ F\L!C,&/QapLWDXo\%E=t;&s,mJ,ؤ¿ix+6r=@{N>`K5Sj%>nXTf"kJ07.8KtHu `W_>]K ,xGo/ 5KFm ~bۛb ]{toNYtnUV뢵F T Jc bvM. #/=SORHhO6;fцB e7r;(!H3.D Vf9?eKa/.2z2COA=2 s )8'I{RyCw]|Iw&UYMz]u./y宭pot  "Rk:Ҙ_s1dj'A oYof$U[# _ g+AaaxiI1~>o@HQ=%T"\GU:䶼X R@صoMí݋SQb56>g* +|b j3AX0~ \j3ްQM+~<#, q_߆j* ݃Oɘ:.|$QS@ءsB! 0:_w[G!G~YRh;83tKXO$!bhoxʄ"+϶^%=xC}9'/´'Xq4zMN9,KË1^.R]J=.ԌK;uT{B81F"[v ՘M_¦ŘM&Ql2j(vlKq/43kjQ@,p, yW;M@ܥgөӴhhtPqo8|$k)pj`lŶd4#=A\a;KOSH-~C79A'ZowT6}:k_*g. ?>u0XsPr[ɲ+~[)Y;7woNxj "CӁh D3<R#RrP܃b-~x/^O:}f`rYA堯>?V-u{dw?O<`D$|4B?*h.!&Ї?=z0mLpCx.pdbߘN?EB! ''nСVB0տ\OO~UN9nYu={jvS 'kTOc,\-bmt @(/͛G nʡ$_> endobj 456 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [167.057 279.975 226.912 291.93] /Subtype /Link /A << /S /GoTo /D (cite.lanave1984) >> >> endobj 457 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [231.806 279.975 253.724 291.93] /Subtype /Link /A << /S /GoTo /D (cite.lanave1984) >> >> endobj 458 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [258.619 279.975 289.697 291.93] /Subtype /Link /A << /S /GoTo /D (cite.tavare1986) >> >> endobj 459 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [294.592 279.975 316.51 291.93] /Subtype /Link /A << /S /GoTo /D (cite.tavare1986) >> >> endobj 460 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [321.405 279.975 394.571 291.93] /Subtype /Link /A << /S /GoTo /D (cite.rodriguez1990) >> >> endobj 461 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [399.466 279.975 421.384 291.93] /Subtype /Link /A << /S /GoTo /D (cite.rodriguez1990) >> >> endobj 462 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [269.288 208.244 342.431 220.199] /Subtype /Link /A << /S /GoTo /D (cite.tamura1993) >> >> endobj 463 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [347.633 208.244 369.551 220.199] /Subtype /Link /A << /S /GoTo /D (cite.tamura1993) >> >> endobj 449 0 obj << /D [447 0 R /XYZ 133.768 692.105 null] >> endobj 86 0 obj << /D [447 0 R /XYZ 133.768 667.198 null] >> endobj 90 0 obj << /D [447 0 R /XYZ 133.768 434.279 null] >> endobj 446 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F11 368 0 R /F10 452 0 R /F1 455 0 R /F14 243 0 R /F21 228 0 R /F7 466 0 R >> /ProcSet [ /PDF /Text ] >> endobj 473 0 obj << /Length 3308 /Filter /FlateDecode >> stream xZݓ۶_q}fN4 iI4&4}I %^H*wRGNf:9X,Kԕ2&mqeK$%W{·F\H篋2.OIT[UVj7_k5TTaΒ,)'Kk[ j&ReV*^Km`$3&tPlwUǕz䲆Py ձ O@'$>yeyV*.XyBҀ)> 0jh׹_}7zz< S=KEMLrLr*kH/yflbe]d:Lv=3[ǻ]wׇ 2zf+DžJ$s;n`Qc莖F|#L$NŸ[etG]Pњy#‰Q \0_6zLqpwfqQ}MHg,ڳmzlyA!+Yg9V8bB+e3sP49i Z_8?B{׻7lyrA, S 18Tu] ,H呛4яa] !{M[~A5S&(ymOHL'.dr3XX 9h-y|C7n4NUE-FwōɁSwWckgo=:J{W{,$~^o/K1;DiӸv"Xky/a丩9p ɪ#k @B+ʭ^JhJQZ~IB+LP0Q φ|C#ӄz&Bv6WOwP-E',w#0~[P%BbBfe :] Y WVD=rp0ڛߦ=e{ٱ,摂.`I0ڠE`,M,ARw1TĂx/l|7lT[,i)ibo}c陂 :. pQB\ٸS¢ā[My0ͮFOu-lyg3xK;ra ;=y:9)$}@(pRlD^` mX=-t6[J\o1 mlzn 6kXps#J4N<=݇Q"c}cv+A >$@AK_ĉɟ~C2\D67x}kW;&:̮! uld+^=) "YAGr2@']m; :)뀿m#vg/-E__~5][zLҜ8z*L>81MRU5<:8o]Wߺy$JdezFNJwi pb ȺMQC~A$k Rܞr pSRDdE)6+\#wl0aͭd~z(>OG53OڗNx,dP &M%> .؏POz A(Vt1#୨vr+7=Pc49j=0FW7F ~ /?iA^`e"h/iidwp4|LiK>:ΌhyB8!U&?ې7q"UŶ2U#pU`!,,j^c{fG(gz!~W"ꇎ@~(KE-ϣ( K=0'Ug44 pۄgk2BjT{'Fi8QI;Peߠ"`A~@?6L!WG#_n$$An߫JRhyTE˭kVPXd=/ҺǍ 69("|.-rw^FcYuI >%@O۷8+~` \_by&8NAuKGH 1=E:hr׭wh׮薰ZeQU]Swn<7^95d@;o]%:$ .T吀P%s: 50-Aπ(W׻9 ab\@pNXi.[dT]('Iwd]~43 nUݭUmIu%"tyWHr 5j:R#_Ң&YEncn%QJMe/COeClF֤x :W*' Wf;f}ɢϫe]iDpHӹj?،~?#;q^ ?exʔ\eG‹$%: HG`;?hO/a̧h[b>DKY㸍Z*Ĺ e7te@?O du&I?#/cR1 'ONa5‰.g.K c*NZlj*&`^;B +8^Rz uŏׅea"lEX=kBڀ`\FYyv'"(ѥ{AWGK`v$_EF2ӥ2*iƞJ?v'8endstream endobj 472 0 obj << /Type /Page /Contents 473 0 R /Resources 471 0 R /MediaBox [0 0 612 792] /Parent 445 0 R /Annots [ 475 0 R 476 0 R 477 0 R 478 0 R 479 0 R 480 0 R 481 0 R 482 0 R 483 0 R 484 0 R 485 0 R 486 0 R 487 0 R 488 0 R 489 0 R 490 0 R 491 0 R 492 0 R 493 0 R 494 0 R 495 0 R ] >> endobj 475 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [136.646 653.748 209.563 665.704] /Subtype /Link /A << /S /GoTo /D (cite.hasegawa1985) >> >> endobj 476 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [215.251 653.748 237.169 665.704] /Subtype /Link /A << /S /GoTo /D (cite.hasegawa1985) >> >> endobj 477 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [292.581 498.331 341.869 510.286] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1984) >> >> endobj 478 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [346.875 498.331 368.793 510.286] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1984) >> >> endobj 479 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [342.981 450.511 405.141 462.466] /Subtype /Link /A << /S /GoTo /D (cite.dayhoff1978) >> >> endobj 480 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [409.651 450.511 431.569 462.466] /Subtype /Link /A << /S /GoTo /D (cite.dayhoff1978) >> >> endobj 481 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [136.646 438.555 189.056 450.511] /Subtype /Link /A << /S /GoTo /D (cite.jones1992) >> >> endobj 482 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [193.648 438.555 215.565 450.511] /Subtype /Link /A << /S /GoTo /D (cite.jones1992) >> >> endobj 483 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [253.191 426.6 350.788 438.555] /Subtype /Link /A << /S /GoTo /D (cite.adachi1996) >> >> endobj 484 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [354.921 426.6 376.838 438.555] /Subtype /Link /A << /S /GoTo /D (cite.adachi1996) >> >> endobj 485 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [214.57 378.78 313.236 390.735] /Subtype /Link /A << /S /GoTo /D (cite.whelan2001) >> >> endobj 486 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [317.619 378.78 339.537 390.735] /Subtype /Link /A << /S /GoTo /D (cite.whelan2001) >> >> endobj 487 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [265.026 319.004 353.417 330.959] /Subtype /Link /A << /S /GoTo /D (cite.mueller2000) >> >> endobj 488 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [357.513 319.004 379.431 330.959] /Subtype /Link /A << /S /GoTo /D (cite.mueller2000) >> >> endobj 489 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [155.241 295.093 250.822 307.049] /Subtype /Link /A << /S /GoTo /D (cite.henikoff1992) >> >> endobj 490 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [254.389 295.093 276.307 307.049] /Subtype /Link /A << /S /GoTo /D (cite.henikoff1992) >> >> endobj 491 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [415.307 259.228 478.476 271.183] /Subtype /Link /A << /S /GoTo /D (cite.schoeniger1994) >> >> endobj 492 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 247.273 189.553 259.228] /Subtype /Link /A << /S /GoTo /D (cite.schoeniger1994) >> >> endobj 493 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [193.283 247.273 215.201 259.228] /Subtype /Link /A << /S /GoTo /D (cite.schoeniger1994) >> >> endobj 494 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [324.894 167.212 374.182 179.167] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1981) >> >> endobj 495 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [378.081 167.212 399.999 179.167] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1981) >> >> endobj 474 0 obj << /D [472 0 R /XYZ 133.768 692.105 null] >> endobj 471 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F11 368 0 R /F10 452 0 R /F1 455 0 R /F14 243 0 R >> /ProcSet [ /PDF /Text ] >> endobj 508 0 obj << /Length 1558 /Filter /FlateDecode >> stream xڅXK6W=h)@{hf=-́Bmˑ$;aK @y|3*O%Qe{-tl=T1D>-lf.,DYo՛LD7kuv:32W`υKGkӿCW?j'!SUwkӗ7o 'JZmQsT@ 3ƧNi}5vz tU[=x~^< hΥxg8F#8(%sHUi rLǐQ_ޢDWY k%^cGxѴހ eWzko,|.-鳪|d5Ჿb}8!Y^ֳ{jî[" 1O3R?'eLȝñ>qf!]/[+È<[0A$'3apBdJH%,ėVǥ%L[f2} mf<{u,B5k)9bL)/X-]j $o]s>)^FE7*$(D^x[XKj#*Q'э?M7(Gvk]@'u9h;SD1@ We{btdC!Z;ig.>n)3yos iӞŶxdzƉu_be1'HbS0d+C)#Y@J+~0.C(su2ǀ9.GjlZ ɀ*H1ahBm+ӓ+K(]WF!-M. _L~010Hw .eaxh}]K! _F?Χ'>;MD/,te:*`ߟk iiNzڞ!'W^L鲺n`e`cPH|Up`~/rȋr>8f_#endstream endobj 507 0 obj << /Type /Page /Contents 508 0 R /Resources 506 0 R /MediaBox [0 0 612 792] /Parent 445 0 R /Annots [ 510 0 R 511 0 R ] >> endobj 510 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [436.281 446.411 478.476 458.367] /Subtype /Link /A << /S /GoTo /D (cite.gu1995) >> >> endobj 511 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [136.646 430.174 158.564 447.408] /Subtype /Link /A << /S /GoTo /D (cite.gu1995) >> >> endobj 509 0 obj << /D [507 0 R /XYZ 133.768 692.105 null] >> endobj 94 0 obj << /D [507 0 R /XYZ 133.768 667.198 null] >> endobj 506 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F11 368 0 R /F10 452 0 R /F14 243 0 R /F21 228 0 R /F7 466 0 R >> /ProcSet [ /PDF /Text ] >> endobj 516 0 obj << /Length 2473 /Filter /FlateDecode >> stream xڵXIW k!mfb' =|qCDIIQ&}RU" Z^-o^U ?Z TBj׾JWG+I;0i)DV+<׫큈%?e\odR덶ya SBZ*a-Wͳk3oSJQ7ި"KkU$WXѮMaMp;םa|(/~eO8Txewof_I.nc%~7<#oȏr;6vWt]ː"8fNi:S}> i6V4,\ gH%uiw]Ewxa쯻/ҝyi ȝr{hW?wpϞ@ W!ʋ][SRMc ;߆{t^zf{KF|D{)[Sf= T}4(cJ8mGV Jdy9p%XH_۱`aub`*{w -SPyII߁ױ)`ݖs+ db ;.7f3~:ՔoNL@0R$8L6@G&\gKzl' `bAV6^epJEZiء)RQ@$J|t_@Zs&͓GY)C:kOnOY">jJWNA2#2-rSN7TkW+ 0# X<~BP#m&JG=3~HˁD@sg*3>0&f![`Ӣ@u[Bd-4gVMٱg\nrvc=Md_m0K;V =z sdkB&tǢB[?/T SՐ2R[x84NlBFF1 m}(AGȈl13Bܚ ,hq]s/ [ERIwjBMf ) 5_ A#^H3MEp! ȰH|$GO8M'Td% *ڃwʅgoGvUĕ|1Ǝ1}R3fSs׏ m脭8^ rY6ƷM, JAɚML.0F9' a"|'thh)6 tJ0 ;PTט§e47G&b0Sj|@3wM lg!9#ΝNSlCZFřrpDALcuH$ &s~{i}_5é78Y.+4͙J#uv=.d!s8@M0Mիdz^6Wl/ Yi'E r^ˆ\-(G0O>ҁk:B]y^1&,ѷE'{z؇`'KxYj(Dl|ʸF,zF}2[U . qQ|hxv&jr^e|Qȇw 0}o z!i0p nÆ@yP_=\`Ya,9]9H] :83%qqz܅sM<8 )+gELɏ1"p{oY'n0}BI7(xEcx /_aE+Egp}%~JPihl60ZWoTP8,Ysz9=̼f endstream endobj 515 0 obj << /Type /Page /Contents 516 0 R /Resources 514 0 R /MediaBox [0 0 612 792] /Parent 445 0 R /Annots [ 518 0 R 519 0 R 520 0 R 521 0 R 522 0 R 523 0 R 524 0 R 525 0 R ] >> endobj 518 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [357.825 399.286 478.476 410.134] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 519 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [136.646 386.777 158.564 398.733] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 520 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [297.246 305.084 311.968 317.039] /Subtype /Link /A << /S /GoTo /D (figure.6.1) >> >> endobj 521 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [375.197 281.173 443.673 293.129] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 522 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [447.769 281.173 469.687 293.129] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 523 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [416.26 225.936 478.476 236.784] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 524 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.679 213.427 213.812 225.383] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 525 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [218 213.427 239.918 225.383] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 517 0 obj << /D [515 0 R /XYZ 133.768 692.105 null] >> endobj 98 0 obj << /D [515 0 R /XYZ 133.768 667.198 null] >> endobj 102 0 obj << /D [515 0 R /XYZ 133.768 451.991 null] >> endobj 514 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F17 216 0 R /F11 368 0 R /F1 455 0 R /F10 452 0 R /F7 466 0 R /F14 243 0 R >> /ProcSet [ /PDF /Text ] >> endobj 534 0 obj << /Length 2134 /Filter /FlateDecode >> stream xڝnF-`VVYg0=H9@KDeG*20^zErHE겍˕욻dsI Hܭ4VFI2N!i+cӧ|G7?wm~pwe6M.r7OܕXk9!Ƙatb"gw]ٷVe%=BU4t4mҨcU <@cc>~PF7?x,%d E*|`JP#r %eW,S!0t"IG;TiZc'S;}Ql"ohb=[P6g׭j8DSˆd7+O>n;x!"!ٶcRx'|)4L((kuF7X8)=୧1BY쐧dJw+>-r97FL̷1!3KB㲨W$۱~ێ o$(ޒaS 6vy}_L ,3PLrsyE!1H"sJ W:SP K~\7_uQW=T ZWj2V*;4݊@&I=7:J[y] 7K6MqFk H8NAN5630}ȁ[ پu&LGnH5—dȨ,-U}i0O/m'TGbN ֕KL*wun_bɸxNOEI~P:7(2zT-.DW* 죸:KxHH ^+zf+.6'= ^)**7JAw5IxC$W'ctE,(> 7co@ۢ[^=rÛCGgfOe,eK}QeE ~/ tv;PƝPF zJSϥrFe] ISeBmsfkH!yB*T+zMah134}\V> 6cfvKjZ?ScPnCL@I/r_%RK!R4z g%Cp)vŧELz;YI3KExm繇*0zK%[#x-$cOt1 w\!yJӌ6&<-*(I\}pQ0 哎Ms&l>:n325 hy2D7H-@W%X +d+9ql7(ܖY\R;*<쥠틡BRφ0%} `s(!:0z> Yt ~bcG!Sa+uܷ25"ԍ>@'6V i:dj8orB;3N:};4)[F^ \*E)A, *ZK& چ!c R8D0\ȈJ[j~#ͻfG%]4)p kybz9>+[q@I_򕑰ï}ca҃-"&snǑDi>#3( t{> endobj 513 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./fig/quart-topo.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 559 0 R /Matrix [1 0 0 1 0 0] /BBox [0 0 400 104] /Resources << /ProcSet [ /PDF /Text ] /ExtGState << /R4 560 0 R >>/Font << /R10 561 0 R >> >> /Length 562 0 R /Filter /FlateDecode >> stream xWrF +&.X JΜ?X_u T ."ĥ@4| rL;TXB (qb>r| 5-cl%~ךfy Q2]3g}!wC;᪤ƣc Ww}g^CIAE^UIG/c",C >\;:c) ƚw(PƼp1cC{h Y3  ̠ԁhFA<ΐd u۝ɍ:qPmijRAi[t#k5+#i\3APmo endstream endobj 559 0 obj << /Producer (ESP Ghostscript 7.05) >> endobj 560 0 obj << /Type /ExtGState /Name /R4 /TR /Identity /OPM 1 /SM 0.02 >> endobj 561 0 obj << /Subtype /Type1 /BaseFont /BZZSIO#2BHelvetica /Type /Font /Name /R10 /FontDescriptor 563 0 R /FirstChar 32 /LastChar 251 /Widths [ 278 278 355 556 556 889 667 221 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278 278 584 584 584 556 1015 667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667 611 722 667 944 667 667 611 278 278 278 469 556 222 556 556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 556 333 500 278 556 500 722 500 500 500 334 260 334 584 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 333 556 556 167 556 556 556 556 191 333 556 333 333 500 500 278 556 556 556 278 278 537 350 222 333 333 556 1000 1000 278 611 278 333 333 333 333 333 333 333 333 278 333 333 278 333 333 333 1000 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 278 1000 278 370 278 278 278 278 556 778 1000 365 278 278 278 278 278 889 278 278 278 278 278 278 222 611 944 611] >> endobj 562 0 obj 998 endobj 563 0 obj << /Type /FontDescriptor /FontName /BZZSIO#2BHelvetica /FontBBox [ -174 -285 1001 953] /Flags 32 /Ascent 953 /CapHeight 741 /Descent -285 /ItalicAngle 0 /StemV 104 /MissingWidth 278 /XHeight 539 /CharSet (/A/B/C/D/bar) /FontFile3 564 0 R >> endobj 564 0 obj << /Subtype /Type1C /Filter /FlateDecode /Length 565 0 R >> stream xkh\E6ٻKF۰HFJ`/EIdl6+[oTh}`XPDl}` jR4,*7)~3gԸ)oT1;mASGBQ([~}wcޥGV) Ү}흝]StinzzzDWa4g'1l$1B0$8K SAk0ƃ"fAu:iY붕^5SDuBvkR3 \$LYqm_7}/5j3t:с==I\F}Y?3c`ר0'pg7DEH]0 mvȤL<.Zh} Ku3Op>-H91V/>Ty']<݀=Eendstream endobj 565 0 obj 846 endobj 529 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./fig/simplex.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 566 0 R /Matrix [1 0 0 1 0 0] /BBox [0 0 655 276] /Resources << /ProcSet [ /PDF /Text ] /Font << /R7 567 0 R /R6 568 0 R >> >> /Length 569 0 R /Filter /FlateDecode >> stream xXKo]5_e݃=~/ !$Ħm$ UlfƯsӴI Ps=o}ݜ~srbrǓrbD %WuNѻ- ^ w鏓3 (؛c/,QتקEV·c32Bw6vP Iv*atXt@3ڣjdK<5/gbJ)d\ B](Q\ Ta9V*_(=<YRP-G1>-r5qfDaGYyNx7GȲN1Ǿf& 2>e<:1,g"X{iz7_}oI3oDlA]~6މDexs`3 [ hMIirX9!xs[ |g5UCEw?\_%E?i*>f⁈8Ntiri'U=f"HԙS[Ps)j)ĄxZۣ_K('`]v@.9C T)r~VHxyu=.%g :,Z?M.+vJNV}P _jPH$D䤈@"‡4L{'>(|k} xrqB/΅';O.eͬ.:-oi,5]J9  (*BV~#.*Dj }^X ]ۙg]]vءH3iМF%99I:)K۔X8wͳhSّg%E :kA }!4g/e"'6N݀*Bu<.mƬhKrlG҂&":յ(儢'ވ ¢t5{ӭ(mj(}z8^aC_1{sec%>\R^Ia#ߵr2T97+;̜cؚ#[LEpaNzzW9W%ZLYTǒ+vOTChCP) d#ps¥eyϦDy|^҅2pPVs{рb[% V&E;mi-Cm4%Gxˈ\zP ɯG883A^?#ܺɖsi 7*p Q']Rn;[g)C?.|.PL*c_yܹ]hXj~*󋡖Y5*?PCF!m+endstream endobj 566 0 obj << /CreationDate (D:20021106140153) /Producer (GNU Ghostscript 5.50) >> endobj 567 0 obj << /Type /Font /Name /R7 /Subtype /Type1 /BaseFont /Times-Roman >> endobj 568 0 obj << /Type /Font /Name /R6 /Subtype /Type1 /BaseFont /Helvetica >> endobj 569 0 obj 1404 endobj 537 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.679 353.771 265.377 365.727] /Subtype /Link /A << /S /GoTo /D (cite.mcmorris1983) >> >> endobj 538 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [268.998 353.771 290.916 365.727] /Subtype /Link /A << /S /GoTo /D (cite.mcmorris1983) >> >> endobj 542 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [363.652 341.816 378.375 353.771] /Subtype /Link /A << /S /GoTo /D (section.6.4) >> >> endobj 543 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 295.988 254.551 307.943] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 544 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [260.063 295.988 281.98 307.943] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 545 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [290.337 295.988 359.406 307.943] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 546 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [364.917 295.988 386.835 307.943] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 547 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [440.784 295.988 478.476 307.943] /Subtype /Link /A << /S /GoTo /D (cite.schmidt2003) >> >> endobj 548 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 284.033 209.087 295.988] /Subtype /Link /A << /S /GoTo /D (cite.schmidt2003) >> >> endobj 549 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [214.188 284.033 236.106 295.988] /Subtype /Link /A << /S /GoTo /D (cite.schmidt2003) >> >> endobj 550 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [132.772 272.631 139.746 283.479] /Subtype /Link /A << /S /GoTo /D (chapter.7) >> >> endobj 551 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [143.842 272.631 150.816 283.479] /Subtype /Link /A << /S /GoTo /D (chapter.8) >> >> endobj 552 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [174.283 272.631 181.257 283.479] /Subtype /Link /A << /S /GoTo /D (chapter.9) >> >> endobj 553 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [344.972 217.311 415.713 229.266] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 554 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [422.096 217.311 444.014 229.266] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 555 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [243.852 181.445 258.574 193.401] /Subtype /Link /A << /S /GoTo /D (figure.6.2) >> >> endobj 556 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [326.372 169.49 446.171 181.445] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997a) >> >> endobj 557 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [449.916 169.49 471.834 181.445] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997a) >> >> endobj 558 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [460.986 145.58 475.708 157.535] /Subtype /Link /A << /S /GoTo /D (figure.6.3) >> >> endobj 535 0 obj << /D [533 0 R /XYZ 133.768 692.105 null] >> endobj 527 0 obj << /D [533 0 R /XYZ 195.177 603.615 null] >> endobj 536 0 obj << /D [533 0 R /XYZ 185.197 436.904 null] >> endobj 106 0 obj << /D [533 0 R /XYZ 133.768 258.614 null] >> endobj 532 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F11 368 0 R /F31 541 0 R /F20 221 0 R /F18 207 0 R /F1 455 0 R /F10 452 0 R /F7 466 0 R >> /XObject << /Im3 513 0 R /Im4 529 0 R >> /ProcSet [ /PDF /Text ] >> endobj 576 0 obj << /Length 2410 /Filter /FlateDecode >> stream xڕYK۸ϯ%TՈ&Y*^6Cq$!'>H4v\eFQ0ϊUVPEjoH?(a`QuqԍN2ʯDJu RW_VQ'fr /U4czTi1/0q7Z"5oo2,x}$_ݟ*&N #qIJ|ET4ezpQH5G qE5M;#~nZZ<er$wdi KL5?ۿW@4#vf}G?3Q!{f0s}x<0T B Q!'QdvWt\3tk]?/Z}i}Փ}gEy譂D'"`GRX"/~1 i#יi.wbanDgwsE?2K g$I-o:hSH#ك61h-i"?9~rfSaafȷՃŅWeepb7]Y5 WA mEP/h8F~)49D*;4V5U4e,ZD:i;2HC2(^>Mގ7,]ZڑQ)i00.Kv*ZT$RYۥ (Ca?YF7= 2h"~#ő2y<4Y]Ӽd=P"pagrLF!b%7%I9΀:,!GcDl${Iݏ+ÄG4!+fhq*i5Bl5O`pB1,oS@?M5ϑлAld-)Z*ӛtl oM'9Ux ZN=Rx2o{np'zpE9I^\%l-*RHUݓ"TȟF6[*L ,C+ p^&wdl3Ué|}|y9Vnkyb9AvJkEc蟨}̽ra9P ׍VN~=@e f'fΪea7ws =W4P뙧ob&34X}CwuFrRGf M{VlũbB*R('0Iz0h}X1G* ļ5N: ?[kz*3 zq O^-Y#ERx>b\<y(vv-#5voԋrIs~""h_mȌgX&(7ӑc=07LoVCDBP |0%h U9'E~oH˔WIcΠJ8GQKA_AfK/QZBo͌qއ7{pePJb.RȯWe(#"N2n"R?~Vd?J@xS0خ%Y5DdSh>G4WtS/ĻM包|+6rnWRAi'l^޷@Κ@u}H7|x՚A1ԾS:)3zз|Q8>q> XpT|dvzH;YM|۞^T8a,bG˶5pU*A',@]}Ln+N{݌X#IbȗCQ GjpLECw/>|>Vg]Yσϰ o3l>K (3@#bO;᛹e@ҡb&GfEowdͼٯu]s.4$AgtRyr8,l^R<;=6;F ~/ToYrW+C6"Ӗޘ0Jk#S/}'T. >ӕ$vOJ|8H- ,ލHoi,k2JKjj>S{QgV72(ϴ[ڤbS(a#'ڽ e.rŅ^ŖR ,Cr/EIq$"O o=hò8;k>{endstream endobj 575 0 obj << /Type /Page /Contents 576 0 R /Resources 574 0 R /MediaBox [0 0 612 792] /Parent 589 0 R /Annots [ 578 0 R 579 0 R 580 0 R 581 0 R 582 0 R 583 0 R 584 0 R 585 0 R 586 0 R 587 0 R 588 0 R ] >> endobj 530 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./fig/likemap-ungrouped.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 590 0 R /Matrix [1 0 0 1 0 0] /BBox [0 0 490 440] /Resources << /ProcSet [ /PDF /Text ] /Font << /R6 591 0 R >> >> /Length 592 0 R /Filter /FlateDecode >> stream xK%;-؏Q QCpPQ~_Q~/OޛAn2J4D'~?_+RR+װW*|" XIl%Jh~0͕FB9陨P4'd5'߿Fq%ӟZ=оJ! \&7VIh@4? ZJZ*|245th@2Og؞YZ1VOHpR E'/~xh4(6rPh76FH7b>Q^31ӥ{pb|&DV1?cRQi#HOVd[gt|m B6H߬AKc]ec9S"@YtE{%65Fb]uշi㯭uM& `'Ew k-nf{ӌ)뷼T6'[s=iTx'X^v5G6F؂9qg!'chh!^{)N~O0gO,d 2'*Gh&v_X@}d' }z *8jzhYf e?jx&LFQk85Ȗ(O2d(ό\^mih@ N~ETNӅˉߍͱR|=|fzTr[^?VVnJ毣=54 f'<|m uAP(+&f}Y x\tx2>J\m6!׬&S=%Jl  \ڶ4`TB]d 'Ẩ.ߜ0\>Ds3V>Q9큹%\\k~ js3ֵɍ~ akٲjp%nAi-tׯ=&chh!^zN#OT>XD3DE=Pv3=ӂNti4(6NEh `@g?_Kp }Ë ݋}zo=Θ6@OԹh]AlJeTzF'D|rn%as ] ѐ] A4`/DBd 'ꇲ*cť%xy ?~+CHs -0 C G@KK ,.߮JPˇ bNr˚sE\h!yS*n\Hz 4ҏiX\A5{ "~]T}t_>{q3V{PW*[ }Ɗze^u\e\H@FRQiYHFhBFQG yp+ >ƫ } ߗ?$,x?.OJCi% 4jA][CIO-؂P vRX~3OT>sETx'c[1c|'NNx'pH|3[mF |/&N%[A |7&D]l՝ '[x{7_TEWe>@XOG26.DOBݧ3ϿrkQ?6NU[A3Ѹԝ3`֢`)Қ;ЁϓA\zK5:5(6p2V Pշmih^l 58Cn&|Of‹5bJc9+¾R|f`KđѠ4oҼ$,FJ'='*=z;+wa"TO3rŋnqqcJ ֧Y|Mp.^:mhh >~́7Vwv{+=p ~&ρWF"2 Tbm뎈؈ƛ*~8ΦJ>s^9PM o UQW>>Qxcu}@'*_}zc|I]$r;VYuK`K[æцtB/!*'ciJwtay |XraLG(Ce?9b$VPoFvo>DB c]@p?1^ t}bTZ$x`$ӧ tNz Xt"!^WzcE<6bZ&Tp&ܔ`H,{1Ԯg o w& y!h8pܜ~3gUL KX:Srp*ZJ̣gh11W,/PDA6I\Ȇ''kV6@4DB=f TkRIkRRRLaM2gb%o1 B l!uo d%Kp}Cރi0'&4_EY1(LcPHD^l)FB8 j7 j#P H=H7(1uC?^TRI;fHVn B l UA˴t@L - PYÁBv0tPX׃[p{fKSNjȪAlE(!^qo_/JQ>QEus}9'/Θw.5nEwx膥,p\ |sa4iGN5hl- `/UÁq\3.޵?yxQ~wt՟<}==z**MK)6'[3Tq\W7#Fh[0'L5 xh8q>GOT>sX]TEuQg{=n9|9|-|g==='?3lXNA2]퍶Ϯ4v;D3Hæ31ݖ5KCݖm=-<.~#fP){>c왲qJsHD\Z _9mR=ј `EÉg/y??z*gb뮧>3j3ҦU] hRKV"<[ B l! U˷;A4`/TB ޵3ò5BݼdP  \G!*-03Dw1ƹ1ZΙ>X{@i>p387$6( ZKEBɽq? 9_i$V6hPZnA|Q`EwP9N!<#B8:V`T9Ze/XԼ5lLpꋂaM JJIQNN.V1I''w--:`c 7hJ=f*c=6AR؀Q9ٺW>Q쁴:vԐNDdAhjd4em:x!%k8q̈́>GOT4_rF=sFIG@?҆= l%ϴAM1i8 LlQҏQdC9㢺~33~^&ms2 XCT|% ?Zhԏ l~9?yS'~7gXa t V7;;J|JraJ]0532V@\.3]X>{OTNU/9@ɏwEE | ̱zkBp0q(E4(6sV W x!h8qpΈRΈРN)nNIڟ35ͅF߿ '"iKю4>@wt>s3V>QQU'-.N`J<X'\bb-Nߜ ̈́21K f)-N; ,]Ytxq O7'♭! "#+8QD8ǻCb( ]=Rd'h-4Dא[ҙ9NgC96FJkt/~,V X<&Xk$l46j'>~ +%kicHsk@w >>VL WyщO A犰D|kl` 4l woDC B%op Vm1ٵq$ 6*4zl+\.;:Ǩ~$+=w‹-V߲;Nd53&nk2 7{U"{ZQ4©{kXg6 LO =?X{0p@!Dp|==@.YjOK@n,mދ~'Q>}8yO+|f `|H49Bۆ!bhVu%228DFБj`o7_[C+!&D8^.Q̃>E?`.N+X!S::|p+Js¨F`eڍ.SA4gԭ( ~; - ʏ 0%FX `<6`mBҦ>X; J l!LDT\ 58޹b?1ѻf= {(ԡ48 PdK0(Yy9 >kX ᡕIkT43V>Qxc{c7V7V7[ݏurUr遛]vR-]V TͰYHD:Q5P9ԋeۆHc?+'*='*9̗wf~xyJ+i$ hPMH!ZlY9Mtӄp$MTi"iw>[k\N2;SGhT$ B$Kp;(-2ЮyväaRjIƼ,y.ְi4!_FCRFJ `'E7]{FqmSXD^TAsn3V'cU `}\ yPM7ܽ]BG*9[}{Z`hZEo/wbHPct,Y􀌳tᙧD>yv:55lӑS0Jѐ3kl/T$'ߕ}z;nnng==Jd\9M =P8Ær m u2L/-7\%iMFJ']-iaC4iPX:Y"%mцC#AKmvJǶ~(y7k7P+ Gtn F"{UiKDҡ!h)e#zB R48{z-+*'(eVpȁ'4`\+D 4©XB 58n?'0G?G?L~՟,`mTx_8b)+JEE4ޏH$@…1`Ki&R5I] q5 ۚ #Qg פYݎ4Ǥ4oeK櫱(Y(lFb7y3yoVVB\ 3v+ !*'-3|'*'*=gxZJ: p2HΠ ~fD\C%nQB:3ls/ 7&J@3AcPrbW79* Wb5Eu=\t9dB-`]Ќ 4k8AMxeGPmwu`3yʻ9wyAiၯ81 MK8u{P݉{XW>QX]TE.Hx6%VEm5ciaOBsz4+ J Wshh_Ymޯ 2!o?'*U\+5ΛO3]ԧ*3?1Z+$PIрgn|بAGQp{zO?U{?@6oE5c}lքoNKR2cƽ֥r@8^fT$@hq+,`tS K 85k8Q8gy@ jc]HII=B(e#s҈^W̆{K,aӁ6nNϬ_[Ck %Kʆ>cϻOTnU|9⳧8FæÛ}3ʬ12" J8-l hl 222ױr}gr>3YsB0F@SN@O"Q4hl|2 빷l%chh!^N~#Mn_a0:,.g?̤4GV qFЕN)5XX` :AԸ !7f ܎*&|@g+|f /enՌ8= Jۡճ^oA۰d+!^ψL%DÀ)bi皩8o O^cz]њc^3 F @8I؂ zJ7]7XXݧ9 ʘFBMNLE : ƀhP Q4(Ƌzf枙uleƖ&' -+ ;(PasA5Dm -~( ~񈕺"`:9 PJ3:8݌ф^ykz@Z5+N { ==z#IZB¯Y >2]dKD0$Rw.m$iUպ(O0>MN;M쯉q' u%B9BX.3ljXA^.斀.쩆MgyRMUC6FJ8b&qbNYO:= ennV{kXB+pL ?lhh!.N~ET>ǕOT>{OT'VxESf)8fXϤ]I]ozݑ^6 Zi/#(4VhPq0Yjn'/=P8lke&Yϲ%Ce4P9ҋD^ϲH7b \Ss?Sp6 yihVKVQd⒒ [zǕ~{z`t$遉ד=ófUim byk4ڐNe4Z@J/,wqQ Ί+<-b'TtiTpJߢuTBi@(.Ti  -XÉy'tLTQB5nf V c8ҸbW;H3pGGF1MrpiO$bzhews(ߗ,]&? ET^oXN-?tRFәsdt|F"eAyЅ 43 @ ;$k8P8WQ.ŇGGOpLgz]̘ LVi5vOF<h|En~;qg~%92w&:@fZ"QhE^I?Pk5F=*c~WoEuQݯ \9|9nn]>_TEuQ'{/@t\Z Zyڄcuf\#gVB) e(`  8( 7 Csʔ*,>_kP8c9Gc uOL~|E;,5|h.r8*X@M "!.NϡE sTuN h}M4Mʑ]qv ݕjo\x)~IET>3lqUޕ43plxP%+%-Qfu̢ah['?<-lh\J ރ*[9>Ӟ>W6hñn!5ڂwN#嶆im - /YÉo|.\PNܜǢN)'Lr"u(L` 4k5ݪA4`'D@f' gvރ uMatR[)wx6}7Zy5(6~Ԧ!W[~N]B$vyzpOm΀gE'5?ѹp뚖Qϖ4 J l! o `lL .rdϴ 9unXO:>pQH5fzJDa/Q&6NiQn-.'};H@?3]XωET>E_2P)?6vDod R% uX,'Tz,qKf}kt&h&^(>"58|uؾbKéXj,,+ *\s(ʾsMzJGTpڗjha 0>(nxW[K ןީpp/OPEa48J$Fh[@Y56H7b>QݜX|آS9~v:t5l肍icbG/ ,#GP&DNVTg7n׍цtC8 }po4sx #OFvx :؆aaj8p>{b3V>{Pll3V^QA/,Si-1h"Z\=bU(۶谴Uc噪\Ŷ-Ro|Q{bu{bUН0b||yˑ3 .I=h噑Li 146`D@>ݷ\p[_c L鰒h #/z>HB3 V^ɏ뺆n*QZ8_8:ґ ƶHoto|)|X`^RA5?"+nv`&Šl%߶g <1m揭h&*Qya9.|{zOT>ǕOT'V>3OT'Vd͜[nO/5c}Jxx{&rTNPui.4)O6chl.(~OT;gXx9Kbib5NثX]l$AB 'u!@06զ7^x)~o\>X>Qqq3Vئ6 P V044,WRznьDPbkP:Q iS+3 *^߈̄>Q̄7V7V7V7Vrfsf縺ރg+|@+=9|@eAڜ U+̴DKp YoUNATAL迚 [*!>qXXť,c&<%`Iex>|&PPiveVz`F @8 o.]D]'=0/W#0qgO2x9$nDgFݎz" * .O&ҏ,i8tntRqjpaXlkёSl׭!Q؂PpWh[ V:M/ ͸0lJ&TȯSmiFFN('.Q[xZr*<*0c;l*S 4 thXzfchl^4w  ;$yحBo#|{oJxY y/El-x7e$.J.xQ]TMr;uϸzO|9e*r$0r!X a霁/YK ij25V&&&^N8), CJcW-z 綁O\te/mK؉yktwְnlOJ| (* Uda ꞔf`9 Xbz/4@$.(~]{PL>큷Պ_Z+~>},BEW]jIjiE*}$p5MkvBDSGhP R48,z *gMe3ta8zمqF%p 4©2@ uu_t gރfd |+.K[lLA/:N ptά[SDjiYn9 P/YÉo&=++gc=S&d9/aZz;T&,zMe=ZGϩ6N: xTHx ~Zlƺ OԡS]4ФvQ2T DcdDB\! ^CuQsnqQ]T՝oibCB%P2.k-)!T%0ek4`‹HA j%I`Q OT>'M>Qz`otoYUZ<7*`5bf(o$SQ $Z'/V!mDN(Nql9F'bmZܢ ?$Li$`V5FOg~ w] .e{_ִ~GEuQ]T7lڕT, rsƲ}3 7qLuKgDAB% 'BnVG26JȺzO|fAj*՘UNEnE*;}"zA"rl UA"!N<3c$THDvm/Siy(Fj Ai{r Wh@Zj +!.o|*U,'-*h{3ݮ'V=Qln X`)b9Y.QQq_C)ec9 -:ӻMN0¹;X%4!l p/BP 58Fg/7H3[X-V/?b5lWK)\b#bL @a_ z-2Ƒ5 ؎w#Qa֠t†ݓDvK7ߑX'V{PqX]T7,g-]bP"c89zBͅ xPvɪDcC֠4¡!U<^Tm KP Wӟ8Fg}9|*AEg.'N48 T4KH,Q $Z`X|PL_yU%h8@4N9Vxt*p9#pДp #q֠45h@ύ f R48ng9|'*縺zO|f |+g.;s,-V>Q>3myppIex>pTݤH5l3k *!^8\G-*fUNetDŽX[}n[тUk+PbX@Zpu+.J{ {.꾽ώyꎫgfzO.9|yރg.-pc1Sˉ Ur gR=頪@!4l R@aNZ[CȰl [*!^~xsƍU n4*g%(8;bu 2Ύ2\NҁJ{h\ MpݭNhB\P q5 vB|-'*=i,3? MBIxbp).Z#?04'B'  mDc\ٸHsto&'vM)2T#^'TumAh2-HIekPLpibь @qici.2=P'YÁbuI7oZItxn\~ѕ:EiJDX7m46x<;ְ.?)6J#.j:5\aQ#/ϠqQ֍цU? %nJ7%c>Xqucu)|?cUZX gFp~m؈rF38F yXxSPW)nsJ309A^ -ְi!x"^ݘ@Z5+!NxPsZ+V_qY:uΏo.Js#H"Ah0 VQ`˭14ž8), r0|'ꢺ0-V>큷ս_zO+d8o]]2Ka=m\h4 S&D J磨؂] qQ4 4 *YPJ6tz_g~wJSIV #y$q?cDb W+NN}ڜ%rܻzW6NrsJr{ƴo J l!_5,GS66H7mDsqQJ>;v9\}ypX' f$hPm"N`A1$-A~{A|tzO+'* ' n²$~gNP-cѸ|L7({wͅ&@8 !mbf,Y u =g9i.> պ3O6̙emN%'\a* ͏ 5Y3ڜȟYCC؂PQ(Κ|-ػzf{R9YcE!x2[@?!-**'Jl 4&JD7^{P8c83<vt!DCT"QQ $Yi0Qd, ]\c|NsP x2"yhŢy7iJ.+O$#;-]Jl UAOXL}P v&=n|O;+|@|@=|f n9>_9{-P_)AJӟEkx\w&#P*S FB8 <YB3FZ`},;l82Bu))9cd#24D1&:L@Ҝ3Es7j5t_"ˁ+35zta!DDSDcoNTAp6A4`'T}T  4ڔxgc3q#KBX)'6XU:L5, SoHc\6 PK_anHD^ǖxcucucUjCۏL8i ԄJ=Pźͭ@i4 S0( ?m DA%GQp }gggg=̞Af4/_zt7[mgx*]J5JFWbR$>#|7ͅt42(QD; |*BLI!e*@PNYr3%߲jcϡLl _9TA˭-0 -PY q\9*iT Á7.}}1VmD*VH{!-1EYRen D:x(  #V_|nⷣ/|z;+|>W>Q>Q{PW>Qy큣B1or"J9fʸ\=#!56EBgF'vsx۔"k8A>QyZ7VoET>Ǖ2DNQA=g^h8 *6ch^SbtBbDsZ@mz_ڼTX;ѾHpջ:XQoŮt*\o*QCVw|zX{R' V5gڌ .tB$x|!-: 좴ꎫgzO|rs}ݙi4:j >`-(!/B`!C>2M,iS ?{k@{6ٶ,qs'*Yg|==m\&+Hp%=$3 K9rECl숉"!^Gl>\wf$.G7,xy"@}@BoV"I2 S*h(.찴D6a8LOT8* ku &|!*Y b{Uu" 9c"!NopE$G@߯T)u+9 #Ѡ4ڐX=%%ѰaM)߯]\%:$(bALXH0WD}i/$0ی1mhh: N~OT>'NNcUs@)](CY4="`LpHѠts7'A3gl>Wp{!%k8qXDu{{buQy>QqqLޅTz&Xd^tEq<)]a-QV|RN[CZl ;:z!%k8qP?b$*îEӛ@oZr4МJ1Q4e8  fVQo'D@|;5|wXggr՝gE EgIﻉW~BhkV%lD@%gVp@;..|v|+n %Q2W\>.x ]zҴ4ps!P53g]ۄ|bJL|^{OT>ǒX]TAu>ޓ-|ꎫ/9"I4d<'DnmYd[4X[\^A4/TBf 'i(tJ>n2[|Whظ!%tYd[Bf264^{M NptKY#!%0xVyHhiM&8^[CηF硫 ,~SOT>gO7V[xQUǘZga4дv,j/ZۄE[b hPM` D\Yć.A4/TdѺY=9g}'*=z*]w|ݚuroOӨciebKj%  J l!\ q{!%k8qxǜqcXUQ᷏ԧQsrVc j.ixgO{km` X5@5i5譏ا9ix8P#V*Q)'S=5Kz]vk,'(3>hM l d ѐ;VASD6%KyDuoį-^SOkP+?*=Cr=~V 4iPbqkwu {!5+8Q[N{aAˊ:9qM,JϩpvŌi3Yjf$al<k@,`X$xc?adet<2^҂+ zJWZSj8  .@V" >qOɃD"ݑDW¤p)֠Bp.S ԆfC%KpkG9D%'#'F湺[n_FCLdq OT>{ÿ'VN\)?V~֣g;8l'%+ 4 F a/DB z*9#pDC7> qez 3jP:NAԉ[WUC5$ȋ(Oտ)avH7a/~>cuՍՍ́rgSa1Bp8ZM V5[**%@R 58C|fB9=JޭSZvݢ;M*-vnMP+HZTgns8ؠRݶA4`/TT sjDh3XN+ҵQqfF" Ah-8xJ16H7t}&Ϥi3"~)\t"gTBi7,_ SFIk+X~aLs vB%kpp=.fN\CXkp1o)gz`[puMvsEO8T'J.RD[֠tӵ '㎨!RbkK7b{PLxc{cuQUw=2:B9X¨2<+7[{FP ѠtIhLalY^zN~g>Q>QEus n+"Yu>S`ТY\8&}#z-S^Q4(6p,n8ll - P/YÉgHTZr*Np$ÒEGB4]=~#gFA,|jX$fchh!^xN#Uh9mtxh<vk:Woje[PiTIpn`έihYB}#m)Gn P>1" = 6?,br>4W0JOhUݓ}'*\gzO.}f{3OT>ǕOT>{ET~XDu{Ϲ!/J)t\1iXhPLp:EW_8̘@U'ӎ_&}w]3FyCu> 㓌D8R.,*5@4`TXoX7VoOTn{`lj*atJRe=$Ѣ#$R a`%Uf2 "1&xIIB Nϡig+|xjǺdl$OfAhԿی@ݶ"0vA^T/Bǃ0*V Y*ecXqkP:  m - 'Yo_,8c9If8 es.Ii -C%c P ]@,߉Ṣ =κ682FCmpmtqGz]*d4M6r* ѰK46FJߢ7ixEE{r;g3?`2L_Q]7VϻqucucuB5_ xi8~ 4% P2PgJgzp7\5Y6AV@|; }Κ0~1S~x$N~z@Cf(4 i(&'!<ݚ;a2?p M>cՐQP YB&1l l%*F"P"LKhnH387 L>cV#֋K +~Ev-.l 0%S԰#FH|x̍?r oYxf$Lߣ 0ZY7fR)[毟( Ͻ[ {eqUzCKb:ꏡU296%&eFW]߈>Q{P7EU 8Q:|0p y@&|7Ei$[dڨmp*TL-8VchAN( ~3cD^TEu3}>9^TA3X'V>Q߁~~̊fR}KX5+~re5q.~ƪ'$yX9 F: سnkSbD\(&pe4*& DDE4ޢf t8(GlˆE@L9iT#VtB9B:Eo/=-='*=+лAA5NO`o=r3 mKpSʇ4,ZDŽJp( 4uDU Ҝ(R̠SCoSDcr@aVpS.D`2VS< 1>uץ KkFby1 4r[CpA4/Tfz *7cYĪ[?#V~ᒕ) W?Վp DX"LX'VEuꃖU􃖜9VrXM)-`Ai!ᒳdSHDs6gAZB%JoC;~mJs0+ JI@GZ@'DB dMI>Q쁛Siv Oߐ^]TD(ό+avEs6:]!ȱgx{oO~*3IPaa${[ҙPm$,dm4d/TB '*g.QrlQJ ))$EF>O"eCG c$sy_(tn(Pj(PZ0z8  OT>oS>cgNȼms*.!r ^a%'8Ѡt)r! a1mi[B  gX@UͰF cES p0»q'lҨĕS56h'}`uoH(H N`,h8ʢiKbC'k -o3IvnTchl.('Y俗,?Ho'oi W᷏t:=؁$ZCXھ Ui.O**Q'J~P{Pg;Mꎫ[P7#F2ZiJD'U"AFWppp;xB%Kp7Fl~3[og~ރ縺^sFbs*sONx$jI7_+?mBg~o9؂5I?Ѧ|?ktn=?reX qV *ӫ^Ai-AְMB 58N}v|&Ar*N&56jM> + F Lk2@wEHqG׻Ս} dT>G|z*g|+=g|+=gb]dx!J̢iI"<8BjPm@ 1֐: 6FJ7gDpoG>} '˜JH&:h T"T$Jܜ)RnFF?ѨPqXn"|Y".=mjMWr="}MiNql Hl upa'igB$KpЛnSrxseu6RxWIp摑OJFb`8oCRIb¢w邊 `nUhJXJ{-y|3FO_[ALM `'UEw՝e'x{;WNUEųT\ }׼1&$W6pi/$GثeC17bAQp@;+ rL8j _ %*WBzl {lq{{zOT>{OT>{OT>W3<9cIJٹaъRkXDekP:BTC5t*6FJ8b>GWYHWr2Xϱ@].6%ycέaӁJl @!'A4`/TT z*Ċr>on0+.2_%K.?Kv6`t^ealU1Yv͡^\,XNypn p VͺNzkVlD B%KpfTF%,u1٢ oZbwN؇g*{JFЉ NJNhP [48z}.~7V7V.'+gpvd'j3Coݠ^mȢ+fXm$"o QU5 룷 m/TB EW)bɯ[?wͯc]5$n|+"@.: Q ;EuQݛ}Ǣ9t}==9ꢺ.3VG5K_nj4rpakEL:[4M6NXA4`/TB  P*SThQ?(_TA3[ET>>Q́7VOT7g\X'V>Q>33V>ǕOT>{OT>{U,#Q1ݏd8bIafŏP,s*5k(P:)30&D7cD3Ds-)U9JՄ$kҾB،D/C6W'k)]K16ƯJwts9E aE-ҨOj@WiP {Gn>`֠tbכF(_[ClP.{ m*AN q\z 3^,S^#J8t%/b}J_[ʫܰ& '|_ۯk1@4wt%wuQSMp2x >W'˥?CI^*\F#2Ni4XM PY՗ g]e.^ &dB$H?(}Y+gF6BâĂyI5(&s phrA4/T9g{/|wd bneaaS}Q> kU&4δE%"uU 4pȉר5n ['Q(nxWƸރk-|==z*3&"^ *řK:P= 'Ai  Vlv`==}9|-n^ZXr:6fRcUHHkmܛƌm1I S4goy*2yyMJ'bQҰڭ$:F%4\I9y"MՐeRDc B%Kp}C'*gnxO.9=m`W"pP%_5)W>e#׃i-$Gyb4Q[{я$F3i{_ÉXzхHƌLOVgM-qDѹVqWƾYO-,AMBp:@1aL"p`𢱊 A DkfpZqYwnWq~T6Eء^ԧX0S-AjlLx" P A)XEoM+9pqW炙^Nw||,Xq~xl|xl SmK ѿ-W?3VG_`R5W:42PD MU(tPQQX:g*+ ĕJV5kUS*}XU~ӈf[~*}XU>-+ΫiՍʧU>#ЭU 8R_l.v;J"JQxE: \i+`2j2 C-bkshUJaM !7&G(VSʂap<Sܔ 0ɀiX\9 Qkp8Yeq$>XcήpeN H6E+-Lϼ F8P R8vvmmׯo}>ȧ ߦ8;} 76QLR`͟l% EP7Vhވ|L`TpmdKbg8K/q0Al`8xV&F Z8vk{+V:K.|4mc:,Kp>gi=ݡ6?`Dܫp >17lcd> R8v8˕=VW ןws Kr:e1@K?OӌRI$Ci&{E-~( hc[w A.ؼ[0m0F:iE8leYg٬\aEp Oō hf EC9(\$m88ddmSj> 2n}[LȂ#Bys,#`Y;P t'oc$`s FB!Z şU>>}ӪOnW{xq`:}CS_GJ>g@wA152Z>jk32xCV*Z|+kʧU>sO_%_;%y_<Vv ޘd/PuIw?9]r M1$7YPL!LY(p89EZ!ajBSؒ.)Ua#Yj7(& bEEU8Y %i(1|έ7h/x i / _ VS21Yʅ 8"C`l-@* O|N,V-Ҁ[{$(m1/ùZ$݂._^ӹ`)"nm !C`A0`-Bd~=vs{|uk{9|@V+JM=0qmXk^BWC(Eӳ@L &˦xnV /*J1{>|Z5ig l|X9U0s1Rm9F6<-hfO|h!p8ы\H}b;<*|9@99g2+0 F hr} cuPQV ?^}߻NJC&:ܚœ9Rr6\$ va G@HB!J k@ts,w2%mJ-ԁ5+Db"FAa#CrcF0BP ђ9v8XYY!` o 5O+-b(V;f+"}=< j)FRt;A#:eAWy:o[6 +6(Mb)"Cd(1]GW q+!SW¹m"jW%TѕΗR^y Q;l 9@V-a_̆>>_́Yů7ĠA ]f= o-6AD0X8g(cli㉅MEûLܚϰZag%WCzPԧvȴG< X!Piά0?gVҕײuN.}ͫdj3[\UýWwmqյ=Vyu}uWw7w@VǪ;+kaV1Q\'i0V}E(`Y6˘7}ZsW>S_|axb]nׯ9T-EB9:L@+5Gb62Pñ\ήo娘 %K2\s{Jt#ᕁSS.*<6?i|)zKHPBf~rkյdUɪaUV5*?[U'ڗqyJ?Y>j_}^?M00 ޡ² QdAa!\/Ál6Fp8kյZu&WU1ZUJ*n*لC, Pn#_jUe\kʓԦ`I ]#U )&q0pR7LuQVB,ݧU,me@AJ wxS sY>7mspB A0R[>X>s{|uV]U77;>}s^x3}VyfyW>-|ZuŝW)wd%d:ѩ]W2kn lY`lZ$H2E>A0 %@ud>V$"*!ͧb@Kn/t)"8q*Js@]MB!:XшwSV~bǮ=/x`!N6BQ  a@ӧ(#s8;(s2t%]F-P^un |4aÅ*f N5!p+B(XIa`痄' <]V<3zZ{.R2~ɼFlz  m3Xjf$#XPi%Ե=Vuv{eJژ7w2]*a5l9xͭï)ZerPed(Bf"`!Z(hN;>|ơO_NWzI U\ 0>E~}@=tL%pXb\A0`-Bwv+IA!edCc_j8(|hHdh[{C4-ï|ZsW>r½WWJ0O]~. P$^fa:|ÍL[A-`t"q0op7aW ¹Thlm1^2ld->,>3ۯibe g7#T64BХ|>|>9|ʧU>#ЧU>W>}*4Lxb$z^\&?`@"De JlW-Agﬠ?L`g%TbvHA J ࢮx'doO(<1 ׇ Z#r[0VB(TIpXq3ƻ2O|FO|F'1"jU.}NgWKn8(|_Y0,Y a)DKs55w|(P01Csry@|Jf 0iB-@ :j N+KX^Q0w @kiB )ߗu WZ L3 "f-!rn*(#]ChHtN0I3b 3̧R6}M- zA$X]QE3{7c _UlUto1m#%=h6CpPea5c;זA0`-T~ЧU>>sOzrc|D4 K&C!6 Q!rИ%[ơ4ΖahCHVMaWʏH xrG#oHpP;'QVתX3G8pէ[rR7|k&+A/nQLf !2Pm:c[+{jcO+jp3˰FmDi_/E K*|Y AI@`a(˖ @Ud ~ω*§nѣWAS˧&*fK|[ {\`/j=9KliPtЩ  V{4 "|zU. Ig$W>ՍEX?\Y'Obls$;V·R>}s^g>_́>}Ӫ-k{=Vɪi`R#j8-Ez@A `0. (.`$P] ~sy3_c՝WO3l>|(p)b:=Yp{Rŧ`ud["<2`%pM)  @ B!* Af<;Gݏa,iĉK_ E>$VY~BJ kߔqzUqFn׷d9Z6/8=( uZPTNMAa#@a% Qkr8S+Ce)Eؘx6(cqg~yF%gx#_EP ܅A ,@*(k {e֠1Xl@ٝok-!5a¢f2zo !gwC[hk7s8>rA2 d[pFxt43^N7@0 ` @d ~Cg9n'+A^At ,k#Y".P,G Dla 0EJ( }XXV} uQLŵP1-4VLjIpQ f9Ċ{-_(T?~ZW>sO|Fu}3{ #pc:|BYpC^a( 1P Ŋ@@HP P0@ B!*2SFٖ+ľ>YhLzZojr륩کpd4l# UF0@P QV^תX3c\c]8'[\c>}hDν6Xc[vu{ 彎knW5j5.> !gT܁F0BP ђ9vz)X/2T~O&exmM\)qT:',F8@0UƷ_?V&/@~Zuww@VWw_y_]cU e[LS˂3,'fW< ޘ6ŌMTdEe #D `-i/Cg^U*gfVǪ43G1'h з.Tf Φ*F8B0r qkp83͚L}n Bׇt 2O#nnlZ 35CA0`- p3sg9UgiW1`# w"B)xlC*X`֖U("pc𗎇]7zQA)XE7 Y(@~[LcoT8  p,KG j&6C pژL_Ck"`)_U,k;n-Uתu\NKD!_ &Cw -Ia53Ԑ3If4o oUP VQ9FЩetKtV1Nc/XV6kiVp~RR3fa#\`yx-5T0E&Pi 7e+e*¡ղw kq7):-nnL*VC[F[ -i_;2[5;򿵪9ƿF˧U>OYuW?i][W>F௏@V*9fDOR Ҿ-fR_>yD 9>n>-hᡎT:/ R,@ * NN,IЧUkUlbӅ`:ޘ_c^ٍ-5c&ٱp)9HJ;iB!ZJ8;|&xxNe:G(?e`.0߁{w8"L4f?n)X;mw,\^ԏ>&m1o`c'(+G,p*#{-9?n}gHp?CAо-ڡ2\E+|hԒM4ئ"RµZ3 grVǪ\r}zd,|rl7Y irP`,  8@ j_U0@UQ6uO b PSfgD2 }ܘYL=74]Jc3P%ATPg3Xi]%.UPљ6g?/_,T2 Rĕbd$Le5tݷ Q/2H_,ħA?B!Z \Vy]}*tᔀk ~bhB',qZFmIPPR9( a"*<[6a-E"X v1Sϸc]&28"/<6xD3 ;D`e5&w% iӄr^]_W>ŵZx^5%6^)v>1E=+ipNKm 0ʐ;²@_C'#a,h);n~W~i }Zs^]cyԪTrVCWR KFòBgdT*T0[(#6fG0SޖA0-B~gƵ=V̄W] & fgP]tcOa[M+ l XuRl-@ :(( N+iZTt\qj B P&θ~ӑ1aֲP~g o @K#a\f)~n_&] >-Ugkym3qU IU,*iD.Ӗt1!X` @abU4A,AuXQ1i68w~{"ЧU>OnxϼVǪ-ޓ-|Ϋ缺VǪ-nxWUSg 5pE ޜs:\a>#l0ԉr'ER~йw[L玼IέC/O2Ua;Wʰ33,m[r16'uOVP>7CTd=GտC#aG7z  nڌUP Q8|7!{DO_aj+*sVPxPMZD3dȭJgfa(G&v&A0.B)DKa_*o%U l>s|C 0Bj Lz)a)n~͞` BsȺVǪ ~S>r;9w 1q:7Sx >7b\4qZ[Z"q0ogriՍʧU˭_r ز^\IۗPׅxFn ~+z>lU0B R8v]dg&it߱cCr [6R'A`ubf?2z9=v:|?مa0ӡJ~;4,Q}B7~a0 8+l klBT$Fv״˭P Qs&۔3M h.rO4 ֊JO1͟E=}F>v2Uب*>au s*PR(\ͪp4##ంʞ: pS qI΍$3eNCա !q9~Tb-d~'O=iEGEGl)ME)#h`f,xaߵznbz|Z3}Z3l*6 SN۔}ȬuC0ʐ|%tj"h)DIfpX7 }AV|Z5ܕ+gѻ:\J! E Æ$G}p#9tĝ.Wo\Yp~ sRxM)ʜ{8u0I307udߕO VJywm?_D`U\Z~L b1q뚰JL.rF$JV8ѕfpb*)5cPcYj( *Q !A7NR22RóՍD=Vy_gާ{|*§U>ŵ=V́תXs^|^F{|3O|FO|F`PRDtsKj_ zF8B0 kcmN,т(TIbpgVrG2X젉NP BX6 vXSϩ|*<Q,h);F]9W>ܺF/4^RLH/xHcR m}WLfE/)&B-& FB_Ψ p87aWתk}dJXb&>2*El \趁23x`3ӫ`͠&zq+p8}Fόëuoi'pE<t)rw܌R{%G2Po%Ay"*US,SxT0WQ(RVAHn&Z<*2B Rï|Z3 §b^8f Ŵ'BVq#ǔ~Z%<5[IچYúv|#ކumQoVsm-B;4ud~)Y^ɂWވ%a/x,x[2<č 9{CW-}}x:݌PbֲJmTyUT(ӹs4Z5BQ2P0R=o3&pK@ wVP&uֵ=V}x)/j-Vջ7o?l<+G?+oN@Jk/!b-#za+!08 W~V(^vӮ~?F(`*faRe< m010!czwGȻnL1&[$F(7_ Qkp88յ=V/UY;DnN+b;k ?HS!֋ӊppk[\Z+) *|4e]YO:ڛt҂3\eǣt5e|b)b$G PV,N;(WxB%{ׯm1b=Ǘg:"Rk 0%Lb@F P-i]i܌3zUתkյfٽES2\^~m>>*fq(k XB3ph!_B. ji_O9΀IpC2`:e@-{I@k?Czcp[C _ (( }\W>ŵ=V\)Y|nsE+#[l~#[l |?Gm@@Na;g8L@C ,9DtWJ-$%|A n B xk߼3Ui^i-|Z3ox0*1ˣEW0gMtqC*9̹h 4 \3rh|'yEG#5=rq 9.v^sZcQ-0\ow7IL#!:-2jwRsZ^1j J%0!RJ/"&9(+ P]=`GO2F-agy>]>}s^|OOnxn;2{t8*n0 6֨ 8t*J0-PP$*Tp}c5c::B(DKpAHnFSi,Z-QixAn/Jڼ2 $ =#*%  **N#>Zd7m0)%tiM ڇ M@T2cԿGL{8$ӠfglFܕM&F>ЧUi-Sl|6δmҹƙu@0LE7"Q% p&KI(qZe#X `%a͂wfu}u}uCڿ(< M MߴV8a]0W@!2|[ѡj0X)lsoB)XKpwvy}C'x=ucī'2&h܋Z 7I ErHFx ՛9vm8᱇=wPLF2PЯ19n8`hVLaA0`-T~\W˃U êN!*,%CjOA" ຜږᰃw]\Qx71)w}0&lF̈́.qZ7A`, ӡR+Yd2X aǞcҡt߅|cu_,bXw!Ǫ\w!Kc7Y_&dhiߦ/m1{䫪9v,q'@, @"?bĻxR.KtE!ĻbʧU>gO_gKe2#aq=7sZLQ @(PyhsPc z\A0%Bdwe* Z|?}5Tj]dڗ] m;U EoAvvxw52PC=FAޓti-|FO|+ViݘW;|7ssVwJ`l8,guGmaY8I\guU -iLD)󙦴kJXaN؟i {MC-`LR4o2NK|+V|][6=OInφv4xOyÓ }N6<-(; ~sbFoνoiU9޷]îaɮaW>մaYi-c[ 2p]{MaԂʂ7~ʴ~3輇+p`M^bmgՏW>-|gDK#& **qfw)(ůe|v͍]1Z QQ8F |WLz,ӷL0_֯W xq0Jӳ0)xS9Rs;B)DKp7}Zvv9g|cޜ\$v VELo;(A&;r  Ւ9vW>szb]?Z35΁4GJ>֦/ D 8@0M688q+p8(LaJ&RabwD 3*qXӦ(ss00m6h@eB!J k@ti12Ehf(u|e#Ĕb>7cT QQ8F]eا|Zu#=iŵ=V́>9===W>v!3I_TSaŽnB'9^Djf D;Mܸr@? B! 1Ӫk11?-fźf=&Us x}B) Ճ` i7+|0B] ~+ \V@V́ѼJy=3WWWn X4 ގ zu^uYx`Բ`MYתk]Ghr<4?"t:>~a)ALdqX8LCc_g}Z3}Zus{|3[k{=Zuϫ+;ʧU>#q~ZiUL*4a724Laڀ ;D-ӶPOBV\Csl~Umü JQhX+p1awV(YGUǞά؋Q8U0kQ>a]b3U;K -wR]IV|N%P"t+>Pi .`Bx8… a("p`*Q5CKOA @td~N>O_F{|WN*sA1 2,p i,EЎ[A`#e'v+a J( +˥U>Zևr;t>g#w3Puxjv>cҾ"3rET/J(( ;ZZ3XZW].**0k$CA/6Q0 Z cPïnxOθznxOza6ZWt4D? v6d jf0Ke8hfdjvږï| E<P8tn`}jg0l80a5nt`K0626Zh);n+ݮ3C_2e)H?nAzdoVJsZX!hvOpfRW)=xd# H_p&*4= ^_xz3є 0'q3x&j FJJ )çUnSت$BwoQUlmaK)P9lPgrIO2 d3#a1X QV5ce0$GDysh Kbe^6 z5į HQB(DǴ_V5}Bϭeio,^pg /(=S`a9leHod貴9@F(P R8vkՋ]JϰD ozU[pJ]0"a=M`e8iab046*`Z(h);\Cq*xzU>յZu3l"i??UjW_FilsF{"ЧUrO|f”pb{:ؘ_0-5ERK4-f-?`@v Q((௬ bBQ+p8P@)oiX~pE"*,0 F1DxZږ{ 5?20NwM.i梨jsI6-ll9t j(I<`=~.nd8,R&wzU>}L0YÀӓXl 8:7IfӭCg#`>Jz-ÇaWVRD  \pC]`=GSBpDAd<־D,um09u./,8A,Q2AZ>R$z+IL2C`A0`-Bf~=4̈́WW>{|uzUw^]_Z_]U7[ly&O0qfP9(Bx9eP@UAa!!X9a9% %iϩuzU>O|FOn^_]_l;GO|Fϭ *3[\Uy7=h@Koؔ2kOn9!0'Y,E:(Gfiɝ8 e ۹}cwvWe6EUH/Mѭg܅'7XB(X+$l`DJ J(+}έiz|fkg@{c35>S/bGse{֘KHQmsd  t52PpDjVc7R^~!E (E 78A0 @5d 7ߙY7_>>_՗hFhXo vrx֙PafZY:ko !;K!9FBd~Z8&b3Lhq_x笱`wQ X|D"pcp@9,B"±\έkյf,OF}ԭMiVfOfӬz-2eY{O< oVF`Ϋq OUU0 [ (Ua. RFT82p`2`aD ㏭]Uu[O_W6/EWWתXs^9ofRo0 Tx j0_ iP63U757巌J5B!aXO&~ :53Zad/xc7jNgíݶWM-*ww&$) K<|6 !h,ۀC"_(mi?U} {yV*§UQLul_ouvzU>>}u՝WOnW+Ӕ]ĝ eO5yeqOpP..\]K3hY?_sZ Q2jmG֝ZZ>#=V*Z|++&=ils^k$mb|*SL~&B ,:][ܒke86EO3 D Xz˻*p8VQr8@w1*gڈ^xJ/?`@57A˦L}ʠLzK J*xkߩuV;SWNy}rr/>x+Ɵ#p~Ջ|3__WתkյXݎB8cNp#hRS`7s!r$^u [)vT@|3'O -FK_٘Mk֠IFMZodN0#`Ϛ!\2"wQ%@fWMIjJR-@g (;Rn Gki WpA8@VF\UP QQ8Fh)ɹM~>S\.YEΐ#A2$FBB%F`e5o\n"ʧU7+=w:\S ,8Ҳ&X,BZ1 .8vKQhi.&8B0NNl% ˖A0IBz3X?LEZyl+n:qJch8m` fֻVBF(OϤӪ52,z[Zwj~7 (3P߃ &AAGߣ ~J0 N+-KkյZ4~#=xV]SwnZ""|-qM'1/'$T3ߊQW*R$k82p`6Ӫ0-BdgWsvv.޳svN>'h vvα29f?y,~x]œ?9gg?5Lhg'"ZZZ<,="ɮuw)v zTjK1 D4 F!%S@ðXqr2Vܹ(+F u+S}jC@9;臶od; GRYRZp]sӪX̐ @AHL>7fV@3 k*Fb(l̴6fƹ1#J2È;^7WV\!Ɇ֫Yḿ;+߄ژ!>"ADGapXq]QӪOnW^׸7>1!o ,8'|+axB/:\`# |v`kYY57>gOpMʯvG s8MO7 ~ >2a4xQB(DI`;!^3>)Ua!Bz֧fKl3$G+쑚1c<Ѱ2'ERv2ԟng W0ֈ wƻV "P<<"p`"-C^ՅX808u:\Zu}u}u7/nfO2{d&Lr6;{zPDo3PE]+_Aăg[bY081"٪t]5W}~U;}U'z]=}w]Oc%x}x>Nx#a;i7n Cu5j)ձ(èfJsPdtٕX[ia Uתb|_l,I^B p1b5X- b37Xr08mxLon72o:*~'Xo#&~xhD)3^:"5P'uAU, ʠg8 E#X %oaT/dXB/?VYBه0v@7(G0 P q)28Q(k{-|Zs^]cyh7ޘ.ֻ |a^peik#4 04F81?6%kV#`Z(k;n+}0F|>>2Bsi@w&<)#1$$DƎBB(XIa`p-ZL3CKgI%k Y J&l @ ?vb,LC9GQJ n8AݻHC7EÓrGZ(T5H…Be~s 6A'4&GmLz gz[eXj`lknH9b"v|U+*`Z(h);v(<ߢfSF@?k0,9/!-D?œ2HaDW,g k\'w>dp&S}HqW2邫.@$[\rnq豍xT(uP QVE)qvT5'5k7>^f>*ٳ0 ]dB[0BP ђ9v8|W Dp?,Piap%BL }*[-ܔ"@@wr7Z« GJ!: (j>Z'5Ϭa>Lu/?vׂ/΁յEVHqo鴅V)*m~=A'gf2PE$Pd3/^F@UA}pB$W D- T?ji=LZ Kd< qs0 A 1#a!J()}]S˧ZU}di1:u0h=8&-FND}3(Oow6WF?Jj+wAѪT~ ]+NL6&s__G Tj?] oN i80ĤTXAn =n?n-bM>;=F{"Z|Ϋ_+,i}jD1_a<*N*y~$of8XHKp؁A~ZX@c&@EWw+ŘOB@.T{tS=ȝ˟E7}h7 5~ -gL?:㢵N GMA p-mItU9*a!Zh);BV]>3$K3[ZW+<_<=pPI]yHVFe=mvgVݣWwWw^W*U]vH7VKTtQ(k\e_1o o"#˾(!08;~Uɭ&ܘ]f8m1ǯT8&0 jWd QG0œ qkp8젲Gcb ÕF.CIQZPhdjN;) yc"&[8P R8vFOdC!ײyRZ6k4D]T6 B@{(&J0OlV0BU` U9Fܩu֯ZX%E m1AXh2p*%h" Ԁ]˒,A3"•#L_bs"Ro_+ݧ|Z3o|O^cl*9Ч|f *XHXE1wwf.zT-L muck%s8R$ b2dt=P.(Ant@(0EAP#{K JA*Ä{]g{s}?WODO|FO|}ΫkյZ3[*豐@53 [J:ଈ+F@AJ &C!-`!ZjN;z,nB_9-ܔQ^/PkD8&0^~fAMt7&1A!y-#pݭPf7.W>+*i-{D2{qpT_f{5ZUa*&C]u##H?LՂ)TKp7}Zu3]7uӟ`4opm4Wtʰ 0G`"}e $Lt}tv(!0&yyu}_́>¨L+BVpNO }-EIA`ץX -a[PZqֻ-ܴ|)/ꍔnH=զ8kNK:2Za|ϭa+? p^S;_g|Vg}tsu}_li=J8=b}j J.•/=+[ӆOo @>i' {'"aJ(++nxYO|FG#pwm6F6jQ9|ZEQWu^1:Y2Qլcjy?VW26D:FקϜ*9ç|f@V-M:tx/S"NMEan?=" pЂIФp)F7X1Zh);z̧U>O|FgS w1 LaJwCB..eL,v elRɱ9(2p`222Z0jN;.qT?-c5Hx$+̆պ)P9leaRx&+a-Y R8v؝]eQY5ynzv;Q`S`y| CN ~|upPh@`Z R8vxՆKfB:ٷg)}omk?$= 1>glIaO\BG8'C|n18 ;|ur+ʧU>#ЧU>#ЧU>#Z|fif-djdzCpXXPapz*ڨ:r'EYtѧ$ٞ>+Æ+SQnLd!XLr8תX3g\2Ϋ;g)z*'].QTqZ*E A`#S4 '#j[Kaߜqg{f׵=V>>3ZuofVşWEKh۰fmƇmöxg&iU\m014\m0:q髛RpJ0%$a*XRt} [ Pi*Zz|ak{9*Vè'ğvOva˰egviuV]J|jx#F>}*xsW7W>תkկSاU>#F"&V\ 'LO+$PQalթīRTj^%NbK0Zmy-`lZjN;z̧U>3O_>#Zzlf?yw>>Ż|*9pEO{^ FzR4*ߴS+s3`332wDƞ]PLYE; qӪ}jWתX3̫k{==F -n^_w[R ԞBo Qn"<)Z !$)"c32fH -a8iٕJ -_m1Ooj%g(?fq >eX/b|FZ"ADGapZ_kء'f^ b;aY';znֱ1m%D`wXQB(DI` w3ןSƔe )̲XSv<))ĆX/ bHΈ ]tty%ueO |O*{]q}ʧU7[W)n,#0;\bLO x*F'Zn"p`2b$Xacu՟WeTM%uWSVab'v^'5ML0NX)Ƅ 囃(Ff83A0`-T~׹^3a+ǔsV$x~ v0늁a(ꊙb8(A`˶B)DKpcתX|zUNWO.?Fa\R *,OH ]P,/ `:kUhGD/wh7|ZB1vG-ù YA_w \q9lҞ$80a8jd G/bp8\10dCl_upJ>x}usw֧|f@VǪ+9;a]܍Y " { vX?` VآMc3PDϯ9E"X%a߹uVbLOpAzc6h9^rpzPdhQ9L2p`poA0-Bf~=y<hxb 6#cf tW@x^.n5g 0_9٘:A͠-򅐭P4b!{k r 5A{un 9lEHJ}e8jd ,-+) ~P>McO|f ʧU b:̯ekN~a xE|0K)8pY *d!*P7t==9$u3a`u=H. !Ⱥlt6h%s8y]3Zz|}ʧU7㫛_Bg_EV+gtrLvYGSUƦg`?E-̀S˖cB(DKpرm}, fbcIr Pisذ *l )[ R8v8FwZ|37}Ef{oX.DO YK9(2p` ^TA0-Bd~ЧU>ggO|+=iUuAab]0},Cu0|NR )QL>GCZ [0B Ւ9v])& 6bBsyc؁%3# : VA(DCfpXU. wVyyӪTZc4s)ǁ6&<3ccKv<#aMrdt:$uc12P挛3~>¨AkEZROf7?n WZc0k u@_B!Z V*=/QX蠻\ .lA.Ma6)RgL " @UN#"PNPᴂ&,c|(f.wM0IJpP8>Ja~ [!"PNwMs*4/뷘zr$,ڭ>Q!p{@Lˀ#38>W>DO_Wɜ I F@ף;̘::g%D(F ! B [ Pa zo!bKzE*~g[qu^E@ߏ8?ēPqU}]Brd $D$8*h~qWB~gND}l@Dqv@NicQE<"gEŗ<2?(s4Dķ(&-2wdJ:hLx>Q|<3V>Q쁿ʁr`I̿́hs`YOU_ϕH5ȧ/%jm[æYQ7&FHB}f E5E/D0*d?l }+4\[Am!έ`0> ꅑ~YN!@Ӕz, ڡ dJ`0ʛnQ [xې /ExPTՙ޷2xbX>QX5|Ī{UvvϷNZw[Cl숉"!^Jn80BzGc(/I 茫acZ?#VLaze 5#;n^T J lA>qT5ର`Z[T w~]nɇ'V2V}G4aoGO%E#Xׯ١* nJ l .  ]w~.$rpwѿ,!f,WXtEaFä7'.!  >En~7aTA3aL>QW>QQ㧷@-m.%?r|A89Y'*kyMEсUp|6G4Ko8( n&A'+\'}J⫛S}X"aay-d9DcpȖҘhPm|0ڶ qhP R4p}l~վe"&WCfL$4y%"Fnkl` T5 _~ x7k;dV?Jș nꕏzek"$xiH Bg>-9N+ > y%*AQ208ŲDDCT>1M J>9m kj B q@`,kPyѯ~\>{֢3V*L5'V$FlZ(\N5Y`m[B 7~>Q̅'VωOT>{9KT>ATA2d^Ӹ$lbY$~l SLKFr4 F'(Y5N( n(3x|?ONo𑂬CzHR YٚBF^G=:_0~"(Jב| }YNY+bNүJB@o"QR-Ր;/VD B%Kp7WD9zC>cl3D )× 2dsġ2Xʼ.WfπogNXx ?l/DBf wgt= k'|9hNu giᛂ@ #ֶLvӰ*hB--+o~NS^ֺX pzmF۫2\ [sTc[Kr ٌN_[C; x5+mtg~a$`(oщ># ]`QtA*P:שrܚmDzv@%?jlw)9|:+|@l̀#O/Y9t/M %y&\׸-l P5'Ds]c|,7ix7s'3Q{'n؀HchSiT@U4LEʶͿj, PYxᨓmU҆|GX;tEY&h([R;JS < Ԧ!+X F>#,;Y,gc a$$O^Ԇ)oi^$kfRxi2MV\"I_3f@  HkkJw:`8.i  PI.VgbxbgcEcm :2Zlz'V>3X9W%侺k2Lqɑ*} Ei%CD)aNjV6`Lc bK[ TA3 5m28ۜ_Kr/O&g%%ފ'Ѷ" d@X$Uh'* ~;w@UoEU2U0"ިT UxGVDVr#ְ2Hc)J˧7N*dѰ{؂ 5q|~xPQ5v`iXe9 JfH(m>؆"杲YFЅڜ]UCŪ؂ 5qI`Ht nN7$wvȀ L}DPO b,eDްG,  `E߁uP=$xbXD1|bX́>cs\DuWyuWy~zszOT>{'Vgv{rwFM nyzYNic47ͧSKn$ 3 ıDcv7P13nN| gM1PILNxa-=PiTɰd7N4"α qT큫"sːZ~ASUc{!9L3,H@AQpQsZF]Ng2rE)z e1 dU d,_  @׶qۉX  ".}OjNWFxe9 VcNqa0dVkj+x\'^۷ۖ<Y `X>SXqXDTA?B9?șN7|*ӔU]mпe4 p"ؔiY~N4"αrxbXD @R\kT+vJ-RDMVػ9 NBo8(omCgZ8jO@TJK`aӕ]D58fl -+VB 7~~:>(ppl,^"Lcg3>"-Qe:DU`*'Z!m#HLB$KpD3DTAr&񎱁u6gরܣg^i41ҟ"᮳-!pg8+o2#Lc bKo)O+N|θ+{{8sv*c3TPpwNbOH+5~+](-<32B-^mhh . N8C_0\'*+'*|/!HoX|fjdh#l+PvCaa%GQpC7c'Xy9}:=QX "(b%_־1LJ0QiWLFbK!ďamq5Jg/p(jhџ?"N;|zzQ|X='V>sPW>sd^Ir5u&2>=/ 찴xSV|Ml\<5I^c,X;T Yz%78Xb%8F(49AC# 4)J5Ԅ؂P R4p~1gDDursbOT>OT>XTA3TA3XXl?yƗ gEWp:k⍞K[TH"wGչ5lm`'Nd Ы $  _?:SRTԴ@f[tZh*5}o+-<36++ "k3r '*sPy΁Koblş[o-_| ncehP^^`;aL찧e9|iq2^"jEiܝSHdG56pDZ]L P'IߧOT>ǖX>ct\Ms b9j37 ǢDŽB_3clgNF}6[%Kp7b>sOT>{AT>>ʼnՉՙә1Xxbubu)>ǕOT>{lqzsz p'zW؅S#zNJ"af9m( bP#N:` `u[A45A/DBf w>X='V>Q|jA yYNYƼg fF( h$l]QÉA5yhl- PYx[>Q%QxKxF +t,/֋[s4i @i=9m0UyƉ>-:?'+N|N|:Wg\x3Kxpf+,:]%t,$XS=aݜi2 S9؀= ! ρ=QC~*[NsTg ]Y`q:|PX+s?<[r_lB9 Lb+0^j넑ix&o,D3O W_a )%SSiWҷMWZ 0 U@4Nj| QP}T t,J#fEV8Ŀ|A5L~x MrU \+-&`EE7>sPllUN#^Tkr5VMki=WOUD"׻h[7ɭ+Vchl1͟?n~G7[Ds\暠e9%Q5hW@wв uL#0 ̜%veGch4.(n #Yg8?jVFv2eZ;P9F7M }(kh%*ҶMS߭a  `'E7 TAufωOT܁: +xįǰJFTB-ܷ%/cmNU(U0ZM yV'DB}d w~3c೻͛ mۼ)^D ' 3ٙS 6gN¡ S#6N2wÛ=_f%F ftgj`Msgk% D @8UAe54P'XB}d w~纩0t(𲜉Q]N_3*v!Nh^F JЧAh-# o$'6Kl/I'*O/|f˜WΧm{ ΀I $өm~|D)O/vc43n{oN;ym?&\K˫[JTXɺ :7ͬ(&ΛQLl /O 'xЂ]P u5A>QZ>Q>Q^DusƕOT>ǕOT>OT>ʼnsbUe5ta ˚p |@gؒ/'|ň4qEؤ"N]2oUmpf$ hP$\4ȶxx{!h}D- &RVtVX!FJFk=@R j0 rCþn c "c}9|UvSIHK?#-}l J H}u+Ow@{!9!h(N0|vB|&3}}f y[Tյ큍kNXsHo}8H/ Ko|fB0~?G큅?W{ -d%4wžrLAJ '形!\#[HKɴhZz07]c|,:g|NO:cרn>#Q 3SOT^ST&%A=7'+qҜ]b ^HWL·Xl7Oܶ $^~SD@]fw~AuPyꝤ|U;SJp{Q S4XMUj[MKX>U,h8&'ռ X7 F\8x{kX)mHl>( n(xC!wk~Y^ؼhرSӥm>`h@"'t՚@kT}57Y0i02yJ4ty#J,LAmׯ^ ؼw8UJ>c90!U(prX̢;Ol4ѭ0 S;nj23bhl^{n8N~\&`|V܌Uދ):&*ޛ2M 01>e $f8H P>{AuPYT>YգPuX^rѷ eJa>+$ɖҟBDUX"A̭Ai0/t^Amsu M*!N'*C!;\.NxMU)3ԱQĢD~+P$ l&kYxy8TAE<)$גQq10ƜJ -^`Ӆ/ڜwdJo ϸ:=/i, *cNK7i,:o@bZ|4KeUґ>mLECGBP R4q|9!8FhLGc0Gcb&ގM&kiOe{! }g"T'~) g6 H|J ZW04K~,XԞ؂P Q4P>Q9iNKB=Jh|Q9GxeBsΘJ. D Qh@F/VB| 7~{AT:S*hkq_PtPVFb=lc3F8&N%FCcj#ADB$IQ`AnFҺDrT9&Mc!B\< + typ򅝈,|DD"!N cz*]|>N[FFx,'c"Z k0ј«681 e ȴꉆl^;QpoΨzN|98::dJ;V韌sP}qU*qX/joJo*_bUblv]albU?1TAursr>Q9큡+/ۭAqa <jCMP5 @#`a4&p2s76HqzL|>}b$82o4nEM7d-mo2ihl|0XLA4`/TB 7~QĪcyrWpUnb6b_j׷~3[UB58XV_X+ߊ+T`R\ lm -clX+w-Ŗԍ`ϣ`J3ZzMsuIpрq c R4pc>sQyoB/3@h$וRSw(+,,qXV-uem( pD3 :EUfă2Ne -[F[؃.TdpL e@,^;]t$z+uM9>dRx%+ P{ M[d(IJe(vch4.8oD|N|3W׺z,E3(GB*͇r$>#NX [| P R4p?]>c6gTAusOTX{ @4b1e ?@xX:L>/ti`$2~Jl ѭ`Ә y"!.+R ϔE{ĕ!܋.Pqѓ6} y䖀=hP^K\ ]n/%&"}3N8n(<믓{~/L]rogr_㚠 =>D ˕.B~l6۫(hk"Jky?.*@Z3,:,BMP\X.fmi^JT,βԡTC0Ѽ8^z8o^?93*T9kok~&ai.ziUkvMӌD[ҍ݆C{UzDmjhh!^z8 9:Se|:=9:*`jQN2M+hp0@(`%ndwsT ؂ R4qgXDY|PTAgnnJpdM9dQP^\m obYb%9F|b9wv'Ҿ9VdH^84 y+: |fyFU*wT w\o `MQmG:WۘQ6^TeX 3 n6@c+Ø ["N g'*֖h.:e}hSaU׾A D {T{TC5( ͉Pbk+$ x!%kp1 '*'*z*['g'=_o\t\q̓-™𖊿Eb\@]i53UȶpaʉKn!+c P/YG,XRe9~Ѐذ. l!4D}oaRwsg PDs@/Xb{ ͇D3sDuzɁT9ӲPh X,gRd-$ViSHx{+M` ZBbhl> (vƒ14 ?w0 7g{e :y99֟ok/ip,:%ОC CcK_D;Ud[ea| k"~;O&|L<3o:_0<w?='*='*=:3O[Tݶ .킉Nf+vHf@Ѡt"FFA;@ŀ"!Nt'vBoΤ9'*=g8=9=z3Nl|>̘Nα5 ~0 QSM Jd }Bq\JG9cBí`to D vA%CU`:KT>Sq3V>ǕOT>AuP~2w΁ELO<9}ꌫ'*k+!"q9[5 %YtQsA7]Իpŵ}@JY ߁*Ȯ9S"F9յ*vu%ʕHpn/$IxVVmIl .z G:(*SAg*2Vb5~vzXDx f_Э Z ה40^^U+qVt[ 'c[C{@7m'D@|7~{STe.X9ޟ"WO'Gj||{:7"}Vcᔫ̏ &x q\r]RY̏ASg!)|l%խ&?UY[<] qQ4Ac g! ku4V \t=Ly2 &B9  \q[@ gqYZ xd%{,vi`%TX>n{*$ڦBTaa-&[}38'zK&݊9Xw;α^/IJۋl0z률d+e(:IR [" >; :eçKT>3OT>{T7NBn%ىF^''hndH[Zq߼?YwcڴM9y*/əDS p ɘ.a Ϥ hLS/˩0i|#֥w UQ]{^Eh[vl DCqB$IRpG7^>yj='V>Q>s WAUeV;J4H,g4.t${lm:&e 2߈Xy1Až┰ WbLWJ&JI $ D;NUA4..en~pֳz]UBc w~c5 z>QWsṔ>c9G2/'g,̽t4 PIdKHTґinʭ~l +dl6 `/U ߈D37IjWUus8]iYHIj4(]m03 "!No::/ŧ~USvyp$VZXQ.`%p$bcGL R"vqXrs(w($X^t*7X\ bHJ(L@ Jg6A$`T@7~UF_#2rss'cNNϝBs'ѰNݱ"Q~zfCc0~uS_e,0.8|lFvOd㏹ {OdJ'f%IQ`Aͅ,'V'V'VytωSTED[}s*;l*FR='ތu3Vލ(ۂTu>( n(zMNV3VO+);%1(D'2U"UHxF Ee6Z qZ4@ 4ռoP(P gRQ`RaEhWV]? Rav2ظm- /E ~s\TA3[ļ Xe0FnqϏؐ#C6[JnЙ> Nn~,?"ډd[5Vpwo'*7LmNDq UiQ USvP>Q=R۶y0D3QDTAu W,ҥj)#_75: ۰aVZ'Fsje⛐*P,| _!DAt[ - *.$g ,DCj) ~ ֘`vlqذjvW0R]|2y$*S[XL[wk [ l~b4(ݨȬ6VDC B%Kp||\XDDs\sg}/x.cqTx|ru*dJl>l(cs\>c~P=U,bq~so(1~qAE+V.K$rF6؀k l beJ5A4'T 7uY'x^qNxN"^f^STݒ[`k.(҂+ zJ 516@+ >&֠1X *SY"a]$M.˴ fWZ6+Nݴ <3lnNU*g`D@dw~Du`yDlqbubububUĪcUn[=Z| *o*o*7X>>QX'Vω>QW>cuPT'[w~I [G /$UU fDݞ@ggQ;\oW° TӠ; n%*9pd6R 3Q϶ZrX 5^۪(LFҍHtk WB 5qOT>sIOT>ǕXe ; c9cg(]w0zPu \0WV͡{kxlH~}» /]J'U#@^ :ܬ^d 0ڠukXVͷM# މ~3OTNG˹OT>ǕOT9vrDϢHљbD"Hd.ԫ 'b5Hհ:gB 5q~3V>>{Չ՟AuP P%1U*oh'Dv6]舥,ƇB$Kpw3=rC.Phe9.HzY F`^:ÄDѼ56pmu3$ʋwqQ@8KT>\' >zF%%˗̙Q v/!4`^9[JI2KF Hf>i|w|@}Z!6Fe8֢+n.tfƺ%5lzf4c3^x)n84b Uu`4ǬZ i/$/>҇imiE ߎxP=y?a3V>ǕOT>կbi?Uej$V]eһh׆cӮ .W5wnFE**Wz@}FKv׾,r֯KEz*?6!qO~z74 `D|[Q$ߊE ni0oJ, * ʃA%Lؓ{(P,HY>FUQ`Lm HJYiEQ`1ububu޲~UGr+ ) %E&xƧ/4+w+Q>),`T=K$A^\࿫o| s&Rsg7\jH (tႍv篷>D5AU6_T^ "Q|o|&Uۨҿտ,V>sP>QXD5^o cEO^ WJ["Vo J l!|% "҈L v@CT'_<'V ?i9JPN!-/檻l$+Pp P(%a'M!uNdH>( (B|-sPW>QnfLfA/Gų恧>OT>XQ3lM=d{5FW@w`{^Yj?@F7 F@8w6 LCA%GVpG7D3X='V>OT>{OT{̷(fpaJ{ yKLo}0WSb0yʦ |g3%ao#F"ӂhl` 4XZj565:B$opUK}%ņMm¾EċxkdF o?m B-›᭡=F狊"!^;ϯ)m_~\޸8~Y'&,"1wä2(PM` -DCQxZ|`Q}DslDr\qOT>W>QX7ф7;,A #m5IV{ÖWFҙ-n i Z"^;:,*&|>|+|@"K}\>*㕃},tYj[?f,_mF @8 HUA3ҟ?".R;='*9i8d'ee"CR`rinBOCj%lV0FW8zjxHs`eq̃> .60rt򸗫-xյ^9:xinbp@h6L{ \˥wbnT:cJ,7v+rO4(p1.H>\gX1+<5k>UҐ~GR[\(-<3\eHCu%EpL~PTU)FO?b5КQibd%|2.ZUV8#@"!^O-ǨZT8>=9=+g)2lnZ#=k@)`7f]% ,o B l ]n+Nzn(+ne$1}v+~e YVҲߍ4OK >Oe۴6Q/E dX Nѩ XЫ1u \p%Q L l[[!jhl^8f?jCJ8N+p[4M%T.-4\lcGL R4p͇nXDC5 usKߝX./bC!rY_|q+x~s~M{{3HAOSyƛy:B/i62Oum&苋{&o@[ՓPM|{Hno8@'JEӮn$ nϗm-dѼ u;hоH]2C s^13 bҲg~f| 03 bRG; -cg|'*=Lx9.nT4`}/4`ۀ(tLQ4(]$:<666^z8N?|V?+μ錫?G J/%h!Vhpߋ@# [h['! gu[! Vh2o`P gMVuɇЕF/{IeRVI `sQ`314"'DB|$ o(vlp8Z3PZ-h[æфL>2]n%IQ`AM>[>Q̈́Q'>'V^Ut_6n2-XpYnJY^%U*4L5LL M}PQQ^^UDN\T96A|H)@0#NC-d_~ф#{vsNsia?Jo|ƒiT/Qᇯ_l;o` Xc-a7l>sOTzx;NhNؤO)ך'A319^ev8Ϭ 6]h$xxnj~ HP|&x@ æA+d/zxhv)Mh|oXU%"Q4-XCW|2ZQQ'7T82ѫ)x4fϝTy\NO+g|}OxN|+=g|+0~t5Ht@bt\ktOT+ JLrV5cz=Dwaih8+iMi[oO%<` o,QF8,iM 'EEwh'a<'V>Qay(te9R`)L=lbeڤuNVb6^H4u4p'14`D@7~5 z>cmVr*P qt{ ̲sWYHl֠4bĉjx4'/DBd w~OT>GϧT հ2T ظaoxö&s]‘хх0o$о 0 :cHdgesW"s]ȿIhcOTs\=3Vnl{M5q2`l|ꄻoRHdFcF ֠4H f8_mL & 'EE7\AǓ{ wrlʺxUwy޼%¡5H;ŋ"!^J9N?r7Sr 6k4+6kŽf\FyeѷM (-~ad {j#LF:/Cq<!_2d^WhPm9!͗1C'x)n8~9g}Ɗ|yNshLUiyhV\3o J l!>)`.DˏW4}fBLصa&vFUpwK5H@i4(6 $ԟjpy!VB 7~}~Y/o m_?VW/?Q>{lᆭpDzp |_\)6B@tpe<nҪLH.q%IRpG7^>OT>{OT>gM>Q쁱ig:rr}tmVrOWl@gJnDBp*QW0hPl[Cmh^-n8G%kc!eX[YN`bHkģLNwN#QjPm` Z qPA4/TBd w`ߎX'#3"^HXqQ9ʄM75~O_](5R@J$kZp~O U Q^\TgONlc3TA4[n ߃,t)4Menhi:epPn-*d { 7.2NHP^^xbX_xEU#+Jx莿 2'w d`&X U"z(`2‘ w?1à8CZ P<3V>OT>{YgT<|@DZJ=ViŪXe.dU[[ʗp{{ҸG,[|C|.ka6,v £Иxo(&r "cc!RO7>( n(S vӯP2jl%O[zZ J٣<0DnjkP:ȉ(5 x(3Ae605q6 ,ؙ$B5n5Exaoo cSYZT~]Q.9 O\ >ppJX![%RDgFB:y+UDcvA$ipAI~V: {zGչzC 2 s,{=ڜi2 S![Aɰn[ [ "N;Skd>Q|>{AT>ʼnsbXTA8 l4YNGib`-I3 gQ"*֠4p'q|34G R4p3V>Q>Q>gB̫}+|fv?e{O|C1t9`[Sy6+`XH!g2RLl lPm`l DAUtAgVp7X>_EN<=uW<^K nbfCoXvN،\wt[ejh7[ R4ph}H|2E\_u4cm=Q@$0UBpX4 EA#0D넍,>&iPPr%D% ^2a-ew ?h}F"_)B&o8먂8j, ]w'toIzXe85W" œ3=Vjulk&Q=3#a:\YHcO?dg@|S.xe/p&kW~^Ʃ<|8 3*Ϋ\ayG_P/Yubc}>|9|gg+'*zO=g|yFVKk0kQ?.ȋDڤ[d[[C.Pl 7*!~;g~g9NNN[wFusbyXTy^/MAuP {o}~B(F=P+ʸ+}EyJ'H.&fiP.,jhWBNn," 7~Gי7='VsXTA3D>Ql}Y 'tt p6G= 4 mU0fchl^z8Fddg+|@N|NS9='*=&7dx7Z#Z4 ZtKv@G{lPNc7 `4,N [ Dc`TBf w~uP=AT_[6Wd<$.޲E{Khofp-_oo[毢p/_Gk~A6ސ7dg8g8zN:9rZ/TTn0 E 070g[x.666B$OS?7-og&<=9=9-|9|g l_7`m%;|w3|d@ K,_ wZH 6L>2DlxK(P->4dDo+x8@ZŭVB|d w~3]Np( Eko㕰$vq `*4)0ȶg "* >7gl=ll%Qx$)!Q>`WCJB mD{ʍ`N[Vmhl^{n8Ã9|>|fB=9:*pJYs7NYϢLXj^ԊDl{! Mh6#5ڼM^  PY~`eNYX8Xsg_hyde#q`+PM#k3~ W U( n(v|_lόJfu̥`m'~_oofq?/E èޏ]|$Hr%JX94bWM5&9l$VK3a6n |DPT@HD :bƯϋs^|iƘu=X/0' ɗe Zɳt/:])* ˄gǖ(WT`@AQ~1ԄЂ0$kp~-~ۗ x)[t 1B Д!]o$; J l!x ҍ 8!$) B>sn ĹfPZRJCjKn|i56sV? ["!^;9|9)9^9͔q5NߓoIi.ʖWD(όHz( aD|߸yg;::ӊ3`w=g@〲~/Y΅HKcNx_ߢ땔D/_V+i[d["6A$:AT@7: )c~Se4/+NFhGWe}\\+vkiYIo9|f”3.c0+cbĢT^p/w9B^`$pj5 &0 r#N 1A4`'TB NIωAuPlq^룷q4V :5|_c9w$xσZ&U^fZ9DWWAh- o6"[1^z8v޹p[%R؊^{WL֧/u[d{X}2E ߾3D3^[L,'NHXL@ӳh|(bgrk:Ч͉/UC)l ["!^;}:,*we|3*9T*odm}/rz@Xa48[kl:}{ǖ? OTgDuzտaqP=ϧpv\aC`ITrCi)GPK"DC<.+[ǺQt3`n+xu[|Du #+<˨JڦN,'S..\(#2֠tbsD[ClԳhP R5pp&l+q9(b©xO?2\Wˬ!{=R6m.4'U>́kz%CVp7^ȫ>[٭4Fv l #ܦAiޖn8Ҙj}|7^x)n8N?|`?tgtAm`1ݾxqf3\ȳNmO?Ul 2 -\c$o B l QC*qqXcQJʵXUWDJlUn̼Ln,t|+XSC-.]1>QŲF )𲌉/=_GXyiXrZm`V%zeFҴ`WmMvB%IpC), aThs&llXt½O.2#D8Zd 3j{!;) o9{sOT>ǕOT>ST%6a9e9jekƂBMP(Yb#DjZv%H5F؂9klVf Z*^;:>cs&S 7Y霅 <F2 5!XT\S\JKb+31 4`TB]d w~3aDZ_#bL_TOpm\:H1q pc4Z,X Z".;=HX8j9ݗ6.oܮdPLKH owk#mޜ4[U:TDbv@AQpwdQմS;`gyavlpIk,A} vQ[~ATʼnbsQ{OPoursb3[h'؞%G܏Jâ \&'WD UЉ6o)f!D^{n8}<Q>>c:țXt SvƁ/cb}(ՠ4ڀIPh262^x)n8CZ+W]Y k/تF=^\J!j#7[VwkPm` d\Q nHCuB$IRpGq\ʆN,%^~PClANĤ49X(-<1ZtfKb47J'O<'OX='V'[xz߹/Aվu|nn?ǖ߰6ggt ,NـY{p:_ӓ0v(_/;u.E.QN³ [Ck|l/XBd wtUSk]?0|*NE7/ubPB l ;UAWJ؀}`#)xC P='l3V>ǕOT>^F熚^Y%,-\c :D"V."Nˊ^&fN|{!%k~X[Ci^SpX[\շ^=ցRU6,רt=[kXH g߮3m\'@gPʅ*ݒ -2UHoAh0 lchlN8), O9V=`ɴ}t+ Et02gO WTb%"n.WXĈxNWkj 'EEwhTA3aL>{OTNμ) ܼnF]p> &L~'B͕F@8趂i- -Ym pie^#NtNK< U!@b%ՏQ L l!K5zil- E ddxbX-yQmNPeq^vWʃFUՠ4I@Z,^;sg8?&yҙ t($GUe#V2OYhB\HrJ4%M )'.PYɃꅩ[x^މ_t;r"%B[d[;j~mhh!^8G _z`~=0?z`ۇ4Ko=}#PT^I@: T'.RWqa${Y`aM;҇Q_ciF֚'EEA8;uLFSItTn%qtvW|B oOTl\l'DB  vr xUHǹ>ĕR$6Z{+P:jZ椉'!UCˋޗdY*|vQ|?Dt@DP!i* rgV*٢5H ;ii&ku*,) Wz:,qwFF{ݶB!Z qH1wFzxg^;9lHHP#g+B!Z 6"̇>#ЧU>O_g:?12ܲK[?܂+T#˨OS90L2~e0XnsXM#_m[=a &׈A ,U4T* R,LRBy0Pҽ*2PnHteA(XEioM@_u:V f'` aںm0T^ϱCb5a0 XQm CA)imw(\>Uת;lpƚU((+Jq__ě"–@@ `0P҈@[B!: Qt̊T1|\Xx>ƑA%7E웃Tp "fyVB)DI`Pw] we-[=VOoKwXk lӐmX{]Uת;lWei8`az3,Ej8%zޛcm-cx$Zn&|O&N},™m?C^2kGZVv'KipPe` ?0!-Bd~sƵʟU[5OV̄)ī?3);5ztW8f_X SB#f\0 -6h);. iLW>+Vl_N>z6J>V5WuUa1vφ…LYCJ1FF1F -a_|+cW6|宱A4:e0"]8^\NA0ٳU3[Uk cAÀr/u@gXGB:(l!p:^tYen}X7}ZJb\A]1O6<,zG*Ggg^cӪW7O1>} UNkOd`&C{e.mQ.{se` aE X Z-}oV]Uw,W>O|FO|F=VW>>>}_|S%n@툏:1^Q#.Pe$F Ӟ-L ֪𯿶Bz3ӎÔfk{K,a CpT`؞8<4N|E TIB(TKpc>3|Z3eȆNh= ևsCa27oÆQj*&Kf)XIa`۳|Z4_ྴ:O5OWV- ph3`%`41:鰓H`J!:s=pt1V'[Ti5?8h?DTub"`Vڭ }3[giWW7>}u3|X̞jS~sVߜ6 Βkۗ 7YiܾŒ`:l_0~"g 2\X_ [6\ IpPt!B(DKp7_UתkOg7@ٯ|Z_]_]_l[,?9x2 Hp!k4C QY @G-B(DKpqw=VQfD`.! uItcRK5pQR*% lpͶ (SnjOA߷~~#fʧU1t,b2!wʆ,%Cg(_m!^u`VksXnT#`lZh)N;z,sTYj'@R9yGlU{x"aVj~WXGAPW *OתX:ۄY uF>- qXק&CgQ">2`%pD|d X`agV*Zu%'Ϙ|Z_]_WTu 5?3DzGa7*H0 7)rR!j=eslc B(TKp7Û3ryOc1 ϤWJH/R zأA0-Bd7g,]g&z|f VW>}u{|Ӫ-^7_WONooyqPo=7o*?_1˧UgíWתX3[\cW>XoSwߓ{1wn 5k_~'{EKpwݱm˛noY?*Zu0ې*;^!v~W^'ƴ"]n!d92`5%e~;ON,pp+t$(i&n@Zfz{En([&ICe -Bd7_}s iՍ뫛jg-i+TķJFt qS&nRnV1؂9,Mc72]h);6QegJ #.BY0Kn)2Ul / E0-H :oVn{x**VU^Ĩj.RQ P,g2Fldz2a62fH -a_my^{Au@ LPXb) P6Q`LCʡUy[BP RRFӳոr-|ʧU>3W7*PĶ&J0YAϢ,zhL X.hHؽh6_Sr @𯿶 BJ34UtXkZp/&VCEzRpse` a=4 kp8|Z!$F1Dd`Ƣlh\giei'6 #{eYeۯ.,y4&V玺WX*_'}Z-fOX"Zl0sXos=#UfOo 9MQUnsP|` ~V1ň[B Ւ9v8|W|ʧU7縙ǫWWWWʢz 48֣p? ̰QfBU<3)2s3.`)[@LJ }˧U>3ORYz{`pWwƏI\rE_0w dh8(2bʡ6ڏ&2FRᰃc:IAriUEX(>%=EXDb 2l l [t2#A  wяM>_& ٯ|FOV8tϐcb@JGjVw['3RS1 sPe@ $P98|`d 2D -a]/Cidly$N: x#fy0 f@BA &DW('a$ ̣1 &P&wxB<1pk^~G wT}I ×0J$[n[@06`Bf~ OnW>,VWWW7[\v$*.Tu# m(5K%P0X *(&{3P+n)m= ;xS>}_2".TfҪb >F,/W\e(h9i|cYLF؂ R8v Ž:3V$+~b&:ғVk{Q6L -@l*(h( F\*sܺiW_ݹ}RKpnJ9OgzhIa-P'[ 6ݻ5@06`BT~Mյ=VW>,.c1vQESw XA.G*qUU厰ğ%>3T^6ac:\AIܱ(覨xR9(2` c݊@LJ V*yЧU>gL>} ~5: گ uY**EʮAN /Q.)[(p8츙]q=.bPc1WINxRe#ɧUn| < @B0>(i) h0Pi3JmcfKOoz]9O|FωO_W>#ЧU>#Z|f->}*x.\z7 ߎ]iz1 'uj("7;7;{L$ۻ|ZwO|F W b41pSm=8X^I0JT"y([&?\ A06`%Bt ~#052>3\wDFK/K,܊! o 7a0Vc "?mp-h!;kz<*DqǫZ`F ҞFaf$"H%a_gL>}s*Ӫۯӯ㫛->rܯb!KG~E00;#f܊FW]Kqf`{UHתnBTLՌ]g}Zoй0Xێ{EzF*CkrPɉ1\dQ#D*`]Rc pqjʠ._g E ɶ9a #4@a 9ok3pfH@XF&>ʹjPc0-j4Ypz\ 1Qիo4K YWL"`:MQBc ̭OΝ|O_g89@V@Vܰusb*P/!Ai0d6EO+(Z(f,_ҰE#`Z(h);n~WL_g.\{k*~4`«q¬%.] Ema0*gԯa<*`4PёVBV}Z4(*} ݂q`*ף1 j \ږ Q6D6@ ZJ!Z3 ÖC|& V@V@VǪۯ㫘9X \, t4'B& ;"ɥ$ h'7Z8 B)Dopg>hXNdb|2y{rUn(8p7f!T8eRo4*˾_ӧLs[1ӥsLvu3pPNvG='A',wI=%-|qgC#jc:moBvF J%,Ab ܩq1TI7y <]k823"ͧ6VgFZh)N;nθ9.VWWյMVs2@*^8̡fPG`X#2qNLb*V-ӴAX0zgiٟ~W>iՍ; F#NG3jVNLsH#9d(|e2SpHT\e$)ZjN;!(cR3ܛjN cj-0 @a*9-"p-ŭb+毽'W9ܥvo‡7cRuZg<3zsEQ9o$$t馵Oh*"Lketh)D?pX7[.O>}_]c>=ʧnz|+V@F"~ O;; &~7op| _"(NQLp_+\Le2X `-aXd{z,e=*جokdUUd=~[L_F?*q3g\Uת&s߲EORXBYb~!/QYt<,0Pdh9(s;XWE9 ZBZ29Z2edm{(&uLۤA4ʑD[ VraܪfUv eUP$P> F3RNA1܄Cj *#H=B(XIa`=2U*eUxWn0N| f^o.80@$ |?f#9#:SzqL DPᴀW=X 0XLK|Pt=s2q 5^BQҙpPe` ƬA W=Y `-isF*Ч|f _DepbQt<: JdV+Sb< #,!@T@~aDK_K"D篊_/ X0P>*B$|3.EB * kXJ*NRc1 cpd`4۟+Tu &^n\N0αXP~oz)21](&C)ʈ:\^0P#LCC/C6ap#d OJhoeRyt/0AJ\lĀ)`5wA"0voJQ\ p92t+J "2v4omr8biR{SƌggFӣ%<}=Wʮ -E B([`A0-Bd~g~iiӪ-nxGllW>s\8|jg'ӹU$#N"Y,Aqfaބb0 57b$Ql7+-Q*Ӫ;f~u3?*9ЧU>#el)1 gz`iХ__a In3Sӈ FP ZoVej?(c[תXug3}ghib#j9VK\vд0q w}S/2ؠ^O_1e|VB(DǤ3VMF> ,)#U{2p#XOXvN9k D<,IhAQ`6j4CpP81AXo*` P VR9X+&;hW,XO՝[+c753URŢc&ڒSS BC4ah, *@*(, ,VPk&J1P֧r=4)6j8(2`SsX}bRA~i O`/cw> ;Y Բ=֛XpPpݍI)utB!Z khiO_gxu}_g(_gV*9Zu*{|snqzU>J%3`C^\lAT 1 a,n wA:] l$Xam1\pb|W^<3P˄ O•/0ޘ :XeDD ђ9vܼW^G_fgV*ZnfO+g^^dUlIxacJ nP6Θ-"P:A 0ɀ`+7Q B)Dopc>SrX\BNO S}$?PO#5Ԥ0,f,4)$i/ @zF'ԯ|i4k 38M҅O℺ӫ1x46> \pJTxl?Zl7Q` 9.:A0`-BW=O˞HPfFSh2̆b=yT(u˗i-(iOc;/_5+|WWOV.յZuV]Yu[O*I7IȈbo ^b~RxAsD)T9(" Sfb#`BVB)DkpZ`- 3 I {}K["-o0e\X,hRa+xqx@)&Þߘx Z}I [“wpalcnuU34WX /:V >sI>P/M1 $/Ay^ R8v` v\qc1{ȨGm۱ON*#'K* pKIO!<ՊE]U~P+(ՆH m ©XFJAa E$6~s@2$LZ29ѧUw_̄>}*§U7+VX[R[3+fDv /RkkvexuPn)*P l!X krF@ UVe/fM>1Z5a( ]P$F "* 0ixomɚF؂P R9vChM&43wڋcdHom=o';; [ ̟ } }Zsٷ|*Q̦->ӞwuJkW'yOz.Ӂa J@zB æ-`h *((N#[>gi~W7[WPb- &\`sR a@')Az° tEl!; 081|k{ٯ|ZsiՍ뫛-;VY#3Mz,fZcyYc;M3**t ZD"kf(fOD`ZF(uP QV5g+y0CE~цTe%3bD]G"9Xp Qxf0nTC QB)DIpXqֻO|F4zpAM5zTx8j̎F0[pSCNMRA` fBN;+pVuϮ*siW_+V@9ЧU>#ЧU7W>}+ZQ9pU(N.}\ >h([&Ikcw*h); Vݜ0[u\`0۪P^Ndak^rv^`ضzg&ٻn'(3(<͓|dw4g]m pFMÆ+7 @'B!Z 9?d=vUZֳ P8`Ag('0];M3Psp7`A0`-B7߽Z5 >H1<11FE#ݹ93d9#`*f]p'[l!P՘.3_cU[02Vpqb*^O (;߽EF`{%C m .ָ$9U(P R8vܜ8z|Zu#`O?W?3[D`g>}ZuW7<'㫛-תX3[gk{ٯ|ZuGۯn'ٯUgf'\*9T٪nʴ)4]}3aWf[$oo2ZuVݵ;oV*sA}FOnW7'}ʧU7[W>ōDObO@ ,޳p~b>U_3|\0L"`S6{TH*((0_9:li&%L(3XpPXSbo [ -a\xzU>swW|fk{ٯ|Z3W>=ʧ|+V~~*ʧU+'~`bzP[R'VeBvO)*f l!Uz7PaA0-Bf~=JK1zڈPK rs)_M!&`i*jy J`wQZFd D՟*_fU@-^0,A 4F}e~s"OC"[تj0&L+Ŗ$c8G+a-EK!Z Y=F{"ЫUQ7hDVL;eVEܛy@Vap$ &ŶC(@wU@ud~4 \څ~ & 5 Wl Z'NKHfm9p [JZ*qsrڻ*)0XLeᄯ zTN9*P,_^Bo(% B ~Cp Бp}WLg4yoO c*#çUg6ڬWs <'剼c=*aMf-QPSA{Ffx=}m42VB)XIpX7Uתkյ'Y>'>}_]c~*siWM'@=iUǃ^hxd +։5-pG(aUe bUc VB)Dk`kյYӣ ~G5`ܧ`< 2 WPVj8(Lg "žEeЖ"FĦ%l]8FҔ LEt ZSL 8P@Aa!qțNa8DRogiWW>}_@Vܰ0 4qCX(,3j($Aa!]ƨ_ÚF+a]RïǮU*\+ ?3VJyP(^y_6E·A`-Hr,FH:"7?k{S?+Vk{ٯ|.`_@=i SX91=a,07 D́W`Nj}l2rPd` T(9 1J!zova\Uw{|0F`kpDP[4Zϴ1JB %7hs S[&Pi߾4 iWkXLzuu}j\-SppEȍn72WZh);a4Vcu&?&9P쿅bBQdk4r81oçU>gPתUϪӼZU9Lkjc1^q0lcq` Mݎu%œDp`z6|C0VO v ¡+ rd`*lb~௿(O#*3 x'MW/y)V~uǫgVǪHsfPc1A!w\p PS*skR 9(QL@R ZBZ29çUN{˱ا|k{=sͦQ$LŹ^7y*t.A 6a("AB&oe¯|kյ[ՠa`ĪU{6 Ԭ֟VaoCmضB!Zm~3ϹO_+)Vqe.,fsŬl(}7ٳMu_u̵~]џD+iw7y+pj~,fb-롣P* G멍b)3-Q3<&( Xa_wLתX_4ӹE- >a~431נX^Jd(pe` hsgc B(TKp7Uת O__W>}Z3[`eYzU)Ҳ`"rIOU3AoFh`L ufyQzLK : }=c֍?o,aZ1v/Y0P)IR,yr`d` t9(Zoc B(Top7} g^_W7['rp0c1: nz_O  3U75•CXC\e-X z5q8q8 9},&c0>Tqϱ'W.$kbP _rKi+\Q0> l8=6hF*(N#˧U^g}^2HYx*Zp 0o#bXnpd@ J9ܱe2X a8iuNdX٘k|aʐl4ap+V6&q7d+! +[ӷ*EnXQ(+cO_~5WSC흭jvĝ{Y(ɡِ9leaY Ŵf)i/_߭f?1|FUV|Tb c1v/%=op\pQ^E 4F؂1uP.uEEi~7a`x9ei0d]a;|_\p]c^`Q f ji#Y]ԓևڳJ]3A%1ˠC{b |;WjwtA*fxOkF R8ve˥|Zv4VĪ8ր$3lSKP`hXch ,5axrPe` Ƭk9 A0-~8q0;CIH K fCn/N"Ii0`08L,&giUZg4s41L .8,> x(C!zX3@` Bf? cA(XEi__9 kHA x]wKn J8l`Z7|42}4Z֒8|z"CK1ߘ( pbXD?C)Խa: +!5s8;pgp[ő> \_ivϬ([&͡F8e-X P-iٶ"VjgܱS\ՖA;^ n Nhc|Oi J : C.~5V'k:?oդ 5ϯ[t=kT ~m߶oiBXG?p "fBH4ܻ<41*a"`"u,@ZATGfpZwPV*çU>#gJ߬߬Y5Y kw~iՍW#ٻ|f@=d@;>ea[|Y+9h'=plTM) )62`]T32т(=vVajȃNlL p !qP=(GKQn"acÁa!scTX-ns62B(TopqCE`icwܟ1;iH#i/cBMQ;}5 l!cCpq ZJ!z3959çU_ׯ?W+j?g}F`XO5|,6mƓO6%ibb)2 i 9(ad -T P-i_gi9t<#U\)҃,0; +T [g=bK"fwuK  1*=˧U>#83}Z3UgfwlU!˯" DuO3 ͧPXlJ6i2ʫ߉'jfA[xU~gݤݯ|TW/A^Uq;zVݓwK P,gl8(\c$T8*m!"db~a iϮӪյZu+1w-ЛU>G?OeWUjX {6c)Fzp#2v-§Un{C_]cߓ-|gV]nfOd ~Nx`ra.HM*W+VpU`( pC R583^tUin~]>k{ٯrXb/\^r-8&Aeb "3 h7HF(P R8vUg&+MujZ*rD-E`1l (j^  ژ EeB!Z q*Ͻ˛U7\ÀPNi},NP^f l ,7`e*N;eznJO^U7_UgHuT׷ć7:2^I'nfx}ҦX(FۃU@/* 7?M; __Y_iľd}Rlg-"F V0'\67 NI3dsp@sFB=.תX_F{|sWl[EmU:ʸ/4 < au\dX7Hmoޜ_>}_@=il*_#0;[>".[!6ᠰ ¹݆!˰qqh }Zst l8LL|Qk c8lC`;<6Eze@ Iw\.s`cP9X؀U U9FudxzU>"@1JXZEa4CpPDYpf&"fP %o^cτ 2IFkPc1ӂ;rO "m l!;C([e-X -a8LvxAP  f=#xjsХtՂx^r,O"pe` dG9D^#al!Z֒8|ï|fV@V||ts*DpťϯgzKGXxMySq.fB0kC^cr[Ђ7s88 F4?3{6m$Ts( GS0+rrXے ÖϢ4?-e˥U>#ЧUpsP2IVʼ+OrƩCtos%}1F Pw3UIJv, |%B^#i\ E SI+a-CrC+[(p8p1j2ݻ|BC6Q(ʩƳl;X:ضȰ}$K!Z>V|ӻdcuU FޘcSus0øo/`)ޭŴf)DIfpXo9BwṼ_'sRR]˂o[`.|5 l/5%pIͭ?+VM l bAmFBU` U9Fuτ\9Z4 45` 4C (U  KLK!ʦhh!p8p1s2Wr/#K^ P-E/([&p0962fB!Z i://-9v'>@{{b. 82QafZ,`h JM N+fCV[hMOrF|"H3 ˉi(O3Fr"?1e8SeTaǍwšOn^_Y_\|iroO8 *HJe,^L{"⾤A`' GRGZ#bSw V9.O|FOnW \5TXĀ;{!2f;c Pt9(\,dK:-2FŦ`%5o g+VY{O_ǵN}#8d;mzپ+p ni Fge1ksm [J!Z ׵LLV_kJpeH%T7H~>Je~Zk%8p8oxp_]ć}55_|5?N$Qhb#z#%D,S TjNKi([J)fElj0F|giՍ_e42?Hp QaV6i("[w2"62fK : >*mPiy:(`[j0g[k[ b֦zٛQQ9Qjd3HB(DKpAdV>[鐌`JJ? ) .fp8pCQA`-qIMJjD@ UV`+> ,`b npf& ,X _/0I='@ݜbi .)(, &Vi᫒$V]5+?BSEB"<(6bVkk3X P ~CЧU;;_]c~uL7of߿ Onz|fv-/TU+5E3H-QavWHa \rqatҌ-#[ -J7v݇3}w==W>O|+V>>ٯUxW>-|p_!9Ͽ'bT-E(V^>-al!Zh);z +L5>2ŪJGX5ESFJrBQg$v/!&-A:2%ae.3B},nj$X1|b3 AIywk# MGrʜ` JISާUwzUz߲Ei [gŐ6at}0XY R8vJ${ LDzxw_ rI•.035{_C9*B~+VfU{V`UVU>Gۯӯ|Z( X?S9=7A*bPRZٿNUi0 PWAWz |}@)DCbp7]n% IoupxT]\plccpt|e*!08 0P_ 7A9b|NPeBٗҤ) /iRMAEVÆQLa9V#`0M`%qfǝ<+;EreBJFW-x `rm kF{F\` z69K3P4vw!9W΁US&|]`ǎA j lŸ}qkF؀5 ѐ&qktb3s ]-n s$gLn^`&#,դ|Z3l7 k9 4F0v.[` j R+Z\F &HH oABUd77 :Z &b:L#.,43;+ O^ʫȸR9(2`ppu2#ahZ0jN;cNv:h7VRF`Tt^5ld)4f%mc VB)DI`|Z3m=i}ʧU7[W7[W%q _XlU0_.cVق}$x=YR'AD66܆-Cb [B!Z  }K YV`^Bq@O4OtO6TY7nD,%a_݌Ԫ4S`]FBGm u R}F]5@C 0xVN9Dye -D aߞceQE/8V&^J .a@L`Lo2Áa`8]{gTQ6ZNCZuӋW%0y {ktPr~fVFA4F03~6KHBLz|ws<3qcsG[XN<6!z}M !I0PѧR)p2Xz6#A  wQ[&hţ%<P˶{eY%=,<6vͤlƮX_=ww]= [wݻ u~X<,qxzUxuy ӷ! C1{l \rfqVVOr +"a*ʧU>E㹶3~fXp}`9#B/h)Ep}3P8ڤAD|TiE"H%oV*§|Xתkյn09ЛU >O)|, >hTV(PF** ̰d("pm\d>$l!2GD ":oV[>>1O; > ~R)99U2L%?z.'K"cM1i.GrFzq?ЀPQMN:pp'PݙI +vT`˂m&k0P$,9hc9Ċ/U\ώ3h)N;n[+2*;tr5tMRm0PEĄsz#mb9A XGapZ8o*Qq/P@:2{Pޯ\^1Rz+ib% &B06nTs ZJ!z3+^eVG6&7iS{=R?x o lA>;d4W([؂P R9vhNl{N$Ή} Nr5ImvK؊rXӢbvZ#f^,h3oOs<6O> 7␃OoEq#*R|T9\(d(9ܒeP(DKpء[;£3nq_Hsx!eRX1)_[@0lR0o:IhՍZuV8]cWW7_~֧U>#fgVʪwhԧLJ0CQ&1k X=i#ڦy9le` dZQFKQ)yU̲j1|Zx̢gc}E_q:>-g|o te>Ч|>}**xǫ;^dnz*t^Q|&L &NJ]&޳&0)ϴ NwYQL۝AKT؀u` Uڟ&ӻ"ЧU>s`*+9iR;Tx)aľ_SHײQk9 o|KEa&ɧU>[p3b | c]k:%g(ZDC5Ya 0C鸷E9ۭD:(h N++ӓxjj.8QBI;Gi[Jas l g[0|3|ZsкgkBB`~,\fQՌėW@Q-]3UcpTFe -T P-iǍw{|ӪWW>g[3K:"KTAX Bm-,aI~<*ЧU>O_Px"xƬ G HԚҳAm2\5WXEoTޘ|ԃ,A@*P6͂>{O_>#Ч|Pj|2ܱDas!5LpO``צ}pPeeD1wy5G>S߂LsXh8'T^7E)28&|xRJ72³s/AOB!Z qsٻ|Z3}f VJ=/&3ёAq @6J & _q 9Q]ƧtK|*XK5y},f%fG.+,M8N^l An0 L|&בrH7Q۝ =VP>J;q7f ^ 9rc{oFfmLr1q B)DKpq{׻ЧU>#ЧU1:̤Ja\;pw!,K1P@yj8(2!{8M" VE )uzU }S%oFlXz2Q ٶX,h);nﺽ뿤w]^aWO|FO|F`,1p"] Y,mgP0d7Tڠ6K{Q6LO\La$ q@3YkյZo'?m ^h /8¢Kn[|0KQ QLijiA0-Bd~=v>{QKXz`cV/B B? !5ndWў # ܘ=T8h ÖP R8v>ЧU7W>ŵZu@OkյZJĶވp¤\VYp:/bUC8r7rPDTܠET·P Q9Vܩໂ@3}Z3}Zu#={|uzU>sEVVKXc1j {- *GS"6A`-S̠T*\/"P±U*PXx J~g1)+̛_">3Z7/B0 իA𯿶BZ2ӎXGGҵp qwZc'uAJ{x \#NKVFMF -m8>9/iiՍ*J\]!fUtWU7  }NPn2Zh);c1܎zxl dXp|>G-xtA E([0 AOF؀P VRV]Si͆Ɇ>Y;_gٯ|ZXJVgf}ʧU>W7o8& .;["laՆI+ 4C pEfIMp@e -D -a8i}1UHU½OU&+,_~ʦ7 `ȗS5[ 8l-B~=*YާUת?kӪWWW?yeƧU>U3\V"|J:#WyXb9 " A0`%Bd~sG~2_?-?iܕu}}oriUA*\XL#dêz#<.q 0YQ-Êbe -T -i]CVUתkd!A1 9&<) &I .2E62I #A0fBB)DoZuV9{|vr+V|U(Ӫӯ|Z3}fkյ xsZuVʧUw~Oi~ӪߵjaLQLb'ׅp_a ]'C:N•.>1nv.W1Zh);tOXD)%$ (;lWȞ3M~˴\C#̻ԡGY7gx]%ηW:w)fШ± rR ! ~6WӔ䌤'}feE\3| j+?4J#`0t8촀@qQak2\j`("l< wΕ x}6oK7AgwQNߩһҞOnWתX_4n6FJyYFS U_"AhXl8(2`y2LF(P R9v84sn*i~ fc83\%09x|S}s3$@t2hkd$ X]T K|vk{ٯrX6ic *VʹfryFVH)^h9h40p2pe-`lZ(h);ơϩ{|*si-R/:Vۀ_z6fȽ$xM#. \OGW5{E%nL~/: @04 B5$ ~*I={"ЧU>O_l_f;c9G>)OY[O.P"dHpǁ}3`0ѝV(yT cRaSa_wL>C{|3[4Ui>3"^SfPmd8qaexMƸM 0 j6^`%{ Bj V*yЧU>#"5ڄ/$lU3T >-E Q? Čoa7nd믭Poqh`3t\B9ҕcOΖ"§ݞ@h0pIF؀4`21f_ggV*\s)Q#a#;CȆi @zFi$m3 zV@ Dcj9@0 ?1(hk{֘83ÿFCzAl( a2?P1BM-`h :(#璓O|FOdѬ$h*L U&z %nTJ[ƍ@k n#w^'֎ZM>/4iO0?NfK~k|5d2 ֪iwlB8*2$ n-$ I;z̧U>SO_)Sq'~#?¦hDk]6Sb'תX_XW^EXe3fz&n|0늅#{=Z6IL6XA0`-B0b;v 4"IR+.m_ `0"RL|n^g髟m6|샖7fd6)&@'m<I ?έnwQ8*Q Rp$qӘXxFc@`b04br4 a%oO ue - TkW}4n{-6@m ,ټ)q4dꌮҋ>ԕӌ{!p\C}Eւm2DpiIN 7+?1֎W&}9A37X'8.Fgaf?G0f/c}A~!`]%ryP;b\2Q ܵ8Cz֞Z|Κ9ڳ_>%#2UhӮZ\e6EY¼WYp0CI!d W0aȨZk=֞ZOzՉω[)YD/_$\$E<`Ksb=c fIk} 5AKa&Qo!:g+L!+{-!!cs AۊyxR0yp + H PpW+Ia&Q鱯]{juFӯΨwJU(jRBsǧi?s2o xv`=[F/Pu`S/%u$M,?&Q鱳ŎVGϼc49ϑ-׏4~v8)GݟaXs21Gv_„f('XaFǴXbnt3.Y۬MV?-V? oS҇҇d{={m05/x`U,_719ثljI`WsLa4/8`ƒkXIIIC`Td) cȭz{jg$\q!`0 \B]oOR\v,!Zαhu:iЙu}{)zGrΦK{oY`Dl~~ ֨P VR/NQYIo<]N{vժK:GIʞduy=y#"h'G%`Fa.,Fb`Bž:jŞZ~uW{ڊ֫WHfI*ubv_!iRxd1)#B20 (8ֳČ؊?eE[ ʽxy[Nlz~:_E0]}0PʊɰZ (0-i>|X0k](<ƙ\Tq\C*pcV{ƌ=mg8Z=G=ŞZVGՙ1pO[mK|uzRYY,p$-̄qG{Cp0LJpqVURRym2eݝqbq`ZXZ^~6M}oOTg*xl}mg8Z=Gӯxu.KU;M:9}OB eS?aTDsu~BsɐyVpŗ ǯ+'/gO5ط_m&Mnl4J7%NVk21a s0cikZ+ ho*{jg3g{kIPZ"\}PZtV\VNW6~brXOLɨZk===pO=3‰ubVd$^JrN]Tg}cCLKIDIzXܷT`2 -&wkI#S8'^EvQf:sI`5$U^I )_5/<*P)r9vl%M%Q-xj^Ʃ#Zb$_(d(r.(d/疌\C0!RoS=!=Qi`m5K"Yt!2nzp|_q|bxK}K1Vz *@P]R u!젲dq121<2) yp +q,@35!>K10LJpc_Fq p=ڹkm7}V_=V{jgس_o;GvŶZuqd}qU)8`ӂDALZ@uicz_ U 7 {v3 ?_Տݯ>jOSϱc=նZy %_"qגr9bjHSCp^,fnςP0yp +WJ!w$,!V+qƳƞ:ZVYjgdV'Z[}o[D3^=$'^`Ls1{jX1?f2 ;VkRNs b M}Z1D-# PI4rpDY-NrepbGI{9k< 늡"ZU}mg:Z\ {{jhV{_*ujUcڕ3՞Vgz|J_̱+SO S'86n03J=12ׂ]ܥZ^0 C"*kgVGhs 懭 @[(bMyb>s}BardF7y8aRiM۴ UUkkU~޵i}4y!/}%'>+#t/L3NtkY0H f\CK|Ϡ+GC`0)Jiz;'{jgm^*VlU~ [jO4G=4 N)?0;a1kIex‭k:N 3ZRB}ÿ N`X{Hfo+Zl޵V{ZVV'ZƏ<^-jSV~kIPqRu.0fEƼbd;)<&X!0P) ä4 w=C)uPLC+])ըZE>.*ßU.ie첒PW=B${WQ+oz&`QBBV\ u*^79_?ZVgGGhgSMW!VVVmϢ}gM{+o؈UףRQ7p!`KP _F roZRi(#zA@Aan"k ceqKUY{UlR%kBCGjکfh?}gч`)$   ,3fאU<>:`$׶`|lPaDk 7l}a!0P!hnZhhV{{j[՞xbs<ʲ>]VKI4ߔ+ق@'r R6k?"M9 "2e^"@0 ߤ3}A/HK3}B^0Tu9]7S^KUcܮ[R Iinz{c=:-x,O|{%iإ  3 ӫ` lg&!Fžc֞Z1՞Z4jTx5 : ȻVz}JG9=0< (Ȝt$4Ba!BL (Zk=ƞZ{j$w7fό3]/تǒ/m9XhwoK<b͹˳WB`a5$#"LI10Tj%pSBUQ|Yq<דj0_ ^׏A[ܷBcM 0)M}מ㖏-#]_ʇ3_͉3?( 0|\0(`U>âoz 2 &0]a.Iޜ>{-HU 7z\/Z~'[pIǰ&ppZ7-n*9:9W{jiRO@IWW.YG}"2ñ z>-L z2y8}AdJ10Ln]=;iJ,m"3ג꼖y@Ko3ePCŸaŲj/J׊2%-/@0ьM}oO  =pO[qYV-VY UQE|]P``)-c3?V򩂊J *MR3hltWX2 L9 :뻔&T `*_UV%{{)i^EIER aMJGƂYRƷ&PB_X}"l.(} G;XƤ`vkމ1Y(b&Mv|N^k\0h1Ֆ2]lRTw0`X[yE0M9 9K2j'%x)h_򻗻A-/%2֡5X)Q˯&z_Z|Z+VOn*Z%ܭS}9Z9d՞{juW_/?xg V{jJF+U]z؇^C^CUnpӬ~h?47͎> VO*U=2R07v`/RTWr 7^ȵGjϾ$ȓs X'^$IL*] {"I qVĔJ*pI~r\)X4#ߟ^$?韯׿_ZxDR~$'J ~]s]D_?'~ Teq`'.t^}:A"QԳ!'˟8Ì?j?Cf/T?_#A&؃J<߉q)S_%x +p3 9JJ.;PI., `;)Fo|>IqZ廓5|n.Iиxf^˕3gur-RĮD4ģ.'ȼzJ:L[1 䎟8"ʂ!pRFγPKe\"" L {qМh2DjһrkХ%` 8ة+`lչz5Moq&`~S+2Ng!>u3B/h-x:Nz5Z/KzZԒj x2>DE% a(nIZEF,Yɓ Wj[L%f%TBHGN=ŦFc8f:0}d.a  Kŋ<jU1hHS[PXTș:V\#Y^(np&تEj0$jyI%JG0R D(rN4isR|}=T@P08jv)R*5jFFaS$ ,q, "`K+t) 7#!̘0@ȢǞӛQ<]QF6Yb$hJ$g:9ל")_94W'_45d{!mf*LW&nXq7NRXwkF;Mrh(x:MH~T)PVc O) PɏѓQ:`0:4> D9s7 nXP'Ђsj" dm8^RR1!t'v$ 84P0':MxE8 rK<08^93Yp ds?5?#R4`Z#dM;O*zh`όkkZf8W& !fA'(52yg(i6LbnQuNĘAd*WydӆxdCaJ0Qf2r50#3 n1Ab-,z]c%>Yy~1 +ȩS"I-*߾o4%*M,`kx:3HYF (rYٹ D ;5  /~<)GӐL $RՋ4Ũ̮,EAB ~%!S'%NF~2k(ލ< [҅Euȥ."Ѵ Fr\ x88 )#$5$Zeқd3L,)0Xi\hˏ ݸmElڭbbA@5BhH#xH) ? ؋tJ z4M;Hxv,).9Z楃r冇d1", unўس`֮=H/gq9(n":fTnaHXziģ{YXu`HyzfozhwPʪH1Ն=9&Tb3 Y KV0k;+g54 `FHYx`U7;58u٢&*#&1<ȡ6R2ud${S/whKTQ5~+&;Gg^Qp5S'G#u X&f5&> endobj 591 0 obj << /Type /Font /Name /R6 /Subtype /Type1 /BaseFont /Helvetica >> endobj 592 0 obj 117249 endobj 531 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (./fig/likemap-grouped.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 593 0 R /Matrix [1 0 0 1 0 0] /BBox [0 0 490 440] /Resources << /ProcSet [ /PDF /Text ] /Font << /R6 594 0 R >> >> /Length 595 0 R /Filter /FlateDecode >> stream x˲-n_R\:`MvPZ}Wc %y)R"H䬪L$w|_*ڮ_m\?j5x?~~W_~$嫖}po?o~oKY߫~Z_?w?NU~ļL_ZYߥ}=n#j!D(~G$ &xF(q{|ZϯLwYΪL~yz|(=Z 8#y ~#)DA)[۸>?1`JjgҾR߫E}H g";%`Yx/cE>*Eow{F &8M_i<|g`Zw|_˺qW:Ϸ.P×Thz_rmXU#rǚSu ƪ|x(gz}O2x>N{ퟷ|/|]I#S\ߣf69΂s )BR*yOq 5mx~~E 6U2A )l1YApx~A2:U`eMͼqӾ/ilc5A/S0B{Q@q-9c|+8i9A Q@JpXV{47bn} KaLQāAL_42GP]OZGl[Ц ca/s_ V0ئම`p(`ൊvUz ۦuSϏ(.JKsL]ߦa|HD@0Q~1NUT3^&=>ؿ3qDsSY9.jc.xp@7Vzo׍nm8~^#`0_ĕ) "%u;c~ 87 #VṂ=Zp @L_e_dLqBBk:*6Θ}{Vb݂qݙN.m `i 4\E >V!¡WQ\(:>rMG62s)*!`F<兵4pvIs8 ţԠ틾g0?{I+~ƾ8kPiAj7Wp8[@ڇ, <^\!=Q_[0ͷB 6G_i[`[ep KեJP#)Cj;ڿmjiS/iSNڇ4s ʹq_EIPm01 󕸃"$zǟtUa96`d8v3;ή;=k3ST@:c41-L\Jm~S磬0 h&9ֵg챹mhbҾ=>ǂ.7gQN ̥}C ldE^kɞRPDrx-BG?6Á;MLp>!.V  uag >/BܘKt].+o\}WAabp=0Xe<:  L3-y_?Cm]):Oy/ޔ}*Z3Ew@t/s8l# )$%8.>f GJ"ovP wpsȏhpp#9wfRrluɿLkR7oj|ӂJ`\W2l`]t/{ޞyq>s2"Ȯ^1\<&ݼ^Wuv^'D n3*ΨYET}`}@Gpk?$Jqx|CJA JIuBe>G)/NLjEܢVLᑬ4?&/!/u}?1>Ϸ2߱>wv+;AKV 3i`8۷Z_˿AuA0}@xP*L;Ћ[J9?B RHJpxCL/j~ts-2F3yѼmeAOA;w6tV4R@j^f"nWY-Ė֥^8ѸS`BpȦM1ǻRRk@~79p;i1"uӁTC+89@!Jp1 s8LC_݇S?nzwb[_K0;S DpA=ܤTF]K0#($%8|C#š4G: =\Aq\38)[,ln vGs8ݱLu].^0/P$U\{%'3kVnk ƪy~ׯ%H39v]㡛}V:Ⱋ+j{)b#1'\輨Pm{aRRkgmu,>f66lfϡ<{((}a#yxw=d)"am|m[0mO U8ڶV9#lE<8[g0 (pZmvhЇ3̢צLm2g3{(Ap>hл9>#(((%8!OtGyf @stp~94pd|2 a8tL _%] ^~!fEOoW $:„;MQŻ@!VM/J1h<_THA JY΅uT (*掂Y$EAp7991|F;Qϯ0n~yM/S3]y$܇i94 ?u!2]LrTp4"KvQRfO ,=gxPvuWL (  t:o+162Rk2.3=pspc t&=Vk!pB0sM0Xb@|,A~N+w}0 B]&7),Kx !ЙGqlIPK6[4DA!öޝafusCQ6=aNeR<څ9Ɂ19၈a&((78ׁνw~lþU3@1a -AÃA70  xoK7b0 a :UWƩTV@0l$9L)KpuDN#RqRh:hR3ڡegpcYWņ^ň3p&B @^W3Mq;ul]}ؾD!/06nbcKLc "`^CT7TU0QYRPA ܕSxk J53$:3kۯilZC~|}ExsxffLNЕk D7V 5=>^,d-l̈́)[^q&0_3RBR{Ȟwv93g>V=>r] GҖ m{u'0NdhN38l )$#W=ٟ0|͹k ;Q<vApsd\C1*p}HA)+f w̐WBR)p61 i{)%LA* N '1/{tx.)ۧŁG;: 'i]5(Bkƿ3Q?%Xnг9Mp@pF0+FOx8D3ϔ|} /1N9T޸Rda-S E cSE#^"kMs8 iz" ld CI.Bt])X  gޝom]Oݳ!NXypI9"55-F=XGbg0a &0!N1%sw \~aL"-+) n_ap#4QqPlUQXy&lK/VL# ($%8az)ugsOmں 猰X8O=q}MeXs8ls@ QPJrxϭnu,w* QE==eAPCw*9wRBR{0,7R߂ϯ٬H@`9v@.v? k_›"5xef {8u*-Qr2S5U1 Sb:Cp`j J U*l1g6: 8D'< /S'h=Ñ . $ cy1گ?Ϩ>s$뗽!8a/tszqs3݄8 XO'Se..\7s_gP}AWrV4 g@M35j? 7V\ UI9;L.;c! &bR@^ #lBRk-x6 iˉo04yK('pvb/d s ˷)(59U@ =W_0%EmüljcTܖD=txL\n*E 3e*+!0TH1#RkaISDIn & k~ 2C.[R>s2Xq3 CO^Da/a@b1gv&p(&ᰍ^Gdi‚w,NB o oVn56S!(6Y9.5!)(%9WH ܣ7a{pn|u 9ÙK^ i 9#o3Zpx´uuյg:܂'nֱv?g۲[tpsbL t4|ᰍZ|7l)1afmz(v:af$!> kː#}9asC@QPlg^YmU=bVՎhtQzÞ)BXdX ?%F3"B"{0 ]ꊘ)+Cm M0~Ϗ&EWJo*ILA&]\50)v]t) ^눸0a,IBxC-̸)Ni9pp6)ł{ fd\m_*ry]awc.xyEQ8t`8 Es8 GBR{ʈ 4Z7BԆO dW͕(1 ,ŌJ3tek@Qe¤#v6' qcFQӸ `y~1?BRHHpxynm0kË<{& "OnĠÎPq<(a,-8l醄3,!1(%,Snš`lsAR:b-7$?B~[ݬ:lx1-7O) yj99 ((%9gdM-47|턀6& >䎱bP4)Bbk2a-XEK7/ptj\5";AzXC-K9Գ1?B@F0X  j  ɢ#૶L1[X v WEr}J M 0:˰̡c?9)C6AaP,[CaeiШy2Y~|Y\MAubRz9)81+JC(| ^@B'?y|X`wy%z~W|>HўlpGA`*^1q1@RR ^+U<Γݿs΃Sޮzڙt@9xԝƟլр q/t?` L%QT܊7QdFO.8vPd}Q&/ IԖ>52Eҧʇ>c7{;c{ nʮQ,V<@F;*p<(LC88*=0GZǦ7CӅpUe{1z#|{M'lE´āDY!b6)B*Pԯ'a Bt/ٗ;,\}~  \DL!!a!HA!ᵊ8x]oMVQ\W0)p2Tu[*t{?[X+^=_t8R*I.x.ToBҏɎ7 j10!1'w F{p0wg /cA,B+ ǢrC({i*s!Eo`.mf JIu`S,P 3YVҚ\S15mp]u,`p_I3\SU "-z5Y mXɆNUg.أ1)CVV ToT)j4lZN+*ẒΘ !Ewr?A"qic M $`^GϢn=y잾r{(3uL(L[8Th+:T$OW$_!}{Zp[p<ShQ'ur, Lw_!L38l# (("9ajB?⅒*>~܂e&buĀ8hmORRkzG;c<#G(k rKepXNJA JIuc5WrD+HЃLE-, L˭9 VR8h6!Md"unKDHr&ݥ.аDx|f6aah" NLژ B62 K^c1<`E _ J _{d HED<-ծxZ݌YhU3CCʉi0~)䙑& xf $:gLTFa@u.j^{:0G rۣb[tu5ԪW18vr#>fwwD@ /@m@7ƥLQQ<7VxR 9TW4^LeKZsZ<aS+¢@փ8n,[" j!CWp)D!)ntȎ̆QV־o[hbV!`Y'ibW|?"rk,{4PgG[wQT=iqb5ђ9֡zëJc#1 h.'-ˌ9(L̯)c#dspfŔ~g mX΋ʼnj6(+'K Q]S48QL QPJrxH¶(p1Ѷn#xRVqtR3AK?E { ?;;hF.@ I~DzR<و:$[4n>/չGC1 >:A"6x.8pF@ QPnrx_Hh(BܢډPu K`_*L*̅ѩWMs8qOgR:=P.>P~83lfZ 󽃁`oTCgSKs8::դUhe7<.MCйU\(ߕKKe亃A)e'rS uߙ"A^ÿf \] O=.Sޙ Kݣ FB,A.wPb:7 qdCKΝEhXM$oBy#cݯ>S}b \-(BJ: 襜LB2vNN&1L)nPqm?ga-SPݿ>W2<]zzEKڍrߍ;P@`u|; c)("9! sf7BWsavTǶHq WV!n'+6{M +ivy#f淢U%hKdO%NVP ׷~o zNS8݃ w3=XMj}cٶ{{`%,fiP1^P_^Svqz f,\8"fI1h,JC11O *7ށ_19L8-?DWjp@chq Ǻhp[ \(EAgxV)>,M{6< >~ބf6Ey^<(.\Ɂ qto8Ji ue~Zn* MeAQ T.o|YO`+|2u9MeLA)ᵎ Hxw=NE;DL[ dpnPPqAAG FL[G^k*HШ*6;-Vd0Xq[0c Jɬ`pчBǝg ز=*")١;c) UãFC(wLn3 f D) QF,=Ze{T/7"F5(νѯ=E`pWķi` X~O;}E+>֍@Z߆_zn4wQCKwK}_Pj^D9s]QcKms`1)j53"(TvǧAX ǧ5A8F ':C}rp "7`e1n0*Vb1b31<./1U'dbN ^K@I\7Θ.S|跕~5YNaF Sݗ$_8D @ H%:6|"MBdAigm_ 1Ê a<`Z{:ͨ;8WSx +.Բ, rmX!yaJVǦ% mZ4""792FSN7 ׷vߣ)bi aɶd.%U U$g$Fr(:}YBYqZ WɌ^tkaK}!0Wbh#;y[qEY3SP&#pZG`xU8\t$S/yU޴;ܙR%LfN*q' HAtD(ͭS8:u! lFs3E6:hh0=^Rbs_YTTFAVUˠQ(ٹ]A53pgIňŠ=M0)(R)? cfNtF?TclP 1Fis2h Ď8f{d1],-!lFZVC¤΁uQZAa6qEU4HSH }M%rE+Կ:2'xXw+fTєtxU!!Dx,뽄v*`yo* j ~YV}7*\wo+jO˸C-lC(CjbcNv#xsE0Uww1\O-&-EmpU¤z-ZDTyɹϾ>4rt®`H6 KiХRG3U(;0T$~ -< 0&'} 8Jn#48f&SiO㯏=T<[K8ehEbx_۹>k 8b*Lc |vpϒ+U]OMo aմ/^,V0(m VK,8*$hmH! JIux؞ t1Þ޸gD;9TJ` :r \6 n/IeKs8l# ( 8f½! 3>=Oበᴗ,fTp Ψ c 9л4I I uP]OmSO,>Ej*ʢN=iQߙy/9p S(ů))@!)XIzY̓:Кaz$LPx8VCaQ8݇9GSCJA I uh"#0\U]N1p =V@XG02GQ(^* ~M4@t8(u #oLb 'jxeVOS4?&Ԡ>! C1KPo^[VDܾKps;BwC=%SPnF:EyK@xF=q_'n,o$?V/8({Fw+;JwZBQ6wl5̊,Mқ`*=(n] GibEh&M0]2lJ+H&ҾR\-tm) ΁\¸g282k3"HZeVw>T=8OOä~f- qG{ #C`69SδH! I uuAGq?qNF9 ׂLMkg AG, ˺C2)D)/|y>}UI@o >JtšCgu`-l#\Rcг8@(w6?K kf0[ŁpU?bov()B ^@seg5d@˛(V7R*L ,F,]``&"4&^7"b"8Mg6/9 g܉ F;@ Sq5N_!( -A [ ,[ᮿ`ʨ4 "kxEDo kYTPCcX- >V!J^MjA"9|A Q]?fRb`@~iQ)(1X+T7ۆBn |Y^b/ 4(\em%Fġ혢d%4(cx+PmxGlҌi$}35%`[0u)[/ׯPq-vurMin4< ށq8,7isEd&*Fx[ۅnX:f(MϨ^t#Ƌ]0c3<[U59Ꞅ^ʙ*aݼҺ$^NipDQ9I$j6{TLa D4:ꪈW8?Y'잟p '/g #T70łyK wO,nzV%QNYX܃NJ(K.9^ G WaZ뀡*1Gh7ܴem(x,'=t pWH! JIuQ݄2*1)kH6fIqvg0={NpZKMB z1h_qrL<sjұ#ڑs8 Oc<$$:dȷtIݐ T`֝)rjDL_cy B ):|/nZŪ^sڇˮrmrZPxl8^l(08G())$%8!B~㥒4W |C'tSɋºDv` =x9UzXrdnY9_i݋{6fvo[}S;p+3L [KG@ HUx $03^y[ܗs\A9x_'[U vй9~3`%./Yy:6cp ǂmczA{|`!)yA;"m @=ڇpؚiBRHjpxv:`] '7{?͐Y7;aX1 Zm<'`PH! JIug6 Yvo{nF"R@Úr~0tz7Qf6"I[_^;so9ExƁa#,Nq޶]st )H!&k20:\ٞ.D2issvn"&e!1ð[Ι)(3xB*vPe bnq-)*l&G(: 074^*}D owOs8 C;8FcQ[/RT ֧0㼭=(̪VCSv0^ZJs8 U2dk*|w/9>n .ynGc^g/TaF NuLs\~IRRk1LXc|Eˊ }/OutwŞnvduhqMsKm)(RAZf Y%0ao6nbO 6EQ=X@0a8ب"wEi=AJKf_iS$}{%aח ̾8jA1:<|< 0^6kqǦ|ůũ)R["̼NI9`.t)D){nc{VwͻӶsM8Xԉp` ɡ9Z^KHjHcDͅLTqLd@1Sdrb|C"''hJ`ZlV#m؃j?xP`3h{ߠ0{O@l ~9$p ދB6n^3f^*`Ǟ-UKa2ܑYpyXBO22kҲg[]p2Z1j&yFck (Y2]+"k`S?taW сZ v;So1KV{U(lĆ;]q#௯ux >gC:Vy+.EޣLW`@|cӛD8ژa2"A^C fBn$yLYE5 v,(XG_*G<``h^827.+n$0-bCY7rKfp~+x=e^aEHKpܸ\.*=tBK] `~y(,}xbK )D)ܤ Ba+F3<`cZ [qj8:$\^ aދ-3,]J1Jt6իz`>Fp8fQ`,lH Giʸ# A ޫul˫f_pwC݈ np:;QHw}SU&l#MRTJA J8:\S LhD΅-LP9RR{twZlo~j~' £_'ze oZ'ل]-azu1ل]RR{oi0Ț]cQY!&hoH 8ā0Džʈm敻g H)uh#y㺹T/ط"@(n ASji2piMia+뭕f¡L i] ,`A )Yl߂i)d^q` raMq1XB"d,WBO!kXJU7v[@qR4o ]01sLT6lb PBeV%J#r h-&ؤ&qq4M?K8 I5͸*` BF6m|sbܧG83R:YͿO_,4(4Yre͊aBܾSωb6.lvVi[> | {2s|^^BZ,̭"PWTueD Gdb!6ȘO2ee*PCO e{PխTV,pS2.bЋ8?BRHDpx/ WN=1^dǜs//k)O]em)(l퓄d_z{y\-eHza`838|Cv UxAVG_A^]]Ⱥl/ĜM7ҹB PHJpX6SSډٗ2@̅՚G:lWbgDf I<Ls8ls@ QPnrx#bM?oWd(N 0;owuJA?$dq.2LoZ}g*w)tW. * lt w9=| fs[9Qqx_8`;zQuyr^nOiup;0R W&`^Ex0:<f @x%T""Re<2:W8ӄqm-ߊ,OBsF\ffq s,;pZ;4lfѮ 'Me3*AAa?q0 h 0+D;wƝd 2[q(,x/ ̩柏p*; JWu(J"V[_ ex⨻ȣ"1HLbӛ*}: !sXETrL,O익ڗZ69$(@ĸiWNypضEHA uCP/xhϩ\U(2HT.L+Ⱥܮ6an|d;)`wDKbgp'44DD! ]89/,1\)T֧`s{e.=ZjXKcpnDHs8עuDI8^k7&1-xdJUwbPfCe Su{ EEuD֯U5k_NK%"o<T\߲ jAa/RH h8@+4J, &-!= p: ze8kԝp/b^GSeP6` wm=%c7 >y ڼQRPB0x-᳘&+VqteATܲkT vՓD=V !hd: עg2%GZSh,6P"ϳaXMa|_E}W[y2eBܤjV&$pؑPRIqg J uHyו 17wyi(` !p ^0W w kq SMS89/(AdkL 𐅟r(9MRRkwƘEXߍ74fdf'6žG tLEer(ff'2$:>rX)7E/dxR0p2q(߬0$dZle[,Y_>2͏L=)Gv}."(FܿpAL=jP1 29!g JIuhm 5TW K`T@ub2MW1Ibcԑ9VgWΆ@L<b{_} b_dX3Lc jٵpnZHɰo]<օD/u{Oa#A=~2FWa#w H קj dwQ7,0cTO ,HuAiL4N pYep}+%?K@~/!:s+S-m A4v02wVƼx;gP Bk jE ;f }U0W ב.@T49'lSq12Ւ<]^3o]6(,Cp Nvaa)H!)-Gm":GvQݍY-OlQ&=^}xU^ë;j&ėP#= D$BgGMޙʻ>w, Sv&<=ba,3Z Z xsHD E$"ݤKB[){z]GV .h.i[!ps [+LoA>"-7sħ)LZbB"L܉w1vMaz4^1L/ \B."tg"@%mq.^^|ᵈç鯮i}c_]JeCmRŷ-(-x  'r# `[PMܛp~Q,#7ׇ U.݃ʺwoRwV& ~~b"݌]:K#6]3E6Zr#aລ|{_e81[T/H_k-XL38 Tw3"֧)cbІ®' 6C{m-8X/捑p;|34?fnMk]U.-J<]+s/'O]_kIt1 ń"#z.u1d+FobR`~`wM?Ml/܂A1>"Ӱr]r1.9YN0‹)𪂱,Ӿ eѴo\x{I\h"bsksbY :TIei``*Z` i5Ape\1׍Jpm )D:j:nk+L9trzz[Pl%> ;#zSh /e6sS|TiM0{8 Q0-$pجYNr᠚X[`,2Q߽(*#a LFlZmiq)io|) ܽ;wش4$J+wa.w=O38+d ECE`ӻY%/+K~LIС1 71)pcN֗-2B"4+~\h*S #-T ##ZK)xlN3P?)Vsj3K7XVnⶂC/tdqcar+kЫǏlپ c](@MƈQaSe2 c]EzUƺ#֫2Ǽ&?0a~yvٞyu-6[0A`eoٙk3yKo6%~-I&Zx`Ǹ,ݦ ?xN6?JAk1olȻw[ ›5zM/:Ts?1C|quNc O_{tAgaܠh6-ϋx ?mxsrZ͋MPDqA0⣂ð3RR{9msHfyɵ#\կ Cj(d@x210'#4d#&*d0L؊NSz-UNQp&K'1¥9={):v٭UeFȧ+w t0lSb,Z za@RHF0xaٰsmF|6lw9|^ܸ$jXhNs8l# ((79֡KxbЪY CR- GV]EA*vR!Fc.W <Ҝ 'td'N-NAG$\{90 )@!/by a( М\m|zLMX ~bT 5 pSRPF2x"bDM?Nق˿V{3< 3le diZt|M 叼ҀBFB5(΁{p~}jiHs\KiuB]}׹\nf 1}vjD=wq#IEApˮpWaRBA^ğ8tVt'֩j4{Z[$1ʲtԝ \+S*>5.ƓqkxёK(;sDq|=q|!OEġ[0S"r{ ]Hh]LPvO,|ӟUZiB/XnbMO /ax4# nh;+πrm.yc.1o |^A$15è pDl/W`m589x,T?Dol<40v)(`>)1Mmd8DsՂe1^फ़)݌ Ja^;@VߴУc)h2ft-ԣvPkslf/ws`HRRkaqԭZx .0E3n &uEG#wrxS=sl)=&KЋ"ٝN%s(OPlKyb5QjRK|}W"{I{{xEڅ9g{~V6/wz<2 3b!dPp^şX{:A  ^;)DE5fk%;'D0ϪWi/v7ןȣF f;:Pu ECw*9n^Ÿ6qU$b`PB%/Q_n 3:`VD yŠyCNXQk GjՍO^`@_ӁG9ڵU!U/Q]K% U$ҟ~@#1^'9$%۶ tUbIEF9Ӱs+;Z,jAi9M%^5Քd+A3Whhv߻#Qܲc5 :VIX- bLX^72} AulZ,&/3s5Z4`}Ոap~rsO/Ӳ԰=U8M_xc7@7qR?욲Ʒc +) ^1Ǻ WoqV5| 㺊e4]2p #<"*&_9l˳q(cxgFLq qoԎ @ǖ'.3ovZ0s#Wงh.uO5PU~K΃hzay7wX˓)-LӅ(<[ey}|#UG *<^B+s6*5Iq= ưcSZ83Jn?j -w@g9 A4\VyK{05ĺ\4D1:xݶV(6c?C|l1@OG ΣUyc#yq]XAwpпx_&gXFie,\e*rslU,>rb)6V)|E?q}Emk|򕰭/TaoҊ"+_[]e_qkGO\e!/gMu+v{߳ʾfpX*P5iՋwd>Mi;v'w ilϵ'9/^9"/c`j]G֌|6"+V;Q h k}XGn2hxmRXG]jSWEEPyXG1Is0JMH~v;b0DWҿz]aj/G+wp!k 6 HTT&%ר+4nh5*:svNt3r-6<$#;ڴN}!xѾaFNY>8iG!<&Z &-&?zlK1d*Ci/rk*Ky 'ͪUTf&}l3Ɔ<̶vlckt:f;%ζl8`^c"8mdl'{pes' @HSɲcֆOpq&k(̬ vSv=RM?IJ4I tlB:X= -hr<΄ u#TtFqbD0~ujߔJ&{Š"g69MzSӄțl1Y>0~ŠAuC+-ík`O43@W3j4`q9ߌgiLm.Q1ӀjOh q),pNXY@pPFyK:Eؙ M4|E ã>n^ gT`ƀ98; b)chtj5@׮LJǪ!3z/`~aΔC ElBTj*hbJ9ɡ!E[MHrpN+OCzL.W. ) g Y!&(r(QM0]r ж|N7 0W!BF9˔A9ԺĨr䰘 MGb 9Ė+t9ȡSEu9̕r(Xf;c59|ႜ{e;k r7- lY@@7q.D%0ٽA=,v?JlUpF_E0Y&O:! C juac %LO8*4>^ Xm0?)a!DU_Lj09RF(| `3޲<0` lIO#f6WRHo+ƛszv\PL2MES> GT]Ŋ ]T2bKh1gf]S4-vAw#B:z5Ό˭7~3RK@77c<[OI+@oY' ʔg&Lܡv q AZe4gӰN ~KqBz0l $ V)ݙBD ㈴cL$f&]4$Z8d ^(7ƘAOa:EYendstream endobj 593 0 obj << /CreationDate (D:20021031122522) /Producer (GNU Ghostscript 5.50) >> endobj 594 0 obj << /Type /Font /Name /R6 /Subtype /Type1 /BaseFont /Helvetica >> endobj 595 0 obj 29671 endobj 578 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [184.661 277.985 199.384 289.94] /Subtype /Link /A << /S /GoTo /D (figure.6.3) >> >> endobj 579 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [316.17 266.03 435.958 277.985] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997a) >> >> endobj 580 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [440.806 266.03 462.724 277.985] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997a) >> >> endobj 581 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [166.241 254.074 283.331 266.03] /Subtype /Link /A << /S /GoTo /D (cite.schmidt2003) >> >> endobj 582 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [289.051 254.074 310.969 266.03] /Subtype /Link /A << /S /GoTo /D (cite.schmidt2003) >> >> endobj 583 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [212.003 242.673 218.977 253.521] /Subtype /Link /A << /S /GoTo /D (chapter.7) >> >> endobj 584 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [223.073 242.673 230.046 253.521] /Subtype /Link /A << /S /GoTo /D (chapter.8) >> >> endobj 585 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [253.514 242.673 260.488 253.521] /Subtype /Link /A << /S /GoTo /D (chapter.9) >> >> endobj 586 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [217.79 151.631 333.708 163.587] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 587 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [337.439 151.631 359.357 163.587] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 588 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [220.36 127.721 321.924 139.676] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 577 0 obj << /D [575 0 R /XYZ 133.768 692.105 null] >> endobj 573 0 obj << /D [575 0 R /XYZ 185.82 504.462 null] >> endobj 110 0 obj << /D [575 0 R /XYZ 133.768 228.8 null] >> endobj 574 0 obj << /Font << /F8 210 0 R /F20 221 0 R /F11 368 0 R /F21 228 0 R /F18 207 0 R >> /XObject << /Im5 530 0 R /Im6 531 0 R >> /ProcSet [ /PDF /Text ] >> endobj 598 0 obj << /Length 2553 /Filter /FlateDecode >> stream xYIϯ%5TE8=XT9-Qj\rOmecjF{KUJiIJ8T]7S߾QDX R\훯e<hv`x^XoLmWDZl\4q,h7z{͂ǿCAsq=33_;i^~?2k ^lZ&w'vGK9)ʳ~?ۿ6JD `6xlzG6Λg.zJ*m[!pU8wdGIISWaYGQs_6G\}:H88]H?Y -DNK B"`v"qz?Iwteӏ 1sZl{"ֱ VsG/ 8 Ygqhf /}r%S6dik8 W2?S(fFBbW8a{^}PJPC:`\v$.b|lzj \]!Y@pX/qN`ԯ+TC}-WcVEʦaGGمyН/ܵ573pۈw𓴂sT͑xJ?:7{Th,]8 u ˈDT_e`1saH*n>?? LS2dǛm' m[a 9n8g^^0 `Ԉ:|tyjp:əEѕYNH7r$4_twezvH>]s|5? LF,dWs1 ##Mԅk<)`BEO HOc'3T=!0=p2(pC?]QĄ̖V2)9,zhZq:w@y([ wOSCǜ8{H!HT]$9]Z`6Kc1nmu%`hS\ %"W sh*ӵUwǁBf?5/(a27 m}©΁ aQEϹdq%ndas^w7i0J,{ £:O۵d浣:*ǪR X[벿VJiIe?T? `a,(b\ 3&V&`-XXd 8(~9=!jA 9IqHy(.pp 4tw+| a(&}G $lѴt*{ ljl 0<(X]yEF{`σDqn^*_,k\?tp줔#Pl$݌?r }>{1g۱rEn ʓ{P ʩ/+oLmޭPl* cE݃MQo^TP-O,*{u,rNcsɯ:o(cwYXT>!0F#g ݬ&y:3O^ u 8+VNE= ̊mQpַznYHJ,*[T ?ulB`laJa\\5*"U%2x). -<)}7*ַi n"ZM9>Z 01/ j$jjvrSp[\n$ .1 c6R>ݑrSpi{@ouLZJÀ;oF*$8ƃ؋RyrtQοV]g%}#QL+ZA567U(UIn!qZfnjq*67ͼhǖ W9C8PMɤ{=CJ[?}=n>J;;Fuv?ZsueԵGVa'>V%X:-: VT,O~9Ҽy܎oI*J{%O&TH/?'Hendstream endobj 597 0 obj << /Type /Page /Contents 598 0 R /Resources 596 0 R /MediaBox [0 0 612 792] /Parent 589 0 R /Annots [ 600 0 R 601 0 R 602 0 R 603 0 R 604 0 R 605 0 R 606 0 R 607 0 R 608 0 R 609 0 R 610 0 R 611 0 R 612 0 R 613 0 R 614 0 R 615 0 R 616 0 R 617 0 R ] >> endobj 600 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [342.133 653.748 443.969 665.704] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 601 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [449.916 653.748 471.834 665.704] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 602 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [295.052 641.793 364.034 653.748] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 603 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [368.963 641.793 390.88 653.748] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 604 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [410.194 630.392 478.476 641.24] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 605 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [136.646 617.883 158.564 629.838] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 606 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [435.47 593.973 478.476 605.928] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 607 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 582.017 194.853 593.973] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 608 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [196.631 582.017 218.549 593.973] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 609 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [265.608 467.475 376.062 479.43] /Subtype /Link /A << /S /GoTo /D (cite.mcmorris1983) >> >> endobj 610 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [381.061 467.475 402.979 479.43] /Subtype /Link /A << /S /GoTo /D (cite.mcmorris1983) >> >> endobj 611 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [383.084 360.432 390.058 371.28] /Subtype /Link /A << /S /GoTo /D (chapter.7) >> >> endobj 612 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [394.154 360.432 401.127 371.28] /Subtype /Link /A << /S /GoTo /D (chapter.8) >> >> endobj 613 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [424.595 360.432 431.569 371.28] /Subtype /Link /A << /S /GoTo /D (chapter.9) >> >> endobj 614 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [383.084 233.934 390.058 244.782] /Subtype /Link /A << /S /GoTo /D (chapter.7) >> >> endobj 615 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [394.154 233.934 401.127 244.782] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 616 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [405.223 233.934 412.197 244.782] /Subtype /Link /A << /S /GoTo /D (chapter.8) >> >> endobj 617 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [435.665 233.934 442.638 244.782] /Subtype /Link /A << /S /GoTo /D (chapter.9) >> >> endobj 599 0 obj << /D [597 0 R /XYZ 133.768 692.105 null] >> endobj 114 0 obj << /D [597 0 R /XYZ 133.768 544.644 null] >> endobj 118 0 obj << /D [597 0 R /XYZ 133.768 346.415 null] >> endobj 596 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F18 207 0 R /F11 368 0 R /F7 466 0 R /F31 541 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 620 0 obj << /Length 1555 /Filter /FlateDecode >> stream xڍW[S8~Wdgf/;vY`ZV2 ~ёng"ENs'QOdaN0ɪ#gOGf|`qq7r87sI N}z/7,; IVi~k}زF܋B+}O&fߎ∘~bǮDfgbZ%[Q4.DQw#$vb׎!,gs?\Xb/{XM|^vԆ\+''NlY[EdYiNJ7)~֚jw l8v͠ugd~KK5;Mp{ rӊ1J>hYBw ATMor"+QZVZڿKgTU_Up -ֈ'ȥr }3B9F+rWѯ zcF?_9=a߰GSͳҦ8Ev+[Kym7d5i K]o:^ڇm#G BTX| 0+F W,VF|u.d..=M2q?*c^_-fAlx 3~Zڹy}Zxv@| ]0·;C+lۊ!x -߽{c\x||LC|Ճ @@n >-D#PFBʭ/ճ-&SE @1н#ʨ՞kB<@y~`#C _]#$Ap.:M'TԢjJYqFQm) BȘ-T$*w& ë^6;5ޒ3bWȨjr|?yuʵ ÜaMk􏼃kDglƑUbMAK2G2F* (莋!߸ˆ@h7wLf4RkMzn m> endobj 621 0 obj << /D [619 0 R /XYZ 133.768 692.105 null] >> endobj 122 0 obj << /D [619 0 R /XYZ 133.768 667.198 null] >> endobj 618 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 624 0 obj << /Length 2880 /Filter /FlateDecode >> stream xڵZY~ׯ< L3CoHlTKKD @W_fbJU==_O(4n<UdoVg }Lm`·3 BÄYS^={6<7wxwp-K`PA["΂ǪY2z~yAmqXiP zhe&I/obwoFqmp񟻿, scZbMP ذ`Q!l08s??w2fn9l V]W+){W0Tx=Ѵb'oC 0(4‰- /LtNpsN_%WKc$I\~z<%tGLΨn1AW %PvIT'ݓV,{z"\,4A8f.x?-9C]KJb悊9gGz 9%EasMI+PiI?$/g2u%ThZ_ չ9d"YQ`(G6(4EWKmp )JgW2V[&p51@ d]IO7b9R_ p* kclB'N8'js-Z wZ#oc5ޕ|a5}I b"6My`NsX&1!9Z5VEVT$5)\Dh&ʲ(gCR<{d#CvWVykSV]騣 z +ܐ8CIC#w8DBfd".$a  qh*]$HXp]`2U]C.<إi^[_~8͊5m癔h]-KXp:E8XD-kX-\QWq&Vʂ)V*2d&;<p&d?PӋ5Hfz48@Kl)܁lIc-2K~\N7ţ`O)W=< I]' )gw]H"[ڑ|Qv/s6o JXa+Ů>xᦢji;!ѱ#xۦp{ t`%(A-".{!2oFә+*;W"F6]ү#{M,2[hq@ Ĥl>5]a4uQ8g T6&̣[mZ6–3பqFG%l;^4ݝ@1NaQ/~OIyg(q;ܻk[l}Ϝ?M1`(6y(Ղ噍L2 i-ՑɆ 綢BsW8NNq`PqRd^j8bFUÑ*Ujhהj yYf鑷 հgr|hK8y%8.4U^CfkAƻ⧿d2lǓJ_r ttf]0@KCb@ NP+,2ŕ+;0N]O,Nd)ՙGJljp^z I =l1 PVhu{lDm.2EHe8FѪV^3& yNK\_6?-'wrv]k$rvuWGbRPP*.h-Tu+iθ JA6e Zǥ9ĭB_.}.ȅ3Axګ˄o!@5D \qi"i6Zba!Ix樜෣ْX'H4nE_et%O0XҘqn<$o4g/:fHe pG(jO*7+8jhOE]=^%XP{CmJP?%Ȉ4OsBIHW%jLiWp=̌ n0⼕ 蝹Fm&gZǏT DWT*vq$L| QRXO^|endstream endobj 623 0 obj << /Type /Page /Contents 624 0 R /Resources 622 0 R /MediaBox [0 0 612 792] /Parent 589 0 R >> endobj 625 0 obj << /D [623 0 R /XYZ 133.768 692.105 null] >> endobj 622 0 obj << /Font << /F8 210 0 R /F17 216 0 R /F21 228 0 R /F14 243 0 R >> /ProcSet [ /PDF /Text ] >> endobj 628 0 obj << /Length 3346 /Filter /FlateDecode >> stream xڝZKoFWhO@Ə8v؊f % $Ƕ|ٿUUOU-s?sf$;K7A|= ήi# 6"ŵ26cgHwMzyb.bof[sѳa~Gś^i[u^G+ڕ60n:˞WàdM 3|7x#vuC+E\z_T{A`- @ i9ք[,Èm1_qtn4zfw8< p< Fh{a&L4m̤(%H3_,\ Si8:z'g7Jb!ċ4z]RZG:_Sko#Nږ[\/oeR匿)TpE;520^?D) (`3~|V qAd!?'7y65nk9 ԫ-@rDwI &jJf 2f"HH& h*kiљɪ(0 k#>"ZfTgVPsZ 8:CaNBqIխ, `?Y8pɃ.dB[ I)+aѤVkW0BrBTR'?c\lן:Q*?CFvX vs→f5v2},fNe!!x)| #Y"' @ sMy';LyE f-dHzs(Vb"`e֎|?La1qn,ÓN%Dm/\M|ji IvCEq*@Z[_Ao]ܢD%:rq{M2qC"xV?!d!r!@ehp[K1,0Y8Q\PT*u/;mCJ@RtH[]WjCU-xDYRukM>Șke{.S"R~˾VAk{ws¿MPl䑧dKm:X<$x.3m$&'3r7PVc63QN>Q,.FIL48&5~`OcޠD$-N)}y`(Jό`l#AI'i=ʈ T43foRiLwbΊYtڣ:P;9_5w>G4)؉ԔT[,> N{9YR寍%/l$w$d8WqprVtrj55#b}nQ/F_ aNja8v1~`έ{;a;^cqOX>MV _ îbC>{o4?_?u$$GIw1?cE.MfwKN W -U{TizO|Z )xMȽ)jpOSwxrE6?rTI憐A^A&=1.sHm(v7f9AV=#oP~ksߟ,D~vx6&^mygVԵ+#ͭԥy<-nɵIM l+X eup@y+nfq'Eԏ~,JudŪ |}}WM7#wiDABj?/JM-}fѧ8&R ݅j)$lɬMY?la6m΋2Jendstream endobj 627 0 obj << /Type /Page /Contents 628 0 R /Resources 626 0 R /MediaBox [0 0 612 792] /Parent 589 0 R /Annots [ 630 0 R 631 0 R 632 0 R 633 0 R 634 0 R 635 0 R 636 0 R 637 0 R 638 0 R 639 0 R 640 0 R 641 0 R 642 0 R 643 0 R 644 0 R 645 0 R 646 0 R 647 0 R 648 0 R 649 0 R ] >> endobj 630 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [361.726 458.481 392.804 470.436] /Subtype /Link /A << /S /GoTo /D (cite.tavare1986) >> >> endobj 631 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [397.992 458.481 419.909 470.436] /Subtype /Link /A << /S /GoTo /D (cite.tavare1986) >> >> endobj 632 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [210.03 446.526 285.674 458.481] /Subtype /Link /A << /S /GoTo /D (cite.tamura1993) >> >> endobj 633 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [367.592 446.526 439.854 458.481] /Subtype /Link /A << /S /GoTo /D (cite.hasegawa1985) >> >> endobj 634 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [228.121 434.57 351.193 446.526] /Subtype /Link /A << /S /GoTo /D (cite.schoeniger1994) >> >> endobj 635 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [208.584 386.75 331.461 398.705] /Subtype /Link /A << /S /GoTo /D (cite.schoeniger1994) >> >> endobj 636 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [335.965 386.75 357.883 398.705] /Subtype /Link /A << /S /GoTo /D (cite.schoeniger1994) >> >> endobj 637 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [363.925 374.795 444.074 386.75] /Subtype /Link /A << /S /GoTo /D (cite.jukes1969) >> >> endobj 638 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [449.916 374.795 471.834 386.75] /Subtype /Link /A << /S /GoTo /D (cite.jukes1969) >> >> endobj 639 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [174.767 362.839 224.055 374.795] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1981) >> >> endobj 640 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [229.188 362.839 251.106 374.795] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1981) >> >> endobj 641 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [295.412 362.839 330.365 374.795] /Subtype /Link /A << /S /GoTo /D (cite.kimura1980) >> >> endobj 642 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [335.498 362.839 357.416 374.795] /Subtype /Link /A << /S /GoTo /D (cite.kimura1980) >> >> endobj 643 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [313.588 334.944 376.862 346.899] /Subtype /Link /A << /S /GoTo /D (cite.dayhoff1978) >> >> endobj 644 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.679 322.989 209.509 334.944] /Subtype /Link /A << /S /GoTo /D (cite.jones1992) >> >> endobj 645 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [293.277 322.989 391.19 334.944] /Subtype /Link /A << /S /GoTo /D (cite.adachi1996) >> >> endobj 646 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [174.966 311.034 271.863 322.989] /Subtype /Link /A << /S /GoTo /D (cite.henikoff1992) >> >> endobj 647 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [361.192 311.034 449.842 322.989] /Subtype /Link /A << /S /GoTo /D (cite.mueller2000) >> >> endobj 648 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [192.056 299.078 287.995 311.034] /Subtype /Link /A << /S /GoTo /D (cite.whelan2001) >> >> endobj 649 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [271.896 187.497 283.851 199.452] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 629 0 obj << /D [627 0 R /XYZ 133.768 692.105 null] >> endobj 626 0 obj << /Font << /F17 216 0 R /F8 210 0 R /F21 228 0 R /F11 368 0 R /F14 243 0 R >> /ProcSet [ /PDF /Text ] >> endobj 654 0 obj << /Length 2932 /Filter /FlateDecode >> stream xڵZYF~"͛ 샳;d8^[A`o#Q#"ao}U<$j @>ꫣV<; UrYQ?_(MDйTlǎOߎ#|}MJ$Vn~<׫7c+i"_+c?Ƌ||LʳMպKDǍE4һ&=>{ ~#kRp\t-?E|ݡdB)멷أ}s/F2. 擫6-!L<[Q҈Q}۱@6d^o^~|:,IMLS$qU/;9LBe #.?ёJyt-AYŮE(ʿcv78^mȎp b|;50^\` m٣+ۜOO2tϻY?P$r7,PeEۺS|=5n3Za%R=& .{SMIXu+jI"vC=k2؍G첪&Fom4 UOki`ॲ|h[G2Fa;`gqqڥ݂ U  s娾&G@]O߫TCif*۷(]püt}i4cn)T1U.ҬpRӚ-΋*2 }PҷR"onfbH0pWl&ѓ^s:Ԟ=LA_G$$l [`$:xL^7"b[;0a: G…VNOzkAcV˚l/imlO7~T*1C]4YXCo` I)k{4\ѱxR9\晈>_$y 6؋t`Y l =d>2NfUrW135f=tΆ]/t uyG|·ܒ˕nX w?|~;PANB-VcZEdN1ahjlEu&a$g:$/=K+LE>B?3Ig\õ~WBj#⛞X(HN'ЀVC?4 SmGޛH PۙpSй@iQPaQ"^; ?zy ;_ kOqBu8=RdԄ13x 0d}d/-J$\jYub,KC)4&KD`~\PSY eY/Bqhh1:6u1.rG2ǮY^)^uעI5#j-cK9s?do4fl+meap+iv>}-*1M{[S _ãS5Wh/(XCFht1đA]|U>l<`g' EXӝ;|x!zuqh"\ sHuFǒb'G{?T| پAȤ_ʗ6ΨzPOJlXb*"B 6蜗Ig_>Fmw 꿚b96x{9(x v]U]Ϥm/Q-*9d0.>EO%.Ğ;ʌ-4:ۥ,QfS 6)Ȗ I0-8v!NH)JYR1c, ı(L<~$.%_ϒ벛lH61$ar?lvr]2]-jC#{(pdaGԆ`̷q*z $&U1d7:D,}ʏѼ0z:R<T3m0 YߌBN \tѼi/)Gw"sWX"b֚C2XMz3srr:`S*Q$_YIuiS $|GY'و Y ܎ tޙ%L7!*oMuǎt!!t=?X+FO#=[nJ=FaOx|E׷>(lI5k?%9cerL`iH( :{gOW!iڏYx֎NErwa9z~vʚ& Pp+G!(++FOz^.Ɨ:n. C ]&'y-T`a\ɩkvpS7)]Ŕ<`Ik*v$ Y(l + usC 5[> endobj 656 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [431.596 394.72 443.552 406.675] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 657 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [369.828 283.138 381.783 295.093] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 658 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [261.159 215.392 331.094 227.347] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 659 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [335.95 215.392 357.868 227.347] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 655 0 obj << /D [653 0 R /XYZ 133.768 692.105 null] >> endobj 652 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F17 216 0 R >> /ProcSet [ /PDF /Text ] >> endobj 662 0 obj << /Length 1655 /Filter /FlateDecode >> stream xXYoF~ЛWHrwyk8H%MmᡐTlw%)Y+v"@r?9Z;aMX9'ȝ\HZL{̸ppsrZ؉=I"Y)n3i19:Kz^;ˍVMg*4μ(JaڔWmZWifTEny™bP͐-,x3FY2|Ζi"OL+5ޥuZu+p 1 \l!b"K TPat*T W3Wݒ!=leVr|YAs4Wy'caL0PVw4~M1EuLb^J% 0H8FKdTN+lkBbɠ.W$AzDMV+ g|$v(i+KX]E¥HT* ŁȆT6 sѩEegΫ1.URWLXTi7D cVTVrG>y'`#ԠN͒/9p=r1eeGAuTbaVw[%ztb,)76.5CyB]]=9x2mlڬz (7aAp}hj'4OhؤtHJNbLQ|FЌc6MHOӗna&PAvJ$v,p'wwHż\Tu/<4e3S;gox[H‹!DYV -vF'7TDubxJ4,F޼s ;?$xqe3ӗe1bã;^RV!C&RԠMLiڌ,wjzp!.ZX_w;RgP^82{2k9C%ǻ&kvD?9z܏ӪXo*cW,r㬛r|Y۬ |c +`_yO:)rݮGhW$B>h!"2td2o,uߦPlM jsv,hnH|DŽN \0pu ܤ }KZLA"@9갌ޅއ00THsrD[zaHzd y_t_ՀQqKч@h_ BW Y0 _|4MV{2#UIې@,ç@`> ?z ?K]_'T܅Oܻڟ 4_W,z}o  pJ=ṇ 3OXcP}',z2zTm9;H@ ;?43d|> endobj 664 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [217.455 558.107 229.41 570.062] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 663 0 obj << /D [661 0 R /XYZ 133.768 692.105 null] >> endobj 660 0 obj << /Font << /F17 216 0 R /F8 210 0 R /F11 368 0 R /F10 452 0 R >> /ProcSet [ /PDF /Text ] >> endobj 668 0 obj << /Length 2190 /Filter /FlateDecode >> stream xXI6WRDbEbҴ)"uQˁ#ilb,L_߷Q)zL1[>~ZEVJ0ϊUVơUվV;ލɍݨ ӢDo/^Q*,ӫ o?o87*hFYPI9 o2,TBK~*7֤ui eNfEh 3U2Z%a$| 5Yaynꟑ/º"R ŵ7" z8[EpM?Nj:t6??o'#} tN4vƦwΎz :4)83Oe-H~Qscܳ:MQz?ζ5*Y<-{}X`."ji b؜ psq 82TӚ[+ ̇M71N> ~F*;\CNp9i7Ra?SYtֳuTPfv{Ao ׮a~s dMyJؠ?CC#K*Q9Cnq&UrLuPn8, ` "}@X9onBCUߪ;u~yH짽d6 mw]+Am_|Q*"jv;- (볟q`u=J SaaЀ9S=<$}i6{'\qvୱHu rtgr+hA΄8 3gq=<ןБ?!hN2{a}>j&;]5?[i OLVj8wj3,`'ōeGasd H%#%{T]` v QSMo'/PBg_W|co"=hOH.ʷb=Xl{B?nƦq4V(.q1>{];&g QOֳ4[ A8stfζHg0N>#g賛_Ajb_e:m3;oAɇnO;!mc,< &b`y]Ah؝݅GY=V9zAe 8Ta0?Efz'?^/GC!>ZzʡbywAsbj^ r^IORhýG ^V}',P'?^B@N)q/oy8r%xA2o o3Sc'SR]`pցRR3Luba'ͣTž{bctyo3$#FvWʪyGnyWHJDE`K{/&bdH n;(-KBQI`dø{{1IpE|c6>9* u#=Aӛ<;;Szw,J>/SN~ ] 07yقW([QN"h 3jz;{+R>o`ʙ̪($j4uN%n⃛<t.—) N븸\^! Нfz)o$KR.8ePyEeTn~R(8;g <2{ wHϿU?a506*,_T#-Ot~|ܴ@d. f Ocb /,zA9C=us (w?RoF8zAxxo(t]gX|fgmޡiogO#;3t = ͼ<aJtd%teϑY2]4,FExH$p4)[7IJ0Q&k29VU> endobj 670 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [314.105 318.007 383.71 329.963] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 671 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [388.394 318.007 410.311 329.963] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 672 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [406.355 232.827 478.476 241.738] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 673 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.679 218.381 202.068 230.336] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 674 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [207.329 218.381 229.247 230.336] /Subtype /Link /A << /S /GoTo /D (cite.shimodaira1999) >> >> endobj 675 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.679 194.471 259.339 206.426] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 676 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [227.457 170.56 329.029 182.516] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 677 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [334.844 170.56 356.762 182.516] /Subtype /Link /A << /S /GoTo /D (cite.kishino1989) >> >> endobj 678 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [199.848 158.605 267.544 170.56] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 679 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [271.803 158.605 293.721 170.56] /Subtype /Link /A << /S /GoTo /D (cite.goldman2000a) >> >> endobj 680 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [225.505 134.695 331.714 146.65] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 681 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [333.166 134.695 355.084 146.65] /Subtype /Link /A << /S /GoTo /D (cite.strimmer2002) >> >> endobj 669 0 obj << /D [667 0 R /XYZ 133.768 692.105 null] >> endobj 126 0 obj << /D [667 0 R /XYZ 133.768 667.198 null] >> endobj 666 0 obj << /Font << /F18 207 0 R /F14 243 0 R /F8 210 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 684 0 obj << /Length 2005 /Filter /FlateDecode >> stream xXYoF~ϯ[(bآNѢ4}X+ Uxĵ}Yr@_ 573+E~Wi*HvWՁKBoepσg`՛UitugONU7a=lQxv/hP^I,Շ@ELk0ɀ5:$A ᴭH]A~։yGV7;pTЃHnnlgO4n_nn+^290Vd^; }E[1[H1L},-69TI8)m wo^Z$x 㙍\о>U9 %"wW+u*Kҩ:j9mRGΜG 2[.Ǚ7z4(QۃiF% ? ;[nN c?S8KtFѭ \6L#ۻ]s;mlqUz1아O=(߽߽FFl+׿?a|4;DM},V3B !>jDt (}?O>TXB<2~a%syFhjw.mv} yWOpqOڷ4C3^c>4®7߹~=Ig ?ؖ I\n{Gx `Ag/_xS3㧁.G\v2P;8E2|6x:թ;b l'b텇OF/Ny]T5K' S'-Ta>:V5@/+,bٸ|]@CP"bx`4k(:iwVf^p⧡ h8\bq0t68J8.a# -3l a? 0 djd{B0o&i[kk'd_h!@5O3?_TjL~K8`؍I;YKè)ڷKendȲV9JJvE sA8A1QqFfN>'Ef,c &;Քɬ#:;[.7<`]Z!̻O#9L!kLsD/T22ܢzpSmdtWpr7>RҖ b;KBk o65]ѴBHCWd -Lw4uZ _X qu$LhÌ39<uyHh߉GR ;[Kv ~3 +T]0s5z&쪏M"Z#:]JcKzF{s<x2ZzB]TԾ碠v=n>tkyК2p,~$Y{WB@̀2^P޸\\Mb(Le{rƯ'ȓ\eCd2C1F0Nd ϳOVYʯxhendstream endobj 683 0 obj << /Type /Page /Contents 684 0 R /Resources 682 0 R /MediaBox [0 0 612 792] /Parent 665 0 R /Annots [ 686 0 R 687 0 R 688 0 R 689 0 R ] >> endobj 686 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [399.851 609.913 449.138 621.868] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1988) >> >> endobj 687 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [452.683 609.913 474.601 621.868] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1988) >> >> endobj 688 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [259.381 350.884 308.668 362.839] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1996) >> >> endobj 689 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [313.871 350.884 335.789 362.839] /Subtype /Link /A << /S /GoTo /D (cite.felsenstein1996) >> >> endobj 685 0 obj << /D [683 0 R /XYZ 133.768 692.105 null] >> endobj 682 0 obj << /Font << /F8 210 0 R /F14 243 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 694 0 obj << /Length 2304 /Filter /FlateDecode >> stream xڅ˒۸ek)ג!K┓8;;>DI,SLR~}ٚ*h4w7FRS+uRժY|=IWX%(كد*I^YDz/P*KЫ=!?~~tiֱ.Ȯ7#JFM*ehˇnU4anG;$G_l`WMc LM!D&/NHD/~0ʢ kk"" wV6^q*Stc0( Dj_NDuG}n:QͿy#`ԅqdnH uVEG^KOM(h3v :/Ջ .=aIf[b*:k@b܁bfp` %E1 6\ěinold I_2yIFψ7Оe3Όɽ gLbrG+:G;,:oMqik|n;'1;,3M:pΟa}ml :aLeGi'4wy .@,MIۘY,Ȋ%ZE*LA,0фTHT?, @CC(ظr{;3nDX:xک:*m g@&8iQx`Tݖ⎢KXl|r(Z(oh6?ǘÏ.uuI@<%,\Aa _M޾hPeh{*& re9sYh50 ptVPf'kg> yCEW>23~+dPDV(ij=YŗK-~`hT9X5aiXXp$@a|XB,Й֡twks=)":`Rӟ`TQSdh&-|Hy]`@EPL*zJS]% |Ė%lNAM&(\b "g o`)N͉?1n|&M~e A;BtGuĤЙT-*@Z+iW#Rs7k1| }E 0(Y>3pho؍e3u^RuE tnCY| r׊x0Vypau^ h G$_12nNM.;Adn^(Eg.}G(FŭE)FiSJ$_hpُ&DoqE 2gՇliCC TeC3YV8ͥkpUB@8e̚A~ԜN(sQ@W>Us^r$Mٻv><[Io"`r(|''NABҘSo#BRˊoI>+xW؜nʼf&ɝ^Ԉ=^(v*Iǣ'y !u膶*ڎw|P6:6`_щISh%/(0+8mP6 b$O<.,ߠ_-wFu7_Q^y6)Ó6 hBdP8!ˇ?Ke/52LSP(2}F (NGcj{ '?_,> endobj 696 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.991 191.607 226.004 203.562] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 697 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [230.965 191.607 252.883 203.562] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 695 0 obj << /D [693 0 R /XYZ 133.768 692.105 null] >> endobj 130 0 obj << /D [693 0 R /XYZ 133.768 667.198 null] >> endobj 134 0 obj << /D [693 0 R /XYZ 133.768 488.032 null] >> endobj 138 0 obj << /D [693 0 R /XYZ 133.768 304.641 null] >> endobj 692 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F11 368 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 700 0 obj << /Length 2645 /Filter /FlateDecode >> stream xڕYK6ϯTUD8M\^gRy8Gb${뷿H4MA @?5Ƭ"3+cmg*+DjD=-1Jb"1qA4H"77/-VeXfvu{τ߂ݯ7IdimC-ޮ7&47b4 4:m;4W+y3:.GWػq[aD#&oĶz-QЄn)\oN!kmW߯6& $_i*v8gCp㪩YPF,t -`?VDloԢO}>g$1:#ha'vb, cROaB={]?l>G&)爵 Ю&Xr;`vzڮ*?<;S9p1w ي{,eZk } ~ #_~k Jn] yAK8 ޭmXm]Vb٤;#eO\j 6Q(AgѵI<,ea^;ǟX\ FBTXU}cQ7p0r#ZՏ'I=.;DO=JA%w] njH.Q!z3elTG4Ep:tD 16X.iϿkZLlO2Dh\u~Hz_=>Q"yQWr*Ht9? Bǜ@wWb%^b =t SMu'W9\Ќ<1pT-:&./h,N-<, pO6 ^좤ͿUm<=,ˍԉ-tr٩iMyZn% e5)[< J̓$Ь/H8<&jA4O"/<$9/[^^Չ.u^|Y.\`8j`8E:[9)& *,8-^K v㲯9ʙn(#\ ̞ť'Wq2Xk?2gDӁ?- ]jcj\ GDƇHG Oй4rޏgYݏR9*\}vخ똣+썯*z'9hpY@,ZhsMGoET @ꅛyg$tW2Ľ,Tp7$M fBB5W8x\IFi) UBsJOӝ N -])ૃ~-KtC4ٸX$p}u*54@һ8ޖT\.rAՄٗV G3bT- LUQa'I^fz`M+^+aaUS~|MR@s̛]깃GC`" 72~o cJN(,NNk6\m-7,#DU*#&@% | Yz K5.UN&kȂQи8 f%䳓Ӓ80:Ƅ?e9cn$: Ǔ"K4\r56zNsWHh{"Ζ(|{ j0|;ԵG#]g/&)׾PDI٢sP3P< 1Sl?OC-nMfFEigM}Acxzq7'l9:d@Kb(WnHfsp)jH%ڸ<ҿ9r!}/MD;Hy@3FB-͈5ғLP:M4Sŋ[3eYwm?@X5գS ~DKbzx8Ov~¸UW%q>cji\(0JaHr'ay{ xYSq_JCxp}fySN35ZxJe^ ˂_,?GڑD!U'G)UwcM槛"$/~Ee`Sh8}tbL.I,9 L.ۧEUQL(+: vK^.μY#/?F Lz07'Z}*kF0#NÂb)4eteKȵ>?BL; ɹ ĢuC"g򿩺NJ6RAVv}!gY3nFu~;\:@aպ' $s5GŒ~|=7ܾ5MC8^/֬aBl0'Z֓XVmxa JH1npʊ!cNr+͛nqg}y_'Ehسɞ=˅eFR=P\<6d ?% a3j~ C~z[ZY̴ɣH/փd>3}B̳xf'/DEN2Dܖfḯ~znaznrU"s/A[YL6],sO.8⇷~OE3ehsdyÙ, <=Wlh6o1endstream endobj 699 0 obj << /Type /Page /Contents 700 0 R /Resources 698 0 R /MediaBox [0 0 612 792] /Parent 665 0 R /Annots [ 702 0 R 703 0 R 704 0 R 705 0 R 706 0 R 707 0 R ] >> endobj 702 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [330.715 195.677 388.829 207.633] /Subtype /Link /A << /S /GoTo /D (cite.lanave1984) >> >> endobj 703 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [392.817 195.677 414.735 207.633] /Subtype /Link /A << /S /GoTo /D (cite.lanave1984) >> >> endobj 704 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [418.724 195.677 449.802 207.633] /Subtype /Link /A << /S /GoTo /D (cite.tavare1986) >> >> endobj 705 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [453.79 195.677 475.708 207.633] /Subtype /Link /A << /S /GoTo /D (cite.tavare1986) >> >> endobj 706 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [132.772 183.722 205.611 195.677] /Subtype /Link /A << /S /GoTo /D (cite.rodriguez1990) >> >> endobj 707 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [210.336 183.722 232.254 195.677] /Subtype /Link /A << /S /GoTo /D (cite.rodriguez1990) >> >> endobj 701 0 obj << /D [699 0 R /XYZ 133.768 692.105 null] >> endobj 142 0 obj << /D [699 0 R /XYZ 133.768 604.42 null] >> endobj 146 0 obj << /D [699 0 R /XYZ 133.768 436.079 null] >> endobj 698 0 obj << /Font << /F8 210 0 R /F18 207 0 R /F17 216 0 R /F11 368 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 710 0 obj << /Length 1008 /Filter /FlateDecode >> stream xڥVI6ϯ*H4'E%K8<"K$w2A|Byr( &v~o*Z)cdUVht=$G`QAXQxZ`6(fss{JYilHtS~HX)762Z 8}"*s[ N+2Ԃ~[#Blޯᰎ}5Ҝ@,y:Wx9QMzu{_=ʎ>E:w%*opDc0D (%4 4~­ֈ-p8dBۊ%2ScU Bh;o2v,F-sj. #߻0bCV9Q4ݎ+ _D4=+Tǐ%~M("$h;؄z@| џH!cȘ[gfעR>_'4L!aUIpq;4x:80B) |K˰f)!TQ=! M ÂpjGt޼t2Yz&TZy^0e,8}40 x]q6'>/ЂɫIbu3Hv}jep6hQ"I&Ŋ9~2T'Mõ5l#Զ.e%9K e^k$I Yd2S:ͭ(-` ؀Бsc0֏`ET~ > endobj 711 0 obj << /D [709 0 R /XYZ 133.768 692.105 null] >> endobj 150 0 obj << /D [709 0 R /XYZ 133.768 667.198 null] >> endobj 708 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F20 221 0 R /F11 368 0 R >> /ProcSet [ /PDF /Text ] >> endobj 714 0 obj << /Length 1793 /Filter /FlateDecode >> stream xڝXK6psJE={ۤۦ @@K-Df}A `993gVΞh'csЁv$)ݥK9B485aXOG~3n6,'"260Gxje^uzgr30¯(O/{MPlJ(׋^ PCm9*z` (>+wҊv) ̒scH8:gqNj,5ZyۮTzy a >x>Ӏ nA*(ʺ"Fc1 Ǫ]xf+$sFoNQ\8QpnEqD2ySxX5}H 5GN{T\w08^f*U`^:zhpqޝ_ #&[c(2p%[vE ] xk);(gwPN!SE/3f S"4 ]d\%e2YJ9,;~[nkendstream endobj 713 0 obj << /Type /Page /Contents 714 0 R /Resources 712 0 R /MediaBox [0 0 612 792] /Parent 716 0 R >> endobj 715 0 obj << /D [713 0 R /XYZ 133.768 692.105 null] >> endobj 154 0 obj << /D [713 0 R /XYZ 133.768 667.198 null] >> endobj 712 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F17 216 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 719 0 obj << /Length 2087 /Filter /FlateDecode >> stream xڅXKs8Wfرښ23{%Z5$'뷿IEn@>se 84QznEW[Z(M`vaqWW&*ô(to0 #?m~w0ެLP7+g17~`'a^䂽Jʰ0 yWM~RU*5aAzG #M1c+ -TvUs`ViTO;Tjh#J 2Q̂Fq#H8 Gla@NE^`PRp)98(mD9j""2?B`_@Nc9؜k<7$/쫵Kt+X&*8r'6Qf[dwjhBsvF'ؐ-L>HD[aQ!dL*ڟgGn5(T@ ;WK$zD*,G=5c~ ꗐ)I0~Iopx-hZCt<g3{a!=x@p6m<&Dt, {ABw-s̟ ێOg3R1'yKiQ\ek?SiEi"/,)Ywd뎺J[$ISHUe*߃>r蜗yYrV8b{adI#94,#˓~J;5JNv+wv! h'Ht4 tmw{ފ4xifQ~~k"OhlχdeOmRz_NZc]|I9As=J k:r- WmpJ@4ffw<ڰSAʌzVɆYE@IW."1C338u"^Dy+^X)wj&C %L#^]Li<JjC;ýўakmg=]}8QDoD%oP8@VRVo( g k{kbKԭ߿:xoMfQ`x-0.' ;$xJס]Wٍz#YwۘR7 `ǁSTZ$,D'k({\q8rd2;tFєC0uӖ9>7ACh[IN%g=-]7WN ujb;g/J;?J zS)*_7[P?]$y㞖qΕ\sw,l~N~ '[CpS=6Cy`|ehS}{_gyhk#WA{ 0Z/iA_]u׈!rBu 17&J͝EqoxKG*z?{ B7/%Ho􁥏qZi^rۓ.)<ܸ5^(?CY5|;&Eo͢k[H^;ISNR{x(9ц&5^0Mi_.OJ6iN_E !^'endstream endobj 718 0 obj << /Type /Page /Contents 719 0 R /Resources 717 0 R /MediaBox [0 0 612 792] /Parent 716 0 R /Annots [ 721 0 R 722 0 R 723 0 R 724 0 R 725 0 R 726 0 R 727 0 R 728 0 R ] >> endobj 721 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [198.446 465.455 248.704 477.41] /Subtype /Link /A << /S /GoTo /D (cite.hillis1996) >> >> endobj 722 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [252.967 465.455 274.885 477.41] /Subtype /Link /A << /S /GoTo /D (cite.hillis1996) >> >> endobj 723 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [395.049 441.544 445.534 453.499] /Subtype /Link /A << /S /GoTo /D (cite.hillis1996) >> >> endobj 724 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [449.916 441.544 471.834 453.499] /Subtype /Link /A << /S /GoTo /D (cite.hillis1996) >> >> endobj 725 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [198.119 262.217 321.776 274.172] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 726 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [327.913 262.217 349.831 274.172] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1996) >> >> endobj 727 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [376.275 262.217 446.546 274.172] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 728 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [452.683 262.217 474.601 274.172] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 720 0 obj << /D [718 0 R /XYZ 133.768 692.105 null] >> endobj 158 0 obj << /D [718 0 R /XYZ 133.768 667.198 null] >> endobj 717 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 732 0 obj << /Length 1442 /Filter /FlateDecode >> stream xڭWo6~_G(ϾklH#qעhȖ&vҿ~wGv#7%QG>(q)Yd$X_%DF`K0gqEg#$邌?_V1c{2M<.OKZQ2ќ3J,{^{j wa1%n8%-~8"ni .NOsu >jYj\f},kXVʈܔ{& RFRz).~{ V/x\\NpG,3)sXCzEKdkE4wvc)<)3੿lNczzfXd}tPYPE^GG> 5ʘMzgQۖ6?jݢ. H4[u5=1%\cۛdCBA$kP|pmoF~FhyLL@e@6iZK75 gIfc@Pk6jXzJ͂zaAnCˡ,ϗyWQfd.xaJ|5[m~q}@ ͝}"zlN (k;+LɐeY%4G+:@ٲRLl{<0.~^@'Qi+39#l!S 4'.92v ,MĝٮP[;7~5F]> endobj 734 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 416.015 447.34 427.14] /Subtype/Link/A<> >> endobj 735 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 384.135 468.261 395.259] /Subtype/Link/A<> >> endobj 736 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 283.54 426.419 294.665] /Subtype/Link/A<> >> endobj 737 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 251.659 421.188 262.784] /Subtype/Link/A<> >> endobj 738 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [338.888 239.704 466.907 250.829] /Subtype/Link/A<> >> endobj 739 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 207.824 295.66 218.948] /Subtype/Link/A<> >> endobj 740 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [182.475 163.711 283.844 175.666] /Subtype/Link/A<> >> endobj 741 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 152.033 416.456 163.158] /Subtype/Link/A<> >> endobj 733 0 obj << /D [731 0 R /XYZ 133.768 692.105 null] >> endobj 162 0 obj << /D [731 0 R /XYZ 133.768 667.198 null] >> endobj 166 0 obj << /D [731 0 R /XYZ 133.768 488.032 null] >> endobj 170 0 obj << /D [731 0 R /XYZ 133.768 370.118 null] >> endobj 730 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F17 216 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 744 0 obj << /Length 1165 /Filter /FlateDecode >> stream xVK8ϯpq0F0-l&5Sqmd2 ,8~!Y9\eVSəT_&,B_,_EE"x ?]"J3*Jf_ =)|ͥ #WiK\-c*=% u iܱx-1zJg%OCIϮKӃH-㒈 SqƛK1jέɽfpbʁTfn9VQVi,-I ^-=m3GK:),ɺ":JT%@L՚l` |ز|W b&?Ժg`;&7, Vy|F{T{/F}jYU(COyF_㭒ss⫝&$1P`% ;򐿟*H6^.9 tNu7!EeK9)\n19b0LJI? ,pAӛɷ@.K{i|#y&2}*bؐ+/Uیm P# zn)t>qkʉwĩX~?E/Zxr0m}P |T`04]yn1;{K=` my.}si9 s #'_lJ&,<a0m~C@uyц8UU fŋj8Gl*_n&k2h[$g#FF?!!8`@`<@Wa4ZBB΃bZqV#Jk↌|*mb+!D؁PvQOGbEQQOښgg V*sٔ5S ! (6L 4nY4M Y465u b޲+$q]צfBNxq.e[vDbƞM$8~=TX\5> endobj 746 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 550.511 478.722 561.636] /Subtype/Link/A<> >> endobj 747 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 518.63 452.57 529.755] /Subtype/Link/A<> >> endobj 748 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 486.75 363.655 497.875] /Subtype/Link/A<> >> endobj 749 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [344.169 432.26 358.891 443.108] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 750 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [220.305 408.349 242.776 418.933] /Subtype /Link /A << /S /GoTo /D (subsection.2.1.6) >> >> endobj 745 0 obj << /D [743 0 R /XYZ 133.768 692.105 null] >> endobj 174 0 obj << /D [743 0 R /XYZ 133.768 667.198 null] >> endobj 178 0 obj << /D [743 0 R /XYZ 133.768 472.733 null] >> endobj 742 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F14 243 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 753 0 obj << /Length 1679 /Filter /FlateDecode >> stream xڽWYs6~#4A([;hiH ؿ{m1͈bSeR7Is-ULQBmۀ0Ųقܮˮ+mЅ0Qq׮:_T;t]5EC+CFyw2cLͯDXZ+HNq`eDOǵZ`\B(IrF$R%ʈAp)P_,tѣ8ux*úsYOu&v0g% ?)Qt ?lfi GhsP"ߝ% O~@#_L;& P ػI3%NP_z noעˋ.%_p] B]y g"Ĥ4,ļ^R^ Z})4* n&<0@ fZXZɍ(O4,x['eKB~[..8Nq[Y,n(ԈZEG6}0|[|b?݇)$1Z7Ze8x!{I(CYqw ;x C&)pvUS r7A}'KoYqK=\E[U-ou}-= &IUUTYCѧYÖ2#CNJniE6xA-4p IOŅfg2~A`NNC@B,qCTlINK@p$D &{1`Rt}9|$Y"Gp]0y &Z1UY:Sqt>~É<?є2\Xϐ{adfe+Ȍ0N  9o|cqb6èw,vlD9/BS%A7@rXrVܛl?#aSA積4Qq 'q?hiqGm:0 t `R4:v]OWSiۍu2C]nK~Rl=}X:hqm^c񫤁 |{Ee`oJJGU=É pjѱ iz /'s|nPmyW;O{.# ݄ YBŞp 4ˑԓ}s\Ï([+ѪFv1|UlZ]t{-y[pe]-0,pT%B8u*/Gmx@ >cv9Mm i K Z?_YACr endstream endobj 752 0 obj << /Type /Page /Contents 753 0 R /Resources 751 0 R /MediaBox [0 0 612 792] /Parent 716 0 R /Annots [ 755 0 R 756 0 R 757 0 R 758 0 R ] >> endobj 755 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [194.208 369.677 282.959 378.478] /Subtype/Link/A<> >> endobj 756 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [161.553 266.292 247.536 278.247] /Subtype/Link/A<> >> endobj 757 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [411.864 127.721 453.569 139.676] /Subtype/Link/A<> >> endobj 758 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 115.766 194.541 127.721] /Subtype/Link/A<> >> endobj 754 0 obj << /D [752 0 R /XYZ 133.768 692.105 null] >> endobj 182 0 obj << /D [752 0 R /XYZ 133.768 667.198 null] >> endobj 751 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 761 0 obj << /Length 1119 /Filter /FlateDecode >> stream xڵVMs6W͔0@qU5=esB%eK-X.o[H6F" K`Pz{quf33y^ ]7ae,` /q3 V03ƈc/V|j- <ņ״h۴U,԰^=^ 6-[ yrXNz7]zf_1Um֣?wh ˵ڟEh+j@}▯w|o1&~8ebKjLbȝ=nS W礏Gpwx\H 0'n%,dZgԝq#:uue%NJO|"֊,шv|ŋےYZ!9>xT7A1šPqYUdry&A]@%N9cWI6MPM=rU6߇]v]iAĆGI f-anxFQXm/ XݲZ'B(݉- NFpf)x % gBhwB9,$2*բ`nӝdg^8Óc0˧So*]DtW%,܏nn% X )c%Q1fQdtm\'&b׮{LaE~qq_$ɚ;ͳjmX TkY)A%iAy}s&x{:ݼ';.肋?Cퟹ7uNCB}J0c!ki ~cc9t$4*%/ Z ^26~e2ZL]\"ϔ&F;l/7W)LtꢀߟnORky!𧛖endstream endobj 760 0 obj << /Type /Page /Contents 761 0 R /Resources 759 0 R /MediaBox [0 0 612 792] /Parent 716 0 R /Annots [ 763 0 R 764 0 R 765 0 R ] >> endobj 763 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [161.553 540.174 247.536 552.13] /Subtype/Link/A<> >> endobj 764 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [429.852 461.027 453.569 471.875] /Subtype/Link/A<> >> endobj 765 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [157.679 448.518 296.935 460.473] /Subtype/Link/A<> >> endobj 762 0 obj << /D [760 0 R /XYZ 133.768 692.105 null] >> endobj 759 0 obj << /Font << /F8 210 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 768 0 obj << /Length 2180 /Filter /FlateDecode >> stream xڝX[O~_-cٷۀE8s$}b#_fv֭gȜB_(8;OUѢ`S$$q$l( AMh"ʎT+?-흮G((tI0&L=JA%3[6 Qr28Z6(0tD(C,s|iˎԩ6J ۑi ,JݔʼL4Fq"@Z ~Wb5׶9(lʪ֨znq{srI$x[ ⫩MbR/PO[$OJ#7|yK|%*IT0 f^odH1m4]UӔ^ݞl҂vᶣd$Hã*t 9ĕ^BQxcJ ),,V5l(4$^r#~2nlW/d@FR&*y%`rMYôZ$RY"ybѝ%TBEWyqnjd ~ .y z\B^I>.mӻ,^Q^:S>؄9`WaZ#" I[-] -0x#|ӱ\8f !#`${؝[(}:#.- l @O3I/@qNb;i@880JݚEìW;EksfCϯЬcrJ,IMkZԤŅlMw5IMCv`LGJt-1 ]U+딚`!:!09"A:qd&Z8s-M˼q}9>>P6È4T6f4[VzatQͷk {ۺ}/\O4L9;'B- 8b62;  csC,<2_:n9N8<$rC/':/ hϦqR|Tm`N"|Ñ&A[-D+W*(09]=!> h]"e٬#Ҷ%ȉp$k`&ڮ+a0 e/0],9*ft/SwݓWN03h9w3Nػe$S]UV2o|naS,[A;%c Ww3 IgT]5(MR΂@:+pP{wysxz RWǼp[AG# V4X uj_͒-7lߙ-k 0"{zGgY"ɼkD7xH'$y&lLP}y_ƭi[ 7Rjn|d΅i pbxAM1u'kCqTV!C '҈G W[|B-K×Ԡ^4t#+loUR*EX|7\j8nj*!#Miԣ:ߋfg*[߰h4x\S c.򞩽M6~{#F7a]k@@>2XrAfvWꆙ ]R߶w7⍣v.z:kJРU啅h6l[vgեJ JƊ'wG;ΡV( jI0xTUm^º\8q+ H67#oC ^ Re ǒې&hEsZ?QOoKozOE#l]yFMi놣5KQvLWoHm>12*kmn:*tn'onlP肮]:xCL%!wX~&;2ᙐ,%7e![pqE_͒;,}t_CzS`>x]{$X (!bqFwi]RjzCqpj˭HFqMRZI"D(4[<d9endstream endobj 767 0 obj << /Type /Page /Contents 768 0 R /Resources 766 0 R /MediaBox [0 0 612 792] /Parent 778 0 R /Annots [ 770 0 R 771 0 R 772 0 R 773 0 R 774 0 R 775 0 R 776 0 R 777 0 R ] >> endobj 770 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [455.562 435.567 478.476 447.522] /Subtype/Link/A<> >> endobj 771 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [132.772 423.611 281.214 435.567] /Subtype/Link/A<> >> endobj 772 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [169.08 387.746 279.14 399.701] /Subtype /Link /A << /S /GoTo /D (cite.mascagni2000) >> >> endobj 773 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [283.236 387.746 305.154 399.701] /Subtype /Link /A << /S /GoTo /D (cite.mascagni2000) >> >> endobj 774 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [294.122 375.791 475.708 387.746] /Subtype/Link/A<> >> endobj 775 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [149.399 363.836 220.323 375.791] /Subtype/Link/A<> >> endobj 776 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [259.462 363.836 352.63 375.791] /Subtype/Link/A<> >> endobj 777 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [238.224 173.106 385.93 183.955] /Subtype/Link/A<> >> endobj 769 0 obj << /D [767 0 R /XYZ 133.768 692.105 null] >> endobj 186 0 obj << /D [767 0 R /XYZ 133.768 667.198 null] >> endobj 766 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F20 221 0 R >> /ProcSet [ /PDF /Text ] >> endobj 782 0 obj << /Length 2199 /Filter /FlateDecode >> stream xYs۸~_GjA&ǎv<;^hswwhK򩝦xF.,G>ɑTJ(EI G?Zd_{'H m$*޿靌GA(LlF|?wPgf<^ZU=~6Oh4JH^&" WM Grt6bo :O1GQͱ{6Õ.R'~~%oeD-mU=v׏;-sf9ծ.@򺲝>nz݀E5m-hJV{x2xK\TMV~NNӻ@n)X1{<%uؤQk#|+f+;a36j:لRRı:#H<~BwâB_zWЇc6BnƢ[VaS3[wݸ'V!3sjuJͳŠ ˾Zb}\FH`IE=4V(lχj>|ƒ{ j~o(p+' %"<4 ěk=ve:fhgrYϺ53$(h`G)=2ù"OS@Y ۧBQ:שspaŧy];mf(mJn^&1'vS>vڢ<ļZtD6@go#8h&۞ڎē& D My,-̱ܹ$Ckg-PZZ6#kshF|*.w.ND[+/2#dw&M$OVǴŴ6D?iH7hq4! 1v\̺6Ln-5 ⅕?ʩV455u M pSFa]|w,?_3Ep"*un 6|A2gψ{VahNjXY0(I̸yl\2Ǹ0n9v_s %|IQ?nj3k}@YfVw=HDrQLv&p،":4BҤ4eendstream endobj 781 0 obj << /Type /Page /Contents 782 0 R /Resources 780 0 R /MediaBox [0 0 612 792] /Parent 778 0 R >> endobj 783 0 obj << /D [781 0 R /XYZ 133.768 692.105 null] >> endobj 784 0 obj << /D [781 0 R /XYZ 133.768 532.864 null] >> endobj 500 0 obj << /D [781 0 R /XYZ 108.862 536.351 null] >> endobj 498 0 obj << /D [781 0 R /XYZ 108.862 504.47 null] >> endobj 505 0 obj << /D [781 0 R /XYZ 108.862 448.68 null] >> endobj 497 0 obj << /D [781 0 R /XYZ 108.862 416.799 null] >> endobj 690 0 obj << /D [781 0 R /XYZ 108.862 384.919 null] >> endobj 691 0 obj << /D [781 0 R /XYZ 108.862 353.038 null] >> endobj 428 0 obj << /D [781 0 R /XYZ 108.862 321.158 null] >> endobj 254 0 obj << /D [781 0 R /XYZ 108.862 289.277 null] >> endobj 512 0 obj << /D [781 0 R /XYZ 108.862 245.442 null] >> endobj 496 0 obj << /D [781 0 R /XYZ 108.862 201.606 null] >> endobj 503 0 obj << /D [781 0 R /XYZ 108.862 157.771 null] >> endobj 780 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F17 216 0 R >> /ProcSet [ /PDF /Text ] >> endobj 787 0 obj << /Length 2778 /Filter /FlateDecode >> stream xZ[S8~ϯTƒۼu\:C}ݦqmwl =7M&$EUK>:\ O(Ri%Q:fՋpoC_ha,h|0x%Jt tUnӭ3Y_^e{D{p9OpZ.:(CF::*!L0:Ǿ uWf1p'K|'a;^Wq Q{WF7oU0.0mmfu-,e]Ջ /uH ydI ($ j8!SF&_eOw[x */JwtDa/ *g$mSq6}QozBR`k Q\6 &+B %}(cЦʘD!:Tࠍ 5Α(y$2q "93% TA:Y,xЛ_3J6[{ςl6Qk7yS%"YhH" t) (R ^DtK_֍& {#Q3FC&]z[B$+iO߁[ p{WVdiqw@@Y((n:S*R_(hMs4}YBFH$~ŵw<Vm|b к۫/z08o|5;[tZk{&<8/4hqOY(֫>&!RXXb<"-md4&yX'uB+k@`jx|Wv7& Q6|OCɌ){d$ eNvhH v qZJ+I2Bk+MvF)p34Gj@kyV VZxB8fo-4k ]+~80,ϷqNB^1ECvESKFnC kZP6@{TԔmP g*H18ŨWz5 NUƻiwӀ4i4ཫ)dD c#w"`krflqb!`;ypݲ׽^83H+)ݢ 3\Gl'5ǿ5񔞴>؄(ɑ}VD;!*K'3Zq2BJ8 kӹ8!F& xq 7/d?żj1͖7[2T) b&ȥA ^6$=ɾ(t.'])M4Fr\_Iѹ;ӰY( MɆ%ƭV+ [v>^+WĝQʌj2_ #GM Kt~z)!3 yԗ%tIT:GL+2+T$5\MW|s3)?g,E+y زο8o% ˖$Pkdp'z,8 ЬW>dHu op(Qq|Yà -O"׷6, U3mc*,kr1CT$O>.%Ge܇z5?:Ncv+8CVc#$g=J֐CFAǎ8yAoM|j0,|`C*wS^ad0!)쇚 9 'W:*l洊2p"m9rI`,xu~؂&[8r҆ ꔌԉv+<.h e"{Xc9 Prx AKUbUOBE8ٮ1u\;[.طp7AE]r39b}J`n \= hBXxD3뛶- ,ȨB9J$l~vsG%-:^<`GkT >ste>ӆ ~J;Fպ uiyYTRS Gיp6c:?f^/KvFn xj_pîܭ̭Ȅ }92EK)=T׈BpXDoQ˰(;|^i=$?vArz`' c+-z"-N([;W%0XاhH!YktK(kGqdk,I5GLlo"4~ xs㧖-q'F|1nCPmI4~~Ulendstream endobj 786 0 obj << /Type /Page /Contents 787 0 R /Resources 785 0 R /MediaBox [0 0 612 792] /Parent 778 0 R >> endobj 788 0 obj << /D [786 0 R /XYZ 133.768 692.105 null] >> endobj 729 0 obj << /D [786 0 R /XYZ 108.862 669.191 null] >> endobj 499 0 obj << /D [786 0 R /XYZ 108.862 637.31 null] >> endobj 650 0 obj << /D [786 0 R /XYZ 108.862 593.474 null] >> endobj 651 0 obj << /D [786 0 R /XYZ 108.862 549.639 null] >> endobj 427 0 obj << /D [786 0 R /XYZ 108.862 505.803 null] >> endobj 467 0 obj << /D [786 0 R /XYZ 108.862 461.968 null] >> endobj 779 0 obj << /D [786 0 R /XYZ 108.862 430.087 null] >> endobj 570 0 obj << /D [786 0 R /XYZ 108.862 398.207 null] >> endobj 502 0 obj << /D [786 0 R /XYZ 108.862 366.326 null] >> endobj 469 0 obj << /D [786 0 R /XYZ 108.862 334.446 null] >> endobj 571 0 obj << /D [786 0 R /XYZ 108.862 302.565 null] >> endobj 504 0 obj << /D [786 0 R /XYZ 108.862 246.775 null] >> endobj 411 0 obj << /D [786 0 R /XYZ 108.862 214.894 null] >> endobj 253 0 obj << /D [786 0 R /XYZ 108.862 171.059 null] >> endobj 785 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F17 216 0 R >> /ProcSet [ /PDF /Text ] >> endobj 791 0 obj << /Length 1431 /Filter /FlateDecode >> stream xŘMs6:R3H&OmicwzhzEH”eџ~I.u3"]|=|Xɑ01d*BfՕ-.Q .NTN"F&P49"0Stxf|}]:gp_uc4x7ITV{(eQv .?U+|C4d/B e <%'* 1m]bW?tv~0)LkM*Mmvz2m~E Y-BLüdͧ7NkG@oIpY|=%ٛ[ZopEjEpb©J5uus?`/Go j:iZ/"q=94 U[j[ -q-BD{8 4vVڮ̈'vX2AW!>H":ٱJ0)"|X&pn|J)("2o3,m Yid^7# ᦍ ;ִ! vc-=}Oz*UFءfXv ̜!|r&' "-Z3ҧ%v+۹W~h,?8G=g>dt3_]&&z ?/_g+NT3X&=Vy񮈕B1hi51M`-p/Bɵ4ѵ\"h UK"pk-rd!]ϖ;߰-x-bƾKg0R3F|Wwv}n}X옯$9KFVꅍXtݏ(`t6M݁.3\:pA:_Wy{}h,B; @_(.C-V+Ԑy)~Äq_qS"im)Mq-w5h$`*2ZbwwҗCZ`\I42vwdrte}bM%]=sxi?4CrS3 \ <֡^6^vHdGDfaI |bovcmR,| 7|endstream endobj 790 0 obj << /Type /Page /Contents 791 0 R /Resources 789 0 R /MediaBox [0 0 612 792] /Parent 778 0 R >> endobj 792 0 obj << /D [790 0 R /XYZ 133.768 692.105 null] >> endobj 528 0 obj << /D [790 0 R /XYZ 108.862 669.191 null] >> endobj 526 0 obj << /D [790 0 R /XYZ 108.862 637.31 null] >> endobj 572 0 obj << /D [790 0 R /XYZ 108.862 593.474 null] >> endobj 429 0 obj << /D [790 0 R /XYZ 108.862 549.639 null] >> endobj 470 0 obj << /D [790 0 R /XYZ 108.862 517.758 null] >> endobj 468 0 obj << /D [790 0 R /XYZ 108.862 473.923 null] >> endobj 501 0 obj << /D [790 0 R /XYZ 108.862 442.042 null] >> endobj 789 0 obj << /Font << /F8 210 0 R /F21 228 0 R /F17 216 0 R >> /ProcSet [ /PDF /Text ] >> endobj 795 0 obj << /Length 1399 /Filter /FlateDecode >> stream xڍWK6pOJ%QcRl>iz%*%f;Rc(|0y|3&4UXmC9X X$CO e\Eỷ$qf'mOsJmE. YTsY2#GxQB7abrSE7* G*S5Փny٘#qBmN_" %8c, Da؛TkS T"4T3x+>ն~5۫fvؠ0w^ĮU DJqXEW$pvO>)).ҧl8= /?r(xc`v_Xc>ѷ8K1 dvH2ZWpQO.rgH*B5hZM |y%l{kTo{ Ç_Y2iWL1 U~4Ξ2ɂab-FtLaKL( [Fᝥo4<x肤x԰/긗+# kipz>r>g g5u|3p!t:_NQHn?-+b˹ԏ^PCϰz ɒJ0jT`Lw3̈́uvHfo]dr4?\r2.0 AlJYxν34jFP6b?eU[pWT죲>Y ep2A-pBͮKU<6G;WutYݧEJOGK<KLV6l$}0Š]cx^&?t5pKb 1R-&ts`$xZ"zsˤ_]čo|Z.N*kϺs V_ٵ Pf J<> endobj 797 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [261.725 381.768 276.448 393.724] /Subtype /Link /A << /S /GoTo /D (section.9.4) >> >> endobj 796 0 obj << /D [794 0 R /XYZ 133.768 692.105 null] >> endobj 190 0 obj << /D [794 0 R /XYZ 133.768 667.198 null] >> endobj 793 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F21 228 0 R /F17 216 0 R >> /ProcSet [ /PDF /Text ] >> endobj 800 0 obj << /Length 2577 /Filter /FlateDecode >> stream xڭXێ}KEE 3NlضVF$oOקn$@4Цb,:E OTIW& }īm&XaH¯ݨ 4C\ݨt1w|~Q^ޮ7Qb* g p3DGnQ5 HNn uoyb/Hh.}x}{B򷆛îQҹsA1gǝOQ-GlqQd~l|l6"wS(,?.)jZb PC JufZ>`ԒaH59ǪInh-RWǀJG65^gxm/R~KS1A ]-ĘP⚟r94r1W,.v<M0k O]<8Ã4Q}m¨'+{"O >Z~?Sj{ '/TP8&_C2\nN[ HĀVCڢBfMdHh"?NǛ'cK 1EȏPɞs%$Y|1U:3ҲN VB%~ٚLȴbS>HL..Bc4DP ~0*.>'zƒر VnY3{۱%xO X;"2!$ Q}ҺU8%+pϗu"+p<Â=PѴt}GT+pI J_dI9d[=qWz[ ~U2.:-ڒ%,U&S!8"fǙq}o=B9qfB§hѫj,Ԓ݈瀨yf-_GR!AԸl|BLOP",{%_VG*?}"{h a2z>$`7}c;KpF1@yXN/pdCVJy _N K!%_r[1QAi!L˜޲.RDEhU ¶~hڎ GK"\1QeF=TC6|rvz *^ kʑ@`,0j| ,Z*EO0{3xdl ^E;IR& {ݺ˵,` 7OTrS<8-f ;H[·x蝔I8}I=Up:>–<*jIX&R/[ƴ: s푪"]V!Xz*$Kp/ڢqԃ{p\dr{)/;8,˟?`#M$I#B*!b 8ޟe1PƜċ[c.96=:O+ m٤=&jWJ|;N8bYȅ"A)1CQ9j'iQE9*~9"LAB!gYJ#b^0u@ ׀=m-u`uyAyBhij$̚qvBq,H^=X:H5,NE|PyOoybUZ])$#=LDrdhRQoaߤ1b"Ns gyDnZ2߄%NRVi|ҊCendstream endobj 799 0 obj << /Type /Page /Contents 800 0 R /Resources 798 0 R /MediaBox [0 0 612 792] /Parent 778 0 R /Annots [ 802 0 R 803 0 R 804 0 R ] >> endobj 802 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [416.958 352.254 478.476 364.209] /Subtype /Link /A << /S /GoTo /D (cite.mascagni2000) >> >> endobj 803 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [157.679 340.852 204.31 351.701] /Subtype /Link /A << /S /GoTo /D (cite.mascagni2000) >> >> endobj 804 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [209.251 340.852 231.169 351.701] /Subtype /Link /A << /S /GoTo /D (cite.mascagni2000) >> >> endobj 801 0 obj << /D [799 0 R /XYZ 133.768 692.105 null] >> endobj 194 0 obj << /D [799 0 R /XYZ 133.768 667.198 null] >> endobj 798 0 obj << /Font << /F18 207 0 R /F8 210 0 R /F17 216 0 R /F21 228 0 R /F11 368 0 R /F7 466 0 R >> /ProcSet [ /PDF /Text ] >> endobj 807 0 obj << /Length 3335 /Filter /FlateDecode >> stream xڭZo6(p dI(p8_A+yWVZQ;r͋ZwEp??r(9=}ykz{ Ƿ 'n$Fn^IS7:E;" BԧJyy?]~ Mmz$kWAlO9a Z!Ԭ+uӖw'+=Kl60סg$ wSDZ(^AB<˜4mk\8t{@۬o' P Sۂ= F(J9rCs: x&Fe XTkڞ 'J=7RCV`s^o\uF0{[[pG؍awJiu? be7Y-ߜ&!໛NhvWVFCZ^{A2F5]x9 εt0y0 &Dme,Eh\9mkt '=cK$x||!nav߶YƆa/%*:B7Mɭֵ=gnv9p(/x/^ gF/0&7 nt=*:AA=S]_i:uv迨qU;dM'-0횬.I^|/9 `tv4Y8Nh`{#!+6(5hYVC̈́f +loNb2p>LcW0e(O. P*ϗk-^x87st{~uϋWZ$ #;b؞_av#Cp>AO6iFd/MmwD|l5ldv":ny0Q`k &he9? =z$[f='7ڣ IƁ JW I&+R%avy%S̪^:v,Wj!j榄?1@PX4oQS nݮ׳`7JȉFwjn0w^^ BSp"phQo蚊  u . p{|b7D&]Ȥ1"9TBhF&O|B2P,r7ģΪ6$@"č9Cߴ5/H J!Z, ʇAu D|h,> 8؅@}!;c>ݰ'4&Nvqa~F0#Zs>;[ lmvtoM1[ Sg%=C~mv]Tpȁ1iUWţ8Ôw(ew@}I%E溺Jj:\1ʸ+[SL"c)r/ jd,bz|GʽKgn#)wp*h%=hv$ЬZq/p ɶ7ͤWecEy#?EwTbU{1$'$Y>1 !y /jJc7 `1^C}7p*Ll5"9_K[d8;< YJT+BV hQB71Xtf5[nf= !CFFb=JeQ ٲz]ٛ UbuI3WbjRRsۼi(56XMJZ8.S,ܵkF8*[M)rMKE XU455,Z6SpG1lƢcz qn1[Ӟ@O=&6횎T~ OcyhO*70l+*~{2lxmL_ [5]y YgC9#S{ }4_lBe ɵS2V('LgFXV :%\`V_\"6Jܦ |n&k[yϔ?plxMryu0jSci>ΐҢƎ=/`U.NW'eH]s9 3\ZHl~<dLq5yδ3sNl %Aovc!ނ%rO8 oELt)ZPt%C'\#lhh<6?] ;%RKba-D" o,="f_6)5CmƯo P.k8yF[s?b`[ =aa,*cdoY0̵Z[9݃`4L_U@^1Cwdi`8SMC, KV9gVӠg)Wt4)#0g_=QCŇl%2ǚ,ia?k[DOkbW{O޾gH vc>M!Uj,I0Kbu&OqDݿʼendstream endobj 806 0 obj << /Type /Page /Contents 807 0 R /Resources 805 0 R /MediaBox [0 0 612 792] /Parent 813 0 R /Annots [ 809 0 R 810 0 R 811 0 R 812 0 R ] >> endobj 809 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [280.247 442.54 368.873 454.496] /Subtype /Link /A << /S /GoTo /D (cite.mueller2000) >> >> endobj 810 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [373.086 442.54 395.004 454.496] /Subtype /Link /A << /S /GoTo /D (cite.mueller2000) >> >> endobj 811 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [161.553 430.585 259.644 442.54] /Subtype /Link /A << /S /GoTo /D (cite.whelan2001) >> >> endobj 812 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [263.74 430.585 285.657 442.54] /Subtype /Link /A << /S /GoTo /D (cite.whelan2001) >> >> endobj 808 0 obj << /D [806 0 R /XYZ 133.768 692.105 null] >> endobj 805 0 obj << /Font << /F8 210 0 R /F20 221 0 R /F17 216 0 R /F21 228 0 R /F11 368 0 R >> /ProcSet [ /PDF /Text ] >> endobj 816 0 obj << /Length 3123 /Filter /FlateDecode >> stream xڭYIsܺWHU44ىd;R\ 529s@ T).Ui@5Pg3~dgI}gE,8@oϔ(Zh\QCg,Y$y&_<{~ҳϓ$n"?8ߞqTGqا?|8`'1$z=\|BmZX 7{(IVJyӢݝ0q~u P_WuW[@:+jU].s3l{ālj|&ּAjD`=ޮŁW(W;kx=ʒs+DkCېPLegUW[\l9kа͡/jnd 25m]8kW %7~sՒȨCGH.+4訨G)װY jxd@Ѓ;\16|hEsA p匸Gn-** [&wӵ}.{aD己|D4S}1 ~Z}WI JM*ڋjDt?,&{o[Vb1bgkd;,m`͗pzCcY}ܼU꽼hs{hX瑥LTdǓՌwsq&@  IbνNٶBum*ϵE [tDKμLSVޣ eay8'Kq^2n-:oHA=HmzӃ_y^{Z? 3I1 B3y  FЈv`ZrekcViY:Q%Vvl 8 )< Y 4>܌iýRpW=Ւt=hm{*c#U`)RNkm{:Ás@p=ay_FLJ}xr (`Zi Q*;zK fIh0uPgC$xmcd̏pOSg[Թj$F6)gA\>p8+%%pa"+~lgC],$b :!.2 J{MoC!Qe¤J~,qm$AFAK~Ot⽧!4s2?amw3"J~f!f8ۛ+?9|)ܓOK pEd$EmoaKZLX1LN`r9Ή w@q{V˥=25=3l~-4?e>O ڏFy'l@,L.+1?S4.[f jvRQw60et n+V3Y>Z -T.J?S?PP( ௽g(bOAQ'wnjע/VnC<(OZ.Wg8<ȜC+\ ˨;ge##LMm+kCցLs,az`X/Y,A7D3d(^#._{g;_B-W_OW-Gmxss&\mbBPԇ_np$GiLge$lʼnH&*r49X־vYs2SڐM@`mS.%4H["Gσi{{֢AHR5!% AZI-C]R=|]َ}MbaU[\//Nܠr`+=znA&9.sX> c7桽cK* 186)`=,L\ *zHQl?j1\"n\ 2˱v:fќ]ؔK`O'ǒ0;0ԇeXqTmUKk_^"\”Q _M_JG>dHbeƾΒ#GKC|xa #"Q.-t gBg`(52ar rv3LewAf`˃7ؼ3N-tGV<*ud)z"vIlĕK:_2( Π{)Rk@pɎU< nQ~H7 w0endstream endobj 815 0 obj << /Type /Page /Contents 816 0 R /Resources 814 0 R /MediaBox [0 0 612 792] /Parent 813 0 R /Annots [ 818 0 R 819 0 R 820 0 R 821 0 R ] >> endobj 818 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [183.286 570.062 282.433 582.017] /Subtype /Link /A << /S /GoTo /D (cite.henikoff1992) >> >> endobj 819 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [287.783 570.062 309.701 582.017] /Subtype /Link /A << /S /GoTo /D (cite.henikoff1992) >> >> endobj 820 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [267.923 247.273 336.57 259.228] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 821 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 0] /Rect [340.755 247.273 362.673 259.228] /Subtype /Link /A << /S /GoTo /D (cite.strimmer1997) >> >> endobj 817 0 obj << /D [815 0 R /XYZ 133.768 692.105 null] >> endobj 814 0 obj << /Font << /F17 216 0 R /F8 210 0 R /F11 368 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 824 0 obj << /Length 918 /Filter /FlateDecode >> stream xڭV[O8}W#uLJUVZӶaI<.8(J!!xTŸJֲ*l2"ُgi3Lt& 9꼖 YWϙ䲩RUI#R']+27_w>좛e?ӀyDy.Ff%X8\*c;m3ʠqW #a1[<(QB5ܣּqVlyH eUJ6EA}y3L[p wfOxZ w|7>2{nu0h0Yv=3,47.j`7썣SW风C`ɒ!4வp 96bu|0ILm,JZgh#Bu̓""u]#GE߉z3iR nVb`9vDBLZHy 6e45hEu{;8P0k҄a ;S #]vr~nTFs;R>)(:o;6j!i,.0kb:usOճ֌8ed| fګv2/3u1+JY&T}iI Ia?rO@ɼЏΚP{ kP;u|.^&8jX/?Vf{ ^!.oU3Q !F6rzk&u5}>qgXZ u*“57./ JH1\)BVA嬕oC7wG%-8{%ت C]Y*!0O?$HQO4Sgb= dQH1+PNr "%\Z*u<*KW)*pcBm9endstream endobj 823 0 obj << /Type /Page /Contents 824 0 R /Resources 822 0 R /MediaBox [0 0 612 792] /Parent 813 0 R >> endobj 825 0 obj << /D [823 0 R /XYZ 133.768 692.105 null] >> endobj 822 0 obj << /Font << /F17 216 0 R /F8 210 0 R /F21 228 0 R >> /ProcSet [ /PDF /Text ] >> endobj 826 0 obj << /Type /Encoding /Differences [ 0 /Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi/Omega/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/suppress/exclam/quotedblright/numbersign/sterling/percent/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/exclamdown/equal/questiondown/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/quotedblleft/bracketright/circumflex/dotaccent/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/endash/emdash/hungarumlaut/tilde/dieresis/suppress 129/.notdef 160/space/Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi 171/.notdef 173/Omega/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/suppress/dieresis 197/.notdef] >> endobj 540 0 obj << /Length1 794 /Length2 1406 /Length3 532 /Length 1990 /Filter /FlateDecode >> stream xRiXSWQ)٣ ,@ .  (AAY `.EDvK\"b(KQT: ؟3{~ynBc@cx)2%bp8;> (Ϟ)-dn0@T@, ;4<~D0<` B0( Q 0A Fx¼!:/Oe0s+GM#I<[d.v^[]?]Bo  <8"EYCq[+#tsv]:Tci:R4C UvyhU-=ڝpf2|a+֘W~<_$wK !JѪGHzgq⻇dJ0[O^dS/bc_;l+=9)}2-RIũj{ٯm 7[u?y}5rVP\8ͼs!Mۨ} vCr÷k>~{N4t{=~Oh3o)7yH}UҲ=5bv8_=,ĤiHY^C Z|#^DSOXOubU72zϪ:Uco .p+CD?#@T5EZI&-3 -i;7&zQAyٕ˴8Ng[a{rXR ${sld:8l}O*_ 饆ݴ+ѫDF4CS%4ActG>i)1ȏ*M^-|T2}Fe8tzn>Z{I$B}ˈO=hx+fyI(<5-S쬳gX[J}J]P0km~4RywmieMn^iSyr*1W9Y|4y8tOUwV?8UYa[/tڢQT p`i ]uv3}8afw`W)Mwȥ=JFڋ~? /¥Ue_:k8ۮj }Xևf8U:hW:ds_BŅ|s0+H(Gendstream endobj 541 0 obj << /Type /Font /Subtype /Type1 /Encoding 826 0 R /FirstChar 101 /LastChar 114 /Widths 827 0 R /BaseFont /XNCVEN+CMTI7 /FontDescriptor 539 0 R >> endobj 539 0 obj << /Ascent 694 /CapHeight 678 /Descent -194 /FontName /XNCVEN+CMTI7 /ItalicAngle -14 /StemV 76 /XHeight 431 /FontBBox [-27 -250 1268 750] /Flags 4 /CharSet (/e/l/r) /FontFile 540 0 R >> endobj 827 0 obj [544 0 0 0 0 0 0 310 0 0 0 0 0 500 ] endobj 828 0 obj << /Type /Encoding /Differences [ 0 /Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi/Omega/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/suppress/exclam/quotedblright/numbersign/dollar/percent/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/exclamdown/equal/questiondown/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/quotedblleft/bracketright/circumflex/dotaccent/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/endash/emdash/hungarumlaut/tilde/dieresis/suppress 129/.notdef 160/space/Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi 171/.notdef 173/Omega/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/suppress/dieresis 197/.notdef] >> endobj 465 0 obj << /Length1 870 /Length2 1905 /Length3 532 /Length 2526 /Filter /FlateDecode >> stream xRiX^-P"(XBXU%AY (AEL&E-ZQ*[lYDd( 6H[k>wϼΜgA=A" !zX}`eG6"L"55|X#3S3 X!Fm+&c1iT"ޠXFeN0 "B}+'2A> Lx &B!A^0` ('6hMbtb :B@ʼn|6۞"/,՗þ>;[]Ukv %!T6f1 Y~D;27EeqnBG h-yi~Lqr]Xc?lxLp`ō/Ϯ"@4΄`hPy<% qeb&D(EC0"># `jex Py jo@ ~} S Cߵ!@{|'@,_gh Pg ſcCLп7\>H 1j4>OU{1AHC=i{"Y_ &ԞNW’k}iMgwruJ(y2&ޫ}[up+e71{yc"T e&N;g|ĔlgZr\E/jtԶv~,9cMq")T-ddnN,>f0@.`VԍpOR-q2=d!n?4FXl%е7݉.NM)rMqT{;g Sk?H:\f{prO^,m\XJjD9wz0GをuȗJ7x`7[lDiw!rMk6 w&C$ާ"sw.9DKXx'^TCFR_Ɍ/NR2qq͑\׽{ҟʺ'ht/0jb͛[^,<4!rhH4sҐ71 wCI#ƭRcGYn̮ꬬk9^9ZHmԖ>I.uiyXhz>&p~Y51iw%-- `k9 )]*|+n4urPEF8Rhqx݋q3-M_buoۛ>IuK^6?}J[K*23C>82mߝ}]`cC/kSvbhŨm\tۻaRڄos*R ~ĵ HcEidCޟmlܨi3g3t%Q?[SzRf8P)^{ ֫ a _(Upy}'ԫG}g|]PTsfڰ=G=ζV1 n1QUI9ᠻ셉K3O*3$Y;./ntjy|JSލð`NKcs?ұ)YE ~1a"u?³Јrg5Z(2_V(Pjzb9RÐf,{?t>cɷ4a/k XէpWHz|CvxׄutAA>O`D}[-oȭLgE [$KܘBԱHS5 ש1|xb k\W㮽i ?;1037BK4~Ǖ#nۋCzjnz1OdJwjZm% )&~\򞊴 0uU>@|ڜ̷!IX#mzkMi+-Km_`E^@%P6ĄTnrd}Hf_t鞶'28lg\8rڝN2I42;YGIP6&^hK^4j>sn{;n1qSAcL4+c-g$ZNp2핺hg߶:{['oͼvGu :'zTz)Rzryd'B[i#e* VtzqMcM߇Z+pxB-̟bokr%-)=aCQ=&W7> endobj 464 0 obj << /Ascent 694 /CapHeight 683 /Descent -194 /FontName /FYOPJR+CMR7 /ItalicAngle 0 /StemV 79 /XHeight 431 /FontBBox [-27 -250 1122 750] /Flags 4 /CharSet (/parenleft/parenright/plus/zero/one/four/five) /FontFile 465 0 R >> endobj 829 0 obj [446 446 0 877 0 0 0 0 569 569 0 0 569 569 ] endobj 454 0 obj << /Length1 924 /Length2 1960 /Length3 532 /Length 2599 /Filter /FlateDecode >> stream xRi<{ Rxd9`fl8ɾ-y clM!KNK(RYG%5eY!-Csz;{s_u_￲u DItu0p QV6(:L2GACB @ eL pt@lߦH0!T<EPtHxQa 8ovgR F<xDs3 Kʟ8͔NF D0 iOr7R}o !QM9G񄰯 2BRIK/@ >=kEGhR`_ < gG<( AmEдsuE"“G(nj5g>T<q 9_fAB1xRPT** ¹=Jxd XSDsZP, ( Ф bMr ŷ6-4(4oF[N?m/\ Nc"pZu K?gljJfF#u> !]BV B!Tѷ.6gXo#|\Ӭ t qOu 玽 }"+ƺkyR΢u.U6eK^XM~4ɲ[ôEKHx{dlVDZåǶn*m"_O\ *=3ZdYdFV,ƥEʲ0+HV.U23pL dyjNGZ4^4O΍b {cy]أPτ]7Fʹ  R$ZWS?g>P n,5aGHI2K~}I-N#co(g'3bTbOvsL7ܙʻ0V nᖡfF A41G^`e bA@aepjǓƒI=6xsWĆ)\ ~zX3urΔ`cJ⢫wj- |e%NB߮Z37wly2p}#޴bsc2y(9Gju~ն Ph0@v[.e(_87<.>Gm ?^$gYL{TgCK;g)s3H]ct[} ^݃{Jz*]偖(hKѥ75q.sۧ“w6Ef-07gC[uOm]ilI+x^"j0_/CGL"Ȧ#ppp&>jH[j$`ج#GU_c.MfUEN5=4b%_kR*ا)u@^մt] aן8IW J"QM r / F*dFF_=Tu}&"nВ1>y 8f<|]V0$s.@o?a&(*LDQ !meendstream endobj 455 0 obj << /Type /Font /Subtype /Type1 /Encoding 830 0 R /FirstChar 0 /LastChar 80 /Widths 831 0 R /BaseFont /MMVVFF+CMEX10 /FontDescriptor 453 0 R >> endobj 453 0 obj << /Ascent 40 /CapHeight 0 /Descent -600 /FontName /MMVVFF+CMEX10 /ItalicAngle 0 /StemV 47 /XHeight 431 /FontBBox [-24 -2960 1454 772] /Flags 4 /CharSet (/parenleftbig/parenrightbig/braceleftbigg/bracelefttp/braceleftbt/braceleftmid/summationtext) /FontFile 454 0 R >> endobj 831 0 obj [458 458 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 750 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 889 0 889 0 889 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1056 ] endobj 830 0 obj << /Type /Encoding /Differences [ 0 /parenleftbig/parenrightbig 2/.notdef 26/braceleftbigg 27/.notdef 56/bracelefttp 57/.notdef 58/braceleftbt 59/.notdef 60/braceleftmid 61/.notdef 80/summationtext 81/.notdef] >> endobj 832 0 obj << /Type /Encoding /Differences [ 0 /Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi/Omega/alpha/beta/gamma/delta/epsilon1/zeta/eta/theta/iota/kappa/lambda/mu/nu/xi/pi/rho/sigma/tau/upsilon/phi/chi/psi/omega/epsilon/theta1/pi1/rho1/sigma1/phi1/arrowlefttophalf/arrowleftbothalf/arrowrighttophalf/arrowrightbothalf/arrowhookleft/arrowhookright/triangleright/triangleleft/zerooldstyle/oneoldstyle/twooldstyle/threeoldstyle/fouroldstyle/fiveoldstyle/sixoldstyle/sevenoldstyle/eightoldstyle/nineoldstyle/period/comma/less/slash/greater/star/partialdiff/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/flat/natural/sharp/slurbelow/slurabove/lscript/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/dotlessi/dotlessj/weierstrass/vector/tie/psi 129/.notdef 160/space/Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi 171/.notdef 173/Omega/alpha/beta/gamma/delta/epsilon1/zeta/eta/theta/iota/kappa/lambda/mu/nu/xi/pi/rho/sigma/tau/upsilon/phi/chi/psi/tie 197/.notdef] >> endobj 451 0 obj << /Length1 951 /Length2 3617 /Length3 532 /Length 4284 /Filter /FlateDecode >> stream xRi<}ێB5Յ,eflc){K}0 c0I=˝dU-ɾFBEP3u><02TG8,A*U4p=@9B Lšxj9JTQQE2$'CM rs'b"AQ.NXDpGb(.NhBHR: \\G ~H P.2Fú؟4믒C  (!8, L`6$%FkN?e' M/K@8c)@ D|1(u HBe (m0B\W'"2_9W5u5 \쯚 K0%y!o/ )#£ D R?u!PX7@ZNpHLPX `),@i(L?JY< nNLY7#/#7Qudo'7(=07B0ob~$(R 7 Eir/Gb yZ®(ʟD.L8p'K҂|3»Gf(K-O)s "}e`@L]ZF>Qzhx4L5e[{܎6LvYkB~i+-BaxWД| 33ΜKem4_Ǎtrfn:my?9ɒ ?>8!pTH~%xzH*UUyQ_!q iP[p¸W􄆪E,8|c}(}PamNT|yuDxT^٥EDcxNY$;]vxª>KÊ5Xj~IQ᧽u~~i!ԊuȤo[Hi>,ד-^UI°Щxdؽx>jFFM:;2aV`) z&FߚE%ijqu`է*zE捍fФ`sJG~LRՂWvtfd)CM̃K\Ab׿;F艥}?gN[Е$nZsћ~OAAQ!FT2AkYwboUmTd`Q3m^ʟ2:ߌP~P bx靤'E_D!SSiUhEtn] 1vZk5 Y<(o֖0*EqByu늳3 g!uҏVQ3cvF]5?ޱy}VU;hHe~A#^)ݨȞ'fSfAla8mFc5O;;7p<"gt|uxYfwn!U#kF+pNab 5R޺ݒEp:$Za^8+r.eݜ|u~| @O\=J~3YWn^.H;>ӵ={ U 0)tI%!wzU+Z:Xn6GsɅ[ {L7Gِ S"+lx@e2_{U:%J˸)cf5td\PweYSjPkJtⱾ `My.Fȣg,ac lչ%jrͳr1pXX>A5j_nkz걐MyҤucNۻh [VN I?Eh\]ոBm@5 fχŋHkK~b:J^,]8s%RItXcòt7 ́4t:.F[ygNj<~ѷ^!c.m>{$99/7/_Anp ~u i,pArwh:{8 }M9qk(G\M;p0rl*Ccb OawMAq_vQ#t*06YxcĹet++?2Pc)Y(زtmN/J)9keQO|#nĞ*=ہۊo̐ ͖<1\ߊļl,M4s8)dzaMqewxi>a[J#yڢD@D^dZ/|>=aM{c7HNwwf!"$|9Kf=# XYJ3}+;Ƶ[bʻŴ7P{0cy@f&ߒzjI3"vb?G5 n J= I!EDkyOkHX]=̪Cݮ73P[ .4ȒԴPRV!KqB.S?==C:)1gWzʆ\#n/^rgS>Jg۹v 7ltx2i7TELl%Aٛd.%kK]|_6K># h}v]?wKY]B ycۙ{,(u~8f5gq:AJ6m#ٯQ_0N]o-X8qUZ:.ּʐ~YypCdl2z!/ʢaκGyt~U=Xז6įV 4lyyzn{GѴU5G50-ZױsܻX[1u !#"gį30_7Kttku"iF́ \T5F_~jғ 鉹fK?m.Oٲ.ֽo&{:mjcg-9k{3T]e ~LJ,7 e5 oK SggH@cfT ][ s7j3y8()ެtgI̸qg]tVdt⁵bOO+ozt_G1k$Bk}]K^DPwr3t0$MpLG"07; !Jxč-*ͫ{wutYbh/9˖h{`XIݪsEl$Ӧ'̯Un2)}F$&\6=[رBn(o)#}uR\cyPՐ R!,zPĕiu$O%7 Sgx;e;{bޤMaAҲv  i|{6jUpce;xTK4`wɡ̙{A-aHK뼾mZ76#=|$PmɓK"}YZ}'=84Uf'/|2Ȩet UFpvq8E4]&2ӶZמˋ03eKO" 5iϛ{3&z ȍ[ m I$a{vp֩Ɖ^ÉE²#WD4;s6ɳ:.'őBzn!.1áWp`7:m6J> endobj 450 0 obj << /Ascent 694 /CapHeight 683 /Descent -194 /FontName /KCHCNZ+CMMI7 /ItalicAngle -14 /StemV 81 /XHeight 431 /FontBBox [0 -250 1171 750] /Flags 4 /CharSet (/alpha/gamma/theta/A/C/G/T/i/j/m/n/r/t) /FontFile 451 0 R >> endobj 833 0 obj [743 0 600 0 0 0 0 544 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 859 0 819 0 0 0 889 0 0 0 0 0 0 0 0 0 0 0 0 675 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 404 473 0 0 1014 706 0 0 0 530 0 432 ] endobj 367 0 obj << /Length1 1167 /Length2 5652 /Length3 532 /Length 6428 /Filter /FlateDecode >> stream xg<]%EcA0jf0CޢF%Hh]AHDMD\w^r:ڼz8ADdb@U"`8$ 10X @iYIqYIi*^2trn+ $ !H 9#9`(! (녀PHDSIHK{{ ۦoA|p#7[LBJw: 'hc,Fn\PH I%#=T p<4NۇE=3qGfߌ/ b@/L퀁#N|C'I#ocQ4WRW|Ea(wg_qE 2Q|P@@+E RQ3?,O᎟ ?> [[@<+ ֤ gM!L M, ;?z#@]~#~ D, >7RRx I|2iIhF>Dh@@iqɿUO,}ovDF8PMOb\Rk䎖 xL+ l NY֍!n҅ӹ KiS~/;JγBz| Eçz do9[fvw\s{c{g9 U1$ş&\槯VP5w`%NLy聇5ɪ̱`Ұ@ J Hz@! Qg{TԄ9I䃺cǃ2&te{&D Fh__F)6KşUN'(*n:VGmQj2y1S8  eIxkm;Oh>8 bVxOIKLפ̄99e;%?|Bm!TqCܔW%^ nX-Oci)[jE־ex\%iGBŋ -c`ױVd e1/A_8,7Zd}xO-k$䇫9d ۓ:WNjHlIi* ?CƅԽ2JOJ8g7%Wla{ :֋Z}y<,|\p'N?L+Q؈P֬3à%A_/*;jNǜGbf =EU%} dPV}Q_uI dx8SN顳߭9SJ }2TFA @#U1yWQ3T/*Մ#+DqC9쌓j{Afb}1ֽy:Cn*ZFmi"(Uf=>TrhާHCh@N|} [2?pz[&䙇؇W*ho.l6>!I9 7Ef 4ϕ%N+it[fܧ) 5ڇr5 QD:[Xz)}ŗ{4QD߃hC+ZU[[H+淪>Ă156<Ա1| 9;gk A[d0jTȸ%⬟z¸XZ5,9vQ{N'쇂4,LUUUg>Oy #Ü/WJEx8)+R=ylX Lt4cG%?C)Uҷv_v $bcu1Wf磆\A\uw&5cjZHӯRo{j݂j<=pe@oz}XԗĠ;&6?SgBM](puG6CGODi>(P T2Ԩ=c3I5mQ._iZ[%>Y>· ߛљfWJX~8VT^56Q mx+O#T52cEV1qLyzz6ji/Cuf2U gM sۚ:Ձ)rȈ;oK7~V*F HZƹ[-ׄWkޟh Zx/ܬl 5~F}< L}]mbn=q @$. /־r%S\@ܛXww_QcA @@B*xzRr+K{؁ULO./%5NǗE$u| *48–_<iraqEf}tO^0(~\u@-|bbX,b<&8kzXMb3kE%s9 !j .sj? w:ulo1@8;lᛰԥuC _aQŅFOSA ?/:YVpX (4K>Oغ =kisTY;1TR խYΰO5"Ѳl8>*vҘe;4Ft!dVcGMm/}>3=/w EINeO/~/F0x>9}}ߞ`Ðtg㫒OڠjZc4"k.UeIJbATYyvw~#B+> 4OAHuiTKd1:Bs@i+> `äVBk.bUNfڥ̙Tn?Ln/SZ}㦾'rG;|vrmz);WtmiӲ\},Q}0=A@j1Իr傁ڎ@m[֛YR\I eWIXq7t+>` s@M+'Ծ9vqFC8;w5찋`+ nGS]ggxEcOĆXi1+Low~=6m.Nw??h_&Lbp_T,YzD|ctי_8Y>k(΢]h!h o椲gT%0;ksJ!?OnxϏrj 3q9RW)ԋSoIpO iطԊnOFkx*e{O/AESL ! O#HFZ:&aq7֕Iendstream endobj 368 0 obj << /Type /Font /Subtype /Type1 /Encoding 832 0 R /FirstChar 11 /LastChar 116 /Widths 834 0 R /BaseFont /FMVFIU+CMMI10 /FontDescriptor 366 0 R >> endobj 366 0 obj << /Ascent 694 /CapHeight 683 /Descent -194 /FontName /FMVFIU+CMMI10 /ItalicAngle -14 /StemV 72 /XHeight 431 /FontBBox [-32 -250 1048 750] /Flags 4 /CharSet (/alpha/gamma/eta/theta/kappa/pi/rho/period/less/slash/greater/M/O/Q/R/a/b/c/d/e/g/i/j/n/r/t) /FontFile 367 0 R >> endobj 834 0 obj [640 0 518 0 0 0 497 469 0 576 0 0 0 0 570 517 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 278 0 778 500 778 0 0 0 0 0 0 0 0 0 0 0 0 0 0 970 0 763 0 791 759 0 0 0 0 0 0 0 0 0 0 0 0 0 0 529 429 433 520 466 0 477 0 345 412 0 0 0 600 0 0 0 451 0 361 ] endobj 835 0 obj << /Type /Encoding /Differences [ 0 /Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi/Omega/arrowup/arrowdown/quotesingle/exclamdown/questiondown/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/suppress/exclam/quotedblright/numbersign/dollar/percent/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/quotedblleft/bracketright/circumflex/dotaccent/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/endash/emdash/hungarumlaut/tilde/dieresis/suppress 129/.notdef 160/space/Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi 171/.notdef 173/Omega/arrowup/arrowdown/quotesingle/exclamdown/questiondown/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/suppress/dieresis 197/.notdef] >> endobj 339 0 obj << /Length1 1000 /Length2 3600 /Length3 532 /Length 4275 /Filter /FlateDecode >> stream xy{{?}~9Kk (,/ @0 X@T^*B+^8+)(Fp+ʓ聀{X4<<;|3 BB (4#>P{!Ĉ!bD$ Q7hAXP$ma aWO FX$ W:#U}<x_%BW ع@6Z&6)_'C~1C84ˀxdicX$*(pOK<=DR!D$[bWX폑+ ϊER&"dJ8o ?!~ }п!ĽP~Co!1OnҲ %pY`޾(}-@ &*dV8 |M<:(".qK|]0R܇7NsDUEgpCP,,nO 9[]栈?YSo!Ⱥs;[=F&'Ez7!sώ^+)W}+RHvu60l?o9i %tƝ^/jfA"G}Gg=+mWF]B=l"x&\Ndhy>Dp}:ۓHd+\Rl[L.B2QVeL %'9W* ¹ F}P-Ё/ƲqXS4g&_`(VTl@ i>ݜiQi͸Mu5.8r>qxW98zj'L-R{Pr Hh%\˙:V' gf:z(Rl쥼TtC%ReH`Ni}0S'ƫ |.IUB`AQ߄k^P92 GNIҏc$j =s5I$O:d(),Of|SS qΎݍdp-컹D0C d(a"Ǽ Svy6XŢV3gJGƘJȾY_lz_ٿz a3;={,KO2 T\Rl!"=e&t c5݃^3?+FCC7?o,7U$?-[9ISDlʛrKQ)FLw^O9e~蠟 }XgBIKC:9ʽꗄ\zOpȰ(K v^˺X2*6T񕦮~P pʉQ4%i'I(#Ht>p jk-aW_XtOu:t5 $kik_"uSfX=&i!Uk˸¨uJ\A(tU~ݱ)#.Ai?Z SuطAJq,A WtaYӯӋb|oUb@ԋL/^ҏUedZ{)Zřr[5 jUWMY3t a:=HH("_}CS] [XtEˏ34ޥ<7qҬҮ2֫dXey=;>'A9F-a+n~ecнO&+ɞͮV̑4d6Gx\RXiζ- Χ˞n_ WY̖WfWu9!,JdwVheM]=ɷW[v9;'Q̥|iE!OlmdXp,'4r;])kAS 'C$yT#уt3.grEnu)>]}ݗMBfU`w:hY!a/Sw3X#d_;pWf2N7}]!sb U5:|jIH:xwz`xsuQ` R3K:K7LV.iF|.ۭePo8T[0n}/qG/sOHX!t]n,ӷv'f4x뿖S(XУ<NwM{IK5^Q~gbI`!>l7jzhi*$rdO!]-F{=Q ]m5=8[(_>m0t}CjME*H'ե7li3ǯ(tOweq{nFMh:b߻`]Mvx<;8=ߴWRG׾T%u9tA{ y`'ĜZ{Aαo-\uY3"̮gi{ɒ(O=w4~]V׸8+Th-fvrNwZ4-hibT[0Y@,Ӥ\;$#=:"۔JN+_$kvbdQ5.ޝF;')/։gmR#S:Y6()8am9 /9.a/7ѥ$.0@x8<sŬ4endstream endobj 340 0 obj << /Type /Font /Subtype /Type1 /Encoding 835 0 R /FirstChar 47 /LastChar 117 /Widths 836 0 R /BaseFont /ZDUOZI+CMCSC10 /FontDescriptor 338 0 R >> endobj 338 0 obj << /Ascent 514 /CapHeight 683 /Descent 0 /FontName /ZDUOZI+CMCSC10 /ItalicAngle 0 /StemV 72 /XHeight 431 /FontBBox [14 -250 1077 750] /Flags 4 /CharSet (/slash/I/N/S/U/X/a/c/e/i/l/n/o/r/s/t/u) /FontFile 339 0 R >> endobj 836 0 obj [553 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 406 0 0 0 0 814 0 0 0 0 611 0 814 0 0 814 0 0 0 0 0 0 0 0 613 0 591 0 558 0 0 0 302 0 0 513 0 613 636 0 0 602 458 591 613 ] endobj 837 0 obj << /Type /Encoding /Differences [ 0 /minus/periodcentered/multiply/asteriskmath/divide/diamondmath/plusminus/minusplus/circleplus/circleminus/circlemultiply/circledivide/circledot/circlecopyrt/openbullet/bullet/equivasymptotic/equivalence/reflexsubset/reflexsuperset/lessequal/greaterequal/precedesequal/followsequal/similar/approxequal/propersubset/propersuperset/lessmuch/greatermuch/precedes/follows/arrowleft/arrowright/arrowup/arrowdown/arrowboth/arrownortheast/arrowsoutheast/similarequal/arrowdblleft/arrowdblright/arrowdblup/arrowdbldown/arrowdblboth/arrownorthwest/arrowsouthwest/proportional/prime/infinity/element/owner/triangle/triangleinv/negationslash/mapsto/universal/existential/logicalnot/emptyset/Rfractur/Ifractur/latticetop/perpendicular/aleph/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/union/intersection/unionmulti/logicaland/logicalor/turnstileleft/turnstileright/floorleft/floorright/ceilingleft/ceilingright/braceleft/braceright/angbracketleft/angbracketright/bar/bardbl/arrowbothv/arrowdblbothv/backslash/wreathproduct/radical/coproduct/nabla/integral/unionsq/intersectionsq/subsetsqequal/supersetsqequal/section/dagger/daggerdbl/paragraph/club/diamond/heart/spade/arrowleft 129/.notdef 161/minus/periodcentered/multiply/asteriskmath/divide/diamondmath/plusminus/minusplus/circleplus/circleminus 171/.notdef 173/circlemultiply/circledivide/circledot/circlecopyrt/openbullet/bullet/equivasymptotic/equivalence/reflexsubset/reflexsuperset/lessequal/greaterequal/precedesequal/followsequal/similar/approxequal/propersubset/propersuperset/lessmuch/greatermuch/precedes/follows/arrowleft/spade 197/.notdef] >> endobj 242 0 obj << /Length1 901 /Length2 1269 /Length3 532 /Length 1910 /Filter /FlateDecode >> stream xU{8Tu2]+[cke2R12֬"]2ƉNvQJMI.$]Dn^ϱR$z$Mw.[RD3\.f ^rYf|vsn OV<^~nz)+V@Nm%T;86WQ}?:(plvy q].J7.x~j[ p]ѡ4/Uʰ ;rT!AU׾nI?9KFvcŜe:{(^O{U6(wx\C 0 uqthʖ;4V*(Ӎ]'ރ{)*^gFey\PoB\95Kn'/;`S=HIHBKx)֑ǚ-3ř5ԟT*)^?](^Yxd.;}=XT}|iRڽ5[!6 k-EhuJs/<ͭ/K}6b]!ܧW}ªk)\Pc=S5H}ӶOϯ3C5Xyu?^T[w'gS'#\5=yV1M#\Uo_@#_,vKT1[>Ye%T6e gP 9j D Q¾&RCh14{Yd;T4'_F|Tgo<#A+y u37_N伽+{eӗx9Spa)ӝMܷ% x'$b/endstream endobj 243 0 obj << /Type /Font /Subtype /Type1 /Encoding 837 0 R /FirstChar 0 /LastChar 106 /Widths 838 0 R /BaseFont /PZZMOB+CMSY10 /FontDescriptor 241 0 R >> endobj 241 0 obj << /Ascent 750 /CapHeight 683 /Descent -194 /FontName /PZZMOB+CMSY10 /ItalicAngle -14 /StemV 85 /XHeight 431 /FontBBox [-29 -960 1116 775] /Flags 4 /CharSet (/minus/circlecopyrt/bullet/arrowright/infinity/negationslash/bar) /FontFile 242 0 R >> endobj 838 0 obj [778 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 278 ] endobj 232 0 obj << /Length1 769 /Length2 586 /Length3 532 /Length 1136 /Filter /FlateDecode >> stream xRmLSWeT,|KmQU+DrG{oZHLƘ1a G"cqc mFk9>yss*uX dP*qI2PBZsPP 1&-@1H\"Ac6Aq!K8 p.y 5CP@NR; !kHdC-E CJZR4!3d)ě EuV@B@gAɿajxIKyGHY"0z,HbH+$HR&JT::-1@REqD:#\C\iOoш8%15Q hnXj>#LD (O*kY4,,[/%0P&@ oX,dl@ðǣI 9G_=bcKAX8d6@*NL<T* 6t骄e!->ZCBh~!^鱏 o]\+v{SgzkiSc{s-]Þ;\M$sRu7j_#dˌ+/ち tlF}wowٚrrk4zulj䕹֢ďCw*cBٖaMy Kc>,ʹia/FK6*9}Վ{r5B^r-m-)r*w}BUx3o/4<\{x嵳<]ݽk]'ʖL B|;Sd5fw?r7u)NoO?z 3c1#m=G-e՝` ::5Wk7'~ui%W%OJĩbO׬:O͖{;+UXeWf~F87?:ᷫcwt\aW5TY'-24ک8ҳ݊} RLWѠڢ.?,q6W'Jvendstream endobj 233 0 obj << /Type /Font /Subtype /Type1 /Encoding 837 0 R /FirstChar 15 /LastChar 15 /Widths 839 0 R /BaseFont /RLULPV+CMSY9 /FontDescriptor 231 0 R >> endobj 231 0 obj << /Ascent 750 /CapHeight 683 /Descent -194 /FontName /RLULPV+CMSY9 /ItalicAngle -14 /StemV 87 /XHeight 431 /FontBBox [-30 -958 1146 777] /Flags 4 /CharSet (/bullet) /FontFile 232 0 R >> endobj 839 0 obj [514 ] endobj 227 0 obj << /Length1 1541 /Length2 11939 /Length3 532 /Length 12837 /Filter /FlateDecode >> stream xcxdڠÎtP:6;+mulض;v&;s̯~YZ{׺"#W01X;13qd$L􌌂ddB@}G3ka}G  4ps1ÒllLLBTJX 2@EC3=@ h 4eb: &fְ r6pWR4F6֖n#1,4 l.di)ooef?3ll#KNhddf&@+=#D\Ffc}K?q|? TU5hgQ^Q`3M7sh2~2Gc oo} `fmt]?m?J;0}eb0[+LlMBۏgc'`pw0w OG'?D} Z? `7q03A}K!V'>ycܿ #A}L>+cE}LW7q~C#}x? S_j~ᇭ_k~8YRᇕx+/ ?+/r ?+?a~XV+qcbg11ˑf*[9%l_5tZ;s~f  4]14On .ɟ*rK- O?^FoT\#'JU2m4 xy(2- !S)Bk g"Ye~_"ܵm9_&p>d9 (]\K1"&T9؈{:ɷY*JE{[]XEH ϖK}ar5ޚeJ \RG"qO]E(.C71D&:a:)Wwa/%-A3r}t{'bp\;aoGud&d_C !Ed`ݿ8 =]St۷$"QRcAYkd,/R+)()eɰXEeLWQ򌾠Arkx5\)huME"g!xVT?"t*oi[32+LWwy]{hx:an^OF~dV;QKf1 ւV+ґֆ*YIiKNLTZs+7R;Hg/f/MK(?md_GϾmո&PMܕ/_?5.%"Taf{Cg] N*aW b\8 C=XڣM٨ V)a -Z:G`I,f]4A#^I_Ra[u/bs 󤑛6NM@SwPg@֮\xXOOoB祛CA<|_:f20TR# .M oq\4Y&&i/ayG]RĘHV" x,6`gjiV8$V=38\s1X62eG=k M,K$>.7IkI/F+@.<2Qb3blύLd}M\]$,2+ ᧋a ]Ð앆IG@G3J'*~ɁIB661>g\r!Ur~pޥ.EXQѮB5GX+<y FT~ë ݤ dm6qEpw70mmՙkBE*xp.d<Z]J(*rCF+=AWyi KcJhj cSw%N1R2o_cy1&#h{6Q@|ʅcHfP=/TF"è[ mtLt=l<@'ЃoK Yӄ̜H$$}\ g} Pob  {Z>\X^, @@ ]H+A+cF#2h7 4)Wг] F gl՝~)-KE%zA$q\4Z :uy˄;9X8\Ф=Gl?Wxhbz#@VmJh8\(V{=Ҋe Ng ]}9HQHBla&u`F4Ҡc *yM72cWb^rZ7 W; G/Jc()7z57moFU-k$П,Xt^&*RYu#ϜBӚ9~I+]B!axMbבT,yK~xޚ>&| lIKh$OE nlcgx%FkLslZ" NQ۾y6h5cEnx)<0cbEˡ(!׸vg^ %E-( y'}s7/E/]KgOwQ7+1 /N*CFD{1icQ!(M$$-tv/z̞&3㰢2K(bgwki`Rx/-K܃ʼ0i/ _ݥ 869u ΀WA?8~=P}q9 \GXir}pyw:MgW>>R q6gו_ 'IC95wurk6>S/1Dn vU#^}JXkg`lH:Dd]68f-Xv6Az&n%凐b:@;d2f,yGBu~jfk "6煠"+^H}@Q:bgR5~y%3t*,+w}X~[ R~^TD-=Fڈs>QEJvӧEX kAC~9Bd2K|V"080ovՏٮr,I_ɽTV`i{/{kwvUS©̎Hp'v\0BVb<_XbZ4̩)%z¨v'NNuCkMMqqB.ڿ O &sH7 oNW)`D&mOwn?EZ WPm G;1Zp-է]Cp7]A~nγ~JX08ušŹAf6 v\ͨPhk]b?`7|"G s2xa݉)%nG,srص9!է{dVhKy:3\T5Y;ọ̑N?sCpX xs$|W=H`+ɣQǺ.?OJ|MR3Xu-B;9ᘄyE0%6Îzs^G`TVz8*q)P;PU9۷=N߈oRT=ocI u ̏>Ps@mONZ{zzBm)B!( ڛKk2M+e`&28UC _Eq.&QF9gKy{OOߨI+jiFot&DHfȫ TAmB@ED㾀j\_4hIa+7-̅ZXOCc=ՕUG6x&lߦ 糂%l6o%pCF`_NKs/Jɥz !) dJ ZBbO_ ö};@<;d ~ʴ˳=4LyUJsS|J-O 13iRO#o.ZGʹ4!Q>ďb a]j9|Y\zhGo|XukU'ev>w"RC/&ܶPC]SRF4bۋ* "-bsma8j7*z 1(db4)ʜfk#,?va2+s qArC&"wwX!ZuH}"XB@ Cx,Sx] jNt+HXolhtEe܋: 뚁`ߢm|#]ݥ1S!u1|[W9 hbG>؄ ]׈ָuhcu"}UZjei%廉-&p OaIIt[.N,vզ@PXC3a~ڽ)ǩ͈I=٠y߇q1͠5ݹɾY HXK@*rSe G_("KQo58dHsw+ɠSB!9ִ_Cd~p(N` $Z5k ĵ+v|C=^8sK߁N(>cV$}B,iۤq|:^^eAɴ &zVK@bb4Na{C!9;T)3bY,ςC;*beX؂Y1L~I`ߙZ  !3'ql \Ϥ-lfQwH}Ξ[=2u^MDo \GTl'KPU 2X~ةSB Wa90N29{r]4BEF] ^FjGU؂Yf,{&}JWQ{dry]f:Cʽvsժ#7r_R@ZAú$9M#iYi ›Yx\{T׬/E8SW0N 4!x7h%R~|h>[DUR]4'yw, "I{GbCvdS4S0l@7lpJ8s,ژ+6`LmHɻ]T䘹P68ݒP zc^H2n#H")eI3VhfH !`rCwXZ˅cNB8?zEڲƕ'IW.BZ+˵M0'.Y"3[v摠a]U-U74hbz |k[l\g qTwrR.!xdIqTdX%F0 zZmZֲ1 4/HI+8V_:!!M ߿翁}DYBEk…E!CDًlnH~CXtA=p؝{`:8qtt>F"MlvuW*Y=ܣ3_|QZt3{IIg<~8#ٻͲRC}6m(a`YA~1Yo#[aRߵͯg{xqm!-v!tG$8!!ӟJf.$F67J'ڢ'_BmA&;;\nL 5`С<ֻ.>SU'lH<tU>r<N_gTGy??M+5>[.$Y6yB^Vf9vl"  zd<ܑh4֭,j[#*/q*?Pz%+1^xz"wBƮ |-.DtNtatMMgjw6M0ktp{7ޟ~ Sy]bYs%t ٲ`9F䄝"v"A|lNHOwpo^-Rfkٔ]5Zc3X{ h<[]v"DOEL}96u'gūNЍݼұN"X8㭩8iܦi?K% NN8W8 Qd##" /:WYsizeSJ9P/rɴ;R5pT>8>FĐ^+J8DoڵJdfz3O}z4z:NVnv6}W}|J3{w{F_\\[pc(ACЅ34x”9+K FRM/b̫%;r$Y겮gXkK=-(7|9xvDG d\sAgv\}ŁqJ]$Εq"?yQ/9f%:zp{2;/i;݈U-EͲ9⼏vI,κ)=Zvq@Ϟ\0n< 9,[z8pUTw-U@A㕬 2VL6+W, hE}Xd>aa[2NEJWMp0Kayttv6q炡$/<1iѿoɮMJ} sWf0+婓VF0۶2pZWM=msmqeywrO׿X v05}eb嫸,K1Ro;>e@@CJ+wW|TMkKŕ$QqZ&q![1`דc PbGGE. ٴ2-*udF#oU->G6DD!*fѴPPad: USB}xdE&y^fzԞ6e2oR{Flm݄u`SPBǹw33uO*?Х4W(C c*KQ:7"⺽6=;a$f] 7L<df3WQFձ[3ʑHlP ]q.ԏFqQKoT:6,@2RYu$ 3v5 jN3rHc Ԯ r J) Oa7|Vhїu>=&Uϭy;λ^=+הH{w(&KgUD 2115̓OLDd-q*[(pQnj((:1  $tUgU,1rM3ɛ㙲c&KHZ':n=Fe_Yη?Z#_,\ToFrAk,@G«<2㙞\4Ͻcz #3u1(jWD{_TxQڇּAЩOZdh50{42[P?;rwUJ`7LFϝ,8uk۳3#Ӕuę_=%5Z7tcgG@S !*om+K@3X5*+QD:9Ċ}yoŒ5VlbUT~ ¹%tma6FS2bc O8Eigv4Z|!hN@JXյrSO-ڱa&8@g|t)`B2ؗSiF$w<}J94 $U]^4wEeKR]Q,1!~u n!"L*F@T id0)"V,!12 ;#>datvg偤Rmw1v7qFO%Ӌ,yϢ b朩Fqa#rPr3;qպdz^;cSm*6"2a=R >H*UֽP(g1.*òtF<6Cm()AX>2D*m~,}g`ia-7>&{wn-Jyr5]+D'EQp 1ߣ&ut(g5&@}T|p!uYj;X,RxP\e 29W˭횮"\W>ao9X^h!ɡ$!ȋ y{-2P+TRwh %GJ;Pv-)٫=Պ[I:gZ*, DZ|rLy~E^_Rf^T:lSv-  ݗ !aVtpդ(^M^k8 @3ۉ;|ܙ'`(\@. `9Ґh:%v21®H{K&hcWDhnQڨ: l# |6:璽4V+{P,V#NJo6<$al2C!,]gS!x>yp君Mk?H-nɣ;'y4 Ϭ"`X'p^]_bzR%p :ha7eޛEhOϔ$wc\8CoksFWX-Pl`i_%ph/%61}լ= $0~+F{05PFvri&gPGsx"r,؞W:6'W[YO[("GH囓Iyɧ_[׌V6tid˟d@8 j6Ew6e l;:CO<0ih"2;b (^G*ǯKݚd/>5k' DԖgݙwglc[p:-+ `c 70'38#XS')Zj*J L/T]0͖߆O} ,rH(~aTߌ cOo36JdsS$ !srv㸇dYS7!MNW2fڑ  r~@Ib4UK`6sNEQ7iPMr$8SU# WGypͫaߪOIb,?ֱS@Q`PCF A/_@Z[Y6j'Ίjqhib4kB`aֺ1Yo h^ !QTDG`.VpFhI>M:jr{qR3'Kqms#}3`zYt(*2h}eo0OtKryc)%sNÿ޸0$|5VƳ|'JԆ]=Ѱ2>KLWN D{ m エSgzRAFa݂CcGq0.+euKCnW$;,_kqKynyg;8cǍo;_-[aߘSx[JW`7±;893FT+zeWF@Wi”U xywN;$tO$?Cnu$A\hҀ2SS 7%PJk!endstream endobj 228 0 obj << /Type /Font /Subtype /Type1 /Encoding 826 0 R /FirstChar 13 /LastChar 122 /Widths 840 0 R /BaseFont /QRWVLZ+CMTI10 /FontDescriptor 226 0 R >> endobj 226 0 obj << /Ascent 694 /CapHeight 683 /Descent -194 /FontName /QRWVLZ+CMTI10 /ItalicAngle -14 /StemV 68 /XHeight 431 /FontBBox [-163 -250 1146 969] /Flags 4 /CharSet (/fl/hyphen/period/slash/colon/A/B/C/D/E/G/H/I/J/L/M/N/O/P/Q/R/S/T/U/V/X/Z/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) /FontFile 227 0 R >> endobj 840 0 obj [588 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 358 307 511 0 0 0 0 0 0 0 0 0 0 307 0 0 0 0 0 0 743 704 716 755 678 0 774 743 386 525 0 627 897 743 767 678 767 729 562 716 743 743 0 743 0 613 0 0 0 0 0 0 511 460 460 511 460 307 460 511 307 307 460 256 818 562 511 511 460 422 409 332 537 460 664 464 486 409 ] endobj 841 0 obj << /Type /Encoding /Differences [ 0 /Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi/Omega/arrowup/arrowdown/quotesingle/exclamdown/questiondown/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/visiblespace/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/dieresis/visiblespace 129/.notdef 160/space/Gamma/Delta/Theta/Lambda/Xi/Pi/Sigma/Upsilon/Phi/Psi 171/.notdef 173/Omega/arrowup/arrowdown/quotesingle/exclamdown/questiondown/dotlessi/dotlessj/grave/acute/caron/breve/macron/ring/cedilla/germandbls/ae/oe/oslash/AE/OE/Oslash/visiblespace/dieresis 197/.notdef] >> endobj 220 0 obj << /Length1 1989 /Length2 12871 /Length3 532 /Length 13976 /Filter /FlateDecode >> stream xUXͶp Nw ݃{dǬz5 QPf13:30>˪0X?SP|v:[ي:y,<<{G+'Olghaf L$.  kl06([="p(@Fx3hfa 􏓤&.3 ttIIIZ{LLrvj@Z\Z5nhca3l]Y;NU,?G% -Elͬ Y8[M,Ύ.&ܿ DU4{S5`haaaP{-̠&~535rp  =AD/ t 319z 0sgGٸL6 54_QwjٙL@[k_QdVPfR8Y ll D8L@?!NPBsvعLNֆN" qOݟo:i:;24sq`,\umĿ$tt&Z7HolmC!I@2d&@NT]!Pu?.@Mܠ T]+!Pu?j!Pu?@5Mٹ{1X8@'t˜4U[ [KRtq03s+j؜M-@ @;~yΘ/21G` YS\}lBRuѨFSy: SxW _o-W(ms7g3c.OEUaHz]z284ӭUC(HPSJCP!X6ӭkwA*Mx{4`R 4{]Gq=RV_DaQՓV1jv5Z6gD;{8$C 3~S.y+T!jQ(Z,v1Q(CH=Pz2jcN&SV/}źX•hW~Ool7]'qh?S0e{N)8(}9?YyX"S)'Bn3pLӒYyd&~aCr3DB+b^*$tC٪H9-ڥrٳ/ "~|!C!,Aa7tM[A#\ ۘ^ԑsQ\ Pv/C2Iy?-T؟rʃoČ>WrY9'" +(-t%;:H=n#%2bK8\pZY4A,Vߟ c%]~Ezle/aj."r{g\o iPי.ˀ~JL 6eT:631)T\Zc;UK/2)5ϰRh=2bCNVpMO9ߞX "'R jri2i[Iok\t;'e.UK]$T~-*~k1] :25`4=5kbPʻ3QӴg+ͮKpNAK{y%)90gl\mndڐCmx"V&^mVibq)Q/WqZ,ʋMf4I)l&{.u"@W #l oj$vgOLDI B; -VG$=kfh*1JP`eܾes@f(uOf̗d#P譑^0 #i);'`  Ȟ)~;Bj: ,2RÄa]6mؠg匳(:"Lvz,l[)1Wڋ]URmĮ|lX$E3&ω!ZmLM`ɂ7ɰ^(#k0f6. gu.2#D{ ~UXolK 8A~Wei(VD諈CB|Z\5l̯,iaN"zhXOt3sFmWĴJǠ W`> sbu:a˼![pwJ*՛ʷWSI@28р%XiZHN&͉6BRF0|4:-[Q}Y69F @R`%nG):h}"(os.QWfVjaTN]OzT-Cm]|#.4"05 ڢmrr%ԭK*PꬆvLI|U5&<%eb>nmղ s -TK.YeSSĴ[a@>KU5vxJ=$({B9[)?]PH=AρW @Jk;lE9BK; +~nO%nnʹ+ F?$WhwS2:j~sDHgY'~fꁳj>i RLB;iM UzU6-]C7iįטHVh(;j #K 䐝< h ,C',Bf#h?h x}ԕ^rHZ^08. ٣u>DI ͻ€r| ×E0_*-t~tu ~@@w@_OXvx<{|ZV4}gb[$/G {~=Ư؜{D5AN򃥷qU q~a=eM[?h$Pq_zRjuz5f܆>sEtgy*0nE[ӳlY'y-F<#N̢8biyxO^=Fw~''\e׌ڻjĎ1E5,5:lMD sRPHx`?KJp?A0;vqTj6|jr  Mh}i,$ğ`|b]o Y@tDFA;rH&y+x+FNBLEްIA,w)… w-,ogqJyk BnQKo .ⓛ:aQf* w.EFO2}\H僫2lyህYhaد{о&DKG*6t A2*_ xďJc# lg}$ grD!E6/k2V'&̌$0>T]i]2=q!^aZlhgl X1gxC-?N Z /x4yvaq&b~xyq驣Vr%iZ5Nh7iڸN4ToF)gzj}&k]T9ZԄ{g(>>uELy$ o&f gM&t$SPѫNvɥ1B[8UWJunnʗL$桸7x9LoMk)ȝ1-u5Z*TE1ce=} h n_X{SJE퇿4yi;m .,iv}ȩK\?R)fkJ;>8ܕe[^j ({3dzv;XP@aZ1<)-6㧻qj6)VL!Еv+dQZcRAL7-OzU.ull?HSX螶g\\ J#Jٛi O\j& c-~cV](`,ѱ2JتZOI |+r[h/HNOXs Uf*'&0)_]yk0Gva@#(w^tjV9!S@Gܜii^0\(Apn p$~0:)l1{0ڐΖpӌGQOi'k]q>8Q0e ܩ|SB yBT6^Ql\zޑНĔ|p f3a):UB>cјҴRH*ߐQ_|zt[ceܩ5CD]NUѷ=I.hn qq#%{Tu{$ 4`ή51S(xɻO~xYjHF܌!nG]˶/ߢɍv#³7Őʙ%QѼ`-.1¹kЕ5. ȖZx-~{a@`&e^hQ4+TwbooOV}X0k {^Mwչ0vt%oS9)w(Ψ;0z54wXӟsn]?Kʾn3 imVROȟhV717%wyoMAiJ#c8dBG.Yfdfc2l\O,)// )Ev{W?08[%0^zM(RXfω?{FIx_ʅk[(ԣV };Ħ!QY`VlnɎQl jN2F8n(/ We0/~n\rnhOU5*ng TgqHp)J`# n˵*\<_Kb=·K\+@qȌdqJ%>_ʲ176rڎa%kM Y㯷u]Ec˿ z? A~N!&j珬dVh S'jx*kyGr+x&x@F%oa|pnbazPc#,hӟTSBܾ~CǖR`܍Yrv_ gNv.'KC3݌6g{*Zs%qbv.ÉzH=<6LBs֨hs  xr;l =,euSJ;wrqϟ>$ʄ]v !uMv kq9@bY AgbB3Bد/:~=yotkZ:iRIVí;Q~ƴoAqMwlP\mN&'%͝GNl2m7i;U]e4n8tV2.Ip[w.^t'/FF",MR['S/nS1VIVT=jGޞ~(XXɣ! .]7 etJah-,'pD 4A?a.MuT/BK6]C}ն<1nxV4XXdEYppI.r7:ο]b [/c)v̯4vFpfO͇zmUδ~IO$EXL @fɘp*]eK2)SFr'&r(__=>P8UԄFjb;2 T?WTR FOJXD(t =uj'?$/jfea8]y: 7'溎[WG|KQAN 0iԟƲʭw[ODw띷Jަ7PW 18VB>2zljŖ_)` : j'ژZ X>/B \4*~4\ŔL^;˱§l|m /i%J+哩*¨tgJ`K>0:|{sF4&1+AY(R-$D3Bu[ U8k` ie%ixsRvbY59Zm9GtFхvt+fA[6 iꞏ|^t vG\<3ڇTz&F9uWoGaYjEnfi?/l8>!K( 9M1 R!'dl?|oS`-|rB0k%ۉwAݮ\M^4:&zѯmMǭe]^u?'x+c\sRX0G:=;VlF O %A8S#N&0dN%*FXu)PlzEEmUaKOV Z.khgv1kilRQu7 /݋svGG )'BPq?;. 10L|T}[seV-CJͯNgςttv~f`Oh't ζM>} Cs ;ͅWۭ=hCy䄸cVFۡǻ~d6QxCnto?3Opwa$)nMkwd| ĠaBK͓}Nj^>_azWZUZCUi&]F3`jh3}=&P[fd,ͼCEl)2o˞SD|uj~ .bA5BS ѻ1#:\Gk^wO-lHë x׆Y +?Vz~UF0B|\1+ȶ++RR[|ڎ40jEOj@Qyj!At៛c@-Nu(VĖFoz%rΣ_ƣ; ^`M3 Fv<E1[N־N(| zXq}q;{+\| հZKHsvA;KȾlLo<#\:]We.Ay_`dž}etX'˨ޯh>*R(x7>,W*J4 gw1w0ՓS*VRC0IF*7

?%mhaǔڝi $O1XH^ZGq~ĢO] T*D⋸ş٨}["d6:` 0,GRd{ {q_c!ن|Շ\2)_{/(J@X0UI܉)9J~0ovp-|. ?N\|N "ؖ*EA>Q.wh^S;zbj{aJ!YB(9r{IIн#S%=Od{j)z9}V͟cr6ا'^XcDlɋR&agw"vˣ:QS)>r[u臒a2%t5YܹgpZvG}_}Vy^젤c\qhYU$ lB9VQ{E`, VS -$ȥXMPEݔNeI|`aψ\-x5Rg%f}cB5 a^MTKsf̓_P+y]Fsd_I$67mǘ紟%6I7-o\\R^V}0%pw}5]UӵܙPn^0#RN\h~hx'5-}/ܱ.HC(3|"v Ḿܼ(&۹,jQaIeRL9!1. ua T\޹*-9iNqV4qّ$} s,P*f^(t`wI rޅ=~̓Z@陑h@|!Zf͚$5.Tkr/US} ՠ5 ,F׏g'>Jn ߞ1\o|탾 $-qu8ݪ3T@ŕ k*m>궋ݒ^፨7]K!k͠{7pZG>QL ӿYkAQHGWqO_jV'e2ʖjYf 'yfV7׬)~\ջ7fhRK"HD/|u-4.L|g2=o$s!)W=gW݂ψdʍ|3;dY{-0-\\ Vk3uE)+4r,D%` Kj⏗X'y2rsP<,?fVBx%z3EhQka8aJ2Ư#F3} Ɖ!pN+gkRUPXz/= Mj:3)g#hn*jpԅdr\j<Ϝp!%3uh  RJm%5'i ۲ Rkryf&jBȂZcL re=Աur1Sf1|Qnv~UnTiq{Pms.oQ.7\i;.dT5>ZB{{:Hqŏ35? L#mO=e$"Fl vRO+I/iҒHz lM1 n*1n-*s*ryLӔd4pB|;t;I>j2+9K!㢱a_ e[DMF=bהUp ;d`>s.@}Kc!OnƬYbp yƘw[ [\PȱS5]p,i%.+O@CGg;CG+xendstream endobj 221 0 obj << /Type /Font /Subtype /Type1 /Encoding 841 0 R /FirstChar 38 /LastChar 124 /Widths 842 0 R /BaseFont /OPDUJY+CMTT10 /FontDescriptor 219 0 R >> endobj 219 0 obj << /Ascent 611 /CapHeight 611 /Descent -222 /FontName /OPDUJY+CMTT10 /ItalicAngle 0 /StemV 69 /XHeight 431 /FontBBox [-4 -235 731 800] /Flags 4 /CharSet (/ampersand/quoteright/parenleft/parenright/asterisk/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/question/at/A/B/C/D/E/F/G/H/I/K/L/M/N/O/P/Q/R/S/T/U/W/X/Y/bracketleft/bracketright/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/bar) /FontFile 220 0 R >> endobj 842 0 obj [525 525 525 525 525 0 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 0 525 525 525 525 525 525 525 525 525 525 525 0 525 525 525 525 525 525 525 525 525 525 525 0 525 525 525 0 525 0 525 0 0 0 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 0 525 ] endobj 215 0 obj << /Length1 1857 /Length2 13314 /Length3 532 /Length 14353 /Filter /FlateDecode >> stream xUXͶp{&ݡqw A<kss5zUԙ,̀Ҏ 7&6f6~+UJhf4u@3?'?+7@ @+AO@bcn (Y5M6@7of=@5+h1wl@H,8}Y:xpwG@W_t#`DbQrw]ťL)_Ml+ Ptg6r7S{s1=B`ij W <=T1ix;?b? ^/>+xyd?I-l@Vv.n7x `z^`cfx$.HP;gWF 2qW|8>NOw&|4>H/++x5wwn߲͖6;#-; ۦ5INUC[}W@ZH/w_yFۅ%|&rlU> pO{0i!ҹTqzt RyfunIT u/ i=u0}H,FK ά;NU'UBN5kls3m θ wI49n7[}9O  vXfwVzO{E KYbWiBT?&ӽ97%СV#.3&D,GdD< cҲ !a8:l5& ti7 rO!k5:nKwhWBlQHJLK;DO8fEdOVJ*Y~J_s8s \K+ !9vR[VE3]Oji!e.N1SFIbK'*N0(v$It``k_Ұ9{sV; r{DZ@բU 4|4C4p}#xǼA?E/-̻`.;pH`\8`[mZ1$6k=:Dub4QVZ#V &uОh@ ( ٬h{,Tn.줞9Yҍ%"+jBVaٖ∘9@fgZl^` XhXGA5*Uetj+ HF-|g¥)AgiVz9ymֺr[ B?Qe Z䵲<4_B9!#'f%՟.-r9l\%@H]s(> syr,|ZFqe9иkWݽ DXсaߗ}?ȓ}ؤ*bZjހ榮c /fmpbd\o#{ǿZ, 0MhbŻH`d4BY{sGʞ-1G0ޚNt}Vya=DAڏ2>1 (7]zj&b<%۷!V$i9Ǭ33px4@tϻ.wm?̘(4I1_ SqQD CRR"ekM,~)`b__rkX1eo#i4] ~^=FkW,I4lYeГ5{Xs{%$}|؛Y]k騕"&|znYNϳ'|ME Z74ޣO/p8RLurHyHk :Q4Q7gI\),dzd\gYxlNăH٪GLGq]ɻ0)Oi!F^T}~mW?^y,9D8`ޤ[Bެe& YUEe]ҫ{k S[8IĐ##ޞW9oJz̦1#=+-59\&"Orj ⴽǔYuhA1CV()ZmPW4&ԎKzaۺLܫ¥&$֧}  Lpn cY3I z߂fw(2nH=Xߌ{\}{KŊ®/bz݅[Z-H75@` 8_0ٿ6W 3dú rE̢>L Wc]x4YIۼ7AUr"g;zD8xeL*[s-fTϔ9c/7"Ǜj:=[jZpI(.H[(c).aVȼKk"*j#k6ނak0\$)ImQi7dT;lhCl_b82\TxA /mnAmHo[t%h"F_D^zcqY: $`V4T\Xk͒%Z08Y9cQdxe=o!IQLSLQZO˻-s\03M t#Rd;? `ao6 [|ӄJu2`2Ėg$D]8(gҶ ӲHYC*\E#zF yi?YTWN ܝi]0vXn~* 2V M7gu^G Ş׵7Zy) 2UYЦ1nWoNB6 "zy_:9A Y eA4S?mMق5;jQ:l3JmtgOe#LLy_5[zU$l»$jgL@iYA7H^Xޟ$[%oڝmϑ%~@ /aL$č+B~p37ɈQW*٤v}gJ* @+kF|ȴ_F,T|V_<8Ψ-E^I^& Q-^҇f V/ћ4agNU&2W%-7< l |sJV_~h& _h,@/8QRɖ{|33w-W y6hJG9ߍS|ts4 Il=$j7 k gi77*{O=q'yVɷ{>ߣ(ZxZ3X\,E?o!~B{OLD葾 KICa4@"cN`͹}"_@SljA=q/7Rb#: M'u !|9E,Q@&DՐxg`UyȻe&+̧K%ĽAʡmik@fp皻 c[ˉu_z]Ds;aF Cs^n/z٤ց{Um  ]S&LMh1&0 K&t<Zl4=۵dcYRE&aQ-N g8&x&ݯ&RUQvӶiRfgG3&/dz?1&0j6kڱ9&bf@ m;[YmMqE6tf1 3-L8Pa+Hu x;zOdb85WAb 3[ m4Vߢ:KiOx•ms۾&2E=|xc'2 EZXaaA^q28| }> 4,z3?slC1'M7M-OŁZ4,f-|;< mjwfRT9'1(oUU,1w#2!ao)U]`CY@!hSJc7CjprI56쓴;0!܇ b7#{ omٶ u5@VJ $tOdʱZ\PLQ݅/V_KWq\[sܮ8T \2>gp45" Q|:BGr[ ܤn!bIyn-V|I5VHlX:j$׵bMU^n ӔtNO_hs\V|uNXѕj|6qm20c֝hIc1 Rkݟ[d b0t2&Ķtrڏęx!sFC-_- :Si:9\3ʱh̶oKW+"u˗$A֣dr=2I92`L7$t:cJ}h--W=pER5ŲDh֚*لB5 ʼ|0X Y7{?Sw.,[snd9)>X҄ЁP+fԓǟPOҥ`fD;:ZvQ(Og.?}TLtrs5D@ {_^D?ԡRsb*tiEEC zJ2!'uA.q0VhJåH{RZ#NlN#kvy8lv-ʢg[<=ϒa+B R4ޤzaCo=j\r 0W^dzd:-ج -s쐸ӺwTDH ݬrm∏wm(=\Ut<ߧ}j)*ccF49 LEirBML=ћ#Il!Dϱ5дC;ZҬ<,S؅[BR\8:#ruq9%i [2C`5f٨$˪OjidM(L}3VZb i}݀+2\R< C^/m?M>?2&W ۘhjr"T {G]9S~IɪMg^eQr'Q-6\9HiOnBSO"H&m[ A_2~/ע I$+^ +3zƱt0{f\ɥijCs0)ڲ,#%DB.dc'KC؛MGH}mo o:_Pguo[Oa]JzD*2}MKi[ώJxA&AR "&Eu_Wdʝí q~Cs%XƯ4?g(Q|2I%Y>Ć]`/*O|ZQ̣Ƥ;7̵Ie1s̍|{l#7Y>c=޸[L}s5`~ h  #+xI& ;(Z{&X>-#0IM\k} LriG:6VF !"@S2sS:@CyRk ԏNWq])r^+ŤMSkǶZO3cDJLr]UgۄD$fp=X 3A5rD+&RER go=eĬA5w3eDJ N߅Q5E|!֮YggOh}[0FCOnI. >Hٌ=ܬ Э@"U2g%=S;HFx ̵SE̵z$,zSL=+d~m&~Mc7kϘ_=}J7JۯΘzWs=a!HWGγ!a(j1 <k<Clџj?+m`"O5Ef[Hi͡#rK:&\`]}?v{'Y#;)GӦ#q DiװxS9_:t%M;PCD\n`X-eAM76 Tin>vU9ZoRƛ_v5cO]` %S~ YyozV7km| Yb"6き|.wZV@I=GV?Pd`U50nTYdm1ؑ<JH5I<oG;҈k. e,WӂUuO}vn',.9 LScW1uSh} 眳.8Mō@IXrmO"BYWtc2ףA5 ~0/Z#NY8q).H`k 9dMTFW>d(_E4 ً=*i$,[ *?OT>lPi^8קV`IrM#]s[$G/o4ZϝN|Iv̰uKh^|qᶔxZUehr׶.`)?6?MyPub]sUP15g]4i r5Lydf<6tȺ#`j DYwMݑ7lW;'QhH֨&7juQ@u2hDݽCE,8Aa Iفi+cƃ' 5?c*DTxؒGo#;8'<[?g8ĿbS=vXâ/AE3{) ?~t'gj. iF"Iش_j C٨4378;uez(| )awn_4nվXAƕx[|~8,)i K$hW3'Iynq$']7G<.*t}QWLh84tbOȑ@Be8È[iE{Ţc+ҳC!XQE&vModkmFiA([7(iJE ^~KubW"gq4 h0iWbPv@'ʩðg4Ǥ׬ru:'y8CԺbJIo2֐HjGh[yȣF  a[hc9 ̲[=Fj|v[a-Z'DNcma9@trv>wܭH [sW_\jCE륕rSeQJb/BVN`$*'2 >@hlZ5q,6V16:V,ĎoБRM r_/~J=>؄k+rEtCpDYZE+@Stνzw}lG?]w_%?9v w ZF#iXẂƵ$2 it@wK0Ռ9@\1t .)5"S' zʅ6k2٨ә[*(j'Oo>OcoE[lOQ6YL֨'K=>I9R*=܌ɴ9rCgA7oK.0 q:* .˺)&++oY*u0T]xpSLiLNG0R\PJZq(m7.(IuUV="/(2zu5[w$a+Ҕ(!_@c#)ݥ,l ;-$1?J$Lm:4fNMKԛ;kh;f;_1I}7I|wI&tӁhJՂ^ͥS(?fs JreU m횆vuղ,8q%ȓ zG_,}MqoOfiC! El{t9e:{GΑn"+>-, lK`ZZxq8sP[HuD]-y{z]RhɓR1 ?zLhr%^z㤮誖sDjݘ G-1e7kⓛ ||_sVZ&2%r)xSY}wg2OBӽW7l#]P%&EXk}`k%E)VƘRȳ.!͡BN.mM\f|3je@])‘<>QĚ)/Ŗ_ԁ]r*W(+~[KW RYs]Ca8뇵Fh: B/mv`C?q Pֆf}h*OU6=|o̫zXns J$Oi.vhe=( ctwvlaN.ܸ^JT$eHA9R*xFol&X1~cl Z{`bHsԙ3~UYe4|W|4E@gx~f#RXdc7`~%1)({RO&CK3Pw%e8<{ .RJ4^yDKт[c!5$(_NBYzMs[%%-VIڐfy0_fUlt`%QN}d9+\-wTV*PKX̒v3{罰J&26"}'n CHnI/[W :u'Ϊ5:BYHc}x vv?], AF̀/mOZ5H<3 yTgNmh<_kJe+N*ZY#4Q33r@imٮug%|i6W:.;kAh Fc㰩4iLzc^}9拤b$`n_+i4"yn_?sw}]iha~]S92q^B+U0a p"1 \iCRf/*%Xw5nVVvphZ\>>Ɉ\Q/oKv\!0k׋zMHzoca/C#Gca_~BoXQ,/k% (g '8E>}#&,7mNS/lu 'L4]kTɊ//_r8jce!b?s&-Ct QPP wh"D (:T.'492^9#o.@#A6?ۜY K"ŀ{+,s+B sDJ>̕ G\]A-#Im{IW6b*QT?'=߆;b%Sh` A{وV"/Q~/nR:a"08&G@lgveTgiNq2Z gHt`aQF!a+P~7_D7ί}aF&Pk?07vGbD50֎ql ^662cMM]CvĽGsi|}n{--vGz HpAaL*hV:dx3q?k`j,c<{F"*u [1ͺ^ՍXhD^@iҰY:U~PɈC'T#K:/qX>Q!C;׵k*^y2O]cЪZ=t/hAQqeGy}K9!YrW~K`-ӓLsBb(-lbb靂,=7 y}6s"+cm]:-LZut !R!8]T nFaP?o $Y3֌?ۆ.bFcՕ  i7ֽFy%Gr-:&,5Ƈ^:ͦQȧjjAH%G)5D=QϘ1I(t>{' diXlY5^3^* \5^9)z8 59>_ng( ߼ͪ՞#OPѭRô}en9^gSKu%Ikfsw8h \ ъ4-Xyk0W6Ļ<%F;NWb?p}Ȩ5?,bo 13mCdqu{ޞD9\e``Y,OtrNR  G[?A =endstream endobj 216 0 obj << /Type /Font /Subtype /Type1 /Encoding 828 0 R /FirstChar 11 /LastChar 122 /Widths 843 0 R /BaseFont /TVBRTK+CMBX10 /FontDescriptor 214 0 R >> endobj 214 0 obj << /Ascent 694 /CapHeight 686 /Descent -194 /FontName /TVBRTK+CMBX10 /ItalicAngle 0 /StemV 114 /XHeight 444 /FontBBox [-301 -250 1164 946] /Flags 4 /CharSet (/ff/fi/exclam/quotedblright/parenleft/parenright/plus/hyphen/period/zero/one/two/three/four/five/six/seven/eight/nine/colon/question/A/B/C/D/E/F/G/H/I/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Z/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) /FontFile 215 0 R >> endobj 843 0 obj [671 639 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 350 603 0 0 0 0 0 447 447 0 894 0 383 319 0 575 575 575 575 575 575 575 575 575 575 319 0 0 0 0 543 0 869 818 831 882 756 724 904 900 436 0 901 692 1092 900 864 786 864 862 639 800 885 869 1189 869 0 703 0 0 0 0 0 0 559 639 511 639 527 351 575 639 319 351 607 319 958 639 575 639 607 474 454 447 639 607 831 607 607 511 ] endobj 212 0 obj << /Length1 1487 /Length2 8824 /Length3 532 /Length 9719 /Filter /FlateDecode >> stream xe\[֠q/V\.wBq+.݋Rݡ@v|4IY{>$,upeHj 881饝+X%$tpsy0PGOg+I$=biPpjXZ'@ &q`pq@KW[5 _a]`R&$3:y@`+ fC?˹٩YS֣mb?ǡn`g*vvT=A7UtXJ:XہA<7WK _q?%`mPNRFWǀ_w_Co, ڞ.Oz qrprraeK:XBAvX8;[xb^\{|PW%>+3?7l; xy@Kşhhva7 ?B o]ケ3n<غ!:@*sCa?7 +!Ck7qq&BX ? av!L/ABĻfa4l.._Ӏ0 ǿ_[/5/i0 ND_OËG ۇöqr+*'n`' ;'`%R$6!W6^ʺ1Nk3p!ޮpXىeF,%.mrNqO;;i/T=ioqZfէVFJ 2s0h6rNЗK aMu* ]~<kĺtmsÿGI|2%ųl`!ܕ8*.ũ~6X:` A92*l)[s>#=JMγ|hE~64A3< =h&AbmD51;((&9,7"?:rt6ec֎j6HU"y7ΡmO)Hc`v`x" 9Kn=hv2wǨNͲ%^/n"ׄJ0\V^ ~?Z%T]8(҈ic$0{?#Ԓg+4*^$-yy%6SrB$ KjY>gȘlYh( Xʿ%9yZ;<Q *f:VŌDj/ݎ$~!^WK3BlU S1ˊm\&'HigkL0wNIA4hD"LJ]D\!$~@fF9~t:0]1m}5 Ќ~f[Q,ƹ‡.It޸M"@y(IlZz-%v,,WpnqE|zOP Pet"pgA7ٱy>Pآw'H@돠8cU}@{p}'+ۿtD£X-ONL*"3w=d NqE92W!Z:ˊ.,^ Ƹvmǚ57OOv"M 1"'IWf[+7ڎu5CݲYHpgƯYޝTEy?b#MU68R7߆|BS h nABMc0v[1N$UKҬ+EI&֓n@|;FB+,0'ɠztkM ˹s ,*hh7 yELxρ`>YOc'L5*5*֮bZ73;VBEz|YvTdhdfm.#v] TXd.n/`H+RLG(?x[.'i:Y ~i:=z*STSָ?P^Q|" ZDEh`\D%wEʸpj/K&!׷$ZrC;Bz t[4KglٽƂ#_ #oe Kf3ISq釴Fv/Mb} >sˑvJZi}$!X@&2C8'$UϘaO a= Zmy)EU*3!iQ|+eUs\>@}pjڰnA <8ꍦu֖8f:DCjIM(3ˇP zǐ0JsO3,cƪ;L%vwUGGm۵*+$E*NѦk77 uF1p<,dN:\O2wJ>wC;M>d2kD!]rnL:GD w,ƞ+jD+x19>rb~*坁>V·/mdvaR"/d %OSTx.ߓ$'寍ƼR>g|Pє6}pLq:hG76S7OC M dO*~D.D.1 "CǤP1~E4W]TQՅ ×la2Kn^EY맡KGfE!E CYQͥCTف[Oxq\B$?'0|M {Gd,)Ei֗mؐLAvög{  w|=eEa#= &zCxl>BHrukЧ+)F5 GYbcl!~}~wB&N)(%x>}gތ KN9Eϙ8XK/֢X(2Ey^c;Ur(*UPp$#b@YڒQӨ/4p;kwv>]79PſC}GY yॷGZ,LnŅ鹑ilfC"y=iz?'N\k vʼQ̀H%1s+Bi(MϏdhKtX9P9n]&P|]贈,){$G@wqReI];aoLO'@ԟkehN\xJUJy:㪁ߤҢP͜UiH(F?@z C=wWS"hr}w?g9W`x>'~7MU^MGOh Z2QTԁyИ>Z 87utW1ɍJ =Y(iXRY8PBArѮVVwɯ7ƇGoDsåEhhJPwss7"dh[몘^VЦ6Q]d)46ޱ@:|*і'|*̮9c7zIQ%+;Cvo+G7^'Ǒ5rlov)xEnqE4ˌo +is5cbؚM`2weC q6;Q9VJc8f>㱶8E*l:MZ{|l},.H-s/I>΄Q^oHnozG4Ŭ_?1Lh/b~@yTqP]lNVᄕгy_hus$/$xJ&{ M+~v_uHڞg4,dZcTe?L|?Z't|(KDkH}?|>(|}/&SJA7bSpW(Vo6<|H>J}8hXS="M䨭q!KDd(,/DD!|e$cE郫F7It2BY;P*xYٿ[ڌR#"׭)G:(H1t*WrQ&̝CؔA ENZ}Lh{bd*^sNHU]7Sifu d xi}xق 7%Ů'G=32cPcG%/5ǣoo`k&y2I!Y nw]s=ָ ~sUtY})K ݊BV=*m'ϊ.\lf:}.LW?czd'y7(6t$Gd=[3F<9k:onT"/TFǫS4ΔW8D&!7|1|kz@P~p.$1T'v^bGo!9j[0yT%+ޛ 7)`WJxmZ0KW{0'{x6 bH $B 8HK>2jns~0V݊l<D[T-G!7xF=‹Ʀ$:Z`J R%ę֮AȈ/ J0(^Åk +:4q91'z`af#G\䪘_k/#v+އx:iXrIRM DlgJ9jqrK܈;8ۨ3*aR\X0~˙5,|&8l ˰خ{>6] ՑƬĽr"E) CZO^R\=le9z>hQ֔%Ci yc$vc'>!JW~qJmU~ b,Tݜ#vkGXHuZml A4nԘzރWH\{5yР*MF?&rca؊TCE</o)>-m=6ȫsg$k^ r YyԔS$wbL^ʴVּ +$8 FE/d[⣻p:G:Zap|jj#\9d+QN3wx5 QD ֟ X&|eFg"Q}z&|LIabhZ1Ty,oyGEƯ?}n'*B"Yǹ~~9虧K"$&9p/(d\ wdFx:}`ڶvZtրrM!JMwBʱqpMPyZ aI37ӧT?Yh9!+?ZMb"MഉvLNԨ"gSz,wo,#ㄏl2vutGմPag/gl 4޺@1Ϊ%Ur%.8SXБڊclk+ z :ֹq{6bW9QA:u%(+;fic^a;T} &lM m?Y%4ҷRf C4c8@jfivŶm|t[;W)6+>xX-o;/q q7whB7okCjjM爤^.ܓT^1vN9:ޮav:>nܣ>,j(C=gz&R7B/Wx "elY6huI->DAfl]fQET,5^r/>?c$PI?9n-%ԕ_MIao4QqZa.ܐs\o@yTɱS-Qe3`D[_`r; ipI@˦zJ{f4K79QބGaZk~K9>}(8.]W #͜l|ӭ:R%4HANF6QZQq7[*wM]bDk ŞVL i &z]WȜYIrqH9tUo'uvs;1-w?&HNmn~1lIdwlKpn7LԾn$[.2%EB@ qԕ*A\R\FU< hl5=u+pboP\XbVA3MhV:cD}tqθì]k,ej +4y:!MfQ$P%>yE͠]a$dCi u ^-v#YE;3 NH'+dbjfb̎1]g_EuAJpv䜭-+Sݫa4%eMӧsGąoiQ-*F9jxQi5GiD?5(]dsTL?|u:⽗Yw",`YЯ>NiCy!E^,$5=8iXTM€2ez võeN+括;,۫j_& _' ֥ };Ƣ>UR&ˊ ۜP񞜥Y`d,>q = 2A#{tnj+-h)NZ*ZRuGafukP3۪e¹~fx2ۓÝi#y}FGo!qV߯Qh53GCuJ]E9V:cNd=jL \V/Mq\̏C4]ܝ'D2vƇ&3xbEUkp: ƟX<1"_ͣFNp11vu%ǭr@YcbF|1MVs먈 wB~|T\9u3W)z煤e/PxQ4?;Xi/Maox'<݇\q )1quoJ|+՘9»-hG~pvNp=n#Z_`E#a#-+|݀.40>g:Gsz*c,+o2f3]NW.Ţ#M`[ݱ JMBxm1Pe?DF3QWw?І$hӓX_8BE۱7n>#ؼ(FJaQ\1dߍ-X [Baג֨?bO>WWvMq<KfI- 6|J:`7|=;jsvWKB<لFU(YSlg]9#JH=\aF(a?註AWM^KQɃ5z56w-yJ-<}tCm[ vud]pAvFPG+Š:%1OH&"rB|QcG{ΆrK(|r?_@Y`;3a}ٺ g/_'5~ބM7BwJԕ{z  D6Q s;+VnÌ6f8Wyn&)M㟕Zf*Ũ(݀9P"d?6:Ŧ,UY,*lDanky-BfS!ˬʁI^ʼ&roG"VK#C1^دǜz7ImW\Ti`cl3#bR87ϱt\# PO6|d_7', 8;-Mppچ\_y톝\`q ËseNbGj ^ 1ja"Q8o}$Xf;xDxgji9_o~7D~"N RH?NƘ &A^xt_ds;!dKgµcFaIyS2'dwԙ9a M&PL㾋D5^ķQ/? c9|u]J.)K˚(c6L@Z8ǵǢ酴5׈S!'d~*`KpX*BI:ݎ][V[jd߲q##9:.a5بu{u>ȑؤ}ҟ;n]AW% F2r1z5Y!*Q ?y_GУ`., |׊/gnߴ)C%|ˆj/3>ƖDK'dLʂh򀴨DtV-gsƍk!V(k1o/+I|g[2u1raFT"i;%Uz[EhL )uJ1\NKN%7`1("Ph8& B:&KF51BKy Ue}mbLM0 %KNEm /gk,sc'wn;]|F > endobj 211 0 obj << /Ascent 694 /CapHeight 683 /Descent -194 /FontName /FADVUY+CMR9 /ItalicAngle 0 /StemV 74 /XHeight 431 /FontBBox [-39 -250 1036 750] /Flags 4 /CharSet (/fi/exclam/comma/hyphen/period/zero/one/two/three/four/five/nine/A/C/E/H/K/L/M/P/R/S/T/U/V/Z/a/b/c/d/e/f/g/h/i/k/l/m/n/o/p/r/s/t/u/v/w/x/y) /FontFile 212 0 R >> endobj 844 0 obj [571 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 286 0 0 0 0 0 0 0 0 0 0 286 343 286 0 514 514 514 514 514 514 0 0 0 514 0 0 0 0 0 0 0 771 0 742 0 699 0 0 771 0 0 799 642 942 0 0 699 0 757 571 742 771 771 0 0 0 628 0 0 0 0 0 0 514 571 457 571 457 314 514 571 286 0 542 286 857 571 514 571 0 402 405 400 571 542 742 542 542 ] endobj 209 0 obj << /Length1 2176 /Length2 16125 /Length3 532 /Length 17333 /Filter /FlateDecode >> stream xڬeT\Ͷp@pwwww_?{{޿=zZj֪ڵ7!;#&z&nb9e&Fb&zFFa8 G3X`rr1Q{8Z;SA,dp06%3t606&V38{ Y[+s2 0cb"60v&6Y1$ekjGﰉ6RҤ!JZ{L퀣.hw.6tOfC kIwq8ٙm;Uo79J9Z[ ٚYpp(Z8Z;ؚrR`АѐQMY?/f8Ze ?K֌{FDlakp'm휁kCljς23HW LM 3-  ?5s3k ֆ6B\&Fi f8lqOMe:lE'_I:Ӆ՟ Oelw-Xو=BR3Z;Y:p3xS6۟v6#ௌn'O-\:7(p!l@U[E8_qӍ.u8s8 p|?[CAC!X?CH!!!.J.*.j..Z!.bsx2\C?+#GU ك!pf!p!p9Z@'()Z@+heB_MB_r Vn@+h<=[&6@ #ߖsDX 30d\\\>7Sx3JOFF.E]G@eS # pí.[5| *l/;j]2.y^")[iR2!>}0ӳ _wO{҇3s6PZEC߮EU7H@6eshgZS(;m$'BlNZҮ_u=%<`ơw(}P>8/+ CA"6Sq$>\Q A'?{=%.zI֩IFUrBo^$RxXhWC~JU)G鍜C IfI=5Ʉt' Gj/"+Sgl)L`<8̫xIVfPۑSp}͎|2뜜*w&riJPoA@{)@~P/CPFj2$y1$l(WÎϙ䕝^?߬ 0De#;6LcK|*ɟto$Ie)+j0jUsun5pla%{7(6-;Jqn]1o]3>> 1ݐbf2^𷪯%VMsM̟vcT:[wP6jmHK9DT  7c$Zn̊]|cd}qP6z?}g-%_C@1/OC>UWJ# +^;7'ȝ rAQܴ2̘']&5ZK/%#QMc[QĉˆׄX67(!h-jo5Y$(nMZ؎gѷD.IZdReFh]r$-Mq~ 'ePCr:-zEfn(G"4Huy_T0G놟-k(L=jԙ<􇢛zqfU%(>ctK ):S2 \MOs/<#?7]biƢ<~ )iCq+hy; I?KI|lحGnD%hK 7",$)O \shFwDN`Cd/elYWt grF8&vRȥφ ~ܺbLTjiףWIGȋj=-9PcJ6bu*ͨMg9*Hads#ѾK;C m$lKZszC b%o6e rۥ9]dY]fQS{[S^?t'}efQVfP ϤbgX]jo DS+Wvev=V.J :ZL ~oXlō-%} ?uKlb4~|va5.A5`1W]4q<~ߵ7*?b&ӽ\EAန2aup)&Kma5[UˌQJt+Cl0TfmE>A|+]#%XY3<2>ɏ0i<-jAsβO7XgvRzzr!me<"MBx;bԼt-ÞDP]f+=0gߘVS;/&?&6GTTEud!^e8*@bK QiA |5?k-Y|k9QKI/$w|›)%o _{إJ:B^룓}C7ti#~JcV,Xg5f 9uNDYQ! }u":C._`nzB47T+ 74i$:T_ Wlv}֎t9j%ąubB_h*{kg]chF ۂ O&30 iS SAn0 Bw!eY\CqJz;@#J1UBPC'<(Jsɪ}#=6~hd-dMv'%<[괗:5kArB^>5pU%oD/g{}#4Y圊m1E8:kS+8eϪVj s4Z] t}k9y:,up0 +~I4\Ϫ sPO~ڱ=ƸPGU^gXfՔiI˥%]pCMl2pIձȏݖh.O]1RKoTli3$,lJO&)0}aL~j2)zgQqq6@"mI ;+y`Œ VQgI! y)qm6u}:4PEDVO~$cc.B[̵iMJzY\n)g,R]I>-? 2)e39'C?}K`s:܅>rz,\>}R?=/m/ p|^-@#Oy+ܽ}t ר{nj:wTV6i Jr,fX׾* _26Ya żNPq-X5}6#g輵t֥4D~@;hoGm@z>߿rcv(o|2pk; 5dO1f>Ynub5al v74/H 9{SG" XӔ`>XM$~[9i']0bPSKN X oe 1 ?#:OB.kPjFБQ΢#}]Py<=`_߲#ghﮆ4fVNYD=ѻn]xMACcDkgvk_kT^w 8j#O_3ܐ] dt$d&۞vY4n ,\b +,݉\}?^0 fH-lCa:L xDzoEdo[4B]/ɔ3Ֆ.QՕK!9.ѿdS--'ʀ3ik T2OAZ2Du]^M B~^-ҿy]ՍU_:0~m_^=*4_e]9MD yVb͡X>Ou=N;'7&CXf`[p74UE*v:d$gyVAgez{1 юMg)+T!b^Yg5mK)k 6 7.VCH\cuЍqJel(@:-n.P!JZEkͬ%[:,:y yl4vx*B]Fy񰂤;=H.֗XÉs^ pZ:0t}<5nh\V)hDPvz \"`sz9r"qZ E(ŊC:T|x|4?q=mCZ ~Oh ًӕ,uߛ9@w|\k0e 9,xrn_&v&d;tmdNnҊBlzzE0.q+9y|ɐd|s!3>NĄ2+/H9E%[2 &o`F+/i$SMR BWp a*첗8-4H?ZR\I 1t3P_aa:BnϪopv݄Y< nڿǙZr0+~ە#=`Ok"0uar›#jDtPwvY\M9 z,a/WFݣmÕhM2 q/(`R$B$X?zi<6/,ləһϝh!H r44_ĿQ뗛XBLw\#/%#Ezv" yc0ȕtMg Ttkga yDUxHySOM6KE/Ɠ6;%'dF_a^69H/MZE5/ĺ]XL|(:ΥV T́腌U XԒzmNQC yZiYu_a4Yl$ aRصE,W_Ju*za{IKal/(sУ]8<%fV?<]ȑ8}*zydhd5bHz>"-:aB>E5hY y61^QVEI8~MJ^=cʁXwƊ!]| {=i7VJ=2SޅpRIWoԲ;V$%hu u:-~Fm C{_u])'Dڐ-c3waRfRRz+55͍lc3HQ\"Fݸ#}^EsKOǠ&4˫v]PلBQp& 7~t>4ya£,*{1@W/+G',0bc`nB A"-`2YS`_1$xR}Hg6Lj#(FKE"lsŌ\}1 MH>1\ŨbVAյ0ǒZF\ k{OZHPys0za/043" f]ܟ͊mU |(3*1&r[&W1 ZP=6xI:f"&9WU[="#:ԴDi*k3LZPgtYX1:,'e2YM4)1oiȘ99Nb2c 3QpW))^TQ~vϦY%[~dH8-d7u'<68VNAӖ}囊,ek{YkOڄSbX5q=ðO+k:}l=HܭF<[T( ҁ> Ӛ[3 82[Tb (W}6O0j*`}:ƽ)ﶩf{+ =ȁv$.ս|Cl㼌{ ?p4쯕YV9'(ҕ{f˚qAc14~D1QP8EpUQa&HqOj/Ttp N~=@회YߒL cςX+Y9?`֭ F~,>@v0Wśq m!he6+"< tzHkkP5Hy᷂&2LhCCo&5f3.$s^iTNq{޿ai'x= űӏ f \:o3ƽwKEL}ngmPR0:Nfnf>eo?Wp*֡pz/WqAT3 F9. AxL/nڵ4rB?tvű+_X6 :sm`@:qcM̐SB<f/qk_.zqI_/Fޣv]u3QWXuE|ZsJܤ7vIPmtbjܓ#@ݭVN Ay_[?e-h?"RBjuQq}携Mq d?qbar~v ^/uqcߔqcP(zOyS]_$N9YѠgX7C08e.4NY"N4D߸Ujn%zWZ=I9L%V-Kc` &'5SWx]r}T^ָP4EW5&p@hJ=\ۨZ |M:(kOd!'| (堦/\BgPp\}%\Ǖ<ʺqGv2տeB[f\W9TsJH8a7ă@Ȍ$dܞ>u9 ɗi.v[6Luj7_O9cD*E>:kd_̤Ǵv$V3.ɳ,q5XEq`Nthpk1 x'GtP6]YJHm7 FVԗmpq>D/4Ev] 6͓Xz=l1'iqgpF?=H9B? Lu%/ /^dM]vg8 c,Gc޽* ɭB-$eխl|  5P@8 xGk"kp5bKʴm" 66qȏ uH껢o}1!4~Q^7)}m$ }=pe8*E߅tt?M^a'N\h_Z^=H#;jAxዻA+\#噇;HTgvɂ6zT> vube=lECLAO䇪Rž[+Q,#yN ;|,bfy-Ꮶqs.8Q9QUDYG~mȚ 6|9##ˢ KP_|\4C_)pSZ?w=~CgS`|.t]{< ۠!Ȉq>Z-"l *$6KgIvRW~+ ڌa),41yJ΅v>.SPRuv]eä?cзb|T=*G[VwG W JqJ$7ϗ<  |TPWCxIy쫿]0ڒ_m0ς>{0!C'e_RH{V=y6>y}Os6/{;tKQG5:W305jU# وk%ҩ)yk3gt+c Blu/ejݶi\^6YH5XŢ/mb5R TRę ]Rzb}vWK w7 ˆh$ma.0޽K>PIc>OvtN ^A#Rl3t8fWNFIۉBIUkoxi)w tB1*Nd~vuHk: opnxt Nk3$ doSئS;uh Rc ytיlb$}7Ӎ⟭baYW*b>YbRH{r>aӂJJ':~[Ch9^L %κ0Ƀ+{!]RK0nhB8ovR?z?=3|Zi2*@2x&} 4&os_>ӳUm; VDk^IKAl52'qؓx:m/P7{jP䧍H_Zӽj+ZA:I2C{NA.#ftj'[:&Zjs'*BQ8/2r{Wĝy pdjc\7g{] c2iz"g0,0q;#(ts舍E-K|/w ^2Cxe7|EeOEN͋iNJЃ fK{VtQWϫbY3R0sE>YRnȰ!fM=zT 'rS D#Êt*L(5.a5 ;y˒ts})RN;j#ߩM~^>$v4ƭGK %l %@.!T?I6`ERgdwtPV E("_zËڠ}34oCjbF7|YS9@^:C"*Vr΂Q*% Ϣƹ3$ΙDĺڂi0L8}O*<>IhFBIYF<~fI侶+f7O@Ak;fOϹH8\Ъ8vᓶ`Dzz! Ƚ;G U+2[J(TR\ .ܚu~K_ tF!tv%]itL X NbTj"#BVT^,Y/G5[ 8>n~rY߄(Sx6Y9ʂrK Dz8aFmӾoqӺ!Jzo Gwrqr^f׎? W mh]4v+2.&,J.V1JhY)ulRM0f-5]kB"Z4T>qSj;RVT.ѸAs9d_qzI0w25 s*Z:̅ I!akS. +g}weX_Iyc?ݾu|.E:WBM_aB4# .rK刁e9Zݶ*-dRc1d^%1[ H疊IH6}<֪I_ 7 <[?;澨E|v EG+<}V åXVHpʳ;ju-Dxi(0x@micV 93@(m;Ê7=%"L5 wp6Pu GoUȘaʃ'L0nv-HWoQd~R#Qdqxu,+KivCO!/!((0ao;!m á8-_$P;}w|1BU愑Oh6ib?=lĞqcX =4lZDAǸ.^9!ͦއJH~ jЧRzcaHZꇝAL}OLdW`7 =0BfAr^"ugn1,:#ؔ4'έG7 IS f4IbBRxJ5#tb+ +@51>=p7@=-?fl,m$x3ӂ'c 5Vd?w3cI$\caRWgo8,NdϷ)whim},kNbd*bs$h4 {lmv_`?w5Wi@199Җ^}{mfZ}:qz"y1hZæ❺ Y5np|] E=lK#(V$&,Vm]:^h+hM&2')k9(np@zp:m OoO6A3^%]Bo-rzn^*?8*N PuR Jg͕&4n F[7.0(]Z] d[-{4?&3f 9 8zzBW>#K>~Zmx: )='mnwҚovH}b!N2'|Xd0*ϭ:7c[oB= Rb'(|INb6O^72]r?X(0aѽq!FLYG]KG6, G'`}v0%gs3zhr]AwL/H{W4\߄ҲuH2ML0`<Ÿ*8ʹRHKv~Ŷ-4l4@fj ю\t qO&`,pR=8sb\5T@HuN``b͐ j{>uN@9B(;wL?SD aO( mFYnm~'g[ÍMW&& zca|_1oDžRqhDW,@9k o]Ԋ"[x[d6F;zn Z|5\V;9Bl32먼u+Ӛq ;k q7;WF,aÝ*FxGxUZ7al0axa3W1Q=rai(_,H_<*^_ 7xHNN]"~iy\Gp#jAUWWf}*⎨#6c=(*jnrb6*җQ _*'mj<&o"eOrٳ}ŻG5\0fAzoݡvJ(/R4i9d_VYFɍYxj1:?#vq8m7N52nٙ_.(;+rlJU>^d>7LzTp(Ԯ!->24Zssw..?(ea dI¯p-bM-5r.ݓ-@9F:Fod *ϋA=ShCpRm7:\KVxgĎLLo"F<Ⱥ= ?IPBEl71tH('F0:F$j~X# K ԀhXX}".2j¤JUH;fz+],F}h6E?DNM̛ |/UbQU rb)uJ愫JD=#Ml&zٟN`lp8^PbIc]5O7!vyC&?ȦH…FߵR eL3o j& #wAs0+Z3X <7,u?vҜfKd.s U X07D$փ'3`ş'f&swOL|mXg'SLe$+.^XԊ\|]\d:;^Y`̆I%g~ȑfo3KQ! n!}`Dvwo4#$`Ԃ?xgZ51^#+e)Oϧ6;-s˧6>Oli`Gձ_Wiڬoq}xdT]{oLֺ'yϳ[56Ph)~#3)k)?2/ߖ;_Ŝ~6m1O.=#O[SypMe7kړVLto>tfKW+>?z9eQF>j.h-,='\Yhq';7!uIO]_iyYtqA߹gSW-(s9ƻ)ISk/t<;휌o[]K jfgZ[wěc2GӸ"L_g (\ sRJs`?endstream endobj 210 0 obj << /Type /Font /Subtype /Type1 /Encoding 828 0 R /FirstChar 0 /LastChar 127 /Widths 845 0 R /BaseFont /WKWHKT+CMR10 /FontDescriptor 208 0 R >> endobj 208 0 obj << /Ascent 694 /CapHeight 683 /Descent -194 /FontName /WKWHKT+CMR10 /ItalicAngle 0 /StemV 69 /XHeight 431 /FontBBox [-251 -250 1009 969] /Flags 4 /CharSet (/Gamma/ff/fi/fl/ffi/acute/exclam/quotedblright/percent/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/equal/question/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/quotedblleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/endash/tilde/dieresis) /FontFile 209 0 R >> endobj 845 0 obj [625 0 0 0 0 0 0 0 0 0 0 583 556 556 833 0 0 0 0 500 0 0 0 0 0 0 0 0 0 0 0 0 0 278 500 0 0 833 0 278 389 389 500 778 278 333 278 500 500 500 500 500 500 500 500 500 500 500 278 278 0 778 0 472 0 750 708 722 764 681 653 785 750 361 514 778 625 917 750 778 681 778 736 556 722 750 750 1028 750 750 611 0 500 0 0 0 0 500 556 444 556 444 306 500 556 278 306 528 278 833 556 500 556 528 392 394 389 556 528 722 528 528 444 500 0 0 500 500 ] endobj 206 0 obj << /Length1 1778 /Length2 11101 /Length3 532 /Length 12100 /Filter /FlateDecode >> stream xUT]`qrp ܂ ]Npw@VMG sך%9( rpe`ad)jX()Ŝ& qW / f `epr#Q@^֖V1"@gk3\2z1DP݁H,,sk3W)# ?nЀ%i`EshĤMoHnvv&,&v^wts:@@g9Qh#jbgm&`i0GEhljf0s+t0 i4*X;{9?b? gkO3#33 8_ff sk8;x!w8>,ks' 6fbt_rW_!;3`pe&3ɟ ' ~ ?!.՟7 0fǟ`#W+g_ܜk2.Y7e]g `''$UDTG)oQG(C` ?.wWCJ&npw?UϪh!h!]3l*p[X/`o_Ϧ !X/[` ۿla5 X/kB_ ?/ϡ_r V!L!/[y %* a!VQ=Q|d 9/ }/W5"=fHK 3Ma~Setg:@9ѭi?c}x!rU<tO{s7Kn%ҾJWu$>Fko9T>ZSb8WF\}~GϽ'#K[2N#i|/wn[)~6$r-G!M'ToC&Ut,GW.٬G%2ϲ\#: H5 j㫩':uH牭#N7fPcۺ(,TǨ4olrKq+H\kQl$ #,)S1Ȭ7.&/#q X;k_o#J`D~/HDWe|8+db%87?TkPnyc BkPhkE~g`_/Ea ȑX,p-XgTb0PESg'$ZIrWɺD{BXxWeNԪ '8G͌mq1loGH1 O9/e~1TUQd'ivj`gGUu#Iwu3G?vL4;,;,tua3CMXvɹs7 bo'[F옭\zNjQVϨMNX$ln$s]PVNvGCpRQ]BLm Ib3煶l ܓu QɓX+ :<.ء/ƣ+8b~D66>rJMe լ}>R2`~4֝g',Q׼߰X铺*nR.= 5~kRCL'%MC^PnjgkKFq{7DnJ3f}Lu_")N~Ώe6͘WSNhPk1PWbũ0rݣnd%T25|N%y>NgTqVQ+󻝃pV䭅gQ(GCmjD{ςԅ꿾#k m|.ƾz=(,ʧFqbsxK0c\cF.+lanw%,3rg/ jz&%cthr6ƒYݰ9nI??hpas'X83Y+7Q%>ejѱ˶UqxȻ]S75C!N$%bh$ru3n0 1wQGyA Hnջo"DlK/7kS!S'oCq9/=YD{-+Zww'ch+@9ru1g,(gy*$kܗ486’k|k.3}V$Y,kN.{vξ3i p<-#Vs j؄cfqNY?]w\W--\O\g]G頋C>4JxǷ̬dŬe)N?<LWً7E0Ċ|1b\S!jQai/5:d8dS6SeLRts^![yuu;W/j}xln~ӊ-2#$Oގ{Q{C1̝J) wlRqǕP|мť_v ^x;%v~0Adz2nBτ`J6& Uw[uKB\ZOF^M?ЁUKrC =$lKn6ΒQ"wEJ^7 `HM?w]-Ak2rHHY >Rx﹈:mNUy^c+נx*+w^j1ĊQq1$Lnþ~sWp[}*m_}N?7P;\v!H;zD OV\7,Yn,(U{o~}"DjJJHl6U(c2hבo*{Tݶm#DJz,+UNÔoW11;6"J:wzMD&NIޕ j6}~ɴڼ̲eī?VYttrz0P)ؒ%MIB\塵h ~d`g&,P^ٿ |"ϛ"e}Dn =Exh2%t9Z~aGU»O:IcmAXG2\Q0lh axij͡M%upR2˿ \jh:>zM-W6h:~LFuu\! TP+e  XlKMRݏs іjp/؋c]c3 _bR>;EWw,S U}.{hD%w| Yu2>ֆb&O=.-vÏ}ZbV-=(ُixI4d>Ut2nWR%!'b!"XT~TjW?]b ~ml SLA:ݘcQ=O)Em1Kxt>W`?[$49PwUI:8rU^ϒu/G`7F[].W -dVX;ּ CKgBU6 ,BX>x203m:q}1$ d2]LHR l__s>=P>ԯY3ж--l3g=w$.Rk9̚ڒ$5u-xwⲶud=jT .㘿zLg=3ۍ!?x2Wf챺0Y-  l72!%bmRqD{{ ]^j, s4M3YAǦk+,+~)*TA5Pty|<䥟@iZMQ-BNoV%һ 2 2!Ezpe6XAN/{7(QO{v"~>Υ@,>!d&p4!!UdZ./O|DaJh,YZۑWR_7(֒u{\rszIƼXM'I{_IExqr*{ qDV"sQH4' &sH-8Ypst3wT05a#VšJ!= m-."D Slϗ-(U#O T+~eGM=q?X=`?Ʝ :QX`Bޗ]5AaJk0kYSi="mq &UDq\B '"Sl~ )"s0zõG,UPyFQ,9ʒJһEѓu*RA"aCh/>#r0)e ԌhfOX ,^Gg"Rp{|1>ylkƵ_hH0LzĉG^U+pP<'퀕x~pt{03Zs*KwƇ\*}ŃYM⹲ &qLΏ}脷BץҨӤA;7QgR_Cɤ\֗; "<ʲgwˮ @ W V ASЧJ<䏖[')OO#j!DC)ILҵDŴc &5)WnI4{2?2bսɱR{w$|b":}F>PS"hKbKf;*,p1J༻4>їc;$u񟇁)LǗJcw8Q~Ǐ@_iֵ{%) + *}ꥇozZ-J^ er$Lj3paHi[:*UiqYM %ڼUhLYB1`;/ߎSd;a^K->(g{3$RMI6:1tqRX2X92 +1}S]߸IyrwkޓCrG*?SnZ}J`9\lBrtj*`"U R& T"Ж1^dNÍ)ڎKZ_r-vzyV+-a9Rhuf=B/J PxPwnJaW&ɖoae5=n?ӎ֗~[BGvln}0t"U&j-@.@~$#۪[z:@ףS2c}]gƋeϽH?E55M_2A5unZбi}-En.Nee`BzI)p x| `1RӏawτFpWl]- y^7u$}MEX|^zPD5}=qf6|eq3Ŀb4m#ii7Zm/(}8މ+Uq7sd ѣC\g!EJz*Rdh8[%K.YM;8C8F G.S$gt.dCrbp9[JND~f5B705iiP th׿W(e6Bw%\t)2lƬ&GOZ>eȃ"Bܘq,oAR,k{jq_؉@ڣʮk%†¯Y,SgVc͔L4oi}XVSl̋B* Z",}٢H#gHץoXm_WM?PSSAT6Q6Ote).؉o'J7#etI!L Ddj/goٌ [QX \wȖ΋S\䏽[7c>Ϝg&8ׁsZnSJ<߄^Vc0NLg^yWĵ .~ʉw1\gI4Y06:=9xgT(19VT]@bnkF1Zo|nkUoåKg8-qK0ލ(ێ40\DEcը٢tmAh;Y&$Z 1KEoC~./Y>;ym uB0kZ_N3;vCX9N wQ0b kvysټ?#ߛ7Lct:2J gzF#w&}W&ɼ{~5{Xi#BSh4hcW&Q| xYl&|$r `y}dzWzbQ{}AX3'gׅPnZլÂot51_ C7,VXh:Td{t .a&\c,v-> EszQZ+]+~t7{?6߸ܹ|Hz#ZJ_\L!mӴL;,`@;m9 {\*97/[s .}Ð*vw9 =f8rW->Ud9B_{UrRûsM(`[Ȟh! b~[*5H ̿~rEs:+ *Ɩyq2o!2_^vI<X{))ԴC7Ċ=Ah`iYۓh}|Q?.oιM(,0\1.mvw9ES1$MiN'WFKKgڗtl-:Ѝ 4y%tLՏh4UI8Vh~hn_5w&DGD9X<>| bOl'@8vJ ߯ĩqGG/c)Lj/Cy0l ^Vv?J5,osk\.*u񦮋wgȞ{3}:{NV&ھ#2٨ӭɍHO}+Jt640·sEbI4sL3>.%O@z L,ot&Y|({_$qZ<(0e9 B|ϘaCw |ǐ>| ׸ʒ$QZ]/ݥKLjs_߄esĦWz3=ôUHm~;)݉m_2=&A7KpO9[Ŝ"{sʶ>m3Rn˄ JVT- YŁ'(9EIyڽ rυrJ<#D(G84VZ9Y]wH8.&]pv}^ ZR! iH0 6hė}IYyi3 e>C[Gģ޹G۴pq$J>5 _ۿVRSq:FYrQ⛔fXx9ڬ4OW ]n'3C˩\Sׄh\ nhid3SeD {9}[ooXT{P䌋xRc1^26AY;@ssLuU,VXc8U66ZV#+Zyb; @%ǒvJVgMB5+;W[EN6@9߳;߷GUu˚jn7lIe? xRj>QipO, r\ !yNGӓ<[ybUAe-]M4=@K FXAC4HK'~ěg2S/Pͺ=U +D~2ݲϸV +ݽ)O;% ʶnċR#QU)JΎே/8BL>W7 ̇7qJ:Ur Jr {bA_5MMtZ $]h8a@t< Vߪ:DYe e"5;g35|KaZLLj *#}% ;y=lE)WVX ܆R (Nʔ.Agğ%K?@}jS/Yy6F%v|[[o% Sˮì%c;bcL 4wogT7-N5 5u{!ERRcVpe\Gqq<}]j-`o "(><= jA \~lr4h-S=`}[N\eyx8%JǓ\6%iްuQ>C܁]wnW~f!h]djyg_*c )  ۟G|p>9'ί ~ +CE7M[eF&2sh9w\Y#07ݵ !AV밭Y/ 3ɵPB_ Gߧ:Z:v>?ѻ/pƗj7lcV@u@Y퐾G|u?+̑Yh_nkXLh:6~F  UJRw- B5 TRwV}_@HLՔӰZah}Gѝd`` br;xǒ<[&F Fg:]U4\=bǔ&UUţ̗9#j#Sa(>DFn=kF9e<^SlD)K>VQ\u.d95( DiѺ-asaZEd*EgFO] c%tqs9Յc}ϑ갛ױjR}uѸf|7jJ}|q2L I[DW= 0șUdcPjԑTפl:?-hWZJ MeD|E|&f?A(`f4qvٛ8"/4> endobj 205 0 obj << /Ascent 694 /CapHeight 686 /Descent -194 /FontName /EGDTDH+CMBX12 /ItalicAngle 0 /StemV 109 /XHeight 444 /FontBBox [-53 -251 1139 750] /Flags 4 /CharSet (/ff/parenleft/parenright/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/question/A/B/C/D/E/F/G/H/I/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Z/a/b/c/d/e/f/g/h/i/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) /FontFile 206 0 R >> endobj 846 0 obj [656 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 438 438 0 0 313 375 313 563 563 563 563 563 563 563 563 563 563 563 0 0 0 0 0 531 0 850 800 813 862 738 707 884 880 419 0 881 676 1067 880 845 769 845 839 625 782 865 850 1162 850 0 688 0 0 0 0 0 0 547 625 500 625 513 344 563 625 313 0 594 313 938 625 563 625 594 459 444 438 625 594 813 594 594 500 ] endobj 234 0 obj << /Type /Pages /Count 6 /Parent 847 0 R /Kids [198 0 R 238 0 R 256 0 R 263 0 R 297 0 R 320 0 R] >> endobj 329 0 obj << /Type /Pages /Count 6 /Parent 847 0 R /Kids [326 0 R 331 0 R 343 0 R 357 0 R 370 0 R 383 0 R] >> endobj 394 0 obj << /Type /Pages /Count 6 /Parent 847 0 R /Kids [391 0 R 396 0 R 400 0 R 404 0 R 413 0 R 431 0 R] >> endobj 445 0 obj << /Type /Pages /Count 6 /Parent 847 0 R /Kids [438 0 R 447 0 R 472 0 R 507 0 R 515 0 R 533 0 R] >> endobj 589 0 obj << /Type /Pages /Count 6 /Parent 847 0 R /Kids [575 0 R 597 0 R 619 0 R 623 0 R 627 0 R 653 0 R] >> endobj 665 0 obj << /Type /Pages /Count 6 /Parent 847 0 R /Kids [661 0 R 667 0 R 683 0 R 693 0 R 699 0 R 709 0 R] >> endobj 716 0 obj << /Type /Pages /Count 6 /Parent 848 0 R /Kids [713 0 R 718 0 R 731 0 R 743 0 R 752 0 R 760 0 R] >> endobj 778 0 obj << /Type /Pages /Count 6 /Parent 848 0 R /Kids [767 0 R 781 0 R 786 0 R 790 0 R 794 0 R 799 0 R] >> endobj 813 0 obj << /Type /Pages /Count 3 /Parent 848 0 R /Kids [806 0 R 815 0 R 823 0 R] >> endobj 847 0 obj << /Type /Pages /Count 36 /Parent 849 0 R /Kids [234 0 R 329 0 R 394 0 R 445 0 R 589 0 R 665 0 R] >> endobj 848 0 obj << /Type /Pages /Count 15 /Parent 849 0 R /Kids [716 0 R 778 0 R 813 0 R] >> endobj 849 0 obj << /Type /Pages /Count 51 /Kids [847 0 R 848 0 R] >> endobj 850 0 obj << /Type /Outlines /First 7 0 R /Last 195 0 R /Count 16 >> endobj 195 0 obj << /Title 196 0 R /A 193 0 R /Parent 850 0 R /Prev 191 0 R >> endobj 191 0 obj << /Title 192 0 R /A 189 0 R /Parent 850 0 R /Prev 187 0 R /Next 195 0 R >> endobj 187 0 obj << /Title 188 0 R /A 185 0 R /Parent 850 0 R /Prev 183 0 R /Next 191 0 R >> endobj 183 0 obj << /Title 184 0 R /A 181 0 R /Parent 850 0 R /Prev 163 0 R /Next 187 0 R >> endobj 179 0 obj << /Title 180 0 R /A 177 0 R /Parent 163 0 R /Prev 175 0 R >> endobj 175 0 obj << /Title 176 0 R /A 173 0 R /Parent 163 0 R /Prev 171 0 R /Next 179 0 R >> endobj 171 0 obj << /Title 172 0 R /A 169 0 R /Parent 163 0 R /Prev 167 0 R /Next 175 0 R >> endobj 167 0 obj << /Title 168 0 R /A 165 0 R /Parent 163 0 R /Next 171 0 R >> endobj 163 0 obj << /Title 164 0 R /A 161 0 R /Parent 850 0 R /Prev 159 0 R /Next 183 0 R /First 167 0 R /Last 179 0 R /Count -4 >> endobj 159 0 obj << /Title 160 0 R /A 157 0 R /Parent 850 0 R /Prev 155 0 R /Next 163 0 R >> endobj 155 0 obj << /Title 156 0 R /A 153 0 R /Parent 850 0 R /Prev 131 0 R /Next 159 0 R >> endobj 151 0 obj << /Title 152 0 R /A 149 0 R /Parent 131 0 R /Prev 147 0 R >> endobj 147 0 obj << /Title 148 0 R /A 145 0 R /Parent 131 0 R /Prev 143 0 R /Next 151 0 R >> endobj 143 0 obj << /Title 144 0 R /A 141 0 R /Parent 131 0 R /Prev 139 0 R /Next 147 0 R >> endobj 139 0 obj << /Title 140 0 R /A 137 0 R /Parent 131 0 R /Prev 135 0 R /Next 143 0 R >> endobj 135 0 obj << /Title 136 0 R /A 133 0 R /Parent 131 0 R /Next 139 0 R >> endobj 131 0 obj << /Title 132 0 R /A 129 0 R /Parent 850 0 R /Prev 127 0 R /Next 155 0 R /First 135 0 R /Last 151 0 R /Count -5 >> endobj 127 0 obj << /Title 128 0 R /A 125 0 R /Parent 850 0 R /Prev 123 0 R /Next 131 0 R >> endobj 123 0 obj << /Title 124 0 R /A 121 0 R /Parent 850 0 R /Prev 99 0 R /Next 127 0 R >> endobj 119 0 obj << /Title 120 0 R /A 117 0 R /Parent 99 0 R /Prev 115 0 R >> endobj 115 0 obj << /Title 116 0 R /A 113 0 R /Parent 99 0 R /Prev 111 0 R /Next 119 0 R >> endobj 111 0 obj << /Title 112 0 R /A 109 0 R /Parent 99 0 R /Prev 107 0 R /Next 115 0 R >> endobj 107 0 obj << /Title 108 0 R /A 105 0 R /Parent 99 0 R /Prev 103 0 R /Next 111 0 R >> endobj 103 0 obj << /Title 104 0 R /A 101 0 R /Parent 99 0 R /Next 107 0 R >> endobj 99 0 obj << /Title 100 0 R /A 97 0 R /Parent 850 0 R /Prev 87 0 R /Next 123 0 R /First 103 0 R /Last 119 0 R /Count -5 >> endobj 95 0 obj << /Title 96 0 R /A 93 0 R /Parent 87 0 R /Prev 91 0 R >> endobj 91 0 obj << /Title 92 0 R /A 89 0 R /Parent 87 0 R /Next 95 0 R >> endobj 87 0 obj << /Title 88 0 R /A 85 0 R /Parent 850 0 R /Prev 83 0 R /Next 99 0 R /First 91 0 R /Last 95 0 R /Count -2 >> endobj 83 0 obj << /Title 84 0 R /A 81 0 R /Parent 850 0 R /Prev 51 0 R /Next 87 0 R >> endobj 79 0 obj << /Title 80 0 R /A 77 0 R /Parent 55 0 R /Prev 75 0 R >> endobj 75 0 obj << /Title 76 0 R /A 73 0 R /Parent 55 0 R /Prev 71 0 R /Next 79 0 R >> endobj 71 0 obj << /Title 72 0 R /A 69 0 R /Parent 55 0 R /Prev 67 0 R /Next 75 0 R >> endobj 67 0 obj << /Title 68 0 R /A 65 0 R /Parent 55 0 R /Prev 63 0 R /Next 71 0 R >> endobj 63 0 obj << /Title 64 0 R /A 61 0 R /Parent 55 0 R /Prev 59 0 R /Next 67 0 R >> endobj 59 0 obj << /Title 60 0 R /A 57 0 R /Parent 55 0 R /Next 63 0 R >> endobj 55 0 obj << /Title 56 0 R /A 53 0 R /Parent 51 0 R /First 59 0 R /Last 79 0 R /Count -6 >> endobj 51 0 obj << /Title 52 0 R /A 49 0 R /Parent 850 0 R /Prev 11 0 R /Next 83 0 R /First 55 0 R /Last 55 0 R /Count -1 >> endobj 47 0 obj << /Title 48 0 R /A 45 0 R /Parent 11 0 R /Prev 43 0 R >> endobj 43 0 obj << /Title 44 0 R /A 41 0 R /Parent 11 0 R /Prev 15 0 R /Next 47 0 R >> endobj 39 0 obj << /Title 40 0 R /A 37 0 R /Parent 15 0 R /Prev 35 0 R >> endobj 35 0 obj << /Title 36 0 R /A 33 0 R /Parent 15 0 R /Prev 31 0 R /Next 39 0 R >> endobj 31 0 obj << /Title 32 0 R /A 29 0 R /Parent 15 0 R /Prev 27 0 R /Next 35 0 R >> endobj 27 0 obj << /Title 28 0 R /A 25 0 R /Parent 15 0 R /Prev 23 0 R /Next 31 0 R >> endobj 23 0 obj << /Title 24 0 R /A 21 0 R /Parent 15 0 R /Prev 19 0 R /Next 27 0 R >> endobj 19 0 obj << /Title 20 0 R /A 17 0 R /Parent 15 0 R /Next 23 0 R >> endobj 15 0 obj << /Title 16 0 R /A 13 0 R /Parent 11 0 R /Next 43 0 R /First 19 0 R /Last 39 0 R /Count -6 >> endobj 11 0 obj << /Title 12 0 R /A 9 0 R /Parent 850 0 R /Prev 7 0 R /Next 51 0 R /First 15 0 R /Last 47 0 R /Count -3 >> endobj 7 0 obj << /Title 8 0 R /A 5 0 R /Parent 850 0 R /Next 11 0 R >> endobj 851 0 obj << /Names [(Doc-Start) 204 0 R (chapter*.1) 240 0 R (chapter*.2) 266 0 R (chapter*.3) 784 0 R (chapter.1) 6 0 R (chapter.10) 154 0 R (chapter.11) 158 0 R (chapter.12) 162 0 R (chapter.13) 182 0 R (chapter.14) 186 0 R (chapter.15) 190 0 R (chapter.16) 194 0 R (chapter.2) 10 0 R (chapter.3) 50 0 R (chapter.4) 82 0 R (chapter.5) 86 0 R (chapter.6) 98 0 R (chapter.7) 122 0 R (chapter.8) 126 0 R (chapter.9) 130 0 R (cite.adachi1996) 500 0 R (cite.dayhoff1978) 498 0 R (cite.felsenstein1981) 505 0 R (cite.felsenstein1984) 497 0 R (cite.felsenstein1988) 690 0 R (cite.felsenstein1996) 691 0 R (cite.goldman2000a) 428 0 R (cite.gropp1998) 254 0 R (cite.gu1995) 512 0 R (cite.hasegawa1985) 496 0 R (cite.henikoff1992) 503 0 R (cite.hillis1996) 729 0 R (cite.jones1992) 499 0 R (cite.jukes1969) 650 0 R (cite.kimura1980) 651 0 R (cite.kishino1989) 427 0 R (cite.lanave1984) 467 0 R (cite.mascagni2000) 779 0 R (cite.mcmorris1983) 570 0 R (cite.mueller2000) 502 0 R (cite.rodriguez1990) 469 0 R (cite.schmidt2003) 571 0 R (cite.schoeniger1994) 504 0 R (cite.shimodaira1999) 411 0 R (cite.snir1998) 253 0 R (cite.strimmer1996) 526 0 R (cite.strimmer1997) 528 0 R (cite.strimmer1997a) 572 0 R (cite.strimmer2002) 429 0 R (cite.tamura1993) 470 0 R (cite.tavare1986) 468 0 R (cite.whelan2001) 501 0 R (figure.6.1) 527 0 R (figure.6.2) 536 0 R (figure.6.3) 573 0 R (page.1) 203 0 R (page.10) 372 0 R (page.11) 385 0 R (page.12) 393 0 R (page.13) 398 0 R (page.14) 402 0 R (page.15) 406 0 R (page.16) 416 0 R (page.17) 433 0 R (page.18) 441 0 R (page.19) 449 0 R (page.2) 258 0 R (page.20) 474 0 R (page.21) 509 0 R (page.22) 517 0 R (page.23) 535 0 R (page.24) 577 0 R (page.25) 599 0 R (page.26) 621 0 R (page.27) 625 0 R (page.28) 629 0 R (page.29) 655 0 R (page.3) 265 0 R (page.30) 663 0 R (page.31) 669 0 R (page.32) 685 0 R (page.33) 695 0 R (page.34) 701 0 R (page.35) 711 0 R (page.36) 715 0 R (page.37) 720 0 R (page.38) 733 0 R (page.39) 745 0 R (page.4) 299 0 R (page.40) 754 0 R (page.41) 762 0 R (page.42) 769 0 R (page.43) 783 0 R (page.44) 788 0 R (page.45) 792 0 R (page.46) 796 0 R (page.47) 801 0 R (page.48) 808 0 R (page.49) 817 0 R (page.5) 322 0 R (page.50) 825 0 R (page.6) 328 0 R (page.7) 333 0 R (page.8) 345 0 R (page.9) 359 0 R (section.12.1) 166 0 R (section.12.2) 170 0 R (section.12.3) 174 0 R (section.12.4) 178 0 R (section.2.1) 14 0 R (section.2.2) 42 0 R (section.2.3) 46 0 R (section.3.1) 54 0 R (section.5.1) 90 0 R (section.5.2) 94 0 R (section.6.1) 102 0 R (section.6.2) 106 0 R (section.6.3) 110 0 R (section.6.4) 114 0 R (section.6.5) 118 0 R (section.9.1) 134 0 R (section.9.2) 138 0 R (section.9.3) 142 0 R (section.9.4) 146 0 R (section.9.5) 150 0 R (subsection.2.1.1) 18 0 R (subsection.2.1.2) 22 0 R (subsection.2.1.3) 26 0 R (subsection.2.1.4) 30 0 R (subsection.2.1.5) 34 0 R (subsection.2.1.6) 38 0 R (subsection.3.1.1) 58 0 R (subsection.3.1.2) 62 0 R (subsection.3.1.3) 66 0 R (subsection.3.1.4) 70 0 R (subsection.3.1.5) 74 0 R (subsection.3.1.6) 78 0 R] /Limits [(Doc-Start) (subsection.3.1.6)] >> endobj 852 0 obj << /Kids [851 0 R] >> endobj 853 0 obj << /Dests 852 0 R >> endobj 854 0 obj << /Type /Catalog /Pages 849 0 R /Outlines 850 0 R /Names 853 0 R /PageMode /UseOutlines /URI<> /ViewerPreferences<<>> /OpenAction 197 0 R /PTEX.Fullbanner (This is pdfTeX, Version 3.14159-1.10a) >> endobj 855 0 obj << /Producer (pdfTeX-1.10a) /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.10a)/Keywords() /Creator (TeX) /CreationDate (D:20040714220900) >> endobj xref 0 856 0000000001 65535 f 0000000002 00000 f 0000000003 00000 f 0000000004 00000 f 0000000000 00000 f 0000000009 00000 n 0000027461 00000 n 0000472852 00000 n 0000000054 00000 n 0000000083 00000 n 0000029493 00000 n 0000472729 00000 n 0000000128 00000 n 0000000159 00000 n 0000029554 00000 n 0000472618 00000 n 0000000207 00000 n 0000000250 00000 n 0000033615 00000 n 0000472544 00000 n 0000000303 00000 n 0000000351 00000 n 0000033676 00000 n 0000472457 00000 n 0000000404 00000 n 0000000455 00000 n 0000038542 00000 n 0000472370 00000 n 0000000508 00000 n 0000000541 00000 n 0000038603 00000 n 0000472283 00000 n 0000000594 00000 n 0000000657 00000 n 0000038664 00000 n 0000472196 00000 n 0000000710 00000 n 0000000732 00000 n 0000038725 00000 n 0000472122 00000 n 0000000785 00000 n 0000000824 00000 n 0000048191 00000 n 0000472035 00000 n 0000000872 00000 n 0000000911 00000 n 0000050280 00000 n 0000471961 00000 n 0000000959 00000 n 0000001010 00000 n 0000053037 00000 n 0000471836 00000 n 0000001056 00000 n 0000001087 00000 n 0000053098 00000 n 0000471738 00000 n 0000001135 00000 n 0000001178 00000 n 0000056615 00000 n 0000471664 00000 n 0000001231 00000 n 0000001264 00000 n 0000056676 00000 n 0000471577 00000 n 0000001317 00000 n 0000001350 00000 n 0000059064 00000 n 0000471490 00000 n 0000001403 00000 n 0000001437 00000 n 0000063537 00000 n 0000471403 00000 n 0000001490 00000 n 0000001520 00000 n 0000063598 00000 n 0000471316 00000 n 0000001573 00000 n 0000001602 00000 n 0000067627 00000 n 0000471242 00000 n 0000001655 00000 n 0000001699 00000 n 0000071321 00000 n 0000471154 00000 n 0000001745 00000 n 0000001775 00000 n 0000076919 00000 n 0000471029 00000 n 0000001821 00000 n 0000001868 00000 n 0000076980 00000 n 0000470955 00000 n 0000001916 00000 n 0000001957 00000 n 0000086579 00000 n 0000470881 00000 n 0000002005 00000 n 0000002052 00000 n 0000090859 00000 n 0000470752 00000 n 0000002098 00000 n 0000002135 00000 n 0000090920 00000 n 0000470674 00000 n 0000002184 00000 n 0000002246 00000 n 0000102570 00000 n 0000470582 00000 n 0000002295 00000 n 0000002333 00000 n 0000255330 00000 n 0000470490 00000 n 0000002382 00000 n 0000002433 00000 n 0000261331 00000 n 0000470398 00000 n 0000002482 00000 n 0000002529 00000 n 0000261393 00000 n 0000470320 00000 n 0000002578 00000 n 0000002641 00000 n 0000263412 00000 n 0000470228 00000 n 0000002688 00000 n 0000002725 00000 n 0000284489 00000 n 0000470135 00000 n 0000002772 00000 n 0000002806 00000 n 0000290619 00000 n 0000470003 00000 n 0000002853 00000 n 0000002897 00000 n 0000290681 00000 n 0000469924 00000 n 0000002946 00000 n 0000002997 00000 n 0000290743 00000 n 0000469831 00000 n 0000003046 00000 n 0000003099 00000 n 0000294840 00000 n 0000469738 00000 n 0000003148 00000 n 0000003219 00000 n 0000294901 00000 n 0000469645 00000 n 0000003268 00000 n 0000003318 00000 n 0000296348 00000 n 0000469566 00000 n 0000003367 00000 n 0000003397 00000 n 0000298567 00000 n 0000469473 00000 n 0000003445 00000 n 0000003490 00000 n 0000302426 00000 n 0000469380 00000 n 0000003538 00000 n 0000003580 00000 n 0000305870 00000 n 0000469248 00000 n 0000003628 00000 n 0000003662 00000 n 0000305932 00000 n 0000469169 00000 n 0000003712 00000 n 0000003758 00000 n 0000305994 00000 n 0000469076 00000 n 0000003808 00000 n 0000003847 00000 n 0000308546 00000 n 0000468983 00000 n 0000003897 00000 n 0000003944 00000 n 0000308608 00000 n 0000468904 00000 n 0000003994 00000 n 0000004042 00000 n 0000311706 00000 n 0000468811 00000 n 0000004090 00000 n 0000004152 00000 n 0000317857 00000 n 0000468718 00000 n 0000004200 00000 n 0000004247 00000 n 0000329359 00000 n 0000468625 00000 n 0000004295 00000 n 0000004325 00000 n 0000332877 00000 n 0000468546 00000 n 0000004373 00000 n 0000004408 00000 n 0000006084 00000 n 0000006272 00000 n 0000006636 00000 n 0000008534 00000 n 0000004460 00000 n 0000008410 00000 n 0000008472 00000 n 0000466375 00000 n 0000453991 00000 n 0000466213 00000 n 0000452996 00000 n 0000435381 00000 n 0000452836 00000 n 0000434711 00000 n 0000424711 00000 n 0000434551 00000 n 0000423893 00000 n 0000409256 00000 n 0000423731 00000 n 0000006999 00000 n 0000007175 00000 n 0000408421 00000 n 0000394161 00000 n 0000408259 00000 n 0000007347 00000 n 0000007527 00000 n 0000007702 00000 n 0000007878 00000 n 0000392473 00000 n 0000379352 00000 n 0000392311 00000 n 0000008050 00000 n 0000008233 00000 n 0000379124 00000 n 0000377709 00000 n 0000378964 00000 n 0000467159 00000 n 0000006542 00000 n 0000006905 00000 n 0000013127 00000 n 0000011349 00000 n 0000008740 00000 n 0000013065 00000 n 0000377198 00000 n 0000375007 00000 n 0000377037 00000 n 0000011545 00000 n 0000011719 00000 n 0000011913 00000 n 0000012108 00000 n 0000012288 00000 n 0000012444 00000 n 0000012600 00000 n 0000012756 00000 n 0000012913 00000 n 0000325158 00000 n 0000320963 00000 n 0000014799 00000 n 0000014130 00000 n 0000013250 00000 n 0000014737 00000 n 0000014278 00000 n 0000014432 00000 n 0000014584 00000 n 0000021252 00000 n 0000016278 00000 n 0000014883 00000 n 0000021128 00000 n 0000021190 00000 n 0000016634 00000 n 0000016786 00000 n 0000016938 00000 n 0000017092 00000 n 0000017250 00000 n 0000017408 00000 n 0000017566 00000 n 0000017723 00000 n 0000017881 00000 n 0000018039 00000 n 0000018192 00000 n 0000018346 00000 n 0000018498 00000 n 0000018652 00000 n 0000018809 00000 n 0000018967 00000 n 0000019123 00000 n 0000019281 00000 n 0000019439 00000 n 0000019597 00000 n 0000019749 00000 n 0000019901 00000 n 0000020054 00000 n 0000020208 00000 n 0000020359 00000 n 0000020513 00000 n 0000020666 00000 n 0000020820 00000 n 0000020974 00000 n 0000025648 00000 n 0000022398 00000 n 0000021349 00000 n 0000025586 00000 n 0000022674 00000 n 0000022825 00000 n 0000022977 00000 n 0000023129 00000 n 0000023283 00000 n 0000023437 00000 n 0000023591 00000 n 0000023745 00000 n 0000023899 00000 n 0000024052 00000 n 0000024205 00000 n 0000024358 00000 n 0000024511 00000 n 0000024666 00000 n 0000024820 00000 n 0000024974 00000 n 0000025127 00000 n 0000025280 00000 n 0000025433 00000 n 0000027521 00000 n 0000026863 00000 n 0000025732 00000 n 0000027399 00000 n 0000027003 00000 n 0000027201 00000 n 0000029615 00000 n 0000029319 00000 n 0000027644 00000 n 0000029431 00000 n 0000467276 00000 n 0000033737 00000 n 0000032590 00000 n 0000029712 00000 n 0000033553 00000 n 0000032754 00000 n 0000032913 00000 n 0000033079 00000 n 0000033245 00000 n 0000372923 00000 n 0000368364 00000 n 0000372760 00000 n 0000033399 00000 n 0000038786 00000 n 0000036687 00000 n 0000033847 00000 n 0000038480 00000 n 0000036891 00000 n 0000037073 00000 n 0000037227 00000 n 0000037381 00000 n 0000037534 00000 n 0000037701 00000 n 0000037868 00000 n 0000038018 00000 n 0000038168 00000 n 0000038326 00000 n 0000043143 00000 n 0000041778 00000 n 0000038909 00000 n 0000043081 00000 n 0000041950 00000 n 0000042140 00000 n 0000042340 00000 n 0000042558 00000 n 0000042776 00000 n 0000042929 00000 n 0000366782 00000 n 0000360071 00000 n 0000366620 00000 n 0000048252 00000 n 0000046297 00000 n 0000043279 00000 n 0000048129 00000 n 0000046493 00000 n 0000046659 00000 n 0000046856 00000 n 0000047053 00000 n 0000047221 00000 n 0000047389 00000 n 0000047571 00000 n 0000047771 00000 n 0000047971 00000 n 0000050341 00000 n 0000049293 00000 n 0000048388 00000 n 0000050218 00000 n 0000049449 00000 n 0000049636 00000 n 0000049837 00000 n 0000050029 00000 n 0000053159 00000 n 0000052863 00000 n 0000050451 00000 n 0000052975 00000 n 0000467393 00000 n 0000056737 00000 n 0000056441 00000 n 0000053282 00000 n 0000056553 00000 n 0000059125 00000 n 0000058890 00000 n 0000056860 00000 n 0000059002 00000 n 0000063658 00000 n 0000062600 00000 n 0000059261 00000 n 0000063475 00000 n 0000062756 00000 n 0000062955 00000 n 0000063153 00000 n 0000063315 00000 n 0000325096 00000 n 0000067688 00000 n 0000065576 00000 n 0000063768 00000 n 0000065788 00000 n 0000067565 00000 n 0000065950 00000 n 0000066112 00000 n 0000066274 00000 n 0000066433 00000 n 0000066592 00000 n 0000066751 00000 n 0000066911 00000 n 0000067071 00000 n 0000067231 00000 n 0000067391 00000 n 0000324600 00000 n 0000320901 00000 n 0000327187 00000 n 0000071382 00000 n 0000070521 00000 n 0000067798 00000 n 0000071259 00000 n 0000070669 00000 n 0000070868 00000 n 0000071064 00000 n 0000072974 00000 n 0000072018 00000 n 0000071479 00000 n 0000072174 00000 n 0000072912 00000 n 0000072371 00000 n 0000072568 00000 n 0000072740 00000 n 0000467510 00000 n 0000077041 00000 n 0000075406 00000 n 0000073058 00000 n 0000076857 00000 n 0000359579 00000 n 0000355014 00000 n 0000359418 00000 n 0000353306 00000 n 0000350427 00000 n 0000353146 00000 n 0000075594 00000 n 0000075751 00000 n 0000075908 00000 n 0000076065 00000 n 0000076221 00000 n 0000076381 00000 n 0000076541 00000 n 0000076699 00000 n 0000350126 00000 n 0000347321 00000 n 0000349967 00000 n 0000324662 00000 n 0000327311 00000 n 0000324910 00000 n 0000327249 00000 n 0000084296 00000 n 0000080589 00000 n 0000077201 00000 n 0000084234 00000 n 0000080881 00000 n 0000081041 00000 n 0000081201 00000 n 0000081364 00000 n 0000081527 00000 n 0000081686 00000 n 0000081845 00000 n 0000082002 00000 n 0000082159 00000 n 0000082315 00000 n 0000082471 00000 n 0000082627 00000 n 0000082784 00000 n 0000082943 00000 n 0000083102 00000 n 0000083262 00000 n 0000083422 00000 n 0000083584 00000 n 0000083746 00000 n 0000083908 00000 n 0000084071 00000 n 0000321087 00000 n 0000320715 00000 n 0000320593 00000 n 0000324415 00000 n 0000320531 00000 n 0000327373 00000 n 0000324848 00000 n 0000321149 00000 n 0000325034 00000 n 0000320654 00000 n 0000086640 00000 n 0000086069 00000 n 0000084431 00000 n 0000086517 00000 n 0000086209 00000 n 0000086363 00000 n 0000321025 00000 n 0000093645 00000 n 0000090982 00000 n 0000089341 00000 n 0000086788 00000 n 0000090797 00000 n 0000089529 00000 n 0000089689 00000 n 0000089849 00000 n 0000090002 00000 n 0000090162 00000 n 0000090322 00000 n 0000090481 00000 n 0000090641 00000 n 0000327064 00000 n 0000102446 00000 n 0000327002 00000 n 0000097396 00000 n 0000105548 00000 n 0000223306 00000 n 0000102632 00000 n 0000093369 00000 n 0000091155 00000 n 0000102384 00000 n 0000102508 00000 n 0000099393 00000 n 0000099553 00000 n 0000346118 00000 n 0000343846 00000 n 0000345956 00000 n 0000099713 00000 n 0000099867 00000 n 0000100027 00000 n 0000100186 00000 n 0000100346 00000 n 0000100506 00000 n 0000100665 00000 n 0000100824 00000 n 0000100983 00000 n 0000101135 00000 n 0000101287 00000 n 0000101439 00000 n 0000101599 00000 n 0000101759 00000 n 0000101912 00000 n 0000102072 00000 n 0000102232 00000 n 0000094979 00000 n 0000095035 00000 n 0000095115 00000 n 0000096156 00000 n 0000096177 00000 n 0000096435 00000 n 0000097375 00000 n 0000099116 00000 n 0000099205 00000 n 0000099289 00000 n 0000099371 00000 n 0000324786 00000 n 0000324972 00000 n 0000327125 00000 n 0000255269 00000 n 0000255390 00000 n 0000105336 00000 n 0000102846 00000 n 0000255207 00000 n 0000253483 00000 n 0000253635 00000 n 0000253794 00000 n 0000253954 00000 n 0000254112 00000 n 0000254270 00000 n 0000254422 00000 n 0000254574 00000 n 0000254726 00000 n 0000254887 00000 n 0000255049 00000 n 0000467627 00000 n 0000223111 00000 n 0000223200 00000 n 0000223282 00000 n 0000253289 00000 n 0000253378 00000 n 0000253460 00000 n 0000261455 00000 n 0000258187 00000 n 0000255554 00000 n 0000261269 00000 n 0000258455 00000 n 0000258614 00000 n 0000258773 00000 n 0000258933 00000 n 0000259092 00000 n 0000259251 00000 n 0000259411 00000 n 0000259570 00000 n 0000259730 00000 n 0000259890 00000 n 0000260049 00000 n 0000260208 00000 n 0000260359 00000 n 0000260510 00000 n 0000260661 00000 n 0000260813 00000 n 0000260965 00000 n 0000261117 00000 n 0000263474 00000 n 0000263238 00000 n 0000261603 00000 n 0000263350 00000 n 0000266705 00000 n 0000266531 00000 n 0000263571 00000 n 0000266643 00000 n 0000273759 00000 n 0000270241 00000 n 0000266815 00000 n 0000273697 00000 n 0000270525 00000 n 0000270683 00000 n 0000270841 00000 n 0000270998 00000 n 0000271158 00000 n 0000271319 00000 n 0000271480 00000 n 0000271641 00000 n 0000271797 00000 n 0000271953 00000 n 0000272116 00000 n 0000272279 00000 n 0000272437 00000 n 0000272595 00000 n 0000272754 00000 n 0000272911 00000 n 0000273068 00000 n 0000273228 00000 n 0000273387 00000 n 0000273545 00000 n 0000324476 00000 n 0000324538 00000 n 0000277734 00000 n 0000276894 00000 n 0000273882 00000 n 0000277672 00000 n 0000277050 00000 n 0000277201 00000 n 0000277353 00000 n 0000277513 00000 n 0000279911 00000 n 0000279566 00000 n 0000277831 00000 n 0000279849 00000 n 0000279698 00000 n 0000467744 00000 n 0000284551 00000 n 0000282291 00000 n 0000280021 00000 n 0000284427 00000 n 0000282511 00000 n 0000282670 00000 n 0000282830 00000 n 0000282992 00000 n 0000283154 00000 n 0000283316 00000 n 0000283475 00000 n 0000283633 00000 n 0000283791 00000 n 0000283950 00000 n 0000284109 00000 n 0000284268 00000 n 0000287616 00000 n 0000286746 00000 n 0000284661 00000 n 0000287554 00000 n 0000286902 00000 n 0000287065 00000 n 0000287228 00000 n 0000287391 00000 n 0000320777 00000 n 0000320839 00000 n 0000290805 00000 n 0000290097 00000 n 0000287713 00000 n 0000290557 00000 n 0000290237 00000 n 0000290397 00000 n 0000294963 00000 n 0000293653 00000 n 0000290928 00000 n 0000294778 00000 n 0000293825 00000 n 0000293983 00000 n 0000294141 00000 n 0000294299 00000 n 0000294456 00000 n 0000294617 00000 n 0000296410 00000 n 0000296174 00000 n 0000295086 00000 n 0000296286 00000 n 0000298629 00000 n 0000298393 00000 n 0000296520 00000 n 0000298505 00000 n 0000467861 00000 n 0000302488 00000 n 0000300906 00000 n 0000298739 00000 n 0000302364 00000 n 0000301094 00000 n 0000301251 00000 n 0000301408 00000 n 0000301566 00000 n 0000301724 00000 n 0000301884 00000 n 0000302044 00000 n 0000302204 00000 n 0000324353 00000 n 0000306056 00000 n 0000304107 00000 n 0000302585 00000 n 0000305808 00000 n 0000304295 00000 n 0000304496 00000 n 0000304703 00000 n 0000304901 00000 n 0000305099 00000 n 0000305271 00000 n 0000305444 00000 n 0000305611 00000 n 0000308670 00000 n 0000307411 00000 n 0000306166 00000 n 0000308484 00000 n 0000307575 00000 n 0000307784 00000 n 0000307986 00000 n 0000308172 00000 n 0000308325 00000 n 0000311768 00000 n 0000310539 00000 n 0000308780 00000 n 0000311644 00000 n 0000310695 00000 n 0000310890 00000 n 0000311142 00000 n 0000311393 00000 n 0000313915 00000 n 0000313064 00000 n 0000311865 00000 n 0000313853 00000 n 0000313212 00000 n 0000313463 00000 n 0000313658 00000 n 0000317919 00000 n 0000316259 00000 n 0000313999 00000 n 0000317795 00000 n 0000316447 00000 n 0000316627 00000 n 0000316807 00000 n 0000316965 00000 n 0000317125 00000 n 0000317293 00000 n 0000317462 00000 n 0000317631 00000 n 0000467978 00000 n 0000324724 00000 n 0000321211 00000 n 0000320295 00000 n 0000318016 00000 n 0000320407 00000 n 0000320469 00000 n 0000325220 00000 n 0000324179 00000 n 0000321321 00000 n 0000324291 00000 n 0000327435 00000 n 0000326828 00000 n 0000325317 00000 n 0000326940 00000 n 0000329421 00000 n 0000329011 00000 n 0000327532 00000 n 0000329297 00000 n 0000329143 00000 n 0000332939 00000 n 0000332188 00000 n 0000329531 00000 n 0000332815 00000 n 0000332336 00000 n 0000332496 00000 n 0000332655 00000 n 0000337336 00000 n 0000336489 00000 n 0000333074 00000 n 0000337274 00000 n 0000336645 00000 n 0000336803 00000 n 0000336961 00000 n 0000337118 00000 n 0000468095 00000 n 0000341519 00000 n 0000340662 00000 n 0000337459 00000 n 0000341457 00000 n 0000340818 00000 n 0000340978 00000 n 0000341138 00000 n 0000341297 00000 n 0000342801 00000 n 0000342627 00000 n 0000341629 00000 n 0000342739 00000 n 0000342898 00000 n 0000346321 00000 n 0000346375 00000 n 0000350365 00000 n 0000353789 00000 n 0000353592 00000 n 0000354019 00000 n 0000359812 00000 n 0000367071 00000 n 0000367355 00000 n 0000373154 00000 n 0000373350 00000 n 0000377460 00000 n 0000379328 00000 n 0000392797 00000 n 0000393143 00000 n 0000408908 00000 n 0000424323 00000 n 0000435043 00000 n 0000453538 00000 n 0000466779 00000 n 0000468188 00000 n 0000468306 00000 n 0000468400 00000 n 0000468470 00000 n 0000472924 00000 n 0000475981 00000 n 0000476020 00000 n 0000476058 00000 n 0000476285 00000 n trailer << /Size 856 /Root 854 0 R /Info 855 0 R >> startxref 476480 %%EOF tree-puzzle-5.2/src/0000777000076400001440000000000010075312110010170 5tree-puzzle-5.2/src/pstep.c0000644000076400001440000006723210073365074011434 /* * pstep.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include #include #include"puzzle.h" #if PARALLEL # include "ppuzzle.h" #endif /* #include"util.h" */ /* #include"pstep.h" */ int XXX=0; /* fprintf(stderr, "XXX: %d (%s:%d)\n", XXX++, __FILE__, __LINE__); */ /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /******************/ /* de-trueID-ed (HAS) */ /* writes OTU sitting on edge ed (usage: debugging) */ void writeOTU(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column) /* current screen depth */ { /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { *column += fputid(outfp, edge[ed].taxon); } else { /* we are NOT on a leaf */ fprintf(outfp, "("); (*column)++; /* de-trueID-ed (HAS) */ writeOTU(outfp, edge[ed].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, column); fprintf(outfp, ","); (*column)++; (*column)++; if (*column > 55) { *column = 2; fprintf(outfp, "\n "); } /* de-trueID-ed (HAS) */ writeOTU(outfp, edge[ed].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, column); fprintf(outfp, ")"); (*column)++; } } /* writeOTU */ /******************/ /* de-trueID-ed (HAS) */ /* write tree (usage: debugging) */ void writetree(FILE *outfp, /* output file */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int rootleaf) /* root leaf of tree */ { int column; column = 1; fprintf(outfp, "("); column += fputid(outfp, rootleaf) + 3; fprintf(outfp, ","); /* de-trueID-ed (HAS) */ writeOTU(outfp, edge[edgeofleaf[rootleaf]].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, &column); column++; column++; fprintf(outfp, ","); /* de-trueID-ed (HAS) */ writeOTU(outfp, edge[edgeofleaf[rootleaf]].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, &column); fprintf(outfp, ");\n"); } /* writetree */ /******************/ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedges, int *out_howmany, int *out_minedge, /* minimum edge set */ uli *out_mininfo) /* minumum penalty */ { int i; int howmany; int minedge = 0; /* minimum edge (old search) */ uli minpenalty = 0; /* minumum penalty */ howmany = 0; for (i = 0; i < nextedge; i++) { if (howmany == 0) { /* first edge: init */ minedges[howmany++] = i; minpenalty = edge[i].edgeinfo; } else { /* -> all other edges */ if (minpenalty == edge[i].edgeinfo) { /* another min edge */ minedges[howmany++] = i; } else { /* -> not same minimum */ if (minpenalty > edge[i].edgeinfo) { /* new minimum penalty */ howmany = 1; minedges[0] = i; minpenalty = edge[i].edgeinfo; } /* if new minimum */ } /* same minimum */ } /* if all other edges */ } #if 0 if (howmany > 1) *out_minedge = minedges[randominteger(howmany)]; else *out_minedge = minedges[0]; #endif #if 0 #endif if (howmany > 1) { /* draw random edge */ int k, randomnum; randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].edgeinfo != minpenalty); minedge = i; } } else { minedge = minedges[0]; } *out_minedge=minedge; #if 0 #endif *out_mininfo=minpenalty; *out_howmany=howmany; } /* minimumedgeinfo */ /******************/ /* clear all edgeinfos */ void resetedgeinfo(ONEEDGE *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; for (i = 0; i < nextedge; i++) edge[i].edgeinfo = 0; } /* resetedgeinfo */ /******************/ /* initialize tree with the following starting configuration * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * | * | 0 * | * /^\ * * * * / \ * 1 / \ 2 * / \ * /| |\ * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * */ /*******************************************************/ /* routines specific for the original O(n^5) algorithm */ /*******************************************************/ #ifdef PSTEP_ORIG /* de-trueID-ed done (HAS) */ void inittree_orig(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootleaf, /* out: rooting leaf (=trueID[0]) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID) { int i, j; ONEEDGE *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for vetmpctor with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); for (j = 0; j < Maxspc; j++) tmpedgeofleaf[j]=-1; *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the edge map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (tmpedge[i].edgemap == NULL) maerror("edgemap in inittree"); for (j = 0; j < Maxspc; j++) (tmpedge)[i].edgemap[j]=-1; /* number/init all edges */ tmpedge[i].numedge = i; tmpedge[i].taxon = -1; } /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* edge maps */ (tmpedge[0].edgemap)[0] = NOWHERE; /* you are on the right edge */ (tmpedge[0].edgemap)[1] = DOWNLEFT; /* go down left for 2nd taxon */ (tmpedge[0].edgemap)[2] = DOWNRIGHT; /* go down right for 3rd taxon */ (tmpedge[1].edgemap)[0] = UP; /* go up for 1st taxon */ (tmpedge[1].edgemap)[1] = NOWHERE; /* you are on the right edge */ (tmpedge[1].edgemap)[2] = UPDOWNRIGHT; /* go up/down right for 2nd taxon */ (tmpedge[2].edgemap)[0] = UP; /* go up for 1st taxon */ (tmpedge[2].edgemap)[1] = UPDOWNLEFT; /* go up/down left for 2nd taxon */ (tmpedge[2].edgemap)[2] = NOWHERE; /* you are on the right edge */ /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* taxon IDs of leaves */ tmpedge[0].taxon = trueID[0]; tmpedge[1].taxon = trueID[1]; tmpedge[2].taxon = trueID[2]; /* edges of leaves */ tmpedgeofleaf[trueID[0]] = 0; tmpedgeofleaf[trueID[1]] = 1; tmpedgeofleaf[trueID[2]] = 2; /* uppest edge =: root edge*/ *rootleaf = trueID[0]; } /* inittree_orig */ /******************/ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootleaf, /* uppest leaf */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut) /* permutation vector */ { int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == root edge */ if (edgeofleaf[rootleaf] == dockedge) edgeofleaf[rootleaf] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; /* if not root edge: connect ancestor to internal edge (nextedge) */ if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding new external edge (nextedge+1) to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edge[nextedge+1].taxon = permut[nextleaf]; edgeofleaf[permut[nextleaf]] = nextedge+1; /* update edge direction maps */ updateedgemap_orig(dockedge, edge, nextedge); nextleaf++; nextedge = nextedge + 2; *in_nextedge=nextedge; *in_nextleaf=nextleaf; } /* addnextleaf */ /******************/ /* update edgemap */ void updateedgemap_orig(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; /* the two new edges get info about the old edges: */ /* - nextedge (internal edge) */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case DOWNRIGHT: (edge[nextedge].edgemap)[i] = DOWNLEFT; break; /* null changes to down left */ case NOWHERE: (edge[nextedge].edgemap)[i] = DOWNLEFT; break; /* shouldn't happen */ case -1: fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G2 TO DEVELOPERS! Unknown direction (leaf %d: %d).\n\n\n", i, (edge[dockedge].edgemap)[i]); # if PARALLEL PP_Finalize(); # endif exit(1); break; default: (edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } /* switch */ } /* for i */ /* - nextedge+1 (external edge) */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case UPDOWNLEFT: (edge[nextedge+1].edgemap)[i] = UP; break; /* up/down right changes to up */ case UPDOWNRIGHT: (edge[nextedge+1].edgemap)[i] = UP; break; /* down left changes to up/down left */ case DOWNLEFT: (edge[nextedge+1].edgemap)[i] = UPDOWNLEFT; break; /* down right changes to up/down left */ case DOWNRIGHT: (edge[nextedge+1].edgemap)[i] = UPDOWNLEFT; break; /* null changes to up/down left */ case NOWHERE: (edge[nextedge+1].edgemap)[i] = UPDOWNLEFT; break; /* up stays up */ case UP: (edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; /* shouldn't happen */ default: fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G1 TO DEVELOPERS! Unknown direction (leaf %d: %d).\n\n\n", i, (edge[dockedge].edgemap)[i]); # if PARALLEL PP_Finalize(); # endif exit(1); break; } /* switch */ } /* for i */ /* old internal edge (dockedge) */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case UPDOWNRIGHT: (edge[dockedge].edgemap)[i] = UP; break; /* up/down left changes to up */ case UPDOWNLEFT: (edge[dockedge].edgemap)[i] = UP; break; /* shouldn't happen */ case -1: fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G3 TO DEVELOPERS! Unknown direction (leaf %d: %d).\n\n\n", i, (edge[dockedge].edgemap)[i]); # if PARALLEL PP_Finalize(); # endif exit(1); break; default: break; } /* switch */ } /* for i */ /* all edgemaps are updated for the two new edges: */ /* new internal edge (nextedge) */ (edge[nextedge].edgemap)[nextedge] = NOWHERE; /* to itself */ (edge[nextedge].edgemap)[nextedge+1] = DOWNRIGHT; /* to new ext. edge: down right */ /* new external edge (nextedge+1) */ (edge[nextedge+1].edgemap)[nextedge] = UP; /* to new int. edge: up */ (edge[nextedge+1].edgemap)[nextedge+1] = NOWHERE; /* to itself */ /* from all other edges to the new edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra: from dockedge to the new edges */ (edge[dockedge].edgemap)[nextedge] = UP; /* up */ (edge[dockedge].edgemap)[nextedge+1] = UPDOWNRIGHT; /* up/down right */ } /* updateedgemap_orig */ /******************/ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].edgemap); free(edge); free(edgeofleaf); } /* freetree */ /******************/ /* increment all edgeinfo between leaf A and B */ /* de-trueID-ed (HAS) nothing done */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE *edge, /* edge array */ int *edgeofleaf) /* ext. edge idx array */ { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; (edge[curredge].edgeinfo)++; while (curredge != finaledge) { /* nextstep = (edge[curredge].edgemap)[finaledge]; (HAS) ???*/ nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case UP: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case UPDOWNLEFT: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case UPDOWNRIGHT: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case DOWNLEFT: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case DOWNRIGHT: curredge = (edge[curredge].downright)->numedge; break; /* shouldn't happen */ default: fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G4 TO DEVELOPERS! Unknown direction (leaf %d: %d).\n\n\n", finaledge, nextstep); # if PARALLEL PP_Finalize(); # endif exit(1); break; } /* switch */ (edge[curredge].edgeinfo)++; } /* while on path */ } /* incrementedgeinfo_orig */ /******************/ /* trueID-ed (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_orig( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut) /* in: species permutation (trueID) */ { /* local variables: */ int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int chooseX, chooseY; /* end leaves of penalty path */ ONEEDGE *tmpedge; /* new array of edges */ int *tmpedgeofleaf; /* array of extern edge ptrs */ int tmprootleaf; /* root edge */ int *minedges; int howmany; minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); if (minedges == NULL) maerror("minimal edge set in onepstep_orig"); /* allocate and initialize new tree topology */ inittree_orig(&tmpedge, &tmpedgeofleaf, &tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); /* adding all other leafs */ for (i = 3; i < Maxspc; i++) { /* clear all edgeinfos */ resetedgeinfo(tmpedge, nextedge); /* * core of quartet puzzling algorithm */ for (a = 0; a < nextleaf - 2; a++) for (b = a + 1; b < nextleaf - 1; b++) for (c = b + 1; c < nextleaf; c++) { /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* de-trueID-ed (HAS) */ checkquartet(permut[a], permut[b], permut[c], permut[i], &chooseX, &chooseY); incrementedgeinfo_orig(chooseX, chooseY, tmpedge, tmpedgeofleaf); } /* for all quartets q=(a,b,c,i) */ /* find out which edge has lowest edgeinfo */ minimumedgeinfo(tmpedge, tmpedgeofleaf, nextedge, nextleaf, minedges, &howmany, &minedge, &mininfo); /* add the next leaf on minedge */ addnextleaf_orig(minedge, tmpedge, tmpedgeofleaf, tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); } /* adding all other leafs */ *edge = tmpedge; /* export tree topology */ *edgeofleaf = tmpedgeofleaf; /* export array of extern edge ptrs */ *rootleaf = tmprootleaf; /* export root edge */ free(minedges); } /* onepstep_orig */ #endif /* PSTEP_ORIG */ /**********************************************************/ /* routines specific for the split-based O(n^4) algorithm */ /**********************************************************/ #ifdef PSTEP_SPLIT # include"split.c" #endif /* PSTEP_SPLIT */ /********************************************************/ /* routines specific for the recursive O(n^4) algorithm */ /********************************************************/ #ifdef PSTEP_RECUR # include"recur.c" #endif /* PSTEP_RECUR */ /*********************************************************/ /* routines specific for the MRCA-based O(n^4) algorithm */ /* (suggested by Vincent Berry) */ /*********************************************************/ #ifdef PSTEP_MRCA # include"mrca.c" #endif /* PSTEP_MRCA */ /************************************************************************/ /* global function of the puzzling step */ /************************************************************************/ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn) /* in: 'fixed' anchored RNG (debug)*/ { /* misc variables */ ivector trueIDtmp; /* species permutation (trueID) */ uli Currtrial; /* step counter */ # ifdef PSTEP_BENCH time_t benchtime0, benchtime1; # endif /* PSTEP_BENCH */ /* PStep (intermediate) tree topol: */ ONEEDGE *tmpedgeset; /* array of edges */ int *tmpedgeofleaf; /* array of extern edge pointers */ int psteprootleaf; /* root edge */ /* for unique sorting of tree topologies */ int *ctree; /* sort tree */ int startnode; /* root in sort tree */ char *trstr; /* phylip tree string */ treelistitemtype *treeitem; /* list entry of tree */ # if PARALLEL cmatrix *bp; /* temporary buffer for splits in slaves */ uli n; /* step count for init/free split buffer */ # endif /* PARALLEL */ # if PARALLEL /* add times to arry */ addtimes(GENERAL, &tarr); /* alloc temporary split memory */ bp = (cmatrix *) calloc((size_t) Numtrial, sizeof(void *)); for(n=0; n phylip tree string */ trstr=sprintfctree(ctree, psteptreestrlen); /* add sorted tree to unique tree list */ treeitem = addtree2list(&trstr, 1, &psteptreelist, &psteptreenum, &psteptreesum); # if ! PARALLEL /* output unique tree to trace list, if option set */ /* not done on slave processes */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) { /* print: order no/# topol per this id/tree id/sum of unique topologies/sum of trees so far */ fprintf(qptlist, "%ld.\t1\t%d\t%d\t%d\t%d\n", Currtrial + 1, (*treeitem).count, (*treeitem).id, psteptreenum, psteptreesum); } # endif /* ! PARALLEL */ # ifdef VERBOSE1 printf("%s\n", trstr); printfsortedpstrees(psteptreelist); # endif /* free sorting tree structure */ freectree(&ctree); /* free tree before building the next tree */ # ifdef PSTEP_ORIG freetree_orig(tmpedgeset, tmpedgeofleaf, Maxspc); # endif /* PSTEP_ORIG */ # ifdef PSTEP_SPLIT freetree_split(tmpedgeset, tmpedgeofleaf, Maxspc); # endif /* PSTEP_SPLIT */ # ifdef PSTEP_RECUR freetree_recur(tmpedgeset, tmpedgeofleaf, Maxspc); # endif /* PSTEP_RECUR */ # ifdef PSTEP_MRCA freetree_mrca(tmpedgeset, tmpedgeofleaf, Maxspc); # endif /* PSTEP_MRCA */ # if ! PARALLEL checktime(&time0, &time1, &time2, Currtrial, Numtrial, &mflag); # endif /* ! PARALLEL */ addtimes(PUZZLING, &tarr); } /* for Numtrials */ free_ivector(trueIDtmp); # ifdef PSTEP_BENCH time(&benchtime1); fprintf(stderr,"The %s needed: %.0fs = %fmin for %ld puzzlings on %d taxa\n", PSTEPALGNAME, (double)(benchtime1-benchtime0), (double)(benchtime1-benchtime0)/60.0, Numtrial, Maxspc); # endif /* PSTEP_BENCH */ # if PARALLEL /* in slaves: send results: splits, trees */ PP_SendSplitsBlock(Maxspc, Numtrial, bp, psteptreenum, psteptreelist); /* free temporary split memory */ for (Currtrial = 0; Currtrial < Numtrial; Currtrial++) { free_cmatrix(bp[Currtrial]); } free(bp); /* sent! Thus, in slave process not needed any more */ freetreelist(&psteptreelist, &psteptreenum, &psteptreesum); # endif /* PARALLEL */ } /* allpstep */ tree-puzzle-5.2/src/pstep.h0000644000076400001440000003541410073365115011432 /* * pstep.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef PSTEP_H #define PSTEP_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ /******************************************************************/ /* switch puzzling step algorithm */ /******************************************************************/ #ifndef PSTEP_RECUR # define PSTEP_RECUR #endif /* PSTEP_RECUR */ #ifdef PSTEP_SPLIT # define PSTEPALGNAME "split-based puzzling step algorithm" # ifdef PSTEP_ORIG # undef PSTEP_ORIG # endif /* PSTEP_ORIG */ # ifdef PSTEP_MRCA # undef PSTEP_MRCA # endif /* PSTEP_MRCA */ # ifdef PSTEP_RECUR # undef PSTEP_RECUR # endif /* PSTEP_RECUR */ #endif /* PSTEP_SPLIT */ #ifdef PSTEP_MRCA # define PSTEPALGNAME "mrca-based puzzling step algorithm" # ifdef PSTEP_ORIG # undef PSTEP_ORIG # endif /* PSTEP_ORIG */ # ifdef PSTEP_SPLIT # undef PSTEP_SPLIT # endif /* PSTEP_SPLIT */ # ifdef PSTEP_RECUR # undef PSTEP_RECUR # endif /* PSTEP_RECUR */ #endif /* PSTEP_MRCA */ #ifdef PSTEP_ORIG # define PSTEPALGNAME "original puzzling step algorithm" # ifdef PSTEP_MRCA # undef PSTEP_MRCA # endif /* PSTEP_MRCA */ # ifdef PSTEP_SPLIT # undef PSTEP_SPLIT # endif /* PSTEP_SPLIT */ # ifdef PSTEP_RECUR # undef PSTEP_RECUR # endif /* PSTEP_RECUR */ #endif /* PSTEP_ORIG */ #ifdef PSTEP_RECUR # define PSTEPALGNAME "recursive puzzling step algorithm" # ifdef PSTEP_ORIG # undef PSTEP_ORIG # endif /* PSTEP_ORIG */ # ifdef PSTEP_MRCA # undef PSTEP_MRCA # endif /* PSTEP_MRCA */ # ifdef PSTEP_SPLIT # undef PSTEP_SPLIT # endif /* PSTEP_SPLIT */ #endif /* PSTEP_RECUR */ /******************************************************************/ #define NOWHERE 0 #define UP 1 #define UPDOWNLEFT 2 #define UPDOWNRIGHT 3 #define DOWNLEFT 4 #define DOWNRIGHT 5 #define STARTING 6 /******************************************************************/ /* tree structure */ typedef struct oneedge { /* pointer to other three edges */ struct oneedge *up; struct oneedge *downleft; struct oneedge *downright; int numedge; /* number of edge (index) */ int taxon; /* taxon number */ uli edgeinfo; /* value of this edge (penalty) */ # ifdef PSTEP_ORIG int *edgemap; /* pointer to the local edgemap array */ # endif /* PSTEP_ORIG */ # ifdef PSTEP_SPLIT uli penalty; /* penalty of this edge */ int *split; /* cluster array (up: 0..upsize-1; */ /* down: maxspc-1..maxspc-downsize */ int upsize; /* size of root-ward cluster */ int downsize; /* size of non-root-ward cluster */ # endif /* PSTEP_SPLIT */ # ifdef PSTEP_RECUR uli penalty; /* penalty of this edge */ int *cluster; /* leaf cluster of edge (0..clsize-1; */ int clsize; /* size of non-root-ward cluster */ uli submatrsum;/* sum of all neibor-matr cluster entries */ uli allsum; /* sum of all cluster ext. edge penalty */ # endif /* PSTEP_RECUR */ # ifdef PSTEP_MRCA uli penalty; /* penalty of this edge */ uli *penaltyprop; /* penalties to propagated to the leaves */ int *cluster; /* leaf cluster of edge (0..clsize-1; */ int clsize; /* size of non-root-ward cluster */ # endif /* PSTEP_MRCA */ } ONEEDGE; /*****************************************************************************/ /* A bit of documentation: (HAS) */ /*****************************************************************************/ /* Tree initialization: * -------------------- * * A puzzling step tree is initialized like this: * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * more detailed: * * A(=0) * [up =NULL] * [downleft =ptr(1)] * [downright=ptr(2)] * PSTEP_SPLIT: * [upcluster=0] * [downcluster=1,2] * [upsize=1] * [downsize=2] * PSTEP_RECUR, PSTEP_MRCA: * [cluster=t1,t2] * [clsize=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =ptr(0)] [up =ptr(0)] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * PSTEP_SPLIT: * [upcluster=t0,t2] [upcluster=t0,t1] * [downcluster=t1] [downcluster=t2] * [upsize=2] [upsize=2] * [downsize=1] [downsize=1] * PSTEP_RECUR, PSTEP_MRCA: * [cluster=t1] [cluster=t2] * [clsize=1] [clsize=1] * * PSTEP_MRCA: * MRCA [t0,*] = 0 * MRCA [t1,t2] = 0 * * nextedge = 3 * nextleaf = 3 * and set according edge maps (_orig, PSTEP_ORIG), * split lists (_split, PSTEP_SPLIT), * cluster lists (_recur, PSTEP_MRCA), or * MRCA matrix (_mrca, PSTEP_MRCA), * * * * Adding leaves to works like this: * -------------------------------------------- * * * | * | nextedge * | | * | dockedge insert /^\ * | ========> * * * /^\ / \ * dockedge / \ nextedge+1 * / \ * /| |\ permut[nextleaf] * */ /*****************************************************************************/ /* internal functions for representing and building puzzling step trees */ /*****************************************************************************/ /* writes OTU sitting on edge ed (usage: debugging) */ void writeOTU(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column); /* current screen depth */ /* write tree (usage: debugging) */ void writetree(FILE *outfp, /* output file */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int rootleaf); /* root leaf of tree */ /* clear all edgeinfos */ void resetedgeinfo(ONEEDGE *edge, /* edge array */ int nextedge); /* next free edge idx */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedges, int *out_howmany, int *out_minedge, /* minimum edge set */ uli *out_mininfo); /* minumum penalty */ /*******************************************************/ /* routines specific for the original O(n^5) algorithm */ /*******************************************************/ /* initialize tree with the following starting configuration (see above) */ void inittree_orig(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootedge, /* out: rooting edge (=0) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID); /* update edgemap */ void updateedgemap_orig(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int nextedge); /* next free edge idx */ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootedge, /* uppest edge */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut); /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ /*********/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_orig( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut); /* in: species permutation (trueID) */ /**********************************************************/ /* routines specific for the split-based O(n^4) algorithm */ /**********************************************************/ /* initialize tree with the following starting configuration (see above) */ void inittree_split(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootedge, /* out: rooting edge (=0) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID); #if 0 /* update edgemap */ void updateedgemap_split(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int nextedge); /* next free edge idx */ #endif /* add next leaf on the specified edge */ void addnextleaf_split(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootedge, /* uppest edge */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut); /* free memory (to be called after inittree) */ void freetree_split(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ #if 0 /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_split(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ #endif /*********/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_split( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut); /* in: species permutation (trueID) */ /*****************************************************************************/ /* global functions for representing and building puzzling step trees */ /*****************************************************************************/ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn); /* in: 'fixed' anchored RNG (debug)*/ #endif /* PSTEP_H */ tree-puzzle-5.2/src/ml.h0000644000076400001440000003603610073365127010713 /* * ml.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef _ML_ #define _ML_ /* values for mlmode */ #define ML_QUART 1 #define ML_TREE 2 #define NJ_TREE 3 #if 0 /* values for rhettype */ #define MLUNIFORMRATE 0 #define MLGAMMARATE 1 #define MLTWORATE 2 #define MLMIXEDRATE 3 #endif /* values for rhetmode */ #define UNIFORMRATE 0 #define GAMMARATE 1 #define TWORATE 2 #define MIXEDRATE 3 /* definitions */ #define MINTS 0.20 /* Ts/Tv parameter */ #define MAXTS 30.0 #define MINYR 0.10 /* Y/R Ts parameter */ #define MAXYR 6.00 #define MINFI 0.00 /* fraction invariable sites */ #define MAXFI 0.99 /* only for input */ #define MINGE 0.01 /* rate heterogeneity parameter */ #define MAXGE 0.99 #define MINCAT 4 /* discrete Gamma categories */ #define MAXCAT 16 #define RMHROOT 5.0 /* upper relative bound for height of root */ #define MAXARC 900.0 /* upper limit on branch length (PAM) = 6.0 */ #define MINARC 0.001 /* lower limit on branch length (PAM) = 0.00001 */ #ifdef USE_ADJUSTABLE_EPS /* error in branch length (PAM) = 0.000001 */ # define EPSILON_BRANCH_DEFAULT 0.0001 # define EPSILON_BRANCH epsilon_branch EXTERN double epsilon_branch; #else # define EPSILON_BRANCH 0.0001 #endif #ifdef USE_ADJUSTABLE_EPS /* error in node and root heights */ # define EPSILON_HEIGHTS_DEFAULT 0.0001 # define EPSILON_HEIGHTS epsilon_heights EXTERN double epsilon_heights; #else # define EPSILON_HEIGHTS 0.0001 #endif #ifdef USE_ADJUSTABLE_EPS # if (EXTERN != extern) double epsilon_branch = EPSILON_BRANCH_DEFAULT; double epsilon_heights = EPSILON_HEIGHTS_DEFAULT; # endif #endif #define MAXIT 100 /* maximum number of iterates of smoothing */ #define MINFDIFF 0.00002 /* lower limit on base frequency differences */ #define MINFREQ 0.0001 /* lower limit on base frequencies = 0.01% */ #define NUMQBRNCH 5 /* number of branches in a quartet */ #define NUMQIBRNCH 1 /* number of internal branches in a quartet */ #define NUMQSPC 4 /* number of sequences in a quartet */ /* 2D minimisation */ #ifdef USE_ADJUSTABLE_EPS /* epsilon substitution process estimation */ # define EPSILON_SUBSTPARAM_DEFAULT 0.01 # define EPSILON_SUBSTPARAM epsilon_substparam EXTERN double epsilon_substparam; #else # define EPSILON_SUBSTPARAM 0.01 #endif #ifdef USE_ADJUSTABLE_EPS /* epsilon rate heterogeneity estimation */ # define EPSILON_RATEPARAM_DEFAULT 0.01 # define EPSILON_RATEPARAM epsilon_rateparam EXTERN double epsilon_rateparam; #else # define EPSILON_RATEPARAM 0.01 #endif #ifdef USE_ADJUSTABLE_EPS # if (EXTERN != extern) double epsilon_substparam = EPSILON_SUBSTPARAM_DEFAULT; double epsilon_rateparam = EPSILON_RATEPARAM_DEFAULT; # endif #endif /* quartet series */ #define MINPERTAXUM 2 #define MAXPERTAXUM 6 #define TSDIFF 0.20 #define YRDIFF 0.10 /* type definitions */ typedef struct node { struct node *isop; /* pointers within node (nodes) */ struct node *kinp; /* pointers between nodes (branches) */ int descen; int number; double length; /* branch length inferred (no clock) */ double lengthc; /* branch length inferred (clock) */ double lengthext; /* external length from usertree */ int lengthset; /* length set by usertree */ double varlen; double height; double varheight; ivector paths; /* path directions for Korbi's p-step */ cvector eprob; dcube partials; /* partial likelihoods */ char *label; /* internal labels */ } Node; typedef struct tree { Node *rootp; Node **ebrnchp; /* list of pointers to external branches */ Node **ibrnchp; /* list of pointers to internal branches */ double lklhd; /* total log-likelihood */ double lklhdc; /* total log-likelihood clock */ dmatrix condlkl; /* lhs for each pattern and non-zero rate */ double rssleast; } Tree; /* global variables */ EXTERN Node *chep; /* pointer to current height node */ EXTERN Node *rootbr; /* pointer to root branch */ EXTERN Node **heights; /* pointer to height nodes in unrooted tree */ EXTERN int Numhts; /* number of height nodes in unrooted tree */ EXTERN double hroot; /* height of root */ EXTERN double varhroot; /* variance of height of root */ EXTERN double maxhroot; /* maximal height of root */ EXTERN int locroot; /* location of root */ EXTERN int numbestroot; /* number of best locations for root */ EXTERN int clockmode; /* clocklike vs. nonclocklike computation */ EXTERN cmatrix Identif; /* sequence names */ EXTERN cmatrix Namestr; /* sequence names (delimited by '\0') */ EXTERN cmatrix Seqchar; /* ML sequence data */ EXTERN cmatrix Seqpat; /* ordered site patterns */ EXTERN ivector constpat; /* indicates constant site patterns */ EXTERN cvector seqchi; EXTERN cvector seqchj; EXTERN dcube partiali; EXTERN dcube partialj; EXTERN dcube ltprobr; /* transition probabilites (for all non-zero rates*/ EXTERN dmatrix Distanmat; /* matrix with maximum likelihood distances */ EXTERN dmatrix Evec; /* Eigenvectors */ EXTERN dmatrix Ievc; /* Inverse eigenvectors */ EXTERN double TSparam; /* Ts/Tv parameter */ EXTERN double GTR_ACrate; /* A <-> G mutation rate for GTR */ EXTERN double GTR_AGrate; /* A <-> C mutation rate for GTR */ EXTERN double GTR_ATrate; /* A <-> T mutation rate for GTR */ EXTERN double GTR_CGrate; /* C <-> G mutation rate for GTR */ EXTERN double GTR_CTrate; /* C <-> T mutation rate for GTR */ EXTERN double GTR_GTrate; /* G <-> T mutation rate for GTR */ EXTERN double tsmean, yrmean; EXTERN double YRparam; /* Y/R Ts parameter */ EXTERN double geerr; /* estimated error of rate heterogeneity */ EXTERN double Geta; /* rate heterogeneity parameter */ EXTERN double fracconst; /* fraction of constant sites */ EXTERN double fracconstpat;/* fraction of constant patterns */ EXTERN double Proportion; /* for tree drawing */ EXTERN double tserr; /* estimated error of TSparam */ EXTERN double yrerr; /* estimated error of YRparam */ EXTERN double fracinv; /* fraction of invariable sites */ EXTERN double fierr; /* estimated error of fracinv */ EXTERN dvector Brnlength; EXTERN dvector Distanvec; EXTERN dvector Eval; /* Eigenvalues of 1 PAM rate matrix */ EXTERN dvector Freqtpm; /* base frequencies */ EXTERN dvector Rates; /* rate of each of the categories */ EXTERN dmatrix iexp; EXTERN imatrix Basecomp; /* base composition of each taxon */ EXTERN ivector usedtaxa; /* list needed in the input treefile procedure */ EXTERN int numtc; /* auxiliary variable for printing rooted tree */ EXTERN int qcalg_optn; /* use quartet subsampling algorithm */ EXTERN int approxp_optn;/* approximate parameter estimation */ EXTERN int chi2fail; /* flag for chi2 test */ EXTERN int Converg; /* flag for ML convergence (no clock) */ EXTERN int Convergc; /* flag for ML convergence (clock) */ EXTERN int data_optn; /* type of sequence input data */ EXTERN int Dayhf_optn; /* Dayhoff model */ EXTERN int HKY_optn; /* use HKY model */ EXTERN int Jtt_optn; /* JTT model */ EXTERN int print_GTR_optn; /* print (restricted) GTR matrix */ EXTERN int GTR_optn; /* GTR model */ EXTERN int blosum62_optn; /* BLOSUM 62 model */ EXTERN int mtrev_optn; /* mtREV model */ EXTERN int cprev_optn; /* cpREV model */ EXTERN int vtmv_optn; /* VT model */ EXTERN int wag_optn; /* WAG model */ EXTERN int Maxsite; /* number of ML characters per taxum */ EXTERN int Maxspc; /* number of sequences */ EXTERN int mlmode; /* quartet ML or user defined tree ML */ EXTERN int nuc_optn; /* nucleotide (4x4) models */ EXTERN int Numbrnch; /* number of branches of current tree */ EXTERN int numcats; /* number of rate categories */ EXTERN int Numconst; /* number of constant sites */ EXTERN int Numconstpat; /* number of constant patterns */ EXTERN int Numibrnch; /* number of internal branches of current tree */ EXTERN int Numitc; /* number of ML iterations assumning clock */ EXTERN int Numit; /* number of ML iterations if convergence */ EXTERN int Numptrn; /* number of site patterns */ EXTERN int Numspc; /* number of sequences of current tree */ EXTERN int optim_optn; /* optimize model parameters */ EXTERN int grate_optim; /* optimize Gamma rate heterogeneity parameter */ EXTERN int SH_optn; /* SH nucleotide (16x16) model */ EXTERN int TN_optn; /* use TN model */ EXTERN int tpmradix; /* number of different states */ EXTERN int fracinv_optim; /* optimize fraction of invariable sites */ EXTERN int typ_optn; /* type of PUZZLE analysis */ EXTERN ivector Weight; /* weight of each site pattern */ EXTERN Tree *Ctree; /* pointer to current tree */ EXTERN int qca, qcb, qcc, qcd; /* quartet currently optimized */ EXTERN ivector Alias; /* link site -> corresponding site pattern */ EXTERN ivector bestrate; /* optimal assignment of rates to sequence sites*/ EXTERN int bestratefound; /* best rate per site already reconstructed ? */ /* function prototypes of all ml function */ void convfreq(dvector); void tp_radixsort(cmatrix, ivector, int, int, int *); void condenceseq(cmatrix, ivector, cmatrix, ivector, int, int, int); void countconstantsites(cmatrix, ivector, int, int, int *, int*); void evaluateseqs(void); void elmhes(dmatrix, ivector, int); void eltran(dmatrix, dmatrix, ivector, int); void mcdiv(double, double, double, double, double *, double *); void hqr2(int, int, int, dmatrix, dmatrix, dvector, dvector); void onepamratematrix(dmatrix); void eigensystem(dvector, dmatrix); void luinverse(dmatrix, dmatrix, int); void checkevector(dmatrix, dmatrix, int); void tranprobmat(void); void tprobmtrx(double, dmatrix); double comptotloglkl(dmatrix); void allsitelkl(dmatrix, dvector); void writesitelklmatrixphy(FILE *outf, int numut, int numsite, dmatrix allslkl, dmatrix allslklc, int clock); void writesitelklvectorphy(FILE *outf, char *name, int numsite, dvector aslkl); /* void writesitelklbin(FILE *, dvector); */ /* TODO */ double pairlkl(double); double mldistance(int, int, double); /*epe*/ /* double mldistance(int, int); */ void initdistan(void); void computedistan(void); void productpartials(Node *); void partialsinternal(Node *); void partialsexternal(Node *); void initpartials(Tree *); double intlkl(double); void optinternalbranch(Node *); double extlkl(double); void optexternalbranch(Node *); void finishlkl(Node *); double optlkl(Tree *); double treelkl(Tree *); void luequation(dmatrix, dvector, int); void lslength(Tree *, dvector, int, int, dvector); #if PARALLEL void lslength_par(Tree *, dvector, int, int, dvector); #endif void setextlength(Tree *, int, int, dvector); void getusertree(FILE *, cvector, int, int); Node *internalnode(Tree *, char **, int *); void constructtree(Tree *, cvector, int); void removebasalbif(cvector); void makeusertree(FILE *, int); Tree *new_tree(int, int, cmatrix); Tree *new_quartet(int, cmatrix); void free_tree(Tree *, int); void make_quartet(int, int, int, int); void changedistan(dmatrix, dvector, int); double quartet_lklhd(int, int, int, int); double quartet_alklhd(int, int, int, int); void readusertree(FILE *, int); double usertree_lklhd(int, int); double usertree_alklhd(int, int); void mlstart(void); void distupdate(int, int, int, int); void mlfinish(void); void prbranch(Node *, int, int, int, ivector, ivector, FILE *); void getproportion(double *, dvector, int); void prtopology(FILE *); void fputphylogeny(FILE *); void resulttree(FILE *outfp, int usebranch); void njtree(FILE *); void njdistantree(Tree *); void findbestratecombination(void); void printbestratecombination(FILE *); void printbestratecombinationtofile(FILE *, int); int checkedge(int); void fputsubstree(FILE *, Node *); void fputrooted(FILE *, int); void findheights(Node *); void initclock(int); double clock_alklhd(int); double heightlkl(double); void optheight(void); double rheightlkl(double); void optrheight(void); double clock_lklhd(int); int findrootedge(void); void resultheights(FILE *); /* mlparam.c */ double homogentest(int); void YangDiscreteGamma(double, int, double *); void updaterates(void); void computestat(double *, int, double *, double *); double quartetml(int, int, int, int); double opttsq(double); double optyrq(double); void optimseqevolparamsquart(void); double opttst(double); double optyrt(double); void optimseqevolparamstree(void); double optfi(double); double optge(double); void optimrateparams(void); void estimateparametersnotree(void); /* moved from puzzle1.c */ void estimateparameterstree(void); /* moved from puzzle1.c */ /* mlparam.c end */ int gettpmradix(void); void rtfdata(dmatrix, double *); int code2int(cvector, int *, int *); char *int2code(int); void jttdata(dmatrix, double *); void dyhfdata(dmatrix, double *); void mtrevdata(dmatrix, double *); void cprev45data(dmatrix, double *); void blosum62data(dmatrix, double *); void vtmvdata(dmatrix, double *); void wagdata(dmatrix, double *); #endif tree-puzzle-5.2/src/consensus.c0000644000076400001440000007641310073365134012317 /* * consensus.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #define EXTERN extern #include "consensus.h" #ifdef PARALLEL # include "ppuzzle.h" #endif int ZZZ=0; /* fprintf(stderr, "ZZZ: %d (%s:%d)\n", ZZZ++, __FILE__, __LINE__); */ /******************************************************************************/ /* functions for computing the consensus tree */ /******************************************************************************/ /* prepare for consensus tree analysis */ void initconsensus() { # if ! PARALLEL biparts = new_cmatrix(Maxspc-3, Maxspc); # endif /* PARALLEL */ if (Maxspc % 32 == 0) splitlength = Maxspc/32; else splitlength = (Maxspc + 32 - (Maxspc % 32))/32; numbiparts = 0; /* no pattern stored so far */ maxbiparts = 0; /* no memory reserved so far */ splitfreqs = NULL; splitpatterns = NULL; splitsizes = NULL; splitcomptemp = (uli *) calloc((size_t) splitlength, sizeof(uli) ); if (splitcomptemp == NULL) maerror("splitcomptemp in initconsensus"); } /* initconsensus */ /******************/ /* de-trueID-ed (HAS) */ /* recursive function to get bipartitions */ /* traversal should be optimazable (HAS) */ void makepart(int i, /* */ int curribrnch, /* in: current branch in traversal */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: ext. edge list */ cmatrix biparts, /* out: split strings, edge by edge */ int Maxspc) /* in: number of species in tree */ { if ( edge[i].downright == NULL || edge[i].downleft == NULL) { biparts[curribrnch][edge[i].taxon] = '*'; return; } else { /* still on inner branch */ makepart(edge[i].downleft->numedge, curribrnch, edge, edgeofleaf, biparts, Maxspc); makepart(edge[i].downright->numedge, curribrnch, edge, edgeofleaf, biparts, Maxspc); } } /* makepart */ /******************/ /* de-trueID-ed (HAS) */ /* compute bipartitions of current puzzling step tree */ /* traversal should be optimazable (HAS) */ void computebiparts(ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: ext. edge list */ int psteprootleaf, /* virtual root from pstep */ cmatrix biparts, /* out: splits */ int outgroup, /* in: outgroup of tree */ int Maxspc) /* in: number of taxa in tree */ { int i, j, curribrnch; curribrnch = -1; for (i = 0; i < Maxspc - 3; i++) for (j = 0; j < Maxspc; j++) biparts[i][j] = '.'; for (i = 0; i < Maxbrnch; i++) { /* (HAS) */ if (!(edgeofleaf[psteprootleaf] == i || edge[i].downright == NULL || edge[i].downleft == NULL) ) { /* check only inner branches */ curribrnch++; makepart(i, curribrnch, edge, edgeofleaf, biparts, Maxspc); /* make sure that the root is always a '*' */ if (biparts[curribrnch][outgroup] == '.') { for (j = 0; j < Maxspc; j++) { if (biparts[curribrnch][j] == '.') biparts[curribrnch][j] = '*'; else biparts[curribrnch][j] = '.'; } } } } } /* computebiparts */ /******************/ /* print out the bipartition n of all different splitpatterns */ void fprintfsplit(FILE *fp, /* outputfile stream */ uli n, /* split number */ uli *splitpatterns, /* splits */ int splitlength, /* number of ulis per split */ int Maxspc) /* number of taxa */ { int i, j; /* counter variables */ int col; /* current output column */ uli z; /* temporary variable for bit shifting */ col = 0; for (i = 0; i < splitlength; i++) { z = splitpatterns[n*splitlength + i]; for (j = 0; j < 32 && col < Maxspc; j++) { if (col % 10 == 0 && col != 0) fprintf(fp, " "); if (z & 1) fprintf(fp, "."); else fprintf(fp, "*"); z = (z >> 1); col++; } } } /* printsplit */ /******************/ /* general remarks: - every entry in consbiparts is one node of the consensus tree - for each node one has to know which taxa and which other nodes are *directly* descending from it - for every taxon/node number there is a flag that shows whether it descends from the node or not - '0' means that neither a taxon nor another node with the corresponding number decends from the node '1' means that the corresponding taxon descends from the node '2' means that the corresponding node descends from the node '3' means that the corresponding taxon and node descends from the node */ /* make new entries for new different bipartitions and count frequencies */ /* internal use: splitcomptemp */ void makenewsplitentries(cmatrix bip, /* in: split string vector */ int numspl, /* in: no. of new splits */ uli **in_splitpatterns,/* io: known compr splits */ int **in_splitsizes, /* io: kn. split sizes: '.'*/ uli **in_splitfreqs, /* io: kn. split frequences*/ uli *in_numbiparts, /* io: no. of splits so far*/ uli *in_maxbiparts, /* io: reserved memory */ int Maxspc) /* in: no. of species */ { int i, j; /* count variables */ int bpc; /* split count */ int identical; /* split identical flag */ int idflag; /* split size identical flag */ int bpsize; /* split size: count the '.' */ uli nextentry; /* temp vaiable for split amount numbiparts */ uli obpc; /* split count - old splits */ uli *splitpatternstmp; /* temp pointer, saves derefs. */ int *splitsizestmp; /* temp pointer, saves derefs. */ uli *splitfreqstmp; /* temp pointer, saves derefs. */ uli maxbipartstmp; /* split memory reserved so far */ splitpatternstmp = *in_splitpatterns; splitsizestmp = *in_splitsizes; splitfreqstmp = *in_splitfreqs; maxbipartstmp = *in_maxbiparts; /* where the next entry would be in splitpatterns */ nextentry = *in_numbiparts; for (bpc = 0; bpc < numspl; bpc++) { /* for every new bipartition */ /* convert bipartition into a more compact format */ bpsize = 0; for (i = 0; i < splitlength; i++) { splitcomptemp[i] = 0; for (j = 0; j < 32; j++) { splitcomptemp[i] = splitcomptemp[i] >> 1; if (i*32 + j < Maxspc) if (bip[bpc][i*32 + j] == '.') { /* set highest bit */ splitcomptemp[i] = (splitcomptemp[i] | 2147483648UL); bpsize++; /* count the '.' */ } } } /* compare to the *old* patterns */ identical = FALSE; for (obpc = 0; (obpc < *in_numbiparts) && (!identical); obpc++) { /* compare first partition size */ if (splitsizestmp[obpc] == bpsize) idflag = TRUE; else idflag = FALSE; /* if size is identical compare whole partition */ for (i = 0; (i < splitlength) && idflag; i++) if (splitcomptemp[i] != splitpatternstmp[obpc*splitlength + i]) idflag = FALSE; if (idflag) identical = TRUE; } if (identical) { /* if identical increase frequency */ splitfreqstmp[2*(obpc-1)]++; } else { /* create new entry */ if (nextentry == maxbipartstmp) { /* reserve more memory */ maxbipartstmp = maxbipartstmp + 2*Maxspc; splitfreqstmp = (uli *) myrealloc(splitfreqstmp, 2*maxbipartstmp * sizeof(uli) ); /* 2x: splitfreqstmp contains also an index (sorting!) */ if (splitfreqstmp == NULL) maerror("splitfreqstmp in makenewsplitentries"); splitpatternstmp = (uli *) myrealloc(splitpatternstmp, splitlength*maxbipartstmp * sizeof(uli) ); if (splitpatternstmp == NULL) maerror("splitpatternstmp in makenewsplitentries"); splitsizestmp = (int *) myrealloc(splitsizestmp, maxbipartstmp * sizeof(int) ); if (splitsizestmp == NULL) maerror("splitsizestmp in makenewsplitentries"); } splitfreqstmp[2*nextentry] = 1; /* frequency */ splitfreqstmp[2*nextentry+1] = nextentry; /* index for sorting */ for (i = 0; i < splitlength; i++) splitpatternstmp[nextentry*splitlength + i] = splitcomptemp[i]; splitsizestmp[nextentry] = bpsize; nextentry++; } } /* export new values */ *in_numbiparts = nextentry; *in_splitpatterns = splitpatternstmp; *in_splitsizes = splitsizestmp; *in_splitfreqs = splitfreqstmp; *in_maxbiparts = maxbipartstmp; } /* makenewsplitentries - new */ /***************************************************************************/ /* copy bipartition n of all different splitpatterns to consbiparts[k] */ void copysplit(uli n, uli *splitpatterns, int k, cmatrix consbipartsvec) { int i, j, col; uli z; col = 0; for (i = 0; i < splitlength; i++) { z = splitpatterns[n*splitlength + i]; for (j = 0; j < 32 && col < Maxspc; j++) { if (z & 1) consbipartsvec[k][col] = '1'; else consbipartsvec[k][col] = '0'; z = (z >> 1); col++; consbipartsvec[k][Maxspc] = '\0'; } } } /* copysplit */ /******************/ /* and the quartet topologies from the ML step. Values are */ /* stored in */ /* missing parameter: quartetinfo */ void quartsupport(int splitnum, cmatrix consbipartsvec, qsupportarr_t *qsupparr) { int n; int *clusterA; int *clusterB; int clustA = 0; int clustB = 0; int a1, a2, b1, b2; int aa1, aa2, bb1, bb2; uli fullres_pro = 0; uli fullres_con = 0; uli partres_pro = 0; uli partres_con = 0; uli unres = 0; uli missing = 0; uli qsum = 0; cvector splitstr; unsigned char tmpweight; clusterA = calloc((size_t) Maxspc, (sizeof(int))); if (clusterA == NULL) maerror("clusterA in quartsupport"); clusterB = calloc((size_t) Maxspc, (sizeof(int))); if (clusterA == NULL) maerror("clusterB in quartsupport"); splitstr = consbipartsvec[splitnum]; for(n=0; n maxnumtrees) consincluded = i + 1; } /* collect all info about majority rule consensus tree */ /* the +1 is due to the edge with the root */ /* consincluded changed to (Maxspc-3) to collect sub-50%-splits */ /* a maximum of (Maxspc-3) is possible in a Maxspc-tree (HAS) */ consconfid = new_ivector( (Maxspc-3) + 1); conssizes = new_ivector(2*(Maxspc-3) + 2); consbiparts = new_cmatrix( (Maxspc-3) + 1, Maxspc + 1); /* old routine (HAS) consconfid = new_ivector(consincluded + 1); conssizes = new_ivector(2*consincluded + 2); consbiparts = new_cmatrix(consincluded + 1, Maxspc); */ for (i = 0; i < consincluded; i++) { /* copy partition to consbiparts */ copysplit(splitfreqs[2*i+1], splitpatterns, i, consbiparts); /* frequency in percent (rounded to integer) */ consconfid[i] = (int) floor(100.0*splitfreqs[2*i]/maxnumtrees + 0.5); /* size of partition */ conssizes[2*i] = splitsizes[splitfreqs[2*i+1]]; conssizes[2*i+1] = i; } consfifty = consincluded; done = FALSE; i = consincluded; /* until maximum splits (Maxspc-3) incorporated or */ /* first incongruence found */ while ((i < (Maxspc-3)) && !done) { /* copy partition to consbiparts */ copysplit(splitfreqs[2*i+1], splitpatterns, i, consbiparts); for (scount = 0; (scount 0) && (count10 > 0) && (count00 > 0) && (count11 > 0)) done = TRUE; } } if (!done) { /* frequency in percent (rounded to integer) */ consconfid[i] = (int) floor(100.0*splitfreqs[2*i]/maxnumtrees+ 0.5); /* size of partition */ conssizes[2*i] = splitsizes[splitfreqs[2*i+1]]; conssizes[2*i+1] = i; i++; } } /* last split has same percentage as the first unincorporated, remove */ if (((uli)(i + 1) < numbiparts) && (splitfreqs[2*i] == splitfreqs[2*(i+1)])) done = TRUE; /* remove all splits with same percentage as first incongruence */ if (done) { while ((i > 0) && (splitfreqs[2*i] == splitfreqs[2*(i-1)])) i--; } if (conssub50_optn) { consincluded = i; conscongruent = i; } else { conscongruent = i; } for (i = 0; i < Maxspc; i++) consbiparts[consincluded][i] = '1'; consbiparts[consincluded][outgroup] = '0'; consconfid[consincluded] = 100; conssizes[2*consincluded] = Maxspc - 1; conssizes[2*consincluded + 1] = consincluded; /* sort bipartitions according to cluster size */ qsort(conssizes, consincluded + 1, 2*sizeof(int), intcmp); qsupportarr = malloc((size_t) (sizeof(qsupportarr_t) * consincluded)); if (qsupp_optn) { for (i = 0; i < consincluded; i++) { quartsupport(i, consbiparts, qsupportarr); } } /******************************/ /* reconstruct consensus tree */ /******************************/ for (i = 0; i < consincluded; i++) { /* try every node */ size = conssizes[2*i]; /* size of current node */ for (j = i + 1; j < consincluded + 1; j++) { /* compare only with nodes with more descendants */ if (size == conssizes[2*j]) continue; /* check whether node i is a subnode of j */ subnode = FALSE; for (k = 0; k < Maxspc && !subnode; k++) { chari = consbiparts[ conssizes[2*i+1] ][k]; if (chari != '0') { charj = consbiparts[ conssizes[2*j+1] ][k]; if (chari == charj || charj == '3') subnode = TRUE; } } /* if i is a subnode of j change j accordingly */ if (subnode) { /* remove subnode i from j */ for (k = 0; k < Maxspc; k++) { chari = consbiparts[ conssizes[2*i+1] ][k]; if (chari != '0') { charj = consbiparts[ conssizes[2*j+1] ][k]; if (chari == charj) consbiparts[ conssizes[2*j+1] ][k] = '0'; else if (charj == '3') { if (chari == '1') consbiparts[ conssizes[2*j+1] ][k] = '2'; else if (chari == '2') consbiparts[ conssizes[2*j+1] ][k] = '1'; else { /* Consensus tree [1] */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR H TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } else { /* Consensus tree [2] */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR I TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } } /* add link to subnode i in node j */ charj = consbiparts[ conssizes[2*j+1] ][ conssizes[2*i+1] ]; if (charj == '0') consbiparts[ conssizes[2*j+1] ][ conssizes[2*i+1] ] = '2'; else if (charj == '1') consbiparts[ conssizes[2*j+1] ][ conssizes[2*i+1] ] = '3'; else { /* Consensus tree [3] */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR J TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } } } } /* makeconsensus */ /******************/ /* prototype for recursion */ void writenode(FILE *treefile, /* in: output stream */ int node, /* current node */ int qsupp_optn, /* 'print quartet support' flag */ qsupportarr_t *qsupparr, /* quartet support values */ int *column); /* current line position */ /* write node (writeconsensustree) */ /* missing: column */ void writenode(FILE *treefile, /* in: output stream */ int node, /* current node */ int qsupp_optn, /* 'print quartet support' flag */ qsupportarr_t *qsupparr, /* quartet support values */ int *column) /* current line position */ { int i, first; fprintf(treefile, "("); (*column)++; /* write descending nodes */ first = TRUE; for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '2' || consbiparts[node][i] == '3') { if (first) first = FALSE; else { fprintf(treefile, ","); (*column)++; } if ((*column) > 60) { (*column) = 2; fprintf(treefile, "\n"); } /* write node i */ writenode(treefile, i, qsupp_optn, qsupparr, column); if (qsupp_optn) { /* reliability value as internal label */ fprintf(treefile, "%d", consconfid[i]); (*column) += 3; #if 0 fprintf(treefile, "\"bs=%d|", consconfid[i]); (*column) += 7; fprintf(treefile, "f+=%.0f|", (100.0*qsupparr[i].fullres_pro/qsupparr[i].qsum)); (*column) += 7; fprintf(treefile, "p+=%.0f|", (100.0*qsupparr[i].partres_pro/qsupparr[i].qsum)); (*column) += 7; fprintf(treefile, "f-=%.0f|", (100.0*qsupparr[i].fullres_con/qsupparr[i].qsum)); (*column) += 7; fprintf(treefile, "p-=%.0f|", (100.0*qsupparr[i].partres_con/qsupparr[i].qsum)); (*column) += 7; fprintf(treefile, "ur=%.0f", (100.0*qsupparr[i].unres/qsupparr[i].qsum)); (*column) += 6; if (qsupparr[i].missing > 0) { fprintf(treefile, "|md=%.0f", (100.0*qsupparr[i].missing/qsupparr[i].qsum)); (*column) += 7; } fprintf(treefile, "/%ld\"", qsupparr[i].qsum); (*column) += 5; #endif } else { /* reliability value as internal label */ fprintf(treefile, "%d", consconfid[i]); (*column) += 3; } } } /* write descending taxa */ for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '1' || consbiparts[node][i] == '3') { if (first) first = FALSE; else { fprintf(treefile, ","); (*column)++; } if ((*column) > 60) { (*column) = 2; fprintf(treefile, "\n"); } (*column) += fputid(treefile, i); } } fprintf(treefile, ")"); (*column)++; } /* writenode */ /******************/ /* write consensus tree */ /* missing: consbiparts, consincluded, consconfid, */ void writeconsensustree(FILE *treefile, /* in: output stream */ int qsupp_optn, /* 'print quartsupp' flag */ qsupportarr_t *qsupparr) /* quartet support values */ { int i, first; int column; column = 1; fprintf(treefile, "("); column += fputid(treefile, outgroup) + 2; fprintf(treefile, ","); /* write descending nodes */ first = TRUE; for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '2' || consbiparts[consincluded][i] == '3') { if (first) first = FALSE; else { fprintf(treefile, ","); /* first (outgroup) has ',' already */ column++; } if (column > 60) { column = 2; fprintf(treefile, "\n"); } /* write node i */ writenode(treefile, i, qsupp_optn, qsupparr, &column); if (qsupp_optn) { /* reliability value as internal label */ fprintf(treefile, "%d", consconfid[i]); column += 3; #if 0 fprintf(treefile, "\"bs=%d|", consconfid[i]); column += 7; fprintf(treefile, "f+=%.0f|", (100.0*qsupparr[i].fullres_pro/qsupparr[i].qsum)); column += 7; fprintf(treefile, "p+=%.0f|", (100.0*qsupparr[i].partres_pro/qsupparr[i].qsum)); column += 7; fprintf(treefile, "f-=%.0f|", (100.0*qsupparr[i].fullres_con/qsupparr[i].qsum)); column += 7; fprintf(treefile, "p-=%.0f|", (100.0*qsupparr[i].partres_con/qsupparr[i].qsum)); column += 7; fprintf(treefile, "ur=%.0f", (100.0*qsupparr[i].unres/qsupparr[i].qsum)); column += 6; if (qsupparr[i].missing > 0) { fprintf(treefile, "|md=%.0f", (100.0*qsupparr[i].missing/qsupparr[i].qsum)); column += 7; } fprintf(treefile, "/%ld\"", qsupparr[i].qsum); column += 5; #endif } else { /* reliability value as internal label */ fprintf(treefile, "%d", consconfid[i]); column += 3; } } } /* write descending taxa */ for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '1' || consbiparts[consincluded][i] == '3') { if (first) first = FALSE; else { fprintf(treefile, ","); column++; } if (column > 60) { column = 2; fprintf(treefile, "\n"); } column += fputid(treefile, i); } } fprintf(treefile, ");\n"); } /* writeconsensustree */ /******************/ /* prototype for recursion */ void nodecoordinates(int node); /* establish node coordinates (plotconsensustree) */ void nodecoordinates(int node) { int i, ymin, ymax, xcoordinate; /* first establish coordinates of descending nodes */ for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '2' || consbiparts[node][i] == '3') nodecoordinates(i); } /* then establish coordinates of descending taxa */ for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '1' || consbiparts[node][i] == '3') { /* y-coordinate of taxon i */ ycortax[i] = ytaxcounter; ytaxcounter = ytaxcounter - 2; } } /* then establish coordinates of this node */ ymin = 2*Maxspc - 2; ymax = 0; xcoordinate = 0; for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '2' || consbiparts[node][i] == '3') { if (ycor[i] > ymax) ymax = ycor[i]; if (ycor[i] < ymin) ymin = ycor[i]; if (xcor[i] > xcoordinate) xcoordinate = xcor[i]; } } for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '1' || consbiparts[node][i] == '3') { if (ycortax[i] > ymax) ymax = ycortax[i]; if (ycortax[i] < ymin) ymin = ycortax[i]; } } ycormax[node] = ymax; ycormin[node] = ymin; ycor[node] = (int) floor(0.5*(ymax + ymin) + 0.5); if (xcoordinate == 0) xcoordinate = 9; xcor[node] = xcoordinate + 4; } /* nodecoordinates */ /******************/ /* prototype for recursion */ void drawnode(int node, int xold); /* drawnode (plotconsensustree) */ void drawnode(int node, int xold) { int i, j; char buf[4]; /* first draw vertical line */ for (i = ycormin[node] + 1; i < ycormax[node]; i++) treepict[xcor[node]][i] = ':'; /* then draw descending nodes */ for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '2' || consbiparts[node][i] == '3') drawnode(i, xcor[node]); } /* then draw descending taxa */ for (i = 0; i < Maxspc; i++) { if (consbiparts[node][i] == '1' || consbiparts[node][i] == '3') { treepict[xcor[node]][ycortax[i]] = ':'; for (j = xcor[node] + 1; j < xsize-10; j++) treepict[j][ycortax[i]] = '-'; for (j = 0; j < 10; j++) treepict[xsize-10+j][ycortax[i]] = Identif[i][j]; } } /* then draw internal edge with consensus value */ treepict[xold][ycor[node]] = ':'; treepict[xcor[node]][ycor[node]] = ':'; for (i = xold + 1; i < xcor[node]-3; i++) treepict[i][ycor[node]] = '-'; sprintf(buf, "%d", consconfid[node]); if (consconfid[node] == 100) { treepict[xcor[node]-3][ycor[node]] = buf[0]; treepict[xcor[node]-2][ycor[node]] = buf[1]; treepict[xcor[node]-1][ycor[node]] = buf[2]; } else { treepict[xcor[node]-3][ycor[node]] = '-'; treepict[xcor[node]-2][ycor[node]] = buf[0]; treepict[xcor[node]-1][ycor[node]] = buf[1]; } } /* drawnode */ /******************/ /* plot consensus tree */ void plotconsensustree(FILE *plotfp) { int i, j, yroot, startree; /* star tree or no star tree */ if (consincluded == 0) { startree = TRUE; consincluded = 1; /* avoids problems with malloc */ } else startree = FALSE; /* memory for x-y-coordinates of each bipartition */ xcor = new_ivector(consincluded); ycor = new_ivector(consincluded); ycormax = new_ivector(consincluded); ycormin = new_ivector(consincluded); if (startree) consincluded = 0; /* avoids problems with malloc */ /* y-coordinates of each taxon */ ycortax = new_ivector(Maxspc); ycortax[outgroup] = 0; /* establish coordinates */ ytaxcounter = 2*Maxspc - 2; /* first establish coordinates of descending nodes */ for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '2' || consbiparts[consincluded][i] == '3') nodecoordinates(i); } /* then establish coordinates of descending taxa */ for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '1' || consbiparts[consincluded][i] == '3') { /* y-coordinate of taxon i */ ycortax[i] = ytaxcounter; ytaxcounter = ytaxcounter - 2; } } /* then establish length of root edge and size of whole tree */ yroot = 0; xsize = 0; for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '2' || consbiparts[consincluded][i] == '3') { if (ycor[i] > yroot) yroot = ycor[i]; if (xcor[i] > xsize) xsize = xcor[i]; } } for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '1' || consbiparts[consincluded][i] == '3') { if (ycortax[i] > yroot) yroot = ycortax[i]; } } if (xsize == 0) xsize = 9; /* size in x direction inclusive one blank on the left */ xsize = xsize + 6; /* change all x-labels so that (0,0) is down-left */ for (i = 0; i < consincluded; i++) xcor[i] = xsize-1-xcor[i]; /* draw tree */ treepict = new_cmatrix(xsize, 2*Maxspc-1); for (i = 0; i < xsize; i++) for (j = 0; j < 2*Maxspc-1; j++) treepict[i][j] = ' '; /* draw root */ for (i = 1; i < yroot; i++) treepict[1][i] = ':'; treepict[1][0] = ':'; for (i = 2; i < xsize - 10; i++) treepict[i][0] = '-'; for (i = 0; i < 10; i++) treepict[xsize-10+i][0] = Identif[outgroup][i]; /* then draw descending nodes */ for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '2' || consbiparts[consincluded][i] == '3') drawnode(i, 1); } /* then draw descending taxa */ for (i = 0; i < Maxspc; i++) { if (consbiparts[consincluded][i] == '1' || consbiparts[consincluded][i] == '3') { treepict[1][ycortax[i]] = ':'; for (j = 2; j < xsize-10; j++) treepict[j][ycortax[i]] = '-'; for (j = 0; j < 10; j++) treepict[xsize-10+j][ycortax[i]] = Identif[i][j]; } } /* plot tree */ for (i = 2*Maxspc-2; i > -1; i--) { for (j = 0; j < xsize; j++) fputc(treepict[j][i], plotfp); fputc('\n', plotfp); } free_ivector(xcor); free_ivector(ycor); free_ivector(ycormax); free_ivector(ycormin); free_ivector(ycortax); free_cmatrix(treepict); } /* plotconsensustree */ tree-puzzle-5.2/src/consensus.h0000644000076400001440000001422710073365142012316 /* * consensus.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef CONSENSUS_H #define CONSENSUS_H #include "puzzle.h" #include "util.h" typedef struct { uli fullres_pro; uli fullres_con; uli partres_pro; uli partres_con; uli unres; uli missing; uli qsum; } qsupportarr_t; EXTERN cmatrix biparts; /* bipartitions of tree of current puzzling step */ EXTERN cmatrix consbiparts; /* bipartitions of majority rule consensus tree */ EXTERN int xsize; /* depth of consensus tree picture */ EXTERN ivector consconfid; /* confidence values of majority rule consensus tree */ EXTERN ivector conssizes; /* partition sizes of majority rule consensus tree */ EXTERN ivector xcor; /* x-coordinates of consensus tree nodes */ EXTERN ivector ycor; /* y-coordinates of consensus tree nodes */ EXTERN ivector ycormax; /* maximal y-coordinates of consensus tree nodes */ EXTERN ivector ycormin; /* minimal y-coordinates of consensus tree nodes */ /* splits for consensus */ EXTERN int splitlength; /* length of one entry in splitpatterns */ EXTERN uli maxbiparts; /* memory reserved for maxbiparts bipartitions */ EXTERN uli numbiparts; /* number of different bipartitions */ EXTERN int *splitsizes; /* size of all different splits of all trees */ EXTERN uli *splitcomptemp; /* temp variable to compress bipartitions coding */ EXTERN uli *splitfreqs; /* frequencies of different splits of all trees */ EXTERN uli *splitpatterns; /* all different splits of all trees */ EXTERN qsupportarr_t *qsupportarr; /* quartet support values per split */ EXTERN int consincluded; /* number of included biparts in the consensus tree */ EXTERN int consfifty; /* number of biparts >= 50% */ EXTERN int conscongruent; /* number of first incongruent bipart */ /******************************************************************************/ /* functions for computing the consensus tree */ /******************************************************************************/ /* prepare for consensus tree analysis */ void initconsensus(); /* recursive function to get bipartitions */ /* traversal should be optimazable (HAS) */ void makepart_trueID(int i, /* */ int curribrnch, /* in: current branch in traversal */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: ext. edge list */ int *trueID, /* in: permutation list */ cmatrix biparts, /* out: split strings, edge by edge */ int Maxspc); /* in: number of species in tree */ /* compute bipartitions of current puzzling step tree */ void computebiparts(ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: ext. edge list */ int psteprootleaf, /* virtual root from pstep */ cmatrix biparts, /* out: splits */ int outgroup, /* in: outgroup of tree */ int Maxspc); /* in: number of taxa in tree */ /* print out the bipartition n of all different splitpatterns */ void fprintfsplit(FILE *fp, /* outputfile stream */ uli n, /* split number */ uli *splitpatterns, /* splits */ int splitlength, /* number of ulis per split */ int Maxspc); /* number of taxa */ /* make new entries for new different bipartitions and count frequencies */ /* internal use: splitcomptemp */ void makenewsplitentries(cmatrix bip, /* in: split string vector */ int numspl, /* in: no. of new splits */ uli **in_splitpatterns,/* io: known compr splits */ int **in_splitsizes, /* io: kn. split sizes: '.'*/ uli **in_splitfreqs, /* io: kn. split frequences*/ uli *in_numbiparts, /* io: no. of splits so far*/ uli *in_maxbiparts, /* io: reserved memory */ int Maxspc); /* in: no. of species */ /***************************************************************************/ /* copy bipartition n of all different splitpatterns to consbiparts[k] */ void copysplit(uli n, uli *splitpatterns, int k, cmatrix consbipartsvec); /* and the quartet topologies from the ML step. Values are */ /* stored in */ /* missing parameter: quartetinfo */ void quartsupport(int splitnum, cmatrix consbipartsvec, qsupportarr_t *qsupparr); /* compute majority rule consensus tree */ void makeconsensus(uli maxnumtrees, int qsupp_optn); /* write node (writeconsensustree) */ /* missing: column */ void writenode(FILE *treefile, /* in: output stream */ int node, /* current node */ int qsupp_optn, /* 'print quartet support' flag */ qsupportarr_t *qsupparr, /* quartet support values */ int *column); /* current line position */ /* write consensus tree */ void writeconsensustree(FILE *treefile, /* in: output stream */ int qsupp_optn, /* 'print quartsupp' flag */ qsupportarr_t *qsupparr); /* quartet support values */ /* establish node coordinates (plotconsensustree) */ void nodecoordinates(int node); /* drawnode (plotconsensustree) */ void drawnode(int node, int xold); /* plot consensus tree */ void plotconsensustree(FILE *plotfp); #endif /* CONSENSUS_H */ tree-puzzle-5.2/src/recur.c0000644000076400001440000007047310073365151011416 /* * recur.c (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ /* initialize tree with the following starting configuration (see pstep.h) */ void inittree_recur(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootleaf, /* out: rooting leaf (=trueID[0]) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID) { int i, j; ONEEDGE *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for tmpvector with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); for (j = 0; j < Maxspc; j++) tmpedgeofleaf[j]=-1; *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the split map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].cluster = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedge[i].cluster == NULL) maerror("edge cluster array in inittree"); (tmpedge)[i].taxon = -1; for (j = 0; j < Maxspc; j++) (tmpedge)[i].cluster[j]=-1; /* number all edges */ tmpedge[i].numedge = i; } /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* init cluster vectors: */ /* for edge 0 */ (tmpedge[0].cluster)[0] = trueID[1]; /* leaf 1 in edge cluster */ (tmpedge[0].cluster)[1] = trueID[2]; /* leaf 2 in edge cluster */ tmpedge[0].clsize = 2; /* for edge 1 */ (tmpedge[1].cluster)[0] = trueID[1]; /* leaf 0 in edge cluster */ tmpedge[1].clsize = 1; /* for edge 2 */ (tmpedge[2].cluster)[0] = trueID[2]; /* leaf 0 in edge cluster */ tmpedge[2].clsize = 1; /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* taxon IDs of leaves */ tmpedge[0].taxon = trueID[0]; tmpedge[1].taxon = trueID[1]; tmpedge[2].taxon = trueID[2]; /* edges of leaves */ tmpedgeofleaf[trueID[0]] = 0; tmpedgeofleaf[trueID[1]] = 1; tmpedgeofleaf[trueID[2]] = 2; /* uppest edge =: root edge*/ *rootleaf = trueID[0]; } /* inittree_recur */ /******************/ /* free memory (to be called after inittree) */ void freetree_recur(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; /* free cluster vectors */ for (i = 0; i < 2 * Maxspc - 3; i++) { free(edge[i].cluster); } /* free tree topology */ free(edge); /* free external edge lookup vector */ free(edgeofleaf); } /* freetree_recur */ /******************/ void updatecluster_recur(ONEEDGE *curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to clusters */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf) /* next free leaf idx */ { curredge->cluster[(curredge->clsize)++] = newleaf; /* leaf is down */ if ((curredge->up) != NULL) { /* not root */ updatecluster_recur(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } /* updatecluster_recur */ /******************/ /* add next leaf on the specified edge */ void updatetreeclusters_recur(int dockedge, /* dockedge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ ivector permut) { int n; /* counter */ ONEEDGE *curredge; /* edge array */ /* copy cluster dockedge -> nextedge */ for (n=0; n < edge[dockedge].clsize; n++) { (edge[in_nextedge]).cluster[n] = (edge[dockedge]).cluster[n]; } /* add newleaf new internal edge's (nextedge) cluster */ (edge[in_nextedge]).cluster[n] = newleaf; /* set new internal edge's (nextedge) cluster size */ (edge[in_nextedge]).clsize = (edge[dockedge]).clsize + 1; /* add newleaf new external edge's (nextedge+1) cluster */ (edge[in_nextedge + 1]).cluster[0] = newleaf; (edge[in_nextedge + 1]).clsize = 1; curredge = &(edge[in_nextedge]); if (curredge->up != NULL) { /* not root */ #if 0 if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } #endif /* climbing up from insertion point */ updatecluster_recur(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } /* updatetreeclusters_recur */ /******************/ #if 0 /* check edge splits */ void check_recur( ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *permut) { int n,m; fprintf(stderr, "Permutation: "); for (m = 0; m %d != %d>\n", m, (edge[m].taxon >= 0) ? 'e' : 'i', edge[m].taxon, edge[m].upsize, edge[m].downsize, edge[m].upsize+edge[m].downsize, nextleaf); fprintf(stderr, " UP:"); for (n = 0; n %d == %d> OK\n", m, (edge[m].taxon >= 0) ? 'e' : 'i', edge[m].taxon, edge[m].upsize, edge[m].downsize, edge[m].upsize+edge[m].downsize, nextleaf); } } } /* check_recur */ #endif /******************/ #if 0 void updatesplit_split(ONEEDGE *curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf) /* next free leaf idx */ { switch (wherefrom) { case UP: curredge->split[(curredge->upsize)++] = newleaf; /* leaf is up */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { /* nothing to do */ return; } break; case DOWNLEFT: curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if (curredge->up != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; case DOWNRIGHT: curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if ((curredge->up) != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; } } /* updatesplit_split */ /******************/ /* add next leaf on the specified edge */ void updatetreesplits_split(int dockedge, /* dockedge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ ivector permut) { int n; /* counter */ int wherefrom; /* direction to last edge */ ONEEDGE *curredge; /* edge array */ /* copy clusters from dockedge to in_nextedge */ /* up-cluster: upsize-1 .. 0 */ for (n=(edge[dockedge].upsize) - 1; n >= 0; n--) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).upsize = (edge[dockedge]).upsize; /* down-cluster: downsize .. Maxspc-1 */ for (n=Maxspc - (edge[dockedge]).downsize; n < Maxspc; n++) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).downsize = (edge[dockedge]).downsize; /* add the new taxon to in_nextedge */ (edge[in_nextedge]).split[Maxspc - ++((edge[in_nextedge]).downsize)] = permut[in_nextleaf]; /* setup clusters for new external edge (in_nextedge+1) */ /* up-cluster: all taxa in tree */ for (n=0; n < in_nextleaf; n++) { (edge[in_nextedge+1]).split[n] = permut[n]; } (edge[in_nextedge+1]).upsize = in_nextleaf; /* down-cluster: the new taxon itself */ (edge[in_nextedge+1]).split[Maxspc-1] = permut[in_nextleaf]; (edge[in_nextedge+1]).downsize = 1; curredge = &(edge[in_nextedge]); if (curredge->up != NULL) { /* not root */ if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } /* climbing up from insertion point */ updatesplit_split(curredge->up, wherefrom, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* climbing down to dockedge from insertion point */ updatesplit_split(&(edge[dockedge]), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* updatetreesplits_split */ #endif /******************/ /* add next leaf on the specified edge */ void addnextleaf_recur(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootleaf, /* uppest leaf */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut) { int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == root edge */ if (edgeofleaf[rootleaf] == dockedge) edgeofleaf[rootleaf] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; /* if not root edge: connect ancestor to internal edge (nextedge) */ if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding new external edge (nextedge+1) to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edge[nextedge+1].taxon = permut[nextleaf]; edgeofleaf[permut[nextleaf]] = nextedge+1; #if 0 updatetreesplits_split(dockedge, permut[nextleaf], edge, Maxspc, edgeofleaf, nextedge, nextleaf, permut); #endif updatetreeclusters_recur(dockedge, permut[nextleaf], edge, Maxspc, edgeofleaf, nextedge, nextleaf, permut); (*in_nextedge) += 2; (*in_nextleaf) ++; } /* addnextleaf_recur */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_recur(ONEEDGE *curredge, /* edge array */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ ulivector leafpenalty, /* leaf edge penalties */ int *minedges, /* minimum edge vector */ int *howmany, /* number minimum edge */ uli *minpenalty) /* minimum penalty */ { int l, r; int lmax, rmax; int taxon; uli temp; ONEEDGE *left; /* temp edge ptr */ ONEEDGE *right; /* temp edge ptr */ if (curredge->downleft == NULL) { /* leaf edge */ taxon = curredge->taxon; #if 0 curredge->cluster[0] = taxon; curredge->clsize = 1; #endif curredge->edgeinfo = leafpenalty[taxon]; curredge->allsum = leafpenalty[taxon]; curredge->submatrsum = 0; if (*minpenalty == curredge->edgeinfo) { /* another min edge */ minedges[(*howmany)++] = curredge->numedge; } else { /* -> not same minimum */ if (*minpenalty > curredge->edgeinfo) { /* new minimum penalty */ *howmany = 1; minedges[0] = curredge->numedge; *minpenalty = curredge->edgeinfo; } /* if new minimum */ } /* same minimum */ } else { /* -> internal edge */ left = curredge->downleft; right = curredge->downright; /* descend downleft */ computepenalties_recur(left, Maxspc, neighbormatr, leafpenalty, minedges, howmany, minpenalty); /* descend downright */ computepenalties_recur(right, Maxspc, neighbormatr, leafpenalty, minedges, howmany, minpenalty); #if 0 lmax = left->clsize; for (l= 0; lcluster[l] = left->cluster[l]; } size = lmax; #endif lmax = left->clsize; rmax = right->clsize; temp = 0; for (r= 0; rcluster[r]; /* copy right cluster */ curredge->cluster[size++] = rID; #endif /* sum up sub neighborhood matrix */ for (l= 0; lcluster[l]][rID]; #endif temp += neighbormatr[left->cluster[l]][right->cluster[r]]; } } #if 0 curredge->clsize = size; #endif /* compute edge penalty */ curredge->submatrsum = 2*temp + left->submatrsum + right->submatrsum; curredge->allsum = left->allsum + right->allsum; curredge->edgeinfo = curredge->allsum - curredge->submatrsum; if (*minpenalty == curredge->edgeinfo) { /* another min edge */ minedges[(*howmany)++] = curredge->numedge; } else { /* -> not same minimum */ if (*minpenalty > curredge->edgeinfo) { /* new minimum penalty */ *howmany = 1; minedges[0] = curredge->numedge; *minpenalty = curredge->edgeinfo; } /* if new minimum */ } /* same minimum */ ; } } /* computepenalties_recur */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenaltiestree_recur(ONEEDGE *tmpedge, /* edge array */ int *edgeofleaf, /* external edge ptrs */ int rootleaf, /* idx of uppest edge */ int nextleaf, /* next free leaf idx */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ ulivector leafpenalty, /* leaf edge penalties */ int *minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int rootedge; int lmax, rmax; int l, r; int howmany = 0; uli temp; ONEEDGE *left; /* temp edge ptr */ ONEEDGE *right; /* temp edge ptr */ uli minpenalty; uli submatrsum; uli allsum; uli edgeinfo; ONEEDGE *curredge; rootedge = edgeofleaf[rootleaf]; curredge = &(tmpedge[rootedge]); curredge->edgeinfo = leafpenalty[rootleaf]; /* first edge: init */ minedges[0] = rootedge; howmany = 1; minpenalty = curredge->edgeinfo; left = curredge->downleft; right = curredge->downright; /* descend downleft */ computepenalties_recur(left, Maxspc, neighbormatr, leafpenalty, minedges, &howmany, &minpenalty); /* descend downright */ computepenalties_recur(right, Maxspc, neighbormatr, leafpenalty, minedges, &howmany, &minpenalty); lmax = left->clsize; rmax = right->clsize; if ((lmax + rmax) != (nextleaf-1)) { /* root edge cluster should yield all other leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR HSCL1 TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } temp = 0; for (r= 0; rcluster[l]][right->cluster[r]]; } } /* compute edge penalty */ submatrsum = 2*temp + left->submatrsum + right->submatrsum; allsum = left->allsum + right->allsum; edgeinfo = allsum - submatrsum; if ((edgeinfo) != (curredge->edgeinfo)) { /* root edge cluster should yield all other leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR HSCL2 TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } #if 0 /* optimization (HAS) */ if (howmany > 1) *out_minedge = minedges[randominteger(howmany)]; else *out_minedge = minedges[0]; #endif if (howmany > 1) { /* draw random edge */ int i, k, randomnum; randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (tmpedge[i].edgeinfo != minpenalty); *out_minedge = tmpedge[i].numedge; } } else { *out_minedge = minedges[0]; } *out_howmany = howmany; *out_minpenalty = minpenalty; } /* computepenaltiestree_recur */ /******************/ #if 0 /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_split(ONEEDGE *tmpedge, /* edge array */ int nextedge, /* next free edge idx */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ int **out_minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int i; /* counter */ int a, b; int idxA, idxB; int maxUP; /* index counter for right/left split cluster */ int howmany = 0; int *minedges = *out_minedges; uli minpenalty; for (i = 0; i < nextedge; i++) { (tmpedge[i]).penalty = 0; /* reset penalty */ maxUP = (tmpedge[i]).upsize; for (idxB = Maxspc - (tmpedge[i]).downsize; idxB < Maxspc; idxB++) { b = (tmpedge[i].split)[idxB]; for (idxA = 0; idxA < maxUP; idxA++) { a = (tmpedge[i].split)[idxA]; (tmpedge[i]).penalty += neighbormatr[a][b]; } /* for all root-sided (up) taxa */ } /* for all non-root-sided (down) taxa */ if (howmany == 0) { /* first edge: init */ if (minedges == NULL) minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); minedges[howmany++] = i; minpenalty = tmpedge[i].penalty; } else { /* -> all other edges */ if (minpenalty == tmpedge[i].penalty) { /* another min edge */ minedges[howmany++] = i; } else { /* -> not same minimum */ if (minpenalty > tmpedge[i].penalty) { /* new minimum penalty */ howmany = 0; minedges[howmany++] = i; minpenalty = tmpedge[i].penalty; } /* if new minimum */ } /* same minimum */ } /* if all other edges */ } /* for all edges */ *out_howmany = howmany, *out_minpenalty = minpenalty; #if 0 if (howmany > 1) *out_minedge = minedges[0]; else *out_minedge = minedges[0]; #endif } /* computepenalties_split */ #endif /******************/ /* trueID-ed (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_recur( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut) /* in: species permutation (trueID) */ { /* local variables: */ int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int idxA, idxB; int idxC, idxI; /* index counter for quartet leaves */ int chooseX, chooseY; /* end leaves of penalty path */ ONEEDGE *tmpedge; /* new array of edges */ int *tmpedgeofleaf; /* array of extern edge ptrs */ int tmprootleaf; /* root edge */ ulimatrix neighbormatr; ulivector leafpenalty; int *minedges; int howmany; neighbormatr = new_ulimatrix(Maxspc,Maxspc); leafpenalty = new_ulivector(Maxspc); minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); if (minedges == NULL) maerror("minimal edge set in onepstep_recur"); /* allocate and initialize new tree topology */ inittree_recur(&tmpedge, &tmpedgeofleaf, &tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); for (idxI = 3; idxI < Maxspc; idxI++) { i = permut[idxI]; /* initialize penalty neighborhood matrix + leafpenalty vector */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; leafpenalty[a] = 0; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] = 0; neighbormatr[b][a] = 0; } } /* for all entries in the upper neighbormatr */ /* * core of quartet puzzling algorithm */ for (idxA = 0; idxA < nextleaf - 2; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf - 1; idxB++) { b = permut[idxB]; for (idxC = idxB + 1; idxC < nextleaf; idxC++) { c = permut[idxC]; /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* de-trueID-ed (HAS) */ checkquartet(a, b, c, i, &chooseX, &chooseY); (neighbormatr[chooseX][chooseY])++; } /* for all quartets q=(a,b,c,i): c */ } /* for all quartets q=(a,b,c,i): b */ } /* for all quartets q=(a,b,c,i): a */ /* symetrize penalty neighborhood matrix */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] += neighbormatr[b][a]; neighbormatr[b][a] = neighbormatr[a][b]; leafpenalty[a] += neighbormatr[a][b]; leafpenalty[b] += neighbormatr[a][b]; } } /* for all entries in the upper neighbormatr */ #if 0 computepenalties_split(tmpedge, nextedge, Maxspc, neighbormatr, &minedges, &howmany, &mininfo, &minedge); #endif computepenaltiestree_recur(tmpedge, tmpedgeofleaf, tmprootleaf, nextleaf, Maxspc, neighbormatr, leafpenalty, minedges, &howmany, &mininfo, &minedge); /* add the next leaf on minedge */ addnextleaf_recur(minedge, tmpedge, tmpedgeofleaf, tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); } /* adding all other leafs */ *edge = tmpedge; /* export tree topology */ *edgeofleaf = tmpedgeofleaf; /* export array of extern edge ptrs */ *rootleaf = tmprootleaf; /* export root edge */ free(minedges); free_ulimatrix(neighbormatr); free_ulivector(leafpenalty); } /* onepstep_recur */ tree-puzzle-5.2/src/ml1.c0000644000076400001440000016053410073365157010773 /* * ml1.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif /******************************************************************************/ /* definitions and prototypes */ /******************************************************************************/ #define EXTERN extern /* prototypes */ #include #include #include #include #include "util.h" #include "ml.h" /*epe*/ #ifdef PARALLEL # include # include "ppuzzle.h" #endif #define STDOUT stdout #ifndef PARALLEL /* because printf() runs significantly faster */ /* than fprintf(stdout) on an Apple McIntosh */ /* (HS) */ # define FPRINTF printf # define STDOUTFILE #else # define FPRINTF fprintf # define STDOUTFILE STDOUT, void PP_Finalize(); /* prototype */ #endif EXTERN int printrmatr_optn; /* print rate matrix to screen */ #if 0 extern int PP_NumProcs; /*epe*/ /* might be included via ppuzzle.h ? */ extern int PP_Myid; /*epe*/ /* might be included via ppuzzle.h ? */ #endif /******************************************************************************/ /* compacting sequence data information */ /******************************************************************************/ /***************************** internal functions *****************************/ /* make all frequencies a little different */ void convfreq(dvector freqemp) { int i, j, maxi=0; double freq, maxfreq, sum; sum = 0.0; maxfreq = 0.0; for (i = 0; i < tpmradix; i++) { freq = freqemp[i]; if (freq < MINFREQ) freqemp[i] = MINFREQ; if (freq > maxfreq) { maxfreq = freq; maxi = i; } sum += freqemp[i]; } freqemp[maxi] += 1.0 - sum; for (i = 0; i < tpmradix - 1; i++) { for (j = i + 1; j < tpmradix; j++) { if (freqemp[i] == freqemp[j]) { freqemp[i] += MINFDIFF/2.0; freqemp[j] -= MINFDIFF/2.0; } } } } /* convfreq */ /* sort site patters of original input data */ void tp_radixsort(cmatrix seqchar, ivector ali, int maxspc, int maxsite, int *numptrn) { int i, j, k, l, n, pass; int *awork; int *count; awork = new_ivector(maxsite); count = new_ivector(tpmradix+1); #ifndef USE_WINDOWS for (i = 0; i < maxsite; i++) /* init alignment column order 0, 1, 2, ... */ ali[i] = i; #else alimaxsize = aliwinend - aliwinstart + 1; k = 0; for (i = aliwinstart; i < aliwinend; i++) { ali[k++] = i; #endif for (pass = maxspc - 1; pass >= 0; pass--) { /* for every taxon */ for (j = 0; j < tpmradix+1; j++) /* reset count array */ count[j] = 0; #ifndef USE_WINDOWS for (i = 0; i < maxsite; i++) /* counting bin size needed */ #else for (i = 0; i < alimaxsite; i++) /* counting bin size needed */ #endif count[(int) seqchar[pass][ali[i]]]++; for (j = 1; j < tpmradix+1; j++) /* converting bin sizes to start indices */ count[j] += count[j-1]; #ifndef USE_WINDOWS for (i = maxsite-1; i >= 0; i--) /* produce consistently sorted order of alignment columns for current species to awork */ #else for (i = alimaxsite-1; i >= 0; i--) /* produce consistently sorted order of alignment columns for current species to awork */ #endif awork[ --count[(int) seqchar[pass][ali[i]]] ] = ali[i]; for (i = 0; i < maxsite; i++) /* set intermediate order */ ali[i] = awork[i]; } free_ivector(awork); free_ivector(count); n = 1; #ifndef USE_WINDOWS for (j = 1; j < maxsite; j++) { /* counting number of site pattern */ #else for (j = 1; j < alimaxsite; j++) { /* counting number of site pattern */ #endif k = ali[j]; l = ali[j-1]; for (i = 0; i < maxspc; i++) { if (seqchar[i][l] != seqchar[i][k]) { n++; break; } } } *numptrn = n; } /* tp_radixsort */ void condenceseq(cmatrix seqchar, ivector ali, cmatrix seqconint, ivector weight, int maxspc, int maxsite, int numptrn) { int i, j, k, n; int agree_flag; /* boolean */ n = 0; k = ali[n]; #ifndef USE_WINDOWS for (i = 0; i < maxspc; i++) { #else for (i = aliwinstart - 1; i < aliwinend - 1; i++) { #endif seqconint[i][n] = seqchar[i][k]; } weight[n] = 1; Alias[k] = 0; #ifndef USE_WINDOWS for (j = 1; j < maxsite; j++) { #else for (j = 1; j < alimaxsite; j++) { #endif k = ali[j]; agree_flag = TRUE; for (i = 0; i < maxspc; i++) { if (seqconint[i][n] != seqchar[i][k]) { agree_flag = FALSE; break; } } if (agree_flag == FALSE) { n++; for (i = 0; i < maxspc; i++) { seqconint[i][n] = seqchar[i][k]; } weight[n] = 1; Alias[k] = n; } else { weight[n]++; Alias[k] = n; } } n++; if (numptrn != n) { /* Problem in condenceseq */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR A TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } /* condenceseq */ void countconstantsites(cmatrix seqpat, ivector weight, int maxspc, int numptrn, int *numconst, int *numconstpat) { int character, s, i, constflag; *numconst = 0; *numconstpat = 0; for (s = 0; s < numptrn; s++) { /* check all patterns */ constpat[s] = FALSE; constflag = TRUE; character = seqpat[0][s]; for (i = 1; i < maxspc; i++) { if (seqpat[i][s] != character) { constflag = FALSE; break; } } /* if constant pattern (patterns with wildcards are not */ /* constant) */ if (character != tpmradix && constflag) { (*numconst) = (*numconst) + weight[s]; (*numconstpat)++; constpat[s] = TRUE; } } } /* countconstantsites */ /***************************** exported functions *****************************/ void evaluateseqs() { ivector ali; convfreq(Freqtpm); /* make all frequencies slightly different */ ali = new_ivector(Maxsite); tp_radixsort(Seqchar, ali, Maxspc, Maxsite, &Numptrn); Seqpat = new_cmatrix(Maxspc, Numptrn); constpat = new_ivector(Numptrn); Weight = new_ivector(Numptrn); condenceseq(Seqchar, ali, Seqpat, Weight, Maxspc, Maxsite, Numptrn); free_ivector(ali); countconstantsites(Seqpat, Weight, Maxspc, Numptrn, &Numconst, &Numconstpat); fracconstpat = (double) Numconstpat / (double) Numptrn; #ifndef USE_WINDOWS fracconst = (double) Numconst / (double) Maxsite; #else fracconst = (double) Numconst / (double) alimaxsite; #endif } /* evaluateseqs */ /******************************************************************************/ /* computation of Pij(t) */ /******************************************************************************/ /***************************** internal functions *****************************/ void elmhes(dmatrix a, ivector ordr, int n) { int m, j, i; double y, x; for (i = 0; i < n; i++) ordr[i] = 0; for (m = 2; m < n; m++) { x = 0.0; i = m; for (j = m; j <= n; j++) { if (fabs(a[j - 1][m - 2]) > fabs(x)) { x = a[j - 1][m - 2]; i = j; } } ordr[m - 1] = i; /* vector */ if (i != m) { for (j = m - 2; j < n; j++) { y = a[i - 1][j]; a[i - 1][j] = a[m - 1][j]; a[m - 1][j] = y; } for (j = 0; j < n; j++) { y = a[j][i - 1]; a[j][i - 1] = a[j][m - 1]; a[j][m - 1] = y; } } if (x != 0.0) { for (i = m; i < n; i++) { y = a[i][m - 2]; if (y != 0.0) { y /= x; a[i][m - 2] = y; for (j = m - 1; j < n; j++) a[i][j] -= y * a[m - 1][j]; for (j = 0; j < n; j++) a[j][m - 1] += y * a[j][i]; } } } } } /* elmhes */ void eltran(dmatrix a, dmatrix zz, ivector ordr, int n) { int i, j, m; for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { zz[i][j] = 0.0; zz[j][i] = 0.0; } zz[i][i] = 1.0; } if (n <= 2) return; for (m = n - 1; m >= 2; m--) { for (i = m; i < n; i++) zz[i][m - 1] = a[i][m - 2]; i = ordr[m - 1]; if (i != m) { for (j = m - 1; j < n; j++) { zz[m - 1][j] = zz[i - 1][j]; zz[i - 1][j] = 0.0; } zz[i - 1][m - 1] = 1.0; } } } /* eltran */ void mcdiv(double ar, double ai, double br, double bi, double *cr, double *ci) { double s, ars, ais, brs, bis; s = fabs(br) + fabs(bi); ars = ar / s; ais = ai / s; brs = br / s; bis = bi / s; s = brs * brs + bis * bis; *cr = (ars * brs + ais * bis) / s; *ci = (ais * brs - ars * bis) / s; } /* mcdiv */ void hqr2(int n, int low, int hgh, dmatrix h, dmatrix zz, dvector wr, dvector wi) { int i, j, k, l=0, m, en, na, itn, its; double p=0, q=0, r=0, s=0, t, w, x=0, y, ra, sa, vi, vr, z=0, norm, tst1, tst2; int notlas; /* boolean */ norm = 0.0; k = 1; /* store isolated roots and compute matrix norm */ for (i = 0; i < n; i++) { for (j = k - 1; j < n; j++) norm += fabs(h[i][j]); k = i + 1; if (i + 1 < low || i + 1 > hgh) { wr[i] = h[i][i]; wi[i] = 0.0; } } en = hgh; t = 0.0; itn = n * 30; while (en >= low) { /* search for next eigenvalues */ its = 0; na = en - 1; while (en >= 1) { /* look for single small sub-diagonal element */ for (l = en; l > low; l--) { s = fabs(h[l - 2][l - 2]) + fabs(h[l - 1][l - 1]); if (s == 0.0) s = norm; tst1 = s; tst2 = tst1 + fabs(h[l - 1][l - 2]); if (tst2 == tst1) goto L100; } l = low; L100: x = h[en - 1][en - 1]; /* form shift */ if (l == en || l == na) break; if (itn == 0) { /* all eigenvalues have not converged */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR B TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } y = h[na - 1][na - 1]; w = h[en - 1][na - 1] * h[na - 1][en - 1]; /* form exceptional shift */ if (its == 10 || its == 20) { t += x; for (i = low - 1; i < en; i++) h[i][i] -= x; s = fabs(h[en - 1][na - 1]) + fabs(h[na - 1][en - 3]); x = 0.75 * s; y = x; w = -0.4375 * s * s; } its++; itn--; /* look for two consecutive small sub-diagonal elements */ for (m = en - 2; m >= l; m--) { z = h[m - 1][m - 1]; r = x - z; s = y - z; p = (r * s - w) / h[m][m - 1] + h[m - 1][m]; q = h[m][m] - z - r - s; r = h[m + 1][m]; s = fabs(p) + fabs(q) + fabs(r); p /= s; q /= s; r /= s; if (m == l) break; tst1 = fabs(p) * (fabs(h[m - 2][m - 2]) + fabs(z) + fabs(h[m][m])); tst2 = tst1 + fabs(h[m - 1][m - 2]) * (fabs(q) + fabs(r)); if (tst2 == tst1) break; } for (i = m + 2; i <= en; i++) { h[i - 1][i - 3] = 0.0; if (i != m + 2) h[i - 1][i - 4] = 0.0; } for (k = m; k <= na; k++) { notlas = (k != na); if (k != m) { p = h[k - 1][k - 2]; q = h[k][k - 2]; r = 0.0; if (notlas) r = h[k + 1][k - 2]; x = fabs(p) + fabs(q) + fabs(r); if (x != 0.0) { p /= x; q /= x; r /= x; } } if (x != 0.0) { if (p < 0.0) /* sign */ s = - sqrt(p * p + q * q + r * r); else s = sqrt(p * p + q * q + r * r); if (k != m) h[k - 1][k - 2] = -s * x; else { if (l != m) h[k - 1][k - 2] = -h[k - 1][k - 2]; } p += s; x = p / s; y = q / s; z = r / s; q /= p; r /= p; if (!notlas) { for (j = k - 1; j < n; j++) { /* row modification */ p = h[k - 1][j] + q * h[k][j]; h[k - 1][j] -= p * x; h[k][j] -= p * y; } j = (en < (k + 3)) ? en : (k + 3); /* min */ for (i = 0; i < j; i++) { /* column modification */ p = x * h[i][k - 1] + y * h[i][k]; h[i][k - 1] -= p; h[i][k] -= p * q; } /* accumulate transformations */ for (i = low - 1; i < hgh; i++) { p = x * zz[i][k - 1] + y * zz[i][k]; zz[i][k - 1] -= p; zz[i][k] -= p * q; } } else { for (j = k - 1; j < n; j++) { /* row modification */ p = h[k - 1][j] + q * h[k][j] + r * h[k + 1][j]; h[k - 1][j] -= p * x; h[k][j] -= p * y; h[k + 1][j] -= p * z; } j = (en < (k + 3)) ? en : (k + 3); /* min */ for (i = 0; i < j; i++) { /* column modification */ p = x * h[i][k - 1] + y * h[i][k] + z * h[i][k + 1]; h[i][k - 1] -= p; h[i][k] -= p * q; h[i][k + 1] -= p * r; } /* accumulate transformations */ for (i = low - 1; i < hgh; i++) { p = x * zz[i][k - 1] + y * zz[i][k] + z * zz[i][k + 1]; zz[i][k - 1] -= p; zz[i][k] -= p * q; zz[i][k + 1] -= p * r; } } } } /* for k */ } /* while infinite loop */ if (l == en) { /* one root found */ h[en - 1][en - 1] = x + t; wr[en - 1] = h[en - 1][en - 1]; wi[en - 1] = 0.0; en = na; continue; } y = h[na - 1][na - 1]; w = h[en - 1][na - 1] * h[na - 1][en - 1]; p = (y - x) / 2.0; q = p * p + w; z = sqrt(fabs(q)); h[en - 1][en - 1] = x + t; x = h[en - 1][en - 1]; h[na - 1][na - 1] = y + t; if (q >= 0.0) { /* real pair */ if (p < 0.0) /* sign */ z = p - fabs(z); else z = p + fabs(z); wr[na - 1] = x + z; wr[en - 1] = wr[na - 1]; if (z != 0.0) wr[en - 1] = x - w / z; wi[na - 1] = 0.0; wi[en - 1] = 0.0; x = h[en - 1][na - 1]; s = fabs(x) + fabs(z); p = x / s; q = z / s; r = sqrt(p * p + q * q); p /= r; q /= r; for (j = na - 1; j < n; j++) { /* row modification */ z = h[na - 1][j]; h[na - 1][j] = q * z + p * h[en - 1][j]; h[en - 1][j] = q * h[en - 1][j] - p * z; } for (i = 0; i < en; i++) { /* column modification */ z = h[i][na - 1]; h[i][na - 1] = q * z + p * h[i][en - 1]; h[i][en - 1] = q * h[i][en - 1] - p * z; } /* accumulate transformations */ for (i = low - 1; i < hgh; i++) { z = zz[i][na - 1]; zz[i][na - 1] = q * z + p * zz[i][en - 1]; zz[i][en - 1] = q * zz[i][en - 1] - p * z; } } else { /* complex pair */ wr[na - 1] = x + p; wr[en - 1] = x + p; wi[na - 1] = z; wi[en - 1] = -z; } en -= 2; } /* while en >= low */ /* backsubstitute to find vectors of upper triangular form */ if (norm != 0.0) { for (en = n; en >= 1; en--) { p = wr[en - 1]; q = wi[en - 1]; na = en - 1; if (q == 0.0) {/* real vector */ m = en; h[en - 1][en - 1] = 1.0; if (na != 0) { for (i = en - 2; i >= 0; i--) { w = h[i][i] - p; r = 0.0; for (j = m - 1; j < en; j++) r += h[i][j] * h[j][en - 1]; if (wi[i] < 0.0) { z = w; s = r; } else { m = i + 1; if (wi[i] == 0.0) { t = w; if (t == 0.0) { tst1 = norm; t = tst1; do { t = 0.01 * t; tst2 = norm + t; } while (tst2 > tst1); } h[i][en - 1] = -(r / t); } else { /* solve real equations */ x = h[i][i + 1]; y = h[i + 1][i]; q = (wr[i] - p) * (wr[i] - p) + wi[i] * wi[i]; t = (x * s - z * r) / q; h[i][en - 1] = t; if (fabs(x) > fabs(z)) h[i + 1][en - 1] = (-r - w * t) / x; else h[i + 1][en - 1] = (-s - y * t) / z; } /* overflow control */ t = fabs(h[i][en - 1]); if (t != 0.0) { tst1 = t; tst2 = tst1 + 1.0 / tst1; if (tst2 <= tst1) { for (j = i; j < en; j++) h[j][en - 1] /= t; } } } } } } else if (q > 0.0) { m = na; if (fabs(h[en - 1][na - 1]) > fabs(h[na - 1][en - 1])) { h[na - 1][na - 1] = q / h[en - 1][na - 1]; h[na - 1][en - 1] = (p - h[en - 1][en - 1]) / h[en - 1][na - 1]; } else mcdiv(0.0, -h[na - 1][en - 1], h[na - 1][na - 1] - p, q, &h[na - 1][na - 1], &h[na - 1][en - 1]); h[en - 1][na - 1] = 0.0; h[en - 1][en - 1] = 1.0; if (en != 2) { for (i = en - 3; i >= 0; i--) { w = h[i][i] - p; ra = 0.0; sa = 0.0; for (j = m - 1; j < en; j++) { ra += h[i][j] * h[j][na - 1]; sa += h[i][j] * h[j][en - 1]; } if (wi[i] < 0.0) { z = w; r = ra; s = sa; } else { m = i + 1; if (wi[i] == 0.0) mcdiv(-ra, -sa, w, q, &h[i][na - 1], &h[i][en - 1]); else { /* solve complex equations */ x = h[i][i + 1]; y = h[i + 1][i]; vr = (wr[i] - p) * (wr[i] - p); vr = vr + wi[i] * wi[i] - q * q; vi = (wr[i] - p) * 2.0 * q; if (vr == 0.0 && vi == 0.0) { tst1 = norm * (fabs(w) + fabs(q) + fabs(x) + fabs(y) + fabs(z)); vr = tst1; do { vr = 0.01 * vr; tst2 = tst1 + vr; } while (tst2 > tst1); } mcdiv(x * r - z * ra + q * sa, x * s - z * sa - q * ra, vr, vi, &h[i][na - 1], &h[i][en - 1]); if (fabs(x) > fabs(z) + fabs(q)) { h[i + 1] [na - 1] = (q * h[i][en - 1] - w * h[i][na - 1] - ra) / x; h[i + 1][en - 1] = (-sa - w * h[i][en - 1] - q * h[i][na - 1]) / x; } else mcdiv(-r - y * h[i][na - 1], -s - y * h[i][en - 1], z, q, &h[i + 1][na - 1], &h[i + 1][en - 1]); } /* overflow control */ t = (fabs(h[i][na - 1]) > fabs(h[i][en - 1])) ? fabs(h[i][na - 1]) : fabs(h[i][en - 1]); if (t != 0.0) { tst1 = t; tst2 = tst1 + 1.0 / tst1; if (tst2 <= tst1) { for (j = i; j < en; j++) { h[j][na - 1] /= t; h[j][en - 1] /= t; } } } } } } } } /* end back substitution. vectors of isolated roots */ for (i = 0; i < n; i++) { if (i + 1 < low || i + 1 > hgh) { for (j = i; j < n; j++) zz[i][j] = h[i][j]; } } /* multiply by transformation matrix to give vectors of * original full matrix. */ for (j = n - 1; j >= low - 1; j--) { m = ((j + 1) < hgh) ? (j + 1) : hgh; /* min */ for (i = low - 1; i < hgh; i++) { z = 0.0; for (k = low - 1; k < m; k++) z += zz[i][k] * h[k][j]; zz[i][j] = z; } } } return; } /* hqr2 */ /* make rate matrix with 0.01 expected substitutions per unit time */ void onepamratematrix(dmatrix a) { int i, j; double delta, temp, sum; dvector m; for (i = 0; i < tpmradix; i++) { for (j = 0; j < tpmradix; j++) { a[i][j] = Freqtpm[j]*a[i][j]; } } m = new_dvector(tpmradix); for (i = 0, sum = 0.0; i < tpmradix; i++) { for (j = 0, temp = 0.0; j < tpmradix; j++) temp += a[i][j]; m[i] = temp; /* row sum */ sum += temp*Freqtpm[i]; /* exp. rate */ } delta = 0.01 / sum; /* 0.01 subst. per unit time */ for (i = 0; i < tpmradix; i++) { for (j = 0; j < tpmradix; j++) { if (i != j) a[i][j] = delta * a[i][j]; else a[i][j] = delta * (-m[i]); } } free_dvector(m); } /* onepamratematrix */ /* print rate matrix to fp for testing purposes */ void printratematrix(FILE *fp, dmatrix a, int do_multpi) { int i, j; double sum = 0.0; double rowsum; /* fprintf(fp, "\n"); */ for (i = 0; i < tpmradix; i++) { rowsum = 0.0; fprintf(fp, "%-10s ",int2code(i)); for (j = 0; j < tpmradix; j++) { if (! do_multpi) { fprintf(fp, "%10.5f", a[i][j]); if (i != j) rowsum += a[i][j]; } else { fprintf(fp, "%10.5f", a[i][j] * Freqtpm[i]); if (i != j) rowsum += a[i][j] * Freqtpm[i]; /* if (i != j) rowsum += Freqtpm[i] * a[i][j]; */ } } sum += rowsum; fprintf(fp, " row=%10.5f\n",rowsum); } fprintf(fp, "off-diagonal sum = %10.5f\n", sum); } /* printratematrix */ void eigensystem( dvector eval, /* vector of Eigen-values */ dmatrix evec) /* vector of Eigen-vectors*/ { dvector evali, forg; dmatrix a, b; ivector ordr; int i, j, k, error; double zero; ordr = new_ivector(tpmradix); evali = new_dvector(tpmradix); forg = new_dvector(tpmradix); a = new_dmatrix(tpmradix,tpmradix); b = new_dmatrix(tpmradix,tpmradix); rtfdata(a, forg); /* get relative transition matrix and frequencies */ if (printrmatr_optn) { fprintf(stdout, "Current rate matrix R :\n"); printratematrix(stdout, a, FALSE); /* print rate matrix */ printratematrix(stdout, a, TRUE); /* print rate matrix */ fprintf(stdout, "\n"); } onepamratematrix(a); /* make 1 PAM rate matrix */ if (printrmatr_optn) { fprintf(stdout, "Current transition matrix Q (1 PAM normalized):\n"); /* print rate matrix */ printratematrix(stdout, a, FALSE); /* print rate matrix multiplied with pi */ printratematrix(stdout, a, TRUE); /* print rate matrix multiplied with pi */ } /* copy a to b */ for (i = 0; i < tpmradix; i++) for (j = 0; j < tpmradix; j++) b[i][j] = a[i][j]; elmhes(a, ordr, tpmradix); /* compute eigenvalues and eigenvectors */ eltran(a, evec, ordr, tpmradix); hqr2(tpmradix, 1, tpmradix, a, evec, eval, evali); /* check eigenvalue equation */ error = FALSE; for (j = 0; j < tpmradix; j++) { for (i = 0, zero = 0.0; i < tpmradix; i++) { for (k = 0; k < tpmradix; k++) zero += b[i][k] * evec[k][j]; zero -= eval[j] * evec[i][j]; if (fabs(zero) > 1.0e-5) error = TRUE; } } if (error) fprintf(STDOUT, "\nWARNING: Eigensystem doesn't satisfy eigenvalue equation!\n"); free_ivector(ordr); free_dvector(evali); free_dvector(forg); free_dmatrix(a); free_dmatrix(b); } /* eigensystem */ void luinverse(dmatrix inmat, dmatrix imtrx, int size) { double eps = 1.0e-20; /* ! */ int i, j, k, l, maxi=0, idx, ix, jx; double sum, tmp, maxb, aw; ivector index; double *wk; dmatrix omtrx; index = new_ivector(tpmradix); omtrx = new_dmatrix(tpmradix,tpmradix); /* copy inmat to omtrx */ for (i = 0; i < tpmradix; i++) for (j = 0; j < tpmradix; j++) omtrx[i][j] = inmat[i][j]; wk = (double *) calloc((size_t)size, sizeof(double)); aw = 1.0; for (i = 0; i < size; i++) { maxb = 0.0; for (j = 0; j < size; j++) { if (fabs(omtrx[i][j]) > maxb) maxb = fabs(omtrx[i][j]); } if (maxb == 0.0) { /* Singular matrix */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR C TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } wk[i] = 1.0 / maxb; } for (j = 0; j < size; j++) { for (i = 0; i < j; i++) { sum = omtrx[i][j]; for (k = 0; k < i; k++) sum -= omtrx[i][k] * omtrx[k][j]; omtrx[i][j] = sum; } maxb = 0.0; for (i = j; i < size; i++) { sum = omtrx[i][j]; for (k = 0; k < j; k++) sum -= omtrx[i][k] * omtrx[k][j]; omtrx[i][j] = sum; tmp = wk[i] * fabs(sum); if (tmp >= maxb) { maxb = tmp; maxi = i; } } if (j != maxi) { for (k = 0; k < size; k++) { tmp = omtrx[maxi][k]; omtrx[maxi][k] = omtrx[j][k]; omtrx[j][k] = tmp; } aw = -aw; wk[maxi] = wk[j]; } index[j] = maxi; if (omtrx[j][j] == 0.0) omtrx[j][j] = eps; if (j != size - 1) { tmp = 1.0 / omtrx[j][j]; for (i = j + 1; i < size; i++) omtrx[i][j] *= tmp; } } for (jx = 0; jx < size; jx++) { for (ix = 0; ix < size; ix++) wk[ix] = 0.0; wk[jx] = 1.0; l = -1; for (i = 0; i < size; i++) { idx = index[i]; sum = wk[idx]; wk[idx] = wk[i]; if (l != -1) { for (j = l; j < i; j++) sum -= omtrx[i][j] * wk[j]; } else if (sum != 0.0) l = i; wk[i] = sum; } for (i = size - 1; i >= 0; i--) { sum = wk[i]; for (j = i + 1; j < size; j++) sum -= omtrx[i][j] * wk[j]; wk[i] = sum / omtrx[i][i]; } for (ix = 0; ix < size; ix++) imtrx[ix][jx] = wk[ix]; } free((char *)wk); wk = NULL; free_ivector(index); free_dmatrix(omtrx); } /* luinverse */ void checkevector(dmatrix evec, dmatrix ivec, int nn) { int i, j, ia, ib, ic, error; dmatrix matx; double sum; matx = new_dmatrix(nn, nn); /* multiply matrix of eigenvectors and its inverse */ for (ia = 0; ia < nn; ia++) { for (ic = 0; ic < nn; ic++) { sum = 0.0; for (ib = 0; ib < nn; ib++) sum += evec[ia][ib] * ivec[ib][ic]; matx[ia][ic] = sum; } } /* check whether the unitary matrix is obtained */ error = FALSE; for (i = 0; i < nn; i++) { for (j = 0; j < nn; j++) { if (i == j) { if (fabs(matx[i][j] - 1.0) > 1.0e-5) error = TRUE; } else { if (fabs(matx[i][j]) > 1.0e-5) error = TRUE; } } } if (error) { fprintf(STDOUT, "\nWARNING: Inversion of eigenvector matrix not perfect!\n"); } free_dmatrix(matx); } /* checkevector */ /***************************** exported functions *****************************/ /* compute 1 PAM rate matrix, its eigensystem, and the inverse matrix thereof */ void tranprobmat() { eigensystem(Eval, Evec); /* eigensystem of 1 PAM rate matrix */ luinverse(Evec, Ievc, tpmradix); /* inverse eigenvectors are in Ievc */ checkevector(Evec, Ievc, tpmradix); /* check whether inversion was OK */ } /* tranprobmat */ /* compute P(t) */ void tprobmtrx(double arc, dmatrix tpr) { register int i, j, k; register double temp; for (k = 0; k < tpmradix; k++) { temp = exp(arc * Eval[k]); for (j = 0; j < tpmradix; j++) iexp[k][j] = Ievc[k][j] * temp; } for (i = 0; i < tpmradix; i++) { for (j = 0; j < tpmradix; j++) { temp = 0.0; for (k = 0; k < tpmradix; k++) temp += Evec[i][k] * iexp[k][j]; tpr[i][j] = fabs(temp); } } } /* tprobmtrx */ /******************************************************************************/ /* estimation of maximum likelihood distances */ /******************************************************************************/ /* compute total log-likelihood input: likelihoods for each site and non-zero rate output: total log-likelihood (incl. zero rate category) */ double comptotloglkl(dmatrix cdl) { int k, r; double loglkl, fv, fv2, sitelkl; loglkl = 0.0; fv = 1.0-fracinv; fv2 = (1.0-fracinv)/(double) numcats; if (numcats == 1) { for (k = 0; k < Numptrn; k++) { /* compute likelihood for pattern k */ sitelkl = cdl[0][k]*fv; if (constpat[k] == TRUE) sitelkl += fracinv*Freqtpm[(int) Seqpat[0][k]]; /* total log-likelihood */ loglkl += log(sitelkl)*Weight[k]; } } else { for (k = 0; k < Numptrn; k++) { /* this general routine works always but it's better to run it only when it's really necessary */ /* compute likelihood for pattern k */ sitelkl = 0.0; for (r = 0; r < numcats; r++) sitelkl += cdl[r][k]; sitelkl = fv2*sitelkl; if (constpat[k] == TRUE) sitelkl += fracinv*Freqtpm[(int) Seqpat[0][k]]; /* total log-likelihood */ loglkl += log(sitelkl)*Weight[k]; } } return loglkl; } /* comptotloglkl */ /* computes the site log-likelihoods input: likelihoods for each site and non-zero rate output: log-likelihood for each site */ void allsitelkl(dmatrix cdl, dvector aslkl) { int k, r; double fv, fv2, sitelkl; fv = 1.0-fracinv; fv2 = (1.0-fracinv)/(double) numcats; if (numcats == 1) { for (k = 0; k < Numptrn; k++) { /* compute likelihood for pattern k */ sitelkl = cdl[0][k]*fv; if (constpat[k] == TRUE) sitelkl += fracinv*Freqtpm[(int) Seqpat[0][k]]; /* site log-likelihood */ aslkl[k] = log(sitelkl); } } else { for (k = 0; k < Numptrn; k++) { /* this general routine works always but it's better to run it only when it's really necessary */ /* compute likelihood for pattern k */ sitelkl = 0.0; for (r = 0; r < numcats; r++) sitelkl += cdl[r][k]; sitelkl = fv2*sitelkl; if (constpat[k] == TRUE) sitelkl += fracinv*Freqtpm[(int) Seqpat[0][k]]; /* total log-likelihood */ aslkl[k] = log(sitelkl); } } } /* allsitelkl */ /* YYYY */ /* computes the site log-likelihoods input: likelihoods for each site and non-zero rate output: log-likelihood for each site */ void writesitelklvectorbin(FILE *outf, dvector aslkl) { int s; int dsize; dsize = sizeof(double); for (s = 0; s < Maxsite; s++) { fprintf(stdout, "%4d (%4d) %.5f \n", s, Alias[s], aslkl[Alias[s]]); if( 1 != fwrite( &(aslkl[Alias[s]]), dsize, 1, outf) ) { fprintf(stderr, "ERROR writing log-likelihood of site %d to file!!!\n", Alias[s]); # if PARALLEL PP_Finalize(); # endif exit (1); } } } /* writesitelklvectorbin */ /* outputs a name and its log-likelihoods to outf */ void writesitelklvectorphy(FILE *outf, char *name, int numsite, dvector aslkl) { int s; int dsize; dsize = sizeof(double); fprintf(outf, "%s", name); for (s = 0; s < Maxsite; s++) { if( 0 == fprintf(outf, " %.5f", aslkl[Alias[s]])) { fprintf(stderr, "ERROR writing log-likelihood of site %d for '%s' to file!!!\n", Alias[s], name); # if PARALLEL PP_Finalize(); # endif exit (1); } } fprintf(outf, "\n"); } /* writesitelklvectorphy */ /* outputs a name and its log-likelihoods to outf */ void writesitelklmatrixphy(FILE *outf, int numut, int numsite, dmatrix allslkl, dmatrix allslklc, int clock) { int t; char tmpname[20]; if (clock) fprintf(outf, " %d %d \n", 2 * numut, numsite); else fprintf(outf, " %d %d \n", numut, numsite); for (t = 0; t < numut; t++) { sprintf(tmpname, "tr%-7d ", t+1); writesitelklvectorphy(outf, tmpname, numsite, allslkl[t]); } if (clock) { for (t = 0; t < numut; t++) { sprintf(tmpname, "ctr%-7d ", t+1); writesitelklvectorphy(outf, tmpname, numsite, allslklc[t]); } } } /* writesitelklmatrixphy */ /***************************** internal functions *****************************/ /* compute negative log-likelihood of distance arc between sequences seqchi/j */ double pairlkl(double arc) { int k, r, ci, cj; double loglkl, fv, sitelkl; /* compute tpms */ for (r = 0; r < numcats; r++) /* compute tpm for rate category r */ tprobmtrx(arc*Rates[r], ltprobr[r]); loglkl = 0.0; fv = 1.0-fracinv; if (numcats == 1) { for (k = 0; k < Numptrn; k++) { /* compute likelihood for site k */ ci = seqchi[k]; cj = seqchj[k]; if (ci != tpmradix && cj != tpmradix) sitelkl = ltprobr[0][ci][cj]*fv; else sitelkl = fv; if (ci == cj && ci != tpmradix) sitelkl += fracinv*Freqtpm[ci]; /* total log-likelihood */ loglkl += log(sitelkl)*Weight[k]; } } else { for (k = 0; k < Numptrn; k++) { /* this general routine works always but it's better to run it only when it's really necessary */ /* compute likelihood for site k */ ci = seqchi[k]; cj = seqchj[k]; if (ci != tpmradix && cj != tpmradix) { sitelkl = 0.0; for (r = 0; r < numcats; r++) sitelkl += ltprobr[r][ci][cj]; sitelkl = fv*sitelkl/(double) numcats; } else sitelkl = fv; if (ci == cj && ci != tpmradix) sitelkl += fracinv*Freqtpm[ci]; /* total log-likelihood */ loglkl += log(sitelkl)*Weight[k]; } } /* return negative log-likelihood as we use a minimizing procedure */ return -loglkl; } /* pairlkl */ /***************************** exported functions *****************************/ /* maximum likelihood distance between sequence i and j */ double mldistance(int i, int j, double init) { double dist, fx, f2x; if (i == j) return 0.0; /* use old distance as start value */ /*epe dist = Distanmat[i][j];*/ dist = init; if (dist == 0.0) return 0.0; seqchi = Seqpat[i]; seqchj = Seqpat[j]; if (dist <= MINARC) dist = MINARC+1.0; if (dist >= MAXARC) dist = MAXARC-1.0; dist = onedimenmin(MINARC, dist, MAXARC, pairlkl, EPSILON_BRANCH, &fx, &f2x); return dist; } /* mldistance */ /* initialize distance matrix */ void initdistan() { int i, j, k, diff, x, y; double obs, temp; for (i = 0; i < Maxspc; i++) { Distanmat[i][i] = 0.0; for (j = i + 1; j < Maxspc; j++) { seqchi = Seqpat[i]; seqchj = Seqpat[j]; /* count observed differences */ diff = 0; for (k = 0; k < Numptrn; k++) { x = seqchi[k]; y = seqchj[k]; if (x != y && x != tpmradix && y != tpmradix) diff += Weight[k]; } if (diff == 0) Distanmat[i][j] = 0.0; else { /* use generalized JC correction to get first estimate (for the SH model the observed distance is used) */ /* observed distance */ #ifndef USE_WINDOWS obs = (double) diff / (double) Maxsite; #else obs = (double) diff / (double) alimaxsite; #endif temp = 1.0 - (double) obs*tpmradix/(tpmradix-1.0); if (temp > 0.0 && !(data_optn == 0 && SH_optn)) /* use JC corrected distance */ Distanmat[i][j] = -100.0*(tpmradix-1.0)/tpmradix * log(temp); else /* use observed distance */ Distanmat[i][j] = obs * 100.0; if (Distanmat[i][j] < MINARC) Distanmat[i][j] = MINARC; if (Distanmat[i][j] > MAXARC) Distanmat[i][j] = MAXARC; } Distanmat[j][i] = Distanmat[i][j]; } } } /* initdistan */ /* compute distance matrix */ /*epe*/ #if PARALLEL void computedistan() { int i, slaveno, loop; int xr, yr, xs=0, ys=1, numstartjobs=0, dummychunk=0; dvector startval, dummyval=new_dvector(1); ivector startlen = new_ivector(PP_NumProcs), startpoint = new_ivector(PP_NumProcs); imatrix coords = new_imatrix(PP_NumProcs, 3); schedtype sched; MPI_Status stat; loop = .5 * Maxspc * (Maxspc-1); initsched(&sched, loop, PP_NumProcs-1, 1); if (PP_NumProcs < loop) loop = PP_NumProcs-1; startlen[0] = 0; startpoint[0] = 0; /*Send first min(#numprocs, #matrix entries) matrix entries - one to each processor. If #numprocs > #matrix entries, send all matrix entries; some processors remain idle.*/ for (slaveno = 1; slaveno < PP_NumProcs; slaveno++) { if (slaveno<=loop) { unsigned int chunks = SCHEDALG_PARAM_EST(&sched); startlen[slaveno] = chunks; startpoint[slaveno] = numstartjobs; numstartjobs += chunks; coords[slaveno][0] = xs; coords[slaveno][1] = ys; coords[slaveno][2] = chunks; PP_NextCoord(&xs, &ys, chunks); } else startlen[slaveno] = 0; } startval = new_dvector(numstartjobs); PP_DMToVector(0, 1, numstartjobs, startval); MPI_Scatterv(startval, startlen, startpoint, MPI_DOUBLE, dummyval, dummychunk, MPI_DOUBLE, PP_MyMaster, PP_Comm); free_dvector(startval); /*The remaining matrix entries (if there are any) are sent to those processors that are returning results.*/ while (xspartials; while (cp->isop->isop != op) { cp = cp->isop; cpc = cp->partials; for (r = 0; r < numcats; r++) for (i = 0; i < Numptrn; i++) for (j = 0; j < tpmradix; j++) opc[r][i][j] *= cpc[r][i][j]; } } /* productpartials */ /* compute internal partial likelihoods */ void partialsinternal(Node *op) { int i, j, k, r; double sum; dcube oprob, cprob; if (clockmode == 1) { /* clocklike branch lengths */ for (r = 0; r < numcats; r++) { tprobmtrx((op->lengthc)*Rates[r], ltprobr[r]); } } else { /* non-clocklike branch lengths */ for (r = 0; r < numcats; r++) { tprobmtrx((op->length)*Rates[r], ltprobr[r]); } } oprob = op->partials; cprob = op->kinp->isop->partials; for (r = 0; r < numcats; r++) { for (k = 0; k < Numptrn; k++) { for (i = 0; i < tpmradix; i++) { sum = 0.0; for (j = 0; j < tpmradix; j++) sum += ltprobr[r][i][j] * cprob[r][k][j]; oprob[r][k][i] = sum; } } } } /* partialsinternal */ /* compute external partial likelihoods */ void partialsexternal(Node *op) { int i, j, k, r; dcube oprob; cvector dseqi; if (clockmode == 1) { /* clocklike branch lengths */ for (r = 0; r < numcats; r++) { tprobmtrx((op->lengthc)*Rates[r], ltprobr[r]); } } else { /* nonclocklike branch lengths */ for (r = 0; r < numcats; r++) { tprobmtrx((op->length)*Rates[r], ltprobr[r]); } } oprob = op->partials; dseqi = op->kinp->eprob; for (r = 0; r < numcats; r++) { for (k = 0; k < Numptrn; k++) { if ((j = dseqi[k]) == tpmradix) { for (i = 0; i < tpmradix; i++) oprob[r][k][i] = 1.0; } else { for (i = 0; i < tpmradix; i++) oprob[r][k][i] = ltprobr[r][i][j]; } } } } /* partialsexternal */ /* compute all partial likelihoods */ void initpartials(Tree *tr) { Node *cp, *rp; cp = rp = tr->rootp; do { cp = cp->isop->kinp; if (cp->isop == NULL) { /* external node */ cp = cp->kinp; /* not descen */ partialsexternal(cp); } else { /* internal node */ if (!cp->descen) { productpartials(cp->kinp->isop); partialsinternal(cp); } } } while (cp != rp); } /* initpartials */ /* compute log-likelihood given internal branch with length arc between partials partiali and partials partialj */ double intlkl(double arc) { double sumlk, slk; int r, s, i, j; dmatrix cdl; cdl = Ctree->condlkl; for (r = 0; r < numcats; r++) { tprobmtrx(arc*Rates[r], ltprobr[r]); } for (r = 0; r < numcats; r++) { for (s = 0; s < Numptrn; s++) { sumlk = 0.0; for (i = 0; i < tpmradix; i++) { slk = 0.0; for (j = 0; j < tpmradix; j++) slk += partialj[r][s][j] * ltprobr[r][i][j]; sumlk += Freqtpm[i] * partiali[r][s][i] * slk; } cdl[r][s] = sumlk; } } /* compute total log-likelihood for current tree */ Ctree->lklhd = comptotloglkl(cdl); return -(Ctree->lklhd); /* we use a minimizing procedure */ } /* intlkl */ /* optimize internal branch */ void optinternalbranch(Node *op) { double arc, fx, f2x; partiali = op->isop->partials; partialj = op->kinp->isop->partials; arc = op->length; /* nonclocklike branch lengths */ if (arc <= MINARC) arc = MINARC+1.0; if (arc >= MAXARC) arc = MAXARC-1.0; arc = onedimenmin(MINARC, arc, MAXARC, intlkl, EPSILON_BRANCH, &fx, &f2x); op->kinp->length = arc; op->length = arc; /* variance of branch length */ f2x = fabs(f2x); if (1.0/(MAXARC*MAXARC) < f2x) op->varlen = 1.0/f2x; else op->varlen = MAXARC*MAXARC; } /* optinternalbranch */ /* compute log-likelihood given external branch with length arc between partials partiali and sequence seqchi */ double extlkl(double arc) { double sumlk; int r, s, i, j; dvector opb; dmatrix cdl; cdl = Ctree->condlkl; for (r = 0; r < numcats; r++) { tprobmtrx(arc*Rates[r], ltprobr[r]); } for (r = 0; r < numcats; r++) { for (s = 0; s < Numptrn; s++) { opb = partiali[r][s]; sumlk = 0.0; if ((j = seqchi[s]) != tpmradix) { for (i = 0; i < tpmradix; i++) sumlk += (Freqtpm[i] * (opb[i] * ltprobr[r][i][j])); } else { for (i = 0; i < tpmradix; i++) sumlk += Freqtpm[i] * opb[i]; } cdl[r][s] = sumlk; } } /* compute total log-likelihood for current tree */ Ctree->lklhd = comptotloglkl(cdl); return -(Ctree->lklhd); /* we use a minimizing procedure */ } /* extlkl */ /* optimize external branch */ void optexternalbranch(Node *op) { double arc, fx, f2x; partiali = op->isop->partials; seqchi = op->kinp->eprob; arc = op->length; /* nonclocklike branch lengths */ if (arc <= MINARC) arc = MINARC+1.0; if (arc >= MAXARC) arc = MAXARC-1.0; arc = onedimenmin(MINARC, arc, MAXARC, extlkl, EPSILON_BRANCH, &fx, &f2x); op->kinp->length = arc; op->length = arc; /* variance of branch length */ f2x = fabs(f2x); if (1.0/(MAXARC*MAXARC) < f2x) op->varlen = 1.0/f2x; else op->varlen = MAXARC*MAXARC; } /* optexternalbranch */ /* finish likelihoods for each rate and site */ void finishlkl(Node *op) { int r, k, i, j; double arc, sumlk, slk; dmatrix cdl; partiali = op->isop->partials; partialj = op->kinp->isop->partials; cdl = Ctree->condlkl; arc = op->length; /* nonclocklike branch lengths */ for (r = 0; r < numcats; r++) { tprobmtrx(arc*Rates[r], ltprobr[r]); } for (r = 0; r < numcats; r++) { for (k = 0; k < Numptrn; k++) { sumlk = 0.0; for (i = 0; i < tpmradix; i++) { slk = 0.0; for (j = 0; j < tpmradix; j++) slk += partialj[r][k][j] * ltprobr[r][i][j]; sumlk += Freqtpm[i] * partiali[r][k][i] * slk; } cdl[r][k] = sumlk; } } } /* finishlkl */ /***************************** exported functions *****************************/ /* optimize branch lengths to get maximum likelihood (nonclocklike branchs) */ double optlkl(Tree *tr) { Node *cp, *rp; int nconv; double lendiff; clockmode = 0; /* nonclocklike branch lengths */ nconv = 0; Converg = FALSE; initpartials(tr); for (Numit = 1; (Numit <= MAXIT) && (!Converg); Numit++) { cp = rp = tr->rootp; do { cp = cp->isop->kinp; productpartials(cp->kinp->isop); if (cp->isop == NULL) { /* external node */ cp = cp->kinp; /* not descen */ lendiff = cp->length; optexternalbranch(cp); lendiff = fabs(lendiff - cp->length); if (lendiff < EPSILON_BRANCH) nconv++; else nconv = 0; partialsexternal(cp); } else { /* internal node */ if (cp->descen) { partialsinternal(cp); } else { lendiff = cp->length; optinternalbranch(cp); lendiff = fabs(lendiff - cp->length); if (lendiff < EPSILON_BRANCH) nconv++; else nconv = 0; /* eventually compute likelihoods for each site */ if ((cp->number == Numibrnch-1 && lendiff < EPSILON_BRANCH) || Numit == MAXIT-1) finishlkl(cp); partialsinternal(cp); } } if (nconv >= Numbrnch) { /* convergence */ Converg = TRUE; cp = rp; /* get out of here */ } } while (cp != rp); } /* compute total log-likelihood for current tree */ return comptotloglkl(tr->condlkl); } /* optlkl */ /* compute likelihood of tree for given branch lengths */ double treelkl(Tree *tr) { int i, k, r; Node *cp; dmatrix cdl; dcube prob1, prob2; double sumlk; /* compute for each site and rate log-likelihoods */ initpartials(tr); cp = tr->rootp; productpartials(cp->isop); prob1 = cp->partials; prob2 = cp->isop->partials; cdl = tr->condlkl; for (r = 0; r < numcats; r++) { for (k = 0; k < Numptrn; k++) { sumlk = 0.0; for (i = 0; i < tpmradix; i++) sumlk += Freqtpm[i] * (prob1[r][k][i] * prob2[r][k][i]); cdl[r][k] = sumlk; } } /* return total log-likelihood for current tree */ return comptotloglkl(cdl); } /* treelkl */ /******************************************************************************/ /* least-squares estimate of branch lengths */ /******************************************************************************/ /***************************** internal functions *****************************/ void luequation(dmatrix amat, dvector yvec, int size) { double eps = 1.0e-20; /* ! */ int i, j, k, l, maxi=0, idx; double sum, tmp, maxb, aw; dvector wk; ivector index; wk = new_dvector(size); index = new_ivector(size); aw = 1.0; for (i = 0; i < size; i++) { maxb = 0.0; for (j = 0; j < size; j++) { if (fabs(amat[i][j]) > maxb) maxb = fabs(amat[i][j]); } if (maxb == 0.0) { /* Singular matrix */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR D TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } wk[i] = 1.0 / maxb; } for (j = 0; j < size; j++) { for (i = 0; i < j; i++) { sum = amat[i][j]; for (k = 0; k < i; k++) sum -= amat[i][k] * amat[k][j]; amat[i][j] = sum; } maxb = 0.0; for (i = j; i < size; i++) { sum = amat[i][j]; for (k = 0; k < j; k++) sum -= amat[i][k] * amat[k][j]; amat[i][j] = sum; tmp = wk[i] * fabs(sum); if (tmp >= maxb) { maxb = tmp; maxi = i; } } if (j != maxi) { for (k = 0; k < size; k++) { tmp = amat[maxi][k]; amat[maxi][k] = amat[j][k]; amat[j][k] = tmp; } aw = -aw; wk[maxi] = wk[j]; } index[j] = maxi; if (amat[j][j] == 0.0) amat[j][j] = eps; if (j != size - 1) { tmp = 1.0 / amat[j][j]; for (i = j + 1; i < size; i++) amat[i][j] *= tmp; } } l = -1; for (i = 0; i < size; i++) { idx = index[i]; sum = yvec[idx]; yvec[idx] = yvec[i]; if (l != -1) { for (j = l; j < i; j++) sum -= amat[i][j] * yvec[j]; } else if (sum != 0.0) l = i; yvec[i] = sum; } for (i = size - 1; i >= 0; i--) { sum = yvec[i]; for (j = i + 1; j < size; j++) sum -= amat[i][j] * yvec[j]; yvec[i] = sum / amat[i][i]; } free_ivector(index); free_dvector(wk); } /* luequation */ /* least square estimation of branch lengths used for the approximate ML and as starting point in the calculation of the exact value of the ML */ /*epe*/ #if PARALLEL void lslength_par(Tree *tr, dvector distanvec, int numspc, int numibrnch, dvector Brnlength) { int i, i1, j, j1, j2, k, numbrnch, numpair, initmsg[2]; unsigned long int isum; double sum, leng, alllen, rss; ivector pths, jobsize = new_ivector(PP_NumProcs), atamt_tmp_coord = new_ivector(PP_NumProcs); dvector my_atamt_tmp, atamt_tmp; ivector IPaths; cmatrix atmt; dmatrix atamt; Node **ebp, **ibp; int numjobs, my_jobsize, my_x=0, my_y=0; if (PP_Myid != PP_MyMaster) { fprintf(STDOUT, "ERROR: Slave [%d] in parallel lslength()!\n", PP_Myid); return; } numbrnch = numspc + numibrnch; numpair = (numspc * (numspc - 1)) / 2; atmt = new_cmatrix(numbrnch, numpair); atamt = new_dmatrix(numbrnch, numbrnch); initmsg[0] = numspc; initmsg[1] = numibrnch; for (i=1; iibrnchp; IPaths = new_ivector(numibrnch*numspc); for (i=0; ipaths[j]; MPI_Bcast(IPaths, numibrnch*numspc, MPI_INT, PP_MyMaster, PP_Comm); free_ivector(IPaths); numjobs = (numbrnch * (numbrnch+1))/2; my_jobsize = numjobs/PP_NumProcs; if (numjobs%PP_NumProcs>0) my_jobsize++; jobsize[0] = my_jobsize; for (i=1; ipaths; for (j1 = 1, j = 0; j1 < numspc; j1++) { for (j2 = 0; j2 < j1; j2++, j++) { if (pths[j1] != pths[j2]) atmt[i][j] = 1; else atmt[i][j] = 0; } } } if (PP_Myid == PP_MyMaster) { my_atamt_tmp = new_dvector(my_jobsize); #ifdef VT VT_begin(1020); #endif for (i = 0; i < my_jobsize; i++) { for (k = 0, isum = 0; k < numpair; k++) if (atmt[my_x][k] && atmt[my_y][k]) isum ++; my_atamt_tmp[i] = (double) isum; PP_NextCoord_atamt(&my_x, &my_y, 1, numbrnch); } #ifdef VT VT_end(1020); #endif atamt_tmp = new_dvector(numjobs); MPI_Gatherv(my_atamt_tmp, my_jobsize, MPI_DOUBLE, atamt_tmp, jobsize, atamt_tmp_coord, MPI_DOUBLE, PP_MyMaster, PP_Comm); free_dvector(my_atamt_tmp); k=0; for (i = 0; i < numbrnch; i++) { for (j = 0; j <= i; j++) { atamt[i][j] = atamt_tmp[k]; atamt[j][i] = atamt_tmp[k]; k++; } } free_dvector(atamt_tmp); } else { #ifdef VT VT_begin(1020); #endif for (i = 0; i < numbrnch; i++) { for (j = 0; j <= i; j++) { for (k = 0, isum = 0; k < numpair; k++) if (atmt[i][k] && atmt[j][k]) isum ++; atamt[i][j] = (double) isum; atamt[j][i] = (double) isum; } } } for (i = 0; i < numbrnch; i++) { for (k = 0, sum = 0.0; k < numpair; k++) if (atmt[i][k]) sum += distanvec[k]; Brnlength[i] = sum; } luequation(atamt, Brnlength, numbrnch); for (i = 0, rss = 0.0; i < numpair; i++) { sum = distanvec[i]; for (j = 0; j < numbrnch; j++) { if (atmt[j][i] && Brnlength[j] > 0.0) sum -= Brnlength[j]; } rss += sum * sum; } tr->rssleast = sqrt(rss); alllen = 0.0; ebp = tr->ebrnchp; for (i = 0; i < numspc; i++) { leng = Brnlength[i]; alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ebp[i]->lengthc = leng; ebp[i]->kinp->lengthc = leng; } else { /* no clock */ ebp[i]->length = leng; ebp[i]->kinp->length = leng; } Brnlength[i] = leng; } for (i = 0, j = numspc; i < numibrnch; i++, j++) { leng = Brnlength[j]; alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ibp[i]->lengthc = leng; ibp[i]->kinp->lengthc = leng; } else { /* no clock */ ibp[i]->length = leng; ibp[i]->kinp->length = leng; } Brnlength[j] = leng; } free_cmatrix(atmt); free_dmatrix(atamt); } /* lslength_par */ #endif /* PARALLEL */ /* Ekki's sped-up version of lslength */ void lslength(Tree *tr, dvector distanvec, int numspc, int numibrnch, dvector Brnlength) { int i, i1, j, j1, j2, k, numbrnch, numpair; unsigned long int isum; double sum, leng, alllen, rss; ivector pths; cmatrix atmt; dmatrix atamt; Node **ebp, **ibp; numbrnch = numspc + numibrnch; numpair = (numspc * (numspc - 1)) / 2; atmt = new_cmatrix(numbrnch, numpair); atamt = new_dmatrix(numbrnch, numbrnch); ebp = tr->ebrnchp; ibp = tr->ibrnchp; for (i = 0; i < numspc; i++) { for (j1 = 1, j = 0; j1 < numspc; j1++) { if (j1 == i) { for (j2 = 0; j2 < j1; j2++, j++) { atmt[i][j] = 1; } } else { for (j2 = 0; j2 < j1; j2++, j++) { if (j2 == i) atmt[i][j] = 1; else atmt[i][j] = 0; } } } } for (i1 = 0, i = numspc; i1 < numibrnch; i1++, i++) { pths = ibp[i1]->paths; for (j1 = 1, j = 0; j1 < numspc; j1++) { for (j2 = 0; j2 < j1; j2++, j++) { if (pths[j1] != pths[j2]) atmt[i][j] = 1; else atmt[i][j] = 0; } } } for (i = 0; i < numbrnch; i++) { for (j = 0; j <= i; j++) { for (k = 0, isum = 0; k < numpair; k++) if (atmt[i][k] && atmt[j][k]) isum ++; atamt[i][j] = (double) isum; atamt[j][i] = (double) isum; } } for (i = 0; i < numbrnch; i++) { for (k = 0, sum = 0.0; k < numpair; k++) sum += (double) atmt[i][k] * distanvec[k]; Brnlength[i] = sum; } luequation(atamt, Brnlength, numbrnch); for (i = 0, rss = 0.0; i < numpair; i++) { sum = distanvec[i]; for (j = 0; j < numbrnch; j++) { if (atmt[j][i] && Brnlength[j] > 0.0) sum -= Brnlength[j]; } rss += sum * sum; } tr->rssleast = sqrt(rss); alllen = 0.0; for (i = 0; i < numspc; i++) { leng = Brnlength[i]; alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ebp[i]->lengthc = leng; ebp[i]->kinp->lengthc = leng; } else { /* no clock */ ebp[i]->length = leng; ebp[i]->kinp->length = leng; } Brnlength[i] = leng; } for (i = 0, j = numspc; i < numibrnch; i++, j++) { leng = Brnlength[j]; alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ibp[i]->lengthc = leng; ibp[i]->kinp->lengthc = leng; } else { /* no clock */ ibp[i]->length = leng; ibp[i]->kinp->length = leng; } Brnlength[j] = leng; } free_cmatrix(atmt); free_dmatrix(atamt); } /* lslength */ #if 0 /* old slow least square fit */ void lslength(Tree *tr, dvector distanvec, int numspc, int numibrnch, dvector Brnlength) { int i, i1, j, j1, j2, k, numbrnch, numpair; double sum, leng, alllen, rss; ivector pths; dmatrix atmt, atamt; Node **ebp, **ibp; numbrnch = numspc + numibrnch; numpair = (numspc * (numspc - 1)) / 2; atmt = new_dmatrix(numbrnch, numpair); atamt = new_dmatrix(numbrnch, numbrnch); ebp = tr->ebrnchp; ibp = tr->ibrnchp; for (i = 0; i < numspc; i++) { for (j1 = 1, j = 0; j1 < numspc; j1++) { if (j1 == i) { for (j2 = 0; j2 < j1; j2++, j++) { atmt[i][j] = 1.0; } } else { for (j2 = 0; j2 < j1; j2++, j++) { if (j2 == i) atmt[i][j] = 1.0; else atmt[i][j] = 0.0; } } } } for (i1 = 0, i = numspc; i1 < numibrnch; i1++, i++) { pths = ibp[i1]->paths; for (j1 = 1, j = 0; j1 < numspc; j1++) { for (j2 = 0; j2 < j1; j2++, j++) { if (pths[j1] != pths[j2]) atmt[i][j] = 1.0; else atmt[i][j] = 0.0; } } } for (i = 0; i < numbrnch; i++) { for (j = 0; j <= i; j++) { for (k = 0, sum = 0.0; k < numpair; k++) sum += atmt[i][k] * atmt[j][k]; atamt[i][j] = sum; atamt[j][i] = sum; } } for (i = 0; i < numbrnch; i++) { for (k = 0, sum = 0.0; k < numpair; k++) sum += atmt[i][k] * distanvec[k]; Brnlength[i] = sum; } luequation(atamt, Brnlength, numbrnch); for (i = 0, rss = 0.0; i < numpair; i++) { sum = distanvec[i]; for (j = 0; j < numbrnch; j++) { if (atmt[j][i] == 1.0 && Brnlength[j] > 0.0) sum -= Brnlength[j]; } rss += sum * sum; } tr->rssleast = sqrt(rss); alllen = 0.0; for (i = 0; i < numspc; i++) { leng = Brnlength[i]; alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ebp[i]->lengthc = leng; ebp[i]->kinp->lengthc = leng; } else { /* no clock */ ebp[i]->length = leng; ebp[i]->kinp->length = leng; } Brnlength[i] = leng; } for (i = 0, j = numspc; i < numibrnch; i++, j++) { leng = Brnlength[j]; alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ibp[i]->lengthc = leng; ibp[i]->kinp->lengthc = leng; } else { /* no clock */ ibp[i]->length = leng; ibp[i]->kinp->length = leng; } Brnlength[j] = leng; } free_dmatrix(atmt); free_dmatrix(atamt); } /* lslength */ #endif /* set branch lengths to the externally given lengths (-usebranchlen) */ void setextlength(Tree *tr, int numspc, int numibrnch, dvector Brnlength) { int i, j, numbrnch; double leng, alllen; Node **ebp, **ibp; numbrnch = numspc + numibrnch; ebp = tr->ebrnchp; ibp = tr->ibrnchp; alllen = 0.0; for (i = 0; i < numspc; i++) { if (ebp[i]->lengthset) { leng = ebp[i]->lengthext; } else { if (ebp[i]->kinp->lengthset) { leng = ebp[i]->kinp->lengthext; } else { fprintf(stderr, "WARNING: no branchlength set, defaults to 0.0!!!"); leng = 0.0; } } alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ebp[i]->lengthc = leng; ebp[i]->kinp->lengthc = leng; } else { /* no clock */ ebp[i]->length = leng; ebp[i]->kinp->length = leng; } Brnlength[i] = leng; } for (i = 0, j = numspc; i < numibrnch; i++, j++) { if (ibp[i]->lengthset) { leng = ibp[i]->lengthext; } else { if (ibp[i]->kinp->lengthset) { leng = ibp[i]->kinp->lengthext; } else { fprintf(stderr, "WARNING: no branchlength set, defaults to 0.0!!!"); leng = 0.0; } } alllen += leng; if (leng < MINARC) leng = MINARC; if (leng > MAXARC) leng = MAXARC; if (clockmode) { /* clock */ ibp[i]->lengthc = leng; ibp[i]->kinp->lengthc = leng; } else { /* no clock */ ibp[i]->length = leng; ibp[i]->kinp->length = leng; } Brnlength[j] = leng; } } /* setextlength */ tree-puzzle-5.2/src/ml2.c0000644000076400001440000014627310073365170010773 /* * ml2.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern /* prototypes */ #include #include #include #include #include #include "util.h" #include "ml.h" #define STDOUT stdout #ifndef PARALLEL /* because printf() runs significantly faster */ /* than fprintf(stdout) on an Apple McIntosh */ /* (HS) */ # define FPRINTF printf # define STDOUTFILE #else # define FPRINTF fprintf # define STDOUTFILE STDOUT, void PP_Finalize(); #endif #define CHAR_PER_TREENODE 53 /* prototypes for two functions of puzzle2.c */ void fputid10(FILE *, int); int fputid(FILE *, int); /******************************************************************************/ /* user tree input */ /******************************************************************************/ /* read/convert branch length from string stream itfp */ double freadedgelength(double *length, char *ch, FILE *itfp) { long digit, ordzero; int dotread; double divisor; int minusread; ordzero = '0'; dotread = FALSE; minusread = FALSE; *length = 0.0; divisor = 1.0; *ch = fgetc(itfp); digit = (long)(*ch - ordzero); while ( ((digit <= 9) && (digit >= 0)) || *ch == '.' || *ch == '-' ) { if (*ch == '.' ) dotread = TRUE; else if (*ch == '-' ) minusread = TRUE; else { *length = *length * 10.0 + digit; if (dotread) divisor *= 10.0; } ch++; *ch = fgetc(itfp); digit = (long)(*ch - ordzero); } *length *= divisor; if (minusread) *length = -(*length); return (*length); } /* freadedgelength */ /* read/convert branch length from string *ch */ double sreadedgelength(double *length, char **ch) { long digit, ordzero; int dotread; double divisor; int minusread; ordzero = '0'; dotread = FALSE; minusread = FALSE; *length = 0.0; divisor = 1.0; /* **ch = fgetc(itfp); */ if (**ch == ':') (*ch)++; digit = (long)((**ch) - ordzero); while ( ((digit <= 9) && (digit >= 0)) || **ch == '.' || **ch == '-' ) { if (**ch == '.' ) dotread = TRUE; else if (**ch == '-' ) minusread = TRUE; else { *length = *length * 10.0 + digit; if (dotread) divisor *= 10.0; } (*ch)++; /* *ch = fgetc(itfp); */ digit = (long)((**ch) - ordzero); } *length *= 100; *length /= divisor; if (minusread) *length = -(*length); return (*length); } /* sreadedgelength */ void fremovecomment(FILE *itfp, char *ci) { int comment; if (*ci == '[') comment = 1; else { comment = 0; return; } do { *ci = fgetc(itfp); if (*ci == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing ';' or ',' in tree)\n\n\n"); exit(1); } if ((*ci == ']') && comment) { comment = 0; *ci = fgetc(itfp); } if (*ci == '[') comment = 1; } while (comment); } /* fremovecomment */ /* read user tree, drop all blanks, tabs, and newlines. Drop edgelengths (after :) but keep internal labels. Check whether all pairs of brackets match. */ void getusertree(FILE *itfp, cvector tr, int maxlen, int usebranch) { int n; int brac; char ci; /* look for opening bracket */ n = 0; brac = 0; do { ci = fgetc(itfp); if (ci == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing start bracket in tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (ci == '[') fremovecomment(itfp, &ci); } while ((ci != '(')); tr[n] = ci; brac++; do { /* get next character (skip blanks, newlines, and tabs) */ do { ci = fgetc(itfp); if (ci == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (no more characters in tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (ci == '[') fremovecomment(itfp, &ci); } while (isspace((int) ci)); /* remove edgelengths, if not needed (HAS) */ if (ci == ':') { /* skip characters until a ,) appears */ if (!usebranch) { do { ci = fgetc(itfp); if (ci == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing ';' or ',' in tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (ci == '[') fremovecomment(itfp, &ci); } while ((ci != ',' && ci != ')') ); } else { /* if usebranch */ n++; tr[n] = ci; /* add ':' to string */ do { ci = fgetc(itfp); if (ci == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing ';' or ',' in tree)\n\n\n"); exit(1); } if (ci == '[') fremovecomment(itfp, &ci); if(!isspace((int) ci) && (ci != ',') && (ci != ')')) { n++; tr[n] = ci; }; } while ((ci != ',' && ci != ')') ); } } if (ci == '(') { brac++; } if (ci == ')') { brac--; } n++; tr[n] = ci; } while ((ci != ';') && (n != maxlen-2)); if (n == maxlen-2) { fprintf(STDOUT, "\n\n\nUnable to proceed (tree description too long)\n\n\n"); fprintf(STDOUT, ">>%s<<\n\n\n", tr); # if PARALLEL PP_Finalize(); # endif exit(1); } if (brac != 0) { fprintf(STDOUT, "\n\n\nUnable to proceed (brackets don't match in tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } n++; tr[n] = '\0'; } /* getusertree */ Node *internalnode(Tree *tr, char **chpp, int *ninode) { Node *xp; Node *np; Node *rp; int i, j; int dvg; int ff; int stop; int numc; char ident[100]; char idcomp[11]; char *idp; double blen; (*chpp)++; if (**chpp == '(') { /* process subgroup */ xp = internalnode(tr, chpp, ninode); xp->isop = xp; dvg = 1; while (**chpp != ')') { if (**chpp == '\0') { fprintf(STDOUT, "\n\n\nUnable to proceed (unexpected end of tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } dvg++; /* insert edges around node */ np = internalnode(tr, chpp, ninode); np->isop = xp->isop; xp->isop = np; xp = np; } /* closing bracket reached */ /* read edgelength !!!! (HAS) */ (*chpp)++; if (dvg < 2) { fprintf(STDOUT, "\n\n\nUnable to proceed (only one OTU inside pair of brackets)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if ((*ninode) >= Maxspc-3) { /* all internal nodes already used */ fprintf(STDOUT, "\n\n\nUnable to proceed (no unrooted tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } rp = tr->ibrnchp[*ninode]; rp->isop = xp->isop; xp->isop = rp; for (j = 0; j < Numspc; j++) rp->paths[j] = 0; xp = rp->isop; while (xp != rp) { for (j = 0; j < Numspc; j++) { if (xp->paths[j] == 1) rp->paths[j] = 1; } xp = xp->isop; } (*ninode)++; if ((**chpp) == ',' || (**chpp) == ')') return rp->kinp; if ((**chpp) == '\0') { fprintf(STDOUT, "\n\n\nUnable to proceed (unexpected end of tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if ((**chpp) != ':') { /* read internal label into rp->label (max. 20 characters) */ rp->label = new_cvector(21); (rp->label)[0] = '\0'; for (numc = 0; ((numc < 20) && ((**chpp) != ':')); numc++) { if ((**chpp) == ',' || (**chpp) == ')') return rp->kinp; if ((**chpp) == '\0') { fprintf(STDOUT, "\n\n\nUnable to proceed (unexpected end of tree)\n\n\n"); exit(1); } (rp->label)[numc] = **chpp; (rp->label)[numc+1] = '\0'; (*chpp)++; } /* skip the rest of the internal label */ while (((**chpp) != ',') && ((**chpp) != ')') && ((**chpp) != ':')) { (*chpp)++; if ((**chpp) == '\0') { fprintf(STDOUT, "\n\n\nUnable to proceed (unexpected end of tree)\n\n\n"); exit(1); } } } /* if ! ':' */ /* read edgelength !!!! (HAS) */ if (**chpp == ':') { (void) sreadedgelength(&blen, chpp); rp->lengthext=blen; rp->lengthset=1; rp->kinp->lengthext=blen; rp->kinp->lengthset=1; } return rp->kinp; } else { /* process species names */ /* read species name */ for (idp = ident; **chpp != ',' && **chpp != ')' && **chpp != ':' && **chpp != '\0'; (*chpp)++) { *idp++ = **chpp; } *idp = '\0'; /* look for internal number */ idcomp[10] = '\0'; for (i = 0; i < Maxspc; i++) { ff = 0; stop = FALSE; do { idcomp[ff] = Identif[i][ff]; ff++; if (idcomp[ff-1] == ' ') stop = TRUE; } while (!stop && (ff != 10)); if (stop) idcomp[ff-1] = '\0'; if (!strcmp(ident, idcomp)) { if (usedtaxa[i]) { fprintf(STDOUT, "\n\n\nUnable to proceed (multiple occurence of sequence '"); fprintf(STDOUT, "%s' in tree)\n\n\n", ident); # if PARALLEL PP_Finalize(); # endif exit(1); } usedtaxa[i] = TRUE; /* read edgelength !!!! (HAS) */ if (**chpp == ':') { (void) sreadedgelength(&blen, chpp); tr->ebrnchp[i]->lengthext=blen; tr->ebrnchp[i]->lengthset=1; tr->ebrnchp[i]->kinp->lengthext=blen; tr->ebrnchp[i]->kinp->lengthset=1; } return tr->ebrnchp[i]->kinp; } } fprintf(STDOUT, "\n\n\nUnable to proceed (unknown sequence '%s' in tree)\n\n\n", ident); # if PARALLEL PP_Finalize(); # endif exit(1); } return NULL; /* never returned but without some compilers complain */ } /* internalnode */ /* make tree structure, the tree description may contain internal labels but no edge lengths */ void constructtree(Tree *tr, cvector strtree, int usebranch) { char *chp; /* char ptr to tree string */ int ninode; /* number of internal nodes < Maxspc-3 */ int i; /* counter */ int dvg; /* degree vertex ? */ int numc; /* char counter */ Node *xp; /* last read Node/Subtree */ Node *np; /* newly read Node/Subtree */ ninode = 0; chp = strtree; usedtaxa = new_ivector(Maxspc); for (i = 0; i < Maxspc; i++) usedtaxa[i] = FALSE; xp = internalnode(tr, &chp, &ninode); xp->isop = xp; dvg = 1; while (*chp != ')') { /* look for closing bracket */ if (*chp == '\0') { fprintf(STDOUT, "\n\n\nUnable to proceed (unexpected end of tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } dvg++; /* insert edges around node */ np = internalnode(tr, &chp, &ninode); np->isop = xp->isop; xp->isop = np; xp = np; } for (i = 0; i < Maxspc; i++) if (usedtaxa[i] == FALSE) { fprintf(STDOUT, "\n\n\nUnable to proceed (sequences missing in tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* closing bracket reached */ if (dvg < 3) { fprintf(STDOUT, "\n\n\nUnable to proceed (no unrooted tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } tr->rootp = xp; Numibrnch = ninode; Numbrnch = Numspc + ninode; chp++; if (*chp == ';' || *chp == '\0') { free_ivector(usedtaxa); return; } /* copy last internal label (max. 20 characters) */ xp->label = new_cvector(21); (xp->label)[0] = *chp; (xp->label)[1] = '\0'; for (numc = 1; numc < 20; numc++) { chp++; if (*chp == ';' || *chp == '\0') { free_ivector(usedtaxa); return; } else { (xp->label)[numc] = *chp; (xp->label)[numc+1] = '\0'; } } free_ivector(usedtaxa); return; } /* constructtree */ /* remove possible basal bifurcation */ void removebasalbif(cvector strtree) { int n, c, brak, cutflag, h; /* check how many OTUs on basal level */ n = 0; c = 0; brak = 0; do { if (strtree[n] == '(') brak++; if (strtree[n] == ')') brak--; if (strtree[n] == ',' && brak == 1) c++; /* number of commas in outer bracket */ n++; } while (strtree[n] != '\0'); /* if only 1 OTU inside outer bracket stop now */ if (c == 0) { fprintf(STDOUT, "\n\n\nUnable to proceed (Only 1 OTU inside outer bracket in tree)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* if only 2 OTUs inside outer bracket delete second pair of brackets from the right to remove basal bifurcation */ if (c == 1) { n = 0; brak = 0; cutflag = 0; /* not yet cutted */ h = 0; do { if (strtree[n] == '(') brak++; if (strtree[n] == ')') brak--; if (brak == 2 && cutflag == 0) cutflag = 1; /* cutting */ if (brak == 1 && cutflag == 1) { cutflag = 2; /* cutted */ /* leave out internal label */ do { h++; } while (strtree[n+h] != ')' && strtree[n+h] != ','); } if (cutflag == 1) strtree[n] = strtree[n+1]; if (cutflag == 2) strtree[n-1] = strtree[n+h]; n++; } while (strtree[n] != '\0'); } } /* removebasalbif */ void makeusertree(FILE *itfp, int usebranchlen) { cvector strtree; strtree = new_cvector(CHAR_PER_TREENODE*2*Maxspc); /* for treefile */ getusertree(itfp, strtree, CHAR_PER_TREENODE*2*Maxspc, usebranchlen); removebasalbif(strtree); constructtree(Ctree, strtree, usebranchlen); free_cvector(strtree); } /* makeusertree */ /******************************************************************************/ /* memory organisation for maximum likelihood tree */ /******************************************************************************/ /* initialise new tree */ Tree *new_tree(int maxspc, int numptrn, cmatrix seqconint) { int n, i, maxibrnch; Tree *tr; Node *dp, *up; maxibrnch = maxspc - 3; heights = (Node **) calloc((size_t)(maxspc-2), sizeof(Node *)); if (heights == NULL) maerror("heights in new_tree"); tr = (Tree *) calloc((size_t)1, sizeof(Tree)); if (tr == NULL) maerror("tr in new_tree"); tr->ebrnchp = (Node **) calloc((size_t)maxspc, sizeof(Node *)); if (tr->ebrnchp == NULL) maerror("ebrnchp in new_tree"); tr->ibrnchp = (Node **) calloc((size_t)maxibrnch, sizeof(Node *)); if (tr->ibrnchp == NULL) maerror("ibrnchp in new_tree"); tr->condlkl = new_dmatrix(numcats, numptrn); for (n = 0; n < maxspc; n++) { dp = (Node *) calloc((size_t) 1, sizeof(Node)); if (dp == NULL) maerror("dp in new_tree"); up = (Node *) calloc((size_t) 1, sizeof(Node)); if (up == NULL) maerror("up in new_tree"); dp->isop = NULL; up->isop = NULL; dp->kinp = up; up->kinp = dp; dp->descen = TRUE; up->descen = FALSE; dp->number = n; up->number = n; dp->length = 0.0; up->length = 0.0; dp->lengthc = 0.0; up->lengthc = 0.0; dp->lengthext = 0.0; up->lengthext = 0.0; dp->lengthset = FALSE; up->lengthset = FALSE; dp->varlen = 0.0; up->varlen = 0.0; dp->paths = new_ivector(maxspc); up->paths = dp->paths; for (i = 0; i < maxspc; i++) dp->paths[i] = 0; dp->paths[n] = 1; dp->eprob = seqconint[n]; up->eprob = NULL; dp->partials = NULL; up->partials = new_dcube(numcats, numptrn, tpmradix); tr->ebrnchp[n] = dp; up->label = NULL; dp->label = NULL; } for (n = 0; n < maxibrnch; n++) { dp = (Node *) calloc((size_t) 1, sizeof(Node)); if (dp == NULL) maerror("dp in new_tree"); up = (Node *) calloc((size_t) 1, sizeof(Node)); if (up == NULL) maerror("up in new_tree"); dp->isop = NULL; up->isop = NULL; dp->kinp = up; up->kinp = dp; dp->descen = TRUE; up->descen = FALSE; dp->number = n; up->number = n; dp->length = 0.0; up->length = 0.0; dp->lengthc = 0.0; up->lengthc = 0.0; dp->lengthext = 0.0; up->lengthext = 0.0; dp->lengthset = FALSE; up->lengthset = FALSE; dp->varlen = 0.0; up->varlen = 0.0; dp->paths = new_ivector(maxspc); up->paths = dp->paths; for (i = 0; i < maxspc; i++) dp->paths[i] = 0; dp->eprob = NULL; up->eprob = NULL; dp->partials = new_dcube(numcats, numptrn, tpmradix); up->partials = new_dcube(numcats, numptrn, tpmradix); tr->ibrnchp[n] = dp; up->label = NULL; dp->label = NULL; } tr->rootp = NULL; /* * reserve memory for lengths of the tree branches * and for the distance matrix as a vector * (needed for LS estimation of tree branch lengths) */ Brnlength = new_dvector(2 * maxspc - 3); Distanvec = new_dvector((maxspc * (maxspc - 1)) / 2); return tr; } /* new_tree */ /* initialise quartet tree */ Tree *new_quartet(int numptrn, cmatrix seqconint) { int n, i; Tree *tr; Node *dp, *up; heights = (Node **) calloc((size_t) 2, sizeof(Node *)); if (heights == NULL) maerror("heights in new_quartet"); /* reserve memory for tree */ tr = (Tree *) calloc((size_t) 1, sizeof(Tree)); if (tr == NULL) maerror("tr in new_quartet"); tr->ebrnchp = (Node **) calloc((size_t) 4, sizeof(Node *)); if (tr->ebrnchp == NULL) maerror("ebrnchp in new_quartet"); tr->ibrnchp = (Node **) calloc((size_t) 1, sizeof(Node *)); if (tr->ibrnchp == NULL) maerror("ibrnchp in new_quartet"); tr->condlkl = new_dmatrix(numcats, numptrn); /* reserve memory for nodes */ for (n = 0; n < 4; n++) { dp = (Node *) calloc((size_t) 1, sizeof(Node)); if (dp == NULL) maerror("dp in new_quartet"); up = (Node *) calloc((size_t) 1, sizeof(Node)); if (up == NULL) maerror("dp in new_quartet"); dp->isop = NULL; dp->kinp = up; up->kinp = dp; dp->descen = TRUE; up->descen = FALSE; dp->number = n; up->number = n; dp->length = 0.0; up->length = 0.0; dp->lengthc = 0.0; up->lengthc = 0.0; dp->lengthext = 0.0; up->lengthext = 0.0; dp->lengthset = FALSE; up->lengthset = FALSE; dp->varlen = 0.0; up->varlen = 0.0; dp->paths = new_ivector(4); up->paths = dp->paths; for (i = 0; i < 4; i++) dp->paths[i] = 0; dp->paths[n] = 1; dp->eprob = seqconint[n]; /* make quartet (0,1)-(2,3) as default */ up->eprob = NULL; dp->partials = NULL; up->partials = new_dcube(numcats, numptrn, tpmradix); tr->ebrnchp[n] = dp; } /* reserve memory for internal branch */ dp = (Node *) calloc((size_t) 1, sizeof(Node)); if (dp == NULL) maerror("dp in new_quartet"); up = (Node *) calloc((size_t) 1, sizeof(Node)); if (up == NULL) maerror("dp in new_quartet"); dp->isop = tr->ebrnchp[3]->kinp; /* connect internal branch */ up->isop = tr->ebrnchp[0]->kinp; dp->kinp = up; up->kinp = dp; dp->descen = TRUE; up->descen = FALSE; dp->number = 0; up->number = 0; dp->length = 0.0; up->length = 0.0; dp->lengthc = 0.0; up->lengthc = 0.0; dp->lengthext = 0.0; up->lengthext = 0.0; dp->lengthset = FALSE; up->lengthset = FALSE; dp->varlen = 0.0; up->varlen = 0.0; dp->paths = new_ivector(4); up->paths = dp->paths; up->paths[0] = 0; up->paths[1] = 0; up->paths[2] = 1; up->paths[3] = 1; dp->eprob = NULL; up->eprob = NULL; dp->partials = new_dcube(numcats, numptrn, tpmradix); up->partials = new_dcube(numcats, numptrn, tpmradix); tr->ibrnchp[0] = dp; /* place root */ tr->rootp = up; /* connect external branches */ tr->ebrnchp[0]->kinp->isop = tr->ebrnchp[1]->kinp; tr->ebrnchp[1]->kinp->isop = tr->rootp; tr->ebrnchp[3]->kinp->isop = tr->ebrnchp[2]->kinp; tr->ebrnchp[2]->kinp->isop = tr->rootp->kinp; /* * reserve memory for lengths of the five branches * of a quartet and for the six possible distances * (needed for LS estimation of branch lengths) */ Brnlength = new_dvector(NUMQBRNCH); Distanvec = new_dvector(NUMQSPC*(NUMQSPC-1)/2); return tr; } /* new_quartet */ /* free tree memory */ void free_tree(Tree *tr, int taxa) { int n; Node *dp, *up; free(heights); free_dmatrix(tr->condlkl); for (n = 0; n < taxa; n++) { dp = tr->ebrnchp[n]; up = dp->kinp; free_ivector(dp->paths); free_dcube(up->partials); free(dp); free(up); } free(tr->ebrnchp); for (n = 0; n < (taxa-3); n++) { dp = tr->ibrnchp[n]; up = dp->kinp; free_dcube(dp->partials); free_dcube(up->partials); free_ivector(dp->paths); if (dp->label != NULL) free_cvector(dp->label); if (up->label != NULL) free_cvector(up->label); free(dp); free(up); } free(tr->ibrnchp); free(tr); free_dvector(Brnlength); /* branch lengths (for LS estimation) */ free_dvector(Distanvec); /* distances (for LS estimation) */ } /* free_tree */ /* make (a,b)-(c,d) quartet a ---+ +--- c +-----+ b ---+ +--- d species numbers range from 0 to Maxspc - 1 */ void make_quartet(int a, int b, int c, int d) { /* place sequences */ Ctree->ebrnchp[0]->eprob = Seqpat[a]; Ctree->ebrnchp[1]->eprob = Seqpat[b]; Ctree->ebrnchp[2]->eprob = Seqpat[c]; Ctree->ebrnchp[3]->eprob = Seqpat[d]; /* make distance vector */ Distanvec[0] = Distanmat[b][a]; Distanvec[1] = Distanmat[c][a]; Distanvec[2] = Distanmat[c][b]; Distanvec[3] = Distanmat[d][a]; Distanvec[4] = Distanmat[d][b]; Distanvec[5] = Distanmat[d][c]; } /* make_quartet */ /* write distance matrix as vector */ void changedistan(dmatrix distanmat, dvector distanvec, int numspc) { int i, j, k; for (k = 0, i = 1; i < numspc; i++) { for (j = 0; j < i; j++, k++) distanvec[k] = distanmat[i][j]; } } /* changedistan */ /******************************************************************************/ /* computation of maximum likelihood tree */ /******************************************************************************/ /* compute the likelihood for (a,b)-(c,d) quartet */ double quartet_lklhd(int a, int b, int c, int d) { /* reserve memory for quartet if necessary */ if (mlmode != ML_QUART) { /* no quartet tree */ if (Ctree != NULL) free_tree(Ctree, Numspc); Ctree = new_quartet(Numptrn, Seqpat); Numbrnch = NUMQBRNCH; Numibrnch = NUMQIBRNCH; Numspc = NUMQSPC; mlmode = ML_QUART; } /* make (a,b)-(c,d) quartet */ make_quartet(a,b,c,d); clockmode = 0; /* nonclocklike branch lengths */ /* least square estimate for branch length */ lslength(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); /* compute likelihood */ Ctree->lklhd = optlkl(Ctree); return Ctree->lklhd; } /* quartet_lklhd */ /* compute the approximate likelihood for (a,b)-(c,d) quartet */ double quartet_alklhd(int a, int b, int c, int d) { /* reserve memory for quartet if necessary */ if (mlmode != ML_QUART) { /* no quartet tree */ if (Ctree != NULL) free_tree(Ctree, Numspc); Ctree = new_quartet(Numptrn, Seqpat); Numbrnch = NUMQBRNCH; Numibrnch = NUMQIBRNCH; Numspc = NUMQSPC; mlmode = ML_QUART; } /* make (a,b)-(c,d) quartet */ make_quartet(a,b,c,d); clockmode = 0; /* nonclocklike branch lengths */ /* least square estimate for branch length */ lslength(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); /* compute likelihood */ Ctree->lklhd = treelkl(Ctree); return Ctree->lklhd; } /* quartet_alklhd */ /* read usertree from file to memory */ void readusertree(FILE *ifp, int usebranch) { /* reserve memory for tree if necessary */ if (mlmode != ML_TREE) { /* no tree */ if (Ctree != NULL) free_tree(Ctree, Numspc); Ctree = new_tree(Maxspc, Numptrn, Seqpat); Numbrnch = 2*Maxspc-3; Numibrnch = Maxspc-3; Numspc = Maxspc; mlmode = ML_TREE; } /* read tree */ makeusertree(ifp, usebranch); } /* readusertree */ /* compute the likelihood of a usertree */ double usertree_lklhd(int usebranch, int parallel) { /* be sure to have a usertree in memory and to have pairwise distances computed */ clockmode = 0; /* nonclocklike branch lengths */ if(usebranch) { /* set preset barnch lengths from usertree file */ setextlength(Ctree, Numspc, Numibrnch, Brnlength); /* compute likelihood */ Ctree->lklhd = treelkl(Ctree); } else { /* least square estimate for branch length */ changedistan(Distanmat, Distanvec, Numspc); /*epe*/ # if PARALLEL if (parallel) lslength_par(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); else # endif lslength(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); /* compute and optimize likelihood */ Ctree->lklhd = optlkl(Ctree); } return Ctree->lklhd; } /* usertree_lklhd */ /* compute the approximate likelihood of a usertree */ double usertree_alklhd(int usebranch, int parallel) { /* be sure to have a usertree in memory and to have pairwise distances computed */ clockmode = 0; /* nonclocklike branch lengths */ if(usebranch) { /* set preset barnch lengths from usertree file */ setextlength(Ctree, Numspc, Numibrnch, Brnlength); } else { /* least square estimate for branch length */ changedistan(Distanmat, Distanvec, Numspc); /*epe*/ # if PARALLEL if (parallel) lslength_par(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); else # endif lslength(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); } /* compute likelihood */ Ctree->lklhd = treelkl(Ctree); return Ctree->lklhd; } /* usertree_alklhd */ /* preparation for ML analysis */ void mlstart() { /* number of states and code length */ tpmradix = gettpmradix(); /* declare variables */ Eval = new_dvector(tpmradix); Evec = new_dmatrix(tpmradix,tpmradix); Ievc = new_dmatrix(tpmradix,tpmradix); iexp = new_dmatrix(tpmradix,tpmradix); Alias = new_ivector(Maxsite); /* process sequence information */ evaluateseqs(); bestrate = new_ivector(Numptrn); /* compute transition probability matrix */ tranprobmat(); /* non-zero rate categories */ Rates = new_dvector(numcats); updaterates(); ltprobr = new_dcube(numcats, tpmradix,tpmradix); /* compute distance matrix */ Distanmat = new_dmatrix(Maxspc, Maxspc); initdistan(); /* initialize tree pointer for quartet tree */ mlmode = ML_QUART; Ctree = new_quartet(Numptrn, Seqpat); Numbrnch = NUMQBRNCH; Numibrnch = NUMQIBRNCH; Numspc = NUMQSPC; /* computing ML distances */ /*epe computedistan() moved to inputandinit;*/ } /* mlstart */ /* recompute ml distances for quartet only */ void distupdate(int a, int b, int c, int d) { /* update distance matrix */ /* consider only entries relevant to quartet */ Distanmat[a][b] = mldistance(a, b, Distanmat[a][b]); Distanmat[b][a] = Distanmat[a][b]; Distanmat[a][c] = mldistance(a, c, Distanmat[a][c]); Distanmat[c][a] = Distanmat[a][c]; Distanmat[a][d] = mldistance(a, d, Distanmat[a][d]); Distanmat[d][a] = Distanmat[a][d]; Distanmat[b][c] = mldistance(b, c, Distanmat[b][c]); Distanmat[c][b] = Distanmat[b][c]; Distanmat[b][d] = mldistance(b, d, Distanmat[b][d]); Distanmat[d][b] = Distanmat[b][d]; Distanmat[c][d] = mldistance(c, d, Distanmat[c][d]); Distanmat[d][c] = Distanmat[c][d]; } /* distupdate */ /* cleanup after ML analysis */ void mlfinish() { if (Ctree != NULL) free_tree(Ctree, Numspc); free_ivector(bestrate); free_ivector(Alias); free_cmatrix(Seqpat); free_ivector(constpat); free_ivector(Weight); free_dmatrix(Distanmat); free_dvector(Eval); free_dmatrix(Evec); free_dmatrix(Ievc); free_dvector(Rates); free_dcube(ltprobr); free_dmatrix(iexp); } /* mlfinish */ /******************************************************************************/ /* tree output */ /******************************************************************************/ #define MAXOVER 50 #define MAXLENG 30 #define MAXCOLUMN 80 void prbranch(Node *up, int depth, int m, int maxm, ivector umbrella, ivector column, FILE *outfp) { int i, num, n, maxn, lim; Node *cp; char bch; if ((int)((clockmode ? up->lengthc : up->length) * Proportion) >= MAXOVER) { column[depth] = MAXLENG; bch = '+'; } else { column[depth] = (int)((clockmode ? up->lengthc : up->length) * Proportion) + 3; bch = '-'; } if (up->isop == NULL) { /* external branch */ num = up->number + 1; /* offset */ if (m == 1) umbrella[depth - 1] = TRUE; for (i = 0; i < depth; i++) { if (umbrella[i]) fprintf(outfp, "%*c", column[i], ':'); else fprintf(outfp, "%*c", column[i], ' '); } if (m == maxm) umbrella[depth - 1] = FALSE; for (i = 0, lim = column[depth] - 3; i < lim; i++) fputc(bch, outfp); fprintf(outfp, "-%d ", num); fputid(outfp, up->number); fputc('\n', outfp); fputc(' ', outfp); return; } num = up->number + 1 + Numspc; /* offset, internal branch */ for (cp = up->isop, maxn = 0; cp != up; cp = cp->isop, maxn++) ; for (cp = up->isop, n = 1; cp != up; cp = cp->isop, n++) { prbranch(cp->kinp, depth + 1, n, maxn, umbrella, column, outfp); if (m == 1 && n == maxn / 2) umbrella[depth - 1] = TRUE; if (n != maxn) { for (i = 0; i < depth; i++) { if (umbrella[i]) fprintf(outfp, "%*c", column[i], ':'); else fprintf(outfp, "%*c", column[i], ' '); } if (n == maxn / 2) { /* internal branch */ for (i = 0, lim = column[depth] - 3; i < lim; i++) fputc(bch, outfp); if (num < 10) fprintf(outfp, "--%d", num); else if (num < 100) fprintf(outfp, "-%2d", num); else fprintf(outfp, "%3d", num); } else { if (umbrella[depth]) fprintf(outfp, "%*c", column[depth], ':'); else fprintf(outfp, "%*c", column[depth], ' '); } fputc('\n', outfp); fputc(' ', outfp); } if (m == maxm) umbrella[depth - 1] = FALSE; } return; } /* prbranch */ void getproportion(double *proportion, dvector distanvec, int numspc) { int i, maxpair; double maxdis; maxpair = (numspc*(numspc-1))/2; maxdis = 0.0; for (i = 0; i < maxpair; i++) { if (distanvec[i] > maxdis) { maxdis = distanvec[i]; } } *proportion = (double) MAXCOLUMN / (maxdis * 3.0); if (*proportion > 1.0) *proportion = 1.0; } /* getproportion */ void prtopology(FILE *outfp) { int n, maxn, depth; ivector umbrella; ivector column; Node *cp, *rp; getproportion(&Proportion, Distanvec, Numspc); umbrella = new_ivector(Numspc); column = new_ivector(Numspc); for (n = 0; n < Numspc; n++) { umbrella[n] = FALSE; column[n] = 3; } column[0] = 1; fputc(' ', outfp); /* original code: rp = Ctree->rootp */ /* but we want to print the first group in the trichotomy as outgroup at the bottom! */ rp = Ctree->rootp->isop; for (maxn = 1, cp = rp->isop; cp != rp; cp = cp->isop, maxn++) ; depth = 1; n = 0; cp = rp; do { cp = cp->isop; n++; prbranch(cp->kinp, depth, n, maxn, umbrella, column, outfp); if (cp != rp) fprintf(outfp, "%*c\n ", column[0], ':'); } while (cp != rp); free_ivector(umbrella); free_ivector(column); } /* prtopology */ /* print unrooted tree file with branch lengths */ void fputphylogeny(FILE *fp) { Node *cp, *rp; int n; cp = rp = Ctree->rootp; putc('(', fp); n = 1; do { cp = cp->isop->kinp; if (cp->isop == NULL) { /* external node */ if (n > 60) { fprintf(fp, "\n"); n = 2; } n += fputid(fp, cp->number); fprintf(fp, ":%.5f", ((clockmode ? cp->lengthc : cp->length))*0.01); n += 7; cp = cp->kinp; } else { /* internal node */ if (cp->descen) { if (n > 60) { fprintf(fp, "\n"); n = 1; } putc('(', fp); n++; } else { putc(')', fp); n++; if (n > 60) { fprintf(fp, "\n"); n = 1; } /* internal label */ if (cp->kinp->label != NULL) { fprintf(fp, "%s", cp->kinp->label); n += strlen(cp->kinp->label); } fprintf(fp, ":%.5f", ((clockmode ? cp->lengthc : cp->length))*0.01); n += 7; } } if (!cp->descen && !cp->isop->descen && cp != rp) { putc(',', fp); /* not last subtree */ n++; } } while (cp != rp); fprintf(fp, ")"); /* internal label */ if (cp->label != NULL) fprintf(fp, "%s", cp->label); fprintf(fp, ";\n"); } /* fputphylogeny */ void resulttree(FILE *outfp, int usebranch) { int n, ne, closeflag; Node *ep, *ip; double blen; closeflag = FALSE; if (clockmode) { fprintf(outfp, "\n branch length nc/c"); fprintf(outfp, " branch length nc/c (= non-clock/clock)\n"); } else { fprintf(outfp, "\n branch length S.E."); fprintf(outfp, " branch length S.E.\n"); } for (n = 0; n < Numspc; n++) { ep = Ctree->ebrnchp[n]; ne = ep->number; fputid10(outfp, ne); fputs(" ", outfp); fprintf(outfp, "%3d", ne + 1); blen = (clockmode ? ep->lengthc : ep->length); fprintf(outfp, "%9.5f", blen*0.01); if (blen < 5.0*MINARC || blen > 0.95*MAXARC) closeflag = TRUE; if (clockmode) fprintf(outfp, "%9.3f", (ep->length)/(ep->lengthc)); else fprintf(outfp, "%9.5f", 0.01*sqrt(ep->kinp->varlen)); if (n < Numibrnch) { ip = Ctree->ibrnchp[n]; fprintf(outfp, "%8d", n + 1 + Numspc); blen = (clockmode ? ip->lengthc : ip->length); fprintf(outfp, "%9.5f", blen*0.01); if (blen < 5.0*MINARC || blen > 0.95*MAXARC) closeflag = TRUE; if (clockmode) fprintf(outfp, "%9.3f", (ip->length)/(ip->lengthc)); else fprintf(outfp, "%9.5f", 0.01*sqrt(ip->kinp->varlen)); fputc('\n', outfp); } else { if (n == Numspc - 3) { fputc('\n', outfp); } else if (n == Numspc - 2) { if (clockmode) { if (usebranch) { fprintf(outfp, " Branch lengths set by user (S.E.=0.0)!\n"); } else { if (!Convergc) fprintf(outfp, " No convergence after %d iterations!\n", Numitc); else fprintf(outfp, " %d iterations until convergence\n", Numitc); } } else { if (usebranch) { fprintf(outfp, " Branch lengths set by user (S.E.=0.0)!\n"); } else { if (!Converg) fprintf(outfp, " No convergence after %d iterations!\n", Numit); else fprintf(outfp, " %d iterations until convergence\n", Numit); } } } else if (n == Numspc - 1) { fprintf(outfp, " log L: %.2f\n", (clockmode ? Ctree->lklhdc : Ctree->lklhd)); } else { fputc('\n', outfp); } } } if(closeflag) fprintf(outfp, "\nWARNING --- at least one branch length is close to an internal boundary!\n"); } /* resulttree */ /******************************************************************************/ /* Neighbor-joining tree */ /******************************************************************************/ /* compute NJ tree and write to file */ void njtree(FILE *fp) { /* reserve memory for tree if necessary */ if (mlmode != NJ_TREE) { /* no tree */ if (Ctree != NULL) free_tree(Ctree, Numspc); Ctree = new_tree(Maxspc, Numptrn, Seqpat); Numbrnch = 2*Maxspc-3; Numibrnch = Maxspc-3; Numspc = Maxspc; mlmode = NJ_TREE; } /* construct NJ tree from distance matrix */ njdistantree(Ctree); fputphylogeny(fp); } /* njtree */ /* construct NJ tree from distance matrix */ void njdistantree(Tree *tr) { int i, j, otui=0, otuj=0, otuk, nsp2, cinode, step, restsp, k; double dij, bix, bjx, bkx, sij, smax, dnsp2; dvector r; dmatrix distan; Node **psotu, *cp, *ip, *jp, *kp; distan = new_dmatrix(Maxspc,Maxspc); for (i = 0; i < Maxspc; i++) for (j = 0; j < Maxspc; j++) distan[i][j] = Distanmat[i][j]; nsp2 = Maxspc - 2; dnsp2 = 1.0 / nsp2; r = new_dvector(Maxspc); psotu = (Node **) calloc((size_t)Maxspc, sizeof(Node *)); if (psotu == NULL) maerror("psotu in njdistantree"); /* external branches are start OTUs */ for (i = 0; i < Maxspc; i++) psotu[i] = tr->ebrnchp[i]->kinp; restsp = Maxspc; cinode = 0; /* counter for internal nodes */ for (step = 0; restsp > 3; step++) { /* NJ clustering steps */ for (i = 0; i < Maxspc; i++) { if (psotu[i] != NULL) { for (j = 0, r[i] = 0.0; j < Maxspc; j++) if (psotu[j] != NULL) r[i] += distan[i][j]; } } smax = -1.0; for (i = 0; i < Maxspc-1; i++) { if (psotu[i] != NULL) { for (j = i+1; j < Maxspc; j++) { if (psotu[j] != NULL) { sij = ( r[i] + r[j] ) * dnsp2 - distan[i][j]; if (sij > smax) { smax = sij; otui = i; otuj = j; } } } } } /* new pair: otui and otuj */ dij = distan[otui][otuj]; bix = (dij + r[otui]/nsp2 - r[otuj]/nsp2) * 0.5; bjx = dij - bix; cp = tr->ibrnchp[cinode]; ip = psotu[otui]; jp = psotu[otuj]; cp->isop = ip; ip->isop = jp; jp->isop = cp; ip->length = bix; jp->length = bjx; ip->kinp->length = ip->length; jp->kinp->length = jp->length; cp = cp->kinp; for (k = 0; k < Maxspc; k++) { if (psotu[k] != NULL && k != otui && k != otuj) { dij = (distan[otui][k] + distan[otuj][k] - distan[otui][otuj]) * 0.5; distan[otui][k] = dij; distan[k][otui] = dij; } } distan[otui][otui] = 0.0; psotu[otui] = cp; psotu[otuj] = NULL; cinode++; restsp--; nsp2--; dnsp2 = 1.0 / nsp2; } otui = otuj = otuk = -1; for (i = 0; i < Maxspc; i++) { if (psotu[i] != NULL) { if (otui == -1) otui = i; else if (otuj == -1) otuj = i; else otuk = i; } } bix = (distan[otui][otuj] + distan[otui][otuk] - distan[otuj][otuk]) * 0.5; bjx = distan[otui][otuj] - bix; bkx = distan[otui][otuk] - bix; ip = psotu[otui]; jp = psotu[otuj]; kp = psotu[otuk]; ip->isop = jp; jp->isop = kp; kp->isop = ip; ip->length = bix; jp->length = bjx; kp->length = bkx; ip->kinp->length = ip->length; jp->kinp->length = jp->length; kp->kinp->length = kp->length; tr->rootp = kp; free_dvector(r); free_dmatrix(distan); free((Node *) psotu); } /* njdistantree */ /******************************************************************************/ /* find best assignment of rate categories */ /******************************************************************************/ /* find best assignment of rate categories */ #if 0 void findbestratecombination(Tree *ctree, /* Ctree */ cmatrix Seqpat, dvector Freqtpm, double fracinv, ivector constpat, ivector bestrate, int bestratefound, int ncats) /* numcats */ #endif void findbestratecombination() { int k, u; double bestvalue, fv2; dvector catprob; dmatrix cdl; /* cdl = ctree->condlkl; */ cdl = Ctree->condlkl; /* catprob = new_dvector(ncats+1); */ catprob = new_dvector(numcats+1); /* fv2 = (1.0-fracinv)/(double) ncats; */ fv2 = (1.0-fracinv)/(double) numcats; for (k = 0; k < Numptrn; k++) { /* zero rate */ if (constpat[k] == TRUE) catprob[0] = fracinv*Freqtpm[(int) Seqpat[0][k]]; else catprob[0] = 0.0; /* non-zero-rates */ /* for (u = 1; u < ncats+1; u++) { */ for (u = 1; u < numcats+1; u++) { catprob[u] = fv2*cdl[u-1][k]; } /* find best */ bestvalue = catprob[0]; bestrate[k] = 0; /* for (u = 1; u < ncats+1; u++) */ for (u = 1; u < numcats+1; u++) if (catprob[u] >= bestvalue) { bestvalue = catprob[u]; bestrate[k] = u; } } /* for all column patterns */ free_dvector(catprob); bestratefound = 1; } /* findbestratecombination */ /* print best assignment of rate categories */ void printbestratecombination(FILE *fp) { int s, k; #ifndef USE_WINDOWS for (s = 0; s < Maxsite; s++) { #else for (s = 0; s < alimaxsite; s++) { #endif k = Alias[s]; fprintf(fp, "%2d", bestrate[k]); if ((s+1) % 30 == 0) fprintf(fp, "\n"); else if ((s+1) % 10 == 0) fprintf(fp, " "); } if (s % 70 != 0) fprintf(fp, "\n"); } /* printbestratecombination */ #if 0 # define MLUNIFORMRATE 0 # define MLGAMMARATE 1 # define MLTWORATE 2 # define MLMIXEDRATE 3 #endif void printbestratecombinationtofile(FILE *fp, int rhettype) { int s; char name[11]; switch(rhettype) { case GAMMARATE: sprintf(name, "%drates", numcats); break;; case MIXEDRATE: sprintf(name, "1inv+%d", numcats); break;; case TWORATE: sprintf(name, "1inv+1var"); break;; default: /* UNIFORMRATE */ sprintf(name, "uniform"); } #ifndef USE_WINDOWS fprintf(fp, " 1 %d %d \n", Maxsite, numcats); fprintf(fp, "%-10s", name); for (s = 0; s < Maxsite; s++) { #else fprintf(fp, " 1 %d %d \n", alimaxsite, numcats); fprintf(fp, "%-10s", name); for (s = 0; s < alimaxsite; s++) { #endif if (rhettype != UNIFORMRATE) fprintf(fp, " %.5f", Rates[bestrate[Alias[s]] - 1]); else fprintf(fp, " 1.0"); } fprintf(fp, "\n"); } /* printbestratecombination */ #if 0 # undef MLUNIFORMRATE # undef MLGAMMARATE # undef MLTWORATE # undef MLMIXEDRATE #endif /******************************************************************************/ /* computation of clocklike branch lengths */ /******************************************************************************/ /* checks wether e is a valid edge specification */ int checkedge(int e) { /* there are Numspc external branches: 0 - Numspc-1 there are Numibrnch internal branches: Numspc - Numspc+Numibrnch-1 */ if (e < 0) return FALSE; if (e < Numspc+Numibrnch) return TRUE; else return FALSE; } /* checkedge */ /* print topology of subtree */ void fputsubstree(FILE *fp, Node *ip) { Node *cp; if (ip->isop == NULL) { /* terminal nodes */ numtc += fputid(fp, ip->number); } else { cp = ip; fprintf(fp, "("); numtc += 1; do { cp = cp->isop->kinp; if (cp->isop == NULL) { /* external node */ numtc += fputid(fp, cp->number); fprintf(fp, ":%.5f", (cp->lengthc)*0.01); numtc += 7; cp = cp->kinp; } else { /* internal node */ if (cp->height > 0.0) { fprintf(fp, "("); numtc += 1; } else if (cp->height < 0.0) { fprintf(fp, ")"); numtc += 1; if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } /* internal label */ if (cp->kinp->label != NULL) { fprintf(fp, "%s", cp->kinp->label); numtc += strlen(cp->kinp->label); } if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } fprintf(fp, ":%.5f", (cp->lengthc)*0.01); numtc += 6; if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } } } if (cp->height <= 0.0 && cp->isop->height <= 0.0 && cp->isop != ip) { putc(',', fp); /* not last subtree */ numtc += 1; if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } } } while (cp->isop != ip); fprintf(fp, ")"); numtc += 1; } if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } } /* fputsubstree */ /* print rooted tree file */ void fputrooted(FILE *fp, int e) { Node *rootbr; /* to be called only after clocklike branch lengths have been computed */ /* pointer to root branch */ if (e < Numspc) rootbr = Ctree->ebrnchp[e]; else rootbr = Ctree->ibrnchp[e - Numspc]; fprintf(fp, "("); numtc = 2; fputsubstree(fp, rootbr); /* internal label */ if (rootbr->label != NULL) { fprintf(fp, "%s", rootbr->label); numtc += strlen(rootbr->label); } if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } fprintf(fp, ":%.5f,", (hroot - rootbr->height)*0.01); numtc += 7; if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } fputsubstree(fp, rootbr->kinp); /* internal label */ if (rootbr->kinp->label != NULL) { fprintf(fp, "%s", rootbr->kinp->label); numtc += strlen(rootbr->kinp->label); } if (numtc > 60) { fprintf(fp, "\n"); numtc = 1; } fprintf(fp, ":%.5f);\n", (hroot - rootbr->kinp->height)*0.01); } /* fputrooted */ /* finds heights in subtree */ void findheights(Node *ip) { Node *cp, *rp; if (ip->isop != NULL) { /* forget terminal nodes */ cp = ip; /* initialise node */ cp->height = 1.0; /* up */ rp = cp; while (rp->isop != cp) { rp = rp->isop; rp->height = -1.0; /* down */ } do { cp = cp->isop->kinp; if (cp->isop == NULL) { /* external node */ cp = cp->kinp; } else { /* internal node */ if (cp->height == 0.0) { /* node not yet visited */ cp->height = 1.0; /* up */ rp = cp; while (rp->isop != cp) { rp = rp->isop; rp->height = -1.0; /* down */ } } else if (cp->kinp->height == 1.0) { /* cp->kinp is next height pointer */ heights[Numhts] = cp->kinp; Numhts++; } } } while (cp->isop != ip); /* ip is last height pointer */ heights[Numhts] = ip; Numhts++; } } /* findheights */ /* initialise clocklike branch lengths (with root on edge e) */ void initclock(int e) { int n, h, count; Node *cp, *rp; double sum, minh, aveh, len; /* be sure to have a Ctree in memory and to have pairwise distances computed */ clockmode = 1; /* clocklike branch lengths */ /* least square estimate for branch length */ changedistan(Distanmat, Distanvec, Numspc); lslength(Ctree, Distanvec, Numspc, Numibrnch, Brnlength); /* pointer to root branch */ if (e < Numspc) rootbr = Ctree->ebrnchp[e]; else rootbr = Ctree->ibrnchp[e - Numspc]; /* clear all heights */ for (n = 0; n < Numspc; n++) { Ctree->ebrnchp[n]->height = 0.0; Ctree->ebrnchp[n]->kinp->height = 0.0; Ctree->ebrnchp[n]->varheight = 0.0; Ctree->ebrnchp[n]->kinp->varheight = 0.0; if (n < Numibrnch) { Ctree->ibrnchp[n]->height = 0.0; Ctree->ibrnchp[n]->kinp->height = 0.0; Ctree->ibrnchp[n]->varheight = 0.0; Ctree->ibrnchp[n]->kinp->varheight = 0.0; } } /* collect pointers to height nodes */ Numhts = 0; findheights(rootbr); /* one side */ findheights(rootbr->kinp); /* other side */ /* assign preliminary approximate heights and corresponding branch lengths */ for (h = 0; h < Numhts; h++) { cp = rp = heights[h]; sum = 0; count = 0; minh = 0.0; while (rp->isop != cp) { count++; rp = rp->isop; sum += rp->lengthc + rp->kinp->height; if (rp->kinp->height > minh) minh = rp->kinp->height; } aveh = sum / (double) count; if (aveh < minh + MINARC) aveh = minh + MINARC; cp->height = aveh; rp = cp; while (rp->isop != cp) { rp = rp->isop; len = aveh - rp->kinp->height; rp->kinp->lengthc = len; rp->lengthc = len; } } if (rootbr->height > rootbr->kinp->height) minh = rootbr->height; else minh = rootbr->kinp->height; aveh = 0.5*(rootbr->lengthc + rootbr->height + rootbr->kinp->height); if (aveh < minh + MINARC) aveh = minh + MINARC; hroot = aveh; maxhroot = RMHROOT*hroot; /* maximal possible hroot */ len = (hroot - rootbr->height) + (hroot - rootbr->kinp->height); rootbr->lengthc = len; rootbr->kinp->lengthc = len; } /* initclock */ /* approximate likelihood under the constaining assumption of clocklike branch lengths (with root on edge e) */ double clock_alklhd(int e) { initclock(e); Ctree->lklhdc = treelkl(Ctree); return Ctree->lklhdc; } /* clock_alklhd */ /* log-likelihood given height ht at node pointed to by chep */ double heightlkl(double ht) { Node *rp; double len; /* adjust branch lengths */ chep->height = ht; /* descendent branches */ rp = chep; while (rp->isop != chep) { rp = rp->isop; len = chep->height - rp->kinp->height; rp->kinp->lengthc = len; rp->lengthc = len; } /* upward branch */ if (chep == rootbr || chep->kinp == rootbr) { len = (hroot - chep->height) + (hroot - chep->kinp->height); chep->lengthc = len; chep->kinp->lengthc = len; } else { rp = chep->kinp; while (rp->isop->height <= 0.0) rp = rp->isop; chep->lengthc = rp->isop->height - chep->height; chep->kinp->lengthc = rp->isop->height - chep->height; } /* compute likelihood */ Ctree->lklhdc = treelkl(Ctree); return -(Ctree->lklhdc); /* we use a minimizing procedure */ } /* heightlkl */ /* optimize current height */ void optheight(void) { double he, fx, f2x, minh, maxh, len; Node *rp; /* current height */ he = chep->height; /* minimum */ minh = 0.0; rp = chep; while (rp->isop != chep) { rp = rp->isop; if (rp->kinp->height > minh) minh = rp->kinp->height; } minh += MINARC; /* maximum */ if (chep == rootbr || chep->kinp == rootbr) { maxh = hroot; } else { rp = chep->kinp; while (rp->isop->height <= 0.0) rp = rp->isop; maxh = rp->isop->height; } maxh -= MINARC; /* check borders for height */ if (he < minh) he = minh; if (he > maxh) he = maxh; /* optimization */ if (!(he == minh && he == maxh)) he = onedimenmin(minh, he, maxh, heightlkl, EPSILON_HEIGHTS, &fx, &f2x); /* variance of height */ f2x = fabs(f2x); if (1.0/(maxhroot*maxhroot) < f2x) chep->varheight = 1.0/f2x; else chep->varheight = maxhroot*maxhroot; /* adjust branch lengths */ chep->height = he; /* descendent branches */ rp = chep; while (rp->isop != chep) { rp = rp->isop; len = chep->height - rp->kinp->height; rp->kinp->lengthc = len; rp->lengthc = len; } /* upward branch */ if (chep == rootbr || chep->kinp == rootbr) { len = (hroot - chep->height) + (hroot - chep->kinp->height); chep->lengthc = len; chep->kinp->lengthc = len; } else { rp = chep->kinp; while (rp->isop->height <= 0.0) rp = rp->isop; chep->lengthc = rp->isop->height - chep->height; chep->kinp->lengthc = rp->isop->height - chep->height; } } /* optheight */ /* log-likelihood given height ht at root */ double rheightlkl(double ht) { double len; /* adjust branch lengths */ hroot = ht; len = (hroot - rootbr->height) + (hroot - rootbr->kinp->height); rootbr->lengthc = len; rootbr->kinp->lengthc = len; /* compute likelihood */ Ctree->lklhdc = treelkl(Ctree); return -(Ctree->lklhdc); /* we use a minimizing procedure */ } /* rheightlkl */ /* optimize height of root */ void optrheight(void) { double he, fx, f2x, minh, len; /* current height */ he = hroot; /* minimum */ if (rootbr->height > rootbr->kinp->height) minh = rootbr->height; else minh = rootbr->kinp->height; minh += MINARC; /* check borders for height */ if (he < minh) he = minh; if (he > maxhroot) he = maxhroot; /* optimization */ he = onedimenmin(minh, he, maxhroot, rheightlkl, EPSILON_HEIGHTS, &fx, &f2x); /* variance of height of root */ f2x = fabs(f2x); if (1.0/(maxhroot*maxhroot) < f2x) varhroot = 1.0/f2x; else varhroot = maxhroot*maxhroot; /* adjust branch lengths */ hroot = he; len = (hroot - rootbr->height) + (hroot - rootbr->kinp->height); rootbr->lengthc = len; rootbr->kinp->lengthc = len; } /* optrheight */ /* exact likelihood under the constaining assumption of clocklike branch lengths (with root on edge e) */ double clock_lklhd(int e) { int h, nconv; double old; Numitc = 0; Convergc = FALSE; initclock(e); do { Numitc++; nconv = 0; /* optimize height of root */ old = hroot; optrheight(); if (fabs(old - hroot) < EPSILON_HEIGHTS) nconv++; /* optimize height of nodes */ for (h = Numhts-1; h >= 0; h--) { /* pointer chep to current height node */ chep = heights[h]; /* store old value */ old = chep->height; /* find better height */ optheight(); /* converged ? */ if (fabs(old - chep->height) < EPSILON_HEIGHTS) nconv++; } if (nconv == Numhts+1) Convergc = TRUE; } while (Numitc < MAXIT && !Convergc); /* compute final likelihood */ Ctree->lklhdc = treelkl(Ctree); return Ctree->lklhdc; } /* clock_lklhd */ /* find out the edge containing the root */ int findrootedge() { int e, ebest; double logbest, logtest; /* compute the likelihood for all edges and take the edge with best likelihood (using approximate ML) */ ebest = 0; logbest = clock_alklhd(0); numbestroot = 1; for (e = 1; e < Numspc+Numibrnch; e++) { logtest = clock_alklhd(e); if (logtest > logbest) { ebest = e; logbest = logtest; numbestroot = 1; } else if (logtest == logbest) { numbestroot++; } } return ebest; } /* findrootedge */ /* show heights and corresponding standard errors */ void resultheights(FILE *fp) { int h, num; Node *cp; fprintf(fp, " height S.E. of node common to branches\n"); for (h = 0; h < Numhts; h++) { fprintf(fp, "%.5f %.5f ", (heights[h]->height)*0.01, sqrt(heights[h]->varheight)*0.01); cp = heights[h]; do { num = (cp->number) + 1; if (cp->kinp->isop != NULL) num += Numspc; /* internal branch */ fprintf(fp, "%d ", num); cp = cp->isop; } while (cp != heights[h]); fprintf(fp, "\n"); } fprintf(fp, "%.5f %.5f of root at branch %d\n", hroot*0.01, sqrt(varhroot)*0.01, locroot+1); } /* resultheights */ tree-puzzle-5.2/src/sprng/0000777000076400001440000000000010075312110011321 5tree-puzzle-5.2/src/sprng/primelist-lcg64.h0000644000076400001440000060136207755105700014363 #define PRIMELISTSIZE1 1000 #define STEP 10000 #define PRIMELISTSIZE2 15613 unsigned int prime_list[PRIMELISTSIZE2] = { 3037000493U, 3037000453U, 3037000429U, 3037000427U, 3037000399U, 3037000391U, 3037000333U, 3037000331U, 3037000303U, 3037000289U, 3037000249U, 3037000193U, 3037000181U, 3037000177U, 3037000159U, 3037000121U, 3037000111U, 3037000103U, 3037000069U, 3037000039U, 3037000013U, 3036999991U, 3036999983U, 3036999941U, 3036999899U, 3036999887U, 3036999877U, 3036999841U, 3036999821U, 3036999817U, 3036999811U, 3036999803U, 3036999773U, 3036999769U, 3036999761U, 3036999739U, 3036999737U, 3036999733U, 3036999727U, 3036999499U, 3036999487U, 3036999473U, 3036999467U, 3036999457U, 3036999443U, 3036999439U, 3036999431U, 3036999403U, 3036999379U, 3036999341U, 3036999319U, 3036999307U, 3036999293U, 3036999283U, 3036999271U, 3036999233U, 3036999209U, 3036999167U, 3036999157U, 3036999137U, 3036999113U, 3036999101U, 3036999089U, 3036999079U, 3036999067U, 3036999061U, 3036999023U, 3036999019U, 3036999001U, 3036998999U, 3036998989U, 3036998977U, 3036998963U, 3036998957U, 3036998933U, 3036998903U, 3036998873U, 3036998857U, 3036998849U, 3036998843U, 3036998837U, 3036998803U, 3036998777U, 3036998761U, 3036998759U, 3036998743U, 3036998717U, 3036998611U, 3036998599U, 3036998567U, 3036998563U, 3036998561U, 3036998537U, 3036998477U, 3036998449U, 3036998429U, 3036998401U, 3036998381U, 3036998347U, 3036998333U, 3036998329U, 3036998299U, 3036998267U, 3036998257U, 3036998249U, 3036998231U, 3036998213U, 3036998183U, 3036998161U, 3036998113U, 3036998093U, 3036998071U, 3036998051U, 3036998047U, 3036998011U, 3036998009U, 3036997973U, 3036997939U, 3036997933U, 3036997897U, 3036997853U, 3036997837U, 3036997813U, 3036997811U, 3036997787U, 3036997783U, 3036997751U, 3036997741U, 3036997727U, 3036997721U, 3036997709U, 3036997697U, 3036997693U, 3036997643U, 3036997631U, 3036997619U, 3036997603U, 3036997597U, 3036997577U, 3036997559U, 3036997511U, 3036997501U, 3036997493U, 3036997393U, 3036997391U, 3036997343U, 3036997339U, 3036997331U, 3036997289U, 3036997279U, 3036997217U, 3036997213U, 3036997169U, 3036997151U, 3036997133U, 3036997109U, 3036997081U, 3036997063U, 3036997021U, 3036996983U, 3036996947U, 3036996931U, 3036996923U, 3036996901U, 3036996883U, 3036996863U, 3036996829U, 3036996817U, 3036996799U, 3036996769U, 3036996761U, 3036996737U, 3036996713U, 3036996709U, 3036996707U, 3036996673U, 3036996631U, 3036996601U, 3036996587U, 3036996553U, 3036996527U, 3036996497U, 3036996491U, 3036996481U, 3036996451U, 3036996439U, 3036996421U, 3036996379U, 3036996373U, 3036996353U, 3036996349U, 3036996329U, 3036996307U, 3036996299U, 3036996283U, 3036996253U, 3036996247U, 3036996211U, 3036996197U, 3036996121U, 3036996091U, 3036996077U, 3036996071U, 3036996049U, 3036996019U, 3036996013U, 3036995981U, 3036995977U, 3036995953U, 3036995933U, 3036995921U, 3036995909U, 3036995893U, 3036995887U, 3036995881U, 3036995867U, 3036995839U, 3036995833U, 3036995827U, 3036995791U, 3036995761U, 3036995737U, 3036995723U, 3036995711U, 3036995671U, 3036995641U, 3036995627U, 3036995609U, 3036995603U, 3036995581U, 3036995579U, 3036995573U, 3036995543U, 3036995531U, 3036995527U, 3036995491U, 3036995477U, 3036995459U, 3036995369U, 3036995281U, 3036995267U, 3036995257U, 3036995249U, 3036995239U, 3036995189U, 3036995161U, 3036995153U, 3036995123U, 3036995089U, 3036995083U, 3036995057U, 3036995051U, 3036995041U, 3036995021U, 3036994997U, 3036994963U, 3036994931U, 3036994921U, 3036994897U, 3036994889U, 3036994879U, 3036994847U, 3036994799U, 3036994787U, 3036994777U, 3036994747U, 3036994717U, 3036994703U, 3036994679U, 3036994673U, 3036994663U, 3036994661U, 3036994627U, 3036994621U, 3036994619U, 3036994591U, 3036994549U, 3036994547U, 3036994531U, 3036994511U, 3036994507U, 3036994489U, 3036994469U, 3036994439U, 3036994423U, 3036994417U, 3036994397U, 3036994381U, 3036994369U, 3036994349U, 3036994327U, 3036994309U, 3036994283U, 3036994249U, 3036994237U, 3036994229U, 3036994211U, 3036994193U, 3036994141U, 3036994099U, 3036994073U, 3036994069U, 3036994063U, 3036994043U, 3036994039U, 3036994033U, 3036994001U, 3036993977U, 3036993937U, 3036993913U, 3036993901U, 3036993893U, 3036993871U, 3036993769U, 3036993737U, 3036993727U, 3036993719U, 3036993677U, 3036993667U, 3036993613U, 3036993607U, 3036993601U, 3036993587U, 3036993571U, 3036993569U, 3036993541U, 3036993539U, 3036993529U, 3036993527U, 3036993511U, 3036993469U, 3036993437U, 3036993413U, 3036993367U, 3036993359U, 3036993331U, 3036993329U, 3036993319U, 3036993283U, 3036993277U, 3036993257U, 3036993251U, 3036993241U, 3036993233U, 3036993221U, 3036993217U, 3036993181U, 3036993161U, 3036993143U, 3036993133U, 3036993131U, 3036993107U, 3036993103U, 3036993097U, 3036993083U, 3036993077U, 3036993073U, 3036993023U, 3036992983U, 3036992977U, 3036992969U, 3036992957U, 3036992953U, 3036992921U, 3036992899U, 3036992879U, 3036992873U, 3036992869U, 3036992809U, 3036992773U, 3036992753U, 3036992747U, 3036992743U, 3036992741U, 3036992731U, 3036992719U, 3036992711U, 3036992701U, 3036992681U, 3036992669U, 3036992639U, 3036992579U, 3036992521U, 3036992507U, 3036992503U, 3036992461U, 3036992437U, 3036992423U, 3036992401U, 3036992383U, 3036992377U, 3036992341U, 3036992333U, 3036992293U, 3036992291U, 3036992249U, 3036992207U, 3036992191U, 3036992141U, 3036992131U, 3036992113U, 3036992087U, 3036992083U, 3036992069U, 3036992051U, 3036992033U, 3036992017U, 3036992011U, 3036991987U, 3036991981U, 3036991949U, 3036991943U, 3036991897U, 3036991891U, 3036991883U, 3036991861U, 3036991777U, 3036991757U, 3036991753U, 3036991747U, 3036991717U, 3036991649U, 3036991627U, 3036991619U, 3036991591U, 3036991543U, 3036991511U, 3036991501U, 3036991481U, 3036991453U, 3036991381U, 3036991361U, 3036991357U, 3036991327U, 3036991303U, 3036991301U, 3036991271U, 3036991261U, 3036991253U, 3036991249U, 3036991247U, 3036991189U, 3036991183U, 3036991171U, 3036991147U, 3036991127U, 3036991109U, 3036991081U, 3036991063U, 3036991049U, 3036991037U, 3036991033U, 3036991031U, 3036991021U, 3036990997U, 3036990977U, 3036990961U, 3036990949U, 3036990923U, 3036990907U, 3036990899U, 3036990893U, 3036990871U, 3036990851U, 3036990829U, 3036990779U, 3036990769U, 3036990763U, 3036990739U, 3036990727U, 3036990709U, 3036990703U, 3036990611U, 3036990559U, 3036990491U, 3036990431U, 3036990421U, 3036990401U, 3036990391U, 3036990379U, 3036990371U, 3036990323U, 3036990317U, 3036990277U, 3036990263U, 3036990247U, 3036990233U, 3036990227U, 3036990199U, 3036990193U, 3036990167U, 3036990163U, 3036990157U, 3036990071U, 3036990059U, 3036990049U, 3036990037U, 3036990029U, 3036990017U, 3036989999U, 3036989993U, 3036989983U, 3036989957U, 3036989863U, 3036989821U, 3036989797U, 3036989779U, 3036989723U, 3036989693U, 3036989687U, 3036989651U, 3036989611U, 3036989609U, 3036989603U, 3036989573U, 3036989561U, 3036989539U, 3036989477U, 3036989471U, 3036989441U, 3036989419U, 3036989381U, 3036989377U, 3036989363U, 3036989357U, 3036989353U, 3036989323U, 3036989297U, 3036989281U, 3036989261U, 3036989209U, 3036989167U, 3036989159U, 3036989149U, 3036989129U, 3036989107U, 3036989101U, 3036989077U, 3036989071U, 3036989063U, 3036989041U, 3036989027U, 3036988991U, 3036988879U, 3036988849U, 3036988819U, 3036988751U, 3036988739U, 3036988729U, 3036988727U, 3036988723U, 3036988699U, 3036988679U, 3036988673U, 3036988667U, 3036988651U, 3036988637U, 3036988631U, 3036988627U, 3036988583U, 3036988573U, 3036988571U, 3036988543U, 3036988523U, 3036988483U, 3036988469U, 3036988429U, 3036988417U, 3036988399U, 3036988397U, 3036988393U, 3036988387U, 3036988369U, 3036988349U, 3036988319U, 3036988313U, 3036988309U, 3036988301U, 3036988277U, 3036988271U, 3036988117U, 3036988111U, 3036988109U, 3036988081U, 3036988079U, 3036988043U, 3036988037U, 3036988027U, 3036988021U, 3036987991U, 3036987979U, 3036987937U, 3036987931U, 3036987929U, 3036987917U, 3036987913U, 3036987901U, 3036987883U, 3036987871U, 3036987809U, 3036987799U, 3036987773U, 3036987743U, 3036987731U, 3036987727U, 3036987719U, 3036987691U, 3036987659U, 3036987637U, 3036987631U, 3036987601U, 3036987589U, 3036987587U, 3036987581U, 3036987563U, 3036987557U, 3036987553U, 3036987533U, 3036987529U, 3036987523U, 3036987521U, 3036987469U, 3036987439U, 3036987427U, 3036987361U, 3036987337U, 3036987319U, 3036987311U, 3036987293U, 3036987251U, 3036987241U, 3036987197U, 3036987167U, 3036987127U, 3036987089U, 3036987077U, 3036987073U, 3036987067U, 3036987061U, 3036987043U, 3036986969U, 3036986957U, 3036986917U, 3036986881U, 3036986863U, 3036986851U, 3036986839U, 3036986803U, 3036986791U, 3036986789U, 3036986767U, 3036986759U, 3036986737U, 3036986713U, 3036986669U, 3036986609U, 3036986599U, 3036986593U, 3036986569U, 3036986509U, 3036986507U, 3036986501U, 3036986479U, 3036986441U, 3036986431U, 3036986417U, 3036986411U, 3036986383U, 3036986333U, 3036986287U, 3036986279U, 3036986203U, 3036986189U, 3036986167U, 3036986129U, 3036986123U, 3036986107U, 3036986041U, 3036986023U, 3036986009U, 3036985999U, 3036985993U, 3036985979U, 3036985949U, 3036985921U, 3036985877U, 3036985873U, 3036985837U, 3036985829U, 3036985817U, 3036985813U, 3036985799U, 3036985771U, 3036985753U, 3036985747U, 3036985741U, 3036985739U, 3036985733U, 3036985729U, 3036985709U, 3036985697U, 3036985673U, 3036985643U, 3036985613U, 3036985607U, 3036985603U, 3036985583U, 3036985561U, 3036985559U, 3036985547U, 3036985543U, 3036985499U, 3036985459U, 3036985439U, 3036985433U, 3036985409U, 3036985373U, 3036985361U, 3036985309U, 3036985291U, 3036985283U, 3036985267U, 3036985253U, 3036985249U, 3036985219U, 3036985207U, 3036985187U, 3036985177U, 3036985151U, 3036985097U, 3036985093U, 3036985073U, 3036985033U, 3036985031U, 3036985001U, 3036984997U, 3036984989U, 3036984971U, 3036984953U, 3036984943U, 3036984917U, 3036984887U, 3036984803U, 3036984799U, 3036984787U, 3036984773U, 3036984761U, 3036984751U, 3036984749U, 3036984721U, 3036984697U, 3036984673U, 3036984667U, 3036984637U, 3036984623U, 3036984589U, 3036984569U, 3036984563U, 3036984539U, 3036984527U, 3036984481U, 3036984479U, 3036984427U, 3036984421U, 3036984413U, 3036984407U, 3036984403U, 3036984373U, 3036984367U, 3036984361U, 3036984343U, 3036984319U, 3036984287U, 3036984259U, 3036984257U, 3036984253U, 3036984199U, 3036984191U, 3036984151U, 3036984133U, 3036984131U, 3036984089U, 3036984059U, 3036984053U, 3036984047U, 3036984017U, 3036983933U, 3036983923U, 3036983909U, 3036983897U, 3036983867U, 3036983843U, 3036983837U, 3036983827U, 3036983813U, 3036983809U, 3036983777U, 3036983771U, 3036983699U, 3036983689U, 3036983671U, 3036983657U, 3036983629U, 3036983623U, 3036983597U, 3036983567U, 3036983561U, 3036983539U, 3036983533U, 3036983497U, 3036983483U, 3036983441U, 3036983407U, 3036983387U, 3036983297U, 3036983281U, 3036983249U, 3036983203U, 3036983189U, 3036983177U, 3036983167U, 3036983137U, 3036983111U, 3036983099U, 3036983083U, 3036983063U, 3036983057U, 3036983041U, 3036982981U, 3036982937U, 3036982919U, 3036982853U, 3036982843U, 3036982841U, 3036982789U, 3036982777U, 3036982757U, 3036982727U, 3036982693U, 3036982643U, 3036982639U, 3036982601U, 3036982589U, 3036982577U, 3036982567U, 3036982547U, 3036982541U, 3036982523U, 3036982519U, 3036982489U, 3036982469U, 3036982451U, 3036982423U, 3036982397U, 3036982387U, 3036982349U, 3036982337U, 3036982331U, 3036982313U, 3036982297U, 3036982279U, 3036982271U, 3036982189U, 3036982139U, 3036982133U, 3036982121U, 3036982111U, 3036982103U, 3036982099U, 3036982093U, 3036982061U, 3036982043U, 3036982009U, 3036982001U, 3036981979U, 3036981967U, 3036981953U, 3036981931U, 3036981923U, 3036981917U, 3036981863U, 3036981859U, 3036981853U, 3036981851U, 3036981821U, 3036981811U, 3036981797U, 3036981763U, 3036981733U, 3036981713U, 3036981691U, 3036981659U, 3036981553U, 3036981547U, 3036981539U, 3036981533U, 3036981481U, 3036981421U, 3036981407U, 3036981401U, 3036981383U, 3036981373U, 3036981359U, 3036981347U, 3036981323U, 3036981313U, 3036981307U, 3036981301U, 3036981289U, 3036981287U, 3036981209U, 3036981179U, 3036981139U, 3036981097U, 3036981067U, 3036981043U, 3036981041U, 3036981023U, 3036981011U, 3036980971U, 3036980941U, 3036980917U, 3036980911U, 3036980897U, 3036980867U, 3036980851U, 3036980819U, 3036980803U, 3036980761U, 3036980753U, 3036980747U, 3036980701U, 3036980699U, 3036980677U, 3036980599U, 3036980579U, 3036980549U, 3036980537U, 3036980533U, 3036980519U, 3036980497U, 3036980491U, 3036980459U, 3036980423U, 3036980371U, 3036980363U, 3036980339U, 3036980327U, 3036980269U, 3036980267U, 3036980263U, 3036980207U, 3036980161U, 3036980129U, 3036980123U, 3036980117U, 3036980077U, 3036980071U, 3036980047U, 3036980041U, 3036980039U, 3036980033U, 3036980027U, 3036979997U, 3036979987U, 3036979937U, 3036979927U, 3036979919U, 3036979873U, 3036979861U, 3036979849U, 3036979837U, 3036979793U, 3036979787U, 3036979769U, 3036979763U, 3036979723U, 3036979709U, 3036979679U, 3036979661U, 3036979601U, 3036979597U, 3036979579U, 3036979571U, 3036979531U, 3036979529U, 3036979523U, 3036979457U, 3036979391U, 3036979357U, 3036979343U, 3036979339U, 3036979303U, 3036979301U, 3036979291U, 3036979289U, 3036979261U, 3036979249U, 3036979237U, 3036979223U, 3036762997U, 3036545581U, 3036327389U, 3036107951U, 3035888633U, 3035669363U, 3035449477U, 3035232667U, 3035014193U, 3034795427U, 3034577531U, 3034357853U, 3034138969U, 3033923621U, 3033706409U, 3033488597U, 3033267889U, 3033049871U, 3032832493U, 3032615063U, 3032396527U, 3032177359U, 3031960339U, 3031742731U, 3031526081U, 3031308359U, 3031092199U, 3030873071U, 3030655757U, 3030437257U, 3030218647U, 3029999191U, 3029780833U, 3029559389U, 3029339741U, 3029122153U, 3028904231U, 3028687897U, 3028467803U, 3028251181U, 3028034189U, 3027815579U, 3027597247U, 3027377317U, 3027158237U, 3026939441U, 3026721421U, 3026502179U, 3026282261U, 3026065561U, 3025847507U, 3025627663U, 3025409689U, 3025190813U, 3024971231U, 3024753383U, 3024533179U, 3024312673U, 3024094123U, 3023876753U, 3023655737U, 3023439317U, 3023222239U, 3023004151U, 3022786831U, 3022566857U, 3022349243U, 3022131979U, 3021911663U, 3021695137U, 3021477377U, 3021256289U, 3021037769U, 3020820247U, 3020600897U, 3020381843U, 3020165179U, 3019948573U, 3019729819U, 3019510561U, 3019294087U, 3019074679U, 3018854257U, 3018637471U, 3018418159U, 3018199469U, 3017981123U, 3017762807U, 3017544701U, 3017327809U, 3017107381U, 3016890403U, 3016671503U, 3016453117U, 3016234721U, 3016015661U, 3015797003U, 3015579211U, 3015360779U, 3015141427U, 3014924197U, 3014705597U, 3014487473U, 3014268743U, 3014052511U, 3013832473U, 3013615529U, 3013397269U, 3013177819U, 3012960241U, 3012743291U, 3012525497U, 3012307019U, 3012088889U, 3011870993U, 3011652491U, 3011434169U, 3011217061U, 3010999219U, 3010780781U, 3010564993U, 3010348387U, 3010127833U, 3009910177U, 3009693839U, 3009474253U, 3009255637U, 3009037517U, 3008820911U, 3008599381U, 3008379739U, 3008159723U, 3007941473U, 3007724221U, 3007506361U, 3007288589U, 3007068709U, 3006850277U, 3006630499U, 3006412979U, 3006194489U, 3005975761U, 3005755367U, 3005537413U, 3005317433U, 3005101609U, 3004884821U, 3004669463U, 3004450633U, 3004231093U, 3004011743U, 3003795953U, 3003576871U, 3003357971U, 3003138847U, 3002919079U, 3002700947U, 3002481649U, 3002264299U, 3002046821U, 3001828987U, 3001609753U, 3001390789U, 3001172389U, 3000954289U, 3000736049U, 3000517057U, 3000299059U, 3000081691U, 2999865541U, 2999645267U, 2999428681U, 2999208437U, 2998989517U, 2998769261U, 2998552309U, 2998331761U, 2998112737U, 2997895037U, 2997675017U, 2997456079U, 2997236027U, 2997018683U, 2996799863U, 2996579689U, 2996360473U, 2996141653U, 2995922999U, 2995706647U, 2995488203U, 2995270471U, 2995052131U, 2994832817U, 2994613397U, 2994394969U, 2994176371U, 2993958943U, 2993739953U, 2993521463U, 2993302891U, 2993085449U, 2992867159U, 2992647499U, 2992428287U, 2992211983U, 2991996857U, 2991776339U, 2991556427U, 2991341417U, 2991121901U, 2990904949U, 2990686943U, 2990471509U, 2990252131U, 2990033617U, 2989816859U, 2989597759U, 2989377431U, 2989159883U, 2988940987U, 2988721301U, 2988502883U, 2988285617U, 2988066629U, 2987849437U, 2987630771U, 2987414873U, 2987198597U, 2986980923U, 2986764181U, 2986545649U, 2986327571U, 2986109209U, 2985890657U, 2985670433U, 2985453733U, 2985237617U, 2985019019U, 2984801321U, 2984581697U, 2984360947U, 2984142757U, 2983925299U, 2983708313U, 2983488721U, 2983270751U, 2983052749U, 2982833473U, 2982617243U, 2982401029U, 2982184763U, 2981967419U, 2981746181U, 2981525629U, 2981308009U, 2981089733U, 2980871129U, 2980654093U, 2980435439U, 2980218091U, 2980002373U, 2979781547U, 2979562793U, 2979344219U, 2979127687U, 2978907857U, 2978690389U, 2978472713U, 2978255261U, 2978038267U, 2977818317U, 2977601191U, 2977384337U, 2977166617U, 2976948059U, 2976730721U, 2976512857U, 2976292927U, 2976075541U, 2975857043U, 2975638751U, 2975421623U, 2975204087U, 2974987151U, 2974768619U, 2974552081U, 2974332671U, 2974113341U, 2973895261U, 2973677171U, 2973458113U, 2973241703U, 2973023369U, 2972804099U, 2972586329U, 2972367829U, 2972149039U, 2971931051U, 2971711019U, 2971494139U, 2971277423U, 2971059173U, 2970838919U, 2970619343U, 2970403757U, 2970183743U, 2969959627U, 2969743547U, 2969525033U, 2969309891U, 2969090279U, 2968871251U, 2968651541U, 2968435117U, 2968214531U, 2967996443U, 2967780931U, 2967562369U, 2967343021U, 2967124487U, 2966906353U, 2966688983U, 2966472557U, 2966253179U, 2966035691U, 2965819673U, 2965600733U, 2965383739U, 2965166959U, 2964946847U, 2964729197U, 2964510889U, 2964292297U, 2964075437U, 2963855227U, 2963638693U, 2963421677U, 2963204119U, 2962986503U, 2962766491U, 2962547311U, 2962331657U, 2962112771U, 2961895337U, 2961679121U, 2961460591U, 2961241603U, 2961022781U, 2960805161U, 2960587099U, 2960369359U, 2960151149U, 2959931383U, 2959714627U, 2959495937U, 2959277393U, 2959059997U, 2958843161U, 2958625499U, 2958407399U, 2958189191U, 2957972767U, 2957753053U, 2957535137U, 2957317171U, 2957098873U, 2956880557U, 2956660747U, 2956441343U, 2956224577U, 2956007273U, 2955789979U, 2955569107U, 2955349213U, 2955131051U, 2954912297U, 2954693083U, 2954475233U, 2954255153U, 2954037211U, 2953818851U, 2953599667U, 2953381993U, 2953162151U, 2952942739U, 2952725873U, 2952506693U, 2952289517U, 2952071821U, 2951854319U, 2951636731U, 2951419189U, 2951201251U, 2950982971U, 2950763201U, 2950544221U, 2950326689U, 2950110017U, 2949891643U, 2949673561U, 2949456077U, 2949238151U, 2949022819U, 2948803327U, 2948584297U, 2948367439U, 2948148473U, 2947930483U, 2947712767U, 2947495459U, 2947277803U, 2947061057U, 2946842537U, 2946625949U, 2946405619U, 2946187753U, 2945970421U, 2945751373U, 2945535001U, 2945315713U, 2945096753U, 2944880387U, 2944658933U, 2944441141U, 2944223479U, 2944005997U, 2943788681U, 2943569197U, 2943351529U, 2943132887U, 2942914609U, 2942697049U, 2942480587U, 2942261857U, 2942041747U, 2941824229U, 2941604959U, 2941387153U, 2941168301U, 2940949691U, 2940733787U, 2940516781U, 2940299849U, 2940084479U, 2939867743U, 2939650613U, 2939432609U, 2939214277U, 2938996777U, 2938779271U, 2938560353U, 2938341551U, 2938124249U, 2937905819U, 2937690901U, 2937472607U, 2937253091U, 2937035341U, 2936814169U, 2936597249U, 2936378723U, 2936162003U, 2935942103U, 2935724443U, 2935504679U, 2935286489U, 2935067897U, 2934850591U, 2934633607U, 2934416071U, 2934197197U, 2933980571U, 2933761433U, 2933543771U, 2933324839U, 2933105831U, 2932886129U, 2932668953U, 2932451867U, 2932234901U, 2932015831U, 2931799373U, 2931579601U, 2931363089U, 2931144523U, 2930928227U, 2930711587U, 2930493919U, 2930273009U, 2930054573U, 2929836719U, 2929619653U, 2929400603U, 2929183613U, 2928966151U, 2928748139U, 2928530929U, 2928313153U, 2928094357U, 2927875619U, 2927658673U, 2927442487U, 2927222069U, 2927004709U, 2926787309U, 2926569361U, 2926350367U, 2926135529U, 2925917893U, 2925698173U, 2925480919U, 2925263279U, 2925046463U, 2924831069U, 2924613371U, 2924393729U, 2924175193U, 2923954801U, 2923737343U, 2923518683U, 2923300829U, 2923082209U, 2922864767U, 2922649421U, 2922430073U, 2922212519U, 2921994917U, 2921775803U, 2921559653U, 2921341103U, 2921126489U, 2920908283U, 2920689061U, 2920471049U, 2920251703U, 2920034347U, 2919817627U, 2919598021U, 2919381319U, 2919162959U, 2918943683U, 2918729057U, 2918510587U, 2918292271U, 2918072057U, 2917854413U, 2917635811U, 2917419499U, 2917202663U, 2916983521U, 2916765193U, 2916545773U, 2916328517U, 2916112183U, 2915893681U, 2915677241U, 2915456513U, 2915239601U, 2915020937U, 2914803761U, 2914586503U, 2914368059U, 2914150271U, 2913932779U, 2913714131U, 2913494791U, 2913274457U, 2913057307U, 2912839169U, 2912621401U, 2912404247U, 2912187853U, 2911970317U, 2911752157U, 2911532539U, 2911313501U, 2911094951U, 2910876457U, 2910657353U, 2910439451U, 2910221297U, 2910003703U, 2909787409U, 2909568721U, 2909351741U, 2909134769U, 2908916249U, 2908699601U, 2908480777U, 2908262023U, 2908043023U, 2907825317U, 2907607337U, 2907388073U, 2907166967U, 2906952473U, 2906736593U, 2906518943U, 2906300231U, 2906082233U, 2905864067U, 2905644013U, 2905426619U, 2905208881U, 2904993263U, 2904773771U, 2904556769U, 2904338867U, 2904123031U, 2903903861U, 2903686447U, 2903468497U, 2903250821U, 2903031559U, 2902812839U, 2902597123U, 2902380449U, 2902160717U, 2901941417U, 2901724187U, 2901507019U, 2901289403U, 2901071813U, 2900854379U, 2900634593U, 2900418889U, 2900202287U, 2899984603U, 2899766291U, 2899550011U, 2899332323U, 2899114357U, 2898895687U, 2898677891U, 2898458359U, 2898238669U, 2898022789U, 2897804407U, 2897587421U, 2897369021U, 2897150423U, 2896932589U, 2896714631U, 2896495643U, 2896278251U, 2896061459U, 2895842179U, 2895625609U, 2895408143U, 2895191393U, 2894976157U, 2894758709U, 2894538461U, 2894320211U, 2894101087U, 2893885381U, 2893666007U, 2893448681U, 2893230569U, 2893012403U, 2892794153U, 2892573601U, 2892357361U, 2892141401U, 2891924291U, 2891705197U, 2891485453U, 2891265869U, 2891046343U, 2890827241U, 2890611539U, 2890395037U, 2890176347U, 2889959197U, 2889741301U, 2889523193U, 2889304499U, 2889089393U, 2888872171U, 2888652913U, 2888435443U, 2888217103U, 2887998313U, 2887779967U, 2887561093U, 2887343237U, 2887123997U, 2886907081U, 2886689119U, 2886472033U, 2886253057U, 2886035473U, 2885816789U, 2885599417U, 2885384233U, 2885167091U, 2884947421U, 2884728403U, 2884511183U, 2884293637U, 2884076357U, 2883857357U, 2883636991U, 2883420959U, 2883205421U, 2882988211U, 2882768663U, 2882551601U, 2882332891U, 2882115923U, 2881893467U, 2881675499U, 2881460221U, 2881243067U, 2881026271U, 2880811447U, 2880592861U, 2880372919U, 2880155819U, 2879937503U, 2879719223U, 2879501707U, 2879284477U, 2879065151U, 2878847353U, 2878630171U, 2878412213U, 2878195469U, 2877978211U, 2877761027U, 2877542959U, 2877323003U, 2877103631U, 2876887777U, 2876669153U, 2876450789U, 2876234329U, 2876015969U, 2875798063U, 2875580219U, 2875359587U, 2875143757U, 2874924197U, 2874705727U, 2874488887U, 2874269987U, 2874053293U, 2873838833U, 2873621573U, 2873405077U, 2873184967U, 2872965317U, 2872747699U, 2872530079U, 2872311397U, 2872093027U, 2871876197U, 2871660371U, 2871442997U, 2871223709U, 2871006713U, 2870788931U, 2870569511U, 2870353319U, 2870136403U, 2869918537U, 2869699211U, 2869482403U, 2869264327U, 2869046833U, 2868829897U, 2868611561U, 2868394531U, 2868174143U, 2867957447U, 2867741813U, 2867525273U, 2867306537U, 2867087807U, 2866870037U, 2866650131U, 2866432507U, 2866214723U, 2865995389U, 2865779281U, 2865562759U, 2865345643U, 2865128281U, 2864909689U, 2864694359U, 2864474981U, 2864259109U, 2864041781U, 2863821967U, 2863603163U, 2863384697U, 2863168019U, 2862948337U, 2862729659U, 2862513271U, 2862296011U, 2862079601U, 2861861329U, 2861642369U, 2861425097U, 2861209789U, 2860995217U, 2860778423U, 2860561097U, 2860342603U, 2860123993U, 2859905843U, 2859688873U, 2859471767U, 2859252779U, 2859032731U, 2858814547U, 2858597117U, 2858380367U, 2858163197U, 2857943411U, 2857725271U, 2857506689U, 2857290773U, 2857072787U, 2856856927U, 2856636661U, 2856421241U, 2856205237U, 2855990087U, 2855772947U, 2855553373U, 2855333407U, 2855115623U, 2854898329U, 2854680739U, 2854464091U, 2854245203U, 2854025267U, 2853810433U, 2853595379U, 2853379457U, 2853160217U, 2852940071U, 2852723551U, 2852506303U, 2852289907U, 2852072389U, 2851854713U, 2851637123U, 2851420771U, 2851204067U, 2850984959U, 2850768589U, 2850549269U, 2850330421U, 2850111983U, 2849894777U, 2849677687U, 2849461753U, 2849245277U, 2849027833U, 2848809701U, 2848590973U, 2848374059U, 2848154471U, 2847936691U, 2847718589U, 2847501413U, 2847283139U, 2847064399U, 2846845681U, 2846630233U, 2846412451U, 2846195621U, 2845978997U, 2845761719U, 2845545929U, 2845328281U, 2845111153U, 2844894137U, 2844676819U, 2844457703U, 2844237833U, 2844020057U, 2843802061U, 2843583269U, 2843367311U, 2843148307U, 2842929931U, 2842712767U, 2842494803U, 2842276837U, 2842059893U, 2841843317U, 2841625249U, 2841405043U, 2841186893U, 2840966993U, 2840751341U, 2840533337U, 2840315887U, 2840099881U, 2839879993U, 2839663579U, 2839446527U, 2839227731U, 2839010423U, 2838792029U, 2838573323U, 2838357359U, 2838139411U, 2837920433U, 2837703611U, 2837486299U, 2837267611U, 2837049623U, 2836833059U, 2836613807U, 2836398179U, 2836180517U, 2835963887U, 2835744931U, 2835526247U, 2835309481U, 2835089911U, 2834871859U, 2834655797U, 2834437279U, 2834220317U, 2834003617U, 2833786201U, 2833565099U, 2833349143U, 2833132711U, 2832915803U, 2832695309U, 2832478303U, 2832259931U, 2832041741U, 2831822611U, 2831604649U, 2831385941U, 2831168953U, 2830949377U, 2830732193U, 2830514789U, 2830296191U, 2830078421U, 2829861907U, 2829645557U, 2829428501U, 2829210367U, 2828994253U, 2828776007U, 2828556517U, 2828338973U, 2828122361U, 2827905911U, 2827687451U, 2827470001U, 2827253929U, 2827036441U, 2826817351U, 2826600781U, 2826383321U, 2826165103U, 2825945599U, 2825728769U, 2825510437U, 2825292881U, 2825075599U, 2824857577U, 2824637267U, 2824421753U, 2824203383U, 2823985121U, 2823767741U, 2823552713U, 2823334027U, 2823115531U, 2822899567U, 2822681171U, 2822466149U, 2822249779U, 2822031559U, 2821815097U, 2821597187U, 2821377467U, 2821161307U, 2820944677U, 2820726023U, 2820509233U, 2820291787U, 2820074617U, 2819858617U, 2819639863U, 2819420909U, 2819204699U, 2818986097U, 2818769671U, 2818554127U, 2818338797U, 2818119323U, 2817902393U, 2817687143U, 2817470609U, 2817251677U, 2817033533U, 2816816729U, 2816597177U, 2816379701U, 2816161721U, 2815943177U, 2815724267U, 2815508719U, 2815292171U, 2815074161U, 2814855517U, 2814639523U, 2814424241U, 2814205813U, 2813989523U, 2813771789U, 2813553863U, 2813335013U, 2813118311U, 2812899511U, 2812682017U, 2812466269U, 2812247873U, 2812029713U, 2811814463U, 2811594971U, 2811377483U, 2811158557U, 2810940163U, 2810724047U, 2810504129U, 2810285299U, 2810067109U, 2809850917U, 2809632401U, 2809416563U, 2809198597U, 2808980641U, 2808761933U, 2808546109U, 2808327799U, 2808109763U, 2807892041U, 2807673161U, 2807455799U, 2807239129U, 2807021237U, 2806801457U, 2806581781U, 2806364989U, 2806148617U, 2805931031U, 2805715879U, 2805500573U, 2805283331U, 2805064187U, 2804847361U, 2804630473U, 2804413741U, 2804195767U, 2803975861U, 2803759481U, 2803540147U, 2803324603U, 2803107253U, 2802890353U, 2802672823U, 2802457183U, 2802239873U, 2802023131U, 2801805257U, 2801588953U, 2801372323U, 2801154773U, 2800937873U, 2800719839U, 2800502303U, 2800284107U, 2800066679U, 2799847909U, 2799629947U, 2799413213U, 2799194747U, 2798976953U, 2798757359U, 2798541121U, 2798323391U, 2798104747U, 2797889089U, 2797671869U, 2797455259U, 2797239293U, 2797022453U, 2796803531U, 2796585007U, 2796367729U, 2796151247U, 2795933939U, 2795714539U, 2795497283U, 2795280629U, 2795064541U, 2794846657U, 2794628513U, 2794411001U, 2794193641U, 2793974507U, 2793756883U, 2793538697U, 2793322783U, 2793104891U, 2792887567U, 2792669413U, 2792450077U, 2792234747U, 2792015983U, 2791799281U, 2791579949U, 2791362671U, 2791148117U, 2790929363U, 2790712147U, 2790494117U, 2790276341U, 2790057701U, 2789840201U, 2789622509U, 2789404531U, 2789187923U, 2788970959U, 2788753739U, 2788535047U, 2788317643U, 2788099129U, 2787883151U, 2787666533U, 2787448931U, 2787231721U, 2787014497U, 2786796839U, 2786578331U, 2786361649U, 2786144821U, 2785926443U, 2785709483U, 2785492691U, 2785276147U, 2785059701U, 2784842513U, 2784623269U, 2784403757U, 2784186253U, 2783970367U, 2783751689U, 2783533561U, 2783316001U, 2783098823U, 2782882673U, 2782664111U, 2782447223U, 2782229669U, 2782011607U, 2781792473U, 2781577033U, 2781359699U, 2781143957U, 2780925857U, 2780705443U, 2780487971U, 2780272037U, 2780052623U, 2779835621U, 2779620559U, 2779402261U, 2779184761U, 2778966361U, 2778750509U, 2778533341U, 2778314027U, 2778097499U, 2777877251U, 2777660539U, 2777443531U, 2777226589U, 2777009243U, 2776792973U, 2776576351U, 2776361117U, 2776143047U, 2775924847U, 2775707611U, 2775489313U, 2775272177U, 2775054169U, 2774836811U, 2774619791U, 2774401967U, 2774184313U, 2773966513U, 2773747181U, 2773530527U, 2773313149U, 2773095791U, 2772879017U, 2772660467U, 2772444667U, 2772228551U, 2772009767U, 2771792449U, 2771576581U, 2771359039U, 2771144221U, 2770927889U, 2770711787U, 2770494997U, 2770277231U, 2770058563U, 2769839873U, 2769624397U, 2769407651U, 2769188251U, 2768970991U, 2768754187U, 2768536579U, 2768319319U, 2768102431U, 2767887809U, 2767669573U, 2767451647U, 2767235123U, 2767018187U, 2766800807U, 2766583471U, 2766366329U, 2766148349U, 2765931257U, 2765713711U, 2765494453U, 2765279519U, 2765058767U, 2764841509U, 2764622239U, 2764406269U, 2764188703U, 2763970529U, 2763752401U, 2763533807U, 2763317149U, 2763100811U, 2762884231U, 2762668303U, 2762450149U, 2762230519U, 2762015407U, 2761798139U, 2761581419U, 2761365491U, 2761146097U, 2760927271U, 2760711053U, 2760493937U, 2760274871U, 2760056279U, 2759839081U, 2759621659U, 2759403499U, 2759183873U, 2758967117U, 2758749431U, 2758531091U, 2758312511U, 2758094869U, 2757875647U, 2757661289U, 2757443287U, 2757225577U, 2757009529U, 2756793001U, 2756576659U, 2756357939U, 2756141051U, 2755926427U, 2755708801U, 2755491989U, 2755275233U, 2755057649U, 2754840499U, 2754623321U, 2754407107U, 2754190189U, 2753970071U, 2753751277U, 2753533889U, 2753317397U, 2753098739U, 2752879889U, 2752663559U, 2752447129U, 2752230763U, 2752012477U, 2751795523U, 2751574817U, 2751359173U, 2751143231U, 2750927563U, 2750710201U, 2750494993U, 2750277767U, 2750058631U, 2749838719U, 2749621681U, 2749404323U, 2749186409U, 2748969491U, 2748754933U, 2748537481U, 2748318541U, 2748099931U, 2747881769U, 2747664079U, 2747446327U, 2747228923U, 2747009921U, 2746791577U, 2746574401U, 2746356461U, 2746139393U, 2745923597U, 2745705107U, 2745486259U, 2745268853U, 2745053603U, 2744837633U, 2744620103U, 2744402081U, 2744184061U, 2743965649U, 2743747399U, 2743529093U, 2743309747U, 2743091501U, 2742875263U, 2742657499U, 2742436849U, 2742221177U, 2742002209U, 2741784317U, 2741565467U, 2741350751U, 2741134939U, 2740917589U, 2740700147U, 2740484129U, 2740268543U, 2740051661U, 2739832097U, 2739613999U, 2739397519U, 2739180611U, 2738965601U, 2738750713U, 2738530519U, 2738312657U, 2738097601U, 2737880659U, 2737663919U, 2737447673U, 2737231039U, 2737011469U, 2736795203U, 2736577367U, 2736359929U, 2736140411U, 2735922361U, 2735707621U, 2735490701U, 2735272087U, 2735051993U, 2734834733U, 2734617673U, 2734399807U, 2734183789U, 2733964489U, 2733747299U, 2733531319U, 2733315773U, 2733096937U, 2732877229U, 2732659313U, 2732442539U, 2732224381U, 2732008493U, 2731791107U, 2731575277U, 2731359073U, 2731143791U, 2730927193U, 2730710711U, 2730492463U, 2730272821U, 2730056191U, 2729836853U, 2729618401U, 2729401309U, 2729183783U, 2728967399U, 2728750513U, 2728532957U, 2728316387U, 2728095649U, 2727876353U, 2727657487U, 2727441889U, 2727223129U, 2727005321U, 2726785889U, 2726567969U, 2726350567U, 2726134057U, 2725917767U, 2725702043U, 2725483997U, 2725265143U, 2725048691U, 2724834121U, 2724617173U, 2724400213U, 2724182843U, 2723963009U, 2723744983U, 2723527771U, 2723309219U, 2723091817U, 2722872419U, 2722654423U, 2722437283U, 2722221071U, 2722003787U, 2721787063U, 2721571087U, 2721354179U, 2721135533U, 2720918813U, 2720700211U, 2720482043U, 2720263867U, 2720045333U, 2719829513U, 2719610849U, 2719394527U, 2719178291U, 2718963449U, 2718746123U, 2718526709U, 2718310267U, 2718091331U, 2717873803U, 2717658043U, 2717440529U, 2717224541U, 2717007047U, 2716791377U, 2716572949U, 2716355051U, 2716137659U, 2715920573U, 2715704273U, 2715486167U, 2715267853U, 2715051109U, 2714833687U, 2714615261U, 2714398829U, 2714182301U, 2713964917U, 2713748071U, 2713530331U, 2713313419U, 2713095769U, 2712878431U, 2712662101U, 2712443231U, 2712227411U, 2712009089U, 2711793187U, 2711574529U, 2711360329U, 2711144291U, 2710924687U, 2710707551U, 2710489841U, 2710273571U, 2710057997U, 2709838841U, 2709622463U, 2709405917U, 2709186349U, 2708968877U, 2708750413U, 2708532971U, 2708318071U, 2708101423U, 2707882889U, 2707665913U, 2707449389U, 2707232833U, 2707015789U, 2706799423U, 2706580579U, 2706364931U, 2706147757U, 2705930971U, 2705712257U, 2705495677U, 2705279699U, 2705062303U, 2704846349U, 2704628477U, 2704412203U, 2704194443U, 2703975119U, 2703756427U, 2703538801U, 2703322967U, 2703105413U, 2702888407U, 2702670497U, 2702454919U, 2702235997U, 2702021737U, 2701801493U, 2701585729U, 2701367989U, 2701151581U, 2700934559U, 2700718619U, 2700500519U, 2700284057U, 2700067691U, 2699850661U, 2699632207U, 2699414203U, 2699197199U, 2698979867U, 2698763449U, 2698546423U, 2698328177U, 2698112723U, 2697894349U, 2697677911U, 2697461189U, 2697244709U, 2697028651U, 2696813281U, 2696594269U, 2696377417U, 2696159857U, 2695942259U, 2695726037U, 2695509877U, 2695293703U, 2695077029U, 2694857899U, 2694641657U, 2694426953U, 2694209863U, 2693992429U, 2693776999U, 2693558843U, 2693339317U, 2693121281U, 2692904281U, 2692687223U, 2692468787U, 2692252309U, 2692034089U, 2691819241U, 2691602107U, 2691383239U, 2691166903U, 2690948789U, 2690732003U, 2690515171U, 2690299373U, 2690081593U, 2689862561U, 2689645753U, 2689428227U, 2689209829U, 2688993607U, 2688777209U, 2688561017U, 2688343547U, 2688127933U, 2687911913U, 2687694539U, 2687476763U, 2687263067U, 2687049571U, 2686832471U, 2686615571U, 2686398347U, 2686179949U, 2685965081U, 2685747137U, 2685529541U, 2685310961U, 2685093211U, 2684876093U, 2684658019U, 2684440067U, 2684223953U, 2684005817U, 2683789963U, 2683571243U, 2683353733U, 2683137199U, 2682917623U, 2682700063U, 2682479377U, 2682264451U, 2682047707U, 2681828923U, 2681611753U, 2681394413U, 2681177111U, 2680959709U, 2680744291U, 2680525957U, 2680308977U, 2680096213U, 2679877279U, 2679660703U, 2679442013U, 2679225181U, 2679008639U, 2678791777U, 2678576051U, 2678358019U, 2678142487U, 2677926301U, 2677708807U, 2677493873U, 2677275257U, 2677055411U, 2676838837U, 2676620759U, 2676405769U, 2676189599U, 2675970641U, 2675755597U, 2675538689U, 2675323379U, 2675104633U, 2674886273U, 2674669183U, 2674452647U, 2674236199U, 2674019521U, 2673802099U, 2673589109U, 2673370517U, 2673153583U, 2672936393U, 2672719319U, 2672502383U, 2672285699U, 2672069171U, 2671851187U, 2671632563U, 2671414829U, 2671199281U, 2670982297U, 2670764023U, 2670547589U, 2670329219U, 2670112937U, 2669897969U, 2669681671U, 2669463829U, 2669247731U, 2669028689U, 2668810241U, 2668592911U, 2668377587U, 2668161701U, 2667945023U, 2667728057U, 2667510931U, 2667293077U, 2667076751U, 2666860253U, 2666643367U, 2666425523U, 2666207899U, 2665990751U, 2665773419U, 2665557353U, 2665337501U, 2665121737U, 2664904817U, 2664690073U, 2664472079U, 2664258323U, 2664039709U, 2663820461U, 2663602421U, 2663387431U, 2663168177U, 2662951507U, 2662735541U, 2662516147U, 2662300259U, 2662082509U, 2661865067U, 2661648779U, 2661432827U, 2661214163U, 2660999801U, 2660781689U, 2660562241U, 2660345951U, 2660127443U, 2659910443U, 2659691731U, 2659474313U, 2659255663U, 2659039301U, 2658822889U, 2658607327U, 2658391117U, 2658171743U, 2657953993U, 2657735627U, 2657519093U, 2657300533U, 2657084537U, 2656869827U, 2656653679U, 2656434799U, 2656218541U, 2656001609U, 2655785789U, 2655570427U, 2655354607U, 2655138589U, 2654923177U, 2654706149U, 2654489879U, 2654274641U, 2654055773U, 2653839263U, 2653621843U, 2653405831U, 2653189291U, 2652972197U, 2652754297U, 2652539249U, 2652321443U, 2652103859U, 2651884883U, 2651667787U, 2651451791U, 2651231629U, 2651014127U, 2650796653U, 2650580249U, 2650363361U, 2650147111U, 2649933037U, 2649715879U, 2649498611U, 2649282833U, 2649064001U, 2648847847U, 2648628863U, 2648409479U, 2648192941U, 2647976189U, 2647759267U, 2647543273U, 2647326169U, 2647110629U, 2646891629U, 2646675377U, 2646458467U, 2646241303U, 2646024781U, 2645808241U, 2645591363U, 2645373799U, 2645155729U, 2644938983U, 2644720241U, 2644505509U, 2644285547U, 2644068403U, 2643849823U, 2643632899U, 2643416371U, 2643198983U, 2642982389U, 2642764637U, 2642546867U, 2642330021U, 2642114309U, 2641897289U, 2641679903U, 2641464583U, 2641247107U, 2641030501U, 2640813577U, 2640595387U, 2640378677U, 2640158657U, 2639944249U, 2639727721U, 2639511683U, 2639296301U, 2639077267U, 2638858801U, 2638637987U, 2638423691U, 2638207669U, 2637992069U, 2637776507U, 2637558317U, 2637341431U, 2637125737U, 2636909777U, 2636691353U, 2636473793U, 2636255731U, 2636038121U, 2635820051U, 2635603241U, 2635384553U, 2635166099U, 2634948179U, 2634729767U, 2634513631U, 2634295421U, 2634078131U, 2633861851U, 2633645137U, 2633429243U, 2633212481U, 2632993633U, 2632775279U, 2632558007U, 2632341337U, 2632126339U, 2631908537U, 2631692597U, 2631477319U, 2631259781U, 2631043561U, 2630828731U, 2630613143U, 2630397893U, 2630179499U, 2629962739U, 2629744907U, 2629529321U, 2629310449U, 2629091953U, 2628874163U, 2628659393U, 2628440917U, 2628222629U, 2628006571U, 2627789387U, 2627571263U, 2627356183U, 2627139131U, 2626923749U, 2626706723U, 2626490747U, 2626273151U, 2626054199U, 2625836069U, 2625621469U, 2625405073U, 2625186331U, 2624968571U, 2624753177U, 2624536573U, 2624318867U, 2624102137U, 2623886479U, 2623670167U, 2623450667U, 2623233539U, 2623015669U, 2622798911U, 2622582203U, 2622365293U, 2622146899U, 2621929019U, 2621714273U, 2621497343U, 2621280383U, 2621064059U, 2620847813U, 2620631471U, 2620414429U, 2620198877U, 2619982487U, 2619765787U, 2619550579U, 2619333139U, 2619116081U, 2618899931U, 2618682371U, 2618463889U, 2618248037U, 2618032909U, 2617816303U, 2617598407U, 2617381099U, 2617163711U, 2616947087U, 2616730153U, 2616515873U, 2616296401U, 2616081211U, 2615863463U, 2615646091U, 2615429951U, 2615214491U, 2614996649U, 2614780747U, 2614561129U, 2614343869U, 2614125539U, 2613909959U, 2613692597U, 2613477539U, 2613260467U, 2613044363U, 2612829473U, 2612611453U, 2612394649U, 2612176891U, 2611957609U, 2611740809U, 2611525001U, 2611307623U, 2611092301U, 2610874723U, 2610658429U, 2610440659U, 2610225349U, 2610009869U, 2609793761U, 2609575523U, 2609357537U, 2609140153U, 2608923287U, 2608707473U, 2608489789U, 2608273363U, 2608055477U, 2607838963U, 2607621487U, 2607403291U, 2607186877U, 2606966951U, 2606751743U, 2606533609U, 2606317411U, 2606100793U, 2605883897U, 2605667153U, 2605448753U, 2605231193U, 2605014913U, 2604797309U, 2604582131U, 2604366593U, 2604149179U, 2603934233U, 2603717729U, 2603502661U, 2603284571U, 2603067263U, 2602846133U, 2602629787U, 2602412567U, 2602195759U, 2601979477U, 2601761791U, 2601547447U, 2601328687U, 2601107869U, 2600891873U, 2600673967U, 2600457787U, 2600242111U, 2600025353U, 2599807471U, 2599589617U, 2599374607U, 2599156873U, 2598942991U, 2598725593U, 2598507889U, 2598293911U, 2598075091U, 2597857697U, 2597643011U, 2597426287U, 2597207407U, 2596990943U, 2596775537U, 2596557989U, 2596340353U, 2596123469U, 2595906763U, 2595690697U, 2595473267U, 2595256019U, 2595041297U, 2594823029U, 2594608529U, 2594391979U, 2594174971U, 2593957823U, 2593739803U, 2593521767U, 2593305053U, 2593087513U, 2592871531U, 2592654041U, 2592437929U, 2592221161U, 2592003863U, 2591787493U, 2591571179U, 2591355859U, 2591139919U, 2590921727U, 2590705829U, 2590488157U, 2590272709U, 2590057949U, 2589843371U, 2589624967U, 2589408167U, 2589194147U, 2588976583U, 2588759923U, 2588542763U, 2588325721U, 2588107619U, 2587892101U, 2587675567U, 2587460251U, 2587244389U, 2587025141U, 2586807149U, 2586590401U, 2586374317U, 2586158693U, 2585941643U, 2585722697U, 2585505907U, 2585290069U, 2585072767U, 2584855279U, 2584640579U, 2584422497U, 2584204607U, 2583990001U, 2583773659U, 2583555721U, 2583338327U, 2583121259U, 2582905651U, 2582688041U, 2582469793U, 2582254019U, 2582037103U, 2581820699U, 2581606201U, 2581389763U, 2581174697U, 2580956501U, 2580739171U, 2580522377U, 2580305843U, 2580090167U, 2579872481U, 2579656291U, 2579442023U, 2579223007U, 2579006891U, 2578788097U, 2578569919U, 2578353559U, 2578136993U, 2577920299U, 2577706259U, 2577488027U, 2577272167U, 2577055669U, 2576837143U, 2576619973U, 2576404241U, 2576188333U, 2575971793U, 2575754497U, 2575538299U, 2575321747U, 2575105031U, 2574888223U, 2574672091U, 2574456811U, 2574239957U, 2574024287U, 2573808011U, 2573590927U, 2573375023U, 2573157761U, 2572940339U, 2572723019U, 2572506899U, 2572292279U, 2572077103U, 2571858599U, 2571642473U, 2571425821U, 2571208529U, 2570990369U, 2570773441U, 2570559869U, 2570342717U, 2570124047U, 2569905977U, 2569691791U, 2569474489U, 2569259047U, 2569043497U, 2568826747U, 2568610543U, 2568394487U, 2568177319U, 2567960729U, 2567743853U, 2567527723U, 2567312149U, 2567094511U, 2566876579U, 2566660301U, 2566443881U, 2566226821U, 2566010947U, 2565794353U, 2565579977U, 2565364231U, 2565146569U, 2564930507U, 2564713583U, 2564498843U, 2564283143U, 2564066677U, 2563849087U, 2563634039U, 2563419293U, 2563201339U, 2562985517U, 2562768883U, 2562550747U, 2562331649U, 2562114743U, 2561899009U, 2561684717U, 2561469901U, 2561252557U, 2561036551U, 2560819993U, 2560600963U, 2560383131U, 2560163939U, 2559947333U, 2559732017U, 2559515687U, 2559298571U, 2559083963U, 2558866837U, 2558650291U, 2558433401U, 2558218781U, 2558002897U, 2557785821U, 2557567981U, 2557350097U, 2557134737U, 2556919997U, 2556701327U, 2556484211U, 2556267677U, 2556051929U, 2555837747U, 2555622319U, 2555406457U, 2555188639U, 2554971443U, 2554754921U, 2554539539U, 2554320997U, 2554104451U, 2553889699U, 2553674129U, 2553456461U, 2553239069U, 2553022207U, 2552804363U, 2552586833U, 2552373497U, 2552154617U, 2551939211U, 2551722221U, 2551507171U, 2551289401U, 2551072441U, 2550854513U, 2550637459U, 2550422011U, 2550204619U, 2549989213U, 2549772451U, 2549556367U, 2549344409U, 2549126737U, 2548911913U, 2548696739U, 2548480237U, 2548263559U, 2548045919U, 2547829759U, 2547611191U, 2547396581U, 2547179527U, 2546962577U, 2546746981U, 2546529199U, 2546312413U, 2546095631U, 2545880399U, 2545664809U, 2545449493U, 2545232681U, 2545014881U, 2544797323U, 2544580949U, 2544362081U, 2544144749U, 2543927899U, 2543710349U, 2543493541U, 2543278021U, 2543058757U, 2542841729U, 2542624603U, 2542408513U, 2542191709U, 2541975707U, 2541759137U, 2541542141U, 2541326009U, 2541111257U, 2540896591U, 2540679419U, 2540462593U, 2540246953U, 2540030399U, 2539813907U, 2539596281U, 2539379419U, 2539161697U, 2538945569U, 2538728831U, 2538513301U, 2538297287U, 2538080243U, 2537864347U, 2537649151U, 2537433263U, 2537217229U, 2537001541U, 2536784311U, 2536567823U, 2536351751U, 2536135703U, 2535920071U, 2535703109U, 2535485651U, 2535267913U, 2535049381U, 2534835071U, 2534618899U, 2534401141U, 2534184743U, 2533968511U, 2533751977U, 2533535057U, 2533319801U, 2533103939U, 2532889717U, 2532672287U, 2532458581U, 2532240527U, 2532024263U, 2531808221U, 2531594033U, 2531375533U, 2531159747U, 2530945583U, 2530728091U, 2530510111U, 2530291601U, 2530076701U, 2529860363U, 2529644539U, 2529427169U, 2529210923U, 2528994893U, 2528778227U, 2528561443U, 2528344967U, 2528129983U, 2527914227U, 2527697857U, 2527483549U, 2527265941U, 2527048369U, 2526831781U, 2526617609U, 2526401041U, 2526186511U, 2525969521U, 2525751269U, 2525536837U, 2525319001U, 2525102543U, 2524883839U, 2524667221U, 2524449793U, 2524233617U, 2524016647U, 2523800459U, 2523584641U, 2523368747U, 2523151927U, 2522932883U, 2522717297U, 2522499653U, 2522283347U, 2522067281U, 2521852183U, 2521635689U, 2521420529U, 2521202821U, 2520984749U, 2520769301U, 2520551983U, 2520337163U, 2520121147U, 2519904151U, 2519687407U, 2519469941U, 2519254519U, 2519038309U, 2518820833U, 2518604357U, 2518386329U, 2518171613U, 2517954631U, 2517740233U, 2517524573U, 2517306587U, 2517091133U, 2516875549U, 2516659099U, 2516440349U, 2516223511U, 2516009189U, 2515791953U, 2515574741U, 2515356967U, 2515140851U, 2514925321U, 2514708857U, 2514492941U, 2514278527U, 2514060737U, 2513844511U, 2513629211U, 2513413999U, 2513197331U, 2512982491U, 2512767919U, 2512550039U, 2512333891U, 2512118659U, 2511902051U, 2511683351U, 2511466921U, 2511249691U, 2511035069U, 2510818363U, 2510602331U, 2510385959U, 2510168447U, 2509952597U, 2509736107U, 2509518721U, 2509301233U, 2509086889U, 2508870779U, 2508654017U, 2508436187U, 2508220999U, 2508004423U, 2507788471U, 2507572759U, 2507358193U, 2507142773U, 2506926857U, 2506708901U, 2506492003U, 2506275773U, 2506059841U, 2505843227U, 2505628639U, 2505412999U, 2505197309U, 2504978291U, 2504764349U, 2504546719U, 2504331703U, 2504116333U, 2503900211U, 2503686869U, 2503468057U, 2503251931U, 2503034987U, 2502819383U, 2502601529U, 2502383761U, 2502165307U, 2501950663U, 2501732017U, 2501516429U, 2501298523U, 2501082677U, 2500865963U, 2500651249U, 2500433521U, 2500215791U, 2499999013U, 2499784513U, 2499566551U, 2499348193U, 2499133477U, 2498919091U, 2498700949U, 2498484803U, 2498268767U, 2498051131U, 2497835203U, 2497619143U, 2497401107U, 2497185151U, 2496967981U, 2496751651U, 2496536257U, 2496318859U, 2496101129U, 2495884337U, 2495667091U, 2495449483U, 2495234069U, 2495015851U, 2494798981U, 2494586071U, 2494369567U, 2494153777U, 2493936787U, 2493720041U, 2493503279U, 2493288713U, 2493072847U, 2492855327U, 2492639627U, 2492424367U, 2492206993U, 2491988657U, 2491772527U, 2491556789U, 2491340471U, 2491123897U, 2490906919U, 2490690511U, 2490473023U, 2490256157U, 2490039371U, 2489824397U, 2489606737U, 2489386771U, 2489169691U, 2488953791U, 2488738607U, 2488524167U, 2488307113U, 2488089367U, 2487872069U, 2487655309U, 2487439177U, 2487224461U, 2487006499U, 2486788963U, 2486573101U, 2486356783U, 2486139791U, 2485923217U, 2485705493U, 2485487957U, 2485271471U, 2485052771U, 2484839933U, 2484624929U, 2484408247U, 2484192527U, 2483973307U, 2483759609U, 2483543987U, 2483328161U, 2483109467U, 2482893463U, 2482675901U, 2482457161U, 2482241299U, 2482026611U, 2481810781U, 2481595201U, 2481379739U, 2481163543U, 2480947769U, 2480731301U, 2480516641U, 2480302337U, 2480086997U, 2479867427U, 2479650223U, 2479434857U, 2479215799U, 2479001621U, 2478785357U, 2478571189U, 2478356417U, 2478141383U, 2477923397U, 2477707373U, 2477488961U, 2477271481U, 2477057941U, 2476842673U, 2476624159U, 2476409263U, 2476193219U, 2475977579U, 2475761023U, 2475543029U, 2475328783U, 2475110999U, 2474890879U, 2474674327U, 2474459227U, 2474244041U, 2474029147U, 2473812701U, 2473596403U, 2473381349U, 2473165927U, 2472951167U, 2472735413U, 2472520727U, 2472307091U, 2472091723U, 2471874173U, 2471656697U, 2471441579U, 2471224237U, 2471006873U, 2470790431U, 2470575083U, 2470358629U, 2470143691U, 2469927209U, 2469711271U, 2469499757U, 2469281999U, 2469064889U, 2468847947U, 2468629519U, 2468413229U, 2468197247U, 2467983239U, 2467766527U, 2467549933U, 2467333889U, 2467116077U, 2466900307U, 2466683279U, 2466465941U, 2466249673U, 2466036497U, 2465821507U, 2465604553U, 2465388727U, 2465172733U, 2464957717U, 2464740137U, 2464523959U, 2464308311U, 2464091587U, 2463874783U, 2463659027U, 2463441269U, 2463225563U, 2463010027U, 2462791873U, 2462574523U, 2462356487U, 2462139853U, 2461922713U, 2461706603U, 2461490771U, 2461272043U, 2461055423U, 2460842491U, 2460624181U, 2460409169U, 2460192541U, 2459976229U, 2459758421U, 2459540911U, 2459325443U, 2459107793U, 2458892551U, 2458677601U, 2458461193U, 2458243223U, 2458027157U, 2457811933U, 2457594323U, 2457378923U, 2457161789U, 2456946269U, 2456730629U, 2456513639U, 2456297149U, 2456079463U, 2455863857U, 2455649191U, 2455433069U, 2455218023U, 2455004333U, 2454788311U, 2454571607U, 2454356581U, 2454139231U, 2453920571U, 2453704789U, 2453488979U, 2453271463U, 2453054039U, 2452840781U, 2452623821U, 2452410967U, 2452195063U, 2451976601U, 2451763159U, 2451547559U, 2451331549U, 2451116651U, 2450900741U, 2450682943U, 2450465513U, 2450249993U, 2450033627U, 2449816027U, 2449597919U, 2449381289U, 2449162117U, 2448946469U, 2448729883U, 2448513373U, 2448294643U, 2448077341U, 2447859991U, 2447646029U, 2447430317U, 2447215081U, 2446995403U, 2446778861U, 2446563043U, 2446347913U, 2446130653U, 2445914279U, 2445699913U, 2445483571U, 2445267343U, 2445053797U, 2444836921U, 2444622311U, 2444408423U, 2444189777U, 2443974557U, 2443759229U, 2443540247U, 2443324393U, 2443106177U, 2442890503U, 2442673561U, 2442456791U, 2442241667U, 2442025237U, 2441808221U, 2441594489U, 2441376631U, 2441160893U, 2440945873U, 2440728361U, 2440510843U, 2440294657U, 2440080157U, 2439865657U, 2439651391U, 2439433319U, 2439217799U, 2439004261U, 2438787661U, 2438570569U, 2438355421U, 2438138531U, 2437923409U, 2437707127U, 2437492373U, 2437275517U, 2437061327U, 2436844313U, 2436629971U, 2436414881U, 2436198631U, 2435981077U, 2435762471U, 2435546731U, 2435333387U, 2435115047U, 2434897891U, 2434683133U, 2434464391U, 2434247779U, 2434031381U, 2433816977U, 2433598367U, 2433382891U, 2433166579U, 2432951363U, 2432734259U, 2432519267U, 2432303207U, 2432088437U, 2431871549U, 2431654009U, 2431438567U, 2431222883U, 2431004551U, 2430789007U, 2430572239U, 2430357899U, 2430140243U, 2429923631U, 2429708647U, 2429490697U, 2429277119U, 2429059631U, 2428841551U, 2428626203U, 2428410749U, 2428193741U, 2427976979U, 2427760243U, 2427542993U, 2427328229U, 2427113081U, 2426897147U, 2426680747U, 2426465647U, 2426250041U, 2426034613U, 2425818701U, 2425601929U, 2425385723U, 2425169891U, 2424956221U, 2424741701U, 2424525161U, 2424310661U, 2424093157U, 2423875841U, 2423659657U, 2423445293U, 2423230783U, 2423015821U, 2422799177U, 2422585771U, 2422367743U, 2422152179U, 2421936493U, 2421719873U, 2421503983U, 2421287081U, 2421068899U, 2420852347U, 2420636627U, 2420420903U, 2420204023U, 2419987799U, 2419771187U, 2419554157U, 2419338787U, 2419124819U, 2418907529U, 2418693047U, 2418479549U, 2418264571U, 2418048331U, 2417831257U, 2417614807U, 2417399119U, 2417184257U, 2416967611U, 2416752409U, 2416536271U, 2416319387U, 2416105057U, 2415886301U, 2415670069U, 2415453023U, 2415235709U, 2415018433U, 2414803031U, 2414586983U, 2414370943U, 2414155213U, 2413940083U, 2413723471U, 2413506059U, 2413290541U, 2413073251U, 2412857789U, 2412643193U, 2412426707U, 2412211163U, 2411993867U, 2411776583U, 2411562311U, 2411345479U, 2411129923U, 2410914791U, 2410699133U, 2410481377U, 2410266007U, 2410048829U, 2409832129U, 2409617663U, 2409401249U, 2409184651U, 2408968189U, 2408751419U, 2408534461U, 2408320127U, 2408104597U, 2407888957U, 2407671853U, 2407458671U, 2407241731U, 2407025459U, 2406810563U, 2406592847U, 2406378241U, 2406160049U, 2405944223U, 2405727229U, 2405511811U, 2405297623U, 2405082629U, 2404866197U, 2404648957U, 2404432183U, 2404215091U, 2403999487U, 2403782401U, 2403567059U, 2403350249U, 2403134623U, 2402919731U, 2402704211U, 2402489473U, 2402272571U, 2402054147U, 2401837289U, 2401621687U, 2401406131U, 2401189979U, 2400973123U, 2400757439U, 2400539651U, 2400323077U, 2400105919U, 2399889293U, 2399675141U, 2399460449U, 2399245733U, 2399029231U, 2398813981U, 2398597219U, 2398379413U, 2398164833U, 2397948569U, 2397732923U, 2397515801U, 2397299549U, 2397085021U, 2396867801U, 2396653109U, 2396435089U, 2396217739U, 2395999153U, 2395783231U, 2395566959U, 2395350827U, 2395135343U, 2394920179U, 2394702979U, 2394486719U, 2394270059U, 2394055669U, 2393840479U, 2393622653U, 2393406401U, 2393190893U, 2392975477U, 2392759277U, 2392544101U, 2392327433U, 2392113121U, 2391896839U, 2391678997U, 2391461393U, 2391247091U, 2391031847U, 2390816957U, 2390600393U, 2390384861U, 2390168317U, 2389953641U, 2389736719U, 2389520779U, 2389304989U, 2389091333U, 2388874603U, 2388658969U, 2388442499U, 2388225803U, 2388006067U, 2387791751U, 2387577977U, 2387360413U, 2387144453U, 2386930687U, 2386714199U, 2386497403U, 2386279781U, 2386064861U, 2385851509U, 2385635543U, 2385420431U, 2385202607U, 2384985487U, 2384769461U, 2384554421U, 2384337071U, 2384122519U, 2383906543U, 2383692127U, 2383476829U, 2383262647U, 2383047829U, 2382830459U, 2382615419U, 2382400133U, 2382184537U, 2381968223U, 2381751839U, 2381535539U, 2381318791U, 2381103733U, 2380886887U, 2380673297U, 2380455919U, 2380238759U, 2380021361U, 2379807751U, 2379591671U, 2379377153U, 2379160853U, 2378944891U, 2378727539U, 2378510513U, 2378293279U, 2378076593U, 2377861237U, 2377644917U, 2377429697U, 2377213193U, 2376996647U, 2376782251U, 2376566029U, 2376349571U, 2376133733U, 2375919907U, 2375704391U, 2375485579U, 2375270591U, 2375054579U, 2374837373U, 2374621817U, 2374406971U, 2374192853U, 2373976057U, 2373760531U, 2373545989U, 2373327241U, 2373111347U, 2372894317U, 2372680469U, 2372464907U, 2372249629U, 2372032771U, 2371818637U, 2371601437U, 2371383727U, 2371168507U, 2370952511U, 2370736603U, 2370518873U, 2370304579U, 2370089479U, 2369872579U, 2369658763U, 2369441329U, 2369224889U, 2369010191U, 2368793017U, 2368578991U, 2368362539U, 2368147211U, 2367932341U, 2367716921U, 2367502859U, 2367286853U, 2367071513U, 2366857811U, 2366642171U, 2366426123U, 2366209843U, 2365994641U, 2365779181U, 2365561397U, 2365345733U, 2365130297U, 2364913519U, 2364698551U, 2364482947U, 2364266941U, 2364048899U, 2363831777U, 2363616797U, 2363399443U, 2363185907U, 2362970219U, 2362753663U, 2362538753U, 2362325137U, 2362108759U, 2361891607U, 2361677057U, 2361460697U, 2361244889U, 2361029521U, 2360811251U, 2360593589U, 2360377871U, 2360160973U, 2359944163U, 2359729637U, 2359513753U, 2359298749U, 2359081141U, 2358864077U, 2358647191U, 2358433151U, 2358217307U, 2358002501U, 2357786393U, 2357572391U, 2357355223U, 2357140127U, 2356922443U, 2356706927U, 2356491167U, 2356276309U, 2356060219U, 2355843337U, 2355628351U, 2355412211U, 2355196939U, 2354979299U, 2354762923U, 2354547589U, 2354332327U, 2354116403U, 2353898347U, 2353682899U, 2353467719U, 2353251041U, 2353034861U, 2352821521U, 2352608729U, 2352391733U, 2352177071U, 2351959373U, 2351743871U, 2351527331U, 2351311103U, 2351095787U, 2350880537U, 2350663867U, 2350448987U, 2350233607U, 2350018009U, 2349802193U, 2349585643U, 2349371473U, 2349154459U, 2348938483U, 2348723393U, 2348506163U, 2348290627U, 2348073529U, 2347858001U, 2347641251U, 2347426061U, 2347210109U, 2346994847U, 2346777833U, 2346563741U, 2346347957U, 2346130597U, 2345915233U, 2345700967U, 2345483321U, 2345268559U, 2345055421U, 2344836029U, 2344620749U, 2344404077U, 2344188467U, 2343971621U, 2343753989U, 2343537377U, 2343322691U, 2343106237U, 2342889763U, 2342675663U, 2342461337U, 2342245693U, 2342028907U, 2341811071U, 2341594513U, 2341380673U, 2341165823U, 2340950653U, 2340737603U, 2340521567U, 2340303299U, 2340086269U, 2339869699U, 2339651581U, 2339437049U, 2339222891U, 2339007247U, 2338790449U, 2338576003U, 2338361213U, 2338146329U, 2337927731U, 2337714713U, 2337499061U, 2337281887U, 2337065981U, 2336851397U, 2336635331U, 2336418673U, 2336202863U, 2335987399U, 2335772269U, 2335553713U, 2335341083U, 2335126153U, 2334909481U, 2334693863U, 2334479723U, 2334262787U, 2334047503U, 2333831449U, 2333616709U, 2333401867U, 2333186161U, 2332970869U, 2332755569U, 2332541017U, 2332323197U, 2332106743U, 2331891473U, 2331676169U, 2331460273U, 2331243809U, 2331029143U, 2330814481U, 2330599837U, 2330384489U, 2330164511U, 2329947589U, 2329731637U, 2329515427U, 2329299289U, 2329084333U, 2328867469U, 2328652009U, 2328436417U, 2328218201U, 2328001597U, 2327784983U, 2327571221U, 2327354473U, 2327138579U, 2326921769U, 2326706687U, 2326492871U, 2326275509U, 2326060369U, 2325845507U, 2325630133U, 2325415607U, 2325198173U, 2324982083U, 2324766023U, 2324552177U, 2324336591U, 2324119951U, 2323903651U, 2323689751U, 2323472693U, 2323258859U, 2323044107U, 2322827393U, 2322611059U, 2322394247U, 2322179177U, 2321964247U, 2321747737U, 2321531423U, 2321315869U, 2321098673U, 2320883861U, 2320668953U, 2320454753U, 2320239629U, 2320027529U, 2319811937U, 2319596449U, 2319378899U, 2319162739U, 2318945131U, 2318727809U, 2318510639U, 2318296021U, 2318078921U, 2317863337U, 2317645181U, 2317427533U, 2317209683U, 2316994513U, 2316778027U, 2316562777U, 2316347219U, 2316132769U, 2315916809U, 2315702513U, 2315487613U, 2315271197U, 2315055979U, 2314841521U, 2314625671U, 2314411019U, 2314197409U, 2313983249U, 2313767077U, 2313551609U, 2313335711U, 2313119387U, 2312904719U, 2312689363U, 2312472829U, 2312256629U, 2312040277U, 2311822883U, 2311606477U, 2311392157U, 2311180061U, 2310965303U, 2310751957U, 2310537049U, 2310322247U, 2310106033U, 2309889749U, 2309673881U, 2309456431U, 2309242093U, 2309026361U, 2308810601U, 2308595363U, 2308379243U, 2308164263U, 2307949739U, 2307733583U, 2307514733U, 2307299173U, 2307083393U, 2306868197U, 2306651671U, 2306436793U, 2306223461U, 2306007931U, 2305792133U, 2305573537U, 2305358221U, 2305141999U, 2304925529U, 2304710599U, 2304495799U, 2304279137U, 2304063901U, 2303847761U, 2303633251U, 2303417483U, 2303201833U, 2302986457U, 2302770469U, 2302556077U, 2302338421U, 2302121279U, 2301906433U, 2301689417U, 2301475069U, 2301260047U, 2301042587U, 2300826287U, 2300609203U, 2300394193U, 2300180731U, 2299964179U, 2299748471U, 2299534609U, 2299320679U, 2299105141U, 2298888577U, 2298672281U, 2298456929U, 2298242797U, 2298027227U, 2297811077U, 2297594521U, 2297378177U, 2297160329U, 2296945369U, 2296729447U, 2296513621U, 2296300339U, 2296084877U, 2295871601U, 2295656147U, 2295440813U, 2295224741U, 2295008923U, 2294792809U, 2294578633U, 2294364481U, 2294148251U, 2293932703U, 2293718041U, 2293502089U, 2293287109U, 2293071899U, 2292855451U, 2292641287U, 2292422921U, 2292208781U, 2291993437U, 2291777737U, 2291564321U, 2291348981U, 2291133973U, 2290918037U, 2290702693U, 2290489129U, 2290270789U, 2290053737U, 2289838373U, 2289621101U, 2289405653U, 2289190741U, 2288976737U, 2288762257U, 2288547733U, 2288330609U, 2288117243U, 2287900829U, 2287686169U, 2287468607U, 2287251751U, 2287037479U, 2286824389U, 2286608047U, 2286394637U, 2286182329U, 2285966717U, 2285752123U, 2285536247U, 2285320237U, 2285106023U, 2284891771U, 2284674407U, 2284457257U, 2284241537U, 2284026853U, 2283811573U, 2283596327U, 2283380261U, 2283161161U, 2282946331U, 2282730977U, 2282518223U, 2282301737U, 2282084897U, 2281870651U, 2281654673U, 2281437143U, 2281221827U, 2281004771U, 2280789233U, 2280573557U, 2280359363U, 2280142591U, 2279927491U, 2279711261U, 2279494291U, 2279276653U, 2279060527U, 2278846901U, 2278628909U, 2278411781U, 2278196407U, 2277980993U, 2277763753U, 2277549089U, 2277334771U, 2277118411U, 2276902399U, 2276688613U, 2276472853U, 2276256329U, 2276042711U, 2275828517U, 2275612679U, 2275397063U, 2275181479U, 2274965159U, 2274748517U, 2274535463U, 2274319609U, 2274107327U, 2273891549U, 2273676997U, 2273462767U, 2273248399U, 2273032639U, 2272818917U, 2272605253U, 2272389437U, 2272172081U, 2271957209U, 2271743939U, 2271528041U, 2271313729U, 2271098429U, 2270884471U, 2270669353U, 2270455567U, 2270240681U, 2270025151U, 2269809527U, 2269596941U, 2269382131U, 2269165319U, 2268951577U, 2268735797U, 2268517921U, 2268302123U, 2268086111U, 2267870603U, 2267656903U, 2267442757U, 2267227777U, 2267012081U, 2266797487U, 2266582793U, 2266368007U, 2266153339U, 2265938137U, 2265722351U, 2265506083U, 2265290141U, 2265075049U, 2264860427U, 2264644769U, 2264428451U, 2264214773U, 2263997711U, 2263782289U, 2263565729U, 2263352327U, 2263137001U, 2262920839U, 2262705761U, 2262492191U, 2262278069U, 2262062813U, 2261848051U, 2261633197U, 2261418409U, 2261204657U, 2260990273U, 2260774759U, 2260560277U, 2260345247U, 2260129169U, 2259914563U, 2259700207U, 2259484361U, 2259267151U, 2259053309U, 2258839753U, 2258625431U, 2258409821U, 2258192591U, 2257975997U, 2257761001U, 2257544407U, 2257329817U, 2257113083U, 2256895787U, 2256679597U, 2256466463U, 2256251911U, 2256035759U, 2255819249U, 2255604433U, 2255387119U, 2255171729U, 2254957261U, 2254742569U, 2254525633U, 2254311419U, 2254096151U, 2253881089U, 2253665009U, 2253448303U, 2253232537U, 2253017629U, 2252801377U, 2252586353U, 2252370139U, 2252154943U, 2251940153U, 2251724287U, 2251508141U, 2251293211U, 2251080107U, 2250864989U, 2250650741U, 2250437317U, 2250221147U, 2250007937U, 2249792849U, 2249577443U, 2249360747U, 2249143511U, 2248928303U, 2248714289U, 2248500389U, 2248282607U, 2248066363U, 2247851681U, 2247636583U, 2247421817U, 2247207073U, 2246990947U, 2246775449U, 2246560403U, 2246348051U, 2246132507U, 2245917799U, 2245703177U, 2245488887U, 2245273741U, 2245058089U, 2244843721U, 2244629719U, 2244412999U, 2244197437U, 2243982737U, 2243769653U, 2243551433U, 2243337457U, 2243120419U, 2242904581U, 2242688449U, 2242473991U, 2242259861U, 2242043599U, 2241825133U, 2241609701U, 2241395071U, 2241180787U, 2240967343U, 2240751923U, 2240536327U, 2240319527U, 2240105237U, 2239888687U, 2239674629U, 2239458203U, 2239244101U, 2239028387U, 2238815521U, 2238600541U, 2238383569U, 2238167417U, 2237952851U, 2237735261U, 2237518081U, 2237301083U, 2237088229U, 2236873019U, 2236658693U, 2236444453U, 2236229201U, 2236016201U, 2235800159U, 2235586427U, 2235370021U, 2235154721U, 2234939537U, 2234725013U, 2234510909U, 2234295191U, 2234081099U, 2233866847U, 2233652459U, 2233436629U, 2233218679U, 2233003183U, 2232789619U, 2232571813U, 2232355067U, 2232138367U, 2231922923U, 2231708449U, 2231493413U, 2231277413U, 2231061221U, 2230846967U, 2230632791U, 2230417751U, 2230201531U, 2229985133U, 2229769579U, 2229554461U, 2229340651U, 2229128767U, 2228912453U, 2228698319U, 2228481883U, 2228267953U, 2228051513U, 2227836329U, 2227622203U, 2227408321U, 2227192519U, 2226974441U, 2226760573U, 2226547241U, 2226332261U, 2226116807U, 2225900503U, 2225684207U, 2225468123U, 2225253677U, 2225039759U, 2224826473U, 2224610537U, 2224393937U, 2224179077U, 2223962707U, 2223747133U, 2223531173U, 2223316279U, 2223098953U, 2222882659U, 2222668169U, 2222453179U, 2222236673U, 2222020433U, 2221805137U, 2221591007U, 2221375883U, 2221160077U, 2220945563U, 2220729323U, 2220513517U, 2220299443U, 2220085447U, 2219871361U, 2219657239U, 2219440397U, 2219226643U, 2219013089U, 2218798327U, 2218581803U, 2218365979U, 2218151977U, 2217936223U, 2217720587U, 2217503231U, 2217288769U, 2217073951U, 2216859137U, 2216643199U, 2216429123U, 2216217607U, 2216003639U, 2215785851U, 2215570163U, 2215356079U, 2215137607U, 2214921911U, 2214707081U, 2214490303U, 2214276599U, 2214059119U, 2213841127U, 2213626687U, 2213409799U, 2213195329U, 2212980269U, 2212766779U, 2212554011U, 2212339553U, 2212125329U, 2211910373U, 2211695159U, 2211479729U, 2211262793U, 2211046499U, 2210831927U, 2210615761U, 2210401003U, 2210185847U, 2209971091U, 2209755451U, 2209536949U, 2209322803U, 2209108799U, 2208892547U, 2208677441U, 2208463339U, 2208247117U, 2208034453U, 2207819147U, 2207604541U, 2207391643U, 2207176733U, 2206959901U, 2206745909U, 2206531433U, 2206317367U, 2206101241U, 2205886327U, 2205671543U, 2205456833U, 2205243319U, 2205027023U, 2204811307U, 2204595641U, 2204379659U, 2204165801U, 2203948541U, 2203733117U, 2203517681U, 2203300223U, 2203086371U, 2202871961U, 2202654689U, 2202436493U, 2202221279U, 2202004547U, 2201791373U, 2201574377U, 2201360167U, 2201145061U, 2200928497U, 2200714381U, 2200498441U, 2200281751U, 2200068601U, 2199853559U, 2199635749U, 2199418691U, 2199204421U, 2198990219U, 2198773793U, 2198559829U, 2198343977U, 2198127923U, 2197912859U, 2197698263U, 2197483471U, 2197269587U, 2197052761U, 2196839891U, 2196623977U, 2196407699U, 2196193177U, 2195978129U, 2195763049U, 2195548093U, 2195333801U, 2195118769U, 2194903967U, 2194689127U, 2194475233U, 2194259981U, 2194045093U, 2193829657U, 2193615779U, 2193400303U, 2193183463U, 2192968597U, 2192753141U, 2192540993U, 2192325229U, 2192109989U, 2191894543U, 2191680791U, 2191463497U, 2191249147U, 2191034509U, 2190820267U, 2190606317U, 2190390899U, 2190174199U, 2189958893U, 2189743967U, 2189528807U, 2189313311U, 2189096633U, 2188880977U, 2188665929U, 2188452439U, 2188238047U, 2188022989U, 2187806953U, 2187592339U, 2187375787U, 2187160567U, 2186947853U, 2186734469U, 2186520907U, 2186305777U, 2186090447U, 2185874939U, 2185660657U, 2185444423U, 2185228519U, 2185014731U, 2184798521U, 2184583937U, 2184368803U, 2184153427U, 2183937773U, 2183724187U, 2183508791U, 2183292037U, 2183077639U, 2182862839U, 2182647839U, 2182430443U, 2182214731U, 2181997007U, 2181781843U, 2181567317U, 2181352403U, 2181134429U, 2180919913U, 2180705173U, 2180489261U, 2180274289U, 2180059613U, 2179844789U, 2179628147U, 2179411453U, 2179195943U, 2178981173U, 2178765881U, 2178552247U, 2178338983U, 2178124589U, 2177911657U, 2177695537U, 2177480443U, 2177264501U, 2177048869U, 2176833577U, 2176622813U, 2176405919U, 2176191037U, 2175977563U, 2175761669U, 2175546547U, 2175332921U, 2175118607U, 2174905169U, 2174691347U, 2174474537U, 2174260867U, 2174044051U, 2173830367U, 2173613773U, 2173400321U, 2173182191U, 2172969907U, 2172756941U, 2172541463U, 2172324157U, 2172107263U, 2171892293U, 2171676751U, 2171462441U, 2171245553U, 2171030177U, 2170817087U, 2170603703U, 2170388111U, 2170175779U, 2169961919U, 2169744097U, 2169531443U, 2169315259U, 2169100067U, 2168884763U, 2168668939U, 2168454077U, 2168240089U, 2168025037U, 2167808509U, 2167594523U, 2167378901U, 2167164107U, 2166947911U, 2166735047U, 2166519647U, 2166305593U, 2166090191U, 2165877419U, 2165660327U, 2165445811U, 2165231377U, 2165016067U, 2164800061U, 2164584337U, 2164370653U, 2164156157U, 2163937541U, 2163722377U, 2163510857U, 2163294317U, 2163076691U, 2162863051U, 2162648759U, 2162435339U, 2162219417U, 2162005633U, 2161788371U, 2161572109U, 2161357039U, 2161143913U, 2160930071U, 2160715201U, 2160498959U, 2160284281U, 2160071057U, 2159857957U, 2159644441U, 2159431277U, 2159216399U, 2158999463U, 2158783609U, 2158570681U, 2158353931U, 2158136809U, 2157922717U, 2157706357U, 2157490921U, 2157278737U, 2157063401U, 2156846201U, 2156631929U, 2156417051U, 2156202101U, 2155984819U, 2155770917U, 2155555967U, 2155339559U, 2155125689U, 2154911813U, 2154697789U, 2154481897U, 2154267373U, 2154053557U, 2153838251U, 2153623891U, 2153409701U, 2153194049U, 2152977367U, 2152761631U, 2152549747U, 2152334189U, 2152120979U, 2151905143U, 2151690707U, 2151475523U, 2151261493U, 2151045469U, 2150830289U, 2150614667U, 2150399893U, 2150187059U, 2149972697U, 2149756703U, 2149543889U, 2149327627U, 2149112429U, 2148896411U, 2148679669U, 2148466009U, 2148250061U, 2148035749U, 2147821513U, 2147607401U, 2147392201U, 2147178329U, 2146961347U, 2146748057U, 2146533959U, 2146317191U, 2146102477U, 2145889267U, 2145675289U, 2145460909U, 2145248167U, 2145033001U, 2144818411U, 2144602787U, 2144389217U, 2144174281U, 2143959581U, 2143744997U, 2143529491U, 2143314917U, 2143101241U, 2142887399U, 2142671353U, 2142457117U, 2142240403U, 2142027137U, 2141814319U, 2141596757U, 2141383633U, 2141168963U, 2140954709U, 2140740733U, 2140527553U, 2140313443U, 2140096993U, 2139883771U, 2139669449U, 2139456377U, 2139240409U, 2139025991U, 2138809969U, 2138593397U, 2138376997U, 2138163977U, 2137948823U, 2137734017U, 2137517407U, 2137301819U, 2137086989U, 2136872957U, 2136658427U, 2136442873U, 2136229309U, 2136014159U, 2135798803U, 2135582873U, 2135366899U, 2135151517U, 2134935289U, 2134721027U, 2134508581U, 2134293869U, 2134076557U, 2133860653U, 2133647933U, 2133431987U, 2133216271U, 2133000449U, 2132785727U, 2132571839U, 2132356769U, 2132141177U, 2131927409U, 2131711019U, 2131494667U, 2131280273U, 2131062221U, 2130845993U, 2130632453U, 2130418541U, 2130203653U, 2129987053U, 2129772677U, 2129556967U, 2129342653U, 2129127817U, 2128912277U, 2128695007U, 2128478327U, 2128264429U, 2128050467U, 2127837703U, 2127623801U, 2127408931U, 2127193907U, 2126978179U, 2126761667U, 2126547263U, 2126332057U, 2126115379U, 2125901263U, 2125684789U, 2125470601U, 2125257157U, 2125041631U, 2124825877U, 2124610991U, 2124395233U, 2124182597U, 2123968739U, 2123753647U, 2123537153U, 2123322571U, 2123108069U, 2122892371U, 2122672733U, 2122457621U, 2122243469U, 2122030279U, 2121815011U, 2121602663U, 2121386779U, 2121170593U, 2120957849U, 2120743579U, 2120527163U, 2120310461U, 2120094611U, 2119880879U, 2119665617U, 2119452541U, 2119237949U, 2119023493U, 2118807931U, 2118592439U, 2118377557U, 2118162689U, 2117948653U, 2117734709U, 2117518787U, 2117303467U, 2117087933U, 2116872119U, 2116657061U, 2116443677U, 2116230829U, 2116016173U, 2115801371U, 2115585181U, 2115369701U, 2115153727U, 2114938379U, 2114722927U, 2114507833U, 2114296181U, 2114083091U, 2113870123U, 2113654157U, 2113441021U, 2113224103U, 2113012547U, 2112798203U, 2112583841U, 2112367709U, 2112151631U, 2111937301U, 2111724911U, 2111509861U, 2111295701U, 2111081629U, 2110866419U, 2110651363U, 2110438397U, 2110223261U, 2110009829U, 2109797897U, 2109582913U, 2109369523U, 2109152387U, 2108937829U, 2108720821U, 2108508851U, 2108295751U, 2108080607U, 2107865293U, 2107650091U, 2107436741U, 2107222657U, 2107007647U, 2106792673U, 2106576917U, 2106359917U, 2106144197U, 2105930401U, 2105715049U, 2105501309U, 2105287433U, 2105073029U, 2104858771U, 2104647023U, 2104433021U, 2104219151U, 2104005019U, 2103788759U, 2103574393U, 2103359521U, 2103143461U, 2102929097U, 2102714129U, 2102500709U, 2102287063U, 2102071733U, 2101858169U, 2101644367U, 2101430251U, 2101215421U, 2101000631U, 2100786707U, 2100573677U, 2100356977U, 2100144953U, 2099929943U, 2099714203U, 2099498983U, 2099284679U, 2099070541U, 2098855537U, 2098641661U, 2098426349U, 2098211051U, 2097996079U, 2097777797U, 2097563203U, 2097349259U, 2097134239U, 2096920559U, 2096705759U, 2096492033U, 2096275873U, 2096060987U, 2095845113U, 2095630739U, 2095417099U, 2095204193U, 2094990617U, 2094777257U, 2094563689U, 2094349931U, 2094135709U, 2093917997U, 2093703973U, 2093489929U, 2093275181U, 2093060483U, 2092847143U, 2092631617U, 2092415669U, 2092200577U, 2091986231U, 2091773147U, 2091560467U, 2091343981U, 2091128869U, 2090914373U, 2090697439U, 2090484707U, 2090271769U, 2090056609U, 2089841513U, 2089626109U, 2089413709U, 2089199999U, 2088986687U, 2088770249U, 2088557147U, 2088342253U, 2088126977U, 2087912909U, 2087700257U, 2087485703U, 2087269703U, 2087054653U, 2086840409U, 2086626083U, 2086411141U, 2086194871U, 2085979487U, 2085764441U, 2085549139U, 2085334943U, 2085119369U, 2084905873U, 2084691677U, 2084475109U, 2084259323U, 2084044163U, 2083831573U, 2083616219U, 2083402001U, 2083186583U, 2082971789U, 2082759373U, 2082545177U, 2082330127U, 2082117649U, 2081901823U, 2081688289U, 2081474251U, 2081261443U, 2081046613U, 2080831771U, 2080617281U, 2080400599U, 2080186891U, 2079971801U, 2079758281U, 2079542903U, 2079328387U, 2079114383U, 2078897809U, 2078683337U, 2078472707U, 2078257351U, 2078045183U, 2077830827U, 2077616641U, 2077400671U, 2077185667U, 2076969607U, 2076755251U, 2076538223U, 2076323617U, 2076108059U, 2075893903U, 2075679917U, 2075462471U, 2075249549U, 2075035973U, 2074823669U, 2074609139U, 2074395527U, 2074179623U, 2073964481U, 2073751951U, 2073538321U, 2073326219U, 2073110059U, 2072896093U, 2072680901U, 2072466947U, 2072251847U, 2072036851U, 2071820351U, 2071608421U, 2071392137U, 2071176323U, 2070961337U, 2070746221U, 2070532231U, 2070319253U, 2070103601U, 2069889037U, 2069675147U, 2069458541U, 2069244319U, 2069030893U, 2068817347U, 2068602559U, 2068387669U, 2068172839U, 2067958549U, 2067743423U, 2067529463U, 2067313427U, 2067097567U, 2066881273U, 2066666963U, 2066452979U, 2066238739U, 2066026559U, 2065812179U, 2065594439U, 2065379831U, 2065165519U, 2064950903U, 2064736903U, 2064522697U, 2064309791U, 2064095249U, 2063882111U, 2063669011U, 2063454871U, 2063240269U, 2063025931U, 2062811071U, 2062597567U, 2062384199U, 2062167797U, 2061955403U, 2061740983U, 2061522713U, 2061310241U, 2061094153U, 2060880043U, 2060665253U, 2060449087U, 2060235917U, 2060020987U, 2059806971U, 2059590917U, 2059377119U, 2059160731U, 2058946231U, 2058731617U, 2058517511U, 2058304147U, 2058088283U, 2057873417U, 2057656157U, 2057439991U, 2057225377U, 2057011381U, 2056797829U, 2056582037U, 2056367063U, 2056152523U, 2055938219U, 2055726181U, 2055511897U, 2055295643U, 2055080669U, 2054867093U, 2054653849U, 2054438983U, 2054223761U, 2054008921U, 2053794817U, 2053582747U, 2053368827U, 2053151159U, 2052935029U, 2052719261U, 2052503023U, 2052290129U, 2052077113U, 2051862493U, 2051648983U, 2051433383U, 2051217811U, 2051001461U, 2050788151U, 2050575347U, 2050360619U, 2050148801U, 2049934517U, 2049720053U, 2049507997U, 2049295841U, 2049080531U, 2048866219U, 2048651251U, 2048437513U, 2048223949U, 2048009279U, 2047791847U, 2047578653U, 2047363049U, 2047149409U, 2046934993U, 2046720463U, 2046506843U, 2046291199U, 2046077087U, 2045861539U, 2045647739U, 2045434463U, 2045221103U, 2045007113U, 2044792049U, 2044576769U, 2044363891U, 2044149299U, 2043936319U, 2043720761U, 2043504637U, 2043292763U, 2043078641U, 2042866541U, 2042653213U, 2042438569U, 2042225033U, 2042009527U, 2041792717U, 2041579739U, 2041363763U, 2041147879U, 2040934349U, 2040718517U, 2040504493U, 2040289607U, 2040074797U, 2039858837U, 2039645171U, 2039430467U, 2039216407U, 2039003861U, 2038790651U, 2038576081U, 2038359943U, 2038146151U, 2037932623U, 2037716911U, 2037503981U, 2037287653U, 2037073373U, 2036858851U, 2036643893U, 2036429471U, 2036215387U, 2036000677U, 2035784449U, 2035570907U, 2035354273U, 2035139747U, 2034925411U, 2034711461U, 2034497363U, 2034284051U, 2034072233U, 2033859251U, 2033644259U, 2033431303U, 2033216407U, 2033002691U, 2032786661U, 2032573117U, 2032359227U, 2032146469U, 2031931939U, 2031718771U, 2031504173U, 2031288319U, 2031072521U, 2030860333U, 2030646193U, 2030432291U, 2030217193U, 2030003243U, 2029787321U, 2029573459U, 2029359097U, 2029144891U, 2028930721U, 2028716447U, 2028500113U, 2028285971U, 2028072061U, 2027854601U, 2027639671U, 2027425307U, 2027211397U, 2026995167U, 2026782997U, 2026568471U, 2026352353U, 2026140001U, 2025926909U, 2025711001U, 2025496607U, 2025283669U, 2025069139U, 2024855797U, 2024642273U, 2024426897U, 2024211479U, 2024000453U, 2023784047U, 2023568411U, 2023353641U, 2023137863U, 2022923561U, 2022708829U, 2022496247U, 2022282133U, 2022068203U, 2021852201U, 2021636473U, 2021423681U, 2021208647U, 2020993567U, 2020777973U, 2020563967U, 2020350851U, 2020136771U, 2019921859U, 2019706397U, 2019493009U, 2019277723U, 2019064589U, 2018850983U, 2018639201U, 2018424713U, 2018208637U, 2017993009U, 2017777939U, 2017562731U, 2017348253U, 2017134761U, 2016919963U, 2016705421U, 2016490933U, 2016277763U, 2016063589U, 2015850721U, 2015637157U, 2015421799U, 2015209013U, 2014994939U, 2014782433U, 2014566331U, 2014351637U, 2014137989U, 2013925063U, 2013711647U, 2013499049U, 2013286763U, 2013075139U, 2012859839U, 2012647649U, 2012431891U, 2012216867U, 2012004413U, 2011791329U, 2011576517U, 2011362433U, 2011148519U, 2010933593U, 2010720161U, 2010505199U, 2010290519U, 2010075337U, 2009859959U, 2009645977U, 2009431447U, 2009218259U, 2009003429U, 2008787149U, 2008574681U, 2008360573U, 2008145099U, 2007930259U, 2007716329U, 2007502459U, 2007286573U, 2007071909U, 2006858713U, 2006644403U, 2006430821U, 2006218061U, 2006003647U, 2005789979U, 2005575623U, 2005364209U, 2005151389U, 2004935551U, 2004721613U, 2004506423U, 2004292663U, 2004078577U, 2003863541U, 2003650409U, 2003440357U, 2003225123U, 2003010937U, 2002796941U, 2002581443U, 2002369483U, 2002153999U, 2001941651U, 2001729157U, 2001516353U, 2001301853U, 2001088319U, 2000875991U, 2000662501U, 2000447263U, 2000234189U, 2000021819U, 1999805713U, 1999591519U, 1999377031U, 1999163767U, 1998946837U, 1998733271U, 1998518189U, 1998303647U, 1998088991U, 1997874821U, 1997659667U, 1997445841U, 1997235533U, 1997021729U, 1996806061U, 1996589219U, 1996372933U, 1996159237U, 1995945257U, 1995733277U, 1995516739U, 1995302677U, 1995089477U, 1994873599U, 1994659547U, 1994447443U, 1994233277U, 1994020141U, 1993804573U, 1993591349U, 1993377929U, 1993161893U, 1992947581U, 1992735991U, 1992521611U, 1992307687U, 1992093223U, 1991878487U, 1991663129U, 1991450303U, 1991237041U, 1991022613U, 1990808779U, 1990594729U, 1990379987U, 1990165141U, 1989950267U, 1989736093U, 1989522463U, 1989308263U, 1989094451U, 1988879909U, 1988668001U, 1988453771U, 1988239081U, 1988022431U, 1987809871U, 1987597069U, 1987382933U, 1987166897U, 1986953041U, 1986741131U, 1986525991U, 1986312707U, 1986097783U, 1985884553U, 1985668123U, 1985453983U, 1985239303U, 1985025799U, 1984808653U, 1984596529U, 1984382563U, 1984169507U, 1983958577U, 1983743011U, 1983527261U, 1983314681U, 1983099403U, 1982885549U, 1982671441U, 1982456033U, 1982243303U, 1982026903U, 1981813313U, 1981600333U, 1981386437U, 1981174301U, 1980956819U, 1980744853U, 1980530767U, 1980316879U, 1980102307U, 1979890327U, 1979675213U, 1979460403U, 1979246653U, 1979031823U, 1978817069U, 1978604077U, 1978390889U, 1978178009U, 1977963947U, 1977749701U, 1977534121U, 1977320621U, 1977108079U, 1976893027U, 1976678113U, 1976464909U, 1976253337U, 1976037941U, 1975823131U, 1975607279U, 1975395517U, 1975179749U, 1974966589U, 1974752149U, 1974538739U, 1974325789U, 1974111697U, 1973900053U, 1973685503U, 1973472451U, 1973255929U, 1973042179U, 1972827331U, 1972612991U, 1972401703U, 1972186661U, 1971974149U, 1971760337U, 1971547093U, 1971334973U, 1971122009U, 1970910197U, 1970696591U, 1970480849U, 1970265071U, 1970049421U, 1969836083U, 1969621729U, 1969408369U, 1969193627U, 1968979921U, 1968765377U, 1968552293U, 1968339173U, 1968125447U, 1967912579U, 1967699759U, 1967485391U, 1967270213U, 1967054437U, 1966839869U, 1966624633U, 1966410613U, 1966194941U, 1965982463U, 1965767701U, 1965554191U, 1965341783U, 1965125849U, 1964913271U, 1964698751U, 1964484989U, 1964271983U, 1964054333U, 1963841857U, 1963626869U, 1963415351U, 1963201589U, 1962987557U, 1962773513U, 1962559147U, 1962341369U, 1962128447U, 1961914793U, 1961701477U, 1961488423U, 1961275501U, 1961060869U, 1960848299U, 1960633061U, 1960417241U, 1960204229U, 1959988241U, 1959770467U, 1959554581U, 1959344813U, 1959133037U, 1958918903U, 1958704933U, 1958490823U, 1958275273U, 1958060563U, 1957848889U, 1957634227U, 1957421957U, 1957206529U, 1956991991U, 1956777359U, 1956563137U, 1956349627U, 1956136801U, 1955922713U, 1955709199U, 1955494259U, 1955281897U, 1955067349U, 1954854449U, 1954638899U, 1954424539U, 1954210151U, 1953996521U, 1953781757U, 1953568061U, 1953354313U, 1953138323U, 1952924947U, 1952711471U, 1952499607U, 1952285947U, 1952073337U, 1951860359U, 1951646947U, 1951429421U, 1951215599U, 1951001777U, 1950789343U, 1950577147U, 1950364093U, 1950151409U, 1949937593U, 1949722681U, 1949510449U, 1949296903U, 1949084747U, 1948870019U, 1948653431U, 1948438379U, 1948225849U, 1948010171U, 1947797431U, 1947584029U, 1947369353U, 1947156833U, 1946945327U, 1946730593U, 1946516281U, 1946303641U, 1946090359U, 1945876957U, 1945662233U, 1945447381U, 1945234493U, 1945019243U, 1944807173U, 1944592619U, 1944378089U, 1944164279U, 1943952403U, 1943736161U, 1943523271U, 1943309701U, 1943097553U, 1942884479U, 1942669921U, 1942453361U, 1942239361U, 1942026481U, 1941812861U, 1941599599U, 1941383267U, 1941169357U, 1940955971U, 1940740007U, 1940530087U, 1940315623U, 1940101721U, 1939887941U, 1939671631U, 1939459111U, 1939246339U, 1939030463U, 1938815773U, 1938601583U, 1938388579U, 1938173087U, 1937959571U, 1937746337U, 1937530079U, 1937314759U, 1937100097U, 1936885309U, 1936673131U, 1936458907U, 1936247077U, 1936033289U, 1935819463U, 1935605239U, 1935390563U, 1935176689U, 1934965691U, 1934751667U, 1934537677U, 1934322787U, 1934110439U, 1933897331U, 1933680613U, 1933466789U, 1933253327U, 1933040761U, 1932827927U, 1932614807U, 1932400721U, 1932186007U, 1931972417U, 1931759197U, 1931545013U, 1931330741U, 1931116997U, 1930902073U, 1930690271U, 1930477583U, 1930262641U, 1930050217U, 1929835819U, 1929622771U, 1929410531U, 1929197299U, 1928981581U, 1928767499U, 1928552657U, 1928340781U, 1928126819U, 1927911509U, 1927700891U, 1927487371U, 1927272463U, 1927060243U, 1926846787U, 1926631963U, 1926417281U, 1926202891U, 1925987633U, 1925774309U, 1925560577U, 1925346653U, 1925132813U, 1924917391U, 1924703741U, 1924489667U, 1924274753U, 1924061647U, 1923848099U, 1923635011U, 1923423013U, 1923209657U, 1922995003U, 1922780593U, 1922567051U, 1922354261U, 1922142449U, 1921923569U, 1921709773U, 1921496867U, 1921285153U, 1921071419U, 1920855917U, 1920641953U, 1920426647U, 1920210139U, 1919997463U, 1919784743U, 1919571817U, 1919357707U, 1919144197U, 1918928327U, 1918716967U, 1918505287U, 1918288951U, 1918074289U, 1917859243U, 1917645077U, 1917431177U, 1917217327U, 1917001897U, 1916787517U, 1916575319U, 1916359751U, 1916145289U, 1915931917U, 1915718513U, 1915503833U, 1915291013U, 1915078507U, 1914865129U, 1914652417U, 1914438937U, 1914226511U, 1914012007U, 1913797597U, 1913583341U, 1913369903U, 1913155711U, 1912942181U, 1912728781U, 1912513847U, 1912300451U, 1912087831U, 1911873253U, 1911657779U, 1911442763U, 1911231353U, 1911015773U, 1910802847U, 1910588893U, 1910375063U, 1910162201U, 1909948321U, 1909733303U, 1909520323U, 1909307419U, 1909093247U, 1908879877U, 1908664063U, 1908449857U, 1908236677U, 1908022811U, 1907810987U, 1907598467U, 1907384467U, 1907169083U, 1906953211U, 1906739209U, 1906525109U, 1906310951U, 1906096999U, 1905884731U, 1905673373U, 1905457363U, 1905243209U, 1905029017U, 1904816713U, 1904602537U, 1904389517U, 1904176861U, 1903963189U, 1903749361U, 1903537567U, 1903322501U, 1903108331U, 1902895109U, 1902682841U, 1902468143U, 1902255833U, 1902042173U, 1901825033U, 1901610857U, 1901394977U, 1901180863U, 1900966337U, 1900753301U, 1900539409U, 1900326377U, 1900115621U, 1899902029U, 1899689683U, 1899477733U, 1899264779U, 1899050837U, 1898835283U, 1898621423U, 1898407963U, 1898196023U, 1897983083U, 1897770997U, 1897556651U, 1897344901U, 1897133809U, 1896919259U, 1896705157U, 1896491041U, 1896277457U, 1896063769U, 1895850709U, 1895636689U, 1895420279U, 1895208223U, 1894993829U, 1894782023U, 1894566353U, 1894350527U, 1894137731U, 1893924589U, 1893710851U, 1893496691U, 1893283459U, 1893069709U, 1892854861U, 1892641133U, 1892428999U, 1892215747U, 1892003387U, 1891790491U, 1891579493U, 1891362449U, 1891148263U, 1890934141U, 1890720857U, 1890507551U, 1890292267U, 1890078847U, 1889865743U, 1889652253U, 1889438801U, 1889224241U, 1889013617U, 1888800223U, 1888587439U, 1888373471U, 1888163867U, 1887952039U, 1887737603U, 1887523223U, 1887309659U, 1887096331U, 1886884289U, 1886670587U, 1886456149U, 1886240141U, 1886028191U, 1885812587U, 1885599461U, 1885386431U, 1885172129U, 1884957803U, 1884746813U, 1884531721U, 1884315151U, 1884102601U, 1883889043U, 1883673413U, 1883458481U, 1883244703U, 1883033723U, 1882821439U, 1882608839U, 1882393321U, 1882178719U, 1881963827U, 1881750943U, 1881536119U, 1881320087U, 1881108149U, 1880896177U, 1880681953U, 1880466319U, 1880252831U, 1880038367U, 1879824493U, 1879610081U, 1879395409U, 1879181047U, 1878969739U, 1878756823U, 1878542957U, 1878330583U, 1878116137U, 1877904227U, 1877689511U, 1877474453U, 1877263457U, 1877050621U, 1876835243U, 1876622257U, 1876411883U, 1876197749U, 1875985613U, 1875770417U, 1875554969U, 1875341953U, 1875126829U, 1874913457U, 1874701039U, 1874489093U, 1874272849U, 1874060159U, 1873846979U, 1873635529U, 1873421219U, 1873209713U, 1872994463U, 1872782473U, 1872569861U, 1872355663U, 1872141379U, 1871927711U, 1871713241U, 1871499821U, 1871282653U, 1871070701U, 1870859063U, 1870646521U, 1870431113U, 1870216661U, 1870002733U, 1869789989U, 1869578903U, 1869364733U, 1869150917U, 1868934923U, 1868723261U, 1868509567U, 1868296949U, 1868082787U, 1867868263U, 1867655113U, 1867441489U, 1867226723U, 1867011511U, 1866798541U, 1866586681U, 1866375299U, 1866161233U, 1865946409U, 1865732599U, 1865516353U, 1865304169U, 1865090393U, 1864877809U, 1864661059U, 1864446949U, 1864231703U, 1864019951U, 1863806657U, 1863593309U, 1863380551U, 1863168421U, 1862955293U, 1862742773U, 1862527981U, 1862316163U, 1862102299U, 1861887043U, 1861671997U, 1861458811U, 1861246481U, 1861033093U, 1860819593U, 1860606511U, 1860392983U, 1860179969U, 1859966057U, 1859753327U, 1859537033U, 1859321609U, 1859109403U, 1858896001U, 1858682179U, 1858468021U, 1858255141U, 1858040617U, 1857826583U, 1857614989U, 1857401957U, 1857189121U, 1856974877U, 1856761057U, 1856548943U, 1856334443U, 1856122343U, 1855909711U, 1855697113U, 1855485559U, 1855272659U, 1855059971U, 1854846797U, 1854633577U, 1854417667U, 1854205447U, 1853992741U, 1853779349U, 1853563861U, 1853348593U, 1853135209U, 1852922107U, 1852710059U, 1852494713U, 1852281311U, 1852068733U, 1851856651U, 1851644933U, 1851430187U, 1851217127U, 1851003919U, 1850791277U, 1850576047U, 1850363993U, 1850149817U, 1849934699U, 1849722047U, 1849507193U, 1849292813U, 1849082251U, 1848865933U, 1848650597U, 1848437771U, 1848223219U, 1848011083U, 1847798189U, 1847584031U, 1847369309U, 1847155309U, 1846942483U, 1846728739U, 1846515617U, 1846302167U, 1846089199U, 1845873173U, 1845658319U, 1845445027U, 1845234277U, 1845021179U, 1844808467U, 1844594179U, 1844381387U, 1844167673U, 1843954171U, 1843740683U, 1843527457U, 1843314307U, 1843101739U, 1842889381U, 1842677059U, 1842463939U, 1842250661U, 1842035359U, 1841822201U, 1841610737U, 1841396317U, 1841181707U, 1840969279U, 1840756397U, 1840542703U, 1840329529U, 1840114021U, 1839902681U, 1839690289U, 1839477257U, 1839262553U, 1839049451U, 1838834191U, 1838622671U, 1838409107U, 1838193991U, 1837980367U, 1837766683U, 1837552097U, 1837338709U, 1837126441U, 1836914561U, 1836700787U, 1836487573U, 1836273797U, 1836060607U, 1835848667U, 1835633953U, 1835420233U, 1835206981U, 1834993807U, 1834782097U, 1834566973U, 1834353881U, 1834140647U, 1833926671U, 1833715579U, 1833503561U, 1833293153U, 1833081637U, 1832866859U, 1832653061U, 1832438771U, 1832224573U, 1832010209U, 1831797823U, 1831585487U, 1831372853U, 1831157287U, 1830944299U, 1830730943U, 1830517193U, 1830305447U, 1830091709U, 1829876317U, 1829662273U, 1829449411U, 1829236631U, 1829023943U, 1828810271U, 1828596149U, 1828382207U, 1828170133U, 1827959183U, 1827746581U, 1827532807U, 1827317861U, 1827106199U, 1826891467U, 1826680879U, 1826467309U, 1826253997U, 1826039113U, 1825825087U, 1825610833U, 1825397839U, 1825185599U, 1824970999U, 1824757813U, 1824544453U, 1824331781U, 1824120253U, 1823907461U, 1823694571U, 1823483819U, 1823269337U, 1823056657U, 1822841029U, 1822628681U, 1822413007U, 1822199881U, 1821987077U, 1821771307U, 1821559319U, 1821348401U, 1821133981U, 1820921497U, 1820707351U, 1820492903U, 1820278483U, 1820065243U, 1819853467U, 1819640743U, 1819428503U, 1819214503U, 1818999947U, 1818786679U, 1818571829U, 1818358589U, 1818143609U, 1817931289U, 1817716661U, 1817504939U, 1817292857U, 1817077921U, 1816863773U, 1816650911U, 1816437629U, 1816224331U, 1816011343U, 1815798827U, 1815584137U, 1815372683U, 1815158353U, 1814944921U, 1814730259U, 1814519281U, 1814305679U, 1814091911U, 1813878061U, 1813665221U, 1813450559U, 1813237159U, 1813022209U, 1812810889U, 1812598517U, 1812386621U, 1812172727U, 1811959999U, 1811746201U, 1811532013U, 1811320249U, 1811105171U, 1810891699U, 1810676641U, 1810464479U, 1810251841U, 1810039403U, 1809825361U, 1809610937U, 1809398191U, 1809185471U, 1808972351U, 1808760589U, 1808548033U, 1808335171U, 1808122291U, 1807908719U, 1807695269U, 1807482529U, 1807269617U, 1807056437U, 1806843373U, 1806629173U, 1806416483U, 1806203057U, 1805989663U, 1805777483U, 1805564641U, 1805352947U, 1805137171U, 1804922843U, 1804709029U, 1804496621U, 1804282919U, 1804070239U, 1803858137U, 1803644209U, 1803430969U, 1803217879U, 1803004363U, 1802791009U, 1802576609U, 1802366077U, 1802150351U, 1801937953U, 1801724581U, 1801510229U, 1801298753U, 1801085947U, 1800871399U, 1800657197U, 1800444797U, 1800231943U, 1800018919U, 1799806523U, 1799593049U, 1799379191U, 1799166077U, 1798952293U, 1798742359U, 1798528609U, 1798316879U, 1798103999U, 1797889399U, 1797677771U, 1797463951U, 1797250849U, 1797038773U, 1796829191U, 1796613449U, 1796399977U, 1796188403U, 1795976477U, 1795764959U, 1795551127U, 1795337413U, 1795124281U, 1794911507U, 1794700001U, 1794488291U, 1794275677U, 1794061361U, 1793848423U, 1793635369U, 1793420693U, 1793210383U, 1792996691U, 1792784233U, 1792570531U, 1792358257U, 1792146007U, 1791934237U, 1791723223U, 1791509171U, 1791295381U, 1791082301U, 1790868851U, 1790656031U, 1790443537U, 1790230961U, 1790017003U, 1789805027U, 1789593419U, 1789379479U, 1789164787U, 1788954239U, 1788740491U, 1788525853U, 1788313313U, 1788099323U, 1787886053U, 1787673467U, 1787459507U, 1787246339U, 1787034257U, 1786821557U, 1786608137U, 1786394063U, 1786182059U, 1785967481U, 1785754219U, 1785541067U, 1785328469U, 1785115117U, 1784902591U, 1784691409U, 1784479457U, 1784264249U, 1784052359U, 1783837177U, 1783625471U, 1783412083U, 1783199161U, 1782985577U, 1782774361U, 1782561791U, 1782349147U, 1782135227U, 1781922349U, 1781707453U, 1781494499U, 1781281357U, 1781067257U, 1780853203U, 1780641661U, 1780427603U, 1780215917U, 1780004623U, 1779789901U, 1779579163U, 1779366067U, 1779154763U, 1778941309U, 1778728537U, 1778516123U, 1778303041U, 1778091787U, 1777879687U, 1777663243U, 1777451671U, 1777236971U, 1777025297U, 1776810323U, 1776599551U, 1776385619U, 1776175129U, 1775962709U, 1775748791U, 1775538503U, 1775324981U, 1775111743U, 1774897037U, 1774682293U, 1774468921U, 1774256161U, 1774044773U, 1773831989U, 1773617759U, 1773403967U, 1773190319U, 1772977307U, 1772763497U, 1772549873U, 1772335879U, 1772125603U, 1771913347U, 1771699337U, 1771487587U, 1771272023U, 1771059089U, 1770847583U, 1770636541U, 1770423601U, 1770210877U, 1769994487U, 1769781749U, 1769568701U, 1769356007U, 1769142241U, 1768928741U, 1768713641U, 1768501909U, 1768289251U, 1768078313U, 1767865181U, 1767649771U, 1767438721U, 1767226861U, 1767012337U, 1766798269U, 1766585551U, 1766372479U, 1766160161U, 1765946669U, 1765734799U, 1765523477U, 1765309201U, 1765095139U, 1764883123U, 1764672967U, 1764461749U, 1764246829U, 1764032813U, 1763819731U, 1763606881U, 1763393377U, 1763181727U, 1762969993U, 1762756637U, 1762543031U, 1762331981U, 1762118279U, 1761903823U, 1761692489U, 1761477937U, 1761263827U, 1761050773U, 1760839001U, 1760628371U, 1760413229U, 1760197709U, 1759985173U, 1759773131U, 1759560839U, 1759348933U, 1759135717U, 1758923039U, 1758710171U, 1758498877U, 1758285307U, 1758073949U, 1757860073U, 1757647841U, 1757436281U, 1757222959U, 1757008063U, 1756793993U, 1756581121U, 1756368917U, 1756154579U, 1755940577U, 1755728027U, 1755514219U, 1755303233U, 1755091193U, 1754878501U, 1754665361U, 1754454571U, 1754242561U, 1754030731U, 1753816681U, 1753602211U, 1753389713U, 1753176443U, 1752964153U, 1752750449U, 1752537337U, 1752324599U, 1752112291U, 1751899441U, 1751687213U, 1751473417U, 1751261329U, 1751049169U, 1750837849U, 1750623913U, 1750410733U, 1750198199U, 1749985409U, 1749773527U, 1749560107U, 1749347723U, 1749135239U, 1748924363U, 1748710897U, 1748498359U, 1748287217U, 1748070949U, 1747857149U, 1747644641U, 1747430963U, 1747216301U, 1747002469U, 1746789469U, 1746578459U, 1746366119U, 1746151037U, 1745939603U, 1745725207U, 1745513141U, 1745303071U, 1745089651U, 1744877551U, 1744663763U, 1744451789U, 1744237181U, 1744025083U, 1743814301U, 1743600853U, 1743387367U, 1743174197U, 1742962841U, 1742749471U, 1742536847U, 1742322259U, 1742111281U, 1741899253U, 1741687861U, 1741474171U, 1741258007U, 1741045811U, 1740835949U, 1740621881U, 1740408053U, 1740196361U, 1739983067U, 1739771023U, 1739558827U, 1739345351U, 1739134457U, 1738920671U, 1738707163U, 1738494731U, 1738281847U, 1738067677U, 1737856069U, 1737644603U, 1737432539U, 1737221611U, 1737006983U, 1736794487U, 1736581619U, 1736369281U, 1736154647U, 1735943387U, 1735729111U, 1735517011U, 1735305269U, 1735090199U, 1734876943U, 1734664441U, 1734449077U, 1734237377U, 1734024737U, 1733811263U, 1733597969U, 1733384509U, 1733171707U, 1732961677U, 1732746863U, 1732535537U, 1732321049U, 1732108141U, 1731895523U, 1731682793U, 1731469843U, 1731254191U, 1731041219U, 1730829523U, 1730618177U, 1730405549U, 1730192197U, 1729976291U, 1729763383U, 1729549669U, 1729337327U, 1729125011U, 1728914417U, 1728701587U, 1728488477U, 1728276799U, 1728063221U, 1727849777U, 1727635841U, 1727422667U, 1727208947U, 1726994957U, 1726783987U, 1726573733U, 1726361471U, 1726147603U, 1725936371U, 1725724123U, 1725510341U, 1725297971U, 1725083699U, 1724868617U, 1724657423U, 1724445431U, 1724230499U, 1724017907U, 1723805329U, 1723596101U, 1723381903U, 1723167899U, 1722954017U, 1722740653U, 1722527047U, 1722312811U, 1722102953U, 1721891051U, 1721678617U, 1721466457U, 1721252303U, 1721040851U, 1720830509U, 1720616329U, 1720403401U, 1720190291U, 1719977801U, 1719766823U, 1719554429U, 1719342839U, 1719129833U, 1718917727U, 1718705621U, 1718492519U, 1718278847U, 1718067781U, 1717854091U, 1717640279U, 1717427989U, 1717216279U, 1717003237U, 1716788687U, 1716577411U, 1716367007U, 1716156181U, 1715943997U, 1715731957U, 1715519549U, 1715306557U, 1715093563U, 1714882331U, 1714670413U, 1714457677U, 1714244459U, 1714031303U, 1713818269U, 1713604801U, 1713389563U, 1713178517U, 1712965213U, 1712753267U, 1712539687U, 1712328841U, 1712113927U, 1711899883U, 1711688063U, 1711475021U, 1711261333U, 1711051409U, 1710837059U, 1710624329U, 1710413077U, 1710198703U, 1709987243U, 1709773981U, 1709563153U, 1709351911U, 1709141977U, 1708930331U, 1708718107U, 1708502867U, 1708290503U, 1708076729U, 1707863831U, 1707652277U, 1707439001U, 1707227173U, 1707014329U, 1706801633U, 1706589107U, 1706378419U, 1706166377U, 1705953643U, 1705741783U, 1705531549U, 1705316959U, 1705106129U, 1704894109U, 1704681709U, 1704468937U, 1704255689U, 1704045223U, 1703832359U, 1703619641U, 1703405609U, 1703195113U, 1702983229U, 1702769197U, 1702556957U, 1702344983U, 1702131659U, 1701917627U, 1701705373U, 1701491459U, 1701278609U, 1701065897U, 1700854567U, 1700644447U, 1700429513U, 1700217709U, 1700006197U, 1699793419U, 1699580317U, 1699369627U, 1699155581U, 1698940723U, 1698727337U, 1698513253U, 1698301307U, 1698091267U, 1697877743U, 1697664337U, 1697450791U, 1697237897U, 1697025769U, 1696813771U, 1696599187U, 1696387493U, 1696177811U, 1695964349U, 1695752273U, 1695539983U, 1695328517U, 1695112499U, 1694901031U, 1694687689U, 1694475023U, 1694261953U, 1694049001U, 1693835707U, 1693622737U, 1693410343U, 1693197481U, 1692985631U, 1692774529U, 1692562093U, 1692348953U, 1692136417U, 1691923169U, 1691710081U, 1691497571U, 1691284057U, 1691071279U, 1690859791U, 1690645939U, 1690435493U, 1690223939U, 1690010563U, 1689798259U, 1689584801U, 1689374539U, 1689162413U, 1688949023U, 1688734417U, 1688524517U, 1688313817U, 1688102477U, 1687890049U, 1687679137U, 1687466219U, 1687256309U, 1687042309U, 1686831407U, 1686620363U, 1686407869U, 1686194189U, 1685982491U, 1685769949U, 1685554763U, 1685339581U, 1685127391U, 1684918171U, 1684703561U, 1684493633U, 1684280249U, 1684067551U, 1683855757U, 1683645311U, 1683433723U, 1683221711U, 1683008251U, 1682796551U, 1682583167U, 1682371753U, 1682155987U, 1681944119U, 1681733363U, 1681519849U, 1681308011U, 1681098073U, 1680884237U, 1680671623U, 1680459233U, 1680247291U, 1680031811U, 1679819293U, 1679605723U, 1679392699U, 1679181041U, 1678968337U, 1678756411U, 1678543357U, 1678332811U, 1678122869U, 1677911009U, 1677697997U, 1677485779U, 1677275011U, 1677060713U, 1676850353U, 1676637649U, 1676424697U, 1676211011U, 1676000453U, 1675787273U, 1675576393U, 1675363649U, 1675151339U, 1674939241U, 1674727057U, 1674512789U, 1674299479U, 1674087917U, 1673876467U, 1673661967U, 1673449919U, 1673235139U, 1673021521U, 1672808327U, 1672596941U, 1672384589U, 1672173589U, 1671961757U, 1671749039U, 1671536963U, 1671325529U, 1671112967U, 1670901179U, 1670689117U, 1670475277U, 1670262637U, 1670051791U, 1669837633U, 1669625107U, 1669414039U, 1669203233U, 1668990637U, 1668775393U, 1668563849U, 1668350561U, 1668138847U, 1667926867U, 1667713757U, 1667501833U, 1667287651U, 1667077777U, 1666863299U, 1666650637U, 1666439549U, 1666227977U, 1666014149U, 1665800771U, 1665591229U, 1665380273U, 1665168877U, 1664957753U, 1664744593U, 1664532421U, 1664320123U, 1664105249U, 1663891367U, 1663680947U, 1663469519U, 1663254757U, 1663042397U, 1662830083U, 1662618499U, 1662405971U, 1662195949U, 1661984659U, 1661771983U, 1661559659U, 1661347057U, 1661134081U, 1660921679U, 1660710313U, 1660497737U, 1660285441U, 1660073287U, 1659859973U, 1659645607U, 1659431777U, 1659216851U, 1659004939U, 1658794849U, 1658581553U, 1658372297U, 1658159369U, 1657946183U, 1657734823U, 1657521973U, 1657309891U, 1657097159U, 1656885457U, 1656674549U, 1656462763U, 1656251131U, 1656038099U, 1655824243U, 1655613227U, 1655398643U, 1655187257U, 1654976711U, 1654763909U, 1654550113U, 1654337563U, 1654125673U, 1653912119U, 1653698759U, 1653486361U, 1653274141U, 1653059761U, 1652848279U, 1652634989U, 1652424523U, 1652209519U, 1651998191U, 1651784759U, 1651572101U, 1651359301U, 1651147033U, 1650934469U, 1650723083U, 1650509953U, 1650298159U, 1650085873U, 1649872649U, 1649659841U, 1649449441U, 1649235881U, 1649024249U, 1648812073U, 1648598869U, 1648387141U, 1648175587U, 1647962123U, 1647750473U, 1647538483U, 1647326743U, 1647114061U, 1646903021U, 1646688727U, 1646476903U, 1646264027U, 1646051219U, 1645838983U, 1645628581U, 1645415971U, 1645204021U, 1644993293U, 1644776921U, 1644563593U, 1644351343U, 1644139267U, 1643924603U, 1643713501U, 1643499029U, 1643288453U, 1643075813U, 1642860589U, 1642648877U, 1642437869U, 1642225457U, 1642012793U, 1641801523U, 1641589661U, 1641376409U, 1641162559U, 1640952241U, 1640741437U, 1640529173U, 1640318839U, 1640106227U, 1639894213U, 1639681237U, 1639470661U, 1639257131U, 1639045273U, 1638833389U, 1638619711U, 1638407233U, 1638194989U, 1637980541U, 1637769223U, 1637559887U, 1637346769U, 1637134337U, 1636922267U, 1636710653U, 1636499873U, 1636286867U, 1636076087U, 1635863939U, 1635650407U, 1635436661U, 1635226577U, 1635015631U, 1634803927U, 1634589751U, 1634378377U, 1634166799U, 1633954739U, 1633743409U, 1633531651U, 1633318207U, 1633106641U, 1632897269U, 1632687919U, 1632475811U, 1632263639U, 1632052379U, 1631839457U, 1631626849U, 1631414489U, 1631202467U, 1630990519U, 1630778063U, 1630565177U, 1630354853U, 1630143049U, 1629931943U, 1629719171U, 1629508193U, 1629295721U, 1629082687U, 1628870843U, 1628660101U, 1628448221U, 1628236867U, 1628023801U, 1627812029U, 1627600441U, 1627389431U, 1627177001U, 1626962539U, 1626751979U, 1626539179U, 1626326791U, 1626113729U, 1625903567U, 1625691247U, 1625478037U, 1625266073U, 1625054153U, 1624841633U, 1624630261U, 1624417189U, 1624206053U, 1623992599U, 1623781619U, 1623568949U, 1623354829U, 1623142987U, 1622929513U, 1622718421U, 1622506999U, 1622294161U, 1622082901U, 1621868393U, 1621658257U, 1621446997U, 1621235573U, 1621024253U, 1620813553U, 1620603793U, 1620392623U, 1620180607U, 1619968247U, 1619753719U, 1619541383U, 1619329603U, 1619117597U, 1618904627U, 1618691989U, 1618479787U, 1618267333U, 1618055717U, 1617843229U, 1617630947U, 1617417619U, 1617204377U, 1616993519U, 1616781559U, 1616568367U, 1616356229U, 1616143759U, 1615933097U, 1615723597U, 1615509367U, 1615297399U, 1615086917U, 1614874609U, 1614661459U, 1614448681U, 1614236551U, 1614023113U, 1613812303U, 1613601079U, 1613389003U, 1613176379U, 1612963951U, 1612751549U, 1612540789U, 1612329503U, 1612118173U, 1611906383U, 1611695711U, 1611483151U, 1611271957U, 1611057827U, 1610844611U, 1610632469U, 1610418559U, 1610206529U, 1609994033U, 1609781203U, 1609569413U, 1609359209U, 1609145459U, 1608933947U, 1608720361U, 1608508801U, 1608296717U, 1608084109U, 1607870417U, 1607658197U, 1607445701U, 1607234537U, 1607022997U, 1606810687U, 1606600679U, 1606388731U, 1606176347U, 1605965227U, 1605752081U, 1605539021U, 1605328313U, 1605115663U, 1604904061U, 1604693239U, 1604480057U, 1604268389U, 1604057183U, 1603842913U, 1603631873U, 1603420561U, 1603210649U, 1603000219U, 1602789143U, 1602577609U, 1602365857U, 1602153079U, 1601940149U, 1601727781U, 1601517839U, 1601302363U, 1601090371U, 1600879667U, 1600667899U, 1600455133U, 1600242403U, 1600031369U, 1599820517U, 1599606803U, 1599396749U, 1599184751U, 1598975051U, 1598761279U, 1598549501U, 1598335411U, 1598123407U, 1597911299U, 1597700057U, 1597487621U, 1597277893U, 1597065859U, 1596852787U, 1596642133U, 1596428957U, 1596216553U, 1596002173U, 1595792243U, 1595579933U, 1595369533U, 1595158241U, 1594948063U, 1594737161U, 1594525729U, 1594311107U, 1594098707U, 1593885151U, 1593671377U, 1593458753U, 1593247781U, 1593035057U, 1592822603U, 1592610959U, 1592398513U, 1592185459U, 1591975481U, 1591765501U, 1591554421U, 1591341443U, 1591131319U, 1590920003U, 1590707633U, 1590494783U, 1590283363U, 1590070931U, 1589859377U, 1589646811U, 1589434129U, 1589223187U, 1589011031U, 1588799903U, 1588586047U, 1588375429U, 1588163957U, 1587952687U, 1587741893U, 1587529987U, 1587318851U, 1587105677U, 1586891203U, 1586680391U, 1586469947U, 1586257091U, 1586045543U, 1585835543U, 1585622579U, 1585410503U, 1585198583U, 1584985397U, 1584772169U, 1584559601U, 1584347197U, 1584135689U, 1583923169U, 1583711639U, 1583501189U, 1583290279U, 1583078971U, 1582868279U, 1582658101U, 1582445219U, 1582233599U, 1582020931U, 1581806959U, 1581596773U, 1581385601U, 1581173551U, 1580962969U, 1580751941U, 1580539157U, 1580325619U, 1580114611U, 1579903427U, 1579693151U, 1579481467U, 1579268359U, 1579056379U, 1578842593U, 1578632179U, 1578421843U, 1578209747U, 1577998151U, 1577787647U, 1577579093U, 1577369909U, 1577155537U, 1576943099U, 1576730611U, 1576521313U, 1576311547U, 1576100221U, 1575886001U, 1575674297U, 1575462277U, 1575251819U, 1575039077U, 1574829143U, 1574617871U, 1574406947U, 1574196319U, 1573984591U, 1573771307U, 1573558699U, 1573347103U, 1573134727U, 1572923981U, 1572710869U, 1572499171U, 1572285719U, 1572074671U, 1571864771U, 1571650979U, 1571438179U, 1571225417U, 1571013593U, 1570801511U, 1570589539U, 1570376557U, 1570164923U, 1569953963U, 1569742417U, 1569531179U, 1569320693U, 1569107899U, 1568896783U, 1568684263U, 1568472599U, 1568261309U, 1568048311U, 1567834613U, 1567622321U, 1567411583U, 1567200757U, 1566991141U, 1566778691U, 1566568769U, 1566357157U, 1566143399U, 1565932283U, 1565721347U, 1565509193U, 1565297891U, 1565085653U, 1564873847U, 1564660499U, 1564447433U, 1564235279U, 1564021853U, 1563811489U, 1563600547U, 1563390781U, 1563178303U, 1562966143U, 1562753519U, 1562540341U, 1562328893U, 1562116663U, 1561904369U, 1561691323U, 1561478873U, 1561266367U, 1561053881U, 1560842071U, 1560628519U, 1560415321U, 1560203707U, 1559991437U, 1559780639U, 1559568349U, 1559356307U, 1559145017U, 1558935383U, 1558724383U, 1558512313U, 1558300649U, 1558088447U, 1557875689U, 1557664697U, 1557452837U, 1557241417U, 1557027809U, 1556815321U, 1556607361U, 1556394971U, 1556182799U, 1555972007U, 1555757803U, 1555547131U, 1555336427U, 1555123693U, 1554912313U, 1554701053U, 1554488371U, 1554276719U, 1554064399U, 1553854661U, 1553642743U, 1553430247U, 1553219651U, 1553007349U, 1552796459U, 1552584197U, 1552373029U, 1552160453U, 1551947497U, 1551736567U, 1551524531U, 1551312557U, 1551101779U, 1550890007U, 1550680333U, 1550469667U, 1550258377U, 1550048537U, 1549836947U, 1549626413U, 1549413953U, 1549202497U, 1548990721U, 1548777619U, 1548566603U, 1548353953U, 1548143243U, 1547932783U, 1547718707U, 1547508233U, 1547295949U, 1547084933U, 1546874491U, 1546660861U, 1546449799U, 1546240771U, 1546029269U, 1545817543U, 1545608279U, 1545395063U, 1545184891U, 1544973307U, 1544762029U, 1544550919U, 1544340169U, 1544126369U, 1543917269U, 1543704583U, 1543492921U, 1543278167U, 1543066607U, 1542855121U, 1542643969U, 1542432631U, 1542220997U, 1542009797U, 1541798197U, 1541588329U, 1541375651U, 1541164321U, 1540951459U, 1540741079U, 1540529233U, 1540316951U, 1540104407U, 1539892303U, 1539682103U, 1539472589U, 1539260353U, 1539048419U, 1538837119U, 1538625079U, 1538413381U, 1538200369U, 1537988381U, 1537776257U, 1537564159U, 1537351003U, 1537141829U, 1536930599U, 1536719453U, 1536509207U, 1536298567U, 1536084287U, 1535872307U, 1535661467U, 1535448043U, 1535237141U, 1535025673U, 1534813279U, 1534603751U, 1534391513U, 1534179809U, 1533966341U, 1533756793U, 1533546401U, 1533334199U, 1533122693U, 1532910019U, 1532698561U, 1532487683U, 1532274157U, 1532063317U, 1531852901U, 1531640309U, 1531427567U, 1531215589U, 1531002287U, 1530788503U, 1530577127U, 1530366421U, 1530154837U, 1529942443U, 1529731897U, 1529522737U, 1529311841U, 1529103517U, 1528891963U, 1528680841U, 1528467029U, 1528256663U, 1528046269U, 1527835061U, 1527624487U, 1527413753U, 1527202763U, 1526992429U, 1526780881U, 1526568913U, 1526357621U, 1526146381U, 1525935077U, 1525723673U, 1525511483U, 1525301759U, 1525088857U, 1524876253U, 1524665299U, 1524452729U, 1524241639U, 1524031711U, 1523819651U, 1523608943U, 1523397277U, 1523184791U, 1522974181U, 1522761347U, 1522549627U, 1522339421U, 1522130107U, 1521919109U, 1521705557U, 1521496439U, 1521282947U, 1521071219U, 1520860261U, 1520647981U, 1520436857U, 1520224591U, 1520013307U, 1519800533U, 1519589777U, 1519377709U, 1519166063U, 1518957403U, 1518747859U, 1518537569U, 1518326107U, 1518115609U, 1517902261U, 1517689727U, 1517479627U, 1517268097U, 1517056027U, 1516842331U, 1516630799U, 1516422581U, 1516211933U, 1516000391U, 1515788333U, 1515576967U, 1515365569U, 1515154343U, 1514942327U, 1514732293U, 1514522249U, 1514311637U, 1514100949U, 1513888829U, 1513677317U, 1513464419U, 1513253267U, 1513040521U, 1512829321U, 1512619337U, 1512406871U, 1512196163U, 1511984137U, 1511773339U, 1511559821U, 1511349289U, 1511138999U, 1510926353U, 1510713947U, 1510500547U, 1510288337U, 1510077571U, 1509863603U, 1509652121U, 1509441179U, 1509226711U, 1509014431U, 1508801669U, 1508591653U, 1508381621U, 1508170903U, 1507960691U, 1507750679U, 1507539263U, 1507328419U, 1507115851U, 1506903271U, 1506692387U, 1506480763U, 1506267967U, 1506056749U, 1505847173U, 1505635909U, 1505425291U, 1505215927U, 1505005493U, 1504793657U, 1504581619U, 1504371229U, 1504162333U, 1503952867U, 1503740867U, 1503529823U, 1503316649U, 1503105971U, 1502893967U, 1502682551U, 1502471153U, 1502260021U, 1502047271U, 1501834643U, 1501623469U, 1501411771U, 1501200923U, 1500989389U, 1500775873U, 1500565127U, 1500353909U, 1500143621U, 1499932537U, 1499720281U, 1499508971U, 1499297563U, 1499086661U, 1498874747U, 1498663967U, 1498451329U, 1498239949U, 1498028803U, 1497818087U, 1497605653U, 1497394813U, 1497185497U, 1496972819U, 1496762291U, 1496551181U, 1496339959U, 1496130263U, 1495919351U, 1495706561U, 1495496021U, 1495283507U, 1495072847U, 1494862697U, 1494651533U, 1494441001U, 1494230201U, 1494019927U, 1493808817U, 1493596171U, 1493385767U, 1493174381U, 1492964443U, 1492753439U, 1492542301U, 1492331219U, 1492120969U, 1491911543U, 1491699217U, 1491487813U, 1491275839U, 1491064643U, 1490853697U, 1490645441U, 1490435729U, 1490226733U, 1490013949U, 1489802617U, 1489589581U, 1489379527U, 1489166039U, 1488954433U, 1488743299U, 1488531413U, 1488320387U, 1488111187U, 1487900389U, 1487690467U, 1487478497U, 1487267263U, 1487057459U, 1486847729U, 1486637849U, 1486427429U, 1486216819U, 1486003891U, 1485793697U, 1485583139U, 1485372797U, 1485160133U, 1484950217U, 1484741021U, 1484529037U, 1484317111U, 1484106011U, 1483894001U, 1483681889U, 1483471441U, 1483259819U, 1483049713U, 1482838807U, 1482628339U, 1482417641U, 1482206351U, 1481995027U, 1481782711U, 1481570309U, 1481359603U, 1481147693U, 1480933667U, 1480722539U, 1480513499U, 1480303739U, 1480090541U, 1479879637U, 1479668173U, 1479455969U, 1479244651U, 1479032449U, 1478822083U, 1478609551U, 1478399057U, 1478187493U, 1477978231U, 1477768079U, 1477556897U, 1477346933U, 1477136621U, 1476926603U, 1476715193U, 1476506771U, 1476293653U, 1476083051U, 1475872933U, 1475662079U, 1475452523U, 1475242933U, 1475032721U, 1474821919U, 1474611221U, 1474401239U, 1474190131U, 1473977039U, 1473765289U, 1473553997U, 1473340133U, 1473130889U, 1472919583U, 1472708987U, 1472498773U, 1472287043U, 1472077699U, 1471867637U, 1471657441U, 1471446443U, 1471235713U, 1471023823U, 1470812389U, 1470599993U, 1470390283U, 1470178133U, 1469966669U, 1469755801U, 1469543599U, 1469330881U, 1469119987U, 1468907851U, 1468695629U, 1468484929U, 1468273421U, 1468062059U, 1467851149U, 1467640763U, 1467428411U, 1467217327U, 1467006161U, 1466794151U, 1466583073U, 1466371843U, 1466160329U, 1465948373U, 1465736777U, 1465525723U, 1465314119U, 1465102643U, 1464892417U, 1464680897U, 1464467821U, 1464255641U, 1464045809U, 1463835853U, 1463624989U, 1463414549U, 1463204381U, 1462995643U, 1462784161U, 1462573369U, 1462359733U, 1462148579U, 1461938441U, 1461727649U, 1461517399U, 1461304841U, 1461094379U, 1460884471U, 1460673547U, 1460463343U, 1460253167U, 1460041901U, 1459830943U, 1459617227U, 1459408543U, 1459198619U, 1458986429U, 1458775291U, 1458563719U, 1458353033U, 1458142883U, 1457931973U, 1457721589U, 1457511773U, 1457299489U, 1457087893U, 1456876859U, 1456666873U, 1456456499U, 1456244849U, 1456034231U, 1455822019U, 1455611659U, 1455401117U, 1455191977U, 1454981797U, 1454771543U, 1454560109U, 1454349367U, 1454137843U, 1453927427U, 1453715761U, 1453504249U, 1453294127U, 1453081739U, 1452870073U, 1452659729U, 1452448273U, 1452238709U, 1452026141U, 1451813369U, 1451603563U, 1451391889U, 1451180063U, 1450969483U, 1450758469U, 1450547621U, 1450334971U, 1450123639U, 1449913747U, 1449701947U, 1449489913U, 1449279817U, 1449069893U, 1448857687U, 1448648989U, 1448438279U, 1448227537U, 1448017553U, 1447806317U, 1447595869U, 1447382917U, 1447174103U, 1446960607U, 1446749641U, 1446540443U, 1446328439U, 1446119281U, 1445908159U, 1445699449U, 1445489839U, 1445278733U, 1445068367U, 1444856983U, 1444646449U, 1444435033U, 1444222807U, 1444011887U, 1443800339U, 1443587273U, 1443379013U, 1443171043U, 1442957707U, 1442748763U, 1442539339U, 1442327533U, 1442114507U, 1441904047U, 1441690351U, 1441476593U, 1441266361U, 1441055647U, 1440847669U, 1440637277U, 1440426077U, 1440217231U, 1440006509U, 1439794799U, 1439583407U, 1439374171U, 1439162957U, 1438950691U, 1438740437U, 1438528463U, 1438318181U, 1438106513U, 1437895027U, 1437681979U, 1437470873U, 1437259559U, 1437048287U, 1436837653U, 1436626987U, 1436415569U, 1436205919U, 1435995373U, 1435784563U, 1435572799U, 1435360867U, 1435150831U, 1434940153U, 1434729199U, 1434520643U, 1434309757U, 1434099409U, 1433886089U, 1433674607U, 1433466031U, 1433253691U, 1433041403U, 1432829141U, 1432619269U, 1432407803U, 1432197869U, 1431984497U, 1431775249U, 1431565097U, 1431356779U, 1431143009U, 1430932183U, 1430722303U, 1430512469U, 1430300119U, 1430090093U, 1429879069U, 1429668403U, 1429460267U, 1429249499U, 1429038931U, 1428829397U, 1428618013U, 1428406739U, 1428195491U, 1427984963U, 1427775317U, 1427565439U, 1427352851U, 1427142841U, 1426932539U, 1426720049U, 1426508137U, 1426295809U, 1426083629U, 1425873301U, 1425663559U, 1425453457U, 1425242501U, 1425033223U, 1424823151U, 1424609591U, 1424398769U, 1424186873U, 1423976707U, 1423764707U, 1423554833U, 1423345877U, 1423133431U, 1422924851U, 1422714019U, 1422502589U, 1422290981U, 1422080969U, 1421869187U, 1421659849U, 1421447683U, 1421235259U, 1421022943U, 1420814009U, 1420605029U, 1420395637U, 1420184053U, 1419971947U, 1419759763U, 1419551207U, 1419341041U, 1419129991U, 1418921551U, 1418709581U, 1418500289U, 1418290387U, 1418078429U, 1417870807U, 1417660261U, 1417450193U, 1417239283U, 1417028629U, 1416816109U, 1416605381U, 1416393973U, 1416184151U, 1415974367U, 1415759791U, 1415548481U, 1415338993U, 1415127737U, 1414916513U, 1414706081U, 1414496683U, 1414285841U, 1414075933U, 1413865723U, 1413655609U, 1413443107U, 1413233803U, 1413023639U, 1412815031U, 1412603749U, 1412393903U, 1412182423U, 1411972363U, 1411758683U, 1411549081U, 1411338163U, 1411128419U, 1410915481U, 1410704203U, 1410493127U, 1410282767U, 1410072823U, 1409859751U, 1409648803U, 1409438881U, 1409228333U, 1409018059U, 1408806713U, 1408597321U, 1408386337U, 1408174433U, 1407966977U, 1407755081U, 1407545411U, 1407331943U, 1407121483U, 1406910187U, 1406702161U, 1406491811U, 1406281687U, 1406072201U, 1405861619U, 1405649281U, 1405438123U, 1405227907U, 1405017281U, 1404804259U, 1404592459U, 1404382807U, 1404170093U, 1403960413U, 1403749219U, 1403539117U, 1403328253U, 1403117977U, 1402907347U, 1402696543U, 1402487101U, 1402274179U, 1402063451U, 1401852989U, 1401641771U, 1401431819U, 1401220687U, 1401008503U, 1400799527U, 1400586883U, 1400375531U, 1400164691U, 1399955521U, 1399745411U, 1399536209U, 1399323823U, 1399113361U, 1398902599U, 1398693211U, 1398480011U, 1398271157U, 1398059851U, 1397849273U, 1397638597U, 1397427527U, 1397219311U, 1397008007U, 1396796321U, 1396584877U, 1396373389U, 1396163933U, 1395953003U, 1395742811U, 1395532583U, 1395320299U, 1395110599U, 1394900411U, 1394691731U, 1394481623U, 1394269621U, 1394061323U, 1393848473U, 1393637447U, 1393427027U, 1393216597U, 1393005013U, 1392793447U, 1392582857U, 1392373667U, 1392162097U, 1391951017U, 1391739917U, 1391531941U, 1391323799U, 1391112179U, 1390903231U, 1390693357U, 1390480867U, 1390273177U, 1390061591U, 1389854443U, 1389644899U, 1389435529U, 1389224101U, 1389013657U, 1388802889U, 1388590771U, 1388379371U, 1388168759U, 1387959973U, 1387749851U, 1387538531U, 1387326557U, 1387115207U, 1386903257U, 1386690259U, 1386480191U, 1386269273U, 1386059749U, 1385850449U, 1385640629U, 1385426899U, 1385217611U, 1385009077U, 1384797541U, 1384587221U, 1384376911U, 1384166219U, 1383955427U, 1383743587U, 1383531871U, 1383321073U, 1383109709U, 1382900023U, 1382688089U, 1382478193U, 1382270801U, 1382059321U, 1381850683U, 1381640213U, 1381429349U, 1381218071U, 1381008397U, 1380799099U, 1380588893U, 1380376549U, 1380165037U, 1379956027U, 1379745391U, 1379534699U, 1379324861U, 1379115107U, 1378903499U, 1378695559U, 1378484147U, 1378274273U, 1378062869U, 1377849181U, 1377638539U, 1377427537U, 1377217271U, 1377005527U, 1376795093U, 1376583451U, 1376372927U, 1376163917U, 1375954799U, 1375744219U, 1375533587U, 1375323067U, 1375111141U, 1374901441U, 1374690479U, 1374476767U, 1374266947U, 1374055327U, 1373845763U, 1373635849U, 1373424677U, 1373214013U, 1373002481U, 1372792661U, 1372582951U, 1372371989U, 1372160681U, 1371951631U, 1371740347U, 1371530051U, 1371317737U, 1371107293U, 1370898161U, 1370689351U, 1370478199U, 1370269447U, 1370059211U, 1369848439U, 1369638217U, 1369428089U, 1369216799U, 1369007459U, 1368795163U, 1368583901U, 1368373793U, 1368162869U, 1367952449U, 1367742331U, 1367532007U, 1367321981U, 1367114009U, 1366899931U, 1366690271U, 1366478059U, 1366267829U, 1366055539U, 1365846239U, 1365637037U, 1365426473U, 1365217783U, 1365005639U, 1364797337U, 1364586019U, 1364374621U, 1364163901U, 1363954373U, 1363745497U, 1363535959U, 1363324243U, 1363115399U, 1362903431U, 1362693061U, 1362483347U, 1362272159U, 1362061843U, 1361852521U, 1361642413U, 1361433547U, 1361222483U, 1361011681U, 1360802489U, 1360590611U, 1360380881U, 1360171817U, 1359961501U, 1359749983U, 1359539257U, 1359328409U, 1359117871U, 1358908721U, 1358698249U, 1358486093U, 1358278799U, 1358066891U, 1357857821U, 1357647553U, 1357437911U, 1357226729U, 1357017223U, 1356807173U, 1356596411U, 1356385637U, 1356176741U, 1355964263U, 1355755039U, 1355545183U, 1355336251U, 1355128459U, 1354919273U, 1354708483U, 1354498751U, 1354287721U, 1354078309U, 1353870257U, 1353661961U, 1353449791U, 1353240853U, 1353029723U, 1352821361U, 1352612003U, 1352403421U, 1352193341U, 1351982417U, 1351771667U, 1351559323U, 1351347821U, 1351136029U, 1350925787U, 1350716659U, 1350507239U, 1350298679U, 1350086779U, 1349874391U, 1349663261U, 1349453851U, 1349244133U, 1349031391U, 1348822213U, 1348612427U, 1348402843U, 1348194559U, 1347983867U, 1347773291U, 1347559459U, 1347350909U, 1347141193U, 1346933207U, 1346723429U, 1346514991U, 1346305277U, 1346093471U, 1345883647U, 1345672399U, 1345461539U, 1345252241U, 1345040321U, 1344829741U, 1344618323U, 1344407489U, 1344196753U, 1343988967U, 1343780203U, 1343568277U, 1343355241U, 1343147083U, 1342937987U, 1342728071U, 1342517987U, 1342307893U, 1342097557U, 1341887003U, 1341675697U, 1341468683U, 1341261511U, 1341050771U, 1340841889U, 1340632757U, 1340423269U, 1340211359U, 1340001323U, 1339791269U, 1339578307U, 1339367231U, 1339154987U, 1338943393U, 1338732971U, 1338525077U, 1338315793U, 1338103777U, 1337891767U, 1337684981U, 1337475847U, 1337265647U, 1337056157U, 1336846079U, 1336636783U, 1336427837U, 1336218349U, 1336009819U, 1335798707U, 1335587749U, 1335378673U, 1335167833U, 1334957387U, 1334748409U, 1334537419U, 1334327461U, 1334118859U, 1333910269U, 1333701917U, 1333489019U, 1333276801U, 1333068907U, 1332859907U, 1332650933U, 1332443591U, 1332235007U, 1332026453U, 1331816303U, 1331608273U, 1331395193U, 1331182871U, 1330972241U, 1330765867U, 1330554023U, 1330343453U, 1330131511U, 1329919051U, 1329708893U, 1329498817U, 1329287497U, 1329079417U, 1328868181U, 1328658781U, 1328450027U, 1328240899U, 1328029309U, 1327816559U, 1327606783U, 1327398283U, 1327186691U, 1326977819U, 1326767693U, 1326556859U, 1326346837U, 1326137347U, 1325926681U, 1325717227U, 1325506499U, 1325296927U, 1325087851U, 1324877819U, 1324667611U, 1324459139U, 1324247699U, 1324035077U, 1323826727U, 1323617293U, 1323406849U, 1323194489U, 1322982083U, 1322772643U, 1322561957U, 1322351603U, 1322140619U, 1321930747U, 1321720937U, 1321512457U, 1321303331U, 1321092109U, 1320882851U, 1320674917U, 1320465659U, 1320254339U, 1320043337U, 1319834357U, 1319625709U, 1319414983U, 1319203747U, 1318993883U, 1318785301U, 1318577279U, 1318366037U, 1318152007U, 1317943181U, 1317732791U, 1317523841U, 1317314303U, 1317103897U, 1316895257U, 1316685211U, 1316474221U, 1316265331U, 1316054891U, 1315843693U, 1315632137U, 1315421413U, 1315208959U, 1314999743U, 1314788777U, 1314578333U, 1314370261U, 1314159463U, 1313949479U, 1313740369U, 1313531839U, 1313319703U, 1313108959U, 1312898203U, 1312688057U, 1312479703U, 1312267717U, 1312058303U, 1311847529U, 1311637417U, 1311426583U, 1311215863U, 1311006553U, 1310797487U, 1310588473U, 1310377987U, 1310168747U, 1309958267U, 1309749391U, 1309539499U, 1309329479U, 1309120567U, 1308910397U, 1308700637U, 1308490721U, 1308281453U, 1308072991U, 1307865961U, 1307656717U, 1307445779U, 1307237363U, 1307026261U, 1306817159U, 1306605631U, 1306395403U, 1306185103U, 1305975263U, 1305767531U, 1305558109U, 1305348797U, 1305139603U, 1304929123U, 1304720051U, 1304511617U, 1304300269U, 1304090467U, 1303881353U, 1303671079U, 1303459217U, 1303250287U, 1303040521U, 1302831029U, 1302621143U, 1302409819U, 1302198973U, 1301989541U, 1301779541U, 1301570293U, 1301362219U, 1301151557U, 1300942213U, 1300732399U, 1300522403U, 1300313351U, 1300106153U, 1299895273U, 1299682561U, 1299472831U, 1299264649U, 1299053519U, 1298843407U, 1298634643U, 1298425393U, 1298213723U, 1298005127U, 1297796261U, 1297585661U, 1297373851U, 1297163779U, 1296953461U, 1296743507U, 1296533111U, 1296323929U, 1296112973U, 1295901839U, 1295691101U, 1295482039U, 1295272897U, 1295060023U, 1294851017U, 1294641659U, 1294429363U, 1294219313U, 1294009729U, 1293800581U, 1293592733U, 1293382037U, 1293171641U, 1292958059U, 1292746541U, 1292537063U, 1292325929U, 1292117027U, 1291908257U, 1291699309U, 1291488907U, 1291281083U, 1291071497U, 1290862493U, 1290651811U, 1290443393U, 1290234571U, 1290025021U, 1289815477U, 1289604307U, 1289395417U, 1289184679U, 1288975997U, 1288766833U, 1288556921U, 1288348429U, 1288138339U, 1287928099U, 1287718339U, 1287505741U, 1287295949U, 1287085523U, 1286875927U, 1286667689U, 1286457461U, 1286249161U, 1286040269U, 1285833047U, 1285623533U, 1285412059U, 1285202393U, 1284992759U, 1284780683U, 1284571111U, 1284360967U, 1284151301U, 1283940841U, 1283732231U, 1283522021U, 1283313019U, 1283104279U, 1282895363U, 1282682057U, 1282472407U, 1282264663U, 1282053103U, 1281842747U, 1281633181U, 1281423527U, 1281213191U, 1281003403U, 1280793589U, 1280583313U, 1280372719U, 1280164439U, 1279955377U, 1279745221U, 1279534447U, 1279326287U, 1279117223U, 1278905813U, 1278698909U, 1278491231U, 1278280687U, 1278070979U, 1277860873U, 1277650267U, 1277440727U, 1277231077U, 1277022427U, 1276813621U, 1276603609U, 1276392329U, 1276182547U, 1275971579U, 1275761801U, 1275553781U, 1275343483U, 1275133991U, 1274922373U, 1274710727U, 1274501663U, 1274294531U, 1274083753U, 1273875037U, 1273665233U, 1273455991U, 1273245527U, 1273035679U, 1272825977U, 1272615397U, 1272407239U, 1272197977U, 1271987671U, 1271776811U, 1271566627U, 1271355739U, 1271148253U, 1270937953U, 1270728527U, 1270517849U, 1270308241U, 1270098527U, 1269886873U, 1269680053U, 1269470837U, 1269262321U, 1269054197U, 1268844481U, 1268635651U, 1268427047U, 1268216891U, 1268006891U, 1267800031U, 1267590887U, 1267381691U, 1267170791U, 1266961207U, 1266754579U, 1266546143U, 1266337901U, 1266129401U, 1265918683U, 1265706697U, 1265496943U, 1265288159U, 1265077771U, 1264869971U, 1264660013U, 1264449523U, 1264238123U, 1264029539U, 1263820993U, 1263611597U, 1263400771U, 1263193111U, 1262981519U, 1262772097U, 1262563301U, 1262354279U, 1262142769U, 1261934431U, 1261723741U, 1261515029U, 1261306933U, 1261099303U, 1260888019U, 1260676409U, 1260468359U, 1260257827U, 1260050257U, 1259839093U, 1259629243U, 1259419391U, 1259210399U, 1259001217U, 1258793857U, 1258585037U, 1258375523U, 1258165679U, 1257955429U, 1257744953U, 1257534881U, 1257325829U, 1257116669U, 1256905073U, 1256695789U, 1256486117U, 1256277961U, 1256067493U, 1255856647U, 1255647719U, 1255437529U, 1255225837U, 1255015369U, 1254806131U, 1254595753U, 1254386789U, 1254178421U, 1253968913U, 1253758447U, 1253548619U, 1253338423U, 1253130479U, 1252923073U, 1252715501U, 1252508093U, 1252297457U, 1252086653U, 1251874859U, 1251664657U, 1251453971U, 1251246587U, 1251037709U, 1250828521U, 1250619481U, 1250410003U, 1250200339U, 1249992089U, 1249782367U, 1249573147U, 1249364279U, 1249156483U, 1248948131U, 1248738089U, 1248528599U, 1248319139U, 1248109439U, 1247902109U, 1247692639U, 1247481349U, 1247271547U, 1247063087U, 1246854223U, 1246645307U, 1246435901U, 1246227581U, 1246018871U, 1245810227U, 1245601571U, 1245392903U, 1245184243U, 1244973703U, 1244765047U, 1244557333U, 1244346863U, 1244135653U, 1243927999U, 1243717823U, 1243509257U, 1243298579U, 1243088681U, 1242879059U, 1242671167U, 1242460357U, 1242246671U, 1242039277U, 1241829913U, 1241620693U, 1241410673U, 1241202409U, 1240991117U, 1240782497U, 1240572649U, 1240363273U, 1240153777U, 1239943217U, 1239734767U, 1239525311U, 1239313181U, 1239103571U, 1238893823U, 1238684219U, 1238472803U, 1238262409U, 1238054203U, 1237844537U, 1237634821U, 1237427551U, 1237217627U, 1237009793U, 1236798539U, 1236589789U, 1236381481U, 1236172387U, 1235964097U, 1235754187U, 1235545853U, 1235335271U, 1235126447U, 1234917487U, 1234708621U, 1234500199U, 1234289923U, 1234080811U, 1233871147U, 1233660019U, 1233451543U, 1233242953U, 1233033727U, 1232823541U, 1232613331U, 1232402621U, 1232193211U, 1231982483U, 1231772611U, 1231562147U, 1231353373U, 1231146467U, 1230937441U, 1230727991U, 1230517793U, 1230311371U, 1230102737U, 1229895523U, 1229684839U, 1229476231U, 1229268809U, 1229059703U, 1228850041U, 1228638493U, 1228429607U, 1228220797U, 1228011221U, 1227800507U, 1227590239U, 1227381409U, 1227172223U, 1226964671U, 1226753419U, 1226542657U, 1226332829U, 1226122453U, 1225911629U, 1225702547U, 1225493051U, 1225282477U, 1225072763U, 1224862213U, 1224653371U, 1224442993U, 1224234727U, 1224025021U, 1223816687U, 1223607443U, 1223398019U, 1223187829U, 1222978951U, 1222770077U, 1222560371U, 1222351069U, 1222142459U, 1221933131U, 1221721819U, 1221514477U, 1221302977U, 1221094829U, 1220885647U, 1220675699U, 1220464283U, 1220254433U, 1220047229U, 1219838999U, 1219629767U, 1219421089U, 1219213297U, 1219005551U, 1218797189U, 1218587507U, 1218377591U, 1218168283U, 1217959759U, 1217750113U, 1217539289U, 1217329511U, 1217123249U, 1216913377U, 1216703687U, 1216494469U, 1216286101U, 1216077211U, 1215867539U, 1215660739U, 1215451949U, 1215241673U, 1215031777U, 1214822281U, 1214612899U, 1214402617U, 1214193439U, 1213983487U, 1213775221U, 1213567811U, 1213358513U, 1213147499U, 1212936583U, 1212727433U, 1212520013U, 1212311081U, 1212103577U, 1211893097U, 1211685161U, 1211473667U, 1211264987U, 1211058197U, 1210849229U, 1210639567U, 1210431389U, 1210221599U, 1210011203U, 1209802301U, 1209594917U, 1209386179U, 1209175673U, 1208967143U, 1208757743U, 1208547889U, 1208338451U, 1208131159U, 1207920361U, 1207710793U, 1207501777U, 1207294171U, 1207084621U, 1206876179U, 1206669041U, 1206459521U, 1206249859U, 1206041953U, 1205831299U, 1205622923U, 1205415979U, 1205207389U, 1204998191U, 1204787341U, 1204578779U, 1204371323U, 1204162783U, 1203951167U, 1203740099U, 1203532607U, 1203322357U, 1203111703U, 1202902793U, 1202693599U, 1202485397U, 1202275051U, 1202065471U, 1201854851U, 1201645231U, 1201434701U, 1201227581U, 1201018723U, 1200811463U, 1200602569U, 1200391783U, 1200182749U, 1199970719U, 1199762611U, 1199552531U, 1199343581U, 1199132707U, 1198924267U, 1198714327U, 1198506821U, 1198298653U, 1198090477U, 1197882457U, 1197674893U, 1197466163U, 1197256231U, 1197048563U, 1196838133U, 1196629429U, 1196420011U, 1196211407U, 1196001601U, 1195792771U, 1195585481U, 1195374319U, 1195164823U, 1194956393U, 1194748517U, 1194540509U, 1194329251U, 1194120047U, 1193911993U, 1193703031U, 1193491619U, 1193283407U, 1193075309U, 1192865567U, 1192657183U, 1192448381U, 1192240703U, 1192030831U, 1191823163U, 1191612913U, 1191402739U, 1191193649U, 1190984173U, 1190775451U, 1190564161U, 1190355941U, 1190148107U, 1189939213U, 1189728121U, 1189519997U, 1189311247U, 1189101713U, 1188892717U, 1188685703U, 1188475777U, 1188268001U, 1188058351U, 1187849153U, 1187640917U, 1187433263U, 1187226367U, 1187015953U, 1186805089U, 1186596007U, 1186388261U, 1186178297U, 1185970603U, 1185761939U, 1185550823U, 1185341567U, 1185133997U, 1184923501U, 1184713903U, 1184506039U, 1184297089U, 1184087273U, 1183878329U, 1183669787U, 1183458817U, 1183250791U, 1183041817U, 1182832331U, 1182623809U, 1182414503U, 1182205709U, 1181997067U, 1181787179U, 1181577517U, 1181368277U, 1181158673U, 1180949249U, 1180738123U, 1180528859U, 1180320989U, 1180111057U, 1179901351U, 1179692753U, 1179482891U, 1179277469U, 1179068017U, 1178859497U, 1178650687U, 1178442443U, 1178232611U, 1178021371U, 1177811227U, 1177601077U, 1177390987U, 1177182557U, 1176975281U, 1176766693U, 1176558433U, 1176348211U, 1176142267U, 1175934349U, 1175724499U, 1175516383U, 1175305661U, 1175096981U, 1174887067U, 1174678643U, 1174471559U, 1174261367U, 1174052647U, 1173844219U, 1173636703U, 1173426931U, 1173217663U, 1173009319U, 1172799917U, 1172590231U, 1172381857U, 1172174807U, 1171965953U, 1171758163U, 1171550299U, 1171342357U, 1171133347U, 1170923531U, 1170715573U, 1170506611U, 1170297743U, 1170087619U, 1169879033U, 1169673629U, 1169464913U, 1169253593U, 1169046509U, 1168837333U, 1168628623U, 1168419073U, 1168211003U, 1168001629U, 1167792499U, 1167582679U, 1167374083U, 1167164641U, 1166955613U, 1166747363U, 1166538743U, 1166330059U, 1166119189U, 1165910633U, 1165703027U, 1165492703U, 1165285949U, 1165078643U, 1164868769U, 1164659869U, 1164451963U, 1164242549U, 1164034369U, 1163827999U, 1163620747U, 1163411423U, 1163203091U, 1162992989U, 1162784431U, 1162574671U, 1162365587U, 1162159013U, 1161950299U, 1161741389U, 1161533117U, 1161327229U, 1161119857U, 1160911247U, 1160702561U, 1160493413U, 1160284217U, 1160074693U, 1159865429U, 1159657883U, 1159447573U, 1159238293U, 1159029413U, 1158821291U, 1158610679U, 1158401791U, 1158192437U, 1157983051U, 1157773979U, 1157566313U, 1157356867U, 1157148761U, 1156940111U, 1156732697U, 1156522207U, 1156314457U, 1156105541U, 1155900293U, 1155689329U, 1155480661U, 1155273419U, 1155064697U, 1154855899U, 1154646653U, 1154436793U, 1154228027U, 1154020729U, 1153810711U, 1153603991U, 1153394663U, 1153187417U, 1152978973U, 1152771073U, 1152563249U, 1152353821U, 1152145993U, 1151938247U, 1151730473U, 1151522587U, 1151315437U, 1151105951U, 1150895927U, 1150688501U, 1150477577U, 1150271407U, 1150063381U, 1149855211U, 1149644887U, 1149437147U, 1149227243U, 1149020567U, 1148810137U, 1148600951U, 1148394769U, 1148185991U, 1147977247U, 1147768847U, 1147562491U, 1147353859U, 1147143593U, 1146933899U, 1146724949U, 1146514861U, 1146306919U, 1146100591U, 1145894003U, 1145683807U, 1145478899U, 1145271119U, 1145060519U, 1144849163U, 1144640489U, 1144431487U, 1144221607U, 1144014493U, 1143805609U, 1143596227U, 1143388151U, 1143178501U, 1142967641U, 1142757263U, 1142548973U, 1142340253U, 1142130797U, 1141922099U, 1141712267U, 1141504339U, 1141295399U, 1141085873U, 1140875789U, 1140666523U, 1140455947U, 1140247531U, 1140040739U, 1139831323U, 1139624011U, 1139414651U, 1139205901U, 1138998829U, 1138789373U, 1138581187U, 1138373713U, 1138165307U, 1137956741U, 1137749777U, 1137543557U, 1137334369U, 1137125887U, 1136915501U, 1136704747U, 1136495683U, 1136285251U, 1136077577U, 1135868191U, 1135660817U, 1135452361U, 1135244809U, 1135035169U, 1134824861U, 1134615437U, 1134406519U, 1134197663U, 1133988629U, 1133778851U, 1133568727U, 1133357807U, 1133149687U, 1132940047U, 1132731473U, 1132524047U, 1132317119U, 1132109567U, 1131901469U, 1131692797U, 1131482159U, 1131273667U, 1131064631U, 1130857417U, 1130648083U, 1130439929U, 1130231803U, 1130021449U, 1129813459U, 1129605619U, 1129394641U, 1129186661U, 1128976669U, 1128768803U, 1128560591U, 1128354179U, 1128145127U, 1127938793U, 1127729279U, 1127520491U, 1127310199U, 1127101757U, 1126891127U, 1126683491U, 1126474469U, 1126268371U, 1126060379U, 1125850861U, 1125645503U, 1125435653U, 1125228911U, 1125019937U, 1124810191U, 1124601029U, 1124391427U, 1124181301U, 1123972217U, 1123763177U, 1123553309U, 1123346023U, 1123136743U, 1122928627U, 1122720967U, 1122511417U, 1122302417U, 1122093737U, 1121887787U, 1121678477U, 1121468987U, 1121263597U, 1121054999U, 1120848263U, 1120639991U, 1120430299U, 1120221979U, 1120012321U, 1119805361U, 1119597139U, 1119388597U, 1119178637U, 1118973001U, 1118764489U, 1118557243U, 1118348449U, 1118141587U, 1117932931U, 1117724207U, 1117513043U, 1117305067U, 1117096891U, 1116887111U, 1116679621U, 1116471449U, 1116262709U, 1116055631U, 1115846243U, 1115635361U, 1115427913U, 1115219251U, 1115012053U, 1114803533U, 1114593659U, 1114385507U, 1114178473U, 1113968143U, 1113762623U, 1113553663U, 1113347029U, 1113138293U, 1112928077U, 1112717911U, 1112509877U, 1112301271U, 1112092691U, 1111885717U, 1111677641U, 1111467271U, 1111260041U, 1111051927U, 1110844181U, 1110635249U, 1110426409U, 1110217847U, 1110008941U, 1109801263U, 1109592233U, 1109383721U, 1109176469U, 1108968821U, 1108760137U, 1108551179U, 1108344191U, 1108137031U, 1107929003U, 1107720883U, 1107514039U, 1107305911U, 1107098303U, 1106892403U, 1106683751U, 1106474197U, 1106265071U, 1106056043U, 1105847839U, 1105639783U, 1105429693U, 1105221853U, 1105013123U, 1104804509U, 1104595663U, 1104387239U, 1104180157U, 1103972567U, 1103765197U, 1103556331U, 1103348461U, 1103142101U, 1102933277U, 1102726543U, 1102519267U, 1102313431U, 1102104473U, 1101895429U, 1101685861U, 1101479651U, 1101268541U, 1101060229U, 1100852899U, 1100645999U, 1100436301U, 1100227207U, 1100018219U, 1099811047U, 1099602997U, 1099393643U, 1099185673U, 1098978599U, 1098770263U, 1098561227U, 1098351797U, 1098144017U, 1097937167U, 1097728157U, 1097520947U, 1097312089U, 1097103767U, 1096897601U, 1096689799U, 1096482011U, 1096274651U, 1096066739U, 1095859199U, 1095650089U, 1095442963U, 1095231623U, 1095024257U, 1094816797U, 1094609557U, 1094398931U, 1094189693U, 1093980971U, 1093770611U, 1093563649U, 1093358719U, 1093150999U, 1092943727U, 1092736243U, 1092527509U, 1092318377U, 1092112319U, 1091904797U, 1091696719U, 1091489419U, 1091281019U, 1091072471U, 1090864699U, 1090656817U, 1090447843U, 1090240531U, 1090031741U, 1089824773U, 1089618017U, 1089409109U, 1089200053U, 1088991263U, 1088783723U, 1088576893U, 1088365753U, 1088157073U, 1087948157U, 1087740917U, 1087532689U, 1087324613U, 1087118537U, 1086911729U, 1086703643U, 1086495727U, 1086288169U, 1086080651U, 1085870603U, 1085664887U, 1085456423U, 1085247697U, 1085038519U, 1084833017U, 1084624049U, 1084416631U, 1084208351U, 1084001693U, 1083793349U, 1083585871U, 1083377047U, 1083170471U, 1082963663U, 1082756149U, 1082546651U, 1082338427U, 1082131829U, 1081924471U, 1081716761U, 1081511393U, 1081303913U, 1081096957U, 1080887629U, 1080678889U, 1080469007U, 1080262063U, 1080055027U, 1079847971U, 1079640707U, 1079432869U, 1079223599U, 1079014879U, 1078808681U, 1078599227U, 1078390589U, 1078182643U, 1077975377U, 1077768583U, 1077558403U, 1077350501U, 1077143029U, 1076934251U, 1076724241U, 1076518097U, 1076309501U, 1076101567U, 1075893557U, 1075684787U, 1075475461U, 1075267649U, 1075058701U, 1074849661U, 1074641677U, 1074432679U, 1074225577U, 1074019853U, 1073811041U, 1073601887U, 1073392231U, 1073184083U, 1072976483U, 1072767901U, 1072560497U, 1072351633U, 1072144147U, 1071935113U, 1071728831U, 1071520193U, 1071314423U, 1071105181U, 1070897921U, 1070692321U, 1070484431U, 1070277881U, 1070069713U, 1069861379U, 1069652459U, 1069443377U, 1069236671U, 1069029323U, 1068821141U, 1068613543U, 1068406421U, 1068198277U, 1067990419U, 1067782787U, 1067575109U, 1067369003U, 1067160917U, 1066953301U, 1066746419U, 1066536941U, 1066330519U, 1066124239U, 1065916381U, 1065710047U, 1065502043U, 1065293909U, 1065085093U, 1064875531U, 1064669233U, 1064464769U, 1064256913U, 1064052889U, 1063841941U, 1063634183U, 1063429519U, 1063220489U, 1063011779U, 1062803279U, 1062594389U, 1062385393U, 1062178993U, 1061971153U, 1061765231U, 1061557109U, 1061348021U, 1061139697U, 1060931147U, 1060724087U, 1060514333U, 1060306607U, 1060098943U, 1059890033U, 1059683543U, 1059476063U, 1059268699U, 1059058799U, 1058851631U, 1058644291U, 1058437243U, 1058228651U, 1058022887U, 1057815553U, 1057607189U, 1057398107U, 1057191097U, 1056981413U, 1056774827U, 1056567443U, 1056358829U, 1056150707U, 1055942477U, 1055735311U, 1055524109U, 1055317657U, 1055108851U, 1054899821U, 1054691531U, 1054482683U, 1054276051U, 1054070753U, 1053861643U, 1053652829U, 1053443057U, 1053235811U, 1053029443U, 1052820511U, 1052613781U, 1052407277U, 1052201207U, 1051991939U, 1051782857U, 1051575347U, 1051368133U, 1051161451U, 1050953941U, 1050747079U, 1050538583U, 1050331537U, 1050123911U, 1049915177U, 1049708141U, 1049499391U, 1049291899U, 1049084801U, 1048875713U, 1048666351U, 1048459133U, 1048250167U, 1048043951U, 1047834761U, 1047627271U, 1047418517U, 1047210709U, 1047002123U, 1046793551U, 1046584937U, 1046377229U, 1046170379U, 1045963277U, 1045755479U, 1045548289U, 1045341391U, 1045131757U, 1044923059U, 1044714707U, 1044506663U, 1044299353U, 1044089779U, 1043881469U, 1043675887U, 1043468333U, 1043259947U, 1043052079U, 1042842733U, 1042636327U, 1042430009U, 1042222837U, 1042014559U, 1041806749U, 1041601129U, 1041395071U, 1041186929U, 1040977403U, 1040770943U, 1040561549U, 1040352769U, 1040148119U, 1039940617U, 1039734901U, 1039527631U, 1039319389U, 1039112171U, 1038904313U, 1038697459U, 1038489227U, 1038281971U, 1038076063U, 1037869297U, 1037660693U, 1037454337U, 1037245081U, 1037036801U, 1036830203U, 1036622537U, 1036418689U, 1036209221U, 1036001821U, 1035793637U, 1035585337U, 1035377579U, 1035169859U, 1034963477U, 1034755889U, 1034547919U, 1034339519U, 1034133439U, 1033926133U, 1033718393U, 1033508219U, 1033301741U, 1033093891U, 1032883727U, 1032675671U, 1032468491U, 1032261277U, 1032053389U, 1031846441U, 1031638939U, 1031432029U, 1031222191U, 1031015443U, 1030807237U, 1030602227U, 1030394653U, 1030187299U, 1029978863U, 1029770507U, 1029562477U, 1029356557U, 1029149479U, 1028943049U, 1028736311U, 1028526439U, 1028322089U, 1028114587U, 1027905079U, 1027698571U, 1027491097U, 1027281383U, 1027072499U, 1026864593U, 1026655111U, 1026449509U, 1026242017U, 1026034411U, 1025827493U, 1025619773U, 1025412833U, 1025205917U, 1024998553U, 1024790993U, 1024585409U, 1024377589U, 1024170479U, 1023963079U, 1023754891U, 1023546973U, 1023340459U, 1023130879U, 1022924689U, 1022717417U, 1022509559U, 1022303539U, 1022093477U, 1021885679U, 1021678703U, 1021470403U, 1021262609U, 1021056017U, 1020847343U, 1020639803U, 1020432683U, 1020225047U, 1020020171U, 1019812693U, 1019606831U, 1019398117U, 1019190233U, 1018982821U, 1018775161U, 1018567057U, 1018358507U, 1018151209U, 1017944381U, 1017736241U, 1017530897U, 1017324137U, 1017116063U, 1016908021U, 1016700959U, 1016493871U, 1016286463U, 1016078939U, 1015870729U, 1015663459U, 1015456751U, 1015249799U, 1015043849U, 1014837041U, 1014630109U, 1014424841U, 1014216271U, 1014010013U, 1013804111U, 1013594851U, 1013387113U, 1013179397U, 1012969481U, 1012763077U, 1012555567U, 1012347803U, 1012140301U, 1011933803U, 1011728813U, 1011522041U, 1011312689U, 1011105943U, 1010899103U, 1010691037U, 1010484037U, 1010277799U, 1010068273U, 1009863587U, 1009654741U, 1009449401U, 1009242103U, 1009035059U, 1008826657U, 1008617111U, 1008409531U, 1008202501U, 1007995843U, 1007786251U, 1007579669U, 1007371847U, 1007167529U, 1006961783U, 1006755119U, 1006546817U, 1006337861U, 1006130189U, 1005921529U, 1005714239U, 1005508093U, 1005301811U, 1005096139U, 1004888011U, 1004681233U, 1004475079U, 1004267977U, 1004061257U, 1003852589U, 1003647949U, 1003439069U, 1003232161U, 1003024067U, 1002817859U, 1002610171U, 1002403361U, 1002194651U, 1001986877U, 1001778803U, 1001571667U, 1001364493U, 1001156677U, 1000951957U, 1000744669U, 1000537129U, 1000327297U, 1000119983U, 999912523U, 999703801U, 999493673U, 999286423U, 999078749U, 998871407U, 998664533U, 998458471U, 998253203U, 998046109U, 997839767U, 997633313U, 997426693U, 997218899U, 997011133U, 996803813U, 996597577U, 996390223U, 996183359U, 995977547U, 995770397U, 995562409U, 995354803U, 995146829U, 994941529U, 994735051U, 994527539U, 994320137U, 994113697U, 993907393U, 993698323U, 993491119U, 993282299U, 993076549U, 992870051U, 992663029U, 992455333U, 992248849U, 992042297U, 991833253U, 991624423U, 991417409U, 991211311U, 991005881U, 990798979U, 990592243U, 990385157U, 990176959U, 989971237U, 989762567U, 989556467U, 989348963U, 989142277U, 988934563U, 988729121U, 988519901U, 988313663U, 988104911U, 987897461U, 987692201U, 987484747U, 987276473U, 987069637U, 986861357U, 986656057U, 986450291U, 986242583U, 986034559U, 985828897U, 985620491U, 985413613U, 985208027U, 984999641U, 984793639U, 984586049U, 984379723U, 984171319U, 983966077U, 983761687U, 983554151U, 983347199U, 983139727U, 982933051U, 982728209U, 982520449U, 982314679U, 982108307U, 981899161U, 981692263U, 981484789U, 981277889U, 981072341U, 980865359U, 980657081U, 980449601U, 980242871U, 980035361U, 979828741U, 979620721U, 979413271U, 979206149U, 979000333U, 978793337U, 978582823U, 978378091U, 978170003U, 977962343U, 977755951U, 977548213U, 977341201U, 977134861U, 976928089U, 976721873U, 976515613U, 976308323U, 976101821U, 975892903U, 975685771U, 975477911U, 975270103U, 975063059U, 974856133U, 974650109U, 974441773U, 974234951U, 974027363U, 973819969U, 973612897U, 973407217U, 973200797U, 972991693U, 972783767U, 972575189U, 972370271U, 972161327U, 971955211U, 971747593U, 971541997U, 971334241U, 971126231U, 970917953U, 970712653U, 970504793U, 970298893U, 970093193U, 969885979U, 969678383U, 969471989U, 969264253U, 969059699U, 968852399U, 968645647U, 968438519U, 968231983U, 968024059U, 967817281U, 967613329U, 967406161U, 967197743U, 966990467U, 966783197U, 966577459U, 966369473U, 966164629U, 965956177U, 965746939U, 965540179U, 965333641U, 965127589U, 964920427U, 964712663U, 964505779U, 964297351U, 964090601U, 963884557U, 963679721U, 963472667U, 963264233U, 963057677U, 962851469U, 962644237U, 962439397U, 962233927U, 962026067U, 961818331U, 961609657U, 961402753U, 961196113U, 960989921U, 960783503U, 960575053U, 960369671U, 960164357U, 959958569U, 959751467U, 959545339U, 959337787U, 959132063U, 958927643U, 958719757U, 958513207U, 958308079U, 958099903U, 957892121U, 957686003U, 957479813U, 957274463U, 957070073U, 956863231U, 956656499U, 956450219U, 956243017U, 956035967U, 955827647U, 955619213U, 955411801U, 955206139U, 955000157U, 954793003U, 954587419U, 954379667U, 954173333U, 953967467U, 953761241U, 953554561U, 953347751U, 953141549U, 952936403U, 952729321U, 952522433U, 952313891U, 952108571U, 951902069U, 951695267U, 951487843U, 951281183U, 951072641U, 950867891U, 950659939U, 950453393U, 950245817U, 950038891U, 949831711U, 949624163U, 949418621U, 949210631U, 949004237U, 948797947U, 948590129U, 948383503U, 948176329U, 947969749U, 947762281U, 947557529U, 947350549U, 947146309U, 946941377U, 946733339U, 946525397U, 946319123U, 946112749U, 945906653U, 945699767U, 945493957U, 945286103U, 945079393U, 944872997U, 944666137U, 944457727U, 944251129U, 944045093U, 943841623U, 943634413U, 943428457U, 943221553U, 943014223U, 942807059U, 942599201U, 942394279U, 942186577U, 941980649U, 941770757U, 941565017U, 941358941U, 941153023U, 940944761U, 940739473U, 940534457U, 940328141U, 940121129U, 939914237U, 939707311U, 939498481U, 939290711U, 939083969U, 938877299U, 938670497U, 938463313U, 938256743U, 938050571U, 937843117U, 937635403U, 937430023U, 937224481U, 937017241U, 936808751U, 936602551U, 936393247U, 936187487U, 935980187U, 935774839U, 935568223U, 935362513U, 935157149U, 934950433U, 934744141U, 934538333U, 934332799U, 934125721U, 933915907U, 933712601U, 933505961U, 933298987U, 933094187U, 932887321U, 932682197U, 932474657U, 932268949U, 932062069U, 931853539U, 931648031U, 931441501U, 931235729U, 931028831U, 930822023U, 930615799U, 930410359U, 930203363U, 929997377U, 929791073U, 929583461U, 929378647U, 929171809U, 928961563U, 928753213U, 928546337U, 928340111U, 928133047U, 927927431U, 927719873U, 927511327U, 927303313U, 927097819U, 926891057U, 926683861U, 926476429U, 926272069U, 926065423U, 925858279U, 925653983U, 925447087U, 925239961U, 925034359U, 924827639U, 924620899U, 924415159U, 924208093U, 924001801U, 923795833U, 923589143U, 923381033U, 923174653U, 922968353U, 922762307U, 922554167U, 922346597U, 922140283U, 921933101U, 921726833U, 921521323U, 921314491U, 921104917U, 920900389U, 920696473U, 920488883U, 920284241U, 920077003U, 919871549U, 919665931U, 919461089U, 919253327U, 919047611U, 918843181U, 918636781U, 918431209U, 918225853U, 918018929U, 917810801U, 917602223U, 917395903U, 917188477U, 916982489U, 916774951U, 916568707U, 916361893U, 916156721U, 915951917U, 915745531U, 915540091U, 915333547U, 915126503U, 914921417U, 914715511U, 914509529U, 914303749U, 914097449U, 913892719U, 913684151U, 913479859U, 913271237U, 913061893U, 912856787U, 912650659U, 912447581U, 912239071U, 912033929U, 911828861U, 911623931U, 911416811U, 911211313U, 911004803U, 910799521U, 910594129U, 910388137U, 910180189U, 909975103U, 909769517U, 909564301U, 909358363U, 909154039U, 908950027U, 908742859U, 908536289U, 908330999U, 908122427U, 907915453U, 907709161U, 907504669U, 907298807U, 907092811U, 906888161U, 906681863U, 906477373U, 906270719U, 906063619U, 905857787U, 905652047U, 905446649U, 905241457U, 905037937U, 904830643U, 904624129U, 904412191U, 904207417U, 904001689U, 903795047U, 903589319U, 903382463U, 903178417U, 902973857U, 902767081U, 902558269U, 902351161U, 902142887U, 901935031U, 901729561U, 901524121U, 901318051U, 901111439U, 900906637U, 900700831U, 900494867U, 900290857U, 900084401U, 899879263U, 899671099U, 899463869U, 899258387U, 899051437U, 898845781U, 898638131U, 898431239U, 898226999U, 898020311U, 897812969U, 897607853U, 897401333U, 897194827U, 896988797U, 896782561U, 896575313U, 896370289U, 896163013U, 895955897U, 895751147U, 895544131U, 895337041U, 895131739U, 894924157U, 894717371U, 894511207U, 894304603U, 894098801U, 893892721U, 893686333U, 893479253U, 893273831U, 893069227U, 892863337U, 892659133U, 892455203U, 892249121U, 892042433U, 891836821U, 891629833U, 891421211U, 891214297U, 891007393U, 890801147U, 890593727U, 890387999U, 890182673U, 889977527U, 889771829U, 889565387U, 889357043U, 889151611U, 888944711U, 888738751U, 888533159U, 888326333U, 888119311U, 887913683U, 887710319U, 887504369U, 887298869U, 887092457U, 886885721U, 886678853U, 886474403U, 886268503U, 886062503U, 885857129U, 885650761U, 885443579U, 885236993U, 885030703U, 884822867U, 884615929U, 884409923U, 884205199U, 883998877U, 883793107U, 883588081U, 883380077U, 883172489U, 882967091U, 882760639U, 882556957U, 882351131U, 882144853U, 881939497U, 881732437U, 881527169U, 881321641U, 881116981U, 880910321U, 880702661U, 880495237U, 880288337U, 880082239U, 879875501U, 879669793U, 879464407U, 879258439U, 879051493U, 878846819U, 878642081U, 878436607U, 878230709U, 878025917U, 877819699U, 877613479U, 877406449U, 877200449U, 876993101U, 876786593U, 876580267U, 876375277U, 876167623U, 875960333U, 875755271U, 875547059U, 875341081U, 875133761U, 874927159U, 874724077U, 874517923U, 874312423U, 874106309U, 873900127U, 873692717U, 873487577U, 873282323U, 873076363U, 872872051U, 872667931U, 872461297U, 872252947U, 872048687U, 871843979U, 871637411U, 871431779U, 871224707U, 871016617U, 870810277U, 870604591U, 870398107U, 870193447U, 869988349U, 869782429U, 869579747U, 869372099U, 869166061U, 868958539U, 868754771U, 868548341U, 868343237U, 868135109U, 867930487U, 867723991U, 867518711U, 867314957U, 867109753U, 866904347U, 866699791U, 866493643U, 866287339U, 866080493U, 865873159U, 865665811U, 865460467U, 865256173U, 865051073U, 864844751U, 864638191U, 864434687U, 864229549U, 864024071U, 863818961U, 863613349U, 863408839U, 863200651U, 862995349U, 862789141U, 862584491U, 862376869U, 862173199U, 861967571U, 861759439U, 861555043U, 861350729U, 861143057U, 860938087U, 860732359U, 860524417U, 860319727U, 860112137U, 859906457U, 859700689U, 859493447U, 859285943U, 859078879U, 858872177U, 858667783U, 858462079U, 858257021U, 858050153U, 857845171U, 857641481U, 857434343U, 857229661U, 857021821U, 856815683U, 856610141U, 856403957U, 856197857U, 855991243U, 855787067U, 855580549U, 855376927U, 855170389U, 854963783U, 854759743U, 854554699U, 854348233U, 854142089U, 853936907U, 853731059U, 853526381U, 853322969U, 853117247U, 852910259U, 852705479U, 852499171U, 852292559U, 852088277U, 851882099U, 851674477U, 851469019U, 851264669U, 851057611U, 850851587U, 850646939U, 850441219U, 850233557U, 850027799U, 849822679U, 849618937U, 849412657U, 849206053U, 849000613U, 848795179U, 848593357U, 848389111U, 848183599U, 847977167U, 847770809U, 847565239U, 847359661U, 847153661U, 846946957U, 846740357U, 846533267U, 846328151U, 846122219U, 845917427U, 845711719U, 845507317U, 845300191U, 845093831U, 844888931U, 844684639U, 844476407U, 844270619U, 844064857U, 843857627U, 843651791U, 843446467U, 843243067U, 843038501U, 842832899U, 842629639U, 842424053U, 842217149U, 842013313U, 841808101U, 841604131U, 841399711U, 841190411U, 840984299U, 840779671U, 840573443U, 840368603U, 840162481U, 839958013U, 839751259U, 839547497U, 839344031U, 839137381U, 838930861U, 838723777U, 838515877U, 838312229U, 838108081U, 837905749U, 837700639U, 837495367U, 837289603U, 837084181U, 836877871U, 836671211U, 836468057U, 836260973U, 836056369U, 835849453U, 835644737U, 835437937U, 835233631U, 835027631U, 834821531U, 834617561U, 834413053U, 834207961U, 834001559U, 833795381U, 833590399U, 833388103U, 833180779U, 832975837U, 832771883U, 832566463U, 832361093U, 832154209U, 831950087U, 831745181U, 831538217U, 831331097U, 831128377U, 830922097U, 830714711U, 830510453U, 830306963U, 830101141U, 829895009U, 829689409U, 829481797U, 829277191U, 829072877U, 828868163U, 828661567U, 828457241U, 828252463U, 828047761U, 827842021U, 827636519U, 827429737U, 827225387U, 827019359U, 826814369U, 826608259U, 826403551U, 826198921U, 825992749U, 825787181U, 825582193U, 825377621U, 825173177U, 824968519U, 824762513U, 824555269U, 824349683U, 824142367U, 823937089U, 823731899U, 823527623U, 823323491U, 823117289U, 822911773U, 822704539U, 822498949U, 822298387U, 822092333U, 821884897U, 821679041U, 821473817U, 821267743U, 821060567U, 820857749U, 820652309U, 820449247U, 820243231U, 820038239U, 819832337U, 819626957U, 819422881U, 819216481U, 819009029U, 818804929U, 818600191U, 818395423U, 818188193U, 817983277U, 817775953U, 817571851U, 817365001U, 817161731U, 816957101U, 816754249U, 816547183U, 816342731U, 816137629U, 815932811U, 815728063U, 815525041U, 815320771U, 815114593U, 814909063U, 814704377U, 814499137U, 814294979U, 814090049U, 813884047U, 813678431U, 813473777U, 813266687U, 813062197U, 812858303U, 812653463U, 812444767U, 812240867U, 812035387U, 811829387U, 811623677U, 811416707U, 811210409U, 811006307U, 810802211U, 810597041U, 810391237U, 810187129U, 809982451U, 809777047U, 809570357U, 809367527U, 809162383U, 808957727U, 808753609U, 808548869U, 808343827U, 808138619U, 807933043U, 807728011U, 807520933U, 807315097U, 807110879U, 806906183U, 806700733U, 806496791U, 806292649U, 806087551U, 805883863U, 805677811U, 805473197U, 805269511U, 805063621U, 804860167U, 804656609U, 804452377U, 804248353U, 804043717U, 803837729U, 803632777U, 803427617U, 803222543U, 803016983U, 802811783U, 802605607U, 802398869U, 802193299U, 801988721U, 801783091U, 801576833U, 801372301U, 801170593U, 800964947U, 800759837U, 800555507U, 800349989U, 800145637U, 799941431U, 799735591U, 799530211U, 799321723U, 799115183U, 798908287U, 798702907U, 798498577U, 798294529U, 798091429U, 797886301U, 797683489U, 797478323U, 797274593U, 797070173U, 796866731U, 796663463U, 796458079U, 796253543U, 796047509U, 795843017U, 795637589U, 795433099U, 795228689U, 795024343U, 794818757U, 794611771U, 794405483U, 794201981U, 793996361U, 793791871U, 793589521U, 793383473U, 793175657U, 792971173U, 792767303U, 792562187U, 792356891U, 792152663U, 791946361U, 791741987U, 791537057U, 791331511U, 791127121U, 790921451U, 790715449U, 790512449U, 790309699U, 790103269U, 789898783U, 789696023U, 789491359U, 789286541U, 789083311U, 788879213U, 788676593U, 788471473U, 788266363U, 788060909U, 787855697U, 787649867U, 787445047U, 787238801U, 787033469U, 786827917U, 786623683U, 786418057U, 786213613U, 786009541U, 785805851U, 785602429U, 785397241U, 785192389U, 784987867U, 784784137U, 784580513U, 784374709U, 784168753U, 783964201U, 783759491U, 783556097U, 783350957U, 783146677U, 782942621U, 782737691U, 782533847U, 782329189U, 782124271U, 781920047U, 781716347U, 781508461U, 781306091U, 781102481U, 780898067U, 780693167U, 780489373U, 780281669U, 780078977U, 779874761U, 779670799U, 779465539U, 779259721U, 779055377U, 778850389U, 778646443U, 778439353U, 778234753U, 778029961U, 777825071U, 777620797U, 777415897U, 777212977U, 777008467U, 776805607U, 776599469U, 776394529U, 776188249U, 775983587U, 775778981U, 775571197U, 775363819U, 775160839U, 774958963U, 774755101U, 774549131U, 774344911U, 774139987U, 773935823U, 773731103U, 773525183U, 773320489U, 773114789U, 772908407U, 772703273U, 772499641U, 772296299U, 772091959U, 771888739U, 771682333U, 771478817U, 771274909U, 771069413U, 770866417U, 770659819U, 770457361U, 770251723U, 770047417U, 769842737U, 769639153U, 769435741U, 769230353U, 769026721U, 768821993U, 768617809U, 768415003U, 768209993U, 768005369U, 767801081U, 767596649U, 767392177U, 767188109U, 766984861U, 766780723U, 766577017U, 766370587U, 766165427U, 765960827U, 765755923U, 765551887U, 765346807U, 765140107U, 764934101U, 764729831U, 764524559U, 764318081U, 764113409U, 763908421U, 763702871U, 763496977U, 763292863U, 763085441U, 762881213U, 762677887U, 762472883U, 762269491U, 762066233U, 761861773U, 761656757U, 761454761U, 761250397U, 761045281U, 760841267U, 760636241U, 760431571U, 760227421U, 760022563U, 759818119U, 759613373U, 759409121U, 759205961U, 759002147U, 758797409U, 758590351U, 758386777U, 758180999U, 757974431U, 757770557U, 757563913U, 757360343U, 757155391U, 756951557U, 756745879U, 756541993U, 756335977U, 756132043U, 755928577U, 755725219U, 755522717U, 755318411U, 755117449U, 754911943U, 754708613U, 754505491U, 754301363U, 754096429U, 753891353U, 753686273U, 753478769U, 753274433U, 753071041U, 752863843U, 752659769U, 752454491U, 752252723U, 752047913U, 751843847U, 751641613U, 751436113U, 751231693U, 751027219U, 750820591U, 750617599U, 750413071U, 750209107U, 750002681U, 749799353U, 749596063U, 749390321U, 749187239U, 748983497U, 748777097U, 748570727U, 748365781U, 748161493U, 747956771U, 747753049U, 747549137U, 747345839U, 747141341U, 746936653U, 746730653U, 746525287U, 746319589U, 746115709U, 745910587U, 745706963U, 745500979U, 745297621U, 745091561U, 744887953U, 744681803U, 744478247U, 744274087U, 744070963U, 743866531U, 743660123U, 743455499U, 743252057U, 743046131U, 742841441U, 742636201U, 742430959U, 742227581U, 742023407U, 741819343U, 741614831U, 741412043U, 741210733U, 741006107U, 740802157U, 740599147U, 740395081U, 740190901U, 739986479U, 739783483U, 739579301U, 739376173U, 739172509U, 738967561U, 738763513U, 738560629U, 738354811U, 738150871U, 737948891U, 737742631U, 737539013U, 737333279U, 737130917U, 736926341U, 736721627U, 736518637U, 736313399U, 736107901U, 735905449U, 735701039U, 735498311U, 735292559U, 735087839U, 734883719U, 734680031U, 734475019U, 734270261U, 734066527U, 733863617U, 733658491U, 733451969U, 733248409U, 733045849U, 732842687U, 732637471U, 732431977U, 732227963U, 732024677U, 731820107U, 731616659U, 731410013U, 731206789U, 731003699U, 730800157U, 730597859U, 730392911U, 730186241U, 729983159U, 729778739U, 729572989U, 729367999U, 729164873U, 728958179U, 728752537U, 728547713U, 728343281U, 728139547U, 727934741U, 727731241U, 727527331U, 727325023U, 727122239U, 726918719U, 726714731U, 726508303U, 726304021U, 726100841U, 725896487U, 725691401U, 725488607U, 725283917U, 725079499U, 724872257U, 724670717U, 724465921U, 724262933U, 724059107U, 723855389U, 723651367U, 723447541U, 723243071U, 723040919U, 722835679U, 722632091U, 722430077U, 722225747U, 722022241U, 721818211U, 721614809U, 721411309U, 721206137U, 721001899U, 720798943U, 720594737U, 720394001U, 720189739U, 719985113U, 719779663U, 719574659U, 719370763U, 719168381U, 718965557U, 718759667U, 718557457U, 718352377U, 718147487U, 717944737U, 717741457U, 717537397U, 717333257U, 717129419U, 716926489U, 716723647U, 716518147U, 716314759U, 716110303U, 715906249U, 715701733U, 715496503U, 715293221U, 715088713U, 714884113U, 714679831U, 714473567U, 714269599U, 714065827U, 713862659U, 713657779U, 713453441U, 713248951U, 713045633U, 712842859U, 712636681U, 712433479U, 712230031U, 712028087U, 711824431U, 711620251U, 711416557U, 711212743U, 711009647U, 710806249U, 710602241U, 710397929U, 710193521U, 709987973U, 709784423U, 709579397U, 709375097U, 709173313U, 708971059U, 708766621U, 708560641U, 708357941U, 708154789U, 707951423U, 707747771U, 707544449U, 707340901U, 707136037U, 706933907U, 706729477U, 706526057U, 706322767U, 706119229U, 705915263U, 705708581U, 705507211U, 705303433U, 705098729U, 704896967U, 704689123U, 704485543U, 704283677U, 704081153U, 703877453U, 703673827U, 703469479U, 703265593U, 703061603U, 702857261U, 702652763U, 702450323U, 702246911U, 702042587U, 701839483U, 701635811U, 701431931U, 701230391U, 701026709U, 700824233U, 700619299U, 700414969U, 700211597U, 700008041U, 699803639U, 699601703U, 699396107U, 699192971U, 698990321U, 698784601U, 698583167U, 698379893U, 698174573U, 697969771U, 697766647U, 697562161U, 697358087U, 697153277U, 696948883U, 696745613U, 696541897U, 696337199U, 696132923U, 695930063U, 695727287U, 695524421U, 695321987U, 695118793U, 694915033U, 694713121U, 694510799U, 694308409U, 694103749U, 693902189U, 693697861U, 693495707U, 693290693U, 693086063U, 692880593U, 692676043U, 692471839U, 692267629U, 692066027U, 691860787U, 691654427U, 691452701U, 691248563U, 691046197U, 690843497U, 690640073U, 690436451U, 690233857U, 690031691U, 689827861U, 689626391U, 689421461U, 689218693U, 689016061U, 688813313U, 688608259U, 688404593U, 688201453U, 688000597U, 687794941U, 687591491U, 687387941U, 687185729U, 686981179U, 686778749U, 686575619U, 686372573U, 686170627U, 685965883U, 685763807U, 685561589U, 685358743U, 685152973U, 684952267U, 684749539U, 684546301U, 684343783U, 684139223U, 683937043U, 683733839U, 683530657U, 683328223U, 683124397U, 682920827U, 682714943U, 682511183U, 682309351U, 682103599U, 681899051U, 681696179U, 681493469U, 681289709U, 681085721U, 680882903U, 680679397U, 680471927U, 680270299U, 680065777U, 679861867U, 679660061U, 679456607U, 679253357U, 679050059U, 678847717U, 678642989U, 678440069U, 678236347U, 678035641U, 677830873U, 677628803U, 677424799U, 677220611U, 677016947U, 676812611U, 676609151U, 676406209U, 676201349U, 675997891U, 675795247U, 675590893U, 675387701U, 675183583U, 674978831U, 674776187U, 674572439U, 674370167U, 674165113U, 673961681U, 673757599U, 673553927U, 673350653U, 673147133U, 672945331U, 672743177U, 672540733U, 672338573U, 672133181U, 671930689U, 671727011U, 671523233U, 671318261U, 671115199U, 670911421U, 670709293U, 670506917U, 670302641U, 670101259U, 669897967U, 669694541U, 669491029U, 669287683U, 669083971U, 668881069U, 668676179U, 668472397U, 668270507U, 668068201U, 667863941U, 667658281U, 667455779U, 667252673U, 667049989U, 666846907U, 666644311U, 666440711U, 666237587U, 666033439U, 665831629U, 665628493U, 665425433U, 665220097U, 665019863U, 664815269U, 664610027U, 664406489U, 664204199U, 663999913U, 663797773U, 663594973U, 663391571U, 663189217U, 662985991U, 662781139U, 662578771U, 662376301U, 662173163U, 661970923U, 661766587U, 661564117U, 661360867U, 661158109U, 660956579U, 660753323U, 660550507U, 660347899U, 660143741U, 659941621U, 659737963U, 659535911U, 659332409U, 659131883U, 658928773U, 658726249U, 658522097U, 658318981U, 658115791U, 657911473U, 657709483U, 657506237U, 657303599U, 657101573U, 656898113U, 656695649U, 656493203U, 656289511U, 656086637U, 655885333U, 655683869U, 655477967U, 655274233U, 655071191U, 654867817U, 654663497U, 654460787U, 654256483U, 654053731U, 653852063U, 653650927U, 653448149U, 653244967U, 653042101U, 652837447U, 652635847U, 652434457U, 652230121U, 652026413U, 651823261U, 651619429U, 651414263U, 651213137U, 651010247U, 650806159U, 650604349U, 650401841U, 650199787U, 649998353U, 649795441U, 649591843U, 649389071U, 649186823U, 648983471U, 648779801U, 648576407U, 648375163U, 648172121U, 647967751U, 647766323U, 647563951U, 647360759U, 647158151U, 646956643U, 646751759U, 646549147U, 646347641U, 646142711U, 645940591U, 645738493U, 645535757U, 645336379U, 645133271U, 644930747U, 644725849U, 644524271U, 644320097U, 644116379U, 643912121U, 643709431U, 643507399U, 643302419U, 643098277U, 642895997U, 642692101U, 642490577U, 642287293U, 642084581U, 641879369U, 641675651U, 641473507U, 641272769U, 641068943U, 640865791U, 640663691U, 640461149U, 640258441U, 640056797U, 639853933U, 639651763U, 639448993U, 639245209U, 639043667U, 638841017U, 638636197U, 638432797U, 638230627U, 638028499U, 637825693U, 637622473U, 637419509U, 637218331U, 637014737U, 636813649U, 636611513U, 636407791U, 636204119U, 636002737U, 635801591U, 635599907U, 635397629U, 635193677U, 634989863U, 634789277U, 634586243U, 634382291U, 634179061U, 633977947U, 633775931U, 633574021U, 633367927U, 633164879U, 632962807U, 632759377U, 632555153U, 632351501U, 632150209U, 631946437U, 631743881U, 631540807U, 631339997U, 631139219U, 630934589U, 630731029U, 630527089U, 630324089U, 630122813U, 629920561U, 629717899U, 629513603U, 629311447U, 629108819U, 628907117U, 628703701U, 628502051U, 628298389U, 628095469U, 627893857U, 627691369U, 627491489U, 627289417U, 627087541U, 626884411U, 626682481U, 626481029U, 626279263U, 626075917U, 625873021U, 625669463U, 625467991U, 625264193U, 625060103U, 624858583U, 624656741U, 624453941U, 624251627U, 624049919U, 623848559U, 623644843U, 623442283U, 623240573U, 623038027U, 622835881U, 622632193U, 622429267U, 622225393U, 622024201U, 621821443U, 621618353U, 621416293U, 621213811U, 621010913U, 620807219U, 620605273U, 620404303U, 620202071U, 619998289U, 619795069U, 619594111U, 619392973U, 619191751U, 618987839U, 618784261U, 618581881U, 618380407U, 618179491U, 617976509U, 617775247U, 617572051U, 617364289U, 617162387U, 616957969U, 616754869U, 616551841U, 616350121U, 616148317U, 615943327U, 615740759U, 615539033U, 615337127U, 615132989U, 614932831U, 614733143U, 614529679U, 614325851U, 614124109U, 613920361U, 613718159U, 613514249U, 613312057U, 613110397U, 612910351U, 612707237U, 612504667U, 612304261U, 612103909U, 611900753U, 611698123U, 611496157U, 611294227U, 611090479U, 610887731U, 610683587U, 610480919U, 610280401U, 610078039U, 609876131U, 609674269U, 609471799U, 609269761U, 609066739U, 608862853U, 608660761U, 608456423U, 608255107U, 608053217U, 607852319U, 607649767U, 607446799U, 607245157U, 607042897U, 606840127U, 606637931U, 606436657U, 606232813U, 606032149U, 605830289U, 605626213U, 605422177U, 605219947U, 605016959U, 604813397U, 604610459U, 604408589U, 604206847U, 604006127U, 603805283U, 603604933U, 603403301U, 603202087U, 603001453U, 602798479U, 602596451U, 602394857U, 602192561U, 601991009U, 601786813U, 601586017U, 601384957U, 601182587U, 600980227U, 600778547U, 600576233U, 600374387U, 600172591U, 599971679U, 599769923U, 599566883U, 599363221U, 599161111U, 598958683U, 598756549U, 598555813U, 598352719U, 598150877U, 597947153U, 597745297U, 597541999U, 597337567U, 597136207U, 596934421U, 596732161U, 596529809U, 596328263U, 596126887U, 595926047U, 595726231U, 595525477U, 595323367U, 595123103U, 594920329U, 594717373U, 594516499U, 594314507U, 594112087U, 593912741U, 593711309U, 593508803U, 593308451U, 593103053U, 592900741U, 592698257U, 592494193U, 592293173U, 592091407U, 591888067U, 591687923U, 591486463U, 591284051U, 591082729U, 590883119U, 590681459U, 590480369U, 590278001U, 590076283U, 589874573U, 589674193U, 589472339U, 589270849U, 589070381U, 588870313U, 588669443U, 588464057U, 588263561U, 588060061U, 587857031U, 587654689U, 587452897U, 587251337U, 587049017U, 586846721U, 586644491U, 586443799U, 586242571U, 586040383U, 585835819U, 585633127U, 585433627U, 585230879U, 585029329U, 584826139U, 584624393U, 584422913U, 584219341U, 584015989U, 583814299U, 583611703U, 583411267U, 583210997U, 583007807U, 582807571U, 582605579U, 582405001U, 582205361U, 582002873U, 581798431U, 581597867U, 581397871U, 581194717U, 580991603U, 580790069U, 580589203U, 580387013U, 580186129U, 579982621U, 579781781U, 579578579U, 579376393U, 579178037U, 578976389U, 578773919U, 578570711U, 578369717U, 578169673U, 577965979U, 577763447U, 577562731U, 577360717U, 577158581U, 576956839U, 576754333U, 576554747U, 576354287U, 576152683U, 575949761U, 575748139U, 575545297U, 575344691U, 575141939U, 574940273U, 574739071U, 574537841U, 574335733U, 574132697U, 573930839U, 573729197U, 573527359U, 573326459U, 573124847U, 572923643U, 572722207U, 572520763U, 572320277U, 572119133U, 571917083U, 571714459U, 571514039U, 571312447U, 571109333U, 570908267U, 570706163U, 570505211U, 570302011U, 570100901U, 569899741U, 569695739U, 569494903U, 569292637U, 569090791U, 568890131U, 568688333U, 568486201U, 568285241U, 568083853U, 567883439U, 567682277U, 567480181U, 567278477U, 567075389U, 566876873U, 566672047U, 566471351U, 566269831U, 566067713U, 565866193U, 565665403U, 565463131U, 565261157U, 565060669U, 564859157U, 564657833U, 564456637U, 564253399U, 564050923U, 563849423U, 563648951U, 563446757U, 563245951U, 563043527U, 562844081U, 562640021U, 562439363U, 562237279U, 562037263U, 561836309U, 561636739U, 561436591U, 561233341U, 561031321U, 560827517U, 560628337U, 560425741U, 560224517U, 560023267U, 559821347U, 559619603U, 559418737U, 559216529U, 559013027U, 558812473U, 558611803U, 558408817U, 558207941U, 558007081U, 557807857U, 557605397U, 557403169U, 557203447U, 557001349U, 556799281U, 556595849U, 556396177U, 556194521U, 555994253U, 555791333U, 555590479U, 555389213U, 555186431U, 554986511U, 554785073U, 554584267U, 554380919U, 554178277U, 553976713U, 553776191U, 553572707U, 553372213U, 553172117U, 552972401U, 552771497U, 552570311U, 552369217U, 552167767U, 551967211U, 551766811U, 551565811U, 551364811U, 551162357U, 550961809U, 550761137U, 550560139U, 550358761U, 550159567U, 549958901U, 549757049U, 549557549U, 549356981U, 549155773U, 548954101U, 548752109U, 548551309U, 548349407U, 548149279U, 547949123U, 547747367U, 547545563U, 547344871U, 547145353U, 546945383U, 546744547U, 546542723U, 546340393U, 546138457U, 545937809U, 545735521U, 545535997U, 545334311U, 545133191U, 544932499U, 544732439U, 544530967U, 544329011U, 544127197U, 543926419U, 543724817U, 543523769U, 543322561U, 543119747U, 542918149U, 542717267U, 542513899U, 542313859U, 542112257U, 541910729U, 541709111U, 541507361U, 541304821U, 541103399U, 540902563U, 540701129U, 540501653U, 540301187U, 540098873U, 539897623U, 539694797U, 539494807U, 539294407U, 539095981U, 538892941U, 538692157U, 538491649U, 538288771U, 538087817U, 537887657U, 537687739U, 537487169U, 537284981U, 537083843U, 536882651U, 536681611U, 536479873U, 536280743U, 536080177U, 535880399U, 535676699U, 535475179U, 535275227U, 535076489U, 534877139U, 534675809U, 534475439U, 534273799U, 534072523U, 533871847U, 533669711U, 533467969U, 533268401U, 533066321U, 532865881U, 532665751U, 532465837U, 532263973U, 532062943U, 531863203U, 531661121U, 531460661U, 531258587U, 531058793U, 530857277U, 530654587U, 530453389U, 530251793U, 530050559U, 529850803U, 529650467U, 529450759U, 529250581U, 529048207U, 528848687U, 528646109U, 528445363U, 528244949U, 528043793U, 527843429U, 527644543U, 527442943U, 527244271U, 527042909U, 526841269U, 526640363U, 526441231U, 526241101U, 526040443U, 525839239U, 525638411U, 525434137U, 525234989U, 525033917U, 524833663U, 524631677U, 524432423U, 524231369U, 524029361U, 523831199U, 523626899U, 523425431U, 523225741U, 523026701U, 522826373U, 522627043U, 522427067U, 522224917U, 522023401U, 521821427U, 521621959U, 521422549U, 521221067U, 521019319U, 520817963U, 520616627U, 520416683U, 520213721U, 520012981U, 519811693U, 519612167U, 519410641U, 519212537U, 519010183U, 518809799U, 518610613U, 518408963U, 518208749U, 518007229U, 517808209U, 517608347U, 517408183U, 517207921U, 517005949U, 516805997U, 516604573U, 516406013U, 516207467U, 516008153U, 515806139U, 515604629U, 515405351U, 515204141U, 515003767U, 514802657U, 514601641U, 514400261U, 514198963U, 513997249U, 513796343U, 513594311U, 513394933U, 513194443U, 512993147U, 512791793U, 512591657U, 512391179U, 512189567U, 511989869U, 511791689U, 511592533U, 511390471U, 511189741U, 510988547U, 510785537U, 510583921U, 510382417U, 510182483U, 509981909U, 509779393U, 509577611U, 509376979U, 509178223U, 508978709U, 508776343U, 508576129U, 508377131U, 508175669U, 507974827U, 507776117U, 507575839U, 507374239U, 507172243U, 506971207U, 506771051U, 506569117U, 506371009U, 506169997U, 505970363U, 505771171U, 505568621U, 505370287U, 505167449U, 504965723U, 504765221U, 504565993U, 504363793U, 504162943U, 503962243U, 503761499U, 503562671U, 503362183U, 503161073U, 502963723U, 502760147U, 502557053U, 502358569U, 502157779U, 501955921U, 501757211U, 501555529U, 501353029U, 501151003U, 500950243U, 500749423U, 500548927U, 500349547U, 500150419U, 499949237U, 499748027U, 499548073U, 499348043U, 499148371U, 498946183U, 498744937U, 498544243U, 498344221U, 498145331U, 497944339U, 497742803U, 497542301U, 497342597U, 497142461U, 496944137U, 496743421U, 496542467U, 496342559U, 496141033U, 495942431U, 495744017U, 495541757U, 495342109U, 495144467U, 494944381U, 494744039U, 494544251U, 494343253U, 494142589U, 493941887U, 493744421U, 493544963U, 493343107U, 493144049U, 492942053U, 492741779U, 492543169U, 492340843U, 492142411U, 491941981U, 491741039U, 491539963U, 491339879U, 491139391U, 490939979U, 490739591U, 490540991U, 490338143U, 490138709U, 489939733U, 489741347U, 489539027U, 489340637U, 489141589U, 488941511U, 488740841U, 488539937U, 488338727U, 488139371U, 487937057U, 487738711U, 487538809U, 487339261U, 487140481U, 486937639U, 486736531U, 486537329U, 486338273U, 486136883U, 485937509U, 485738203U, 485538127U, 485337989U, 485140349U, 484937711U, 484737509U, 484536757U, 484336837U, 484137497U, 483939971U, 483737039U, 483537449U, 483337639U, 483138653U, 482938283U, 482739253U, 482538299U, 482338403U, 482138263U, 481938917U, 481736617U, 481536409U, 481337513U, 481137857U, 480937759U, 480739001U, 480537581U, 480336917U, 480136567U, 479938223U, 479737619U, 479539097U, 479339183U, 479141059U, 478942067U, 478741559U, 478542703U, 478340857U, 478142449U, 477944321U, 477743977U, 477546011U, 477347399U, 477147521U, 476947259U, 476747641U, 476548901U, 476348827U, 476150273U, 475948013U, 475750589U, 475551379U, 475352797U, 475150409U, 474949693U, 474751171U, 474549793U, 474348517U, 474147491U, 473949131U, 473748619U, 473548253U, 473348831U, 473147219U, 472948547U, 472747463U, 472547989U, 472347287U, 472145659U, 471945917U, 471748649U, 471548069U, 471348961U, 471149207U, 470950153U, 470748791U, 470549347U, 470351477U, 470150717U, 469952341U, 469751767U, 469551091U, 469352539U, 469151213U, 468950203U, 468751051U, 468552247U, 468353461U, 468152129U, 467952377U, 467754227U, 467555227U, 467355353U, 467156101U, 466955911U, 466757003U, 466556239U, 466357963U, 466158311U, 465959267U, 465760007U, 465561557U, 465360937U, 465161383U, 464962279U, 464762321U, 464563501U, 464362757U, 464163571U, 463962397U, 463764967U, 463564469U, 463364893U, 463166261U, 462966761U, 462766189U, 462569413U, 462372247U, 462170981U, 461971409U, 461772973U, 461573053U, 461372407U, 461172953U, 460973837U, 460773757U, 460575421U, 460375787U, 460175531U, 459975463U, 459775529U, 459576269U, 459375529U, 459176827U, 458978837U, 458778251U, 458579623U, 458378449U, 458179201U, 457980247U, 457780087U, 457579873U, 457380149U, 457179883U, 456978043U, 456778277U, 456580403U, 456382621U, 456183779U, 455983999U, 455784811U, 455587133U, 455387473U, 455190709U, 454989583U, 454790839U, 454592141U, 454393207U, 454192829U, 453991639U, 453792349U, 453594863U, 453395477U, 453195317U, 452997271U, 452797781U, 452598371U, 452398861U, 452198111U, 451999063U, 451798381U, 451599991U, 451401329U, 451203043U, 451003369U, 450804311U, 450605033U, 450406111U, 450207323U, 450005779U, 449805127U, 449607377U, 449408263U, 449210183U, 449009257U, 448811263U, 448610651U, 448410961U, 448211779U, 448012727U, 447814069U, 447614969U, 447417629U, 447219607U, 447018653U, 446819507U, 446619211U, 446420999U, 446222983U, 446025029U, 445823501U, 445625413U, 445426213U, 445225961U, 445026437U, 444825617U, 444626759U, 444429047U, 444229369U, 444030101U, 443829811U, 443630137U, 443431517U, 443232901U, 443033827U, 442834741U, 442637519U, 442437967U, 442240273U, 442041881U, 441842741U, 441643283U, 441444281U, 441245989U, 441046421U, 440848217U, 440650913U, 440452801U, 440253907U, 440054633U, 439853749U, 439654013U, 439457189U, 439257359U, 439056533U, 438858703U, 438659831U, 438462467U, 438263159U, 438064609U, 437865427U, 437666947U, 437466863U, 437268773U, 437068847U, 436868449U, 436670497U, 436471037U, 436273589U, 436074449U, 435875689U, 435675841U, 435478531U, 435278447U, 435078181U, 434878967U, 434679697U, 434481449U, 434283781U, 434085941U, 433886129U, 433689709U, 433489633U, 433289327U, 433091431U, 432890333U, 432691601U, 432492787U, 432294497U, 432094483U, 431894923U, 431696873U, 431497559U, 431296277U, 431098417U, 430900109U, 430702603U, 430503809U, 430302787U, 430105099U, 429906679U, 429707029U, 429509417U, 429310421U, 429109423U, 428910857U, 428711483U, 428511703U, 428314927U, 428117311U, 427918651U, 427719401U, 427521481U, 427322989U, 427123111U, 426925133U, 426724349U, 426525871U, 426326893U, 426127813U, 425928799U, 425728997U, 425533403U, 425334583U, 425135617U, 424936537U, 424737011U, 424541581U, 424343551U, 424146511U, 423946121U, 423748387U, 423548303U, 423351671U, 423152069U, 422954933U, 422755831U, 422557453U, 422359213U, 422158339U, 421960291U, 421763827U, 421563733U, 421366151U, 421167689U, 420969389U, 420769309U, 420572881U, 420375001U, 420176611U, 419976331U, 419776127U, 419578361U, 419379509U, 419179603U, 418979641U, 418780897U, 418582277U, 418383109U, 418183849U, 417986473U, 417785383U, 417587249U, 417388949U, 417191617U, 416992963U, 416794331U, 416597381U, 416398579U, 416200951U, 416001809U, 415803473U, 415603697U, 415405307U, 415207843U, 415009589U, 414810257U, 414610699U, 414413353U, 414215677U, 414018053U, 413818421U, 413621567U, 413423687U, 413225717U, 413026183U, 412828747U, 412631039U, 412431941U, 412232773U, 412034221U, 411835729U, 411636413U, 411439513U, 411240233U, 411042397U, 410843287U, 410646013U, 410449189U, 410249803U, 410050819U, 409853333U, 409656281U, 409458463U, 409258793U, 409058711U, 408860971U, 408664187U, 408464179U, 408266189U, 408065837U, 407867311U, 407669081U, 407471927U, 407271439U, 407073881U, 406877249U, 406679659U, 406479001U, 406280117U, 406082849U, 405884041U, 405687781U, 405490279U, 405291479U, 405093827U, 404895737U, 404697413U, 404499299U, 404301481U, 404102047U, 403904159U, 403705843U, 403507213U, 403310881U, 403112621U, 402915971U, 402715903U, 402517751U, 402320783U, 402121381U, 401923957U, 401724599U, 401528717U, 401332213U, 401131697U, 400931189U, 400733779U, 400535969U, 400336843U, 400139683U, 399941057U, 399744157U, 399547763U, 399350779U, 399152113U, 398954053U, 398755499U, 398555467U, 398357359U, 398159819U, 397961419U, 397764043U, 397567669U, 397369877U, 397171807U, 396973267U, 396774629U, 396577301U, 396379943U, 396181067U, 395980789U, 395781667U, 395584159U, 395385007U, 395188181U, 394990331U, 394794503U, 394596827U, 394396969U, 394198813U, 394002709U, 393804911U, 393606827U, 393408269U, 393210053U, 393009401U, 392811593U, 392612743U, 392415109U, 392218621U, 392022847U, 391824457U, 391626553U, 391429637U, 391231889U, 391033793U, 390835553U, 390637921U, 390441223U, 390241699U, 390042449U, 389843183U, 389645681U, 389447621U, 389248823U, 389052439U, 388855781U, 388656199U, 388459307U, 388259567U, 388061561U, 387864629U, 387667837U, 387469879U, 387272381U, 387076399U, 386878507U, 386682287U, 386482841U, 386284729U, 386088091U, 385888673U, 385690637U, 385492399U, 385295177U, 385097183U, 384897481U, 384702599U, 384503279U, 384303877U, 384105457U, 383910119U, 383710697U, 383513033U, 383314843U, 383118283U, 382920323U, 382722091U, 382526117U, 382327081U, 382131317U, 381932543U, 381733871U, 381536263U, 381339001U, 381141713U, 380943287U, 380745119U, 380549473U, 380353643U, 380155829U, 379959787U, 379761233U, 379564693U, 379368433U, 379169093U, 378972059U, 378774973U, 378576661U, 378379069U, 378181577U, 377986579U, 377790331U, 377593961U, 377396317U, 377199353U, 377001491U, 376804807U, 376607597U, 376412041U, 376214897U, 376016687U, 375818951U, 375622451U, 375423943U, 375226717U, 375030277U, 374835067U, 374637187U, 374441663U, 374245843U, 374049421U, 373850149U, 373652611U, 373455721U, 373259041U, 373061153U, 372865313U, 372666439U, 372467983U, 372269861U, 372073027U, 371875487U, 371679949U, 371481403U, 371284019U, 371087051U, 370890119U, 370690913U, 370493017U, 370294313U, 370097443U, 369899443U, 369703973U, 369505193U, 369307739U, 369109889U, 368911969U, 368714663U, 368517571U, 368320279U, 368120243U, 367923209U, 367726043U, 367529347U, 367332887U, 367135781U, 366938617U, 366741209U, 366543559U, 366347753U, 366149503U, 365955307U, 365756527U, 365558581U, 365363857U, 365166587U, 364970513U, 364773737U, 364575859U, 364377521U, 364179511U, 363983131U, 363785197U, 363588817U, 363390553U, 363195181U, 362999201U, 362803139U, 362604239U, 362406371U, 362210389U, 362014487U, 361815557U, 361619017U, 361423003U, 361226137U, 361028461U, 360832673U, 360635521U, 360439447U, 360240187U, 360040679U, 359842253U, 359645311U, 359447687U, 359249707U, 359052313U, 358858273U, 358661063U, 358463939U, 358266409U, 358068593U, 357872413U, 357675007U, 357478169U, 357280499U, 357083897U, 356885869U, 356688811U, 356492189U, 356295151U, 356098751U, 355901947U, 355704463U, 355507771U, 355309891U, 355114247U, 354917833U, 354720913U, 354523361U, 354326381U, 354130529U, 353933969U, 353737781U, 353539999U, 353342723U, 353145461U, 352948801U, 352753501U, 352555993U, 352360607U, 352163509U, 351967027U, 351769367U, 351572531U, 351374641U, 351177149U, 350980813U, 350785063U, 350585953U, 350388953U, 350192669U, 349996081U, 349801069U, 349605001U, 349408399U, 349212121U, 349017743U, 348820009U, 348624013U, 348426301U, 348229087U, 348031709U, 347834699U, 347637391U, 347439167U, 347242471U, 347044981U, 346849813U, 346652567U, 346454621U, 346257913U, 346061753U, 345865753U, 345669557U, 345473837U, 345275929U, 345078781U, 344882101U, 344684033U, 344488973U, 344292059U, 344097217U, 343898977U, 343703963U, 343508807U, 343311377U, 343115831U, 342919721U, 342722383U, 342523879U, 342328037U, 342131789U, 341935313U, 341738809U, 341541943U, 341347519U, 341150387U, 340953829U, 340757311U, 340561127U, 340364267U, 340168667U, 339974029U, 339778027U, 339582403U, 339384623U, 339187153U, 338991377U, 338796769U, 338599637U, 338403323U, 338206987U, 338010899U, 337813561U, 337615627U, 337419529U, 337223017U, 337028317U, 336830243U, 336634169U, 336437867U, 336240617U, 336046489U, 335848273U, 335650519U, 335451937U, 335257631U, 335061379U, 334866143U, 334671119U, 334475023U, 334278407U, 334081999U, 333885493U, 333689641U, 333493817U, 333295159U, 333099301U, 332902267U, 332708333U, 332513537U, 332317099U, 332121589U, 331923899U, 331726243U, 331530721U, 331334567U, 331139597U, 330943961U, 330746777U, 330549281U, 330353497U, 330155801U, 329958217U, 329761063U, 329565997U, 329372503U, 329175647U, 328979237U, 328784177U, 328586053U, 328389337U, 328193059U, 327995519U, 327800741U, 327605669U, 327410011U, 327213077U, 327017179U, 326821853U, 326623663U, 326428433U, 326231999U, 326037541U, 325842991U, 325645601U, 325448521U, 325253213U, 325057771U, 324862957U, 324666421U, 324471799U, 324273199U, 324076547U, 323881451U, 323686007U, 323491559U, 323294771U, 323098057U, 322903201U, 322706641U, 322510327U, 322315337U, 322119839U, 321923383U, 321727409U, 321530717U, 321333583U, 321137129U, 320941081U, 320744891U, 320551463U, 320355521U, 320159297U, 319962779U, 319766467U, 319571167U, 319375031U, 319180403U, 318982711U, 318785903U, 318589429U, 318393197U, 318196201U, 318000107U, 317805539U, 317609239U, 317414249U, 317218159U, 317021557U, 316825007U, 316630189U, 316434571U, 316240933U, 316042729U, 315846803U, 315650969U, 315456887U, 315260969U, 315064801U, 314867783U, 314671963U, 314475647U, 314281483U, 314084747U, 313889507U, 313693873U, 313499171U, 313301939U, 313106369U, 312911791U, 312714757U, 312520513U, 312326171U, 312130883U, 311935249U, 311740393U, 311544097U, 311348537U, 311150603U, 310954757U, 310760423U, 310565063U, 310367201U, 310172567U, 309976889U, 309780833U, 309585277U, 309390391U, 309194843U, 308999861U, 308803367U, 308608061U, 308414591U, 308219759U, 308025181U, 307831889U, 307635407U, 307438961U, 307243633U, 307049789U, 306853601U, 306659321U, 306462509U, 306268327U, 306071489U, 305877857U, 305682331U, 305488069U, 305293357U, 305095501U, 304900741U, 304706543U, 304511563U, 304317733U, 304123049U, 303926687U, 303730639U, 303533579U, 303337841U, 303142717U, 302947639U, 302751403U, 302556227U, 302360789U, 302164789U, 301969669U, 301774477U, 301578371U, 301384009U, 301189789U, 300993977U, 300799193U, 300604537U, 300409147U, 300214097U, 300018991U, 299824153U, 299630267U, 299435627U, 299240393U, 299045213U, 298849277U, 298652239U, 298456597U, 298263409U, 298066163U, 297872719U, 297677909U, 297481843U, 297285559U, 297091783U, 296897011U, 296700601U, 296505931U, 296311601U, 296116567U, 295921999U, 295726633U, 295531559U, 295336793U, 295140841U, 294942679U, 294748271U, 294553247U, 294359101U, 294165023U, 293968579U, 293776391U, 293581697U, 293386861U, 293190439U, 292996973U, 292800799U, 292605169U, 292409519U, 292215767U, 292021063U, 291827639U, 291633949U, 291437387U, 291242587U, 291048767U, 290854877U, 290661247U, 290463907U, 290269211U, 290071961U, 289876151U, 289683391U, 289489001U, 289295263U, 289099033U, 288904207U, 288709153U, 288515441U, 288322451U, 288125489U, 287931167U, 287736619U, 287540761U, 287346179U, 287151391U, 286959503U, 286764607U, 286568573U, 286374031U, 286178987U, 285983519U, 285789107U, 285594181U, 285399307U, 285205703U, 285008237U, 284812981U, 284618359U, 284422013U, 284227513U, 284032559U, 283836739U, 283642439U, 283449623U, 283255697U, 283058701U, 282864317U, 282669041U, 282475181U, 282280811U, 282085339U, 281889917U, 281695201U, 281500633U, 281306489U, 281113423U, 280918579U, 280723097U, 280528693U, 280334149U, 280141241U, 279946393U, 279751027U, 279560293U, 279365003U, 279170747U, 278975017U, 278780989U, 278585389U, 278389271U, 278195611U, 278001011U, 277805389U, 277611193U, 277419089U, 277225111U, 277029673U, 276835171U, 276644429U, 276448457U, 276252617U, 276058423U, 275863681U, 275669291U, 275475751U, 275281729U, 275088881U, 274894013U, 274697779U, 274504193U, 274310441U, 274117891U, 273924907U, 273730747U, 273535697U, 273342491U, 273147961U, 272953697U, 272758777U, 272564821U, 272371163U, 272178229U, 271982563U, 271787753U, 271595333U, 271400323U, 271206511U, 271009061U, 270814079U, 270619381U, 270427243U, 270232243U, 270036869U, 269844067U, 269647501U, 269451593U, 269257223U, 269063869U, 268870291U, 268676921U, 268483349U, 268290353U, 268094273U, 267900641U, 267707107U, 267513931U, 267318967U, 267123811U, 266929331U, 266735921U, 266541529U, 266344789U, 266149801U, 265955761U, 265762681U, 265568717U, 265376333U, 265184369U, 264990793U, 264798371U, 264604061U, 264408223U, 264215219U, 264021649U, 263825923U, 263631391U, 263435899U, 263239267U, 263046703U, 262852531U, 262658387U, 262464793U, 262271809U, 262080089U, 261886379U, 261692357U, 261498031U, 261306077U, 261112427U, 260918267U, 260725741U, 260532791U, 260338409U, 260144699U, 259950673U, 259756537U, 259560409U, 259367083U, 259174913U, 258980681U, 258786469U, 258593123U, 258399347U, 258205139U, 258011459U, 257818237U, 257623973U, 257431091U, 257237641U, 257044279U, 256853161U, 256658621U, 256462571U, 256266811U, 256073957U, 255879553U, 255687011U, 255493417U, 255301757U, 255107311U, 254913271U, 254719727U, 254527073U, 254334673U, 254141203U, 253946449U, 253754503U, 253559893U, 253366097U, 253173623U, 252979483U, 252786907U, 252591419U, 252398903U, 252204389U, 252012149U, 251819627U, 251622391U, 251429363U, 251237071U, 251043629U, 250851683U, 250658201U, 250465169U, 250271443U, 250077787U, 249883757U, 249690719U, 249497777U, 249303823U, 249110591U, 248917909U, 248722577U, 248531111U, 248338187U, 248146201U, 247953331U, 247759651U, 247565719U, 247371941U, 247179193U, 246985139U, 246791761U, 246598217U, 246406241U, 246212237U, 246018317U, 245824157U, 245630933U, 245437499U, 245244113U, 245050829U, 244859389U, 244669351U, 244476997U, 244284641U, 244092203U, 243896459U, 243703637U, 243509891U, 243316207U, 243123827U, 242930803U, 242737823U, 242542541U, 242349871U, 242155003U, 241962229U, 241768279U, 241573951U, 241381463U, 241187647U, 240994267U, 240802189U, 240609661U, 240417691U, 240225439U, 240033793U, 239840473U, 239647459U, 239455163U, 239262083U, 239068651U, 238874029U, 238681423U, 238488847U, 238295927U, 238103737U, 237912613U, 237719497U, 237528143U, 237335599U, 237142793U, 236950423U, 236759689U, 236566277U, 236372723U, 236180239U, 235988591U, 235796063U, 235601153U, 235409131U, 235218167U, 235025429U, 234833069U, 234642053U, 234449203U, 234255401U, 234063703U, 233870243U, 233675419U, 233483567U, 233289703U, 233095871U, 232901521U, 232711207U, 232517699U, 232323913U, 232130593U, 231937631U, 231744913U, 231553181U, 231360061U, 231167999U, 230975573U, 230782369U, 230591323U, 230400697U, 230206813U, 230014139U, 229822447U, 229631383U, 229437889U, 229244651U, 229050709U, 228859753U, 228667319U, 228474931U, 228283373U, 228091951U, 227898883U, 227705561U, 227510263U, 227318057U, 227125973U, 226933331U, 226741129U, 226549201U, 226356973U, 226164139U, 225972629U, 225781723U, 225588239U, 225395087U, 225201127U, 225008657U, 224817499U, 224623351U, 224430487U, 224238809U, 224047783U, 223854737U, 223660903U, 223470251U, 223278821U, 223088597U, 222898021U, 222703603U, 222513397U, 222320779U, 222128581U, 221936789U, 221745649U, 221553767U, 221359997U, 221169271U, 220977649U, 220785023U, 220592791U, 220400603U, 220207301U, 220014643U, 219822851U, 219630181U, 219437957U, 219245029U, 219053453U, 218861609U, 218669813U, 218477293U, 218283259U, 218092937U, 217902037U, 217708723U, 217515989U, 217323787U, 217133011U, 216939881U, 216748201U, 216554441U, 216362941U, 216171331U, 215979851U, 215787829U, 215595199U, 215402939U, 215211307U, 215019767U, 214829773U, 214638997U, 214447763U, 214255211U, 214063807U, 213871681U, 213679183U, 213484949U, 213293911U, 213101849U, 212911249U, 212719163U, 212526101U, 212335061U, 212143537U, 211951819U, 211758037U, 211566871U, 211375777U, 211184881U, 210993641U, 210801817U, 210609337U, 210416527U, 210224867U, 210032651U, 209840663U, 209650703U, 209460331U, 209269979U, 209078249U, 208885571U, 208694699U, 208503187U, 208309727U, 208118389U, 207925591U, 207734029U, 207542903U, 207352543U, 207161509U, 206968849U, 206778353U, 206587259U, 206395493U, 206205443U, 206012971U, 205821611U, 205629667U, 205438339U, 205246957U, 205056107U, 204863557U, 204673607U, 204481997U, 204291247U, 204098737U, 203907721U, 203717797U, 203524921U, 203334251U, 203142649U, 202952569U, 202762199U, 202569253U, 202376893U, 202185367U, 201993299U, 201804233U, 201612913U, 201420629U, 201230069U, 201038863U, 200847253U, 200655667U, 200466187U, 200271727U, 200082481U, 199893791U, 199701701U, 199509859U, 199319431U, 199128547U, 198937253U, 198745559U, 198554557U, 198365039U, 198174583U, 197981587U, 197790517U, 197598103U, 197405587U, 197214601U, 197022479U, 196832221U, 196641343U, 196450417U, 196258003U, 196065559U, 195875749U, 195684091U, 195493957U, 195301861U, 195110033U, 194920021U, 194730253U, 194538937U, 194348221U, 194157839U, 193967047U, 193777123U, 193586951U, 193397299U, 193205863U, 193014079U, 192823493U, 192634577U, 192444121U, 192253307U, 192063899U, 191872073U, 191680613U, 191488183U, 191296309U, 191105209U, 190913759U, 190722271U, 190531303U, 190340209U, 190148869U, 189959467U, 189768749U, 189578791U, 189386867U, 189195871U, 189006953U, 188817067U, 188626177U, 188434369U, 188243597U, 188051989U, 187862693U, 187672487U, 187479947U, 187290289U, 187101599U, 186909721U, 186718979U, 186529927U, 186340093U, 186149101U, 185957879U, 185767973U, 185576759U, 185386519U, 185196007U, 185006201U, 184815809U, 184626997U, 184437511U, 184248707U, 184057999U, 183868519U, 183677189U, 183489073U, 183299393U, 183108421U, 182919001U, 182726549U, 182535739U, 182343781U, 182154179U, 181962689U, 181771903U, 181582549U, 181390861U, 181200457U, 181010399U, 180818789U, 180628141U, 180437107U, 180246329U, 180056753U, 179865403U, 179677123U, 179488103U, 179298667U, 179108591U, 178917853U, 178729183U, 178538917U, 178348147U, 178156337U, 177967877U, 177779429U, 177589199U, 177399011U, 177208567U, 177020047U, 176829997U, 176641147U, 176450971U, 176261209U, 176070889U, 175881457U, 175690829U, 175501171U, 175312391U, 175124483U, 174934229U, 174744569U, 174553387U, 174362887U, 174173123U, 173984141U, 173793853U, 173603611U, 173414587U, 173225827U, 173036407U, 172846613U, 172655837U, 172466647U, 172276381U, 172087627U, 171897619U, 171708997U, 171518131U, 171328837U, 171140153U, 170951563U, 170762941U, 170571809U, 170381957U, 170191919U, 170004691U, 169814977U, 169624019U, 169434773U, 169248449U, 169058089U, 168869417U, 168679261U, 168490577U, 168301619U, 168112519U, 167921771U, 167733523U, 167543461U, 167355193U, 167165281U, 166977197U, 166787039U, 166597537U, 166409207U, 166221217U, 166031297U, 165842861U, 165653129U, 165462509U, 165272743U, 165083201U, 164893327U, 164702893U, 164514887U, 164325341U, 164135749U, 163945493U, 163758097U, 163569001U, 163380533U, 163193077U, 163003367U, 162815113U, 162625381U, 162435659U, 162247079U, 162058889U, 161868769U, 161679187U, 161490583U, 161299297U, 161109331U, 160920703U, 160733017U, 160544453U, 160355989U, 160166753U, 159978367U, 159790819U, 159601727U, 159412639U, 159223517U, 159034937U, 158847659U, 158657761U, 158466983U, 158277827U, 158087929U, 157899923U, 157711129U, 157521739U, 157333247U, 157144913U, 156955559U, 156766583U, 156578579U, 156389789U, 156200969U, 156012877U, 155824663U, 155635999U, 155449181U, 155259329U, 155071097U, 154882151U, 154692103U, 154504913U, 154316737U, 154127989U, 153937877U, 153750617U, 153563087U, 153374737U, 153184901U, 152998253U, 152808611U, 152622137U, 152433731U, 152244559U, 152054831U, 151864819U, 151676659U, 151488713U, 151299593U, 151112447U, 150922319U, 150734347U, 150543803U, 150355943U, 150167639U, 149979413U, 149790647U, 149602613U, 149414519U, 149226059U, 149036633U, 148848053U, 148660459U, 148473037U, 148284233U, 148095697U, 147908051U, 147719849U, 147530927U, 147342497U, 147154583U, 146967131U, 146779973U, 146592161U, 146404283U, 146215987U, 146028829U, 145840997U, 145653953U, 145465849U, 145277879U, 145088759U, 144900647U, 144710743U, 144522883U, 144335641U, 144148133U, 143960009U, 143772731U, 143584663U, 143397817U, 143211583U, 143023403U, 142836769U, 142649069U, 142460501U, 142273903U, 142086817U, 141901079U, 141713353U, 141526009U, 141337631U, 141150731U, 140963029U, 140773079U, 140585771U, 140397097U, 140208613U, 140020883U, 139833637U, 139647301U, 139459559U, 139273223U, 139084727U, 138896581U, 138710941U, 138523223U, 138335569U, 138146971U, 137958407U, 137770219U, 137581757U, 137396477U, 137209543U, 137020991U, 136832713U, 136645373U, 136459727U, 136273777U, 136085947U, 135898517U, 135710527U, 135521381U, 135334181U, 135146093U, 134959613U, 134773459U, 134586799U, 134399621U, 134213483U, 134026553U, 133838149U, 133651027U, 133462151U, 133276543U, 133087957U, 132901367U, 132714497U, 132526507U, 132339761U, 132152729U, 131965111U, 131777039U, 131591081U, 131403011U, 131217089U, 131030267U, 130844327U, 130658131U, 130471373U, 130284131U, 130096721U, 129908039U, 129720413U, 129533941U, 129348269U, 129161959U, 128974297U, 128787667U, 128603047U, 128417117U, 128229061U, 128042461U, 127856539U, 127670819U, 127482731U, 127296359U, 127108343U, 126923837U, 126736237U, 126549919U, 126363241U, 126176537U, 125990521U, 125804839U, 125619577U, 125431459U, 125245501U, 125059483U, 124873351U, 124686977U, 124499801U, 124313051U, 124128931U, 123941581U, 123756023U, 123570427U, 123384229U, 123198661U, 123012431U, 122825713U, 122640377U, 122453621U, 122265487U, 122079197U, 121893817U, 121707613U, 121521013U, 121334561U, 121148387U, 120964253U, 120777233U, 120590153U, 120403117U, 120216113U, 120030817U, 119846431U, 119659843U, 119473723U, 119288087U, 119101837U, 118913621U, 118726159U, 118540469U, 118355789U, 118168691U, 117983309U, 117797447U, 117610693U, 117426377U, 117239467U, 117053617U, 116868613U, 116680763U, 116495963U, 116310731U, 116124461U, 115940059U, 115755071U, 115570151U, 115383889U, 115197619U, 115012217U, 114826507U, 114639611U, 114453901U, 114268459U, 114083461U, 113896997U, 113710601U, 113523551U, 113337607U, 113151163U, 112968187U, 112781413U, 112597567U, 112410863U, 112224869U, 112041313U, 111856057U, 111671939U, 111485417U, 111300359U, 111113659U, 110927723U, 110742817U, 110558197U, 110373097U, 110185429U, 110000207U, 109816123U, 109631227U, 109445953U, 109261027U, 109076729U, 108891301U, 108706319U, 108520781U, 108338011U, 108154273U, 107969483U, 107783167U, 107599229U, 107414033U, 107229569U, 107045951U, 106860881U, 106674979U, 106491023U, 106305917U, 106121371U, 105936421U, 105751201U, 105566597U, 105380491U, 105195661U, 105011527U, 104826877U, 104640791U, 104456647U, 104271161U, 104088581U, 103905899U, 103720889U, 103535363U, 103351607U, 103166803U, 102982193U, 102797509U, 102611801U, 102428533U, 102245177U, 102061153U, 101878417U, 101693441U, 101508191U, 101324557U, 101140019U, 100957291U, 100772813U, 100587523U, 100402817U, 100217561U, 100034317U, 99851249U, 99665549U, 99482633U, 99298943U, 99112829U, 98929081U, 98743261U, 98558099U, 98374879U, 98191759U, 98006033U, 97821839U, 97638559U, 97456841U, 97272631U, 97087433U, 96904513U, 96719809U, 96537893U, 96353401U, 96168011U, 95983787U, 95801747U, 95616853U, 95433263U, 95249807U, 95066039U, 94883111U, 94700833U, 94516717U, 94333933U, 94149721U, 93966659U, 93784181U, 93599687U, 93415661U, 93232427U, 93049301U, 92863711U, 92681111U, 92497303U, 92313943U, 92129753U, 91947211U, 91761893U, 91580219U, 91395749U, 91213127U, 91030321U, 90846887U, 90664879U, 90480161U, 90297667U, 90115583U, 89933297U, 89749379U, 89564353U, 89380243U, 89196911U, 89014231U, 88831753U, 88648711U, 88464433U, 88281301U, 88099309U, 87918041U, 87735311U, 87551473U, 87368143U, 87185521U, 87002527U, 86819059U, 86635727U, 86454139U, 86271967U, 86087539U, 85905473U, 85723789U, 85539823U, 85358417U, 85175957U, 84992489U, 84809147U, 84626603U, 84444043U, 84260999U, 84077507U, 83895419U, 83714789U, 83531321U, 83348579U, 83165221U, 82982057U, 82800373U, 82619401U, 82436671U, 82253887U, 82070687U, 81889261U, 81706409U, 81524419U, 81342557U, 81159839U, 80980007U, 80798779U, 80617753U, 80435371U, 80253763U, 80072779U, 79888511U, 79706771U, 79525021U, 79343701U, 79161149U, 78979279U, 78796441U, 78615211U, 78433877U, 78250223U, 78068383U, 77887133U, 77705807U, 77523223U, 77341399U, 77159333U, 76977959U, 76797257U, 76614667U, 76431583U, 76249919U, 76067633U, 75886747U, 75706193U, 75523937U, 75343739U, 75163607U, 74982307U, 74800723U, 74619133U, 74438183U, 74256739U, 74075017U, 73892317U, 73710739U, 73531123U, 73349173U, 73168181U, 72986443U, 72806519U, 72624863U, 72443671U, 72262847U, 72083749U, 71902819U, 71721367U, 71540317U, 71360867U, 71180273U, 70999073U, 70818323U, 70636019U, 70455323U, 70275589U, 70095271U, 69913423U, 69732599U, 69552737U, 69373621U, 69192857U, 69011251U, 68831857U, 68650541U, 68469409U, 68288557U, 68108351U, 67927511U, 67746827U, 67567627U, 67387867U, 67208347U, 67028069U, 66848311U, 66666751U, 66487507U, 66307727U, 66128837U, 65950439U, 65770451U, 65589409U, 65410649U, 65230259U, 65049041U, 64870343U, 64688747U, 64507787U, 64327903U, 64147561U, 63968063U, 63789757U, 63610199U, 63430931U, 63251467U, 63071809U, 62892839U, 62713073U, 62532517U, 62352571U, 62173597U, 61994887U, 61815977U, 61636231U, 61456183U, 61275419U, 61094951U, 60915853U, 60737837U, 60559241U, 60379751U, 60201523U, 60021539U, 59841973U, 59663497U, 59484767U, 59305187U, 59125333U, 58945219U, 58767607U, 58589033U, 58410523U, 58231967U, 58052879U, 57873817U, 57694499U, 57514829U, 57335981U, 57158411U, 56980423U, 56800753U, 56624527U, 56446043U, 56266219U, 56088649U, 55910791U, 55732351U, 55555231U, 55376369U, 55197721U, 55019897U, 54841331U, 54662059U, 54485107U, 54306403U, 54126781U, 53949167U, 53770853U, 53593171U, 53413639U, 53235829U, 53058007U, 52880033U, 52702613U, 52525171U, 52347107U, 52168973U, 51990767U, 51813187U, 51636499U, 51458861U, 51281453U, 51104257U, 50925361U, 50748149U, 50570687U, 50394067U, 50216953U, 50039263U, 49861883U, 49684643U, 49508111U, 49332421U, 49155797U, 48978451U, 48802009U, 48623479U, 48446927U, 48269713U, 48092383U, 47913799U, 47737211U, 47559517U, 47382877U, 47205551U, 47028899U, 46852483U, 46675831U, 46499939U, 46323493U, 46146389U, 45969251U, 45792757U, 45616187U, 45441163U, 45266317U, 45089893U, 44914523U, 44738009U, 44563219U, 44387113U, 44210707U, 44034449U, 43858921U, 43682351U, 43505453U, 43330681U, 43154911U, 42978773U, 42801313U, 42625673U, 42449963U, 42274433U, 42100169U, 41923451U, 41748299U, 41572033U, 41396093U, 41219881U, 41044891U, 40868299U, 40695289U, 40518707U, 40343419U, 40168781U, 39994211U, 39817907U, 39642653U, 39468991U, 39294637U, 39120883U, 38945273U, 38772131U, 38597917U, 38422801U, 38249219U, 38075273U, 37901167U, 37725713U, 37551001U, 37377479U, 37201921U, 37029367U, 36854551U, 36679801U, 36505093U, 36330773U, 36157423U, 35984339U, 35809141U, 35635627U, 35461177U, 35287939U, 35114207U, 34939903U, 34767391U, 34591933U, 34418939U, 34244071U, 34069129U, 33893689U, 33721511U, 33548077U, 33374401U, 33202313U, 33028577U, 32856277U, 32682743U, 32509907U, 32337311U, 32163991U, 31991731U, 31819127U, 31646471U, 31473479U, 31300459U, 31127519U, 30953453U, 30781319U, 30609311U, 30437177U, 30265159U, 30092813U, 29922733U, 29750759U, 29579519U, 29406439U, 29235953U, 29062879U, 28890787U, 28718537U, 28546591U, 28374859U, 28204291U, 28031611U, 27861667U, 27689833U, 27518653U, 27347557U, 27174779U, 27004343U, 26834293U, 26662327U, 26491921U, 26321989U, 26150171U, 25979521U, 25809083U, 25638607U, 25468039U, 25298069U, 25124909U, 24955681U, 24783713U, 24614839U, 24444313U, 24274847U, 24105251U, 23935453U, 23765431U, 23595163U, 23425559U, 23256053U, 23085833U, 22916461U, 22747187U, 22578419U, 22409393U, 22239713U, 22068143U, 21900377U, 21731779U, 21563219U, 21394229U, 21226157U, 21056153U, 20887649U, 20718781U, 20551697U, 20382253U, 20213983U, 20045197U, 19878041U, 19710289U, 19541903U, 19374079U, 19206023U, 19038311U, 18870161U, 18703387U, 18536303U, 18368221U, 18201941U, 18033391U, 17866619U, 17699107U, 17532169U, 17366749U, 17201039U, 17032781U, 16867867U, 16702099U, 16535639U, 16369853U, 16203367U, 16036523U, 15870383U, 15705071U, 15539987U, 15374041U, 15208997U, 15042919U, 14876951U, 14712427U, 14547283U, 14382007U, 14218571U, 14053619U, 13887953U, 13724233U, 13560847U, 13395559U, 13231343U, 13067423U, 12902137U, 12738433U, 12575881U, 12411409U, 12249493U, 12086059U, 11923057U, 11760059U, 11597701U, 11435887U, 11272697U, 11109827U, 10947941U, 10786267U, 10624787U, 10463443U, 10302407U, 10140307U, 9979111U, 9817057U, 9655759U, 9495601U, 9334487U, 9174793U, 9014101U, 8853359U, 8693653U, 8534489U, 8375273U, 8215633U, 8056423U, 7896949U, 7738559U, 7580459U, 7421383U, 7263143U, 7104341U, 6947753U, 6791437U, 6633877U, 6477301U, 6319483U, 6163567U, 6007247U, 5851717U, 5695831U, 5539363U, 5383601U, 5229331U, 5074633U, 4920613U, 4766999U, 4613237U, 4459951U, 4307453U, 4154791U, 4002547U, 3849943U, 3698881U, 3548471U, 3396661U, 3246119U, 3097141U, 2948161U, 2799451U, 2650931U, 2503597U, 2356573U, 2209499U, 2063573U, 1918439U, 1774937U, 1630987U, 1488133U, 1346567U, 1205653U, 1066909U, 927853U, 791447U, 656683U, 523417U, 393073U, 266083U, 143687U }; tree-puzzle-5.2/src/sprng/interface.h0000644000076400001440000000273107756425572013406 #ifndef _interface_h_ #define _interface_h_ #ifndef ANSI_ARGS #ifdef __STDC__ #define ANSI_ARGS(args) args #else #define ANSI_ARGS(args) () #endif #endif #ifdef __cplusplus extern "C" { #endif int get_rn_int ANSI_ARGS((int *igenptr)); float get_rn_flt ANSI_ARGS((int *igenptr)); double get_rn_dbl ANSI_ARGS((int *igenptr)); int *init_rng ANSI_ARGS(( int gennum, int total_gen, int seed, int mult)); int spawn_rng ANSI_ARGS((int *igenptr, int nspawned, int ***newgens, int checkid) ); int make_new_seed ANSI_ARGS((void)); int make_new_seed_mpi ANSI_ARGS((void)); int get_seed__rng ANSI_ARGS((int *genptr)); int free_rng ANSI_ARGS((int *genptr)); int pack_rng ANSI_ARGS(( int *genptr, char **buffer)); int *unpack_rng ANSI_ARGS(( char *packed)); int print_rng ANSI_ARGS(( int *igen)); int *checkID ANSI_ARGS(( int *igen)); int *addID ANSI_ARGS(( int *igen)); int *deleteID ANSI_ARGS(( int *igen)); /* HAS ;-) */ #if 0 int *init_rng_simple ANSI_ARGS(( int seed, int mult)); int *init_rng_simple_mpi ANSI_ARGS(( int seed, int mult)); int get_rn_int_simple ANSI_ARGS((void)); int get_rn_int_simple_mpi ANSI_ARGS((void)); float get_rn_flt_simple ANSI_ARGS((void)); float get_rn_flt_simple_mpi ANSI_ARGS((void)); double get_rn_dbl_simple ANSI_ARGS((void)); double get_rn_dbl_simple_mpi ANSI_ARGS((void)); int pack_rng_simple ANSI_ARGS((char **buffer)); int *unpack_rng_simple ANSI_ARGS(( char *packed)); int print_rng_simple ANSI_ARGS((void)); #endif #ifdef __cplusplus } #endif #endif tree-puzzle-5.2/src/sprng/primelist-lcg.h0000644000076400001440000004136507755105712014215 #define PRIMELISTSIZE1 1000 #define STEP 1000 #define PRIMELISTSIZE2 1778 int prime_list[PRIMELISTSIZE2] = { 11863279, 11863259, 11863253, 11863249, 11863237, 11863213, 11863207, 11863183, 11863171, 11863153, 11863151, 11863133, 11863121, 11863109, 11863099, 11863073, 11863067, 11863057, 11863039, 11863037, 11863031, 11863021, 11862989, 11862979, 11862959, 11862919, 11862911, 11862881, 11862869, 11862857, 11862839, 11862803, 11862791, 11862761, 11862713, 11862703, 11862701, 11862679, 11862673, 11862661, 11862623, 11862611, 11862581, 11862577, 11862569, 11862563, 11862547, 11862527, 11862493, 11862469, 11862439, 11862391, 11862373, 11862343, 11862317, 11862313, 11862307, 11862293, 11862271, 11862269, 11862259, 11862241, 11862239, 11862233, 11862229, 11862223, 11862217, 11862203, 11862199, 11862167, 11862157, 11862083, 11862049, 11862031, 11862029, 11862013, 11862007, 11861987, 11861959, 11861953, 11861921, 11861917, 11861887, 11861879, 11861873, 11861849, 11861827, 11861819, 11861803, 11861791, 11861749, 11861713, 11861711, 11861701, 11861693, 11861687, 11861683, 11861671, 11861659, 11861639, 11861627, 11861611, 11861599, 11861581, 11861579, 11861573, 11861569, 11861539, 11861527, 11861467, 11861441, 11861429, 11861413, 11861411, 11861407, 11861401, 11861371, 11861363, 11861357, 11861351, 11861327, 11861303, 11861299, 11861293, 11861273, 11861237, 11861231, 11861221, 11861219, 11861197, 11861191, 11861167, 11861159, 11861141, 11861131, 11861107, 11861099, 11861093, 11861089, 11861081, 11861071, 11861033, 11861011, 11860993, 11860973, 11860963, 11860897, 11860867, 11860859, 11860837, 11860811, 11860789, 11860787, 11860777, 11860753, 11860741, 11860727, 11860703, 11860699, 11860697, 11860691, 11860687, 11860669, 11860661, 11860649, 11860643, 11860637, 11860627, 11860619, 11860613, 11860573, 11860547, 11860517, 11860489, 11860487, 11860483, 11860477, 11860469, 11860411, 11860397, 11860379, 11860327, 11860267, 11860243, 11860231, 11860223, 11860207, 11860171, 11860151, 11860133, 11860109, 11860103, 11860097, 11860087, 11860081, 11860049, 11860039, 11860031, 11860021, 11859997, 11859989, 11859979, 11859961, 11859929, 11859923, 11859917, 11859907, 11859901, 11859893, 11859889, 11859877, 11859853, 11859847, 11859833, 11859821, 11859817, 11859791, 11859751, 11859739, 11859719, 11859713, 11859707, 11859643, 11859611, 11859583, 11859571, 11859569, 11859563, 11859541, 11859539, 11859509, 11859503, 11859487, 11859481, 11859473, 11859461, 11859457, 11859451, 11859433, 11859427, 11859383, 11859377, 11859371, 11859359, 11859349, 11859311, 11859307, 11859293, 11859269, 11859247, 11859241, 11859233, 11859187, 11859179, 11859167, 11859163, 11859157, 11859151, 11859139, 11859137, 11859109, 11859101, 11859083, 11859079, 11859077, 11859073, 11859061, 11859049, 11859031, 11859017, 11858989, 11858971, 11858969, 11858953, 11858947, 11858921, 11858897, 11858893, 11858851, 11858839, 11858813, 11858807, 11858801, 11858783, 11858779, 11858747, 11858729, 11858723, 11858719, 11858701, 11858683, 11858659, 11858657, 11858629, 11858599, 11858597, 11858579, 11858573, 11858569, 11858557, 11858551, 11858543, 11858533, 11858479, 11858447, 11858443, 11858423, 11858387, 11858381, 11858377, 11858359, 11858323, 11858311, 11858291, 11858281, 11858279, 11858269, 11858267, 11858243, 11858227, 11858201, 11858177, 11858159, 11858149, 11858131, 11858101, 11858059, 11858057, 11858051, 11858039, 11858029, 11858023, 11858017, 11857999, 11857991, 11857969, 11857931, 11857913, 11857907, 11857889, 11857883, 11857877, 11857873, 11857837, 11857831, 11857819, 11857817, 11857801, 11857793, 11857787, 11857777, 11857763, 11857759, 11857753, 11857751, 11857711, 11857709, 11857697, 11857693, 11857667, 11857661, 11857613, 11857591, 11857589, 11857543, 11857529, 11857523, 11857519, 11857499, 11857493, 11857481, 11857477, 11857457, 11857453, 11857451, 11857423, 11857409, 11857393, 11857369, 11857367, 11857361, 11857333, 11857331, 11857327, 11857303, 11857291, 11857267, 11857249, 11857243, 11857217, 11857193, 11857151, 11857147, 11857127, 11857123, 11857099, 11857093, 11857091, 11857081, 11857073, 11857067, 11857061, 11857049, 11857039, 11857037, 11857033, 11857003, 11856979, 11856953, 11856947, 11856919, 11856899, 11856883, 11856877, 11856857, 11856841, 11856821, 11856811, 11856763, 11856731, 11856727, 11856709, 11856697, 11856673, 11856659, 11856653, 11856641, 11856629, 11856583, 11856553, 11856547, 11856541, 11856517, 11856511, 11856479, 11856473, 11856469, 11856461, 11856419, 11856409, 11856373, 11856371, 11856359, 11856343, 11856329, 11856311, 11856307, 11856287, 11856281, 11856269, 11856239, 11856223, 11856199, 11856193, 11856179, 11856161, 11856151, 11856139, 11856113, 11856107, 11856101, 11856071, 11856049, 11856023, 11856001, 11855999, 11855993, 11855989, 11855959, 11855933, 11855911, 11855903, 11855881, 11855869, 11855839, 11855827, 11855813, 11855773, 11855759, 11855747, 11855743, 11855737, 11855731, 11855713, 11855699, 11855689, 11855687, 11855653, 11855633, 11855593, 11855581, 11855567, 11855551, 11855549, 11855531, 11855521, 11855507, 11855491, 11855489, 11855413, 11855407, 11855387, 11855383, 11855381, 11855359, 11855357, 11855353, 11855351, 11855339, 11855329, 11855321, 11855309, 11855303, 11855269, 11855267, 11855231, 11855219, 11855213, 11855177, 11855159, 11855149, 11855147, 11855141, 11855111, 11855033, 11855023, 11855017, 11855003, 11854979, 11854961, 11854937, 11854919, 11854901, 11854897, 11854891, 11854883, 11854877, 11854873, 11854853, 11854847, 11854813, 11854793, 11854757, 11854709, 11854691, 11854681, 11854607, 11854603, 11854573, 11854571, 11854567, 11854529, 11854523, 11854519, 11854517, 11854489, 11854477, 11854463, 11854441, 11854439, 11854433, 11854429, 11854411, 11854399, 11854379, 11854363, 11854333, 11854331, 11854327, 11854279, 11854267, 11854261, 11854211, 11854169, 11854163, 11854159, 11854147, 11854061, 11854057, 11854019, 11854009, 11854001, 11853991, 11853979, 11853943, 11853931, 11853899, 11853893, 11853889, 11853883, 11853869, 11853857, 11853847, 11853839, 11853817, 11853791, 11853773, 11853761, 11853757, 11853731, 11853719, 11853689, 11853679, 11853649, 11853629, 11853617, 11853613, 11853601, 11853571, 11853557, 11853529, 11853463, 11853451, 11853449, 11853427, 11853421, 11853419, 11853383, 11853367, 11853329, 11853323, 11853319, 11853241, 11853227, 11853221, 11853217, 11853203, 11853181, 11853161, 11853157, 11853133, 11853031, 11853019, 11853001, 11852989, 11852969, 11852959, 11852957, 11852921, 11852917, 11852891, 11852879, 11852873, 11852857, 11852837, 11852833, 11852831, 11852809, 11852807, 11852803, 11852773, 11852767, 11852759, 11852741, 11852719, 11852717, 11852663, 11852657, 11852647, 11852641, 11852623, 11852611, 11852609, 11852591, 11852579, 11852573, 11852557, 11852539, 11852537, 11852531, 11852513, 11852473, 11852459, 11852437, 11852369, 11852359, 11852341, 11852339, 11852327, 11852311, 11852303, 11852297, 11852293, 11852287, 11852279, 11852273, 11852263, 11852251, 11852237, 11852221, 11852209, 11852177, 11852171, 11852161, 11852147, 11852129, 11852089, 11852083, 11852059, 11852053, 11852051, 11852017, 11851997, 11851967, 11851949, 11851933, 11851927, 11851919, 11851909, 11851891, 11851867, 11851859, 11851841, 11851813, 11851799, 11851793, 11851787, 11851759, 11851753, 11851681, 11851673, 11851639, 11851621, 11851613, 11851603, 11851597, 11851591, 11851589, 11851577, 11851559, 11851549, 11851547, 11851529, 11851523, 11851519, 11851493, 11851481, 11851451, 11851447, 11851409, 11851403, 11851373, 11851361, 11851351, 11851349, 11851313, 11851303, 11851291, 11851219, 11851201, 11851181, 11851157, 11851139, 11851127, 11851123, 11851109, 11851093, 11851067, 11851051, 11851033, 11850997, 11850991, 11850983, 11850961, 11850953, 11850947, 11850941, 11850931, 11850919, 11850913, 11850907, 11850899, 11850877, 11850859, 11850829, 11850803, 11850791, 11850749, 11850739, 11850731, 11850701, 11850677, 11850667, 11850611, 11850607, 11850557, 11850541, 11850529, 11850511, 11850481, 11850469, 11850427, 11850407, 11850379, 11850373, 11850367, 11850347, 11850341, 11850283, 11850269, 11850259, 11850247, 11850233, 11850191, 11850169, 11850161, 11850133, 11850127, 11850121, 11850109, 11850103, 11850077, 11850073, 11850061, 11850049, 11850031, 11850023, 11850019, 11850011, 11850001, 11849987, 11849947, 11849933, 11849923, 11849909, 11849891, 11849881, 11849869, 11849813, 11849801, 11849791, 11849771, 11849767, 11849759, 11849743, 11849741, 11849723, 11849713, 11849707, 11849701, 11849699, 11849693, 11849689, 11849683, 11849671, 11849659, 11849653, 11849641, 11849633, 11849599, 11849587, 11849573, 11849569, 11849567, 11849557, 11849507, 11849503, 11849491, 11849473, 11849443, 11849437, 11849417, 11849413, 11849401, 11849399, 11849363, 11849359, 11849339, 11849309, 11849297, 11849291, 11849273, 11849269, 11849251, 11849249, 11849239, 11849237, 11849231, 11849203, 11849183, 11849177, 11849137, 11849129, 11849111, 11849107, 11849093, 11849087, 11849077, 11849069, 11849059, 11849053, 11849039, 11849021, 11848961, 11848937, 11848931, 11848919, 11848909, 11848873, 11848867, 11848861, 11848853, 11848829, 11848801, 11848787, 11848757, 11848751, 11848741, 11848729, 11848721, 11848717, 11848709, 11848691, 11848679, 11848673, 11848663, 11848637, 11848619, 11848601, 11848591, 11848589, 11848553, 11848537, 11848531, 11848523, 11848513, 11848493, 11848489, 11848477, 11848469, 11848451, 11848433, 11848393, 11848379, 11848373, 11848363, 11848351, 11848339, 11848313, 11848297, 11848271, 11848253, 11848247, 11848241, 11848237, 11848219, 11848181, 11848159, 11848157, 11848147, 11848129, 11848117, 11848093, 11848069, 11848043, 11848027, 11848021, 11847977, 11847961, 11847949, 11847907, 11847883, 11847877, 11847853, 11847799, 11847791, 11847761, 11847749, 11847721, 11847701, 11847653, 11847643, 11847637, 11847629, 11847607, 11847593, 11847587, 11847581, 11847571, 11847569, 11847533, 11847529, 11847527, 11847523, 11847499, 11847497, 11847467, 11847463, 11847427, 11847397, 11847391, 11847373, 11847347, 11847343, 11847299, 11847281, 11847271, 11847263, 11847257, 11847233, 11830253, 11814059, 11797861, 11781907, 11765609, 11749061, 11732887, 11716381, 11699993, 11684149, 11667269, 11651309, 11634739, 11618281, 11602949, 11586493, 11570407, 11554009, 11538067, 11522363, 11505511, 11489431, 11472817, 11457029, 11441081, 11424467, 11408317, 11392207, 11375563, 11359163, 11343187, 11326423, 11310521, 11293801, 11278019, 11261317, 11245081, 11228929, 11212433, 11196127, 11179907, 11163877, 11148019, 11131741, 11114879, 11098937, 11082817, 11066729, 11050939, 11034811, 11018591, 11001821, 10985479, 10969193, 10953181, 10937063, 10921171, 10904617, 10888811, 10872223, 10856141, 10840157, 10824139, 10807817, 10791629, 10775437, 10758619, 10742231, 10726003, 10709957, 10693897, 10677893, 10662257, 10646191, 10629929, 10613903, 10597597, 10581289, 10565047, 10549031, 10533073, 10516343, 10500547, 10484483, 10468361, 10452551, 10436291, 10420139, 10403951, 10388171, 10371899, 10356113, 10339639, 10323751, 10307537, 10291129, 10274821, 10259153, 10243201, 10226893, 10210831, 10194593, 10178017, 10161439, 10145197, 10129397, 10113241, 10097149, 10080997, 10064671, 10048859, 10033087, 10017113, 10000987, 9984587, 9968117, 9951703, 9935437, 9919439, 9903083, 9887179, 9870853, 9854791, 9838123, 9821809, 9805793, 9790177, 9774007, 9757703, 9741377, 9725707, 9709379, 9693031, 9677027, 9661009, 9645131, 9628939, 9613127, 9596597, 9581053, 9565291, 9548909, 9533023, 9516809, 9500993, 9484931, 9468793, 9452269, 9436439, 9419909, 9403967, 9387671, 9371371, 9355471, 9339569, 9323669, 9307513, 9291539, 9275377, 9259109, 9243281, 9227321, 9211759, 9195671, 9179591, 9163981, 9147521, 9131957, 9115709, 9099589, 9083521, 9067631, 9051563, 9035357, 9019259, 9002717, 8986751, 8970821, 8954321, 8938301, 8922611, 8907077, 8890823, 8874659, 8858677, 8842541, 8826221, 8810147, 8794081, 8778299, 8762357, 8746637, 8730467, 8714551, 8698813, 8683159, 8666773, 8651117, 8635049, 8618861, 8603183, 8587127, 8571509, 8555317, 8539747, 8523787, 8508217, 8492329, 8476723, 8460533, 8444671, 8428289, 8412169, 8396111, 8380237, 8364329, 8348107, 8332547, 8316449, 8300603, 8284447, 8268907, 8252551, 8236729, 8220881, 8205163, 8189123, 8173427, 8157343, 8141753, 8125373, 8109887, 8093707, 8077463, 8061421, 8045669, 8029717, 8013701, 7997623, 7981837, 7965871, 7949731, 7934089, 7918123, 7902269, 7886297, 7870657, 7854667, 7839269, 7823279, 7807549, 7791857, 7775479, 7759813, 7743737, 7727477, 7711741, 7695707, 7680181, 7664311, 7648439, 7632511, 7616881, 7601081, 7585639, 7569469, 7553437, 7537903, 7521949, 7505863, 7489847, 7474381, 7457993, 7442333, 7426421, 7410857, 7394873, 7378687, 7363123, 7347521, 7331309, 7315673, 7299493, 7283833, 7268039, 7252381, 7236821, 7220921, 7204891, 7189333, 7173233, 7157429, 7141759, 7125413, 7109423, 7094023, 7078283, 7062529, 7046581, 7031281, 7015973, 6999823, 6984193, 6968123, 6952441, 6937027, 6921281, 6905713, 6889789, 6874223, 6858913, 6843289, 6827543, 6811877, 6796591, 6780271, 6764353, 6748897, 6733171, 6717493, 6702197, 6686663, 6670709, 6654877, 6639049, 6622999, 6607379, 6591811, 6576307, 6560669, 6545171, 6529403, 6513613, 6498169, 6482407, 6466487, 6451087, 6435179, 6419299, 6403739, 6388061, 6371879, 6355963, 6340043, 6324401, 6308737, 6293681, 6278309, 6262721, 6247243, 6231497, 6215617, 6199847, 6184289, 6168353, 6152869, 6137477, 6121681, 6105949, 6090569, 6074779, 6058963, 6043417, 6027277, 6011899, 5996687, 5981071, 5965021, 5949313, 5933713, 5918293, 5903251, 5887631, 5872549, 5856709, 5841373, 5825711, 5809861, 5794457, 5778673, 5762759, 5747227, 5731463, 5716021, 5700451, 5685413, 5669803, 5654083, 5638103, 5622731, 5607149, 5591459, 5575601, 5560327, 5544613, 5529079, 5513267, 5497711, 5481989, 5466217, 5450773, 5435533, 5420083, 5404433, 5388689, 5373607, 5357903, 5342327, 5327041, 5311511, 5295839, 5280367, 5264821, 5249411, 5234237, 5218721, 5203477, 5188123, 5172227, 5156839, 5141117, 5125871, 5110561, 5094841, 5079493, 5064119, 5048741, 5033053, 5017637, 5001923, 4986439, 4971409, 4956151, 4940843, 4925419, 4909859, 4894753, 4879937, 4864511, 4849081, 4833989, 4818287, 4803031, 4787569, 4771999, 4756649, 4740979, 4725673, 4710373, 4695079, 4679813, 4664641, 4649119, 4633693, 4618307, 4603031, 4587589, 4572383, 4556933, 4541819, 4526363, 4510687, 4495079, 4480183, 4464877, 4449617, 4434811, 4419773, 4404679, 4389223, 4373647, 4358659, 4342991, 4327621, 4312381, 4297201, 4281481, 4265903, 4250777, 4235411, 4220207, 4204903, 4189583, 4174601, 4159471, 4144267, 4128763, 4113127, 4097957, 4082909, 4067741, 4052383, 4037521, 4022587, 4007447, 3992159, 3976481, 3961229, 3945919, 3930611, 3915761, 3900509, 3885691, 3870299, 3854969, 3839923, 3824591, 3809959, 3794941, 3779443, 3764311, 3748879, 3733397, 3718837, 3703643, 3688757, 3673793, 3658769, 3643331, 3628057, 3613201, 3598691, 3583757, 3568259, 3553453, 3538027, 3522763, 3507587, 3492287, 3476783, 3461291, 3445801, 3431353, 3416267, 3401509, 3386563, 3371419, 3356389, 3341101, 3325991, 3311051, 3295883, 3280759, 3265861, 3250837, 3235819, 3220967, 3206311, 3191603, 3176821, 3162059, 3147101, 3131761, 3117031, 3102371, 3087239, 3072533, 3057647, 3042493, 3027347, 3012137, 2997509, 2982583, 2967647, 2952629, 2937611, 2922677, 2907871, 2892973, 2877899, 2862917, 2847893, 2833211, 2818451, 2804027, 2789327, 2774309, 2759621, 2744551, 2729563, 2714629, 2699903, 2685323, 2670533, 2655571, 2641063, 2626307, 2611597, 2596501, 2581697, 2567447, 2552657, 2537779, 2523163, 2508281, 2493767, 2478937, 2464009, 2449417, 2434681, 2419793, 2405069, 2390207, 2375921, 2361167, 2346473, 2331689, 2316593, 2301709, 2287249, 2272241, 2258083, 2243551, 2228797, 2214161, 2199623, 2184779, 2170153, 2155603, 2141149, 2126623, 2111933, 2097539, 2082917, 2068201, 2053789, 2038969, 2024417, 2010017, 1995977, 1981523, 1966619, 1952023, 1937657, 1923253, 1908923, 1894127, 1879949, 1865509, 1851503, 1836943, 1822703, 1808071, 1793927, 1779497, 1765187, 1750423, 1736281, 1721659, 1707253, 1692967, 1678429, 1664501, 1650059, 1635317, 1621421, 1606897, 1592881, 1578217, 1563967, 1549577, 1535459, 1520707, 1506497, 1492499, 1478467, 1464173, 1450139, 1435919, 1422163, 1407569, 1393663, 1379321, 1365281, 1351199, 1336997, 1322693, 1308719, 1294483, 1280453, 1266281, 1252469, 1238551, 1224193, 1210369, 1195771, 1181963, 1168231, 1154633, 1140563, 1126693, 1112483, 1099051, 1085023, 1071229, 1057279, 1043201, 1029179, 1015451, 1001821, 988061, 973901, 960293, 946133, 932357, 918677, 905071, 891239, 877469, 864013, 850247, 836477, 822883, 809423, 795737, 782191, 768671, 755309, 741509, 728003, 714563, 701341, 687679, 674363, 660893, 647557, 634031, 620363, 607127, 593899, 580733, 567659, 554167, 540863, 527441, 514561, 501217, 488347, 475283, 462493, 449161, 435889, 423257, 410341, 397223, 384407, 371573, 358471, 345769, 333019, 320317, 307873, 295291, 282427, 269947, 257501, 245083, 232523, 220327, 208049, 195787, 183683, 171673, 159499, 147551, 135649, 123853, 112223, 100547, 89203, 77719, 66587, 55589, 44633, 34019, 23741, 13877, 4733 }; tree-puzzle-5.2/src/sprng/lcg.c0000644000076400001440000005276607756425660012221 /*************************************************************************/ /*************************************************************************/ /* Parallel 48 bit Linear Congruential Generator */ /* */ /* Author: Ashok Srinivasan, */ /* NCSA, University of Illinois, Urbana-Champaign */ /* E-Mail: ashoks@ncsa.uiuc.edu */ /* */ /* Disclaimer: NCSA expressly disclaims any and all warranties, expressed*/ /* or implied, concerning the enclosed software. The intent in sharing */ /* this software is to promote the productive interchange of ideas */ /* throughout the research community. All software is furnished on an */ /* "as is" basis. No further updates to this software should be */ /* expected. Although this may occur, no commitment exists. The authors */ /* certainly invite your comments as well as the reporting of any bugs. */ /* NCSA cannot commit that any or all bugs will be fixed. */ /*************************************************************************/ /*************************************************************************/ /* This is version 0.2, created 13 April 1998 */ #include #include #include #include "memory.h" #include "primes-lcg.h" #include "interface.h" #include #define NDEBUG #include #include "store.h" #define VERSION "00" #define GENTYPE VERSION "48 bit Linear Congruential Generator with Prime Addend" #if LONG_MAX > 2147483647L /* 32 bit integer */ #if LONG_MAX > 35184372088831L /* 46 bit integer */ #if LONG_MAX >= 9223372036854775807L /* 64 bit integer */ #define LONG_SPRNG #define LONG64 long #define store_long64 store_long #define store_long64array store_longarray #define load_long64 load_long #define load_long64array load_longarray #define INIT_SEED 0x2bc68cfe166dL #define MSB_SET 0x3ff0000000000000L #define LSB48 0xffffffffffffL #define AN1 0xdadf0ac00001L #define AN2 0xfefd7a400001L #define AN3 0x6417b5c00001L #define AN4 0xcf9f72c00001L #define AN5 0xbdf07b400001L #define AN6 0xf33747c00001L #define AN7 0xcbe632c00001L #define PMULT1 0xa42c22700000L #define PMULT2 0xfa858cb00000L #define PMULT3 0xd0c4ef00000L #define PMULT4 0xc3cc8e300000L #define PMULT5 0x11bdbe700000L #define PMULT6 0xb0f0e9f00000L #define PMULT7 0x6407de700000L #define MULT1 0x2875a2e7b175L /* 44485709377909 */ #define MULT2 0x5deece66dL /* 1575931494 */ #define MULT3 0x3eac44605265L /* 68909602460261 */ #define MULT4 0x275b38eb4bbdL /* 4327250451645 */ #define MULT5 0x1ee1429cc9f5L /* 33952834046453 */ #define MULT6 0x739a9cb08605L /* 127107890972165 */ #define MULT7 0x3228d7cc25f5L /* 55151000561141 */ #endif #endif #endif #if !defined(LONG_SPRNG) && defined(_LONG_LONG) #define LONG64 long long #define store_long64 store_longlong #define store_long64array store_longlongarray #define load_long64 load_longlong #define load_long64array load_longlongarray #define INIT_SEED 0x2bc68cfe166dLL #define MSB_SET 0x3ff0000000000000LL #define LSB48 0xffffffffffffLL #define AN1 0xdadf0ac00001LL #define AN2 0xfefd7a400001LL #define AN3 0x6417b5c00001LL #define AN4 0xcf9f72c00001LL #define AN5 0xbdf07b400001LL #define AN6 0xf33747c00001LL #define AN7 0xcbe632c00001LL #define PMULT1 0xa42c22700000LL #define PMULT2 0xfa858cb00000LL #define PMULT3 0xd0c4ef00000LL #define PMULT4 0x11bdbe700000LL #define PMULT5 0xc3cc8e300000LL #define PMULT6 0xb0f0e9f00000LL #define PMULT7 0x6407de700000LL #define MULT1 0x2875a2e7b175LL #define MULT2 0x5deece66dLL #define MULT3 0x3eac44605265LL #define MULT4 0x1ee1429cc9f5LL #define MULT5 0x275b38eb4bbdLL #define MULT6 0x739a9cb08605LL #define MULT7 0x3228d7cc25f5LL #endif #define TWO_M24 5.96046447753906234e-8 #define TWO_M48 3.5527136788005008323e-15 #include "multiply.h" #ifdef LittleEndian #define MSB 1 #else #define MSB 0 #endif #define LSB (1-MSB) #define LCGRUNUP 29 int MAX_STREAMS = 1<<19; #ifndef TOOMANY #define TOOMANY "generator has branched maximum number of times;\nindependence of streams cannot be guranteed\n" #endif #ifdef LONG64 struct rngen { unsigned LONG64 seed; int init_seed; int prime; int prime_position; int prime_next; char *gentype; int parameter; unsigned LONG64 multiplier; }; unsigned LONG64 mults[] = {MULT1,MULT2,MULT3,MULT4,MULT5,MULT6,MULT7}; unsigned LONG64 multiplier=0; #else struct rngen { int seed[2]; int init_seed; int prime; int prime_position; int prime_next; char *gentype; int parameter; int *multiplier; }; int mults[][4] = {{0x175,0xe7b,0x5a2,0x287},{0x66d,0xece,0x5de,0x000}, {0x265,0x605,0xc44,0x3ea},{0x9f5,0x9cc,0x142,0x1ee}, {0xbbd,0xeb4,0xb38,0x275},{0x605,0xb08,0xa9c,0x739}, {0x5f5,0xcc2,0x8d7,0x322}}; int *multiplier=NULL; #endif #define NPARAMS 7 int NGENS=0; void plus ANSI_ARGS((int *a, int *b, int *c)); void mult ANSI_ARGS((int *a, int *b, int *c, int size)); void advance_seed ANSI_ARGS((struct rngen *gen)); double get_rn_dbl ANSI_ARGS((int *gen)); #ifdef __STDC__ int bit_reverse(int n) #else int bit_reverse(n) int n; #endif { int i=31, rev=0; for(i=30; i>=0; i--) { rev |= (n&1)<>= 1; } return rev; } #ifdef __STDC__ void errprint(char *level, char *routine, char *error) #else void errprint(level, routine, error) char *level,*routine,*error; #endif { #ifdef CRAY #pragma _CRI guard 63 #endif fprintf(stderr,"%s from %s: %s\n",level,routine,error); #ifdef CRAY #pragma _CRI endguard 63 #endif } #ifdef __STDC__ int strxncmp(char *s1, char *s2, int n) #else int strxncmp(s1, s2, n) char *s1, *s2; int n; #endif { int i; for(i=0; i= MAX_STREAMS) /* check if gen_num is valid */ fprintf(stderr,"WARNING - init_rng: gennum: %d > maximum number of independent streams: %d\n\tIndependence of streams cannot be guranteed.\n", gennum, MAX_STREAMS); if (gennum < 0 || gennum >= total_gen) /* check if gen_num is valid */ { errprint("ERROR","init_rng","gennum out of range. "); return (int *) NULL; } seed &= 0x7fffffff; /* Only 31 LSB of seed considered */ if (mult < 0 || mult >= NPARAMS) { errprint("WARNING","init_rng","multiplier not valid. Using Default param"); mult = 0; } #ifdef LONG64 if(multiplier == 0) multiplier = mults[mult]; /* else if(multiplier != mults[mult]) fprintf(stderr,"WARNING: init_rng_d: Proposed multiplier does not agree with current multiplier.\n\t Independence of streams is not guaranteed\n");*/ #else if(multiplier == NULL) multiplier = mults[mult]; /*else if(strxncmp((char *) multiplier,(char *) mults[mult],4*sizeof(int)) != 0) fprintf(stderr,"WARNING: init_rng_d: Proposed multiplier does not agree with current multiplier.\n\t Independence of streams is not guaranteed\n");*/ #endif genptr = (struct rngen *) mymalloc(1*sizeof(struct rngen)); if(genptr == NULL) return NULL; genptr->gentype = GENTYPE; genptr->init_seed = seed; getprime(1, &(genptr->prime), gennum); genptr->prime_position = gennum; genptr->prime_next = total_gen; genptr->parameter = mult; #ifdef LONG64 genptr->seed = INIT_SEED; /* initialize generator */ genptr->seed ^= ((unsigned LONG64) seed)<<16; genptr->multiplier = mults[mult]; if (genptr->prime == 0) genptr->seed |= 1; #else genptr->seed[1] = 16651885^((seed<<16)&(0xff0000));/* initialize generator */ genptr->seed[0] = 2868876^((seed>>8)&(0xffffff)); genptr->multiplier = mults[mult]; if (genptr->prime == 0) genptr->seed[1] |= 1; #endif for(i=0; iprime_position); i++) get_rn_dbl( (int *) genptr); NGENS++; return (int *) genptr; } /* On machines with 32 bit integers, */ /* the Cray's 48 bit integer math is duplicated by breaking the problem into*/ /* steps. The algorithm is linear congruential. M is the multiplier and S*/ /* is the current seed. The 31 High order bits out of the 48 bits are returned*/ #ifdef __STDC__ int get_rn_int(int *igenptr) #else int get_rn_int(igenptr) int *igenptr; #endif { struct rngen *genptr = (struct rngen *) igenptr; #ifdef LONG64 multiply(genptr); return ((unsigned LONG64) genptr->seed) >> 17; #else int s[4], res[4]; multiply(genptr,genptr->multiplier,s,res); return (genptr->seed[0]<<7) | ((unsigned int) genptr->seed[1] >> 17) ; #endif } #ifdef __STDC__ float get_rn_flt(int *igenptr) #else float get_rn_flt(igenptr) int *igenptr; #endif { return (float) get_rn_dbl(igenptr); } /* get_rn_float */ #ifdef __STDC__ double get_rn_dbl(int *igenptr) #else double get_rn_dbl(igenptr) int *igenptr; #endif { struct rngen *genptr = (struct rngen *) igenptr; #ifdef LONG64 double temp[1]; unsigned LONG64 *ltemp; temp[0] = 0.0; multiply(genptr); /* Add defined(O2K) || defined(SGI) if optimization level is -O2 or lower */ #if defined(CONVEX) || defined(GENERIC) ltemp = (unsigned LONG64 *) temp; *ltemp = (genptr->seed<<4) | MSB_SET; return temp[0] - (double) 1.0; #else return genptr->seed*3.5527136788005008e-15; #endif #else static double equiv[1]; #define iran ((int *)equiv) #define ran (equiv) int expo, s[4], res[4]; multiply(genptr,genptr->multiplier,s,res); #if defined(HP) || defined(SUN) || defined(SOLARIS) || defined(GENERIC) expo = 1072693248; /*IEEE mantissa is 52 bits. We have only 48 bits, so we shift our result 4*/ /* bits left. 32-(24+4) = 4 bits are still blank in the lower word, so we*/ /* grab the low 4 bits of seedhi to fill these. */ iran[LSB] = genptr->seed[1] << 4 | genptr->seed[0] << 28; /* place the remaining (24-4)=20 bits of seedhi in bits 20-0 of ran. */ /* Expo occupies bits 30-20. Bit 31 (sign) is always zero. */ iran[MSB] = expo | genptr->seed[0] >> 4; return (*ran - (double) 1.0); #else return genptr->seed[0]*TWO_M24 + genptr->seed[1]*TWO_M48; #endif #undef ran #undef iran #endif } /* get_rn_dbl */ /*************************************************************************/ /*************************************************************************/ /* SPAWN_RNG: spawns new generators */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int spawn_rng(int *igenptr, int nspawned, int ***newgens, int checkid) #else int spawn_rng(igenptr,nspawned, newgens, checkid) int *igenptr,nspawned, ***newgens, checkid; #endif { struct rngen **genptr, *tempptr = (struct rngen *) igenptr; int i, j; if (nspawned <= 0) /* check if nspawned is valid */ { nspawned = 1; errprint("WARNING","spawn_rng","nspawned <= 0. Default value of 1 used for nspawned"); } genptr = (struct rngen **) mymalloc(nspawned*sizeof(struct rngen *)); if(genptr == NULL) { *newgens = NULL; return 0; } for(i=0; iinit_seed = tempptr->init_seed; genptr[i]->prime_position = tempptr->prime_position + tempptr->prime_next*(i+1); if(genptr[i]->prime_position > MAXPRIMEOFFSET) { fprintf(stderr,"WARNING - spawn_rng: gennum: %d > maximum number of independent streams: %d\n\tIndependence of streams cannot be guranteed.\n", genptr[i]->prime_position, MAX_STREAMS); genptr[i]->prime_position %= MAXPRIMEOFFSET; } genptr[i]->prime_next = (nspawned+1)*tempptr->prime_next; getprime(1, &(genptr[i]->prime), genptr[i]->prime_position); genptr[i]->multiplier = tempptr->multiplier; genptr[i]->parameter = tempptr->parameter; genptr[i]->gentype = tempptr->gentype; #ifdef LONG64 genptr[i]->seed = INIT_SEED; /* initialize generator */ genptr[i]->seed ^= ((unsigned LONG64) tempptr->init_seed)<<16; if (genptr[i]->prime == 0) genptr[i]->seed |= 1; #else genptr[i]->seed[1] = 16651885^((tempptr->init_seed<<16)&(0xff0000)); genptr[i]->seed[0] = 2868876^((tempptr->init_seed>>8)&(0xffffff)); if (genptr[i]->prime == 0) genptr[i]->seed[1] |= 1; #endif if(genptr[i]->prime_position > MAXPRIMEOFFSET) advance_seed(genptr[i]); /* advance lcg 10^6 steps from initial seed */ for(j=0; jprime_position); j++) get_rn_dbl( (int *) genptr[i]); } tempptr->prime_next = (nspawned+1)*tempptr->prime_next; NGENS += nspawned; *newgens = (int **) genptr; if(checkid != 0) for(i=0; i>12; temp[i-1] &= 4095; } for(i=0; i<4 ; i++) result[i] = temp[i]; } /*multiply two 4 digit numbers in base 2^12 and return 'size' lowest order */ /* digits*/ #ifdef __STDC__ void mult(int *a, int *b, int *c, int size) #else void mult(a,b,c,size) int *a, *b, *c, size; #endif { int temp[8]; int i, j; for(i=0; i<8; i++) temp[i] = 0; for(i=0; i<4; i++) for(j=0; j<4; j++) temp[i+j] += a[i]*b[j]; for(i=1; i<8; i++) { temp[i] += temp[i-1]>>12; temp[i-1] &= 4095; } for(i=0; imultiplier == mults[i]) { found = 1; break; } if(found == 0) { fprintf(stderr,"WARNING: advance_seed: multiplier not acceptable.\n"); return ; } /* a^n, n = 10^6 and pmult = (a^n-1)/(a-1), n = 10^6 */ switch(i) { case 0 : an = AN1; pmult = PMULT1; break; case 1 : an = AN2; pmult = PMULT2; break; case 2 : an = AN3; pmult = PMULT3; break; case 3 : an = AN4; pmult = PMULT4; break; case 4 : an = AN5; pmult = PMULT5; break; case 5 : an = AN6; pmult = PMULT6; break; case 6 : an = AN7; pmult = PMULT7; break; default: fprintf(stderr,"WARNING: advance_seed parameters for multiplier %d not available\n", i); return; } gen->seed = gen->seed*an + pmult*gen->prime; gen->seed &= LSB48; #else int an[4], pmult[4], x0, x1, temp[4],temp2[4], i, found; for(i=0, found=0; imultiplier, (char *) (mults[i]), 4*sizeof(int)) == 0) { found = 1; break; } if(found == 0) { fprintf(stderr,"WARNING: advance_seed: multiplier not acceptable.\n"); return ; } /* a^n, n = 10^6 and pmult = (a^n-1)/(a-1), n = 10^6 */ switch(i) { case 0 : an[0] = 0x001; an[1] = 0xc00; an[2] = 0xf0a; an[3] = 0xdad; pmult[0] = 0x000; pmult[1] = 0x700; pmult[2] = 0xc22; pmult[3] = 0xa42; break; case 1 : an[0] = 0x001; an[1] = 0x400; an[2] = 0xd7a; an[3] = 0xfef; pmult[0] = 0x000; pmult[1] = 0xb00; pmult[2] = 0x58c; pmult[3] = 0xfa8; break; case 2 : an[0] = 0x001; an[1] = 0xc00; an[2] = 0x7b5; an[3] = 0x641; pmult[0] = 0x000; pmult[1] = 0xf00; pmult[2] = 0xc4e; pmult[3] = 0x0d0; break; case 3 : an[0] = 0x001; an[1] = 0xc00; an[2] = 0xf72; an[3] = 0xcf9; pmult[0] = 0x000; pmult[1] = 0x700; pmult[2] = 0xdbe; pmult[3] = 0x11b; break; case 4 : an[0] = 0x001; an[1] = 0x400; an[2] = 0x07b; an[3] = 0xbdf; pmult[0] = 0x000; pmult[1] = 0x300; pmult[2] = 0xc8e; pmult[3] = 0xc3c; break; case 5 : an[0] = 0x001; an[1] = 0xc00; an[2] = 0x747; an[3] = 0xf33; pmult[0] = 0x000; pmult[1] = 0xf00; pmult[2] = 0x0e9; pmult[3] = 0xb0f; break; case 6 : an[0] = 0x001; an[1] = 0xc00; an[2] = 0x632; an[3] = 0xcbe; pmult[0] = 0x000; pmult[1] = 0x700; pmult[2] = 0x7de; pmult[3] = 0x640; break; default: fprintf(stderr,"WARNING: advance_seed parameters for multiplier %d not available\n", i); return; } x0 = gen->seed[0]; x1 = gen->seed[1]; temp[0] = x1&4095; temp[1] = (x1>>12)&4095; temp[2] = x0&4095; /* seed */ temp[3] = (x0>>12)&4095; temp2[0] = gen->prime%(1<<12); temp2[1] = (gen->prime>>12)%(1<<12); temp2[2] = (gen->prime>>24)%(1<<12); temp2[3] = 0; /* prime */ mult(temp,an,temp,4); mult(temp2,pmult,temp2,4); plus(temp,temp2,temp); gen->seed[1] = (temp[1]<<12) + temp[0]; gen->seed[0] = (temp[3]<<12) + temp[2]; #endif } #ifdef __STDC__ int free_rng(int *genptr) #else int free_rng(genptr) int *genptr; #endif { struct rngen *q; q = (struct rngen *) genptr; free(q); NGENS--; return NGENS; } #ifdef __STDC__ int pack_rng( int *genptr, char **buffer) #else int pack_rng(genptr,buffer) int *genptr; char **buffer; #endif { unsigned char *p, *initp; unsigned int size, m[2], i; struct rngen *q; q = (struct rngen *) genptr; size = 5*4 /*sizeof(int)*/ + 2*8/*sizeof(unsigned LONG64)*/ + strlen(q->gentype)+1; /* The new load/store routines make using sizeof unnecessary. Infact, */ /* using sizeof could be erroneous. */ initp = p = (unsigned char *) mymalloc(size); if(p == NULL) { *buffer = NULL; return 0; } strcpy((char *)p,q->gentype); p += strlen(q->gentype)+1; #ifdef LONG64 p += store_long64(q->seed,8,p); p += store_int(q->init_seed,4,p); p += store_int(q->prime,4,p); p += store_int(q->prime_position,4,p); p += store_int(q->prime_next,4,p); p += store_int(q->parameter,4,p); p += store_long64(q->multiplier,8,p); #else m[0] = q->seed[0]>>8;m[1] = q->seed[0]<<24 | q->seed[1]; p += store_intarray(m,2,4,p); p += store_int(q->init_seed,4,p); p += store_int(q->prime,4,p); p += store_int(q->prime_position,4,p); p += store_int(q->prime_next,4,p); p += store_int(q->parameter,4,p); /* The following is done since the multiplier is stored in */ /* pieces of 12 bits each */ m[1] = q->multiplier[2]&0xff; m[1] <<= 24; m[1] |= q->multiplier[1]<<12; m[1] |= q->multiplier[0]; m[0] = (q->multiplier[3]<<4) | (q->multiplier[2]>>8); p += store_intarray(m,2,4,p); #endif *buffer = (char *) initp; assert(p-initp == size); return p-initp; } #ifdef __STDC__ int get_seed_rng(int *gen) #else int get_seed_rng(gen) int *gen; #endif { return ((struct rngen *) gen)->init_seed; } #ifdef __STDC__ int *unpack_rng( char *packed) #else int *unpack_rng(packed) char *packed; #endif { struct rngen *q; unsigned char *p; unsigned int m[4], m2[2], i; p = (unsigned char *) packed; q = (struct rngen *) mymalloc(sizeof(struct rngen)); if(q == NULL) return NULL; if(strcmp((char *)p,GENTYPE) != 0) { fprintf(stderr,"ERROR: Unpacked ' %.24s ' instead of ' %s '\n", p, GENTYPE); return NULL; } else q->gentype = GENTYPE; p += strlen(q->gentype)+1; #ifdef LONG64 p += load_long64(p,8,&q->seed); p += load_int(p,4,(unsigned int *)&q->init_seed); p += load_int(p,4,(unsigned int *)&q->prime); p += load_int(p,4,(unsigned int *)&q->prime_position); p += load_int(p,4,(unsigned int *)&q->prime_next); p += load_int(p,4,(unsigned int *)&q->parameter); p += load_long64(p,8,&q->multiplier); #else p += load_intarray(p,2,4,m2); q->seed[1] = m2[1]&0xffffff; q->seed[0] = m2[1]>>24 | m2[0]<<8; p += load_int(p,4,(unsigned int *)&q->init_seed); p += load_int(p,4,(unsigned int *)&q->prime); p += load_int(p,4,(unsigned int *)&q->prime_position); p += load_int(p,4,(unsigned int *)&q->prime_next); p += load_int(p,4,(unsigned int *)&q->parameter); p += load_intarray(p,2,4,m2); /* The following is done since the multiplier is stored in */ /* pieces of 12 bits each */ m[0] = m2[1]&0xfff; m[1] = (m2[1]&0xfff000)>>12; m[2] = (m2[1]&0xff000000)>>24 | (m2[0]&0xf)<<8; m[3] = (m2[0]&0xfff0)>>4; #endif if(q->parameter < 0 || q->parameter >= NPARAMS) { fprintf(stderr,"ERROR: Unpacked parameters not acceptable.\n"); free(q); return NULL; } q->multiplier = mults[q->parameter]; NGENS++; return (int *) q; } #ifdef __STDC__ int print_rng( int *igen) #else int print_rng(igen) int *igen; #endif { struct rngen *gen; printf("\n%s\n", GENTYPE+2); gen = (struct rngen *) igen; printf("\n \tseed = %d, stream_number = %d\tparameter = %d\n\n", gen->init_seed, gen->prime_position, gen->parameter); return 1; } /* HAS ;-) */ #if 0 #include "simple_.h" #include "../fwrap_.h" #endif tree-puzzle-5.2/src/sprng/lfg.c0000644000076400001440000007444607756425676012232 /*************************************************************************/ /*************************************************************************/ /* Parallel Modified Additive Lagged Fibonacci Generator */ /* */ /* Modified by: Ashok Srinivasan, */ /* NCSA, University of Illinois, Urbana-Champaign */ /* E-Mail: ashoks@ncsa.uiuc.edu */ /* */ /* Based on the Implementation by: */ /* Steven A. Cuccaro and Daniel V. Pryor, */ /* IDA/Center for Computing Sciences (CCS) */ /* E-Mail: cuccaro@super.org pryor@super.org */ /* */ /* Copyright 1996 September 3, United States Government as Represented */ /* by the Director, National Security Agency. All rights reserved. */ /* */ /* Disclaimer 1: NCSA expressly disclaims any and all warranties, expressed*/ /* or implied, concerning the enclosed software. The intent in sharing */ /* this software is to promote the productive interchange of ideas */ /* throughout the research community. All software is furnished on an */ /* "as is" basis. No further updates to this software should be */ /* expected. Although this may occur, no commitment exists. The authors */ /* certainly invite your comments as well as the reporting of any bugs. */ /* NCSA cannot commit that any or all bugs will be fixed. */ /* */ /* Disclaimer 2: CCS expressly disclaims any and all warranties, expressed */ /* or implied, concerning the enclosed software. This software was */ /* developed at CCS for use in internal research. The intent in sharing */ /* this software is to promote the productive interchange of ideas */ /* throughout the research community. All software is furnished on an */ /* "as is" basis. No further updates to this software should be */ /* expected. Although this may occur, no commitment exists. The authors */ /* certainly invite your comments as well as the reporting of any bugs. */ /* CCS cannot commit that any or all bugs will be fixed. */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* This version has been modified to use two integer-based additive */ /* lagged-Fibonacci generators to produce integer, float and double */ /* values. The lagged-Fibonacci generators each have 31 bits of */ /* precision (after the bit fixed by the canonical form of the */ /* generator is removed), 31-bit values are generated by XORing */ /* the values after one has been shifted left one bit. The floating */ /* point value is formed by dividing the integer by 1.e+32 (the */ /* lsb's will be dropped from the mantissa to make room for the */ /* exponent), and two of these integer values in sequence are used */ /* to get the necessary precision for the double value. */ /* */ /* This method has the advantage that the generators pass fairly */ /* strict randomness tests, including the Birthday Spacings test */ /* that additive lagged-Fibonacci generators are well known to */ /* fail. The disadvantage is the additional time needed to do the */ /* division explicitly, which was avoided in previous versions. */ /* (As the division is by powers of 2, the user might well consider */ /* making machine-specific versions of this code to insert the bits */ /* into the appropriate places and avoid the problem entirely.) */ /*************************************************************************/ #include #include #include #include #include #define NDEBUG #include #include "interface.h" #include "memory.h" #include "store.h" /*#define PRINT_GEN*/ /* BITS_IN_INT_GEN is the log_2 of the modulus of the generator */ /* for portability this is set to 32, but can be modified; */ /* if modified, make sure INT_MOD_MASK can still be calculated */ #define BITS_IN_INT_GEN 32 /* INT_MOD_MASK is used to perform modular arithmetic - specifying */ /* this value compensates for different sized words on */ /* different architectures */ /* FLT_MULT is used in converting to float and double values; the */ /* odd form is due to a compiler glitch on our CM-5, which */ /* caused (0.5/(unsigned)(1<<31)) to be negative. */ #if (BITS_IN_INT_GEN==32) #define INT_MOD_MASK 0xffffffff #define FLT_MULT (0.25/(unsigned)(1<<30)) #else #define INT_MOD_MASK ((unsigned)(1<>1) /* MAX_BIT_INT is the largest bit position allowed in the index */ /* of the node - it equals BITS_IN_INT_GEN - 2 */ #define MAX_BIT_INT (BITS_IN_INT_GEN-2) /* INTX2_MASK is used in calculation of the node numbers */ #define INTX2_MASK ((1<=0;i--) { new_fill[0] = (new_fill[0]<<1) | (1&bitcnt(reg_fill[0]&temp)); new_fill[1] = (new_fill[1]<<1) | (1&bitcnt(reg_fill[1]&temp)); temp >>= 1; } for (i=28;i<32;i++) { temp = bitcnt(reg_fill[0]&(mask<>(32-i))); new_fill[0] |= (1&temp)<=0;i--) { if (b[i]&(1<hptr; int lval, kval; lval = ((struct rngen *)genptr)->lval; kval = ((struct rngen *)genptr)->kval; r0 = ((struct rngen *)genptr)->r0; r1 = ((struct rngen *)genptr)->r1; hptr = *hp; lptr = hptr + kval; if (lptr>=lval) lptr -= lval; /* INT_MOD_MASK causes arithmetic to be modular when integer size is */ /* different from generator modulus */ r0[hptr] = INT_MOD_MASK&(r0[hptr] + r0[lptr]); r1[hptr] = INT_MOD_MASK&(r1[hptr] + r1[lptr]); new_val = (r1[hptr]&(~1)) ^ (r0[hptr]>>1); if (--hptr < 0) hptr = lval - 1; /* skip an element in the sequence */ if (--lptr < 0) lptr = lval - 1; r0[hptr] = INT_MOD_MASK&(r0[hptr] + r0[lptr]); r1[hptr] = INT_MOD_MASK&(r1[hptr] + r1[lptr]); *hp = (--hptr < 0) ? lval-1 : hptr; return (new_val>>1); } #ifdef __STDC__ float get_rn_flt(int *genptr) #else float get_rn_flt(genptr) int *genptr; #endif /* returns value put into new position */ { unsigned long new_val; /* this cannot be unsigned int due to a bug in the SGI compiler */ unsigned *r0,*r1; int hptr,lptr,*hp = &((struct rngen *)genptr)->hptr; int lval, kval; lval = ((struct rngen *)genptr)->lval; kval = ((struct rngen *)genptr)->kval; r0 = ((struct rngen *)genptr)->r0; r1 = ((struct rngen *)genptr)->r1; hptr = *hp; lptr = hptr + kval; if (lptr>=lval) lptr -= lval; /* INT_MOD_MASK causes arithmetic to be modular when integer size is */ /* different from generator modulus */ r0[hptr] = INT_MOD_MASK&(r0[hptr] + r0[lptr]); r1[hptr] = INT_MOD_MASK&(r1[hptr] + r1[lptr]); new_val = (r1[hptr]&(~1)) ^ (r0[hptr]>>1); if (--hptr < 0) hptr = lval - 1; /* skip an element in the sequence */ if (--lptr < 0) lptr = lval - 1; r0[hptr] = INT_MOD_MASK&(r0[hptr] + r0[lptr]); r1[hptr] = INT_MOD_MASK&(r1[hptr] + r1[lptr]); *hp = (--hptr<0) ? lval-1 : hptr; return (new_val*FLT_MULT); } #ifdef __STDC__ double get_rn_dbl(int *genptr) #else double get_rn_dbl(genptr) int *genptr; #endif /* returns value put into new position */ { unsigned *r0,*r1; unsigned long temp1,temp2; /* Due to a bug in the SGI compiler, this should not be unsigned int */ int hptr,lptr,*hp = &((struct rngen *)genptr)->hptr; double new_val; int lval, kval; lval = ((struct rngen *)genptr)->lval; kval = ((struct rngen *)genptr)->kval; r0 = ((struct rngen *)genptr)->r0; r1 = ((struct rngen *)genptr)->r1; hptr = *hp; lptr = hptr + kval; if (lptr>=lval) lptr -= lval; /* INT_MOD_MASK causes arithmetic to be modular when integer size is */ /* different from generator modulus */ r0[hptr] = INT_MOD_MASK&(r0[hptr] + r0[lptr]); r1[hptr] = INT_MOD_MASK&(r1[hptr] + r1[lptr]); temp1 = (r1[hptr]&(~1)) ^ (r0[hptr]>>1); if (--hptr < 0) hptr = lval - 1; if (--lptr < 0) lptr = lval - 1; r0[hptr] = INT_MOD_MASK&(r0[hptr] + r0[lptr]); r1[hptr] = INT_MOD_MASK&(r1[hptr] + r1[lptr]); temp2 = (r1[hptr]&(~1)) ^ (r0[hptr]>>1); *hp = (--hptr < 0) ? lval-1 : hptr; new_val = ((unsigned int) temp2*(double)FLT_MULT + (unsigned int) temp1)*FLT_MULT; return (new_val); } /*************************************************************************/ /*************************************************************************/ /* INITIALIZE: starts the whole thing going */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ static int **initialize(int ngen, int param, unsigned seed, unsigned *nstart, unsigned initseed) #else static int **initialize(ngen,param, seed,nstart, initseed) int ngen, param; unsigned *nstart, seed, initseed; #endif { int i,j,k,l,*order, length; struct rngen **q; unsigned *nindex; length = valid[param].L; /* allocate memory for node number and fill of each generator */ order = (int *) mymalloc(ngen*sizeof(int)); q = (struct rngen **) mymalloc(ngen*sizeof(struct rngen *)); if (q == NULL || order == NULL) return NULL; for (i=0;ihptr = length - 1; q[i]->si = (unsigned *) mymalloc((length-1)*sizeof(unsigned)); q[i]->r0 = (unsigned *) mymalloc(length*sizeof(unsigned)); q[i]->r1 = (unsigned *) mymalloc(length*sizeof(unsigned)); q[i]->lval = length; q[i]->kval = valid[param].K; q[i]->param = param; q[i]->seed = seed; q[i]->init_seed = initseed; q[i]->gentype = GENTYPE; if (q[i]->r1 == NULL || q[i]->r0 == NULL || q[i]->si == NULL) return NULL; } /* specify register fills and node number arrays */ /* do fills in tree fashion so that all fills branch from index */ /* contained in nstart array */ q[0]->stream_number = nstart[0]; si_double(q[0]->si,nstart,length); get_fill(q[0]->si,q[0]->r0,param,seed); q[0]->si[0]++; get_fill(q[0]->si,q[0]->r1,param,seed); i = 1; order[0] = 0; if (ngen>1) while (1) { l = i; for (k=0;ksi; q[i]->stream_number = nindex[0]; si_double(nindex,nindex, length); for (j=0;jsi[j] = nindex[j]; get_fill(q[i]->si,q[i]->r0,param,seed); q[i]->si[0]++; get_fill(q[i]->si,q[i]->r1,param,seed); if (ngen == ++i) break; } if (ngen == i) break; for (k=l-1;k>0;k--) { order[2*k+1] = l+k; order[2*k] = order[k]; } order[1] = l; } free(order); for (i=ngen-1;i>=0;i--) { k = 0; for (j=1;jsi[j]) k = 1; if (!k) break; for (j=0;j=0) { for (j=0;j<4*length;j++) get_rn_int((int *)(q[i])); i--; } return((int **)q); } /*************************************************************************/ /*************************************************************************/ /* INIT_RNG's: user interface to start things off */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int *init_rng( int gennum, int total_gen, int seed, int param) #else int *init_rng(gennum,total_gen,seed,param) int gennum,param,seed,total_gen; #endif { int doexit=0,i,k, length; int **p=NULL, *rng; unsigned *nstart=NULL,*si; /* gives back one generator (node gennum) with updated spawning */ /* info; should be called total_gen times, with different value */ /* of gennum in [0,total_gen) each call */ /* check values of gennum and total_gen */ if (total_gen <= 0) /* check if total_gen is valid */ { total_gen = 1; errprint("WARNING","init_rng","Total_gen <= 0. Default value of 1 used for total_gen"); } if (gennum >= MAX_STREAMS) /* check if gen_num is valid */ fprintf(stderr,"WARNING - init_rng: gennum: %d > maximum number of independent streams: %d\n\tIndependence of streams cannot be guranteed.\n", gennum, MAX_STREAMS); if (gennum < 0 || gennum >= total_gen) /* check if gen_num is valid */ { errprint("ERROR","init_rng","gennum out of range. "); return (int *) NULL; } seed &= 0x7fffffff; /* Only 31 LSB of seed considered */ if (param < 0 || param >= NPARAMS) { errprint("WARNING","init_rng","Parameter not valid. Using Default param"); param = 0; } /* check whether generators have previously been defined */ /* guard against access while defining generator parameters for */ /* the 1st time */ length = valid[param].L; /* determine parameters */ k = valid[param].K; if (!lval) { lval = length; /* determine parameters */ kval = k; gseed = seed^GS0; } else { if (lval != length) doexit++; if( seed != (gseed^GS0) ) doexit += 2; if (doexit) { if (doexit&1) errprint("WARNING","init_rng","changing global L value! Independence of streams is not guaranteed"); if (doexit&2) errprint("WARNING","init_rng","changing global seed value! Independence of streams is not guaranteed"); } } /* define the starting vector for the initial node */ nstart = (unsigned *) mymalloc((length-1)*sizeof(unsigned)); if (nstart == NULL) return NULL; nstart[0] = gennum; for (i=1;istream_number = gennum; /* update si array to allow for future spawning of generators */ si = ((struct rngen *)(p[0]))->si; while (si[0] < total_gen && !si[1]) si_double(si,si,length); NGENS++; free(nstart); rng = p[0]; free(p); return rng; } /*************************************************************************/ /*************************************************************************/ /* SPAWN_RNG: spawns new generators */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int spawn_rng(int *genptr, int nspawned, int ***newgens, int checkid) #else int spawn_rng(genptr,nspawned,newgens, checkid) int *genptr,nspawned, ***newgens, checkid; #endif { int **q=NULL, i; unsigned *p; struct rngen *temp; if (nspawned <= 0) /* check if nspawned is valid */ { nspawned = 1; errprint("WARNING","spawn_rng","Nspawned <= 0. Default value of 1 used for nspawned"); } temp = (struct rngen *) genptr; p = temp->si; q = initialize(nspawned,temp->param,temp->seed,p,temp->init_seed); if (q == NULL) { *newgens = NULL; return 0; } si_double(p,p,temp->lval); NGENS += nspawned; *newgens = (int **) q; if(checkid != 0) for(i=0; ihptr); } #ifdef __STDC__ static int *get_fill_rng( int *genptr) #else static int *get_fill_rng(genptr) int *genptr; #endif { int i,*p; unsigned *pp; struct rngen *temp; temp = (struct rngen *) genptr; p = (int *) mymalloc(2*(temp->lval)*sizeof(int)); if(p == NULL) return NULL; pp = ((struct rngen *)genptr)->r0; for (i=0;ir1; for (i=0;ilval;i++) p[temp->lval+i] = pp[i]; return(p); } #ifdef __STDC__ static int *get_next_index_rng( int *genptr) #else static int *get_next_index_rng(genptr) int *genptr; #endif { int i,*p, lval; unsigned *pp; lval = ((struct rngen *) genptr)->lval; pp = ((struct rngen *)genptr)->si; p = (int *) mymalloc((lval-1)*sizeof(int)); if(p == NULL) return NULL; for (i=0;i>= 1; if (a[i+1]&1) a[i] ^= (1<>= 1; } #ifdef __STDC__ static int *get_node_index_rng( int *genptr) #else static int *get_node_index_rng(genptr) int *genptr; #endif { int *p, length; length = ( (struct rngen *) genptr)->lval; p = get_next_index_rng(genptr); if(p == NULL) return NULL; while (!(p[0]&1)) si_halve(p,length); si_halve(p, length); return(p); } /*************************************************************************/ /*************************************************************************/ /* MESSAGE PASSING ROUTINES */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int pack_rng( int *genptr, char **buffer) #else int pack_rng(genptr,buffer) int *genptr; char **buffer; #endif { int i, size; struct rngen *q; unsigned char *p, *initp; q = (struct rngen *)genptr; size = (3*(q->lval)+5)*4 + strlen(q->gentype)+1; /* The new load/store routines make using sizeof unnecessary. Infact, */ /* using sizeof could be erroneous. */ initp = p = (unsigned char *) mymalloc(size); if(p == NULL) { *buffer = NULL; return 0; } strcpy((char *)p,q->gentype); p += strlen(q->gentype)+1; p += store_int(q->lval,4,p); p += store_int(q->kval,4,p); p += store_int(q->seed,4,p); p += store_int(q->init_seed,4,p); p += store_int(q->stream_number,4,p); p += store_intarray(q->si,q->lval-1,4,p); p += store_intarray(q->r0,q->lval,4,p); p += store_intarray(q->r1,q->lval,4,p); p += store_int(q->hptr,4,p); *buffer = (char *) initp; assert(p-initp == size); return p-initp; } #ifdef __STDC__ int *unpack_rng( char *p) #else int *unpack_rng(p) char *p; #endif { int doexit=0,i, found, length, k, param; struct rngen *q; unsigned seed, lag1, lag2; unsigned char *packed; packed = (unsigned char *) p; if(strcmp((char *)packed,GENTYPE) != 0) { fprintf(stderr,"ERROR: Unpacked ' %.24s ' instead of ' %s '\n", packed, GENTYPE); return NULL; } packed += strlen(GENTYPE)+1; packed += load_int(packed,4,&lag1); packed += load_int(packed,4,&lag2); packed += load_int(packed,4,&seed); /* check values of parameters for consistency */ for(i=found=0; igentype = GENTYPE; q->si = (unsigned *) mymalloc((length-1)*sizeof(unsigned)); q->r0 = (unsigned *) mymalloc(length*sizeof(unsigned)); q->r1 = (unsigned *) mymalloc(length*sizeof(unsigned)); if (q->r1 == NULL || q->si == NULL || q->r0 == NULL) return NULL; q->lval = length; q->kval = k; q->seed = seed; q->param = param; packed += load_int(packed,4,(unsigned int *)&q->init_seed); packed += load_int(packed,4,(unsigned int *)&q->stream_number); packed += load_intarray(packed,length-1,4,q->si); packed += load_intarray(packed,length,4,q->r0); packed += load_intarray(packed,length,4,q->r1); packed += load_int(packed,4,(unsigned int *)&q->hptr); NGENS++; return (int *) q; } /*************************************************************************/ /*************************************************************************/ /* FREE_RNG: remove memory for a generator */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int free_rng(int *genptr) #else int free_rng(genptr) int *genptr; #endif { struct rngen *q; q = (struct rngen *)genptr; free(q->si); free(q->r0); free(q->r1); free(q); NGENS--; return NGENS; } #ifdef __STDC__ int print_rng( int *igen) #else int print_rng(igen) int *igen; #endif { struct rngen *gen; gen = (struct rngen *) igen; printf("\n%s\n", GENTYPE+2); printf("\n \tseed = %d, stream_number = %d\tparameter = %d\n\n", gen->init_seed, gen->stream_number, gen->param); return 1; } /* HAS ;-) */ #if 0 #include "simple_.h" #include "../fwrap_.h" #endif tree-puzzle-5.2/src/sprng/makeseed.c0000644000076400001440000000124407754747631013216 #include #ifdef __STDC__ int make_new_seed() #else int make_new_seed() #endif { time_t tp; struct tm *temp; unsigned int temp2, temp3; static unsigned int temp4 = 0xe0e1; time(&tp); temp = localtime(&tp); temp2 = (temp->tm_sec<<26)+(temp->tm_min<<20)+(temp->tm_hour<<15)+ (temp->tm_mday<<10)+(temp->tm_mon<<6); temp3 = (temp->tm_year<<13)+(temp->tm_wday<<10)+(temp->tm_yday<<1)+ temp->tm_isdst; temp2 ^= clock()^temp3; temp4 = (temp4*0xeeee)%0xffff; temp2 ^= temp4<<16; temp4 = (temp4*0xaeee)%0xffff; temp2 ^= temp4; temp2 &= 0x7fffffff; return temp2; } #if 0 main() { printf("%u\n", make_new_seed()); } #endif tree-puzzle-5.2/src/sprng/lcg64.c0000644000076400001440000004033107756425667012363 /*************************************************************************/ /*************************************************************************/ /* Parallel 64-bit Linear Congruential Generator */ /* */ /* Author: Ashok Srinivasan, */ /* NCSA, University of Illinois, Urbana-Champaign */ /* E-Mail: ashoks@ncsa.uiuc.edu */ /* */ /* Note: The modulus is 2^64 */ /* */ /* Disclaimer: NCSA expressly disclaims any and all warranties, expressed*/ /* or implied, concerning the enclosed software. The intent in sharing */ /* this software is to promote the productive interchange of ideas */ /* throughout the research community. All software is furnished on an */ /* "as is" basis. No further updates to this software should be */ /* expected. Although this may occur, no commitment exists. The authors */ /* certainly invite your comments as well as the reporting of any bugs. */ /* NCSA cannot commit that any or all bugs will be fixed. */ /*************************************************************************/ /*************************************************************************/ /* This is version 1.0, created 20 May 1998 */ #include #include #include #include #define NDEBUG #include #include "memory.h" #include "interface.h" #include "primes-lcg64.h" #include "store.h" #define VERSION "00" /*** Name for Generator ***/ #define GENTYPE VERSION "64 bit Linear Congruential Generator with Prime Addend" int MAX_STREAMS = (146138719); /*** Maximum number of independent streams ***/ #define NPARAMS 3 /*** number of valid parameters ***/ #if LONG_MAX > 2147483647L #if LONG_MAX > 35184372088831L #if LONG_MAX >= 9223372036854775807L #define LONG_SPRNG #define LONG64 long /* 64 bit long */ #define store_long64 store_long #define store_long64array store_longarray #define load_long64 load_long #define load_long64array load_longarray #endif #endif #endif #if !defined(LONG_SPRNG) && defined(_LONG_LONG) #define LONG64 long long #define store_long64 store_longlong #define store_long64array store_longlongarray #define load_long64 load_longlong #define load_long64array load_longlongarray #endif unsigned int PARAMLIST[NPARAMS][2] = {{0x87b0b0fdU, 0x27bb2ee6U}, {0xe78b6955U,0x2c6fe96eU}, {0x31a53f85U,0x369dea0fU}}; /*** Change this to the type of generator you are implementing ***/ struct rngen { char *gentype; int stream_number; int nstreams; int init_seed; int parameter; int narrays; int *array_sizes; int **arrays; int spawn_offset; /*** declare other variables here ***/ unsigned int prime; #ifdef LONG64 /* 64 bit integer types */ unsigned LONG64 state, multiplier; #else /* No 64 bit type available, so use array of floats */ double state[3], multiplier[3];/* simulate 64 bit arithmetic */ #endif }; /*************************************************************************/ /* You should not need to look at the next few lines! */ #define INIT_SEED1 0x2bc6ffffU #define INIT_SEED0 0x8cfe166dU #define TWO_M22 2.384185791015625e-07 /* 2^(-22) */ #define TWO_P22 4194304 /* 2^(22) */ #define TWO_M20 9.5367431640625e-07 /* 2^(-20) */ #define TWO_P20 1048576 /* 2^(20) */ #define TWO_M42 2.273736754432321e-13 /* 2^(-42) */ #define TWO_M64 5.4210108624275222e-20 /* 2^(-64) */ /* */ /************************************************************************/ int NGENS=0; /* number of random streams in current process */ /* Initialize random number stream */ #ifdef __STDC__ int *init_rng( int gennum, int total_gen, int seed, int param) #else int *init_rng(gennum,total_gen,seed,param) int gennum,param,seed,total_gen; #endif { /* gives back one stream (node gennum) with updated spawning */ /* info; should be called total_gen times, with different value */ /* of gennum in [0,total_gen) each call */ struct rngen *genptr; int i; double tempdbl; if (total_gen <= 0) /* Is total_gen valid ? */ { total_gen = 1; fprintf(stderr,"WARNING - init_rng: Total_gen <= 0. Default value of 1 used for total_gen\n"); } if (gennum >= MAX_STREAMS) /* check if gen_num is valid */ fprintf(stderr,"WARNING - init_rng: gennum: %d > maximum number of independent streams: %d\n\tIndependence of streams cannot be guranteed.\n", gennum, MAX_STREAMS); if (gennum < 0 || gennum >= total_gen) /* check if gen_num is valid */ { fprintf(stderr,"ERROR - init_rng: gennum %d out of range [%d,%d).\n", gennum, 0, total_gen); return (int *) NULL; } if (param < 0 || param >= NPARAMS) /* check if parameter is valid */ { fprintf(stderr,"WARNING - init_rng: parameter not valid. Using Default parameter.\n"); param = 0; } genptr = (struct rngen *) mymalloc(1*sizeof(struct rngen)); if(genptr == NULL) /* check if memory allocated for data structure */ return NULL; /* Initiallize data structure variables */ genptr->gentype = GENTYPE; genptr->stream_number = gennum; genptr->nstreams = total_gen; genptr->init_seed = seed & 0x7fffffff; /* Only 31 LSB of seed considered */ genptr->parameter = param; genptr->spawn_offset = total_gen; /*** Change the next line depending on your generators data needs ***/ genptr->narrays = 0; /* number of arrays needed by your generator */ if(genptr->narrays > 0) { genptr->array_sizes = (int *) mymalloc(genptr->narrays*sizeof(int)); genptr->arrays = (int **) mymalloc(genptr->narrays*sizeof(int *)); if(genptr->array_sizes == NULL || genptr->arrays == NULL) return NULL; } else { genptr->array_sizes = NULL; genptr->arrays = NULL; } /*** Change the next line depending on your generators data needs ***/ /* initiallize ...array_sizes to the sizes of the arrays */ for(i=0; inarrays; i++) { genptr->arrays[i] = (int *) mymalloc(genptr->array_sizes[i]*sizeof(int)); if(genptr->arrays[i] == NULL) /* check if memory allocated for data structure */ return NULL; } /*** Add initialization statements for your data in the arrays and other variables you have defined ***/ getprime(1,&genptr->prime,gennum); #ifdef LONG64 genptr->multiplier = ((unsigned LONG64) PARAMLIST[param][1])<<32 | ((unsigned LONG64) PARAMLIST[param][0]); genptr->state = ( ((unsigned LONG64) INIT_SEED1)<<32 | INIT_SEED0) ^(((unsigned LONG64) seed<<33)|gennum); #else genptr->multiplier[0] = (double) (PARAMLIST[param][0]&0x3fffff); genptr->multiplier[1] = (double) (PARAMLIST[param][0]>>22 | (PARAMLIST[param][1]&0xfff)<<10); genptr->multiplier[2] = (double) (PARAMLIST[param][1]>>12); genptr->state[0] = (double) ((INIT_SEED0^gennum)&0x3fffff); genptr->state[1] = (double) ((INIT_SEED0^gennum)>>22 | ((INIT_SEED1 ^ (unsigned)seed<<1)&0xfff)<<10); genptr->state[2] = (double) ((INIT_SEED1 ^ (unsigned)seed<<1)>>12); #endif for(i=0; i<127*genptr->stream_number; i++) tempdbl = get_rn_dbl((int *) genptr); NGENS++; /* NGENS = # of streams */ return (int *) genptr; } #ifdef LONG64 #define advance_state(genptr) genptr->state = genptr->state*genptr->multiplier + genptr->prime; #else #define advance_state(genptr) {double t0, t1, t2, t3, st0, st1, st2;\ t0 = genptr->state[0]*genptr->multiplier[0] + genptr->prime;\ t1 = (double) (int) (t0*TWO_M22); \ st0 = t0 - TWO_P22*t1; \ assert( (int) st0 == st0); \ t1 += genptr->state[1]*genptr->multiplier[0] + \ genptr->state[0]*genptr->multiplier[1]; \ t2 = (double) (int) (t1*TWO_M22); \ st1 = t1 - TWO_P22*t2; \ assert( (int) st1 == st1); \ t2 += genptr->state[2]*genptr->multiplier[0] + \ genptr->state[1]*genptr->multiplier[1] + \ genptr->state[0]*genptr->multiplier[2];\ t3 = (double) (int) (t2*TWO_M20); \ st2 = t2 - TWO_P20*t3; \ assert( (int) st2 == st2); \ genptr->state[0] = st0; \ genptr->state[1] = st1; \ genptr->state[2] = st2;} #endif /* Returns a double precision random number */ #ifdef __STDC__ double get_rn_dbl(int *igenptr) #else double get_rn_dbl(igenptr) int *igenptr; #endif { struct rngen *genptr = (struct rngen *) igenptr; #ifdef LONG64 #ifdef _LONG_LONG #define EXPO 0x3ff0000000000000ULL #else #define EXPO 0x3ff0000000000000UL #endif static double dtemp[1] = {0.0}; advance_state(genptr); /* next state in sequence */ #if defined(CONVEX) || defined(O2K) || defined(SGI) || defined(GENERIC) *((unsigned LONG64 *) dtemp) = (genptr->state>>12) | EXPO; return *dtemp - (double) 1.0; #else return genptr->state*TWO_M64; #endif #else /* 32 bit machine */ #define EXPO 0x3ff00000 #ifdef LittleEndian #define MSB 1 #else #define MSB 0 #endif #define LSB (1-MSB) double ans; unsigned int ist0, ist1, ist2; static double temp[1] = {0.0}; advance_state(genptr); /* next state in sequence */ ist0 = genptr->state[0]; ist1 = genptr->state[1]; ist2 = genptr->state[2]; #if defined(HP) || defined(SUN) || defined(SOLARIS) || defined(GENERIC) /*IEEE mantissa is 52 bits. */ ((unsigned int *)temp)[LSB] = ist1<<10 | ist0>>12; ((unsigned int *)temp)[MSB] = EXPO | ist2; return *temp - (double) 1.0; #else return genptr->state[2]*TWO_M20 + genptr->state[1]*TWO_M42 + genptr->state[0]*TWO_M64; #endif #endif } /* Return a random integer */ #ifdef __STDC__ int get_rn_int(int *igenptr) #else int get_rn_int(igenptr) int *igenptr; #endif { #ifdef LONG64 struct rngen *genptr = (struct rngen *) igenptr; advance_state(genptr); /* next state in sequence */ return genptr->state>>33; #else return (int) (get_rn_dbl(igenptr)*0x80000000U); #endif } /* Return a single precision random number */ #ifdef __STDC__ float get_rn_flt(int *igenptr) #else float get_rn_flt(igenptr) int *igenptr; #endif { /* If you have a more efficient way of computing the random integer, then please replace the statement below with your scheme. */ return (float) get_rn_dbl(igenptr); } /*************************************************************************/ /*************************************************************************/ /* SPAWN_RNG: spawns new generators */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int spawn_rng(int *igenptr, int nspawned, int ***newgens, int checkid) #else int spawn_rng(igenptr,nspawned, newgens, checkid) int *igenptr,nspawned, ***newgens, checkid; #endif { struct rngen **genptr, *tempptr = (struct rngen *) igenptr; int i, j; if (nspawned <= 0) /* is nspawned valid ? */ { nspawned = 1; fprintf(stderr,"WARNING - spawn_rng: nspawned <= 0. Default value of 1 used for nspawned\n"); } genptr = (struct rngen **) mymalloc(nspawned*sizeof(struct rngen *)); if(genptr == NULL) /* allocate memory for pointers to structures */ { *newgens = NULL; return 0; } for(i=0; istream_number + tempptr->spawn_offset*(i+1); if(gennum > MAX_STREAMS) /* change seed to avoid repeating sequence */ seed = (tempptr->init_seed)^gennum; else seed = tempptr->init_seed; /* Initialize a stream. This stream has incorrect spawning information. But we will correct it below. */ genptr[i] = (struct rngen *) init_rng(gennum, gennum+1, seed, tempptr->parameter); if(genptr[i] == NULL) /* Was generator initiallized? */ { nspawned = i; break; } genptr[i]->spawn_offset = (nspawned+1)*tempptr->spawn_offset; } tempptr->spawn_offset *= (nspawned+1); *newgens = (int **) genptr; if(checkid != 0) for(i=0; inarrays; i++) free(q->arrays[i]); if(q->narrays > 0) { free(q->array_sizes); free(q->arrays); } free(q); NGENS--; return NGENS; } #ifdef __STDC__ int pack_rng( int *genptr, char **buffer) #else int pack_rng(genptr,buffer) int *genptr; char **buffer; #endif { unsigned char *p, *initp; int size, i; unsigned int temp, m[2]; struct rngen *q; q = (struct rngen *) genptr; size = 48 + strlen(q->gentype)+1; initp = p = (unsigned char *) mymalloc(size); /* allocate memory */ /* The new load/store routines make using sizeof unnecessary. Infact, */ /* using sizeof could be erroneous. */ if(p == NULL) { *buffer = NULL; return 0; } strcpy((char *)p,q->gentype); p += strlen(q->gentype)+1; p += store_int(q->stream_number,4,p); p += store_int(q->nstreams,4,p); p += store_int(q->init_seed,4,p); p += store_int(q->parameter,4,p); p += store_int(q->narrays,4,p); p += store_int(q->spawn_offset,4,p); p += store_int(q->prime,4,p); #ifdef LONG64 /* 64 bit integer types */ p += store_long64(q->state,8,p); p += store_long64(q->multiplier,8,p); #else /* No 64 bit type available */ m[0] = q->state[2]; temp = q->state[1];m[0]=(m[0]<<12)|(temp>>10); m[1] = q->state[1]; temp = q->state[0];m[1]=(m[1]<<22)|(temp); p += store_intarray(m,2,4,p); m[0] = q->multiplier[2]; temp = q->multiplier[1];m[0]=(m[0]<<12)|(temp>>10); m[1] = q->multiplier[1]; temp = q->multiplier[0];m[1]=(m[1]<<22)|(temp); p += store_intarray(m,2,4,p); #endif *buffer = (char *) initp; assert(p-initp == size); return p-initp; } #ifdef __STDC__ int *unpack_rng( char *packed) #else int *unpack_rng(packed) char *packed; #endif { struct rngen *q; unsigned int i, m[2]; unsigned char *p; p = (unsigned char *) packed; q = (struct rngen *) mymalloc(sizeof(struct rngen)); if(q == NULL) return NULL; if(strcmp((char *)p,GENTYPE) != 0) { fprintf(stderr,"ERROR: Unpacked ' %.24s ' instead of ' %s '\n", p, GENTYPE); return NULL; } else q->gentype = GENTYPE; p += strlen(q->gentype)+1; p += load_int(p,4,(unsigned int *)&q->stream_number); p += load_int(p,4,(unsigned int *)&q->nstreams); p += load_int(p,4,(unsigned int *)&q->init_seed); p += load_int(p,4,(unsigned int *)&q->parameter); p += load_int(p,4,(unsigned int *)&q->narrays); p += load_int(p,4,(unsigned int *)&q->spawn_offset); p += load_int(p,4,&q->prime); #ifdef LONG64 /* 64 bit integer types */ p += load_long64(p,8,&q->state); p += load_long64(p,8,&q->multiplier); #else /* No 64 bit type available */ p += load_intarray(p,2,4,m); q->state[0] = (double) (m[1]&0x3fffff); q->state[1] = (double) ((m[1]>>22) | (m[0]&0xfff)<<10); q->state[2] = (double) (m[0]>>12); p += load_intarray(p,2,4,m); q->multiplier[0] = (double) (m[1]&0x3fffff); q->multiplier[1] = (double) ((m[1]>>22) | (m[0]&0xfff)<<10); q->multiplier[2] = (double) (m[0]>>12); #endif q->array_sizes = NULL; q->arrays = NULL; NGENS++; return (int *) q; } #ifdef __STDC__ int get_seed_rng(int *gen) #else int get_seed_rng(gen) int *gen; #endif { return ((struct rngen *) gen)->init_seed; } #ifdef __STDC__ int print_rng( int *igen) #else int print_rng(igen) int *igen; #endif { struct rngen *gen; printf("\n%s\n", GENTYPE+2); gen = (struct rngen *) igen; printf("\n \tseed = %d, stream_number = %d\tparameter = %d\n\n", gen->init_seed, gen->stream_number, gen->parameter); return 1; } /* HAS ;-) */ #if 0 #include "simple_.h" #include "fwrap_.h" #endif tree-puzzle-5.2/src/sprng/README0000644000076400001440000000043610071222064012124 The original source files are from the SPRNG (Scalable Pseudo Random Number Generator) library package. Mascagni, Michael and Srinivasan, Ashok (2000) SPRNG: A Scalable Library for Pseudorandom Number Generation. ACM Trans. Math. Software, 26:436-461, DOI: 10.1145/358407.358427 tree-puzzle-5.2/src/sprng/multiply.h0000644000076400001440000000154007755111550013305 /* used by lcg */ #ifdef LONG64 #define mult_48_64(a,b,c) c = (a*b); #define multiply(genptr) mult_48_64(genptr->seed,genptr->multiplier,genptr->seed); genptr->seed += genptr->prime; genptr->seed &= LSB48; #else #define mult_48_32(a,b,c) c[0] = a[0]*b[0]; c[1] = a[1]*b[0]+a[0]*b[1];\ c[2] = a[0]*b[2]+a[1]*b[1]+a[2]*b[0];\ c[3] = a[3]*b[0]+a[2]*b[1]+a[1]*b[2]+a[0]*b[3]; #define multiply(genptr,m,s,res) s[3] = (unsigned int) genptr->seed[0] >> 12;\ s[2] = genptr->seed[0] & 4095; s[1] = genptr->seed[1] >> 12;\ s[0] = genptr->seed[1] & 4095;\ mult_48_32(m,s,res);\ genptr->seed[1] = res[0] + ((res[1]&4095) << 12) + genptr->prime;\ genptr->seed[0] = ( (unsigned int) genptr->seed[1] >> 24)\ + res[2] + ((unsigned int) res[1] >> 12 ) + (res[3] << 12);\ genptr->seed[1] &= 16777215; genptr->seed[0] &= 16777215; #endif tree-puzzle-5.2/src/sprng/primes-lcg64.c0000644000076400001440000000545707755107642013657 #include #include #include "primes-lcg64.h" #include "primelist-lcg64.h" #define YES 1 #define NO 0 #define NPRIMES 10000 int primes[NPRIMES]; #ifdef __STDC__ int init_prime(void) #else int init_prime() #endif { int i, j, obtained = 0, isprime; for(i=3; i < MINPRIME; i += 2) { isprime = YES; for(j=0; j < obtained; j++) if(i%primes[j] == 0) { isprime = NO; break; } else if(primes[j]*primes[j] > i) break; if(isprime == YES) { primes[obtained] = i; obtained++; } } return obtained; } #ifdef __STDC__ int getprime(int need, unsigned int *prime_array, int offset) #else int getprime(need, prime_array, offset) int need, offset; unsigned int *prime_array; #endif { static int initiallized = NO, num_prime; unsigned int largest; int i, isprime, index, obtained = 0; if(need <= 0) { fprintf(stderr,"WARNING: Number of primes needed = %d < 1; None returned\n" , need); return 0; } if(offset < 0) { fprintf(stderr,"WARNING: Offset of prime = %d < 1; None returned\n" , offset); return 0; } if(offset+need-1 MAXPRIMEOFFSET) { fprintf(stderr,"WARNING: generator has branched maximum number of times;\nindependence of generators no longer guaranteed"); offset = offset % MAXPRIMEOFFSET; } if(offset < PRIMELISTSIZE1) /* search table for previous prime */ { largest = prime_list[offset] + 2; offset = 0; } else { index = (unsigned int) ((offset-PRIMELISTSIZE1+1)/STEP) + PRIMELISTSIZE1 - 1; largest = prime_list[index] + 2; offset -= (index-PRIMELISTSIZE1+1)*STEP + PRIMELISTSIZE1 - 1; } while(need > obtained && largest > MINPRIME) { isprime = YES; largest -= 2; for(i=0; i 0) offset--; else if(isprime == YES) prime_array[obtained++] = largest; } if(need > obtained) fprintf(stderr,"ERROR: Insufficient number of primes: needed %d, obtained %d\n", need, obtained); return obtained; } #if 0 main() { unsigned int newprimes[1500], np, i; np = getprime(2,newprimes,0); np = getprime(2,newprimes+2,9); np = getprime(2,newprimes+4,12); for(i=0; i<6; i++) printf("%u. %u \n", i, newprimes[i]); /*while(np--) printf("New primes: %u\n", newprimes[np]); np = getprime(5,newprimes); printf("%d new primes obtained ...\n", np); while(np--) printf("New primes: %u\n", newprimes[np]);*/ } #endif tree-puzzle-5.2/src/sprng/primes-lcg64.h0000644000076400001440000000065107755107654013656 #ifndef _primes64_h_ #define _primes64_h_ #ifndef ANSI_ARGS #ifdef __STDC__ #define ANSI_ARGS(args) args #else #define ANSI_ARGS(args) () #endif #endif int getprime ANSI_ARGS((int need, unsigned int *prime_array, int offset)); #define MAXPRIME 3037000501U /* largest odd # < sqrt(2)*2^31+2 */ #define MINPRIME 55108 /* sqrt(MAXPRIME) */ #define MAXPRIMEOFFSET 146138719U /* Total number of available primes */ #endif tree-puzzle-5.2/src/sprng/sprng.h0000644000076400001440000000371707756427656012611 #ifndef _sprng_h_ #define _sprng_h_ #include "interface.h" #define SPRNG_DEFAULT 0 #define CRAYLCG 0 #define DRAND48 1 #define FISH1 2 #define FISH2 3 #define FISH3 4 #define FISH4 5 #define FISH5 6 #define LECU1 0 #define LECU2 1 #define LECU3 2 #define LAG1279 0 #define LAG17 1 #define LAG31 2 #define LAG55 3 #define LAG63 4 #define LAG127 5 #define LAG521 6 #define LAG521B 7 #define LAG607 8 #define LAG607B 9 #define LAG1279B 10 #define CHECK 1 #define MAX_PACKED_LENGTH 24000 #ifdef SPRNG_USE_MPI #define MPINAME(A) A ## _mpi #else #define MPINAME(A) A #endif #define make_sprng_seed MPINAME(make_new_seed) #if defined(SIMPLE_SPRNG) /* HAS ;-) */ #if 0 #define pack_sprng pack_rng_simple #define unpack_sprng unpack_rng_simple #define isprng MPINAME(get_rn_int_simple) #define init_sprng MPINAME(init_rng_simple) #define print_sprng print_rng_simple #ifdef FLOAT_GEN #define sprng MPINAME(get_rn_flt_simple) #else #define sprng MPINAME(get_rn_dbl_simple) #endif #endif #elif !defined(CHECK_POINTERS) #define free_sprng free_rng #define pack_sprng pack_rng #define unpack_sprng unpack_rng #define isprng get_rn_int #define spawn_sprng(A,B,C) spawn_rng(A,B,C,!CHECK) #define init_sprng init_rng #define print_sprng print_rng #ifdef FLOAT_GEN #define sprng get_rn_flt #else #define sprng get_rn_dbl #endif #else /* HAS ;-) */ #if 0 #define free_sprng(A) ((deleteID(A)==NULL) ? -1 : free_rng(A)) #define pack_sprng(A,B) ((checkID(A)==NULL) ? 0 : pack_rng(A,B)) #define unpack_sprng(A) addID(unpack_rng(A)) #define isprng(A) ((checkID(A)==NULL) ? -1 : get_rn_int(A)) #define spawn_sprng(A,B,C) ((checkID(A)==NULL) ? 0 : spawn_rng(A,B,C,CHECK)) #define init_sprng(A,B,C,D) addID(init_rng(A,B,C,D)) #define print_sprng(A) ((checkID(A)==NULL) ? 0 : print_rng(A)) #ifdef FLOAT_GEN #define sprng(A) ((checkID(A)==NULL) ? -1.0 : get_rn_flt(A)) #else #define sprng(A) ((checkID(A)==NULL) ? -1.0 : get_rn_dbl(A)) #endif #endif #endif #endif tree-puzzle-5.2/src/sprng/primes-lcg.c0000644000076400001440000000535707755107561013504 #include #include #include "primes-lcg.h" #include "primelist-lcg.h" #define YES 1 #define NO 0 #define NPRIMES 1000 int primes[NPRIMES]; #ifdef __STDC__ int init_prime(void) #else int init_prime() #endif { int i, j, obtained = 0, isprime; for(i=3; i < MINPRIME; i += 2) { isprime = YES; for(j=0; j < obtained; j++) if(i%primes[j] == 0) { isprime = NO; break; } else if(primes[j]*primes[j] > i) break; if(isprime == YES) { primes[obtained] = i; obtained++; } } return obtained; } #ifdef __STDC__ int getprime(int need, int *prime_array, int offset) #else int getprime(need, prime_array, offset) int need, *prime_array,offset; #endif { static int initiallized = NO, num_prime; int largest; int i, isprime, index, obtained = 0; if(need <= 0) { fprintf(stderr,"WARNING: Number of primes needed = %d < 1; None returned\n" , need); return 0; } if(offset < 0) { fprintf(stderr,"WARNING: Offset of prime = %d < 1; None returned\n" , offset); return 0; } if(offset+need-1 MAXPRIMEOFFSET) { fprintf(stderr,"WARNING: generator has branched maximum number of times;\nindependence of generators no longer guaranteed"); offset = offset % MAXPRIMEOFFSET; } if(offset < PRIMELISTSIZE1) /* search table for previous prime */ { largest = prime_list[offset] + 2; offset = 0; } else { index = (int) ((offset-PRIMELISTSIZE1+1)/STEP) + PRIMELISTSIZE1 - 1; largest = prime_list[index] + 2; offset -= (index-PRIMELISTSIZE1+1)*STEP + PRIMELISTSIZE1 - 1; } while(need > obtained && largest > MINPRIME) { isprime = YES; largest -= 2; for(i=0; i 0) offset--; else if(isprime == YES) prime_array[obtained++] = largest; } if(need > obtained) fprintf(stderr,"ERROR: Insufficient number of primes: needed %d, obtained %d\n", need, obtained); return obtained; } #if 0 main() { int newprimes[1500], np, i; np = getprime(2,newprimes,0); np = getprime(2,newprimes+2,9); np = getprime(2,newprimes+4,12); for(i=0; i<6; i++) printf("%d. %d \n", i, newprimes[i]); /*while(np--) printf("New primes: %d\n", newprimes[np]); np = getprime(5,newprimes); printf("%d new primes obtained ...\n", np); while(np--) printf("New primes: %d\n", newprimes[np]);*/ } #endif tree-puzzle-5.2/src/sprng/primes-lcg.h0000644000076400001440000000053707755106031013473 #ifndef _primes_h_ #define _primes_h_ #ifndef ANSI_ARGS #ifdef __STDC__ #define ANSI_ARGS(args) args #else #define ANSI_ARGS(args) () #endif #endif int getprime ANSI_ARGS((int need, int *prime_array, int offset)); #define MAXPRIME 11863285 /* sqrt(2)*2^23 + 2 */ #define MINPRIME 3444 /* sqrt(MAXPRIME) */ #define MAXPRIMEOFFSET 779156 #endif tree-puzzle-5.2/src/sprng/store.c0000644000076400001440000000553507754747671012607 #include #include "store.h" int store_long(unsigned long l, int nbytes, unsigned char *c) { int i; for(i=0; i>(8*(nbytes-i-1)))&0xff; return nbytes; /* return number of chars filled */ } int store_longarray(unsigned long *l, int n, int nbytes, unsigned char *c) { int i; for(i=0; i>(8*(nbytes-i-1)))&0xff; return nbytes; /* return number of chars filled */ } int store_longlongarray(unsigned long long *l, int n, int nbytes, unsigned char *c) { int i; for(i=0; i>(8*(nbytes-i-1)))&0xff; return nbytes; /* return number of chars filled */ } int store_intarray(unsigned int *l, int n, int nbytes, unsigned char *c) { int i; for(i=0; i #include #include #include #define NDEBUG #include #include "memory.h" #include "interface.h" #include "primes-lcg64.h" #include "store.h" #define VERSION "00" /*** Name for Generator ***/ #define GENTYPE VERSION "Combined multiple recursive generator" int MAX_STREAMS = (146138719); /*** Maximum number of independent streams ***/ #define NPARAMS 3 /*** number of valid parameters ***/ #if LONG_MAX > 2147483647L #if LONG_MAX > 35184372088831L #if LONG_MAX >= 9223372036854775807L #define LONG_SPRNG #define LONG64 long /* 64 bit long */ #define store_long64 store_long #define store_long64array store_longarray #define load_long64 load_long #define load_long64array load_longarray #endif #endif #endif #if !defined(LONG_SPRNG) && defined(_LONG_LONG) #define LONG64 long long #define store_long64 store_longlong #define store_long64array store_longlongarray #define load_long64 load_longlong #define load_long64array load_longlongarray #endif unsigned int PARAMLIST[NPARAMS][2] = {{0x87b0b0fdU, 0x27bb2ee6U}, {0xe78b6955U,0x2c6fe96eU}, {0x31a53f85U,0x369dea0fU}}; /*** Change this to the type of generator you are implementing ***/ struct rngen { char *gentype; int stream_number; int nstreams; int init_seed; int parameter; int narrays; int *array_sizes; int **arrays; int spawn_offset; /*** declare other variables here ***/ unsigned int prime; #ifdef LONG64 /* 64 bit integer types */ unsigned LONG64 state, multiplier; unsigned LONG64 s0, s1, s2, s3, s4; #else /* No 64 bit type available, so use array of floats */ double state[3], multiplier[3];/* simulate 64 bit arithmetic */ int s0, s1, s2, s3, s4; #endif }; /*************************************************************************/ /* You should not need to look at the next few lines! */ #define INIT_SEED1 0x2bc6ffffU #define INIT_SEED0 0x8cfe166dU #define TWO_M22 2.384185791015625e-07 /* 2^(-22) */ #define TWO_P22 4194304 /* 2^(22) */ #define TWO_M20 9.5367431640625e-07 /* 2^(-20) */ #define TWO_P20 1048576 /* 2^(20) */ #define TWO_M42 2.273736754432321e-13 /* 2^(-42) */ #define TWO_M64 5.4210108624275222e-20 /* 2^(-64) */ /* */ /************************************************************************/ int NGENS=0; /* number of random streams in current process */ /* Initialize random number stream */ #ifdef __STDC__ int *init_rng( int gennum, int total_gen, int seed, int param) #else int *init_rng(gennum,total_gen,seed,param) int gennum,param,seed,total_gen; #endif { /* gives back one stream (node gennum) with updated spawning */ /* info; should be called total_gen times, with different value */ /* of gennum in [0,total_gen) each call */ struct rngen *genptr; int i; double tempdbl; if (total_gen <= 0) /* Is total_gen valid ? */ { total_gen = 1; fprintf(stderr,"WARNING - init_rng: Total_gen <= 0. Default value of 1 used for total_gen\n"); } if (gennum >= MAX_STREAMS) /* check if gen_num is valid */ fprintf(stderr,"WARNING - init_rng: gennum: %d > maximum number of independent streams: %d\n\tIndependence of streams cannot be guranteed.\n", gennum, MAX_STREAMS); if (gennum < 0 || gennum >= total_gen) /* check if gen_num is valid */ { fprintf(stderr,"ERROR - init_rng: gennum %d out of range [%d,%d).\n", gennum, 0, total_gen); return (int *) NULL; } if (param < 0 || param >= NPARAMS) /* check if parameter is valid */ { fprintf(stderr,"WARNING - init_rng: parameter not valid. Using Default parameter.\n"); param = 0; } genptr = (struct rngen *) mymalloc(1*sizeof(struct rngen)); if(genptr == NULL) /* check if memory allocated for data structure */ return NULL; /* Initiallize data structure variables */ genptr->gentype = GENTYPE; genptr->stream_number = gennum; genptr->nstreams = total_gen; genptr->init_seed = seed & 0x7fffffff; /* Only 31 LSB of seed considered */ genptr->parameter = param; genptr->spawn_offset = total_gen; /*** Change the next line depending on your generators data needs ***/ genptr->narrays = 0; /* number of arrays needed by your generator */ if(genptr->narrays > 0) { genptr->array_sizes = (int *) mymalloc(genptr->narrays*sizeof(int)); genptr->arrays = (int **) mymalloc(genptr->narrays*sizeof(int *)); if(genptr->array_sizes == NULL || genptr->arrays == NULL) return NULL; } else { genptr->array_sizes = NULL; genptr->arrays = NULL; } /*** Change the next line depending on your generators data needs ***/ /* initiallize ...array_sizes to the sizes of the arrays */ for(i=0; inarrays; i++) { genptr->arrays[i] = (int *) mymalloc(genptr->array_sizes[i]*sizeof(int)); if(genptr->arrays[i] == NULL) /* check if memory allocated for data structure */ return NULL; } /*** Add initialization statements for your data in the arrays and other variables you have defined ***/ getprime(1,&genptr->prime,gennum); #ifdef LONG64 genptr->multiplier = ((unsigned LONG64) PARAMLIST[param][1])<<32 | ((unsigned LONG64) PARAMLIST[param][0]); genptr->state = ( ((unsigned LONG64) INIT_SEED1)<<32 | INIT_SEED0) ^(((unsigned LONG64) seed<<33)|gennum); #else genptr->multiplier[0] = (double) (PARAMLIST[param][0]&0x3fffff); genptr->multiplier[1] = (double) (PARAMLIST[param][0]>>22 | (PARAMLIST[param][1]&0xfff)<<10); genptr->multiplier[2] = (double) (PARAMLIST[param][1]>>12); genptr->state[0] = (double) ((INIT_SEED0^gennum)&0x3fffff); genptr->state[1] = (double) ((INIT_SEED0^gennum)>>22 | ((INIT_SEED1 ^ (unsigned)seed<<1)&0xfff)<<10); genptr->state[2] = (double) ((INIT_SEED1 ^ (unsigned)seed<<1)>>12); #endif genptr->s0 = genptr->s1 = genptr->s2 = genptr->s3 = genptr->s4 = /*0xfffffff*/ 0x1; for(i=0; i<127*genptr->stream_number; i++) tempdbl = get_rn_dbl((int *) genptr); NGENS++; /* NGENS = # of streams */ return (int *) genptr; } #ifdef LONG64 #define advance_state(genptr) genptr->state = genptr->state*genptr->multiplier + genptr->prime; #else #define advance_state(genptr) {double t0, t1, t2, t3, st0, st1, st2;\ t0 = genptr->state[0]*genptr->multiplier[0] + genptr->prime;\ t1 = (double) (int) (t0*TWO_M22); \ st0 = t0 - TWO_P22*t1; \ assert( (int) st0 == st0); \ t1 += genptr->state[1]*genptr->multiplier[0] + \ genptr->state[0]*genptr->multiplier[1]; \ t2 = (double) (int) (t1*TWO_M22); \ st1 = t1 - TWO_P22*t2; \ assert( (int) st1 == st1); \ t2 += genptr->state[2]*genptr->multiplier[0] + \ genptr->state[1]*genptr->multiplier[1] + \ genptr->state[0]*genptr->multiplier[2];\ t3 = (double) (int) (t2*TWO_M20); \ st2 = t2 - TWO_P20*t3; \ assert( (int) st2 == st2); \ genptr->state[0] = st0; \ genptr->state[1] = st1; \ genptr->state[2] = st2;} #endif #define m1 2147483647 #define a0 107374182 #define a4 104480 #define q0 20 #define q4 20554 #define r0 7 #define r4 1727 #ifdef LONG64 #define advance_cmrg(genptr) {unsigned LONG64 p;\ advance_state(genptr);\ p = a0*genptr->s0 + a4*genptr->s4;\ p = (p>>31) + (p&0x7fffffff);\ if(p&0x80000000) p = (p+1)&0x7fffffff;\ genptr->s4=genptr->s3; genptr->s3=genptr->s2;genptr->s2=genptr->s1;genptr->s1=genptr->s0;genptr->s0=p;} #else #define advance_cmrg(genptr) {int h, p0, p4;\ advance_state(genptr);\ h=genptr->s4/q4;p4=a4*(genptr->s4-h*q4)-h*r4;\ genptr->s4=genptr->s3;genptr->s3=genptr->s2;genptr->s2=genptr->s1;genptr->s1=genptr->s0;\ h=genptr->s0/q0; p0=a0*(genptr->s0-h*q0)-h*r0;\ if(p0<0) p0+=m1; if(p4>0)p4-=m1;\ genptr->s0=p0+p4; if(genptr->s0<0) genptr->s0+=m1;} #endif /* Returns a double precision random number */ #ifdef __STDC__ double get_rn_dbl(int *igenptr) #else double get_rn_dbl(igenptr) int *igenptr; #endif { struct rngen *genptr = (struct rngen *) igenptr; #ifdef LONG64 #ifdef _LONG_LONG #define EXPO 0x3ff0000000000000ULL #define MULT_MASK 0xffffffffffffffffULL #else #define EXPO 0x3ff0000000000000UL #define MULT_MASK 0xffffffffffffffffUL #endif static double dtemp[1] = {0.0}; advance_cmrg(genptr); #if defined(CONVEX) || defined(O2K) || defined(SGI) || defined(GENERIC) *((unsigned LONG64 *) dtemp) = (((genptr->state+(genptr->s0<<32))&MULT_MASK)>>12) | EXPO; return *dtemp - (double) 1.0; #else return ((genptr->state+(genptr->s0<<32))&MULT_MASK)*TWO_M64; #endif #else /* 32 bit machine */ #define EXPO 0x3ff00000 #ifdef LittleEndian #define MSB 1 #else #define MSB 0 #endif #define LSB (1-MSB) double ans; unsigned int ist0, ist1, ist2, tempi, tempi2; static double temp[1] = {0.0}; advance_cmrg(genptr); ist0 = genptr->state[0]; ist1 = genptr->state[1]; ist2 = genptr->state[2]; tempi2 = ist2<<12 | ist1>>10; tempi = (genptr->s0+tempi2)&0xffffffff; /* add modulo 2^64 */ ist1 = (ist1&0x3ff) | (tempi&0xfff)<<10; ist2 = tempi>>12; #if defined(HP) || defined(SUN) || defined(SOLARIS) || defined(GENERIC) /*IEEE mantissa is 52 bits. */ ((unsigned int *)temp)[LSB] = (ist1<<10 | ist0>>12); ((unsigned int *)temp)[MSB] = EXPO | ist2; return *temp - (double) 1.0; #else return ist2*TWO_M20 + ist1*TWO_M42 + ist0*TWO_M64; #endif #endif } /* Return a random integer */ #ifdef __STDC__ int get_rn_int(int *igenptr) #else int get_rn_int(igenptr) int *igenptr; #endif { #ifdef LONG64 struct rngen *genptr = (struct rngen *) igenptr; advance_cmrg(genptr); return ((genptr->state+(genptr->s0<<32))&MULT_MASK)>>33; #else return (int) (get_rn_dbl(igenptr)*0x80000000U); #endif } /* Return a single precision random number */ #ifdef __STDC__ float get_rn_flt(int *igenptr) #else float get_rn_flt(igenptr) int *igenptr; #endif { /* If you have a more efficient way of computing the random integer, then please replace the statement below with your scheme. */ return (float) get_rn_dbl(igenptr); } #undef m1 #undef a0 #undef a4 #undef q0 #undef q4 #undef r0 #undef r4 /*************************************************************************/ /*************************************************************************/ /* SPAWN_RNG: spawns new generators */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int spawn_rng(int *igenptr, int nspawned, int ***newgens, int checkid) #else int spawn_rng(igenptr,nspawned, newgens, checkid) int *igenptr,nspawned, ***newgens, checkid; #endif { struct rngen **genptr, *tempptr = (struct rngen *) igenptr; int i, j; if (nspawned <= 0) /* is nspawned valid ? */ { nspawned = 1; fprintf(stderr,"WARNING - spawn_rng: nspawned <= 0. Default value of 1 used for nspawned\n"); } genptr = (struct rngen **) mymalloc(nspawned*sizeof(struct rngen *)); if(genptr == NULL) /* allocate memory for pointers to structures */ { *newgens = NULL; return 0; } for(i=0; istream_number + tempptr->spawn_offset*(i+1); if(gennum > MAX_STREAMS) /* change seed to avoid repeating sequence */ seed = (tempptr->init_seed)^gennum; else seed = tempptr->init_seed; /* Initialize a stream. This stream has incorrect spawning information. But we will correct it below. */ genptr[i] = (struct rngen *) init_rng(gennum, gennum+1, seed, tempptr->parameter); if(genptr[i] == NULL) /* Was generator initiallized? */ { nspawned = i; break; } genptr[i]->spawn_offset = (nspawned+1)*tempptr->spawn_offset; } tempptr->spawn_offset *= (nspawned+1); *newgens = (int **) genptr; if(checkid != 0) for(i=0; inarrays; i++) free(q->arrays[i]); if(q->narrays > 0) { free(q->array_sizes); free(q->arrays); } free(q); NGENS--; return NGENS; } #ifdef __STDC__ int pack_rng( int *genptr, char **buffer) #else int pack_rng(genptr,buffer) int *genptr; char **buffer; #endif { unsigned char *p, *initp; int size, i; unsigned int temp, m[2]; struct rngen *q; q = (struct rngen *) genptr; size = 64 + strlen(q->gentype)+1; initp = p = (unsigned char *) mymalloc(size); /* allocate memory */ /* The new load/store routines make using sizeof unnecessary. Infact, */ /* using sizeof could be erroneous. */ if(p == NULL) { *buffer = NULL; return 0; } strcpy((char *)p,q->gentype); p += strlen(q->gentype)+1; p += store_int(q->stream_number,4,p); p += store_int(q->nstreams,4,p); p += store_int(q->init_seed,4,p); p += store_int(q->parameter,4,p); p += store_int(q->narrays,4,p); p += store_int(q->spawn_offset,4,p); p += store_int(q->prime,4,p); #ifdef LONG64 /* 64 bit integer types */ p += store_long64(q->state,8,p); p += store_long64(q->multiplier,8,p); p += store_long64(q->s0,4,p); p += store_long64(q->s1,4,p); p += store_long64(q->s2,4,p); p += store_long64(q->s3,4,p); p += store_long64(q->s4,4,p); #else /* No 64 bit type available */ m[0] = q->state[2]; temp = q->state[1];m[0]=(m[0]<<12)|(temp>>10); m[1] = q->state[1]; temp = q->state[0];m[1]=(m[1]<<22)|(temp); p += store_intarray(m,2,4,p); m[0] = q->multiplier[2]; temp = q->multiplier[1];m[0]=(m[0]<<12)|(temp>>10); m[1] = q->multiplier[1]; temp = q->multiplier[0];m[1]=(m[1]<<22)|(temp); p += store_intarray(m,2,4,p); p += store_int(*(unsigned int *)&q->s0,4,p); p += store_int(*(unsigned int *)&q->s1,4,p); p += store_int(*(unsigned int *)&q->s2,4,p); p += store_int(*(unsigned int *)&q->s3,4,p); p += store_int(*(unsigned int *)&q->s4,4,p); #endif *buffer = (char *) initp; assert(p-initp == size); return p-initp; } #ifdef __STDC__ int *unpack_rng( char *packed) #else int *unpack_rng(packed) char *packed; #endif { struct rngen *q; unsigned int i, m[2]; unsigned char *p; p = (unsigned char *) packed; q = (struct rngen *) mymalloc(sizeof(struct rngen)); if(q == NULL) return NULL; if(strcmp((char *)p,GENTYPE) != 0) { fprintf(stderr,"ERROR: Unpacked ' %.24s ' instead of ' %s '\n", p, GENTYPE); return NULL; } else q->gentype = GENTYPE; p += strlen(q->gentype)+1; p += load_int(p,4,(unsigned int *)&q->stream_number); p += load_int(p,4,(unsigned int *)&q->nstreams); p += load_int(p,4,(unsigned int *)&q->init_seed); p += load_int(p,4,(unsigned int *)&q->parameter); p += load_int(p,4,(unsigned int *)&q->narrays); p += load_int(p,4,(unsigned int *)&q->spawn_offset); p += load_int(p,4,&q->prime); #ifdef LONG64 /* 64 bit integer types */ p += load_long64(p,8,&q->state); p += load_long64(p,8,&q->multiplier); p += load_long64(p,4,&q->s0); p += load_long64(p,4,&q->s1); p += load_long64(p,4,&q->s2); p += load_long64(p,4,&q->s3); p += load_long64(p,4,&q->s4); #else /* No 64 bit type available */ p += load_intarray(p,2,4,m); q->state[0] = (double) (m[1]&0x3fffff); q->state[1] = (double) ((m[1]>>22) | (m[0]&0xfff)<<10); q->state[2] = (double) (m[0]>>12); p += load_intarray(p,2,4,m); q->multiplier[0] = (double) (m[1]&0x3fffff); q->multiplier[1] = (double) ((m[1]>>22) | (m[0]&0xfff)<<10); q->multiplier[2] = (double) (m[0]>>12); p += load_int(p,4,(unsigned int *)&q->s0); p += load_int(p,4,(unsigned int *)&q->s1); p += load_int(p,4,(unsigned int *)&q->s2); p += load_int(p,4,(unsigned int *)&q->s3); p += load_int(p,4,(unsigned int *)&q->s4); #endif q->array_sizes = NULL; q->arrays = NULL; NGENS++; return (int *) q; } #ifdef __STDC__ int get_seed_rng(int *gen) #else int get_seed_rng(gen) int *gen; #endif { return ((struct rngen *) gen)->init_seed; } #ifdef __STDC__ int print_rng( int *igen) #else int print_rng(igen) int *igen; #endif { struct rngen *gen; printf("\n%s\n", GENTYPE+2); gen = (struct rngen *) igen; printf("\n \tseed = %d, stream_number = %d\tparameter = %d\n\n", gen->init_seed, gen->stream_number, gen->parameter); return 1; } /* HAS ;-) */ #if 0 #include "simple_.h" #include "../fwrap_.h" #endif tree-puzzle-5.2/src/sprng/Makefile.am0000644000076400001440000000321310073365177013313 # # Makefile.am for SPRNG 1.0 # SPRNG itself is written by Mascagni and Srinivasan (2000) # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # ALL_OBJS = \ makeseed.$(OBJEXT) \ store.$(OBJEXT) \ memory.$(OBJEXT) \ checkid.$(OBJEXT) \ lcg64.$(OBJEXT) \ primes-lcg64.$(OBJEXT) EXTRA_DIST = \ README \ sprng.h \ checkid.c \ communicate.c \ int64.h \ interface.h \ makeseed.c \ memory.c \ memory.h \ multiply.h \ cmrg.c \ mlfg.c \ lcg.c \ lcg64.c \ lfg.c \ primelist-lcg.h \ primelist-lcg64.h \ primes-lcg.c \ primes-lcg.h \ primes-lcg64.c \ primes-lcg64.h \ store.c \ store.h SCOMPILE = $(CC) $(SDEFS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(SCFLAGS) $(CFLAGS) all: $(ALL_OBJS) makeseed.$(OBJEXT) : makeseed.c Makefile $(SCOMPILE) -c makeseed.c store.$(OBJEXT) : store.c store.h Makefile $(SCOMPILE) -c store.c memory.$(OBJEXT) : memory.c Makefile $(SCOMPILE) -c memory.c checkid.$(OBJEXT) : checkid.c memory.h Makefile $(SCOMPILE) -c checkid.c lcg64.$(OBJEXT) : interface.h lcg64.c memory.h primes-lcg64.h multiply.h store.h Makefile $(SCOMPILE) -c lcg64.c primes-lcg64.$(OBJEXT) : primes-lcg64.h primes-lcg64.c primelist-lcg64.h Makefile $(SCOMPILE) -c primes-lcg64.c clean: rm -f *.o *.a tree-puzzle-5.2/src/sprng/Makefile.in0000644000076400001440000001560110075305507013321 # Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am for SPRNG 1.0 # SPRNG itself is written by Mascagni and Srinivasan (2000) # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MPICC = @MPICC@ MPICC0 = @MPICC0@ MPICC1 = @MPICC1@ MPICC2 = @MPICC2@ MPICC3 = @MPICC3@ MPICC4 = @MPICC4@ MPICC5 = @MPICC5@ MPICC6 = @MPICC6@ MPICFLAGS = @MPICFLAGS@ MPIDEFS = @MPIDEFS@ MPILIBS = @MPILIBS@ PACKAGE = @PACKAGE@ PPUZZLE = @PPUZZLE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ ALL_OBJS = \ makeseed.$(OBJEXT) \ store.$(OBJEXT) \ memory.$(OBJEXT) \ checkid.$(OBJEXT) \ lcg64.$(OBJEXT) \ primes-lcg64.$(OBJEXT) EXTRA_DIST = \ README \ sprng.h \ checkid.c \ communicate.c \ int64.h \ interface.h \ makeseed.c \ memory.c \ memory.h \ multiply.h \ cmrg.c \ mlfg.c \ lcg.c \ lcg64.c \ lfg.c \ primelist-lcg.h \ primelist-lcg64.h \ primes-lcg.c \ primes-lcg.h \ primes-lcg64.c \ primes-lcg64.h \ store.c \ store.h SCOMPILE = $(CC) $(SDEFS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(SCFLAGS) $(CFLAGS) subdir = src/sprng mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = README Makefile.am Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/sprng/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: tags: TAGS TAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic uninstall uninstall-am uninstall-info-am all: $(ALL_OBJS) makeseed.$(OBJEXT) : makeseed.c Makefile $(SCOMPILE) -c makeseed.c store.$(OBJEXT) : store.c store.h Makefile $(SCOMPILE) -c store.c memory.$(OBJEXT) : memory.c Makefile $(SCOMPILE) -c memory.c checkid.$(OBJEXT) : checkid.c memory.h Makefile $(SCOMPILE) -c checkid.c lcg64.$(OBJEXT) : interface.h lcg64.c memory.h primes-lcg64.h multiply.h store.h Makefile $(SCOMPILE) -c lcg64.c primes-lcg64.$(OBJEXT) : primes-lcg64.h primes-lcg64.c primelist-lcg64.h Makefile $(SCOMPILE) -c primes-lcg64.c clean: rm -f *.o *.a # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tree-puzzle-5.2/src/sprng/mlfg.c0000644000076400001440000004704207756425720012365 /*************************************************************************/ /*************************************************************************/ /* Parallel Multiplicative Lagged Fibonacci Generator */ /* */ /* Author: Ashok Srinivasan, */ /* NCSA, University of Illinois, Urbana-Champaign */ /* E-Mail: ashoks@ncsa.uiuc.edu */ /* */ /* Disclaimer: NCSA expressly disclaims any and all warranties, expressed*/ /* or implied, concerning the enclosed software. The intent in sharing */ /* this software is to promote the productive interchange of ideas */ /* throughout the research community. All software is furnished on an */ /* "as is" basis. No further updates to this software should be */ /* expected. Although this may occur, no commitment exists. The authors */ /* certainly invite your comments as well as the reporting of any bugs. */ /* NCSA cannot commit that any or all bugs will be fixed. */ /*************************************************************************/ /*************************************************************************/ /* This is version 0.2, created 26 Dec 1997 */ #include #include #include #define NDEBUG #include #include "memory.h" #include "interface.h" #include "int64.h" #define VERSION "00" /*** Name for Generator ***/ #define GENTYPE VERSION "Multiplicative Lagged Fibonacci Generator" #define NPARAMS 11 /* number of valid parameters */ int MAX_STREAMS = 0x7fffffff; /* Maximum number streams to init_sprng */ struct rngen { char *gentype; int stream_number; int nstreams; int init_seed; int parameter; int narrays; int *array_sizes; int **arrays; uint64 *lags; uint64 *si; int hptr; /* integer pointer into fill */ int lval, kval, seed; }; struct vstruct { int L; int K; int LSBS; /* number of least significant bits that are 1 */ int first; /* the first seed whose LSB is 1 */ }; const struct vstruct valid[] = { {17,5,1,10}, {31,6,1,2}, {55,24,1,11}, {63,31,1,14}, {127,97,1,21}, {521,353,1,100}, {521,168,1,83}, {607,334,1,166}, {607,273,1,105}, {1279,418,1,208}, {1279,861,1,233} }; #define TWO_M52 2.2204460492503131e-16 /* 2^(-52) */ #define TWO_M64 5.4210108624275222e-20 /* 2^(-64) */ #define BITS 62 /* Initialization of ALFG part is m-2 bits */ #define MAX_BIT_INT (BITS-2) #define RUNUP (2*BITS) /* Do RUNUP iterations after initialization */ #define GS0 0x372f05ac #ifdef LONG64 #define INT_MOD_MASK (MASK64>>(64-BITS)) #define INT_MASK (MASK64>>(64-BITS+1)) #define INTX2_MASK ((((uint64)1)<=0;i--) { new_fill[0] = (new_fill[0]<<1) | (1&bitcnt(reg_fill[0]&temp)); new_fill[1] = (new_fill[1]<<1) | (1&bitcnt(reg_fill[1]&temp)); temp >>= 1; } for (i=28;i<32;i++) { temp = bitcnt(reg_fill[0]&(mask<>(32-i))); new_fill[0] |= (1&temp)<=0;i--) { and(b[i],mask1,temp1) if(notzero(temp1)) add(a[i+1],ONE,a[i+1]); and(b[i],INTX2_MASK,temp1); lshift(temp1,1,a[i]); } } static void pow3(uint64 n, uint64 *ui) /* return 3^n (mod 2^BITS) */ { uint64 p, value, temp, bit, temp2, temp3; int exponent; set(n,p); seti(3,temp); seti(1,temp3); and(n,temp3,temp2); if(notzero(temp2)) seti(3,value) else seti(1,value) seti(1,bit); for(exponent=2; exponent<64; exponent++) { multiply(temp,temp,temp); lshift(bit,1,bit); and(bit,n,temp2); if(notzero(temp2)) multiply(value,temp,value); } and(value,MASK64,value); set(value,(*ui)); } static void findseed(int sign, uint64 n, uint64 *ui) { uint64 temp; pow3(n,&temp); if(sign&1) multiply(temp,MINUS1,temp); set(temp,(*ui)); } #define advance_state(genptr) {int lval = genptr->lval, kval = genptr->kval;\ int lptr;\ genptr->hptr--;\ if(genptr->hptr < 0)\ genptr->hptr = lval-1;\ lptr = genptr->hptr + kval;\ if (lptr>=lval)\ lptr -= lval;\ multiply(genptr->lags[genptr->hptr],genptr->lags[lptr],genptr->lags[genptr->hptr]);} static struct rngen **initialize(int ngen, int param, unsigned int seed, uint64 *nstart, unsigned int initseed) { int i,j,k,l,m,*order, length; struct rngen **q; uint64 *nindex, temp1, mask; length = valid[param].L; order = (int *) mymalloc(ngen*sizeof(int)); q = (struct rngen **) mymalloc(ngen*sizeof(struct rngen *)); if (q == NULL || order == NULL) return NULL; for (i=0;ihptr = 0; /* This is reset to lval-1 before first iteration */ q[i]->si = (uint64 *) mymalloc((length-1)*sizeof(uint64)); q[i]->lags = (uint64 *) mymalloc(length*sizeof(uint64)); q[i]->lval = length; q[i]->kval = valid[param].K; q[i]->parameter = param; q[i]->seed = seed; q[i]->init_seed = initseed; q[i]->narrays=2; q[i]->gentype = GENTYPE; if (q[i]->lags == NULL || q[i]->si == NULL) return NULL; } /* specify register fills and node number arrays */ /* do fills in tree fashion so that all fills branch from index */ /* contained in nstart array */ q[0]->stream_number = lowword(nstart[0]); get_fill(nstart,q[0]->lags,param,seed); si_double(q[0]->si,nstart,length); set(ONE,mask); for(m=0; mlags[m], &q[0]->lags[m]); else findseed(0,q[0]->lags[m], &q[0]->lags[m]); lshift(mask,1,mask); } add(q[0]->si[0],ONE,q[0]->si[0]); i = 1; order[0] = 0; if (ngen>1) while (1) { l = i; for (k=0;ksi; q[i]->stream_number = lowword(nindex[0]); get_fill(nindex,q[i]->lags,param,seed); si_double(nindex,nindex, length); for (j=0;jsi[j]); set(ONE,mask); for(m=0; mlags[m], &q[i]->lags[m]); else findseed(0,q[i]->lags[m], &q[i]->lags[m]); lshift(mask,1,mask); } add(q[i]->si[0],ONE,q[i]->si[0]); if (ngen == ++i) break; } if (ngen == i) break; for (k=l-1;k>0;k--) { order[2*k+1] = l+k; order[2*k] = order[k]; } order[1] = l; } free(order); for (i=ngen-1;i>=0;i--) { k = 0; for (j=1;jsi[j])) k = 1; if (!k) break; for (j=0;j=0) { for (j=0;j<4*length;j++) advance_state(q[i]); i--; } return q; } /* Initialize random number stream */ #ifdef __STDC__ int *init_rng( int gennum, int total_gen, int seed, int param) #else int *init_rng(gennum,total_gen,seed,param) int gennum,param,seed,total_gen; #endif { /* gives back one stream (node gennum) with updated spawning */ /* info; should be called total_gen times, with different value */ /* of gennum in [0,total_gen) each call */ struct rngen **p=NULL, *genptr; uint64 *nstart=NULL,*si; int i, length, k; if (total_gen <= 0) /* Is total_gen valid ? */ { total_gen = 1; fprintf(stderr,"WARNING - init_rng: Total_gen <= 0. Default value of 1 used for total_gen\n"); } if (gennum >= MAX_STREAMS) /* check if gen_num is valid */ fprintf(stderr,"WARNING - init_rng: gennum: %d > maximum number of independent streams: %d\n\tIndependence of streams cannot be guranteed.\n", gennum, MAX_STREAMS); if (gennum < 0 || gennum >= total_gen) /* check if gen_num is valid */ { fprintf(stderr,"ERROR - init_rng: gennum %d out of range [%d,%d).\n", gennum, 0, total_gen); return (int *) NULL; } seed &= 0x7fffffff; /* Only 31 LSB of seed considered */ if (param < 0 || param >= NPARAMS) /* check if parameter is valid */ { fprintf(stderr,"WARNING - init_rng: parameter not valid. Using Default parameter.\n"); param = 0; } length = valid[param].L; /* determine parameters */ k = valid[param].K; /* define the starting vector for the initial node */ nstart = (uint64 *) mymalloc((length-1)*sizeof(uint64)); if (nstart == NULL) return NULL; seti(gennum,nstart[0]); for (i=1;isi; while (lowword(si[0]) < total_gen && !highword(si[0])) si_double(si,si,length); NGENS++; genptr->stream_number = gennum; genptr->nstreams = total_gen; genptr->array_sizes = (int *) mymalloc(genptr->narrays*sizeof(int)); genptr->arrays = (int **) mymalloc(genptr->narrays*sizeof(int *)); if(genptr->array_sizes == NULL || genptr->arrays == NULL) return NULL; genptr->arrays[0] = (int *) genptr->lags; genptr->arrays[1] = (int *) genptr->si; genptr->array_sizes[0] = genptr->lval*sizeof(uint64)/sizeof(int); genptr->array_sizes[1] = (genptr->lval-1)*sizeof(uint64)/sizeof(int); return (int *) genptr; } /* Returns a double precision random number */ #ifdef __STDC__ double get_rn_dbl(int *igenptr) #else double get_rn_dbl(igenptr) int *igenptr; #endif { struct rngen *genptr = (struct rngen *) igenptr; advance_state(genptr); /*printf("\t sprng: %lu\n", genptr->lags[genptr->hptr]);*/ #ifdef LONG64 return (genptr->lags[genptr->hptr]>>12)*TWO_M52; #else return (genptr->lags[genptr->hptr][1])*TWO_M32 + (genptr->lags[genptr->hptr][0])*TWO_M64; #endif } /* Return a random integer */ #ifdef __STDC__ int get_rn_int(int *igenptr) #else int get_rn_int(igenptr) int *igenptr; #endif { struct rngen *genptr = (struct rngen *) igenptr; advance_state(genptr); #ifdef LONG64 return genptr->lags[genptr->hptr]>>33; #else return genptr->lags[genptr->hptr][1]>>1; #endif } /* Return a single precision random number */ #ifdef __STDC__ float get_rn_flt(int *igenptr) #else float get_rn_flt(igenptr) int *igenptr; #endif { /* If you have a more efficient way of computing the random integer, then please replace the statement below with your scheme. */ return (float) get_rn_dbl(igenptr); } /*************************************************************************/ /*************************************************************************/ /* SPAWN_RNG: spawns new generators */ /*************************************************************************/ /*************************************************************************/ #ifdef __STDC__ int spawn_rng(int *igenptr, int nspawned, int ***newgens, int checkid) #else int spawn_rng(igenptr,nspawned, newgens, checkid) int *igenptr,nspawned, ***newgens, checkid; #endif { struct rngen **genptr, *temp = (struct rngen *) igenptr; int i; uint64 *p; if (nspawned <= 0) /* is nspawned valid ? */ { nspawned = 1; fprintf(stderr,"WARNING - spawn_rng: nspawned <= 0. Default value of 1 used for nspawned\n"); } p = temp->si; genptr = initialize(nspawned,temp->parameter,temp->seed,p,temp->init_seed); if(genptr == NULL) /* allocate memory for pointers to structures */ { *newgens = NULL; return 0; } si_double(p,p,temp->lval); for(i=0; iarray_sizes = (int *) mymalloc(genptr[i]->narrays*sizeof(int)); genptr[i]->arrays = (int **) mymalloc(genptr[i]->narrays*sizeof(int *)); if(genptr[i]->array_sizes == NULL || genptr[i]->arrays == NULL) return 0; genptr[i]->arrays[0] = (int *) genptr[i]->lags; genptr[i]->arrays[1] = (int *) genptr[i]->si; genptr[i]->array_sizes[0] = genptr[i]->lval*sizeof(uint64)/sizeof(int); genptr[i]->array_sizes[1] = (genptr[i]->lval-1)*sizeof(uint64)/sizeof(int); } NGENS += nspawned; *newgens = (int **) genptr; if(checkid != 0) for(i=0; inarrays; i++) free(q->arrays[i]); if(q->narrays > 0) { free(q->array_sizes); free(q->arrays); } free(q); NGENS--; return NGENS; } #ifdef __STDC__ int pack_rng( int *genptr, char **buffer) #else int pack_rng(genptr,buffer) int *genptr; char **buffer; #endif { unsigned char *p, *initp; int size, i; struct rngen *q; q = (struct rngen *) genptr; size = 24+16*q->lval + strlen(q->gentype)+1; initp = p = (unsigned char *) mymalloc(size); /* allocate memory */ if(p == NULL) { *buffer = NULL; return 0; } strcpy((char *) p,q->gentype); p += strlen(q->gentype)+1; p += store_int(q->stream_number,4,p); p += store_int(q->nstreams,4,p); p += store_int(q->init_seed,4,p); p += store_int(q->parameter,4,p); p += store_int(q->hptr,4,p); p += store_int(q->lval,4,p); p += store_int(q->kval,4,p); p += store_int(q->seed,4,p); p += store_uint64array(q->si,q->lval-1,p); p += store_uint64array(q->lags,q->lval,p); *buffer = (char *) initp; assert(p-initp == size); return p-initp; } #ifdef __STDC__ int *unpack_rng( char *packed) #else int *unpack_rng(packed) char *packed; #endif { struct rngen *q; unsigned char *p; int i, found; q = (struct rngen *) mymalloc(sizeof(struct rngen)); if(q == NULL) return NULL; p = (unsigned char *) packed; if(strcmp((char *) p,GENTYPE) != 0) { fprintf(stderr,"ERROR: Unpacked ' %.24s ' instead of ' %s '\n", p, GENTYPE); return NULL; } else q->gentype = GENTYPE; p += strlen(q->gentype)+1; p += load_int(p,4,(unsigned int *)&q->stream_number); p += load_int(p,4,(unsigned int *)&q->nstreams); p += load_int(p,4,(unsigned int *)&q->init_seed); p += load_int(p,4,(unsigned int *)&q->parameter); p += load_int(p,4,(unsigned int *)&q->hptr); p += load_int(p,4,(unsigned int *)&q->lval); p += load_int(p,4,(unsigned int *)&q->kval); p += load_int(p,4,(unsigned int *)&q->seed); /* check values of parameters for consistency */ for(i=found=0; ilval==valid[i].L && q->kval==valid[i].K) { found = 1; break; } if(found == 0) { fprintf(stderr,"ERROR: Unpacked parameters are not acceptable.\n"); return NULL; } q->narrays = 2; q->array_sizes = (int *) mymalloc(q->narrays*sizeof(int)); q->arrays = (int **) mymalloc(q->narrays*sizeof(int *)); if(q->array_sizes == NULL || q->arrays == NULL) return NULL; q->array_sizes[0] = q->lval*sizeof(uint64)/sizeof(int); q->array_sizes[1] = (q->lval-1)*sizeof(uint64)/sizeof(int); for(i=0; inarrays; i++) { q->arrays[i] = (int *) mymalloc(q->array_sizes[i]*sizeof(int)); if(q->arrays[i] == NULL) return NULL; } q->lags = (uint64 *) q->arrays[0]; q->si = (uint64 *) q->arrays[1]; p += load_uint64array(p,q->lval-1,q->si); p += load_uint64array(p,q->lval,q->lags); NGENS++; return (int *) q; } #ifdef __STDC__ int get_seed_rng(int *gen) #else int get_seed_rng(gen) int *gen; #endif { return ((struct rngen *) gen)->init_seed; } #ifdef __STDC__ int print_rng( int *igen) #else int print_rng(igen) int *igen; #endif { struct rngen *gen; printf("\n%s\n", GENTYPE+2); gen = (struct rngen *) igen; printf("\n \tseed = %d, stream_number = %d\tparameter = %d\n\n", gen->init_seed, gen->stream_number, gen->parameter); return 1; } /* HAS ;-) */ #if 0 #include "simple_.h" #include "../fwrap_.h" #endif tree-puzzle-5.2/src/sprng/communicate.c0000644000076400001440000000175207754754335013747 #ifdef SPRNG_MPI #include #endif /* SPRNG_MPI */ #include #include "interface.h" #ifdef __STDC__ void get_proc_info_mpi(int *myid, int *nprocs) #else void get_proc_info_mpi(myid, nprocs) int *myid, *nprocs; #endif { #ifdef SPRNG_MPI MPI_Comm_rank(MPI_COMM_WORLD, myid); MPI_Comm_size(MPI_COMM_WORLD, nprocs); #else *myid = 0; *nprocs = 1; #endif } #ifdef __STDC__ int make_new_seed_mpi(void) #else int make_new_seed_mpi() #endif { #ifdef SPRNG_MPI unsigned int temp2; int myid, nprocs; MPI_Comm newcomm; MPI_Comm_dup(MPI_COMM_WORLD, &newcomm); /* create a temporary communicator */ MPI_Comm_rank(newcomm, &myid); MPI_Comm_size(newcomm, &nprocs); if(myid == 0) temp2 = make_new_seed(); MPI_Bcast(&temp2,1,MPI_UNSIGNED,0,newcomm); MPI_Comm_free(&newcomm); return temp2; #else return make_new_seed(); #endif } /* HAS ;-) */ #ifdef SPRNG_MPI_TEST main() { printf("%u\n", make_new_seed()); printf("%u\n", make_new_seed()); } #endif tree-puzzle-5.2/src/sprng/checkid.c0000644000076400001440000000351007756435656013033 #include #include #include "memory.h" #define CHECK_MASK 0x1c /* Assumes exactly last two bits are 0 ... */ /* ... If not, change checklist dimension */ typedef struct checkidstruct { int *ID; struct checkidstruct *next; } Checklisttype; Checklisttype checklist[(CHECK_MASK>>2)+1] = {{NULL,NULL},{NULL,NULL},{NULL,NULL},{NULL,NULL}}; #ifdef __STDC__ int *checkID( int *ptr) #else int *checkID(ptr) int *ptr; #endif { int bucket; Checklisttype *next; if(ptr == NULL) return NULL; bucket = (((long) ptr)&CHECK_MASK)>>2; next = checklist[bucket].next; while(next != NULL) { if(next->ID == ptr) { return (int *) ptr; } else { next = next->next; } } fprintf(stderr,"ERROR: Invalid generator ID %p\n", ptr); return NULL; } #ifdef __STDC__ int *deleteID( int *ptr) #else int *deleteID(ptr) int *ptr; #endif { int bucket; Checklisttype *next, *temp; if(ptr == NULL) return NULL; bucket = (((long) ptr)&CHECK_MASK)>>2; next = &checklist[bucket]; while(next->next != NULL) if(next->next->ID == ptr) { temp = next->next; next->next = next->next->next; free(temp); return (int *) ptr; } else { next = next->next; } fprintf(stderr,"ERROR: Invalid generator ID %p\n", ptr); return NULL; } #ifdef __STDC__ int *addID( int *ptr) #else int *addID(ptr) int *ptr; #endif { int bucket; Checklisttype *next, *temp; if(ptr == NULL) return NULL; bucket = (((long) ptr)&CHECK_MASK)>>2; temp = (Checklisttype *) mymalloc(sizeof(Checklisttype)); if(temp == NULL) return NULL; temp->ID = (int *) ptr; temp->next = checklist[bucket].next; checklist[bucket].next = temp; return (int *) ptr; } tree-puzzle-5.2/src/sprng/int64.h0000644000076400001440000000760207755111260012375 #ifndef _INT64_H_ #define _INT64_H_ /* used by mlfg */ #include #include "store.h" #ifndef __STDC__ #define const /* old C does not have 'const' qualifier */ #endif #if LONG_MAX > 2147483647L #if LONG_MAX > 35184372088831L #if LONG_MAX >= 9223372036854775807L #define LONG_SPRNG #define LONG64 long /* 64 bit long */ #endif #endif #endif #if !defined(LONG_SPRNG) && defined(_LONG_LONG) #define LONG64 long long #endif #ifdef LONG64 typedef unsigned LONG64 uint64; #ifdef LONG_SPRNG #define MINUS1 0xffffffffffffffffUL /* -1 (mod 2^(BITS-2)) */ #define ONE 0x1UL #define MASK64 0xffffffffffffffffUL #else #define MINUS1 0xffffffffffffffffULL /* -1 (mod 2^(BITS-2)) */ #define ONE 0x1ULL #define MASK64 0xffffffffffffffffULL #endif #define multiply(a,b,c) {c = (a)*(b); c &= MASK64;} #define add(a,b,c) {c = (a)+(b); c &= MASK64;} #define decrement(a,c) {c = (a)-1; c &= MASK64;} #define and(a,b,c) {c = (a)&(b);} #define or(a,b,c) {c = (a)|(b);} #define xor(a,b,c) {c = (a)^(b);} #define notzero(a) (a==0?0:1) #define lshift(a,b,c) {c = (a)<<(b); c &= MASK64;} /* b is an int */ #define rshift(a,b,c) {c = (a)>>(b); c &= MASK64;} /* b is an int */ #define highword(a) ((unsigned int)((a)>>32)) #define lowword(a) ((unsigned int)((a)&0xffffffff)) #define set(a,b) {b = (a)&MASK64;} #define seti(a,b) {b = (a)&MASK64;} /* b is an int */ #define seti2(a,b,c) {c = (b); c <<= 32; c |= (a); c &= MASK64;}/*a,b=+int*/ #else /* Simulate 64 bit arithmetic on 32 bit integers */ typedef unsigned int uint64[2]; static const uint64 MASK64={0xffffffffU,0xffffffffU}; static const uint64 MINUS1={0xffffffffU,0xffffffffU}; /* -1 (mod 2^(BITS-2)) */ static uint64 ONE={0x1U,0x0U}; #define TWO_M32 2.3283064365386962e-10 /* 2^(-32) */ #define and(a,b,c) {c[0] = a[0]&b[0]; c[1] = a[1]&b[1];} #define or(a,b,c) {c[0] = a[0]|b[0]; c[1] = a[1]|b[1];} #define xor(a,b,c) {c[0] = a[0]^b[0]; c[1] = a[1]^b[1];} #define notzero(a) ((a[0]==0 && a[1]==0)?0:1) #define multiply(a,b,c) {c[1] = a[0]*b[1]+a[1]*b[0];\ c[1] += (unsigned int) (((double)a[0]*(double)b[0])\ *TWO_M32);\ c[0] = a[0]*b[0]; and(c,MASK64,c);} #define add(a,b,c) {unsigned int t = a[0]+b[0]; \ c[1] = a[1]+b[1]+(t>(32-b)); c[0] = a[0]<<(b);} else {c[1]=a[0]<<(b-32);c[0]=0;} and(c,MASK64,c); } static void rshift(uint64 a,int b,uint64 c) { if(b<32) {c[0] = (a[0]>>b)|(a[1]<<(32-b));c[1] = a[1]>>(b);} else {c[0]=a[1]>>(b-32);c[1]=0;} and(c,MASK64,c); } #define highword(a) ((a)[1]) #define lowword(a) ((a)[0]) #define set(a,b) {b[0] = a[0];b[1]=a[1];and(b,MASK64,b);} #define seti(a,b) {b[0] = a;b[1]=0;} /* b is an int */ #define seti2(a,b,c) {c[1] = b; c[0] = a; and(c,MASK64,c);}/*a,b = +ve int*/ #endif /* LONG64 or 32 bit */ static int store_uint64(uint64 l, unsigned char *c) { int i; unsigned int m[2]; m[0] = highword(l); m[1] = lowword(l); c += store_intarray(m,2,4,c); return 8; /* return number of chars filled */ } static int store_uint64array(uint64 *l, int n, unsigned char *c) { int i; for(i=0; i #include #ifdef __STDC__ void *_mymalloc(long size, int line, char *message) #else void *_mymalloc(size, line, message) long size; int line; char *message; #endif { char *temp; if(size == 0) return NULL; temp = (char *) malloc(size); if(temp == NULL) { fprintf(stderr,"\nmemory allocation failure in file: %s at line number: %d\n", message, line); return NULL; } return (void *) temp; } tree-puzzle-5.2/src/sprng/memory.h0000644000076400001440000000035307754747713012756 #define mymalloc(a) (_mymalloc((a), __LINE__, __FILE__)) #ifndef ANSI_ARGS #ifdef __STDC__ #define ANSI_ARGS(args) args #else #define ANSI_ARGS(args) () #endif #endif void *_mymalloc ANSI_ARGS((long size, int line, char *message)); tree-puzzle-5.2/src/treesort.c0000644000076400001440000005141410073365205012137 /* * treesort.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #define EXTERN extern #include "treesort.h" int YYY=0; /* fprintf(stderr, "YYY: %d (%s:%d)\n", YYY++, __FILE__, __LINE__); */ /*******************************************/ /* tree sorting */ /*******************************************/ /* compute address of the 4 int (sort key) in the 4 int node */ int ct_sortkeyaddr(int addr) { int a, res; a = addr % 4; res = addr - a + 3; return res; } /* ct_sortkeyaddr */ /**********/ /* compute address of the next edge pointer in a 4 int node (0->1->2->0) */ int ct_nextedgeaddr(int addr) { int a, res; a = addr % 4; if ( a == 2 ) { res = addr - 2; } else { res = addr + 1; } return res; } /* ct_nextedgeaddr */ /**********/ /* compute address of 1st edge of a 4 int node from node number */ int ct_1stedge(int node) { int res; res = 4 * node; return res; } /* ct_1stedge */ /**********/ /* compute address of 2nd edge of a 4 int node from node number */ int ct_2ndedge(int node) { int res; res = 4 * node +1; return res; } /* ct_2ndedge */ /**********/ /* compute address of 3rd edge of a 4 int node from node number */ int ct_3rdedge(int node) { int res; res = 4 * node +2; return res; } /* ct_3rdedge */ /**********/ /* check whether node 'node' is a leaf (2nd/3rd edge pointer = -1) */ int ct_isleaf(int node, int *ctree) { return (ctree[ct_3rdedge(node)] < 0); } /* ct_isleaf */ /**********/ /* compute node number of 4 int node from an edge addr. */ int ct_addr2node(int addr) { int a, res; a = addr % 4; res = (int) ((addr - a) / 4); return res; } /* ct_addr2node */ /**********/ /* print graph pointers for checking */ void printctree(int *ctree) { int n; for (n=0; n < 2*Maxspc; n++) { printf("n[%3d] = (%3d.%2d, %3d.%2d, %3d.%2d | %3d)\n", n, (int) ctree[ct_1stedge(n)]/4, (int) ctree[ct_1stedge(n)]%4, (int) ctree[ct_2ndedge(n)]/4, (int) ctree[ct_2ndedge(n)]%4, (int) ctree[ct_3rdedge(n)]/4, (int) ctree[ct_3rdedge(n)]%4, ctree[ct_3rdedge(n)+1]); } printf("\n"); } /* printctree */ /**********/ /* allocate memory for ctree 3 ints pointer plus 1 check byte */ int *initctree(void) { int *snodes; int n; snodes = (int *) calloc((size_t) (4 * 2 * Maxspc), sizeof(int)); if (snodes == NULL) maerror("snodes in copytree"); for (n=0; n<(4 * 2 * Maxspc); n++) { snodes[n]=-1; } return snodes; } /* initctree */ /**********/ /* free memory of a tree for sorting */ void freectree(int **snodes) { free(*snodes); *snodes = NULL; } /* freectree */ #if 0 /**********/ /* trueID (HAS) */ /* copy subtree recursively */ void copyOTU_trueID(int *ctree, /* in/out: tree array struct */ int *ct_nextnode,/* in/out: next free node */ int ct_curredge,/* in: currend edge to add subtree */ int *ct_nextleaf,/* in/out: next free leaf (0-maxspc) */ int ed, /* in: current edge in puzzling tree */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: external edge list */ int numleaves, /* in: number of leaves */ int *trueID) /* in: permutation vector */ { int i, nextcurredge; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < numleaves; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ nextcurredge = ct_1stedge(*ct_nextleaf); ctree[ct_curredge] = nextcurredge; ctree[nextcurredge] = ct_curredge; /* trueID (HAS) */ ctree[ct_sortkeyaddr(nextcurredge)] = trueID[i]; (*ct_nextleaf)++; return; } } } /* we are NOT on a leaf */ nextcurredge = ct_1stedge(*ct_nextnode); ctree[ct_curredge] = nextcurredge; ctree[nextcurredge] = ct_curredge; (*ct_nextnode)++; nextcurredge = ct_nextedgeaddr(nextcurredge); copyOTU_trueID(ctree, ct_nextnode, nextcurredge, ct_nextleaf, edge[ed].downleft->numedge, edge, edgeofleaf, numleaves, trueID); nextcurredge = ct_nextedgeaddr(nextcurredge); copyOTU_trueID(ctree, ct_nextnode, nextcurredge, ct_nextleaf, edge[ed].downright->numedge, edge, edgeofleaf, numleaves, trueID); } /* copyOTU_trueID */ /********/ /* trueID (HAS) */ /* copy treestructure to sorting structure */ void copytree_trueID(int *ctree, /* out: copy for effective sorting */ int *trueID, /* in: permutation vector */ ONEEDGE *edgeset, /* in: intermediate tree topology */ int *edgeofleaf, /* dito. */ int numleaves) /* in: number of leaves */ { int ct_curredge; int ct_nextleaf; int ct_nextnode; ct_nextnode = Maxspc; ct_curredge = ct_1stedge(ct_nextnode); ct_nextleaf = 1; ctree[ct_1stedge(0)] = ct_curredge; ctree[ct_curredge] = ct_1stedge(0); /* trueID (HAS) */ ctree[ct_sortkeyaddr(0)] = trueID[0]; ct_nextnode++; ct_curredge = ct_nextedgeaddr(ct_curredge); copyOTU_trueID(ctree, &ct_nextnode, ct_curredge, &ct_nextleaf, edgeset[edgeofleaf[0]].downleft->numedge, edgeset, edgeofleaf, numleaves, trueID); ct_curredge = ct_nextedgeaddr(ct_curredge); copyOTU_trueID(ctree, &ct_nextnode, ct_curredge, &ct_nextleaf, edgeset[edgeofleaf[0]].downright->numedge, edgeset, edgeofleaf, numleaves, trueID); } /* copytree_trueID */ #endif /**********/ /* copy subtree recursively */ void copyOTU(int *ctree, /* in/out: tree array struct */ int *ct_nextnode,/* in/out: next free node */ int ct_curredge,/* in: currend edge to add subtree */ int *ct_nextleaf,/* in/out: next free leaf (0-maxspc) */ int ed, /* in: current edge in puzzling tree */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: external edge list */ int numleaves) /* in: number of leaves */ { int nextcurredge; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { nextcurredge = ct_1stedge(*ct_nextleaf); ctree[ct_curredge] = nextcurredge; ctree[nextcurredge] = ct_curredge; ctree[ct_sortkeyaddr(nextcurredge)] = edge[ed].taxon; (*ct_nextleaf)++; return; } /* we are NOT on a leaf */ nextcurredge = ct_1stedge(*ct_nextnode); ctree[ct_curredge] = nextcurredge; ctree[nextcurredge] = ct_curredge; (*ct_nextnode)++; nextcurredge = ct_nextedgeaddr(nextcurredge); copyOTU(ctree, ct_nextnode, nextcurredge, ct_nextleaf, edge[ed].downleft->numedge, edge, edgeofleaf, numleaves); nextcurredge = ct_nextedgeaddr(nextcurredge); copyOTU(ctree, ct_nextnode, nextcurredge, ct_nextleaf, edge[ed].downright->numedge, edge, edgeofleaf, numleaves); } /* copyOTU */ /**********/ /* copy treestructure to sorting structure */ void copytree(int *ctree, /* out: copy for effective sorting */ ONEEDGE *edgeset, /* in: intermediate tree topology */ int *edgeofleaf, /* dito. */ int rootleaf, int numleaves) /* in: number of leaves */ { int ct_curredge; int ct_nextleaf; int ct_nextnode; ct_nextnode = Maxspc; ct_curredge = ct_1stedge(ct_nextnode); ct_nextleaf = 1; ctree[ct_1stedge(0)] = ct_curredge; ctree[ct_curredge] = ct_1stedge(0); ctree[ct_sortkeyaddr(0)] = rootleaf; ct_nextnode++; ct_curredge = ct_nextedgeaddr(ct_curredge); copyOTU(ctree, &ct_nextnode, ct_curredge, &ct_nextleaf, edgeset[edgeofleaf[rootleaf]].downleft->numedge, edgeset, edgeofleaf, numleaves); ct_curredge = ct_nextedgeaddr(ct_curredge); copyOTU(ctree, &ct_nextnode, ct_curredge, &ct_nextleaf, edgeset[edgeofleaf[rootleaf]].downright->numedge, edgeset, edgeofleaf, numleaves); } /* copytree */ /**********/ /* sort subtree from edge recursively by indices */ int sortOTU(int edge, int *ctree) { int key1, key2; int edge1, edge2; int tempedge; /* if leaf, return taxonID */ if (ctree[ct_2ndedge((int) (edge / 4))] < 0) return ctree[ct_sortkeyaddr(edge)]; edge1 = ctree[ct_nextedgeaddr(edge)]; edge2 = ctree[ct_nextedgeaddr(ct_nextedgeaddr(edge))]; /* printf ("visiting [%5d] -> [%5d], [%5d]\n", edge, edge1, edge2); */ /* printf ("visiting [%2d.%2d] -> [%2d.%2d], [%2d.%2d]\n", (int)(edge/4), edge%4, (int)(edge1/4), edge1%4, (int)(edge2/4), edge2%4); */ key1 = sortOTU(edge1, ctree); key2 = sortOTU(edge2, ctree); if (key2 < key1) { tempedge = ctree[ctree[edge1]]; ctree[ctree[edge1]] = ctree[ctree[edge2]]; ctree[ctree[edge2]] = tempedge; tempedge = ctree[edge1]; ctree[edge1] = ctree[edge2]; ctree[edge2] = tempedge; ctree[ct_sortkeyaddr(edge)] = key2; } else { ctree[ct_sortkeyaddr(edge)] = key1; } return ctree[ct_sortkeyaddr(edge)]; } /* sortOTU */ /**********/ /* sort ctree recursively by indices */ int sortctree(int *ctree) { int n, startnode=-1; /* find virtual root node (ID=0) */ for(n=0; n>>>\n"); tmpptr = list; *sortlist = list; while (tmpptr != NULL) { (*tmpptr).sortnext = (*tmpptr).succ; (*tmpptr).sortlast = (*tmpptr).pred; tmpptr = (*tmpptr).succ; } while (xchange > 0) { curr = *sortlist; xchange = 0; if (curr == NULL) fprintf(stderr, "Grrrrrrrrr>>>>\n"); while((*curr).sortnext != NULL) { next = (*curr).sortnext; if ((*curr).count >= (*next).count) curr = (*curr).sortnext; else { if ((*curr).sortlast != NULL) (*((*curr).sortlast)).sortnext = next; if (*sortlist == curr) *sortlist = next; (*next).sortlast = (*curr).sortlast; if ((*next).sortnext != NULL) (*((*next).sortnext)).sortlast = curr; (*curr).sortnext = (*next).sortnext; (*curr).sortlast = next; (*next).sortnext = curr; xchange++; } } } } /* sortbynum */ /**********/ /* print puzzling step tree stuctures for checking */ void printfpstrees(treelistitemtype *list) { char ch; treelistitemtype *tmpptr = NULL; tmpptr = list; ch = '-'; while (tmpptr != NULL) { printf ("%c[%2d] %5d %s\n", ch, (*tmpptr).idx, (*tmpptr).count, (*tmpptr).tree); tmpptr = (*tmpptr).succ; ch = ' '; } } /* printfpstrees */ /**********/ /* print sorted puzzling step tree stucture with names */ void fprintffullpstree(FILE *outf, char *treestr) { int count = 0; int idnum = 0; int n; for(n=0; treestr[n] != '\0'; n++){ while(isdigit((int)treestr[n])){ idnum = (10 * idnum) + ((int)treestr[n]-48); n++; count++; } if (count > 0){ # ifdef USEQUOTES fprintf(outf, "'"); # endif (void)fputid(outf, idnum); # ifdef USEQUOTES fprintf(outf, "'"); # endif count = 0; idnum = 0; } fprintf(outf, "%c", treestr[n]); } } /* fprintffullpstree */ /**********/ /* print sorted puzzling step tree stuctures with names */ void fprintfsortedpstrees(FILE *output, treelistitemtype *list, /* tree list */ int itemnum, /* order number */ int itemsum, /* number of trees */ int comment, /* with statistics, or puzzle report ? */ float cutoff) /* cutoff percentage */ { treelistitemtype *tmpptr = NULL; treelistitemtype *slist = NULL; int num = 1; float percent; if (list == NULL) fprintf(stderr, "Grrrrrrrrr>>>>\n"); sortbynum(list, &slist); tmpptr = slist; while (tmpptr != NULL) { percent = (float)(100.0 * (*tmpptr).count / itemsum); if ((cutoff == 0.0) || (cutoff <= percent)) { if (comment) fprintf (output, "[ %d. %d %.2f %d %d %d ]", num++, (*tmpptr).count, percent, (*tmpptr).id, itemnum, itemsum); else { if (num == 1){ fprintf (output, "\n"); fprintf (output, "The following tree(s) occured in more than %.2f%% of the %d puzzling steps.\n", cutoff, itemsum); fprintf (output, "The trees are orderd descending by the number of occurences.\n"); fprintf (output, "\n"); fprintf (output, "\n occurences ID Phylip tree\n"); } fprintf (output, "%2d. %5d %6.2f%% %5d ", num++, (*tmpptr).count, percent, (*tmpptr).id); } fprintffullpstree(output, (*tmpptr).tree); fprintf (output, "\n"); } tmpptr = (*tmpptr).sortnext; } if (!comment) { fprintf (output, "\n"); switch(num) { case 1: fprintf (output, "There were no tree topologies (out of %d) occuring with a percentage \n>= %.2f%% of the %d puzzling steps.\n", itemnum, cutoff, itemsum); break; case 2: fprintf (output, "There was one tree topology (out of %d) occuring with a percentage \n>= %.2f%%.\n", itemnum, cutoff); break; default: fprintf (output, "There were %d tree topologies (out of %d) occuring with a percentage \n>= %.2f%%.\n", num-1, itemnum, cutoff); break; } fprintf (output, "\n"); fprintf (output, "\n"); } } /* fprintfsortedpstrees */ /**********/ /* print sorted tree topologies for checking */ void printfsortedpstrees(treelistitemtype *list) { treelistitemtype *tmpptr = NULL; treelistitemtype *slist = NULL; sortbynum(list, &slist); tmpptr = slist; while (tmpptr != NULL) { printf ("[%2d] %5d %s\n", (*tmpptr).idx, (*tmpptr).count, (*tmpptr).tree); tmpptr = (*tmpptr).sortnext; } } /* printfsortedpstrees */ /*******************************************/ /* end of tree sorting */ /*******************************************/ tree-puzzle-5.2/src/treesort.h0000644000076400001440000001613010073365212012136 /* * treesort.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef TREESORT_H #define TREESORT_H typedef struct treelistitemtypedummy { struct treelistitemtypedummy *pred; struct treelistitemtypedummy *succ; struct treelistitemtypedummy *sortnext; struct treelistitemtypedummy *sortlast; char *tree; int count; int id; int idx; } treelistitemtype; #include "puzzle.h" #include "util.h" EXTERN treelistitemtype *psteptreelist; EXTERN treelistitemtype *psteptreesortlist; EXTERN int psteptreenum; EXTERN int psteptreesum; /*******************************************/ /* tree sorting */ /*******************************************/ /* compute address of the 4 int (sort key) in the 4 int node */ int ct_sortkeyaddr(int addr); /**********/ /* compute address of the next edge pointer in a 4 int node (0->1->2->0) */ int ct_nextedgeaddr(int addr); /**********/ /* compute address of 1st edge of a 4 int node from node number */ int ct_1stedge(int node); /**********/ /* compute address of 2nd edge of a 4 int node from node number */ int ct_2ndedge(int node); /**********/ /* compute address of 3rd edge of a 4 int node from node number */ int ct_3rdedge(int node); /**********/ /* check whether node 'node' is a leaf (2nd/3rd edge pointer = -1) */ int ct_isleaf(int node, int *ctree); /**********/ /* compute node number of 4 int node from an edge addr. */ int ct_addr2node(int addr); /**********/ /* print graph pointers for checking */ void printctree(int *ctree); /**********/ /* allocate memory for ctree 3 ints pointer plus 1 check byte */ int *initctree(); /**********/ /* free memory of a tree for sorting */ void freectree(int **snodes); /**********/ /* copy subtree recursively */ void copyOTU_trueID(int *ctree, /* in/out: tree array struct */ int *ct_nextnode,/* in/out: next free node */ int ct_curredge,/* in: currend edge to add subtree */ int *ct_nextleaf,/* in/out: next free leaf (0-maxspc) */ int ed, /* in: current edge in puzzling tree */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: external edge list */ int numleaves, /* in: number of leaves */ int *trueID); /* in: permutation vector */ /**********/ /* copy treestructure to sorting structure */ void copytree_trueID(int *ctree, /* out: copy for effective sorting */ int *trueID, /* in: permutation vector */ ONEEDGE *edgeset, /* in: intermediate tree topology */ int *edgeofleaf, /* dito. */ int numleaves); /* in: number of leaves */ /**********/ /* copy subtree recursively */ void copyOTU(int *ctree, /* in/out: tree array struct */ int *ct_nextnode,/* in/out: next free node */ int ct_curredge,/* in: currend edge to add subtree */ int *ct_nextleaf,/* in/out: next free leaf (0-maxspc) */ int ed, /* in: current edge in puzzling tree */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: external edge list */ int numleaves); /* in: number of leaves */ /**********/ /* copy treestructure to sorting structure */ void copytree(int *ctree, /* out: copy for effective sorting */ ONEEDGE *edgeset, /* in: intermediate tree topology */ int *edgeofleaf, /* dito. */ int rootleaf, int numleaves); /* in: number of leaves */ /**********/ /* sort subtree from edge recursively by indices */ int sortOTU(int edge, int *ctree); /**********/ /* sort ctree recursively by indices */ int sortctree(int *ctree); /**********/ /* print recursively subtree of edge of sorted tree ctree */ void fprintfsortOTU(FILE *ofp, int edge, int *ctree); /**********/ /* print recursively sorted tree ctree */ int fprintfsortctree(FILE *ofp, int *ctree); /**********/ /* print recursively subtree of edge of sorted tree ctree to string */ void sprintfOTU(char *str, int *len, int edge, int *ctree); /**********/ /* print recursively sorted tree ctree to string */ char *sprintfctree(int *ctree, int strglen); /***********************************************/ /* establish and handle a list of sorted trees */ /***********************************************/ /* initialize structure */ treelistitemtype *inittreelist(int *treenum); /**********/ /* malloc new tree list item */ treelistitemtype *gettreelistitem(); /**********/ /* free whole tree list */ void freetreelist(treelistitemtype **list, int *numitems, int *numsum); /**********/ /* add tree to the tree list */ treelistitemtype *addtree2list(char **tree, /* sorted tree string */ int numtrees, /* how many occurred, e.g. in parallel */ treelistitemtype **list, /* addr. of tree list */ int *numitems, int *numsum); /**********/ /* resort list of trees by number of occurences for output */ void sortbynum(treelistitemtype *list, treelistitemtype **sortlist); /**********/ /* print puzzling step tree stuctures for checking */ void printfpstrees(treelistitemtype *list); /**********/ /* print sorted puzzling step tree stucture with names */ void fprintffullpstree(FILE *outf, char *treestr); /**********/ /* print sorted puzzling step tree stuctures with names */ void fprintfsortedpstrees(FILE *output, treelistitemtype *list, /* tree list */ int itemnum, /* order number */ int itemsum, /* number of trees */ int comment, /* with statistics, or puzzle report ? */ float cutoff); /* cutoff percentage */ /**********/ /* print sorted tree topologies for checking */ void printfsortedpstrees(treelistitemtype *list); /*******************************************/ /* end of tree sorting */ /*******************************************/ #endif /* TREESORT_H */ tree-puzzle-5.2/src/treetest.c0000644000076400001440000005655610073365221012141 /* * treetest.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #include #ifndef STDOUT # define STDOUT stdout #endif /*****************************************************************************/ /* ELW/SR Test (Expected Likelihood Weights, Strimmer & Rambaut, 2002) */ /*****************************************************************************/ void elw_test(ivector Alias, dmatrix allsites, int numutrees, int numsites, double siglevel, int numboots, ivector *elw_test_passed, dvector *elw_Support) { /* * Determine posterior probabilties and support values * for each hypothesis and store results in public arrays * posterior, support etc which will automatically be * created by this procedure. * * allsites log-likelihoods of each pattern * Alias map of patterns to sites in sequence * numboots number of bootstraps */ dvector deltaL; /* delta of likelihoods (double[numH]) */ dvector elw_support; /* (double[numH]) */ dvector posterior; /* (double[numH]) */ ivector likelihoodOrder; /* (int[numH]) */ ivector supportOrder; /* (int[numH]) */ dvector rs; /* (int[numH]) */ double sum1; double sum; int numH; /* number of hypotheses */ int numSites; /* number of sites */ int s, p; int i, j, k; /* int j; */ double maxL; double maxLogL; ivector sr_test_res; /* [numutrees]; */ int elw_numboots = 1000; /* number of hypothesis */ numH = numutrees; /* allocate public arrays */ deltaL = new_dvector(numH); elw_support = new_dvector(numH); posterior = new_dvector(numH); likelihoodOrder = new_ivector(numH); supportOrder = new_ivector(numH); sr_test_res = new_ivector(numutrees); *elw_test_passed = sr_test_res; *elw_Support = elw_support; /* number of sites */ numSites = numsites; /******************************************/ /* Compute log-likelihoods, their order, */ /* their deltas and their posteriors */ /******************************************/ /* initialize delta vector for each tree */ for (j = 0; j < numSites; j++) { if (Alias == NULL) { p = j; } else { p = Alias[j]; } for (k = 0; k < numH; k++) { deltaL[k] -= allsites[k][p]; } } /* sort likelihoods -> sorted index list likelihoodOrder */ /* insertion sort */ { int tmp; int idx; for (k=0; k < numH; k++) likelihoodOrder[k] = k; for (j=0; j < numH-1; j++) { idx=j; for (k=j+1; k < numH; k++) { if (deltaL[likelihoodOrder[k]] < deltaL[likelihoodOrder[idx]]) idx=k; } tmp = likelihoodOrder[j]; likelihoodOrder[j] = likelihoodOrder[idx]; likelihoodOrder[idx] = tmp; } } /* Compute deltas */ maxL= -deltaL[likelihoodOrder[0]]; for (j = 0; j < numH; j++) { deltaL[j] = -(deltaL[j]+maxL); } /* compute posterior probabilities */ sum1 = 0.0; for (j = 0; j < numH; j++) { posterior[j] = exp(deltaL[j]); sum1 += posterior[j]; } for (j = 0; j < numH; j++) { posterior[j] = posterior[j]/sum1; } /* reverse sign of delta L */ for (j = 0; j < numH; j++) { deltaL[j] = -deltaL[j]; } deltaL[likelihoodOrder[0]] = 0.0; /* Bootstrap/Resample data */ /***************************/ /* temporary memory */ rs = new_dvector(numH); /* MersenneTwisterFast mt = new MersenneTwisterFast(); */ for (i = 0; i < elw_numboots; i++) { /* num bootstraps */ for (k = 0; k < numH; k++) { rs[k] = 0; } for (j = 0; j < numSites; j++) { /* bootstrapping sites for ...*/ /* int s = mt.nextInt(numSites); */ s = randominteger(numSites); if (Alias == NULL) { p = s; } else { p = Alias[s]; } for (k = 0; k < numH; k++) { /* ...each utree */ /* rs[k] += pLogL[k][p]; */ rs[k] += allsites[k][p]; } } /* find ml hypothesis */ /* maxLogL = findMax(rs); */ { int best = 0; /* can be removed (HAS) */ int idx; double max = rs[0]; for (idx = 1; idx < numH; idx++) { if (rs[idx] > max) { best = idx; /* can be removed (HAS) */ max = rs[idx]; } } maxLogL = max; } /* compute log-likelihood difference */ for (k = 0; k < numH; k++) { rs[k] = rs[k] - maxLogL; } /* compute posteriors and sum over resampled data set */ sum = 0.0; for (k = 0; k < numH; k++) { rs[k] = exp(rs[k]); sum += rs[k]; } for (k = 0; k < numH; k++) { elw_support[k] += rs[k]/sum; } } /* compute support values */ for (j = 0; j < numH; j++) { elw_support[j] = elw_support[j]/elw_numboots; } /* determine order of elw_support (smallest->largest) */ /* HeapSort.sort(elw_support, supportOrder); */ { int tmp; int idx; for (k=0; k < numH; k++) supportOrder[k] = k; for (j=0; j < numH-1; j++) { idx=j; for (k=j+1; k < numH; k++) { if (elw_support[supportOrder[k]] > elw_support[supportOrder[idx]]) idx=k; } tmp = supportOrder[j]; supportOrder[j] = supportOrder[idx]; supportOrder[idx] = tmp; } } sum = 0.0; for (k=0; k maxLogL) { bestH = i; maxLogL = sh_logL[i]; } } /* compute log-likelihood differences to best hypothesis */ for (i = 0; i < numH; i++) { sh_delta[i] = sh_logL[bestH]-sh_logL[i]; } /* allocate temporary memory for resampling procedure */ bs = new_dmatrix(numH,sh_numboots); /* Resample data */ /* MersenneTwisterFast mt = new MersenneTwisterFast(); */ for (i = 0; i < sh_numboots; i++) { for (j = 0; j < numSites; j++) { /* int s = mt.nextInt(numSites); */ s = randominteger(numSites); if (Alias == NULL) { p = s; } else { p = Alias[s]; } for (k = 0; k < numH; k++) { /* rs[k][i] += pLogL[k][p]; */ bs[k][i] += allsites[k][p]; } } } /* center resampled log-likelihoods */ for (i = 0; i < numH; i++) { /* double m = DiscreteStatistics.mean(rs[i]); */ m = 0.0; for (j = 0; j < sh_numboots; j++) { m += bs[i][j]; } m /= sh_numboots; for (j = 0; j < sh_numboots; j++) { bs[i][j] = bs[i][j] - m; } } /* compute resampled log-likelihood differences */ for (i = 0; i < sh_numboots; i++) { /* double max = findMaxInColumn(rs, i); */ { best = 0; colmax = bs[0][i]; for (j = 1; j < numH; j++) { if (bs[j][i] > colmax) { best = j; colmax = bs[j][i]; } } } for (j = 0; j < numH; j++) { bs[j][i] = colmax - bs[j][i]; } } /* compute p-values for each hypothesis */ for (i = 0; i < numH; i++) { count = 0; for (j = 0; j < sh_numboots; j++) { if (bs[i][j] >= sh_delta[i]) { count++; } } sh_pval[i] = (double) count/(double) sh_numboots; if (sh_pval[i] >= sh_prob) { sh_test_res[i] = 1; } else { sh_test_res[i] = 0; } } /* free memory */ free_dmatrix(bs); free_dvector(sh_logL); } /* sh_test */ /* TODO: move to treetest.c */ /* print tree statistics */ void printtreestats(FILE *ofp, dvector ulkl, dvector ulklc, int numutrees, dmatrix allsites, /* tree site log-likelihoods */ dmatrix allsitesc, /* tree site log-likelihoods */ ivector Alias, /* link site -> corresponding site pattern */ int Maxsite, int Numptrn, ivector Weight, int compclock) { int i, j; /* counter variables */ int besttree; /* best tree */ /* for the KH Test (Kishino & Hasegawa, 1989) */ double bestlkl; /* best likelihood */ double difflkl; /* best likelihood difference */ double difflklps; /* best likelihood difference per site */ double temp; double sum; /* variables for the SH Test (Shimodaira & Hasegawa, 1999) */ dvector sh_pval; /* corresponding p-value */ double sh_prob = .05; /* significance level */ int sh_numboots = 1000; /* number of bootstrap samples */ ivector sh_test_res; /* result vector [numutrees]; */ /* variables for the ELW/SR Test (Expected Likelihood Weights) */ /* (Strimmer & Rambaut, 2002) */ dvector elw_support; /* = new double[numH; */ ivector elw_test_res; /* result vector [numutrees]; */ int elw_numboots = 1000; /* number of bootstrap samples */ double elw_prob = .05; /* significance level */ /* variables for the one-sided KH Test using SH */ dvector kh1_pval_tmp; /* temp p-value arry for pairwise SH */ ivector kh1_test_res_tmp; /* temp result arry for pairwise SH */ dvector kh1_pval; /* p-values */ ivector kh1_test_res; /* result vector [numutrees]; */ dvector kh1_allsites_tmp[2]; /* temp arry for pairwise SH test */ int kh1_numboots = 1000; /* number of bootstrap samples */ double kh1_prob = .05; /* significance level */ /* find best tree */ besttree = 0; bestlkl = ulkl[0]; for (i = 1; i < numutrees; i++) { if (ulkl[i] > bestlkl) { besttree = i; bestlkl = ulkl[i]; } } /* one sided KH = pairwise SH test between tree and besttree */ fprintf(STDOUT, "Performing single sided KH test.\n"); fflush(STDOUT); kh1_pval = new_dvector(numutrees); kh1_test_res = new_ivector(numutrees); kh1_allsites_tmp[0] = allsites[besttree]; /* set best tree */ for (i = 0; i < numutrees; i++) { if (i == besttree) { /* if best tree -> no test */ kh1_pval[i] = 1.0; kh1_test_res[i] = 1; } else { /* other wise test pairwise SH */ if ((ulkl[besttree]-ulkl[i]) < MINKHDIFF) { /* if approx equal to best tree -> no test */ kh1_pval[i] = 1.0; kh1_test_res[i] = 1; } else { /* other wise test pairwise SH */ kh1_allsites_tmp[1] = allsites[i]; /* set site log-lh */ sh_test(Alias, kh1_allsites_tmp, 2, Maxsite, kh1_prob, kh1_numboots, &kh1_test_res_tmp, &kh1_pval_tmp); /* pairwise SH */ kh1_pval[i] = kh1_pval_tmp[1]; /* store p-value */ kh1_test_res[i] = kh1_test_res_tmp[1]; /* save result */ } } } free_ivector(kh1_test_res_tmp); /* moved out of loop */ free_dvector(kh1_pval_tmp); /* ELW */ fprintf(STDOUT, "Performing ELW test.\n"); fflush(STDOUT); elw_test(Alias, allsites, numutrees, Maxsite, elw_prob, elw_numboots, &elw_test_res, &elw_support); /* SH */ fprintf(STDOUT, "Performing SH test.\n"); fflush(STDOUT); sh_test(Alias, allsites, numutrees, Maxsite, sh_prob, sh_numboots, &sh_test_res, &sh_pval); /*****************************************************************************/ /* two-sided KH Test (Kishino & Hasegawa, 1989) */ /* and output */ /*****************************************************************************/ fprintf(ofp, "\n\nCOMPARISON OF USER TREES (NO CLOCK)\n\n"); # ifdef KHTWOSIDED fprintf(ofp, "Tree log L difference S.E. Sig. worse p-1sKH p-SH c-ELW \n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # else fprintf(ofp, "Tree log L difference S.E. p-1sKH p-SH c-ELW 2sKH\n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # endif for (i = 0; i < numutrees; i++) { difflkl = ulkl[besttree]-ulkl[i]; if (difflkl < MINKHDIFF) { /* if lkls (approx) equal to best tree, no difference */ difflkl = 0.0; fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulkl[i], difflkl); } else { fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulkl[i], difflkl); } /* fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulkl[i], difflkl); */ if (i == besttree) { # ifdef KHTWOSIDED fprintf(ofp, " <-------------- best "); # else fprintf(ofp, " <---- best "); /* fprintf(ofp, " <---- best "); */ # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else fprintf(ofp, " best"); # endif } else { /* compute variance of Log L differences over sites */ #ifndef USE_WINDOWS difflklps = difflkl/(double)Maxsite; #else difflklps = difflkl/(double)alimaxsite; #endif sum = 0.0; for (j = 0; j < Numptrn; j++) { temp = allsites[besttree][j] - allsites[i][j] - difflklps; sum += temp*temp*Weight[j]; } #ifndef USE_WINDOWS sum = sqrt( fabs(sum/(Maxsite-1.0)*Maxsite) ); #else sum = sqrt(fabs(sum/(alimaxsite-1.0)*alimaxsite)); #endif # ifdef KHTWOSIDED fprintf(ofp, "%11.2f ", sum); if (difflkl > 1.96*sum) fprintf(ofp, "yes "); else fprintf(ofp, "no "); # else fprintf(ofp, "%11.4f ", sum); /* fprintf(ofp, "%11.2f ", sum); */ # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else #if 0 if (difflkl > 1.96*sum) fprintf(ofp, " - (diff=%.4f 1.96*sum=%.4e)", difflkl, 1.96*sum); else fprintf(ofp, " + (diff=%.4f 1.96*sum=%.4e)", difflkl, 1.96*sum); #endif if (difflkl > 1.96*sum) fprintf(ofp, " -"); else fprintf(ofp, " +"); # endif } fprintf(ofp, "\n"); } fprintf(ofp, "\nThe columns show the results and p-values of the following tests:\n"); fprintf(ofp, "1sKH - one sided KH test based on pairwise SH tests (Shimodaira-Hasegawa\n"); fprintf(ofp, " 2000, Goldman et al., 2001, Kishino-Hasegawa 1989)\n"); fprintf(ofp, "SH - Shimodaira-Hasegawa test (2000)\n"); fprintf(ofp, "ELW - Expected Likelihood Weight (Strimmer-Rambaut 2002)\n"); fprintf(ofp, "2sKH - two sided Kishino-Hasegawa test (1989)\n"); fprintf(ofp, "\n"); fprintf(ofp, "Plus signs denote the confidence sets. Minus signs denote significant\n"); fprintf(ofp, "exclusion. All tests used 5%% significance level. 1sKH, SH, and ELW\n"); fprintf(ofp, "performed 1000 resamplings using the RELL method.\n"); fprintf(ofp, "1sKH and 2sKH are correct to the 2nd position after the the decimal\n"); fprintf(ofp, "point of the log-likelihoods.\n"); if (compclock) { /* find best tree */ besttree = 0; bestlkl = ulklc[0]; for (i = 1; i < numutrees; i++) if (ulklc[i] > bestlkl) { besttree = i; bestlkl = ulklc[i]; } /* one sided KH */ fprintf(STDOUT, "Performing single sided KH test (clock).\n"); fflush(STDOUT); kh1_pval = new_dvector(numutrees); kh1_test_res = new_ivector(numutrees); kh1_allsites_tmp[0] = allsitesc[besttree]; for (i = 0; i < numutrees; i++) { if (i != besttree) { if ((ulklc[besttree]-ulklc[i]) < MINKHDIFF) { /* if approx equal to best tree -> no test */ kh1_pval[i] = 1.0; kh1_test_res[i] = 1; } else { /* other wise test pairwise SH */ kh1_allsites_tmp[1] = allsitesc[i]; sh_test(Alias, kh1_allsites_tmp, 2, Maxsite, kh1_prob, kh1_numboots, &kh1_test_res_tmp, &kh1_pval_tmp); kh1_pval[i] = kh1_pval_tmp[1]; kh1_test_res[i] = kh1_test_res_tmp[1]; free_ivector(kh1_test_res_tmp); free_dvector(kh1_pval_tmp); } } else { kh1_pval[i] = 1.0; kh1_test_res[i] = 1; } } /* ELW */ fprintf(STDOUT, "Performing ELW test (clock).\n"); fflush(STDOUT); elw_test(Alias, allsitesc, numutrees, Maxsite, elw_prob, elw_numboots, &elw_test_res, &elw_support); /* SH */ fprintf(STDOUT, "Performing SH test (clock).\n"); fflush(STDOUT); sh_test(Alias, allsitesc, numutrees, Maxsite, sh_prob, sh_numboots, &sh_test_res, &sh_pval); fprintf(ofp, "\n\nCOMPARISON OF USER TREES (WITH CLOCK)\n\n"); # ifdef KHTWOSIDED fprintf(ofp, "Tree log L difference S.E. Sig. worse p-1sKH p-SH c-ELW \n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # else fprintf(ofp, "Tree log L difference S.E. p-1sKH p-SH c-ELW 2sKH\n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # endif for (i = 0; i < numutrees; i++) { difflkl = ulklc[besttree]-ulklc[i]; if (difflkl < MINKHDIFF) { /* if lkls (approx) equal to best tree, no difference */ difflkl = 0.0; fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulklc[i], difflkl); } else { fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulklc[i], difflkl); } if (i == besttree) { # ifdef KHTWOSIDED fprintf(ofp, " <-------------- best "); # else fprintf(ofp, " <---- best "); # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else fprintf(ofp, " best"); # endif } else { /* compute variance of Log L differences over sites */ #ifndef USE_WINDOWS difflklps = difflkl/(double)Maxsite; #else difflklps = difflkl/(double)alimaxsite; #endif sum = 0.0; for (j = 0; j < Numptrn; j++) { temp = allsitesc[besttree][j] - allsitesc[i][j] - difflklps; sum += temp*temp*Weight[j]; } #ifndef USE_WINDOWS sum = sqrt(fabs(sum/(Maxsite-1.0)*Maxsite)); #else sum = sqrt(fabs(sum/(alimaxsite-1.0)*alimaxsite)); #endif # ifdef KHTWOSIDED fprintf(ofp, "%11.2f ", sum); if (difflkl > 1.96*sum) fprintf(ofp, "yes "); else fprintf(ofp, "no "); # else fprintf(ofp, "%11.2f ", sum); # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else if (difflkl > 1.96*sum) fprintf(ofp, " -"); else fprintf(ofp, " +"); # endif } fprintf(ofp, "\n"); } fprintf(ofp, "\nThe columns show the results and p-values of the following tests:\n"); fprintf(ofp, "1sKH - one sided KH test based on pairwise SH tests (Shimodaira-Hasegawa\n"); fprintf(ofp, " 2000, Goldman et al., 2001, Kishino-Hasegawa 1989)\n"); fprintf(ofp, "SH - Shimodaira-Hasegawa test (2000)\n"); fprintf(ofp, "ELW - Expected Likelihood Weight (Strimmer-Rambaut 2002)\n"); fprintf(ofp, "2sKH - two sided Kishino-Hasegawa test (1989)\n"); fprintf(ofp, "\n"); fprintf(ofp, "Plus signs denote the confidence sets. Minus signs denote significant\n"); fprintf(ofp, "exclusion. All tests used 5%% significance level. 1sKH, SH, and ELW\n"); fprintf(ofp, "performed 1000 resamplings using the RELL method.\n"); fprintf(ofp, "1sKH and 2sKH are correct to the 2nd position after the the decimal\n"); fprintf(ofp, "point of the log-likelihoods.\n"); #if 0 fprintf(ofp, "\nColmn 5 gives the results of the (old) two-sided Kishino-Hasegawa test \n"); fprintf(ofp, "following Kishino and Hasegawa (1989). It tests whether a likelihood is \n"); fprintf(ofp, "significantly worse than the best one, marked with 'best'. This test should \n"); fprintf(ofp, "only be used for data not having been determined with the data tested on.\n"); fprintf(ofp, "1sKH is the one-sided KH test (Goldman et al., 2001). It is applicable\n"); fprintf(ofp, "to test whether likelihoods are worse than the lielihood of the ML tree.\n"); fprintf(ofp, "SH tests for the best trees (Shimodaira and Hasegawa, 2000).\n"); fprintf(ofp, "Note that KH, 1sKH, and SH assume to have the 'true' topologies among the tested.\n"); fprintf(ofp, "ELW (Expected likelihood weights) seems to work even without this restriction\n"); fprintf(ofp, "(Strimmer and Rambaut, 2002). Still plausible trees should be among the tested.\n"); fprintf(ofp, "For 1sKH, SH, and ELW plus signs '+' mark the topologies belonging to the\n"); fprintf(ofp, "confidence sets the numbers give the p-values (1sKH and SH) or the confidence\n"); fprintf(ofp, "weight (ELW).\n"); fprintf(ofp, "All tests used 5%% significance level. 1sKH, SH, and ELW used 1000 resamplings.\n"); #endif } } /* printtreestats */ /********************************************************/ tree-puzzle-5.2/src/treetest.h0000644000076400001440000000433310073365226012135 /* * treetest.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef TREETEST_H #define TREETEST_H #include /* minimum log-lh difference to best log-lh to be different */ #define MINKHDIFF 0.005 /*****************************************************************************/ /* ELW/SR Test (Expected Likelihood Weights, Strimmer & Rambaut, 2002) */ /*****************************************************************************/ void elw_test(ivector Alias, dmatrix allsites, int numutrees, int numsites, double siglevel, int numboots, ivector *elw_test_passed, dvector *elw_Support); /*****************************************************************************/ /* SH Test (Shimodaira & Hasegawa, 1999) */ /*****************************************************************************/ void sh_test(ivector Alias, /* site pattern translat array */ dmatrix allsites, /* tree site log-likelihoods */ int numutrees, /* number of trees */ int numsites, /* number of sites */ double siglevel, /* significance level to test */ int numboots, /* number of bootstraps to draw */ ivector *sh_test_passed, /* has tree passed tests */ dvector *sh_Pval); /* and p-value */ /* print tree statistics */ void printtreestats(FILE *ofp, dvector ulkl, dvector ulklc, int numutrees, dmatrix allsites, /* tree site log-likelihoods */ dmatrix allsitesc, /* tree site log-likelihoods */ ivector Alias, /* link site -> corresponding site pattern */ int Maxsite, int Numptrn, ivector Weight, int compclock); #endif /* TREETEST_H */ tree-puzzle-5.2/src/README0000644000076400001440000000004307152034631010774 Sources of the TREE-PUZZLE package tree-puzzle-5.2/src/pstep-deglob.c0000644000076400001440000004075210073365233012661 /* * pstep-deglob.c (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #define EXTERN extern #include #include #include"puzzle.h" /* #include"util.h" */ /* #include"pstep.h" */ #include /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /* initialize tree with the following starting configuration * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf) /* out: next free leaf index (=3) */ { int i; ONEEDGE_ORIG *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE_ORIG *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE_ORIG) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for vetmpctor with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the edge map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (tmpedge[i].edgemap == NULL) maerror("edgemap in inittree"); } /* number all edges */ for (i = 0; i < Maxbrnch; i++) tmpedge[i].numedge = i; /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* edge maps */ (tmpedge[0].edgemap)[0] = 0; /* you are on the right edge */ (tmpedge[0].edgemap)[1] = 4; /* go down left for leaf 1 */ (tmpedge[0].edgemap)[2] = 5; /* go down right for leaf 2 */ (tmpedge[1].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[1].edgemap)[1] = 0; /* you are on the right edge */ (tmpedge[1].edgemap)[2] = 3; /* go up/down right for leaf 2 */ (tmpedge[2].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[2].edgemap)[1] = 2; /* go up/down left for leaf 1 */ (tmpedge[2].edgemap)[2] = 0; /* you are on the right edge */ /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* edges of leaves */ tmpedgeofleaf[0] = 0; tmpedgeofleaf[1] = 1; tmpedgeofleaf[2] = 2; } /* inittree */ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf) /* next free leaf idx */ { int i; int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == edgeofleaf[0] */ if (edgeofleaf[0] == dockedge) edgeofleaf[0] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding nextedge + 1 to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edgeofleaf[nextleaf] = nextedge+1; /* the two new edges get info about the old edges */ /* nextedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case 5: (edge[nextedge].edgemap)[i] = 4; break; /* null changes to down left */ case 0: (edge[nextedge].edgemap)[i] = 4; break; default: (edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* nextedge + 1 */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case 2: (edge[nextedge+1].edgemap)[i] = 1; break; /* up/down right changes to up */ case 3: (edge[nextedge+1].edgemap)[i] = 1; break; /* down left changes to up/down left */ case 4: (edge[nextedge+1].edgemap)[i] = 2; break; /* down right changes to up/down left */ case 5: (edge[nextedge+1].edgemap)[i] = 2; break; /* null changes to up/down left */ case 0: (edge[nextedge+1].edgemap)[i] = 2; break; /* up stays up */ default: (edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* dockedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case 3: (edge[dockedge].edgemap)[i] = 1; break; /* up/down left changes to up */ case 2: (edge[dockedge].edgemap)[i] = 1; break; default: break; } } /* all edgemaps are updated for the two new edges */ /* nextedge */ (edge[nextedge].edgemap)[nextedge] = 0; (edge[nextedge].edgemap)[nextedge+1] = 5; /* down right */ /* nextedge + 1 */ (edge[nextedge+1].edgemap)[nextedge] = 1; /* up */ (edge[nextedge+1].edgemap)[nextedge+1] = 0; /* all other edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra for dockedge */ (edge[dockedge].edgemap)[nextedge] = 1; /* up */ (edge[dockedge].edgemap)[nextedge+1] = 3; /* up/down right */ nextleaf++; nextedge = nextedge + 2; *in_nextedge=nextedge; *in_nextleaf=nextleaf; } /* addnextleaf */ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].edgemap); free(edge); free(edgeofleaf); } /* freetree */ /* trueID (HAS) */ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID) /* species permutation */ { int i; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < nextleaf; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ /* trueID (HAS) */ *column += fputid(outfp, trueID[i]); return; } } } /* we are NOT on a leaf */ fprintf(outfp, "("); (*column)++; /* trueID (HAS) */ writeOTU_orig(outfp, edge[ed].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ","); (*column)++; (*column)++; if (*column > 55) { *column = 2; fprintf(outfp, "\n "); } /* trueID (HAS) */ writeOTU_orig(outfp, edge[ed].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ")"); (*column)++; } /* writeOTU */ /* trueID (HAS) */ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID) /* species permutation */ { column_orig = 1; fprintf(outfp, "("); column_orig += fputid(outfp, trueID[0]) + 3; fprintf(outfp, ","); writeOTU_orig(outfp, edge[edgeofleaf[0]].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, &column_orig, trueID); column_orig++; column_orig++; fprintf(outfp, ","); writeOTU_orig(outfp, edge[edgeofleaf[0]].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, &column_orig, trueID); fprintf(outfp, ");\n"); } /* writetree */ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; for (i = 0; i < nextedge; i++) edge[i].edgeinfo = 0; } /* resetedgeinfo */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf) /* ext. edge idx array */ { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; while (curredge != finaledge) { nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case 1: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case 2: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case 3: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case 4: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case 5: curredge = (edge[curredge].downright)->numedge; break; } edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; } } /* incrementedgeinfo */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *out_minedge, /* minimum edge set */ uli *out_mininfo) /* minumum penalty */ { int i, k, howmany, randomnum; int minedge; /* minimum edge set */ uli mininfo; /* minumum penalty */ howmany = 1; minedge = 0; mininfo = edge[0].edgeinfo; for (i = 1; i < nextedge; i++) if (edge[i].edgeinfo <= mininfo) { if (edge[i].edgeinfo == mininfo) { howmany++; } else { minedge = i; mininfo = edge[i].edgeinfo; howmany = 1; } } if (howmany > 1) { /* draw random edge */ randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].edgeinfo != mininfo); minedge = i; } } *out_minedge=minedge; *out_mininfo=mininfo; } /* minimumedgeinfo */ tree-puzzle-5.2/src/pstep-deglob.h0000644000076400001440000001424610073365241012664 /* * pstep-deglob.h (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef PSTEP_ORIG_H #define PSTEP_ORIG_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ #include #ifndef ONEEDGE_DEFINED #define ONEEDGE_DEFINED /* tree structure */ typedef struct oneedge { /* pointer to other three edges */ struct oneedge *up; struct oneedge *downleft; struct oneedge *downright; int numedge; /* number of edge (index) */ uli edgeinfo; /* value of this edge (penalty) */ int *edgemap; /* pointer to the local edgemap array */ } ONEEDGE_ORIG; #endif /* ! ONEEDGE_DEFINED */ EXTERN int *edgeofleaf_orig; /* vector with edge number of all leaves */ EXTERN int minedge_orig; /* edge with minimum edgeinfo */ EXTERN int nextedge_orig; /* number of edges in the current tree */ EXTERN int nextleaf_orig; /* next leaf to add to tree */ EXTERN ONEEDGE_ORIG *edge_orig; /* vector with all the edges of the tree */ uli *splitcomp_orig; /* bipartition storage */ uli *splitfreqs_orig; /* frequencies of all different splits of all trees */ uli *splitpatterns_orig; /* all different splits of all trees */ #if 0 EXTERN int Maxbrnch; /* 2*Maxspc - 3 */ EXTERN int Maxspc; /* Maxspc */ #endif ivector trueID_orig; int column_orig; uli mininfo_orig; /* value of edgeinfo on minedge */ /*****************************************************************************/ /* functions for representing and building puzzling step trees */ /*****************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf); /* out: next free leaf index (=3) */ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *nextedge, /* next free edge idx */ int *nextleaf); /* next free leaf idx */ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID); /* species permutation */ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID); /* species permutation */ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge); /* next free edge idx */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedge, /* minimum edge set */ uli *mininfo); /* minumum penalty */ #endif /* PSTEP_ORIG_H */ tree-puzzle-5.2/src/sched.c0000644000076400001440000002474710073365246011374 /* * sched.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "sched.h" /* #include "ppuzzle.h" */ #define STDOUT stdout #ifndef PARALLEL /* because printf() runs significantly faster */ /* than fprintf(stdout) on an Apple McIntosh */ /* (HS) */ # define FPRINTF printf # define STDOUTFILE #else # define FPRINTF fprintf # define STDOUTFILE STDOUT, #endif int scinit; int ssinit; int fscinit; int gssinit; int tssinit; int n, chunksize; int p; #ifdef SCHEDTEST schedtype testsched; #endif void printsched(schedtype sch) { fprintf(STDOUT, "Current scheduling status:\n"); fprintf(STDOUT, " truetasks=%5ld - alltasks=%5ld - numtasks=%5ld - numprocs=%5d\n", sch.truetasks, sch.alltasks, sch.numtasks, sch.numprocs); fprintf(STDOUT, " delta =%5lu - overhead=%5lu - rest =%5lu - inited =%5d\n", sch.delta, sch.overhead, sch.rest, sch.inited); fprintf(STDOUT, " nconst =%5d - fconst =%5f - lconst =%5f - kconst =%5f\n", sch.nconst, sch.fconst, sch.lconst, sch.kconst); } /* printsched */ void initsched(schedtype *sch, uli tasks, int procs, uli minchunk) { if (minchunk < 1) minchunk = 1; (*sch).minchunk = minchunk; (*sch).truetasks = tasks; (*sch).rest = (int)((*sch).truetasks % (*sch).minchunk); (*sch).alltasks = (tasks - (*sch).rest); (*sch).numtasks = (*sch).alltasks; (*sch).numprocs = procs; (*sch).delta = 0; (*sch).overhead = 0; (*sch).nconst = 0; (*sch).fconst = 0; (*sch).lconst = 0; (*sch).kconst = 0; (*sch).inited = 0; # ifdef PVERBOSE1 printsched(*sch); # endif /* PVERBOSE1 */ } /* initsched */ /************************************** * Static Chunking **************************************/ uli sc(schedtype *sch) { uli tmp; if ((*sch).inited == 0) { (*sch).overhead = (*sch).alltasks % (*sch).numprocs; (*sch).delta = ((*sch).alltasks - (*sch).overhead) / (*sch).numprocs; (*sch).inited ++; } if (!(*sch).overhead) { if ((*sch).numtasks >= (*sch).delta) tmp = (uli)(*sch).delta; else tmp = 0; } else { if ((*sch).numtasks >= ((*sch).delta + 1)) { tmp = (uli)(*sch).delta + 1; (*sch).overhead--; } else tmp = 0; } /* correction */ if ((tmp % (*sch).minchunk) > 0) { tmp += (*sch).minchunk - (tmp % (*sch).minchunk); } (*sch).numtasks -= tmp; if ((*sch).numtasks == 0) { tmp += (uli)(*sch).rest; (*sch).rest = 0; } return tmp; } /* SC */ /************************************** * Self Scheduling **************************************/ uli ss(schedtype *sch) { uli tmp; if ((*sch).inited == 0) { (*sch).inited ++; } if ((*sch).numtasks >= 1) tmp = 1; else tmp = (*sch).numtasks; /* correction */ if ((tmp % (*sch).minchunk) > 0) { tmp += (*sch).minchunk - (tmp % (*sch).minchunk); } (*sch).numtasks -= tmp; if ((*sch).numtasks == 0) { tmp += (uli)(*sch).rest; (*sch).rest = 0; } return tmp; } /* SS */ /************************************** * fixed-size chunking **************************************/ int fsc() { static int R ; static int delta ; static int overhead; int tmp; if (fscinit == 0) { R = n; overhead = n % p; delta = (n - overhead) / p; fscinit ++; } if (!overhead) { if (R >= delta) tmp = delta; else tmp = 0; } else { if (R >= (delta + 1)) { tmp = delta + 1; overhead--; } else tmp = 0; } R -= tmp; return tmp; } /* FSC */ /************************************** * Guided Self Scheduling **************************************/ uli gss(schedtype *sch) { uli tmp; if ((*sch).inited == 0) { (*sch).inited ++; } if ((*sch).numtasks >= 1) { tmp = (uli)ceil((*sch).numtasks / (*sch).numprocs); if (tmp == 0) tmp = 1; } else tmp = 0; /* correction */ if ((tmp % (*sch).minchunk) > 0) { tmp += (*sch).minchunk - (tmp % (*sch).minchunk); } (*sch).numtasks -= tmp; if ((*sch).numtasks == 0) { tmp += (uli)(*sch).rest; (*sch).rest = 0; } return tmp; } /* GSS */ /************************************** * Smooth Guided Self Scheduling **************************************/ uli sgss(schedtype *sch) { uli tmp; if ((*sch).inited == 0) { (*sch).inited ++; } if ((*sch).numtasks >= 1) { tmp = (uli)ceil(((*sch).numtasks / (*sch).numprocs) / 2); if (tmp == 0) tmp = 1; } else tmp = 0; /* correction */ if ((tmp % (*sch).minchunk) > 0) { tmp += (*sch).minchunk - (tmp % (*sch).minchunk); } (*sch).numtasks -= tmp; if ((*sch).numtasks == 0) { tmp += (uli)(*sch).rest; (*sch).rest = 0; } return tmp; } /* SGSS */ /************************************** * Trapezoid Self Scheduling **************************************/ uli tss(schedtype *sch) { uli tmp; if ((*sch).inited == 0) { (*sch).fconst = ceil((*sch).numtasks / (2*(*sch).numprocs)); if ((*sch).fconst == 0) (*sch).fconst = 1; (*sch).lconst = 1; (*sch).nconst = ceil( (2*n) / ((*sch).fconst + (*sch).lconst) ); (*sch).ddelta = (((*sch).fconst - (*sch).lconst) / ((*sch).nconst - 1)); (*sch).kconst = (*sch).fconst; fprintf(STDOUT, "f = n/2p = %.2f ; l = %.2f\n", (*sch).fconst, (*sch).lconst); fprintf(STDOUT, "N = 2n/(f+l) = %d ; delta = (f-l)/(N-1) = %.2f\n", (*sch).nconst, (*sch).ddelta); (*sch).inited ++; } if ((*sch).kconst <= (double) (*sch).numtasks) { tmp = (uli)ceil((*sch).kconst); (*sch).kconst -= (*sch).ddelta; } else { tmp = (uli)(*sch).numtasks; (*sch).kconst = 0.0; } /* correction */ if ((tmp % (*sch).minchunk) > 0) { tmp += (*sch).minchunk - (tmp % (*sch).minchunk); } (*sch).numtasks -= tmp; if ((*sch).numtasks == 0) { tmp += (uli)(*sch).rest; (*sch).rest = 0; } return tmp; } /* TSS */ /******************/ #ifdef SCHEDTEST uli numquarts(int maxspc) { uli tmp; int a, b, c, d; if (maxspc < 4) return (uli)0; else { maxspc--; a = maxspc-3; b = maxspc-2; c = maxspc-1; d = maxspc; tmp = (uli) 1 + a + (uli) b * (b-1) / 2 + (uli) c * (c-1) * (c-2) / 6 + (uli) d * (d-1) * (d-2) * (d-3) / 24; return (tmp); } } /* numquarts */ #endif /************************************** * main **************************************/ #ifdef SCHEDTEST int main(int argc, char *argv[]) { int tcount, count, lastsize, size; if ((argc > 4) || (argc < 3)) { fprintf(STDOUT, "\n\n Usage: %s <# species> <# processors> []\n\n", argv[0]); exit(1); } chunksize = 1; switch(argc) { case 4: chunksize = atoi(argv[3]); case 3: n = numquarts(atoi(argv[1])); p = atoi(argv[2]); } fprintf(STDOUT, "proc=%6d\n", p); fprintf(STDOUT, "task=%6d\n", n); initsched(&testsched, n, p, chunksize); printsched(testsched); count=1; tcount = 0; fprintf(STDOUT, "\n\n---------------------------\n"); fprintf(STDOUT, "SC(sched) - Static Chunking\n"); fprintf(STDOUT, "---------------------------\n\n"); do { size = sc(&testsched); if (size > 0) {fprintf(STDOUT, "%6d. chunk = %6d %c\n", count++, size , (size%chunksize) ? '!' : ' '); tcount+=size;} else fprintf(STDOUT, "%d tasks in %d chunks\n", tcount, (count-1)); } while (size > 0); initsched(&testsched, n, p, chunksize); printsched(testsched); count=1; tcount = 0; fprintf(STDOUT, "\n\n---------------------------\n"); fprintf(STDOUT, "SS(sched) - Self Scheduling\n"); fprintf(STDOUT, "---------------------------\n\n"); do { size = ss(&testsched); if (size > 0) {if (count==1) fprintf(STDOUT, "%6d. chunk = %6d %c\n", count++, size , (size%chunksize) ? '!' : ' '); count++; tcount+=size; lastsize = size;} else {fprintf(STDOUT, " ...\n"); fprintf(STDOUT, "%6d. chunk = %6d %c\n", count++, lastsize , (lastsize%chunksize) ? '!' : ' '); fprintf(STDOUT, "%d tasks in %d chunks\n", tcount, (count-1));} } while (size > 0); /**/ count=1; tcount = 0; fprintf(STDOUT, "\n\n---------------------------\n"); fprintf(STDOUT, "FSC() - Fixed-Size Chunking\n"); fprintf(STDOUT, "---------------------------\n\n"); do { size = fsc(); if (size > 0) {fprintf(STDOUT, "%6d. chunk = %6d %c\n", count++, size , (size%chunksize) ? '!' : ' '); tcount+=size;} else fprintf(STDOUT, "%d tasks in %d chunks\n", tcount, (count-1)); } while (size > 0); /**/ initsched(&testsched, n, p, chunksize); printsched(testsched); count=1; tcount = 0; fprintf(STDOUT, "\n\n-----------------------------------\n"); fprintf(STDOUT, "GSS(sched) - Guided Self Scheduling\n"); fprintf(STDOUT, "-----------------------------------\n\n"); do { size = gss(&testsched); if (size > 0) {fprintf(STDOUT, "%6d. chunk = %6d %c\n", count++, size , (size%chunksize) ? '!' : ' '); tcount+=size;} else fprintf(STDOUT, "%d tasks in %d chunks\n", tcount, (count-1)); } while (size > 0); initsched(&testsched, n, p, chunksize); printsched(testsched); count=1; tcount = 0; fprintf(STDOUT, "\n\n--------------------------------------\n"); fprintf(STDOUT, "TSS(sched) - Trapezoid Self Scheduling\n"); fprintf(STDOUT, "--------------------------------------\n\n"); do { size = tss(&testsched); if (size > 0) {fprintf(STDOUT, "%6d. chunk = %6d %c\n", count++, size , (size%chunksize) ? '!' : ' '); tcount+=size;} else fprintf(STDOUT, "%d tasks in %d chunks\n", tcount, (count-1)); } while (size > 0); return (0); } /* main */ #endif tree-puzzle-5.2/src/sched.h0000644000076400001440000000440110073365253011360 /* * sched.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef SCHED_H #define SCHED_H #ifndef SCHEDTEST # include "util.h" #else typedef unsigned long int uli; #endif typedef struct sched_t{ uli truetasks; /* number of tasks to be scheduled, as given by user */ int numprocs; /* number of processors (p=PP_numprocs-1, master-worker scheme */ uli minchunk; /* pre-packing: task-size must be dividable by */ uli rest; /* part of tasks not fitting into batches with minchunk-dividable size */ /* truetasks mod minchunk */ uli alltasks; /* number of tasks to be scheduled in minchunk-size batches */ /* truetasks - rest */ uli numtasks; /* tasks not yet scheduled (init: numtasks = alltasks) */ uli overhead; /* SC,FSC: remainder from dividing alltasks into numprocs batches */ /* alltasks mod numprocs */ uli delta; /* SC,FSC: initial batch size */ /* (alltasks - overhead) / numprocs = alltasks % numprocs */ double fconst; /* TSS: start (first) batch size (f) */ double lconst; /* TSS: last batch size (l) */ double kconst; /* TSS: actual batch size (k) */ double ddelta; /* TSS: amount of decrease */ int nconst; /* TSS: needed to compute ddelta (N) */ int inited; /* initialized flag for parameter initialization by scheduler */ } schedtype; void num2quart(uli qnum, int *a, int *b, int *c, int *d); uli numquarts(int maxspc); uli quart2num (int a, int b, int c, int d); void printsched(schedtype sch); void initsched(schedtype *sch, uli tasks, int procs, uli minchunk); uli sc(schedtype *sch); uli gss(schedtype *sch); uli sgss(schedtype *sch); uli tss(schedtype *sch); #endif /* SCHED_H */ tree-puzzle-5.2/src/pstep-split.c0000644000076400001440000006571610073365261012570 /* * pstep-split.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ /* split based O(n^4) algorithm */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include #include #include"puzzle.h" /* #include"util.h" */ #include"pstep-split.h" #if PARALLEL # include "ppuzzle.h" #endif /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * [cluster(up)=0] * [cluster(down)=1,2] * [upsize=1] * [downsize=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * [cluster(up)=0,2] [cluster(up)=0] * [cluster(down)=1] [cluster(down)=2] * [upsize=2] [upsize=2] * [downsize=1] [downsize=1] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_split(ONEEDGE_SPLIT **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf) /* out: next free leaf index (=3) */ { int i; ONEEDGE_SPLIT *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE_SPLIT *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE_SPLIT) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for vetmpctor with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the split map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].split = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedge[i].split == NULL) maerror("split array in inittree"); #if 0 (tmpedge)[i].downcluster = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedge[i].downcluster == NULL) maerror("downcluster edgemap in inittree"); /* old _orig algorithm */ (tmpedge)[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (tmpedge[i].edgemap == NULL) maerror("edgemap in inittree"); #endif } /* number all edges */ for (i = 0; i < Maxbrnch; i++) tmpedge[i].numedge = i; /* initialize tree */ *nextedge = 3; *nextleaf = 3; #if 0 /* edge maps */ (tmpedge[0].edgemap)[0] = 0; /* you are on the right edge */ (tmpedge[0].edgemap)[1] = 4; /* go down left for leaf 1 */ (tmpedge[0].edgemap)[2] = 5; /* go down right for leaf 2 */ (tmpedge[1].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[1].edgemap)[1] = 0; /* you are on the right edge */ (tmpedge[1].edgemap)[2] = 3; /* go up/down right for leaf 2 */ (tmpedge[2].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[2].edgemap)[1] = 2; /* go up/down left for leaf 1 */ (tmpedge[2].edgemap)[2] = 0; /* you are on the right edge */ #endif (tmpedge[0].split)[0] = 0; /* leaf 0 above this edge */ tmpedge[0].upsize = 1; (tmpedge[0].split)[Maxspc-1] = 1; /* leaf 0 below this edge */ (tmpedge[0].split)[Maxspc-2] = 2; /* leaf 0 below this edge */ tmpedge[0].downsize = 2; (tmpedge[1].split)[0] = 0; /* leaf 0 above this edge */ (tmpedge[1].split)[1] = 2; /* leaf 0 above this edge */ tmpedge[1].upsize = 2; (tmpedge[1].split)[Maxspc-1] = 1; /* leaf 0 below this edge */ tmpedge[1].downsize = 1; (tmpedge[2].split)[0] = 0; /* leaf 0 above this edge */ (tmpedge[2].split)[1] = 1; /* leaf 0 above this edge */ tmpedge[2].upsize = 2; (tmpedge[2].split)[Maxspc-1] = 2; /* leaf 0 below this edge */ tmpedge[2].downsize = 1; /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* edges of leaves */ tmpedgeofleaf[0] = 0; tmpedgeofleaf[1] = 1; tmpedgeofleaf[2] = 2; } /* inittree */ /******************/ /* add next leaf on the specified edge */ void updatesplit_split(ONEEDGE_SPLIT curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to splits */ ONEEDGE_SPLIT *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf) /* next free leaf idx */ { int n; switch (wherefrom) { case STARTING: if (curredge.up != NULL) { /* non-root edge */ curredge.split[Maxspc-(++(curredge.upsize))] = newleaf; /* start edge: must be down */ if (((curredge.up)->downright) == &curredge) { updatesplit_split(*(curredge.up), DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(*(curredge.up), DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } else { /* root -> every thing below/shouldn't happen */ for (n=0; n<*in_nextedge; n++) { edge[n].split[(edge[n].upsize)++] = newleaf; } } break; case UP: curredge.split[(curredge.downsize)++] = newleaf; /* leaf is up */ if (curredge.downright != NULL) { /* not leaf */ updatesplit_split(*(curredge.downright), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); updatesplit_split(*(curredge.downleft), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { /* nothing to do */ return; } break; case DOWNLEFT: curredge.split[(curredge.downsize)++] = newleaf; /* leaf is down */ if (curredge.downright != NULL) { /* not leaf */ updatesplit_split(*(curredge.downright), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if (curredge.up != NULL) { /* not root */ if (((curredge.up)->downright) == &curredge) { updatesplit_split(*(curredge.up), DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(*(curredge.up), DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; case DOWNRIGHT: curredge.split[(curredge.downsize)++] = newleaf; /* leaf is down */ if ((curredge.downright) != NULL) { /* not leaf */ updatesplit_split(*(curredge.downleft), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if ((curredge.up) != NULL) { /* not root */ if (((curredge.up)->downright) == &curredge) { updatesplit_split(*(curredge.up), DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(*(curredge.up), DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; } } /* addnextleaf_split */ /******************/ /* add next leaf on the specified edge */ void addnextleaf_split(int dockedge, /* insert here */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf) /* next free leaf idx */ { int i; int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == edgeofleaf[0] */ if (edgeofleaf[0] == dockedge) edgeofleaf[0] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding nextedge + 1 to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edgeofleaf[nextleaf] = nextedge+1; #if 0 /* the two new edges get info about the old edges */ /* nextedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case 5: (edge[nextedge].edgemap)[i] = 4; break; /* null changes to down left */ case 0: (edge[nextedge].edgemap)[i] = 4; break; default:(edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* nextedge + 1 */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case 2: (edge[nextedge+1].edgemap)[i] = 1; break; /* up/down right changes to up */ case 3: (edge[nextedge+1].edgemap)[i] = 1; break; /* down left changes to up/down left */ case 4: (edge[nextedge+1].edgemap)[i] = 2; break; /* down right changes to up/down left */ case 5: (edge[nextedge+1].edgemap)[i] = 2; break; /* null changes to up/down left */ case 0: (edge[nextedge+1].edgemap)[i] = 2; break; /* up stays up */ default:(edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* dockedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case 3: (edge[dockedge].edgemap)[i] = 1; break; /* up/down left changes to up */ case 2: (edge[dockedge].edgemap)[i] = 1; break; default: break; } } /* all edgemaps are updated for the two new edges */ /* nextedge */ (edge[nextedge].edgemap)[nextedge] = 0; (edge[nextedge].edgemap)[nextedge+1] = 5; /* down right */ /* nextedge + 1 */ (edge[nextedge+1].edgemap)[nextedge] = 1; /* up */ (edge[nextedge+1].edgemap)[nextedge+1] = 0; /* all other edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra for dockedge */ (edge[dockedge].edgemap)[nextedge] = 1; /* up */ (edge[dockedge].edgemap)[nextedge+1] = 3; /* up/down right */ #endif nextleaf++; nextedge = nextedge + 2; *in_nextedge=nextedge; *in_nextleaf=nextleaf; } /* addnextleaf */ /******************/ /* free memory (to be called after inittree) */ void freetree_split(ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].split); free(edge); free(edgeofleaf); } /* freetree */ /******************/ /* trueID (HAS) */ /* writes OTU sitting on edge ed */ void writeOTU_split(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID) /* species permutation */ { int i; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < nextleaf; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ *column += fputid(outfp, trueID[i]); return; } } } /* we are NOT on a leaf */ fprintf(outfp, "("); (*column)++; writeOTU_split(outfp, edge[ed].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ","); (*column)++; (*column)++; if (*column > 55) { *column = 2; fprintf(outfp, "\n "); } writeOTU_split(outfp, edge[ed].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ")"); (*column)++; } /* writeOTU */ /******************/ /* trueID (HAS) */ /* write tree */ void writetree_split(FILE *outfp, /* output file */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID) /* species permutation */ { int column; column = 1; fprintf(outfp, "("); column += fputid(outfp, trueID[0]) + 3; fprintf(outfp, ","); writeOTU_split(outfp, edge[edgeofleaf[0]].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); column++; column++; fprintf(outfp, ","); writeOTU_split(outfp, edge[edgeofleaf[0]].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); fprintf(outfp, ");\n"); } /* writetree */ /******************/ /* clear all edgeinfos */ void resetedgeinfo_split(ONEEDGE_SPLIT *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; for (i = 0; i < nextedge; i++) edge[i].penalty = 0; } /* resetedgeinfo */ #if 0 /******************/ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_split(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf) /* ext. edge idx array */ { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; edge[curredge].penalty = edge[curredge].penalty + 1; while (curredge != finaledge) { nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case 1: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case 2: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case 3: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case 4: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case 5: curredge = (edge[curredge].downright)->numedge; break; } edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; } } /* incrementedgeinfo */ #endif /******************/ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_split(ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *out_minedge, /* minimum edge set */ uli *out_mininfo) /* minumum penalty */ { int i, k, howmany, randomnum; int minedge; /* minimum edge set */ uli mininfo; /* minumum penalty */ howmany = 1; minedge = 0; mininfo = edge[0].penalty; for (i = 1; i < nextedge; i++) if (edge[i].penalty <= mininfo) { if (edge[i].penalty == mininfo) { howmany++; } else { minedge = i; mininfo = edge[i].penalty; howmany = 1; } } if (howmany > 1) { /* draw random edge */ randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].penalty != mininfo); minedge = i; } } *out_minedge=minedge; *out_mininfo=mininfo; } /* minimumedgeinfo */ /*************************************************************************/ /* global functions of the puzzling step */ /*************************************************************************/ /* trueID (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_split( /* PStep (intermediate) tree topol: */ ONEEDGE_SPLIT **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation) /* in: species permutation (trueID) */ { int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int chooseX, chooseY; /* end leaves of penalty path */ /* allocate and initialize new tree topology */ inittree_split(edge, edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); /* adding all other leafs */ for (i = 3; i < Maxspc; i++) { /* clear all edgeinfos */ resetedgeinfo_split(*edge, nextedge); /* * core of quartet puzzling algorithm */ for (a = 0; a < nextleaf - 2; a++) for (b = a + 1; b < nextleaf - 1; b++) for (c = b + 1; c < nextleaf; c++) { /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* trueID (HAS) */ checkquartet_trueID(a, b, c, i, permutation, &chooseX, &chooseY); incrementedgeinfo_split(chooseX, chooseY, *edge, *edgeofleaf); } /* for all quartets q=(a,b,c,i) */ /* find out which edge has lowest edgeinfo */ minimumedgeinfo_split(*edge, *edgeofleaf, nextedge, nextleaf, &minedge, &mininfo); /* add the next leaf on minedge */ addnextleaf_split(minedge, *edge, *edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); } /* adding all other leafs */ } /* onepstep_split */ /*************************************************************************/ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep_split(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn) /* in: 'fixed' anchored RNG (debug)*/ { /* misc variables */ /* trueID (HAS) */ ivector trueIDtmp; /* species permutation (trueID) */ uli Currtrial; /* step counter */ /* PStep (intermediate) tree topol: */ ONEEDGE_SPLIT *tmpedgeset; /* array of edges */ int *tmpedgeofleaf; /* array of extern edge pointers */ /* for unique sorting of tree topologies */ int *ctree; /* sort tree */ int startnode; /* root in sort tree */ char *trstr; /* phylip tree string */ treelistitemtype *treeitem; /* list entry of tree */ # if PARALLEL cmatrix *bp; /* temporary buffer for splits in slaves */ int n; /* step count for init/free split buffer */ # endif /* PARALLEL */ # if PARALLEL /* add times to arry */ addtimes(GENERAL, &tarr); /* alloc temporary split memory */ bp = (cmatrix *) calloc((size_t) Numtrial, sizeof(void *)); for(n=0; n phylip tree string */ trstr=sprintfctree(ctree, psteptreestrlen); /* add sorted tree to unique tree list */ treeitem = addtree2list(&trstr, 1, &psteptreelist, &psteptreenum, &psteptreesum); # if ! PARALLEL /* output unique tree to trace list, if option set */ /* not done on slave processes */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) { /* print: order no/# topol per this id/tree id/sum of unique topologies/sum of trees so far */ fprintf(qptlist, "%ld.\t1\t%d\t%d\t%d\t%d\n", Currtrial + 1, (*treeitem).count, (*treeitem).id, psteptreenum, psteptreesum); } # endif /* ! PARALLEL */ # ifdef VERBOSE1 printf("%s\n", trstr); printfsortedpstrees(psteptreelist); # endif /* free sorting tree structure */ freectree(&ctree); /* free tree before building the next tree */ freetree_split(tmpedgeset, tmpedgeofleaf, Maxspc); # if ! PARALLEL /* generate message roughly every 15 minutes */ /* check timer */ time(&time2); if ( (time2 - time1) > TIMECHECK_INTERVAL) { double tc2, mintogo, minutes, hours; /* every TIMECHECK_INTERVAL seconds */ /* percentage of completed trees */ if (mflag == 0) { fprintf(STDOUT, "\n"); mflag = 1; } tc2 = 100.0*Currtrial/Numtrial; /* excluded for less runtime, but less accuracy of the 15min */ /* + 100.0*nq/Numquartets/Numtrial; */ mintogo = (100.0-tc2) * (double) (time2-time0)/60.0/tc2; hours = floor(mintogo/60.0); minutes = mintogo - 60.0*hours; fprintf(STDOUT, "%2.2f%%", tc2); fprintf(STDOUT, " completed (remaining"); fprintf(STDOUT, " time: %.0f", hours); fprintf(STDOUT, " hours %.0f", minutes); fprintf(STDOUT, " minutes)\n"); fflush(STDOUT); time1 = time2; } /* check timer */ # endif /* ! PARALLEL */ addtimes(PUZZLING, &tarr); } /* for Numtrials */ # if PARALLEL /* in slaves: send results: splits, trees */ PP_SendSplitsBlock(Maxspc, Numtrial, bp, psteptreenum, psteptreelist); /* free temporary split memory */ for (Currtrial = 0; Currtrial < Numtrial; Currtrial++) { free_cmatrix(bp[Currtrial]); } free(bp); /* sent! Thus, in slave process not needed any more */ freetreelist(&psteptreelist, &psteptreenum, &psteptreesum); # endif /* PARALLEL */ } /* allpstep_split */ tree-puzzle-5.2/src/pstep-split.h0000644000076400001440000001714510073365265012572 /* * pstep-split.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ /* split based O(n^4) algorithm */ #ifndef PSTEP_SPLIT_H #define PSTEP_SPLIT_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ #ifndef ONEEDGE # define ONEEDGE ONEEDGE_SPLIT #endif /* ! ONEEDGE_DEFINED */ #define NOWHERE 0 #define UP 1 #define UPDOWNLEFT 2 #define UPDOWNRIGHT 3 #define DOWNLEFT 4 #define DOWNRIGHT 5 #define STARTING 6 /* tree structure */ typedef struct oneedge_split { /* pointer to other three edges */ struct oneedge_split *up; struct oneedge_split *downleft; struct oneedge_split *downright; int numedge; /* number of edge (index) */ uli penalty; /* penalty of this edge */ int *split; /* cluster array (up: 0..upsize-1; down: maxspc-1..maxspc-downsize */ int upsize; /* size of root-ward cluster */ int downsize; /* size of non-root-ward cluster */ #if 0 uli edgeinfo; /* value of this edge (penalty) */ int *edgemap; /* _orig algorithm: pointer to the local edgemap array */ int *upcluster; /* cluster array of root-ward taxa */ int *downcluster; /* cluster array of non-root-ward taxa */ #endif } ONEEDGE_SPLIT; /*****************************************************************************/ /* internal functions for representing and building puzzling step trees */ /*****************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * [upcluster=0] * [downcluster=1,2] * [upsize=1] * [downsize=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * [upcluster=0,2] [upcluster=0] * [downcluster=1] [downcluster=2] * [upsize=2] [upsize=2] * [downsize=1] [downsize=1] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_split(ONEEDGE_SPLIT **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf); /* out: next free leaf index (=3) */ /* add next leaf on the specified edge */ void addnextleaf_split(int dockedge, /* insert here */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *nextedge, /* next free edge idx */ int *nextleaf); /* next free leaf idx */ /* free memory (to be called after inittree) */ void freetree_split(ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ /* writes OTU sitting on edge ed */ void writeOTU_split(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID); /* species permutation */ /* write tree */ void writetree_split(FILE *outfp, /* output file */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID); /* species permutation */ /* clear all edgeinfos */ void resetedgeinfo_split(ONEEDGE_SPLIT *edge, /* edge array */ int nextedge); /* next free edge idx */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_split(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_split(ONEEDGE_SPLIT *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedge, /* minimum edge set */ uli *mininfo); /* minumum penalty */ /*****************************************************************************/ /* global functions for representing and building puzzling step trees */ /*****************************************************************************/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_split( /* PStep (intermediate) tree topol: */ ONEEDGE_SPLIT **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation); /* in: species permutation (trueID) */ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep_split(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn); /* in: 'fixed' anchored RNG (debug)*/ #endif /* PSTEP_SPLIT_H */ tree-puzzle-5.2/src/model1.c0000644000076400001440000002153210073365272011453 /* * model1.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif /* definitions */ #define EXTERN extern /* prototypes */ #include #include "util.h" #include "puzzle.h" #include "ml.h" /* number of states of the selected model */ int gettpmradix() { if (data_optn == 0) { /* nucleotides */ if (nuc_optn) return 4; if (SH_optn) return 16; } else if (data_optn == 1) { /* amino acids */ return 20; } else { /* two-state model */ return 2; } return 1; } /* gettpmradix */ /* relative transition frequencies */ void rtfdata(dmatrix q, double *f) { double alp, alpy, alpr; int i, j; if (data_optn == 0) { /* nucleotides */ if (nuc_optn) { /* 4x4 nucleotides */ if (!GTR_optn) { alp = 2.0*TSparam; alpr = (alp * 2.0) / (YRparam + 1.0); alpy = YRparam * alpr; q[0][1] =1; q[0][2] =alpr; q[0][3] =1; q[1][2] =1; q[1][3] =alpy; q[2][3] =1; GTR_ACrate = q[0][1]; GTR_AGrate = q[0][2]; GTR_ATrate = q[0][3]; GTR_CGrate = q[1][2]; GTR_CTrate = q[1][3]; GTR_GTrate = q[2][3]; f[0] = 0.25; f[1] = 0.25; f[2] = 0.25; f[3] = 0.25; } else { #if 0 alp = 2.0*TSparam; alpr = (alp * 2.0) / (YRparam + 1.0); alpy = YRparam * alpr; #endif q[0][1] = GTR_ACrate; q[0][2] = GTR_AGrate; q[0][3] = GTR_ATrate; q[1][2] = GTR_CGrate; q[1][3] = GTR_CTrate; q[2][3] = GTR_GTrate; f[0] = 0.25; f[1] = 0.25; f[2] = 0.25; f[3] = 0.25; } } if (SH_optn) { /* 16x16 nucleotides */ alp = 2.0*TSparam; q[0][1] =1; q[0][2] =alp; q[0][3] =1; q[0][4] =1; q[0][5] =0; q[0][6] =0; q[0][7] =0; q[0][8] =alp; q[0][9] =0; q[0][10] =0; q[0][11] =0; q[0][12] =1; q[0][13] =0; q[0][14] =0; q[0][15] =0; q[1][2] =1; q[1][3] =alp; q[1][4] =0; q[1][5] =1; q[1][6] =0; q[1][7] =0; q[1][8] =0; q[1][9] =alp; q[1][10] =0; q[1][11] =0; q[1][12] =0; q[1][13] =1; q[1][14] =0; q[1][15] =0; q[2][3] =1; q[2][4] =0; q[2][5] =0; q[2][6] =1; q[2][7] =0; q[2][8] =0; q[2][9] =0; q[2][10] =alp; q[2][11] =0; q[2][12] =0; q[2][13] =0; q[2][14] =1; q[2][15] =0; q[3][4] =0; q[3][5] =0; q[3][6] =0; q[3][7] =1; q[3][8] =0; q[3][9] =0; q[3][10] =0; q[3][11] =alp; q[3][12] =0; q[3][13] =0; q[3][14] =0; q[3][15] =1; q[4][5] =1; q[4][6] =alp; q[4][7] =1; q[4][8] =1; q[4][9] =0; q[4][10] =0; q[4][11] =0; q[4][12] =alp; q[4][13] =0; q[4][14] =0; q[4][15] =0; q[5][6] =1; q[5][7] =alp; q[5][8] =0; q[5][9] =1; q[5][10] =0; q[5][11] =0; q[5][12] =0; q[5][13] =alp; q[5][14] =0; q[5][15] =0; q[6][7] =1; q[6][8] =0; q[6][9] =0; q[6][10] =1; q[6][11] =0; q[6][12] =0; q[6][13] =0; q[6][14] =alp; q[6][15] =0; q[7][8] =0; q[7][9] =0; q[7][10] =0; q[7][11] =1; q[7][12] =0; q[7][13] =0; q[7][14] =0; q[7][15] =alp; q[8][9] =1; q[8][10] =alp; q[8][11] =1; q[8][12] =1; q[8][13] =0; q[8][14] =0; q[8][15] =0; q[9][10] =1; q[9][11] =alp; q[9][12] =0; q[9][13] =1; q[9][14] =0; q[9][15] =0; q[10][11]=1; q[10][12]=0; q[10][13]=0; q[10][14]=1; q[10][15]=0; q[11][12]=0; q[11][13]=0; q[11][14]=0; q[11][15]=1; q[12][13]=1; q[12][14]=alp; q[12][15]=1; q[13][14]=1; q[13][15]=alp; q[14][15]=1; for (i = 0; i < 16; i++) f[i] = 0.0625; } } else if (data_optn == 1) { /* amino acids */ if (Dayhf_optn) /* Dayhoff model */ { dyhfdata(q, f); } else if (Jtt_optn) /* JTT model */ { jttdata(q, f); } else if (blosum62_optn) /* BLOSUM 62 model */ { blosum62data(q, f); } else if (mtrev_optn) /* mtREV model */ { mtrevdata(q, f); } else if (cprev_optn) /* cpREV model */ { cprev45data(q, f); } else if (vtmv_optn) /* VT model */ { vtmvdata(q, f); } else /* if (wag_optn) */ /* WAG model */ { wagdata(q, f); } } else /* two-state model */ { q[0][1] = 1.0; f[0] = 0.5; f[1] = 0.5; } /* fill matrix from upper triangle */ for (i = 0; i < tpmradix; i++) { q[i][i] = 0.0; for (j = i+1; j < tpmradix; j++) { q[j][i] = q[i][j]; } } } /* rtfdata */ /* transform letter codes to state numbers */ int code2int(cvector c, int *numgaps, int *others) { if (data_optn == NUCLEOTIDE) { /* nucleotides */ if (nuc_optn) { /* 4x4 */ switch (c[0]) { case 'A': return 0; case 'C': return 1; case 'G': return 2; case 'T': return 3; case 'U': return 3; case '-': (*numgaps)++; return 4; default : (*others)++; return 4; } } /* nuc - 4x4 */ if (SH_optn) { /* 16x16 */ if (c[0] == 'A') { switch (c[1]) { case 'A': return 0; /* AA */ case 'C': return 1; /* AC */ case 'G': return 2; /* AG */ case 'T': return 3; /* AT */ case 'U': return 3; /* AT */ case '-': (*numgaps)++; return 16; /* A- */ default: (*others)++; return 16; } } if (c[0] == 'C') { switch (c[1]) { case 'A': return 4; /* CA */ case 'C': return 5; /* CC */ case 'G': return 6; /* CG */ case 'T': return 7; /* CT */ case 'U': return 7; /* CT */ case '-': (*numgaps)++; return 16; /* C- */ default: (*others)++; return 16; } } if (c[0] == 'G') { switch (c[1]) { case 'A': return 8; /* GA */ case 'C': return 9; /* GC */ case 'G': return 10; /* GG */ case 'T': return 11; /* GT */ case 'U': return 11; /* GT */ case '-': (*numgaps)++; return 16; /* G- */ default: (*others)++; return 16; } } if (c[0] == 'T' || c[0] == 'U') { switch (c[1]) { case 'A': return 12; /* TA */ case 'C': return 13; /* TC */ case 'G': return 14; /* TG */ case 'T': return 15; /* TT */ case 'U': return 15; /* TT */ case '-': (*numgaps)++; return 16; /* T- */ default: (*others)++; return 16; } } /* -A, -C, -G, -T, ?A, ?C, ?G, ?T */ if (c[0] == '-') (*numgaps)++; else (*others)++; if (!((c[1] == 'T') || (c[1] == 'U') || (c[1] == 'T') || (c[1] == 'U'))) { if (c[1] == '-') (*numgaps)++; else (*others)++; } return 16; } /* SH - 16x16 */ } else if (data_optn == AMINOACID) { /* amino acids */ switch (c[0]) { case 'A': return 0; case 'C': return 4; case 'D': return 3; case 'E': return 6; case 'F': return 13; case 'G': return 7; case 'H': return 8; case 'I': return 9; case 'K': return 11; case 'L': return 10; case 'M': return 12; case 'N': return 2; case 'P': return 14; case 'Q': return 5; case 'R': return 1; case 'S': return 15; case 'T': return 16; case 'V': return 19; case 'W': return 17; case 'Y': return 18; case '-': (*numgaps)++; return 20; default : (*others)++; return 20; } } else { /* two-state model - BINARY */ switch (c[0]) { case '0': return 0; case '1': return 1; case '-': (*numgaps)++; return 2; default : (*others)++; return 2; } } /* two-state model */ return 0; } /* code2int */ /* return letter code belonging to state number */ char *int2code(int s) { if (data_optn == 0) { /* nucleotides */ if (nuc_optn) { /* 4x4 */ switch (s) { case 0: return "A"; case 1: return "C"; case 2: return "G"; case 3: return "T"; default : return "?"; } } if (SH_optn) { /* 16x16 */ switch (s) { case 0: return "AA"; case 1: return "AC"; case 2: return "AG"; case 3: return "AT"; case 4: return "CA"; case 5: return "CC"; case 6: return "CG"; case 7: return "CT"; case 8: return "GA"; case 9: return "GC"; case 10: return "GG"; case 11: return "GT"; case 12: return "TA"; case 13: return "TC"; case 14: return "TG"; case 15: return "TT"; default : return "??"; } } } else if (data_optn == 1) { /* amino acids */ switch (s) { case 0: return "A"; case 1: return "R"; case 2: return "N"; case 3: return "D"; case 4: return "C"; case 5: return "Q"; case 6: return "E"; case 7: return "G"; case 8: return "H"; case 9: return "I"; case 10: return "L"; case 11: return "K"; case 12: return "M"; case 13: return "F"; case 14: return "P"; case 15: return "S"; case 16: return "T"; case 17: return "W"; case 18: return "Y"; case 19: return "V"; default : return "?"; } } else { /* two-state model */ switch (s) { case 0: return "0"; case 1: return "1"; default : return "?"; } } return "?"; } /* int2code */ tree-puzzle-5.2/src/model2.c0000644000076400001440000013725110073365276011466 /* * model2.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif /* definitions */ #define EXTERN extern /* prototypes */ #include #include "util.h" #include "ml.h" /* IUPAC AA Codings: * * ordered by 1-letter-code: * * A C D E F G H I K L M N P Q R S T V W Y -/others * Ala Cys Asp Glu Phe Gly His Ile Lys Leu Met Asn Pro Gln Arg Ser Thr Val Trp Tyr * 0 4 3 6 13 7 8 9 11 10 12 2 14 5 1 15 16 19 17 18 20 * * * ordered by 3-letter-code/index: * * 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 * A R N D C Q E G H I L K M F P S T W Y V -/others * Ala Arg Asn Asp Cys Gln Glu Gly His Ile Leu Lys Met Phe Pro Ser Thr Trp Tyr Val * */ void jttdata(dmatrix q, double *f) { /* * JTT model for amino acid evolution * D.T. Jones, W.R. Taylor, and J.M. Thornton * "The rapid generation of mutation data matrices from protein sequences" * CABIOS vol. 8 no. 3 1992 pp. 275-282 */ q[0][1]=3.1628651460584e+00; q[0][2]=3.2804935927860e+00; q[0][3]=4.8477237048666e+00; q[0][4]=3.4612244897959e+00; q[0][5]=3.3130910900946e+00; q[0][6]=6.3199473337722e+00; q[0][7]=1.0440154440154e+01; q[0][8]=1.3061224489796e+00; q[0][9]=2.1726844583987e+00; q[0][10]=1.8443597219107e+00; q[0][11]=2.2137668626773e+00; q[0][12]=2.7210884353741e+00; q[0][13]=8.3265306122449e-01; q[0][14]=1.1537414965986e+01; q[0][15]=2.2838213546288e+01; q[0][16]=2.7007955724663e+01; q[0][17]=5.1311953352770e-01; q[0][18]=8.3673469387755e-01; q[0][19]=1.7474335188621e+01; q[1][2]=2.6598918637222e+00; q[1][3]=9.1014867485456e-01; q[1][4]=6.1624649859944e+00; q[1][5]=1.8036482885837e+01; q[1][6]=1.8924731182796e+00; q[1][7]=8.1810886516769e+00; q[1][8]=1.9119717452198e+01; q[1][9]=1.4410687351864e+00; q[1][10]=2.2211961707760e+00; q[1][11]=3.9239234676922e+01; q[1][12]=2.5060690943044e+00; q[1][13]=3.9439775910364e-01; q[1][14]=4.1953094963476e+00; q[1][15]=5.9016766126741e+00; q[1][16]=3.8437069743152e+00; q[1][17]=7.6766706682673e+00; q[1][18]=1.4173669467787e+00; q[1][19]=1.0308123249300e+00; q[2][3]=3.2226935854843e+01; q[2][4]=1.8710963455150e+00; q[2][5]=4.5351268130622e+00; q[2][6]=3.3951344979102e+00; q[2][7]=4.5987249708180e+00; q[2][8]=2.3693774375271e+01; q[2][9]=2.9235880398671e+00; q[2][10]=8.0960899565551e-01; q[2][11]=1.5024269384537e+01; q[2][12]=1.9003322259136e+00; q[2][13]=4.3853820598007e-01; q[2][14]=7.1083317047749e-01; q[2][15]=2.9456208772690e+01; q[2][16]=1.3735908553410e+01; q[2][17]=1.6706217370669e-01; q[2][18]=4.1661129568106e+00; q[2][19]=9.7452934662237e-01; q[3][4]=6.2857142857143e-01; q[3][5]=3.0662020905923e+00; q[3][6]=4.5450549450549e+01; q[3][7]=7.5402435402435e+00; q[3][8]=6.0544672718586e+00; q[3][9]=6.8808114961961e-01; q[3][10]=3.6130902064968e-01; q[3][11]=1.6718197057180e+00; q[3][12]=1.0879120879121e+00; q[3][13]=1.9340659340659e-01; q[3][14]=7.3949579831933e-01; q[3][15]=3.4196528109572e+00; q[3][16]=2.4749487800335e+00; q[3][17]=3.4536891679749e-01; q[3][18]=2.6895604395604e+00; q[3][19]=1.8608058608059e+00; q[4][5]=5.5191637630662e-01; q[4][6]=3.2442396313364e-01; q[4][7]=3.3297297297297e+00; q[4][8]=4.3726708074534e+00; q[4][9]=9.1868131868132e-01; q[4][10]=9.9466248037677e-01; q[4][11]=2.9830508474576e-01; q[4][12]=2.4095238095238e+00; q[4][13]=4.1485714285714e+00; q[4][14]=7.3949579831933e-01; q[4][15]=1.2862939958592e+01; q[4][16]=2.8125907990315e+00; q[4][17]=6.8244897959184e+00; q[4][18]=1.2885714285714e+01; q[4][19]=3.7714285714286e+00; q[5][6]=2.0316061593796e+01; q[5][7]=1.3922214897825e+00; q[5][8]=3.3861536130889e+01; q[5][9]=4.7172339855267e-01; q[5][10]=4.2320327755868e+00; q[5][11]=1.7835941652395e+01; q[5][12]=2.6573751451800e+00; q[5][13]=2.7595818815331e-01; q[5][14]=9.4992143198743e+00; q[5][15]=3.2350653941322e+00; q[5][16]=3.0973838067678e+00; q[5][17]=1.0512692882031e+00; q[5][18]=1.5331010452962e+00; q[5][19]=1.0778164924506e+00; q[6][7]=6.6857641051189e+00; q[6][8]=1.4458024443999e+00; q[6][9]=6.7068415455512e-01; q[6][10]=5.7932850559579e-01; q[6][11]=1.0365070686558e+01; q[6][12]=1.0138248847926e+00; q[6][13]=2.6359447004608e-01; q[6][14]=1.1291226167887e+00; q[6][15]=1.8337006611901e+00; q[6][16]=1.9520424900414e+00; q[6][17]=6.9519420671494e-01; q[6][18]=3.8018433179723e-01; q[6][19]=2.7772657450077e+00; q[7][8]=1.2113479939567e+00; q[7][9]=3.2670032670033e-01; q[7][10]=4.1817641817642e-01; q[7][11]=1.6354950592239e+00; q[7][12]=7.6447876447876e-01; q[7][13]=3.0579150579151e-01; q[7][14]=1.2391551215081e+00; q[7][15]=1.1138492529797e+01; q[7][16]=1.8888816176952e+00; q[7][17]=3.3491450634308e+00; q[7][18]=3.1853281853282e-01; q[7][19]=2.8416988416988e+00; q[8][9]=1.0931677018634e+00; q[8][10]=3.2194389461470e+00; q[8][11]=3.1498052426571e+00; q[8][12]=1.9130434782609e+00; q[8][13]=2.7329192546584e+00; q[8][14]=6.7304834977469e+00; q[8][15]=4.3726708074534e+00; q[8][16]=2.8162964522581e+00; q[8][17]=7.8083407275954e-01; q[8][18]=3.5118012422360e+01; q[8][19]=7.2877846790890e-01; q[9][10]=1.4069798333535e+01; q[9][11]=1.2292791953809e+00; q[9][12]=2.8366300366300e+01; q[9][13]=4.7384615384615e+00; q[9][14]=5.8780435251023e-01; q[9][15]=2.4105749323141e+00; q[9][16]=1.5243062022723e+01; q[9][17]=8.2888540031397e-01; q[9][18]=1.8434065934066e+00; q[9][19]=5.7699633699634e+01; q[10][11]=8.8039805231089e-01; q[10][12]=2.2425954997384e+01; q[10][13]=1.5099529042386e+01; q[10][14]=6.2626896912611e+00; q[10][15]=3.4917298022888e+00; q[10][16]=1.6109411169944e+00; q[10][17]=3.2366001345593e+00; q[10][18]=1.4505494505495e+00; q[10][19]=1.0557823129252e+01; q[11][12]=3.6577885391445e+00; q[11][13]=1.4915254237288e-01; q[11][14]=1.2868062479229e+00; q[11][15]=2.8162964522581e+00; q[11][16]=5.7494151926786e+00; q[11][17]=5.4790729851263e-01; q[11][18]=5.3268765133172e-01; q[11][19]=7.4899112187248e-01; q[12][13]=2.5666666666667e+00; q[12][14]=9.4491129785247e-01; q[12][15]=1.6397515527950e+00; q[12][16]=1.2180790960452e+01; q[12][17]=1.1972789115646e+00; q[12][18]=1.1130952380952e+00; q[12][19]=1.7746031746032e+01; q[13][14]=8.8739495798319e-01; q[13][15]=5.6298136645963e+00; q[13][16]=8.3099273607748e-01; q[13][17]=3.3224489795918e+00; q[13][18]=3.3392857142857e+01; q[13][19]=3.6000000000000e+00; q[14][15]=1.6261762676085e+01; q[14][16]=6.8852490148602e+00; q[14][17]=4.2256902761104e-01; q[14][18]=6.7787114845938e-01; q[14][19]=1.2549019607843e+00; q[15][16]=2.7891216619293e+01; q[15][17]=1.8740017746229e+00; q[15][18]=3.7349896480331e+00; q[15][19]=2.4182194616977e+00; q[16][17]=4.8702870978900e-01; q[16][18]=1.1985472154964e+00; q[16][19]=6.7925746569814e+00; q[17][18]=4.6020408163265e+00; q[17][19]=1.4693877551020e+00; q[18][19]=1.0000000000000e+00; f[0] = 0.077; f[1] = 0.051; f[2] = 0.043; f[3] = 0.052; f[4] = 0.02; f[5] = 0.041; f[6] = 0.062; f[7] = 0.074; f[8] = 0.023; f[9] = 0.052; f[10] = 0.091; f[11] = 0.059; f[12] = 0.024; f[13] = 0.04; f[14] = 0.051; f[15] = 0.069; f[16] = 0.059; f[17] = 0.014; f[18] = 0.032; f[19] = 0.066; } /* jttdata */ void dyhfdata(dmatrix q, double *f) { /* * Dayhoff model for amino acid evolution * Dayhoff, M.O., Schwartz, R.M., Orcutt, B.C. (1978) * "A model of evolutionary change in proteins." * Dayhoff, M.O. (ed.) Atlas of Protein Sequence Structur., Vol5, Suppl. 3, * National Biomedical Research Foundation, Washington DC, pp. 345-352. */ q[0][1]=9.6472567159749e-01; q[0][2]=3.5927991886410e+00; q[0][3]=4.3200552414656e+00; q[0][4]=1.3184584178499e+00; q[0][5]=3.2267534963169e+00; q[0][6]=7.0141987829615e+00; q[0][7]=8.5773867857875e+00; q[0][8]=8.1434196396611e-01; q[0][9]=2.3518447453539e+00; q[0][10]=1.4735711728911e+00; q[0][11]=9.3940162271805e-01; q[0][12]=2.5490196078431e+00; q[0][13]=6.5922920892495e-01; q[0][14]=8.9189834148670e+00; q[0][15]=1.4540712836859e+01; q[0][16]=1.3411904595370e+01; q[0][17]=3.8517964118027e-02; q[0][18]=8.7897227856660e-01; q[0][19]=7.4036511156187e+00; q[1][2]=1.1890243902439e+00; q[1][3]=5.9525626545377e-02; q[1][4]=8.4778922655537e-01; q[1][5]=8.8348561504191e+00; q[1][6]=5.5954088952654e-02; q[1][7]=3.1434881434075e-01; q[1][8]=8.4753987678285e+00; q[1][9]=2.2684090115941e+00; q[1][10]=5.5954088952654e-01; q[1][11]=1.6681312769010e+01; q[1][12]=3.1707317073171e+00; q[1][13]=4.8959827833572e-01; q[1][14]=3.6754156468900e+00; q[1][15]=5.4755072760812e+00; q[1][16]=9.6472567159749e-01; q[1][17]=7.5538020086083e+00; q[1][18]=2.7977044476327e-01; q[1][19]=8.6083213773314e-01; q[2][3]=3.2459324155194e+01; q[2][4]=7.3852625416383e-02; q[2][5]=3.7732198142415e+00; q[2][6]=5.3911764705882e+00; q[2][7]=5.0264375413087e+00; q[2][8]=1.9061418685121e+01; q[2][9]=2.7901430842607e+00; q[2][10]=1.2482698961938e+00; q[2][11]=1.1542279411765e+01; q[2][12]=1.9117647058824e-01; q[2][13]=5.0183823529412e-01; q[2][14]=1.5181660899654e+00; q[2][15]=1.7697478991597e+01; q[2][16]=8.3557302231237e+00; q[2][17]=8.6029411764706e-01; q[2][18]=3.4411764705882e+00; q[2][19]=5.7352941176471e-01; q[3][4]=2.5534152404601e-02; q[3][5]=4.8811013767209e+00; q[3][6]=4.0561952440551e+01; q[3][7]=4.4423506911730e+00; q[3][8]=3.0865788117500e+00; q[3][9]=8.5749078239692e-01; q[3][10]=2.5926985518518e-02; q[3][11]=2.5930851063830e+00; q[3][12]=1.1667143483333e-01; q[3][13]=1.2963492759259e-02; q[3][14]=4.7853935065891e-01; q[3][15]=3.4167709637046e+00; q[3][16]=2.3984722282163e+00; q[3][17]=3.2408731898147e-02; q[3][18]=8.1351689612015e-02; q[3][19]=6.3829787234043e-01; q[4][5]=2.1864264103535e-02; q[4][6]=1.4770525083277e-02; q[4][7]=3.9055458751427e-01; q[4][8]=1.0223340673168e+00; q[4][9]=1.5970515970516e+00; q[4][10]=3.9098448749850e-02; q[4][11]=8.0776309049169e-03; q[4][12]=1.4155086538140e-01; q[4][13]=8.6898395721925e-02; q[4][14]=6.8155604487784e-01; q[4][15]=5.8097784568373e+00; q[4][16]=5.9929928084086e-01; q[4][17]=3.4759358288770e-01; q[4][18]=3.4759358288770e+00; q[4][19]=1.7647058823529e+00; q[5][6]=2.5476780185759e+01; q[5][7]=1.0174974779977e+00; q[5][8]=2.1573939173192e+01; q[5][9]=6.5266504894988e-01; q[5][10]=2.6634492806410e+00; q[5][11]=5.5466331269350e+00; q[5][12]=4.0247678018576e+00; q[5][13]=1.8038017885416e-02; q[5][14]=5.5044618466582e+00; q[5][15]=2.0267580716497e+00; q[5][16]=1.9256432155439e+00; q[5][17]=9.6202762055552e-02; q[5][18]=1.0061919504644e-01; q[5][19]=1.2538699690402e+00; q[6][7]=2.8869795109055e+00; q[6][8]=1.5519031141869e+00; q[6][9]=2.1701112877583e+00; q[6][10]=4.0484429065744e-01; q[6][11]=2.9823529411765e+00; q[6][12]=1.0705882352941e+00; q[6][13]=1.9801735189768e-02; q[6][14]=1.7993079584775e+00; q[6][15]=2.8184873949580e+00; q[6][16]=1.2261663286004e+00; q[6][17]=7.3114099162219e-02; q[6][18]=7.6470588235294e-01; q[6][19]=1.3058823529412e+00; q[7][8]=3.7906768788150e-01; q[7][9]=2.3128004846840e-02; q[7][10]=2.5776602775942e-01; q[7][11]=9.6662260409782e-01; q[7][12]=6.0145406477198e-01; q[7][13]=5.4775280898876e-01; q[7][14]=1.2382877804129e+00; q[7][15]=8.2853366065527e+00; q[7][16]=1.1110604644803e+00; q[7][17]=1.2888301387971e-01; q[7][18]=1.7114723586662e-02; q[7][19]=1.9233311302049e+00; q[8][9]=2.7354343963341e-01; q[8][10]=1.5876246692449e+00; q[8][11]=9.6993944636678e-01; q[8][12]=1.2544085640577e-01; q[8][13]=1.6868512110727e+00; q[8][14]=3.3075513942601e+00; q[8][15]=1.2530894710826e+00; q[8][16]=8.1434196396611e-01; q[8][17]=1.0121107266436e+00; q[8][18]=4.4982698961938e+00; q[8][19]=1.5570934256055e+00; q[9][10]=9.2275320303002e+00; q[9][11]=1.6663354531002e+00; q[9][12]=1.1780604133545e+01; q[9][13]=6.9753577106518e+00; q[9][14]=4.2551201720752e-01; q[9][15]=8.8575970928912e-01; q[9][16]=6.8951811852420e+00; q[9][17]=9.8802836705702e-02; q[9][18]=1.3434022257552e+00; q[9][19]=3.1526232114467e+01; q[10][11]=6.5787197231834e-01; q[10][12]=1.8622837370242e+01; q[10][13]=5.6340830449827e+00; q[10][14]=1.1377976796255e+00; q[10][15]=6.1690558576372e-01; q[10][16]=1.2098794893211e+00; q[10][17]=1.7543252595156e+00; q[10][18]=1.0346020761246e+00; q[10][19]=6.2906574394464e+00; q[11][12]=8.6029411764706e+00; q[11][13]=6.6640454965565e-03; q[11][14]=1.2089100346021e+00; q[11][15]=3.4411764705882e+00; q[11][16]=4.9442190669371e+00; q[11][17]=3.4272233982290e-02; q[11][18]=4.7794117647059e-01; q[11][19]=3.7500000000000e-01; q[12][13]=3.2500000000000e+00; q[12][14]=5.9976931949250e-01; q[12][15]=2.1848739495798e+00; q[12][16]=3.6916835699797e+00; q[12][17]=1.6247577591604e-01; q[12][18]=1.1508700794053e-01; q[12][19]=9.0588235294118e+00; q[13][14]=3.9359861591695e-01; q[13][15]=1.6386554621849e+00; q[13][16]=4.9442190669371e-01; q[13][17]=2.8676470588235e+00; q[13][18]=2.4852941176471e+01; q[13][19]=4.4117647058824e-01; q[14][15]=8.6431043005437e+00; q[14][16]=2.8308077795013e+00; q[14][17]=3.5840244687362e-02; q[14][18]=4.3804743506776e-02; q[14][19]=1.7301038062284e+00; q[15][16]=1.9663865546218e+01; q[15][17]=2.7857142857143e+00; q[15][18]=1.2016806722689e+00; q[15][19]=1.0840336134454e+00; q[16][17]=4.2019597219666e-02; q[16][18]=1.5162271805274e+00; q[16][19]=5.6592292089249e+00; q[17][18]=2.2941176470588e+00; q[17][19]=1.2654363316538e-01; q[18][19]=1.0000000000000e+00; f[0] = 0.087; f[1] = 0.041; f[2] = 0.040; f[3] = 0.047; f[4] = 0.033; f[5] = 0.038; f[6] = 0.05; f[7] = 0.089; f[8] = 0.034; f[9] = 0.037; f[10] = 0.085; f[11] = 0.08; f[12] = 0.015; f[13] = 0.04; f[14] = 0.051; f[15] = 0.07; f[16] = 0.058; f[17] = 0.01; f[18] = 0.03; f[19] = 0.065; } /* dyhfdata */ void mtrevdata(dmatrix q, double *f) { /* * mtREV24 model of amino acid evolution * (complete sequence data of mtDNA from 24 vertebrate species) * Adachi, J. and Hasegawa, M. (1996) * * (values optained from molphy. matrix normalized such that * sum of lower triangular is 100000 and lower limit is 10.) */ q[0][1] =1.2199217606346e+01; q[0][2] =1.4182139942122e+01; q[0][3] =9.2985091873208e+00; q[0][4] =3.1542792981957e+01; q[0][5] =1.0025852846688e+00; q[0][6] =5.1418866803338e+00; q[0][7] =6.3531246495131e+01; q[0][8] =7.3137132861715e+00; q[0][9] =5.0782382656186e+01; q[0][10] =1.3399741808481e+01; q[0][11] =4.4021672780560e+00; q[0][12] =7.4673480520104e+01; q[0][13] =3.3513021631978e+00; q[0][14] =2.8582502221773e+01; q[0][15] =2.0413623195312e+02; q[0][16] =2.5301305153906e+02; q[0][17] =1.0000000000000e+00; q[0][18] =3.4084158197615e+00; q[0][19] =1.0266468401249e+02; q[1][2] =6.9661274444534e+00; q[1][3] =1.0000000000000e+00; q[1][4] =5.4384584796568e+01; q[1][5] =1.1631134513343e+02; q[1][6] =1.0000000000000e+00; q[1][7] =1.2122831341194e+01; q[1][8] =8.6961067087353e+01; q[1][9] =1.0000000000000e+00; q[1][10] =8.1976829394538e+00; q[1][11] =7.4423215395318e+01; q[1][12] =1.0000000000000e+00; q[1][13] =2.4659158338099e+00; q[1][14] =1.2439947713615e+01; q[1][15] =3.1791814866372e+00; q[1][16] =1.0935327216119e+00; q[1][17] =1.1550775790126e+01; q[1][18] =1.0000000000000e+00; q[1][19] =4.0211417480338e+00; q[2][3] =4.1809325468160e+02; q[2][4] =3.1020979842967e+01; q[2][5] =9.1349622725361e+01; q[2][6] =3.3185663516310e+01; q[2][7] =2.8052324651124e+01; q[2][8] =2.6112087577885e+02; q[2][9] =1.4261453863336e+01; q[2][10] =7.9775653461977e+00; q[2][11] =3.2036829276162e+02; q[2][12] =3.4424354918739e+01; q[2][13] =7.9996445145608e+00; q[2][14] =3.8586541461044e+01; q[2][15] =2.6020426225852e+02; q[2][16] =1.2550758780474e+02; q[2][17] =5.6207759736659e+00; q[2][18] =1.0071406219571e+02; q[2][19] =1.0000000000000e+00; q[3][4] =1.0000000000000e+00; q[3][5] =2.9097352675564e+01; q[3][6] =3.0713149855302e+02; q[3][7] =2.9877072751897e+01; q[3][8] =5.9995408885817e+01; q[3][9] =2.2827096245105e+00; q[3][10] =1.0000000000000e+00; q[3][11] =1.2183938185384e+00; q[3][12] =1.0000000000000e+00; q[3][13] =2.6221929413096e+00; q[3][14] =7.0708004204733e+00; q[3][15] =3.6327934317139e+01; q[3][16] =1.4743408713748e+01; q[3][17] =1.0453246057102e+01; q[3][18] =1.1165627147496e+01; q[3][19] =1.0000000000000e+00; q[4][5] =3.9599394038972e+01; q[4][6] =1.0000000000000e+00; q[4][7] =1.6163581056674e+01; q[4][8] =7.4467985406234e+01; q[4][9] =3.3018175376623e+01; q[4][10] =1.3500725995091e+01; q[4][11] =1.0000000000000e+00; q[4][12] =3.2504095376923e+00; q[4][13] =3.7264767083096e+01; q[4][14] =1.6454136037822e+01; q[4][15] =1.4581783243113e+02; q[4][16] =9.4720031458442e+01; q[4][17] =1.7684087896962e+01; q[4][18] =1.3409157685926e+02; q[4][19] =1.0000000000000e+00; q[5][6] =1.6503249008836e+02; q[5][7] =3.5530760735494e+00; q[5][8] =3.0652523140859e+02; q[5][9] =4.3905393139325e+00; q[5][10] =2.0895470525345e+01; q[5][11] =2.4504076430724e+02; q[5][12] =2.4931300477797e+01; q[5][13] =1.0059428264289e+01; q[5][14] =7.2256314165467e+01; q[5][15] =2.8480937892158e+01; q[5][16] =4.9962974409828e+01; q[5][17] =1.0000000000000e+00; q[5][18] =2.0430790980529e+01; q[5][19] =9.9986289000676e+00; q[6][7] =1.4884496769963e+01; q[6][8] =2.5853576435567e+01; q[6][9] =1.7418201388328e+00; q[6][10] =1.0000000000000e+00; q[6][11] =1.6519126809071e+02; q[6][12] =1.0000000000000e+00; q[6][13] =1.4067850525292e+00; q[6][14] =6.7547121641947e+00; q[6][15] =2.8794794140840e+01; q[6][16] =7.8001372062558e+00; q[6][17] =1.0000000000000e+00; q[6][18] =6.9067239183061e+00; q[6][19] =1.1127702362585e+01; q[7][8] =1.0000000000000e+00; q[7][9] =3.1466649021550e+00; q[7][10] =1.2699794194865e+00; q[7][11] =1.1962111069278e+01; q[7][12] =1.0000000000000e+00; q[7][13] =1.0000000000000e+00; q[7][14] =1.0000000000000e+00; q[7][15] =6.6277950574411e+01; q[7][16] =5.8800079133028e+00; q[7][17] =5.7494182626674e+00; q[7][18] =1.6887657206208e+00; q[7][19] =1.3320553471351e+00; q[8][9] =6.4536986087271e+00; q[8][10] =6.0472584534958e+00; q[8][11] =6.7197196398961e+01; q[8][12] =6.2977633277779e+00; q[8][13] =2.5347805183364e+01; q[8][14] =3.2089868698728e+01; q[8][15] =4.0766987134407e+01; q[8][16] =2.3570850628539e+01; q[8][17] =3.7286635325194e+00; q[8][18] =3.5270764890474e+02; q[8][19] =1.0000000000000e+00; q[9][10] =1.7320653206333e+02; q[9][11] =1.0298655619743e+01; q[9][12] =2.7262244199514e+02; q[9][13] =4.4561065036310e+01; q[9][14] =1.0856482766156e+01; q[9][15] =2.5107659603898e+01; q[9][16] =1.9391167162525e+02; q[9][17] =1.0000000000000e+00; q[9][18] =1.3161329199391e+01; q[9][19] =6.4365086389428e+02; q[10][11]=7.8314019154706e+00; q[10][12]=2.8290920517725e+02; q[10][13]=1.1371735519833e+02; q[10][14]=2.1105885757279e+01; q[10][15]=3.8741359395934e+01; q[10][16]=6.6524559321657e+01; q[10][17]=1.7071378554833e+01; q[10][18]=2.3234516108847e+01; q[10][19]=4.8247261078055e+01; q[11][12]=4.8092094826036e+01; q[11][13]=3.3887559483420e+00; q[11][14]=2.6368577564199e+01; q[11][15]=5.5679895711418e+01; q[11][16]=7.1750284708933e+01; q[11][17]=1.2631893872825e+01; q[11][18]=2.6932728996777e+01; q[11][19]=1.0000000000000e+00; q[12][13]=4.7798798034572e+01; q[12][14]=9.9165053447429e+00; q[12][15]=5.8505442466161e+01; q[12][16]=2.7798190504760e+02; q[12][17]=1.1427000119701e+01; q[12][18]=2.1029990530586e+01; q[12][19]=2.0397078683768e+02; q[13][14]=9.1089574817139e+00; q[13][15]=3.3835737720574e+01; q[13][16]=1.7815549567056e+01; q[13][17]=4.1272404968214e+00; q[13][18]=2.4504156395152e+02; q[13][19]=3.3435675442163e+00; q[14][15]=8.9421193040709e+01; q[14][16]=6.7485067008375e+01; q[14][17]=2.2161693733113e+00; q[14][18]=8.5338209390745e+00; q[14][19]=4.3342126659660e+00; q[15][16]=3.1432036618746e+02; q[15][17]=2.0305343047059e+01; q[15][18]=3.4167877957799e+01; q[15][19]=1.0000000000000e+00; q[16][17]=5.2559565123081e+00; q[16][18]=2.0382362288681e+01; q[16][19]=1.0765527137500e+02; q[17][18]=1.3814733274637e+01; q[17][19]=2.8259139240676e+00; q[18][19]=1.0000000000000e+00; /* amino acid frequencies */ f[0]=0.072; f[1]=0.019; f[2]=0.039; f[3]=0.019; f[4]=0.006; f[5]=0.025; f[6]=0.024; f[7]=0.056; f[8]=0.028; f[9]=0.088; f[10]=0.168; f[11]=0.023; f[12]=0.054; f[13]=0.061; f[14]=0.054; f[15]=0.072; f[16]=0.086; f[17]=0.029; f[18]=0.033; f[19]=0.043; } /* mtrevdata */ void blosum62data(dmatrix q, double *f) { /* * BLOSUM62 model of amino acid evolution * * S. Henikoff and J. G. Henikoff. 1992. PNAS USA 89:10915-10919. * */ q[0][1]=7.3579038969751e-01; q[0][2]=4.8539105546575e-01; q[0][3]=5.4316182089867e-01; q[0][4]=1.4599953104700e+00; q[0][5]=1.1997057046020e+00; q[0][6]=1.1709490427999e+00; q[0][7]=1.9558835749595e+00; q[0][8]=7.1624144499779e-01; q[0][9]=6.0589900368677e-01; q[0][10]=8.0001653051838e-01; q[0][11]=1.2952012667833e+00; q[0][12]=1.2537582666635e+00; q[0][13]=4.9296467974759e-01; q[0][14]=1.1732759009239e+00; q[0][15]=4.3250926870566e+00; q[0][16]=1.7291780194850e+00; q[0][17]=4.6583936772479e-01; q[0][18]=7.1820669758623e-01; q[0][19]=2.1877745220045e+00; q[1][2]=1.2974467051337e+00; q[1][3]=5.0096440855513e-01; q[1][4]=2.2782657420895e-01; q[1][5]=3.0208336100636e+00; q[1][6]=1.3605741904203e+00; q[1][7]=4.1876330851753e-01; q[1][8]=1.4561411663360e+00; q[1][9]=2.3203644514174e-01; q[1][10]=6.2271166969249e-01; q[1][11]=5.4111151414889e+00; q[1][12]=9.8369298745695e-01; q[1][13]=3.7164469320875e-01; q[1][14]=4.4813366171831e-01; q[1][15]=1.1227831042096e+00; q[1][16]=9.1466595456337e-01; q[1][17]=4.2638231012175e-01; q[1][18]=7.2051744121611e-01; q[1][19]=4.3838834377202e-01; q[2][3]=3.1801000482161e+00; q[2][4]=3.9735894989702e-01; q[2][5]=1.8392161469920e+00; q[2][6]=1.2404885086396e+00; q[2][7]=1.3558723444845e+00; q[2][8]=2.4145014342081e+00; q[2][9]=2.8301732627800e-01; q[2][10]=2.1188815961519e-01; q[2][11]=1.5931370434574e+00; q[2][12]=6.4844127878707e-01; q[2][13]=3.5486124922252e-01; q[2][14]=4.9488704370192e-01; q[2][15]=2.9041016564560e+00; q[2][16]=1.8981736345332e+00; q[2][17]=1.9148204624678e-01; q[2][18]=5.3822251903674e-01; q[2][19]=3.1285879799342e-01; q[3][4]=2.4083661480204e-01; q[3][5]=1.1909457033960e+00; q[3][6]=3.7616252083685e+00; q[3][7]=7.9847324896839e-01; q[3][8]=7.7814266402188e-01; q[3][9]=4.1855573246161e-01; q[3][10]=2.1813157759360e-01; q[3][11]=1.0324479249521e+00; q[3][12]=2.2262189795786e-01; q[3][13]=2.8173069420651e-01; q[3][14]=7.3062827299842e-01; q[3][15]=1.5827541420653e+00; q[3][16]=9.3418750943056e-01; q[3][17]=1.4534504627853e-01; q[3][18]=2.6142220896504e-01; q[3][19]=2.5812928941763e-01; q[4][5]=3.2980150463028e-01; q[4][6]=1.4074889181440e-01; q[4][7]=4.1820319228376e-01; q[4][8]=3.5405810983129e-01; q[4][9]=7.7489402279418e-01; q[4][10]=8.3184264014158e-01; q[4][11]=2.8507880090648e-01; q[4][12]=7.6768882347954e-01; q[4][13]=4.4133747118660e-01; q[4][14]=3.5600849876863e-01; q[4][15]=1.1971884150942e+00; q[4][16]=1.1198313585160e+00; q[4][17]=5.2766441887169e-01; q[4][18]=4.7023773369610e-01; q[4][19]=1.1163524786062e+00; q[5][6]=5.5289191779282e+00; q[5][7]=6.0984630538281e-01; q[5][8]=2.4353411311401e+00; q[5][9]=2.3620245120365e-01; q[5][10]=5.8073709318144e-01; q[5][11]=3.9452776745146e+00; q[5][12]=2.4948960771127e+00; q[5][13]=1.4435695975031e-01; q[5][14]=8.5857057567418e-01; q[5][15]=1.9348709245965e+00; q[5][16]=1.2774802945956e+00; q[5][17]=7.5865380864172e-01; q[5][18]=9.5898974285014e-01; q[5][19]=5.3078579012486e-01; q[6][7]=4.2357999217628e-01; q[6][8]=1.6268910569817e+00; q[6][9]=1.8684804693170e-01; q[6][10]=3.7262517508685e-01; q[6][11]=2.8024271516787e+00; q[6][12]=5.5541539747043e-01; q[6][13]=2.9140908416530e-01; q[6][14]=9.2656393484598e-01; q[6][15]=1.7698932389373e+00; q[6][16]=1.0710972360073e+00; q[6][17]=4.0763564893830e-01; q[6][18]=5.9671930034577e-01; q[6][19]=5.2425384633796e-01; q[7][8]=5.3985912495418e-01; q[7][9]=1.8929629237636e-01; q[7][10]=2.1772115923623e-01; q[7][11]=7.5204244030271e-01; q[7][12]=4.5943617357855e-01; q[7][13]=3.6816646445253e-01; q[7][14]=5.0408659952683e-01; q[7][15]=1.5093262532236e+00; q[7][16]=6.4143601140497e-01; q[7][17]=5.0835892463812e-01; q[7][18]=3.0805573703500e-01; q[7][19]=2.5334079019018e-01; q[8][9]=2.5271844788492e-01; q[8][10]=3.4807220979697e-01; q[8][11]=1.0225070358890e+00; q[8][12]=9.8431152535870e-01; q[8][13]=7.1453370392764e-01; q[8][14]=5.2700733915060e-01; q[8][15]=1.1170297629105e+00; q[8][16]=5.8540709022472e-01; q[8][17]=3.0124860078016e-01; q[8][18]=4.2189539693890e+00; q[8][19]=2.0155597175031e-01; q[9][10]=3.8909637733035e+00; q[9][11]=4.0619358664202e-01; q[9][12]=3.3647977631042e+00; q[9][13]=1.5173593259539e+00; q[9][14]=3.8835540920564e-01; q[9][15]=3.5754441245967e-01; q[9][16]=1.1790911972601e+00; q[9][17]=3.4198578754023e-01; q[9][18]=6.7461709322842e-01; q[9][19]=8.3118394054582e+00; q[10][11]=4.4557027426059e-01; q[10][12]=6.0305593795716e+00; q[10][13]=2.0648397032375e+00; q[10][14]=3.7455568747097e-01; q[10][15]=3.5296918452729e-01; q[10][16]=9.1525985769421e-01; q[10][17]=6.9147463459998e-01; q[10][18]=8.1124585632307e-01; q[10][19]=2.2314056889131e+00; q[11][12]=1.0730611843319e+00; q[11][13]=2.6692475051102e-01; q[11][14]=1.0473834507215e+00; q[11][15]=1.7521659178195e+00; q[11][16]=1.3038752007987e+00; q[11][17]=3.3224304063396e-01; q[11][18]=7.1799348690032e-01; q[11][19]=4.9813847530407e-01; q[12][13]=1.7738551688305e+00; q[12][14]=4.5412362510273e-01; q[12][15]=9.1872341574605e-01; q[12][16]=1.4885480537218e+00; q[12][17]=8.8810109815193e-01; q[12][18]=9.5168216224591e-01; q[12][19]=2.5758507553153e+00; q[13][14]=2.3359790962888e-01; q[13][15]=5.4002764482413e-01; q[13][16]=4.8820611879305e-01; q[13][17]=2.0743248934965e+00; q[13][18]=6.7472604308008e+00; q[13][19]=8.3811961017754e-01; q[14][15]=1.1691295777157e+00; q[14][16]=1.0054516831488e+00; q[14][17]=2.5221483002727e-01; q[14][18]=3.6940531935451e-01; q[14][19]=4.9690841067567e-01; q[15][16]=5.1515562922704e+00; q[15][17]=3.8792562209837e-01; q[15][18]=7.9675152076106e-01; q[15][19]=5.6192545744165e-01; q[16][17]=5.1312812689059e-01; q[16][18]=8.0101024319939e-01; q[16][19]=2.2530740511763e+00; q[17][18]=4.0544190065580e+00; q[17][19]=2.6650873142646e-01; q[18][19]=1.0000000000000e+00; f[0]=0.074; f[1]=0.052; f[2]=0.045; f[3]=0.054; f[4]=0.025; f[5]=0.034; f[6]=0.054; f[7]=0.074; f[8]=0.026; f[9]=0.068; f[10]=0.099; f[11]=0.058; f[12]=0.025; f[13]=0.047; f[14]=0.039; f[15]=0.057; f[16]=0.051; f[17]=0.013; f[18]=0.032; f[19]=0.073; } /* blosum62data */ void vtmvdata(dmatrix q, double *f) { /* * Dayhoff model for amino acid evolution * Mueller, T. and Vingron, M. * "Modeling Amino Acid Replacement" * Journal of Comp. Biology, 7(6):761-776,2000 */ /* amino acid frequencies */ f[ 0]=0.0770764620135024 ; f[ 1]=0.0500819370772208 ; f[ 2]=0.0462377395993731 ; f[ 3]=0.0537929860758246 ; f[ 4]=0.0144533387583345 ; f[ 5]=0.0408923608974345 ; f[ 6]=0.0633579339160905 ; f[ 7]=0.0655672355884439 ; f[ 8]=0.0218802687005936 ; f[ 9]=0.0591969699027449 ; f[10]=0.0976461276528445 ; f[11]=0.0592079410822730 ; f[12]=0.0220695876653368 ; f[13]=0.0413508521834260 ; f[14]=0.0476871596856874 ; f[15]=0.0707295165111524 ; f[16]=0.0567759161524817 ; f[17]=0.0127019797647213 ; f[18]=0.0323746050281867 ; f[19]=0.0669190817443274 ; /* relative rates */ q[ 0][ 1] = 1.2412691067876198; q[ 0][ 2] = 1.2184237953498958; q[ 0][ 3] = 1.3759368509441177; q[ 0][ 4] = 2.4731223087544874; q[ 0][ 5] = 2.2155167805137470; q[ 0][ 6] = 2.3379911207495061; q[ 0][ 7] = 3.3386555146457697; q[ 0][ 8] = 0.9615841926910841; q[ 0][ 9] = 0.8908203061925510; q[ 0][10] = 1.0778497408764076; q[ 0][11] = 1.4932055816372476; q[ 0][12] = 1.9006455961717605; q[ 0][13] = 0.6883439026872615; q[ 0][14] = 2.7355620089953550; q[ 0][15] = 6.4208961859142883; q[ 0][16] = 5.2892514169776437; q[ 0][17] = 0.5488578478106930; q[ 0][18] = 0.5411769916657778; q[ 0][19] = 4.6501894691803214; q[ 1][ 2] = 1.5720770753326880; q[ 1][ 3] = 0.7550654439001206; q[ 1][ 4] = 1.4414262567428417; q[ 1][ 5] = 5.5120819705248678; q[ 1][ 6] = 1.3542404860613146; q[ 1][ 7] = 1.3121700301622004; q[ 1][ 8] = 4.9238668283945266; q[ 1][ 9] = 0.4323005487925516; q[ 1][10] = 0.8386701149158265; q[ 1][11] = 10.0173308173660018; q[ 1][12] = 1.2488638689609959; q[ 1][13] = 0.4224945197276290; q[ 1][14] = 1.3091837782420783; q[ 1][15] = 1.9202994262316166; q[ 1][16] = 1.3363401740560601; q[ 1][17] = 1.5170142153962840; q[ 1][18] = 0.8912614404565405; q[ 1][19] = 0.7807017855806767; q[ 2][ 3] = 7.8584219153689405; q[ 2][ 4] = 0.9784679122774127; q[ 2][ 5] = 3.0143201670924822; q[ 2][ 6] = 2.0093434778398112; q[ 2][ 7] = 2.4117632898861809; q[ 2][ 8] = 6.1974384977884114; q[ 2][ 9] = 0.9179291175331520; q[ 2][10] = 0.4098311270816011; q[ 2][11] = 4.4034547578962568; q[ 2][12] = 0.9378803706165143; q[ 2][13] = 0.5044944273324311; q[ 2][14] = 0.7103720531974738; q[ 2][15] = 6.1234512396801764; q[ 2][16] = 3.8852506105922231; q[ 2][17] = 0.1808525752605976; q[ 2][18] = 1.0894926581511342; q[ 2][19] = 0.4586061981719967; q[ 3][ 4] = 0.2272488448121475; q[ 3][ 5] = 1.6562495638176040; q[ 3][ 6] = 9.6883451875685065; q[ 3][ 7] = 1.9142079025990228; q[ 3][ 8] = 2.1459640610133781; q[ 3][ 9] = 0.2161660372725585; q[ 3][10] = 0.3574207468998517; q[ 3][11] = 1.4521790561663968; q[ 3][12] = 0.4075239926000898; q[ 3][13] = 0.1675129724559251; q[ 3][14] = 1.0714605979577547; q[ 3][15] = 2.2161944596741829; q[ 3][16] = 1.5066839872944762; q[ 3][17] = 0.2496584188151770; q[ 3][18] = 0.7447620891784513; q[ 3][19] = 0.4594535241660911; q[ 4][ 5] = 0.4587469126746136; q[ 4][ 6] = 0.4519167943192672; q[ 4][ 7] = 1.1034605684472507; q[ 4][ 8] = 1.5196756759380692; q[ 4][ 9] = 0.9126668032539315; q[ 4][10] = 1.4081315998413697; q[ 4][11] = 0.3371091785647479; q[ 4][12] = 1.2213054800811556; q[ 4][13] = 1.6953951980808002; q[ 4][14] = 0.4326227078645523; q[ 4][15] = 3.6366815408744255; q[ 4][16] = 1.7557065205837685; q[ 4][17] = 1.6275179891253113; q[ 4][18] = 2.1579775140421025; q[ 4][19] = 2.2627456996290891; q[ 5][ 6] = 6.8124601839937675; q[ 5][ 7] = 0.8776110594765502; q[ 5][ 8] = 7.9943228564946525; q[ 5][ 9] = 0.4882733432879921; q[ 5][10] = 1.3318097154194044; q[ 5][11] = 6.0519085243118811; q[ 5][12] = 1.9106190827629084; q[ 5][13] = 0.3573432522499545; q[ 5][14] = 2.3019177728300728; q[ 5][15] = 2.3193703643237220; q[ 5][16] = 2.1576510103471440; q[ 5][17] = 0.8959082681546182; q[ 5][18] = 0.9183596801412757; q[ 5][19] = 0.6366932501396869; q[ 6][ 7] = 1.3860121390169038; q[ 6][ 8] = 1.6360079688522375; q[ 6][ 9] = 0.4035497929633328; q[ 6][10] = 0.5610717242294755; q[ 6][11] = 4.3290086529582830; q[ 6][12] = 0.7471936218068498; q[ 6][13] = 0.2317194387691585; q[ 6][14] = 1.5132807416252063; q[ 6][15] = 1.8273535587773553; q[ 6][16] = 1.5839981708584689; q[ 6][17] = 0.4198391148111098; q[ 6][18] = 0.5818111331782764; q[ 6][19] = 0.8940572875547330; q[ 7][ 8] = 0.8561248973045037; q[ 7][ 9] = 0.2888075033037488; q[ 7][10] = 0.3578662395745526; q[ 7][11] = 0.8945563662345198; q[ 7][12] = 0.5954812791740037; q[ 7][13] = 0.3693722640980460; q[ 7][14] = 0.7744933618134962; q[ 7][15] = 3.0637776193717610; q[ 7][16] = 0.7147489676267383; q[ 7][17] = 0.9349753595598769; q[ 7][18] = 0.3374467649724478; q[ 7][19] = 0.6193321034173915; q[ 8][ 9] = 0.5787937115407940; q[ 8][10] = 1.0765007949562073; q[ 8][11] = 1.8085136096039203; q[ 8][12] = 1.3808291710019667; q[ 8][13] = 1.3629765501081097; q[ 8][14] = 1.8370555852070649; q[ 8][15] = 1.9699895187387506; q[ 8][16] = 1.6136654573285647; q[ 8][17] = 0.6301954684360302; q[ 8][18] = 7.7587442309146040; q[ 8][19] = 0.5333220944030346; q[ 9][10] = 6.0019110258426362; q[ 9][11] = 0.6244297525127139; q[ 9][12] = 6.7597899772045418; q[ 9][13] = 2.2864286949316077; q[ 9][14] = 0.4811402387911145; q[ 9][15] = 0.6047491507504744; q[ 9][16] = 2.6344778384442731; q[ 9][17] = 0.5604648274060783; q[ 9][18] = 0.8626796044156272; q[ 9][19] = 14.8729334615190609; q[10][11] = 0.5642322882556321; q[10][12] = 8.0327792947421148; q[10][13] = 4.3611548063555778; q[10][14] = 1.0084320519837335; q[10][15] = 0.8953754669269811; q[10][16] = 1.0192004372506540; q[10][17] = 1.5183114434679339; q[10][18] = 1.2452243224541324; q[10][19] = 3.5458093276667237; q[11][12] = 1.7129670976916258; q[11][13] = 0.3910559903834828; q[11][14] = 1.3918935593582853; q[11][15] = 1.9776630140912268; q[11][16] = 2.5513781312660280; q[11][17] = 0.5851920879490173; q[11][18] = 0.7835447533710449; q[11][19] = 0.7801080335991272; q[12][13] = 2.3201373546296349; q[12][14] = 0.4953193808676289; q[12][15] = 1.0657482318076852; q[12][16] = 3.3628488360462363; q[12][17] = 1.4680478689711018; q[12][18] = 1.0899165770956820; q[12][19] = 4.0584577156753401; q[13][14] = 0.3746821107962129; q[13][15] = 1.1079144700606407; q[13][16] = 0.6882725908872254; q[13][17] = 3.3448437239772266; q[13][18] = 10.3848523331334590; q[13][19] = 1.7039730522675411; q[14][15] = 3.5465914843628927; q[14][16] = 1.9485376673137556; q[14][17] = 0.4326058001438786; q[14][18] = 0.4819109019647465; q[14][19] = 0.5985498912985666; q[15][16] = 8.8479984061248178; q[15][17] = 0.6791126595939816; q[15][18] = 0.9547229305958682; q[15][19] = 0.9305232113028208; q[16][17] = 0.4514203099376473; q[16][18] = 0.8564314184691215; q[16][19] = 3.4242218450865543; q[17][18] = 4.5377235790405388; q[17][19] = 0.5658969249032649; q[18][19] = 1.0000000000000000; } /* vtmvdata */ /* * WAG matrix: Simon Whelan and Nick Goldman * */ void wagdata(dmatrix q, double *f) { /* * WAG model of amino acid evolution * * Whelan, S. and N. Goldman (2001) * A general empirical model of protein evolution * derived from multiple protein families using a * maximum likelihood approach. * Mol. Biol. Evol. 18:691-699 * */ /* R matrix */ q[0][1] =0.551571; q[0][2] =0.509848; q[1][2] =0.635346; q[0][3] =0.738998; q[1][3] =0.147304; q[2][3] =5.429420; q[0][4] =1.027040; q[1][4] =0.528191; q[2][4] =0.265256; q[3][4] =0.0302949; q[0][5] =0.908598; q[1][5] =3.035500; q[2][5] =1.543640; q[3][5] =0.616783; q[4][5] =0.0988179; q[0][6] =1.582850; q[1][6] =0.439157; q[2][6] =0.947198; q[3][6] =6.174160; q[4][6] =0.021352; q[5][6] =5.469470; q[0][7] =1.416720; q[1][7] =0.584665; q[2][7] =1.125560; q[3][7] =0.865584; q[4][7] =0.306674; q[5][7] =0.330052; q[6][7] =0.567717; q[0][8] =0.316954; q[1][8] =2.137150; q[2][8] =3.956290; q[3][8] =0.930676; q[4][8] =0.248972; q[5][8] =4.294110; q[6][8] =0.570025; q[7][8] =0.249410; q[0][9] =0.193335; q[1][9] =0.186979; q[2][9] =0.554236; q[3][9] =0.039437; q[4][9] =0.170135; q[5][9] =0.113917; q[6][9] =0.127395; q[7][9] =0.0304501; q[8][9] =0.138190; q[0][10] =0.397915; q[1][10] =0.497671; q[2][10] =0.131528; q[3][10] =0.0848047; q[4][10] =0.384287; q[5][10] =0.869489; q[6][10] =0.154263; q[7][10] =0.0613037; q[8][10] =0.499462; q[9][10] =3.170970; q[0][11] =0.906265; q[1][11] =5.351420; q[2][11] =3.012010; q[3][11] =0.479855; q[4][11] =0.0740339; q[5][11] =3.894900; q[6][11] =2.584430; q[7][11] =0.373558; q[8][11] =0.890432; q[9][11] =0.323832; q[10][11]=0.257555; q[0][12] =0.893496; q[1][12] =0.683162; q[2][12] =0.198221; q[3][12] =0.103754; q[4][12] =0.390482; q[5][12] =1.545260; q[6][12] =0.315124; q[7][12] =0.174100; q[8][12] =0.404141; q[9][12] =4.257460; q[10][12]=4.854020; q[11][12]=0.934276; q[0][13] =0.210494; q[1][13] =0.102711; q[2][13] =0.0961621; q[3][13] =0.0467304; q[4][13] =0.398020; q[5][13] =0.0999208; q[6][13] =0.0811339; q[7][13] =0.049931; q[8][13] =0.679371; q[9][13] =1.059470; q[10][13]=2.115170; q[11][13]=0.088836; q[12][13]=1.190630; q[0][14] =1.438550; q[1][14] =0.679489; q[2][14] =0.195081; q[3][14] =0.423984; q[4][14] =0.109404; q[5][14] =0.933372; q[6][14] =0.682355; q[7][14] =0.243570; q[8][14] =0.696198; q[9][14] =0.0999288; q[10][14]=0.415844; q[11][14]=0.556896; q[12][14]=0.171329; q[13][14]=0.161444; q[0][15] =3.370790; q[1][15] =1.224190; q[2][15] =3.974230; q[3][15] =1.071760; q[4][15] =1.407660; q[5][15] =1.028870; q[6][15] =0.704939; q[7][15] =1.341820; q[8][15] =0.740169; q[9][15] =0.319440; q[10][15]=0.344739; q[11][15]=0.967130; q[12][15]=0.493905; q[13][15]=0.545931; q[14][15]=1.613280; q[0][16] =2.121110; q[1][16] =0.554413; q[2][16] =2.030060; q[3][16] =0.374866; q[4][16] =0.512984; q[5][16] =0.857928; q[6][16] =0.822765; q[7][16] =0.225833; q[8][16] =0.473307; q[9][16] =1.458160; q[10][16]=0.326622; q[11][16]=1.386980; q[12][16]=1.516120; q[13][16]=0.171903; q[14][16]=0.795384; q[15][16]=4.378020; q[0][17] =0.113133; q[1][17] =1.163920; q[2][17] =0.0719167; q[3][17] =0.129767; q[4][17] =0.717070; q[5][17] =0.215737; q[6][17] =0.156557; q[7][17] =0.336983; q[8][17] =0.262569; q[9][17] =0.212483; q[10][17]=0.665309; q[11][17]=0.137505; q[12][17]=0.515706; q[13][17]=1.529640; q[14][17]=0.139405; q[15][17]=0.523742; q[16][17]=0.110864; q[0][18] =0.240735; q[1][18] =0.381533; q[2][18] =1.086000; q[3][18] =0.325711; q[4][18] =0.543833; q[5][18] =0.227710; q[6][18] =0.196303; q[7][18] =0.103604; q[8][18] =3.873440; q[9][18] =0.420170; q[10][18]=0.398618; q[11][18]=0.133264; q[12][18]=0.428437; q[13][18]=6.454280; q[14][18]=0.216046; q[15][18]=0.786993; q[16][18]=0.291148; q[17][18]=2.485390; q[0][19] =2.006010; q[1][19] =0.251849; q[2][19] =0.196246; q[3][19] =0.152335; q[4][19] =1.002140; q[5][19] =0.301281; q[6][19] =0.588731; q[7][19] =0.187247; q[8][19] =0.118358; q[9][19] =7.821300; q[10][19]=1.800340; q[11][19]=0.305434; q[12][19]=2.058450; q[13][19]=0.649892; q[14][19]=0.314887; q[15][19]=0.232739; q[16][19]=1.388230; q[17][19]=0.365369; q[18][19]=0.314730; f[ 0] = 0.0866279; f[ 1] = 0.043972; f[ 2] = 0.0390894; f[ 3] = 0.0570451; f[ 4] = 0.0193078; f[ 5] = 0.0367281; f[ 6] = 0.0580589; f[ 7] = 0.0832518; f[ 8] = 0.0244313; f[ 9] = 0.048466; f[10] = 0.086209; f[11] = 0.0620286; f[12] = 0.0195027; f[13] = 0.0384319; f[14] = 0.0457631; f[15] = 0.0695179; f[16] = 0.0610127; f[17] = 0.0143859; f[18] = 0.0352742; f[19] = 0.0708956; } /* wagdata */ /* * old WAG matrix: Simon Whelan and Nick Goldman * */ void oldwagdata(dmatrix q, double *f) { /* * WAG model of amino acid evolution * * S. Whelan and N. Goldman. 2000. In prep. * * presented at the MASAMB-X workshop in Cambridge * * Whelan, S., and N. Goldman. 2000. * The WAG amino acid rate matrix. * Manuscript in prep. * * old version - differed from the published matrix */ /* Q matrix */ q[0][1] = 0.610810; q[0][2] = 0.569079; q[0][3] = 0.821500; q[0][4] = 1.141050; q[0][5] = 1.011980; q[0][6] = 1.756410; q[0][7] = 1.572160; q[0][8] = 0.354813; q[0][9] = 0.219023; q[0][10] = 0.443935; q[0][11] = 1.005440; q[0][12] = 0.989475; q[0][13] = 0.233492; q[0][14] = 1.594890; q[0][15] = 3.733380; q[0][16] = 2.349220; q[0][17] = 0.125227; q[0][18] = 0.268987; q[0][19] = 2.221870; q[1][2] = 0.711690; q[1][3] = 0.165074; q[1][4] = 0.585809; q[1][5] = 3.360330; q[1][6] = 0.488649; q[1][7] = 0.650469; q[1][8] = 2.362040; q[1][9] = 0.206722; q[1][10] = 0.551450; q[1][11] = 5.925170; q[1][12] = 0.758446; q[1][13] = 0.116821; q[1][14] = 0.753467; q[1][15] = 1.357640; q[1][16] = 0.613776; q[1][17] = 1.294610; q[1][18] = 0.423612; q[1][19] = 0.280336; q[2][3] = 6.013660; q[2][4] = 0.296524; q[2][5] = 1.716740; q[2][6] = 1.056790; q[2][7] = 1.253910; q[2][8] = 4.378930; q[2][9] = 0.615636; q[2][10] = 0.147156; q[2][11] = 3.334390; q[2][12] = 0.224747; q[2][13] = 0.110793; q[2][14] = 0.217538; q[2][15] = 4.394450; q[2][16] = 2.257930; q[2][17] = 0.078463; q[2][18] = 1.208560; q[2][19] = 0.221176; q[3][4] = 0.033379; q[3][5] = 0.691268; q[3][6] = 6.833400; q[3][7] = 0.961142; q[3][8] = 1.032910; q[3][9] = 0.043523; q[3][10] = 0.093930; q[3][11] = 0.533362; q[3][12] = 0.116813; q[3][13] = 0.052004; q[3][14] = 0.472601; q[3][15] = 1.192810; q[3][16] = 0.417372; q[3][17] = 0.146348; q[3][18] = 0.363243; q[3][19] = 0.169417; q[4][5] = 0.109261; q[4][6] = 0.023920; q[4][7] = 0.341086; q[4][8] = 0.275403; q[4][9] = 0.189890; q[4][10] = 0.428414; q[4][11] = 0.083649; q[4][12] = 0.437393; q[4][13] = 0.441300; q[4][14] = 0.122303; q[4][15] = 1.560590; q[4][16] = 0.570186; q[4][17] = 0.795736; q[4][18] = 0.604634; q[4][19] = 1.114570; q[5][6] = 6.048790; q[5][7] = 0.366510; q[5][8] = 4.749460; q[5][9] = 0.131046; q[5][10] = 0.964886; q[5][11] = 4.308310; q[5][12] = 1.705070; q[5][13] = 0.110744; q[5][14] = 1.036370; q[5][15] = 1.141210; q[5][16] = 0.954144; q[5][17] = 0.243615; q[5][18] = 0.252457; q[5][19] = 0.333890; q[6][7] = 0.630832; q[6][8] = 0.635025; q[6][9] = 0.141320; q[6][10] = 0.172579; q[6][11] = 2.867580; q[6][12] = 0.353912; q[6][13] = 0.092310; q[6][14] = 0.755791; q[6][15] = 0.782467; q[6][16] = 0.914814; q[6][17] = 0.172682; q[6][18] = 0.217549; q[6][19] = 0.655045; q[7][8] = 0.276379; q[7][9] = 0.034151; q[7][10] = 0.068651; q[7][11] = 0.415992; q[7][12] = 0.194220; q[7][13] = 0.055288; q[7][14] = 0.273149; q[7][15] = 1.486700; q[7][16] = 0.251477; q[7][17] = 0.374321; q[7][18] = 0.114187; q[7][19] = 0.209108; q[8][9] = 0.152215; q[8][10] = 0.555096; q[8][11] = 0.992083; q[8][12] = 0.450867; q[8][13] = 0.756080; q[8][14] = 0.771387; q[8][15] = 0.822459; q[8][16] = 0.525511; q[8][17] = 0.289998; q[8][18] = 4.290350; q[8][19] = 0.131869; q[9][10] = 3.517820; q[9][11] = 0.360574; q[9][12] = 4.714220; q[9][13] = 1.177640; q[9][14] = 0.111502; q[9][15] = 0.353443; q[9][16] = 1.615050; q[9][17] = 0.234326; q[9][18] = 0.468951; q[9][19] = 8.659740; q[10][11] = 0.287583; q[10][12] = 5.375250; q[10][13] = 2.348200; q[10][14] = 0.462018; q[10][15] = 0.382421; q[10][16] = 0.364222; q[10][17] = 0.740259; q[10][18] = 0.443205; q[10][19] = 1.997370; q[11][12] = 1.032220; q[11][13] = 0.098843; q[11][14] = 0.619503; q[11][15] = 1.073780; q[11][16] = 1.537920; q[11][17] = 0.152232; q[11][18] = 0.147411; q[11][19] = 0.342012; q[12][13] = 1.320870; q[12][14] = 0.194864; q[12][15] = 0.556353; q[12][16] = 1.681970; q[12][17] = 0.570369; q[12][18] = 0.473810; q[12][19] = 2.282020; q[13][14] = 0.179896; q[13][15] = 0.606814; q[13][16] = 0.191467; q[13][17] = 1.699780; q[13][18] = 7.154480; q[13][19] = 0.725096; q[14][15] = 1.786490; q[14][16] = 0.885349; q[14][17] = 0.156619; q[14][18] = 0.239607; q[14][19] = 0.351250; q[15][16] = 4.847130; q[15][17] = 0.578784; q[15][18] = 0.872519; q[15][19] = 0.258861; q[16][17] = 0.126678; q[16][18] = 0.325490; q[16][19] = 1.547670; q[17][18] = 2.763540; q[17][19] = 0.409817; q[18][19] = 0.347826; /* original frequencies */ f[ 0] = 0.0866; f[ 1] = 0.0440; f[ 2] = 0.0391; f[ 3] = 0.0570; f[ 4] = 0.0193; f[ 5] = 0.0367; f[ 6] = 0.0581; f[ 7] = 0.0833; f[ 8] = 0.0244; f[ 9] = 0.0485; f[10] = 0.0862; f[11] = 0.0620; f[12] = 0.0195; f[13] = 0.0384; f[14] = 0.0458; f[15] = 0.0695; f[16] = 0.0610; f[17] = 0.0144; f[18] = 0.0353; f[19] = 0.0709; } /* oldwagdata */ void cprev45data(dmatrix q, double *f) { /* cpREV45 model of amino acid evolution * Adachi, J., P.J. Waddell, W. Martin, and M. Hasegawa. 2000. * J. Mol. Evol. 50:348-358 * (reconstructed from 45 chloroplast genomes) */ q[0][1] = 105; q[0][2] = 227; q[0][3] = 175; q[0][4] = 669; q[0][5] = 157; q[0][6] = 499; q[0][7] = 665; q[0][8] = 66; q[0][9] = 145; q[0][10] = 197; q[0][11] = 236; q[0][12] = 185; q[0][13] = 68; q[0][14] = 490; q[0][15] = 2440; q[0][16] = 1340; q[0][17] = 14; q[0][18] = 56; q[0][19] = 968; q[1][2] = 357; q[1][3] = 43; q[1][4] = 823; q[1][5] = 1745; q[1][6] = 152; q[1][7] = 243; q[1][8] = 715; q[1][9] = 136; q[1][10] = 203; q[1][11] = 4482; q[1][12] = 125; q[1][13] = 53; q[1][14] = 87; q[1][15] = 385; q[1][16] = 314; q[1][17] = 230; q[1][18] = 323; q[1][19] = 92; q[2][3] = 4435; q[2][4] = 538; q[2][5] = 768; q[2][6] = 1055; q[2][7] = 653; q[2][8] = 1405; q[2][9] = 168; q[2][10] = 113; q[2][11] = 2430; q[2][12] = 61; q[2][13] = 97; q[2][14] = 173; q[2][15] = 2085; q[2][16] = 1393; q[2][17] = 40; q[2][18] = 754; q[2][19] = 83; q[3][4] = 10; q[3][5] = 400; q[3][6] = 3691; q[3][7] = 431; q[3][8] = 331; q[3][9] = 10; q[3][10] = 10; q[3][11] = 412; q[3][12] = 47; q[3][13] = 22; q[3][14] = 170; q[3][15] = 590; q[3][16] = 266; q[3][17] = 18; q[3][18] = 281; q[3][19] = 75; q[4][5] = 10; q[4][6] = 10; q[4][7] = 303; q[4][8] = 441; q[4][9] = 280; q[4][10] = 396; q[4][11] = 48; q[4][12] = 159; q[4][13] = 726; q[4][14] = 285; q[4][15] = 2331; q[4][16] = 576; q[4][17] = 435; q[4][18] = 1466; q[4][19] = 592; q[5][6] = 3122; q[5][7] = 133; q[5][8] = 1269; q[5][9] = 92; q[5][10] = 286; q[5][11] = 3313; q[5][12] = 202; q[5][13] = 10; q[5][14] = 323; q[5][15] = 396; q[5][16] = 241; q[5][17] = 53; q[5][18] = 391; q[5][19] = 54; q[6][7] = 379; q[6][8] = 162; q[6][9] = 148; q[6][10] = 82; q[6][11] = 2629; q[6][12] = 113; q[6][13] = 145; q[6][14] = 185; q[6][15] = 568; q[6][16] = 369; q[6][17] = 63; q[6][18] = 142; q[6][19] = 200; q[7][8] = 19; q[7][9] = 40; q[7][10] = 20; q[7][11] = 263; q[7][12] = 21; q[7][13] = 25; q[7][14] = 28; q[7][15] = 691; q[7][16] = 92; q[7][17] = 82; q[7][18] = 10; q[7][19] = 91; q[8][9] = 29; q[8][10] = 66; q[8][11] = 305; q[8][12] = 10; q[8][13] = 127; q[8][14] = 152; q[8][15] = 303; q[8][16] = 32; q[8][17] = 69; q[8][18] = 1971; q[8][19] = 25; q[9][10] = 1745; q[9][11] = 345; q[9][12] = 1772; q[9][13] = 454; q[9][14] = 117; q[9][15] = 216; q[9][16] = 1040; q[9][17] = 42; q[9][18] = 89; q[9][19] = 4797; q[10][11] = 218; q[10][12] = 1351; q[10][13] = 1268; q[10][14] = 219; q[10][15] = 516; q[10][16] = 156; q[10][17] = 159; q[10][18] = 189; q[10][19] = 865; q[11][12] = 193; q[11][13] = 72; q[11][14] = 302; q[11][15] = 868; q[11][16] = 918; q[11][17] = 10; q[11][18] = 247; q[11][19] = 249; q[12][13] = 327; q[12][14] = 100; q[12][15] = 93; q[12][16] = 645; q[12][17] = 86; q[12][18] = 215; q[12][19] = 475; q[13][14] = 43; q[13][15] = 487; q[13][16] = 148; q[13][17] = 468; q[13][18] = 2370; q[13][19] = 317; q[14][15] = 1202; q[14][16] = 260; q[14][17] = 49; q[14][18] = 97; q[14][19] = 122; q[15][16] = 2151; q[15][17] = 73; q[15][18] = 522; q[15][19] = 167; q[16][17] = 29; q[16][18] = 71; q[16][19] = 760; q[17][18] = 346; q[17][19] = 10; q[18][19] = 119; f[0] = 0.076; f[1] = 0.062; f[2] = 0.041; f[3] = 0.037; f[4] = 0.009; f[5] = 0.038; f[6] = 0.049; f[7] = 0.084; f[8] = 0.025; f[9] = 0.081; f[10] = 0.101; f[11] = 0.050; f[12] = 0.022; f[13] = 0.051; f[14] = 0.043; f[15] = 0.062; f[16] = 0.054; f[17] = 0.018; f[18] = 0.031; f[19] = 0.066; } /* cprev45data */ tree-puzzle-5.2/src/mlparam.c0000644000076400001440000003132510073365303011717 /* * mlparam.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern /* prototypes */ #include #include #include #include "puzzle.h" #include "util.h" #include "ml.h" #include "gamma.h" /******************************************************************************/ /* discrete Gamma-distribution and related stuff */ /******************************************************************************/ /* compare general base frequencies with frequencies of taxon i with chi square */ double homogentest(int taxon) { return chi2test(Freqtpm, Basecomp[taxon], gettpmradix(), &chi2fail); } /* discrete Gamma according to Yang 1994 (JME 39:306-314) */ void YangDiscreteGamma (double shape, int c, dvector x) { double twoc, mu; int i; twoc = 2.0*c; mu = 0.0; for (i = 0; i < c; i++) { /* corresponding rates */ x[i] = icdfGamma ( (2.0*i+1.0)/twoc, shape); mu += x[i]; } mu = mu/c; /* rescale for avarage rate of 1.0 */ for (i = 0; i < c; i++) { x[i] /= mu; } } /* compute rates of each category when rates are Gamma-distributed */ void updaterates() { int i; double alpha; if (numcats == 1) { Rates[0] = 1.0; return; } if (Geta == 0.0) { for (i = 0; i < numcats; i++) Rates[i] = 1.0; return; } alpha = (1.0 - Geta)/Geta; YangDiscreteGamma (alpha, numcats, Rates); /* if invariable sites are present */ for (i = 0; i < numcats; i++) Rates[i] = Rates[i]/(1.0-fracinv); /* check for very small rates */ for (i = 0; i < numcats; i++) if (Rates[i] < 0.000001) Rates[i] = 0.000001; } /******************************************************************************/ /* parameter estimation */ /******************************************************************************/ /* compute sample mean and standard deviation of sample mean */ void computestat(double *data, int n, double *mean, double *err) { int i; double sum; double temp; double avg; /* compute sample mean */ sum = 0; for (i = 0; i < n; i++) sum += data[i]; avg = sum/(double) n; (*mean) = avg; /* compute std. error of sample mean with curvature method */ sum = 0; for (i = 0; i < n; i++) { temp = data[i] - avg; sum += temp*temp; } if (n != 1) (*err) = sqrt(sum)/sqrt((double)(n-1)*n); /* unbiased estimator */ else (*err) = 0.0; /* if n == 1 */ } /* compute ML value of quartet (a,b,c,d) for parameter estimation with quartet subsampling */ double quartetml(int a, int b, int c, int d) { double d1, d2, d3; /* compute ML for all topologies */ if (approxp_optn) { /* approximate parameter mode */ d1 = quartet_alklhd(a,b,c,d); /* (a,b)-(c,d) */ d2 = quartet_alklhd(a,c,b,d); /* (a,c)-(b,d) */ d3 = quartet_alklhd(a,d,b,c); /* (a,d)-(b,c) */ } else { d1 = quartet_lklhd(a,b,c,d); /* (a,b)-(c,d) */ d2 = quartet_lklhd(a,c,b,d); /* (a,c)-(b,d) */ d3 = quartet_lklhd(a,d,b,c); /* (a,d)-(b,c) */ } /* looking for max(d1, d2, d3) */ if (d1 < d2) { /* d2 > d1 */ if (d2 < d3) { /* d3 > d2 > d1 */ /* d3 maximum */ return d3; } else { /* d2 >= d3 > d1 */ /* d2 maximum */ return d2; } } else { /* d1 >= d2 */ if (d1 < d3) { /* d3 > d1 >= d2 */ /* d3 maximum */ return d3; } else { /* d1 >= d2 && d1 >= d3 */ /* d1 maximum */ return d1; } } } /* optimization function TSparam - quartets */ double opttsq(double x) { if (x < MINTS) TSparam = MINTS; else if (x > MAXTS) TSparam = MAXTS; else TSparam = x; tranprobmat(); distupdate(qca, qcb, qcc, qcd); return (-quartetml(qca, qcb, qcc, qcd)); } /* optimization function YRparam - quartets */ double optyrq(double x) { if (x < MINYR) YRparam = MINYR; else if (x > MAXYR) YRparam = MAXYR; else YRparam = x; tranprobmat(); distupdate(qca, qcb, qcc, qcd); return (-quartetml(qca, qcb, qcc, qcd)); } /* estimate substitution process parameters - random quartets */ void optimseqevolparamsquart() { double tsmeanold, yrmeanold; dvector tslist, yrlist; int fin; ivector taxon; uli minqts, maxqts, n; taxon = new_ivector(4); /* number of quartets to be investigated */ minqts = (uli) floor(0.25 * MINPERTAXUM * Maxspc) + 1; maxqts = (uli) floor(0.25 * MAXPERTAXUM * Maxspc) + 1; if (Maxspc == 4) { minqts = (uli) 1; maxqts = (uli) 1; } tslist = new_dvector(maxqts); yrlist = new_dvector(maxqts); /* initialize averages */ tsmean = TSparam; yrmean = YRparam; fin = FALSE; /* investigate maxqts random quartets */ for (n = 0; n < maxqts; n++) { /* choose random quartet */ chooser(Maxspc, 4, taxon); /* * optimize parameters on this quartet */ qca = taxon[0]; qcb = taxon[1]; qcc = taxon[2]; qcd = taxon[3]; /* initialize start values with average value */ if ((SH_optn || nuc_optn) && optim_optn && (data_optn == 0)) TSparam = tsmean; if ((nuc_optn && TN_optn) && optim_optn && (data_optn == 0)) YRparam = yrmean; /* estimation */ twodimenmin(EPSILON_SUBSTPARAM, (SH_optn || nuc_optn) && optim_optn && (data_optn == 0), MINTS, &TSparam, MAXTS, opttsq, &tserr, (nuc_optn && TN_optn) && optim_optn && (data_optn == 0), MINYR, &YRparam, MAXYR, optyrq, &yrerr); tsmeanold = tsmean; yrmeanold = yrmean; tslist[n] = TSparam; yrlist[n] = YRparam; computestat(tslist, n+1 , &tsmean, &tserr); computestat(yrlist, n+1 , &yrmean, &yrerr); /* check whether the means are converging */ if (n > minqts-2) { if ((fabs(tsmean-tsmeanold) < TSDIFF) && (fabs(yrmean-yrmeanold) < YRDIFF)) fin = TRUE; } /* investigate at least minqts quartets */ if (n > minqts-2 && (fin || n > maxqts-2)) break; } /* round estimated numbers to 2 digits after the decimal point */ if (tserr != 0.0) tsmean = floor(100.0*tsmean+0.5)/100.0; if (yrerr != 0.0) yrmean = floor(100.0*yrmean+0.5)/100.0; /* update ML engine */ TSparam = tsmean; YRparam = yrmean; tranprobmat(); free_ivector(taxon); } /* optimization function TSparam - tree */ double opttst(double x) { double result; if (x < MINTS) TSparam = MINTS; else if (x > MAXTS) TSparam = MAXTS; else TSparam = x; tranprobmat(); /*epe*/ # if PARALLEL PP_Update_EEI(); # endif computedistan(); /* pre-set branchlengths = FALSE; parallel estimation = TRUE */ if (approxp_optn) result = usertree_alklhd(FALSE, TRUE); else result = usertree_lklhd(FALSE, TRUE); return (-result); } /* optimization function YRparam - tree */ double optyrt(double x) { double result; if (x < MINYR) YRparam = MINYR; else if (x > MAXYR) YRparam = MAXYR; else YRparam = x; tranprobmat(); /*epe*/ # if PARALLEL PP_Update_EEI(); # endif computedistan(); /* pre-set branchlengths = FALSE; parallel estimation = TRUE */ if (approxp_optn) result = usertree_alklhd(FALSE, TRUE); else result = usertree_lklhd(FALSE, TRUE); return (-result); } /* optimize substitution process parameters - tree */ void optimseqevolparamstree() { twodimenmin(EPSILON_SUBSTPARAM, (SH_optn || nuc_optn) && optim_optn && (data_optn == 0), MINTS, &TSparam, MAXTS, opttst, &tserr, (nuc_optn && TN_optn) && optim_optn && (data_optn == 0), MINYR, &YRparam, MAXYR, optyrt, &yrerr); } /* optimization function fracinv */ double optfi(double x) { double result; if (x < MINFI) fracinv = MINFI; else if (x > MAXFI) fracinv = MAXFI; else fracinv = x; /*epe*/ # if PARALLEL PP_Update_fracinv(); # endif computedistan(); /* pre-set branchlengths = FALSE; parallel estimation = TRUE */ if (approxp_optn) result = usertree_alklhd(FALSE, TRUE); else result = usertree_lklhd(FALSE, TRUE); return (-result); } /* optimization function Geta */ double optge(double x) { double result; if (x < MINGE) Geta = MINGE; else if (x > MAXGE) Geta = MAXGE; else Geta = x; updaterates(); /*epe*/ # if PARALLEL PP_Update_Rates(); # endif computedistan(); /* pre-set branchlengths = FALSE; parallel estimation = TRUE */ if (approxp_optn) result = usertree_alklhd(FALSE, TRUE); else result = usertree_lklhd(FALSE, TRUE); return (-result); } /* optimize rate heterogeneity parameters */ void optimrateparams() { twodimenmin(EPSILON_RATEPARAM, fracinv_optim, MINFI, &fracinv, fracconst, optfi, &fierr, grate_optim, MINGE, &Geta, MAXGE, optge, &geerr); } /******************************************************************************/ /* main routines to estimate parameters from tree or quartets */ /******************************************************************************/ /* estimate parameters of substitution process and rate heterogeneity - no tree n-taxon tree is not needed because of quartet method or NJ tree topology */ void estimateparametersnotree() { int it, nump, change; double TSold, YRold, FIold, GEold; it = 0; nump = 0; /* count number of parameters */ if (data_optn == NUCLEOTIDE && optim_optn) nump++; if (fracinv_optim || grate_optim) nump++; do { /* repeat until nothing changes any more */ it++; change = FALSE; /* optimize substitution parameters */ if (data_optn == NUCLEOTIDE && optim_optn) { TSold = TSparam; YRold = YRparam; /* * optimize */ fprintf(STDOUT, "Optimizing missing substitution process parameters\n"); fflush(STDOUT); if (qcalg_optn) { /* quartet sampling */ optimseqevolparamsquart(); } else { /* NJ tree */ tmpfp = tmpfile(); njtree(tmpfp); rewind(tmpfp); readusertree(tmpfp, FALSE); closefile(tmpfp); optimseqevolparamstree(); } /*epe*/ #if PARALLEL PP_NoUpdate(); # endif computedistan(); /* update ML distances */ /* same tolerance as 1D minimization */ if ((fabs(TSparam - TSold) > 3.3*EPSILON_SUBSTPARAM) || (fabs(YRparam - YRold) > 3.3*EPSILON_SUBSTPARAM) ) change = TRUE; } /* optimize rate heterogeneity variables */ if (fracinv_optim || grate_optim) { FIold = fracinv; GEold = Geta; /* * optimize */ fprintf(STDOUT, "Optimizing missing rate heterogeneity parameters\n"); fflush(STDOUT); /* compute NJ tree */ tmpfp = tmpfile(); njtree(tmpfp); /* use NJ tree topology to estimate parameters */ rewind(tmpfp); readusertree(tmpfp, FALSE); closefile(tmpfp); optimrateparams(); # if PARALLEL PP_NoUpdate(); # endif /* PARALLEL */ computedistan(); /* update ML distances */ /* same tolerance as 1D minimization */ if ((fabs(fracinv - FIold) > 3.3*EPSILON_RATEPARAM) || (fabs(Geta - GEold) > 3.3*EPSILON_RATEPARAM) ) change = TRUE; } if (nump == 1) return; } while (it != MAXITS && change); return; } /* estimateparametersnotree */ /* estimate parameters of substitution process and rate heterogeneity - tree same as above but here the n-taxon tree is already in memory */ void estimateparameterstree() { int it, nump, change; double TSold, YRold, FIold, GEold; it = 0; nump = 0; /* count number of parameters */ if (data_optn == NUCLEOTIDE && optim_optn) nump++; if (fracinv_optim || grate_optim) nump++; do { /* repeat until nothing changes any more */ it++; change = FALSE; /* optimize substitution process parameters */ if (data_optn == NUCLEOTIDE && optim_optn) { TSold = TSparam; YRold = YRparam; /* * optimize */ fprintf(STDOUT, "Optimizing missing substitution process parameters\n"); fflush(STDOUT); optimseqevolparamstree(); /*epe*/ /*??? - auskommentiert, HAS ;-) */ #ifdef EPE_DEBUG fprintf(STDOUT, "\n\nRED ALERT\n\n\n"); #endif /* EPE_DEBUG */ computedistan(); /* update ML distances */ /* same tolerance as 1D minimization */ if ((fabs(TSparam - TSold) > 3.3*EPSILON_SUBSTPARAM) || (fabs(YRparam - YRold) > 3.3*EPSILON_SUBSTPARAM) ) change = TRUE; } /* optimize rate heterogeneity variables */ if (fracinv_optim || grate_optim) { FIold = fracinv; GEold = Geta; /* * optimize */ fprintf(STDOUT, "Optimizing missing rate heterogeneity parameters\n"); fflush(STDOUT); optimrateparams(); /*epe*/ /*??? - auskommentiert, HAS ;-) */ #ifdef EPE_DEBUG fprintf(STDOUT, "\n\nRED ALERT\n\n\n"); #endif /* EPE_DEBUG */ computedistan(); /* update ML distances */ /* same tolerance as 1D minimization */ if ((fabs(fracinv - FIold) > 3.3*EPSILON_RATEPARAM) || (fabs(Geta - GEold) > 3.3*EPSILON_RATEPARAM) ) change = TRUE; } if (nump == 1) return; } while (it != MAXITS && change); return; } /* estimateparameterstree */ tree-puzzle-5.2/src/split.c0000644000076400001440000004601210073365313011421 /* * split.c (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ /* initialize tree with the following starting configuration (see pstep.h) */ void inittree_split(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootleaf, /* out: rooting leaf (=trueID[0]) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID) { int i, j; ONEEDGE *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for tmpvector with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); for (j = 0; j < Maxspc; j++) tmpedgeofleaf[j]=-1; *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the split map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].split = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedge[i].split == NULL) maerror("split array in inittree"); (tmpedge)[i].taxon = -1; for (j = 0; j < Maxspc; j++) (tmpedge)[i].split[j]=-1; /* number all edges */ tmpedge[i].numedge = i; } /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* init split vectors: */ /* for edge 0 */ (tmpedge[0].split)[0] = trueID[0]; /* leaf 0 above this edge */ tmpedge[0].upsize = 1; (tmpedge[0].split)[Maxspc-1] = trueID[1]; /* leaf 0 below this edge */ (tmpedge[0].split)[Maxspc-2] = trueID[2]; /* leaf 0 below this edge */ tmpedge[0].downsize = 2; /* for edge 1 */ (tmpedge[1].split)[0] = trueID[0]; /* leaf 0 above this edge */ (tmpedge[1].split)[1] = trueID[2]; /* leaf 0 above this edge */ tmpedge[1].upsize = 2; (tmpedge[1].split)[Maxspc-1] = trueID[1]; /* leaf 0 below this edge */ tmpedge[1].downsize = 1; /* for edge 2 */ (tmpedge[2].split)[0] = trueID[0]; /* leaf 0 above this edge */ (tmpedge[2].split)[1] = trueID[1]; /* leaf 0 above this edge */ tmpedge[2].upsize = 2; (tmpedge[2].split)[Maxspc-1] = trueID[2]; /* leaf 0 below this edge */ tmpedge[2].downsize = 1; /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* taxon IDs of leaves */ tmpedge[0].taxon = trueID[0]; tmpedge[1].taxon = trueID[1]; tmpedge[2].taxon = trueID[2]; /* edges of leaves */ tmpedgeofleaf[trueID[0]] = 0; tmpedgeofleaf[trueID[1]] = 1; tmpedgeofleaf[trueID[2]] = 2; /* uppest edge =: root edge*/ *rootleaf = trueID[0]; } /* inittree_split */ /******************/ /* free memory (to be called after inittree) */ void freetree_split(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; /* free split vectors */ for (i = 0; i < 2 * Maxspc - 3; i++) { free(edge[i].split); } /* free tree topology */ free(edge); /* free external edge lookup vector */ free(edgeofleaf); } /* freetree_split */ /******************/ /* check edge splits (debugging) */ void check_split( ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *permut) { int n,m; fprintf(stderr, "Permutation: "); for (m = 0; m %d != %d>\n", m, (edge[m].taxon >= 0) ? 'e' : 'i', edge[m].taxon, edge[m].upsize, edge[m].downsize, edge[m].upsize+edge[m].downsize, nextleaf); fprintf(stderr, " UP:"); for (n = 0; n %d == %d> OK\n", m, (edge[m].taxon >= 0) ? 'e' : 'i', edge[m].taxon, edge[m].upsize, edge[m].downsize, edge[m].upsize+edge[m].downsize, nextleaf); } } } /* check_split */ /******************/ /* update splits after insertion */ void updatesplit_split(ONEEDGE *curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf) /* next free leaf idx */ { switch (wherefrom) { case UP: curredge->split[(curredge->upsize)++] = newleaf; /* leaf is up */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { /* nothing to do */ return; } break; case DOWNLEFT: curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if (curredge->up != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; case DOWNRIGHT: curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if ((curredge->up) != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; } } /* updatesplit_split */ /******************/ /* add next leaf on the specified edge */ void updatetreesplits_split(int dockedge, /* dockedge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ ivector permut) { int n; /* counter */ int wherefrom; /* direction to last edge */ ONEEDGE *curredge; /* edge array */ /* copy clusters from dockedge to in_nextedge */ /* up-cluster: upsize-1 .. 0 */ for (n=(edge[dockedge].upsize) - 1; n >= 0; n--) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).upsize = (edge[dockedge]).upsize; /* down-cluster: downsize .. Maxspc-1 */ for (n=Maxspc - (edge[dockedge]).downsize; n < Maxspc; n++) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).downsize = (edge[dockedge]).downsize; /* add the new taxon to in_nextedge */ (edge[in_nextedge]).split[Maxspc - ++((edge[in_nextedge]).downsize)] = permut[in_nextleaf]; /* setup clusters for new external edge (in_nextedge+1) */ /* up-cluster: all taxa in tree */ for (n=0; n < in_nextleaf; n++) { (edge[in_nextedge+1]).split[n] = permut[n]; } (edge[in_nextedge+1]).upsize = in_nextleaf; /* down-cluster: the new taxon itself */ (edge[in_nextedge+1]).split[Maxspc-1] = permut[in_nextleaf]; (edge[in_nextedge+1]).downsize = 1; curredge = &(edge[in_nextedge]); if (curredge->up != NULL) { /* not root */ if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } /* climbing up from insertion point */ updatesplit_split(curredge->up, wherefrom, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* climbing down to dockedge from insertion point */ updatesplit_split(&(edge[dockedge]), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* updatetreesplits_split */ /******************/ /* add next leaf on the specified edge */ void addnextleaf_split(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootleaf, /* uppest leaf */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut) { int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == root edge */ if (edgeofleaf[rootleaf] == dockedge) edgeofleaf[rootleaf] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; /* if not root edge: connect ancestor to internal edge (nextedge) */ if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding new external edge (nextedge+1) to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edge[nextedge+1].taxon = permut[nextleaf]; edgeofleaf[permut[nextleaf]] = nextedge+1; updatetreesplits_split(dockedge, permut[nextleaf], edge, Maxspc, edgeofleaf, nextedge, nextleaf, permut); (*in_nextedge) += 2; (*in_nextleaf) ++; } /* addnextleaf */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_split(ONEEDGE *tmpedge, /* edge array */ int nextedge, /* next free edge idx */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ int *minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int i; /* counter */ int a, b; int idxA, idxB; int maxUP; /* index counter for right/left split cluster */ int howmany = 0; uli minpenalty; for (i = 0; i < nextedge; i++) { (tmpedge[i]).edgeinfo = 0; /* reset penalty */ maxUP = (tmpedge[i]).upsize; for (idxB = Maxspc - (tmpedge[i]).downsize; idxB < Maxspc; idxB++) { b = (tmpedge[i].split)[idxB]; for (idxA = 0; idxA < maxUP; idxA++) { a = (tmpedge[i].split)[idxA]; (tmpedge[i]).edgeinfo += neighbormatr[a][b]; } /* for all root-sided (up) taxa */ } /* for all non-root-sided (down) taxa */ if (howmany == 0) { /* first edge: init */ minedges[howmany++] = i; minpenalty = tmpedge[i].edgeinfo; } else { /* -> all other edges */ if (minpenalty == tmpedge[i].edgeinfo) { /* another min edge */ minedges[howmany++] = i; } else { /* -> not same minimum */ if (minpenalty > tmpedge[i].edgeinfo) { /* new minimum penalty */ howmany = 0; minedges[howmany++] = i; minpenalty = tmpedge[i].edgeinfo; } /* if new minimum */ } /* same minimum */ } /* if all other edges */ } /* for all edges */ *out_howmany = howmany, *out_minpenalty = minpenalty; if (howmany > 1) *out_minedge = minedges[randominteger(howmany)]; else *out_minedge = minedges[0]; } /* computepenalties_split */ /******************/ /* trueID-ed (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_split( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut) /* in: species permutation (trueID) */ { /* local variables: */ int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int idxA, idxB; int idxC, idxI; /* index counter for quartet leaves */ int chooseX, chooseY; /* end leaves of penalty path */ ONEEDGE *tmpedge; /* new array of edges */ int *tmpedgeofleaf; /* array of extern edge ptrs */ int tmprootleaf; /* root edge */ ulimatrix neighbormatr; int *minedges; int howmany; minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); if (minedges == NULL) maerror("minimal edge set in onepstep_split"); neighbormatr = new_ulimatrix(Maxspc,Maxspc); /* allocate and initialize new tree topology */ inittree_split(&tmpedge, &tmpedgeofleaf, &tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); for (idxI = 3; idxI < Maxspc; idxI++) { i = permut[idxI]; /* initialize penalty neighborhood matrix */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] = 0; neighbormatr[b][a] = 0; } } /* for all entries in the upper neighbormatr */ /* * core of quartet puzzling algorithm */ for (idxA = 0; idxA < nextleaf - 2; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf - 1; idxB++) { b = permut[idxB]; for (idxC = idxB + 1; idxC < nextleaf; idxC++) { c = permut[idxC]; /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* de-trueID-ed (HAS) */ checkquartet(a, b, c, i, &chooseX, &chooseY); (neighbormatr[chooseX][chooseY])++; } /* for all quartets q=(a,b,c,i): c */ } /* for all quartets q=(a,b,c,i): b */ } /* for all quartets q=(a,b,c,i): a */ /* symetrize penalty neighborhood matrix */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] += neighbormatr[b][a]; neighbormatr[b][a] = neighbormatr[a][b]; } } /* for all entries in the upper neighbormatr */ computepenalties_split(tmpedge, nextedge, Maxspc, neighbormatr, minedges, &howmany, &mininfo, &minedge); /* add the next leaf on minedge */ addnextleaf_split(minedge, tmpedge, tmpedgeofleaf, tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); } /* adding all other leafs */ *edge = tmpedge; /* export tree topology */ *edgeofleaf = tmpedgeofleaf; /* export array of extern edge ptrs */ *rootleaf = tmprootleaf; /* export root edge */ free(minedges); free_ulimatrix(neighbormatr); } /* onepstep_split */ tree-puzzle-5.2/src/puzzle.h0000644000076400001440000007555510073365325011645 /* * puzzle.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef _PUZZLE_ #define _PUZZLE_ #ifndef PACKAGE # define PACKAGE "tree-puzzle" #endif #ifndef VERSION # define VERSION "5.2-generic" #endif #define DATE "July 2004" /* prototypes */ #include #include #include #include #include #include #include #include #include "pstep.h" #include "util.h" #include "ml.h" #include "consensus.h" #include "treesort.h" #ifdef PARALLEL # include "ppuzzle.h" #endif #define STDOUT stdout /* time check interval in seconds for ML/puzzling step status (900 = 15min) */ # define TIMECHECK_INTERVAL 900 /* filenames */ # define FILENAMELENGTH 2048 /* maximum exp difference, such that 1.0+exp(-TP_MAX_EXP_DIFF) == 1.0 */ # define TP_MAX_EXP_DIFF 40 # define INFILEDEFAULT "infile" # define OUTFILEDEFAULT "outfile" # define TREEFILEDEFAULT "outtree" # define INTREEDEFAULT "intree" # define DISTANCESDEFAULT "outdist" # define TRIANGLEDEFAULT "outlm.eps" # define UNRESOLVEDDEFAULT "outqlist" # define ALLQUARTDEFAULT "outallquart" # define ALLQUARTLHDEFAULT "outallquartlh" # define SITELHDEFAULT "outsitelh" # define SITELHBDEFAULT "outsitelhb" # define SITERATEDEFAULT "outsiterate" # define SITERATEBDEFAULT "outsiterateb" # define OUTPARAMDEFAULT "outparam" # define SUBSETDEFAULT "insubsetmatr" # define OUTPTLISTDEFAULT "outpstep" # define OUTPTORDERDEFAULT "outptorder" # define INFILE infilename # define OUTFILE outfilename # define TREEFILE outtreename # define INTREE intreename # define DISTANCES outdistname # define TRIANGLE outlmname # define UNRESOLVED outqlistname # define ALLQUART outallquartname # define ALLQUARTLH outallquartlhname # define SITELH outsitelhname # define SITELHB outsitelhbname # define SITERATE outsiteratename # define SITERATEB outsiteratebname # define OUTPARAM outparamname # define SUBSET insubsetmatrname # define OUTPTLIST outpstepname # define OUTPTORDER outptordername # define FILEPREFIX fileprefixname EXTERN char infilename [FILENAMELENGTH]; EXTERN char outfilename [FILENAMELENGTH]; EXTERN char outtreename [FILENAMELENGTH]; EXTERN char intreename [FILENAMELENGTH]; EXTERN char outdistname [FILENAMELENGTH]; EXTERN char outlmname [FILENAMELENGTH]; EXTERN char outqlistname [FILENAMELENGTH]; EXTERN char outallquartname [FILENAMELENGTH]; EXTERN char outallquartlhname [FILENAMELENGTH]; EXTERN char outsitelhname [FILENAMELENGTH]; EXTERN char outsitelhbname [FILENAMELENGTH]; EXTERN char outsiteratename [FILENAMELENGTH]; EXTERN char outsiteratebname [FILENAMELENGTH]; EXTERN char outparamname [FILENAMELENGTH]; EXTERN char insubsetmatrname [FILENAMELENGTH]; EXTERN char outpstepname [FILENAMELENGTH]; EXTERN char outptordername [FILENAMELENGTH]; EXTERN char fileprefixname [FILENAMELENGTH]; #define OUTFILEEXT "puzzle" #define TREEFILEEXT "tree" #define DISTANCESEXT "dist" #define TRIANGLEEXT "eps" #define UNRESOLVEDEXT "qlist" #define ALLQUARTEXT "allquart" #define ALLQUARTLHEXT "allquartlh" #define SITELHEXT "sitelh" #define SITELHBEXT "sitelhb" #define SITERATEEXT "siterate" #define SITERATEBEXT "siterateb" #define OUTPARAMEXT "param" #define SUBSETEXT "subsetmatr" #define OUTPTLISTEXT "pstep" #define OUTPTORDEREXT "ptorder" /* resetprefix values (xxx) */ #define RESET_NONE 0 #define RESET_INFILE 1 #define RESET_INTREE 2 /* setprefix_optn values (xxx) */ #define SETPREFIX_NONE 0 #define SETPREFIX_INFILE 1 #define SETPREFIX_INTREE 2 #define SETPREFIX_RESET 3 #define SETPREFIX_PREFIX 4 /* auto_aamodel/auto_datatype values (xxx) */ #define AUTO_OFF 0 #define AUTO_GUESS 1 #define AUTO_DEFAULT 2 /* qptlist values (xxx) */ #define PSTOUT_NONE 0 #define PSTOUT_ORDER 1 #define PSTOUT_LISTORDER 2 #define PSTOUT_LIST 3 /* dtat_optn values (xxx) */ #define NUCLEOTIDE 0 #define AMINOACID 1 #define BINARY 2 /* typ_optn values (xxx) */ #define TREERECON_OPTN 0 #define LIKMAPING_OPTN 1 #define NUMTYPES 2 /* puzzlemodes (xxx) */ #define QUARTPUZ 0 #define USERTREE 1 #define CONSENSUS 2 #define PAIRDIST 3 #define NUMPUZZLEMODES 4 /* modes for rootsearch (xxx) */ #define ROOT_USER 0 #define ROOT_AUTO 1 #define ROOT_DISPLAYED 2 #define NUMROOTSEARCH 3 #if 0 /* rhetmodes (xxx) Modes of rate heterogeneity */ #define UNIFORMRATE 0 #define GAMMARATE 1 #define TWORATE 2 #define MIXEDRATE 3 #endif /* defines for types of quartet likelihood computation (xxx) */ #define EXACT 0 #define APPROX 1 /* defines for results of sequence number check (seqnumcheck) */ #define SEQNUM_OK 0 #define SEQNUM_TOOFEW 1 #define SEQNUM_TOOMANY 2 #if 0 typedef struct { uli fullres_pro; uli fullres_con; uli partres_pro; uli partres_con; uli unres; uli missing; uli qsum; } qsupportarr_t; EXTERN cmatrix biparts; /* bipartitions of tree of current puzzling step */ EXTERN cmatrix consbiparts; /* bipartitions of majority rule consensus tree */ EXTERN int xsize; /* depth of consensus tree picture */ EXTERN ivector consconfid; /* confidence values of majority rule consensus tree */ EXTERN ivector conssizes; /* partition sizes of majority rule consensus tree */ EXTERN ivector xcor; /* x-coordinates of consensus tree nodes */ EXTERN ivector ycor; /* y-coordinates of consensus tree nodes */ EXTERN ivector ycormax; /* maximal y-coordinates of consensus tree nodes */ EXTERN ivector ycormin; /* minimal y-coordinates of consensus tree nodes */ /* splits for consensus */ EXTERN int splitlength; /* length of one entry in splitpatterns */ EXTERN uli maxbiparts; /* memory reserved for maxbiparts bipartitions */ EXTERN uli numbiparts; /* number of different bipartitions */ EXTERN int *splitsizes; /* size of all different splits of all trees */ EXTERN uli *splitcomptemp; /* temp variable to compress bipartitions coding */ EXTERN uli *splitfreqs; /* frequencies of different splits of all trees */ EXTERN uli *splitpatterns; /* all different splits of all trees */ EXTERN qsupportarr_t *qsupportarr; /* quartet support values per split */ EXTERN uli consincluded; /* number of included biparts in the consensus tree */ EXTERN uli consfifty; /* number of biparts >= 50% */ EXTERN uli conscongruent; /* number of first incongruent bipart */ #endif /* variables */ EXTERN cmatrix Seqchars; /* characters contained in data set */ EXTERN ivector Seqgapchar; /* counter for gaps contained in sequence */ EXTERN ivector Seqotherchar; /* counter for ambiguous contained in sequence */ EXTERN cmatrix treepict; /* picture of consensus tree */ EXTERN double minscore; /* value of edgescore on minedge */ EXTERN double tstvf84; /* F84 transition/transversion ratio */ EXTERN double tstvratio; /* expected transition/transversion ratio */ EXTERN double yrtsratio; /* expected pyrimidine/purine transition ratio */ EXTERN dvector ulkl; /* log L of user trees */ EXTERN dmatrix allsites; /* log L per sites of utrees (numutrees,Numptrn) */ EXTERN dvector ulklc; /* log L of utrees (clock) (numutrees,Numptrn) */ EXTERN dmatrix allsitesc; /* log L per sites of user trees (clock) */ EXTERN FILE *utfp; /* pointer to user tree file */ EXTERN FILE *ofp; /* pointer to output file */ EXTERN FILE *seqfp; /* pointer to sequence input file */ EXTERN FILE *tfp; /* pointer to tree file */ EXTERN FILE *dfp; /* pointer to distance file */ EXTERN FILE *trifp; /* pointer to triangle file */ EXTERN FILE *unresfp; /* pointer to file with unresolved quartets */ EXTERN FILE *tmpfp; /* pointer to temporary file */ EXTERN FILE *qptlist; /* pointer to file with puzzling step trees */ EXTERN FILE *qptorder; /* pointer to file with unique puzzling step trees */ EXTERN int SHcodon; /* whether SH should be applied to 1st, 2nd codon positions */ EXTERN int utree_optn; /* use first user tree for estimation */ EXTERN int listqptrees; /* list puzzling step trees */ EXTERN int approxqp; /* approximate QP quartets */ EXTERN int codon_optn; /* declares what positions in a codon should be used */ EXTERN int compclock; /* computation of clocklike branch lengths */ EXTERN int chooseA; /* leaf variable */ EXTERN int chooseB; /* leaf variable */ EXTERN int clustA, clustB, clustC, clustD; /* number of members of LM clusters */ EXTERN int Frequ_optn; /* use empirical base frequencies */ /* PSTEP_ORIG_H */ EXTERN int Maxbrnch; /* 2*Maxspc - 3 */ EXTERN int Maxseqc; /* number of sequence characters per taxum */ EXTERN int mflag; /* flag used for correct printing of runtime messages */ EXTERN int numclust; /* number of clusters in LM analysis */ EXTERN int outgroup; /* outgroup */ EXTERN int puzzlemode; /* computation of QP tree and/or ML distances */ EXTERN int rootsearch; /* how location of root is found */ EXTERN int rhetmode; /* model of rate heterogeneity */ EXTERN int seqnumcheck; /* result of sequence number checkheterogeneity */ EXTERN int usebestq_optn; /* use only best quartet topology, no bayesian weights */ EXTERN int printrmatr_optn; /* print rate matrix to screen */ EXTERN int usebranch_optn; /* use branch lengths given in usertree */ EXTERN int show_optn; /* show unresolved quartets */ EXTERN int savequart_optn; /* save memory block which quartets to file */ EXTERN int savequartlh_optn; /* save quartet likelihoods to file */ EXTERN int saveqlhbin_optn; /* save quartet likelihoods binary */ EXTERN int savesitelh_optn; /* save site likelihoods (PHILIP-like) */ EXTERN int savesitelhb_optn; /* save site likelihoods (binary) */ EXTERN int savesiterate_optn; /* save site rates (PHILIP-like) */ EXTERN int savesiterateb_optn; /* save site rates (binary) */ EXTERN int readquart_optn; /* read memory block which quartets from file */ EXTERN int fixedorder_optn; /* use fixed puzzling insert order 1,2,3,...n */ #if 0 EXTERN int skipmlbranch_optn;/* skip ml branches in final tree */ #endif EXTERN int conssub50_optn; /* do consensus down to percentage of first incongruence/ambiguity */ EXTERN int qsupport_optn; /* compute quartet support for the splits */ EXTERN int dotreetest_optn; /* compute tree statistics (ELW, KH, SH) */ EXTERN int dotreelh_optn; /* compute lh/branch lengths (QP,consensus) */ EXTERN int setprefix_optn; /* use other FILEPREFIX that INFILENAME */ EXTERN int consensus_optn; /* do consensus tree instead of user trees */ EXTERN int sym_optn; /* symmetrize doublet frequencies */ EXTERN int ytaxcounter; /* counter for establishing y-coordinates of all taxa */ EXTERN int numutrees; /* number of users trees in input tree file */ EXTERN ivector clusterA, clusterB, clusterC, clusterD; /* clusters for LM analysis */ EXTERN ivector ycortax; /* y-coordinates of all taxa */ EXTERN uli badqs; /* number of bad quartets */ EXTERN uli unresqs; /* number of unresolved quartets, formerly badqs */ EXTERN uli partresqs; /* number of partly resolved quartets */ EXTERN uli fullresqs; /* number of fully resolved quartets */ EXTERN uli missingqs; /* number of fully resolved quartets */ EXTERN ulivector badtaxon; /* involment of each taxon in a bad quartet */ EXTERN ulimatrix qinfomatr; /* sums of quartet topologies per taxon [0]=sum */ EXTERN uli Currtrial; /* counter for puzzling steps */ EXTERN uli Numquartets; /* number of quartets */ EXTERN uli Numtrial; /* number of puzzling steps */ EXTERN uli lmqts; /* quartets investigated in LM analysis (0 = ALL) */ EXTERN int auto_datatype; /* guess datatype ? */ EXTERN int guessdata_optn; /* guessed datatype */ EXTERN int auto_aamodel; /* guess amino acid modell ? */ EXTERN int guessauto_aamodel; /* guessed amino acid modell ? */ EXTERN int guessDayhf_optn; /* guessed Dayhoff model option */ EXTERN int guessJtt_optn; /* guessed JTT model option */ EXTERN int guessblosum62_optn; /* guessed BLOSUM 62 model option */ EXTERN int guessmtrev_optn; /* guessed mtREV model option */ EXTERN int guesscprev_optn; /* guessed cpREV model option */ EXTERN int guessvtmv_optn; /* guessed VT model option */ EXTERN int guesswag_optn; /* guessed WAG model option */ /* missing data: for handling subsets */ EXTERN int readsubset_optn; /* guessed WAG model option */ EXTERN int Maxsubset; /* number of subsets */ EXTERN imatrix ss_setovlgraph; /* size of overlap >= 3 between 2 subsets */ EXTERN imatrix ss_setoverlaps; /* size of overlap between 2 subsets */ EXTERN imatrix ss_setovllist; /* list with ovlerlapping subsets */ EXTERN ivector ss_setovllistsize; /* size of list with ovlerlapping subsets */ EXTERN imatrix ss_matrix; /* boolean list: taxon in set? */ EXTERN imatrix ss_list; /* list of taxa in set */ EXTERN ivector ss_listsize; /* size of list with taxa */ /* counter variables needed in likelihood mapping analysis */ EXTERN uli ar1, ar2, ar3; EXTERN uli reg1, reg2, reg3, reg4, reg5, reg6, reg7; EXTERN uli reg1l, reg1r, reg2u, reg2d, reg3u, reg3d, reg4u, reg4d, reg5l, reg5r, reg6u, reg6d; EXTERN unsigned char *quartetinfo; /* place where quartets are stored */ EXTERN dvector qweight; /* for use in QP and LM analysis */ EXTERN dvector sqdiff; EXTERN ivector qworder; EXTERN ivector sqorder; EXTERN int randseed; EXTERN int psteptreestrlen; #if 0 typedef struct treelistitemtypedummy { struct treelistitemtypedummy *pred; struct treelistitemtypedummy *succ; struct treelistitemtypedummy *sortnext; struct treelistitemtypedummy *sortlast; char *tree; int count; int id; int idx; } treelistitemtype; EXTERN treelistitemtype *psteptreelist; EXTERN treelistitemtype *psteptreesortlist; EXTERN int psteptreenum; EXTERN int psteptreesum; #endif /* prototypes */ void makeF84model(void); void compnumqts(void); void setoptions(void); int openfiletoread(FILE **, char[], char[]); int openfiletowrite(FILE **, char[], char[]); int openfiletoappend(FILE **, char[], char[]); void closefile(FILE *); void symdoublets(void); void computeexpectations(void); void putdistance(FILE *); void findidenticals(FILE *); double averagedist(int maxspc, dmatrix distanmat, double *meandist, double *mindist, double *maxdist, double *stddevdist, double *vardist); void initps(FILE *); void plotlmpoint(FILE *, double, double); void finishps(FILE *); void makelmpoint(FILE *, double, double, double); void timestamp(FILE *); void writeoutputfile(FILE *, int); /* definitions for writing output */ #define WRITEALL 0 #define WRITEPARAMS 1 #define WRITEREST 2 void writetimesstat(FILE *ofp); void writecutree(FILE *, int); void starttimer(void); void checktimer(uli); /* void estimateparametersnotree(void); * moved to mlparam.c */ /* void estimateparameterstree(void); * moved to mlparam.c */ int main(int, char *[]); int ulicmp(const void *, const void *); int intcmp(const void *, const void *); void readid(FILE *, int); char readnextcharacter(FILE *, int, int); /* skip rest of the line */ void skiprestofline(FILE *ifp, /* input file stream */ int notu, /* taxon number - for error msg. */ int nsite); /* sequence position - for error msg. */ /* skip control characters and blanks */ void skipcntrl(FILE *ifp, /* input file stream */ int notu, /* taxon number - for error msg. */ int nsite); /* sequence position - for error msg. */ /* read sequences of one data set */ void getseqs(FILE *ifp, /* in: input file stream */ int Maxspc, /* in: number of taxa */ int Maxseqc, /* in: number of sites */ cmatrix *seqch, /* out: alignment matrix */ cmatrix identif); /* io: taxon names (10 char w/o stop) */ /* initialize identifer arrays */ void initid(int t, /* in: number of taxa */ cmatrix *identif, /* out: name array w/o end of string */ cmatrix *namestr); /* out: name array with end of string */ /* copy undelimited identifer array to '\0' delimited identifer array */ void identif2namestr(int num, /* number of taxa */ cmatrix Identif, /* non-delimited names */ cmatrix Namestr); /* proper delimited names */ void fputid10(FILE *, int); int fputid(FILE *, int); /* read first line of sequence data set */ void getsizesites(FILE *ifp, /* in: input file stream */ int *Maxspc, /* out: number of taxa */ int *Maxseqc); /* out: number of sites */ /* read alignment from file */ void readsequencefile(FILE *seqfp, /* in: sequence input file stream */ int *Maxspc, /* out: number of taxa */ int *Maxseqc, /* out: number of sites */ cmatrix *identif, /* out: name array w/o end of str */ cmatrix *namestr, /* out: name array with end of str */ cmatrix *Seqchars); /* out: alignment matrix */ /* read subsets from file */ void readsubsetfile(FILE *seqfp, /* in: sequence input file stream */ int Maxspc, /* in: number of taxa */ cmatrix namestr, /* in: names taxa (seq file) */ int *Maxsubset, /* out: number of subsets */ imatrix *ss_setovlgraph, /* out: size of overlap >= 3 between 2 subsets */ imatrix *ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix *ss_setovllist, /* out: list with ovlerlapping subsets */ ivector *ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix *ss_matrix, /* out: boolean list: taxon in set? */ imatrix *ss_list, /* out: list of taxa in set */ ivector *ss_listsize); /* out: size of list with taxa */ /* permute taxon order */ void permutetaxa_ss(int Maxspc, /* in: number of taxa */ ivector permutation, /* permuted taxon order */ cmatrix namestr, /* in: names taxa (seq file) */ int Maxsubset, /* out: number of subsets */ imatrix ss_setovlgraph,/* out: size of overlap >= 3 between 2 subsets */ imatrix ss_setoverlaps,/* out: size of overlap between 2 subsets */ imatrix ss_setovllist, /* out: list with overlapping subsets */ ivector ss_setovllistsize,/* out: size of list with ovlerlapping subsets */ imatrix ss_matrix, /* out: bool list: taxon in set? */ imatrix ss_list, /* out: list of taxa in set */ ivector ss_listsize); /* out: size of list with taxa */ /* print subsets */ void fprintfss(FILE *ofp, /* in: output file stream */ int Maxspc, /* in: number of taxa */ int Maxsubset, /* out: number of subsets */ imatrix ss_setovlgraph, /* out: size of overlap >= 3 between 2 subsets */ imatrix ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix ss_setovllist, /* out: list with ovlerlapping subsets */ ivector ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix ss_matrix, /* out: boolean list: taxon in set? */ imatrix ss_list, /* out: list of taxa in set */ ivector ss_listsize); /* out: size of list with taxa */ /* check connectedness of subsets */ void checkss(FILE *ofp, /* in: output file stream */ int Maxspc, /* in: number of taxa */ int Maxsubset, /* out: number of subsets */ imatrix ss_setovlgraph, /* out: size of overlap >= 3 between 2 subsets */ imatrix ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix ss_setovllist, /* out: list with ovlerlapping subsets */ ivector ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix ss_matrix, /* out: boolean list: taxon in set? */ imatrix ss_list, /* out: list of taxa in set */ ivector ss_listsize); /* out: size of list with taxa */ /* guess data type: NUCLEOTIDE:0, AMINOACID:1, BINARY:2 */ int guessdatatype(cmatrix Seqchars, /* alignment matrix (Maxspc x Maxseqc) */ int Maxspc, /* number of taxa */ int Maxseqc); /* number of sites */ void translatedataset(int maxspc, int maxseqc, int *maxsite, cmatrix seqchars, cmatrix *seqchar, ivector *seqgapchar, ivector *seqotherchar); void estimatebasefreqs(void); void guessmodel(void); #if 0 int *initctree(); void copytree_trueID(int *ctree, /* out: copy for effective sorting */ int *trueID, /* in: permutation vector */ ONEEDGE *edgeset, /* in: intermediate tree topology */ int *edgeofleaf, /* dito. */ int nextleaf); /* in: next free leaf (bound) */ void freectree(int **snodes); void printctree(int *ctree); char *sprintfctree(int *ctree, int strlen); void fprintffullpstree(FILE *outf, char *treestr); int printfsortctree(int *ctree); int sortctree(int *ctree); int ct_1stedge(int node); int ct_2ndedge(int node); int ct_3rdedge(int node); void printfpstrees(treelistitemtype *list); void printfsortedpstrees(treelistitemtype *list); void fprintfsortedpstrees(FILE *output, treelistitemtype *list, int itemnum, int itemsum, int comment, float cutoff); void sortbynum(treelistitemtype *list, treelistitemtype **sortlist); treelistitemtype *addtree2list(char **tree, int numtrees, treelistitemtype **list, int *numitems, int *numsum); void freetreelist(treelistitemtype **list, int *numitems, int *numsum); #endif #if 0 void resetedgeinfo(void); void incrementedgeinfo(int, int); void minimumedgeinfo(void); #endif #if 0 void initconsensus(void); /* recursive function to get bipartitions */ void makepart_trueID(int i, /* */ int curribrnch, /* in: current branch in traversal */ ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: ext. edge list */ int *trueID, /* in: permutation list */ cmatrix biparts, /* out: split strings, edge by edge */ int Maxspc); /* in: number of species in tree */ /* compute bipartitions of current puzzling step tree */ void computebiparts_trueID(ONEEDGE *edge, /* in: tree topology */ int *edgeofleaf, /* in: ext. edge list */ int *trueID, /* in: permutation list */ cmatrix biparts, /* out: splits */ int outgroup, /* in: outgroup of tree */ int Maxspc); /* in: number of taxa in tree */ void printsplit(FILE *, uli); void makenewsplitentries(cmatrix bip, /* in: split string vector */ int numspl, /* in: no. of new splits */ uli **in_splitpatterns,/* io: known compr splits */ int **in_splitsizes, /* io: kn. split sizes: '.'*/ uli **in_splitfreqs, /* io: kn. split frequences*/ uli *in_numbiparts, /* io: no. of splits so far*/ uli *in_maxbiparts, /* io: reserved memory */ int Maxspc); /* in: no. of species */ /* copy bipartition n of all different splitpatterns to consbiparts[k] */ void copysplit(uli n, uli *splitpatterns, int k, cmatrix consbipartsvec); void makeconsensus(uli, int); /* write node (writeconsensustree) */ void writenode(FILE *treefile, /* in: output stream */ int node, /* current node */ int qsupp_optn, /* 'print quartet support' flag */ qsupportarr_t *qsupparr, /* quartet support values */ int *column); /* current line position */ /* write consensus tree */ void writeconsensustree(FILE *treefile, /* in: output stream */ int qsupp_optn, /* 'print quartsupp' flag */ qsupportarr_t *qsupparr); /* quartet support values */ void writeconsensustree(FILE *, int, qsupportarr_t *); void nodecoordinates(int); void drawnode(int, int); void plotconsensustree(FILE *); #endif unsigned char *callocquartets(int); void freequartets(void); unsigned char readquartet(int, int, int, int); void writequartet(int, int, int, int, unsigned char); void sort3doubles(dvector, ivector); void computeallquartets(void); /* check the branching structure between the leaves (not the taxa!) A, B, C, and I (A, B, C, I don't need to be ordered). As a result, the two leaves that are closer related to each other than to leaf I are found in chooseX and chooseY. If the branching structure is not uniquely defined, chooseX and chooseY are chosen randomly from the possible taxa */ void checkquartet(int A, /* quartet taxon ID */ int B, /* dito. */ int C, /* dito. */ int I, /* dito., to be inserted */ int *chooseX, /* (chooseX,chooseY | x,I) */ int *chooseY); /* chooseX+Y are non-neighbors of I */ void checkquartet_trueID(int A, /* quartet leaf idx in permutation array */ int B, /* dito. */ int C, /* dito. */ int I, /* dito., to be inserted */ int *trueID, /* permutation array */ int *chooseX, /* (chooseX,chooseY | x,I) */ int *chooseY); /* chooseX+Y are non-neighbors of I */ void num2quart(uli qnum, int *a, int *b, int *c, int *d); uli numquarts(int maxspc); uli quart2num (int a, int b, int c, int d); void writetpqfheader(int nspec, FILE *ofp, int flag); /* extracted from main (xxx) */ void compute_quartlklhds(int a, int b, int c, int d, double *d1, double *d2, double *d3, int approx); /* definitions for timing */ #define OVERALL 0 #define GENERAL 1 #define OPTIONS 2 #define PARAMEST 3 #define QUARTETS 4 #define PUZZLING 5 #define TREEEVAL 6 typedef struct { int currentjob; clock_t tempcpu; clock_t tempfullcpu; clock_t tempcpustart; time_t temptime; time_t tempfulltime; time_t temptimestart; clock_t maxcpu; clock_t mincpu; time_t maxtime; time_t mintime; double maxcpublock; double mincpublock; double mincputick; double mincputicktime; double maxtimeblock; double mintimeblock; double generalcpu; double optionscpu; double paramestcpu; double quartcpu; double quartblockcpu; double quartmaxcpu; double quartmincpu; double puzzcpu; double puzzblockcpu; double puzzmaxcpu; double puzzmincpu; double treecpu; double treeblockcpu; double treemaxcpu; double treemincpu; double cpu; double fullcpu; double generaltime; double optionstime; double paramesttime; double quarttime; double quartblocktime; double quartmaxtime; double quartmintime; double puzztime; double puzzblocktime; double puzzmaxtime; double puzzmintime; double treetime; double treeblocktime; double treemaxtime; double treemintime; double time; double fulltime; } timearray_t; EXTERN double cputime, walltime; EXTERN double fullcpu, fulltime; EXTERN double fullcputime, fullwalltime; EXTERN double altcputime, altwalltime; EXTERN clock_t cputimestart, cputimestop, cputimedummy; EXTERN time_t walltimestart, walltimestop, walltimedummy; EXTERN clock_t Startcpu; /* start cpu time */ EXTERN clock_t Stopcpu; /* stop cpu time */ EXTERN time_t MLstepStarttime; /* start time */ EXTERN time_t MLstepStoptime; /* stop time */ EXTERN time_t PStepStarttime; /* start time */ EXTERN time_t PStepStoptime; /* stop time */ EXTERN time_t PEstStarttime; /* start time */ EXTERN time_t PEstStoptime; /* stop time */ EXTERN time_t Starttime; /* start time */ EXTERN time_t Stoptime; /* stop time */ EXTERN time_t time0; /* timer variable */ EXTERN time_t time1; /* yet another timer */ EXTERN time_t time2; /* yet another timer */ EXTERN timearray_t tarr; void resetqblocktime(timearray_t *ta); void resetpblocktime(timearray_t *ta); void inittimearr(timearray_t *ta); void addtimes(int jobtype, timearray_t *ta); #ifdef TIMEDEBUG void printtimearr(timearray_t *ta); #endif /* TIMEDEBUG */ /* compute Bayesian weights from log-lkls d1, d2, d3 */ unsigned char loglkl2weight(int a, int b, int c, int i, double d1, double d2, double d3, int usebestq); #if 0 #ifdef PARALLEL # include "ppuzzle.h" #endif #endif #endif /* _PUZZLE_ */ tree-puzzle-5.2/src/puzzle1.c0000644000076400001440000065747610074444162011727 /* * puzzle1.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #define USE_GTR 1 #ifdef HAVE_CONFIG_H # include #endif #if !PARALLEL # ifdef USE_CONSOLE_H # include # endif #endif #define EXTERN #include "puzzle.h" #include "gamma.h" #include "treetest.h" #if PARALLEL # include "ppuzzle.h" #endif /*epe*/ #ifdef VT # include #endif /******* debugging stuff - HAS ;-) ********/ int PPP1=0; /* fprintf(stderr, "PPP1: %d (%s:%d)\n", PPP1++, __FILE__, __LINE__); */ void fprintftimespan(FILE *ofp, time_t start, time_t stop, time_t allstart, char *comment) { double timespan; timespan = difftime(stop, start); fprintf(ofp, "TTT: %-25s took %.0f seconds (= %.1f minutes = %.1f hours)\n", comment, timespan, timespan/60., timespan/3600.); timespan = difftime(stop, allstart); fprintf(ofp, "TTT: from beginning: %.0f seconds (= %.1f minutes = %.1f hours)\n", timespan, timespan/60., timespan/3600.); fflush(ofp); } /******* end of debugging stuff - HAS ;-) ********/ void num2quart(uli qnum, int *a, int *b, int *c, int *d) { double temp; uli aa, bb, cc, dd; uli lowval=0, highval=0; aa=0; bb=1; cc=2; dd=3; temp = (double)(24 * qnum); temp = sqrt(temp); temp = sqrt(temp); /* temp = pow(temp, (double)(1/4)); */ dd = (uli) floor(temp) + 1; if (dd < 3) dd = 3; lowval = (uli) dd*(dd-1)*(dd-2)*(dd-3)/24; highval = (uli) (dd+1)*dd*(dd-1)*(dd-2)/24; if (lowval >= qnum) while ((lowval > qnum)) { dd -= 1; lowval = (uli) dd*(dd-1)*(dd-2)*(dd-3)/24; } else { while (highval <= qnum) { dd += 1; highval = (uli) (dd+1)*dd*(dd-1)*(dd-2)/24; } lowval = (uli) dd*(dd-1)*(dd-2)*(dd-3)/24; } qnum -= lowval; if (qnum > 0) { temp = (double)(6 * qnum); temp = pow(temp, (double)(1/3)); cc = (uli) floor(temp); if (cc < 2) cc= 2; lowval = (uli) cc*(cc-1)*(cc-2)/6; highval = (uli) (cc+1)*cc*(cc-1)/6; if (lowval >= qnum) while ((lowval > qnum)) { cc -= 1; lowval = (uli) cc*(cc-1)*(cc-2)/6; } else { while (highval <= qnum) { cc += 1; highval = (uli) (cc+1)*cc*(cc-1)/6; } lowval = (uli) cc*(cc-1)*(cc-2)/6; } qnum -= lowval; if (qnum > 0) { temp = (double)(2 * qnum); temp = sqrt(temp); bb = (uli) floor(temp); if (bb < 1) bb= 1; lowval = (uli) bb*(bb-1)/2; highval = (uli) (bb+1)*bb/2; if (lowval >= qnum) while ((lowval > qnum)) { bb -= 1; lowval = (uli) bb*(bb-1)/2; } else { while (highval <= qnum) { bb += 1; highval = (uli) (bb+1)*bb/2; } lowval = (uli) bb*(bb-1)/2; } qnum -= lowval; if (qnum > 0) { aa = (uli) qnum; if (aa < 0) aa= 0; } } } *d = (int)dd; *c = (int)cc; *b = (int)bb; *a = (int)aa; } /* num2quart */ /******************/ uli numquarts(int maxspc) { uli tmp; int a, b, c, d; if (maxspc < 4) return (uli)0; else { maxspc--; a = maxspc-3; b = maxspc-2; c = maxspc-1; d = maxspc; tmp = (uli) 1 + a + (uli) b * (b-1) / 2 + (uli) c * (c-1) * (c-2) / 6 + (uli) d * (d-1) * (d-2) * (d-3) / 24; return (tmp); } } /* numquarts */ /******************/ uli quart2num (int a, int b, int c, int d) { uli tmp; if ((a>b) || (b>c) || (c>d)) { fprintf(stderr, "Error PP5 not (%d <= %d <= %d <= %d) !!!\n", a, b, c, d); # if PARALLEL PP_Finalize(); # endif exit (1); } tmp = (uli) a + (uli) b * (b-1) / 2 + (uli) c * (c-1) * (c-2) / 6 + (uli) d * (d-1) * (d-2) * (d-3) / 24; return (tmp); } /* quart2num */ /******************/ /* flag=0 old allquart binary */ /* flag=1 allquart binary */ /* flag=2 allquart ACSII */ /* flag=3 quartlh binary */ /* flag=4 quartlh ASCII */ void writetpqfheader(int nspec, FILE *ofp, int flag) { int currspec; if (flag == 0) { unsigned long nquart; unsigned long blocklen; nquart = numquarts(nspec); /* compute number of bytes */ if (nquart % 2 == 0) { /* even number */ blocklen = (nquart)/2; } else { /* odd number */ blocklen = (nquart + 1)/2; } /* fprintf(STDOUT, "Writing quartet file: %s\n", filename); */ fprintf(ofp, "TREE-PUZZLE\n%s\n\n", VERSION); fprintf(ofp, "species: %d\n", nspec); fprintf(ofp, "quartets: %lu\n", nquart); fprintf(ofp, "bytes: %lu\n\n", blocklen); /* fwrite(&(quartetinfo[0]), sizeof(char), blocklen, ofp); */ } if (flag == 1) fprintf(ofp, "##TPQF-BB (TREE-PUZZLE %s)\n%d\n", VERSION, nspec); if (flag == 2) fprintf(ofp, "##TPQF-BA (TREE-PUZZLE %s)\n%d\n", VERSION, nspec); if (flag == 3) fprintf(ofp, "##TPQF-LB (TREE-PUZZLE %s)\n%d\n", VERSION, nspec); if (flag == 4) fprintf(ofp, "##TPQF-LA (TREE-PUZZLE %s)\n%d\n", VERSION, nspec); for (currspec=0; currspec MAXTS) { fprintf(STDOUT, "\n\n\nF84 model not possible "); fprintf(STDOUT, "(bad Ts/Tv parameter)\n"); tstvf84 = 0.0; return; } if (yr < MINYR || yr > MAXYR) { fprintf(STDOUT, "\n\n\nF84 model not possible "); fprintf(STDOUT, "(bad Y/R transition parameter)\n"); tstvf84 = 0.0; return; } TSparam = ts; YRparam = yr; optim_optn = FALSE; } /* makeF84model */ /* compute number of quartets used in LM analysis */ void compnumqts() { if (lmqts == 0) { if (numclust == 4) Numquartets = (uli) clustA*clustB*clustC*clustD; if (numclust == 3) Numquartets = (uli) clustA*clustB*clustC*(clustC-1)/2; if (numclust == 2) Numquartets = (uli) clustA*(clustA-1)/2 * clustB*(clustB-1)/2; if (numclust == 1) Numquartets = (uli) Maxspc*(Maxspc-1)*(Maxspc-2)*(Maxspc-3)/24; } else { Numquartets = lmqts; } } /* compnumqts */ /* set options interactively */ void setoptions() { int i, valid; double sumfreq; char ch; /* defaults */ rhetmode = UNIFORMRATE; /* assume rate homogeneity */ numcats = 1; Geta = 0.05; grate_optim = FALSE; fracinv = 0.0; fracinv_optim = FALSE; compclock = FALSE; /* compute clocklike branch lengths */ locroot = -1; /* search for optimal place of root */ qcalg_optn = FALSE; /* don't use sampling of quartets */ approxp_optn = TRUE; /* approximate parameter estimates */ listqptrees = PSTOUT_NONE; /* list puzzling step trees */ /* approximate QP quartets? */ if (Maxspc <= 6) approxqp = FALSE; else approxqp = TRUE; codon_optn = 0; /* use all positions in a codon */ /* number of puzzling steps */ if (Maxspc <= 25) Numtrial = 1000; else if (Maxspc <= 50) Numtrial = 10000; else if (Maxspc <= 75) Numtrial = 25000; else Numtrial = 50000; utree_optn = TRUE; /* use first user tree for estimation */ outgroup = 0; /* use first taxon as outgroup */ sym_optn = FALSE; /* symmetrize doublet frequencies */ tstvf84 = 0.0; /* disable F84 model */ show_optn = FALSE; /* show unresolved quartets */ typ_optn = TREERECON_OPTN; /* tree reconstruction */ numclust = 1; /* one clusters in LM analysis */ lmqts = 0; /* all quartets in LM analysis */ compnumqts(); if (Numquartets > 10000) { lmqts = 10000; /* 10000 quartets in LM analysis */ compnumqts(); } /* correct default analysis types if too few/many sequences*/ if ((seqnumcheck!=SEQNUM_OK) && (puzzlemode==QUARTPUZ)) puzzlemode = (puzzlemode + 1) % NUMPUZZLEMODES; /* correct default analysis types if too fewy sequences*/ if ((seqnumcheck==SEQNUM_TOOFEW) && (typ_optn==LIKMAPING_OPTN)) typ_optn = (typ_optn + 1) % NUMTYPES; do { fprintf(STDOUT, "\n\n\nGENERAL OPTIONS"); if (seqnumcheck==SEQNUM_OK) fprintf(STDOUT, "\n"); if (seqnumcheck==SEQNUM_TOOFEW) fprintf(STDOUT, " (no quartet methods available - too few sequences)\n"); if (seqnumcheck==SEQNUM_TOOMANY) fprintf(STDOUT, " (no quartet puzzling available - too many sequences)\n"); fprintf(STDOUT, " b Type of analysis? "); if (typ_optn == TREERECON_OPTN) { if (seqnumcheck==SEQNUM_TOOFEW) fprintf(STDOUT, "Tree reconstruction (only possible)\n"); else fprintf(STDOUT, "Tree reconstruction\n"); } /* not possible for |seqs| < 4 */ if (typ_optn == LIKMAPING_OPTN) fprintf(STDOUT, "Likelihood mapping\n"); if (typ_optn == TREERECON_OPTN) { fprintf(STDOUT, " k Tree search procedure? "); /* not possible for |seqs| < 4 and for |seqs| > 257 */ if (puzzlemode == QUARTPUZ) fprintf(STDOUT, "Quartet puzzling\n"); if (puzzlemode == USERTREE) fprintf(STDOUT, "Evaluate user defined trees\n"); if (puzzlemode == CONSENSUS) fprintf(STDOUT, "Consensus of user defined trees\n"); if (puzzlemode == PAIRDIST) fprintf(STDOUT, "Pairwise distances only (no tree)\n"); if (puzzlemode == QUARTPUZ) { fprintf(STDOUT, " v Approximate quartet likelihood? %s\n", (approxqp ? "Yes" : "No")); fprintf(STDOUT, " u List unresolved quartets? %s\n", (show_optn ? "Yes" : "No")); fprintf(STDOUT, " n Number of puzzling steps? %lu\n", Numtrial); fprintf(STDOUT, " j List puzzling step trees? "); switch (listqptrees) { case PSTOUT_NONE: fprintf(STDOUT, "No\n"); break; case PSTOUT_ORDER: fprintf(STDOUT, "Unique topologies\n"); break; case PSTOUT_LISTORDER: fprintf(STDOUT, "Unique topologies & Chronological list\n"); break; case PSTOUT_LIST: fprintf(STDOUT, "Chronological list only\n"); break; } fprintf(STDOUT, " o Display as outgroup? "); fputid(STDOUT, outgroup); fprintf(STDOUT, " (%d)\n", outgroup + 1); } if (puzzlemode == QUARTPUZ || puzzlemode == USERTREE || puzzlemode == CONSENSUS) { fprintf(STDOUT, " z Compute clocklike branch lengths? "); if (compclock) fprintf(STDOUT, "Yes\n"); else fprintf(STDOUT, "No\n"); } if (compclock) if (puzzlemode == QUARTPUZ || puzzlemode == USERTREE || puzzlemode == CONSENSUS) { fprintf(STDOUT, " l Location of root? "); if (locroot < 0) fprintf(STDOUT, "Best place (automatic search)\n"); else if (locroot < Maxspc) { fprintf(STDOUT, "Branch %d (", locroot + 1); fputid(STDOUT, locroot); fprintf(STDOUT, ")\n"); } else fprintf(STDOUT, "Branch %d (internal branch)\n", locroot + 1); } } if (typ_optn == LIKMAPING_OPTN) { fprintf(STDOUT, " g Group sequences in clusters? "); if (numclust == 1) fprintf(STDOUT, "No\n"); else fprintf(STDOUT, "Yes (%d clusters as specified)\n", numclust); fprintf(STDOUT, " n Number of quartets? "); if (lmqts == 0) fprintf(STDOUT, "%lu (all possible)\n", Numquartets); else fprintf(STDOUT, "%lu (random choice)\n", lmqts); } fprintf(STDOUT, " e Parameter estimates? "); if (approxp_optn) fprintf(STDOUT, "Approximate (faster)\n"); else fprintf(STDOUT, "Exact (slow)\n"); if (!((puzzlemode == USERTREE || puzzlemode == CONSENSUS) && typ_optn == TREERECON_OPTN)) { fprintf(STDOUT, " x Parameter estimation uses? "); if (qcalg_optn) fprintf(STDOUT, "Quartet sampling + NJ tree\n"); else fprintf(STDOUT, "Neighbor-joining tree\n"); } else { fprintf(STDOUT, " x Parameter estimation uses? "); if (utree_optn) fprintf(STDOUT, "1st input tree\n"); else if (qcalg_optn) fprintf(STDOUT, "Quartet sampling + NJ tree\n"); else fprintf(STDOUT, "Neighbor-joining tree\n"); } fprintf(STDOUT, "SUBSTITUTION PROCESS\n"); fprintf(STDOUT, " d Type of sequence input data? "); if (auto_datatype == AUTO_GUESS) fprintf(STDOUT, "Auto: "); if (data_optn == NUCLEOTIDE) fprintf(STDOUT, "Nucleotides\n"); if (data_optn == AMINOACID) fprintf(STDOUT, "Amino acids\n"); if (data_optn == BINARY) fprintf(STDOUT, "Binary states\n"); if (data_optn == NUCLEOTIDE && (Maxseqc % 3) == 0 && !SH_optn) { fprintf(STDOUT, " h Codon positions selected? "); if (codon_optn == 0) fprintf(STDOUT, "Use all positions\n"); if (codon_optn == 1) fprintf(STDOUT, "Use only 1st positions\n"); if (codon_optn == 2) fprintf(STDOUT, "Use only 2nd positions\n"); if (codon_optn == 3) fprintf(STDOUT, "Use only 3rd positions\n"); if (codon_optn == 4) fprintf(STDOUT, "Use 1st and 2nd positions\n"); } fprintf(STDOUT, " m Model of substitution? "); if (data_optn == NUCLEOTIDE) { /* nucleotides */ if (nuc_optn) { if(HKY_optn) fprintf(STDOUT, "HKY (Hasegawa et al. 1985)\n"); if(TN_optn) { fprintf(STDOUT, "TN (Tamura-Nei 1993)\n"); fprintf(STDOUT, " p Constrain TN model to F84 model? "); if (tstvf84 == 0.0) fprintf(STDOUT, "No\n"); else fprintf(STDOUT, "Yes (Ts/Tv ratio = %.2f)\n", tstvf84); } if(GTR_optn) fprintf(STDOUT, "GTR (e.g. Lanave et al. 1980)\n"); if((HKY_optn) || (TN_optn)) { fprintf(STDOUT, " t Transition/transversion parameter? "); if (optim_optn) fprintf(STDOUT, "Estimate from data set\n"); else fprintf(STDOUT, "%.2f\n", TSparam); } if (TN_optn) { fprintf(STDOUT, " r Y/R transition parameter? "); if (optim_optn) fprintf(STDOUT, "Estimate from data set\n"); else fprintf(STDOUT, "%.2f\n", YRparam); } if (GTR_optn) { fprintf(STDOUT, " 1 A-C rate? "); fprintf(STDOUT, "%-23.2f", GTR_ACrate); fprintf(STDOUT, " 2 A-G rate? "); fprintf(STDOUT, "%-23.2f\n", GTR_AGrate); fprintf(STDOUT, " 3 A-T rate? "); fprintf(STDOUT, "%-23.2f", GTR_ATrate); fprintf(STDOUT, " 4 C-G rate? "); fprintf(STDOUT, "%-23.2f\n", GTR_CGrate); fprintf(STDOUT, " 5 C-T rate? "); fprintf(STDOUT, "%-23.2f", GTR_CTrate); fprintf(STDOUT, " 6 G-T rate? "); fprintf(STDOUT, "%-23.2f\n", GTR_GTrate); #if 0 fprintf(STDOUT, " 1 A <-> C mutation rate? "); fprintf(STDOUT, "%.2f\n", GTR_ACrate); fprintf(STDOUT, " 2 A <-> G mutation rate? "); fprintf(STDOUT, "%.2f\n", GTR_AGrate); fprintf(STDOUT, " 3 A <-> T mutation rate? "); fprintf(STDOUT, "%.2f\n", GTR_ATrate); fprintf(STDOUT, " 4 C <-> G mutation rate? "); fprintf(STDOUT, "%.2f\n", GTR_CGrate); fprintf(STDOUT, " 5 C <-> T mutation rate? "); fprintf(STDOUT, "%.2f\n", GTR_CTrate); fprintf(STDOUT, " 6 G <-> T mutation rate? "); fprintf(STDOUT, "%.2f\n", GTR_GTrate); #endif } } if (SH_optn) { fprintf(STDOUT, "SH (Schoeniger-von Haeseler 1994)\n"); fprintf(STDOUT, " t Transition/transversion parameter? "); if (optim_optn) fprintf(STDOUT, "Estimate from data set\n"); else fprintf(STDOUT, "%.2f\n", TSparam); } } if (data_optn == NUCLEOTIDE && SH_optn) { fprintf(STDOUT, " h Doublets defined by? "); if (SHcodon) fprintf(STDOUT, "1st and 2nd codon positions\n"); else fprintf(STDOUT, "1st+2nd, 3rd+4th, etc. site\n"); } if (data_optn == AMINOACID) { /* amino acids */ switch (auto_aamodel) { case AUTO_GUESS: fprintf(STDOUT, "Auto: "); break; case AUTO_DEFAULT: fprintf(STDOUT, "Def.: "); break; } if (Dayhf_optn) fprintf(STDOUT, "Dayhoff (Dayhoff et al. 1978)\n"); if (Jtt_optn) fprintf(STDOUT, "JTT (Jones et al. 1992)\n"); if (mtrev_optn) fprintf(STDOUT, "mtREV24 (Adachi-Hasegawa 1996)\n"); if (cprev_optn) fprintf(STDOUT, "cpREV45 (Adachi et al. 2000)\n"); if (blosum62_optn) fprintf(STDOUT, "BLOSUM62 (Henikoff-Henikoff 92)\n"); if (vtmv_optn) fprintf(STDOUT, "VT (Mueller-Vingron 2000)\n"); if (wag_optn) fprintf(STDOUT, "WAG (Whelan-Goldman 2000)\n"); } if (data_optn == BINARY) { /* binary states */ fprintf(STDOUT, "Two-state model (Felsenstein 1981)\n"); } if (data_optn == AMINOACID) fprintf(STDOUT, " f Amino acid frequencies? "); else if (data_optn == NUCLEOTIDE && SH_optn) fprintf(STDOUT, " f Doublet frequencies? "); else if (data_optn == NUCLEOTIDE && nuc_optn) fprintf(STDOUT, " f Nucleotide frequencies? "); else if (data_optn == BINARY) fprintf(STDOUT, " f Binary state frequencies? "); fprintf(STDOUT, "%s\n", (Frequ_optn ? "Estimate from data set" : "Use specified values")); if (data_optn == NUCLEOTIDE && SH_optn) fprintf(STDOUT, " s Symmetrize doublet frequencies? %s\n", (sym_optn ? "Yes" : "No")); fprintf(STDOUT, "RATE HETEROGENEITY\n"); fprintf(STDOUT, " w Model of rate heterogeneity? "); if (rhetmode == UNIFORMRATE) fprintf(STDOUT, "Uniform rate\n"); if (rhetmode == GAMMARATE ) fprintf(STDOUT, "Gamma distributed rates\n"); if (rhetmode == TWORATE ) fprintf(STDOUT, "Two rates (1 invariable + 1 variable)\n"); if (rhetmode == MIXEDRATE ) fprintf(STDOUT, "Mixed (1 invariable + %d Gamma rates)\n", numcats); if (rhetmode == TWORATE || rhetmode == MIXEDRATE) { fprintf(STDOUT, " i Fraction of invariable sites? "); if (fracinv_optim) fprintf(STDOUT, "Estimate from data set"); else fprintf(STDOUT, "%.2f", fracinv); if (fracinv == 0.0 && !fracinv_optim) fprintf(STDOUT, " (all sites variable)"); fprintf(STDOUT, "\n"); } if (rhetmode == GAMMARATE || rhetmode == MIXEDRATE) { fprintf(STDOUT, " a Gamma distribution parameter alpha? "); if (grate_optim) fprintf(STDOUT, "Estimate from data set\n"); else if (Geta > 0.5) fprintf(STDOUT, "%.2f (strong rate heterogeneity)\n", (1.0-Geta)/Geta); else fprintf(STDOUT, "%.2f (weak rate heterogeneity)\n", (1.0-Geta)/Geta); fprintf(STDOUT, " c Number of Gamma rate categories? %d\n", numcats); } fprintf(STDOUT, "\nQuit [q], confirm [y], or change [menu] settings: "); fflush(STDOUT); /* read one char */ ch = getchar(); if (ch != '\n') { do ; while (getchar() != '\n'); } ch = (char) tolower((int) ch); /* letters in use: a b c d e f g h i j k l m n o p q r s t u v w y x z */ /* letters not in use: */ switch (ch) { case '\n': break; case 'z': if (typ_optn == TREERECON_OPTN && (puzzlemode == QUARTPUZ || puzzlemode == USERTREE || puzzlemode == CONSENSUS)) { compclock = compclock + 1; if (compclock == 2) compclock = 0; } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'l': if (compclock && typ_optn == TREERECON_OPTN && (puzzlemode == QUARTPUZ || puzzlemode == USERTREE || puzzlemode == CONSENSUS)) { fprintf(STDOUT, "\n\n\nEnter an invalid branch number to search "); fprintf(STDOUT, "for the best location!\n"); fprintf(STDOUT, "\nPlace root at branch (1-%d, 0=automatic): ", 2*Maxspc-3); fflush(STDOUT); scanf("%d", &locroot); do ; while (getchar() != '\n'); if (locroot < 1 || locroot > 2*Maxspc-3) locroot = 0; locroot = locroot - 1; } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'e': if ((rhetmode == TWORATE || rhetmode == MIXEDRATE) && fracinv_optim) { fprintf(STDOUT, "\n\n\nInvariable sites estimation needs to be exact!\n"); } else { approxp_optn = approxp_optn + 1; if (approxp_optn == 2) approxp_optn = 0; } break; case 'w': rhetmode = rhetmode + 1; if (rhetmode == 4) rhetmode = UNIFORMRATE; if (rhetmode == UNIFORMRATE) { /* uniform rate */ numcats = 1; Geta = 0.05; grate_optim = FALSE; fracinv = 0.0; fracinv_optim = FALSE; } if (rhetmode == GAMMARATE ) { /* Gamma distributed rates */ numcats = 8; Geta = 0.05; grate_optim = TRUE; fracinv = 0.0; fracinv_optim = FALSE; } if (rhetmode == TWORATE ) { /* two rates (1 invariable + 1 variable) */ approxp_optn = FALSE; numcats = 1; Geta = 0.05; grate_optim = FALSE; fracinv = 0.0; fracinv_optim = TRUE; } if (rhetmode == MIXEDRATE ) { /* mixed (1 invariable + Gamma rates) */ approxp_optn = FALSE; numcats = 8; Geta = 0.05; grate_optim = TRUE; fracinv = 0.0; fracinv_optim = TRUE; } break; case 'i': if (rhetmode == TWORATE || rhetmode == MIXEDRATE) { fprintf(STDOUT, "\n\n\nEnter an invalid value for "); fprintf(STDOUT, "estimation from data set!\n"); fprintf(STDOUT, "\nFraction of invariable sites among all sites (%.2f-%.2f): ", MINFI, MAXFI); fflush(STDOUT); scanf("%lf", &fracinv); do ; while (getchar() != '\n'); if (fracinv < MINFI || fracinv > MAXFI) { fracinv_optim = TRUE; fracinv = 0.0; } else { fracinv_optim = FALSE; } } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'a': if (rhetmode == GAMMARATE || rhetmode == MIXEDRATE) { fprintf(STDOUT, "\n\n\nEnter an invalid value for estimation from data set!\n"); fprintf(STDOUT, "\nGamma distribution parameter alpha (%.2f-%.2f): ", (1.0-MAXGE)/MAXGE, (1.0-MINGE)/MINGE); fflush(STDOUT); scanf("%lf", &Geta); do ; while (getchar() != '\n'); if (Geta < (1.0-MAXGE)/MAXGE || Geta > (1.0-MINGE)/MINGE) { grate_optim = TRUE; Geta = 0.05; } else { grate_optim = FALSE; Geta = 1.0/(1.0 + Geta); } } else fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); break; case 'c': if (rhetmode == GAMMARATE || rhetmode == MIXEDRATE) { fprintf(STDOUT, "\n\n\nNumber of Gamma rate categories (%d-%d): ", MINCAT, MAXCAT); fflush(STDOUT); scanf("%d", &numcats); do ; while (getchar() != '\n'); if (numcats < MINCAT || numcats > MAXCAT) { fprintf(STDOUT, "\n\n\nThis number of categories is not available!\n"); numcats = 4; } } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'h': if (data_optn == NUCLEOTIDE && (Maxseqc % 3) == 0 && !SH_optn) { codon_optn = codon_optn + 1; if (codon_optn == 5) codon_optn = 0; translatedataset(Maxspc, Maxseqc, &Maxsite, Seqchars, &Seqchar, &Seqgapchar, &Seqotherchar); /* reestimate nucleotide frequencies only if user did not specify other values */ if (Frequ_optn) estimatebasefreqs(); } else if (data_optn == NUCLEOTIDE && SH_optn) { if (Maxseqc % 2 != 0 && Maxseqc % 3 == 0) { SHcodon = TRUE; fprintf(STDOUT, "\n\n\nThis is the only possible option for the data set!\n"); } if (Maxseqc % 3 != 0 && Maxseqc % 2 == 0) { SHcodon = FALSE; fprintf(STDOUT, "\n\n\nThis is the only possible option for the data set!\n"); } if (Maxseqc % 2 == 0 && Maxseqc % 3 == 0) { if (SHcodon) SHcodon = FALSE; else SHcodon = TRUE; translatedataset(Maxspc, Maxseqc, &Maxsite, Seqchars, &Seqchar, &Seqgapchar, &Seqotherchar); /* reestimate nucleotide frequencies only if user did not specify other values */ if (Frequ_optn) estimatebasefreqs(); } } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'x': if (typ_optn == TREERECON_OPTN && (puzzlemode == USERTREE || puzzlemode == CONSENSUS)) { /* use of usertree for parameter estimation set? */ /* utree_optn==TRUE && qcalg_optn==? - 1st user tree (for substitution process and rate variation) */ /* utree_optn==FALSE && qcalg_optn==TRUE - quartet sampling (for substitution process) + NJ tree (for rate variation) */ /* utree_optn==FALSE && qcalg_optn==FALSE - neighbor-joining tree (for substitution process and rate variation) */ if (utree_optn) { /* menu point 1 (1st utree) -> 2 (NJ) */ utree_optn = FALSE; /* no 1st usertree */ qcalg_optn = FALSE; /* no quartets */ } else { /* menu point 2 (NJ) -> 3 (NJ+Q) */ qcalg_optn = qcalg_optn + 1; /* seq-num < 4: only 1' (NJ) possible */ if ((seqnumcheck==SEQNUM_TOOFEW) && (qcalg_optn==1)) qcalg_optn = qcalg_optn + 1; if (qcalg_optn == 2) { /* menu point 3 (NJ+Q) -> 1 (1st utree) */ qcalg_optn = 0; utree_optn = TRUE; } } } else { /* menu point 1' (NJ) -> 2' (NJ+Q) */ qcalg_optn = qcalg_optn + 1; /* menu point 2' (NJ+Q) -> 1' (NJ) */ if (qcalg_optn == 2) qcalg_optn = 0; /* seq-num < 4: only 1' (NJ) possible */ if ((seqnumcheck==SEQNUM_TOOFEW) && (qcalg_optn==1)) qcalg_optn=0; } break; case 'k': if (typ_optn == TREERECON_OPTN) { puzzlemode = (puzzlemode + 1) % NUMPUZZLEMODES; if ((seqnumcheck!=SEQNUM_OK) && (puzzlemode==QUARTPUZ)) puzzlemode = (puzzlemode + 1) % NUMPUZZLEMODES; } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'b': typ_optn = (typ_optn + 1) % NUMTYPES; if ((seqnumcheck==SEQNUM_TOOFEW) && (typ_optn==LIKMAPING_OPTN)) typ_optn = (typ_optn + 1) % NUMTYPES; break; case 'g': if (typ_optn == LIKMAPING_OPTN) { clustA = clustB = clustC = clustD = 0; if (numclust != 1) { numclust = 1; } else { fprintf(STDOUT, "\n\n\nNumber of clusters (2-4): "); fflush(STDOUT); scanf("%d", &numclust); do ; while (getchar() != '\n'); if (numclust < 2 || numclust > 4) { numclust = 1; fprintf(STDOUT, "\n\n\nOnly 2, 3, or 4 "); fprintf(STDOUT, "clusters possible\n"); } else { fprintf(STDOUT, "\nDistribute all sequences over the "); if (numclust == 2) { fprintf(STDOUT, "two clusters a and b (At least two\n"); fprintf(STDOUT, "sequences per cluster are necessary), "); } if (numclust == 3) { fprintf(STDOUT, "three clusters a, b, and c\n"); fprintf(STDOUT, "(At least one sequence in cluster a and b, and at least two\n"); fprintf(STDOUT, "sequences in c are necessary), "); } if (numclust == 4) { fprintf(STDOUT, "four clusters a, b, c, and d\n"); fprintf(STDOUT, "(At least one sequence per cluster is necessary),\n"); } fprintf(STDOUT, "type x to exclude a sequence:\n\n"); for (i = 0; i < Maxspc; i++) { valid = FALSE; do { fputid10(STDOUT, i); fprintf(STDOUT, ": "); fflush(STDOUT); /* read one char */ ch = getchar(); if (ch != '\n') { do ; while (getchar() != '\n'); } ch = (char) tolower((int) ch); if (ch == 'a' || ch == 'b' || ch == 'x') valid = TRUE; if (numclust == 3 || numclust == 4) if (ch == 'c') valid = TRUE; if (numclust == 4) if (ch == 'd') valid = TRUE; } while (!valid); if (ch == 'a') { clusterA[clustA] = i; clustA++; } if (ch == 'b') { clusterB[clustB] = i; clustB++; } if (ch == 'c') { clusterC[clustC] = i; clustC++; } if (ch == 'd') { clusterD[clustD] = i; clustD++; } } /* check clusters */ valid = TRUE; if (numclust == 4) { if (clustA == 0) { valid = FALSE; numclust = 1; fprintf(STDOUT, "\n\n\nNo sequence in cluster a\n"); } if (clustB == 0) { valid = FALSE; numclust = 1; fprintf(STDOUT, "\n\n\nNo sequence in cluster b\n"); } if (clustC == 0) { valid = FALSE; numclust = 1; fprintf(STDOUT, "\n\n\nNo sequence in cluster c\n"); } if (clustD == 0) { valid = FALSE; numclust = 1; fprintf(STDOUT, "\n\n\nNo sequence in cluster d\n"); } } if (numclust == 3) { if (clustA == 0) { valid = FALSE; numclust = 1; fprintf(STDOUT, "\n\n\nNo sequence in cluster a\n"); } if (clustB == 0) { valid = FALSE; numclust = 1; fprintf(STDOUT, "\n\n\nNo sequence in cluster b\n"); } if (clustC < 2) { valid = FALSE; numclust = 1; if (clustC == 0) fprintf(STDOUT, "\n\n\nNo sequence in cluster c\n"); else fprintf(STDOUT, "\n\n\nOnly one sequence in cluster c\n"); } } if (numclust == 2) { if (clustA < 2) { valid = FALSE; numclust = 1; if (clustA == 0) fprintf(STDOUT, "\n\n\nNo sequence in cluster a\n"); else fprintf(STDOUT, "\n\n\nOnly one sequence in cluster a\n"); } if (clustB < 2) { valid = FALSE; numclust = 1; if (clustB == 0) fprintf(STDOUT, "\n\n\nNo sequence in cluster b\n"); else fprintf(STDOUT, "\n\n\nOnly one sequence in cluster b\n"); } } if (valid) { fprintf(STDOUT, "\nNumber of sequences in each cluster:\n\n"); fprintf(STDOUT, "Cluster a: %d\n", clustA); fprintf(STDOUT, "Cluster b: %d\n", clustB); if (numclust > 2) fprintf(STDOUT, "Cluster c: %d\n", clustC); if (numclust == 4) fprintf(STDOUT, "Cluster d: %d\n", clustD); fprintf(STDOUT, "\nExcluded sequences: "); if (numclust == 2) fprintf(STDOUT, "%d\n", Maxspc-clustA-clustB); if (numclust == 3) fprintf(STDOUT, "%d\n", Maxspc-clustA-clustB-clustC); if (numclust == 4) fprintf(STDOUT, "%d\n", Maxspc-clustA-clustB-clustC-clustD); } } } /* number of resulting quartets */ compnumqts(); } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'd': if (auto_datatype == AUTO_GUESS) { auto_datatype = AUTO_OFF; guessdata_optn = data_optn; data_optn = 0; } else { data_optn = data_optn + 1; if (data_optn == 3) { auto_datatype = AUTO_GUESS; data_optn = guessdata_optn; } } /* translate characters into format used by ML engine */ translatedataset(Maxspc, Maxseqc, &Maxsite, Seqchars, &Seqchar, &Seqgapchar, &Seqotherchar); estimatebasefreqs(); break; case 'u': if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) show_optn = 1 - show_optn; else fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); break; case 'j': if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) listqptrees = (listqptrees + 1) % 4; else fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); break; case 'v': if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) approxqp = 1 - approxqp; else fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); break; case 'f': if (Frequ_optn) { tstvf84 = 0.0; Frequ_optn = FALSE; sumfreq = 0.0; if (data_optn == AMINOACID) fprintf(STDOUT, "\n\n\nAmino acid"); else if (data_optn == NUCLEOTIDE && SH_optn) fprintf(STDOUT, "\n\n\nDoublet"); else if (data_optn == NUCLEOTIDE && nuc_optn) fprintf(STDOUT, "\n\n\nNucleotide"); else if (data_optn == BINARY) fprintf(STDOUT, "\n\n\nBinary state"); fprintf(STDOUT, " frequencies (in %%):\n\n"); for (i = 0; i < gettpmradix() - 1; i++) { fprintf(STDOUT, "pi(%s) = ", int2code(i)); fflush(STDOUT); scanf("%lf", &(Freqtpm[i])); do ; while (getchar() != '\n'); Freqtpm[i] = Freqtpm[i]/100.0; if (Freqtpm[i] < 0.0) { fprintf(STDOUT, "\n\n\nNegative frequency not possible\n"); estimatebasefreqs(); break; } sumfreq = sumfreq + Freqtpm[i]; if (sumfreq > 1.0) { fprintf(STDOUT, "\n\n\nThe sum of "); fprintf(STDOUT, "all frequencies exceeds"); fprintf(STDOUT, " 100%%\n"); estimatebasefreqs(); break; } if (i == gettpmradix() - 2) Freqtpm[i+1] = 1.0 - sumfreq; } } else estimatebasefreqs(); break; case 's': if (data_optn == NUCLEOTIDE && SH_optn) { sym_optn = 1 - sym_optn; } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'n': if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) { fprintf(STDOUT, "\n\n\nNumber of puzzling steps: "); fflush(STDOUT); scanf("%lu", &Numtrial); do ; while (getchar() != '\n'); if (Numtrial < 1) { fprintf(STDOUT, "\n\n\nThe number of puzzling"); fprintf(STDOUT, " steps can't be smaller than one\n"); Numtrial = 1000; } } else if (typ_optn == LIKMAPING_OPTN) { fprintf(STDOUT, "\n\nEnter zero to use all possible"); fprintf(STDOUT, " quartets in the analysis!\n"); fprintf(STDOUT, "\nNumber of random quartets: "); fflush(STDOUT); scanf("%lu", &lmqts); do ; while (getchar() != '\n'); /* compute number of quartets used */ compnumqts(); } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'o': if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) { fprintf(STDOUT, "\n\n\nSequence to be displayed as outgroup (1-%d, or 0 for last): ", Maxspc); fflush(STDOUT); scanf("%d", &outgroup); do ; while (getchar() != '\n'); if (outgroup < 0 || outgroup > Maxspc) { fprintf(STDOUT, "\n\n\nSequences are numbered "); fprintf(STDOUT, "from 1 to %d\n", Maxspc); outgroup = 1; } if (outgroup == 0) outgroup = Maxspc; outgroup = outgroup - 1; } else { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } break; case 'm': if (data_optn == NUCLEOTIDE) { /* nucleotide data */ #ifndef USE_GTR if(HKY_optn && nuc_optn) { /* HKY -> TN */ tstvf84 = 0.0; TSparam = 2.0; YRparam = 0.9; HKY_optn = FALSE; TN_optn = TRUE; GTR_optn = FALSE; optim_optn = TRUE; nuc_optn = TRUE; SH_optn = FALSE; break; } #else if(HKY_optn && nuc_optn) { /* HKY -> TN */ tstvf84 = 0.0; TSparam = 2.0; YRparam = 0.9; HKY_optn = FALSE; TN_optn = TRUE; GTR_optn = FALSE; optim_optn = TRUE; nuc_optn = TRUE; SH_optn = FALSE; break; } if(TN_optn && nuc_optn) { /* TN -> GTR */ tstvf84 = 0.0; TSparam = 2.0; YRparam = 0.9; GTR_ACrate = 1.0; GTR_AGrate = 1.0; GTR_ATrate = 1.0; GTR_CGrate = 1.0; GTR_CTrate = 1.0; GTR_GTrate = 1.0; HKY_optn = FALSE; TN_optn = FALSE; GTR_optn = TRUE; optim_optn = FALSE; nuc_optn = TRUE; SH_optn = FALSE; break; } #if 0 if(GTR_optn && nuc_optn) { /* GTR -> TN */ tstvf84 = 0.0; TSparam = 2.0; YRparam = 0.9; HKY_optn = FALSE; TN_optn = TRUE; GTR_optn = FALSE; optim_optn = TRUE; nuc_optn = TRUE; SH_optn = FALSE; break; } #endif #endif if(GTR_optn && nuc_optn) { /* if(TN_optn && nuc_optn) { */ if (Maxseqc % 2 == 0 || Maxseqc % 3 == 0) { /* number of chars needs to be a multiple 2 or 3 */ /* TN -> SH */ if (Maxseqc % 2 != 0 && Maxseqc % 3 == 0) SHcodon = TRUE; else SHcodon = FALSE; tstvf84 = 0.0; TSparam = 2.0; YRparam = 1.0; HKY_optn = TRUE; TN_optn = FALSE; GTR_optn = FALSE; optim_optn = TRUE; nuc_optn = FALSE; SH_optn = TRUE; /* translate characters into format */ /* used by ML engine */ translatedataset(Maxspc, Maxseqc, &Maxsite, Seqchars, &Seqchar, &Seqgapchar, &Seqotherchar); estimatebasefreqs(); } else { fprintf(STDOUT, "\n\n\nSH model not "); fprintf(STDOUT, "available for the data set!\n"); /* TN -> HKY */ tstvf84 = 0.0; TSparam = 2.0; YRparam = 1.0; HKY_optn = TRUE; TN_optn = FALSE; GTR_optn = FALSE; optim_optn = TRUE; nuc_optn = TRUE; SH_optn = FALSE; } break; } if(SH_optn) { /* SH -> HKY */ tstvf84 = 0.0; TSparam = 2.0; YRparam = 1.0; HKY_optn = TRUE; TN_optn = FALSE; GTR_optn = FALSE; optim_optn = TRUE; nuc_optn = TRUE; SH_optn = FALSE; /* translate characters into format */ /* used by ML engine */ translatedataset(Maxspc, Maxseqc, &Maxsite, Seqchars, &Seqchar, &Seqgapchar, &Seqotherchar); estimatebasefreqs(); break; } break; } if (data_optn == AMINOACID) { /* amino acid data */ if (auto_aamodel) { /* AUTO -> Dayhoff */ Dayhf_optn = TRUE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } if (Dayhf_optn) { /* Dayhoff -> JTT */ Dayhf_optn = FALSE; Jtt_optn = TRUE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } if (Jtt_optn) { /* JTT -> mtREV */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = TRUE; cprev_optn = FALSE; blosum62_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } #ifdef CPREV if (mtrev_optn) { /* mtREV -> cpREV */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = TRUE; blosum62_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } #else /* ! CPREV */ if (mtrev_optn) { /* mtREV -> BLOSUM 62 */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = TRUE; vtmv_optn = FALSE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } #endif /* ! CPREV */ #ifdef CPREV if (cprev_optn) { /* cpREV -> BLOSUM 62 */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = TRUE; vtmv_optn = FALSE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } #endif if (blosum62_optn) { /* BLOSUM 62 -> VT model */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = FALSE; vtmv_optn = TRUE; wag_optn = FALSE; auto_aamodel = AUTO_OFF; break; } if (vtmv_optn) { /* VT model -> WAG model */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = FALSE; vtmv_optn = FALSE; wag_optn = TRUE; auto_aamodel = AUTO_OFF; break; } if (wag_optn) { /* WAG model -> AUTO */ Dayhf_optn = guessDayhf_optn; Jtt_optn = guessJtt_optn; mtrev_optn = guessmtrev_optn; cprev_optn = guesscprev_optn; blosum62_optn = guessblosum62_optn; vtmv_optn = guessvtmv_optn; wag_optn = guesswag_optn; auto_aamodel = guessauto_aamodel; break; } break; } if (data_optn == BINARY) { fprintf(STDOUT, "\n\n\nNo other model available!\n"); } break; case 't': if (data_optn != NUCLEOTIDE) { fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { tstvf84 = 0.0; fprintf(STDOUT, "\n\n\nEnter an invalid value for "); fprintf(STDOUT, "estimation from data set!\n"); fprintf(STDOUT, "\nTransition/transversion parameter (%.2f-%.2f): ", MINTS, MAXTS); fflush(STDOUT); scanf("%lf", &TSparam); do ; while (getchar() != '\n'); if (TSparam < MINTS || TSparam > MAXTS) { optim_optn = TRUE; TSparam = 2.0; } else { optim_optn = FALSE; } } break; case 'q': fprintf(STDOUT, "\n\n\n"); # if PARALLEL PP_SendDone(); MPI_Finalize(); # endif /* PARALLEL */ exit(0); break; case 'r': if (!(TN_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { tstvf84 = 0.0; fprintf(STDOUT, "\n\n\nEnter an invalid value "); fprintf(STDOUT, "for estimation from data set!\n"); fprintf(STDOUT, "\nY/R transition parameter (%.2f-%.2f): ", MINYR, MAXYR); fflush(STDOUT); scanf("%lf", &YRparam); do ; while (getchar() != '\n'); if (YRparam < MINYR || YRparam > MAXYR) { optim_optn = TRUE; YRparam = 0.9; } else if (YRparam == 1.0) { TN_optn = FALSE; HKY_optn = TRUE; if (optim_optn) TSparam = 2.0; } else { optim_optn = FALSE; } } break; case 'p': if (!(TN_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\n\n\nThe F84 model (Felsenstein 1984) is a restricted"); fprintf(STDOUT, " TN model, and the one\nF84 parameter uniquely"); fprintf(STDOUT, " determines the two corresponding TN parameters!\n\n"); fprintf(STDOUT, "F84 expected transition/transversion ratio: "); fflush(STDOUT); scanf("%lf", &tstvf84); do ; while (getchar() != '\n'); if (tstvf84 <= 0.0) tstvf84 = 0.0; else makeF84model(); } break; case '1': if (!(GTR_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\nA-C substitution rate: "); fflush(STDOUT); scanf("%lf", >R_ACrate); do ; while (getchar() != '\n'); } break; case '2': if (!(GTR_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\nA-G substitution rate: "); fflush(STDOUT); scanf("%lf", >R_AGrate); do ; while (getchar() != '\n'); } break; case '3': if (!(GTR_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\nA-T substitution rate: "); fflush(STDOUT); scanf("%lf", >R_ATrate); do ; while (getchar() != '\n'); } break; case '4': if (!(GTR_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\nC-G substitution rate: "); fflush(STDOUT); scanf("%lf", >R_CGrate); do ; while (getchar() != '\n'); } break; case '5': if (!(GTR_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\nC-T substitution rate: "); fflush(STDOUT); scanf("%lf", >R_CTrate); do ; while (getchar() != '\n'); } break; case '6': if (!(GTR_optn && nuc_optn)){ fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); } else { fprintf(STDOUT, "\nG-T substitution rate: "); fflush(STDOUT); scanf("%lf", >R_GTrate); do ; while (getchar() != '\n'); } break; case 'y': fprintf(STDOUT, "\n"); break; default: fprintf(STDOUT, "\n\n\nThis is not a possible option!\n"); break; } } while (ch != 'y'); { int gaperror = 0; int notu; for (notu = 0; notu < Maxspc; notu++) { #ifndef USE_WINDOWS if ((Seqgapchar[notu] + Seqotherchar[notu]) == Maxsite) { #else if ((Seqgapchar[notu] + Seqotherchar[notu]) == alimaxsite) { #endif if (gaperror == 0) { fprintf(STDOUT, "\n\n\n"); fprintf(STDOUT, "\n\n\nUnable to proceed (only ambiguous characters ('-', '?', 'X', ...) \nin sequence(s) '"); } else { fprintf(STDOUT, "', '"); } fputid(STDOUT, notu); gaperror++; } if (gaperror > 0) { fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } /* for */ } } /* setoptions */ /* open file for reading */ int openfiletoread(FILE **fp, char name[], char descr[]) { int count = 0; int reset = 0; cvector str; if ((*fp = fopen(name, "r")) == NULL) { fprintf(STDOUT, "\n\n\nPlease enter a file name for the %s: ", descr); fflush(STDOUT); str = mygets(); while ((*fp = fopen(str, "r")) == NULL) { count++; if (count > 10) { fprintf(STDOUT, "\n\n\nToo many trials - quitting ...\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } fprintf(STDOUT, "File '%s' not found, ", str); fprintf(STDOUT, "please enter alternative name: "); free_cvector(str); fflush(STDOUT); str = mygets(); reset = 1; } fprintf(STDOUT, "\n"); strcpy(name, str); free_cvector(str); } return(reset); } /* openfiletoread */ /* open file for writing */ int openfiletowrite(FILE **fp, char name[], char descr[]) { int count = 0; int reset = 0; cvector str; if ((*fp = fopen(name, "w")) == NULL) { fprintf(STDOUT, "\n\n\nPlease enter a file name for the %s: ", descr); fflush(STDOUT); str = mygets(); while ((*fp = fopen(str, "w")) == NULL) { count++; if (count > 10) { fprintf(STDOUT, "\n\n\nToo many trials - quitting ...\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } fprintf(STDOUT, "File '%s' not created, ", str); fprintf(STDOUT, "please enter other name: "); free_cvector(str); fflush(STDOUT); str = mygets(); reset = 1; } fprintf(STDOUT, "\n"); strcpy(name, str); free_cvector(str); } return(reset); } /* openfiletowrite */ /* open file for appending */ int openfiletoappend(FILE **fp, char name[], char descr[]) { int count = 0; int reset = 0; cvector str; if ((*fp = fopen(name, "a")) == NULL) { fprintf(STDOUT, "\n\n\nPlease enter a file name for the %s: ", descr); fflush(STDOUT); str = mygets(); while ((*fp = fopen(str, "a")) == NULL) { count++; if (count > 10) { fprintf(STDOUT, "\n\n\nToo many trials - quitting ...\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } fprintf(STDOUT, "File '%s' not created, ", str); fprintf(STDOUT, "please enter other name: "); free_cvector(str); fflush(STDOUT); str = mygets(); reset = 1; } fprintf(STDOUT, "\n"); strcpy(name, str); free_cvector(str); } return(reset); } /* openfiletoappend */ /* close file */ void closefile(FILE *fp) { fclose(fp); } /* closefile */ /* symmetrize doublet frequencies */ void symdoublets() { int i, imean; double mean; if (data_optn == NUCLEOTIDE && SH_optn && sym_optn) { /* ML frequencies */ mean = (Freqtpm[1] + Freqtpm[4])/2.0; /* AC CA */ Freqtpm[1] = mean; Freqtpm[4] = mean; mean = (Freqtpm[2] + Freqtpm[8])/2.0; /* AG GA */ Freqtpm[2] = mean; Freqtpm[8] = mean; mean = (Freqtpm[3] + Freqtpm[12])/2.0; /* AT TA */ Freqtpm[3] = mean; Freqtpm[12] = mean; mean = (Freqtpm[6] + Freqtpm[9])/2.0; /* CG GC */ Freqtpm[6] = mean; Freqtpm[9] = mean; mean = (Freqtpm[7] + Freqtpm[13])/2.0; /* CT TC */ Freqtpm[7] = mean; Freqtpm[13] = mean; mean = (Freqtpm[11] + Freqtpm[14])/2.0; /* GT TG */ Freqtpm[11] = mean; Freqtpm[14] = mean; /* base composition of each taxon */ for (i = 0; i < Maxspc; i++) { imean = (Basecomp[i][1] + Basecomp[i][4])/2; /* AC CA */ Basecomp[i][1] = imean; Basecomp[i][4] = imean; imean = (Basecomp[i][2] + Basecomp[i][8])/2; /* AG GA */ Basecomp[i][2] = imean; Basecomp[i][8] = imean; imean = (Basecomp[i][3] + Basecomp[i][12])/2; /* AT TA */ Basecomp[i][3] = imean; Basecomp[i][12] = imean; imean = (Basecomp[i][6] + Basecomp[i][9])/2; /* CG GC */ Basecomp[i][6] = imean; Basecomp[i][9] = imean; imean = (Basecomp[i][7] + Basecomp[i][13])/2; /* CT TC */ Basecomp[i][7] = imean; Basecomp[i][13] = imean; imean = (Basecomp[i][11] + Basecomp[i][14])/2; /* GT TG */ Basecomp[i][11] = imean; Basecomp[i][14] = imean; } } } /* symdoublets */ /* show Ts/Tv ratio and Ts Y/R ratio */ void computeexpectations() { double AlphaYBeta, AlphaRBeta, piR, piY, num, denom, pyr, pur; if (nuc_optn == TRUE) { /* 4x4 nucs */ piR = Freqtpm[0] + Freqtpm[2]; piY = Freqtpm[1] + Freqtpm[3]; AlphaRBeta = 4.0*TSparam / (1 + YRparam); AlphaYBeta = AlphaRBeta * YRparam; tstvratio = (AlphaRBeta*Freqtpm[0]*Freqtpm[2] + AlphaYBeta*Freqtpm[1]*Freqtpm[3])/(piR * piY); yrtsratio = (AlphaYBeta*Freqtpm[1]*Freqtpm[3]) / (AlphaRBeta*Freqtpm[0]*Freqtpm[2]); } else { /* 16x16 nucs */ pyr = Freqtpm[1]*Freqtpm[3] + Freqtpm[5]*Freqtpm[7] + Freqtpm[9]*Freqtpm[11] + Freqtpm[4]*Freqtpm[12] + Freqtpm[5]*Freqtpm[13] + Freqtpm[6]*Freqtpm[14] + Freqtpm[7]*Freqtpm[15] + Freqtpm[13]*Freqtpm[15]; pur = Freqtpm[0]*Freqtpm[2] + Freqtpm[4]*Freqtpm[6] + Freqtpm[0]*Freqtpm[8] + Freqtpm[1]*Freqtpm[9] + Freqtpm[2]*Freqtpm[10] + Freqtpm[8]*Freqtpm[10] + Freqtpm[3]*Freqtpm[11] + Freqtpm[12]*Freqtpm[14]; num = pyr + pur; denom = Freqtpm[0]*Freqtpm[1] + Freqtpm[1]*Freqtpm[2] + Freqtpm[0]*Freqtpm[3] + Freqtpm[2]*Freqtpm[3] + Freqtpm[0]*Freqtpm[4] + Freqtpm[1]*Freqtpm[5] + Freqtpm[4]*Freqtpm[5] + Freqtpm[2]*Freqtpm[6] + Freqtpm[5]*Freqtpm[6] + Freqtpm[3]*Freqtpm[7] + Freqtpm[4]*Freqtpm[7] + Freqtpm[6]*Freqtpm[7] + Freqtpm[4]*Freqtpm[8] + Freqtpm[5]*Freqtpm[9] + Freqtpm[8]*Freqtpm[9] + Freqtpm[6]*Freqtpm[10] + Freqtpm[9]*Freqtpm[10] + Freqtpm[7]*Freqtpm[11] + Freqtpm[8]*Freqtpm[11] + Freqtpm[10]*Freqtpm[11] + Freqtpm[0]*Freqtpm[12] + Freqtpm[8]*Freqtpm[12] + Freqtpm[1]*Freqtpm[13] + Freqtpm[9]*Freqtpm[13] + Freqtpm[12]*Freqtpm[13] + Freqtpm[2]*Freqtpm[14] + Freqtpm[10]*Freqtpm[14] + Freqtpm[13]*Freqtpm[14] + Freqtpm[3]*Freqtpm[15] + Freqtpm[11]*Freqtpm[15] + Freqtpm[12]*Freqtpm[15] + Freqtpm[14]*Freqtpm[15]; tstvratio = 2.0*TSparam * num/denom; yrtsratio = pyr/pur; } } /* computeexpectations */ /* write ML distance matrix to file */ void putdistance(FILE *fp) { int i, j; fprintf(fp, " %d\n", Maxspc); for (i = 0; i < Maxspc; i++) { fputid10(fp, i); for (j = 0; j < Maxspc; j++) { fprintf(fp, " %.5f", Distanmat[i][j]/100.0); /* seven in one row */ if ((j + 1) % 7 == 0 && j+1 != Maxspc) fprintf(fp, "\n "); } fprintf(fp, "\n"); } } /* putdistance */ /* find identical sequences */ void findidenticals(FILE *fp) { int i, j, noids; cvector useqs; useqs = new_cvector(Maxspc); for (i = 0; i < Maxspc; i++) useqs[i] = 0; noids = TRUE; for (i = 0; i < Maxspc && noids; i++) for (j = i + 1; j < Maxspc && noids; j++) if (Distanmat[i][j] == 0.0) noids = FALSE; if (noids) fprintf(fp, " All sequences are unique.\n"); else { for (i = 0; i < Maxspc; i++) { noids = TRUE; for (j = i + 1; j < Maxspc && noids; j++) if (Distanmat[i][j] == 0.0) noids = FALSE; if (!noids && useqs[i] == 0) { fputid(fp, i); useqs[i] = 1; for (j = i + 1; j < Maxspc; j++) if (Distanmat[i][j] == 0.0) { fprintf(fp, ", "); fputid(fp, j); useqs[j] = 1; } fprintf(fp, ".\n"); } } } free_cvector(useqs); } /* findidenticals */ /* compute average distance */ double averagedist(int maxspc, dmatrix distanmat, double *meandist, double *mindist, double *maxdist, double *stddevdist, double *vardist) { int i, j; double sum; double avg; double min; double max; double var; double stddev; double temp; double numofdists; numofdists = ((double) (maxspc * (maxspc - 1)) / 2.0); sum = 0.0; for (i = 0; i < maxspc; i++) for (j = i + 1; j < maxspc; j++) sum = sum + distanmat[i][j]; /* avg = sum / (double) maxspc / ((double) maxspc - 1.0) * 2.0; */ /* avg = sum / ((double) (maxspc * (maxspc - 1)) / 2.0); */ avg = sum / numofdists; /* fprintf(stderr, "\nXXXX: old %f, new %f\n", 1 / (double) maxspc / ((double) maxspc - 1.0) * 2.0, 1 / ((double) (maxspc * (maxspc - 1)) / 2.0)); */ sum = 0.0; min = distanmat[0][1]; max = distanmat[0][1]; for (i = 0; i < maxspc; i++) for (j = i + 1; j < maxspc; j++) { temp = avg/100 - distanmat[i][j]/100; sum += temp * temp; if (min > distanmat[i][j]) min = distanmat[i][j]; if (max < distanmat[i][j]) max = distanmat[i][j]; } var = sum / (numofdists - 1); stddev = sqrt(var); #if 0 fprintf(stderr, "\nXXXX: mean=%f, min=%f max=%f variance=%f, std-deviation=%f\n", avg/100, min/100, max/100, var, stddev); #endif *meandist = avg/100; *mindist = min/100; *maxdist = max/100; *vardist = var; *stddevdist = stddev; return avg; } /* averagedist */ /* first lines of EPSF likelihood mapping file */ void initps(FILE *ofp) { fprintf(ofp, "%%!PS-Adobe-3.0 EPSF-3.0\n"); fprintf(ofp, "%%%%BoundingBox: 60 210 550 650\n"); fprintf(ofp, "%%%%Pages: 1\n"); # ifndef ALPHA fprintf(ofp, "%%%%Creator: %s (version %s)\n", PACKAGE, VERSION); # else fprintf(ofp, "%%%%Creator: %s (version %s%s)\n", PACKAGE, VERSION, ALPHA); # endif fprintf(ofp, "%%%%Title: Likelihood Mapping Analysis\n"); fprintf(ofp, "%%%%CreationDate: %s", asctime(localtime(&Starttime)) ); fprintf(ofp, "%%%%DocumentFonts: Helvetica\n"); fprintf(ofp, "%%%%DocumentNeededFonts: Helvetica\n"); fprintf(ofp, "%%%%EndComments\n"); fprintf(ofp, "%% use inch as unit\n"); fprintf(ofp, "/inch {72 mul} def\n"); fprintf(ofp, "%% triangle side length (3 inch)\n"); fprintf(ofp, "/tl {3 inch mul} def\n"); fprintf(ofp, "%% plot one dot (x-y coordinates on stack)\n"); fprintf(ofp, "/dot {\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, "0.002 tl 0 360 arc %% radius is 0.002 of the triangle length\n"); fprintf(ofp, "closepath\n"); fprintf(ofp, "fill\n"); fprintf(ofp, "} def\n"); /* PS definition of a flush right print */ fprintf(ofp, "\n%% flush right show\n"); fprintf(ofp, "/centershow {\n"); fprintf(ofp, " dup stringwidth pop %% get length of string\n"); fprintf(ofp, " neg 0 rmoveto %% move width to left\n"); fprintf(ofp, " show\n"); fprintf(ofp, "} def\n"); fprintf(ofp, "\n%% centered show\n"); /* PS definition of a centered print */ fprintf(ofp, "/centershow {\n"); fprintf(ofp, " dup stringwidth pop %% get length of string\n"); fprintf(ofp, " -2 div %% devide length by -2\n"); fprintf(ofp, " 0 rmoveto %% move half width to left\n"); fprintf(ofp, " show\n"); fprintf(ofp, "} def\n"); fprintf(ofp, "%% preamble\n"); fprintf(ofp, "/Helvetica findfont\n"); fprintf(ofp, "12 scalefont\n"); fprintf(ofp, "setfont\n"); fprintf(ofp, "%% 0/0 for triangle of triangles\n"); fprintf(ofp, "0.9 inch 3 inch translate\n"); fprintf(ofp, "%% first triangle (the one with dots)\n"); fprintf(ofp, "0.6 tl 1.2 tl 0.8660254038 mul translate\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.0 tl 0.0 tl moveto\n"); fprintf(ofp, " 1.0 tl 0.0 tl lineto\n"); fprintf(ofp, " 0.5 tl 0.8660254038 tl lineto\n"); fprintf(ofp, "closepath\n"); fprintf(ofp, "stroke\n"); if (numclust == 4) { /* four cluster analysis */ fprintf(ofp, "%% label corners\n"); fprintf(ofp, "0.5 tl 0.9 tl moveto\n"); /* old: 0.375 0.9 */ fprintf(ofp, "((a,b)-(c,d)) centershow %% CHANGE HERE IF NECESSARY\n"); fprintf(ofp, "-0.045 tl -0.08 tl moveto\n"); /* old: -0.16 -0.08 */ fprintf(ofp, "((a,d)-(b,c)) centershow %% CHANGE HERE IF NECESSARY\n"); fprintf(ofp, "1.045 tl -0.08 tl moveto\n"); /* old: -0.92 -0.08 */ fprintf(ofp, "((a,c)-(b,d)) centershow %% CHANGE HERE IF NECESSARY\n"); } if (numclust == 3) { /* three cluster analysis */ fprintf(ofp, "%% label corners\n"); fprintf(ofp, "0.5 tl 0.9 tl moveto\n"); /* old: 0.375 0.9 */ fprintf(ofp, "((a,b)-(c,c)) centershow %% CHANGE HERE IF NECESSARY\n"); fprintf(ofp, "-0.045 tl -0.08 tl moveto\n"); /* old: -0.16 -0.08 */ fprintf(ofp, "((a,c)-(b,c)) centershow %% CHANGE HERE IF NECESSARY\n"); fprintf(ofp, "1.045 tl -0.08 tl moveto\n"); /* old: -0.92 -0.08 */ fprintf(ofp, "((a,c)-(b,c)) centershow %% CHANGE HERE IF NECESSARY\n"); } if (numclust == 2) { /* two cluster analysis */ fprintf(ofp, "%% label corners\n"); fprintf(ofp, "0.5 tl 0.9 tl moveto\n"); /* old: 0.375 0.9 */ fprintf(ofp, "((a,a)-(b,b)) centershow %% CHANGE HERE IF NECESSARY\n"); fprintf(ofp, "-0.045 tl -0.08 tl moveto\n"); /* old: -0.16 -0.08 */ fprintf(ofp, "((a,b)-(a,b)) centershow %% CHANGE HERE IF NECESSARY\n"); fprintf(ofp, "1.045 tl -0.08 tl moveto\n"); /* old: -0.92 -0.08 */ fprintf(ofp, "((a,b)-(a,b)) centershow %% CHANGE HERE IF NECESSARY\n"); } } /* initps */ /* plot one point of likelihood mapping analysis */ void plotlmpoint(FILE *ofp, double w1, double w2) { fprintf(ofp,"%.10f tl %.10f tl dot\n", 0.5*w1 + w2, w1*0.8660254038); } /* plotlmpoint */ /* last lines of EPSF likelihood mapping file */ void finishps(FILE *ofp) { fprintf(ofp, "stroke\n"); fprintf(ofp, "%% second triangle (the one with 3 basins)\n"); fprintf(ofp, "/secondtriangle {\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.0 tl 0.0 tl moveto\n"); fprintf(ofp, " 1.0 tl 0.0 tl lineto\n"); fprintf(ofp, " 0.5 tl 0.8660254038 tl lineto\n"); fprintf(ofp, "closepath\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.50 tl 0.2886751346 tl moveto\n"); fprintf(ofp, " 0.50 tl 0.0000000000 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.50 tl 0.2886751346 tl moveto\n"); fprintf(ofp, " 0.25 tl 0.4330127019 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.50 tl 0.2886751346 tl moveto\n"); fprintf(ofp, " 0.75 tl 0.4330127019 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "0.44 tl 0.5 tl moveto %% up\n"); fprintf(ofp, "(%.1f%%) show\n", (double) ar1*100.0/Numquartets); fprintf(ofp, "0.25 tl 0.15 tl moveto %% down left\n"); fprintf(ofp, "(%.1f%%) show\n", (double) ar3*100.0/Numquartets); fprintf(ofp, "0.63 tl 0.15 tl moveto %% down right\n"); fprintf(ofp, "(%.1f%%) show\n", (double) ar2*100.0/Numquartets); fprintf(ofp, "} def\n"); fprintf(ofp, "%% third triangle (the one with 7 basins)\n"); fprintf(ofp, "/thirdtriangle {\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.0 tl 0.0 tl moveto\n"); fprintf(ofp, " 1.0 tl 0.0 tl lineto\n"); fprintf(ofp, " 0.5 tl 0.8660254038 tl lineto\n"); fprintf(ofp, "closepath\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.25 tl 0.1443375673 tl moveto\n"); fprintf(ofp, " 0.75 tl 0.1443375673 tl lineto\n"); fprintf(ofp, " 0.50 tl 0.5773502692 tl lineto\n"); fprintf(ofp, "closepath\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.125 tl 0.2165063509 tl moveto\n"); fprintf(ofp, " 0.250 tl 0.1443375673 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.375 tl 0.6495190528 tl moveto\n"); fprintf(ofp, " 0.500 tl 0.5773502692 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.625 tl 0.6495190528 tl moveto\n"); fprintf(ofp, " 0.500 tl 0.5773502692 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.875 tl 0.2165063509 tl moveto\n"); fprintf(ofp, " 0.750 tl 0.1443375673 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.750 tl 0.00 tl moveto\n"); fprintf(ofp, " 0.750 tl 0.1443375673 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "newpath\n"); fprintf(ofp, " 0.250 tl 0.00 tl moveto\n"); fprintf(ofp, " 0.250 tl 0.1443375673 tl lineto\n"); fprintf(ofp, "stroke\n"); fprintf(ofp, "0.42 tl 0.66 tl moveto %% up\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg1*100.0/Numquartets); fprintf(ofp, "0.07 tl 0.05 tl moveto %% down left\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg3*100.0/Numquartets); fprintf(ofp, "0.77 tl 0.05 tl moveto %% down right\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg2*100.0/Numquartets); fprintf(ofp, "0.43 tl 0.05 tl moveto %% down side\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg5*100.0/Numquartets); fprintf(ofp, "0.43 tl 0.28 tl moveto %% center\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg7*100.0/Numquartets); fprintf(ofp, "gsave\n"); fprintf(ofp, "-60 rotate\n"); fprintf(ofp, "-0.07 tl 0.77 tl moveto %% right side\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg4*100.0/Numquartets); fprintf(ofp, "grestore\n"); fprintf(ofp, "gsave\n"); fprintf(ofp, "60 rotate\n"); fprintf(ofp, "0.4 tl -0.09 tl moveto %% left side\n"); fprintf(ofp, "(%.1f%%) show\n", (double) reg6*100.0/Numquartets); fprintf(ofp, "grestore\n"); fprintf(ofp, "} def\n"); fprintf(ofp, "%% print the other two triangles\n"); fprintf(ofp, "-0.6 tl -1.2 tl 0.8660254038 mul translate\n"); fprintf(ofp, "secondtriangle\n"); fprintf(ofp, "1.2 tl 0 translate\n"); fprintf(ofp, "thirdtriangle\n"); fprintf(ofp, "showpage\n"); fprintf(ofp, "%%%%EOF\n"); } /* finishps */ /* computes LM point from the three log-likelihood values, plots the point, and does some statistics */ void makelmpoint(FILE *fp, double b1, double b2, double b3) { double w1, w2, w3, temp; unsigned char qpbranching; double temp1, temp2, temp3, onethird; double templog; unsigned char discreteweight[3], treebits[3]; onethird = 1.0/3.0; treebits[0] = (unsigned char) 1; treebits[1] = (unsigned char) 2; treebits[2] = (unsigned char) 4; /* sort in descending order */ qweight[0] = b1; qweight[1] = b2; qweight[2] = b3; sort3doubles(qweight, qworder); /* compute Bayesian weights */ templog = qweight[qworder[1]]-qweight[qworder[0]]; if(templog < -TP_MAX_EXP_DIFF) /* possible, since 1.0+exp(>36) == 1.0 */ qweight[qworder[1]] = 0.0; else qweight[qworder[1]] = exp(templog); templog = qweight[qworder[2]]-qweight[qworder[0]]; if(templog < -TP_MAX_EXP_DIFF) /* possible, since 1.0+exp(>36) == 1.0 */ qweight[qworder[2]] = 0.0; else qweight[qworder[2]] = exp(templog); qweight[qworder[0]] = 1.0; temp = qweight[0] + qweight[1] + qweight[2]; qweight[0] = qweight[0]/temp; qweight[1] = qweight[1]/temp; qweight[2] = qweight[2]/temp; /* plot one point in likelihood mapping triangle */ w1 = qweight[0]; w2 = qweight[1]; w3 = qweight[2]; plotlmpoint(fp, w1, w2); /* check areas 1,2,3 */ if (treebits[qworder[0]] == 1) ar1++; else if (treebits[qworder[0]] == 2) ar2++; else ar3++; /* check out regions 1,2,3,4,5,6,7 */ /* 100 distribution */ temp1 = 1.0 - qweight[qworder[0]]; sqdiff[0] = temp1*temp1 + qweight[qworder[1]]*qweight[qworder[1]] + qweight[qworder[2]]*qweight[qworder[2]]; discreteweight[0] = treebits[qworder[0]]; /* 110 distribution */ temp1 = 0.5 - qweight[qworder[0]]; temp2 = 0.5 - qweight[qworder[1]]; sqdiff[1] = temp1*temp1 + temp2*temp2 + qweight[qworder[2]]*qweight[qworder[2]]; discreteweight[1] = treebits[qworder[0]] + treebits[qworder[1]]; /* 111 distribution */ temp1 = onethird - qweight[qworder[0]]; temp2 = onethird - qweight[qworder[1]]; temp3 = onethird - qweight[qworder[2]]; sqdiff[2] = temp1 * temp1 + temp2 * temp2 + temp3 * temp3; discreteweight[2] = (unsigned char) 7; /* sort in descending order */ sort3doubles(sqdiff, sqorder); qpbranching = (unsigned char) discreteweight[sqorder[2]]; if (qpbranching == 1) { reg1++; if (w2 < w3) reg1l++; else reg1r++; } if (qpbranching == 2) { reg2++; if (w1 < w3) reg2d++; else reg2u++; } if (qpbranching == 4) { reg3++; if (w1 < w2) reg3d++; else reg3u++; } if (qpbranching == 3) { reg4++; if (w1 < w2) reg4d++; else reg4u++; } if (qpbranching == 6) { reg5++; if (w2 < w3) reg5l++; else reg5r++; } if (qpbranching == 5) { reg6++; if (w1 < w3) reg6d++; else reg6u++; } if (qpbranching == 7) reg7++; } /* makelmpoint */ #if 0 /* TODO: move to treetest.c */ #define MINKHDIFF 0.01 /* TODO: move to treetest.c */ /*****************************************************************************/ /* ELW/SR Test (Expected Likelihood Weights, Strimmer & Rambaut, 2002) */ /*****************************************************************************/ void elw_test(ivector Alias, dmatrix allsites, int numutrees, int numsites, double siglevel, int numboots, ivector *elw_test_passed, dvector *elw_Support) { /* * Determine posterior probabilties and support values * for each hypothesis and store results in public arrays * posterior, support etc which will automatically be * created by this procedure. * * allsites log-likelihoods of each pattern * Alias map of patterns to sites in sequence * numboots number of bootstraps */ dvector deltaL; /* delta of likelihoods (double[numH]) */ dvector elw_support; /* (double[numH]) */ dvector posterior; /* (double[numH]) */ ivector likelihoodOrder; /* (int[numH]) */ ivector supportOrder; /* (int[numH]) */ dvector rs; /* (int[numH]) */ double sum1; double sum; int numH; /* number of hypotheses */ int numSites; /* number of sites */ int s, p; int i, j, k; /* int j; */ double maxL; double maxLogL; ivector sr_test_res; /* [numutrees]; */ int elw_numboots = 1000; /* number of hypothesis */ numH = numutrees; /* allocate public arrays */ deltaL = new_dvector(numH); elw_support = new_dvector(numH); posterior = new_dvector(numH); likelihoodOrder = new_ivector(numH); supportOrder = new_ivector(numH); sr_test_res = new_ivector(numutrees); *elw_test_passed = sr_test_res; *elw_Support = elw_support; /* number of sites */ numSites = numsites; /******************************************/ /* Compute log-likelihoods, their order, */ /* their deltas and their posteriors */ /******************************************/ /* initialize delta vector for each tree */ for (j = 0; j < numSites; j++) { if (Alias == NULL) { p = j; } else { p = Alias[j]; } for (k = 0; k < numH; k++) { deltaL[k] -= allsites[k][p]; } } /* sort likelihoods -> sorted index list likelihoodOrder */ /* insertion sort */ { int tmp; int idx; for (k=0; k < numH; k++) likelihoodOrder[k] = k; for (j=0; j < numH-1; j++) { idx=j; for (k=j+1; k < numH; k++) { if (deltaL[likelihoodOrder[k]] < deltaL[likelihoodOrder[idx]]) idx=k; } tmp = likelihoodOrder[j]; likelihoodOrder[j] = likelihoodOrder[idx]; likelihoodOrder[idx] = tmp; } } /* Compute deltas */ maxL= -deltaL[likelihoodOrder[0]]; for (j = 0; j < numH; j++) { deltaL[j] = -(deltaL[j]+maxL); } /* compute posterior probabilities */ sum1 = 0.0; for (j = 0; j < numH; j++) { posterior[j] = exp(deltaL[j]); sum1 += posterior[j]; } for (j = 0; j < numH; j++) { posterior[j] = posterior[j]/sum1; } /* reverse sign of delta L */ for (j = 0; j < numH; j++) { deltaL[j] = -deltaL[j]; } deltaL[likelihoodOrder[0]] = 0.0; /* Bootstrap/Resample data */ /***************************/ /* temporary memory */ rs = new_dvector(numH); /* MersenneTwisterFast mt = new MersenneTwisterFast(); */ for (i = 0; i < elw_numboots; i++) { /* num bootstraps */ for (k = 0; k < numH; k++) { rs[k] = 0; } for (j = 0; j < numSites; j++) { /* bootstrapping sites for ...*/ /* int s = mt.nextInt(numSites); */ s = randominteger(numSites); if (Alias == NULL) { p = s; } else { p = Alias[s]; } for (k = 0; k < numH; k++) { /* ...each utree */ /* rs[k] += pLogL[k][p]; */ rs[k] += allsites[k][p]; } } /* find ml hypothesis */ /* maxLogL = findMax(rs); */ { int best = 0; /* can be removed (HAS) */ int idx; double max = rs[0]; for (idx = 1; idx < numH; idx++) { if (rs[idx] > max) { best = idx; /* can be removed (HAS) */ max = rs[idx]; } } maxLogL = max; } /* compute log-likelihood difference */ for (k = 0; k < numH; k++) { rs[k] = rs[k] - maxLogL; } /* compute posteriors and sum over resampled data set */ sum = 0.0; for (k = 0; k < numH; k++) { rs[k] = exp(rs[k]); sum += rs[k]; } for (k = 0; k < numH; k++) { elw_support[k] += rs[k]/sum; } } /* compute support values */ for (j = 0; j < numH; j++) { elw_support[j] = elw_support[j]/elw_numboots; } /* determine order of elw_support (smallest->largest) */ /* HeapSort.sort(elw_support, supportOrder); */ { int tmp; int idx; for (k=0; k < numH; k++) supportOrder[k] = k; for (j=0; j < numH-1; j++) { idx=j; for (k=j+1; k < numH; k++) { if (elw_support[supportOrder[k]] > elw_support[supportOrder[idx]]) idx=k; } tmp = supportOrder[j]; supportOrder[j] = supportOrder[idx]; supportOrder[idx] = tmp; } } sum = 0.0; for (k=0; k maxLogL) { bestH = i; maxLogL = sh_logL[i]; } } /* compute log-likelihood differences to best hypothesis */ for (i = 0; i < numH; i++) { sh_delta[i] = sh_logL[bestH]-sh_logL[i]; } /* allocate temporary memory for resampling procedure */ bs = new_dmatrix(numH,sh_numboots); /* Resample data */ /* MersenneTwisterFast mt = new MersenneTwisterFast(); */ for (i = 0; i < sh_numboots; i++) { for (j = 0; j < numSites; j++) { /* int s = mt.nextInt(numSites); */ s = randominteger(numSites); if (Alias == NULL) { p = s; } else { p = Alias[s]; } for (k = 0; k < numH; k++) { /* rs[k][i] += pLogL[k][p]; */ bs[k][i] += allsites[k][p]; } } } /* center resampled log-likelihoods */ for (i = 0; i < numH; i++) { /* double m = DiscreteStatistics.mean(rs[i]); */ m = 0.0; for (j = 0; j < sh_numboots; j++) { m += bs[i][j]; } m /= sh_numboots; for (j = 0; j < sh_numboots; j++) { bs[i][j] = bs[i][j] - m; } } /* compute resampled log-likelihood differences */ for (i = 0; i < sh_numboots; i++) { /* double max = findMaxInColumn(rs, i); */ { best = 0; colmax = bs[0][i]; for (j = 1; j < numH; j++) { if (bs[j][i] > colmax) { best = j; colmax = bs[j][i]; } } } for (j = 0; j < numH; j++) { bs[j][i] = colmax - bs[j][i]; } } /* compute p-values for each hypothesis */ for (i = 0; i < numH; i++) { count = 0; for (j = 0; j < sh_numboots; j++) { if (bs[i][j] >= sh_delta[i]) { count++; } } sh_pval[i] = (double) count/(double) sh_numboots; if (sh_pval[i] >= sh_prob) { sh_test_res[i] = 1; } else { sh_test_res[i] = 0; } } /* free memory */ free_dmatrix(bs); free_dvector(sh_logL); } /* sh_test */ /* TODO: move to treetest.c */ /* print tree statistics */ void printtreestats(FILE *ofp) { int i, j; /* counter variables */ int besttree; /* best tree */ /* for the KH Test (Kishino & Hasegawa, 1989) */ double bestlkl; /* best likelihood */ double difflkl; /* best likelihood difference */ double difflklps; /* best likelihood difference per site */ double temp; double sum; /* variables for the SH Test (Shimodaira & Hasegawa, 1999) */ dvector sh_pval; /* corresponding p-value */ double sh_prob = .05; /* significance level */ int sh_numboots = 1000; /* number of bootstrap samples */ ivector sh_test_res; /* result vector [numutrees]; */ /* variables for the ELW/SR Test (Expected Likelihood Weights) */ /* (Strimmer & Rambaut, 2002) */ dvector elw_support; /* = new double[numH; */ ivector elw_test_res; /* result vector [numutrees]; */ int elw_numboots = 1000; /* number of bootstrap samples */ double elw_prob = .05; /* significance level */ /* variables for the one-sided KH Test using SH */ dvector kh1_pval_tmp; /* temp p-value arry for pairwise SH */ ivector kh1_test_res_tmp; /* temp result arry for pairwise SH */ dvector kh1_pval; /* p-values */ ivector kh1_test_res; /* result vector [numutrees]; */ dvector kh1_allsites_tmp[2]; /* temp arry for pairwise SH test */ int kh1_numboots = 1000; /* number of bootstrap samples */ double kh1_prob = .05; /* significance level */ /* find best tree */ besttree = 0; bestlkl = ulkl[0]; for (i = 1; i < numutrees; i++) { if (ulkl[i] > bestlkl) { besttree = i; bestlkl = ulkl[i]; } } /* one sided KH = pairwise SH test between tree and besttree */ fprintf(STDOUT, "Performing single sided KH test.\n"); fflush(STDOUT); kh1_pval = new_dvector(numutrees); kh1_test_res = new_ivector(numutrees); kh1_allsites_tmp[0] = allsites[besttree]; /* set best tree */ for (i = 0; i < numutrees; i++) { if (i == besttree) { /* if best tree -> no test */ kh1_pval[i] = 1.0; kh1_test_res[i] = 1; } else { /* other wise test pairwise SH */ kh1_allsites_tmp[1] = allsites[i]; /* set site log-lh */ sh_test(Alias, kh1_allsites_tmp, 2, Maxsite, kh1_prob, kh1_numboots, &kh1_test_res_tmp, &kh1_pval_tmp); /* pairwise SH */ kh1_pval[i] = kh1_pval_tmp[1]; /* store p-value */ kh1_test_res[i] = kh1_test_res_tmp[1]; /* save result */ } } free_ivector(kh1_test_res_tmp); /* moved out of loop */ free_dvector(kh1_pval_tmp); /* ELW */ fprintf(STDOUT, "Performing ELW test.\n"); fflush(STDOUT); elw_test(Alias, allsites, numutrees, Maxsite, elw_prob, elw_numboots, &elw_test_res, &elw_support); /* SH */ fprintf(STDOUT, "Performing SH test.\n"); fflush(STDOUT); sh_test(Alias, allsites, numutrees, Maxsite, sh_prob, sh_numboots, &sh_test_res, &sh_pval); /*****************************************************************************/ /* two-sided KH Test (Kishino & Hasegawa, 1989) */ /* and output */ /*****************************************************************************/ fprintf(ofp, "\n\nCOMPARISON OF USER TREES (NO CLOCK)\n\n"); # ifdef KHTWOSIDED fprintf(ofp, "Tree log L difference S.E. Sig. worse p-1sKH p-SH c-ELW \n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # else fprintf(ofp, "Tree log L difference S.E. p-1sKH p-SH c-ELW 2sKH\n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # endif for (i = 0; i < numutrees; i++) { difflkl = ulkl[besttree]-ulkl[i]; fprintf(ofp, "%2d %10.4f %8.4f ", i+1, ulkl[i], difflkl); /* fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulkl[i], difflkl); */ if (i == besttree) { # ifdef KHTWOSIDED fprintf(ofp, " <-------------- best "); # else fprintf(ofp, " <---- best "); /* fprintf(ofp, " <---- best "); */ # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else fprintf(ofp, " best"); # endif } else { /* compute variance of Log L differences over sites */ #ifndef USE_WINDOWS difflklps = difflkl/(double)Maxsite; #else difflklps = difflkl/(double)alimaxsite; #endif /* compute std. error of sample mean with curvature method */ sum = 0.0; for (j = 0; j < Numptrn; j++) { temp = allsites[besttree][j] - allsites[i][j] - difflklps; sum += temp*temp*Weight[j]; } #ifndef USE_WINDOWS sum = sqrt( fabs(sum/(Maxsite-1.0)*Maxsite) ); #else sum = sqrt(fabs(sum/(alimaxsite-1.0)*alimaxsite)); #endif # ifdef KHTWOSIDED fprintf(ofp, "%11.2f ", sum); if (difflkl > 1.96*sum) fprintf(ofp, "yes "); else fprintf(ofp, "no "); # else fprintf(ofp, "%11.4f ", sum); /* fprintf(ofp, "%11.2f ", sum); */ # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else if (difflkl > 1.96*sum) fprintf(ofp, " - (diff=%.4f 1.96*sum=%.4e)", difflkl, 1.96*sum); else fprintf(ofp, " + (diff=%.4f 1.96*sum=%.4e)", difflkl, 1.96*sum); #if 0 if (difflkl > 1.96*sum) fprintf(ofp, " -"); else fprintf(ofp, " +"); #endif # endif } fprintf(ofp, "\n"); } fprintf(ofp, "\nThe columns show the results and p-values of the following tests:\n"); fprintf(ofp, "1sKH - one sided KH test based on pairwise SH tests (Shimodaira-Hasegawa\n"); fprintf(ofp, " 2000, Goldman et al., 2001, Kishino-Hasegawa 1989)\n"); fprintf(ofp, "SH - Shimodaira-Hasegawa test (2000)\n"); fprintf(ofp, "ELW - Expected Likelihood Weight (Strimmer-Rambaut 2002)\n"); fprintf(ofp, "2sKH - two sided Kishino-Hasegawa test (1989)\n"); fprintf(ofp, "\n"); fprintf(ofp, "Plus signs denote the confidence sets. Minus signs denote significant\n"); fprintf(ofp, "exclusion. All tests used 5%% significance level. 1sKH, SH, and ELW\n"); fprintf(ofp, "performed 1000 resamplings using the RELL method.\n"); if (compclock) { /* find best tree */ besttree = 0; bestlkl = ulklc[0]; for (i = 1; i < numutrees; i++) if (ulklc[i] > bestlkl) { besttree = i; bestlkl = ulklc[i]; } /* one sided KH */ fprintf(STDOUT, "Performing single sided KH test (clock).\n"); fflush(STDOUT); kh1_pval = new_dvector(numutrees); kh1_test_res = new_ivector(numutrees); kh1_allsites_tmp[0] = allsitesc[besttree]; for (i = 0; i < numutrees; i++) { if (i != besttree) { kh1_allsites_tmp[1] = allsitesc[i]; sh_test(Alias, kh1_allsites_tmp, 2, Maxsite, kh1_prob, kh1_numboots, &kh1_test_res_tmp, &kh1_pval_tmp); kh1_pval[i] = kh1_pval_tmp[1]; kh1_test_res[i] = kh1_test_res_tmp[1]; free_ivector(kh1_test_res_tmp); free_dvector(kh1_pval_tmp); } else { kh1_pval[i] = 1.0; kh1_test_res[i] = 1; } } /* ELW */ fprintf(STDOUT, "Performing ELW test (clock).\n"); fflush(STDOUT); elw_test(Alias, allsitesc, numutrees, Maxsite, elw_prob, elw_numboots, &elw_test_res, &elw_support); /* SH */ fprintf(STDOUT, "Performing SH test (clock).\n"); fflush(STDOUT); sh_test(Alias, allsitesc, numutrees, Maxsite, sh_prob, sh_numboots, &sh_test_res, &sh_pval); fprintf(ofp, "\n\nCOMPARISON OF USER TREES (WITH CLOCK)\n\n"); # ifdef KHTWOSIDED fprintf(ofp, "Tree log L difference S.E. Sig. worse p-1sKH p-SH c-ELW \n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # else fprintf(ofp, "Tree log L difference S.E. p-1sKH p-SH c-ELW 2sKH\n"); fprintf(ofp, "-------------------------------------------------------------------------------\n"); # endif for (i = 0; i < numutrees; i++) { difflkl = ulklc[besttree]-ulklc[i]; fprintf(ofp, "%2d %10.2f %8.2f ", i+1, ulklc[i], difflkl); if (i == besttree) { # ifdef KHTWOSIDED fprintf(ofp, " <-------------- best "); # else fprintf(ofp, " <---- best "); # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else fprintf(ofp, " best"); # endif } else { /* compute variance of Log L differences over sites */ #ifndef USE_WINDOWS difflklps = difflkl/(double)Maxsite; #else difflklps = difflkl/(double)alimaxsite; #endif sum = 0.0; for (j = 0; j < Numptrn; j++) { temp = allsitesc[besttree][j] - allsitesc[i][j] - difflklps; sum += temp*temp*Weight[j]; } #ifndef USE_WINDOWS sum = sqrt(fabs(sum/(Maxsite-1.0)*Maxsite)); #else sum = sqrt(fabs(sum/(alimaxsite-1.0)*alimaxsite)); #endif # ifdef KHTWOSIDED fprintf(ofp, "%11.2f ", sum); if (difflkl > 1.96*sum) fprintf(ofp, "yes "); else fprintf(ofp, "no "); # else fprintf(ofp, "%11.2f ", sum); # endif if (kh1_test_res[i] == 1) fprintf(ofp, " %6.4f +", kh1_pval[i]); else fprintf(ofp, " %6.4f -", kh1_pval[i]); if (sh_test_res[i] == 1) fprintf(ofp, " %6.4f +", sh_pval[i]); else fprintf(ofp, " %6.4f -", sh_pval[i]); if (elw_test_res[i] == 1) fprintf(ofp, " %6.4f +", elw_support[i]); else fprintf(ofp, " %6.4f -", elw_support[i]); # ifdef KHTWOSIDED # else if (difflkl > 1.96*sum) fprintf(ofp, " -"); else fprintf(ofp, " +"); # endif } fprintf(ofp, "\n"); } fprintf(ofp, "\nThe columns show the results and p-values of the following tests:\n"); fprintf(ofp, "1sKH - one sided KH test based on pairwise SH tests (Shimodaira-Hasegawa\n"); fprintf(ofp, " 2000, Goldman et al., 2001, Kishino-Hasegawa 1989)\n"); fprintf(ofp, "SH - Shimodaira-Hasegawa test (2000)\n"); fprintf(ofp, "ELW - Expected Likelihood Weight (Strimmer-Rambaut 2002)\n"); fprintf(ofp, "2sKH - two sided Kishino-Hasegawa test (1989)\n"); fprintf(ofp, "\n"); fprintf(ofp, "Plus signs denote the confidence sets. Minus signs denote significant\n"); fprintf(ofp, "exclusion. All tests used 5%% significance level. 1sKH, SH, and ELW\n"); fprintf(ofp, "performed 1000 resamplings using the RELL method.\n"); #if 0 fprintf(ofp, "\nColmn 5 gives the results of the (old) two-sided Kishino-Hasegawa test \n"); fprintf(ofp, "following Kishino and Hasegawa (1989). It tests whether a likelihood is \n"); fprintf(ofp, "significantly worse than the best one, marked with 'best'. This test should \n"); fprintf(ofp, "only be used for data not having been determined with the data tested on.\n"); fprintf(ofp, "1sKH is the one-sided KH test (Goldman et al., 2001). It is applicable\n"); fprintf(ofp, "to test whether likelihoods are worse than the lielihood of the ML tree.\n"); fprintf(ofp, "SH tests for the best trees (Shimodaira and Hasegawa, 2000).\n"); fprintf(ofp, "Note that KH, 1sKH, and SH assume to have the 'true' topologies among the tested.\n"); fprintf(ofp, "ELW (Expected likelihood weights) seems to work even without this restriction\n"); fprintf(ofp, "(Strimmer and Rambaut, 2002). Still plausible trees should be among the tested.\n"); fprintf(ofp, "For 1sKH, SH, and ELW plus signs '+' mark the topologies belonging to the\n"); fprintf(ofp, "confidence sets the numbers give the p-values (1sKH and SH) or the confidence\n"); fprintf(ofp, "weight (ELW).\n"); fprintf(ofp, "All tests used 5%% significance level. 1sKH, SH, and ELW used 1000 resamplings.\n"); #endif } } /* printtreestats */ #endif /********************************************************/ /* time stamp */ void timestamp(FILE* ofp) { double timespan; double cpuspan; timespan = difftime(Stoptime, Starttime); cpuspan = ((double) (Stopcpu - Startcpu) / CLOCKS_PER_SEC); fprintf(ofp, "\n\nTIME STAMP\n\n"); fprintf(ofp, "Date and time: %s", asctime(localtime(&Starttime)) ); fprintf(ofp, "Runtime (excl. input) : %.0f seconds (= %.1f minutes = %.1f hours)\n", timespan, timespan/60., timespan/3600.); fprintf(ofp, "Runtime (incl. input) : %.0f seconds (= %.1f minutes = %.1f hours)\n", fulltime, fulltime/60., fulltime/3600.); #ifdef TIMEDEBUG fprintf(ofp, "CPU time (incl. input): %.0f seconds (= %.1f minutes = %.1f hours)\n\n", fullcpu, fullcpu/60., fullcpu/3600.); #endif /* TIMEDEBUG */ } /* timestamp */ /* SONJA #include "sonja.c" */ /***************************************************************************/ /*** ***/ /*** Sonja's distance problem ;-) ***/ /*** ***/ /***************************************************************************/ #ifdef SONJA /* routines to compute the distances in the tree */ /* # include "sonja.c" */ /* collect distances from the subtree rooted by np */ void subtree2dist(Node *np, /* subtree root */ ivector nodefound, /* leaves in this subtree */ dvector nodedist, /* distances leaf <-> np */ dmatrix distmat, /* dist matrix between leaves */ imatrix distdone) /* done flags */ { int n, m; ivector foundbelow; Node *tp; /* external node = leaf */ if (np->isop == NULL) { # ifdef DEBUGTREEDIST fprintf(stderr, "e%d: len=%.6f\n", np->number, np->length); # endif /* nodedist[np->number] = np->length; */ nodefound[np->number] = 1; return; } else { /* if not external node */ # ifdef DEBUGTREEDIST fprintf(stderr, "i%d: len=%.6f\n", np->number, np->length); # endif foundbelow = new_ivector(Maxspc); /* for every branch at the inner node */ tp = np->isop; while (tp != np) { for (n = 0; n < Maxspc; n++) foundbelow[n] = 0; subtree2dist(tp->kinp, foundbelow, nodedist, distmat, distdone); for (n = 0; n < Maxspc; n++) { if (foundbelow[n] == 1) { # ifdef DEBUGTREEDIST fprintf(stderr, " +++i%d: nd%d=%.5f+%.5f=%.5f\n", np->number, n, nodedist[n], tp->length, nodedist[n]+tp->length); # endif nodefound[n] = 1; nodedist[n] += tp->length; } } tp = tp->isop; } /* while tp != np */ for (n = 0; n < Maxspc; n++) { for (m = n+1; m < Maxspc; m++) { if ((distdone[n][m]!=1) && (nodefound[n]==1) && (nodefound[m]==1)) { distmat[n][m] = nodedist[n] + nodedist[m]; distmat[m][n] = distmat[n][m]; distdone[n][m] = 1; distdone[m][n] = 1; } /* if */ } /* for m */ } /* for n */ free (foundbelow); } /* if not external node */ } /***************************************************************************/ /* collect all distances from the current tree */ void tree2dist(dmatrix distmat) { ivector nodefound; imatrix distdone; dvector nodedist; int n, m; nodefound = new_ivector(Maxspc); distdone = new_imatrix(Maxspc,Maxspc); nodedist = new_dvector(Maxspc); for (n = 0; n < Maxspc; n++) { nodedist[n] = 0.0; nodefound[n] = 0; for (m = n+1; m < Maxspc; m++) { if (n==m) { distmat[n][m] = 0.0; distdone[n][m] = 1; } else { distmat[n][m] = 0.0; distmat[m][n] = 0.0; distdone[n][m] = 0; distdone[m][n] = 0; } } /* for m */ } /* for n */ /* we are NOT on a leaf, because root -> collect */ subtree2dist(Ctree->ebrnchp[outgroup]->kinp, nodefound, nodedist, distmat, distdone); /* compute distances to the root */ m = outgroup; for (n = 0; n < Maxspc; n++) { if ((distdone[n][m]!=1) && (nodefound[n]==1)) { distmat[n][m] = nodedist[n] + Ctree->ebrnchp[outgroup]->length; distmat[m][n] = distmat[n][m]; distdone[n][m] = 1; distdone[m][n] = 1; } /* if */ } /* for n */ free(nodefound); free(distdone); free(nodedist); } #endif /* SONJA */ /***************************************************************************/ /* end of SONJA */ /***************************************************************************/ /* write output file */ void writeoutputfile(FILE *ofp, int part) { int i, fail, df; uli li; double pval, delta; if ((part == WRITEPARAMS) || (part == WRITEALL)) { # ifndef ALPHA fprintf(ofp, "TREE-PUZZLE %s\n\n", VERSION); # else fprintf(ofp, "TREE-PUZZLE %s%s\n\n", VERSION, ALPHA); # endif fprintf(ofp, "Input file name: %s\n",INFILE); if (puzzlemode == USERTREE || puzzlemode == CONSENSUS) fprintf(ofp, "User tree file name: %s\n",INTREE); fprintf(ofp, "Type of analysis: "); switch(typ_optn) { case TREERECON_OPTN: switch(puzzlemode) { case CONSENSUS: fprintf(ofp, "consensus construction\n"); break; case USERTREE: fprintf(ofp, "user tree evaluation\n"); break; default: fprintf(ofp, "tree reconstruction\n"); break; } break; case LIKMAPING_OPTN: fprintf(ofp, "likelihood mapping\n"); break; } fprintf(ofp, "Parameter estimation: "); if (approxp_optn) fprintf(ofp, "approximate (faster)\n"); else fprintf(ofp, "accurate (slow)\n"); if (!((puzzlemode == USERTREE || puzzlemode == CONSENSUS) && typ_optn == TREERECON_OPTN)) { fprintf(ofp, "Parameter estimation uses: "); if (qcalg_optn) fprintf(ofp, "quartet sampling (for substitution process) + NJ tree (for rate variation)\n"); else fprintf(ofp, "neighbor-joining tree (for substitution process and rate variation)\n"); } else { fprintf(ofp, "Parameter estimation uses: "); if (utree_optn) fprintf(ofp, "1st user tree (for substitution process and rate variation)\n"); else if (qcalg_optn) fprintf(ofp, "quartet sampling (for substitution process) + NJ tree (for rate variation)\n"); else fprintf(ofp, "neighbor-joining tree (for substitution process and rate variation)\n"); } fprintf(ofp, "\nStandard errors (S.E.) are obtained by the curvature method.\n"); fprintf(ofp, "The upper and lower bounds of an approximate 95%% confidence interval\n"); fprintf(ofp, "for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E.\n"); fprintf(ofp, "\n\n"); /***************************************************************************/ /* SEQUENCE ALIGNMENT */ /***************************************************************************/ fprintf(ofp, "SEQUENCE ALIGNMENT\n\n"); #ifndef USE_WINDOWS fprintf(ofp, "Input data: %d sequences with %d ", Maxspc, Maxsite); #else fprintf(ofp, "Input data: %d sequences with %d ", Maxspc, alimaxsite); #endif if (data_optn == AMINOACID) fprintf(ofp, "amino acid"); else if (data_optn == NUCLEOTIDE && SH_optn) #ifndef USE_WINDOWS fprintf(ofp, "doublet (%d nucleotide)", Maxsite*2); #else fprintf(ofp, "doublet (%d nucleotide)", alimaxsite*2); #endif else if (data_optn == NUCLEOTIDE && nuc_optn) fprintf(ofp, "nucleotide"); else if (data_optn == BINARY) fprintf(ofp, "binary state"); fprintf(ofp, " sites"); if (data_optn == NUCLEOTIDE && (Maxseqc % 3) == 0 && !SH_optn) { if (codon_optn == 1) fprintf(ofp, " (1st codon positions)"); if (codon_optn == 2) fprintf(ofp, " (2nd codon positions)"); if (codon_optn == 3) fprintf(ofp, " (3rd codon positions)"); if (codon_optn == 4) fprintf(ofp, " (1st and 2nd codon positions)"); } if (data_optn == NUCLEOTIDE && SH_optn) { if (SHcodon) fprintf(ofp, " (1st and 2nd codon positions)"); else fprintf(ofp, " (1st+2nd, 3rd+4th, etc. site)"); } fprintf(ofp, "\n"); fprintf(ofp, "Number of constant sites: %d (= %.1f%% of all sites)\n", Numconst, 100.0*fracconst); fprintf(ofp, "Number of site patterns: %d\n", Numptrn); fprintf(ofp, "Number of constant site patterns: %d (= %.1f%% of all site patterns)\n\n\n", Numconstpat, 100.0*fracconstpat); /***************************************************************************/ /* SUBSTITUTION PROCESS */ /***************************************************************************/ fprintf(ofp, "SUBSTITUTION PROCESS\n\n"); fprintf(ofp, "Model of substitution: "); if (data_optn == NUCLEOTIDE) { /* nucleotides */ if (nuc_optn) { if(HKY_optn) fprintf(ofp, "HKY (Hasegawa et al. 1985)\n"); if(TN_optn) fprintf(ofp, "TN (Tamura-Nei 1993)\n"); if(GTR_optn) fprintf(ofp, "GTR (e.g. Lanave et al. 1980)\n"); if((HKY_optn) || (TN_optn)) { fprintf(ofp, "Transition/transversion parameter"); if (optim_optn) fprintf(ofp, " (estimated from data set)"); fprintf(ofp, ": %.2f", TSparam); if (optim_optn) fprintf(ofp, " (S.E. %.2f)", tserr); fprintf(ofp, "\n"); if (optim_optn && TSparam > MAXTS - 1.0) fprintf(ofp, "WARNING --- parameter estimate close to internal upper bound!\n"); if (optim_optn && TSparam < MINTS + 0.1) fprintf(ofp, "WARNING --- parameter estimate close to internal lower bound!\n"); } if (TN_optn) { fprintf(ofp, "Y/R transition parameter"); if (optim_optn) fprintf(ofp, " (estimated from data set)"); fprintf(ofp, ": %.2f", YRparam); if (optim_optn) fprintf(ofp, " (S.E. %.2f)", yrerr); fprintf(ofp, "\n"); if (optim_optn && YRparam > MAXYR - 0.5) fprintf(ofp, "WARNING --- parameter estimate close to internal upper bound!\n"); if (optim_optn && YRparam < MINYR + 0.1) fprintf(ofp, "WARNING --- parameter estimate close to internal lower bound!\n"); } if (GTR_optn || print_GTR_optn) { if((HKY_optn) || (TN_optn)) fprintf(ofp, "\n"); fprintf(ofp, "Rate matrix R (parameters %s):\n\n", GTR_optn ? "set by user" : "restricted to selected model"); fprintf(ofp, " A-C rate: "); fprintf(ofp, "%.5f\n", GTR_ACrate); fprintf(ofp, " A-G rate: "); fprintf(ofp, "%.5f\n", GTR_AGrate); fprintf(ofp, " A-T rate: "); fprintf(ofp, "%.5f\n", GTR_ATrate); fprintf(ofp, " C-G rate: "); fprintf(ofp, "%.5f\n", GTR_CGrate); fprintf(ofp, " C-T rate: "); fprintf(ofp, "%.5f\n", GTR_CTrate); fprintf(ofp, " G-T rate: "); fprintf(ofp, "%.5f\n", GTR_GTrate); fprintf(ofp, "\n"); } } if (SH_optn) { fprintf(ofp, "SH (Schoeniger-von Haeseler 1994)\n"); fprintf(ofp, "Transition/transversion parameter"); if (optim_optn) fprintf(ofp, " (estimated from data set)"); fprintf(ofp, ": %.2f\n", TSparam); if (optim_optn) fprintf(ofp, " (S.E. %.2f)", tserr); fprintf(ofp, "\n"); if (optim_optn && TSparam > MAXTS - 1.0) fprintf(ofp, "WARNING --- parameter estimate close to internal upper bound!\n"); if (optim_optn && TSparam < MINTS + 0.1) fprintf(ofp, "WARNING --- parameter estimate close to internal lower bound!\n"); } } if (data_optn == AMINOACID) { /* amino acids */ if (Dayhf_optn) fprintf(ofp, "Dayhoff (Dayhoff et al. 1978)\n"); if (Jtt_optn) fprintf(ofp, "JTT (Jones et al. 1992)\n"); if (mtrev_optn) fprintf(ofp, "mtREV24 (Adachi-Hasegawa 1996)\n"); if (cprev_optn) fprintf(ofp, "cpREV45 (Adachi et al. 2000)\n"); if (blosum62_optn) fprintf(ofp, "BLOSUM 62 (Henikoff-Henikoff 1992)\n"); if (vtmv_optn) fprintf(ofp, "VT (Mueller-Vingron 2000)\n"); if (wag_optn) fprintf(ofp, "WAG (Whelan-Goldman 2000)\n"); } if (data_optn == BINARY) { /* binary states */ fprintf(ofp, "Two-state model (Felsenstein 1981)\n"); } if (data_optn == AMINOACID) fprintf(ofp, "Amino acid "); else if (data_optn == NUCLEOTIDE && SH_optn) fprintf(ofp, "Doublet "); else if (data_optn == NUCLEOTIDE && nuc_optn) fprintf(ofp, "Nucleotide "); else if (data_optn == BINARY) fprintf(ofp, "Binary state "); fprintf(ofp, "frequencies ("); if (Frequ_optn) fprintf(ofp, "estimated from data set"); else fprintf(ofp, "user specified"); if (data_optn == NUCLEOTIDE && SH_optn && sym_optn) fprintf(ofp, " and symmetrized"); fprintf(ofp, "):\n\n"); for (i = 0; i < gettpmradix(); i++) fprintf(ofp, " pi(%s) = %5.1f%%\n", int2code(i), Freqtpm[i]*100); if (data_optn == NUCLEOTIDE) { if (!GTR_optn) { fprintf(ofp, "\nExpected transition/transversion ratio: %.2f", tstvratio); if (tstvf84 == 0.0) fprintf(ofp, "\n"); else fprintf(ofp, " (= F84 parameter)\n"); fprintf(ofp, "Expected pyrimidine transition/purine transition"); fprintf(ofp, " ratio: %.2f\n", yrtsratio); if (tstvf84 != 0.0 && TN_optn) fprintf(ofp, "This TN model is equivalent to a F84 model (Felsenstein 1984).\n"); } } /***************************************************************************/ /* SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) */ /***************************************************************************/ fprintf(ofp, "\n\nAMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER)\n\n"); { double fract; int sumgapchar=0; int sumotherchar=0; fprintf(ofp, " gaps wildcards sum %% sequence\n"); for (i = 0; i < Maxspc; i++) { fprintf(ofp, " "); fputid10(ofp, i); fprintf(ofp, " "); #ifndef USE_WINDOWS fract = (Seqgapchar[i] + Seqotherchar[i]) / (double) Maxsite; #else fract = (Seqgapchar[i] + Seqotherchar[i]) / (double) alimaxsite; #endif sumgapchar+=Seqgapchar[i]; sumotherchar+=Seqotherchar[i]; fprintf(ofp, "%6d %6d %6d %6.2f%% %c\n", Seqgapchar[i], Seqotherchar[i], (Seqgapchar[i] + Seqotherchar[i]), 100.0 * fract, ((fract > 0.5) ? '!' : ' ')); } fprintf(ofp, " -------------------------------------------------------\n"); fprintf(ofp, " Sum "); #ifndef USE_WINDOWS fract = (sumgapchar + sumotherchar) / (double) (Maxsite * Maxspc); #else fract = (sumgapchar + sumotherchar) / (double) (alimaxsite * Maxspc); #endif fprintf(ofp, "%6d %6d %6d %6.2f%% %c\n", sumgapchar, sumotherchar, (sumgapchar + sumotherchar), 100.0 * fract, ((fract > 0.5) ? '!' : ' ')); fprintf(ofp, "\n\n"); fprintf(ofp, "The table above shows the amount of gaps ('-') and other 'wildcard'\n"); #ifndef USE_WINDOWS fprintf(ofp, "characters ('X', '?', etc.) and their percentage of the %d columns\n", Maxsite); #else fprintf(ofp, "characters ('X', '?', etc.) and their percentage of the %d columns\n", alimaxsite); #endif fprintf(ofp, "in the alignment.\n"); fprintf(ofp, "Sequences with more than 50%% ambiguous characters are marked with a '!' and \n"); fprintf(ofp, "should be checked, whether they have sufficient overlap to other sequences.\n"); fprintf(ofp, "Sequences with 100%% ambiguous characters do not hold any phylogenetic\n"); fprintf(ofp, "information and had to be discarded from the analysis.\n\n"); } /***************************************************************************/ /* SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) */ /***************************************************************************/ fprintf(ofp, "\n\nSEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER)\n\n"); fail = FALSE; fprintf(ofp, " 5%% chi-square test p-value\n"); for (i = 0; i < Maxspc; i++) { fprintf(ofp, " "); fputid10(ofp, i); pval = homogentest(i); if ( pval < 0.05 ) fprintf(ofp, " failed "); else fprintf(ofp, " passed "); if (chi2fail) fail = TRUE; fprintf(ofp, " %6.2f%% ", pval*100.0); fprintf(ofp, "\n"); } fprintf(ofp, "\n"); fprintf(ofp, "The chi-square tests compares the "); if (data_optn == AMINOACID) fprintf(ofp, "amino acid"); else if (data_optn == NUCLEOTIDE && SH_optn) fprintf(ofp, "doublet"); else if (data_optn == NUCLEOTIDE && nuc_optn) fprintf(ofp, "nucleotide"); else if (data_optn == BINARY) fprintf(ofp, "binary state"); fprintf(ofp," composition of each sequence\n"); fprintf(ofp, "to the frequency distribution assumed in the maximum likelihood model.\n"); if (fail) { fprintf(ofp, "\nWARNING: Result of chi-square test may not be valid"); fprintf(ofp, " because of small\nmaximum likelihood frequencies and"); fprintf(ofp, " short sequence length!\n"); } /***************************************************************************/ /* IDENTICAL SEQUENCE */ /***************************************************************************/ fprintf(ofp, "\n\nIDENTICAL SEQUENCES\n\n"); fprintf(ofp, "The sequences in each of the following groups are all identical. To speed\n"); fprintf(ofp, "up computation please remove all but one of each group from the data set.\n\n"); findidenticals(ofp); fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD DISTANCES\n\n"); fprintf(ofp, "Maximum likelihood distances are computed using the "); fprintf(ofp, "selected model of\nsubstitution and rate heterogeneity.\n\n"); putdistance(ofp); { double avgdist, meandist, mindist, maxdist, stddevdist, vardist; avgdist = averagedist(Maxspc, Distanmat, &meandist, &mindist, &maxdist, &stddevdist, &vardist); fprintf(ofp, "\nAverage distance (over all possible pairs of sequences): %.5f\n", meandist); fprintf(ofp, " minimum : %.5f, maximum : %.5f\n", mindist, maxdist); fprintf(ofp, " variance : %.5f, std.dev. : %.5f\n", vardist, stddevdist); } /***************************************************************************/ /* RATE HETEROGENEITY (PART 1) */ /***************************************************************************/ fprintf(ofp, "\n\nRATE HETEROGENEITY\n\n"); fprintf(ofp, "Model of rate heterogeneity: "); if (rhetmode == UNIFORMRATE) fprintf(ofp, "uniform rate\n"); if (rhetmode == GAMMARATE ) fprintf(ofp, "Gamma distributed rates\n"); if (rhetmode == TWORATE ) fprintf(ofp, "two rates (1 invariable + 1 variable)\n"); if (rhetmode == MIXEDRATE ) fprintf(ofp, "mixed (1 invariable + %d Gamma rates)\n", numcats); if (rhetmode == TWORATE || rhetmode == MIXEDRATE) { fprintf(ofp, "Fraction of invariable sites"); if (fracinv_optim) fprintf(ofp, " (estimated from data set)"); fprintf(ofp, ": %.2f", fracinv); if (fracinv_optim) fprintf(ofp, " (S.E. %.2f)", fierr); fprintf(ofp, "\n"); if (fracinv_optim && fracinv > MAXFI - 0.05) fprintf(ofp, "WARNING --- parameter estimate close to internal upper bound!\n"); #ifndef USE_WINDOWS fprintf(ofp, "Number of invariable sites: %.0f\n", floor(fracinv*Maxsite)); #else fprintf(ofp, "Number of invariable sites: %.0f\n", floor(fracinv*alimaxsite)); #endif } if (rhetmode == GAMMARATE || rhetmode == MIXEDRATE) { fprintf(ofp, "Gamma distribution parameter alpha"); if (grate_optim) fprintf(ofp, " (estimated from data set)"); fprintf(ofp, ": %.2f", (1.0-Geta)/Geta); if (grate_optim) fprintf(ofp, " (S.E. %.2f)", geerr/(Geta*Geta)); /* first order approximation */ fprintf(ofp, "\n"); if (grate_optim && Geta > MAXGE - 0.02) fprintf(ofp, "WARNING --- parameter estimate close to internal upper bound!\n"); if (grate_optim && Geta < MINGE + 0.01) fprintf(ofp, "WARNING --- parameter estimate close to internal lower bound!\n"); fprintf(ofp, "Number of Gamma rate categories: %d\n", numcats); } if (rhetmode == MIXEDRATE) { fprintf(ofp, "Total rate heterogeneity (invariable sites + Gamma model): "); fprintf(ofp, "%.2f", fracinv + Geta - fracinv*Geta); if (grate_optim && fracinv_optim) fprintf(ofp, " (S.E. %.2f)", geerr + fierr); /* first order approximation */ else if (grate_optim && !fracinv_optim) fprintf(ofp, " (S.E. %.2f)", geerr); else if (!grate_optim && fracinv_optim) fprintf(ofp, " (S.E. %.2f)", fierr); fprintf(ofp, "\n"); } if (rhetmode != UNIFORMRATE) { fprintf(ofp, "\nRates and their respective probabilities used in the likelihood function:\n"); fprintf(ofp, "\n Category Relative rate Probability\n"); if (rhetmode == TWORATE || rhetmode == MIXEDRATE) fprintf(ofp, " 0 0.0000 %.4f\n", fracinv); for (i = 0; i < numcats; i++) fprintf(ofp, " %d %.4f %.4f\n", i+1, Rates[i], (1.0-fracinv)/(double) numcats); } if (rhetmode == GAMMARATE || rhetmode == MIXEDRATE) { fprintf(ofp, "\nCategories 1-%d approximate a continous ", numcats); fprintf(ofp, "Gamma-distribution with expectation 1\n"); fprintf(ofp, "and variance "); if (Geta == 1.0) fprintf(ofp, "infinity"); else fprintf(ofp, "%.2f", Geta/(1.0-Geta)); fprintf(ofp, ".\n"); } } /* if WRITEPARAMS) || WRITEALL */ if ((part == WRITEREST) || (part == WRITEALL)) { /***************************************************************************/ /* RATE HETEROGENEITY (PART 2) */ /***************************************************************************/ #if 0 if (typ_optn == TREERECON_OPTN && (puzzlemode == QUARTPUZ || puzzlemode == USERTREE || puzzlemode == CONSENSUS) && !skipmlbranch_optn) { #endif #if 0 if(typ_optn == TREERECON_OPTN) fprintf(stderr, "typ_optn == TREERECON_OPTN\n"); if(puzzlemode == QUARTPUZ) fprintf(stderr, "puzzlemode == QUARTPUZZ\n"); if(puzzlemode == USERTREE) fprintf(stderr, "puzzlemode == USERTREE\n"); if(puzzlemode == CONSENSUS) fprintf(stderr, "puzzlemode == CONSENSUS\n"); if(dotreelh_optn) fprintf(stderr, "dotreelh_optn\n"); #endif if (typ_optn == TREERECON_OPTN && (puzzlemode == QUARTPUZ || puzzlemode == USERTREE || puzzlemode == CONSENSUS) && dotreelh_optn) { /* if likelihood has been computed */ if (rhetmode != UNIFORMRATE) { fprintf(ofp, "\nCombination of categories that contributes"); fprintf(ofp, " the most to the likelihood\n"); fprintf(ofp, "(computation done without clock assumption assuming "); if (puzzlemode == QUARTPUZ) fprintf(ofp, "quartet-puzzling tree"); if (puzzlemode == USERTREE || puzzlemode == CONSENSUS) { if (utree_optn) fprintf(ofp, "1st user tree"); else fprintf(ofp, "NJ tree"); } fprintf(ofp, "):\n\n"); if (bestratefound==0) { fprintf(STDOUT, "ERROR: no rate combination computed before output!!!\n"); findbestratecombination(); } printbestratecombination(ofp); } /* rhetmode != UNIFORMRATE */ if (savesiterate_optn) { FILE *ratefp; openfiletowrite(&ratefp, SITERATE, "site rates"); printbestratecombinationtofile(ratefp, rhetmode); fclose(ratefp); } /* if savesiterate_optn */ } /* if likelihood has been computed */ /***************************************************************************/ /* BAD QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) */ /***************************************************************************/ if (puzzlemode == QUARTPUZ &&typ_optn == TREERECON_OPTN) { fprintf(ofp, "\n\nQUARTET STATISTICS (SEQUENCES IN INPUT ORDER)\n\n"); fprintf(ofp, "\n"); fprintf(ofp, " name | resolved | partly resolved | unresolved | sum\n"); fprintf(ofp, " --------------------------------------------------------------------------\n"); for (i = 0; i < Maxspc; i++) { /* fprintf(ofp, " %3d. %-10s %6.2f%% [%7ld] %6.2f%% [%7ld] %6.2f%% [%7ld] %7ld\n", */ /* fprintf(ofp, " %3d. %-10s (%6.2f%%) %7ld (%6.2f%%) %7ld (%6.2f%%) %7ld %7ld\n", */ fprintf(ofp, " %-10s %7ld [%6.2f%%] %7ld [%6.2f%%] %7ld [%6.2f%%] %7ld\n", Namestr[i], (qinfomatr[1][i]+qinfomatr[2][i]+qinfomatr[4][i]), (100.0 * (qinfomatr[1][i]+qinfomatr[2][i]+qinfomatr[4][i])/qinfomatr[8][i]), (qinfomatr[3][i]+qinfomatr[5][i]+qinfomatr[6][i]), (100.0 * (qinfomatr[3][i]+qinfomatr[5][i]+qinfomatr[6][i])/qinfomatr[8][i]), qinfomatr[7][i], (100.0 * (qinfomatr[7][i])/qinfomatr[8][i]), qinfomatr[8][i]); /* MISSING QUARTETS (HAS ;-) */ } fprintf(ofp, " --------------------------------------------------------------------------\n"); fprintf(ofp, " #quartets :"); { uli allqs; allqs = fullresqs + partresqs + unresqs + missingqs; fprintf(ofp, "%7ld [%6.2f%%] ", fullresqs, 100.0 * fullresqs / allqs); fprintf(ofp, "%7ld [%6.2f%%] ", partresqs, 100.0 * partresqs / allqs); fprintf(ofp, "%7ld [%6.2f%%] ", unresqs, 100.0 * unresqs / allqs); /* MISSING QUARTETS (HAS ;-) */ /* fprintf(ofp, "%7ld [%6.2f%%] ", missingqs, 100.0 * missingqs / allqs); */ fprintf(ofp, "%7ld", allqs); } fprintf(ofp, "\n\n"); fprintf(ofp, "The table shows the occurrences of fully resolved, partially, and\n"); fprintf(ofp, "completely unresolved quartets for each sequence and their percentage\n"); fprintf(ofp, "relative to the number of times the sequence occurs in the list of \n"); fprintf(ofp, "quartets (i.e. %ld quartets out of %ld in total).\n", (4 * Numquartets)/Maxspc, Numquartets); fprintf(ofp, "In fully resolved quartet one single topology is supported, while for\n"); fprintf(ofp, "partially resolved quartets two and for completely unresolved quartets\n"); fprintf(ofp, "none of the topologies (AB||CD, AC||BD, AD||BC) are favoured.\n"); fprintf(ofp, "Note: Because 4 sequences are involved in one quartet numbers add up\n"); fprintf(ofp, "to a four-fold of the existing quartets.\n"); fprintf(ofp, "\n"); fprintf(ofp, "Hint: The overall numbers in the last row give information about the\n"); fprintf(ofp, "phylogenetic content of the dataset. The higher the percentage of partially\n"); fprintf(ofp, "and unresolved quartets, the lower the content of phylogenetic information.\n"); fprintf(ofp, "This can be visualized in more detail by likelihood mapping analysis.\n"); fprintf(ofp, "\n"); } if (typ_optn == TREERECON_OPTN) { /***************************************************************************/ /* TREE SEARCH */ /***************************************************************************/ fprintf(ofp, "\n\nTREE SEARCH\n\n"); if (puzzlemode == QUARTPUZ) { fprintf(ofp, "Quartet puzzling is used to choose from the possible tree topologies\n"); fprintf(ofp, "and to simultaneously infer support values for internal branches.\n\n"); fprintf(ofp, "Number of puzzling steps: %lu\n", Numtrial); fprintf(ofp, "Analysed quartets: %lu\n", Numquartets); fprintf(ofp, "Fully resolved quartets: %lu (= %.1f%%)\n", fullresqs, (double) fullresqs / (double) Numquartets * 100.0); fprintf(ofp, "Partly resolved quartets: %lu (= %.1f%%)\n", partresqs, (double) partresqs / (double) Numquartets * 100.0); fprintf(ofp, "Unresolved quartets: %lu (= %.1f%%)\n", unresqs, (double) unresqs / (double) Numquartets * 100.0); /* MISSING QUARTETS (HAS ;-) */ /* fprintf(ofp, "Missing quartets: %lu (= %.1f%%)\n", missingqs, (double) missingqs / (double) Numquartets * 100.0); */ fprintf(ofp, "\nQuartet trees are based on %s maximum likelihood values\n", (approxqp ? "approximate" : "exact")); fprintf(ofp, "using the selected model of substitution and rate heterogeneity.\n"); } if (puzzlemode == USERTREE || puzzlemode == CONSENSUS) { fprintf(ofp, "%d tree topologies were specified by the user.\n", numutrees); } if (puzzlemode == PAIRDIST) { fprintf(ofp, "No tree search performed (maximum likelihood distances only).\n"); } /***************************************************************************/ /* QUARTET PUZZLING TREE / CONSENSUS TREE */ /***************************************************************************/ if ((puzzlemode == QUARTPUZ) || (puzzlemode == CONSENSUS)) { if (puzzlemode == QUARTPUZ) { fprintf(ofp, "\n\nQUARTET PUZZLING TREE\n\n"); fprintf(ofp, "Support for the internal branches of the unrooted quartet puzzling\n"); fprintf(ofp, "tree topology is shown in percent.\n"); if (consincluded == (Maxspc - 3)) fprintf(ofp,"\nThis quartet puzzling tree is completely resolved.\n"); else fprintf(ofp,"\nThis quartet puzzling tree is not completely resolved!\n"); } else { fprintf(ofp, "\n\nCONSENSUS TREE\n\n"); fprintf(ofp, "Support for the internal branches of the unrooted consensus tree\n"); fprintf(ofp, "topology is shown in percent.\n"); if (consincluded == (Maxspc - 3)) fprintf(ofp,"\nThis consensus tree is completely resolved.\n"); else fprintf(ofp,"\nThis consensus tree is not completely resolved!\n"); } fprintf(ofp, "\n\n"); plotconsensustree(ofp); if (puzzlemode == QUARTPUZ) fprintf(ofp, "\n\nQuartet puzzling tree (in CLUSTAL W notation):\n\n"); else fprintf(ofp, "\n\nConsensus tree (in CLUSTAL W notation):\n\n"); writeconsensustree(ofp, FALSE, qsupportarr); if (qsupport_optn) writeconsensustree(ofp, TRUE, qsupportarr); if (puzzlemode == QUARTPUZ) { fprintf(ofp, "\n\nBIPARTITIONS\n\n"); fprintf(ofp, "The following bipartitions occured at least once"); fprintf(ofp, " in all intermediate\ntrees that have been generated "); fprintf(ofp, "in the %lu puzzling steps.\n", Numtrial); fprintf(ofp, "Bipartitions included in the quartet puzzling tree:\n"); } else { fprintf(ofp, "\n\nBIPARTITIONS\n\n"); fprintf(ofp, "The following bipartitions occured at least once"); fprintf(ofp, " in the specified set\n of %d usertrees tree topologies.\n", numutrees); fprintf(ofp, "Bipartitions included in the consensus tree:\n"); } fprintf(ofp, "(bipartition with sequences in input order : number of times seen)\n\n"); for (li = 0; li < (uli)consfifty; li++) { fprintf(ofp, " "); fprintfsplit(ofp, splitfreqs[2*li+1], splitpatterns, splitlength, Maxspc); fprintf(ofp, " : %lu", splitfreqs[2*li]); /* MISSING QUARTETS (HAS ;-) */ /* todo (HAS) */ if (qsupport_optn) { fprintf(ofp, " f+=%.0f|", (100.0*qsupportarr[li].fullres_pro/qsupportarr[li].qsum)); fprintf(ofp, "p+=%.0f|", (100.0*qsupportarr[li].partres_pro/qsupportarr[li].qsum)); fprintf(ofp, "f-=%.0f|", (100.0*qsupportarr[li].fullres_con/qsupportarr[li].qsum)); fprintf(ofp, "p-=%.0f|", (100.0*qsupportarr[li].partres_con/qsupportarr[li].qsum)); fprintf(ofp, "ur=%.0f", (100.0*qsupportarr[li].unres/qsupportarr[li].qsum)); if (qsupportarr[li].missing > 0) { fprintf(ofp, "|md=%.0f", (100.0*qsupportarr[li].missing/qsupportarr[li].qsum)); } fprintf(ofp, "/%ld\n", qsupportarr[li].qsum); } else { fprintf(ofp, "\n"); } #if 0 #endif } if (consincluded == 0) fprintf(ofp, " None (no bipartition included)\n"); if (conssub50_optn) { if (! puzzlemode == CONSENSUS) fprintf(ofp, "\nCongruent bipartitions occurred in 50%% or less, included in \nthe quartet puzzling tree:\n"); else fprintf(ofp, "\nCongruent bipartitions occurred in 50%% or less, included in \nthe consensus tree:\n"); } else { if (! puzzlemode == CONSENSUS) fprintf(ofp, "\nCongruent bipartitions occurred in 50%% or less, not included in \nthe quartet puzzling tree:\n"); else fprintf(ofp, "\nCongruent bipartitions occurred in 50%% or less, not included in \nthe consensus tree:\n"); } fprintf(ofp, "(bipartition with sequences in input order : number of times seen)\n\n"); if ((uli)consfifty == numbiparts) { fprintf(ofp, " None (all bipartitions are included)\n"); } else { if (consfifty < conscongruent) { for (li = (uli)consfifty; (li < (uli)numbiparts) && (li < (uli)conscongruent); li++) { fprintf(ofp, " "); fprintfsplit(ofp, splitfreqs[2*li+1], splitpatterns, splitlength, Maxspc); fprintf(ofp, " : %lu", splitfreqs[2*li]); /* MISSING QUARTETS (HAS ;-) */ /* todo (HAS) */ if (qsupport_optn) { fprintf(ofp, "f+=%.0f|", (100.0*qsupportarr[li].fullres_pro/qsupportarr[li].qsum)); fprintf(ofp, "p+=%.0f|", (100.0*qsupportarr[li].partres_pro/qsupportarr[li].qsum)); fprintf(ofp, "f-=%.0f|", (100.0*qsupportarr[li].fullres_con/qsupportarr[li].qsum)); fprintf(ofp, "p-=%.0f|", (100.0*qsupportarr[li].partres_con/qsupportarr[li].qsum)); fprintf(ofp, "ur=%.0f", (100.0*qsupportarr[li].unres/qsupportarr[li].qsum)); if (qsupportarr[li].missing > 0) { fprintf(ofp, "|md=%.0f", (100.0*qsupportarr[li].missing/qsupportarr[li].qsum)); } fprintf(ofp, "/%ld\n", qsupportarr[li].qsum); } else { fprintf(ofp, "\n"); } #if 0 #endif } } else { fprintf(ofp, " None (No congruent split not included)\n"); } if (! puzzlemode == CONSENSUS) fprintf(ofp, "\nIncongruent bipartitions not included in the quartet puzzling tree:\n"); else fprintf(ofp, "\nIncongruent bipartitions not included in the consensus tree:\n"); fprintf(ofp, "(bipartition with sequences in input order : number of times seen)\n\n"); /* print next 20 bipartions not included */ for (li = conscongruent; (li < numbiparts) && (li < conscongruent + 20UL); li++) { fprintf(ofp, " "); fprintfsplit(ofp, splitfreqs[2*li+1], splitpatterns, splitlength, Maxspc); fprintf(ofp, " : %lu\n", splitfreqs[2*li]); } if ((li == conscongruent + 20UL) && (li != numbiparts)) fprintf(ofp, "\n(%lu other less frequent bipartitions not shown)\n", numbiparts - conscongruent - 20UL); } if (! puzzlemode == CONSENSUS) { fprintfsortedpstrees(ofp, psteptreelist, psteptreenum, psteptreesum, 0, 5.0); } } /***************************************************************************/ /* MAXIMUM LIKELIHOOD BRANCH LENGTHS ON QUARTET PUZZLING TREE (NO CLOCK) */ /***************************************************************************/ #if 0 if (((puzzlemode == QUARTPUZ) || (puzzlemode == CONSENSUS)) && !skipmlbranch_optn) { #endif if (((puzzlemode == QUARTPUZ) || (puzzlemode == CONSENSUS)) && dotreelh_optn) { if (! puzzlemode == CONSENSUS) { fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD BRANCH LENGTHS ON QUARTET"); fprintf(ofp, " PUZZLING TREE (NO CLOCK)\n\nBranch lengths are computed using"); fprintf(ofp, " the selected model of\nsubstitution and rate heterogeneity.\n\n\n"); } else { fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS"); fprintf(ofp, " TREE (NO CLOCK)\n\nBranch lengths are computed using"); fprintf(ofp, " the selected model of\nsubstitution and rate heterogeneity.\n\n\n"); } clockmode = 0; /* nonclocklike branch lengths */ prtopology(ofp); fprintf(ofp, "\n"); resulttree(ofp, FALSE); /* branch lengths cannot be set by user in this case */ if (! puzzlemode == CONSENSUS) { fprintf(ofp, "\n\nQuartet puzzling tree with maximum likelihood branch lengths"); fprintf(ofp, "\n(in CLUSTAL W notation):\n\n"); } else { fprintf(ofp, "\n\nConsensus tree with maximum likelihood branch lengths"); fprintf(ofp, "\n(in CLUSTAL W notation):\n\n"); } fputphylogeny(ofp); /* SONJA */ #ifdef SONJA /* computes the distances in the tree and writes them to file/stderr */ tree2dist(Distanmat); putdistance(ofp); putdistance(stderr); #endif /*****************************************************************************/ /* MAXIMUM LIKELIHOOD BRANCH LENGTHS ON QUARTET PUZZLING TREE (WITH CLOCK) */ /*****************************************************************************/ if (compclock) { if (! puzzlemode == CONSENSUS) { fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD BRANCH LENGTHS OF QUARTET"); fprintf(ofp, " PUZZLING TREE (WITH CLOCK)\n\nBranch lengths are computed using"); } else { fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD BRANCH LENGTHS OF CONSENSUS"); fprintf(ofp, " TREE (WITH CLOCK)\n\nBranch lengths are computed using"); } fprintf(ofp, " the selected model of\nsubstitution and rate heterogeneity.\n"); fprintf(ofp, "\nRoot located at branch: %d ", locroot+1); if (locroot 1) fprintf(ofp, "- WARNING: %d best locations found! -", numbestroot); fprintf(ofp, "\n\n"); fprintf(ofp, "If the automatic search misplaces the root please rerun the analysis\n"); fprintf(ofp, "(rename \"outtree\" to \"intree\") and select location of root manually!"); fprintf(ofp, "\n\n\n"); } if (rootsearch == ROOT_DISPLAYED) fprintf(ofp, "(displayed outgroup)\n\n\n"); clockmode = 1; /* clocklike branch lengths */ prtopology(ofp); fprintf(ofp, "\n"); fprintf(ofp, "\nTree drawn as unrooted tree for better "); fprintf(ofp, "comparison with non-clock tree!\n"); resulttree(ofp, usebranch_optn); fprintf(ofp, "\n"); resultheights(ofp); if (! puzzlemode == CONSENSUS) { fprintf(ofp, "\n\nRooted quartet puzzling tree with clocklike"); } else { fprintf(ofp, "\n\nRooted consensus tree with clocklike"); } fprintf(ofp, " maximum likelihood branch lengths\n"); fprintf(ofp, "(in CLUSTAL W notation):\n\n"); fputrooted(ofp, locroot); } /***************************************************************************/ /* MOLECULAR CLOCK LIKELIHOOD RATIO TEST */ /***************************************************************************/ if (compclock) { fprintf(ofp, "\n\nMOLECULAR CLOCK LIKELIHOOD RATIO TEST\n\n"); fprintf(ofp, "log L without clock: %.2f (independent branch parameters: %d)\n", Ctree->lklhd, Numspc + Numibrnch); fprintf(ofp, "log L with clock: %.2f (independent branch parameters: %d)\n\n", Ctree->lklhdc, Numhts + 1); delta = fabs(2.0*((Ctree->lklhd) - (Ctree->lklhdc))); fprintf(ofp, "Likelihood ratio test statistic delta: %.2f\n", delta); df = Numspc + Numibrnch - Numhts - 1; fprintf(ofp, "Degress of freedom of chi-square distribution: %d\n", df); pval = IncompleteGammaQ(df*0.5, delta*0.5); fprintf(ofp, "Critical significance level: %.2f%%\n\n", pval*100.0); if (pval >= 0.05) { fprintf(ofp, "The simpler (clocklike) tree can not be rejected on a significance\n"); fprintf(ofp, "level of 5%%. The log-likelihood of the more complex (no clock) tree\n"); fprintf(ofp, "is not significantly increased.\n"); } else { fprintf(ofp, "The simpler (clocklike) tree is rejected on a significance level\n"); fprintf(ofp, "of 5%%. The log-likelihood of the more complex (no clock) tree is\n"); fprintf(ofp, "significantly increased.\n"); } fprintf(ofp, "\nPlease take care that the correct root is used!\n"); } } } /***************************************************************************/ /* LIKELIHOOD MAPPING ANALYSIS */ /***************************************************************************/ if (typ_optn == LIKMAPING_OPTN) { fprintf(ofp, "\n\nLIKELIHOOD MAPPING ANALYSIS\n\n"); fprintf(ofp, "Number of quartets: %lu", Numquartets); if (lmqts == 0) fprintf(ofp, " (all possible)\n"); else fprintf(ofp, " (random choice)\n"); fprintf(ofp, "\nQuartet trees are based on approximate maximum likelihood values\n"); fprintf(ofp, "using the selected model of substitution and rate heterogeneity.\n\n\n"); if (numclust == 1) { fprintf(ofp, "Sequences are not grouped in clusters.\n"); } else { fprintf(ofp, "Sequences are grouped in %d clusters.\n", numclust); fprintf(ofp, "\nCluster a: %d sequences\n\n", clustA); for (i = 0; i < clustA; i++) { fprintf(ofp, " "); fputid(ofp, clusterA[i]); fprintf(ofp, "\n"); } fprintf(ofp, "\nCluster b: %d sequences\n\n", clustB); for (i = 0; i < clustB; i++) { fprintf(ofp, " "); fputid(ofp, clusterB[i]); fprintf(ofp, "\n"); } if (numclust > 2) { fprintf(ofp, "\nCluster c: %d sequences\n\n", clustC); for (i = 0; i < clustC; i++) { fprintf(ofp, " "); fputid(ofp, clusterC[i]); fprintf(ofp, "\n"); } } if (numclust == 4) { fprintf(ofp, "\nCluster d: %d sequences\n\n", clustD); for (i = 0; i < clustD; i++) { fprintf(ofp, " "); fputid(ofp, clusterD[i]); fprintf(ofp, "\n"); } } fprintf(ofp, "\nQuartets of sequences used in the likelihood"); fprintf(ofp, " mapping analysis are generated\n"); if (numclust == 2) fprintf(ofp, "by drawing two sequences from cluster a and two from cluster b."); if (numclust == 3) fprintf(ofp, "by drawing one sequence from clusters a and b and two from cluster c."); if (numclust == 4) fprintf(ofp, "by drawing one sequence from each of the clusters a, b, c, and d."); } /***************************************************************************/ /* LIKELIHOOD MAPPING STATISTICS */ /***************************************************************************/ fprintf(ofp, "\n\nLIKELIHOOD MAPPING STATISTICS\n\n"); fprintf(ofp, "Occupancies of the three areas 1, 2, 3:\n\n"); if (numclust == 4) fprintf(ofp, " (a,b)-(c,d)\n"); if (numclust == 3) fprintf(ofp, " (a,b)-(c,c)\n"); if (numclust == 2) fprintf(ofp, " (a,a)-(b,b)\n"); fprintf(ofp, " /\\\n"); fprintf(ofp, " / \\\n"); fprintf(ofp, " / \\\n"); fprintf(ofp, " / 1 \\\n"); fprintf(ofp, " / \\ / \\\n"); fprintf(ofp, " / \\ / \\\n"); fprintf(ofp, " / \\/ \\\n"); fprintf(ofp, " / 3 : 2 \\\n"); fprintf(ofp, " / : \\\n"); fprintf(ofp, " /__________________\\\n"); if (numclust == 4) fprintf(ofp, " (a,d)-(b,c) (a,c)-(b,d)\n"); if (numclust == 3) fprintf(ofp, " (a,c)-(b,c) (a,c)-(b,c)\n"); if (numclust == 2) fprintf(ofp, " (a,b)-(a,b) (a,b)-(a,b)\n"); fprintf(ofp, "\n"); fprintf(ofp, "Number of quartets in region 1: %lu (= %.1f%%)\n", ar1, (double) ar1*100.0/Numquartets); fprintf(ofp, "Number of quartets in region 2: %lu (= %.1f%%)\n", ar2, (double) ar2*100.0/Numquartets); fprintf(ofp, "Number of quartets in region 3: %lu (= %.1f%%)\n\n", ar3, (double) ar3*100.0/Numquartets); fprintf(ofp, "Occupancies of the seven areas 1, 2, 3, 4, 5, 6, 7:\n\n"); if (numclust == 4) fprintf(ofp, " (a,b)-(c,d)\n"); if (numclust == 3) fprintf(ofp, " (a,b)-(c,c)\n"); if (numclust == 2) fprintf(ofp, " (a,a)-(b,b)\n"); fprintf(ofp, " /\\\n"); fprintf(ofp, " / \\\n"); fprintf(ofp, " / 1 \\\n"); fprintf(ofp, " / \\ / \\\n"); fprintf(ofp, " / /\\ \\\n"); fprintf(ofp, " / 6 / \\ 4 \\\n"); fprintf(ofp, " / / 7 \\ \\\n"); fprintf(ofp, " / \\ /______\\ / \\\n"); fprintf(ofp, " / 3 : 5 : 2 \\\n"); fprintf(ofp, " /__________________\\\n"); if (numclust == 4) fprintf(ofp, " (a,d)-(b,c) (a,c)-(b,d)\n"); if (numclust == 3) fprintf(ofp, " (a,c)-(b,c) (a,c)-(b,c)\n"); if (numclust == 2) fprintf(ofp, " (a,b)-(a,b) (a,b)-(a,b)\n"); fprintf(ofp, "\n"); fprintf(ofp, "Number of quartets in region 1: %lu (= %.1f%%) left: %lu right: %lu\n", reg1, (double) reg1*100.0/Numquartets, reg1l, reg1r); fprintf(ofp, "Number of quartets in region 2: %lu (= %.1f%%) bottom: %lu top: %lu\n", reg2, (double) reg2*100.0/Numquartets, reg2d, reg2u); fprintf(ofp, "Number of quartets in region 3: %lu (= %.1f%%) bottom: %lu top: %lu\n", reg3, (double) reg3*100.0/Numquartets, reg3d, reg3u); fprintf(ofp, "Number of quartets in region 4: %lu (= %.1f%%) bottom: %lu top: %lu\n", reg4, (double) reg4*100.0/Numquartets, reg4d, reg4u); fprintf(ofp, "Number of quartets in region 5: %lu (= %.1f%%) left: %lu right: %lu\n", reg5, (double) reg5*100.0/Numquartets, reg5l, reg5r); fprintf(ofp, "Number of quartets in region 6: %lu (= %.1f%%) bottom: %lu top: %lu\n", reg6, (double) reg6*100.0/Numquartets, reg6d, reg6u); fprintf(ofp, "Number of quartets in region 7: %lu (= %.1f%%)\n", reg7, (double) reg7*100.0/Numquartets); } } /* if WRITEREST) || WRITEALL */ } /* writeoutputfile */ #if PARALLEL void writetimesstat(FILE *ofp) { int n; double cpusum = 0.0; double wallmax = 0.0; cputimes[0] = ((double)(cputimestop - cputimestart) / CLOCKS_PER_SEC); walltimes[0] = difftime(walltimestop, walltimestart); fullcpu = tarr.fullcpu; fulltime = tarr.fulltime; fullcputimes[0] = tarr.fullcpu; fullwalltimes[0] = tarr.fulltime; altcputimes[0] = tarr.cpu; altwalltimes[0] = tarr.time; fprintf(ofp, "\n\n\nPARALLEL LOAD STATISTICS\n\n"); fprintf(ofp, "The analysis was performed with %d parallel processes (1 master and \n", PP_NumProcs); fprintf(ofp, "%d worker processes).\n\n", PP_NumProcs-1); fprintf(ofp, "The following table the distribution of computation to the processes.\n"); fprintf(ofp, "The first column gives the process number, where 0 is the master process.\n"); fprintf(ofp, "The second and third column show the number of quartets computed (3 topologies \n"); fprintf(ofp, "each) and the the number of scheduling blocks the came in. The last two columns \n"); fprintf(ofp, "state the number of puzzling steps done by a process and number of scheduling \n"); fprintf(ofp, "blocks.\n\n"); fprintf(ofp, "process #quartets #chunks #puzzlings #chunks \n"); fprintf(ofp, "-----------------------------------------------\n"); for (n=0; n wallmax) wallmax=fullwalltimes[n]; cpusum += fullcputimes[n]; } /* for */ fprintf(ofp, "----------------------------------------------------------------------------\n"); fprintf(ofp, "Sum/Max: %11.1f %9.1f %9.1f | %11.1f %9.1f %9.1f \n", cpusum, cpusum/60, cpusum/3600, wallmax, wallmax/60, wallmax/3600); #else /* TIMEDEBUG */ fprintf(ofp, "\n\nBelow the distribution of computing times (wallclock) per host is shown.\n"); fprintf(ofp, "The times are shown in seconds, minutes, and hours. At the bottom of the table the\n"); fprintf(ofp, "the maximum wallclock times is shown.\n\n"); fprintf(ofp, "process wallclock[s] [min] [hours] \n"); fprintf(ofp, "----------------------------------------------------------------------------\n"); for (n=0; n wallmax) wallmax=fullwalltimes[n]; cpusum += fullcputimes[n]; } /* for */ fprintf(ofp, "----------------------------------------------------------------------------\n"); fprintf(ofp, "Sum/Max: %11.1f %9.1f %9.1f \n", wallmax, wallmax/60, wallmax/3600); #endif /* TIMEDEBUG */ fullcpu = cpusum; fulltime = wallmax; } /* writetimesstat */ #endif /* write current user tree to file */ void writecutree(FILE *ofp, int num) { int df; double pval, delta; if (typ_optn == TREERECON_OPTN) { /***************************************************************************/ /* MAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER DEFINED TREE #xxx (NO CLOCK) */ /***************************************************************************/ if (puzzlemode == USERTREE) { fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER"); fprintf(ofp, " DEFINED TREE # %d (NO CLOCK)\n\nBranch lengths are computed using", num); fprintf(ofp, " the selected model of\nsubstitution and rate heterogeneity.\n\n\n"); clockmode = 0; /* nonclocklike branch lengths */ prtopology(ofp); fprintf(ofp, "\n"); resulttree(ofp, usebranch_optn); fprintf(ofp, "\n\nUnrooted user defined tree with maximum likelihood branch lengths"); fprintf(ofp, "\n(in CLUSTAL W notation):\n\n"); fputphylogeny(ofp); fflush(ofp); /*****************************************************************************/ /* MAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER DEFINED TREE #xxx (WITH CLOCK) */ /*****************************************************************************/ if (compclock) { fprintf(ofp, "\n\nMAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER"); fprintf(ofp, " DEFINED TREE # %d (WITH CLOCK)\n\nBranch lengths are computed using", num); fprintf(ofp, " the selected model of\nsubstitution and rate heterogeneity.\n"); fprintf(ofp, "\nRoot located at branch: %d ", locroot+1); if (locroot 1) fprintf(ofp, "- WARNING: %d best locations found! -", numbestroot); fprintf(ofp, "\n\n"); fprintf(ofp, "If the automatic search misplaces the root please rerun the analysis\n"); fprintf(ofp, "and select location of root manually!"); fprintf(ofp, "\n\n\n"); } if (rootsearch == ROOT_DISPLAYED) fprintf(ofp, "(displayed outgroup)\n\n\n"); clockmode = 1; /* clocklike branch lengths */ prtopology(ofp); fprintf(ofp, "\n"); resulttree(ofp, usebranch_optn); fprintf(ofp, "\n"); resultheights(ofp); fprintf(ofp, "\n\nRooted user defined tree with clocklike "); fprintf(ofp, "maximum likelihood branch lengths\n"); fprintf(ofp, "(in CLUSTAL W notation):\n\n"); fputrooted(ofp, locroot); fflush(ofp); } /*****************************************************************************/ /* MOLECULAR CLOCK LIKELIHOOD RATIO TEST FOR USER TREE #xxx */ /*****************************************************************************/ if (compclock) { fprintf(ofp, "\n\nMOLECULAR CLOCK LIKELIHOOD RATIO TEST FOR USER TREE # %d\n\n", num); fprintf(ofp, "log L without clock: %.2f (independent branch parameters: %d)\n", Ctree->lklhd, Numspc + Numibrnch); fprintf(ofp, "log L with clock: %.2f (independent branch parameters: %d)\n\n", Ctree->lklhdc, Numhts + 1); delta = fabs(2.0*((Ctree->lklhd) - (Ctree->lklhdc))); fprintf(ofp, "Likelihood ratio test statistic delta: %.2f\n", delta); df = Numspc + Numibrnch - Numhts - 1; fprintf(ofp, "Degrees of freedom of chi-square distribution: %d\n", df); pval = IncompleteGammaQ (df*0.5, delta*0.5); fprintf(ofp, "Critical significance level: %.2f%%\n\n", pval*100.0); if (pval >= 0.05) { fprintf(ofp, "The simpler (clocklike) tree can not be rejected on a significance\n"); fprintf(ofp, "level of 5%%. The log-likelihood of the more complex (no clock) tree\n"); fprintf(ofp, "is not significantly increased.\n"); } else { fprintf(ofp, "The simpler (clocklike) tree is rejected on a significance level\n"); fprintf(ofp, "of 5%%. The log-likelihood of the more complex (no clock) tree is\n"); fprintf(ofp, "significantly increased.\n"); } fprintf(ofp, "\nPlease take care that the correct root is used!\n"); } } } } /* writecutree */ /******************************************************************************/ /* timer routines */ /******************************************************************************/ void resetqblocktime(timearray_t *ta) { ta->quartcpu += ta->quartblockcpu; ta->quartblockcpu = 0.0; ta->quarttime += ta->quartblocktime; ta->quartblocktime = 0.0; } /* resetqblocktime */ void resetpblocktime(timearray_t *ta) { ta->puzzcpu += ta->puzzblockcpu; ta->puzzblockcpu = 0.0; ta->puzztime += ta->puzzblocktime; ta->puzzblocktime = 0.0; } /* resetpblocktime */ #ifdef TIMEDEBUG void printtimearr(timearray_t *ta) { # if ! PARALLEL int PP_Myid; PP_Myid = -1; # endif printf("(%2d) MMCPU: %11ld / %11ld \n", PP_Myid, ta->maxcpu, ta->mincpu); printf("(%2d) CTick: %11.6f [tks] / %11.6f [s] \n", PP_Myid, ta->mincputick, ta->mincputicktime); printf("(%2d) MMTIM: %11ld / %11ld \n", PP_Myid, ta->maxtime, ta->mintime); printf("(%2d) Mxblk: %11.6e / %11.6e \n", PP_Myid, ta->maxcpublock, ta->maxtimeblock); printf("(%2d) Mnblk: %11.6e / %11.6e \n", PP_Myid, ta->mincpublock, ta->mintimeblock); printf("(%2d) Gnrl: %11.6e / %11.6e \n", PP_Myid, ta->generalcpu, ta->generaltime); printf("(%2d) Optn: %11.6e / %11.6e \n", PP_Myid, ta->optionscpu, ta->optionstime); printf("(%2d) Estm: %11.6e / %11.6e \n", PP_Myid, ta->paramestcpu, ta->paramesttime); printf("(%2d) Qurt: %11.6e / %11.6e \n", PP_Myid, ta->quartcpu, ta->quarttime); printf("(%2d) QBlk: %11.6e / %11.6e \n", PP_Myid, ta->quartblockcpu, ta->quartblocktime); printf("(%2d) QMax: %11.6e / %11.6e \n", PP_Myid, ta->quartmaxcpu, ta->quartmaxtime); printf("(%2d) QMin: %11.6e / %11.6e \n", PP_Myid, ta->quartmincpu, ta->quartmintime); printf("(%2d) Puzz: %11.6e / %11.6e \n", PP_Myid, ta->puzzcpu, ta->puzztime); printf("(%2d) PBlk: %11.6e / %11.6e \n", PP_Myid, ta->puzzblockcpu, ta->puzzblocktime); printf("(%2d) PMax: %11.6e / %11.6e \n", PP_Myid, ta->puzzmaxcpu, ta->puzzmaxtime); printf("(%2d) PMin: %11.6e / %11.6e \n", PP_Myid, ta->puzzmincpu, ta->puzzmintime); printf("(%2d) Tree: %11.6e / %11.6e \n", PP_Myid, ta->treecpu, ta->treetime); printf("(%2d) TBlk: %11.6e / %11.6e \n", PP_Myid, ta->treeblockcpu, ta->treeblocktime); printf("(%2d) TMax: %11.6e / %11.6e \n", PP_Myid, ta->treemaxcpu, ta->treemaxtime); printf("(%2d) TMin: %11.6e / %11.6e \n", PP_Myid, ta->treemincpu, ta->treemintime); printf("(%2d) C/T : %11.6e / %11.6e \n", PP_Myid, (ta->generalcpu + ta->optionscpu + ta->paramestcpu + ta->quartblockcpu + ta->puzzblockcpu + ta->treeblockcpu), (ta->generaltime + ta->optionstime + ta->paramesttime + ta->quartblocktime + ta->puzzblocktime + ta->treeblocktime)); printf("(%2d) CPU: %11.6e / Time: %11.6e \n", PP_Myid, ta->cpu, ta->time); printf("(%2d) aCPU: %11.6e / aTime: %11.6e \n", PP_Myid, ta->fullcpu, ta->fulltime); } /* printtimearr */ #endif /* TIMEDEBUG */ char *jtype [7]; void inittimearr(timearray_t *ta) { clock_t c0, c1, c2; jtype[OVERALL] = "OVERALL"; jtype[GENERAL] = "GENERAL"; jtype[OPTIONS] = "OPTIONS"; jtype[PARAMEST] = "PARAMeter ESTimation"; jtype[QUARTETS] = "QUARTETS"; jtype[PUZZLING] = "PUZZLING steps"; jtype[TREEEVAL] = "TREE EVALuation"; ta->currentjob = GENERAL; c1 = clock(); c2 = clock(); while (c1 == c2) c2 = clock(); ta->mincputick = (double)(c2 - c1); ta->mincputicktime = ((double)(c2 - c1))/CLOCKS_PER_SEC; ta->tempcpu = clock(); ta->tempcpustart = ta->tempcpu; ta->tempfullcpu = ta->tempcpu; time(&(ta->temptime)); ta->temptimestart = ta->temptime; ta->tempfulltime = ta->temptime; c0=0; c1=0; c2=(clock_t)((2 * c1) + 1);; while (c1 < c2) { c0 = c1; c1 = c2; c2 = (clock_t)((2 * c1) + 1); } if (c1 == c2) ta->maxcpu=c0; if (c1 > c2) ta->maxcpu=c1; c0=0; c1=0; c2=(clock_t)((2 * c1) - 1); while (c1 > c2) { c0 = c1; c1 = c2; c2 = (clock_t)((2 * c1) - 1); } if (c1 == c2) ta->mincpu=c0; if (c1 < c2) ta->mincpu=c1; ta->maxtime = 0; ta->mintime = 0; ta->maxcpublock = 0; ta->mincpublock = DBL_MAX; ta->maxtimeblock = 0; ta->mintimeblock = DBL_MAX; ta->cpu = 0.0; ta->time = 0.0; ta->fullcpu = 0.0; ta->fulltime = 0.0; ta->generalcpu = 0.0; ta->optionscpu = 0.0; ta->paramestcpu = 0.0; ta->quartcpu = 0.0; ta->quartblockcpu = 0.0; ta->quartmaxcpu = 0.0; ta->quartmincpu = ((double) ta->maxcpu)/CLOCKS_PER_SEC; ta->puzzcpu = 0.0; ta->puzzblockcpu = 0.0; ta->puzzmaxcpu = 0.0; ta->puzzmincpu = ((double) ta->maxcpu)/CLOCKS_PER_SEC; ta->treecpu = 0.0; ta->treeblockcpu = 0.0; ta->treemaxcpu = 0.0; ta->treemincpu = ((double) ta->maxcpu)/CLOCKS_PER_SEC; ta->generaltime = 0.0; ta->optionstime = 0.0; ta->paramesttime = 0.0; ta->quarttime = 0.0; ta->quartblocktime = 0.0; ta->quartmaxtime = 0.0; ta->quartmintime = DBL_MAX; ta->puzztime = 0.0; ta->puzzblocktime = 0.0; ta->puzzmaxtime = 0.0; ta->puzzmintime = DBL_MAX; ta->treetime = 0.0; ta->treeblocktime = 0.0; ta->treemaxtime = 0.0; ta->treemintime = DBL_MAX; } /* inittimearr */ /***************/ void addup(int jobtype, clock_t c1, clock_t c2, time_t t1, time_t t2, timearray_t *ta) { double c, t; if (t2 != t1) t = difftime(t2, t1); else t = 0.0; if (c2 < c1) c = ((double)(c2 - ta->mincpu))/CLOCKS_PER_SEC + ((double)(ta->maxcpu - c1))/CLOCKS_PER_SEC; else c = ((double)(c2 - c1))/CLOCKS_PER_SEC; if (jobtype != OVERALL) { if (ta->mincpublock > c) ta->mincpublock = c; if (ta->maxcpublock < c) ta->maxcpublock = c; if (ta->mintimeblock > t) ta->mintimeblock = t; if (ta->maxtimeblock < t) ta->maxtimeblock = t; switch (jobtype) { case GENERAL: ta->generalcpu += c; ta->generaltime += t; break; case OPTIONS: ta->optionscpu += c; ta->optionstime += t; break; case PARAMEST: ta->paramestcpu += c; ta->paramesttime += t; break; case QUARTETS: ta->quartblockcpu += c; ta->quartblocktime += t; if (ta->quartmincpu > c) ta->quartmincpu = c; if (ta->quartmaxcpu < c) ta->quartmaxcpu = c; if (ta->quartmintime > t) ta->quartmintime = t; if (ta->quartmaxtime < t) ta->quartmaxtime = t; break; case PUZZLING: ta->puzzblockcpu += c; ta->puzzblocktime += t; if (ta->puzzmincpu > c) ta->puzzmincpu = c; if (ta->puzzmaxcpu < c) ta->puzzmaxcpu = c; if (ta->puzzmintime > t) ta->puzzmintime = t; if (ta->puzzmaxtime < t) ta->puzzmaxtime = t; break; case TREEEVAL: ta->treeblockcpu += c; ta->treeblocktime += t; if (ta->treemincpu > c) ta->treemincpu = c; if (ta->treemaxcpu < c) ta->treemaxcpu = c; if (ta->treemintime > t) ta->treemintime = t; if (ta->treemaxtime < t) ta->treemaxtime = t; break; } ta->cpu += c; ta->time += t; } else { ta->fullcpu += c; ta->fulltime += t; } # ifdef TIMEDEBUG { # if ! PARALLEL int PP_Myid = -1; # endif /* !PARALLEL */ printf("(%2d) CPU: +%10.6f / Time: +%10.6f (%s)\n", PP_Myid, c, t, jtype[jobtype]); printf("(%2d) CPU: %11.6f / Time: %11.6f (%s)\n", PP_Myid, ta->cpu, ta->time, jtype[jobtype]); printf("(%2d) CPU: %11.6f / Time: %11.6f (%s)\n", PP_Myid, ta->fullcpu, ta->fulltime, jtype[jobtype]); } # endif /* TIMEDEBUG */ } /* addup */ /***************/ void addtimes(int jobtype, timearray_t *ta) { clock_t tempc; time_t tempt; time(&tempt); tempc = clock(); if ((tempc < ta->tempfullcpu) || (jobtype == OVERALL)) { /* CPU counter overflow for overall time */ addup(OVERALL, ta->tempfullcpu, tempc, ta->tempfulltime, tempt, ta); ta->tempfullcpu = tempc; ta->tempfulltime = tempt; if (jobtype == OVERALL) { addup(ta->currentjob, ta->tempcpustart, tempc, ta->temptimestart, tempt, ta); ta->tempcpustart = ta->tempcpu; ta->tempcpu = tempc; ta->temptimestart = ta->temptime; ta->temptime = tempt; } } if((jobtype != ta->currentjob) && (jobtype != OVERALL)) { /* change of job type */ addup(ta->currentjob, ta->tempcpustart, ta->tempcpu, ta->temptimestart, ta->temptime, ta); ta->tempcpustart = ta->tempcpu; ta->tempcpu = tempc; ta->temptimestart = ta->temptime; ta->temptime = tempt; ta->currentjob = jobtype; } if (tempc < ta->tempcpustart) { /* CPU counter overflow */ addup(jobtype, ta->tempcpustart, tempc, ta->temptimestart, tempt, ta); ta->tempcpustart = ta->tempcpu; ta->tempcpu = tempc; ta->temptimestart = ta->temptime; ta->temptime = tempt; } } /* addtimes */ /******************************************************************************/ /* moved to mlparam.c */ /******************************************************************************/ #if 0 /* estimate parameters of substitution process and rate heterogeneity - no tree n-taxon tree is not needed because of quartet method or NJ tree topology */ void estimateparametersnotree() /* moved to mlparam.c */ /* estimate parameters of substitution process and rate heterogeneity - tree same as above but here the n-taxon tree is already in memory */ void estimateparameterstree() /* moved to mlparam.c */ #endif /******************************************************************************/ /* exported from main */ /******************************************************************************/ void compute_quartlklhds(int a, int b, int c, int d, double *d1, double *d2, double *d3, int approx) { if (approx == APPROX) { *d1 = quartet_alklhd(a,b, c,d); /* (a,b)-(c,d) */ *d2 = quartet_alklhd(a,c, b,d); /* (a,c)-(b,d) */ *d3 = quartet_alklhd(a,d, b,c); /* (a,d)-(b,c) */ } else /* approx == EXACT */ { *d1 = quartet_lklhd(a,b, c,d); /* (a,b)-(c,d) */ *d2 = quartet_lklhd(a,c, b,d); /* (a,c)-(b,d) */ *d3 = quartet_lklhd(a,d, b,c); /* (a,d)-(b,c) */ } } /* compute_quartlklhds */ /***************************************************************/ /* Reconstruct a tree with QP */ /* (parameter estimation already done) */ void recon_tree() { int i; unsigned char tmpweight; /***********************************/ /*** allocation + initialization ***/ /***********************************/ /* allocate and initialize qinfomatr */ qinfomatr = new_ulimatrix(9,Maxspc); for (i = 0; i < Maxspc; i++) { qinfomatr[0][i] = 0; /* missing quartets */ qinfomatr[1][i] = 0; /* fully resolved quartet 1 for taxon i */ qinfomatr[2][i] = 0; /* fully resolved quartet 2 for taxon i */ qinfomatr[3][i] = 0; /* fully resolved quartet 3 for taxon i */ qinfomatr[4][i] = 0; /* partly resolved quartet 1 for taxon i */ qinfomatr[5][i] = 0; /* partly resolved quartet 2 for taxon i */ qinfomatr[6][i] = 0; /* partly resolved quartet 3 for taxon i */ qinfomatr[7][i] = 0; /* unresolved quartet for taxon i */ qinfomatr[8][i] = 0; /* sum of quartets for taxon i */ } /* allocate memory for taxon list of bad quartets */ badtaxon = new_ulivector(Maxspc); for (i = 0; i < Maxspc; i++) badtaxon[i] = 0; /* allocate memory for quartets */ quartetinfo = callocquartets(Maxspc); /* prepare for consensus tree analysis */ initconsensus(); time(&MLstepStarttime); # ifdef DEBUG_PRINTTIMES fprintftimespan(stdout, PEstStoptime, MLstepStarttime, Starttime, "PEst -> MLstep"); # endif /* DEBUG_PRINTTIMES */ /***************/ /*** ML step ***/ /***************/ if (!(readquart_optn) || (readquart_optn && savequart_optn)) { /* compute quartets */ fprintf(STDOUT, "Computing quartet maximum likelihood trees\n"); fflush(STDOUT); computeallquartets(); } time(&MLstepStoptime); # ifdef DEBUG_PRINTTIMES fprintftimespan(stdout, MLstepStarttime, MLstepStoptime, Starttime, "MLstep"); # endif /* DEBUG_PRINTTIMES */ /** output/input if necessary **/ if (savequart_optn) writeallquarts(Maxspc, ALLQUART, quartetinfo); if (readquart_optn) { readallquarts (Maxspc, ALLQUART, quartetinfo); if (show_optn) { /* list all unresolved quartets */ openfiletowrite(&unresfp, UNRESOLVED, "unresolved quartet trees"); fprintf(unresfp, "List of all completely unresolved quartets:\n\n"); } if (readsubset_optn) { /* missing data -> read subsets */ FILE *ssfp; openfiletoread(&ssfp, SUBSET, "taxon subsets"); fprintf(STDOUT, "Reading taxon subsets: %s\n", SUBSET); readsubsetfile(ssfp, Maxspc, Namestr, &Maxsubset, &ss_setovlgraph, &ss_setoverlaps, &ss_setovllist, &ss_setovllistsize, &ss_matrix, &ss_list, &ss_listsize); #if 0 fprintf(stderr,"Maxspc=%d Maxsubset=%d\n", Maxspc, Maxsubset); fprintfss(stdout, Maxspc, Maxsubset, ss_setovlgraph, ss_setoverlaps, ss_setovllist, ss_setovllistsize, ss_matrix, ss_list, ss_listsize); #endif checkss(stdout, Maxspc, Maxsubset, ss_setovlgraph, ss_setoverlaps, ss_setovllist, ss_setovllistsize, ss_matrix, ss_list, ss_listsize); } } /* readquart_optn */ # if !PARALLEL /* do it every time in case of a parallel run - less comunication */ if (readquart_optn) # endif /* PARALLEL */ { int xx1, xx2, xx3, xx4, count; /* initialize qinfomatr */ for (i = 0; i < Maxspc; i++) { qinfomatr[0][i] = 0; /* missing quartets */ qinfomatr[1][i] = 0; /* fully resolved quartet 1 for taxon i */ qinfomatr[2][i] = 0; /* fully resolved quartet 2 for taxon i */ qinfomatr[3][i] = 0; /* fully resolved quartet 3 for taxon i */ qinfomatr[4][i] = 0; /* partly resolved quartet 1 for taxon i */ qinfomatr[5][i] = 0; /* partly resolved quartet 2 for taxon i */ qinfomatr[6][i] = 0; /* partly resolved quartet 3 for taxon i */ qinfomatr[7][i] = 0; /* unresolved quartet for taxon i */ qinfomatr[8][i] = 0; /* sum of quartets for taxon i */ } /* initialize bad quartet memory */ for (count = 0; count < Maxspc; count++) badtaxon[count] = 0; badqs = 0; fullresqs = 0; partresqs = 0; unresqs = 0; missingqs = 0; for (xx4 = 3; xx4 < Maxspc; xx4++) for (xx3 = 2; xx3 < xx4; xx3++) for (xx2 = 1; xx2 < xx3; xx2++) for (xx1 = 0; xx1 < xx2; xx1++) { tmpweight = readquartet(xx1, xx2, xx3, xx4); /* compute sums of topologies per taxon, step by step */ ++(qinfomatr[8][xx1]); ++(qinfomatr[8][xx2]); ++(qinfomatr[8][xx3]); ++(qinfomatr[8][xx4]); ++(qinfomatr[tmpweight][xx1]); ++(qinfomatr[tmpweight][xx2]); ++(qinfomatr[tmpweight][xx3]); ++(qinfomatr[tmpweight][xx4]); if ((tmpweight <= 2) || (tmpweight == 4)) { fullresqs++; } else { if (tmpweight == 7) { unresqs++; } else { if (tmpweight == 0) { missingqs++; } else { partresqs++; } } } if (tmpweight == 7) { /* to be deleted */ badqs++; badtaxon[xx1]++; badtaxon[xx2]++; badtaxon[xx3]++; badtaxon[xx4]++; if (show_optn) { fputid10(unresfp, xx1); fprintf(unresfp, " "); fputid10(unresfp, xx2); fprintf(unresfp, " "); fputid10(unresfp, xx3); fprintf(unresfp, " "); fputid (unresfp, xx4); fprintf(unresfp, "\n"); } /* if show_optn */ } /* if 7 */ /* to be deleted */ } /* end for xx4; for xx3; for xx2; for xx1 */ if (show_optn) /* list all unresolved quartets */ fclose(unresfp); } /* readquart_optn */ # if PARALLEL PP_SendAllQuarts(numquarts(Maxspc), quartetinfo); # endif /* PARALLEL */ /*********************/ /*** puzzling step ***/ /*********************/ fprintf(STDOUT, "Computing quartet puzzling trees\n"); fflush(STDOUT); /* start timer - percentage of completed trees */ time(&time0); time1 = time0; mflag = 0; time(&PStepStarttime); # ifdef DEBUG_PRINTTIMES fprintftimespan(stdout, MLstepStoptime, PStepStarttime, Starttime, "MLstep -> Pstep"); # endif /* DEBUG_PRINTTIMES */ /* open file for chronological list of puzzling step trees */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) openfiletowrite(&qptlist, OUTPTLIST, "puzzling step trees (chonological)"); # if PARALLEL PP_SendDoPermutBlock(Numtrial); # else /* ! PARALLEL */ addtimes(GENERAL, &tarr); /* loop exported to allpstep */ allpstep(Numtrial, quartetinfo, Maxspc, fixedorder_optn); # endif /* else ! PARALLEL */ time(&PStepStoptime); # ifdef DEBUG_PRINTTIMES fprintftimespan(stdout, PStepStarttime, PStepStoptime, Starttime, "Pstep"); # endif /* DEBUG_PRINTTIMES */ /* close file for list of puzzling step trees */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) closefile(qptlist); if (mflag == 1) fprintf(STDOUT, "\n"); /* garbage collection */ free(splitcomptemp); # if ! PARALLEL free_cmatrix(biparts); # endif /* ! PARALLEL */ /**********************/ /*** consensus step ***/ /**********************/ /* compute majority rule consensus tree */ makeconsensus(Numtrial, qsupport_optn); /* write consensus tree to tmp file */ #if 0 if (skipmlbranch_optn && (puzzlemode == QUARTPUZ)) #endif if (!dotreelh_optn && (puzzlemode == QUARTPUZ)) { openfiletowrite(&tmpfp, TREEFILE, "output tree(s)"); writeconsensustree(tmpfp, FALSE, qsupportarr); closefile(tmpfp); } else { tmpfp = tmpfile(); writeconsensustree(tmpfp, FALSE, qsupportarr); } } /* recon_tree */ /***************************************************************/ void map_lklhd() { int i, a, a1, a2, b, b1, b2, c, c1, c2, d; uli nq; double logs[3], d1, d2, d3, temp; ivector qts, mlorder, gettwo; /* reset variables */ ar1 = ar2 = ar3 = 0; reg1 = reg2 = reg3 = reg4 = reg5 = reg6 = reg7 = 0; reg1l = reg1r = reg2u = reg2d = reg3u = reg3d = reg4u = reg4d = reg5l = reg5r = reg6u = reg6d = 0; /* place for random quartet */ qts = new_ivector(4); /* initialize output file */ openfiletowrite(&trifp, TRIANGLE, "Postscript output"); initps(trifp); fprintf(STDOUT, "Performing likelihood mapping analysis\n"); fflush(STDOUT); nq = 0; mflag = 0; addtimes(GENERAL, &tarr); if (lmqts == 0) { /* all possible quartets */ if (numclust == 4) { /* four-cluster analysis */ for (a = 0; a < clustA; a++) for (b = 0; b < clustB; b++) for (c = 0; c < clustC; c++) for (d = 0; d < clustD; d++) { nq++; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(clusterA[a],clusterB[b],clusterC[c],clusterD[d],&d1,&d2,&d3, APPROX); /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } } if (numclust == 3) { /* three-cluster analysis */ gettwo = new_ivector(2); for (a = 0; a < clustA; a++) for (b = 0; b < clustB; b++) for (c1 = 0; c1 < clustC-1; c1++) for (c2 = c1+1; c2 < clustC; c2++) { nq++; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(clusterA[a],clusterB[b],clusterC[c1],clusterC[c2],&d1,&d2,&d3, APPROX); /* randomize order of d2 and d3 */ if (randominteger(2) == 1) { temp = d3; d3 = d2; d2 = temp; } /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } free_ivector(gettwo); } if (numclust == 2) { /* two-cluster analysis */ gettwo = new_ivector(2); for (a1 = 0; a1 < clustA-1; a1++) for (a2 = a1+1; a2 < clustA; a2++) for (b1 = 0; b1 < clustB-1; b1++) for (b2 = b1+1; b2 < clustB; b2++) { nq++; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(clusterA[a1],clusterA[a2],clusterB[b1],clusterB[b2],&d1,&d2,&d3, APPROX); /* randomize order of d2 and d3 */ if (randominteger(2) == 1) { temp = d3; d3 = d2; d2 = temp; } /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } free_ivector(gettwo); } if (numclust == 1) { /* normal likelihood mapping (one cluster) */ mlorder = new_ivector(3); for (i = 3; i < Maxspc; i++) for (c = 2; c < i; c++) for (b = 1; b < c; b++) for (a = 0; a < b; a++) { nq++; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(a,b,c,i,&logs[0],&logs[1],&logs[2], APPROX); /* randomize order */ chooser(3,3,mlorder); d1 = logs[mlorder[0]]; d2 = logs[mlorder[1]]; d3 = logs[mlorder[2]]; /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } free_ivector(mlorder); } } else { /* randomly selected quartets */ if (numclust == 4) { /* four-cluster analysis */ for (lmqts = 0; lmqts < Numquartets; lmqts++) { nq++; /* choose random quartet */ qts[0] = clusterA[ randominteger(clustA) ]; qts[1] = clusterB[ randominteger(clustB) ]; qts[2] = clusterC[ randominteger(clustC) ]; qts[3] = clusterD[ randominteger(clustD) ]; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(qts[0],qts[1],qts[2],qts[3],&d1,&d2,&d3, APPROX); /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } } if (numclust == 3) { /* three-cluster analysis */ gettwo = new_ivector(2); for (lmqts = 0; lmqts < Numquartets; lmqts++) { nq++; /* choose random quartet */ qts[0] = clusterA[ randominteger(clustA) ]; qts[1] = clusterB[ randominteger(clustB) ]; chooser(clustC, 2, gettwo); qts[2] = clusterC[gettwo[0]]; qts[3] = clusterC[gettwo[1]]; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(qts[0],qts[1],qts[2],qts[3],&d1,&d2,&d3, APPROX); /* order of d2 and d3 is already randomized! */ /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } free_ivector(gettwo); } if (numclust == 2) { /* two-cluster analysis */ gettwo = new_ivector(2); for (lmqts = 0; lmqts < Numquartets; lmqts++) { nq++; /* choose random quartet */ chooser(clustA, 2, gettwo); qts[0] = clusterA[gettwo[0]]; qts[1] = clusterA[gettwo[1]]; chooser(clustB, 2, gettwo); qts[2] = clusterB[gettwo[0]]; qts[3] = clusterB[gettwo[1]]; /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(qts[0],qts[1],qts[2],qts[3],&d1,&d2,&d3, APPROX); /* order of d2 and d3 is already randomized! */ /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } free_ivector(gettwo); } if (numclust == 1) { /* normal likelihood mapping (one cluster) */ for (lmqts = 0; lmqts < Numquartets; lmqts++) { nq++; /* choose random quartet */ chooser(Maxspc, 4, qts); /* maximum likelihood values */ /* approximate ML is sufficient */ compute_quartlklhds(qts[0],qts[1],qts[2],qts[3],&d1,&d2,&d3, APPROX); /* order of d1, d2, and d3 is already randomized! */ /* draw point for LM analysis */ makelmpoint(trifp, d1, d2, d3); addtimes(QUARTETS, &tarr); } } } finishps(trifp); closefile(trifp); free_ivector(qts); } /* map_lklhd */ /***************************************************************/ void setdefaults() { strcpy(INFILE, INFILEDEFAULT); strcpy(OUTFILE, OUTFILEDEFAULT); strcpy(TREEFILE, TREEFILEDEFAULT); strcpy(INTREE, INTREEDEFAULT); strcpy(DISTANCES, DISTANCESDEFAULT); strcpy(TRIANGLE, TRIANGLEDEFAULT); strcpy(UNRESOLVED, UNRESOLVEDDEFAULT); strcpy(ALLQUART, ALLQUARTDEFAULT); strcpy(ALLQUARTLH, ALLQUARTLHDEFAULT); strcpy(SITELH, SITELHDEFAULT); strcpy(SITELHB, SITELHBDEFAULT); strcpy(SITERATE, SITERATEDEFAULT); strcpy(SITERATEB, SITERATEBDEFAULT); strcpy(OUTPARAM, OUTPARAMDEFAULT); strcpy(SUBSET, SUBSETDEFAULT); strcpy(OUTPTLIST, OUTPTLISTDEFAULT); strcpy(OUTPTORDER, OUTPTORDERDEFAULT); setprefix_optn = SETPREFIX_NONE; /* 0: not set */ /* 1: INFILE */ /* 2: INTREE */ /* 3: reset by openfileto... */ /* 4: -prefix= */ usebestq_optn = FALSE; usebranch_optn = FALSE; printrmatr_optn = FALSE; savequartlh_optn = FALSE; savequart_optn = FALSE; readquart_optn = FALSE; fixedorder_optn = FALSE; #if 0 skipmlbranch_optn = FALSE; #endif conssub50_optn = FALSE; qsupport_optn = FALSE; dotreetest_optn = TRUE; dotreelh_optn = TRUE; savesitelhb_optn = FALSE; savesitelh_optn = FALSE; savesiterateb_optn = FALSE; savesiterate_optn = FALSE; consensus_optn = FALSE; readsubset_optn = FALSE; #if 0 saveparam_optn = FALSE; #endif randseed = -1; /* to set random random seed */ } /* setdefaults */ /***************************************************************/ void printversion(char *fname) { # if ! PARALLEL fprintf(stderr, "puzzle (%s) %s\n", PACKAGE, VERSION); #else fprintf(stderr, "ppuzzle (%s) %s\n", PACKAGE, VERSION); PP_SendDone(); MPI_Finalize(); # endif exit (0); } /* printversion */ /***************************************************************/ void printusage(char *fname) { /* |<--- 80 characters --->| */ fprintf(stderr, "\n\nUsage: %s [-h] [options] [ Infilename [ UserTreeFilename ] ]\n\n", fname); fprintf(stderr, " -h - print usage\n"); fprintf(stderr, " -prefix=XXX - use 'XXX' as filename prefix instead of 'Infilename'\n"); fprintf(stderr, " of 'Infilename' or 'UserTreeFilename'\n"); fprintf(stderr, " -consmrel - perform consensus step below 50%% to first incongruence,\n"); fprintf(stderr, " that is a 'relative mayority consensus' is built.\n"); fprintf(stderr, " -randseed<#> \n"); fprintf(stderr, " -randseed=<#> - use <#> as random number seed, for debug purposes only\n"); fprintf(stderr, " Infilename - Filename of multiple sequence alignment in PHYLIP format\n"); fprintf(stderr, " UserTreeFilename - Filename of the treefile in PHYLIP format\n"); # if PARALLEL PP_SendDone(); MPI_Finalize(); # endif exit (1); } /* printusage */ /***************************************************************/ void printusagehhh(char *fname) { fprintf(stderr, "\n\nUsage: %s [options] [ Infilename [ UserTreeFilename ] ]\n\n", fname); /* |<--- 80 characters --->| */ fprintf(stderr, " -h - print usage\n"); fprintf(stderr, " -prefix=XXX - use 'XXX' as filename prefix instead of 'Infilename'\n"); fprintf(stderr, " of 'Infilename' or 'UserTreeFilename'\n"); fprintf(stderr, " -consmrel\n"); fprintf(stderr, " -sub50 - perform consensus step below 50%% to first incongruence\n"); fprintf(stderr, " -randseed<#> \n"); fprintf(stderr, " -randseed=<#> - use <#> as random number seed, for debug purposes only\n"); fprintf(stderr, " -wqf - write quartet file to PREFIX.allquart\n"); fprintf(stderr, " -rqf - read quartet file from PREFIX.allquart\n"); fprintf(stderr, " -wqlb - write quart llhs to PREFIX.allquartlh (bin) [non-parallel]\n"); fprintf(stderr, " -wqla - write quart llhs to PREFIX.allquartlh (ASCII)[non-parallel]\n"); fprintf(stderr, " -wsl - write site llhs to PREFIX.sitelh (PHILIP-like)\n"); fprintf(stderr, " -wsr - write site rates to PREFIX.siterate (PHYLIP-like)\n"); fprintf(stderr, " -bestq - use best quart, no Bayesian weights\n"); fprintf(stderr, " -printrmat - print rate matrix to screen\n"); fprintf(stderr, " -consensus - construct a consensus tree from user trees [non-parallel]\n"); fprintf(stderr, " -usebranch - use branch length from usertree file\n"); fprintf(stderr, " -achim - reads quartet set and sets puzzling step orders to 1,2,...n\n"); fprintf(stderr, " -rssm - read subset matrix from PREFIX.subsetmatr for missing data\n"); fprintf(stderr, " -notreetest - skip test for usertree topologies (KH, SH, ELW)\n"); fprintf(stderr, " -notreelh - skip likelihood/branch length (QP or consensus)\n"); fprintf(stderr, " Infilename - Filename of multiple sequence alignment in PHYLIP format\n"); fprintf(stderr, " UserTreeFilename - Filename of the treefile in PHYLIP format\n"); # ifdef USE_ADJUSTABLE_EPS fprintf(stderr, " -epsrate=# - stop threshold for rate heterogeneity estimation (%.2e)\n", EPSILON_RATEPARAM_DEFAULT); fprintf(stderr, " -epssubst=# - stop threshold for subst. parameter estimation (%.2e)\n", EPSILON_SUBSTPARAM_DEFAULT); fprintf(stderr, " -epsbranch=# - stop threshold for branch length estimation (%.2e)\n", EPSILON_BRANCH_DEFAULT); fprintf(stderr, " -epsheight=# - stop threshold for tree height estimation (%.2e)\n", EPSILON_HEIGHTS_DEFAULT); # endif fprintf(stderr, "\n"); #ifdef HHH /* |<--- 80 characters --->| */ fprintf(stderr, " not yet implemented in this version:\n"); fprintf(stderr, " -wslb - write site lhs to PREFIX.sitelhb (binary) [not yet]\n"); fprintf(stderr, " -wsrb - write site rates to PREFIX.siterateb (binary) [not yet]\n"); fprintf(stderr, " -wparam - write params to PREFIX.param [not yet]\n"); fprintf(stderr, " -qsupport - prints quartet support for incorporated splits [not yet]\n"); fprintf(stderr, " -consth=<#> - consensus threshold, e.g. 50=M_50 consensus [not yet]\n"); fprintf(stderr, " -wqnex - write quartets in nexus format [not yet]\n"); fprintf(stderr, " -wsnex - write splits in nexus format [not yet]\n"); fprintf(stderr, " -wsth=<#> - split threshold, e.g. 50 - splits of the M_50 [not yet]\n"); fprintf(stderr, " -wsnex=<#> - write splits with > <#>%% occurence - nexus format[not yet]\n"); fprintf(stderr, " -witnex - write intermediate trees in nexus format [not yet]\n"); fprintf(stderr, " -quartml - use ML values to evaluate quartets [not yet]\n"); fprintf(stderr, " -quartmlapprox - use approximate ML values to evaluate quartets [default]\n"); fprintf(stderr, " -quartnj - use NJ to evaluate quartets [not yet]\n"); fprintf(stderr, " -quartme - use ME to evaluate quartets [not yet]\n"); fprintf(stderr, " -quartpars - use parsimony to evaluate quartets [not yet]\n"); fprintf(stderr, "\n"); #endif /* HHH */ # if PARALLEL PP_SendDone(); MPI_Finalize(); # endif exit (2); } /* printusagehhh */ /***************************************************************/ /* infiletype 1=infile, 2=intree */ void setfilenames(int setprefix_optn, int infiletype, char fname[]){ # if 0 fprintf(stderr, "XXXX: %d, %d, %s\n", setprefix_optn, infiletype, fname); # endif /* set filenames, if set by -prefix=, INFILE, or INTREE */ if (setprefix_optn < SETPREFIX_PREFIX) { switch(setprefix_optn) { case SETPREFIX_INTREE: sprintf(FILEPREFIX, "%s", INTREE); break; case SETPREFIX_INFILE: sprintf(FILEPREFIX, "%s", INFILE); break; default: break; } } sprintf(OUTFILE ,"%s.%s", FILEPREFIX, OUTFILEEXT); sprintf(TREEFILE ,"%s.%s", FILEPREFIX, TREEFILEEXT); sprintf(DISTANCES ,"%s.%s", FILEPREFIX, DISTANCESEXT); sprintf(TRIANGLE ,"%s.%s", FILEPREFIX, TRIANGLEEXT); sprintf(UNRESOLVED ,"%s.%s", FILEPREFIX, UNRESOLVEDEXT); sprintf(ALLQUART ,"%s.%s", FILEPREFIX, ALLQUARTEXT); sprintf(ALLQUARTLH ,"%s.%s", FILEPREFIX, ALLQUARTLHEXT); sprintf(SITELH ,"%s.%s", FILEPREFIX, SITELHEXT); sprintf(SITELHB ,"%s.%s", FILEPREFIX, SITELHBEXT); sprintf(SITERATE ,"%s.%s", FILEPREFIX, SITERATEEXT); sprintf(SITERATEB ,"%s.%s", FILEPREFIX, SITERATEBEXT); sprintf(OUTPARAM ,"%s.%s", FILEPREFIX, OUTPARAMEXT); sprintf(SUBSET ,"%s.%s", FILEPREFIX, SUBSETEXT); sprintf(OUTPTLIST ,"%s.%s", FILEPREFIX, OUTPTLISTEXT); sprintf(OUTPTORDER ,"%s.%s", FILEPREFIX, OUTPTORDEREXT); } /* scancmdline */ /***************************************************************/ void scancmdline(int *argc, char **argv[]) { static short infileset = 0; static short intreefileset = 0; short flagused; int n; int count, dummyint; # ifdef USE_ADJUSTABLE_EPS double dummydbl; # endif for (n = 1; n < *argc; n++) { # ifdef VERBOSE1 printf("argv[%d] = %s\n", n, (*argv)[n]); # endif flagused = FALSE; /* use given prefix rather than INFILENAME for output filename */ dummyint = 0; count = sscanf((*argv)[n],"-prefix=%s%n", FILEPREFIX, &dummyint); if (dummyint>8) { printf("PREFIX set to = \"%s\"\n", FILEPREFIX); setprefix_optn = SETPREFIX_PREFIX; flagused = TRUE; } /* write quartet likelihoods (binary) - only in sequential version */ dummyint = 0; count = sscanf((*argv)[n], "-wqlb%n", &dummyint); if (dummyint == 5) { savequartlh_optn = TRUE; saveqlhbin_optn = TRUE; flagused = TRUE; } /* write quartet likelihoods (ASCII) - only in sequential version */ dummyint = 0; count = sscanf((*argv)[n], "-wqla%n", &dummyint); if (dummyint == 5) { savequartlh_optn = TRUE; saveqlhbin_optn = FALSE; flagused = TRUE; } /* write quartet topologies */ dummyint = 0; count = sscanf((*argv)[n], "-wqf%n", &dummyint); if (dummyint == 4) { savequart_optn = TRUE; flagused = TRUE; } /* read quartet topologies -> no ML step */ dummyint = 0; count = sscanf((*argv)[n],"-rqf%n", &dummyint); if (dummyint == 4) { readquart_optn = TRUE; flagused = TRUE; } /* use quartet topology with best likelihood -> no posterior probs */ dummyint = 0; count = sscanf((*argv)[n],"-bestq%n", &dummyint); if (dummyint == 6) { usebestq_optn = TRUE; flagused = TRUE; } /* print substitution matrix Q to the screen */ dummyint = 0; count = sscanf((*argv)[n],"-printrmat%n", &dummyint); if (dummyint == 10) { printrmatr_optn = TRUE; flagused = TRUE; } /* print extended help */ dummyint = 0; count = sscanf((*argv)[n],"-hhh%n", &dummyint); if (dummyint==4) { printusagehhh((*argv)[0]); flagused = TRUE; } /* resolve congruent splits < 50% (M_rel) in consensus */ dummyint = 0; count = sscanf((*argv)[n],"-sub50%n", &dummyint); if (dummyint == 6) { conssub50_optn = TRUE; flagused = TRUE; } /* resolve congruent splits < 50% (M_rel) in consensus */ dummyint = 0; count = sscanf((*argv)[n],"-consmrel%n", &dummyint); if (dummyint == 9) { conssub50_optn = TRUE; flagused = TRUE; } /* include: fixed order addition (1,2,3,...,n) */ /* no ML branch lengths for consensus */ /* read quartets from file */ dummyint = 0; count = sscanf((*argv)[n],"-achim%n", &dummyint); if (dummyint == 6) { fixedorder_optn = TRUE; #if 0 skipmlbranch_optn = TRUE; #endif dotreelh_optn = FALSE; readquart_optn = TRUE; flagused = TRUE; } # ifdef HHH /* save site likelihoods (binary) file */ dummyint = 0; count = sscanf((*argv)[n], "-wslb%n", &dummyint); if (dummyint == 5) { savesitelhb_optn = TRUE; fprintf(stderr, "cmdline option '-wslb' is not yet implemented!!!\n"); flagused = TRUE; } # endif /* HHH */ /* save site likelihoods to PHYLIP like file */ dummyint = 0; count = sscanf((*argv)[n], "-wsl%n", &dummyint); if (dummyint == 4) { savesitelh_optn = TRUE; flagused = TRUE; } # ifdef HHH /* save site rates (binary) file */ dummyint = 0; count = sscanf((*argv)[n], "-wsrb%n", &dummyint); if (dummyint == 5) { savesiterateb_optn = TRUE; fprintf(stderr, "cmdline option '-wsrb' is not yet implemented!!!\n"); flagused = TRUE; } # endif /* HHH */ /* save site rates to PHYLIP like file */ dummyint = 0; count = sscanf((*argv)[n], "-wsr%n", &dummyint); if (dummyint == 4) { savesiterate_optn = TRUE; flagused = TRUE; } /* print version */ dummyint = 0; count = sscanf((*argv)[n],"-V%n", &dummyint); if (dummyint==2) { printversion((*argv)[0]); flagused = TRUE; } /* print version */ dummyint = 0; count = sscanf((*argv)[n],"-version%n", &dummyint); if (dummyint==8) { printversion((*argv)[0]); flagused = TRUE; } /* print version */ dummyint = 0; count = sscanf((*argv)[n],"--version%n", &dummyint); if (dummyint>=4) { printversion((*argv)[0]); flagused = TRUE; } /* print help message */ dummyint = 0; count = sscanf((*argv)[n],"-h%n", &dummyint); if (dummyint==2) { printusage((*argv)[0]); flagused = TRUE; } /* set random number seed to fixed value */ count = sscanf((*argv)[n],"-randseed%d", &dummyint); if (count == 1) { randseed = dummyint; flagused = TRUE; } /* set random number seed to fixed value */ count = sscanf((*argv)[n],"-randseed=%d", &dummyint); if (count == 1) { randseed = dummyint; flagused = TRUE; } # ifdef USE_ADJUSTABLE_EPS /* set stop threshold for branch length estimation */ dummydbl=EPSILON_BRANCH_DEFAULT; count = sscanf((*argv)[n],"-epsbranch%lf", &dummydbl); if (count == 1) { EPSILON_BRANCH = dummydbl; fprintf(stderr, "branch length estimation threshold set to %e! (default=%e)\n", EPSILON_BRANCH, EPSILON_BRANCH_DEFAULT); flagused = TRUE; } /* set stop threshold for tree heights estimation */ dummydbl=EPSILON_HEIGHTS_DEFAULT; count = sscanf((*argv)[n],"-epsheight%lf", &dummydbl); if (count == 1) { EPSILON_HEIGHTS = dummydbl; fprintf(stderr, "tree heights estimation threshold set to %e! (default=%e)\n", EPSILON_HEIGHTS, EPSILON_HEIGHTS_DEFAULT); flagused = TRUE; } /* set stop threshold for rate heterogeneity estimation */ dummydbl=EPSILON_RATEPARAM_DEFAULT; count = sscanf((*argv)[n],"-epsrate%lf", &dummydbl); if (count == 1) { EPSILON_RATEPARAM = dummydbl; fprintf(stderr, "rate heterogeneity estimation threshold set to %e! (default=%.2e)\n", EPSILON_RATEPARAM, EPSILON_RATEPARAM_DEFAULT); flagused = TRUE; } /* set stop threshold for substitution model parameter estimation */ dummydbl=EPSILON_SUBSTPARAM_DEFAULT; count = sscanf((*argv)[n],"-epssubst%lf", &dummydbl); if (count == 1) { EPSILON_SUBSTPARAM = dummydbl; fprintf(stderr, "substitution model parameter estimation threshold set to %e! (default=%e)\n", EPSILON_SUBSTPARAM, EPSILON_SUBSTPARAM_DEFAULT); flagused = TRUE; } # endif /* compute consensus from usertrees (also 'k' in menu) */ dummyint = 0; count = sscanf((*argv)[n],"-consensus%n", &dummyint); if (dummyint == 10) { consensus_optn = TRUE; flagused = TRUE; } /* read branch lengths from usertree file */ dummyint = 0; count = sscanf((*argv)[n],"-usebranch%n", &dummyint); if (dummyint == 10) { usebranch_optn = TRUE; flagused = TRUE; } /* read subset matrix for missing data analysis */ dummyint = 0; count = sscanf((*argv)[n], "-rssm%n", &dummyint); if (dummyint == 5) { readsubset_optn = TRUE; readquart_optn = TRUE; flagused = TRUE; } /* write quartet support for splits */ dummyint = 0; count = sscanf((*argv)[n], "-qsupport%n", &dummyint); if (dummyint == 9) { qsupport_optn = TRUE; flagused = TRUE; } /* skip tree tests (KH,SH,ELW) */ dummyint = 0; count = sscanf((*argv)[n], "-notreetest%n", &dummyint); if (dummyint == 11) { dotreetest_optn = FALSE; flagused = TRUE; } /* skip lh/branch length computation (QP/consensus)*/ dummyint = 0; count = sscanf((*argv)[n], "-notreelh%n", &dummyint); if (dummyint == 9) { dotreelh_optn = FALSE; flagused = TRUE; } #if 0 /* use window of alignment */ /* todo (HAS) */ count = sscanf((*argv)[n],"-ws%d", &dummyint); if (count == 1) windowsize = dummyint; /* write parameter file (for resart) */ dummyint = 0; count = sscanf((*argv)[n], "-wparam%n", &dummyint); if (dummyint == 7) { saveparam_optn = TRUE; flagused = TRUE; } #endif /* get alignment filename */ if ((*argv)[n][0] != '-') { if (infileset == 0) { if (strlen((*argv)[n]) >= FILENAMELENGTH) { fprintf(STDOUT, "Unable to proceed (filename too long)\n"); fprintf(STDOUT, "You may want to recompile with FILENAMELENGTH>%d\n\n\n", FILENAMELENGTH); # if PARALLEL PP_Finalize(); # endif exit(1); } strcpy(INFILE, (*argv)[n]); infileset++; if (setprefix_optn < SETPREFIX_PREFIX) { strcpy(FILEPREFIX, INFILE); /* printf("PREFIX set to = \"%s\"\n", FILEPREFIX); */ setprefix_optn = SETPREFIX_INFILE; } fprintf(STDOUT, "Input file: %s\n", INFILE); flagused = TRUE; } else { /* get usertree filename */ if (intreefileset == 0) { if (strlen((*argv)[n]) >= FILENAMELENGTH) { fprintf(STDOUT, "Unable to proceed (filename too long)\n"); fprintf(STDOUT, "You may want to recompile with FILENAMELENGTH>%d\n\n\n", FILENAMELENGTH); # if PARALLEL PP_Finalize(); # endif exit(1); } strcpy(INTREE, (*argv)[n]); intreefileset++; if (setprefix_optn < SETPREFIX_PREFIX) { strcpy(FILEPREFIX, INTREE); /* printf("PREFIX set to = \"%s\"\n", FILEPREFIX); */ setprefix_optn = SETPREFIX_INTREE; } fprintf(STDOUT, "Usertree file: %s\n", INTREE); flagused = TRUE; } } } if (flagused == FALSE) { fprintf(stderr, "WARNING: commandline parameter %d not recognized (\"%s\")\n", n, (*argv)[n]); } flagused = FALSE; } /* setprefix_optn = SETPREFIX_INFILE; */ if (setprefix_optn > 0) { setfilenames(setprefix_optn, RESET_NONE, INFILE); } } /* scancmdline */ /***************************************************************/ void inputandinit(int *argc, char **argv[]) { int ci; int taxon; int reset; #ifdef EPE_DEBUG int i; /*epe*/ #endif /* EPE_DEBUG */ # ifndef ALPHA fprintf(STDOUT, "\n\n\nWELCOME TO TREE-PUZZLE %s!\n\n\n\n", VERSION); # else fprintf(STDOUT, "\n\n\nWELCOME TO TREE-PUZZLE %s%s!\n\n\n\n", VERSION, ALPHA); # endif /* vectors used in QP and LM analysis */ qweight = new_dvector(3); sqdiff = new_dvector(3); qworder = new_ivector(3); sqorder = new_ivector(3); /**************************************/ /*** pre-calculations of parameters ***/ /**************************************/ /* Initialization and parsing of Commandline */ setdefaults(); scancmdline(argc, argv); /* initialize random numbers generator */ if (randseed >= 0) fprintf(stderr, "WARNING: random seed set to %d for debugging!\n", randseed); randseed = initrandom(randseed); fprintf(STDOUT, "RANDOM SEED: %d\n", randseed); psteptreelist = NULL; psteptreesum = 0; bestratefound = 0; /* get sequences */ reset = openfiletoread(&seqfp, INFILE, "sequence data"); #if 0 fprintf(stderr, "INFILE=%s\n", INFILE); #endif if (reset && (setprefix_optn < SETPREFIX_INTREE)) { setprefix_optn = SETPREFIX_INFILE; setfilenames(setprefix_optn, RESET_INFILE, INFILE); } /* XXX INFILE */ readsequencefile(seqfp, &Maxspc, &Maxseqc, &Identif, &Namestr, &Seqchars); fprintf(STDOUT, "\nInput data set (%s) contains %d sequences of length %d\n", INFILE, Maxspc, Maxseqc); Maxbrnch = 2*Maxspc - 3; /* output taxa to STDOUT */ for (taxon = 0; taxon < Maxspc; taxon++) { fprintf(stdout, "%4d. ", taxon+1); fputid(stdout, taxon); fprintf(stdout, "\n"); } /* for taxon (species) */ closefile(seqfp); data_optn = guessdatatype(Seqchars, Maxspc, Maxseqc); /* translate characters into format used by ML engine */ nuc_optn = TRUE; SH_optn = FALSE; Seqchar = NULL; translatedataset(Maxspc, Maxseqc, &Maxsite, Seqchars, &Seqchar, &Seqgapchar, &Seqotherchar); /* estimate base frequencies from data set */ Freqtpm = NULL; Basecomp = NULL; estimatebasefreqs(); /* guess model of substitution */ guessmodel(); /* initialize guess variables */ auto_datatype = AUTO_GUESS; if (data_optn == AMINOACID) auto_aamodel = AUTO_GUESS; else auto_aamodel = AUTO_DEFAULT; /* save guessed amino acid options */ guessDayhf_optn = Dayhf_optn; guessJtt_optn = Jtt_optn; guessmtrev_optn = mtrev_optn; guesscprev_optn = cprev_optn; guessblosum62_optn = blosum62_optn; guessvtmv_optn = vtmv_optn; guesswag_optn = wag_optn; guessauto_aamodel = auto_aamodel; /* check for user specified tree */ if ((utfp = fopen(INTREE, "r")) != NULL) { fclose(utfp); if (! consensus_optn) puzzlemode = USERTREE; else puzzlemode = CONSENSUS; } else { puzzlemode = QUARTPUZ; } /* reserve memory for cluster LM analysis */ clusterA = new_ivector(Maxspc); clusterB = new_ivector(Maxspc); clusterC = new_ivector(Maxspc); clusterD = new_ivector(Maxspc); /**********************************/ /*** menu setting of parameters ***/ /**********************************/ /* set options interactively */ setoptions(); /* open usertree file right after start */ if (typ_optn == TREERECON_OPTN && (puzzlemode == USERTREE || puzzlemode == CONSENSUS)) { openfiletoread(&utfp, INTREE, "user trees"); if (reset && (setprefix_optn < SETPREFIX_PREFIX)) { setprefix_optn = SETPREFIX_INTREE; setfilenames(setprefix_optn, RESET_INTREE, INTREE); } /* XXX INFILE */ } /* start main timer */ time(&Starttime); Startcpu=clock(); addtimes(OPTIONS, &tarr); /* symmetrize doublet frequencies if specified */ symdoublets(); /* initialise ML */ mlstart(); /* determine how many usertrees */ if (typ_optn == TREERECON_OPTN && (puzzlemode == USERTREE || puzzlemode == CONSENSUS)) { numutrees = 0; do { ci = fgetc(utfp); if ((char) ci == ';') numutrees++; } while (ci != EOF); rewind(utfp); if (numutrees < 1) { fprintf(STDOUT, "Unable to proceed (no tree in input tree file)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } /*epe PP_SendSizes ()/SendData() relocated*/ # if PARALLEL # ifndef USE_WINDOWS PP_SendSizes(Maxspc, Maxsite, numcats, Numptrn, tpmradix, outgroup, fracconst, randseed, fixedorder_optn, consensus_optn); # else PP_SendSizes(Maxspc, Maxsite, alimaxsite, alistart, aliend, numcats, Numptrn, tpmradix, outgroup, fracconst, randseed, fixedorder_optn, consensus_optn); # endif PP_SendData(Seqpat, /* cmatrix */ Alias, Weight, constpat, /* ivector */ Rates, Eval, Freqtpm, /* dvector */ Evec, Ievc, iexp, /* Distanmat,*/ /* dmatrix */ ltprobr); /* dcube */ PP_NoUpdate(); # endif /* PARALLEL */ addtimes(GENERAL, &tarr); time(&PEstStarttime); # ifdef PRINTTIME_DEBUG fprintftimespan(stdout, Starttime, PEstStarttime, Starttime, "Start -> PEst"); # endif /* PRINTTIME_DEBUG */ /*moved from mlstart by epe*/ /* computing ML distances */ computedistan(); #ifdef EPE_DEBUG /*epe*/ for (i=1; i MAXFI) fracinv = MAXFI; addtimes(GENERAL, &tarr); time(&PEstStarttime); # ifdef DEBUG_PRINTTIMES fprintftimespan(stdout, Starttime, PEstStarttime, Starttime, "Start -> PEst"); # endif /* DEBUG_PRINTTIMES */ /***************************/ /*** estimate parameters ***/ /***************************/ if (!(typ_optn == TREERECON_OPTN && (puzzlemode == USERTREE || puzzlemode == CONSENSUS))) { /* no tree present */ estimateparametersnotree(); } else { if (utree_optn) { /* use 1st user tree */ readusertree(utfp, usebranch_optn); rewind(utfp); estimateparameterstree(); } else { /* don't use first user tree */ estimateparametersnotree(); } } time(&PEstStoptime); # ifdef PRINTTIME_DEBUG fprintftimespan(stdout, PEstStarttime, PEstStoptime, Starttime, "PEst"); # endif /* PRINTTIME_DEBUG */ addtimes(PARAMEST, &tarr); /* compute expected Ts/Tv ratio */ if (data_optn == NUCLEOTIDE) computeexpectations(); /*epe*/ # if PARALLEL PP_Final_Update(); # endif /* free_ivector(Seqgapchar); */ /* free_ivector(Seqotherchar); */ } /* inputandinit */ /***************************************************************/ void evaluatetree(FILE *intreefp, FILE *outtreefp, int pmode, int utreenum, int maxutree, int *oldlocroot) /* FILE *intreefp, - file to read tree(s) from */ /* FILE *outtreefp, - file to write result to */ /* int pmode, - analysis type: QUARTPUZ/USERTREE */ /* int utreenum, - current tree number */ /* int maxutree, - amount of trees to analyse */ /* int *oldlocroot - root location for clock analysis */ { switch (pmode) { case QUARTPUZ: /* read QP tree */ readusertree(intreefp, usebranch_optn); fprintf(STDOUT, "Computing maximum likelihood branch lengths (without clock)\n"); fflush(STDOUT); /* pre-set branchlen = FALSE; parallel estim = FALSE */ usertree_lklhd(FALSE, FALSE); /* for savesitelh_optn */ allsitelkl(Ctree->condlkl, allsites[0]); if (rhetmode != UNIFORMRATE) { findbestratecombination(); } break; case USERTREE: /* read user tree */ readusertree(intreefp, usebranch_optn); fprintf(STDOUT, "Computing maximum likelihood branch lengths (without clock) for tree # %d\n", utreenum+1); fflush(STDOUT); /* pre-set branchlen = TRUE; parallel estim = FALSE */ if (usebranch_optn) usertree_lklhd(TRUE, FALSE); /* pre-set branchlen = FALSE; parallel estim = FALSE */ else usertree_lklhd(FALSE, FALSE); if (maxutree > 1) { ulkl[utreenum] = Ctree->lklhd; allsitelkl(Ctree->condlkl, allsites[utreenum]); } else { /* if maxutree == 1 */ /* for savesitelh_optn */ allsitelkl(Ctree->condlkl, allsites[0]); } if ((utreenum==0) && (rhetmode != UNIFORMRATE)) { findbestratecombination(); } break; } /* switch (pmode) */ if (compclock) { /* clocklike branch length */ switch (pmode) { case QUARTPUZ: fprintf(STDOUT, "Computing maximum likelihood branch lengths (with clock)\n"); fflush(STDOUT); break; case USERTREE: fprintf(STDOUT, "Computing maximum likelihood branch lengths (with clock) for tree # %d\n", utreenum+1); fflush(STDOUT); break; } /* find best place for root */ /* default user-set root */ rootsearch = ROOT_USER; /* save or reset the default (user set or -1) */ if ((pmode == USERTREE) && (utreenum > 0)) { /* user trees >1 */ locroot = *oldlocroot; } else { /* 1st user tree or reconstructed tree */ *oldlocroot = locroot; } if (locroot < 0) { /* not set (-1) -> automatic */ locroot = findrootedge(); rootsearch = ROOT_AUTO; } /* if user-specified edge for root does not exist use */ /* displayed outgroup */ if (!checkedge(locroot)) { locroot = outgroup; rootsearch = ROOT_DISPLAYED; } /* compute likelihood */ clock_lklhd(locroot); if (maxutree > 1) { ulklc[utreenum] = Ctree->lklhdc; allsitelkl(Ctree->condlkl, allsitesc[utreenum]); } else { /* if maxutree == 1 */ /* for savesitelh_optn */ allsitelkl(Ctree->condlkl, allsitesc[0]); } } /* write ML branch length tree to outree file */ clockmode = 0; /* nonclocklike branch lengths */ fprintf(outtreefp, "[ lh=%.6f ]", Ctree->lklhd); fputphylogeny(outtreefp); /* clocklike branch lengths */ if (compclock) { clockmode = 1; fprintf(outtreefp, "[ lh=%.6f ]", Ctree->lklhdc); fputrooted(outtreefp, locroot); } fflush(outtreefp); } /* evaluatetree */ /***************************************************************/ void memcleanup() { if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) { free(splitfreqs); free(splitpatterns); free(splitsizes); free_ivector(consconfid); free_ivector(conssizes); free_cmatrix(consbiparts); free_ulivector(badtaxon); free_ulimatrix(qinfomatr); if(readsubset_optn) { free_imatrix(ss_setovlgraph); free_imatrix(ss_setoverlaps); free_imatrix(ss_setovllist); free_ivector(ss_setovllistsize); free_imatrix(ss_matrix); free_imatrix(ss_list); free_ivector(ss_listsize); } } free_cmatrix(Identif); free_cmatrix(Namestr); free_dvector(Freqtpm); free_imatrix(Basecomp); free_ivector(clusterA); free_ivector(clusterB); free_ivector(clusterC); free_ivector(clusterD); free_dvector(qweight); free_dvector(sqdiff); free_ivector(qworder); free_ivector(sqorder); freetreelist(&psteptreelist, &psteptreenum, &psteptreesum); freequartets(); } /* memcleanup */ /***************************************************************/ /*** ***/ /*** routines for consensus tree computation ***/ /*** ***/ /***************************************************************/ /* produce consensus from usertrees (onlyconsensus.c) */ /***************************************************************/ /* print i leading spaces to stream fp */ void indent(FILE *fp, int i) { int n; for (n=0; n < i; n++) fputc(' ', fp); } /* indent */ /******************/ /* print speciesnames in leafset (size = setsize) to stream fp */ void printset(FILE *fp, int *leafset, int setsize) { int i; fprintf(fp, "Size=%d: ", setsize); for (i = 0; i < (setsize) ; i++) { fprintf(fp, "%d (", leafset[i]); fputid10(fp, leafset[i]); fprintf(fp, "),"); } fprintf(fp, "\n"); fflush(fp); } /* printset */ /***************************************************************************/ /* copy subtree recursively */ void subtree2bipart(int depth, /* depth from root (for debug) */ cmatrix bip, /* list of bipartitions */ int *numsp, /* number of bipartitions in it */ int *leafset, /* set of leaves in this subtree */ int *setsize, /* size of the set of leaves */ Node *np) /* edge in puzzling step tree */ { int x; int *leafsetr; /* set of leaves in this subtree */ int setsizer; /* size of the set of leaves */ Node *tp; /* test whether we are on an external node */ if (np->isop == NULL) { leafset[(*setsize)] = np->number; (*setsize)++; return; } /* leafsetr = new_ivector(Maxspc); */ setsizer = 0; /* we are NOT on a leaf */ tp = np->isop; while (tp != np) { leafsetr = new_ivector(Maxspc); setsizer = 0; for (x = 0; x < setsizer ; x++) { leafsetr[x]=-1; } subtree2bipart(depth + 1, bip, numsp, leafsetr, &setsizer, tp->kinp); for (x = 0; x < setsizer ; x++) { leafset[(*setsize) + x] = leafsetr[x]; } (*setsize) += setsizer; tp = tp->isop; free_ivector(leafsetr); } if (depth > 1){ for (x = 0; x < (*setsize) ; x++) { bip[*numsp][leafset[x]] = '.'; } # ifdef VERBOSE1 indent(stderr, depth*2); for (x = 0; x < Maxspc ; x++) { fprintf(stderr, "%c", bip[*numsp][x]); } fprintf(stderr, "\n"); # endif /* VERBOSE */ (*numsp)++; } } /* subtree2bipart */ /***************************************************************************/ /* copy treestructure to sorting structure */ void tree2bipart(cmatrix bip, int *numsp) { int *leafset; /* set of leaves in this subtree */ int setsize; /* size of the set of leaves */ int depth; leafset = new_ivector(Maxspc); depth = 0; setsize = 0; /* we are NOT on a leaf */ subtree2bipart(depth + 1, bip, numsp, leafset, &setsize, Ctree->ebrnchp[outgroup]->kinp); free_ivector(leafset); } /* tree2bipart */ /***************************************************************************/ /***************************************************************************/ void usertreeconsensus(FILE* utfp, FILE* outfp, int *oldlocrootptr) { int ci; int i; int n1; int n2; int numsp; FILE *treefp; fprintf(STDOUT, "Performing consensus construction\n"); fflush(STDOUT); numutrees = 0; do { ci = fgetc(utfp); if ((char) ci == ';') numutrees++; } while (ci != EOF); rewind(utfp); if (numutrees < 1) { fprintf(STDOUT, "Unable to proceed (no tree in input tree file)\n\n\n"); exit(1); } /* prepare for consensus tree analysis */ initconsensus(); for (i = 0; i < numutrees; i++) { /* fprintf(stdout, "%d ", i); */ readusertree(utfp, usebranch_optn); for (n1 = 0; n1 < Maxspc - 3; n1++) for (n2 = 0; n2 < Maxspc; n2++) biparts[n1][n2] = '*'; numsp = 0; tree2bipart(biparts, &numsp); makenewsplitentries(biparts, numsp, &splitpatterns, &splitsizes, &splitfreqs, &numbiparts, &maxbiparts, Maxspc); } /* compute majority rule consensus tree */ makeconsensus(numutrees, FALSE); /* write consensus tree */ openfiletowrite(&treefp, TREEFILE, "output tree(s)"); tmpfp = tmpfile(); writeconsensustree(tmpfp, FALSE, qsupportarr); #if 0 if (! skipmlbranch_optn) { #endif if (dotreelh_optn) { rewind(tmpfp); openfiletowrite(&treefp, TREEFILE, "output tree(s)"); evaluatetree(tmpfp, treefp, QUARTPUZ, 0, 1, oldlocrootptr); } else { writeconsensustree(treefp, FALSE, qsupportarr); } closefile(utfp); closefile(treefp); closefile(tmpfp); /* exit(0); */ } /* usertreeconsensus */ /* end onlyconsensus.c */ /******************************************************************************/ /* main part */ /******************************************************************************/ int main(int argc, char *argv[]) { int i, oldlocroot=0; # if !PARALLEL # ifdef USE_CONSOLE argc = ccommand(&argv); # endif # endif /* start main timer */ time(&walltimestart); cputimestart = clock(); inittimearr(&tarr); # if PARALLEL PP_Init(&argc, &argv); if (PP_IamSlave) { slave_main(argc, argv); } else { # endif /* PARALLEL */ inputandinit(&argc, &argv); fprintf(STDOUT, "Writing parameters to file %s\n", OUTFILE); openfiletowrite(&ofp, OUTFILE, "general output"); /* openfiletowrite(&ofp, "xxxx", "general output"); */ writeoutputfile(ofp,WRITEPARAMS); fclose(ofp); /* write distance matrix */ fprintf(STDOUT, "Writing pairwise distances to file %s\n", DISTANCES); openfiletowrite(&dfp, DISTANCES, "pairwise distances"); putdistance(dfp); closefile(dfp); /*epe PP_SendSizes()/SendData() relocated*/ #if 0 # if PARALLEL #ifndef USE_WINDOWS PP_SendSizes(Maxspc, Maxsite, numcats, Numptrn, tpmradix, outgroup, fracconst, randseed, fixedorder_optn, consensus_optn); #else PP_SendSizes(Maxspc, Maxsite, alimaxsite, alistart, aliend, numcats, Numptrn, tpmradix, outgroup, fracconst, randseed, fixedorder_optn, consensus_optn); #endif PP_SendData(Seqpat, /* cmatrix */ Alias, Weight, constpat, /* ivector */ Rates, Eval, Freqtpm, /* dvector */ Evec, Ievc, iexp, Distanmat, /* dmatrix */ ltprobr); /* dcube */ # endif /* PARALLEL */ #endif psteptreestrlen = (Maxspc * (int)(1 + log10((double)Maxspc))) + (Maxspc * 3); switch (typ_optn) { case TREERECON_OPTN: /* tree reconstruction */ if (puzzlemode == QUARTPUZ) { /* quartet puzzling */ recon_tree(); } /* quartet puzzling */ break; case LIKMAPING_OPTN: /* likelihood mapping */ map_lklhd(); break; } /* switch typ_optn */ free_cmatrix(Seqchar); free_cmatrix(Seqchars); /* reserve memory for tree statistics */ if (typ_optn == TREERECON_OPTN) { /* CONSENSUS -> QUARTPUZ, allocates unnecessary memory (HAS) */ if ((puzzlemode == USERTREE) && numutrees > 1) { ulkl = new_dvector(numutrees); allsites = new_dmatrix(numutrees,Numptrn); if (compclock) { ulklc = new_dvector(numutrees); allsitesc = new_dmatrix(numutrees,Numptrn); } } else { /* QUARTPUZ, CONSENSUS */ allsites = new_dmatrix(1,Numptrn); if (compclock) { allsitesc = new_dmatrix(1,Numptrn); } } } /* write puzzling step tree list */ if ((listqptrees == PSTOUT_ORDER) || (listqptrees == PSTOUT_LISTORDER)) { openfiletowrite(&qptorder, OUTPTORDER, "puzzling step trees (unique)"); fprintfsortedpstrees(qptorder, psteptreelist, psteptreenum, psteptreesum, 1, 0.0); closefile(qptorder); } /* compute ML branch lengths for QP tree and for 1st user tree */ switch(typ_optn) { case TREERECON_OPTN: addtimes(GENERAL, &tarr); switch (puzzlemode) { case QUARTPUZ: /* read QP tree */ #if 0 if (! skipmlbranch_optn) { #endif if (dotreelh_optn) { rewind(tmpfp); openfiletowrite(&tfp, TREEFILE, "output tree(s)"); evaluatetree(tmpfp, tfp, puzzlemode, 0, 1, &oldlocroot); addtimes(TREEEVAL, &tarr); closefile(tmpfp); closefile(tfp); } openfiletoappend(&ofp, OUTFILE, "general output"); writeoutputfile(ofp,WRITEREST); break; case USERTREE: /* read user tree */ openfiletoappend(&ofp, OUTFILE, "general output"); openfiletowrite(&tfp, TREEFILE, "output tree(s)"); for (i = 0; i < numutrees; i++) { evaluatetree(utfp, tfp, puzzlemode, i, numutrees, &oldlocroot); if (i==0) writeoutputfile(ofp,WRITEREST); writecutree(ofp, i+1); addtimes(TREEEVAL, &tarr); } closefile(tfp); closefile(utfp); break; case CONSENSUS: /* USERCONSENSUS */ openfiletoappend(&ofp, OUTFILE, "general output"); usertreeconsensus(utfp, ofp, &oldlocroot); /* ends with exit */ openfiletoappend(&ofp, OUTFILE, "general output"); writeoutputfile(ofp,WRITEREST); break; default: /* e.g. distances only */ openfiletoappend(&ofp, OUTFILE, "general output"); writeoutputfile(ofp,WRITEREST); break; } /* switch puzzlemode */ break; default: openfiletoappend(&ofp, OUTFILE, "general output"); writeoutputfile(ofp,WRITEREST); break; } /* switch typ_optn */ /* print tree statistics */ if ((typ_optn == TREERECON_OPTN) && (puzzlemode == USERTREE) && (numutrees > 1) && dotreetest_optn) printtreestats(ofp, ulkl, ulklc, numutrees, allsites, allsitesc, Alias, Maxsite, Numptrn, Weight, compclock); if ((savesitelh_optn || savesitelhb_optn) && (typ_optn == TREERECON_OPTN)) { if (savesitelh_optn) { FILE *outf; openfiletowrite(&outf, SITELH, "write site likelihood"); if (puzzlemode == QUARTPUZ) writesitelklmatrixphy(outf, 1, Maxsite, allsites, allsitesc, compclock); else /* puzzlemode == CONSENSUS ??? */ writesitelklmatrixphy(outf, numutrees, Maxsite, allsites, allsitesc, compclock); fclose(outf); } } /* free memory for tree statistics */ if (typ_optn == TREERECON_OPTN) { if ((puzzlemode == USERTREE || puzzlemode == CONSENSUS) && numutrees > 1) { free_dvector(ulkl); free_dmatrix(allsites); if (compclock) { free_dvector(ulklc); free_dmatrix(allsitesc); } } else { free_dmatrix(allsites); if (compclock) free_dmatrix(allsitesc); } } # if PARALLEL PP_SendDone(); # endif /* PARALLEL */ /* write CPU/Wallclock times and parallel statistics */ time(&walltimestop); cputimestop = clock(); addtimes(OVERALL, &tarr); # ifdef TIMEDEBUG printtimearr(&tarr); # endif /* TIMEDEBUG */ fullcpu = tarr.fullcpu; fulltime = tarr.fulltime; # if PARALLEL writetimesstat(ofp); # endif /* PARALLEL */ /* stop timer */ time(&Stoptime); Stopcpu=clock(); timestamp(ofp); closefile(ofp); /* printbestratecombination(stderr); */ mlfinish(); fprintf(STDOUT, "\nAll results written to disk:\n"); fprintf(STDOUT, " Puzzle report file: %s\n", OUTFILE); fprintf(STDOUT, " Likelihood distances: %s\n", DISTANCES); if (typ_optn == TREERECON_OPTN && puzzlemode != PAIRDIST) fprintf(STDOUT, " Phylip tree file: %s\n", TREEFILE); if (typ_optn == TREERECON_OPTN && puzzlemode == QUARTPUZ) { if ((listqptrees == PSTOUT_ORDER) ||(listqptrees == PSTOUT_LISTORDER)) fprintf(STDOUT, " Unique puzzling step trees: %s\n", OUTPTORDER); if ((listqptrees == PSTOUT_LIST) ||(listqptrees == PSTOUT_LISTORDER)) fprintf(STDOUT, " Puzzling step tree list: %s\n", OUTPTLIST); } if (dotreelh_optn && typ_optn == TREERECON_OPTN && puzzlemode != PAIRDIST) { if (savesitelh_optn) fprintf(STDOUT, " Site likelihoods (PHYLIP): %s\n", SITELH); if (savesitelhb_optn) fprintf(STDOUT, " Site likelihoods (binary): %s\n", SITELHB); if (savesiterate_optn) fprintf(STDOUT, " Site rates (PHYLIP): %s\n", SITERATE); if (savesiterateb_optn) fprintf(STDOUT, " Site rates (binary): %s\n", SITERATEB); } if (show_optn && typ_optn == TREERECON_OPTN && puzzlemode == QUARTPUZ) fprintf(STDOUT, " Unresolved quartets: %s\n", UNRESOLVED); if (typ_optn == LIKMAPING_OPTN) fprintf(STDOUT, " Likelihood mapping diagram: %s\n", TRIANGLE); fprintf(STDOUT, "\n"); # ifdef DEBUG_PRINTTIMES fprintftimespan(stdout, PStepStoptime, Stoptime, Starttime, "Pstep -> end"); # endif /* DEBUG_PRINTTIMES */ /* runtime message */ fprintf(STDOUT, "The parameter estimation took %.2f seconds (= %.2f minutes = %.2f hours)\n", difftime(PEstStoptime, PEstStarttime), difftime(PEstStoptime, PEstStarttime)/60., difftime(PEstStoptime, PEstStarttime)/3600.); fprintf(STDOUT, "The ML step took %.2f seconds (= %.2f minutes = %.2f hours)\n", difftime(MLstepStoptime, MLstepStarttime), difftime(MLstepStoptime, MLstepStarttime)/60., difftime(MLstepStoptime, MLstepStarttime)/3600.); fprintf(STDOUT, "The puzzling step took %.2f seconds (= %.2f minutes = %.2f hours)\n", difftime(PStepStoptime, PStepStarttime), difftime(PStepStoptime, PStepStarttime)/60., difftime(PStepStoptime, PStepStarttime)/3600.); fprintf(STDOUT, "The computation took %.2f seconds (= %.2f minutes = %.2f hours)\n", difftime(Stoptime, Starttime), difftime(Stoptime, Starttime)/60., difftime(Stoptime, Starttime)/3600.); fprintf(STDOUT, " including input %.2f seconds (= %.2f minutes = %.2f hours)\n", fulltime, fulltime/60., fulltime/3600.); #ifdef TIMEDEBUG fprintf(STDOUT, "and %.0f seconds CPU time (= %.2f minutes = %.2f hours)\n\n", fullcpu, fullcpu/60., fullcpu/3600.); #endif /* TIMEDEBUG */ /* free memory */ memcleanup(); # if PARALLEL } /* !IamSlave */ PP_Finalize(); # endif /* PARALLEL */ return 0; } /* main */ /* compare function for uli - sort largest numbers first */ int ulicmp(const void *ap, const void *bp) { uli a, b; a = *((uli *) ap); b = *((uli *) bp); if (a > b) return -1; else if (a < b) return 1; else return 0; } /* ulicmp */ /* compare function for int - sort smallest numbers first */ int intcmp(const void *ap, const void *bp) { int a, b; a = *((int *) ap); b = *((int *) bp); if (a < b) return -1; else if (a > b) return 1; else return 0; } /* intcmp */ tree-puzzle-5.2/src/puzzle2.c0000644000076400001440000015177110074430400011701 /* * puzzle2.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include "puzzle.h" #include #if PARALLEL # include "ppuzzle.h" # include "sched.h" #endif /* PARALLEL */ /******************************************************************************/ /* sequences */ /******************************************************************************/ /* read ten characters of current line as identifier */ void readid(FILE *infp, int t) { int i, j, flag, ci; for (i = 0; i < 10; i++) { ci = fgetc(infp); if (ci == EOF || !isprint(ci)) { fprintf(STDOUT, "\n\n\nUnable to proceed (no name for sequence %d)\n\n\n", t+1); # if PARALLEL PP_Finalize(); # endif exit(1); } Identif[t][i] = (char) ci; } /* convert leading blanks in taxon name to underscores */ flag = FALSE; for (i = 9; i > -1; i--) { if (flag == FALSE) { if (Identif[t][i] != ' ') flag = TRUE; } else { if (Identif[t][i] == ' ') Identif[t][i] = '_'; } } /* check whether this name is already used */ for (i = 0; i < t; i++) { /* compare with all other taxa */ flag = TRUE; /* assume identity */ for (j = 0; (j < 10) && (flag == TRUE); j++) if (Identif[t][j] != Identif[i][j]) flag = FALSE; if (flag) { fprintf(STDOUT, "\n\n\nUnable to proceed (multiple occurence of sequence name '"); fputid(STDOUT, t); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } } /* readid */ /******************/ /* read next allowed character */ char readnextcharacter(FILE *ifp, int notu, int nsite) { char c; /* ignore blanks and control characters except newline (UNIX,DOS) or CR (Mac,DOS) */ do { if (fscanf(ifp, "%c", &c) != 1) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing character at position %d in sequence '", nsite + 1); fputid(STDOUT, notu); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } while (c == ' ' || (iscntrl((int) c) && (c != '\n') && (c != '\r'))); return c; } /* readnextcharacter */ /******************/ /* skip rest of the line */ void skiprestofline(FILE *ifp, /* input file stream */ int notu, /* taxon number - for error msg. */ int nsite) /* sequence position - for error msg. */ { int ci; /* read chars until the first newline or CR */ do{ ci = fgetc(ifp); if (ci == EOF) { fprintf(STDOUT, "Unable to proceed (missing newline at position %d in sequence '", nsite + 1); fputid(STDOUT, notu); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } while (((char) ci != '\n') && ((char) ci != '\r')); } /* skiprestofline */ /******************/ /* skip control characters and blanks */ void skipcntrl(FILE *ifp, /* input file stream */ int notu, /* taxon number - for error msg. */ int nsite) /* sequence position - for error msg. */ { int ci; /* read over all control characters and blanks */ do { ci = fgetc(ifp); if (ci == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing character at position %d in sequence '", nsite + 1); fputid(STDOUT, notu); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } while (iscntrl(ci) || (char) ci == ' '); /* go one character back */ if (ungetc(ci, ifp) == EOF) { fprintf(STDOUT, "\n\n\nUnable to proceed (positioning error at position %d in sequence '", nsite + 1); fputid(STDOUT, notu); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } /* skipcntrl */ /******************/ /* read sequences of one data set */ void getseqs(FILE *ifp, /* in: input file stream */ int Maxspc, /* in: number of taxa */ int Maxseqc, /* in: number of sites */ cmatrix *seqch, /* out: alignment matrix */ cmatrix identif) /* io: taxon names (10 char w/o stop) */ { int notu, nsite, endofline, linelength, i; char c; cmatrix seqchars; seqchars = new_cmatrix(Maxspc, Maxseqc); /* read all characters */ nsite = 0; /* next site to be read */ while (nsite < Maxseqc) { /* read first taxon */ notu = 0; /* only Maxspc, Maxseqc read so far: */ /* go to next true line */ skiprestofline(ifp, notu, nsite); skipcntrl(ifp, notu, nsite); if (nsite == 0) readid(ifp, notu); endofline = FALSE; linelength = 0; do { c = readnextcharacter(ifp, notu, nsite + linelength); if ((c == '\n') || (c == '\r')) endofline = TRUE; else if (c == '.') { fprintf(STDOUT, "\n\n\nUnable to proceed (invalid character '.' at position "); fprintf(STDOUT, "%d in first sequence)\n\n\n", nsite + linelength + 1); # if PARALLEL PP_Finalize(); # endif exit(1); } else if (nsite + linelength < Maxseqc) { /* change to upper case */ seqchars[notu][nsite + linelength] = (char) toupper((int) c); linelength++; } else { endofline = TRUE; skiprestofline(ifp, notu, nsite + linelength); } } while (!endofline); if (linelength == 0) { fprintf(STDOUT, "\n\n\nUnable to proceed (line with length 0 at position %d in sequence '", nsite + 1); fputid(STDOUT, notu); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* read other taxa */ for (notu = 1; notu < Maxspc; notu++) { /* go to next true line */ if (notu != 1) skiprestofline(ifp, notu, nsite); skipcntrl(ifp, notu, nsite); if (nsite == 0) readid(ifp, notu); for (i = nsite; i < nsite + linelength; i++) { c = readnextcharacter(ifp, notu, i); if ((c == '\n') || (c == '\r')) { /* too short */ fprintf(STDOUT, "\n\n\nUnable to proceed (line to short at position %d in sequence '", i + 1); fputid(STDOUT, notu); fprintf(STDOUT, "')\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } else if (c == '.') { seqchars[notu][i] = seqchars[0][i]; } else { /* change to upper case */ seqchars[notu][i] = (char) toupper((int) c); } } } nsite = nsite + linelength; } *seqch =seqchars; } /* getseqs */ /******************/ /* initialize identifer arrays */ void initid(int t, /* in: number of taxa */ cmatrix *identif, /* out: name array w/o end of string */ cmatrix *namestr) /* out: name array with end of string */ { int i, j; *identif = new_cmatrix(t, 10); *namestr = new_cmatrix(t, 11); for (i = 0; i < t; i++) { (*namestr)[i][0] = '\0'; (*namestr)[i][9] = '\0'; for (j = 0; j < 10; j++) { (*identif)[i][j] = ' '; } /* for j */ } /* for i */ } /* initid */ /******************/ /******************/ /* copy undelimited identifer array to '\0' delimited identifer array */ void identif2namestr(int num, /* number of taxa */ cmatrix Identif, /* non-delimited names */ cmatrix Namestr) /* proper delimited names */ { int i, j; int laggingspc; for (i = 0; i < num; i++) { laggingspc = 1; for (j = 9; j >= 0; j--) { Namestr[i][j] = Identif[i][j]; if (laggingspc == 1) { if (Identif[i][j] != ' ') { Namestr[i][j+1] = '\0'; laggingspc = 0; } } } /* for j (letter 10-1) */ } /* for i (species) */ } /* identif2namestr */ /******************/ /* print identifier of specified taxon in full 10 char length */ void fputid10(FILE *ofp, int t) { int i; for (i = 0; i < 10; i++) fputc(Identif[t][i], ofp); } /* fputid10 */ /******************/ /* print identifier of specified taxon up to first space */ int fputid(FILE *ofp, int t) { int i; i = 0; while (i < 10 && Identif[t][i] != ' ') { fputc(Identif[t][i], ofp); i++; } return i; } /* fputid */ /******************/ /* read first line of sequence data set */ void getsizesites(FILE *ifp, /* in: input file stream */ int *Maxspc, /* out: number of taxa */ int *Maxseqc) /* out: number of sites */ { if (fscanf(ifp, "%d", Maxspc) != 1) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing number of sequences)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (fscanf(ifp, "%d", Maxseqc) != 1) { fprintf(STDOUT, "\n\n\nUnable to proceed (missing number of sites)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (*Maxspc < 3) { fprintf(STDOUT, "\n\n\nUnable to proceed (less than 3 sequences - no tree possible)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } seqnumcheck = SEQNUM_OK; if (*Maxspc < 4) { fprintf(STDOUT, "\n\n\nLess than 4 sequences: No quartet methods possible!!!\n\n\n"); fprintf(STDOUT, "Parameter estimation and tree testing is still possible.\n\n\n"); seqnumcheck = SEQNUM_TOOFEW; } if (*Maxspc > 257) { fprintf(STDOUT, "\n\n\nMore than 257 sequences: No quartet puzzling available!!!\n"); fprintf(STDOUT, "Parameter estimation, likelihood mapping, and tree testing is still possible.\n\n\n"); seqnumcheck = SEQNUM_TOOMANY; } /* correct default analysis types */ if ((seqnumcheck!=SEQNUM_OK) && (puzzlemode==QUARTPUZ)) puzzlemode = (puzzlemode + 1) % NUMPUZZLEMODES; if ((seqnumcheck==SEQNUM_TOOFEW) && (typ_optn==LIKMAPING_OPTN)) typ_optn = (typ_optn + 1) % NUMTYPES; #if 0 if (*Maxspc < 4) { fprintf(STDOUT, "\n\n\nUnable to proceed (less than 4 sequences)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (*Maxspc > 257) { fprintf(STDOUT, "\n\n\nUnable to proceed (more than 257 sequences)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } # endif if (*Maxseqc < 1) { fprintf(STDOUT, "\n\n\nUnable to proceed (no sequence sites)\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } } /* getsizesites */ /******************/ /* read alignment from file */ void readsequencefile(FILE *seqfp, /* in: sequence input file stream */ int *Maxspc, /* out: number of taxa */ int *Maxseqc, /* out: number of sites */ cmatrix *identif, /* out: name array w/o end of str */ cmatrix *namestr, /* out: name array with end of str */ cmatrix *Seqchars) /* out: alignment matrix */ { getsizesites(seqfp, Maxspc, Maxseqc); initid(*Maxspc, identif, namestr); getseqs(seqfp, *Maxspc, *Maxseqc, Seqchars, *identif); identif2namestr(*Maxspc, *identif, *namestr); } /* readsequencefile */ /******************/ /* read subsets from file */ void readsubsetfile(FILE *seqfp, /* in: sequence input file stream */ int Maxspc, /* in: number of taxa */ cmatrix namestr, /* in: names taxa (seq file) */ int *Maxsubset, /* out: number of subsets */ imatrix *ss_setovlgraph, /* out: size of overlap >= 3 between 2 subsets */ imatrix *ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix *ss_setovllist, /* out: list with ovlerlapping subsets */ ivector *ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix *ss_matrix, /* out: boolean list: taxon in set? */ imatrix *ss_list, /* out: list of taxa in set */ ivector *ss_listsize) /* out: size of list with taxa */ { int ss_maxspc; int n; int set1, set2; int tmp; cmatrix ss_identarr; cmatrix ss_namearr; cmatrix ss_strmatr; /* read the subset file sizes */ getsizesites(seqfp, &ss_maxspc, Maxsubset); /* check sizes */ if (ss_maxspc != Maxspc) { fprintf(STDOUT, "ERROR: Number of taxa in subsetfile does not match!!! (%d != %d)\n", ss_maxspc, Maxspc); # if PARALLEL PP_SendDone(); MPI_Finalize(); # endif /* PARALLEL */ exit(1); } /* initialize name arrays for checking */ initid(ss_maxspc, &ss_identarr, &ss_namearr); /* read the data */ getseqs(seqfp, ss_maxspc, *Maxsubset, &ss_strmatr, ss_identarr); /* check the file names */ identif2namestr(ss_maxspc, ss_identarr, ss_namearr); for(n = 0; n= 3) { /* number of sequences (>=3) in overlap */ (*ss_setovlgraph)[set1][set2] = tmp; (*ss_setovlgraph)[set2][set1] = tmp; /* list of overlapping sets */ (*ss_setovllist)[set1][((*ss_setovllistsize)[set1])++] = set2; (*ss_setovllist)[set2][((*ss_setovllistsize)[set2])++] = set1; } } } } /* readsubsetfile */ /******************/ /* permute taxon order */ void permutetaxa_ss(int Maxspc, /* in: number of taxa */ ivector permutation, /* permuted taxon order */ cmatrix namestr, /* in: names taxa (seq file) */ int Maxsubset, /* out: number of subsets */ imatrix ss_setovlgraph, /* out: size of overlap >= 3 between 2 subsets */ imatrix ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix ss_setovllist, /* out: list with ovlerlapping subsets */ ivector ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix ss_matrix, /* out: boolean list: taxon in set? */ imatrix ss_list, /* out: list of taxa in set */ ivector ss_listsize) /* out: size of list with taxa */ { ivector candidatesetlist; int candidatesetsize = 0; ivector candidatetaxalist; int candidatetaxasize = 0; ivector taxonstatus; /* 0 - not done; 1 - candidate; 2 - inserted */ ivector setstatus; /* 0 - not used; 1 - front; 2 - used*/ int permpos; int k; int tmprand; int currset; int currtaxon; candidatesetlist = new_ivector(Maxsubset); candidatetaxalist = new_ivector(Maxspc); taxonstatus = new_ivector(Maxspc); setstatus = new_ivector(Maxsubset); /* first subset */ currset = randominteger(Maxsubset); setstatus[currset] = 2; /* inserted */ /* init subset front nodes */ /* insert sets with ovl(currset) >= 3 into candidate set list */ for (k=0; k=3) to set candidate list */ for (k=0; k= 3 between 2 subsets */ imatrix ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix ss_setovllist, /* out: list with ovlerlapping subsets */ ivector ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix ss_matrix, /* out: boolean list: taxon in set? */ imatrix ss_list, /* out: list of taxa in set */ ivector ss_listsize) /* out: size of list with taxa */ { int s, s1, s2, t; for (s=0; s= 3 between 2 subsets */ imatrix ss_setoverlaps, /* out: size of overlap between 2 subsets */ imatrix ss_setovllist, /* out: list with ovlerlapping subsets */ ivector ss_setovllistsize, /* out: size of list with ovlerlapping subsets */ imatrix ss_matrix, /* out: boolean list: taxon in set? */ imatrix ss_list, /* out: list of taxa in set */ ivector ss_listsize) /* out: size of list with taxa */ { int s1, s2; int numdone; int *setarr; setarr = new_ivector(Maxsubset); s1 = 0; numdone=0; do { setarr[s1] = 2; /* 1=seen, 2=visited */ for (s2=0; s2= 3)) setarr[s2]=1; } numdone++; s1=0; while ((s1 < Maxsubset) && (setarr[s1]!=1)) s1++; } while (s1 != Maxsubset); if (Maxsubset != numdone) { fprintf(stderr, "Unable to proceed. More than one connected component! (%d != %d)\n", Maxsubset, numdone); fprintf(stderr, "visited: \n "); for (s2=0; s2 0.85) return NUCLEOTIDE; /* 0 */ else if ((double) numbins / (double) numchars > 0.2) return BINARY; /* 2 */ else return AMINOACID; /* 1 */ } /* guessdatatype */ /******************/ /* translate characters into format used by ML engine */ void translatedataset(int maxspc, int maxseqc, int *maxsite, cmatrix seqchars, cmatrix *seqchar, ivector *seqgapchar, ivector *seqotherchar) { int notu, sn, co; char c; cvector code; if (*seqgapchar != NULL) free_ivector(*seqgapchar); if (*seqotherchar != NULL) free_ivector(*seqotherchar); Seqgapchar = new_ivector(Maxspc); Seqotherchar = new_ivector(Maxspc); /* Seqgapchar = (int *) calloc(maxspc, sizeof(int)); */ /* Seqotherchar = (int *) calloc(maxspc, sizeof(int)); */ /* determine maxsite - number of ML sites per taxon */ if (data_optn == NUCLEOTIDE && SH_optn) { if (SHcodon) *maxsite = maxseqc / 3; else *maxsite = maxseqc / 2; /* assume doublets */ } else *maxsite = maxseqc; if (data_optn == NUCLEOTIDE && (*maxsite % 3) == 0 && !SH_optn) { if (codon_optn == 1 || codon_optn == 2 || codon_optn == 3) *maxsite = *maxsite / 3; /* only one of the three codon positions */ if (codon_optn == 4) *maxsite = 2*(*maxsite / 3); /* 1st + 2nd codon positions */ } /* reserve memory */ if (*seqchar != NULL) free_cmatrix(*seqchar); *seqchar = new_cmatrix(maxspc, *maxsite); /* code length */ if (data_optn == NUCLEOTIDE && SH_optn) code = new_cvector(2); else code = new_cvector(1); /* decode characters */ if (data_optn == NUCLEOTIDE && SH_optn) { /* SH doublets */ for (notu = 0; notu < maxspc; notu++) { for (sn = 0; sn < *maxsite; sn++) { for (co = 0; co < 2; co++) { if (SHcodon) c = seqchars[notu][sn*3 + co]; else c = seqchars[notu][sn*2 + co]; code[co] = c; } (*seqchar)[notu][sn] = code2int(code, &((*seqgapchar)[notu]), &((*seqotherchar)[notu])); } } } else if (!(data_optn == NUCLEOTIDE && (maxseqc % 3) == 0)) { /* use all */ for (notu = 0; notu < maxspc; notu++) { for (sn = 0; sn < *maxsite; sn++) { code[0] = seqchars[notu][sn]; (*seqchar)[notu][sn] = code2int(code, &((*seqgapchar)[notu]), &((*seqotherchar)[notu])); } } } else { /* codons */ for (notu = 0; notu < maxspc; notu++) { for (sn = 0; sn < *maxsite; sn++) { if (codon_optn == 1 || codon_optn == 2 || codon_optn == 3) code[0] = seqchars[notu][sn*3+codon_optn-1]; else if (codon_optn == 4) { if ((sn % 2) == 0) code[0] = seqchars[notu][(sn/2)*3]; else code[0] = seqchars[notu][((sn-1)/2)*3+1]; } else code[0] = seqchars[notu][sn]; (*seqchar)[notu][sn] = code2int(code, &((*seqgapchar)[notu]), &((*seqotherchar)[notu])); } } } free_cvector(code); } /* translatedataset */ /******************/ /* estimate mean base frequencies from translated data set */ void estimatebasefreqs() { int tpmradix, i, j; uli all, *gene; tpmradix = gettpmradix(); if (Freqtpm != NULL) free_dvector(Freqtpm); Freqtpm = new_dvector(tpmradix); if (Basecomp != NULL) free_imatrix(Basecomp); Basecomp = new_imatrix(Maxspc, tpmradix); gene = (uli *) calloc((size_t) (tpmradix + 1), sizeof(uli)); if (gene == NULL) maerror("gene in estimatebasefreqs"); for (i = 0; i < tpmradix + 1; i++) gene[i] = 0; for (i = 0; i < Maxspc; i++) for (j = 0; j < tpmradix; j++) Basecomp[i][j] = 0; for (i = 0; i < Maxspc; i++) for (j = 0; j < Maxsite; j++) { gene[(int) Seqchar[i][j]]++; if (Seqchar[i][j] != tpmradix) Basecomp[i][(int) Seqchar[i][j]]++; } all = Maxspc * Maxsite - gene[tpmradix]; if (all != 0) { /* normal case */ for (i = 0; i < tpmradix; i++) Freqtpm[i] = (double) gene[i] / (double) all; } else { /* pathological case with no unique character in data set */ for (i = 0; i < tpmradix; i++) Freqtpm[i] = 1.0 / (double) tpmradix; } free(gene); Frequ_optn = TRUE; } /* estimatebasefreqs */ /******************/ /* guess model of substitution */ void guessmodel() { double c1, c2, c3, c4, c5, c6; dvector f; dmatrix a; int i; Dayhf_optn = FALSE; Jtt_optn = TRUE; mtrev_optn = FALSE; cprev_optn = FALSE; blosum62_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; TSparam = 2.0; YRparam = 1.0; optim_optn = TRUE; HKY_optn = TRUE; print_GTR_optn = TRUE; GTR_optn = FALSE; TN_optn = FALSE; if (data_optn == AMINOACID) { /* amino acids */ /* chi2 fit to amino acid frequencies */ f = new_dvector(20); a = new_dmatrix(20,20); /* chi2 distance Dayhoff */ dyhfdata(a, f); c1 = 0; for (i = 0; i < 20; i++) c1 = c1 + (Freqtpm[i]-f[i])*(Freqtpm[i]-f[i]); /* chi2 distance JTT */ jttdata(a, f); c2 = 0; for (i = 0; i < 20; i++) c2 = c2 + (Freqtpm[i]-f[i])*(Freqtpm[i]-f[i]); /* chi2 distance mtREV */ mtrevdata(a, f); c3 = 0; for (i = 0; i < 20; i++) c3 = c3 + (Freqtpm[i]-f[i])*(Freqtpm[i]-f[i]); /* chi2 distance VT */ vtmvdata(a, f); c4 = 0; for (i = 0; i < 20; i++) c4 = c4 + (Freqtpm[i]-f[i])*(Freqtpm[i]-f[i]); /* chi2 distance WAG */ wagdata(a, f); c5 = 0; for (i = 0; i < 20; i++) c5 = c5 + (Freqtpm[i]-f[i])*(Freqtpm[i]-f[i]); /* chi2 distance cpREV */ cprev45data(a, f); c6 = 0; for (i = 0; i < 20; i++) c6 = c6 + (Freqtpm[i]-f[i])*(Freqtpm[i]-f[i]); free_dvector(f); free_dmatrix(a); #ifndef CPREV if ((c1 < c2) && (c1 < c3) && (c1 < c4) && (c1 < c5)) { /* c1 -> Dayhoff */ Dayhf_optn = TRUE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { if ((c2 < c3) && (c2 < c4) && (c2 < c5)) { /* c2 -> JTT */ Dayhf_optn = FALSE; Jtt_optn = TRUE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { if ((c3 < c4) && (c3 < c5)) { /* c3 -> mtREV */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = TRUE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on mtDNA)\n"); } else { if ((c4 < c5)) { /* c4 -> VT */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = TRUE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { /* c5 -> WAG */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = TRUE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } /* if c4 else c5 */ } /* if c3 else c4 */ } /* if c2 */ } /* if c1 */ #else /* CPREV */ if ((c1 < c2) && (c1 < c3) && (c1 < c4) && (c1 < c5) && (c1 < c6)) { /* c1 -> Dayhoff */ Dayhf_optn = TRUE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { if ((c2 < c3) && (c2 < c4) && (c2 < c5) && (c2 < c6)) { /* c2 -> JTT */ Dayhf_optn = FALSE; Jtt_optn = TRUE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { if ((c3 < c4) && (c3 < c5) && (c3 < c6)) { /* c3 -> mtREV */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = TRUE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on mtDNA)\n"); } else { if ((c4 < c5) && (c4 < c6)) { /* c4 -> VT */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = TRUE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { if (c5 < c6) { /* c5 -> WAG */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = FALSE; vtmv_optn = FALSE; wag_optn = TRUE; fprintf(STDOUT, "(consists very likely of amino acids encoded on nuclear DNA)\n"); } else { /* if (c6) */ /* c6 -> cpREV */ Dayhf_optn = FALSE; Jtt_optn = FALSE; mtrev_optn = FALSE; cprev_optn = TRUE; vtmv_optn = FALSE; wag_optn = FALSE; fprintf(STDOUT, "(consists very likely of amino acids encoded on cpDNA)\n"); } /* if c5 else c6 */ } /* if c4 else c5 */ } /* if c3 else c4 */ } /* if c2 */ } /* if c1 */ #endif /* CPREV */ } else if (data_optn == NUCLEOTIDE) { fprintf(STDOUT, "(consists very likely of nucleotides)\n"); } else { fprintf(STDOUT, "(consists very likely of binary state data)\n"); } } /* guessmodel */ /******************************************************************************/ /* parts outsourced to treesort.c/treesort.h */ #if 0 /* TREESORT_H */ #endif /* TREESORT_H */ /* parts outsourced to consensus.c/consensus.h */ #if 0 /* CONSENSUS_H */ #endif /* CONSENSUS_H */ /******************************************************************************/ /* storing and evaluating quartet branching information */ /******************************************************************************/ /* general remarks: for a quartet with the taxa a, b, c, d there are three possible binary trees: 1) (a,b)-(c,d) 2) (a,c)-(b,d) 3) (a,d)-(b,c) For every quartet information about its branching structure is stored. With the functions readquartet and writequartet this information can be accessed. For every quartet (a,b,c,d) with a < b < c < d (taxa) the branching information is encoded using 4 bits: value 8 4 2 1 +-------------+-------------+-------------+-------------+ | not used | tree 3 | tree 2 | tree 1 | +-------------+-------------+-------------+-------------+ If the branching structure of the taxa corresponds to one of the three trees the corresponding bit is set. If the branching structure is unclear because two of the three trees have the same maximum likelihood value the corresponding two bits are set. If the branching structure is completely unknown all the bits are set (the highest bit is always cleared because it is not used). */ /* allocate memory for quartets */ unsigned char *callocquartets(int taxa) { uli nc, numch; unsigned char *qinfo; /* compute number of quartets */ Numquartets = (uli) taxa*(taxa-1)*(taxa-2)*(taxa-3)/24; if (Numquartets % 2 == 0) { /* even number */ numch = Numquartets/2; } else { /* odd number */ numch = (Numquartets + 1)/2; } /* allocate memory */ qinfo = (unsigned char *) calloc((size_t) numch, sizeof(unsigned char)); if (qinfo == NULL) maerror("quartetinfo in callocquartets"); for (nc = 0; nc < numch; nc++) qinfo[nc] = 0; return(qinfo); } /* callocquartets */ /* free quartet memory */ void freequartets() { free(quartetinfo); } /* freequartets */ /**************/ /* read quartet info - a < b < c < d */ unsigned char readquartet(int a, int b, int c, int d) { uli qnum; if (! ((a < b) && (b < c) && (c < d))) { fprintf(stderr, "\n\n\nHALT: PLEASE REPORT ERROR HS2 TO DEVELOPERS! (%d,%d,%d,%d)\n", a,b,c,d); # if PARALLEL PP_Finalize(); # endif exit (999); } qnum = (uli) a + (uli) b*(b-1)/2 + (uli) c*(c-1)*(c-2)/6 + (uli) d*(d-1)*(d-2)*(d-3)/24; if (qnum % 2 == 0) { /* even number */ /* bits 0 to 3 */ return (quartetinfo[qnum/2] & (unsigned char) 15); } else { /* odd number */ /* bits 4 to 7 */ return ((quartetinfo[(qnum-1)/2] & (unsigned char) 240)>>4); } } /* readquartet */ /**************/ /* write quartet info - a < b < c < d, 0 <= info <= 15 */ void writequartet(int a, int b, int c, int d, unsigned char info) { uli qnum; qnum = (uli) a + (uli) b*(b-1)/2 + (uli) c*(c-1)*(c-2)/6 + (uli) d*(d-1)*(d-2)*(d-3)/24; if (qnum % 2 == 0) { /* even number */ /* bits 0 to 3 */ quartetinfo[qnum/2] = ((quartetinfo[qnum/2] & (unsigned char) 240) | (info & (unsigned char) 15)); } else { /* odd number */ /* bits 4 to 7 */ quartetinfo[(qnum-1)/2] = ((quartetinfo[(qnum-1)/2] & (unsigned char) 15) | ((info & (unsigned char) 15)<<4)); } } /* writequartet */ /**************/ /* prototypes */ int openfiletowrite(FILE **, char[], char[]); void closefile(FILE *); /* sorts three doubles in descending order */ void sort3doubles(dvector num, ivector order) { if (num[0] > num[1]) { if(num[2] > num[0]) { order[0] = 2; order[1] = 0; order[2] = 1; } else if (num[2] < num[1]) { order[0] = 0; order[1] = 1; order[2] = 2; } else { order[0] = 0; order[1] = 2; order[2] = 1; } } else { if(num[2] > num[1]) { order[0] = 2; order[1] = 1; order[2] = 0; } else if (num[2] < num[0]) { order[0] = 1; order[1] = 0; order[2] = 2; } else { order[0] = 1; order[1] = 2; order[2] = 0; } } } /* sort3doubles */ /*************************/ /* compute Bayesian weights from log-lkls d1, d2, d3 */ unsigned char loglkl2weight(int a, int b, int c, int i, double d1, double d2, double d3, int usebestq) { double onethird; unsigned char treebits[3]; double templog; unsigned char tmpweight; double temp; double temp1, temp2, temp3; unsigned char discreteweight[3]; double tttqweight[3]; double tttsqdiff[3]; int tttsqorder[3]; int tttqworder[3]; tttqweight[0] = d1; tttqweight[1] = d2; tttqweight[2] = d3; onethird = 1.0/3.0; treebits[0] = (unsigned char) 1; treebits[1] = (unsigned char) 2; treebits[2] = (unsigned char) 4; /* sort in descending order */ sort3doubles(tttqweight, tttqworder); if (usebestq) { tttsqorder[2] = 2; discreteweight[tttsqorder[2]] = treebits[tttqworder[0]]; if (tttqweight[tttqworder[0]] == tttqweight[tttqworder[1]]) { discreteweight[tttsqorder[2]] = discreteweight[tttsqorder[2]] || treebits[tttqworder[1]]; if (tttqweight[tttqworder[1]] == tttqweight[tttqworder[2]]) { discreteweight[tttsqorder[2]] = discreteweight[tttsqorder[2]] || treebits[tttqworder[2]]; discreteweight[tttsqorder[2]] = 7; } } } else { /* compute Bayesian weights */ templog = tttqweight[tttqworder[1]]-tttqweight[tttqworder[0]]; if(templog < -TP_MAX_EXP_DIFF) /* possible, since 1.0+exp(>36) == 1.0 */ tttqweight[tttqworder[1]] = 0.0; else tttqweight[tttqworder[1]] = exp(templog); templog = tttqweight[tttqworder[2]]-tttqweight[tttqworder[0]]; if(templog < -TP_MAX_EXP_DIFF) /* possible, since 1.0+exp(>36) == 1.0 */ tttqweight[tttqworder[2]] = 0.0; else tttqweight[tttqworder[2]] = exp(templog); tttqweight[tttqworder[0]] = 1.0; temp = tttqweight[0] + tttqweight[1] + tttqweight[2]; tttqweight[0] = tttqweight[0]/temp; tttqweight[1] = tttqweight[1]/temp; tttqweight[2] = tttqweight[2]/temp; /* square deviations */ temp1 = 1.0 - tttqweight[tttqworder[0]]; tttsqdiff[0] = temp1 * temp1 + tttqweight[tttqworder[1]] * tttqweight[tttqworder[1]] + tttqweight[tttqworder[2]] * tttqweight[tttqworder[2]]; discreteweight[0] = treebits[tttqworder[0]]; temp1 = 0.5 - tttqweight[tttqworder[0]]; temp2 = 0.5 - tttqweight[tttqworder[1]]; tttsqdiff[1] = temp1 * temp1 + temp2 * temp2 + tttqweight[tttqworder[2]] * tttqweight[tttqworder[2]]; discreteweight[1] = treebits[tttqworder[0]] + treebits[tttqworder[1]]; temp1 = onethird - tttqweight[tttqworder[0]]; temp2 = onethird - tttqweight[tttqworder[1]]; temp3 = onethird - tttqweight[tttqworder[2]]; tttsqdiff[2] = temp1 * temp1 + temp2 * temp2 + temp3 * temp3; discreteweight[2] = (unsigned char) 7; /* sort in descending order */ sort3doubles(tttsqdiff, tttsqorder); } tmpweight = discreteweight[tttsqorder[2]]; return(tmpweight); } /* loglkl2weight */ /*************************/ /* checks out all possible quartets */ void computeallquartets() { double onethird; uli nq; unsigned char treebits[3]; # if ! PARALLEL unsigned char tmpweight; FILE *lhfp; int a, b, c, i; # endif onethird = 1.0/3.0; treebits[0] = (unsigned char) 1; treebits[1] = (unsigned char) 2; treebits[2] = (unsigned char) 4; if (show_optn) { /* list all unresolved quartets */ openfiletowrite(&unresfp, UNRESOLVED, "unresolved quartet trees"); fprintf(unresfp, "List of all completely unresolved quartets:\n\n"); } nq = 0; badqs = 0; /* start timer - percentage of completed quartets */ time(&time0); time1 = time0; mflag = 0; # if PARALLEL { schedtype sched; int flag; MPI_Status stat; int dest = 1; uli qaddr =0; uli qamount=0; int qblocksent = 0; int apr; uli Sumquartets; uli sq, noq; uli tmpfullresqs; uli tmppartresqs; uli tmpunresqs; uli tmpmissingqs; Sumquartets = numquarts(Maxspc); initsched(&sched, Sumquartets, PP_NumProcs-1, 4); qamount=SCHEDALG_ML_STEP(&sched); while (qamount > 0) { if (PP_emptyslave()) { PP_RecvQuartBlock(0, &sq, &noq, quartetinfo, &tmpfullresqs, &tmppartresqs, &tmpunresqs, &tmpmissingqs, &usebestq_optn, &apr); qblocksent -= noq; } dest = PP_getslave(); PP_SendDoQuartBlock(dest, qaddr, qamount, usebestq_optn, (approxqp ? APPROX : EXACT)); qblocksent += qamount; qaddr += qamount; qamount=SCHEDALG_ML_STEP(&sched); MPI_Iprobe(MPI_ANY_SOURCE, PP_QUARTBLOCKSPECS, PP_Comm, &flag, &stat); while (flag) { PP_RecvQuartBlock(0, &sq, &noq, quartetinfo, &tmpfullresqs, &tmppartresqs, &tmpunresqs, &tmpmissingqs, &usebestq_optn, &apr); qblocksent -= noq; MPI_Iprobe(MPI_ANY_SOURCE, PP_QUARTBLOCKSPECS, PP_Comm, &flag, &stat); } checktime(&time0, &time1, &time2, qaddr - qblocksent, Sumquartets, &mflag); } while (qblocksent > 0) { PP_RecvQuartBlock(0, &sq, &noq, quartetinfo, &tmpfullresqs, &tmppartresqs, &tmpunresqs, &tmpmissingqs, &usebestq_optn, &apr); qblocksent -= noq; checktime(&time0, &time1, &time2, qaddr - qblocksent, Sumquartets, &mflag); } } # else /* ! PARALLEL */ addtimes(GENERAL, &tarr); if (savequartlh_optn) { openfiletowrite(&lhfp, ALLQUARTLH, "all quartet likelihoods"); if (saveqlhbin_optn) writetpqfheader(Maxspc, lhfp, 3); else writetpqfheader(Maxspc, lhfp, 4); } for (i = 3; i < Maxspc; i++) for (c = 2; c < i; c++) for (b = 1; b < c; b++) for (a = 0; a < b; a++) { nq++; /* generate message every >TIMECHECK_INTERVAL seconds */ /* check timer */ checktime(&time0, &time1, &time2, nq, Numquartets, &mflag); /* maximum likelihood values */ /* exact or approximate maximum likelihood values */ compute_quartlklhds(a,b,c,i,&qweight[0],&qweight[1],&qweight[2], (approxqp ? APPROX : EXACT)); if (savequartlh_optn) { if (saveqlhbin_optn) fwrite(qweight, sizeof(double), 3, lhfp); else fprintf(lhfp, "(%d,%d,%d,%d)\t%f\t%f\t%f\n", a, b, c, i, qweight[0], qweight[1], qweight[2]); } tmpweight = loglkl2weight(a, b, c, i, qweight[0], qweight[1], qweight[2], usebestq_optn); /* tmpweight = loglkl2weight(a, b, c, i, d1, d2, d3, usebestq_optn); */ /* determine best discrete weight */ /* writequartet(a, b, c, i, discreteweight[sqorder[2]]); */ writequartet(a, b, c, i, tmpweight); /* compute sums of topologies per taxon, step by step */ ++(qinfomatr[8][a]); ++(qinfomatr[8][b]); ++(qinfomatr[8][c]); ++(qinfomatr[8][i]); ++(qinfomatr[tmpweight][a]); ++(qinfomatr[tmpweight][b]); ++(qinfomatr[tmpweight][c]); ++(qinfomatr[tmpweight][i]); if ((tmpweight <= 2) || (tmpweight == 4)) { fullresqs++; } else { if (tmpweight == 7) { unresqs++; } else { if (tmpweight == 0) { missingqs++; } else { partresqs++; } } } /* counting completely unresolved quartets */ if (tmpweight == 7) { badqs++; badtaxon[a]++; badtaxon[b]++; badtaxon[c]++; badtaxon[i]++; if (show_optn) { fputid10(unresfp, a); fprintf(unresfp, " "); fputid10(unresfp, b); fprintf(unresfp, " "); fputid10(unresfp, c); fprintf(unresfp, " "); fputid(unresfp, i); fprintf(unresfp, "\n"); } } addtimes(QUARTETS, &tarr); } if (savequartlh_optn) { closefile(lhfp); } if (show_optn) closefile(unresfp); if (mflag == 1) fprintf(STDOUT, "\n"); # endif /* PARALLEL */ } /* computeallquartets */ /* trueID (HAS) */ /* check the branching structure between the leaves (not the taxa!) A, B, C, and I (A, B, C, I don't need to be ordered). As a result, the two leaves that are closer related to each other than to leaf I are found in chooseX and chooseY. If the branching structure is not uniquely defined, chooseX and chooseY are chosen randomly from the possible taxa */ void checkquartet_trueID(int A, /* quartet leaf idx in permutation array */ int B, /* dito. */ int C, /* dito. */ int I, /* dito., to be inserted */ int *trueID, /* permutation array */ int *chooseX, /* (chooseX,chooseY | x,I) */ int *chooseY) /* chooseX+Y are non-neighbors of I */ { int i, j; /* counter */ int a, b; /* temp variable for sorting */ int taxon[5]; /* sorting array for taxa from trueID */ int leaf[5]; /* sorting array for indices in trueID */ int ipos; /* position of leaf I in sorted array */ unsigned char qresult; /* quartet topology */ int notunique = FALSE; /* non-unique topology */ /* The relationship between leaves and taxa is defined by trueID */ taxon[1] = trueID[A]; /* taxon number */ leaf[1] = A; /* leaf index in permutation */ taxon[2] = trueID[B]; leaf[2] = B; taxon[3] = trueID[C]; leaf[3] = C; taxon[4] = trueID[I]; leaf[4] = I; /* sort for taxa */ /* Source: Numerical Recipes (PIKSR2.C) */ for (j = 2; j <= 4; j++) { a = taxon[j]; b = leaf[j]; i = j-1; while (i > 0 && taxon[i] > a) { taxon[i+1] = taxon[i]; leaf[i+1] = leaf[i]; i--; } taxon[i+1] = a; leaf[i+1] = b; } /* where is leaf I ? */ ipos = 1; while (leaf[ipos] != I) ipos++; /* look at sequence quartet */ qresult = readquartet(taxon[1], taxon[2], taxon[3], taxon[4]); /* chooseX and chooseY */ /* qresult is not unique, a covered unique qresult is chosen */ /* and the while loop is circled again (optimizable?) (HAS) */ do { switch (qresult) { /* one single branching structure */ /* 001 */ case 1: if (ipos == 1 || ipos == 2) { *chooseX = leaf[3]; *chooseY = leaf[4]; } else { *chooseX = leaf[1]; *chooseY = leaf[2]; } notunique = FALSE; break; /* 010 */ case 2: if (ipos == 1 || ipos == 3) { *chooseX = leaf[2]; *chooseY = leaf[4]; } else { *chooseX = leaf[1]; *chooseY = leaf[3]; } notunique = FALSE; break; /* 100 */ case 4: if (ipos == 1 || ipos == 4) { *chooseX = leaf[2]; *chooseY = leaf[3]; } else { *chooseX = leaf[1]; *chooseY = leaf[4]; } notunique = FALSE; break; /* two possible branching structures */ /* 011 */ case 3: if (randominteger(2)) qresult = 1; else qresult = 2; notunique = TRUE; break; /* 101 */ case 5: if (randominteger(2)) qresult = 1; else qresult = 4; notunique = TRUE; break; /* 110 */ case 6: if (randominteger(2)) qresult = 2; else qresult = 4; notunique = TRUE; break; /* three possible branching structures */ /* 111 */ case 7: qresult = (1 << randominteger(3)); /* 1, 2, or 4 */ notunique = TRUE; break; /* 000 */ /* empty quartet: missing data -> OK, otherwise ERROR */ case 0: if (readsubset_optn) { *chooseX = -1; *chooseY = -1; } else { # if PARALLEL fprintf(STDOUT, "\n\n\n(%2d)HALT: PLEASE REPORT ERROR K1-PARALLEL TO DEVELOPERS : empty (%d,%d,%d,%d) = %ld\n\n\n", PP_Myid, taxon[1], taxon[2], taxon[3], taxon[4], quart2num(taxon[1], taxon[2], taxon[3], taxon[4])); PP_Finalize(); exit (999); # else fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR K1 TO DEVELOPERS: empty (%d,%d,%d,%d) = %ld\n\n\n", taxon[1], taxon[2], taxon[3], taxon[4], quart2num(taxon[1], taxon[2], taxon[3], taxon[4])); exit (999); # endif } notunique = FALSE; break; default: /* Program error [checkquartet] */ # if PARALLEL fprintf(STDOUT, "\n\n\n(%2d)HALT: PLEASE REPORT ERROR K2-PARALLEL TO DEVELOPERS (%d,%d,%d,%d) = %ld (%d)\n\n\n", PP_Myid, taxon[1], taxon[2], taxon[3], taxon[4], quart2num(taxon[1], taxon[2], taxon[3], taxon[4]), qresult); PP_Finalize(); exit (999); # else fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR K2 TO DEVELOPERS (%d,%d,%d,%d) = %ld (%d)\n\n\n", taxon[1], taxon[2], taxon[3], taxon[4], quart2num(taxon[1], taxon[2], taxon[3], taxon[4]), qresult); exit (999); # endif } /* switch (qresult) */ } while (notunique); return; } /* checkquartet_trueID */ /* un-trueID-ed (HAS) */ /* check the branching structure between the leaves (not the taxa!) A, B, C, and I (A, B, C, I don't need to be ordered). As a result, the two leaves that are closer related to each other than to leaf I are found in chooseX and chooseY. If the branching structure is not uniquely defined, chooseX and chooseY are chosen randomly from the possible taxa */ void checkquartet(int A, /* quartet taxon ID */ int B, /* dito. */ int C, /* dito. */ int I, /* dito., to be inserted */ int *chooseX, /* (chooseX,chooseY | x,I) */ int *chooseY) /* chooseX+Y are non-neighbors of I */ { int i, j; /* counter */ int a; /* temp variable for sorting */ int leaf[5]; /* sorting array */ int ipos; /* position of leaf I in sorted array */ unsigned char qresult; /* quartet topology */ int notunique = FALSE; /* non-unique topology */ /* The relationship between leaves and taxa is defined by trueID */ leaf [1] = A; /* taxon ID of leaf 1 */ leaf [2] = B; /* taxon ID of leaf 2 */ leaf [3] = C; /* taxon ID of leaf 3 */ leaf [4] = I; /* taxon ID of leaf 4 */ /* sort for taxa */ /* Source: Numerical Recipes (PIKSR2.C) */ for (j = 2; j <= 4; j++) { a = leaf[j]; i = j-1; while (i > 0 && leaf[i] > a) { leaf[i+1] = leaf[i]; i--; } leaf[i+1] = a; } /* where is leaf I ? */ ipos = 1; while (leaf[ipos] != I) ipos++; /* look at sequence quartet */ qresult = readquartet(leaf[1], leaf[2], leaf[3], leaf[4]); /* chooseX and chooseY */ /* qresult is not unique, a covered unique qresult is chosen */ /* and the while loop is circled again (optimizable?) (HAS) */ do { switch (qresult) { /* one single branching structure */ /* 001 */ case 1: if (ipos == 1 || ipos == 2) { *chooseX = leaf[3]; *chooseY = leaf[4]; } else { *chooseX = leaf[1]; *chooseY = leaf[2]; } notunique = FALSE; break; /* 010 */ case 2: if (ipos == 1 || ipos == 3) { *chooseX = leaf[2]; *chooseY = leaf[4]; } else { *chooseX = leaf[1]; *chooseY = leaf[3]; } notunique = FALSE; break; /* 100 */ case 4: if (ipos == 1 || ipos == 4) { *chooseX = leaf[2]; *chooseY = leaf[3]; } else { *chooseX = leaf[1]; *chooseY = leaf[4]; } notunique = FALSE; break; /* two possible branching structures */ /* 011 */ case 3: if (randominteger(2)) qresult = 1; else qresult = 2; notunique = TRUE; break; /* 101 */ case 5: if (randominteger(2)) qresult = 1; else qresult = 4; notunique = TRUE; break; /* 110 */ case 6: if (randominteger(2)) qresult = 2; else qresult = 4; notunique = TRUE; break; /* three possible branching structures */ /* 111 */ case 7: qresult = (1 << randominteger(3)); /* 1, 2, or 4 */ notunique = TRUE; break; /* 000 */ /* empty quartet: missing data -> OK, otherwise ERROR */ case 0: if (readsubset_optn) { *chooseX = -1; *chooseY = -1; } else { # if PARALLEL fprintf(STDOUT, "\n\n\n(%2d)HALT: PLEASE REPORT ERROR K1-PARALLEL TO DEVELOPERS : empty (%d,%d,%d,%d) = %ld\n\n\n", PP_Myid, leaf[1], leaf[2], leaf[3], leaf[4], quart2num(leaf[1], leaf[2], leaf[3], leaf[4])); PP_Finalize(); exit (999); # else fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR K1 TO DEVELOPERS: empty (%d,%d,%d,%d) = %ld\n\n\n", leaf[1], leaf[2], leaf[3], leaf[4], quart2num(leaf[1], leaf[2], leaf[3], leaf[4])); exit (999); # endif } notunique = FALSE; break; default: /* Program error [checkquartet] */ # if PARALLEL fprintf(STDOUT, "\n\n\n(%2d)HALT: PLEASE REPORT ERROR K2-PARALLEL TO DEVELOPERS (%d,%d,%d,%d) = %ld (%d)\n\n\n", PP_Myid, leaf[1], leaf[2], leaf[3], leaf[4], quart2num(leaf[1], leaf[2], leaf[3], leaf[4]), qresult); PP_Finalize(); exit (999); # else fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR K2 TO DEVELOPERS (%d,%d,%d,%d) = %ld (%d)\n\n\n", leaf[1], leaf[2], leaf[3], leaf[4], quart2num(leaf[1], leaf[2], leaf[3], leaf[4]), qresult); exit (999); # endif } /* switch (qresult) */ } while (notunique); return; } /* checkquartet */ tree-puzzle-5.2/src/gamma.c0000644000076400001440000002254610073365353011362 /* * gamma.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #include #include "util.h" #include "gamma.h" /* private prototypes */ static double IncompleteGamma (double x, double alpha, double ln_gamma_alpha); static double PointNormal (double prob); static double PointChi2 (double prob, double v); /* Gamma density function */ double densityGamma (double x, double shape) { return pow (shape, shape) * pow (x, shape-1) / exp (shape*x + LnGamma(shape)); } /* densityGamma */ /* Gamma cdf */ double cdfGamma (double x, double shape) { double result; result = IncompleteGamma (shape*x, shape, LnGamma(shape)); return result; } /* cdfGamma */ /* Gamma inverse cdf */ double icdfGamma (double y, double shape) { double result; result = PointChi2 (y, 2.0*shape)/(2.0*shape); /* to avoid -1.0 */ if (result < 0.0) { result = 0.0; } return result; } /* icdfGamma */ /* Gamma n-th moment */ double momentGamma (int n, double shape) { int i; double tmp = 1.0; for (i = 1; i < n; i++) { tmp *= (shape + i)/shape; } return tmp; } /* momentGamma */ /* The following code comes from tools.c in Yang's PAML package */ double LnGamma (double alpha) { /* returns ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places. Stirling's formula is used for the central polynomial part of the procedure. Pike MC & Hill ID (1966) Algorithm 291: Logarithm of the gamma function. Communications of the Association for Computing Machinery, 9:684 */ double x=alpha, f=0, z; if (x<7) { f=1; z=x-1; while (++z<7) f*=z; x=z; f=-log(f); } z = 1/(x*x); return f + (x-0.5)*log(x) - x + .918938533204673 + (((-.000595238095238*z+.000793650793651)*z-.002777777777778)*z +.083333333333333)/x; } /* LnGamma */ static double IncompleteGamma (double x, double alpha, double ln_gamma_alpha) { /* returns the incomplete gamma ratio I(x,alpha) where x is the upper limit of the integration and alpha is the shape parameter. returns (-1) if in error (1) series expansion if (alpha>x || x<=1) (2) continued fraction otherwise RATNEST FORTRAN by Bhattacharjee GP (1970) The incomplete gamma integral. Applied Statistics, 19: 285-287 (AS32) */ int i; double p=alpha, g=ln_gamma_alpha; double accurate=1e-8, overflow=1e30; double factor, gin=0, rn=0, a=0,b=0,an=0,dif=0, term=0, pn[6]; if (x==0) return (0); if (x<0 || p<=0) return (-1); factor=exp(p*log(x)-x-g); if (x>1 && x>=p) goto l30; /* (1) series expansion */ gin=1; term=1; rn=p; l20: rn++; term*=x/rn; gin+=term; if (term > accurate) goto l20; gin*=factor/p; goto l50; l30: /* (2) continued fraction */ a=1-p; b=a+x+1; term=0; pn[0]=1; pn[1]=x; pn[2]=x+1; pn[3]=x*b; gin=pn[2]/pn[3]; l32: a++; b+=2; term++; an=a*term; for (i=0; i<2; i++) pn[i+4]=b*pn[i+2]-an*pn[i]; if (pn[5] == 0) goto l35; rn=pn[4]/pn[5]; dif=fabs(gin-rn); if (dif>accurate) goto l34; if (dif<=accurate*rn) goto l42; l34: gin=rn; l35: for (i=0; i<4; i++) pn[i]=pn[i+2]; if (fabs(pn[4]) < overflow) goto l32; for (i=0; i<4; i++) pn[i]/=overflow; goto l32; l42: gin=1-factor*gin; l50: return (gin); } /* IncompleteGamma */ /* functions concerning the CDF and percentage points of the gamma and Chi2 distribution */ static double PointNormal (double prob) { /* returns z so that Prob{x.999998 || v<=0) return (-1); g = LnGamma (v/2); xx=v/2; c=xx-1; if (v >= -1.24*log(p)) goto l1; ch=pow((p*xx*exp(g+xx*aa)), 1/xx); if (ch-e<0) return (ch); goto l4; l1: if (v>.32) goto l3; ch=0.4; a=log(1-p); l2: q=ch; p1=1+ch*(4.67+ch); p2=ch*(6.73+ch*(6.66+ch)); t=-0.5+(4.67+2*ch)/p1 - (6.73+ch*(13.32+3*ch))/p2; ch-=(1-exp(a+g+.5*ch+c*aa)*p2/p1)/t; if (fabs(q/ch-1)-.01 <= 0) goto l4; else goto l2; l3: x=PointNormal (p); p1=0.222222/v; ch=v*pow((x*sqrt(p1)+1-p1), 3.0); if (ch>2.2*v+6) ch=-2*(log(1-p)-c*log(.5*ch)+g); l4: do { q=ch; p1=.5*ch; if ((t=IncompleteGamma (p1, xx, g))<0) { return (-1); } p2=p-t; t=p2*exp(xx*aa+g+p1-c*log(ch)); b=t/ch; a=0.5*t-b*c; s1=(210+a*(140+a*(105+a*(84+a*(70+60*a))))) / 420; s2=(420+a*(735+a*(966+a*(1141+1278*a))))/2520; s3=(210+a*(462+a*(707+932*a)))/2520; s4=(252+a*(672+1182*a)+c*(294+a*(889+1740*a)))/5040; s5=(84+264*a+c*(175+606*a))/2520; s6=(120+c*(346+127*c))/5040; ch+=t*(1+0.5*t*s1-b*c*(s1-b*(s2-b*(s3-b*(s4-b*(s5-b*s6)))))); } while (fabs(q/ch-1) > e); return (ch); } /* PointChi2 */ /* Incomplete Gamma function Q(a,x) - this is a cleanroom implementation of NRs gammq(a,x) */ double IncompleteGammaQ (double a, double x) { return 1.0-IncompleteGamma (x, a, LnGamma(a)); } /* IncompleteGammaQ */ /* probability that the observed chi-square exceeds chi2 even if model is correct */ double chi2prob (int deg, double chi2) { return IncompleteGammaQ (0.5*deg, 0.5*chi2); } /* chi2prob */ /* chi square test ef expected frequencies (sum up to 1 !!) of observed frequencies (sum up to the number of samples) numcat number of categories returns critical significance level */ double chi2test(double *ef, int *of, int numcat, int *chi2fail) { double chi2, criticals, efn; int i, below1, below5, reducedcat; int samples; *chi2fail = FALSE; reducedcat = numcat; below1 = 0; below5 = 0; /* compute number of samples */ samples = 0; for (i = 0; i < numcat; i++) { samples = samples + of[i]; # if VERBOSE fprintf(stdout, "of[%d]=%d+ ",i,of[i]); # endif } # if VERBOSE fprintf(stdout, "\nsmp=%d numcat=%d\n",samples, numcat); # endif /* compute chi square */ chi2 = 0; for (i = 0; i < numcat; i++) { efn = ef[i]*((double) samples); if (efn < 1.0) below1++; if (efn < 5.0) below5++; if (efn == 0.0) { reducedcat--; fprintf(stdout, "FPE error: samples=%d, ef[%d]=%e, of[%d]=%d, efn=%e, nc=%d, rc=%d\n", samples, i, ef[i], i, of[i], efn, numcat, reducedcat); fprintf(stdout, "PLEASE REPORT THIS ERROR TO DEVELOPERS !!!\n"); fflush(stdout); } else chi2 = chi2 + ((double) of[i]-efn)*((double) of[i]-efn)/efn; } /* compute significance */ criticals = chi2prob (numcat-1, chi2); /* no expected frequency category (sum up to # samples) below 1.0 */ if (below1 > 0) *chi2fail = TRUE; /* no more than 1/5 of the frequency categories below 5.0 */ if (below5 > (int) floor(samples/5.0)) *chi2fail = TRUE; return criticals; } /* chi2test */ /* chi square test ef expected frequencies (sum up to 1 !!) of observed frequencies (sum up to the number of samples) numcat number of categories returns critical significance level */ double altchi2test(double *ef, int *of, int numcat, int *chi2fail) { double chi2, criticals, efn; int i, below1, below5; int samples; *chi2fail = FALSE; below1 = 0; below5 = 0; /* compute number of samples */ samples = 0; for (i = 0; i < numcat; i++) samples = samples + of[i]; /* compute chi square */ chi2 = 0; for (i = 0; i < numcat; i++) { efn = ef[i]*((double) samples); if (efn < 1.0) below1++; if (efn < 5.0) below5++; chi2 = chi2 + ((double) of[i]-efn)*((double) of[i]-efn)/efn; } /* compute significance */ criticals = chi2prob (numcat-1, chi2); /* no expected frequency category (sum up to # samples) below 1.0 */ if (below1 > 0) *chi2fail = TRUE; /* no more than 1/5 of the frequency categories below 5.0 */ if (below5 > (int) floor(samples/5.0)) *chi2fail = TRUE; return criticals; } /* altchi2test */ tree-puzzle-5.2/src/gamma.h0000644000076400001440000000147610073365360011364 /* * gamma.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef _GAMMA_ #define _GAMMA_ double densityGamma (double, double); double cdfGamma (double, double); double icdfGamma (double, double); double momentGamma (int, double); double LnGamma (double); double IncompleteGammaQ (double, double); double chi2prob (int, double); double chi2test (double *, int *, int , int *); #endif /* _GAMMA_ */ tree-puzzle-5.2/src/recur-old.c0000644000076400001440000007163510073365364012201 /* * recur-old.c (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ /* initialize tree with the following starting configuration (see pstep.h) */ void inittree_recur(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootleaf, /* out: rooting leaf (=trueID[0]) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID) { int i, j; ONEEDGE *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for tmpvector with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); for (j = 0; j < Maxspc; j++) tmpedgeofleaf[j]=-1; *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the split map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].split = (int *) calloc((size_t) Maxspc, sizeof(int) ); (tmpedge)[i].cluster = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedge[i].cluster == NULL) maerror("edge cluster array in inittree"); (tmpedge)[i].taxon = -1; for (j = 0; j < Maxspc; j++) (tmpedge)[i].cluster[j]=-1; } /* number all edges */ for (i = 0; i < Maxbrnch; i++) tmpedge[i].numedge = i; /* initialize tree */ *nextedge = 3; *nextleaf = 3; #if 0 #endif /* init split vectors: */ /* for edge 0 */ (tmpedge[0].split)[0] = trueID[0]; /* leaf 0 above this edge */ tmpedge[0].upsize = 1; (tmpedge[0].split)[Maxspc-1] = trueID[1]; /* leaf 0 below this edge */ (tmpedge[0].split)[Maxspc-2] = trueID[2]; /* leaf 0 below this edge */ tmpedge[0].downsize = 2; /* for edge 1 */ (tmpedge[1].split)[0] = trueID[0]; /* leaf 0 above this edge */ (tmpedge[1].split)[1] = trueID[2]; /* leaf 0 above this edge */ tmpedge[1].upsize = 2; (tmpedge[1].split)[Maxspc-1] = trueID[1]; /* leaf 0 below this edge */ tmpedge[1].downsize = 1; /* for edge 2 */ (tmpedge[2].split)[0] = trueID[0]; /* leaf 0 above this edge */ (tmpedge[2].split)[1] = trueID[1]; /* leaf 0 above this edge */ tmpedge[2].upsize = 2; (tmpedge[2].split)[Maxspc-1] = trueID[2]; /* leaf 0 below this edge */ tmpedge[2].downsize = 1; #if 0 #endif /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* taxon IDs of leaves */ tmpedge[0].taxon = trueID[0]; tmpedge[1].taxon = trueID[1]; tmpedge[2].taxon = trueID[2]; /* edges of leaves */ tmpedgeofleaf[trueID[0]] = 0; tmpedgeofleaf[trueID[1]] = 1; tmpedgeofleaf[trueID[2]] = 2; /* uppest edge =: root edge*/ *rootleaf = trueID[0]; } /* inittree_recur */ /******************/ /* free memory (to be called after inittree) */ void freetree_recur(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; /* free split vectors */ for (i = 0; i < 2 * Maxspc - 3; i++) { free(edge[i].split); free(edge[i].cluster); } /* free tree topology */ free(edge); /* free external edge lookup vector */ free(edgeofleaf); } /* freetree_recur */ /******************/ #if 0 /* check edge splits */ void check_recur( ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *permut) { int n,m; fprintf(stderr, "Permutation: "); for (m = 0; m %d != %d>\n", m, (edge[m].taxon >= 0) ? 'e' : 'i', edge[m].taxon, edge[m].upsize, edge[m].downsize, edge[m].upsize+edge[m].downsize, nextleaf); fprintf(stderr, " UP:"); for (n = 0; n %d == %d> OK\n", m, (edge[m].taxon >= 0) ? 'e' : 'i', edge[m].taxon, edge[m].upsize, edge[m].downsize, edge[m].upsize+edge[m].downsize, nextleaf); } } } void updatesplit_split(ONEEDGE *curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf) /* next free leaf idx */ { switch (wherefrom) { case UP: fprintf(stderr, "UUU: updating edge %d (from UP) split[%d]:=%d\n", curredge->numedge, curredge->upsize, newleaf); curredge->split[(curredge->upsize)++] = newleaf; /* leaf is up */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { /* nothing to do */ return; } break; case DOWNLEFT: fprintf(stderr, "UUU: updating edge %d (from DOWNLEFT) split[%d]:=%d\n", curredge->numedge, Maxspc - (curredge->downsize) +1, newleaf); curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if (curredge->up != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; case DOWNRIGHT: fprintf(stderr, "UUU: updating edge %d (from DOWNRIGHT) split[%d]:=%d\n", curredge->numedge, Maxspc - (curredge->downsize) +1, newleaf); curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if ((curredge->up) != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; } } /* updatesplit_split */ /******************/ /* add next leaf on the specified edge */ void updatetreesplits_split(int dockedge, /* dockedge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ ivector permut) { int n; /* counter */ int wherefrom; /* direction to last edge */ ONEEDGE *curredge; /* edge array */ /* copy clusters from dockedge to in_nextedge */ /* up-cluster: upsize-1 .. 0 */ for (n=(edge[dockedge].upsize) - 1; n >= 0; n--) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).upsize = (edge[dockedge]).upsize; /* down-cluster: downsize .. Maxspc-1 */ for (n=Maxspc - (edge[dockedge]).downsize; n < Maxspc; n++) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).downsize = (edge[dockedge]).downsize; /* add the new taxon to in_nextedge */ (edge[in_nextedge]).split[Maxspc - ++((edge[in_nextedge]).downsize)] = permut[in_nextleaf]; /* setup clusters for new external edge (in_nextedge+1) */ /* up-cluster: all taxa in tree */ for (n=0; n < in_nextleaf; n++) { (edge[in_nextedge+1]).split[n] = permut[n]; } (edge[in_nextedge+1]).upsize = in_nextleaf; /* down-cluster: the new taxon itself */ (edge[in_nextedge+1]).split[Maxspc-1] = permut[in_nextleaf]; (edge[in_nextedge+1]).downsize = 1; curredge = &(edge[in_nextedge]); if (curredge->up != NULL) { /* not root */ if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } /* climbing up from insertion point */ updatesplit_split(curredge->up, wherefrom, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* climbing down to dockedge from insertion point */ updatesplit_split(&(edge[dockedge]), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* updatetreesplits_split */ #endif /******************/ /* add next leaf on the specified edge */ void addnextleaf_recur(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootleaf, /* uppest leaf */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut) { int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { fprintf(stderr, "de=%d ne=%d\n", dockedge, nextedge); /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == root edge */ if (edgeofleaf[rootleaf] == dockedge) edgeofleaf[rootleaf] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; /* if not root edge: connect ancestor to internal edge (nextedge) */ if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding new external edge (nextedge+1) to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edge[nextedge+1].taxon = permut[nextleaf]; edgeofleaf[permut[nextleaf]] = nextedge+1; #if 0 updatetreesplits_split(dockedge, permut[nextleaf], edge, Maxspc, edgeofleaf, nextedge, nextleaf, permut); #endif (*in_nextedge) += 2; (*in_nextleaf) ++; } /* addnextleaf_recur */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_recur(ONEEDGE *curredge, /* edge array */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ ulivector leafpenalty, /* leaf edge penalties */ int *minedges, /* minimum edge vector */ int *howmany, /* number minimum edge */ uli *minpenalty) /* minimum penalty */ { int l, r; int lmax, rmax; int taxon; int size; int rID; uli temp; ONEEDGE *left; /* temp edge ptr */ ONEEDGE *right; /* temp edge ptr */ if (curredge->downleft == NULL) { /* leaf edge */ taxon = curredge->taxon; curredge->cluster[0] = taxon; curredge->clsize = 1; curredge->edgeinfo = leafpenalty[taxon]; curredge->allsum = leafpenalty[taxon]; curredge->submatrsum = 0; if (*minpenalty == curredge->edgeinfo) { /* another min edge */ minedges[(*howmany)++] = curredge->numedge; } else { /* -> not same minimum */ if (*minpenalty > curredge->edgeinfo) { /* new minimum penalty */ *howmany = 1; minedges[0] = curredge->numedge; *minpenalty = curredge->edgeinfo; } /* if new minimum */ } /* same minimum */ } else { /* -> internal edge */ left = curredge->downleft; right = curredge->downright; /* descend downleft */ computepenalties_recur(left, Maxspc, neighbormatr, leafpenalty, minedges, howmany, minpenalty); /* descend downright */ computepenalties_recur(right, Maxspc, neighbormatr, leafpenalty, minedges, howmany, minpenalty); lmax = left->clsize; for (l= 0; lcluster[l] = left->cluster[l]; } size = lmax; rmax = right->clsize; temp = 0; for (r= 0; rcluster[r]; /* copy right cluster */ curredge->cluster[size++] = rID; /* sum up sub neighborhood matrix */ for (l= 0; lcluster[l]][rID]; } } curredge->clsize = size; /* compute edge penalty */ curredge->submatrsum = 2*temp + left->submatrsum + right->submatrsum; curredge->allsum = left->allsum + right->allsum; curredge->edgeinfo = curredge->allsum - curredge->submatrsum; if (*minpenalty == curredge->edgeinfo) { /* another min edge */ minedges[(*howmany)++] = curredge->numedge; } else { /* -> not same minimum */ if (*minpenalty > curredge->edgeinfo) { /* new minimum penalty */ *howmany = 1; minedges[0] = curredge->numedge; *minpenalty = curredge->edgeinfo; } /* if new minimum */ } /* same minimum */ ; } fprintf(stderr, "PPP e[%2d]%c t(%2d) %2ld <--> %2ld new penalty\n", curredge->numedge, (curredge->taxon >= 0) ? 'e' : 'i', curredge->taxon, curredge->penalty, curredge->edgeinfo); } /* computepenalties_recur */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenaltiestree_recur(ONEEDGE *tmpedge, /* edge array */ int *edgeofleaf, /* external edge ptrs */ int rootleaf, /* idx of uppest edge */ int nextleaf, /* next free leaf idx */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ ulivector leafpenalty, /* leaf edge penalties */ int **out_minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int rootedge; int lmax, rmax; int l, r; int howmany = 0; int *minedges = *out_minedges; uli temp; ONEEDGE *left; /* temp edge ptr */ ONEEDGE *right; /* temp edge ptr */ uli minpenalty; uli submatrsum; uli allsum; uli edgeinfo; ONEEDGE *curredge; rootedge = edgeofleaf[rootleaf]; curredge = &(tmpedge[rootedge]); curredge->edgeinfo = leafpenalty[rootleaf]; fprintf(stderr, "PPP e[%2d]%c t(%2d) %2ld <--> %2ld new penalty\n", curredge->numedge, (curredge->taxon >= 0) ? 'e' : 'i', curredge->taxon, curredge->penalty, curredge->edgeinfo); if (minedges == NULL) minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); /* first edge: init */ minedges[0] = rootedge; howmany = 1; minpenalty = curredge->edgeinfo; left = curredge->downleft; right = curredge->downright; /* descend downleft */ computepenalties_recur(left, Maxspc, neighbormatr, leafpenalty, minedges, &howmany, &minpenalty); /* descend downright */ computepenalties_recur(right, Maxspc, neighbormatr, leafpenalty, minedges, &howmany, &minpenalty); lmax = left->clsize; rmax = right->clsize; if ((lmax + rmax) != (nextleaf-1)) { /* root edge cluster should yield all other leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR HSCL1 TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } temp = 0; for (r= 0; rcluster[l]][right->cluster[r]]; } } /* compute edge penalty */ submatrsum = 2*temp + left->submatrsum + right->submatrsum; allsum = left->allsum + right->allsum; edgeinfo = allsum - submatrsum; if ((edgeinfo) != (curredge->edgeinfo)) fprintf(stderr, "%ld != %ld\n", edgeinfo, curredge->edgeinfo); else fprintf(stderr, "%ld == %ld\n", edgeinfo, curredge->edgeinfo); if ((edgeinfo) != (curredge->edgeinfo)) { /* root edge cluster should yield all other leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR HSCL2 TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (howmany > 1) { /* draw random edge */ int i, k, randomnum; randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (tmpedge[i].edgeinfo != minpenalty); *out_minedge = tmpedge[i].numedge; } } else { *out_minedge = minedges[0]; } #if 0 /* optimization (HAS) */ if (howmany > 1) *out_minedge = minedges[randominteger(howmany)]; else *out_minedge = minedges[0]; #endif *out_howmany = howmany; *out_minpenalty = minpenalty; } /* computepenaltiestree_recur */ /******************/ #if 0 /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_split(ONEEDGE *tmpedge, /* edge array */ int nextedge, /* next free edge idx */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ int **out_minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int i; /* counter */ int a, b; int idxA, idxB; int maxUP; /* index counter for right/left split cluster */ int howmany = 0; int *minedges = *out_minedges; uli minpenalty; for (i = 0; i < nextedge; i++) { (tmpedge[i]).penalty = 0; /* reset penalty */ maxUP = (tmpedge[i]).upsize; #if 0 fprintf(stderr, "<%d>", i); for (idxA = 0; idxA < maxUP; idxA++) fprintf(stderr, "%d,", (tmpedge[i].split)[idxA]); fprintf(stderr, "(%d) || ", (tmpedge[i]).upsize); for (idxB = Maxspc - (tmpedge[i]).downsize; idxB < Maxspc; idxB++) fprintf(stderr, "%d,", (tmpedge[i].split)[idxB]); fprintf(stderr, "(%d)\n", (tmpedge[i]).downsize); #endif for (idxB = Maxspc - (tmpedge[i]).downsize; idxB < Maxspc; idxB++) { b = (tmpedge[i].split)[idxB]; for (idxA = 0; idxA < maxUP; idxA++) { a = (tmpedge[i].split)[idxA]; (tmpedge[i]).penalty += neighbormatr[a][b]; #if 0 fprintf(stderr, "<%d> %d(%d)->%d(%d) : %ld ---> p[%d]=%ld\n", i, a, idxA, b, idxB, neighbormatr[a][b], i, (tmpedge[i]).penalty); #endif } /* for all root-sided (up) taxa */ } /* for all non-root-sided (down) taxa */ if (howmany == 0) { /* first edge: init */ if (minedges == NULL) minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); minedges[howmany++] = i; minpenalty = tmpedge[i].penalty; } else { /* -> all other edges */ if (minpenalty == tmpedge[i].penalty) { /* another min edge */ minedges[howmany++] = i; } else { /* -> not same minimum */ if (minpenalty > tmpedge[i].penalty) { /* new minimum penalty */ howmany = 0; minedges[howmany++] = i; minpenalty = tmpedge[i].penalty; } /* if new minimum */ } /* same minimum */ } /* if all other edges */ } /* for all edges */ *out_howmany = howmany, *out_minpenalty = minpenalty; #if 0 if (howmany > 1) *out_minedge = minedges[0]; else *out_minedge = minedges[0]; #endif } /* computepenalties_split */ #endif /******************/ /* trueID-ed (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_recur( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut) /* in: species permutation (trueID) */ { /* local variables: */ int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int idxA, idxB; int idxC, idxI; /* index counter for quartet leaves */ int chooseX, chooseY; /* end leaves of penalty path */ ONEEDGE *tmpedge; /* new array of edges */ int *tmpedgeofleaf; /* array of extern edge ptrs */ int tmprootleaf; /* root edge */ ulimatrix neighbormatr; ulivector leafpenalty; int *minedges = NULL; int howmany; neighbormatr = new_ulimatrix(Maxspc,Maxspc); leafpenalty = new_ulivector(Maxspc); /* allocate and initialize new tree topology */ inittree_recur(&tmpedge, &tmpedgeofleaf, &tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); /* check_recur(tmpedge, Maxspc, tmpedgeofleaf, nextedge, nextleaf, permut); */ fprintf(stderr, "----------------------------------------------\n"); for (idxI = 3; idxI < Maxspc; idxI++) { i = permut[idxI]; /* clear all edgeinfos */ /* resetedgeinfo(tmpedge, nextedge); */ /* initialize penalty neighborhood matrix */ for (idxA = 0; idxA < Maxspc; idxA++) { a = permut[idxA]; for (idxB = 0; idxB < Maxspc; idxB++) { b = permut[idxB]; if (a != b) { neighbormatr[a][b] = -1; neighbormatr[b][a] = -1; } else { neighbormatr[a][b] = 0; neighbormatr[b][a] = 0; } } } /* for all entries in the upper neighbormatr */ /* initialize penalty neighborhood matrix + leafpenalty vector */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; leafpenalty[a] = 0; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] = 0; neighbormatr[b][a] = 0; } } /* for all entries in the upper neighbormatr */ /* * core of quartet puzzling algorithm */ for (idxA = 0; idxA < nextleaf - 2; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf - 1; idxB++) { b = permut[idxB]; for (idxC = idxB + 1; idxC < nextleaf; idxC++) { c = permut[idxC]; /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* de-trueID-ed (HAS) */ checkquartet(a, b, c, i, &chooseX, &chooseY); (neighbormatr[chooseX][chooseY])++; } /* for all quartets q=(a,b,c,i): c */ } /* for all quartets q=(a,b,c,i): b */ } /* for all quartets q=(a,b,c,i): a */ /* symetrize penalty neighborhood matrix */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] += neighbormatr[b][a]; neighbormatr[b][a] = neighbormatr[a][b]; leafpenalty[a] += neighbormatr[a][b]; leafpenalty[b] += neighbormatr[a][b]; } } /* for all entries in the upper neighbormatr */ for (idxA = 0; idxA < Maxspc; idxA++) fprintf(stderr, "%4d", idxA); fprintf(stderr, " perm\n"); for (idxA = 0; idxA < Maxspc; idxA++) fprintf(stderr, "%4d", permut[idxA]); fprintf(stderr, " %d taxa\n\n", nextleaf); for (idxA = 0; idxA < Maxspc; idxA++) { a = permut[idxA]; for (idxB = 0; idxB < Maxspc; idxB++) { b = permut[idxB]; fprintf(stderr, "%4ld", neighbormatr[a][b]); } fprintf(stderr, "\n"); } fprintf(stderr, "\n"); for (idxA = 0; idxA < Maxspc; idxA++) { a = permut[idxA]; fprintf(stderr, "%4ld", leafpenalty[a]); } fprintf(stderr, "\n"); #if 0 computepenalties_split(tmpedge, nextedge, Maxspc, neighbormatr, &minedges, &howmany, &mininfo, &minedge); #endif computepenaltiestree_recur(tmpedge, tmpedgeofleaf, tmprootleaf, nextleaf, Maxspc, neighbormatr, leafpenalty, &minedges, &howmany, &mininfo, &minedge); {int n; for(n=0; n= 0) ? 'e' : 'i', tmpedge[n].taxon, tmpedge[n].penalty, tmpedge[n].edgeinfo); } else { fprintf(stderr, "PPP e[%2d]%c t(%2d) %2ld != %2ld new ERROR\n", n, (tmpedge[n].taxon >= 0) ? 'e' : 'i', tmpedge[n].taxon, tmpedge[n].penalty, tmpedge[n].edgeinfo); } } } /* add the next leaf on minedge */ addnextleaf_recur(minedge, tmpedge, tmpedgeofleaf, tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut); fprintf(stderr, "----------------------------------------------\n"); } /* adding all other leafs */ *edge = tmpedge; /* export tree topology */ *edgeofleaf = tmpedgeofleaf; /* export array of extern edge ptrs */ *rootleaf = tmprootleaf; /* export root edge */ } /* onepstep_recur */ tree-puzzle-5.2/src/Makefile.am0000644000076400001440000002206310073365370012161 # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SUBDIRS = sprng bin_PROGRAMS = puzzle @PPUZZLE@ EXTRA_PROGRAMS = ppuzzle EXTRA_DIST = \ pstep-deglob.c\ pstep-deglob.h\ pstep-mrca.c\ pstep-mrca.h\ pstep-orig.c\ pstep-orig.h\ pstep-recursive.c\ pstep-recursive.h\ split.c \ recur.c \ recur-old.c \ mrca.c \ pstep-split.c\ pstep-split.h\ subsetmatr.c\ subsetmatr.h\ pstep-trueID.c\ pstep-trueID.h SPRNG_OBJ = makeseed.$(OBJEXT) store.$(OBJEXT) memory.$(OBJEXT) checkid.$(OBJEXT) lcg64.$(OBJEXT) primes-lcg64.$(OBJEXT) SPRNG_DIR_OBJ = sprng/makeseed.$(OBJEXT) sprng/store.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) #SPRNG_OBJ = sprng/makeseed.$(OBJEXT) sprng/store.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) #SPRNG_LFG_SRCS = sprng/lfg.c sprng/interface.h sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_LFG_OBJS = sprng/lfg.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_MLFG_SRCS = sprng/mlfg.c sprng/interface.h sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c sprng/int64.h #SPRNG_MLFG_OBJS = sprng/mlfg.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_LCG_SRCS = sprng/lcg.c sprng/interface.h sprng/primes-lcg.c sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_LCG_OBJS = sprng/lcg.$(OBJEXT) sprng/primes-lcg.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_CMRG_SRCS = sprng/lcg64.c sprng/interface.h sprng/primes-lcg64.c sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_CMRG_OBJS = sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_LCG64_SRCS = sprng/lcg64.c sprng/interface.h sprng/primes-lcg64.c sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_LCG64_OBJS = sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) puzzle_SOURCES = gamma.c ml1.c ml2.c mlparam.c model1.c model2.c puzzle1.c puzzle2.c pstep.c util.c consensus.c treesort.c treetest.c ml.h util.h puzzle.h pstep.h gamma.h consensus.h treesort.h treetest.h #puzzle_LDADD = sgamma.o sml1.o sml2.o smlparam.o smodel1.o smodel2.o spuzzle1.o spuzzle2.o spstep.o sutil.o sconsensus.o streesort.o sprng/liblcg64.a puzzle_LDADD = sgamma.$(OBJEXT) sml1.$(OBJEXT) sml2.$(OBJEXT) smlparam.$(OBJEXT) smodel1.$(OBJEXT) smodel2.$(OBJEXT) spuzzle1.$(OBJEXT) spuzzle2.$(OBJEXT) spstep.$(OBJEXT) sutil.$(OBJEXT) sconsensus.$(OBJEXT) streesort.$(OBJEXT) streetest.$(OBJEXT) INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/sprng SDEFS = SCFLAGS = SLDFLAGS = SLDLIBS = @LIBS@ SCOMPILE = $(CC) $(SDEFS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(SCFLAGS) $(CFLAGS) SCCLD = $(CC) SLINK = $(SCCLD) $(AM_CFLAGS) $(CFLAGS) $(SLDFLAGS) $(LDFLAGS) ppuzzle_SOURCES = gamma.c ml1.c ml2.c mlparam.c model1.c model2.c puzzle1.c puzzle2.c pstep.c sched.c util.c consensus.c treesort.c treetest.c ppuzzle.c ml.h util.h puzzle.h pstep.h gamma.h ppuzzle.h sched.h consensus.h treesort.h treetest.h ppuzzle_LDADD = pgamma.$(OBJEXT) pml1.$(OBJEXT) pml2.$(OBJEXT) pmlparam.$(OBJEXT) pmodel1.$(OBJEXT) pmodel2.$(OBJEXT) ppuzzle1.$(OBJEXT) ppuzzle2.$(OBJEXT) ppstep.$(OBJEXT) psched.$(OBJEXT) putil.$(OBJEXT) pconsensus.$(OBJEXT) ptreesort.$(OBJEXT) ptreetest.$(OBJEXT) ppuzzle.$(OBJEXT) PCC = @MPICC@ PDEFS = -DPARALLEL PCFLAGS = PLDFLAGS = PLDLIBS = @LIBS@ @MPILIBS@ PCOMPILE = $(PCC) $(PDEFS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(PCFLAGS) $(CFLAGS) PCCLD = $(PCC) PLINK = $(PCCLD) $(AM_CFLAGS) $(PCFLAGS) $(CFLAGS) $(PLDFLAGS) $(LDFLAGS) make-sprng-objs: cd sprng && $(MAKE) $(SPRNG_OBJ) puzzle$(EXEEXT): $(puzzle_LDADD) $(puzzle_SOURCES) make-sprng-objs Makefile $(SLINK) $(puzzle_LDADD) $(SPRNG_DIR_OBJ) $(SLDLIBS) -o $@ sml1.$(OBJEXT): ml1.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/ml1.c && mv ml1.$(OBJEXT) $@ sml2.$(OBJEXT): ml2.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/ml2.c && mv ml2.$(OBJEXT) $@ smlparam.$(OBJEXT): mlparam.c ml.h util.h gamma.h Makefile $(SCOMPILE) -c $(srcdir)/mlparam.c && mv mlparam.$(OBJEXT) $@ smodel1.$(OBJEXT): model1.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/model1.c && mv model1.$(OBJEXT) $@ smodel2.$(OBJEXT): model2.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/model2.c && mv model2.$(OBJEXT) $@ spuzzle1.$(OBJEXT): puzzle1.c ml.h util.h puzzle.h gamma.h ppuzzle.h Makefile $(SCOMPILE) -c $(srcdir)/puzzle1.c && mv puzzle1.$(OBJEXT) $@ spuzzle2.$(OBJEXT): puzzle2.c ml.h util.h puzzle.h ppuzzle.h Makefile $(SCOMPILE) -c $(srcdir)/puzzle2.c && mv puzzle2.$(OBJEXT) $@ spstep.$(OBJEXT): pstep.c ml.h util.h puzzle.h ppuzzle.h Makefile $(SCOMPILE) -c $(srcdir)/pstep.c && mv pstep.$(OBJEXT) $@ sutil.$(OBJEXT): util.c util.h Makefile $(SCOMPILE) -c $(srcdir)/util.c && mv util.$(OBJEXT) $@ sgamma.$(OBJEXT): gamma.c gamma.h util.h Makefile $(SCOMPILE) -c $(srcdir)/gamma.c && mv gamma.$(OBJEXT) $@ sconsensus.$(OBJEXT): consensus.c consensus.h util.h Makefile $(SCOMPILE) -c $(srcdir)/consensus.c && mv consensus.$(OBJEXT) $@ streesort.$(OBJEXT): treesort.c treesort.h util.h Makefile $(SCOMPILE) -c $(srcdir)/treesort.c && mv treesort.$(OBJEXT) $@ streetest.$(OBJEXT): treetest.c treetest.h util.h Makefile $(SCOMPILE) -c $(srcdir)/treetest.c && mv treetest.$(OBJEXT) $@ # #SPRNG # ## sprng/makeseed.$(OBJEXT) : sprng/makeseed.c ## $(CC) -c $(CFLAGS) sprng/makeseed.c ## ## sprng/store.$(OBJEXT) : sprng/store.c sprng/store.h ## $(CC) -c $(CFLAGS) sprng/store.c ## ## sprng/memory.$(OBJEXT) : sprng/memory.c ## $(CC) -c $(CFLAGS) sprng/memory.c ## ## sprng/checkid.$(OBJEXT) : sprng/checkid.c sprng/memory.h ## $(CC) -c $(CFLAGS) sprng/checkid.c ## ## sprng/lcg64.$(OBJEXT) : sprng/interface.h sprng/lcg64.c sprng/memory.h sprng/primes.h sprng/multiply.h sprng/store.h ## $(CC) -c $(CFLAGS) $(FFXN) $(INLINEOPT) lcg64.c ## ## sprng/primes-lcg64.$(OBJEXT) : sprng/primes-lcg64.h sprng/primes-lcg64.c sprng/primelist-lcg64.h ## $(CC) -c $(CFLAGS) primes-lcg64.c ## ## #sprng/lcg64.a: ## # $(CD) sprng; $(make) ## ## #sprng.h: ## # $(CP) $(srcdir)/sprng-1.0/include/sprng.h $@ ## #interface.h: ## # $(CP) $(srcdir)/sprng-1.0/include/interface.h $@ ## #slcg64.o : interface.h lcg64.c memory.h primes.h multiply.h store.h ## # $(SCOMPILE) -c $(srcdir)/lcg64.c && mv lcg64.o $@ ## #plcg64.o : interface.h lcg64.c memory.h primes.h multiply.h store.h ## # $(SCOMPILE) -c $(srcdir)/lcg64.c && mv lcg64.o $@ ## # ## #primes.o : primes.h primes.c ## # $(CC) -c $(CFLAGS) primes.c -I$(SRCDIR) ppuzzle$(EXEEXT): $(ppuzzle_LDADD) $(ppuzzle_SOURCES) make-sprng-objs Makefile $(PLINK) $(ppuzzle_LDADD) $(SPRNG_DIR_OBJ) $(PLDLIBS) -o $@ pml1.$(OBJEXT): ml1.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/ml1.c && mv ml1.$(OBJEXT) $@ pml2.$(OBJEXT): ml2.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/ml2.c && mv ml2.$(OBJEXT) $@ pmlparam.$(OBJEXT): mlparam.c ml.h util.h gamma.h Makefile $(PCOMPILE) -c $(srcdir)/mlparam.c && mv mlparam.$(OBJEXT) $@ pmodel1.$(OBJEXT): model1.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/model1.c && mv model1.$(OBJEXT) $@ pmodel2.$(OBJEXT): model2.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/model2.c && mv model2.$(OBJEXT) $@ ppuzzle1.$(OBJEXT): puzzle1.c ml.h util.h puzzle.h gamma.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/puzzle1.c && mv puzzle1.$(OBJEXT) $@ ppuzzle2.$(OBJEXT): puzzle2.c ml.h util.h puzzle.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/puzzle2.c && mv puzzle2.$(OBJEXT) $@ ppstep.$(OBJEXT): pstep.c ml.h util.h puzzle.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/pstep.c && mv pstep.$(OBJEXT) $@ putil.$(OBJEXT): util.c util.h Makefile $(PCOMPILE) -c $(srcdir)/util.c && mv util.$(OBJEXT) $@ pgamma.$(OBJEXT): gamma.c gamma.h util.h Makefile $(PCOMPILE) -c $(srcdir)/gamma.c && mv gamma.$(OBJEXT) $@ pconsensus.$(OBJEXT): consensus.c consensus.h util.h Makefile $(PCOMPILE) -c $(srcdir)/consensus.c && mv consensus.$(OBJEXT) $@ ptreesort.$(OBJEXT): treesort.c treesort.h util.h Makefile $(PCOMPILE) -c $(srcdir)/treesort.c && mv treesort.$(OBJEXT) $@ ptreetest.$(OBJEXT): treetest.c treetest.h util.h Makefile $(PCOMPILE) -c $(srcdir)/treetest.c && mv treetest.$(OBJEXT) $@ psched.$(OBJEXT): sched.c sched.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/sched.c && mv sched.$(OBJEXT) $@ ppuzzle.$(OBJEXT): ppuzzle.c ppuzzle.h ml.h util.h puzzle.h gamma.h sched.h Makefile $(PCOMPILE) -c $(srcdir)/ppuzzle.c tree-puzzle-5.2/src/Makefile.in0000644000076400001440000005564310075305505012200 # Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MPICC = @MPICC@ MPICC0 = @MPICC0@ MPICC1 = @MPICC1@ MPICC2 = @MPICC2@ MPICC3 = @MPICC3@ MPICC4 = @MPICC4@ MPICC5 = @MPICC5@ MPICC6 = @MPICC6@ MPICFLAGS = @MPICFLAGS@ MPIDEFS = @MPIDEFS@ MPILIBS = @MPILIBS@ PACKAGE = @PACKAGE@ PPUZZLE = @PPUZZLE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ SUBDIRS = sprng bin_PROGRAMS = puzzle @PPUZZLE@ EXTRA_PROGRAMS = ppuzzle EXTRA_DIST = \ pstep-deglob.c\ pstep-deglob.h\ pstep-mrca.c\ pstep-mrca.h\ pstep-orig.c\ pstep-orig.h\ pstep-recursive.c\ pstep-recursive.h\ split.c \ recur.c \ recur-old.c \ mrca.c \ pstep-split.c\ pstep-split.h\ subsetmatr.c\ subsetmatr.h\ pstep-trueID.c\ pstep-trueID.h SPRNG_OBJ = makeseed.$(OBJEXT) store.$(OBJEXT) memory.$(OBJEXT) checkid.$(OBJEXT) lcg64.$(OBJEXT) primes-lcg64.$(OBJEXT) SPRNG_DIR_OBJ = sprng/makeseed.$(OBJEXT) sprng/store.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) #SPRNG_OBJ = sprng/makeseed.$(OBJEXT) sprng/store.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) #SPRNG_LFG_SRCS = sprng/lfg.c sprng/interface.h sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_LFG_OBJS = sprng/lfg.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_MLFG_SRCS = sprng/mlfg.c sprng/interface.h sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c sprng/int64.h #SPRNG_MLFG_OBJS = sprng/mlfg.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_LCG_SRCS = sprng/lcg.c sprng/interface.h sprng/primes-lcg.c sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_LCG_OBJS = sprng/lcg.$(OBJEXT) sprng/primes-lcg.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_CMRG_SRCS = sprng/lcg64.c sprng/interface.h sprng/primes-lcg64.c sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_CMRG_OBJS = sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) #SPRNG_LCG64_SRCS = sprng/lcg64.c sprng/interface.h sprng/primes-lcg64.c sprng/makeseed.c sprng/memory.c sprng/checkid.c sprng/store.c #SPRNG_LCG64_OBJS = sprng/lcg64.$(OBJEXT) sprng/primes-lcg64.$(OBJEXT) sprng/makeseed.$(OBJEXT) sprng/memory.$(OBJEXT) sprng/checkid.$(OBJEXT) sprng/store.$(OBJEXT) puzzle_SOURCES = gamma.c ml1.c ml2.c mlparam.c model1.c model2.c puzzle1.c puzzle2.c pstep.c util.c consensus.c treesort.c treetest.c ml.h util.h puzzle.h pstep.h gamma.h consensus.h treesort.h treetest.h #puzzle_LDADD = sgamma.o sml1.o sml2.o smlparam.o smodel1.o smodel2.o spuzzle1.o spuzzle2.o spstep.o sutil.o sconsensus.o streesort.o sprng/liblcg64.a puzzle_LDADD = sgamma.$(OBJEXT) sml1.$(OBJEXT) sml2.$(OBJEXT) smlparam.$(OBJEXT) smodel1.$(OBJEXT) smodel2.$(OBJEXT) spuzzle1.$(OBJEXT) spuzzle2.$(OBJEXT) spstep.$(OBJEXT) sutil.$(OBJEXT) sconsensus.$(OBJEXT) streesort.$(OBJEXT) streetest.$(OBJEXT) INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/sprng SDEFS = SCFLAGS = SLDFLAGS = SLDLIBS = @LIBS@ SCOMPILE = $(CC) $(SDEFS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(SCFLAGS) $(CFLAGS) SCCLD = $(CC) SLINK = $(SCCLD) $(AM_CFLAGS) $(CFLAGS) $(SLDFLAGS) $(LDFLAGS) ppuzzle_SOURCES = gamma.c ml1.c ml2.c mlparam.c model1.c model2.c puzzle1.c puzzle2.c pstep.c sched.c util.c consensus.c treesort.c treetest.c ppuzzle.c ml.h util.h puzzle.h pstep.h gamma.h ppuzzle.h sched.h consensus.h treesort.h treetest.h ppuzzle_LDADD = pgamma.$(OBJEXT) pml1.$(OBJEXT) pml2.$(OBJEXT) pmlparam.$(OBJEXT) pmodel1.$(OBJEXT) pmodel2.$(OBJEXT) ppuzzle1.$(OBJEXT) ppuzzle2.$(OBJEXT) ppstep.$(OBJEXT) psched.$(OBJEXT) putil.$(OBJEXT) pconsensus.$(OBJEXT) ptreesort.$(OBJEXT) ptreetest.$(OBJEXT) ppuzzle.$(OBJEXT) PCC = @MPICC@ PDEFS = -DPARALLEL PCFLAGS = PLDFLAGS = PLDLIBS = @LIBS@ @MPILIBS@ PCOMPILE = $(PCC) $(PDEFS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(PCFLAGS) $(CFLAGS) PCCLD = $(PCC) PLINK = $(PCCLD) $(AM_CFLAGS) $(PCFLAGS) $(CFLAGS) $(PLDFLAGS) $(LDFLAGS) subdir = src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = EXTRA_PROGRAMS = ppuzzle$(EXEEXT) bin_PROGRAMS = puzzle$(EXEEXT) @PPUZZLE@ PROGRAMS = $(bin_PROGRAMS) am_ppuzzle_OBJECTS = gamma.$(OBJEXT) ml1.$(OBJEXT) ml2.$(OBJEXT) \ mlparam.$(OBJEXT) model1.$(OBJEXT) model2.$(OBJEXT) \ puzzle1.$(OBJEXT) puzzle2.$(OBJEXT) pstep.$(OBJEXT) \ sched.$(OBJEXT) util.$(OBJEXT) consensus.$(OBJEXT) \ treesort.$(OBJEXT) treetest.$(OBJEXT) ppuzzle.$(OBJEXT) ppuzzle_OBJECTS = $(am_ppuzzle_OBJECTS) ppuzzle_DEPENDENCIES = pgamma.$(OBJEXT) pml1.$(OBJEXT) pml2.$(OBJEXT) \ pmlparam.$(OBJEXT) pmodel1.$(OBJEXT) pmodel2.$(OBJEXT) \ ppuzzle1.$(OBJEXT) ppuzzle2.$(OBJEXT) ppstep.$(OBJEXT) \ psched.$(OBJEXT) putil.$(OBJEXT) pconsensus.$(OBJEXT) \ ptreesort.$(OBJEXT) ptreetest.$(OBJEXT) ppuzzle.$(OBJEXT) ppuzzle_LDFLAGS = am_puzzle_OBJECTS = gamma.$(OBJEXT) ml1.$(OBJEXT) ml2.$(OBJEXT) \ mlparam.$(OBJEXT) model1.$(OBJEXT) model2.$(OBJEXT) \ puzzle1.$(OBJEXT) puzzle2.$(OBJEXT) pstep.$(OBJEXT) \ util.$(OBJEXT) consensus.$(OBJEXT) treesort.$(OBJEXT) \ treetest.$(OBJEXT) puzzle_OBJECTS = $(am_puzzle_OBJECTS) puzzle_DEPENDENCIES = sgamma.$(OBJEXT) sml1.$(OBJEXT) sml2.$(OBJEXT) \ smlparam.$(OBJEXT) smodel1.$(OBJEXT) smodel2.$(OBJEXT) \ spuzzle1.$(OBJEXT) spuzzle2.$(OBJEXT) spstep.$(OBJEXT) \ sutil.$(OBJEXT) sconsensus.$(OBJEXT) streesort.$(OBJEXT) \ streetest.$(OBJEXT) puzzle_LDFLAGS = DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/consensus.Po ./$(DEPDIR)/gamma.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ml1.Po ./$(DEPDIR)/ml2.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mlparam.Po ./$(DEPDIR)/model1.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/model2.Po ./$(DEPDIR)/ppuzzle.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pstep.Po ./$(DEPDIR)/puzzle1.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/puzzle2.Po ./$(DEPDIR)/sched.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/treesort.Po ./$(DEPDIR)/treetest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/util.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ DIST_SOURCES = $(ppuzzle_SOURCES) $(puzzle_SOURCES) RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ uninstall-info-recursive all-recursive install-data-recursive \ install-exec-recursive installdirs-recursive install-recursive \ uninstall-recursive check-recursive installcheck-recursive DIST_COMMON = README Makefile.am Makefile.in config.h.in DIST_SUBDIRS = $(SUBDIRS) SOURCES = $(ppuzzle_SOURCES) $(puzzle_SOURCES) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/config.h.in distclean-hdr: -rm -f config.h binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ f=`echo "$$f" | sed -e 's,^.*/,,'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/consensus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ml1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ml2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlparam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppuzzle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pstep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/puzzle1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/puzzle2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treesort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treetest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `cygpath -w $<` CCDEPMODE = @CCDEPMODE@ uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-recursive distclean \ distclean-compile distclean-depend distclean-generic \ distclean-hdr distclean-recursive distclean-tags distdir dvi \ dvi-am dvi-recursive info info-am info-recursive install \ install-am install-binPROGRAMS install-data install-data-am \ install-data-recursive install-exec install-exec-am \ install-exec-recursive install-info install-info-am \ install-info-recursive install-man install-recursive \ install-strip installcheck installcheck-am installdirs \ installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-recursive \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am \ uninstall-info-recursive uninstall-recursive make-sprng-objs: cd sprng && $(MAKE) $(SPRNG_OBJ) puzzle$(EXEEXT): $(puzzle_LDADD) $(puzzle_SOURCES) make-sprng-objs Makefile $(SLINK) $(puzzle_LDADD) $(SPRNG_DIR_OBJ) $(SLDLIBS) -o $@ sml1.$(OBJEXT): ml1.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/ml1.c && mv ml1.$(OBJEXT) $@ sml2.$(OBJEXT): ml2.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/ml2.c && mv ml2.$(OBJEXT) $@ smlparam.$(OBJEXT): mlparam.c ml.h util.h gamma.h Makefile $(SCOMPILE) -c $(srcdir)/mlparam.c && mv mlparam.$(OBJEXT) $@ smodel1.$(OBJEXT): model1.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/model1.c && mv model1.$(OBJEXT) $@ smodel2.$(OBJEXT): model2.c ml.h util.h Makefile $(SCOMPILE) -c $(srcdir)/model2.c && mv model2.$(OBJEXT) $@ spuzzle1.$(OBJEXT): puzzle1.c ml.h util.h puzzle.h gamma.h ppuzzle.h Makefile $(SCOMPILE) -c $(srcdir)/puzzle1.c && mv puzzle1.$(OBJEXT) $@ spuzzle2.$(OBJEXT): puzzle2.c ml.h util.h puzzle.h ppuzzle.h Makefile $(SCOMPILE) -c $(srcdir)/puzzle2.c && mv puzzle2.$(OBJEXT) $@ spstep.$(OBJEXT): pstep.c ml.h util.h puzzle.h ppuzzle.h Makefile $(SCOMPILE) -c $(srcdir)/pstep.c && mv pstep.$(OBJEXT) $@ sutil.$(OBJEXT): util.c util.h Makefile $(SCOMPILE) -c $(srcdir)/util.c && mv util.$(OBJEXT) $@ sgamma.$(OBJEXT): gamma.c gamma.h util.h Makefile $(SCOMPILE) -c $(srcdir)/gamma.c && mv gamma.$(OBJEXT) $@ sconsensus.$(OBJEXT): consensus.c consensus.h util.h Makefile $(SCOMPILE) -c $(srcdir)/consensus.c && mv consensus.$(OBJEXT) $@ streesort.$(OBJEXT): treesort.c treesort.h util.h Makefile $(SCOMPILE) -c $(srcdir)/treesort.c && mv treesort.$(OBJEXT) $@ streetest.$(OBJEXT): treetest.c treetest.h util.h Makefile $(SCOMPILE) -c $(srcdir)/treetest.c && mv treetest.$(OBJEXT) $@ # #SPRNG # ppuzzle$(EXEEXT): $(ppuzzle_LDADD) $(ppuzzle_SOURCES) make-sprng-objs Makefile $(PLINK) $(ppuzzle_LDADD) $(SPRNG_DIR_OBJ) $(PLDLIBS) -o $@ pml1.$(OBJEXT): ml1.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/ml1.c && mv ml1.$(OBJEXT) $@ pml2.$(OBJEXT): ml2.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/ml2.c && mv ml2.$(OBJEXT) $@ pmlparam.$(OBJEXT): mlparam.c ml.h util.h gamma.h Makefile $(PCOMPILE) -c $(srcdir)/mlparam.c && mv mlparam.$(OBJEXT) $@ pmodel1.$(OBJEXT): model1.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/model1.c && mv model1.$(OBJEXT) $@ pmodel2.$(OBJEXT): model2.c ml.h util.h Makefile $(PCOMPILE) -c $(srcdir)/model2.c && mv model2.$(OBJEXT) $@ ppuzzle1.$(OBJEXT): puzzle1.c ml.h util.h puzzle.h gamma.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/puzzle1.c && mv puzzle1.$(OBJEXT) $@ ppuzzle2.$(OBJEXT): puzzle2.c ml.h util.h puzzle.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/puzzle2.c && mv puzzle2.$(OBJEXT) $@ ppstep.$(OBJEXT): pstep.c ml.h util.h puzzle.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/pstep.c && mv pstep.$(OBJEXT) $@ putil.$(OBJEXT): util.c util.h Makefile $(PCOMPILE) -c $(srcdir)/util.c && mv util.$(OBJEXT) $@ pgamma.$(OBJEXT): gamma.c gamma.h util.h Makefile $(PCOMPILE) -c $(srcdir)/gamma.c && mv gamma.$(OBJEXT) $@ pconsensus.$(OBJEXT): consensus.c consensus.h util.h Makefile $(PCOMPILE) -c $(srcdir)/consensus.c && mv consensus.$(OBJEXT) $@ ptreesort.$(OBJEXT): treesort.c treesort.h util.h Makefile $(PCOMPILE) -c $(srcdir)/treesort.c && mv treesort.$(OBJEXT) $@ ptreetest.$(OBJEXT): treetest.c treetest.h util.h Makefile $(PCOMPILE) -c $(srcdir)/treetest.c && mv treetest.$(OBJEXT) $@ psched.$(OBJEXT): sched.c sched.h ppuzzle.h Makefile $(PCOMPILE) -c $(srcdir)/sched.c && mv sched.$(OBJEXT) $@ ppuzzle.$(OBJEXT): ppuzzle.c ppuzzle.h ml.h util.h puzzle.h gamma.h sched.h Makefile $(PCOMPILE) -c $(srcdir)/ppuzzle.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tree-puzzle-5.2/src/config.h.in0000644000076400001440000000335610075305506012151 /* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned' if does not define. */ #undef size_t tree-puzzle-5.2/src/mrca.c0000644000076400001440000007101510073365375011221 /* * mrca.c (included by pstep.c) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ /* initialize tree with the following starting configuration (see pstep.h) */ void inittree_mrca(ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int *rootleaf, /* out: rooting leaf (=trueID[0]) */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf, /* out: next free leaf index (=3) */ int *trueID, imatrix mrcamatrix) { int i, j; ONEEDGE *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for tmpvector with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); for (j = 0; j < Maxspc; j++) tmpedgeofleaf[j]=-1; *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the split map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].cluster = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedge[i].cluster == NULL) maerror("edge cluster array in inittree"); (tmpedge)[i].penaltyprop = (uli *) calloc((size_t) Maxspc, sizeof(uli) ); if (tmpedge[i].penaltyprop == NULL) maerror("edge penalty propagation array in inittree"); (tmpedge)[i].taxon = -1; for (j = 0; j < Maxspc; j++) { (tmpedge)[i].cluster[j]=-1; (tmpedge)[i].penaltyprop[j]=0; } /* number all edges */ tmpedge[i].numedge = i; } /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* uppest edge =: root edge*/ *rootleaf = trueID[0]; /* init cluster vectors: */ /* for edge 0 */ (tmpedge[0].cluster)[0] = trueID[1]; /* leaf 1 in edge cluster */ (tmpedge[0].cluster)[1] = trueID[2]; /* leaf 2 in edge cluster */ tmpedge[0].clsize = 2; /* for edge 1 */ (tmpedge[1].cluster)[0] = trueID[1]; /* leaf 0 in edge cluster */ tmpedge[1].clsize = 1; /* for edge 2 */ (tmpedge[2].cluster)[0] = trueID[2]; /* leaf 0 in edge cluster */ tmpedge[2].clsize = 1; /* initializing mrca marix */ for (i=0; i < Maxspc; i++) { mrcamatrix[*rootleaf][i] = 0; mrcamatrix[i][*rootleaf] = 0; } mrcamatrix[trueID[1]][trueID[2]] = 0; mrcamatrix[trueID[2]][trueID[1]] = 0; /* debug */ mrcamatrix[trueID[1]][trueID[1]] = -8; mrcamatrix[trueID[2]][trueID[2]] = -8; /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* taxon IDs of leaves */ tmpedge[0].taxon = trueID[0]; tmpedge[1].taxon = trueID[1]; tmpedge[2].taxon = trueID[2]; /* edges of leaves */ tmpedgeofleaf[trueID[0]] = 0; tmpedgeofleaf[trueID[1]] = 1; tmpedgeofleaf[trueID[2]] = 2; } /* inittree_mrca */ /******************/ /* free memory (to be called after inittree) */ void freetree_mrca(ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; /* free vectors */ for (i = 0; i < 2 * Maxspc - 3; i++) { free(edge[i].cluster); free(edge[i].penaltyprop); } /* free tree topology */ free(edge); /* free external edge lookup vector */ free(edgeofleaf); } /* freetree_mrca */ /******************/ void updatecluster_mrca(ONEEDGE *curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to clusters */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ imatrix mrcamatrix) { int n, edgenum, clsize, leaf; ONEEDGE *branchedge; if (wherefrom == DOWNLEFT) branchedge = curredge->downright; else branchedge = curredge->downleft; edgenum = curredge->numedge; clsize = branchedge->clsize; for (n=0; ncluster[n]; mrcamatrix[newleaf][leaf] = edgenum; mrcamatrix[leaf][newleaf] = edgenum; } curredge->cluster[(curredge->clsize)++] = newleaf; /* newleaf is down */ if ((curredge->up) != NULL) { /* not root */ if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } updatecluster_mrca(curredge->up, wherefrom, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf, mrcamatrix); } } /* updatecluster_mrca */ /******************/ /* add next leaf on the specified edge */ void updatetreeclusters_mrca(int dockedge, /* dockedge */ int newleaf, /* leaf to add to clusters */ ONEEDGE *edge, /* edge array */ int rootleaf, /* root leaf */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ ivector permut, imatrix mrcamatrix) { int n; /* counter */ int wherefrom; /* direction to last edge */ ONEEDGE *curredge; /* edge array */ /* copy cluster dockedge -> nextedge */ for (n=0; n < edge[dockedge].clsize; n++) { (edge[in_nextedge]).cluster[n] = (edge[dockedge]).cluster[n]; } if (&(edge[in_nextedge]) != &(edge[edgeofleaf[rootleaf]])) { #if 0 mrcamatrix[rootleaf][newleaf] = in_nextedge; mrcamatrix[newleaf][rootleaf] = in_nextedge; #endif } else { for (n=0; n < Maxspc; n++) { mrcamatrix[rootleaf][n] = in_nextedge; mrcamatrix[n][rootleaf] = in_nextedge; } } /* set new internal edge's (nextedge) cluster size */ (edge[in_nextedge]).clsize = (edge[dockedge]).clsize; /* add newleaf new external edge's (nextedge+1) cluster */ (edge[in_nextedge + 1]).cluster[0] = newleaf; (edge[in_nextedge + 1]).clsize = 1; curredge = &(edge[in_nextedge+1]); if (curredge->up != NULL) { /* not root */ if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } /* climbing up from insertion point */ updatecluster_mrca(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf, mrcamatrix); } } /* updatetreeclusters_mrca */ /******************/ #if 0 void updatesplit_split(ONEEDGE *curredge, /* current edge */ int wherefrom, /* direction to last curr. edge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf) /* next free leaf idx */ { switch (wherefrom) { case UP: curredge->split[(curredge->upsize)++] = newleaf; /* leaf is up */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { /* nothing to do */ return; } break; case DOWNLEFT: curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downright, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if (curredge->up != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; case DOWNRIGHT: curredge->split[Maxspc - ++(curredge->downsize)] = newleaf; /* leaf is down */ if (curredge->downright != NULL) { /* not leaf */ updatesplit_split(curredge->downleft, UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } if ((curredge->up) != NULL) { /* not root */ if ((curredge->up)->downright == curredge) { updatesplit_split(curredge->up, DOWNRIGHT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } else { updatesplit_split(curredge->up, DOWNLEFT, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } } break; } } /* updatesplit_split */ /******************/ /* add next leaf on the specified edge */ void updatetreesplits_split(int dockedge, /* dockedge */ int newleaf, /* leaf to add to splits */ ONEEDGE *edge, /* edge array */ int Maxspc, /* No. of species */ int *edgeofleaf, /* ext. edge idx array */ int in_nextedge, /* next free edge idx */ int in_nextleaf, /* next free leaf idx */ ivector permut) { int n; /* counter */ int wherefrom; /* direction to last edge */ ONEEDGE *curredge; /* edge array */ /* copy clusters from dockedge to in_nextedge */ /* up-cluster: upsize-1 .. 0 */ for (n=(edge[dockedge].upsize) - 1; n >= 0; n--) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).upsize = (edge[dockedge]).upsize; /* down-cluster: downsize .. Maxspc-1 */ for (n=Maxspc - (edge[dockedge]).downsize; n < Maxspc; n++) { (edge[in_nextedge]).split[n] = (edge[dockedge]).split[n]; } (edge[in_nextedge]).downsize = (edge[dockedge]).downsize; /* add the new taxon to in_nextedge */ (edge[in_nextedge]).split[Maxspc - ++((edge[in_nextedge]).downsize)] = permut[in_nextleaf]; /* setup clusters for new external edge (in_nextedge+1) */ /* up-cluster: all taxa in tree */ for (n=0; n < in_nextleaf; n++) { (edge[in_nextedge+1]).split[n] = permut[n]; } (edge[in_nextedge+1]).upsize = in_nextleaf; /* down-cluster: the new taxon itself */ (edge[in_nextedge+1]).split[Maxspc-1] = permut[in_nextleaf]; (edge[in_nextedge+1]).downsize = 1; curredge = &(edge[in_nextedge]); if (curredge->up != NULL) { /* not root */ if (((curredge->up)->downright) == curredge) { wherefrom = DOWNRIGHT; } else { wherefrom = DOWNLEFT; } /* climbing up from insertion point */ updatesplit_split(curredge->up, wherefrom, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* climbing down to dockedge from insertion point */ updatesplit_split(&(edge[dockedge]), UP, newleaf, edge, Maxspc, Maxbrnch, edgeofleaf, in_nextedge, in_nextleaf); } /* updatetreesplits_split */ #endif /******************/ /* add next leaf on the specified edge */ void addnextleaf_mrca(int dockedge, /* insert here */ ONEEDGE *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int rootleaf, /* uppest leaf */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf, /* next free leaf idx */ ivector permut, imatrix mrcamatrix) /* MRCA matrix */ { int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == root edge */ if (edgeofleaf[rootleaf] == dockedge) edgeofleaf[rootleaf] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; /* if not root edge: connect ancestor to internal edge (nextedge) */ if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding new external edge (nextedge+1) to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edge[nextedge+1].taxon = permut[nextleaf]; edgeofleaf[permut[nextleaf]] = nextedge+1; #if 0 updatetreesplits_split(dockedge, permut[nextleaf], edge, Maxspc, edgeofleaf, nextedge, nextleaf, permut); #endif updatetreeclusters_mrca(dockedge, permut[nextleaf], edge, rootleaf, Maxspc, edgeofleaf, nextedge, nextleaf, permut, mrcamatrix); (*in_nextedge) += 2; (*in_nextleaf) ++; } /* addnextleaf_mrca */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_mrca(ONEEDGE *curredge, /* edge array */ int Maxspc, /* number of taxa */ imatrix mrcamatrix, /* MRCA matrix */ int *minedges, /* minimum edge vector */ int *howmany, /* number minimum edge */ uli *minpenalty) /* minimum penalty */ { int l, r; int lmax, rmax; int taxon; ONEEDGE *left; /* temp edge ptr */ ONEEDGE *right; /* temp edge ptr */ if (curredge->downleft == NULL) { /* leaf edge */ /* check for new minimal panalty */ if (*minpenalty == curredge->edgeinfo) { /* another min edge */ minedges[(*howmany)++] = curredge->numedge; } else { /* -> not same minimum */ if (*minpenalty > curredge->edgeinfo) { /* new minimum penalty */ *howmany = 1; minedges[0] = curredge->numedge; *minpenalty = curredge->edgeinfo; } /* if new minimum */ } /* same minimum */ } else { /* -> internal edge */ /* propagate to left child */ left = curredge->downleft; lmax = left->clsize; left->edgeinfo = 0; for (l= 0; lcluster[l]; left->edgeinfo += curredge->penaltyprop[taxon]; left->penaltyprop[taxon] += curredge->penaltyprop[taxon]; } /* propagate to right child */ right = curredge->downright; rmax = right->clsize; right->edgeinfo = 0; for (r= 0; rcluster[r]; right->edgeinfo += curredge->penaltyprop[taxon]; right->penaltyprop[taxon] += curredge->penaltyprop[taxon]; } /* descend downleft */ computepenalties_mrca(left, Maxspc, mrcamatrix, minedges, howmany, minpenalty); /* descend downright */ computepenalties_mrca(right, Maxspc, mrcamatrix, minedges, howmany, minpenalty); if (*minpenalty == curredge->edgeinfo) { /* another min edge */ minedges[(*howmany)++] = curredge->numedge; } else { /* -> not same minimum */ if (*minpenalty > curredge->edgeinfo) { /* new minimum penalty */ *howmany = 1; minedges[0] = curredge->numedge; *minpenalty = curredge->edgeinfo; } /* if new minimum */ } /* same minimum */ ; } } /* computepenalties_mrca */ /******************/ /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenaltiestree_mrca(ONEEDGE *tmpedge, /* edge array */ int *edgeofleaf, /* external edge ptrs */ int rootleaf, /* idx of uppest edge */ int nextleaf, /* next free leaf idx */ int Maxspc, /* number of taxa */ imatrix mrcamatrix, /* MRCA matrix */ int *minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int rootedge; int taxon; int lmax, rmax; int l, r; int howmany = 0; ONEEDGE *left; /* temp edge ptr */ ONEEDGE *right; /* temp edge ptr */ uli minpenalty; uli edgeinfo; ONEEDGE *curredge; rootedge = edgeofleaf[rootleaf]; curredge = &(tmpedge[rootedge]); curredge->edgeinfo = curredge->penaltyprop[rootleaf]; if (minedges == NULL) minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); /* first edge: init */ minedges[0] = rootedge; howmany = 1; minpenalty = curredge->edgeinfo; edgeinfo = 0; for (l= 0; lpenaltyprop)[curredge->cluster[l]]; } #if 0 if ((edgeinfo) != (curredge->edgeinfo)) fprintf(stderr, "%ld != %ld\n", edgeinfo, curredge->edgeinfo); else fprintf(stderr, "%ld == %ld\n", edgeinfo, curredge->edgeinfo); if ((edgeinfo) != (curredge->edgeinfo)) { /* root edge cluster penalty should be equal to root penalty */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR HSCL2 TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } #endif /* propagate to left child */ left = curredge->downleft; lmax = left->clsize; left->edgeinfo = 0; for (l= 0; lcluster[l]; left->edgeinfo += curredge->penaltyprop[taxon]; left->penaltyprop[taxon] += curredge->penaltyprop[taxon]; } /* propagate to right child */ right = curredge->downright; rmax = right->clsize; right->edgeinfo = 0; for (r= 0; rcluster[r]; right->edgeinfo += curredge->penaltyprop[taxon]; right->penaltyprop[taxon] += curredge->penaltyprop[taxon]; } if ((lmax + rmax) != (nextleaf-1)) { /* root edge cluster should yield all other leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR HSCL1 TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* descend downleft */ computepenalties_mrca(left, Maxspc, mrcamatrix, minedges, &howmany, &minpenalty); /* descend downright */ computepenalties_mrca(right, Maxspc, mrcamatrix, minedges, &howmany, &minpenalty); #if 0 /* optimization (HAS) */ if (howmany > 1) *out_minedge = minedges[randominteger(howmany)]; else *out_minedge = minedges[0]; #endif if (howmany > 1) { /* draw random edge */ int i, k, randomnum; randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (tmpedge[i].edgeinfo != minpenalty); *out_minedge = tmpedge[i].numedge; } } else { *out_minedge = minedges[0]; } *out_howmany = howmany; *out_minpenalty = minpenalty; } /* computepenaltiestree_mrca */ /******************/ #if 0 /* compute edge penalties using splits, if #minedges>1 choose one randomly */ void computepenalties_split(ONEEDGE *tmpedge, /* edge array */ int nextedge, /* next free edge idx */ int Maxspc, /* number of taxa */ ulimatrix neighbormatr, /* neighborhood matrix */ int **out_minedges, /* minimum edge vector */ int *out_howmany, /* number minimum edge */ uli *out_minpenalty, /* minimum penalty */ int *out_minedge) /* minimum edge */ { int i; /* counter */ int a, b; int idxA, idxB; int maxUP; /* index counter for right/left split cluster */ int howmany = 0; int *minedges = *out_minedges; uli minpenalty; for (i = 0; i < nextedge; i++) { (tmpedge[i]).penalty = 0; /* reset penalty */ maxUP = (tmpedge[i]).upsize; for (idxB = Maxspc - (tmpedge[i]).downsize; idxB < Maxspc; idxB++) { b = (tmpedge[i].split)[idxB]; for (idxA = 0; idxA < maxUP; idxA++) { a = (tmpedge[i].split)[idxA]; (tmpedge[i]).penalty += neighbormatr[a][b]; } /* for all root-sided (up) taxa */ } /* for all non-root-sided (down) taxa */ if (howmany == 0) { /* first edge: init */ if (minedges == NULL) minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); minedges[howmany++] = i; minpenalty = tmpedge[i].penalty; } else { /* -> all other edges */ if (minpenalty == tmpedge[i].penalty) { /* another min edge */ minedges[howmany++] = i; } else { /* -> not same minimum */ if (minpenalty > tmpedge[i].penalty) { /* new minimum penalty */ howmany = 0; minedges[howmany++] = i; minpenalty = tmpedge[i].penalty; } /* if new minimum */ } /* same minimum */ } /* if all other edges */ } /* for all edges */ *out_howmany = howmany, *out_minpenalty = minpenalty; #if 0 if (howmany > 1) *out_minedge = minedges[0]; else *out_minedge = minedges[0]; #endif } /* computepenalties_split */ #endif /******************/ /* trueID-ed (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep_mrca( /* PStep (intermediate) tree topol: */ ONEEDGE **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ int *rootleaf, /* out: root leaf in topol, starting perm[0] */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permut) /* in: species permutation (trueID) */ { /* local variables: */ int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int idxA, idxB; int idxC, idxI; /* index counter for quartet leaves */ int chooseX, chooseY; /* end leaves of penalty path */ ONEEDGE *tmpedge; /* new array of edges */ int *tmpedgeofleaf; /* array of extern edge ptrs */ int tmprootleaf; /* root edge */ imatrix mrcamatrix; int mrca; int *minedges; int howmany; #if 0 ulimatrix neighbormatr; neighbormatr = new_ulimatrix(Maxspc,Maxspc); #endif minedges = (int *) calloc((size_t) Maxspc, sizeof(int)); if (minedges == NULL) maerror("minimal edge set in onepstep_mrca"); mrcamatrix = new_imatrix(Maxspc,Maxspc); /* allocate and initialize new tree topology */ inittree_mrca(&tmpedge, &tmpedgeofleaf, &tmprootleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf, permut, mrcamatrix); /* check_mrca(tmpedge, Maxspc, tmpedgeofleaf, nextedge, nextleaf, permut); */ for (idxI = 3; idxI < Maxspc; idxI++) { i = permut[idxI]; #if 0 fprintf(stderr, "----------------------------------------------\n"); fprintf(stderr, " %d. adding taxon %d \n", idxI, i); fprintf(stderr, "----------------------------------------------\n"); /* initialize penalty neighborhood matrix + leafpenalty vector */ for (idxA = 0; idxA < nextleaf - 1; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf; idxB++) { b = permut[idxB]; neighbormatr[a][b] = 0; neighbormatr[b][a] = 0; } } /* for all entries in the upper neighbormatr */ #endif /* * core of quartet puzzling algorithm */ for (idxA = 0; idxA < nextleaf - 2; idxA++) { a = permut[idxA]; for (idxB = idxA + 1; idxB < nextleaf - 1; idxB++) { b = permut[idxB]; for (idxC = idxB + 1; idxC < nextleaf; idxC++) { c = permut[idxC]; /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* de-trueID-ed (HAS) */ checkquartet(a, b, c, i, &chooseX, &chooseY); #if 0 (neighbormatr[chooseX][chooseY])++; (neighbormatr[chooseY][chooseX])++; #endif mrca = mrcamatrix[chooseX][chooseY]; (tmpedge[mrca].penaltyprop[chooseX])++; (tmpedge[mrca].penaltyprop[chooseY])++; } /* for all quartets q=(a,b,c,i): c */ } /* for all quartets q=(a,b,c,i): b */ } /* for all quartets q=(a,b,c,i): a */ #if 0 computepenalties_split(tmpedge, nextedge, Maxspc, neighbormatr, &minedges, &howmany, &mininfo, &minedge); {int m,n; for (m=0; m #endif /* * Use Scalable Parallel Random Number Generator * See sprng.cs.fsu.edu for details * from National Center for Supercomputing Applications (NCSA) * See www.ncsa.uiuc.edu */ #ifdef NOSPRNG # ifdef SPRNG # undef SPRNG # endif #else # define SPRNG 1 #endif #ifdef SPRNG # ifdef PARALLEL # define USE_MPI # ifndef EXTERN # define EXTERN extern # endif # include "ppuzzle.h" # endif # if 0 # define SIMPLE_SPRNG # endif # include "sprng/sprng.h" #endif #include "util.h" #define STDOUT stdout #ifndef PARALLEL /* because printf() runs significantly faster */ /* than fprintf(stdout) on an Apple McIntosh */ /* (HS) */ # define FPRINTF printf # define STDOUTFILE #else # define FPRINTF fprintf # define STDOUTFILE STDOUT, extern int PP_NumProcs; extern int PP_Myid; long int PP_randn; long int PP_rand; void PP_Finalize(); #endif /********************************** * memory allocation error handler */ void maerror(char *message) { fprintf(STDOUT, "\n\n\nUnable to proceed (lack of memory: %s)\n\n", message); fprintf(STDOUT, "Hint for Macintosh users:\n"); fprintf(STDOUT, "Use the command of the Finder to increase the memory partition!\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* maerror */ /****************************************************** * memory allocate double vectors, matrices, and cubes */ dvector new_dvector(int n) { dvector v; v = (dvector) calloc((size_t) n, sizeof(double)); if (v == NULL) maerror("step 1 in new_dvector"); return v; } /* new_dvector */ /******************/ dmatrix new_dmatrix(int nrow, int ncol) { int i; dmatrix m; m = (dmatrix) calloc((size_t) nrow, sizeof(dvector)); if (m == NULL) maerror("step 1 in in new_dmatrix"); *m = (dvector) calloc((size_t) (nrow * ncol), sizeof(double)); if (*m == NULL) maerror("step 2 in in new_dmatrix"); for (i = 1; i < nrow; i++) m[i] = m[i-1] + ncol; return m; } /* new_dmatrix */ /******************/ dcube new_dcube(int ntri, int nrow, int ncol) { int i, j; dcube c; c = (dcube) calloc((size_t) ntri, sizeof(dmatrix)); if (c == NULL) maerror("step 1 in in new_dcube"); *c = (dmatrix) calloc((size_t) (ntri * nrow), sizeof(dvector)); if (*c == NULL) maerror("step 2 in in new_dcube"); **c = (dvector) calloc((size_t) (ntri * nrow * ncol), sizeof(double)); if (**c == NULL) maerror("step 3 in in new_dcube"); for (j = 1; j < nrow; j++) c[0][j] = c[0][j-1] + ncol; for (i = 1; i < ntri; i++) { c[i] = c[i-1] + nrow; c[i][0] = c[i-1][0] + nrow * ncol; for (j = 1; j < nrow; j++) c[i][j] = c[i][j-1] + ncol; } return c; } /* new_dcube */ /******************/ void free_dvector(dvector v) { free((double *) v); } /* free_dvector */ /******************/ void free_dmatrix(dmatrix m) { free((double *) *m); free((double *) m); } /* free_dmatrix */ /******************/ void free_dcube(dcube c) { free((double *) **c); free((double *) *c); free((double *) c); } /* free_dcube */ /**************************************************** * memory allocate char vectors, matrices, and cubes */ cvector new_cvector(int n) { cvector v; v = (cvector) calloc((size_t) n, sizeof(char)); if (v == NULL) maerror("step1 in new_cvector"); return v; } /* new_cvector */ /******************/ cmatrix new_cmatrix(int nrow, int ncol) { int i; cmatrix m; m = (cmatrix) calloc((size_t) nrow, sizeof(cvector)); if (m == NULL) maerror("step 1 in new_cmatrix"); *m = (cvector) calloc((size_t) (nrow * ncol), sizeof(char)); if (*m == NULL) maerror("step 2 in new_cmatrix"); for (i = 1; i < nrow; i++) m[i] = m[i-1] + ncol; return m; } /* new_cmatrix */ /******************/ ccube new_ccube(int ntri, int nrow, int ncol) { int i, j; ccube c; c = (ccube) calloc((size_t) ntri, sizeof(cmatrix)); if (c == NULL) maerror("step 1 in new_ccube"); *c = (cmatrix) calloc((size_t) (ntri * nrow), sizeof(cvector)); if (*c == NULL) maerror("step 2 in new_ccube"); **c = (cvector) calloc((unsigned) (ntri * nrow * ncol), sizeof(char)); if (**c == NULL) maerror("step 3 in new_ccube"); for (j = 1; j < nrow; j++) c[0][j] = c[0][j-1] + ncol; for (i = 1; i < ntri; i++) { c[i] = c[i-1] + nrow; c[i][0] = c[i-1][0] + nrow * ncol; for (j = 1; j < nrow; j++) c[i][j] = c[i][j-1] + ncol; } return c; } /* new_ccube */ /******************/ void free_cvector(cvector v) { free((char *) v); } /* free_cvector */ /******************/ void free_cmatrix(cmatrix m) { free((char *) *m); free((char *) m); } /* free_cmatrix */ /******************/ void free_ccube(ccube c) { free((char *) **c); free((char *) *c); free((char *) c); } /* free_ccube */ /*************************************************** * memory allocate int vectors, matrices, and cubes */ ivector new_ivector(int n) { ivector v; v = (ivector) calloc((size_t) n, sizeof(int)); if (v == NULL) maerror("step 1 in new_ivector"); return v; } /* new_ivector */ /******************/ imatrix new_imatrix(int nrow, int ncol) { int i; imatrix m; m = (imatrix) calloc((size_t) nrow, sizeof(ivector)); if (m == NULL) maerror("step 1 in new_imatrix"); *m = (ivector) calloc((size_t) (nrow * ncol), sizeof(int)); if (*m == NULL) maerror("step 2 in new_imatrix"); for (i = 1; i < nrow; i++) m[i] = m[i-1] + ncol; return m; } /* new_imatrix */ /******************/ icube new_icube(int ntri, int nrow, int ncol) { int i, j; icube c; c = (icube) calloc((size_t) ntri, sizeof(imatrix)); if (c == NULL) maerror("step 1 in new_icube"); *c = (imatrix) calloc((size_t) (ntri * nrow), sizeof(ivector)); if (*c == NULL) maerror("step 2 in new_icube"); **c = (ivector) calloc((size_t) (ntri * nrow * ncol), sizeof(int)); if (**c == NULL) maerror("step 3 in new_icube"); for (j = 1; j < nrow; j++) c[0][j] = c[0][j-1] + ncol; for (i = 1; i < ntri; i++) { c[i] = c[i-1] + nrow; c[i][0] = c[i-1][0] + nrow * ncol; for (j = 1; j < nrow; j++) c[i][j] = c[i][j-1] + ncol; } return c; } /* new_icube */ /******************/ void free_ivector(ivector v) { free((int *) v); } /* free_ivector */ /******************/ void free_imatrix(imatrix m) { free((int *) *m); free((int *) m); } /* free_imatrix */ /******************/ void free_icube(icube c) { free((int *) **c); free((int *) *c); free((int *) c); } /* free_icube */ /*************************************************** * memory allocate uli vectors, matrices, and cubes */ ulivector new_ulivector(int n) { ulivector v; v = (ulivector) calloc((size_t) n, sizeof(uli)); if (v == NULL) maerror("step 1 in new_ulivector"); return v; } /* new_ulivector */ /******************/ ulimatrix new_ulimatrix(int nrow, int ncol) { int i; ulimatrix m; m = (ulimatrix) calloc((size_t) nrow, sizeof(ulivector)); if (m == NULL) maerror("step 1 in new_ulimatrix"); *m = (ulivector) calloc((size_t) (nrow * ncol), sizeof(uli)); if (*m == NULL) maerror("step 2 in new_ulimatrix"); for (i = 1; i < nrow; i++) m[i] = m[i-1] + ncol; return m; } /* new_ulimatrix */ /******************/ ulicube new_ulicube(int ntri, int nrow, int ncol) { int i, j; ulicube c; c = (ulicube) calloc((size_t) ntri, sizeof(ulimatrix)); if (c == NULL) maerror("step 1 in new_ulicube"); *c = (ulimatrix) calloc((size_t) (ntri * nrow), sizeof(ulivector)); if (*c == NULL) maerror("step 2 in new_ulicube"); **c = (ulivector) calloc((size_t) (ntri * nrow * ncol), sizeof(uli)); if (**c == NULL) maerror("step 3 in new_ulicube"); for (j = 1; j < nrow; j++) c[0][j] = c[0][j-1] + ncol; for (i = 1; i < ntri; i++) { c[i] = c[i-1] + nrow; c[i][0] = c[i-1][0] + nrow * ncol; for (j = 1; j < nrow; j++) c[i][j] = c[i][j-1] + ncol; } return c; } /* new_ulicube */ /******************/ void free_ulivector(ulivector v) { free((uli *) v); } /* free_ulivector */ /******************/ void free_ulimatrix(ulimatrix m) { free((uli *) *m); free((uli *) m); } /* free_ulimatrix */ /******************/ void free_ulicube(ulicube c) { free((uli *) **c); free((uli *) *c); free((uli *) c); } /* free_ulicube */ /******************************************************************************/ /* check time */ /******************************************************************************/ #define TIMECHECK_INTERVALL 300 /* check timer and generate message roughly every TIMECHECK_INTERVALL seconds */ void checktime(time_t *starttime, /* starttime of overall part */ time_t *lasttime, /* lasttime of print out */ time_t *nowtime, /* current time (taken inside) */ uli done, /* number of tasks done */ uli sumtodo, /* sum of task todo */ int *mflag) /* LF needed to end line? */ { double tc2, mintogo, minutes, hours; /* check timer */ time(nowtime); if ( (*nowtime - *lasttime) > TIMECHECK_INTERVALL) { /* every TIMECHECK_INTERVAL seconds */ /* percentage of completed tasks */ if (*mflag == 0) { fprintf(STDOUT, "\n"); *mflag = 1; } tc2 = 100.0 * done/sumtodo; mintogo = (100.0-tc2) * (double) (*nowtime-*starttime)/60.0/tc2; hours = floor(mintogo/60.0); minutes = mintogo - 60.0*hours; fprintf(STDOUT, "%2.2f%%", tc2); fprintf(STDOUT, " completed (remaining"); fprintf(STDOUT, " time: %.0f", hours); fprintf(STDOUT, " hours %.0f", minutes); fprintf(STDOUT, " minutes)\n"); fflush(STDOUT); *lasttime = *nowtime; } /* else {fprintf(stdout,"t%ld,", *nowtime - *lasttime); fflush(stdout);} */ } /* checktime */ #ifndef SPRNG /******************************************************************************/ /* random numbers generator (Numerical recipes) */ /******************************************************************************/ /* variable */ long idum; /* definitions */ #define IM1 2147483563 #define IM2 2147483399 #define AM (1.0/IM1) #define IMM1 (IM1-1) #define IA1 40014 #define IA2 40692 #define IQ1 53668 #define IQ2 52774 #define IR1 12211 #define IR2 3791 #define NTAB 32 #define NDIV (1+IMM1/NTAB) #define EPS 1.2e-7 #define RNMX (1.0-EPS) double randomunitintervall() /* Long period (> 2e18) random number generator. Returns a uniform random deviate between 0.0 and 1.0 (exclusive of endpoint values). Source: Press et al., "Numerical recipes in C", Cambridge University Press, 1992 (chapter 7 "Random numbers", ran2 random number generator) */ { int j; long k; static long idum2=123456789; static long iy=0; static long iv[NTAB]; double temp; if (idum <= 0) { if (-(idum) < 1) idum=1; else idum=-(idum); idum2=(idum); for (j=NTAB+7;j>=0;j--) { k=(idum)/IQ1; idum=IA1*(idum-k*IQ1)-k*IR1; if (idum < 0) idum += IM1; if (j < NTAB) iv[j] = idum; } iy=iv[0]; } k=(idum)/IQ1; idum=IA1*(idum-k*IQ1)-k*IR1; if (idum < 0) idum += IM1; k=idum2/IQ2; idum2=IA2*(idum2-k*IQ2)-k*IR2; if (idum2 < 0) idum2 += IM2; j=iy/NDIV; iy=iv[j]-idum2; iv[j] = idum; if (iy < 1) iy += IMM1; if ((temp=AM*iy) > RNMX) return RNMX; else return temp; } /* randomunitintervall */ #undef IM1 #undef IM2 #undef AM #undef IMM1 #undef IA1 #undef IA2 #undef IQ1 #undef IQ2 #undef IR1 #undef IR2 #undef NTAB #undef NDIV #undef EPS #undef RNMX int initrandom(int seed) /* RAND4 */ { srand((unsigned) time(NULL)); if (seed < 0) seed = rand(); idum=-(long) seed; fflush(stderr); # ifndef PARALLEL fprintf(stderr,"Using RAND4 Random Number Generator\n"); # ifdef RANDVERBOSE1 fprintf(stderr, "!!! random seed set to %d !!!\n", seed); # endif /* RANDVERBOSE1 */ # else /* PARALLEL */ { int n; for (n=0; n t-s; i--) { /* random integer in the range [0, still to do = i-1] */ randidx = randominteger(i); /* integer from array of free ints to slist */ slist[t - i] = isfree[randidx]; /* reduce list by moving last free to last chosen */ isfree[randidx] = isfree[i-1]; } free_ivector(isfree); } /* chooser */ /******************/ /* Draw s numbers from the set 0,1,2,..,t-1 and put them into slist (every number can be drawn only one time) */ void fixedchooser(int t, int s, ivector slist) { int i; for (i = 0; i < s; i++) { /* random integer in the range [0, s-1] */ slist[i] = i; } } /* fixedchooser */ /******************************************************************************/ /* Saver variants of ANSI C routines */ /******************************************************************************/ /* a realloc function that works also on non-ANSI compilers */ void *myrealloc(void *p, size_t s) { if (p == NULL) return malloc(s); else return realloc(p, s); } /* myrealloc */ /******************/ /* safer variant of gets */ /* Reads characters from stdin until a newline character or EOF is received. The newline is not made part of the string. If an error occurs a null string \0 is returned */ cvector mygets() { int c, n; cvector str; str = new_cvector(100); n = 0; c = getchar(); while ((c != '\n') && (c != '\r') && (n < 99) && (c != EOF) && !ferror(stdin)) { str[n] = (char) c; c = getchar(); n++; } if (c == EOF || ferror(stdin)) { str[0] = '\0'; } else { str[n] = '\0'; } return str; } /* mygets */ /******************************************************************************/ /* minimization of a function by Brents method (Numerical Recipes) */ /******************************************************************************/ double brent(double, double, double, double (*f )(double ), double, double *, double *, double, double, double, int *); #define ITMAX 100 #define CGOLD 0.3819660 #define GOLD 1.618034 #define GLIMIT 100.0 #define TINY 1.0e-20 #define ZEPS 1.0e-10 #define SHFT(a,b,c,d) (a)=(b);(b)=(c);(c)=(d); #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) /* Brents method in one dimension */ double brent( double ax, /* three x-values ax < bx < cx */ double bx, /* or ax > bx > cx */ double cx, double (*f)(double), /* function to minimize, f(bx)=min(f(ax),f(bx),f(cx)) */ double tol, /* describes the precision */ double *foptx, double *f2optx, double fax, /* f(ax), already precomputed outside of brent() */ double fbx, /* f(bx), already precomputed outside of brent() */ double fcx, /* f(cx), already precomputed outside of brent() */ int *converged) /* not converged error flag */ { int iter; double a,b,d=0,etemp,fu,fv,fw,fx,p,q,r,tol1,tol2,u,v,w,x,xm; double xw,wv,vx; double e=0.0; *converged=TRUE; a=(ax < cx ? ax : cx); /* is the order correct? If not, exchange ax and cx */ b=(ax > cx ? ax : cx); x=bx; /* store 'middle' x, and y=fx */ fx=fbx; if (fax < fcx) { w=ax; fw=fax; v=cx; fv=fcx; } else { w=cx; fw=fcx; v=ax; fv=fax; } for (iter=1;iter<=ITMAX;iter++) { /* iteration loop */ xm=0.5*(a+b); tol2=2.0*(tol1=tol*fabs(x)+ZEPS); /* is precision OK? I.e., are a and b close enough. */ if (fabs(x-xm) <= (tol2-0.5*(b-a))) { /* yes -> finish */ *foptx = fx; /* return current f(x) */ if ((x==w) && (x==v)) { /* to avoid FPE errors by zero-division */ v=x-ZEPS; w=x+ZEPS; fv=(*f)(v); fw=(*f)(w); } xw = x-w; wv = w-v; vx = v-x; *f2optx = 2.0*(fv*xw + fx*wv + fw*vx)/ (v*v*xw + x*x*wv + w*w*vx); /* return S.E. of f(x) */ #if 0 fprintf(stderr, "XXXX: x=%f f(x)=%f=%f S.E.=%f w=%f v=%f\n", x, *foptx, fx, *f2optx, w, v); #endif return x; /* return minimum x-value */ } if (fabs(e) > tol1) { /* compute a parabolic fit */ r=(x-w)*(fx-fv); q=(x-v)*(fx-fw); p=(x-v)*q-(x-w)*r; q=2.0*(q-r); if (q > 0.0) p = -p; q=fabs(q); etemp=e; e=d; /* determine acceptability of the parabolic fit */ if (fabs(p) >= fabs(0.5*q*etemp) || p <= q*(a-x) || p >= q*(b-x)) /* compute golden section of the larger segment max(a-x,b-x) */ d=CGOLD*(e=(x >= xm ? a-x : b-x)); else { /* accept the parabolic step */ d=p/q; u=x+d; if (u-a < tol2 || b-u < tol2) d=SIGN(tol1,xm-x); } } else { /* compute golden section of the larger segment max(a-x,b-x) */ d=CGOLD*(e=(x >= xm ? a-x : b-x)); } u=(fabs(d) >= tol1 ? x+d : x+SIGN(tol1,d)); fu=(*f)(u); /* new u better than old x ? */ if (fu <= fx) { /* yes -> accept it */ if (u >= x) a=x; else b=x; SHFT(v,w,x,u) /* ...and use the new values */ SHFT(fv,fw,fx,fu) } else { if (u < x) a=u; else b=u; if (fu <= fw || w == x) { v=w; w=u; fv=fw; fw=fu; } else if (fu <= fv || v == x || v == w) { v=u; fv=fu; } } } /* end loop */ /* the function should never get here, i.e., the search did not converge within ITMAX iterations */ *converged=FALSE; *foptx = fx; /* return f(x) */ if ((x==w) && (x==v)) { /* regularize to avoid FPE errors by zero-division */ v=x-ZEPS; w=x+ZEPS; fv=(*f)(v); fw=(*f)(w); } xw = x-w; wv = w-v; vx = v-x; *f2optx = 2.0*(fv*xw + fx*wv + fw*vx)/ (v*v*xw + x*x*wv + w*w*vx); /* return S.E. of f(x) */ #if 0 fprintf(stderr, "YYYY: x=%f f(x)=%f=%f S.E.=%f w=%f v=%f\n", x, *foptx, fx, *f2optx, w, v); #endif return x; /* return minimum x-value */ } /* brent */ #undef ITMAX #undef CGOLD #undef ZEPS #undef SHFT #undef SIGN #undef GOLD #undef GLIMIT #undef TINY /******************/ /* one-dimensional minimization - as input a lower and an upper limit and a trial value for the minimum is needed: xmin < xguess < xmax the function and a fractional tolerance has to be specified onedimenmin returns the optimal x value and the value of the function and its second derivative at this point */ double onedimenmin( double xmin, double xguess, double xmax, double (*f)(double), double tol, double *fx, double *f2x) { double eps, optx, ax, bx, cx, fa, fb, fc; int converged; /* not converged error flag */ /* first attempt to bracketize minimum */ eps = xguess*tol*50.0; ax = xguess - eps; if (ax < xmin) ax = xmin; bx = xguess; cx = xguess + eps; if (cx > xmax) cx = xmax; /* check if this works */ fa = (*f)(ax); fb = (*f)(bx); fc = (*f)(cx); /* if it works use these borders else be conservative */ if ((fa < fb) || (fc < fb)) { if (ax != xmin) fa = (*f)(xmin); if (cx != xmax) fc = (*f)(xmax); optx = brent(xmin, xguess, xmax, f, tol, fx, f2x, fa, fb, fc, &converged); } else optx = brent(ax, bx, cx, f, tol, fx, f2x, fa, fb, fc, &converged); return optx; /* return optimal x */ } /* onedimenmin */ /******************/ /* two-dimensional minimization with borders and calculations of standard errors */ /* we optimize along basis vectors - not very optimal but it seems to work well */ void twodimenmin(double tol, int active1, double min1, double *x1, double max1, double (*func1)(double), double *err1, int active2, double min2, double *x2, double max2, double (*func2)(double), double *err2) { int it, nump, change; double x1old, x2old; double fx, f2x; it = 0; nump = 0; /* count number of parameters */ if (active1) nump++; if (active2) nump++; do { /* repeat until nothing changes any more */ it++; change = FALSE; /* optimize first variable */ if (active1) { if ((*x1) <= min1) (*x1) = min1 + 0.2*(max1-min1); if ((*x1) >= max1) (*x1) = max1 - 0.2*(max1-min1); x1old = (*x1); (*x1) = onedimenmin(min1, (*x1), max1, func1, tol, &fx, &f2x); if ((*x1) < min1) (*x1) = min1; if ((*x1) > max1) (*x1) = max1; /* same tolerance as 1D minimization */ if (fabs((*x1) - x1old) > 3.3*tol) change = TRUE; /* standard error */ f2x = fabs(f2x); if (1.0/(max1*max1) < f2x) (*err1) = sqrt(1.0/f2x); else (*err1) = max1; } /* optimize second variable */ if (active2) { if ((*x2) <= min2) (*x2) = min2 + 0.2*(max2-min2); if ((*x2) >= max2) (*x2) = max2 - 0.2*(max2-min2); x2old = (*x2); (*x2) = onedimenmin(min2, (*x2), max2, func2, tol, &fx, &f2x); if ((*x2) < min2) (*x2) = min2; if ((*x2) > max2) (*x2) = max2; /* same tolerance as 1D minimization */ if (fabs((*x2) - x2old) > 3.3*tol) change = TRUE; /* standard error */ f2x = fabs(f2x); if (1.0/(max2*max2) < f2x) (*err2) = sqrt(1.0/f2x); else (*err2) = max2; } if (nump == 1) return; } while (it != MAXITS && change); return; } /* twodimenmin */ tree-puzzle-5.2/src/util.h0000644000076400001440000000557010073365407011260 /* * util.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef _UTIL_ #define _UTIL_ #include #include #include #include /* * general definitions */ #define TRUE 1 #define FALSE 0 #ifdef PARALLEL extern long int PP_randn; extern long int PP_rand; #endif /* * type definitions */ typedef unsigned long int uli; typedef double *dvector, **dmatrix, ***dcube; typedef char *cvector, **cmatrix, ***ccube; typedef int *ivector, **imatrix, ***icube; typedef uli *ulivector, **ulimatrix, ***ulicube; /* * prototypes of functions defined in util.c */ void maerror(char *message); dvector new_dvector(int n); dmatrix new_dmatrix(int nrow, int ncol); dcube new_dcube(int ntri, int nrow, int ncol); void free_dvector(dvector v); void free_dmatrix(dmatrix m); void free_dcube(dcube c); cvector new_cvector(int n); cmatrix new_cmatrix(int nrow, int ncol); ccube new_ccube(int ntri, int nrow, int ncol); void free_cvector(cvector v); void free_cmatrix(cmatrix m); void free_ccube(ccube c); ivector new_ivector(int n); imatrix new_imatrix(int nrow, int ncol); icube new_icube(int ntri, int nrow, int ncol); void free_ivector(ivector v); void free_imatrix(imatrix m); void free_icube(icube c); ulivector new_ulivector(int n); ulimatrix new_ulimatrix(int nrow, int ncol); ulicube new_ulicube(int ntri, int nrow, int ncol); void free_ulivector(ulivector v); void free_ulimatrix(ulimatrix m); void free_ulicube(ulicube c); /* check timer and generate message roughly every 15 minutes */ void checktime(time_t *starttime, /* starttime of overall part */ time_t *lasttime, /* lasttime of print out */ time_t *nowtime, /* current time (taken inside) */ uli done, /* number of tasks done */ uli sumtodo, /* sum of task todo */ int *mflag); /* LF needed to end line? */ double randomunitintervall(void); int initrandom(int seed); int randominteger(int n); void chooser(int t, int s, ivector slist); void fixedchooser(int t, int s, ivector slist); void *myrealloc(void *, size_t); cvector mygets(void); #define MAXITS 10 /* maximum number of iterations in twoedimenmin */ double onedimenmin(double, double, double, double (*f )(double ), double, double *, double *); void twodimenmin(double, int, double, double *, double, double (*func1 )(double ), double *, int, double, double *, double, double (*func2 )(double ), double *); #endif tree-puzzle-5.2/src/ppuzzle.c0000644000076400001440000023345610073365412012011 /* * ppuzzle.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include #include #include "ppuzzle.h" int PP_IamMaster; int PP_IamSlave; int PP_Myid; int PP_MyMaster; int PP_NumProcs; MPI_Comm PP_Comm; int *freeslaves; /* Queue of free slaves */ int firstslave, /* headpointer of queue */ lastslave; /* tailpointer of queue */ int *permutsent, *permutrecved, *quartsent, *quartrecved, *doquartsent, *doquartrecved, *splitsent, *splitrecved, *permutsentn, *permutrecvedn, *quartsentn, *quartrecvedn, *doquartsentn, *doquartrecvedn, *splitsentn, *splitrecvedn; double *walltimes, *cputimes; double *fullwalltimes, *fullcputimes; double *altwalltimes, *altcputimes; int PP_permutsent = 0; /* # of */ int PP_permutrecved = 0; /* # of */ int PP_quartsent = 0; /* # of */ int PP_quartrecved = 0; /* # of */ int PP_doquartsent = 0; /* # of */ int PP_doquartrecved = 0; /* # of */ int PP_splitsent = 0; /* # of */ int PP_splitrecved = 0; /* # of */ int PP_permutsentn = 0; /* # of */ int PP_permutrecvedn = 0; /* # of */ int PP_quartsentn = 0; /* # of */ int PP_quartrecvedn = 0; /* # of */ int PP_doquartsentn = 0; /* # of */ int PP_doquartrecvedn = 0; /* # of */ int PP_splitsentn = 0; /* # of */ int PP_splitrecvedn = 0; /* # of */ double PP_starttime = 0, PP_stoptime = 0, PP_inittime = 0, PP_paramcomptime = 0, PP_paramsendtime = 0, PP_quartcomptime = 0, PP_quartsendtime = 0, PP_puzzletime = 0, PP_treetime = 0, PP_lasttime = 0; int PP_MaxSlave = 0; /********************************************************************* * debugging * *********************************************************************/ static int deb_num = 0; void fprintfdebug(FILE *fp, char s[], char f[], int l) { fprintf(fp, "[%2d] %s (%s:%d)\n", deb_num++, s, f, l); } /* fprintfdebug(stderr, "debug message", __FILE__, __LINE__); */ /********************************************************************* * miscellaneous utilities * *********************************************************************/ int dcmp(const void *a, const void *b) { if (*(double *)a > *(double *)b) return (-1); else if (*(double *)a < *(double *)b) return 1; else return 0; } /* dcmp */ /******************/ void PP_cmpd(int rank, double a, double b) { if (a != b) fprintf(STDOUT, "(%2d) *** %.3f != %.3f\n", rank, a, b); } /* PP_cmpd */ /******************/ void PP_cmpi(int rank, int a, int b) { if (a != b) fprintf(STDOUT, "(%2d) *** %d != %d\n", rank, a, b); } /* PP_cmpi */ /******************/ double PP_timer() { double tmptime; if (PP_lasttime == 0) { PP_lasttime = MPI_Wtime(); return(0); } else { tmptime = PP_lasttime; PP_lasttime = MPI_Wtime(); return(PP_lasttime - tmptime); } } /* PP_timer */ /******************/ void PP_Printerror(FILE *of, int id, int err) { char errstr[MPI_MAX_ERROR_STRING]; int errstrlen; if ((err > MPI_SUCCESS) && (err <= MPI_ERR_LASTCODE)) { MPI_Error_string(err, errstr, &errstrlen); fprintf(of, "(%2d) MPI ERROR %d : %s\n", id, err, errstr); } else { if (err == MPI_SUCCESS) fprintf(of, "(%2d) MPI ERROR %d : No error\n", id, err); else fprintf(of, "(%2d) MPI ERROR %d : unknown error number\n", id, err); } } /* PP_Printerror */ /******************/ void PP_Printbiparts(cmatrix biparts) { int n1, n2; for (n1=0; n1<(Maxspc-3); n1++) { if (n1==0) fprintf(STDOUT, "(%2d) bipartition : ", PP_Myid); else fprintf(STDOUT, "(%2d) : ", PP_Myid); for (n2=0; n20)&&(lx (Maxspc - 1)) { chunk -= Maxspc - ly - 1; lx ++; ly = lx; } else { ly += chunk; chunk = 0; } } *x = lx; *y = ly; return; } void PP_NextCoord_atamt(int* x, int* y, int chunk, int dimen) { int lx = *x, ly = *y; while ((chunk>0)&&(lx lx) { chunk -= lx - ly + 1; lx ++; ly = 0; } else { ly += chunk; chunk = 0; } } *x = lx; *y = ly; return; } void PP_VectorToDM(int x, int y, int chunk, double* result) { int i; for (i=0; i %ld\n", PP_Myid, e, f, g, h, quart2num(e, f, g, h)); # endif /* PVERBOSE3 */ badqs++; badtaxon[e]++; badtaxon[f]++; badtaxon[g]++; badtaxon[h]++; } /* if badquartet */ return(qpbranching); } /* PP_do_write_quart */ /********************************************************************* * sending/receiving the important sizes and parameter (M->S) * *********************************************************************/ #ifndef USE_WINDOWS void PP_SendSizes(int mspc, int msite, int ncats, int nptrn, int rad, int outgr, double frconst, int rseed, int fixedorder, int consensus) #else void PP_SendSizes(int mspc, int msite, int alimsite, int alistart, int aliend, int ncats, int nptrn, int rad, int outgr, double frconst, int rseed, int fixedorder, int consensus) #endif { #ifndef USE_WINDOWS # define NUMINT 9 # define NUMDBL 1 #else # define NUMINT 12 # define NUMDBL 1 #endif int ints[NUMINT]; double doubles[NUMDBL]; MPI_Datatype Dtypes[2] = {MPI_INT, MPI_DOUBLE}; int Dtypelens[2] = {NUMINT , NUMDBL}; MPI_Aint Dtypeaddr[2]; MPI_Datatype PP_Sizes; int dest; int error; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: Maxspc=%d Maxsite=%d numcats=%d\n", PP_Myid, mspc, msite, ncats); fprintf(STDOUT, "(%2d) Numprtn=%d tpmradix=%d fracconst=%.3f\n", PP_Myid, nptrn, rad, frconst); # endif /* PVERBOSE2 */ ints[0] = mspc; ints[1] = msite; ints[2] = ncats; ints[3] = nptrn; ints[4] = rad; ints[5] = outgr; ints[6] = rseed; ints[7] = fixedorder; ints[8] = consensus; #ifdef USE_WINDOWS ints[9] = alimsite; ints[10] = alistart; ints[11] = aliend; #endif doubles[0] = frconst; MPI_Address(ints, Dtypeaddr); MPI_Address(doubles, (Dtypeaddr+1)); MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Sizes); MPI_Type_commit(&PP_Sizes); for (dest=1; dest (%2d) Sent Sizes\n", PP_Myid, dest); # endif /* PVERBOSE3 */ } /* for each slave */ MPI_Type_free(&PP_Sizes); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent Sizes\n", PP_Myid); # endif /* PVERBOSE3 */ # undef NUMINT # undef NUMDBL } /* PP_SendSizes */ /******************/ #ifndef USE_WINDOWS void PP_RecvSizes(int *mspc, int *msite, int *ncats, int *nptrn, int *rad, int *outgr, double *frconst, int *rseed, int *fixedorder, int *consensus) #else void PP_RecvSizes(int *mspc, int *msite, int *alimsite, int *alistart, int *aliend, int *ncats, int *nptrn, int *rad, int *outgr, double *frconst, int *rseed, int *fixedorder, int *consensus) #endif { #ifndef USE_WINDOWS # define NUMINT 9 # define NUMDBL 1 #else # define NUMINT 12 # define NUMDBL 1 #endif int ints[NUMINT]; double doubles[NUMDBL]; MPI_Datatype Dtypes[2] = {MPI_INT, MPI_DOUBLE}; int Dtypelens[2] = {NUMINT , NUMDBL}; MPI_Aint Dtypeaddr[2]; MPI_Datatype PP_Sizes; MPI_Status stat; int error; # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) Receiving Sizes ...\n", PP_Myid); # endif /* PVERBOSE3 */ MPI_Address(ints, Dtypeaddr); MPI_Address(doubles, (Dtypeaddr+1)); MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Sizes); MPI_Type_commit(&PP_Sizes); error = MPI_Probe(PP_MyMaster, MPI_ANY_TAG, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 700+PP_Myid, error); if (stat.MPI_TAG != PP_SIZES) { if (stat.MPI_TAG == PP_DONE) { PP_RecvDone(); # ifdef PVERBOSE1 fprintf(STDOUT, "(%2d) Finishing...\n", PP_Myid); # endif /* PVERBOSE1 */ MPI_Finalize(); exit(1); } else { fprintf(STDOUT, "(%2d) Error: unexpected TAG received...\n", PP_Myid); MPI_Finalize(); exit(1); } } error = MPI_Recv(MPI_BOTTOM, 1, PP_Sizes, PP_MyMaster, MPI_ANY_TAG, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 700+PP_Myid, error); if (stat.MPI_TAG != PP_SIZES) { fprintf(STDOUT, "(%2d) Error: unexpected TAG received...\n", PP_Myid); MPI_Finalize(); exit(1); } *mspc = ints[0]; *msite = ints[1]; *ncats = ints[2]; *nptrn = ints[3]; *rad = ints[4]; *outgr = ints[5]; *rseed = ints[6]; *fixedorder = ints[7]; *consensus = ints[8]; #ifdef USE_WINDOWS *alimsite = ints[9]; *alistart = ints[10]; *aliend = ints[11]; #endif *frconst = doubles[0]; MPI_Type_free(&PP_Sizes); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) <- (%2d) Received: Maxspec=%d Maxsite=%d numcats=%d\n", PP_Myid, PP_MyMaster, *mspc, *msite, *ncats); fprintf(STDOUT, "(%2d) Numprtn=%d tpmradix=%d fracconst=%.3f\n", PP_Myid, *nptrn, *rad, *frconst); # endif /* PVERBOSE2 */ # undef NUMINT # undef NUMDBL } /* PP_RecvSizes */ /********************************************************************* * sending/receiving the data matrizes (M->S) * *********************************************************************/ void PP_RecvData( cmatrix Seqpat, /* cmatrix (Maxspc x Numptrn) */ ivector Alias, /* ivector (Maxsite) */ ivector Weight, /* ivector (Numptrn) */ ivector constpat, dvector Rates, /* dvector (numcats) */ dvector Eval, /* dvector (tpmradix) */ dvector Freqtpm, dmatrix Evec, /* dmatrix (tpmradix x tpmradix) */ dmatrix Ievc, dmatrix iexp, /* dmatrix Distanmat,*/ /*epe*/ /* dmatrix (Maxspc x Maxspc) */ dcube ltprobr) /* dcube (numcats x tpmradix x tpmradix) */ { MPI_Datatype Dtypes[12]; int Dtypelens[12]; MPI_Aint Dtypeaddr[12]; MPI_Datatype PP_Data; MPI_Status stat; int error; # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) Receiving Sizes ...\n", PP_Myid); # endif /* PVERBOSE2 */ Dtypes [0] = MPI_CHAR; Dtypelens [0] = Maxspc * Numptrn; MPI_Address(&(Seqpat[0][0]), &(Dtypeaddr[0])); Dtypes [1] = MPI_INT; Dtypelens [1] = Maxsite ; MPI_Address(&(Alias[0]), &(Dtypeaddr[1])); Dtypes [2] = MPI_INT; Dtypelens [2] = Numptrn ; MPI_Address(&(Weight[0]), &(Dtypeaddr[2])); Dtypes [3] = MPI_INT; Dtypelens [3] = Numptrn ; MPI_Address(&(constpat[0]), &(Dtypeaddr[3])); Dtypes [4] = MPI_DOUBLE; Dtypelens [4] = numcats ; MPI_Address(&(Rates[0]), &(Dtypeaddr[4])); Dtypes [5] = MPI_DOUBLE; Dtypelens [5] = tpmradix ; MPI_Address(&(Eval[0]), &(Dtypeaddr[5])); Dtypes [6] = MPI_DOUBLE; Dtypelens [6] = tpmradix ; MPI_Address(&(Freqtpm[0]), &(Dtypeaddr[6])); Dtypes [7] = MPI_DOUBLE; Dtypelens [7] = tpmradix * tpmradix ; MPI_Address(&(Evec[0][0]), &(Dtypeaddr[7])); Dtypes [8] = MPI_DOUBLE; Dtypelens [8] = tpmradix * tpmradix ; MPI_Address(&(Ievc[0][0]), &(Dtypeaddr[8])); Dtypes [9] = MPI_DOUBLE; Dtypelens [9] = tpmradix * tpmradix ; MPI_Address(&(iexp[0][0]), &(Dtypeaddr[9])); Dtypes [10] = MPI_DOUBLE; Dtypelens [10] = Maxspc * Maxspc ; MPI_Address(&(Distanmat[0][0]), &(Dtypeaddr[10])); Dtypes [11] = MPI_DOUBLE; Dtypelens [11] = numcats * tpmradix * tpmradix ; MPI_Address(&(ltprobr[0][0][0]), &(Dtypeaddr[11])); MPI_Type_struct(12, Dtypelens, Dtypeaddr, Dtypes, &PP_Data); MPI_Type_commit(&PP_Data); error = MPI_Probe(PP_MyMaster, MPI_ANY_TAG, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 700+PP_Myid, error); if (stat.MPI_TAG != PP_DATA) { if (stat.MPI_TAG == PP_DONE) { PP_RecvDone(); # ifdef PVERBOSE1 fprintf(STDOUT, "(%2d) Finishing...\n", PP_Myid); # endif /* PVERBOSE1 */ MPI_Finalize(); exit(1); } else { fprintf(STDOUT, "(%2d) Error: unexpected TAG received...\n", PP_Myid); MPI_Finalize(); exit(1); } } error = MPI_Recv(MPI_BOTTOM, 1, PP_Data, PP_MyMaster, PP_DATA, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 900+PP_Myid, error); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) <- (%2d) Received : Alias(0)=%d - Weight(0)=%d - constpat(0)=%d\n", PP_Myid, PP_MyMaster, Alias[0], Weight[0], constpat[0]); fprintf(STDOUT, "(%2d) Rates(0)=%.3f - Eval(0)=%.3f - Freqtpm(0)=%.3f\n", PP_Myid, Rates[0], Eval[0], Freqtpm[0]); fprintf(STDOUT, "(%2d) Evec(0,0)=%.3f - Ievc(0,0)=%.3f - iexp(0,0)=%.3f - Distanmat(0,1)=%.3f\n", PP_Myid, Evec[0][0], Ievc[0][0], iexp[0][0], Distanmat[0][1]); fprintf(STDOUT, "(%2d) Distanmat(0,1)=%.3f\n", PP_Myid, Distanmat[0][1]); fprintf(STDOUT, "(%2d) ltprobr(0,0,0)=%.3f\n", PP_Myid, ltprobr[0][0][0]); # endif /* PVERBOSE2 */ MPI_Type_free(&PP_Data); } /* PP_RecvData */ /******************/ void PP_SendData( cmatrix Seqpat, /* cmatrix (Maxspc x Numptrn) */ ivector Alias, /* ivector (Maxsite) */ ivector Weight, /* ivector (Numptrn) */ ivector constpat, dvector Rates, /* dvector (numcats) */ dvector Eval, /* dvector (tpmradix) */ dvector Freqtpm, dmatrix Evec, /* dmatrix (tpmradix x tpmradix) */ dmatrix Ievc, dmatrix iexp, /* dmatrix Distanmat,*/ /*epe*/ /* dmatrix (Maxspc x Maxspc) */ dcube ltprobr) /* dcube (numcats x tpmradix x tpmradix) */ { MPI_Datatype Dtypes[12]; int Dtypelens[12]; MPI_Aint Dtypeaddr[12]; MPI_Datatype PP_Data; int dest; int error; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: Alias(0)=%d - Weight(0)=%d - constpat(0)=%d\n", PP_Myid, Alias[0], Weight[0], constpat[0]); fprintf(STDOUT, "(%2d) Rates(0)=%.3f - Eval(0)=%.3f - Freqtpm(0)=%.3f\n", PP_Myid, Rates[0], Eval[0], Freqtpm[0]); fprintf(STDOUT, "(%2d) Evec(0,0)=%.3f - Ievc(0,0)=%.3f - iexp(0,0)=%.3f - Distanmat(0,1)=%.3f\n", PP_Myid, Evec[0][0], Ievc[0][0], iexp[0][0], Distanmat[0][1]); fprintf(STDOUT, "(%2d) ltprobr(0,0,0)=%.3f\n", PP_Myid, ltprobr[0][0][0]); # endif /* PVERBOSE2 */ Dtypes [0] = MPI_CHAR; Dtypelens [0] = Maxspc * Numptrn; MPI_Address(&(Seqpat[0][0]), &(Dtypeaddr[0])); Dtypes [1] = MPI_INT; Dtypelens [1] = Maxsite ; MPI_Address(&(Alias[0]), &(Dtypeaddr[1])); Dtypes [2] = MPI_INT; Dtypelens [2] = Numptrn ; MPI_Address(&(Weight[0]), &(Dtypeaddr[2])); Dtypes [3] = MPI_INT; Dtypelens [3] = Numptrn ; MPI_Address(&(constpat[0]), &(Dtypeaddr[3])); Dtypes [4] = MPI_DOUBLE; Dtypelens [4] = numcats ; MPI_Address(&(Rates[0]), &(Dtypeaddr[4])); Dtypes [5] = MPI_DOUBLE; Dtypelens [5] = tpmradix ; MPI_Address(&(Eval[0]), &(Dtypeaddr[5])); Dtypes [6] = MPI_DOUBLE; Dtypelens [6] = tpmradix ; MPI_Address(&(Freqtpm[0]), &(Dtypeaddr[6])); Dtypes [7] = MPI_DOUBLE; Dtypelens [7] = tpmradix * tpmradix ; MPI_Address(&(Evec[0][0]), &(Dtypeaddr[7])); Dtypes [8] = MPI_DOUBLE; Dtypelens [8] = tpmradix * tpmradix ; MPI_Address(&(Ievc[0][0]), &(Dtypeaddr[8])); Dtypes [9] = MPI_DOUBLE; Dtypelens [9] = tpmradix * tpmradix ; MPI_Address(&(iexp[0][0]), &(Dtypeaddr [9])); Dtypes [10] = MPI_DOUBLE; Dtypelens [10] = Maxspc * Maxspc ; MPI_Address(&(Distanmat[0][0]), &(Dtypeaddr[10])); Dtypes [11] = MPI_DOUBLE; Dtypelens [11] = numcats * tpmradix * tpmradix ; MPI_Address(&(ltprobr[0][0][0]), &(Dtypeaddr[11])); MPI_Type_struct(12, Dtypelens, Dtypeaddr, Dtypes, &PP_Data); MPI_Type_commit(&PP_Data); for (dest=1; dest (%2d) Sent Data\n", PP_Myid, dest); # endif /* PVERBOSE2 */ } /* for each slave */ MPI_Type_free(&PP_Data); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent Data\n", PP_Myid); # endif /* PVERBOSE2 */ } /* PP_SendData */ /************************************************************************** * procedures to send the request to compute a single quartet (M->S) * **************************************************************************/ void PP_SendDoQuart(int dest, int a, int b, int c, int d, int usebestq, int approx) { # define NUMINT 6 int ints[NUMINT]; int error; ints[0] = a; ints[1] = b; ints[2] = c; ints[3] = d; ints[4] = usebestq; ints[5] = approx; PP_doquartsent++; PP_doquartsentn++; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending -> (%2d): Quart(%d,%d,%d,%d)\n", PP_Myid, dest, a, b, c, d); # endif /* PVERBOSE2 */ error = MPI_Ssend(ints, NUMINT, MPI_INT, dest, PP_DOQUART, PP_Comm); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, PP_Myid, error); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent \n", PP_Myid); # endif /* PVERBOSE3 */ # undef NUMINT } /* PP_SendDoQuart */ /******************/ void PP_RecvDoQuart(int *a, int *b, int *c, int *d, int *usebestq, int *approx) { # define NUMINT 6 int ints[NUMINT]; int error; MPI_Status stat; PP_doquartrecved++; PP_doquartrecvedn++; # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) Receiving: Quart\n", PP_Myid); # endif /* PVERBOSE3 */ error = MPI_Recv(ints, NUMINT, MPI_INT, PP_MyMaster, PP_DOQUART, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 200+PP_Myid, error); *a = ints[0]; *b = ints[1]; *c = ints[2]; *d = ints[3]; *usebestq = ints[4]; *approx = ints[5]; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Received: Quart(%d,%d,%d,%d,%c)\n", PP_Myid, *a, *b, *c, *d, (approx ? 'A' : 'E')); # endif /* PVERBOSE2 */ # undef NUMINT } /* PP_RecvDoQuart */ /************************************************************************** * procedures to send the result of a single quartet (S->M) * **************************************************************************/ void PP_SendQuart(int a, int b, int c, int d, double d1, double d2, double d3, int usebestq, int approx) { # define NUMINT 6 # define NUMDBL 3 int ints[NUMINT]; double doubles[NUMDBL]; MPI_Datatype Dtypes[2] = {MPI_INT, MPI_DOUBLE}; int Dtypelens[2] = {NUMINT , NUMDBL}; MPI_Aint Dtypeaddr[2]; MPI_Datatype PP_Quart; int error; PP_quartsent++; PP_quartsentn++; ints[0] = a; ints[1] = b; ints[2] = c; ints[3] = d; doubles[0] = d1; doubles[1] = d2; doubles[2] = d3; ints[4] = usebestq; ints[5] = approx; MPI_Address(ints, Dtypeaddr); MPI_Address(doubles, (Dtypeaddr+1)); MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Quart); MPI_Type_commit(&PP_Quart); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: Quart(%d,%d,%d,%d) = (%.3f, %.3f, %.3f)\n", PP_Myid, a, b, c, d, d1, d2, d3); # endif /* PVERBOSE2 */ error = MPI_Ssend(MPI_BOTTOM, 1, PP_Quart, PP_MyMaster, PP_QUART, PP_Comm); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 400+PP_Myid, error); MPI_Type_free(&PP_Quart); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent \n", PP_Myid); # endif /* PVERBOSE3 */ # undef NUMINT # undef NUMDBL } /* PP_SendQuart */ /******************/ void PP_RecvQuart(int *a, int *b, int *c, int *d, double *d1, double *d2, double *d3, int *usebestq, int *approx) { # define NUMINT 6 # define NUMDBL 3 int ints[NUMINT]; double doubles[NUMDBL]; MPI_Datatype Dtypes[2] = {MPI_INT, MPI_DOUBLE}; int Dtypelens[2] = {NUMINT , NUMDBL}; MPI_Aint Dtypeaddr[2]; MPI_Datatype PP_Quart; int error; MPI_Status stat; PP_quartrecved++; PP_quartrecvedn++; MPI_Address(ints, Dtypeaddr); MPI_Address(doubles, (Dtypeaddr+1)); MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_Quart); MPI_Type_commit(&PP_Quart); error = MPI_Recv(MPI_BOTTOM, 1, PP_Quart, MPI_ANY_SOURCE, PP_QUART, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 500+PP_Myid, error); PP_putslave(stat.MPI_SOURCE); *a = ints[0]; *b = ints[1]; *c = ints[2]; *d = ints[3]; *d1 = doubles[0]; *d2 = doubles[1]; *d3 = doubles[2]; *usebestq = ints[4]; *approx = ints[5]; MPI_Type_free(&PP_Quart); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Received <- (%2d): Quart(%d,%d,%d,%d)=(%.3f, %.3f, %.3f)\n", PP_Myid, stat.MPI_SOURCE, *a, *b, *c, *d, *d1, *d2, *d3); # endif /* PVERBOSE2 */ # undef NUMINT # undef NUMDBL } /* PP_RecvQuart */ /************************************************************************** * procedures to send the request to compute a block of quartets (M->S) * **************************************************************************/ void PP_SendDoQuartBlock(int dest, uli firstq, uli amount, int usebestq, int approx) { # define NUMULI 4 uli ulongs[NUMULI]; int error; PP_doquartsent += amount; PP_doquartsentn++; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: DOQuartBlock Signal\n", PP_Myid); # endif /* PVERBOSE2 */ ulongs[0] = firstq; ulongs[1] = amount; ulongs[2] = (uli)usebestq; ulongs[3] = (uli)approx; error = MPI_Ssend(ulongs, NUMULI, MPI_UNSIGNED_LONG, dest, PP_DOQUARTBLOCK, PP_Comm); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 2100+PP_Myid, error); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent DOQuartBlock Signal (addr:%ld, num:%ld)\n", PP_Myid, firstq, amount); # endif /* PVERBOSE3 */ # undef NUMULI } /* PP_SendDoQuartBlock */ /******************/ void PP_RecvDoQuartBlock(uli *firstq, uli *amount, uli **bq, int *usebestq, int *approx) { # define NUMULI 4 uli ulongs[NUMULI]; MPI_Status stat; int error; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Receiving: DOQuartBlock Signal\n", PP_Myid); # endif /* PVERBOSE2 */ error = MPI_Recv(&ulongs, NUMULI, MPI_UNSIGNED_LONG, PP_MyMaster, PP_DOQUARTBLOCK, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 2100+PP_Myid, error); *firstq = ulongs[0]; *amount = ulongs[1]; *usebestq = (int)ulongs[2]; *approx = (int)ulongs[3]; *bq = calloc((size_t)*amount, sizeof(uli)); PP_doquartrecved += *amount; PP_doquartrecvedn++; # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... DOQuartBlock (addr:%ld, num:%ld)\n", PP_Myid, *firstq, *amount); # endif /* PVERBOSE3 */ # undef NUMULI } /* PP_RecvDoQuartBlock */ /********************************************************************* * procedures to send the results of a block of quartets (S->M) * *********************************************************************/ void PP_SendQuartBlock(uli startq, uli numofq, unsigned char *quartetinfo, uli fullresqs, /* number of fully resolved quartets */ uli partresqs, /* number of partly resolved quartets */ uli unresqs, /* number of unresolved quartets */ uli missingqs, /* number of missing quartets */ uli numofbq, uli *bq, int usebestq, int approx) { # define NUMULI 7 # define NUMINT 2 unsigned char *trueaddr; uli truenum; int error; int ints[NUMINT]; uli ulis[NUMULI]; MPI_Datatype Dtypes[2] = {MPI_UNSIGNED_LONG, MPI_INT}; int Dtypelens[2] = {NUMULI, NUMINT}; MPI_Aint Dtypeaddr[2]; MPI_Datatype PP_QBlockSpecs; MPI_Datatype DtypesRes[2] = {MPI_UNSIGNED_CHAR, MPI_UNSIGNED_LONG}; int DtypelensRes[2]; MPI_Aint DtypeaddrRes[2]; MPI_Datatype PP_QBlockRes; /* uli *bq; uli numofbq; */ PP_quartsent += numofq; PP_quartsentn++; truenum = (uli)((numofq+1)/2); trueaddr = (unsigned char *)(quartetinfo + (uli)(startq/2)); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: startq=%lud numofq=%lud\n", PP_Myid, startq, numofq); fprintf(STDOUT, "(%2d) approx=%c\n", PP_Myid, (approx ? 'A' : 'E')); # endif /* PVERBOSE2 */ ints[0] = usebestq; ints[1] = approx; ulis[0] = startq; ulis[1] = numofq; ulis[2] = numofbq; ulis[3] = unresqs; /* number of unresolved quartets */ ulis[4] = partresqs; /* number of partly resolved quartets */ ulis[5] = fullresqs; /* number of fully resolved quartets */ ulis[6] = missingqs; /* number of missing quartets */ MPI_Address(ulis, Dtypeaddr); MPI_Address(ints, (Dtypeaddr+1)); MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_QBlockSpecs); MPI_Type_commit(&PP_QBlockSpecs); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: xxPP_QuartBlockSpecs(0,%lu)=%d,%d\n", PP_Myid, truenum-1, trueaddr[0], trueaddr[truenum-1]); # endif /* PVERBOSE2 */ error = MPI_Ssend(MPI_BOTTOM, 1, PP_QBlockSpecs, PP_MyMaster, PP_QUARTBLOCKSPECS, PP_Comm); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent QuartBlockSpecs (%ld, %ld, %ld, %d)\n", PP_Myid, ulis[0], ulis[1], ulis[2], ints[0]); # endif /* PVERBOSE3 */ MPI_Address(trueaddr, DtypeaddrRes); DtypelensRes[0] = truenum; MPI_Address(bq, (DtypeaddrRes + 1)); DtypelensRes[1] = numofbq; MPI_Type_struct(2, DtypelensRes, DtypeaddrRes, DtypesRes, &PP_QBlockRes); MPI_Type_commit(&PP_QBlockRes); error = MPI_Ssend(MPI_BOTTOM, 1, PP_QBlockRes, PP_MyMaster, PP_QUARTBLOCK, PP_Comm); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, PP_Myid, error); MPI_Type_free(&PP_QBlockSpecs); MPI_Type_free(&PP_QBlockRes); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent xxPP_QuartBlock(0,%lu)=%d,%d\n", PP_Myid, truenum-1, trueaddr[0], trueaddr[truenum-1]); # endif /* PVERBOSE3 */ # undef NUMULI # undef NUMINT } /* PP_SendQuartBlock */ /******************/ void PP_RecvQuartBlock(int slave, uli *startq, uli *numofq, unsigned char *quartetinfo, uli *fullresqs, /* number of fully resolved quartets */ uli *partresqs, /* number of partly resolved quartets */ uli *unresqs, /* number of unresolved quartets */ uli *missingqs, /* number of missing quartets */ int *usebestq, int *approx) { # define NUMULI 7 # define NUMINT 2 unsigned char *trueaddr; uli truenum; int error; int dest; int ints[NUMINT]; uli ulis[NUMULI]; MPI_Datatype Dtypes[2] = {MPI_UNSIGNED_LONG, MPI_INT}; int Dtypelens[2] = {NUMULI, NUMINT}; MPI_Aint Dtypeaddr[2]; MPI_Datatype PP_QBlockSpecs; MPI_Datatype DtypesRes[2] = {MPI_UNSIGNED_CHAR, MPI_UNSIGNED_LONG}; int DtypelensRes[2]; MPI_Aint DtypeaddrRes[2]; MPI_Datatype PP_QBlockRes; MPI_Status stat; uli count; uli idx; uli qstart; uli qend; int a, b, c, i; unsigned char quartettype; uli tmpunresqs = 0; /* number of unresolved quartets */ uli tmppartresqs = 0; /* number of partly resolved quartets */ uli tmpfullresqs = 0; /* number of fully resolved quartets */ uli tmpmissingqs = 0; /* number of missing quartets */ uli num; uli *numofbq; uli *bq; numofbq=# # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) Receiving QuartBlock ...\n", PP_Myid); # endif /* PVERBOSE3 */ MPI_Address(ulis, Dtypeaddr); MPI_Address(ints, (Dtypeaddr+1)); MPI_Type_struct(2, Dtypelens, Dtypeaddr, Dtypes, &PP_QBlockSpecs); MPI_Type_commit(&PP_QBlockSpecs); MPI_Probe(MPI_ANY_SOURCE, PP_QUARTBLOCKSPECS, PP_Comm, &stat); dest = stat.MPI_SOURCE; error = MPI_Recv(MPI_BOTTOM, 1, PP_QBlockSpecs, dest, PP_QUARTBLOCKSPECS, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, PP_Myid, error); *usebestq = ints[0]; *approx = ints[1]; *startq = ulis[0]; *numofq = ulis[1]; *numofbq = ulis[2]; *unresqs = ulis[3]; /* number of unresolved quartets */ *partresqs = ulis[4]; /* number of partly resolved quartets */ *fullresqs = ulis[5]; /* number of fully resolved quartets */ *missingqs = ulis[6]; /* number of missing quartets */ PP_quartrecved += *numofq; PP_quartrecvedn++; truenum = (uli)((*numofq+1)/2); trueaddr = (unsigned char *)(quartetinfo + (uli)(*startq/2)); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Recv QuartBlockSpecs (%ld, %ld, %ld, %d)\n", PP_Myid, ulis[0], ulis[1], ulis[2], ints[0]); # endif /* PVERBOSE3 */ DtypelensRes[0] = truenum; MPI_Address(trueaddr, DtypeaddrRes); bq = calloc((size_t) *numofbq, sizeof(uli)); DtypelensRes[1] = *numofbq; MPI_Address(bq, (DtypeaddrRes+1)); MPI_Type_struct(2, DtypelensRes, DtypeaddrRes, DtypesRes, &PP_QBlockRes); MPI_Type_commit(&PP_QBlockRes); error = MPI_Recv(MPI_BOTTOM, 1, PP_QBlockRes, dest, PP_QUARTBLOCK, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, PP_Myid, error); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Recv QuartBlock \n", PP_Myid); # endif /* PVERBOSE3 */ /* MPI package check */ qstart = *startq; qend = qstart + *numofq - 1; for (i = 3; i < Maxspc; i++) for (c = 2; c < i; c++) for (b = 1; b < c; b++) for (a = 0; a < b; a++) { /* use a better way, not computing this every time */ idx = (uli) a + (uli) b*(b-1)/2 + (uli) c*(c-1)*(c-2)/6 + (uli) i*(i-1)*(i-2)*(i-3)/24; if ((idx >= qstart) && (idx <= qend)) { quartettype = readquartet(a,b,c,i); switch(quartettype) { case 1: /* 001 */ case 2: /* 010 */ case 4: /* 100 */ { tmpfullresqs++; /* number of fully resolved quartets */ break; } case 3: /* 011 */ case 5: /* 101 */ case 6: /* 110 */ { tmppartresqs++; /* number of partly resolved quartets */ break; } case 7: /* 111 */ { tmpunresqs++; /* number of unresolved quartets */ #if 0 /* to make the part below obsolete */ badqs++; badtaxon[a]++; badtaxon[b]++; badtaxon[c]++; badtaxon[d]++; if (show_optn) { fputid10(unresfp, a); fprintf(unresfp, " "); fputid10(unresfp, b); fprintf(unresfp, " "); fputid10(unresfp, c); fprintf(unresfp, " "); fputid(unresfp, d); fprintf(unresfp, "\n"); } #endif break; } case 0: /* 000 */ default: { tmpmissingqs++; /* number of missing quartets */ break; } } /* end switch quartettype */ } /* if idx */ } /* for for for for */ /* end MPI package check */ if((tmpfullresqs != *fullresqs) || (tmppartresqs != *partresqs) || (tmpunresqs != *unresqs) || (tmpmissingqs != *missingqs)) { fprintf(stderr, "ERROR: Quartets differ between send and receive!!! (received/sent)\n"); fprintf(stderr, "fully (%lu/%lu), partly(%lu/%lu), unresolved(%lu/%lu), missing(%lu/%lu)\n", tmpfullresqs, *fullresqs, tmppartresqs, *partresqs, tmpunresqs, *unresqs, tmpmissingqs, *missingqs); } PP_putslave(dest); for(count = 0; count < *numofbq; count++){ int a, b, c, d; num2quart(bq[count], &a, &b, &c, &d); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) %ld. bad quarted (%d, %d, %d, %d) = %ld\n", PP_Myid, count, a, b, c, d, bq[count]); # endif /* PVERBOSE2 */ badqs++; badtaxon[a]++; badtaxon[b]++; badtaxon[c]++; badtaxon[d]++; if (show_optn) { fputid10(unresfp, a); fprintf(unresfp, " "); fputid10(unresfp, b); fprintf(unresfp, " "); fputid10(unresfp, c); fprintf(unresfp, " "); fputid(unresfp, d); fprintf(unresfp, "\n"); } } free(bq); MPI_Type_free(&PP_QBlockSpecs); MPI_Type_free(&PP_QBlockRes); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) <- (%2d) ... Recv xxPP_QuartBlock(0,%lu)=%d,%d\n", PP_Myid, dest, truenum-1, trueaddr[0], trueaddr[truenum-1]); # endif /* PVERBOSE2 */ # undef NUMULI # undef NUMINT } /* PP_RecvQuartBlock */ /********************************************************************* * send/receive array with all quartets (M->S) * *********************************************************************/ void PP_SendAllQuarts(unsigned long Numquartets, unsigned char *quartetinfo) { MPI_Datatype Dtypes[1] = {MPI_UNSIGNED_CHAR}; int Dtypelens[1]; MPI_Aint Dtypeaddr[1]; MPI_Datatype PP_AllQuarts; int dest; int error; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: PP_AllQuart(0)=%d\n", PP_Myid, quartetinfo[0]); # endif /* PVERBOSE2 */ /* compute number of quartets */ if (Numquartets % 2 == 0) { /* even number */ Dtypelens[0] = (Numquartets)/2; } else { /* odd number */ Dtypelens[0] = (Numquartets + 1)/2; } MPI_Address(&(quartetinfo[0]), Dtypeaddr); MPI_Type_struct(1, Dtypelens, Dtypeaddr, Dtypes, &PP_AllQuarts); MPI_Type_commit(&PP_AllQuarts); for (dest=1; dest (%2d) ... Sent xxAllQuart(0,%d)=%d,%d (%luq -> %db)\n", PP_Myid, dest, Dtypelens[0]-1, quartetinfo[0], quartetinfo[Dtypelens[0]-1], Numquartets, Dtypelens[0]-1); # endif /* PVERBOSE3 */ } /* for each slave */ MPI_Type_free(&PP_AllQuarts); } /* PP_SendAllQuarts */ /******************/ void PP_RecvAllQuarts(int taxa, unsigned long *Numquartets, unsigned char *quartetinfo) { MPI_Datatype Dtypes[1] = {MPI_UNSIGNED_CHAR}; int Dtypelens[1]; MPI_Aint Dtypeaddr[1]; MPI_Datatype PP_AllQuarts; MPI_Status stat; int error; # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) Receiving AllQuarts ...\n", PP_Myid); # endif /* PVERBOSE3 */ /* compute number of quartets */ *Numquartets = (uli) taxa*(taxa-1)*(taxa-2)*(taxa-3)/24; if (*Numquartets % 2 == 0) { /* even number */ Dtypelens[0] = (*Numquartets)/2; } else { /* odd number */ Dtypelens[0] = (*Numquartets + 1)/2; } MPI_Address(&(quartetinfo[0]), Dtypeaddr); MPI_Type_struct(1, Dtypelens, Dtypeaddr, Dtypes, &PP_AllQuarts); MPI_Type_commit(&PP_AllQuarts); error = MPI_Recv(MPI_BOTTOM, 1, PP_AllQuarts, PP_MyMaster, PP_ALLQUARTS, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 1300+PP_Myid, error); MPI_Type_free(&PP_AllQuarts); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) <- (%2d) ... Recv xxAllQuart(0,%d)=%d,%d (%luq -> %db)\n", PP_Myid, PP_MyMaster, Dtypelens[0]-1, quartetinfo[0], quartetinfo[Dtypelens[0]-1], *Numquartets, Dtypelens[0]-1); # endif /* PVERBOSE2 */ } /* PP_RecvAllQuarts */ /********************************************************************* * procedures to send the splits of a puzzle tree to the master * *********************************************************************/ void PP_SendSplitsBlock(int taxa, uli blocksize, cmatrix *biparts, int pstnum, treelistitemtype *pstlist) { MPI_Datatype *Dtypes; int *Dtypelens; MPI_Aint *Dtypeaddr; MPI_Datatype PP_Biparts; int error; int n; int ints[3]; int *pstnumarr; treelistitemtype *pstptr; PP_splitsent+=blocksize; PP_splitsentn++; ints[0] = taxa; ints[1] = (int) blocksize; ints[2] = pstnum; error = MPI_Ssend(ints, 3, MPI_INT, PP_MyMaster, PP_PUZZLEBLOCKSPECS, PP_Comm); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 1800+PP_Myid, error); Dtypes = calloc((size_t) (blocksize + pstnum + 1), sizeof(MPI_Datatype)); Dtypelens = calloc((size_t) (blocksize + pstnum + 1), sizeof(int)); Dtypeaddr = calloc((size_t) (blocksize + pstnum + 1), sizeof(MPI_Aint)); pstnumarr = calloc((size_t) pstnum, sizeof(int)); # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Sending: PP_bipartsblock(0..%lu,0,0)8=\"%c\"\n", PP_Myid, blocksize, biparts[0][0][0]); # endif /* PVERBOSE2 */ for (n=0; n<(int)blocksize; n++) { Dtypes[n] = MPI_CHAR; Dtypelens[n] = (taxa - 3) * taxa; MPI_Address(&(biparts[n][0][0]), &(Dtypeaddr[n])); } pstptr = pstlist; for (n=0; n%d: [%d/%d] #=%d \"%s\"\n", PP_Myid, PP_MyMaster, n, pstnum, pstnumarr[n], (*pstptr).tree); # endif /* PVERBOSE3 */ pstptr = (*pstptr).succ; } Dtypes[((int)blocksize + pstnum)] = MPI_INT; Dtypelens[((int)blocksize + pstnum)] = pstnum; MPI_Address(&(pstnumarr[0]), &(Dtypeaddr[((int)blocksize + pstnum)])); MPI_Type_struct(((int)blocksize + pstnum + 1), Dtypelens, Dtypeaddr, Dtypes, &PP_Biparts); MPI_Type_commit(&PP_Biparts); error = MPI_Ssend(MPI_BOTTOM, 1, PP_Biparts, PP_MyMaster, PP_PUZZLEBLOCK, PP_Comm); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 1800+PP_Myid, error); MPI_Type_free(&PP_Biparts); free(Dtypes); free(Dtypelens); free(Dtypeaddr); free(pstnumarr); # ifdef PVERBOSE3 fprintf(STDOUT, "(%2d) ... Sent PP_bipartsblock\n", PP_Myid); # endif /* PVERBOSE3 */ } /* PP_SendSplitsBlock */ /******************/ void PP_RecvSplitsBlock(int *taxa, uli *blocksize, cmatrix **bip, treelistitemtype **pstlist, int *pstnum, int *pstsum) /* bp -> (*bip) */ { MPI_Datatype *Dtypes; int *Dtypelens; MPI_Aint *Dtypeaddr; MPI_Datatype PP_Biparts; MPI_Status stat; int error; int n; int dest; int ints[3]; int pstlistnum; int tmpnum; int tmpsum; int *pstnumarr; char **pstarr; treelistitemtype *treeitem; error = MPI_Recv(ints, 3, MPI_INT, MPI_ANY_SOURCE, PP_PUZZLEBLOCKSPECS, PP_Comm, &stat); if (error != MPI_SUCCESS) PP_Printerror(STDOUT, 1900+PP_Myid, error); dest = stat.MPI_SOURCE; *taxa = ints[0]; *blocksize = (uli) ints[1]; pstlistnum = ints[2]; # ifdef PVERBOSE2 fprintf(STDOUT, "(%2d) Received<-%d: PP_bipartsblockspec(t=%d,b=%ld,p=%d)\n", PP_Myid, dest, *taxa, *blocksize, pstlistnum); # endif /* PVERBOSE2 */ PP_splitrecved += *blocksize; PP_splitrecvedn++; Dtypes = calloc((size_t) (*blocksize + pstlistnum + 1), sizeof(MPI_Datatype)); Dtypelens = calloc((size_t) (*blocksize + pstlistnum + 1), sizeof(int)); Dtypeaddr = calloc((size_t) (*blocksize + pstlistnum + 1), sizeof(MPI_Aint)); (*bip) = (cmatrix *) calloc((size_t) *blocksize, sizeof(void *)); pstnumarr = (int *) calloc((size_t) pstlistnum, sizeof(int)); pstarr = (char **) calloc((size_t) pstlistnum, sizeof(char *)); /* pstarr[0] = (char *) calloc((size_t) (psteptreestrlen * pstlistnum), sizeof(char)); for(n=1; n requests and receive results */ void PP_SendDoPermutBlock(uli puzzlings) { int dest; /* destination process */ int error; /* MPI error code */ uli numpuzzlings; /* puzzlings scheduled for 1 chunk */ uli puzzlingssent = 0; /* puzzlings we are waiting for */ schedtype sched; /* scheduler data */ uli bipnum; /* bipartition counter */ int tx; /* number of received trees */ uli bs; /* number of received split sets */ cmatrix *bp; /* split sets */ initsched(&sched, puzzlings, PP_NumProcs-1, 4); /* numpuzzlings = sc(&sched); */ numpuzzlings = SCHEDALG_PUZZLING(&sched); # ifdef SCHED_DEBUG if ((numpuzzlings < 4) && (numpuzzlings != 0)) fprintf(stderr, "SCHED-ERROR: %d < 4 (puzzling) !!!", numpuzzlings); # endif /* SCHED_DEBUG */ while (numpuzzlings > 0) { if (PP_emptyslave()) { PP_RecvSplitsBlock(&tx, &bs, &bp, &psteptreelist, &psteptreenum, &psteptreesum); for (bipnum=0; bipnum 0) { /* receive next result */ PP_RecvSplitsBlock(&tx, &bs, &bp, &psteptreelist, &psteptreenum, &psteptreesum); /* file splits */ for (bipnum=0; bipnum%4ld (%dx%ld)\n", PP_Myid, qstart, qend, PP_NumProcs-1, qtodo); # endif addtimes(GENERAL, &tarr); for (i = 3; i < Maxspc; i++) for (c = 2; c < i; c++) for (b = 1; b < c; b++) for (a = 0; a < b; a++) { /* use a better way, not computing this every time */ idx = (uli) a + (uli) b*(b-1)/2 + (uli) c*(c-1)*(c-2)/6 + (uli) i*(i-1)*(i-2)*(i-3)/24; if ((idx >= qstart) && (idx <= qend)) { # ifdef PVERBOSE4 fprintf(STDOUT, "(%2d) %4ld <---> (%d,%d,%d,%d)\n",PP_Myid, idx, a,b,c,i); # endif compute_quartlklhds(a,b,c,i,&d1,&d2,&d3,approx); quartettype = PP_do_write_quart(a,b,c,i,d1,d2,d3,&nofbq,bqarr,usebestq); switch(quartettype) { case 1: /* 001 */ case 2: /* 010 */ case 4: /* 100 */ { fullresqs++; /* number of fully resolved quartets */ break; } case 3: /* 011 */ case 5: /* 101 */ case 6: /* 110 */ { partresqs++; /* number of partly resolved quartets */ break; } case 7: /* 111 */ { unresqs++; /* number of unresolved quartets */ break; } case 0: /* 000 */ default: { missingqs++; /* number of missing quartets */ break; } } /* end switch quartettype */ addtimes(QUARTETS, &tarr); } /* if idx */ } /* for for for for */ PP_SendQuartBlock(qstart, qtodo, quartetinfo, fullresqs, partresqs, unresqs, missingqs, nofbq, bqarr, usebestq, approx); free(bqarr); bqarr=NULL; break; } case PP_DOPUZZLEBLOCK: { if (PP_AllQuartsReceived){ uli numtrial; /* receive number of steps to perform */ PP_RecvDoPermutBlock(&numtrial); allpstep(numtrial, quartetinfo, Maxspc, fixedorder_optn); } else { fprintf(STDOUT, "ERROR: Requested Puzzle Tree without receiving Quartets!!!\n"); notdone = 0; } break; } case PP_DOQUART: { PP_RecvDoQuart(&a,&b,&c,&d, &usebestq, &approx); addtimes(GENERAL, &tarr); compute_quartlklhds(a,b,c,d,&d1,&d2,&d3,approx); addtimes(QUARTETS, &tarr); PP_SendQuart(a,b,c,d,d1,d2,d3, usebestq, approx); break; } default: { fprintf(STDOUT, "ERROR: Unknown Message Tag received\n"); MPI_Abort(PP_Comm, 1); } } /* switch stat.MPI_TAG */ MPI_Probe(PP_MyMaster, MPI_ANY_TAG, PP_Comm, &stat); notdone = (stat.MPI_TAG != PP_DONE); if (!notdone) PP_RecvDone(); } /* while notdone */ return (0); } /* slave_main */ tree-puzzle-5.2/src/ppuzzle.h0000644000076400001440000002577410073365416012024 /* * ppuzzle.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef _PPUZZLE_ #define _PPUZZLE_ /* #include "treesort.h" */ #include "puzzle.h" #include "util.h" #include "ml.h" #include "sched.h" extern int PP_IamSlave; extern int PP_IamMaster; #ifdef PARALLEL # ifdef SEQUENTIAL # undef SEQUENTIAL # endif # define SEQUENTIAL 0 # undef PARALLEL # define PARALLEL 1 # include "mpi.h" #else # ifdef SEQUENTIAL # undef SEQUENTIAL # endif # define SEQUENTIAL 1 # define PARALLEL 0 # undef PVERBOSE # undef PVERBOSE1 # undef PVERBOSE2 # undef PVERBOSE3 #endif /* PVERBOSE3 includes PVERBOSE2 includes PVERBOSE1 */ /* PVERBOSE1 is default (PVERBOSE) */ #ifdef PVERBOSE # undef PVERBOSE1 # define PVERBOSE1 #endif #ifdef PVERBOSE3 # undef PVERBOSE2 # define PVERBOSE2 #endif #ifdef PVERBOSE2 # undef PVERBOSE1 # define PVERBOSE1 #endif #if PARALLEL /* Scheduling algorithms for: */ # define SCHEDALG_PARAM_EST sgss /* Parameter estimation */ # define SCHEDALG_ML_STEP sgss /* ML step */ # define SCHEDALG_PUZZLING sgss /* puzzling step */ # define PP_DONE 0 /* Finished M->S */ # define PP_SIZES 1 /* Array sizes needed M->S */ # define PP_DATA 2 /* Data Arrays M->S */ # define PP_ALLQUARTS 3 /* All Quartets M->S */ # define PP_DOQUART 4 /* do 4Specs M->S */ # define PP_DOQUARTX2 5 /* do 4Specs + X^2 M->S */ # define PP_QUART 6 /* quartet back S->M */ # define PP_QUARTX2 7 /* quartet + X^2 back S->M */ # define PP_DOQUARTBLOCKSPECS 8 /* do block Specs M->S */ # define PP_DOQUARTBLOCK 9 /* do block of Quarts M->S */ # define PP_QUARTBLOCKSPECS 10 /* block Specs S->M */ # define PP_QUARTBLOCK 11 /* block of Quarts S->M */ # define PP_DOPUZZLE 12 /* do Puzzling step M->S, obsolete (HAS)*/ # define PP_PUZZLE 13 /* Puzzling tree back S->M, obsolete (HAS)*/ # define PP_DOPUZZLEBLOCK 14 /* do Puzzling block M->S */ # define PP_DOPUZZLEBLOCKSPECS 15 /* do Puzzling block M->S */ # define PP_PUZZLEBLOCK 16 /* Puzzling block S->M */ # define PP_PUZZLEBLOCKSPECS 17 /* Puzzling block S->M */ # define PP_STATS 18 /* Slave Statistics S->M */ # define PP_WAIT 19 /* waiting for work S->M */ # define PP_MLDISTANCE 20 /* start mldistance M->S */ /*epe*/ # define PP_UPDATERATES 21 /* update Rates M->S */ /*epe*/ # define PP_UPDATEFRACINV 22 /* update fracinv M->S */ /*epe*/ # define PP_UPDATEEEI 23 /* update Eval,Evec, Ievc M->S */ /*epe*/ # define PP_NOUPDATE 24 /* update nothing and start with scatter operation M->S */ /*epe*/ # define PP_FINALUPDATE 25 /* updates Rates, fracinv, EEI, Distanmat M->S */ /*epe*/ # define PP_LSLENGTH 26 /* parallelization of lslength() M->S */ /*epe*/ # define PP_TEST 100 /* testing */ # define PERMUTQUEUESIZE 100 # define QUARTQUEUESIZE 100 extern int PP_IamMaster; extern int PP_IamSlave; extern int PP_Myid; extern int PP_MyMaster; extern int PP_NumProcs; extern MPI_Comm PP_Comm; #endif /* PARALLEL */ extern int *permutsent, *permutrecved, *quartsent, *quartrecved, *doquartsent, *doquartrecved, *splitsent, *splitrecved, *permutsentn, *permutrecvedn, *quartsentn, *quartrecvedn, *doquartsentn, *doquartrecvedn, *splitsentn, *splitrecvedn; extern double *walltimes, *cputimes; extern double *fullwalltimes, *fullcputimes; extern double *altwalltimes, *altcputimes; extern int PP_permutsent, PP_permutrecved, PP_quartsent, PP_quartrecved, PP_doquartsent, PP_doquartrecved, PP_splitsent, PP_splitrecved, PP_permutsentn, PP_permutrecvedn, PP_quartsentn, PP_quartrecvedn, PP_doquartsentn, PP_doquartrecvedn, PP_splitsentn, PP_splitrecvedn; extern double PP_starttime, PP_stoptime, PP_inittime, PP_paramcomptime, PP_paramsendtime, PP_quartcomptime, PP_quartsendtime, PP_puzzletime, PP_treetime; void num2quart(uli qnum, int *a, int *b, int *c, int *d); uli numquarts(int maxspc); uli quart2num (int a, int b, int c, int d); int slave_main(int argc, char *argv[]); void PP_Init(int *argc, char **argv[]); void PP_Finalize(); void PP_Printerror(FILE *of, int id, int err); void PP_RecvDoQuart(int *a, int *b, int *c, int *d, int *usebestq, int *approx); void PP_SendDoQuart(int dest, int a, int b, int c, int d, int usebestq, int approx); void PP_RecvQuart(int *a, int *b, int *c, int *d, double *d1, double *d2, double *d3, int *usebestq, int *approx); void PP_SendQuart(int a, int b, int c, int d, double d1, double d2, double d3, int usebestq, int approx); void PP_SendSizes(int mspc, /* Maxspc */ int msite, /* Maxsite */ int ncats, /* numcats */ int nptrn, /* Numptrn */ int rad, /* tpmradix */ int outgr, /* outgroup */ double frconst, /* fracconst */ int rseed, /* randseed */ int fixedorder, /* fixedorder_optn */ int consensus); /* consensus_optn */ void PP_RecvSizes(int *mspc, /* Maxspc */ int *msite, /* Maxsite */ int *ncats, /* numcats */ int *nptrn, /* Numptrn */ int *rad, /* tpmradix */ int *outgr, /* outgroup */ double *frconst, /* fracconst */ int *rseed, /* randseed */ int *fixedorder, /* fixedorder_optn */ int *consensus); /* consensus_optn */ void PP_RecvData( cmatrix Seqpat, /* cmatrix (Maxspc x Numptrn) */ ivector Alias, /* ivector (Maxsite) */ ivector Weight, /* ivector (Numptrn) */ ivector constpat, dvector Rates, /* dvector (numcats) */ dvector Eval, /* dvector (tpmradix) */ dvector Freqtpm, dmatrix Evec, /* dmatrix (tpmradix x tpmradix) */ dmatrix Ievc, dmatrix iexp, /* dmatrix Distanmat,*/ /*epe*/ /* dmatrix (Maxspc x Maxspc) */ dcube ltprobr); /* dcube (numcats x tpmradix x tpmradix) */ void PP_SendData( cmatrix Seqpat, /* cmatrix (Maxspc x Numptrn) */ ivector Alias, /* ivector (Maxsite) */ ivector Weight, /* ivector (Numptrn) */ ivector constpat, dvector Rates, /* dvector (numcats) */ dvector Eval, /* dvector (tpmradix) */ dvector Freqtpm, dmatrix Evec, /* dmatrix (tpmradix x tpmradix) */ dmatrix Ievc, dmatrix iexp, /* dmatrix Distanmat,*/ /*epe*/ /* dmatrix (Maxspc x Maxspc) */ dcube ltprobr); /* dcube (numcats x tpmradix x tpmradix) */ void PP_SendAllQuarts(unsigned long Numquartets, unsigned char *quartetinfo); void PP_RecvAllQuarts(int taxa, unsigned long *Numquartets, unsigned char *quartetinfo); void PP_SendDoQuartBlock(int dest, uli firstq, uli amount, int usebestq, int approx); void PP_RecvDoQuartBlock(uli *firstq, uli *amount, uli **bq, int *usebestq, int *approx); void PP_SendQuartBlock(uli startq, uli numofq, unsigned char *quartetinfo, uli fullresqs, /* number of fully resolved quartets */ uli partresqs, /* number of partly resolved quartets */ uli unresqs, /* number of unresolved quartets */ uli missingqs, /* number of missing quartets */ uli numofbq, uli *bq, int usebestq, int approx); void PP_RecvQuartBlock(int slave, uli *startq, uli *numofq, unsigned char *quartetinfo, uli *fullresqs, /* number of fully resolved quartets */ uli *partresqs, /* number of partly resolved quartets */ uli *unresqs, /* number of unresolved quartets */ uli *missingqs, /* number of missing quartets */ int *usebestq, int *approx); void PP_SendDoPermutBlock(uli puzzlings); void PP_RecvDoPermutBlock(uli *taxa); void PP_SendSplitsBlock(int taxa, uli blocksize, cmatrix *biparts, int pstnum, treelistitemtype *pstlist); void PP_SendDone(); void PP_RecvDone(); int PP_emptyslave(); void PP_putslave(int sl); int PP_getslave(); void PP_cmpd(int rank, double a, double b); void PP_cmpi(int rank, int a, int b); /*epe*/ void PP_NextCoord(int* x, int* y, int chunk); void PP_NextCoord_atamt(int* x, int* y, int chunk, int dimen); void PP_VectorToDM(int x, int y, int chunk, double* result); void PP_DMToVector(int x, int y, int chunk, double* result); void PP_Update_Rates(); void PP_Update_fracinv(); void PP_Update_EEI(); void PP_NoUpdate(); void PP_Final_Update(void); #endif /* _PPUZZLE_ */ tree-puzzle-5.2/src/subsetmatr.c0000644000076400001440000001463610073365422012467 /* * subsetmatr.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #include "subsetmatr.h" /**********************/ void chooserfromsubsets(cmatrix ssmatr, imatrix sssets, ivector sssizes, int numsets, int numspecs, ivector permutation) { int i; int currset, currspec; int currid; int first; int setsize, setfreesize, setcount, speccount; ivector isfreespec, isfreeset, freeinsubset, subsetoverlap; isfreespec = new_ivector(numspecs); for (i = 0; i < numspecs; i++) isfreespec[i] = TRUE; isfreeset = new_ivector(numsets); for (i = 0; i < numsets; i++) isfreeset[i] = TRUE; freeinsubset = new_ivector(numspecs); subsetoverlap = new_ivector(numsets); for (i = 0; i < numsets; i++) subsetoverlap[i] = 0; for (i = 0; i < numsets; i++) isfreeset[i] = TRUE; currid = 0; first = TRUE; for (setcount=0; setcount= 3) || first))); fprintf(stderr, " %3d. %3d (OVL:%d)\n", setcount, currset, subsetoverlap[currset]); first = FALSE; isfreeset[currset] = FALSE; setsize = sssizes[currset]; setfreesize = 0; for (speccount=0; speccount= 100) { fprintf(stdout, " | "); for (n1 = 0; n1 < subsets; n1++) { x = (n1-(n1%100))/100; if (x != 0) fprintf(stdout, "%2d", x); else fprintf(stdout, "%2c", ' '); } fprintf(stdout, "\n"); } if (subsets >= 10) { fprintf(stdout, " | "); for (n1 = 0; n1 < subsets; n1++) { x = (n1-(n1%10))/10; if (x != 0) fprintf(stdout, "%2d", x); else fprintf(stdout, "%2c", ' '); } fprintf(stdout, "\n"); } fprintf(stdout, "seq | "); for (n1 = 0; n1 < subsets; n1++) fprintf(stdout, "%2d", n1%10); fprintf(stdout, "\n"); fprintf(stdout, "----+-"); for (n1 = 0; n1 < subsets; n1++) fprintf(stdout, "--"); fprintf(stdout, "\n"); for (n2 = 0; n2 < seqs; n2++) { fprintf(stdout, "s%3d| ", n2); for (n1 = 0; n1 < subsets; n1++) { fprintf(stdout, "%2c", ((1 == subsetmatr[n1][n2]) ? 'X' : '.')); } fprintf(stdout, "\n"); } } /* printssmatr */ /**********************/ void readssmatr(FILE *fp, cmatrix *ssmatr, imatrix *sslists, ivector *sssizes, int *subsets, int *seqs) { int setcount, speccount; *subsets = 0; *seqs = 0; /* read matrix coordinate sizes from file */ fscanf(fp, "%d", subsets); fscanf(fp, "%d", seqs); printf("subsets: %d - seqs: %d\n\n", *subsets, *seqs); /* read to begin of the binary format matrix */ while ('\n' != getc(fp)); /* allocate memory */ *ssmatr = new_cmatrix(*subsets, *seqs); *sslists = new_imatrix(*subsets, *seqs); *sssizes = new_ivector(*subsets); /* initialze values */ for (setcount = 0; setcount < *subsets; setcount++){ (*sssizes)[setcount] = 0; for (speccount = 0; speccount < *seqs; speccount++){ (*sslists)[setcount][speccount] = *seqs; } /* for speccount */ } /* for setcount */ /* read matrix from file */ if((*subsets) * (*seqs) != fread(&((*ssmatr)[0][0]), sizeof(char), (*subsets) * (*seqs), fp)) { fprintf(stderr, "ERROR reading subset matrix from file!!!\n"); exit(1); } /* create subset lists/sizes */ for (setcount = 0; setcount < *subsets; setcount++){ for (speccount = 0; speccount < *seqs; speccount++){ if ((*ssmatr)[setcount][speccount] == 1) { (*sslists)[setcount][((*sssizes)[setcount])] = speccount; ((*sssizes)[setcount])++; } /* ssmatr == 1 */ } /* for speccount */ } /* for setcount */ } /* readssmatr */ /**********************/ void writessmatr(FILE *fp, cmatrix subsetmatr, int subsets, int seqs) { fprintf(fp, " %d %d \n", subsets, seqs); if(subsets*seqs != fwrite(&(subsetmatr[0][0]), sizeof(char), subsets*seqs, fp)) { fprintf(stderr, "ERROR writing subset matrix to file!!!\n"); exit(1); } } /* writessmatr */ tree-puzzle-5.2/src/subsetmatr.h0000644000076400001440000000202710073365425012466 /* * subsetmatr.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef SUBSETMATR_H #define SUBSETMATR_H #include #include #include "util.h" void printssmatr(cmatrix subsetmatr, int subsets, int seqs); void printsubsets(imatrix sssets, ivector sssizes, int subsets, int seqs); void readssmatr(FILE *fp, cmatrix *ssmatr, imatrix *sslists, ivector *sssizes, int *subsets, int *seqs); void writessmatr(FILE *fp, cmatrix subsetmatr, int subsets, int seqs); void chooserfromsubsets(cmatrix ssmatr, imatrix sssets, ivector sssizes, int numsets, int numspecs, ivector trueid); #endif /* SUBSETMATR_H */ tree-puzzle-5.2/src/pstep-mrca.c0000644000076400001440000005270110073365430012343 /* * pstep-mrca.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include #include #include"puzzle.h" /* #include"util.h" */ /* #include"pstep.h" */ /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /* initialize tree with the following starting configuration * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf) /* out: next free leaf index (=3) */ { int i; ONEEDGE_ORIG *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE_ORIG *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE_ORIG) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for vetmpctor with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the edge map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (tmpedge[i].edgemap == NULL) maerror("edgemap in inittree"); } /* number all edges */ for (i = 0; i < Maxbrnch; i++) tmpedge[i].numedge = i; /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* edge maps */ (tmpedge[0].edgemap)[0] = 0; /* you are on the right edge */ (tmpedge[0].edgemap)[1] = 4; /* go down left for leaf 1 */ (tmpedge[0].edgemap)[2] = 5; /* go down right for leaf 2 */ (tmpedge[1].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[1].edgemap)[1] = 0; /* you are on the right edge */ (tmpedge[1].edgemap)[2] = 3; /* go up/down right for leaf 2 */ (tmpedge[2].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[2].edgemap)[1] = 2; /* go up/down left for leaf 1 */ (tmpedge[2].edgemap)[2] = 0; /* you are on the right edge */ /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* edges of leaves */ tmpedgeofleaf[0] = 0; tmpedgeofleaf[1] = 1; tmpedgeofleaf[2] = 2; } /* inittree */ /******************/ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf) /* next free leaf idx */ { int i; int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == edgeofleaf[0] */ if (edgeofleaf[0] == dockedge) edgeofleaf[0] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding nextedge + 1 to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edgeofleaf[nextleaf] = nextedge+1; /* the two new edges get info about the old edges */ /* nextedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case 5: (edge[nextedge].edgemap)[i] = 4; break; /* null changes to down left */ case 0: (edge[nextedge].edgemap)[i] = 4; break; default:(edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* nextedge + 1 */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case 2: (edge[nextedge+1].edgemap)[i] = 1; break; /* up/down right changes to up */ case 3: (edge[nextedge+1].edgemap)[i] = 1; break; /* down left changes to up/down left */ case 4: (edge[nextedge+1].edgemap)[i] = 2; break; /* down right changes to up/down left */ case 5: (edge[nextedge+1].edgemap)[i] = 2; break; /* null changes to up/down left */ case 0: (edge[nextedge+1].edgemap)[i] = 2; break; /* up stays up */ default:(edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* dockedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case 3: (edge[dockedge].edgemap)[i] = 1; break; /* up/down left changes to up */ case 2: (edge[dockedge].edgemap)[i] = 1; break; default: break; } } /* all edgemaps are updated for the two new edges */ /* nextedge */ (edge[nextedge].edgemap)[nextedge] = 0; (edge[nextedge].edgemap)[nextedge+1] = 5; /* down right */ /* nextedge + 1 */ (edge[nextedge+1].edgemap)[nextedge] = 1; /* up */ (edge[nextedge+1].edgemap)[nextedge+1] = 0; /* all other edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra for dockedge */ (edge[dockedge].edgemap)[nextedge] = 1; /* up */ (edge[dockedge].edgemap)[nextedge+1] = 3; /* up/down right */ nextleaf++; nextedge = nextedge + 2; *in_nextedge=nextedge; *in_nextleaf=nextleaf; } /* addnextleaf */ /******************/ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].edgemap); free(edge); free(edgeofleaf); } /* freetree */ /******************/ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID) /* species permutation */ { int i; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < nextleaf; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ *column += fputid(outfp, trueID[i]); return; } } } /* we are NOT on a leaf */ fprintf(outfp, "("); (*column)++; writeOTU_orig(outfp, edge[ed].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ","); (*column)++; (*column)++; if (*column > 55) { *column = 2; fprintf(outfp, "\n "); } writeOTU_orig(outfp, edge[ed].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ")"); (*column)++; } /* writeOTU */ /******************/ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID) /* species permutation */ { int column; column = 1; fprintf(outfp, "("); column += fputid(outfp, trueID[0]) + 3; fprintf(outfp, ","); writeOTU_orig(outfp, edge[edgeofleaf[0]].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); column++; column++; fprintf(outfp, ","); writeOTU_orig(outfp, edge[edgeofleaf[0]].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); fprintf(outfp, ");\n"); } /* writetree */ /******************/ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; for (i = 0; i < nextedge; i++) edge[i].edgeinfo = 0; } /* resetedgeinfo */ /******************/ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf) /* ext. edge idx array */ { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; while (curredge != finaledge) { nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case 1: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case 2: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case 3: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case 4: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case 5: curredge = (edge[curredge].downright)->numedge; break; } edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; } } /* incrementedgeinfo */ /******************/ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *out_minedge, /* minimum edge set */ uli *out_mininfo) /* minumum penalty */ { int i, k, howmany, randomnum; int minedge; /* minimum edge set */ uli mininfo; /* minumum penalty */ howmany = 1; minedge = 0; mininfo = edge[0].edgeinfo; for (i = 1; i < nextedge; i++) if (edge[i].edgeinfo <= mininfo) { if (edge[i].edgeinfo == mininfo) { howmany++; } else { minedge = i; mininfo = edge[i].edgeinfo; howmany = 1; } } if (howmany > 1) { /* draw random edge */ randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].edgeinfo != mininfo); minedge = i; } } *out_minedge=minedge; *out_mininfo=mininfo; } /* minimumedgeinfo */ /*************************************************************************/ /* global functions of the puzzling step */ /*************************************************************************/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep( /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation) /* in: species permutation (trueID) */ { int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int chooseX, chooseY; /* end leaves of penalty path */ /* allocate and initialize new tree topology */ inittree_orig(edge, edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); /* adding all other leafs */ for (i = 3; i < Maxspc; i++) { /* clear all edgeinfos */ resetedgeinfo_orig(*edge, nextedge); /* * core of quartet puzzling algorithm */ for (a = 0; a < nextleaf - 2; a++) for (b = a + 1; b < nextleaf - 1; b++) for (c = b + 1; c < nextleaf; c++) { /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ checkquartet(a, b, c, i, permutation, &chooseX, &chooseY); incrementedgeinfo_orig(chooseX, chooseY, *edge, *edgeofleaf); } /* for all quartets q=(a,b,c,i) */ /* find out which edge has lowest edgeinfo */ minimumedgeinfo_orig(*edge, *edgeofleaf, nextedge, nextleaf, &minedge, &mininfo); /* add the next leaf on minedge */ addnextleaf_orig(minedge, *edge, *edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); } /* adding all other leafs */ } /* onepstep */ /*************************************************************************/ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn) /* in: 'fixed' anchored RNG (debug)*/ { /* misc variables */ ivector trueIDtmp; /* species permutation (trueID) */ uli Currtrial; /* step counter */ /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG *tmpedgeset; /* array of edges */ int *tmpedgeofleaf; /* array of extern edge pointers */ /* for unique sorting of tree topologies */ int *ctree; /* sort tree */ int startnode; /* root in sort tree */ char *trstr; /* phylip tree string */ treelistitemtype *treeitem; /* list entry of tree */ # if PARALLEL cmatrix *bp; /* temporary buffer for splits in slaves */ int n; /* step count for init/free split buffer */ # endif /* PARALLEL */ # if PARALLEL /* add times to arry */ addtimes(GENERAL, &tarr); /* alloc temporary split memory */ bp = (cmatrix *) calloc((size_t) Numtrial, sizeof(void *)); for(n=0; n phylip tree string */ trstr=sprintfctree(ctree, psteptreestrlen); /* add sorted tree to unique tree list */ treeitem = addtree2list(&trstr, 1, &psteptreelist, &psteptreenum, &psteptreesum); # if ! PARALLEL /* output unique tree to trace list, if option set */ /* not done on slave processes */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) { /* print: order no/# topol per this id/tree id/sum of unique topologies/sum of trees so far */ fprintf(qptlist, "%ld.\t1\t%d\t%d\t%d\t%d\n", Currtrial + 1, (*treeitem).count, (*treeitem).id, psteptreenum, psteptreesum); } # endif /* ! PARALLEL */ # ifdef VERBOSE1 printf("%s\n", trstr); printfsortedpstrees(psteptreelist); # endif /* free sorting tree structure */ freectree(&ctree); /* free tree before building the next tree */ freetree_orig(tmpedgeset, tmpedgeofleaf, Maxspc); # if ! PARALLEL /* generate message roughly every 15 minutes */ /* check timer */ time(&time2); if ( (time2 - time1) > TIMECHECK_INTERVAL) { double tc2, mintogo, minutes, hours; /* every TIMECHECK_INTERVAL seconds */ /* percentage of completed trees */ if (mflag == 0) { fprintf(STDOUT, "\n"); mflag = 1; } tc2 = 100.0*Currtrial/Numtrial; /* excluded for less runtime, but less accuracy of the 15min */ /* + 100.0*nq/Numquartets/Numtrial; */ mintogo = (100.0-tc2) * (double) (time2-time0)/60.0/tc2; hours = floor(mintogo/60.0); minutes = mintogo - 60.0*hours; fprintf(STDOUT, "%2.2f%%", tc2); fprintf(STDOUT, " completed (remaining"); fprintf(STDOUT, " time: %.0f", hours); fprintf(STDOUT, " hours %.0f", minutes); fprintf(STDOUT, " minutes)\n"); fflush(STDOUT); time1 = time2; } /* check timer */ # endif /* ! PARALLEL */ addtimes(PUZZLING, &tarr); } /* for Numtrials */ # if PARALLEL /* in slaves: send results: splits, trees */ PP_SendSplitsBlock(Maxspc, Numtrial, bp, psteptreenum, psteptreelist); /* free temporary split memory */ for (Currtrial = 0; Currtrial < Numtrial; Currtrial++) { free_cmatrix(bp[Currtrial]); } free(bp); /* sent! Thus, in slave process not needed any more */ freetreelist(&psteptreelist, &psteptreenum, &psteptreesum); # endif /* PARALLEL */ } /* allpstep */ tree-puzzle-5.2/src/pstep-mrca.h0000644000076400001440000001517410073365434012357 /* * pstep-mrca.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef PSTEP_ORIG_H #define PSTEP_ORIG_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ #ifndef ONEEDGE # define ONEEDGE ONEEDGE_ORIG #endif /* ! ONEEDGE_DEFINED */ /* tree structure */ typedef struct oneedge_orig { /* pointer to other three edges */ struct oneedge_orig *up; struct oneedge_orig *downleft; struct oneedge_orig *downright; int numedge; /* number of edge (index) */ uli edgeinfo; /* value of this edge (penalty) */ int *edgemap; /* pointer to the local edgemap array */ } ONEEDGE_ORIG; /*****************************************************************************/ /* internal functions for representing and building puzzling step trees */ /*****************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf); /* out: next free leaf index (=3) */ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *nextedge, /* next free edge idx */ int *nextleaf); /* next free leaf idx */ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID); /* species permutation */ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID); /* species permutation */ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge); /* next free edge idx */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedge, /* minimum edge set */ uli *mininfo); /* minumum penalty */ /*****************************************************************************/ /* global functions for representing and building puzzling step trees */ /*****************************************************************************/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep( /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation); /* in: species permutation (trueID) */ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn); /* in: 'fixed' anchored RNG (debug)*/ #endif /* PSTEP_ORIG_H */ tree-puzzle-5.2/src/pstep-orig.c0000644000076400001440000003036610073365437012373 /* * pstep-orig.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #define EXTERN extern #include #include #include"puzzle.h" /* #include"util.h" */ /* #include"pstep.h" */ #include /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /* initialize tree with the following starting configuration 2 0 +------- C(=2) A(=0) -----+ +------- B(=1) 1 */ void inittree() { int i; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ edge = (ONEEDGE *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE) ); if (edge == NULL) maerror("edge in inittree"); /* allocate memory for vector with edge numbers of leaves */ edgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (edgeofleaf == NULL) maerror("edgeofleaf in inittree"); /* allocate memory for all the edges the edge map */ for (i = 0; i < Maxbrnch; i++) { edge[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (edge[i].edgemap == NULL) maerror("edgemap in inittree"); } /* number all edges */ for (i = 0; i < Maxbrnch; i++) edge[i].numedge = i; /* initialize tree */ nextedge = 3; nextleaf = 3; /* edge maps */ (edge[0].edgemap)[0] = 0; /* you are on the right edge */ (edge[0].edgemap)[1] = 4; /* go down left for leaf 1 */ (edge[0].edgemap)[2] = 5; /* go down right for leaf 2 */ (edge[1].edgemap)[0] = 1; /* go up for leaf 0 */ (edge[1].edgemap)[1] = 0; /* you are on the right edge */ (edge[1].edgemap)[2] = 3; /* go up/down right for leaf 2 */ (edge[2].edgemap)[0] = 1; /* go up for leaf 0 */ (edge[2].edgemap)[1] = 2; /* go up/down left for leaf 1 */ (edge[2].edgemap)[2] = 0; /* you are on the right edge */ /* interconnection */ edge[0].up = NULL; edge[0].downleft = &edge[1]; edge[0].downright = &edge[2]; edge[1].up = &edge[0]; edge[1].downleft = NULL; edge[1].downright = NULL; edge[2].up = &edge[0]; edge[2].downleft = NULL; edge[2].downright = NULL; /* edges of leaves */ edgeofleaf[0] = 0; edgeofleaf[1] = 1; edgeofleaf[2] = 2; } /* inittree */ /* add next leaf on the specified edge */ void addnextleaf(int dockedge) { int i; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == edgeofleaf[0] */ if (edgeofleaf[0] == dockedge) edgeofleaf[0] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding nextedge + 1 to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edgeofleaf[nextleaf] = nextedge+1; /* the two new edges get info about the old edges */ /* nextedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case 5: (edge[nextedge].edgemap)[i] = 4; break; /* null changes to down left */ case 0: (edge[nextedge].edgemap)[i] = 4; break; default: (edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* nextedge + 1 */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case 2: (edge[nextedge+1].edgemap)[i] = 1; break; /* up/down right changes to up */ case 3: (edge[nextedge+1].edgemap)[i] = 1; break; /* down left changes to up/down left */ case 4: (edge[nextedge+1].edgemap)[i] = 2; break; /* down right changes to up/down left */ case 5: (edge[nextedge+1].edgemap)[i] = 2; break; /* null changes to up/down left */ case 0: (edge[nextedge+1].edgemap)[i] = 2; break; /* up stays up */ default: (edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* dockedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case 3: (edge[dockedge].edgemap)[i] = 1; break; /* up/down left changes to up */ case 2: (edge[dockedge].edgemap)[i] = 1; break; default: break; } } /* all edgemaps are updated for the two new edges */ /* nextedge */ (edge[nextedge].edgemap)[nextedge] = 0; (edge[nextedge].edgemap)[nextedge+1] = 5; /* down right */ /* nextedge + 1 */ (edge[nextedge+1].edgemap)[nextedge] = 1; /* up */ (edge[nextedge+1].edgemap)[nextedge+1] = 0; /* all other edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra for dockedge */ (edge[dockedge].edgemap)[nextedge] = 1; /* up */ (edge[dockedge].edgemap)[nextedge+1] = 3; /* up/down right */ nextleaf++; nextedge = nextedge + 2; } /* addnextleaf */ /* free memory (to be called after inittree) */ void freetree() { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].edgemap); free(edge); free(edgeofleaf); } /* freetree */ /* writes OTU sitting on edge ed */ void writeOTU(FILE *outfp, int ed) { int i; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < nextleaf; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ column += fputid(outfp, trueID[i]); return; } } } /* we are NOT on a leaf */ fprintf(outfp, "("); column++; writeOTU(outfp, edge[ed].downleft->numedge); fprintf(outfp, ","); column++; column++; if (column > 55) { column = 2; fprintf(outfp, "\n "); } writeOTU(outfp, edge[ed].downright->numedge); fprintf(outfp, ")"); column++; } /* writeOTU */ /* write tree */ void writetree(FILE *outfp) { column = 1; fprintf(outfp, "("); column += fputid(outfp, trueID[0]) + 3; fprintf(outfp, ","); writeOTU(outfp, edge[edgeofleaf[0]].downleft->numedge); column++; column++; fprintf(outfp, ","); writeOTU(outfp, edge[edgeofleaf[0]].downright->numedge); fprintf(outfp, ");\n"); } /* writetree */ /* clear all edgeinfos */ void resetedgeinfo() { int i; for (i = 0; i < nextedge; i++) edge[i].edgeinfo = 0; } /* resetedgeinfo */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo(int A, int B) { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; while (curredge != finaledge) { nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case 1: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case 2: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case 3: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case 4: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case 5: curredge = (edge[curredge].downright)->numedge; break; } edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; } } /* incrementedgeinfo */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo() { int i, k, howmany, randomnum; howmany = 1; minedge = 0; mininfo = edge[0].edgeinfo; for (i = 1; i < nextedge; i++) if (edge[i].edgeinfo <= mininfo) { if (edge[i].edgeinfo == mininfo) { howmany++; } else { minedge = i; mininfo = edge[i].edgeinfo; howmany = 1; } } if (howmany > 1) { /* draw random edge */ randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].edgeinfo != mininfo); minedge = i; } } } /* minimumedgeinfo */ tree-puzzle-5.2/src/pstep-orig.h0000644000076400001440000000465010073365443012372 /* * pstep-orig.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef PSTEP_ORIG_H #define PSTEP_ORIG_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ #include #ifndef ONEEDGE_DEFINED #define ONEEDGE_DEFINED /* tree structure */ typedef struct oneedge { /* pointer to other three edges */ struct oneedge *up; struct oneedge *downleft; struct oneedge *downright; int numedge; /* number of edge */ uli edgeinfo; /* value of this edge */ int *edgemap; /* pointer to the local edgemap */ } ONEEDGE; #endif /* ! ONEEDGE_DEFINED */ EXTERN int *edgeofleaf; /* vector with edge number of all leaves */ EXTERN int minedge; /* edge with minimum edgeinfo */ EXTERN int nextedge; /* number of edges in the current tree */ EXTERN int nextleaf; /* next leaf to add to tree */ EXTERN ONEEDGE *edge; /* vector with all the edges of the tree */ uli *splitcomp; /* bipartition storage */ uli *splitfreqs; /* frequencies of all different splits of all trees */ uli *splitpatterns; /* all different splits of all trees */ #if 0 EXTERN int Maxbrnch; /* 2*Maxspc - 3 */ EXTERN int Maxspc; /* Maxspc */ #endif ivector trueID; int column; uli mininfo; /* value of edgeinfo on minedge */ /*****************************************************************************/ /* functions for representing and building puzzling step trees */ /*****************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 */ void inittree(void); void addnextleaf(int); void freetree(void); void writeOTU(FILE *, int); void writetree(FILE *); void resetedgeinfo(void); void incrementedgeinfo(int, int); void minimumedgeinfo(void); #endif /* PSTEP_ORIG_H */ tree-puzzle-5.2/src/pstep-recursive.c0000644000076400001440000005270610073365450013437 /* * pstep-recursive.c * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include #include #include"puzzle.h" /* #include"util.h" */ /* #include"pstep.h" */ /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /* initialize tree with the following starting configuration * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf) /* out: next free leaf index (=3) */ { int i; ONEEDGE_ORIG *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE_ORIG *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE_ORIG) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for vetmpctor with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the edge map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (tmpedge[i].edgemap == NULL) maerror("edgemap in inittree"); } /* number all edges */ for (i = 0; i < Maxbrnch; i++) tmpedge[i].numedge = i; /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* edge maps */ (tmpedge[0].edgemap)[0] = 0; /* you are on the right edge */ (tmpedge[0].edgemap)[1] = 4; /* go down left for leaf 1 */ (tmpedge[0].edgemap)[2] = 5; /* go down right for leaf 2 */ (tmpedge[1].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[1].edgemap)[1] = 0; /* you are on the right edge */ (tmpedge[1].edgemap)[2] = 3; /* go up/down right for leaf 2 */ (tmpedge[2].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[2].edgemap)[1] = 2; /* go up/down left for leaf 1 */ (tmpedge[2].edgemap)[2] = 0; /* you are on the right edge */ /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* edges of leaves */ tmpedgeofleaf[0] = 0; tmpedgeofleaf[1] = 1; tmpedgeofleaf[2] = 2; } /* inittree */ /******************/ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf) /* next free leaf idx */ { int i; int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == edgeofleaf[0] */ if (edgeofleaf[0] == dockedge) edgeofleaf[0] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding nextedge + 1 to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edgeofleaf[nextleaf] = nextedge+1; /* the two new edges get info about the old edges */ /* nextedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case 5: (edge[nextedge].edgemap)[i] = 4; break; /* null changes to down left */ case 0: (edge[nextedge].edgemap)[i] = 4; break; default:(edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* nextedge + 1 */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case 2: (edge[nextedge+1].edgemap)[i] = 1; break; /* up/down right changes to up */ case 3: (edge[nextedge+1].edgemap)[i] = 1; break; /* down left changes to up/down left */ case 4: (edge[nextedge+1].edgemap)[i] = 2; break; /* down right changes to up/down left */ case 5: (edge[nextedge+1].edgemap)[i] = 2; break; /* null changes to up/down left */ case 0: (edge[nextedge+1].edgemap)[i] = 2; break; /* up stays up */ default:(edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* dockedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case 3: (edge[dockedge].edgemap)[i] = 1; break; /* up/down left changes to up */ case 2: (edge[dockedge].edgemap)[i] = 1; break; default: break; } } /* all edgemaps are updated for the two new edges */ /* nextedge */ (edge[nextedge].edgemap)[nextedge] = 0; (edge[nextedge].edgemap)[nextedge+1] = 5; /* down right */ /* nextedge + 1 */ (edge[nextedge+1].edgemap)[nextedge] = 1; /* up */ (edge[nextedge+1].edgemap)[nextedge+1] = 0; /* all other edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra for dockedge */ (edge[dockedge].edgemap)[nextedge] = 1; /* up */ (edge[dockedge].edgemap)[nextedge+1] = 3; /* up/down right */ nextleaf++; nextedge = nextedge + 2; *in_nextedge=nextedge; *in_nextleaf=nextleaf; } /* addnextleaf */ /******************/ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].edgemap); free(edge); free(edgeofleaf); } /* freetree */ /******************/ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID) /* species permutation */ { int i; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < nextleaf; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ *column += fputid(outfp, trueID[i]); return; } } } /* we are NOT on a leaf */ fprintf(outfp, "("); (*column)++; writeOTU_orig(outfp, edge[ed].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ","); (*column)++; (*column)++; if (*column > 55) { *column = 2; fprintf(outfp, "\n "); } writeOTU_orig(outfp, edge[ed].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ")"); (*column)++; } /* writeOTU */ /******************/ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID) /* species permutation */ { int column; column = 1; fprintf(outfp, "("); column += fputid(outfp, trueID[0]) + 3; fprintf(outfp, ","); writeOTU_orig(outfp, edge[edgeofleaf[0]].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); column++; column++; fprintf(outfp, ","); writeOTU_orig(outfp, edge[edgeofleaf[0]].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); fprintf(outfp, ");\n"); } /* writetree */ /******************/ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; for (i = 0; i < nextedge; i++) edge[i].edgeinfo = 0; } /* resetedgeinfo */ /******************/ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf) /* ext. edge idx array */ { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; while (curredge != finaledge) { nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case 1: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case 2: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case 3: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case 4: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case 5: curredge = (edge[curredge].downright)->numedge; break; } edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; } } /* incrementedgeinfo */ /******************/ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *out_minedge, /* minimum edge set */ uli *out_mininfo) /* minumum penalty */ { int i, k, howmany, randomnum; int minedge; /* minimum edge set */ uli mininfo; /* minumum penalty */ howmany = 1; minedge = 0; mininfo = edge[0].edgeinfo; for (i = 1; i < nextedge; i++) if (edge[i].edgeinfo <= mininfo) { if (edge[i].edgeinfo == mininfo) { howmany++; } else { minedge = i; mininfo = edge[i].edgeinfo; howmany = 1; } } if (howmany > 1) { /* draw random edge */ randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].edgeinfo != mininfo); minedge = i; } } *out_minedge=minedge; *out_mininfo=mininfo; } /* minimumedgeinfo */ /*************************************************************************/ /* global functions of the puzzling step */ /*************************************************************************/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep( /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation) /* in: species permutation (trueID) */ { int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int chooseX, chooseY; /* end leaves of penalty path */ /* allocate and initialize new tree topology */ inittree_orig(edge, edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); /* adding all other leafs */ for (i = 3; i < Maxspc; i++) { /* clear all edgeinfos */ resetedgeinfo_orig(*edge, nextedge); /* * core of quartet puzzling algorithm */ for (a = 0; a < nextleaf - 2; a++) for (b = a + 1; b < nextleaf - 1; b++) for (c = b + 1; c < nextleaf; c++) { /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ checkquartet(a, b, c, i, permutation, &chooseX, &chooseY); incrementedgeinfo_orig(chooseX, chooseY, *edge, *edgeofleaf); } /* for all quartets q=(a,b,c,i) */ /* find out which edge has lowest edgeinfo */ minimumedgeinfo_orig(*edge, *edgeofleaf, nextedge, nextleaf, &minedge, &mininfo); /* add the next leaf on minedge */ addnextleaf_orig(minedge, *edge, *edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); } /* adding all other leafs */ } /* onepstep */ /*************************************************************************/ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn) /* in: 'fixed' anchored RNG (debug)*/ { /* misc variables */ ivector trueIDtmp; /* species permutation (trueID) */ uli Currtrial; /* step counter */ /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG *tmpedgeset; /* array of edges */ int *tmpedgeofleaf; /* array of extern edge pointers */ /* for unique sorting of tree topologies */ int *ctree; /* sort tree */ int startnode; /* root in sort tree */ char *trstr; /* phylip tree string */ treelistitemtype *treeitem; /* list entry of tree */ # if PARALLEL cmatrix *bp; /* temporary buffer for splits in slaves */ int n; /* step count for init/free split buffer */ # endif /* PARALLEL */ # if PARALLEL /* add times to arry */ addtimes(GENERAL, &tarr); /* alloc temporary split memory */ bp = (cmatrix *) calloc((size_t) Numtrial, sizeof(void *)); for(n=0; n phylip tree string */ trstr=sprintfctree(ctree, psteptreestrlen); /* add sorted tree to unique tree list */ treeitem = addtree2list(&trstr, 1, &psteptreelist, &psteptreenum, &psteptreesum); # if ! PARALLEL /* output unique tree to trace list, if option set */ /* not done on slave processes */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) { /* print: order no/# topol per this id/tree id/sum of unique topologies/sum of trees so far */ fprintf(qptlist, "%ld.\t1\t%d\t%d\t%d\t%d\n", Currtrial + 1, (*treeitem).count, (*treeitem).id, psteptreenum, psteptreesum); } # endif /* ! PARALLEL */ # ifdef VERBOSE1 printf("%s\n", trstr); printfsortedpstrees(psteptreelist); # endif /* free sorting tree structure */ freectree(&ctree); /* free tree before building the next tree */ freetree_orig(tmpedgeset, tmpedgeofleaf, Maxspc); # if ! PARALLEL /* generate message roughly every 15 minutes */ /* check timer */ time(&time2); if ( (time2 - time1) > TIMECHECK_INTERVAL) { double tc2, mintogo, minutes, hours; /* every TIMECHECK_INTERVAL seconds */ /* percentage of completed trees */ if (mflag == 0) { fprintf(STDOUT, "\n"); mflag = 1; } tc2 = 100.0*Currtrial/Numtrial; /* excluded for less runtime, but less accuracy of the 15min */ /* + 100.0*nq/Numquartets/Numtrial; */ mintogo = (100.0-tc2) * (double) (time2-time0)/60.0/tc2; hours = floor(mintogo/60.0); minutes = mintogo - 60.0*hours; fprintf(STDOUT, "%2.2f%%", tc2); fprintf(STDOUT, " completed (remaining"); fprintf(STDOUT, " time: %.0f", hours); fprintf(STDOUT, " hours %.0f", minutes); fprintf(STDOUT, " minutes)\n"); fflush(STDOUT); time1 = time2; } /* check timer */ # endif /* ! PARALLEL */ addtimes(PUZZLING, &tarr); } /* for Numtrials */ # if PARALLEL /* in slaves: send results: splits, trees */ PP_SendSplitsBlock(Maxspc, Numtrial, bp, psteptreenum, psteptreelist); /* free temporary split memory */ for (Currtrial = 0; Currtrial < Numtrial; Currtrial++) { free_cmatrix(bp[Currtrial]); } free(bp); /* sent! Thus, in slave process not needed any more */ freetreelist(&psteptreelist, &psteptreenum, &psteptreesum); # endif /* PARALLEL */ } /* allpstep */ tree-puzzle-5.2/src/pstep-recursive.h0000644000076400001440000001520110073365455013436 /* * pstep-recursive.h * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef PSTEP_ORIG_H #define PSTEP_ORIG_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ #ifndef ONEEDGE # define ONEEDGE ONEEDGE_ORIG #endif /* ! ONEEDGE_DEFINED */ /* tree structure */ typedef struct oneedge_orig { /* pointer to other three edges */ struct oneedge_orig *up; struct oneedge_orig *downleft; struct oneedge_orig *downright; int numedge; /* number of edge (index) */ uli edgeinfo; /* value of this edge (penalty) */ int *edgemap; /* pointer to the local edgemap array */ } ONEEDGE_ORIG; /*****************************************************************************/ /* internal functions for representing and building puzzling step trees */ /*****************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf); /* out: next free leaf index (=3) */ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *nextedge, /* next free edge idx */ int *nextleaf); /* next free leaf idx */ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID); /* species permutation */ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID); /* species permutation */ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge); /* next free edge idx */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedge, /* minimum edge set */ uli *mininfo); /* minumum penalty */ /*****************************************************************************/ /* global functions for representing and building puzzling step trees */ /*****************************************************************************/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep( /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation); /* in: species permutation (trueID) */ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn); /* in: 'fixed' anchored RNG (debug)*/ #endif /* PSTEP_ORIG_H */ tree-puzzle-5.2/src/pstep-trueID.c0000644000076400001440000005402710073365462012625 /* * pstep-trueID.c (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifdef HAVE_CONFIG_H # include #endif #define EXTERN extern #include #include #include"puzzle.h" #if PARALLEL # include "ppuzzle.h" #endif /* #include"util.h" */ /* #include"pstep.h" */ /******************************************************************************/ /* functions for representing and building puzzling step trees */ /******************************************************************************/ /* initialize tree with the following starting configuration * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf) /* out: next free leaf index (=3) */ { int i; ONEEDGE_ORIG *tmpedge; int *tmpedgeofleaf; /* allocate the memory for the whole tree */ /* allocate memory for vector with all the edges of the tree */ tmpedge = (ONEEDGE_ORIG *) calloc((size_t) Maxbrnch, sizeof(ONEEDGE_ORIG) ); if (tmpedge == NULL) maerror("edge in inittree"); *edge = tmpedge; /* allocate memory for vetmpctor with edge numbers of leaves */ tmpedgeofleaf = (int *) calloc((size_t) Maxspc, sizeof(int) ); if (tmpedgeofleaf == NULL) maerror("edgeofleaf in inittree"); *edgeofleaf = tmpedgeofleaf; /* allocate memory for all the edges the edge map */ for (i = 0; i < Maxbrnch; i++) { (tmpedge)[i].edgemap = (int *) calloc((size_t) Maxbrnch, sizeof(int) ); if (tmpedge[i].edgemap == NULL) maerror("edgemap in inittree"); } /* number all edges */ for (i = 0; i < Maxbrnch; i++) tmpedge[i].numedge = i; /* initialize tree */ *nextedge = 3; *nextleaf = 3; /* edge maps */ (tmpedge[0].edgemap)[0] = 0; /* you are on the right edge */ (tmpedge[0].edgemap)[1] = 4; /* go down left for leaf 1 */ (tmpedge[0].edgemap)[2] = 5; /* go down right for leaf 2 */ (tmpedge[1].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[1].edgemap)[1] = 0; /* you are on the right edge */ (tmpedge[1].edgemap)[2] = 3; /* go up/down right for leaf 2 */ (tmpedge[2].edgemap)[0] = 1; /* go up for leaf 0 */ (tmpedge[2].edgemap)[1] = 2; /* go up/down left for leaf 1 */ (tmpedge[2].edgemap)[2] = 0; /* you are on the right edge */ /* interconnection */ tmpedge[0].up = NULL; tmpedge[0].downleft = &tmpedge[1]; tmpedge[0].downright = &tmpedge[2]; tmpedge[1].up = &tmpedge[0]; tmpedge[1].downleft = NULL; tmpedge[1].downright = NULL; tmpedge[2].up = &tmpedge[0]; tmpedge[2].downleft = NULL; tmpedge[2].downright = NULL; /* edges of leaves */ tmpedgeofleaf[0] = 0; tmpedgeofleaf[1] = 1; tmpedgeofleaf[2] = 2; } /* inittree */ /******************/ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *in_nextedge, /* next free edge idx */ int *in_nextleaf) /* next free leaf idx */ { int i; int nextedge; int nextleaf; nextedge=*in_nextedge; nextleaf=*in_nextleaf; if (dockedge >= nextedge) { /* Trying to add leaf nextleaf to nonexisting edge dockedge */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR F TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } if (nextleaf >= Maxspc) { /* Trying to add leaf nextleaf to a tree with Maxspc leaves */ fprintf(STDOUT, "\n\n\nHALT: PLEASE REPORT ERROR G TO DEVELOPERS\n\n\n"); # if PARALLEL PP_Finalize(); # endif exit(1); } /* necessary change in edgeofleaf if dockedge == edgeofleaf[0] */ if (edgeofleaf[0] == dockedge) edgeofleaf[0] = nextedge; /* adding nextedge to the tree */ edge[nextedge].up = edge[dockedge].up; edge[nextedge].downleft = &edge[dockedge]; edge[nextedge].downright = &edge[nextedge+1]; edge[dockedge].up = &edge[nextedge]; if (edge[nextedge].up != NULL) { if ( ((edge[nextedge].up)->downleft) == &edge[dockedge] ) (edge[nextedge].up)->downleft = &edge[nextedge]; else (edge[nextedge].up)->downright = &edge[nextedge]; } /* adding nextedge + 1 to the tree */ edge[nextedge+1].up = &edge[nextedge]; edge[nextedge+1].downleft = NULL; edge[nextedge+1].downright = NULL; edgeofleaf[nextleaf] = nextedge+1; /* the two new edges get info about the old edges */ /* nextedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* down right changes to down left */ case 5: (edge[nextedge].edgemap)[i] = 4; break; /* null changes to down left */ case 0: (edge[nextedge].edgemap)[i] = 4; break; default:(edge[nextedge].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* nextedge + 1 */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down left changes to up */ case 2: (edge[nextedge+1].edgemap)[i] = 1; break; /* up/down right changes to up */ case 3: (edge[nextedge+1].edgemap)[i] = 1; break; /* down left changes to up/down left */ case 4: (edge[nextedge+1].edgemap)[i] = 2; break; /* down right changes to up/down left */ case 5: (edge[nextedge+1].edgemap)[i] = 2; break; /* null changes to up/down left */ case 0: (edge[nextedge+1].edgemap)[i] = 2; break; /* up stays up */ default:(edge[nextedge+1].edgemap)[i] = (edge[dockedge].edgemap)[i]; break; } } /* dockedge */ for (i = 0; i < nextedge; i++) { switch ( (edge[dockedge].edgemap)[i] ) { /* up/down right changes to up */ case 3: (edge[dockedge].edgemap)[i] = 1; break; /* up/down left changes to up */ case 2: (edge[dockedge].edgemap)[i] = 1; break; default: break; } } /* all edgemaps are updated for the two new edges */ /* nextedge */ (edge[nextedge].edgemap)[nextedge] = 0; (edge[nextedge].edgemap)[nextedge+1] = 5; /* down right */ /* nextedge + 1 */ (edge[nextedge+1].edgemap)[nextedge] = 1; /* up */ (edge[nextedge+1].edgemap)[nextedge+1] = 0; /* all other edges */ for (i = 0; i < nextedge; i++) { (edge[i].edgemap)[nextedge] = (edge[i].edgemap)[dockedge]; (edge[i].edgemap)[nextedge+1] = (edge[i].edgemap)[dockedge]; } /* an extra for dockedge */ (edge[dockedge].edgemap)[nextedge] = 1; /* up */ (edge[dockedge].edgemap)[nextedge+1] = 3; /* up/down right */ nextleaf++; nextedge = nextedge + 2; *in_nextedge=nextedge; *in_nextleaf=nextleaf; } /* addnextleaf */ /******************/ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc) /* No. of species */ { int i; for (i = 0; i < 2 * Maxspc - 3; i++) free(edge[i].edgemap); free(edge); free(edgeofleaf); } /* freetree */ /******************/ /* trueID (HAS) */ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID) /* species permutation */ { int i; /* test whether we are on a leaf */ if (edge[ed].downright == NULL && edge[ed].downleft == NULL) { for (i = 1; i < nextleaf; i++) { if (edgeofleaf[i] == ed) { /* i is the leaf of ed */ *column += fputid(outfp, trueID[i]); return; } } } /* we are NOT on a leaf */ fprintf(outfp, "("); (*column)++; /* trueID (HAS) */ writeOTU_orig(outfp, edge[ed].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ","); (*column)++; (*column)++; if (*column > 55) { *column = 2; fprintf(outfp, "\n "); } /* trueID (HAS) */ writeOTU_orig(outfp, edge[ed].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, column, trueID); fprintf(outfp, ")"); (*column)++; } /* writeOTU */ /******************/ /* trueID (HAS) */ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID) /* species permutation */ { int column; column = 1; fprintf(outfp, "("); column += fputid(outfp, trueID[0]) + 3; fprintf(outfp, ","); /* trueID (HAS) */ writeOTU_orig(outfp, edge[edgeofleaf[0]].downleft->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); column++; column++; fprintf(outfp, ","); /* trueID (HAS) */ writeOTU_orig(outfp, edge[edgeofleaf[0]].downright->numedge, edge, edgeofleaf, nextedge, nextleaf, &column, trueID); fprintf(outfp, ");\n"); } /* writetree */ /******************/ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge) /* next free edge idx */ { int i; for (i = 0; i < nextedge; i++) edge[i].edgeinfo = 0; } /* resetedgeinfo */ /******************/ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf) /* ext. edge idx array */ { int curredge, finaledge, nextstep; if (A == B) return; finaledge = edgeofleaf[B]; curredge = edgeofleaf[A]; edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; while (curredge != finaledge) { nextstep = (edge[curredge].edgemap)[finaledge]; switch (nextstep) { /* up */ case 1: curredge = (edge[curredge].up)->numedge; break; /* up/down left */ case 2: curredge = ((edge[curredge].up)->downleft)->numedge; break; /* up/down right */ case 3: curredge = ((edge[curredge].up)->downright)->numedge; break; /* down left */ case 4: curredge = (edge[curredge].downleft)->numedge; break; /* down right */ case 5: curredge = (edge[curredge].downright)->numedge; break; } edge[curredge].edgeinfo = edge[curredge].edgeinfo + 1; } } /* incrementedgeinfo */ /******************/ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *out_minedge, /* minimum edge set */ uli *out_mininfo) /* minumum penalty */ { int i, k, howmany, randomnum; int minedge; /* minimum edge set */ uli mininfo; /* minumum penalty */ howmany = 1; minedge = 0; mininfo = edge[0].edgeinfo; for (i = 1; i < nextedge; i++) if (edge[i].edgeinfo <= mininfo) { if (edge[i].edgeinfo == mininfo) { howmany++; } else { minedge = i; mininfo = edge[i].edgeinfo; howmany = 1; } } if (howmany > 1) { /* draw random edge */ randomnum = randominteger(howmany) + 1; /* 1 to howmany */ i = -1; for (k = 0; k < randomnum; k++) { do { i++; } while (edge[i].edgeinfo != mininfo); minedge = i; } } *out_minedge=minedge; *out_mininfo=mininfo; } /* minimumedgeinfo */ /*************************************************************************/ /* global functions of the puzzling step */ /*************************************************************************/ /* trueID (HAS) */ /* perform one single puzzling step to produce one intermediate tree */ void onepstep( /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation) /* in: species permutation (trueID) */ { int Maxbrnch = (2*Maxspc)-3; /* Number of branches (2n-3) */ int nextedge; /* next free edge index (=3) */ int nextleaf; /* next free leaf index (=3) */ int minedge; /* insertion edge of minimum penalty */ uli mininfo; /* minimum penalty */ int a, b, c, i; /* quartet leaves, i to be inserted */ int chooseX, chooseY; /* end leaves of penalty path */ /* allocate and initialize new tree topology */ inittree_orig(edge, edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); /* adding all other leafs */ for (i = 3; i < Maxspc; i++) { /* clear all edgeinfos */ resetedgeinfo_orig(*edge, nextedge); /* * core of quartet puzzling algorithm */ for (a = 0; a < nextleaf - 2; a++) for (b = a + 1; b < nextleaf - 1; b++) for (c = b + 1; c < nextleaf; c++) { /* check which two leaves out of a,b,c are closer related to each other than to leaf i according to a least squares fit of the continous Bayesian weights to the seven trivial "attractive regions". We assign a score of 1 to all edges on the penalty path between these two leaves chooseX and chooseY */ /* trueID (HAS) */ checkquartet_trueID(a, b, c, i, permutation, &chooseX, &chooseY); incrementedgeinfo_orig(chooseX, chooseY, *edge, *edgeofleaf); } /* for all quartets q=(a,b,c,i) */ /* find out which edge has lowest edgeinfo */ minimumedgeinfo_orig(*edge, *edgeofleaf, nextedge, nextleaf, &minedge, &mininfo); /* add the next leaf on minedge */ addnextleaf_orig(minedge, *edge, *edgeofleaf, Maxspc, Maxbrnch, &nextedge, &nextleaf); } /* adding all other leafs */ } /* onepstep */ /*************************************************************************/ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn) /* in: 'fixed' anchored RNG (debug)*/ { /* misc variables */ ivector trueIDtmp; /* species permutation (trueID) */ uli Currtrial; /* step counter */ /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG *tmpedgeset; /* array of edges */ int *tmpedgeofleaf; /* array of extern edge pointers */ /* for unique sorting of tree topologies */ int *ctree; /* sort tree */ int startnode; /* root in sort tree */ char *trstr; /* phylip tree string */ treelistitemtype *treeitem; /* list entry of tree */ # if PARALLEL cmatrix *bp; /* temporary buffer for splits in slaves */ int n; /* step count for init/free split buffer */ # endif /* PARALLEL */ # if PARALLEL /* add times to arry */ addtimes(GENERAL, &tarr); /* alloc temporary split memory */ bp = (cmatrix *) calloc((size_t) Numtrial, sizeof(void *)); for(n=0; n phylip tree string */ trstr=sprintfctree(ctree, psteptreestrlen); /* add sorted tree to unique tree list */ treeitem = addtree2list(&trstr, 1, &psteptreelist, &psteptreenum, &psteptreesum); # if ! PARALLEL /* output unique tree to trace list, if option set */ /* not done on slave processes */ if((listqptrees == PSTOUT_LIST) || (listqptrees == PSTOUT_LISTORDER)) { /* print: order no/# topol per this id/tree id/sum of unique topologies/sum of trees so far */ fprintf(qptlist, "%ld.\t1\t%d\t%d\t%d\t%d\n", Currtrial + 1, (*treeitem).count, (*treeitem).id, psteptreenum, psteptreesum); } # endif /* ! PARALLEL */ # ifdef VERBOSE1 printf("%s\n", trstr); printfsortedpstrees(psteptreelist); # endif /* free sorting tree structure */ freectree(&ctree); /* free tree before building the next tree */ freetree_orig(tmpedgeset, tmpedgeofleaf, Maxspc); # if ! PARALLEL /* generate message roughly every 15 minutes */ /* check timer */ time(&time2); if ( (time2 - time1) > TIMECHECK_INTERVAL) { double tc2, mintogo, minutes, hours; /* every TIMECHECK_INTERVAL seconds */ /* percentage of completed trees */ if (mflag == 0) { fprintf(STDOUT, "\n"); mflag = 1; } tc2 = 100.0*Currtrial/Numtrial; /* excluded for less runtime, but less accuracy of the 15min */ /* + 100.0*nq/Numquartets/Numtrial; */ mintogo = (100.0-tc2) * (double) (time2-time0)/60.0/tc2; hours = floor(mintogo/60.0); minutes = mintogo - 60.0*hours; fprintf(STDOUT, "%2.2f%%", tc2); fprintf(STDOUT, " completed (remaining"); fprintf(STDOUT, " time: %.0f", hours); fprintf(STDOUT, " hours %.0f", minutes); fprintf(STDOUT, " minutes)\n"); fflush(STDOUT); time1 = time2; } /* check timer */ # endif /* ! PARALLEL */ addtimes(PUZZLING, &tarr); } /* for Numtrials */ # if PARALLEL /* in slaves: send results: splits, trees */ PP_SendSplitsBlock(Maxspc, Numtrial, bp, psteptreenum, psteptreelist); /* free temporary split memory */ for (Currtrial = 0; Currtrial < Numtrial; Currtrial++) { free_cmatrix(bp[Currtrial]); } free(bp); /* sent! Thus, in slave process not needed any more */ freetreelist(&psteptreelist, &psteptreenum, &psteptreesum); # endif /* PARALLEL */ } /* allpstep */ tree-puzzle-5.2/src/pstep-trueID.h0000644000076400001440000001521110073365466012626 /* * pstep-trueID.h (obsolete) * * * Part of TREE-PUZZLE 5.2 (July 2004) * * (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler * (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, * M. Vingron, and Arndt von Haeseler * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler * * All parts of the source except where indicated are distributed under * the GNU public licence. See http://www.opensource.org for details. * * ($Id$) * */ #ifndef PSTEP_ORIG_H #define PSTEP_ORIG_H #include #include #include"puzzle.h" #include"util.h" /* #include"newpstep.h" */ #ifndef ONEEDGE # define ONEEDGE ONEEDGE_ORIG #endif /* ! ONEEDGE_DEFINED */ /* tree structure */ typedef struct oneedge_orig { /* pointer to other three edges */ struct oneedge_orig *up; struct oneedge_orig *downleft; struct oneedge_orig *downright; int numedge; /* number of edge (index) */ uli edgeinfo; /* value of this edge (penalty) */ int *edgemap; /* pointer to the local edgemap array */ } ONEEDGE_ORIG; /*****************************************************************************/ /* internal functions for representing and building puzzling step trees */ /*****************************************************************************/ /* initialize tree with the following starting configuration * * 2 * 0 +------- C(=2) * A(=0) -----+ * +------- B(=1) * 1 * * * A(=0) * [up =NULL] * [downleft =1] * [downright=2] * * o * | * | * +-------------+--------------+ * | | * | | * o o * * C(=1) B(=2) * [up =0] [up =0] * [downleft =NULL] [downleft =NULL] * [downright=NULL] [downright=NULL] * * nextedge = 3 * nextleaf = 3 * and set according edge maps * */ void inittree_orig(ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf,/* out: array of external edge ptrs */ int Maxspc, /* in: Number of species (n) */ int Maxbrnch, /* in: Number of branches (2n-3) */ int *nextedge, /* out: next free edge index (=3) */ int *nextleaf); /* out: next free leaf index (=3) */ /* add next leaf on the specified edge */ void addnextleaf_orig(int dockedge, /* insert here */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc, /* No. of species */ int Maxbrnch, /* No. of branches */ int *nextedge, /* next free edge idx */ int *nextleaf); /* next free leaf idx */ /* free memory (to be called after inittree) */ void freetree_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int Maxspc); /* No. of species */ /* writes OTU sitting on edge ed */ void writeOTU_orig(FILE *outfp, /* output file */ int ed, /* edge to subtree */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *column, /* current screen depth */ int *trueID); /* species permutation */ /* write tree */ void writetree_orig(FILE *outfp, /* output file */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *trueID); /* species permutation */ /* clear all edgeinfos */ void resetedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int nextedge); /* next free edge idx */ /* increment all edgeinfo between leaf A and B */ void incrementedgeinfo_orig(int A, /* start leaf of penalty path */ int B, /* start leaf of penalty path */ ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf); /* ext. edge idx array */ /* checks which edge has the lowest edgeinfo if there are several edges with the same lowest edgeinfo, one of them will be selected randomly */ void minimumedgeinfo_orig(ONEEDGE_ORIG *edge, /* edge array */ int *edgeofleaf, /* ext. edge idx array */ int nextedge, /* next free edge idx */ int nextleaf, /* next free leaf idx */ int *minedge, /* minimum edge set */ uli *mininfo); /* minumum penalty */ /*****************************************************************************/ /* global functions for representing and building puzzling step trees */ /*****************************************************************************/ /* perform one single puzzling step to produce one intermediate tree */ void onepstep( /* PStep (intermediate) tree topol: */ ONEEDGE_ORIG **edge, /* out: new array of edges */ int **edgeofleaf, /* out: array of extern edge ptrs */ unsigned char *quartettopols, /* in: quartetblock with all topols */ int Maxspc, /* in: Number of species (n) */ ivector permutation); /* in: species permutation (trueID) */ /* perform Numtrial single puzzling steps constructing Numtrial intermediate */ /* trees, sort each of them and extract splits for consensus step */ void allpstep(uli Numtrial, /* in: no. psteps to perform */ unsigned char *quartetinfo, /* in: quartetblock with all topols*/ int Maxspc, /* in: Number of species (n) */ int fixedorder_optn); /* in: 'fixed' anchored RNG (debug)*/ #endif /* PSTEP_ORIG_H */ tree-puzzle-5.2/NEWS0000644000076400001440000000000007147061652010024 tree-puzzle-5.2/data/0000777000076400001440000000000010075312110010312 5tree-puzzle-5.2/data/EF.phy0000644000076400001440000005047307560577342011304 22 915 EFTU_ECOLI--------------SKEKFERTKPHVNVGTIGHVDHGKTTLTAAITTVLA EFTU_HELPY-------------MAKEKFNRTKPHVNIGTIGHVDHGKTTLSAAISAVLS EFTU_MYCGE-------------MAREKFDRSKPHVNVGTIGHIDHGKTTLTAAICTVLA EF1A_SULAC-------------------MSQKPHLNLIVIGHVDHGKSTLIGRLLMDRG EF1A_DESMO-----------------MSAPQKPHLNIVIIGHVDHGKSTMTGHILYRLG EF1A_AERPE-------------------MAEKPHMNLVVIGHVDHGKSTLVGHLLYRLG EF11_HUMAN------------------MGKEKTHINIVVIGHVDSGKSTTTGHLIYKCG EF12_MOUSE------------------MGKEKTHINIVVIGHVDSGKSTTTGHLIYKCG EF1A_CAEEL------------------MGKEKVHINIVVIGHVDSGKSTTTGHLIYKCG EF11_DAUCA------------------MGKEKVHINIVVIGHVDSGKSTTTGHLIYKLG EF1A_DICDI---------------MEFPESEKTHINIVVIGHVDAGKSTTTGHLIYKCG EF2_SULAC ------PRYKTVEQVLSLMKDVTRVRNIGIIAHVDHGKTTTSDTLLAASG EF2_AERPE ----MGARVKVVSEIEKIMRNIDQIRNIGIIAHVDHGKTTTSDSLLAAAG EF2_DESMO -----MVRFKQTSEVLKIMRNIEQIRNIGITAHVDHGKTTLSDSLLSAAG EF2_MOUSE -------VNFTVDQIRAIMDKKANIRNMSVIAHVDHGKSTLTDSLVCKAG EF2_HUMAN -------VNFTVDQIRAIMDKKANIRNMSVIAHVDHGKSTLTDSLVCKAG EF2_CAEEL -------VNFTVDEIRALMDRKRNIRNMSVIAHVDHGKSTLTDSLVSKAG EF2_DICDI ------MVNFTIDQIRAIMDRRENIRNMSVIAHVDHGKTTLSDSLIQRAG EF2_BETVU ------MVKFTADELRAIMDCKHNIRNMSVIAHVDHGKSTLTDSLVAAAG EFG_ECOLI ----------------ARTTPIARYRNIGISAHIDAGKTTTTERILFYTG EFG_HELPY ----------------ARKTPLNRIRNIGIAAHIDAGKTTTSERILFYTG EFG_MYCGE ---------------MSRTVDLKNFRNFGIMAHIDAGKTTTSERILFHSG KTY---------------GGAARAFDQIDNAPEEKARGITINTSHVEYDT LKG---------------LAEMKDYDNIDNAPEEKERGITIATSHIEYET KEG---------------KSAATRYDEIDKAPEEKARGITINSAHVEYSS FIDEKTVKEAEEAAKKLGKDSEKYAFLMDRLKEERERGVTINLSFMRFET YFDEKTVKMIEEESKKMGKESFKFAWLLDRMKEERERGVTISLSYMKFET YIEEKKLKELEEQAKSRGKESFKFAWILDKMKEERERGITIDLTFMKFET GIDKRTIEKFEKEAAEMGKGSFKYAWVLDKLKAERERGITIDISLWKFET GIDKRTIEKFEKEAAEMGKGSFKYAWVLDKLKAERERGITIDISLWKFET GIDKRTIEKFEKEAQEMGKGSFKYAWVLDKLKAERERGITIDIALWKFET GIDKRVIERFEKEAAEMNKRSFKYAWVLDKLKAERERGITIDIALWKFET GIDKRVIEKYEKEASEMGKQSFKYAWVMDKLKAERERGITIDIALWKFET IIS---------------QKVAGEALALDYLSVEQQRGITVKAANISLYH IIS---------------ERIAGEALVLDYLNVEKQRGITVKSANVSLYH LLS---------------EKIAGQALALDYLDVEQKRQMTVKAANASLYH IIA---------------SARAGETRFTDTRKDEQERCITIKSTAISLFY IIA---------------SARAGETRFTDTRKDEQERCITIKSTAISLFY IIA---------------GSKAGETRFTDTRKDEQERCITIKSTAISLFF IIA---------------DKVSGDMRYMSCRADEQERGITIKSSSVSLHF IIA---------------QEVAGDVRMTDTRADEAERGITIKSTGISLYY VNHKI-------------GEVHDGAATMDWMEQEQERGITITSAATTAFW VSHKI-------------GEVHDGAATMDWMEQEKERGITITSAATTCFW RIHKI-------------GETHDGESVMDWMEQEKERGITITSAATSVSW PT----------------------------RHYAHVDCPGHADYVKNMIT EN----------------------------RHYAHVDCPGHADYVKNMIT DK----------------------------RHYAHVDCPGHADYIKNMIT RK----------------------------YFFTVIDAPGHRDFVKNMIT KK----------------------------YFFTIIDAPGHRDFVKNMIT KK----------------------------YVFTIIDAPGHRDFVKNMIT SK----------------------------YYVTIIDAPGHRDFIKNMIT TK----------------------------YYITIIDAPGHRDFIKNMIT AK----------------------------YYITIIDAPGHRDFIKNMIT NK----------------------------YYCTVIDAPGHRDFIKNMIT SK----------------------------YYFTIIDAPGHRDFIKNMIT EIDGKG------------------------YVINLIDTPGHVDFSGRVTR EYEGKP------------------------YVINLIDTPGHVDFSGKVTR EYKGKP------------------------YLINLIDTPGHVDFQSKTIR ELSENDLNFIKQSK-------DG-----SGFLINLIDSPGHVDFSSEVTA ELSENDLNFIKQSK-------DG-----AGFLINLIDSPGHVDFSSEVTA ELEKKDLEFVKGENQFETVEVDGKKEKYNGFLINLIDSPGHVDFSSEVTA EMPKEDKLPAGCTS--------------HEFLINLIDSPGHVDFSSEVTA QMTDEALQSYKGER-------KG-----NDYLINLIDSPGHVDFSSEVTA SGMAKQYE---------------------PHRINIIDTPGHVDFTIEVER K----------------------------DHQINLIDTPGHVDFTIEVER K----------------------------NCSLNLIDTPGHVDFTVEVER GAAQMDGAILVVAATDG-------PMPQTREHILLGRQVG------VPYI GAAQMDGAILVVSAADG-------PMPQTREHILLSRQVG------VPHI GAAQMDGAILVVSATDS-------VMPQTREHILLARQVG------VPKM GASQADAAILVVSAKKGEYEAGMSAEGQTREHIILSKTMG------INQV GASQADAAILVVSARKGEFEAGMSAEGQTREHAILARTMG------INQL GASQADAAILVVSARKGEFEAGMSTEGQTREHLLLARTMG------IEQI GTSQADCAVLIVAAGVGEFEAGISKNGQTREHALLAYTLG------VKQL GTSQADCAVLIVAAGVGEFEAGISKNGQTREHALLAYTLG------VKQL GTSQADCAVLVVACGTGEFEAGISKNGQTREHALLAQTLG------VKQL GTSQADCAVLIIDPTTGGFEAGISKDGQTREHALLAFTLG------VKQM GTSQADCAVLVIASPTGEFEAGIAKNGQTREHALLAYTLG------VKQM SLRVLDGSIVVIDAVEGIMTQTETVLRQSLEGRVRPILFINKVDRLIKEL SLRVLDGAIVVVDAVEGVMTQTETVIRQALEERVRPILFINKVDRLIKEL ALRVIDGAIVVVDAVEGVMTQTEMYLRVALEERVRPVLFINKIDRLIKEL ALRVTDGALVVVDCVSGVCVQTETVLRQAIAERIKPVLMMNKMDRALLEL ALRVTDGALVVVDCVSGVCVQTETVLRQAIAERIKPVLMMNKMDRALLEL ALRVTDGALVVVDCVSGVCVQTETVLRQAIAERIKPVLFMNKMDRALLEL ALRVTDGALVVIDCVEGVCVQTETVLRQAVAERIKPVLFVNKVDRFLLEL ALRITDGALVVVDCIEGVCVQTETVLRQALGERIRPVLTVNKMDRCFLEL SMRVLDGAVMVYCAVGGVQPQSETVWRQANKYKVPRIAFVNKMDRMGANF SMRVLDGAVSVFCSVGGVQPQSETVWRQANKYGVPRIVFVNKMDRIGANF SLRVLDGAIAVLDAQMGVEPQTETVWRQASRYEVPRVIFVNKMDKTGANF IVFLNKCDMVD---DEELLELVEMEVR---ELLSQYDFPGDDTPIVRGSA VVFLNKQDMVD---DQELLELVEMEVR---ELLSAYEFPGDDTPIVAGSA VVFLNKCDIAS---DEEVQELVAEEVR---DLLTSYGFDGKNTPIIYGSA IVAINKMDLADTPYDEKRFKEIVDTVS---KFMKSFGFDMNKVKFVPVVA IVAINKMDATEPPYSEKRYNEIKEILG---KFLKGLGYDVSKIPFIPISA IVAVNKMDAPDVNYDQKRYEFVVSVLK---KFMKGLGYQVDKIPFIPVSA IVGVNKMDSTEPPYSQKRYEEIVKEVS---TYIKKIGYNPDTVAFVPISG IVGVNKMDSTEPAYSEKRYDEIVKEVS---AYIKKIGYNPATVPFVPISG IVACNKMDSTEPPFSEARFTEITNEVS---GFIKKIGYNPKAVPFVPISG ICCCNKMDATTPKYSKARYDEIVKEVS---SYLKKVGYNPEKIAFVPISG IVAINKMDEKSTNYSQARYDEIVKEVS---SFIKKIGYNPEKVAFVPISG KLSSQEIQKRLIDLIIEVNNLIETYGEP--EFKDQWKIKPELGNVVFGSA KLPPEKIQQRFVEIIKEVNNLIDLYAEP--EFRKKWKLDPNAGMVAFGSA R-SPNEIQQRLVQIVKDVNTLIATYADK--EFQKAWLLDPMKG-QAFGSA QLEPEELYQTFQRIVENVNVIISTYGEGESGPMGNIMIDPVLGTVGFGSG QLEPEELYQTFQRIVENVNVIISTYGEGESGPMGNIMIDPVLGTVGFGSG QLGAEELFQTFQRIVENINVIIATYGD-DDGPMGPIMVDPSIGNVGFGSG QLNTEEAYLSFRRAIESVNVIVGNTED---KEFGDVTVSPEKGTVAFGSG QVDGEEAYTTFQKVIENANVIMATYED---PLLGDVQVYPEKGTVAFSAG LKVVNQIKTRLGANPVPLQLAIGAEEHFTGVVDLVKMKAINWNDADQGVT YNVENQIKLRLKANPVPINIPIGAEDTFIGVIDLVQMKAIVWNNETMGAK ERSVLSIQQRLGVKAVPIQFPIGAENDFNGIIDIITKKAYFFDG-NKEEN LKALEGD----------AEWEAK--------------------------- LRALEEAKAG-----NVGEWGEK--------------------------- LKALEGD----------PKWEAK--------------------------- PDGDNVTHKS-----TKMPWYN---------------------------- WTGENLIERS-----PNMPWYN---------------------------- WKGDNLIERS-----PNMPWYN---------------------------- WNGDNMLEPS-----ANMPWFKGWKVT----------------------- WHGDNMLEPS-----PNMPWFKGWKVE----------------------- FNGDNMLEVS-----SNMPWFKGWAVE----------------------- FEGDNMIERS-----TNLDWYK---------------------------- WNGDNMLERS-----DKMEWYK---------------------------- KDKWGFSVP-----MAGKRGVK---------------------------- KDKWGISVP-----QVKKKGIT---------------------------- RDRWGLTIP-----LVQQKGIK---------------------------- LHGWAFTLKQFAEMYVAKFAAKGEGQLSAAERAKKVEDMMKKLWGDRYFD LHGWAFTLKQFAEMYVAKFAAKGEGQLGPAERAKKVEDMMKKLWGDRYFD LHGWAFTLKQFAEMYAGKFGVQ-------------VDKLMKNLWGDRFFD LHGWGFTLGRFAKLYAAKFGDP-------------EDKLMGRLWGDSYFD LHGWAFTLSNFAKMYASKFGVD-------------ESKMMERLWGENFFD FEYEDIPADMVELANEWHQNLIESAAE----------------------- YDVEEIPSDLLEKAKEYREKLVEAVAE----------------------- AIEKPIPEQYVDQVEKLYNNLVEEVAS----------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------------------------------FSDVVNAYTSGDKAKIE ---------------------------------FREIIQAYEKG-KEAVA ---------------------------------FSDIVDVYTKG-KEAVA PANGKFSKSANSPDGKKLPRTFCQLILDPIFKVFDAIMNFRKEETAKLIE PANGKFSKSATSPEGKKLPRTFCQLILDPIFKVFDAIMNFKKEETAKLIE LKTKKWSSTQTD-ESK---RGFCQFVLDPIFMVFDAVMNIKKDKTAALVE ATAKKWTSNPQSADGKALPRAFCQFVLEPIYQLTRAIVDEDAVKLEKMMK PATKKWTTKNSG--NASCKRGFVQFCYEPIKQIIAACMNDQKDKLLAHVT --------------------------------ASEELMEKYLGGEELTEA --------------------------------QDEALMEKYLGGEELSIE --------------------------------LDDQLMADYLDGKPIEID -----------------------------ILELAGFLDSYIPEPERAI-- -----------------------------VLKLMAEVDAYIPTPERDT-- -----------------------------IHDLIKAVDEWIPTPTREV-- -----------------------------GPTLEELLDQLEI-PPKPV-- -----------------------------GPTLVEALDTLEV-PPKPI-- -----------------------------GPTLVEALDQLQP-PAKPV-- ----------------------RKDGNASGTTLLEALDCILP-PTRPT-- ----------------------RKEGNASGVSLLEALDTILP-PTRPT-- ----------------------RKEGNASGKTLLEALDSIIP-PQRPT-- -----------------------------GPTLLDALDQINE-PKRPS-- -----------------------------GPTLLEALDAIVE-PKRPH-- ELASKV---------------------PIHEALLDAVIKFVPNPRDSQKY ELSKKM---------------------PLHETLLDMVIKFVPNPREAQRY ELQKAA---------------------PLHEAILDMVVKYVPNPRDAQRY KLDIKLDSEDKDKEGKPLLKAVMRRWLPAGDALLQMITIHLPSPVTAQKY KLDIKLDSEDKDKEGKPLLKAVMRRWLPAGDALLQMITIHLPSPVTAQKY KLGIKLANDEKDLEGKPLMKVFMRKWLPAGDTMLQMIAFHLPSPVTAQKY TLQITLAPEDAEIKGKQLVKAVMRKFLPAADAILSMIVTHLPSPLVAQKY KLGIQMKTEEKDLMGRPLMKRVMQTWLPASSALLEMMIHHLPSPATAQRY EIKGALRQRVLNNEIILVTCG-SAFKNKGVQAMLDAVIDYLPSP-----V EIKKGIKAGCLNMSLVPMLCG-SSFKNKGVQTLLDAVIDYLPAP-----T AIKNAIRNGVIHCKFFPVLCG-SAFKNKGIKLLLDAVVDFLPSP-----V -----------------------DKPFLLPIEDVFSISGRG-TVVTGRVE -----------------------EKTFLMPVEDVFSIAGRG-TVVTGRIE -----------------------DKPFLLAIEDTMTITGRG-TVVTGRVE -----------------------DKPLRIPIQEVYSISGVG-VVPVGRIE -----------------------NKPLRIPIQDVYNISGIG-VVPVGRVE -----------------------DKPLRIPVQNVYSIPGAG-TVPVGRVE -----------------------DKPLRLPLQDVYKIGGIG-TVPVGRVE -----------------------DKPLRLPLQDVYKIGGIG-TVPVGRVE -----------------------DRPLRLPLQDVYKIGGIG-TVPVGRVE -----------------------DKPLRLPLQDVYKIGGIG-TVPVGRVE -----------------------DKPLRIPLQDVYKIGGIG-TVPVGRVE RIPKIWKGDLDSEIAKAMINADPNGPIVMMINDMKVDPHAG-LVATGRVF RIPKIWKGDINSEIGQAMLNADPDGPLVFFINDVRIE-KAG-LVATGRVF RIPKIWHGDLNHEAVKYMMEADPNGPLVMLVNDIRVDPHAG-LVATGRIY RCELLYEGPPDDEAAMGIKSCDPKGPLMMYISKMVPTSDKGRFYAFGRVF RCELLYEGPPDDEAAMGIKSCDPKGPLMMYISKMVPTSDKGRFYAFGRVF RMEMLYEGPHDDEAAVAIKTCDPNGPLMMYISKMVPTSDKGRFYAFGRVF RCANLYEGPMDDECAVAIQKCDPNGPLMMYVSKMVPTSDKGRFYAFGRVF RVENLYEGPMDDVYATAIRNCDPEGPLMLYVSKMIPASDKGRFFAFGRVF DVPAINGILDDGKDTPAERHASDDEPFSALAFKIATDPFVG-NLTFFRVY EVVDIKG-IDPKTEEEVFVKSSDDGEFAGLAFKIMTDPFVG-QLTFVRVY DVPPAKA--IDANNKEISIKASDDANFIGLAFKVATDPFVG-RLTFIRVY RGIIKVGEEVEIVGIK-----------ETQKSTCTGVEMFRKLLDEGRAG RGVVKVGDEVEIVGIR-----------PTQKTTVTGVEMFRKELEKGEAG RGELKVGQEVEIVGLK-----------PIRKAVVTGIEMFKKELDSAMAG SGVLKVGDKIVFMPVG-------------KIGEVRSIETHHTKIDKAEPG TGVLKVGDKLVFMPAG-------------LVAEVKTIETHHTKIEKAEPG TGVLRVGDKVVFMPPG-------------VVGEVRSIEMHYQQLQQAEPG TGVLKPGMVVTFAPVN-------------VTTEVKSVEMHHEALSEALPG TGILRPGMVVTFAPVN-------------ITTEVKSVEMHHEALSEALPG TGIIKPGMVVTFAPQN-------------VTTEVKSVEMHHESLPEAVPG TGTIKPGMVVTFGPSG-------------LTTEVKSVEMHHESLLEALPG TGIIKPGMVVTFAPAG-------------LSTEVKSVEMHHEQLPEARPG SGTLRAGEEVWLVNAKRQ---------QRILQVSLYMGAIRELAEEIPVG SGTLRSGEEVYLLNAGKK---------SRLLQVSIYMGPFREVTKEIPAG SGTLRAGEEVWLVNARVP---------QRVLQVSLYMGPYRELADEITAG SGVVSTGLKVRIMGPNYTPGKKEDLYLKPIQRTILMMGRYVEPIEDVPCG SGLVSTGLKVRIMGPNYTPGKKEDLYLKPIQRTILMMGRYVEPIEDVPCG SGKVATGMKARIQGPNYVPGKKEDLYEKTIQRTILMMGRFIEPIEDIPSG SGIIVPVKRSELWVSTYVPGKKDDLFLKSIQRTVLMMGRKTEQIEDCPCG AGKVSTGMKVRIMGPNYVPGEKKDLYVKNVQRTVIWMGKKQETVEDVPCG SGVVNSGDTVLNSVKAAR---------ERFGRIVQMHANKREEIKEVRAG RGKLESGSYVYNSTKDKK---------ERVGRLLKMHSNKREDIKEVYAG AGVLKSGSYVKNVRKNKK---------ERVSRLVKMHAQNRNEIDEIRAG ENVGVL--------------------------LRGIKREEIERGQVLAKP DNVGVL--------------------------LRGTKKEEVERGMVLCKP DNAGVL--------------------------LRGVERKEVERGQVLAKP DNIGFN--------------------------VRGVEKKDVKRGDVAGSV DNIGFN--------------------------VKGVEKKDIKRGDVAGSL DNIGFA--------------------------VRGVSKSDIKRGDVAGHL DNVGFN--------------------------VKNVSVKDVRRGNVAGDS DNVGFN--------------------------VKNVSVKDIRRGNVCGDS DNVGFN--------------------------VKNVSVKDIRRGSVCSDS DNVGFN--------------------------VKNVSVKDLKRGYVASNS DNVGFN--------------------------VKNVSVKEIKRGMVAGDS NIAAALGMDAARSGETGVDIRFKDSVLGSFEKLHYISEPVVTISVEPRNP NIGAVMGFEDVRAGETVVSLGYEE-NAAPFESLRYVSEPVVTIAVEPVKI NIAAALALEKARSGETVVAMKYKD-SMTPFEKLRMITESVVTVAIEPKNP NIVGLVGVDQFLVKTGTITT-FEH--AHNMRVMKFSVSPVVRVAVEAKNP NIVGLVGVDQFLVKTGTITT-FEH--AHNMRVMKFSVSPVVRVAVEAKNP NIAGLVGVDQYLVKGGTITT-YKD--AHNMRVMKFSVSPVVRVAVEAKNP NIVGLVGVDQFLVKSGTITT-SEV--AHNIRVMKFSVSPVVRVAVEPKNP NTVALVGLDQYITKNATLTN-EKESDAHPIRAMKFSVSPVVRVAVQCKVA DIAAAIGLKDVTTGDTLCDPDAP-----IILERMEFPEPVISIAVEPKTK EICAFVGLKDTLTGDTLCDEKNA-----VVLERMEFPEPVIHIAVEPKTK DICAVIGLKDTTTGETLTDDKLD-----VQLEAMQFAEPVISLAVEPKTK GTIKPHT----KFESEVYILSK--DEGGRHTPFFKGYRPQFYFRTTDVTG GSITPHK----KFEGEIYVLSK--EEGGRHTPFFTNYRPQFYVRTTDVTG GSIKPHK----KFKAEIYALKK--EEGGRHTGFLNGYRPQFYFRTTDVTG QNPPTVA---DEFTAQVIVIWHPTAVGVGYTPVLHVHTASIACRVSEITS DVPPTVA---DEFTARIMVMWHPTAIAVGYTPVIHVHTASVACRITEIIA DKPPTVA---EEFEARIFVIWHPSAITVGYTPVIHVHTASVSSRIIEIKA KNDPPME--AAGFTAQVIILNHPGQISAGYAPVLDCHTAHIACKFAELKE KADPPQE--AAQFTSQVIILNHPGQISAGYSPVIDCHTAHIACKFAELKE KQDPAKE--ARTFHAQVIIMNHPGQISNGYTPVLDCHTAHIACKFNELKE KDDPAKG--AASFTSQVIIMNHPGQIGNGYAPVLDCHTSHIAVKFAELLT KNDPPQE--TEKFVAQVIVLNHPGQIHAGYSPVLDCHTAHIACKFTEIVD KDLTKMIDALRKLSIEDSNLVVKINEETGEYLLSGMGFLHLEVSLQLLKE QDLPKMIEALRKLTIEDPNLVVKINEETGEYLLSGMGPLHLEIALTMLRE QQLTKLVDALYKLHLEDPSLIVKINEETGEYLLSGVGTLHIEIALTLLKD ADLPKLVEGLKRLAKSDPMVQCII-EESGEHIIAGAGELHLEICLKDLEE ADLPKLVEGLKRLAKSDPMVQCII-EESGEHIIAGAGELHLEICLKDLEE ADLPKLVEGLKRLAKSDPMVQCIF-EESGEHIIAGAGELHLEICLKDLEE SDLPKLVEGLKRLAKSDPCVLCYS-EESGEHIVAGAGELHLEICLKDLAE SDLPKLVEGLKRLAKSDPMVVCSI-EESGEHIIAGAGELHLEICLKDLQD ADQEKMGLALGRLAKEDPSFRVWTDEESNQTIIAGMGELHLDIIVDRMKR ADQEKMGVALGKLAEEDPSFRVMTQEETGQTLIGGMGELHLEIIVDRLKR ADQEKMSIALSKLAEEDPTFKTFSDPETGQTIIAGMGELHLDILVDRMKR TIEL----PEG--------------------------------------- SITL----PEG--------------------------------------- SIAL----AEN--------------------------------------- RIDP----KTGKEAEKN--------------------------------- KIDP----RTGKEIEKN--------------------------------- KLDP----KTGQVVEQN--------------------------------- KIDR----RSGKKLEDG--------------------------------- KIDR----RSGKKLEDN--------------------------------- KVDR----RTGKKVEDF--------------------------------- KIDR----RSGKELEKE--------------------------------- KVDR----RTGAVVAKEGTA------------------------------ N-YG-LDVVTTPPIVVYR--ESIRNKS-QVFEGKSPNKHNKLYISVEPLN K-FG-VEVKASPPIVVYR--ETVRQQS-RVFEGKSPNKHNKLYISVEPLN L-YG-LEVVASPPVIVYR--ETVRESS-QVFEGKSPNKHNKFYISVAPLN DHAC-IPIKKSDPVVSYR--ETVSEESNVLCLSKSPNKHNRLYMKARPFP DHAC-IPIKKSDPVVSYR--ETVSEESNVLCLSKSPNKHNRLYMKARPFP DHAC-IPLKKSDPVVSYR--ETVQSESNQICLSKSPNKHNRLHCTAQPMP DHAG-IEIKTTDPVVSFR--ESV---------------------KASPIS DFMGGAEIIKSDPVVSFR--ETVLDRSVRTVMSKSPNKHNRLYMEARPME EFNV--EANVGKPQVAYR--ETIRQKVTDVEGKHAKQSGGRGQYGHVVID EFKV--EAEIGQPQVAFR--ETIRSSVS-KEHKYAKQSGGRGQYGHVFIK EFKV--EVNIGAPQVSFR--ETFKSTSE-VEGKYIKQSGGRGQYGHVKIR -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- NQTIDLIANG-TIKEDMDN----KEMAKILRDQAEWDYDEAKKIVAIDEN EETITLIQNG-AVTEDQDP----KDRARILADKAGWDYNEARKIWAIDEN EETLRLMSEG-IIVEDMDA----RERAKILREQAGWDADEARRIMAIDEN DGLAEDIDKG-EVSARQEL----KARARYLAEKYEWDVAEARKIWCFGPD DGLAEDIDKG-EVSARQEL----KQRARYLAEKYEWDVAEARKIWCFGPD DGLADDIEGG-TVNARDEF----KARAKILAEKYEYDVTEARKIWCFGPD MELQDLIEAGSDISSKDDP----KARANYLADNHEWDKNDAMNIWSFGPE EGLAEAIDEG-RIGPRDDP----KNRSKILAEEYGWDKDLAKKIWCFGPE MYPLEPGSNP---------------------------------------- LEPKEPGS------------------------------------------ FEP-NKDK------------------------------------------ ------VEMVMPGDNIKMVVTLIHPIAMDDGL------RFAIREGGRTVG ------VEMVMPGDNVKITVELISPVALELGT------KFAIREGGRTVG ------TEMVLPGDNASITVELIAPIACEKGS------KFSIREGGRTVG ------PQFIKAGDSAIVKFKPIKELVAEKFREFPALGRFAMRDMGKTVG ------PHFLKQGDIAIVKFKPIKPLVVEKYSDFQGLGRFAMRDMGKTIG ------PQFLKAGDAAIVRFKPVKPLVVEKFSEIPQLGRFAMRDMNRTVG ------PKFLKSGDAAIVDMVPGKPMCVESFSDYPPLGRFAVRDMRQTVA ------PKSLKSGDAAIVEMVPGKPMCVESFSQYPPLGRFAVRDMRQTVA ------PKFLKSGDAGIVELIPTKPLCVESFTDYAPLGRFAVRDMRQTVA ------PKFLKNGDAGMVKMLPTKPMVVETFAEYPPLGRFAVRVMRQTVA ------AVVLKNGDAAMVELTPSRPMCVESFTEYPPLGRFAVRDMRQTVA ---INVFIDATSGVQHLREIMDTLLQGFRLAMKEGPLAFEPVRGVKVVLH ---INVFVDKTAGVQYLREVKDTIIAGFRLALKEGPLAAEPVRGVKVVLH ---LNMLVDMTTGVQYLREIKDTVIQGFRLAMKEGPLAMEPVRGVKVVLH GTGPNILTDITKGVQYLNEIKDSVVAGFQWATKEGALCEENMRGVRFDVH GTGPNILTDITKGVQYLNEIKDSVVAGFQWATKEGALCEENMRGVRFDVH GTGPNLLMDVTKGVQYLNEIKDSVVAGFQWATREGVLSDENMRGVRFNVH GNGANLLVNVTKGVQYLNEIKDSFVGAFQWATKEGVVCDENMRGIRFNLY TTGPNMVVDMCKGVQYLNEIKDSVVAGFQWASKEGALAEENMRGICFEVC --KGYEFINDIKGGVIPGEYIPAVDKGIQEQLKAGPLAGYPVVDMGIRLH ---GYEFVNEISGGVIPKEYIPAVDKGIQEAMQNGVLAGYPVVDFKVTLY ---GFEFVDKIVGGRIPREYIKPVQTGLENAMNSGPLAGYPMIDIKATLF AGVVAKVLS----------------------------------------- AGVVSNIIE----------------------------------------- AGTVTEVLE----------------------------------------- VGVIIDVKPRKVEVK----------------------------------- IGQVLEIKPAQVNIKK---------------------------------- IGIVTDVKPAKVDIKAK--------------------------------- VGVIKAVDKKAAGAGKVTKSAQKAQKAK---------------------- VGVIKNVEKKSGGAGKVTKSAQKAQKAGK--------------------- VGVIKSVEKSDGSSGKVTKSAQKAAPKKK--------------------- VGVIKAVEKKDPTGAKVTKAAAKKGAK----------------------- VGVIKSTVKKAPGKAGDKKGAAAPSKKK---------------------- DAVVHEDPAHRGPAQLYPAVRNAIFAGILTSKPTLLEPLQKLDIRIPMEY DAVIHEDPVHRGPGQLYPAVRNAIWAGILDGRPTLLEPLQKLDIRAPMEY DAVVHEDPAHRGPAQIFPAVRNAIFAGFLTAKPTILEPILKLDIRTPMEY DVTLHADAIHRGGGQIIPTARRCLYASVLTAQPRLMEPIYLVEIQCPEQV DVTLHADAIHRGGGQIIPTARRCLYASVLTAQPRLMEPIYLVEIQCPEQV DVTLHADAIHRGGGQIIPTARRVFYASVLTAEPRLLEPVYLVEIQCPEAA DVTLHTDAIHRGGGQIIPTARRVLYAAELTASPTLLEPIYLVEITAPENA DVVLHTDAIHRGGGQIIPTARRVFYASQLTAKPRLLEPVYLVEIQAPENA FGSYHDVDSSE--LAFKLAASIAFKEGFKKAKPVLLEPIMKVEVETPEEN DGSYHDVDSSE--MAFKIAGSMAFKEASRAANPVLLEPMMKVEVEVPEEY DGSFHEVDSSE--MAFKIAASLALKEAGKQCNPVLLEPIMAIEVTVPEQY -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- LGNVTAVITRKRGKVINVVQT--GNVARVYAEIPVGESFELASELRASSA LSNITAVLTRKRGRIINVETT--GVMARIIAAIPVAESFDLAGELRSATA IGNISTVITKKRGKLIEVQQM--ETSARVIAEIPVSESFDIADMLRNVTA VGGIYGVLNRKRGHVFEESQVAGTPMFVVKAYLPVNESFGFTADLRSNTG VGGIYGVLNRKRGHVFEESQVAGTPMFVVKAYLPVNESFGFTADLRSNTG VGGIYGVLNRRRGHVFEESQVTGTPMFVVKAYLPVNESFGFTADLRSNTG IGGIYSVLNRRRGIVIGEERRIGSPLFSVKAHLPVLESLRFTADLRSHTA LGGIYSVLNQKRGHVFEEMQRPGTPLYNIKAYLPVVESFGFSSTLRASTS TGDVIGDLSRRRGMLKGQESE--VTGVKIHAEVPLSEMFGYATQLRSLTK MGDVIGDLNRRRGQINSMDDR--LGLKIVNAFVPLVEMFGYSTDLRSATQ FGDTMGDISSRRGIIEGTEQR--DNVQLIKAKVPLKEMFGYATDLRSFSQ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- GRAFWGTEFSRWAPVP------DSILVDLIMKIRERKGKPKQLPKVEDFI GRAFWGVEFYGWAPVP------DQMLQDLIAKIRQRKGLPPSPPKIDDLI GKAIWGQEFSRWAPVP------ESMLMDLVSKIRTRKGLKPEPPKLEDFL GQAFPQCVFDHWQILPGDPFDNSSRPSQVVAETRKRKGLKEGIPALDNFL GQAFPQCVFDHWQILPGDPFDNSSRPSQVVAETRKRKGLKEGIPALDNFL GQAFPQCVFDHWQVLPGDPLEAGTKPNQIVLDTRKRKGLKEGVPALDNYL GQAFPQCVFDHWASIG--VVNKDKKATEVALATRKRKGLAPEIPALDKFH GQAFPQCVFDHWEMMPSDPLEAGSQASTLVSVIRKRKGLKEQMTPLSEFE GRASYTMEFLKYDEAP------SNVAQAVIEARGK--------------- GRGTYSMEFDHYGEVP------SNIAKEIVEKRKG--------------- GRGNYVMQFSHYAETP------KSVVNEIIANKK---------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- S-------------- GP------------- SP------------- DKL------------ DKL------------ DKM------------ RKTINNLSHTLSFQI DKL------------ --------------- --------------- --------------- tree-puzzle-5.2/data/primates.trees0000644000076400001440000000014407642374753013150 (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); tree-puzzle-5.2/data/EF.3trees0000644000076400001440000000504107560577342011700 [tree - ((B2,(E2,C2)),(B1a,(E1a,C1a))) ] [ lh=-18965.865869 ](EFG_MYCGE:0.35044,(((((EF1A_SULAC:0.27436,EF1A_DESMO:0.15452)98:0.06186, EF1A_AERPE:0.19726)100:0.16339,((EF11_DAUCA:0.19788,EF1A_DICDI:0.17054) 68:0.08680,(EF11_HUMAN:0.04646,EF12_MOUSE:0.04777)64:0.06487,EF1A_CAEEL:0.12845) 88:0.47056)100:0.66538,((EFTU_ECOLI:0.16964,EFTU_HELPY:0.21648)100:0.10227, EFTU_MYCGE:0.22380)100:0.82551)100:2.71210,(((((EF2_MOUSE:0.00532, EF2_HUMAN:0.00411)100:0.11711,EF2_CAEEL:0.10100)98:0.13112,EF2_DICDI:0.32291) 94:0.08935,EF2_BETVU:0.22108)100:0.79422,((EF2_SULAC:0.22098,EF2_DESMO:0.26389) 100:0.06212,EF2_AERPE:0.15059)100:0.23638)99:0.48379)100:1.02287, (EFG_ECOLI:0.28597,EFG_HELPY:0.19713)99:0.14542); [tree2 - ((E2,(B2,C2)),(E1a,(B1a,C1a))) ] ( ( [E+2] ( ( ( ( EF2_HUMAN, EF2_MOUSE ), EF2_CAEEL ), EF2_DICDI ), EF2_BETVU ) [E-2] , ( [B+2] ( EFG_MYCGE, ( EFG_ECOLI, EFG_HELPY ) ) [B-2] , [A+2] ( EF2_AERPE, ( EF2_DESMO, EF2_SULAC ) ) [A-2] ) ) ,[root] ( [E+1a] ( ( EF11_HUMAN, EF12_MOUSE ), EF1A_CAEEL, ( EF11_DAUCA, EF1A_DICDI ) ) [E-1a] , ( [B+1a] ( ( EFTU_ECOLI, EFTU_HELPY ), EFTU_MYCGE ) [B-1a] , [A+1a] ( ( EF1A_DESMO, EF1A_SULAC ), EF1A_AERPE ) [A-1a] ) ) ) ; [tree3 - ((C2,(E2,B2)),(C1a,(E1a,B1a))) ] ( ( [A+2] ( EF2_AERPE, ( EF2_DESMO, EF2_SULAC ) ) [A-2] , ( [E+2] ( ( ( ( EF2_HUMAN, EF2_MOUSE ), EF2_CAEEL ), EF2_DICDI ), EF2_BETVU ) [E-2] , [B+2] ( EFG_MYCGE, ( EFG_ECOLI, EFG_HELPY ) ) [B-2] ) ), [root] ( [A+1a] ( ( EF1A_DESMO, EF1A_SULAC ), EF1A_AERPE ) [A-1a] , ( [E+1a] ( ( EF11_HUMAN, EF12_MOUSE ), EF1A_CAEEL, ( EF11_DAUCA, EF1A_DICDI ) ) [E-1a] , [B+1a] ( ( EFTU_ECOLI, EFTU_HELPY ), EFTU_MYCGE ) [B-1a] ) ) ) ; tree-puzzle-5.2/data/globin.a0000644000076400001440000000264407446451756011704 7 128 HBB_HUMAN HLTPEEKSAV TALWGKVNVD EVGGEALGRL LVVYPWTQRF FESFDLSMGN HBB_HORSE QLSGEEKAAV LALWDKVNEE EVGGEALGRL LVVYPWTQRF FDSFDLSMGN HBA_HUMAN VLSPADKTNV KAAWGKVGAG EYGAEALERM FLSFPTTKTY FPHFDLSHGS HBA_HORSE VLSAADKTNV KAAWSKVGAG EYGAEALERM FLGFPTTKTY FPHFDLSHGS MYG_PHYCA VLSEGEWQLV LHVWAKVEVA GHGQDILIRL FKSHPETLEK FDRFHLKKAS GLB5_PETMA PLSAAEKTKI RSAWAPVYYE TSGVDILVKF FTSTPAAQEF FPKFGLTKKS LGB2_LUPLU ALTESQAALV KSSWEEFNIP KHTHRFFILV LEIAPAAKDL FSFLGTSQNN PKVKAHGKKV LGAFSDGLAH LDNLKGTFAT LSELHCDKLH VDENFRLLGN PKVKAHGKKV LHSFGEGVHH LDNLKGTFAA LSELHCDKLH VDENFRLLGN AQVKGHGKKV ADALTNAVAH VDDMPNALSA LSDLHAHKLR VDVNFKLLSH AQVKAHGKKV GDALTLAVGH LDDLPGALSN LSDLHAHKLR VDVNFKLLSH EDLKKHGVTV LTALGAILKK KGHHEAELKP LAQSHATKHK IPKYLEFISE ADVRWHAERI INAVNDAVAS MDKMSMKLRD LSGKHAKSFQ VDQYFKVLAA PELQAHAGKV FKLVYEAAIQ LQVTDATLKN LGSVHVSKGV ADAHFPVVKE VLVCVLAHHQ AAYQKVVAGV ANALAHKY VLVVVLARHQ ASYQKVVAGV ANALAHKY CLLVTLAAHH ASLDKFLASV STVLTSKY CLLSTLAVHH ASLDKFLSSV STVLTSKY AIIHVLHSRQ GAMNKALELF RKDIAAKY VIADTVAAGD AGFEKLMSMI CILLRSAY AILKTIKEVN SAWTIAYDEL AIVIKKEM CLUSTAL W example "globin.pep" (kindly provided by Desmond Higgins). This file is part of the TREE-PUZZLE distribution. ($Id$) tree-puzzle-5.2/data/atp6.a0000644000076400001440000000457107446451716011301 7 226 chicken MNLSFFDQFS SPCLLGIPLI LPSLLLPALL LPSPNRWINN RLSTIQLWFT cat MNENLFASFT TPTMMGLPIV ILIIMFPSIL FPSPNRLINN RLVSLQQWLV horse MNENLFASFA TPTMVGLPIV ILIIMFPSIL FPSPNRLINN RLISIQQWLV mouse MNENLFASFI TPTMMGFPIV VAIIMFPSIL FPSSKRLINN RLHSFQHWLV opossum MNENLFAPFI TPTILGITTL PIIITFPCLI LSSPKRWLPN RIQILQMWLI platypus MNENLFAPFI TPTVLGISVL PLIMIFPCLL FSTSNRWVPN RLIALQLWLV rat MNENLFASFI TPTMMGLPIV VTIIMFPSIL FPSSERLISN RLHSFQHWLI HLITKQLMTP LNKAGHKWAL LLTSLILMLL SINLLGLLPY TFTPTTQLSM QLTSKQMLAI HNHKGQTWAL MLMSLILFIG STNLLGLLPH SFTPTTQLSM QLTSKQMMAI HNSKGQTWTL MLMSLILFIG STNLLGLLPH SFTPTTQLSM KLIIKQMMLI HTPKGRTWTL MIVSLIMFIG STNLLGLLPH TFTPTTQLSM RLITKQMMTM HNKQGRTWTL MLMSLILFIA STNLLGLLPY SFTPTTQLSM RLITKQMMMM HNKQGRMWTL MLITLIIFIA STNLLGLLPY TFTPTTQLSM KLIIKQMMLI HTPKGRTWAL MIVSLIMFIG STNLLGLLPH TFTPTTQLSM NMALALPLWL ATLLTGLRNQ PSASLGHLLP EGTPTPLIPA LIMIETTSLL NLGMAIPLWA GTVITGFRHK TKASLAHFLP QGTPVPLIPM LVVIETISLF NLGMAIPLWA GTVFMGFRHK TKAALAHFLP QGTPIFLIPM LVIIETISLF NLSMAIPLWA GAVITGFRHK LKSSLAHFLP QGTPISLIPM LIIIETISLF NIGMAIPLWA GTVIMGFRNK PKMSLAHFLP QGTPTPLIPM LIIIETISLF NMGMAIPLWM GTVLMGFRNK PKASLAHFLP QGTPTPLIPM LIIIETISLF DLSMAIPLWA GAVILGFRHK LKNSLAHFSP QGTPISLIPM LIIIETISLF IRPLALGVRL TANLTAGHLL IQLISTATIA LLPMMPSISA LTALILFLLT IQPMALAVRL TANITAGHLL MHLIGGAALA LMNISTSIAL ITFTILILLT IQPVALAVRL TANITAGHLL MHLIGGATLA LMSISPSTAL ITFIILILLT IQPMALAVRL TANITAGHLL MHLIGGATLV LMNISPPTAT ITFIILLLLT IQPLALAVRL TANITAGHLL IHLIGSATLA LSSISMTVST ITFSILFLLT IQPLALAVRL TANITAGHLL IHLIGSATLA LSSISLTVST ITFTILFLLT IQPMALAVRL TANITAGHLL MHLIGGATLV LMDISPPTAT ITFIILLLLT ILEVAVAMIQ AYVFVLLLSL YLQENI ILEFAVALIQ AYVFTLLVSL YLHDNT ILEFAVAMIQ AYVFTLLVSL YLHDNT ILEFAVALIQ AYVFTLLVSL YLHDNT LLEIAVAMIQ AYVFTLLVSL YLHDNS ILEFAVALIQ AYVFTLLVSL YLHDNT VLEFAVALIQ AYVFTLLVSL YLHDNT Mitochondrial ATP6 amino acid sequences from six mammals with chicken as outgroup. This file is part of the TREE-PUZZLE distribution. ($Id$) tree-puzzle-5.2/data/primates.b0000644000076400001440000001340107446452060012235 5 895 Gibbon 0001111010 0010100110 1111101001 1011101000 1100111111 1111011011 Human 0001111011 0010100110 1111101001 1011101000 1110101111 1011011011 Chimpanzee 0001111011 0010100110 1111101001 1011101000 1110101111 1011011011 Gorilla 0001111011 0010100110 1111101001 1011101000 1110101101 1011011011 Orangutan 0001111011 0010100110 1111101001 1011101000 1110101111 1111011011 1101111010 0011100011 0100010001 1101001101 0110100111 1011110000 1101110010 0011100011 0100010101 1101001101 0110100111 1111110000 1101110010 0011100011 0100010101 1101001101 0110100111 1111110000 1101110010 0011100011 0100010001 1101001101 0110100111 1111110000 1101110010 0011100011 0100010001 1101001101 0110100111 1111110000 0111100011 1101111101 1001001111 1100100111 0100100011 1101100111 0111100011 1101111101 1001001111 1100100111 1100100011 1101100111 0111100011 1101111101 1001001111 1100100111 1100100011 1101100111 0111100011 1101111101 1001001111 1100100111 1100100011 1101100111 1111100011 1101111111 1001001111 1100100111 1100100011 1101100111 1011110111 1110110110 0111111000 1000111111 0101100100 1111111111 1011110111 1110110110 0111011000 0000111111 0101100100 1101011111 1011110111 1110110110 0111111000 0000111111 0101100100 1111011111 1011110111 1110110110 0111011000 0000111111 0101100100 1101011111 1011110110 1110110110 0111111000 0000111111 0101100100 1101011111 1100010001 0110110110 1011101100 0111001010 1100110100 1111010111 1100110001 0110111111 1011101000 0111001010 1100110100 1111010111 1100110001 0110111111 1011101000 0111001010 1100110100 1111010111 1100110001 0110111111 1011101000 0111001010 1100110100 1111010111 1100111001 0110110111 1011001000 0111001010 1100110100 1111010111 1111101010 1110110100 1010010000 1010111010 1011010110 0000101000 1111101010 1110110100 1010010000 1110111011 1011010110 0100101000 1111101010 1110110100 1010010000 1110111011 1011010110 0100101000 1111101010 1110110100 1010010000 1110111010 1011010110 1100101000 1111101010 1110110100 1010010000 1010111010 1011010110 0100101000 0111110111 0101000000 0101011001 0111010101 1111111111 1111111111 0111110111 0101000000 0101111101 0111010101 1101111110 1111111111 0111110111 0101000000 0101111101 0111110101 1101111110 1111111111 0111110111 0101000000 0101111101 0111010101 1101111110 1111111111 0111111111 0101010000 0101111101 0111010101 1101111110 1111111111 0011111001 1110010110 1101100111 1011111101 0001010011 1001100001 0111111001 1110010110 1101100011 1111111101 0001010011 1001100001 0111111001 1110010110 1101100011 1011111101 0001010011 1001100001 0111111001 1110010110 1101100011 1011111101 0001010011 1001100001 0111111001 1110010110 1101100011 1011101101 0001010011 1001100001 0110001101 0001110010 0100000111 0000111111 0111011000 0000111010 0110001101 0001110010 0100000111 0100111111 0111011000 0000111010 0110001101 0001110010 0100000111 0100111111 0111011000 0000111010 0110001101 0001110010 0100000111 0100111111 0111011000 0000111010 0110001101 0001110010 0100001111 0100111111 0111011000 0000111010 0000110110 0111011011 1010101001 0010100111 1111001111 1000000100 0000110110 0111010111 1010111001 0010100111 1111001111 1000000100 0000110110 0111010111 1010111001 0010100111 1111001111 1000000100 0000110110 0111010111 1010111001 0010100111 1111001111 1000000100 0000110110 0111110111 1010101001 0010100111 1111001111 1000000100 1001101110 1100111100 0011100000 1111001010 0111100010 0000100100 1001101110 1100111100 0111100000 1111001010 0111100010 0000100100 1001101110 1100111100 0111100000 1111001010 0111100010 0000100100 1001101110 1100111100 0011100000 1111001010 0111100010 0000100100 1001101111 1100111100 0011100000 1111001010 0111100010 0000100100 1001010101 1011010011 0111100101 1001111111 0011111111 0110100110 1101010101 1011010011 0111100111 1001111111 0011111111 0111110110 1101010101 1011010011 0111100111 1001111111 0011111111 0111110110 1101010101 1011010011 0111100111 1001111111 0011111111 0111110110 1101011101 1011010011 0111110111 1001111111 0011111111 0110110110 1111101100 1111001000 0000011101 0111010110 1010000010 0110110111 1111101100 1111001000 0000011101 0111110110 1010000111 0110110101 1111101100 1111001000 0000011101 0111110110 1010000111 0110110101 1111101100 1111001000 0000011101 0111110110 1010000111 0110110101 1111101100 1111001000 0000011101 0111110110 1010000010 0110110101 1101111101 0011001110 1111110100 1001011101 0101010001 1000000110 1101111101 1011001111 1111110100 1001011101 0101110001 1000000110 1101111101 1011001111 1111110100 1001011101 0101110001 1000000110 1101111101 1011001111 1111110100 1001011111 0101110001 1000000110 1101111101 1011001111 0111100100 1001011101 1101110000 1000000110 1101111000 1100101100 0110100111 0001011000 0111111110 00111 1101111000 1100101100 0110100111 0001001110 0111111110 00111 1101111000 1100101100 0100100111 0001001110 0111111110 00111 1101111000 1100101100 0100100111 0001001110 0111111110 00111 1101101000 1100101100 0100110111 0001011010 0111110110 00111 Binary state data for primate sequences (Y/R data). This file is part of the TREE-PUZZLE distribution. ($Id$) tree-puzzle-5.2/data/primates.ctrees0000644000076400001440000001161007642375020013277 (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,(((Human,Chimpanzee),Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); (Gibbon,((Human,Chimpanzee,Gorilla),Orangutan)); tree-puzzle-5.2/data/globin.ctrees0000644000076400001440000002046407642045635012742 (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); tree-puzzle-5.2/data/Makefile.am0000644000076400001440000000124210073365563012303 # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # EXTRA_DIST = \ EF.3trees\ EF.phy\ atp6.a\ globin.a\ globin.trees\ globin.ctrees\ marswolf.n\ marswolf.trees\ marswolf.ctrees\ primates.b\ primates.trees\ primates.ctrees tree-puzzle-5.2/data/Makefile.in0000644000076400001440000001360010075305510012301 # Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MPICC = @MPICC@ MPICC0 = @MPICC0@ MPICC1 = @MPICC1@ MPICC2 = @MPICC2@ MPICC3 = @MPICC3@ MPICC4 = @MPICC4@ MPICC5 = @MPICC5@ MPICC6 = @MPICC6@ MPICFLAGS = @MPICFLAGS@ MPIDEFS = @MPIDEFS@ MPILIBS = @MPILIBS@ PACKAGE = @PACKAGE@ PPUZZLE = @PPUZZLE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ EXTRA_DIST = \ EF.3trees\ EF.phy\ atp6.a\ globin.a\ globin.trees\ globin.ctrees\ marswolf.n\ marswolf.trees\ marswolf.ctrees\ primates.b\ primates.trees\ primates.ctrees subdir = data mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: tags: TAGS TAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tree-puzzle-5.2/data/marswolf.n0000644000076400001440000000263707446452032012267 8 116 Thylacinus ctttggatcc ttactaggaa tctgcctagt cattcaaatc ttaacaggct tatttctagc Sarcophilu ...c..g..t ...t...... .a......a. t........t c.c..c..ac ....c..... Dasyurus .........y c..t.....g .a......a. t......... c.c......c ....c..... Echymipera t.....c..a .......... .....t.... ...c...... c.c.....ac ....c..... Trichosuru ...c.....a c.......c. .....t..ac t..a...... c.t....... ....ct.... Phalanger .........a c..t....tt ........ac a..c...... .........c .....t.... Philander t.....t..a c.t....... .a......a. t......... c.c......c .....t.... Bos t..c..t... c.c..g.... ........a. .c.a...... c.c......c ....c..... aatacattac acatcagaca catcaactgc cttctcctca gtagcacata tctgtc ......c... ..c..t.... ...tc..c.. ...t.....c .....c..c. .t.... ......c... ..t....... ..ctt..c.. t........c .....c..c. .t..c. c......... ..g....... .cct...a.. t.....a..c ..g..t..c. .t..c. ...g..c... ..cg.t..t. ..g....a.. t.....a... .....c..c. ...... ......c... ..tc.c.... .......a.. t..t..a... a.c..c..c. ...c.. t........t .......... ..ct...c.. a..t..a... .....c.... ....c. ......c... .....c.... ..a....a.. a........t ..ta.c.... ....c. Part of the mtDNA cytochrome b gene. Thomas, R. H., W. Schaffner, A. C. Wilson, and S. Pbo. 1989. DNA phylogeny of the extinct marsupial wolf. Nature 340:465-467. This file is part of the TREE-PUZZLE distribution. ($Id$) tree-puzzle-5.2/data/marswolf.trees0000644000076400001440000002176007642374515013161 (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); tree-puzzle-5.2/data/globin.trees0000644000076400001440000000052007642045467012571 (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,GLB5_PETMA),LGB2_LUPLU)))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),(MYG_PHYCA,(GLB5_PETMA,LGB2_LUPLU))))); (HBB_HUMAN,(HBB_HORSE,((HBA_HUMAN,HBA_HORSE),((MYG_PHYCA,LGB2_LUPLU),GLB5_PETMA)))); (HBB_HUMAN,((MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU),(HBA_HUMAN,HBA_HORSE)),HBB_HORSE); tree-puzzle-5.2/data/marswolf.ctrees0000644000076400001440000000056007642374413013314 (Thylacinus,((((Sarcophilu,Dasyurus),Echymipera),(Philander,Bos)),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),(Echymipera,(Philander,Bos))),(Trichosuru,Phalanger))); (Thylacinus,((((Sarcophilu,Dasyurus),(Philander,Bos)),Echymipera),(Trichosuru,Phalanger))); (Thylacinus,(((Sarcophilu,Dasyurus),((Echymipera,Philander),Bos)),(Trichosuru,Phalanger))); tree-puzzle-5.2/depcomp0000755000076400001440000003033507470534440010717 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'` tmpdepfile1="$base.o.d" tmpdepfile2="$base.d" if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 tree-puzzle-5.2/aclocal.m40000644000076400001440000007344210075305500011174 # aclocal.m4 generated automatically by aclocal 1.6.1 -*- Autoconf -*- # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... AC_PREREQ([2.52]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_][CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_][CC], defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_][CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_][CXX], defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # Copyright 2002 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.6.1])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # serial 4 -*- Autoconf -*- # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'] [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_$1_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null AC_SUBST([DEPDIR]) ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST(am__include) AC_SUBST(am__quote) AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional \"$1\" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_PREREQ([2.52]) # serial 6 # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. We must strip everything past the first ":", # and everything past the last "/". # _AM_DIRNAME(PATH) # ----------------- # Like AS_DIRNAME, only do it during macro expansion AC_DEFUN([_AM_DIRNAME], [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, m4_if(regexp([$1], [^/.*]), -1, [.], patsubst([$1], [^\(/\).*], [\1])), patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl ])# _AM_DIRNAME # The stamp files are numbered to have different names. # We could number them on a directory basis, but that's additional # complications, let's have a unique counter. m4_define([_AM_STAMP_Count], [0]) # _AM_STAMP(HEADER) # ----------------- # The name of the stamp file for HEADER. AC_DEFUN([_AM_STAMP], [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl AS_ESCAPE(_AM_DIRNAME(patsubst([$1], [:.*])))/stamp-h[]_AM_STAMP_Count]) # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS) # ------------------------------------------------------------ # We used to try to get a real timestamp in stamp-h. But the fear is that # that will cause unnecessary cvs conflicts. AC_DEFUN([_AM_CONFIG_HEADER], [# Add the stamp file to the list of files AC keeps track of, # along with our hook. AC_CONFIG_HEADERS([$1], [# update the timestamp echo 'timestamp for $1' >"_AM_STAMP([$1])" $2], [$3]) ])# _AM_CONFIG_HEADER # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS) # -------------------------------------------------------------- AC_DEFUN([AM_CONFIG_HEADER], [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])]) ])# AM_CONFIG_HEADER tree-puzzle-5.2/tests/0000777000076400001440000000000010075312141010547 5tree-puzzle-5.2/tests/check-qp-jtt-rhet-clock-prot0000644000076400001440000002674210073365741015742 TREE-PUZZLE Input file name: qp-jtt-rhet-clock-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: JTT (Jones et al. 1992) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17887 1.04805 1.08480 2.52050 2.10945 3.26098 HBB_HORSE 0.17887 0.00000 1.09690 1.10752 2.49215 2.12870 3.34229 HBA_HUMAN 1.04805 1.09690 0.00000 0.12538 2.35997 1.45565 3.24727 HBA_HORSE 1.08480 1.10752 0.12538 0.00000 2.43814 1.57611 3.14845 MYG_PHYCA 2.52050 2.49215 2.35997 2.43814 0.00000 2.54103 3.42222 GLB5_PETMA 2.10945 2.12870 1.45565 1.57611 2.54103 0.00000 2.84131 LGB2_LUPLU 3.26098 3.34229 3.24727 3.14845 3.42222 2.84131 0.00000 Average distance (over all possible pairs of sequences): 2.07265 minimum : 0.12538, maximum : 3.42222 variance : 1.03523, std.dev. : 1.01746 RATE HETEROGENEITY Model of rate heterogeneity: Gamma distributed rates Gamma distribution parameter alpha (estimated from data set): 2.85 (S.E. 1.58) Number of Gamma rate categories: 8 Rates and their respective probabilities used in the likelihood function: Category Relative rate Probability 1 0.2882 0.1250 2 0.4879 0.1250 3 0.6513 0.1250 4 0.8135 0.1250 5 0.9910 0.1250 6 1.2042 0.1250 7 1.4978 0.1250 8 2.0662 0.1250 Categories 1-8 approximate a continous Gamma-distribution with expectation 1 and variance 0.35. Combination of categories that contributes the most to the likelihood (computation done without clock assumption assuming quartet-puzzling tree): 8 1 1 8 3 2 6 4 8 1 8 2 4 1 8 4 1 8 8 8 6 6 1 8 3 3 1 4 1 6 2 8 5 8 1 8 1 4 4 7 1 8 8 1 4 2 1 6 6 1 4 4 2 2 8 1 2 7 3 1 8 8 2 5 8 8 2 4 8 4 8 3 7 6 8 8 7 1 4 8 1 1 7 8 1 2 8 1 7 6 1 1 8 1 1 6 4 2 5 7 4 1 6 8 1 2 4 8 7 4 1 5 8 6 2 8 6 6 8 3 6 6 7 2 6 4 3 1 QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBB_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HUMAN 19 [ 95.00%] 1 [ 5.00%] 0 [ 0.00%] 20 HBA_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 MYG_PHYCA 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 GLB5_PETMA 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 LGB2_LUPLU 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 -------------------------------------------------------------------------- #quartets : 31 [ 88.57%] 1 [ 2.86%] 3 [ 8.57%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 31 (= 88.6%) Partly resolved quartets: 1 (= 2.9%) Unresolved quartets: 3 (= 8.6%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---MYG_PHYCA : :100:---GLB5_PETMA : : :100: :---LGB2_LUPLU : : : : :---HBA_HUMAN : :100: : :---HBA_HORSE : :-----------HBB_HORSE : :-----------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)100,(HBA_HUMAN, HBA_HORSE)100)100,HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) ****... : 1000 **..... : 1000 **..*** : 1000 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 393 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****.*. : 380 ****..* : 227 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :--------------5 MYG_PHYCA :-----8 : :-------6 GLB5_PETMA : : : :-------------------7 LGB2_LUPLU :------10 : : :-3 HBA_HUMAN : :---9 : :-4 HBA_HORSE : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04933 0.03409 8 0.50700 0.17281 HBB_HORSE 2 0.12953 0.04093 9 0.23403 0.10586 HBA_HUMAN 3 0.01995 0.02303 10 0.74732 0.14235 HBA_HORSE 4 0.10548 0.03367 MYG_PHYCA 5 1.68057 0.30228 GLB5_PETMA 6 0.81182 0.18641 12 iterations until convergence LGB2_LUPLU 7 2.33484 0.42478 log L: -1701.69 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04933,((MYG_PHYCA:1.68057,GLB5_PETMA:0.81182,LGB2_LUPLU:2.33484) 100:0.50700,(HBA_HUMAN:0.01995,HBA_HORSE:0.10548)100:0.23403)100:0.74732, HBB_HORSE:0.12953); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF CONSENSUS TREE (WITH CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. Root located at branch: 7 "LGB2_LUPLU" (automatic search) If the automatic search misplaces the root please rerun the analysis (rename "outtree" to "intree") and select location of root manually! :----------5 MYG_PHYCA :------8 : :----------6 GLB5_PETMA : : : :------------------7 LGB2_LUPLU :----10 : : :-3 HBA_HUMAN : :------9 : :-4 HBA_HORSE : :-2 HBB_HORSE : :-1 HBB_HUMAN Tree drawn as unrooted tree for better comparison with non-clock tree! branch length nc/c branch length nc/c (= non-clock/clock) HBB_HUMAN 1 0.08775 0.562 8 0.58020 0.874 HBB_HORSE 2 0.08775 1.476 9 0.51495 0.454 HBA_HUMAN 3 0.06493 0.307 10 0.49213 1.519 HBA_HORSE 4 0.06493 1.625 MYG_PHYCA 5 1.16008 1.449 GLB5_PETMA 6 1.16008 0.700 7 iterations until convergence LGB2_LUPLU 7 2.28806 1.020 log L: -1708.27 height S.E. of node common to branches 0.06493 0.01761 9 3 4 0.08775 0.02041 10 2 1 0.57988 0.07414 8 9 10 1.16008 0.11361 7 8 5 6 1.72407 0.21630 of root at branch 7 Rooted consensus tree with clocklike maximum likelihood branch lengths (in CLUSTAL W notation): (LGB2_LUPLU:1.72407,(((HBA_HUMAN:0.06493,HBA_HORSE:0.06493)100:0.51495 ,(HBB_HORSE:0.08775,HBB_HUMAN:0.08775):0.49213):0.58020,MYG_PHYCA:1.16008, GLB5_PETMA:1.16008):0.56399); MOLECULAR CLOCK LIKELIHOOD RATIO TEST log L without clock: -1701.69 (independent branch parameters: 10) log L with clock: -1708.27 (independent branch parameters: 5) Likelihood ratio test statistic delta: 13.15 Degress of freedom of chi-square distribution: 5 Critical significance level: 2.20% The simpler (clocklike) tree is rejected on a significance level of 5%. The log-likelihood of the more complex (no clock) tree is significantly increased. Please take care that the correct root is used! TIME STAMP tree-puzzle-5.2/tests/template-test0000755000076400001440000001622410073365600013214 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-tn-nucl0000644000076400001440000002253710073365717013507 TREE-PUZZLE Input file name: qp-tn-nucl.nucl Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 8 sequences with 116 nucleotide sites Number of constant sites: 66 (= 56.9% of all sites) Number of site patterns: 54 Number of constant site patterns: 4 (= 7.4% of all site patterns) SUBSTITUTION PROCESS Model of substitution: TN (Tamura-Nei 1993) Transition/transversion parameter (estimated from data set): 1.24 (S.E. 0.61) Y/R transition parameter (estimated from data set): 2.27 (S.E. 0.65) Rate matrix R (parameters restricted to selected model): A-C rate: 1.00000 A-G rate: 1.52641 A-T rate: 1.00000 C-G rate: 1.00000 C-T rate: 3.42338 G-T rate: 1.00000 Nucleotide frequencies (estimated from data set): pi(A) = 26.6% pi(C) = 30.6% pi(G) = 12.0% pi(T) = 30.7% Expected transition/transversion ratio: 1.57 Expected pyrimidine transition/purine transition ratio: 6.69 AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Thylacinus 0 0 0 0.00% Sarcophilu 0 0 0 0.00% Dasyurus 0 1 1 0.86% Echymipera 0 0 0 0.00% Trichosuru 0 0 0 0.00% Phalanger 0 0 0 0.00% Philander 0 0 0 0.00% Bos 0 0 0 0.00% ------------------------------------------------------- Sum 0 1 1 0.11% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 116 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Thylacinus passed 90.89% Sarcophilu passed 93.32% Dasyurus passed 98.01% Echymipera passed 92.83% Trichosuru passed 90.41% Phalanger passed 86.09% Philander passed 66.19% Bos passed 60.02% The chi-square tests compares the nucleotide composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 8 Thylacinus 0.00000 0.25968 0.22378 0.25026 0.26619 0.25302 0.22610 0.24162 Sarcophilu 0.25968 0.00000 0.13240 0.27376 0.28965 0.33121 0.26282 0.30169 Dasyurus 0.22378 0.13240 0.00000 0.20328 0.25274 0.25432 0.17972 0.24235 Echymipera 0.25026 0.27376 0.20328 0.00000 0.30289 0.34430 0.23479 0.27773 Trichosuru 0.26619 0.28965 0.25274 0.30289 0.00000 0.21414 0.29157 0.27782 Phalanger 0.25302 0.33121 0.25432 0.34430 0.21414 0.00000 0.29425 0.33582 Philander 0.22610 0.26282 0.17972 0.23479 0.29157 0.29425 0.00000 0.22749 Bos 0.24162 0.30169 0.24235 0.27773 0.27782 0.33582 0.22749 0.00000 Average distance (over all possible pairs of sequences): 0.25876 minimum : 0.13240, maximum : 0.34430 variance : 0.00217, std.dev. : 0.04653 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Thylacinus 21 [ 60.00%] 4 [ 11.43%] 10 [ 28.57%] 35 Sarcophilu 26 [ 74.29%] 1 [ 2.86%] 8 [ 22.86%] 35 Dasyurus 27 [ 77.14%] 2 [ 5.71%] 6 [ 17.14%] 35 Echymipera 19 [ 54.29%] 3 [ 8.57%] 13 [ 37.14%] 35 Trichosuru 25 [ 71.43%] 4 [ 11.43%] 6 [ 17.14%] 35 Phalanger 28 [ 80.00%] 1 [ 2.86%] 6 [ 17.14%] 35 Philander 23 [ 65.71%] 5 [ 14.29%] 7 [ 20.00%] 35 Bos 19 [ 54.29%] 4 [ 11.43%] 12 [ 34.29%] 35 -------------------------------------------------------------------------- #quartets : 47 [ 67.14%] 6 [ 8.57%] 17 [ 24.29%] 70 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 35 quartets out of 70 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 70 Fully resolved quartets: 47 (= 67.1%) Partly resolved quartets: 6 (= 8.6%) Unresolved quartets: 17 (= 24.3%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---Trichosuru :-----94: : :---Phalanger : : :---Sarcophilu : :-98: : : :---Dasyurus : : :-63: :---Philander : :-67: : : :---Bos : : : :-------Echymipera : :-----------Thylacinus Quartet puzzling tree (in CLUSTAL W notation): (Thylacinus,(Trichosuru,Phalanger)94,((Sarcophilu,Dasyurus)98, (Philander,Bos)67,Echymipera)63); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..***** : 979 ****..** : 935 ******.. : 666 *...**.. : 629 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *...**** : 422 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ***.**.. : 271 *..***.. : 132 *...**.* : 122 ***.**.* : 112 *..*..** : 94 *.....** : 88 ****.... : 83 ****..*. : 79 *..*.... : 65 *....*.. : 56 *..***.* : 49 ***.***. : 40 ***..... : 36 **..**** : 21 *..*..*. : 21 *.....*. : 20 *......* : 19 *...***. : 17 ***...** : 13 ****.**. : 7 (9 other less frequent bipartitions not shown) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :---------5 Trichosuru :------9 : :----------6 Phalanger : : :----------2 Sarcophilu : :-------10 : : :-3 Dasyurus :-----12 : : :-------7 Philander : :----11 : : :-----------8 Bos : : : :------------4 Echymipera : :---------1 Thylacinus branch length S.E. branch length S.E. Thylacinus 1 0.11472 0.03957 9 0.05924 0.03453 Sarcophilu 2 0.12889 0.03726 10 0.08141 0.03441 Dasyurus 3 0.00946 0.01286 11 0.04411 0.02610 Echymipera 4 0.14312 0.04216 12 0.05429 0.03071 Trichosuru 5 0.10849 0.03850 Phalanger 6 0.12332 0.04128 Philander 7 0.09008 0.03478 7 iterations until convergence Bos 8 0.13724 0.04194 log L: -600.80 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.11472,(Trichosuru:0.10849,Phalanger:0.12332)94:0.05924, ((Sarcophilu:0.12889,Dasyurus:0.00946)98:0.08141,(Philander:0.09008, Bos:0.13724)67:0.04411,Echymipera:0.14312)63:0.05429); TIME STAMP tree-puzzle-5.2/tests/check-qp-pure-nucl0000644000076400001440000002244510073365717014037 TREE-PUZZLE Input file name: qp-pure-nucl.nucl Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 8 sequences with 116 nucleotide sites Number of constant sites: 66 (= 56.9% of all sites) Number of site patterns: 54 Number of constant site patterns: 4 (= 7.4% of all site patterns) SUBSTITUTION PROCESS Model of substitution: HKY (Hasegawa et al. 1985) Transition/transversion parameter (estimated from data set): 1.51 (S.E. 0.28) Rate matrix R (parameters restricted to selected model): A-C rate: 1.00000 A-G rate: 2.98614 A-T rate: 1.00000 C-G rate: 1.00000 C-T rate: 2.98614 G-T rate: 1.00000 Nucleotide frequencies (estimated from data set): pi(A) = 26.6% pi(C) = 30.6% pi(G) = 12.0% pi(T) = 30.7% Expected transition/transversion ratio: 1.60 Expected pyrimidine transition/purine transition ratio: 2.95 AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Thylacinus 0 0 0 0.00% Sarcophilu 0 0 0 0.00% Dasyurus 0 1 1 0.86% Echymipera 0 0 0 0.00% Trichosuru 0 0 0 0.00% Phalanger 0 0 0 0.00% Philander 0 0 0 0.00% Bos 0 0 0 0.00% ------------------------------------------------------- Sum 0 1 1 0.11% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 116 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Thylacinus passed 90.89% Sarcophilu passed 93.32% Dasyurus passed 98.01% Echymipera passed 92.83% Trichosuru passed 90.41% Phalanger passed 86.09% Philander passed 66.19% Bos passed 60.02% The chi-square tests compares the nucleotide composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 8 Thylacinus 0.00000 0.25562 0.22032 0.24509 0.26007 0.24938 0.22246 0.23734 Sarcophilu 0.25562 0.00000 0.13169 0.26969 0.28414 0.32680 0.26008 0.29786 Dasyurus 0.22032 0.13169 0.00000 0.20032 0.24821 0.25234 0.17801 0.23883 Echymipera 0.24509 0.26969 0.20032 0.00000 0.29531 0.33871 0.23041 0.27215 Trichosuru 0.26007 0.28414 0.24821 0.29531 0.00000 0.21136 0.28562 0.27148 Phalanger 0.24938 0.32680 0.25234 0.33871 0.21136 0.00000 0.29036 0.33042 Philander 0.22246 0.26008 0.17801 0.23041 0.28562 0.29036 0.00000 0.22452 Bos 0.23734 0.29786 0.23883 0.27215 0.27148 0.33042 0.22452 0.00000 Average distance (over all possible pairs of sequences): 0.25459 minimum : 0.13169, maximum : 0.33871 variance : 0.00207, std.dev. : 0.04544 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Thylacinus 22 [ 62.86%] 4 [ 11.43%] 9 [ 25.71%] 35 Sarcophilu 27 [ 77.14%] 1 [ 2.86%] 7 [ 20.00%] 35 Dasyurus 27 [ 77.14%] 4 [ 11.43%] 4 [ 11.43%] 35 Echymipera 20 [ 57.14%] 4 [ 11.43%] 11 [ 31.43%] 35 Trichosuru 27 [ 77.14%] 2 [ 5.71%] 6 [ 17.14%] 35 Phalanger 28 [ 80.00%] 3 [ 8.57%] 4 [ 11.43%] 35 Philander 25 [ 71.43%] 6 [ 17.14%] 4 [ 11.43%] 35 Bos 20 [ 57.14%] 4 [ 11.43%] 11 [ 31.43%] 35 -------------------------------------------------------------------------- #quartets : 49 [ 70.00%] 7 [ 10.00%] 14 [ 20.00%] 70 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 35 quartets out of 70 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 70 Fully resolved quartets: 49 (= 70.0%) Partly resolved quartets: 7 (= 10.0%) Unresolved quartets: 14 (= 20.0%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---Trichosuru :-----97: : :---Phalanger : : :---Sarcophilu : :-98: : : :---Dasyurus : : :-71: :---Philander : :-65: : : :---Bos : : : :-------Echymipera : :-----------Thylacinus Quartet puzzling tree (in CLUSTAL W notation): (Thylacinus,(Trichosuru,Phalanger)97,((Sarcophilu,Dasyurus)98, (Philander,Bos)65,Echymipera)71); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..***** : 981 ****..** : 971 *...**.. : 713 ******.. : 649 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *...**** : 426 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ***.**.. : 347 ***.**.* : 150 *...**.* : 131 *..***.. : 87 *..*..** : 81 *.....** : 72 ****..*. : 55 ***.***. : 37 ****.... : 36 *..***.* : 36 ***..... : 31 *.....*. : 28 *...***. : 27 *......* : 27 *....*.. : 26 *..*.... : 21 **..**** : 16 ***...** : 14 *..*..*. : 13 *..****. : 12 (6 other less frequent bipartitions not shown) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :---------5 Trichosuru :------9 : :----------6 Phalanger : : :-----------2 Sarcophilu : :-------10 : : :-3 Dasyurus :-----12 : : :--------7 Philander : :----11 : : :-----------8 Bos : : : :------------4 Echymipera : :---------1 Thylacinus branch length S.E. branch length S.E. Thylacinus 1 0.11024 0.03812 9 0.05953 0.03382 Sarcophilu 2 0.13180 0.03734 10 0.08585 0.03452 Dasyurus 3 0.00572 0.01273 11 0.04220 0.02513 Echymipera 4 0.13997 0.04108 12 0.05457 0.02998 Trichosuru 5 0.10654 0.03770 Phalanger 6 0.12258 0.04064 Philander 7 0.08995 0.03428 8 iterations until convergence Bos 8 0.13479 0.04095 log L: -603.37 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.11024,(Trichosuru:0.10654,Phalanger:0.12258)97:0.05953, ((Sarcophilu:0.13180,Dasyurus:0.00572)98:0.08585,(Philander:0.08995, Bos:0.13479)65:0.04220,Echymipera:0.13997)71:0.05457); TIME STAMP tree-puzzle-5.2/tests/check-qp-pure-prot0000644000076400001440000002077310073365722014060 TREE-PUZZLE Input file name: qp-pure-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: Dayhoff (Dayhoff et al. 1978) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17425 0.96068 0.99267 2.12932 1.77231 2.78644 HBB_HORSE 0.17425 0.00000 1.01062 1.02118 2.09456 1.78465 2.86187 HBA_HUMAN 0.96068 1.01062 0.00000 0.12147 1.93540 1.30123 2.54730 HBA_HORSE 0.99267 1.02118 0.12147 0.00000 2.00515 1.39193 2.51172 MYG_PHYCA 2.12932 2.09456 1.93540 2.00515 0.00000 2.12347 2.79386 GLB5_PETMA 1.77231 1.78465 1.30123 1.39193 2.12347 0.00000 2.18272 LGB2_LUPLU 2.78644 2.86187 2.54730 2.51172 2.79386 2.18272 0.00000 Average distance (over all possible pairs of sequences): 1.73823 minimum : 0.12147, maximum : 2.86187 variance : 0.65214, std.dev. : 0.80755 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBB_HORSE 20 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 20 HBA_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 MYG_PHYCA 17 [ 85.00%] 0 [ 0.00%] 3 [ 15.00%] 20 GLB5_PETMA 17 [ 85.00%] 0 [ 0.00%] 3 [ 15.00%] 20 LGB2_LUPLU 17 [ 85.00%] 0 [ 0.00%] 3 [ 15.00%] 20 -------------------------------------------------------------------------- #quartets : 32 [ 91.43%] 0 [ 0.00%] 3 [ 8.57%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 32 (= 91.4%) Partly resolved quartets: 0 (= 0.0%) Unresolved quartets: 3 (= 8.6%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is completely resolved. :---HBA_HUMAN :----100: : :---HBA_HORSE :100: : : :---GLB5_PETMA : : :-54: : :100: :---LGB2_LUPLU : : : :-------MYG_PHYCA : :---------------HBB_HORSE : :---------------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((HBA_HUMAN,HBA_HORSE)100,((GLB5_PETMA,LGB2_LUPLU)54, MYG_PHYCA)100)100,HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) **..... : 1000 **..*** : 1000 ****... : 1000 *****.. : 544 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) None (No congruent split not included) Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****.*. : 234 ****..* : 222 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-3 HBA_HUMAN :----8 : :-4 HBA_HORSE :------11 : : :------6 GLB5_PETMA : : :---9 : : : :----------------7 LGB2_LUPLU : :----10 : :-------------5 MYG_PHYCA : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04915 0.03158 8 0.28345 0.08777 HBB_HORSE 2 0.12603 0.03871 9 0.18154 0.13086 HBA_HUMAN 3 0.02555 0.02185 10 0.34694 0.12552 HBA_HORSE 4 0.09542 0.03153 11 0.60239 0.11261 MYG_PHYCA 5 1.33166 0.21117 GLB5_PETMA 6 0.57466 0.13843 10 iterations until convergence LGB2_LUPLU 7 1.71333 0.27645 log L: -1699.00 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04915,((HBA_HUMAN:0.02555,HBA_HORSE:0.09542)100:0.28345, ((GLB5_PETMA:0.57466,LGB2_LUPLU:1.71333)54:0.18154,MYG_PHYCA:1.33166) 100:0.34694)100:0.60239,HBB_HORSE:0.12603); TIME STAMP tree-puzzle-5.2/tests/build-puzzle0000755000076400001440000000002307643056463013055 #! /bin/sh exit 77 tree-puzzle-5.2/tests/build-remark0000755000076400001440000000233710071267241013002 #! /bin/sh echo echo "***" echo "*** !!! Important remark !!!" echo "***" echo "*** Please note that only the output file *.puzzle is checked" echo "*** for identity. The overall precision reached in the program" echo "*** is heavily dependent on the compiler as well as the optimization" echo "*** level (-O) used to compile the executable." echo "*** Hence, even if tests are marked as failed this might just be" echo "*** due to differences in less significant digits caused by rounding" echo "*** errors from less acurate computations for the sake of faster" echo "*** running times. (If you want to be sure about this please refer" echo "*** to your compiler's manual!)" echo "***" echo "*** Please check the output file differences which are printed during the tests." echo "*** The template files which the results are checked against have been" echo "*** generated with TREE-PUZZLE 5.2 compiled with GCC version 3.3-20030226" echo "*** and default compiler flags '-g -O2' and using the SPRNG random number" echo "*** generator." echo "***" echo exit 77 tree-puzzle-5.2/tests/qp-pure-nucl.test0000755000076400001440000001622410073365716013742 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/qp-mtrev-prot.test0000755000076400001440000001622410073365716014147 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-mtrev-prot0000644000076400001440000002062610073365722014237 TREE-PUZZLE Input file name: qp-mtrev-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: mtREV24 (Adachi-Hasegawa 1996) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.19615 1.12348 1.16856 2.59690 2.15305 3.47989 HBB_HORSE 0.19615 0.00000 1.17857 1.20524 2.74793 2.18071 3.63316 HBA_HUMAN 1.12348 1.17857 0.00000 0.13144 2.41361 1.43785 3.06000 HBA_HORSE 1.16856 1.20524 0.13144 0.00000 2.44163 1.55582 3.05140 MYG_PHYCA 2.59690 2.74793 2.41361 2.44163 0.00000 2.62256 3.47779 GLB5_PETMA 2.15305 2.18071 1.43785 1.55582 2.62256 0.00000 2.97722 LGB2_LUPLU 3.47989 3.63316 3.06000 3.05140 3.47779 2.97722 0.00000 Average distance (over all possible pairs of sequences): 2.13490 minimum : 0.13144, maximum : 3.63316 variance : 1.07966, std.dev. : 1.03906 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 18 [ 90.00%] 1 [ 5.00%] 1 [ 5.00%] 20 HBB_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HUMAN 19 [ 95.00%] 1 [ 5.00%] 0 [ 0.00%] 20 HBA_HORSE 18 [ 90.00%] 2 [ 10.00%] 0 [ 0.00%] 20 MYG_PHYCA 15 [ 75.00%] 3 [ 15.00%] 2 [ 10.00%] 20 GLB5_PETMA 15 [ 75.00%] 3 [ 15.00%] 2 [ 10.00%] 20 LGB2_LUPLU 16 [ 80.00%] 2 [ 10.00%] 2 [ 10.00%] 20 -------------------------------------------------------------------------- #quartets : 30 [ 85.71%] 3 [ 8.57%] 2 [ 5.71%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 30 (= 85.7%) Partly resolved quartets: 3 (= 8.6%) Unresolved quartets: 2 (= 5.7%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---HBA_HUMAN :100: : :---HBA_HORSE :100: : : :---MYG_PHYCA : : : : :-97:---GLB5_PETMA : : : :---LGB2_LUPLU : :-----------HBB_HORSE : :-----------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((HBA_HUMAN,HBA_HORSE)100,(MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)97)100, HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) **..... : 1000 **..*** : 1000 ****... : 971 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****.*. : 462 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 436 ****..* : 100 **..*.* : 15 **..*.. : 14 **....* : 2 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-3 HBA_HUMAN :----8 : :-4 HBA_HORSE :------10 : : :------------5 MYG_PHYCA : :----9 : :-------6 GLB5_PETMA : : : :----------------7 LGB2_LUPLU : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.03472 0.03059 8 0.30126 0.09575 HBB_HORSE 2 0.16246 0.04359 9 0.34149 0.13763 HBA_HUMAN 3 0.04636 0.02527 10 0.70896 0.13056 HBA_HORSE 4 0.08355 0.03082 MYG_PHYCA 5 1.58550 0.26736 GLB5_PETMA 6 0.88663 0.17157 10 iterations until convergence LGB2_LUPLU 7 2.13259 0.35215 log L: -1736.55 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.03472,((HBA_HUMAN:0.04636,HBA_HORSE:0.08355)100:0.30126, (MYG_PHYCA:1.58550,GLB5_PETMA:0.88663,LGB2_LUPLU:2.13259)97:0.34149) 100:0.70896,HBB_HORSE:0.16246); TIME STAMP tree-puzzle-5.2/tests/qp-vt-prot.test0000755000076400001440000001622410073365716013443 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/qp-hky-clock-nucl.test0000755000076400001440000001622410073365716014653 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/generate-scripts.sh0000755000076400001440000000207210073365622014314 #! /bin/sh # # generate-scripts.sh # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # QPSCRIPTS="\ qp-pure-bin.test\ qp-pure-nucl.test\ qp-tn-nucl.test\ qp-hky-clock-nucl.test\ qp-hky-rhet-nucl.test\ qp-hky-rhet-clock-nucl.test\ qp-pure-prot.test\ qp-mtrev-prot.test\ qp-vt-prot.test\ qp-wag-prot.test\ qp-clock.test\ qp-jtt-prot.test\ qp-jtt-rhet-prot.test\ qp-jtt-rhet-clock-prot.test\ " LMSCRIPT="\ lm-pure-prot.test\ " UTSCRIPTS="\ ut-pure-prot.test\ " UCSCRIPTS="\ cons-pure-prot.test\ " SCRIPTS="$QPSCRIPTS $LMSCRIPT $UTSCRIPTS $UCSCRIPTS" for i in $SCRIPTS ; do echo " $i" cp template-test $i chmod a+rx $i done tree-puzzle-5.2/tests/lm-pure-prot.test0000755000076400001440000001622410073365716013755 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-hky-rhet-nucl0000644000076400001440000002415010073365720014604 TREE-PUZZLE Input file name: qp-hky-rhet-nucl.nucl Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 8 sequences with 116 nucleotide sites Number of constant sites: 66 (= 56.9% of all sites) Number of site patterns: 54 Number of constant site patterns: 4 (= 7.4% of all site patterns) SUBSTITUTION PROCESS Model of substitution: HKY (Hasegawa et al. 1985) Transition/transversion parameter (estimated from data set): 2.95 (S.E. 0.84) Rate matrix R (parameters restricted to selected model): A-C rate: 1.00000 A-G rate: 5.85063 A-T rate: 1.00000 C-G rate: 1.00000 C-T rate: 5.85063 G-T rate: 1.00000 Nucleotide frequencies (estimated from data set): pi(A) = 26.6% pi(C) = 30.6% pi(G) = 12.0% pi(T) = 30.7% Expected transition/transversion ratio: 3.14 Expected pyrimidine transition/purine transition ratio: 2.95 AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Thylacinus 0 0 0 0.00% Sarcophilu 0 0 0 0.00% Dasyurus 0 1 1 0.86% Echymipera 0 0 0 0.00% Trichosuru 0 0 0 0.00% Phalanger 0 0 0 0.00% Philander 0 0 0 0.00% Bos 0 0 0 0.00% ------------------------------------------------------- Sum 0 1 1 0.11% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 116 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Thylacinus passed 90.89% Sarcophilu passed 93.32% Dasyurus passed 98.01% Echymipera passed 92.83% Trichosuru passed 90.41% Phalanger passed 86.09% Philander passed 66.19% Bos passed 60.02% The chi-square tests compares the nucleotide composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 8 Thylacinus 0.00000 0.52940 0.37900 0.52236 0.58922 0.56150 0.43932 0.55291 Sarcophilu 0.52940 0.00000 0.17837 0.62532 0.69892 0.93602 0.62327 0.78596 Dasyurus 0.37900 0.17837 0.00000 0.39032 0.53431 0.60369 0.31919 0.56220 Echymipera 0.52236 0.62532 0.39032 0.00000 0.70229 0.94283 0.42016 0.66063 Trichosuru 0.58922 0.69892 0.53431 0.70229 0.00000 0.39416 0.70017 0.62697 Phalanger 0.56150 0.93602 0.60369 0.94283 0.39416 0.00000 0.78658 0.98921 Philander 0.43932 0.62327 0.31919 0.42016 0.70017 0.78658 0.00000 0.49264 Bos 0.55291 0.78596 0.56220 0.66063 0.62697 0.98921 0.49264 0.00000 Average distance (over all possible pairs of sequences): 0.59096 minimum : 0.17837, maximum : 0.98921 variance : 0.03581, std.dev. : 0.18924 RATE HETEROGENEITY Model of rate heterogeneity: Gamma distributed rates Gamma distribution parameter alpha (estimated from data set): 0.25 (S.E. 0.05) Number of Gamma rate categories: 8 Rates and their respective probabilities used in the likelihood function: Category Relative rate Probability 1 0.0000 0.1250 2 0.0031 0.1250 3 0.0262 0.1250 4 0.1071 0.1250 5 0.3140 0.1250 6 0.7768 0.1250 7 1.8180 0.1250 8 4.9547 0.1250 Categories 1-8 approximate a continous Gamma-distribution with expectation 1 and variance 3.94. Combination of categories that contributes the most to the likelihood (computation done without clock assumption assuming quartet-puzzling tree): 7 1 1 7 1 1 8 1 1 8 7 1 7 6 1 6 1 1 7 8 1 8 1 1 1 7 1 1 7 5 8 6 1 8 1 1 1 1 1 5 6 1 8 1 1 6 1 1 7 7 1 1 1 1 7 7 1 1 1 1 7 1 1 6 1 1 7 1 1 5 1 1 8 6 1 8 1 1 6 1 1 6 8 7 7 1 1 8 1 1 8 1 1 7 1 1 8 1 1 8 5 1 8 5 1 7 1 1 7 1 1 6 1 5 7 1 QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Thylacinus 15 [ 42.86%] 0 [ 0.00%] 20 [ 57.14%] 35 Sarcophilu 16 [ 45.71%] 1 [ 2.86%] 18 [ 51.43%] 35 Dasyurus 19 [ 54.29%] 3 [ 8.57%] 13 [ 37.14%] 35 Echymipera 12 [ 34.29%] 0 [ 0.00%] 23 [ 65.71%] 35 Trichosuru 16 [ 45.71%] 2 [ 5.71%] 17 [ 48.57%] 35 Phalanger 20 [ 57.14%] 2 [ 5.71%] 13 [ 37.14%] 35 Philander 13 [ 37.14%] 1 [ 2.86%] 21 [ 60.00%] 35 Bos 9 [ 25.71%] 3 [ 8.57%] 23 [ 65.71%] 35 -------------------------------------------------------------------------- #quartets : 30 [ 42.86%] 3 [ 4.29%] 37 [ 52.86%] 70 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 35 quartets out of 70 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 70 Fully resolved quartets: 30 (= 42.9%) Partly resolved quartets: 3 (= 4.3%) Unresolved quartets: 37 (= 52.9%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---Sarcophilu :-90: : :---Dasyurus : : :---Trichosuru :-87: : :---Phalanger : :-------Echymipera : :-------Philander : :-------Bos : :-------Thylacinus Quartet puzzling tree (in CLUSTAL W notation): (Thylacinus,(Sarcophilu,Dasyurus)90,(Trichosuru,Phalanger)87, Echymipera,Philander,Bos); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..***** : 904 ****..** : 872 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *...**.. : 377 ******.. : 357 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ***.**.* : 220 ***.**.. : 218 *...**** : 205 ***.***. : 145 *......* : 135 *..*..** : 129 *...**.* : 124 *.....** : 106 *..*.... : 102 *..***.* : 92 *..***.. : 91 ***..... : 86 *.....*. : 71 ***...** : 70 *..****. : 67 ****..*. : 67 *....*.. : 64 *...***. : 54 ****.... : 52 *..*...* : 47 (49 other less frequent bipartitions not shown) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :------2 Sarcophilu :-------9 : :-3 Dasyurus : : :-----5 Trichosuru :-------10 : :--------6 Phalanger : :--------4 Echymipera : :-------7 Philander : :-----------8 Bos : :-------1 Thylacinus branch length S.E. branch length S.E. Thylacinus 1 0.23363 0.10248 9 0.19927 0.09576 Sarcophilu 2 0.18905 0.06712 10 0.22291 0.13093 Dasyurus 3 0.00001 0.00200 Echymipera 4 0.27841 0.11691 Trichosuru 5 0.17822 0.10160 Phalanger 6 0.27519 0.12613 Philander 7 0.22533 0.10269 10 iterations until convergence Bos 8 0.38507 0.14566 log L: -570.33 WARNING --- at least one branch length is close to an internal boundary! Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.23363,(Sarcophilu:0.18905,Dasyurus:0.00001)90:0.19927, (Trichosuru:0.17822,Phalanger:0.27519)87:0.22291,Echymipera:0.27841, Philander:0.22533,Bos:0.38507); TIME STAMP tree-puzzle-5.2/tests/check-qp-vt-prot0000644000076400001440000002060310073365722013526 TREE-PUZZLE Input file name: qp-vt-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: VT (Mueller-Vingron 2000) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.16783 0.85204 0.87347 1.69056 1.50964 2.05575 HBB_HORSE 0.16783 0.00000 0.87363 0.87544 1.67978 1.52916 2.09374 HBA_HUMAN 0.85204 0.87363 0.00000 0.11958 1.58540 1.13053 2.11864 HBA_HORSE 0.87347 0.87544 0.11958 0.00000 1.64085 1.18694 2.01999 MYG_PHYCA 1.69056 1.67978 1.58540 1.64085 0.00000 1.63531 2.09093 GLB5_PETMA 1.50964 1.52916 1.13053 1.18694 1.63531 0.00000 1.84636 LGB2_LUPLU 2.05575 2.09374 2.11864 2.01999 2.09093 1.84636 0.00000 Average distance (over all possible pairs of sequences): 1.40836 minimum : 0.11958, maximum : 2.11864 variance : 0.36159, std.dev. : 0.60133 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBB_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 MYG_PHYCA 16 [ 80.00%] 0 [ 0.00%] 4 [ 20.00%] 20 GLB5_PETMA 16 [ 80.00%] 0 [ 0.00%] 4 [ 20.00%] 20 LGB2_LUPLU 16 [ 80.00%] 0 [ 0.00%] 4 [ 20.00%] 20 -------------------------------------------------------------------------- #quartets : 31 [ 88.57%] 0 [ 0.00%] 4 [ 11.43%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 31 (= 88.6%) Partly resolved quartets: 0 (= 0.0%) Unresolved quartets: 4 (= 11.4%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---MYG_PHYCA : :100:---GLB5_PETMA : : :100: :---LGB2_LUPLU : : : : :---HBA_HUMAN : :100: : :---HBA_HORSE : :-----------HBB_HORSE : :-----------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)100,(HBA_HUMAN, HBA_HORSE)100)100,HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) ****... : 1000 **..... : 1000 **..*** : 1000 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 347 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****..* : 331 ****.*. : 322 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-------------5 MYG_PHYCA :-------8 : :--------6 GLB5_PETMA : : : :------------------7 LGB2_LUPLU :-------10 : : :-3 HBA_HUMAN : :-----9 : :--4 HBA_HORSE : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04599 0.03062 8 0.42025 0.11481 HBB_HORSE 2 0.12231 0.03740 9 0.25241 0.08069 HBA_HUMAN 3 0.03150 0.02213 10 0.54296 0.10035 HBA_HORSE 4 0.08803 0.03011 MYG_PHYCA 5 1.02811 0.16334 GLB5_PETMA 6 0.60661 0.11823 12 iterations until convergence LGB2_LUPLU 7 1.38558 0.20879 log L: -1703.59 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04599,((MYG_PHYCA:1.02811,GLB5_PETMA:0.60661,LGB2_LUPLU:1.38558) 100:0.42025,(HBA_HUMAN:0.03150,HBA_HORSE:0.08803)100:0.25241)100:0.54296, HBB_HORSE:0.12231); TIME STAMP tree-puzzle-5.2/tests/check-qp-hky-rhet-clock-nucl0000644000076400001440000003027010073365721015676 TREE-PUZZLE Input file name: qp-hky-rhet-clock-nucl.nucl Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 8 sequences with 116 nucleotide sites Number of constant sites: 66 (= 56.9% of all sites) Number of site patterns: 54 Number of constant site patterns: 4 (= 7.4% of all site patterns) SUBSTITUTION PROCESS Model of substitution: HKY (Hasegawa et al. 1985) Transition/transversion parameter (estimated from data set): 2.95 (S.E. 0.84) Rate matrix R (parameters restricted to selected model): A-C rate: 1.00000 A-G rate: 5.85063 A-T rate: 1.00000 C-G rate: 1.00000 C-T rate: 5.85063 G-T rate: 1.00000 Nucleotide frequencies (estimated from data set): pi(A) = 26.6% pi(C) = 30.6% pi(G) = 12.0% pi(T) = 30.7% Expected transition/transversion ratio: 3.14 Expected pyrimidine transition/purine transition ratio: 2.95 AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Thylacinus 0 0 0 0.00% Sarcophilu 0 0 0 0.00% Dasyurus 0 1 1 0.86% Echymipera 0 0 0 0.00% Trichosuru 0 0 0 0.00% Phalanger 0 0 0 0.00% Philander 0 0 0 0.00% Bos 0 0 0 0.00% ------------------------------------------------------- Sum 0 1 1 0.11% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 116 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Thylacinus passed 90.89% Sarcophilu passed 93.32% Dasyurus passed 98.01% Echymipera passed 92.83% Trichosuru passed 90.41% Phalanger passed 86.09% Philander passed 66.19% Bos passed 60.02% The chi-square tests compares the nucleotide composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 8 Thylacinus 0.00000 0.52940 0.37900 0.52236 0.58922 0.56150 0.43932 0.55291 Sarcophilu 0.52940 0.00000 0.17837 0.62532 0.69892 0.93602 0.62327 0.78596 Dasyurus 0.37900 0.17837 0.00000 0.39032 0.53431 0.60369 0.31919 0.56220 Echymipera 0.52236 0.62532 0.39032 0.00000 0.70229 0.94283 0.42016 0.66063 Trichosuru 0.58922 0.69892 0.53431 0.70229 0.00000 0.39416 0.70017 0.62697 Phalanger 0.56150 0.93602 0.60369 0.94283 0.39416 0.00000 0.78658 0.98921 Philander 0.43932 0.62327 0.31919 0.42016 0.70017 0.78658 0.00000 0.49264 Bos 0.55291 0.78596 0.56220 0.66063 0.62697 0.98921 0.49264 0.00000 Average distance (over all possible pairs of sequences): 0.59096 minimum : 0.17837, maximum : 0.98921 variance : 0.03581, std.dev. : 0.18924 RATE HETEROGENEITY Model of rate heterogeneity: Gamma distributed rates Gamma distribution parameter alpha (estimated from data set): 0.25 (S.E. 0.05) Number of Gamma rate categories: 8 Rates and their respective probabilities used in the likelihood function: Category Relative rate Probability 1 0.0000 0.1250 2 0.0031 0.1250 3 0.0262 0.1250 4 0.1071 0.1250 5 0.3140 0.1250 6 0.7768 0.1250 7 1.8180 0.1250 8 4.9547 0.1250 Categories 1-8 approximate a continous Gamma-distribution with expectation 1 and variance 3.94. Combination of categories that contributes the most to the likelihood (computation done without clock assumption assuming quartet-puzzling tree): 7 1 1 7 1 1 8 1 1 8 7 1 7 6 1 6 1 1 7 8 1 8 1 1 1 7 1 1 7 5 8 6 1 8 1 1 1 1 1 5 6 1 8 1 1 6 1 1 7 7 1 1 1 1 7 7 1 1 1 1 7 1 1 6 1 1 7 1 1 5 1 1 8 6 1 8 1 1 6 1 1 6 8 7 7 1 1 8 1 1 8 1 1 7 1 1 8 1 1 8 5 1 8 5 1 7 1 1 7 1 1 6 1 5 7 1 QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Thylacinus 15 [ 42.86%] 0 [ 0.00%] 20 [ 57.14%] 35 Sarcophilu 16 [ 45.71%] 1 [ 2.86%] 18 [ 51.43%] 35 Dasyurus 19 [ 54.29%] 3 [ 8.57%] 13 [ 37.14%] 35 Echymipera 12 [ 34.29%] 0 [ 0.00%] 23 [ 65.71%] 35 Trichosuru 16 [ 45.71%] 2 [ 5.71%] 17 [ 48.57%] 35 Phalanger 20 [ 57.14%] 2 [ 5.71%] 13 [ 37.14%] 35 Philander 13 [ 37.14%] 1 [ 2.86%] 21 [ 60.00%] 35 Bos 9 [ 25.71%] 3 [ 8.57%] 23 [ 65.71%] 35 -------------------------------------------------------------------------- #quartets : 30 [ 42.86%] 3 [ 4.29%] 37 [ 52.86%] 70 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 35 quartets out of 70 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 70 Fully resolved quartets: 30 (= 42.9%) Partly resolved quartets: 3 (= 4.3%) Unresolved quartets: 37 (= 52.9%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---Sarcophilu :-90: : :---Dasyurus : : :---Trichosuru :-87: : :---Phalanger : :-------Echymipera : :-------Philander : :-------Bos : :-------Thylacinus Quartet puzzling tree (in CLUSTAL W notation): (Thylacinus,(Sarcophilu,Dasyurus)90,(Trichosuru,Phalanger)87, Echymipera,Philander,Bos); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..***** : 904 ****..** : 872 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *...**.. : 377 ******.. : 357 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ***.**.* : 220 ***.**.. : 218 *...**** : 205 ***.***. : 145 *......* : 135 *..*..** : 129 *...**.* : 124 *.....** : 106 *..*.... : 102 *..***.* : 92 *..***.. : 91 ***..... : 86 *.....*. : 71 ***...** : 70 *..****. : 67 ****..*. : 67 *....*.. : 64 *...***. : 54 ****.... : 52 *..*...* : 47 (49 other less frequent bipartitions not shown) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :------2 Sarcophilu :-------9 : :-3 Dasyurus : : :-----5 Trichosuru :-------10 : :--------6 Phalanger : :--------4 Echymipera : :-------7 Philander : :-----------8 Bos : :-------1 Thylacinus branch length S.E. branch length S.E. Thylacinus 1 0.23363 0.10248 9 0.19927 0.09576 Sarcophilu 2 0.18905 0.06712 10 0.22291 0.13093 Dasyurus 3 0.00001 0.00200 Echymipera 4 0.27841 0.11691 Trichosuru 5 0.17822 0.10160 Phalanger 6 0.27519 0.12613 Philander 7 0.22533 0.10269 10 iterations until convergence Bos 8 0.38507 0.14566 log L: -570.33 WARNING --- at least one branch length is close to an internal boundary! Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.23363,(Sarcophilu:0.18905,Dasyurus:0.00001)90:0.19927, (Trichosuru:0.17822,Phalanger:0.27519)87:0.22291,Echymipera:0.27841, Philander:0.22533,Bos:0.38507); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF CONSENSUS TREE (WITH CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. Root located at branch: 10 "internal branch" (automatic search) If the automatic search misplaces the root please rerun the analysis (rename "outtree" to "intree") and select location of root manually! :---2 Sarcophilu :-------9 : :---3 Dasyurus : : :-------5 Trichosuru :-------10 : :-------6 Phalanger : :---------4 Echymipera : :---------7 Philander : :---------8 Bos : :---------1 Thylacinus Tree drawn as unrooted tree for better comparison with non-clock tree! branch length nc/c branch length nc/c (= non-clock/clock) Thylacinus 1 0.29776 0.785 9 0.20356 0.979 Sarcophilu 2 0.09420 2.007 10 0.22846 0.976 Dasyurus 3 0.09420 0.000 Echymipera 4 0.29776 0.935 Trichosuru 5 0.23472 0.759 Phalanger 6 0.23472 1.172 Philander 7 0.29776 0.757 16 iterations until convergence Bos 8 0.29776 1.293 log L: -573.89 height S.E. of node common to branches 0.23472 0.07631 10 5 6 0.09420 0.03153 9 2 3 0.29776 0.05401 10 4 7 8 1 9 0.38047 0.07031 of root at branch 10 Rooted consensus tree with clocklike maximum likelihood branch lengths (in CLUSTAL W notation): ((Trichosuru:0.23472,Phalanger:0.23472)87:0.14575,(Echymipera:0.29776, Philander:0.29776,Bos:0.29776,Thylacinus:0.29776,(Sarcophilu:0.09420, Dasyurus:0.09420)90:0.20356):0.08271); MOLECULAR CLOCK LIKELIHOOD RATIO TEST log L without clock: -570.33 (independent branch parameters: 10) log L with clock: -573.89 (independent branch parameters: 4) Likelihood ratio test statistic delta: 7.12 Degress of freedom of chi-square distribution: 6 Critical significance level: 30.97% The simpler (clocklike) tree can not be rejected on a significance level of 5%. The log-likelihood of the more complex (no clock) tree is not significantly increased. Please take care that the correct root is used! TIME STAMP tree-puzzle-5.2/tests/check-ut-pure-prot0000644000076400001440000002332210073365742014063 TREE-PUZZLE Input file name: ut-pure-prot.prot User tree file name: ut-pure-prot.trees Type of analysis: user tree evaluation Parameter estimation: approximate (faster) Parameter estimation uses: 1st user tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: Dayhoff (Dayhoff et al. 1978) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17425 0.96068 0.99267 2.12932 1.77231 2.78644 HBB_HORSE 0.17425 0.00000 1.01062 1.02118 2.09456 1.78465 2.86187 HBA_HUMAN 0.96068 1.01062 0.00000 0.12147 1.93540 1.30123 2.54730 HBA_HORSE 0.99267 1.02118 0.12147 0.00000 2.00515 1.39193 2.51172 MYG_PHYCA 2.12932 2.09456 1.93540 2.00515 0.00000 2.12347 2.79386 GLB5_PETMA 1.77231 1.78465 1.30123 1.39193 2.12347 0.00000 2.18272 LGB2_LUPLU 2.78644 2.86187 2.54730 2.51172 2.79386 2.18272 0.00000 Average distance (over all possible pairs of sequences): 1.73823 minimum : 0.12147, maximum : 2.86187 variance : 0.65214, std.dev. : 0.80755 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate TREE SEARCH 4 tree topologies were specified by the user. MAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER DEFINED TREE # 1 (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :--2 HBB_HORSE : : :-3 HBA_HUMAN : :----8 : : :-4 HBA_HORSE :------11 : : :-------------5 MYG_PHYCA : : :--9 : : : :-------6 GLB5_PETMA : :----10 : :-----------------7 LGB2_LUPLU : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04834 0.03148 8 0.28039 0.08746 HBB_HORSE 2 0.12686 0.03876 9 0.00001 0.00141 HBA_HUMAN 3 0.02653 0.02208 10 0.40361 0.12824 HBA_HORSE 4 0.09440 0.03145 11 0.60481 0.11282 MYG_PHYCA 5 1.33106 0.21114 GLB5_PETMA 6 0.70107 0.14140 9 iterations until convergence LGB2_LUPLU 7 1.76830 0.28198 log L: -1699.50 WARNING --- at least one branch length is close to an internal boundary! Unrooted user defined tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04834,HBB_HORSE:0.12686,((HBA_HUMAN:0.02653,HBA_HORSE:0.09440) :0.28039,((MYG_PHYCA:1.33106,GLB5_PETMA:0.70107):0.00001,LGB2_LUPLU:1.76830) :0.40361):0.60481); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER DEFINED TREE # 2 (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :--2 HBB_HORSE : : :-3 HBA_HUMAN : :----8 : : :-4 HBA_HORSE :------11 : : :-------------5 MYG_PHYCA : :----10 : : :------6 GLB5_PETMA : :---9 : :----------------7 LGB2_LUPLU : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04915 0.03158 8 0.28347 0.08778 HBB_HORSE 2 0.12604 0.03871 9 0.18149 0.13088 HBA_HUMAN 3 0.02555 0.02185 10 0.34695 0.12552 HBA_HORSE 4 0.09541 0.03153 11 0.60238 0.11261 MYG_PHYCA 5 1.33157 0.21115 GLB5_PETMA 6 0.57473 0.13845 9 iterations until convergence LGB2_LUPLU 7 1.71340 0.27647 log L: -1699.00 Unrooted user defined tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04915,HBB_HORSE:0.12604,((HBA_HUMAN:0.02555,HBA_HORSE:0.09541) :0.28347,(MYG_PHYCA:1.33157,(GLB5_PETMA:0.57473,LGB2_LUPLU:1.71340) :0.18149):0.34695):0.60238); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER DEFINED TREE # 3 (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :--2 HBB_HORSE : : :-3 HBA_HUMAN : :----8 : : :-4 HBA_HORSE :------11 : : :------------5 MYG_PHYCA : : :---9 : : : :----------------7 LGB2_LUPLU : :----10 : :-------6 GLB5_PETMA : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04869 0.03153 8 0.27871 0.08717 HBB_HORSE 2 0.12653 0.03874 9 0.12334 0.15661 HBA_HUMAN 3 0.02634 0.02204 10 0.39110 0.12780 HBA_HORSE 4 0.09459 0.03147 11 0.60627 0.11286 MYG_PHYCA 5 1.22880 0.20960 GLB5_PETMA 6 0.69972 0.14141 11 iterations until convergence LGB2_LUPLU 7 1.68480 0.28106 log L: -1699.32 Unrooted user defined tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04869,HBB_HORSE:0.12653,((HBA_HUMAN:0.02634,HBA_HORSE:0.09459) :0.27871,((MYG_PHYCA:1.22880,LGB2_LUPLU:1.68480):0.12334,GLB5_PETMA:0.69972) :0.39110):0.60627); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF USER DEFINED TREE # 4 (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-------------5 MYG_PHYCA :-----8 : :-------6 GLB5_PETMA : : : :-----------------7 LGB2_LUPLU :------10 : : :-3 HBA_HUMAN : :----9 : :-4 HBA_HORSE : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04834 0.03148 8 0.40364 0.12824 HBB_HORSE 2 0.12685 0.03876 9 0.28040 0.08746 HBA_HUMAN 3 0.02653 0.02208 10 0.60481 0.11281 HBA_HORSE 4 0.09440 0.03145 MYG_PHYCA 5 1.33095 0.21112 GLB5_PETMA 6 0.70107 0.14140 10 iterations until convergence LGB2_LUPLU 7 1.76831 0.28198 log L: -1699.50 Unrooted user defined tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04834,((MYG_PHYCA:1.33095,GLB5_PETMA:0.70107,LGB2_LUPLU:1.76831) :0.40364,(HBA_HUMAN:0.02653,HBA_HORSE:0.09440):0.28040):0.60481,HBB_HORSE:0.12685); COMPARISON OF USER TREES (NO CLOCK) Tree log L difference S.E. p-1sKH p-SH c-ELW 2sKH ------------------------------------------------------------------------------- 1 -1699.50 0.49 1.0266 0.3020 + 0.4700 + 0.1881 + + 2 -1699.00 0.00 <---- best 1.0000 + 1.0000 + 0.3650 + best 3 -1699.32 0.32 1.3440 0.4030 + 0.4690 + 0.2588 + + 4 -1699.50 0.49 1.0267 0.3070 + 0.4700 + 0.1881 + + The columns show the results and p-values of the following tests: 1sKH - one sided KH test based on pairwise SH tests (Shimodaira-Hasegawa 2000, Goldman et al., 2001, Kishino-Hasegawa 1989) SH - Shimodaira-Hasegawa test (2000) ELW - Expected Likelihood Weight (Strimmer-Rambaut 2002) 2sKH - two sided Kishino-Hasegawa test (1989) Plus signs denote the confidence sets. Minus signs denote significant exclusion. All tests used 5% significance level. 1sKH, SH, and ELW performed 1000 resamplings using the RELL method. 1sKH and 2sKH are correct to the 2nd position after the the decimal point of the log-likelihoods. TIME STAMP tree-puzzle-5.2/tests/qp-pure-prot.test0000755000076400001440000001622410073365716013765 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/qp-tn-nucl.test0000755000076400001440000001622410073365716013410 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/Makefile.am0000644000076400001440000000442310073365642012536 # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # # Be sure to reexport important environment variables. TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ EXEEXT="$(EXEEXT)" PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" TESTFILES = \ qp-pure-bin.test\ qp-pure-nucl.test\ qp-tn-nucl.test\ qp-hky-clock-nucl.test\ qp-hky-rhet-nucl.test\ qp-hky-rhet-clock-nucl.test\ qp-pure-prot.test\ qp-mtrev-prot.test\ qp-vt-prot.test\ qp-wag-prot.test\ qp-clock.test\ qp-jtt-prot.test\ qp-jtt-rhet-prot.test\ qp-jtt-rhet-clock-prot.test\ lm-pure-prot.test\ ut-pure-prot.test\ cons-pure-prot.test TESTS =\ build-puzzle\ $(TESTFILES)\ build-remark EXTRA_DIST = generate-scripts.sh template-test build-puzzle build-remark \ $(TESTFILES)\ check-qp-pure-bin\ check-qp-pure-nucl\ check-qp-tn-nucl\ check-qp-hky-clock-nucl\ check-qp-hky-rhet-nucl\ check-qp-hky-rhet-clock-nucl\ check-qp-pure-prot\ check-qp-jtt-prot\ check-qp-mtrev-prot\ check-qp-vt-prot\ check-qp-wag-prot\ check-qp-clock\ check-qp-jtt-rhet-prot\ check-qp-jtt-rhet-clock-prot\ check-lm-pure-prot\ check-ut-pure-prot\ check-cons-pure-prot build-puzzle: $(top_builddir)/src/puzzle build-remark: $(top_builddir)/src/puzzle: cd $(top_builddir) && $(MAKE) all generate: VERSION="$(VERSION)"; export VERSION; \ if test -x generate-scripts.sh -a -f template-test; then \ echo "generating test scripts:"; \ ./generate-scripts.sh; \ fi; \ echo "generating check files:"; \ for testprog in $(TESTS); do \ if test -x ./$$testprog ; then \ ./$$testprog -g; \ fi; \ done clean: rm -f *.param rm -f *.nucl *.prot *.bin *.trees *.ctrees rm -f *.nucl.* *.prot.* *.bin.* *.trees.* *.ctrees.* tree-puzzle-5.2/tests/Makefile.in0000644000076400001440000002206010075305510012532 # Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MPICC = @MPICC@ MPICC0 = @MPICC0@ MPICC1 = @MPICC1@ MPICC2 = @MPICC2@ MPICC3 = @MPICC3@ MPICC4 = @MPICC4@ MPICC5 = @MPICC5@ MPICC6 = @MPICC6@ MPICFLAGS = @MPICFLAGS@ MPIDEFS = @MPIDEFS@ MPILIBS = @MPILIBS@ PACKAGE = @PACKAGE@ PPUZZLE = @PPUZZLE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ # Be sure to reexport important environment variables. TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ EXEEXT="$(EXEEXT)" PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" TESTFILES = \ qp-pure-bin.test\ qp-pure-nucl.test\ qp-tn-nucl.test\ qp-hky-clock-nucl.test\ qp-hky-rhet-nucl.test\ qp-hky-rhet-clock-nucl.test\ qp-pure-prot.test\ qp-mtrev-prot.test\ qp-vt-prot.test\ qp-wag-prot.test\ qp-clock.test\ qp-jtt-prot.test\ qp-jtt-rhet-prot.test\ qp-jtt-rhet-clock-prot.test\ lm-pure-prot.test\ ut-pure-prot.test\ cons-pure-prot.test TESTS = \ build-puzzle\ $(TESTFILES)\ build-remark EXTRA_DIST = generate-scripts.sh template-test build-puzzle build-remark \ $(TESTFILES)\ check-qp-pure-bin\ check-qp-pure-nucl\ check-qp-tn-nucl\ check-qp-hky-clock-nucl\ check-qp-hky-rhet-nucl\ check-qp-hky-rhet-clock-nucl\ check-qp-pure-prot\ check-qp-jtt-prot\ check-qp-mtrev-prot\ check-qp-vt-prot\ check-qp-wag-prot\ check-qp-clock\ check-qp-jtt-rhet-prot\ check-qp-jtt-rhet-clock-prot\ check-lm-pure-prot\ check-ut-pure-prot\ check-cons-pure-prot subdir = tests mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: tags: TAGS TAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic uninstall-am: uninstall-info-am .PHONY: all all-am check check-TESTS check-am clean clean-generic \ distclean distclean-generic distdir dvi dvi-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic uninstall uninstall-am uninstall-info-am build-puzzle: $(top_builddir)/src/puzzle build-remark: $(top_builddir)/src/puzzle: cd $(top_builddir) && $(MAKE) all generate: VERSION="$(VERSION)"; export VERSION; \ if test -x generate-scripts.sh -a -f template-test; then \ echo "generating test scripts:"; \ ./generate-scripts.sh; \ fi; \ echo "generating check files:"; \ for testprog in $(TESTS); do \ if test -x ./$$testprog ; then \ ./$$testprog -g; \ fi; \ done clean: rm -f *.param rm -f *.nucl *.prot *.bin *.trees *.ctrees rm -f *.nucl.* *.prot.* *.bin.* *.trees.* *.ctrees.* # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tree-puzzle-5.2/tests/check-qp-jtt-rhet-prot0000644000076400001440000002256610073365730014647 TREE-PUZZLE Input file name: qp-jtt-rhet-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: JTT (Jones et al. 1992) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17887 1.04805 1.08480 2.52050 2.10945 3.26098 HBB_HORSE 0.17887 0.00000 1.09690 1.10752 2.49215 2.12870 3.34229 HBA_HUMAN 1.04805 1.09690 0.00000 0.12538 2.35997 1.45565 3.24727 HBA_HORSE 1.08480 1.10752 0.12538 0.00000 2.43814 1.57611 3.14845 MYG_PHYCA 2.52050 2.49215 2.35997 2.43814 0.00000 2.54103 3.42222 GLB5_PETMA 2.10945 2.12870 1.45565 1.57611 2.54103 0.00000 2.84131 LGB2_LUPLU 3.26098 3.34229 3.24727 3.14845 3.42222 2.84131 0.00000 Average distance (over all possible pairs of sequences): 2.07265 minimum : 0.12538, maximum : 3.42222 variance : 1.03523, std.dev. : 1.01746 RATE HETEROGENEITY Model of rate heterogeneity: Gamma distributed rates Gamma distribution parameter alpha (estimated from data set): 2.85 (S.E. 1.58) Number of Gamma rate categories: 8 Rates and their respective probabilities used in the likelihood function: Category Relative rate Probability 1 0.2882 0.1250 2 0.4879 0.1250 3 0.6513 0.1250 4 0.8135 0.1250 5 0.9910 0.1250 6 1.2042 0.1250 7 1.4978 0.1250 8 2.0662 0.1250 Categories 1-8 approximate a continous Gamma-distribution with expectation 1 and variance 0.35. Combination of categories that contributes the most to the likelihood (computation done without clock assumption assuming quartet-puzzling tree): 8 1 1 8 3 2 6 4 8 1 8 2 4 1 8 4 1 8 8 8 6 6 1 8 3 3 1 4 1 6 2 8 5 8 1 8 1 4 4 7 1 8 8 1 4 2 1 6 6 1 4 4 2 2 8 1 2 7 3 1 8 8 2 5 8 8 2 4 8 4 8 3 7 6 8 8 7 1 4 8 1 1 7 8 1 2 8 1 7 6 1 1 8 1 1 6 4 2 5 7 4 1 6 8 1 2 4 8 7 4 1 5 8 6 2 8 6 6 8 3 6 6 7 2 6 4 3 1 QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBB_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HUMAN 19 [ 95.00%] 1 [ 5.00%] 0 [ 0.00%] 20 HBA_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 MYG_PHYCA 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 GLB5_PETMA 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 LGB2_LUPLU 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 -------------------------------------------------------------------------- #quartets : 31 [ 88.57%] 1 [ 2.86%] 3 [ 8.57%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 31 (= 88.6%) Partly resolved quartets: 1 (= 2.9%) Unresolved quartets: 3 (= 8.6%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---MYG_PHYCA : :100:---GLB5_PETMA : : :100: :---LGB2_LUPLU : : : : :---HBA_HUMAN : :100: : :---HBA_HORSE : :-----------HBB_HORSE : :-----------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)100,(HBA_HUMAN, HBA_HORSE)100)100,HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) ****... : 1000 **..... : 1000 **..*** : 1000 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 393 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****.*. : 380 ****..* : 227 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :--------------5 MYG_PHYCA :-----8 : :-------6 GLB5_PETMA : : : :-------------------7 LGB2_LUPLU :------10 : : :-3 HBA_HUMAN : :---9 : :-4 HBA_HORSE : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04933 0.03409 8 0.50700 0.17281 HBB_HORSE 2 0.12953 0.04093 9 0.23403 0.10586 HBA_HUMAN 3 0.01995 0.02303 10 0.74732 0.14235 HBA_HORSE 4 0.10548 0.03367 MYG_PHYCA 5 1.68057 0.30228 GLB5_PETMA 6 0.81182 0.18641 12 iterations until convergence LGB2_LUPLU 7 2.33484 0.42478 log L: -1701.69 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04933,((MYG_PHYCA:1.68057,GLB5_PETMA:0.81182,LGB2_LUPLU:2.33484) 100:0.50700,(HBA_HUMAN:0.01995,HBA_HORSE:0.10548)100:0.23403)100:0.74732, HBB_HORSE:0.12953); TIME STAMP tree-puzzle-5.2/tests/qp-jtt-rhet-clock-prot.test0000755000076400001440000001622410073365716015644 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/qp-hky-rhet-clock-nucl.test0000755000076400001440000001622410073365716015613 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/ut-pure-prot.test0000755000076400001440000001622410073365716013775 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-cons-pure-prot0000644000076400001440000001442110073365742014375 TREE-PUZZLE Input file name: cons-pure-prot.prot User tree file name: cons-pure-prot.ctrees Type of analysis: consensus construction Parameter estimation: approximate (faster) Parameter estimation uses: 1st user tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: Dayhoff (Dayhoff et al. 1978) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17425 0.96068 0.99267 2.12932 1.77231 2.78644 HBB_HORSE 0.17425 0.00000 1.01062 1.02118 2.09456 1.78465 2.86187 HBA_HUMAN 0.96068 1.01062 0.00000 0.12147 1.93540 1.30123 2.54730 HBA_HORSE 0.99267 1.02118 0.12147 0.00000 2.00515 1.39193 2.51172 MYG_PHYCA 2.12932 2.09456 1.93540 2.00515 0.00000 2.12347 2.79386 GLB5_PETMA 1.77231 1.78465 1.30123 1.39193 2.12347 0.00000 2.18272 LGB2_LUPLU 2.78644 2.86187 2.54730 2.51172 2.79386 2.18272 0.00000 Average distance (over all possible pairs of sequences): 1.73823 minimum : 0.12147, maximum : 2.86187 variance : 0.65214, std.dev. : 0.80755 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate TREE SEARCH 100 tree topologies were specified by the user. CONSENSUS TREE Support for the internal branches of the unrooted consensus tree topology is shown in percent. This consensus tree is not completely resolved! :---HBA_HUMAN :100: : :---HBA_HORSE :100: : : :---MYG_PHYCA : : : : :100:---GLB5_PETMA : : : :---LGB2_LUPLU : :-----------HBB_HORSE : :-----------HBB_HUMAN Consensus tree (in CLUSTAL W notation): (HBB_HUMAN,((HBA_HUMAN,HBA_HORSE)100,(MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)100)100, HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in the specified set of 100 usertrees tree topologies. Bipartitions included in the consensus tree: (bipartition with sequences in input order : number of times seen) **..*** : 100 ****... : 100 **..... : 100 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****..* : 40 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 37 ****.*. : 23 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-3 HBA_HUMAN :----8 : :-4 HBA_HORSE :------10 : : :-------------5 MYG_PHYCA : :-----9 : :-------6 GLB5_PETMA : : : :-----------------7 LGB2_LUPLU : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04834 0.03148 8 0.28040 0.08746 HBB_HORSE 2 0.12685 0.03876 9 0.40362 0.12823 HBA_HUMAN 3 0.02653 0.02208 10 0.60481 0.11281 HBA_HORSE 4 0.09440 0.03145 MYG_PHYCA 5 1.33099 0.21112 GLB5_PETMA 6 0.70102 0.14139 10 iterations until convergence LGB2_LUPLU 7 1.76831 0.28198 log L: -1699.50 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04834,((HBA_HUMAN:0.02653,HBA_HORSE:0.09440)100:0.28040, (MYG_PHYCA:1.33099,GLB5_PETMA:0.70102,LGB2_LUPLU:1.76831)100:0.40362) 100:0.60481,HBB_HORSE:0.12685); TIME STAMP tree-puzzle-5.2/tests/qp-hky-rhet-nucl.test0000755000076400001440000001622410073365716014522 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-pure-bin0000644000076400001440000001542510073365716013645 TREE-PUZZLE Input file name: qp-pure-bin.bin Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 5 sequences with 895 binary state sites Number of constant sites: 825 (= 92.2% of all sites) Number of site patterns: 16 Number of constant site patterns: 2 (= 12.5% of all site patterns) SUBSTITUTION PROCESS Model of substitution: Two-state model (Felsenstein 1981) Binary state frequencies (estimated from data set): pi(0) = 41.8% pi(1) = 58.2% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Gibbon 0 0 0 0.00% Human 0 0 0 0.00% Chimpanzee 0 0 0 0.00% Gorilla 0 0 0 0.00% Orangutan 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 895 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Gibbon passed 41.61% Human passed 73.47% Chimpanzee passed 68.43% Gorilla passed 94.60% Orangutan passed 100.00% The chi-square tests compares the binary state composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 5 Gibbon 0.00000 0.05300 0.05176 0.05295 0.06171 Human 0.05300 0.00000 0.00563 0.00903 0.04081 Chimpanzee 0.05176 0.00563 0.00000 0.01018 0.03960 Gorilla 0.05295 0.00903 0.01018 0.00000 0.03835 Orangutan 0.06171 0.04081 0.03960 0.03835 0.00000 Average distance (over all possible pairs of sequences): 0.03630 minimum : 0.00563, maximum : 0.06171 variance : 0.00043, std.dev. : 0.02066 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Gibbon 4 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 4 Human 4 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 4 Chimpanzee 4 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 4 Gorilla 4 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 4 Orangutan 4 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 4 -------------------------------------------------------------------------- #quartets : 5 [100.00%] 0 [ 0.00%] 0 [ 0.00%] 5 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 4 quartets out of 5 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 5 Fully resolved quartets: 5 (= 100.0%) Partly resolved quartets: 0 (= 0.0%) Unresolved quartets: 0 (= 0.0%) Quartet trees are based on exact maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is completely resolved. :---Human :100: :100: :---Chimpanzee : : : :-------Gorilla : :-----------Orangutan : :-----------Gibbon Quartet puzzling tree (in CLUSTAL W notation): (Gibbon,((Human,Chimpanzee)100,Gorilla)100,Orangutan); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..** : 1000 *...* : 1000 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) None (all bipartitions are included) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-2 Human :--6 : :-3 Chimpanzee :---7 : :-4 Gorilla : :---5 Orangutan : :----1 Gibbon branch length S.E. branch length S.E. Gibbon 1 0.03803 0.00691 6 0.00339 0.00199 Human 2 0.00240 0.00170 7 0.01106 0.00384 Chimpanzee 3 0.00323 0.00196 Gorilla 4 0.00353 0.00206 5 iterations until convergence Orangutan 5 0.02357 0.00543 log L: -968.78 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Gibbon:0.03803,((Human:0.00240,Chimpanzee:0.00323)100:0.00339,Gorilla:0.00353) 100:0.01106,Orangutan:0.02357); TIME STAMP tree-puzzle-5.2/tests/qp-jtt-rhet-prot.test0000755000076400001440000001622410073365716014553 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-clock0000644000076400001440000002702210073365723013211 TREE-PUZZLE Input file name: qp-clock.nucl Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 8 sequences with 116 nucleotide sites Number of constant sites: 66 (= 56.9% of all sites) Number of site patterns: 54 Number of constant site patterns: 4 (= 7.4% of all site patterns) SUBSTITUTION PROCESS Model of substitution: HKY (Hasegawa et al. 1985) Transition/transversion parameter (estimated from data set): 1.51 (S.E. 0.28) Rate matrix R (parameters restricted to selected model): A-C rate: 1.00000 A-G rate: 2.98614 A-T rate: 1.00000 C-G rate: 1.00000 C-T rate: 2.98614 G-T rate: 1.00000 Nucleotide frequencies (estimated from data set): pi(A) = 26.6% pi(C) = 30.6% pi(G) = 12.0% pi(T) = 30.7% Expected transition/transversion ratio: 1.60 Expected pyrimidine transition/purine transition ratio: 2.95 AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Thylacinus 0 0 0 0.00% Sarcophilu 0 0 0 0.00% Dasyurus 0 1 1 0.86% Echymipera 0 0 0 0.00% Trichosuru 0 0 0 0.00% Phalanger 0 0 0 0.00% Philander 0 0 0 0.00% Bos 0 0 0 0.00% ------------------------------------------------------- Sum 0 1 1 0.11% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 116 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Thylacinus passed 90.89% Sarcophilu passed 93.32% Dasyurus passed 98.01% Echymipera passed 92.83% Trichosuru passed 90.41% Phalanger passed 86.09% Philander passed 66.19% Bos passed 60.02% The chi-square tests compares the nucleotide composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 8 Thylacinus 0.00000 0.25562 0.22032 0.24509 0.26007 0.24938 0.22246 0.23734 Sarcophilu 0.25562 0.00000 0.13169 0.26969 0.28414 0.32680 0.26008 0.29786 Dasyurus 0.22032 0.13169 0.00000 0.20032 0.24821 0.25234 0.17801 0.23883 Echymipera 0.24509 0.26969 0.20032 0.00000 0.29531 0.33871 0.23041 0.27215 Trichosuru 0.26007 0.28414 0.24821 0.29531 0.00000 0.21136 0.28562 0.27148 Phalanger 0.24938 0.32680 0.25234 0.33871 0.21136 0.00000 0.29036 0.33042 Philander 0.22246 0.26008 0.17801 0.23041 0.28562 0.29036 0.00000 0.22452 Bos 0.23734 0.29786 0.23883 0.27215 0.27148 0.33042 0.22452 0.00000 Average distance (over all possible pairs of sequences): 0.25459 minimum : 0.13169, maximum : 0.33871 variance : 0.00207, std.dev. : 0.04544 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Thylacinus 22 [ 62.86%] 4 [ 11.43%] 9 [ 25.71%] 35 Sarcophilu 27 [ 77.14%] 1 [ 2.86%] 7 [ 20.00%] 35 Dasyurus 27 [ 77.14%] 4 [ 11.43%] 4 [ 11.43%] 35 Echymipera 20 [ 57.14%] 4 [ 11.43%] 11 [ 31.43%] 35 Trichosuru 27 [ 77.14%] 2 [ 5.71%] 6 [ 17.14%] 35 Phalanger 28 [ 80.00%] 3 [ 8.57%] 4 [ 11.43%] 35 Philander 25 [ 71.43%] 6 [ 17.14%] 4 [ 11.43%] 35 Bos 20 [ 57.14%] 4 [ 11.43%] 11 [ 31.43%] 35 -------------------------------------------------------------------------- #quartets : 49 [ 70.00%] 7 [ 10.00%] 14 [ 20.00%] 70 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 35 quartets out of 70 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 70 Fully resolved quartets: 49 (= 70.0%) Partly resolved quartets: 7 (= 10.0%) Unresolved quartets: 14 (= 20.0%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---Trichosuru :-----97: : :---Phalanger : : :---Sarcophilu : :-98: : : :---Dasyurus : : :-71: :---Philander : :-65: : : :---Bos : : : :-------Echymipera : :-----------Thylacinus Quartet puzzling tree (in CLUSTAL W notation): (Thylacinus,(Trichosuru,Phalanger)97,((Sarcophilu,Dasyurus)98, (Philander,Bos)65,Echymipera)71); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..***** : 981 ****..** : 971 *...**.. : 713 ******.. : 649 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *...**** : 426 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ***.**.. : 347 ***.**.* : 150 *...**.* : 131 *..***.. : 87 *..*..** : 81 *.....** : 72 ****..*. : 55 ***.***. : 37 ****.... : 36 *..***.* : 36 ***..... : 31 *.....*. : 28 *...***. : 27 *......* : 27 *....*.. : 26 *..*.... : 21 **..**** : 16 ***...** : 14 *..*..*. : 13 *..****. : 12 (6 other less frequent bipartitions not shown) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :---------5 Trichosuru :------9 : :----------6 Phalanger : : :-----------2 Sarcophilu : :-------10 : : :-3 Dasyurus :-----12 : : :--------7 Philander : :----11 : : :-----------8 Bos : : : :------------4 Echymipera : :---------1 Thylacinus branch length S.E. branch length S.E. Thylacinus 1 0.11024 0.03812 9 0.05953 0.03382 Sarcophilu 2 0.13180 0.03734 10 0.08585 0.03452 Dasyurus 3 0.00572 0.01273 11 0.04220 0.02513 Echymipera 4 0.13997 0.04108 12 0.05457 0.02998 Trichosuru 5 0.10654 0.03770 Phalanger 6 0.12258 0.04064 Philander 7 0.08995 0.03428 8 iterations until convergence Bos 8 0.13479 0.04095 log L: -603.37 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.11024,(Trichosuru:0.10654,Phalanger:0.12258)97:0.05953, ((Sarcophilu:0.13180,Dasyurus:0.00572)98:0.08585,(Philander:0.08995, Bos:0.13479)65:0.04220,Echymipera:0.13997)71:0.05457); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF CONSENSUS TREE (WITH CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. Root located at branch: 1 "Thylacinus" (automatic search) If the automatic search misplaces the root please rerun the analysis (rename "outtree" to "intree") and select location of root manually! :---------5 Trichosuru :-----9 : :---------6 Phalanger : : :-----2 Sarcophilu : :------10 : : :-----3 Dasyurus :--12 : : :--------7 Philander : :---11 : : :--------8 Bos : : : :-----------4 Echymipera : :------------1 Thylacinus Tree drawn as unrooted tree for better comparison with non-clock tree! branch length nc/c branch length nc/c (= non-clock/clock) Thylacinus 1 0.14706 0.750 9 0.04504 1.322 Sarcophilu 2 0.06189 2.130 10 0.06663 1.288 Dasyurus 3 0.06189 0.092 11 0.03304 1.277 Echymipera 4 0.12852 1.089 12 0.01851 2.948 Trichosuru 5 0.10199 1.045 Phalanger 6 0.10199 1.202 Philander 7 0.09549 0.942 6 iterations until convergence Bos 8 0.09549 1.412 log L: -610.75 height S.E. of node common to branches 0.10199 0.01922 9 5 6 0.06189 0.01495 10 2 3 0.09549 0.01498 11 7 8 0.12852 0.01108 12 10 11 4 0.14704 0.01235 1 9 12 0.14705 0.02366 of root at branch 1 Rooted consensus tree with clocklike maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.14705,((Trichosuru:0.10199,Phalanger:0.10199)97:0.04504 ,((Sarcophilu:0.06189,Dasyurus:0.06189)98:0.06663,(Philander:0.09549, Bos:0.09549)65:0.03304,Echymipera:0.12852)71:0.01851):0.00001); MOLECULAR CLOCK LIKELIHOOD RATIO TEST log L without clock: -603.37 (independent branch parameters: 12) log L with clock: -610.75 (independent branch parameters: 6) Likelihood ratio test statistic delta: 14.77 Degress of freedom of chi-square distribution: 6 Critical significance level: 2.22% The simpler (clocklike) tree is rejected on a significance level of 5%. The log-likelihood of the more complex (no clock) tree is significantly increased. Please take care that the correct root is used! TIME STAMP tree-puzzle-5.2/tests/qp-jtt-prot.test0000755000076400001440000001622410073365716013613 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-wag-prot0000644000076400001440000002060310073365723013654 TREE-PUZZLE Input file name: qp-wag-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: WAG (Whelan-Goldman 2000) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.16900 0.89717 0.92939 1.84037 1.59398 2.23038 HBB_HORSE 0.16900 0.00000 0.92202 0.93317 1.80081 1.60452 2.27765 HBA_HUMAN 0.89717 0.92202 0.00000 0.12400 1.71106 1.17087 2.28564 HBA_HORSE 0.92939 0.93317 0.12400 0.00000 1.77692 1.23977 2.22372 MYG_PHYCA 1.84037 1.80081 1.71106 1.77692 0.00000 1.72932 2.25004 GLB5_PETMA 1.59398 1.60452 1.17087 1.23977 1.72932 0.00000 1.91159 LGB2_LUPLU 2.23038 2.27765 2.28564 2.22372 2.25004 1.91159 0.00000 Average distance (over all possible pairs of sequences): 1.50578 minimum : 0.12400, maximum : 2.28564 variance : 0.42979, std.dev. : 0.65558 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBB_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 MYG_PHYCA 16 [ 80.00%] 0 [ 0.00%] 4 [ 20.00%] 20 GLB5_PETMA 16 [ 80.00%] 0 [ 0.00%] 4 [ 20.00%] 20 LGB2_LUPLU 16 [ 80.00%] 0 [ 0.00%] 4 [ 20.00%] 20 -------------------------------------------------------------------------- #quartets : 31 [ 88.57%] 0 [ 0.00%] 4 [ 11.43%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 31 (= 88.6%) Partly resolved quartets: 0 (= 0.0%) Unresolved quartets: 4 (= 11.4%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---MYG_PHYCA : :100:---GLB5_PETMA : : :100: :---LGB2_LUPLU : : : : :---HBA_HUMAN : :100: : :---HBA_HORSE : :-----------HBB_HORSE : :-----------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)100,(HBA_HUMAN, HBA_HORSE)100)100,HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) ****... : 1000 **..... : 1000 **..*** : 1000 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 347 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****..* : 331 ****.*. : 322 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :-------------5 MYG_PHYCA :-------8 : :-------6 GLB5_PETMA : : : :------------------7 LGB2_LUPLU :-------10 : : :-3 HBA_HUMAN : :-----9 : :--4 HBA_HORSE : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.05028 0.03102 8 0.44299 0.11946 HBB_HORSE 2 0.11946 0.03740 9 0.25788 0.08204 HBA_HUMAN 3 0.02934 0.02189 10 0.57110 0.10504 HBA_HORSE 4 0.09430 0.03146 MYG_PHYCA 5 1.11230 0.17628 GLB5_PETMA 6 0.59340 0.11994 11 iterations until convergence LGB2_LUPLU 7 1.46501 0.22199 log L: -1699.78 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.05028,((MYG_PHYCA:1.11230,GLB5_PETMA:0.59340,LGB2_LUPLU:1.46501) 100:0.44299,(HBA_HUMAN:0.02934,HBA_HORSE:0.09430)100:0.25788)100:0.57110, HBB_HORSE:0.11946); TIME STAMP tree-puzzle-5.2/tests/check-qp-hky-clock-nucl0000644000076400001440000002703310073365717014746 TREE-PUZZLE Input file name: qp-hky-clock-nucl.nucl Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 8 sequences with 116 nucleotide sites Number of constant sites: 66 (= 56.9% of all sites) Number of site patterns: 54 Number of constant site patterns: 4 (= 7.4% of all site patterns) SUBSTITUTION PROCESS Model of substitution: HKY (Hasegawa et al. 1985) Transition/transversion parameter (estimated from data set): 1.51 (S.E. 0.28) Rate matrix R (parameters restricted to selected model): A-C rate: 1.00000 A-G rate: 2.98614 A-T rate: 1.00000 C-G rate: 1.00000 C-T rate: 2.98614 G-T rate: 1.00000 Nucleotide frequencies (estimated from data set): pi(A) = 26.6% pi(C) = 30.6% pi(G) = 12.0% pi(T) = 30.7% Expected transition/transversion ratio: 1.60 Expected pyrimidine transition/purine transition ratio: 2.95 AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence Thylacinus 0 0 0 0.00% Sarcophilu 0 0 0 0.00% Dasyurus 0 1 1 0.86% Echymipera 0 0 0 0.00% Trichosuru 0 0 0 0.00% Phalanger 0 0 0 0.00% Philander 0 0 0 0.00% Bos 0 0 0 0.00% ------------------------------------------------------- Sum 0 1 1 0.11% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 116 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value Thylacinus passed 90.89% Sarcophilu passed 93.32% Dasyurus passed 98.01% Echymipera passed 92.83% Trichosuru passed 90.41% Phalanger passed 86.09% Philander passed 66.19% Bos passed 60.02% The chi-square tests compares the nucleotide composition of each sequence to the frequency distribution assumed in the maximum likelihood model. IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 8 Thylacinus 0.00000 0.25562 0.22032 0.24509 0.26007 0.24938 0.22246 0.23734 Sarcophilu 0.25562 0.00000 0.13169 0.26969 0.28414 0.32680 0.26008 0.29786 Dasyurus 0.22032 0.13169 0.00000 0.20032 0.24821 0.25234 0.17801 0.23883 Echymipera 0.24509 0.26969 0.20032 0.00000 0.29531 0.33871 0.23041 0.27215 Trichosuru 0.26007 0.28414 0.24821 0.29531 0.00000 0.21136 0.28562 0.27148 Phalanger 0.24938 0.32680 0.25234 0.33871 0.21136 0.00000 0.29036 0.33042 Philander 0.22246 0.26008 0.17801 0.23041 0.28562 0.29036 0.00000 0.22452 Bos 0.23734 0.29786 0.23883 0.27215 0.27148 0.33042 0.22452 0.00000 Average distance (over all possible pairs of sequences): 0.25459 minimum : 0.13169, maximum : 0.33871 variance : 0.00207, std.dev. : 0.04544 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- Thylacinus 22 [ 62.86%] 4 [ 11.43%] 9 [ 25.71%] 35 Sarcophilu 27 [ 77.14%] 1 [ 2.86%] 7 [ 20.00%] 35 Dasyurus 27 [ 77.14%] 4 [ 11.43%] 4 [ 11.43%] 35 Echymipera 20 [ 57.14%] 4 [ 11.43%] 11 [ 31.43%] 35 Trichosuru 27 [ 77.14%] 2 [ 5.71%] 6 [ 17.14%] 35 Phalanger 28 [ 80.00%] 3 [ 8.57%] 4 [ 11.43%] 35 Philander 25 [ 71.43%] 6 [ 17.14%] 4 [ 11.43%] 35 Bos 20 [ 57.14%] 4 [ 11.43%] 11 [ 31.43%] 35 -------------------------------------------------------------------------- #quartets : 49 [ 70.00%] 7 [ 10.00%] 14 [ 20.00%] 70 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 35 quartets out of 70 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 70 Fully resolved quartets: 49 (= 70.0%) Partly resolved quartets: 7 (= 10.0%) Unresolved quartets: 14 (= 20.0%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---Trichosuru :-----97: : :---Phalanger : : :---Sarcophilu : :-98: : : :---Dasyurus : : :-71: :---Philander : :-65: : : :---Bos : : : :-------Echymipera : :-----------Thylacinus Quartet puzzling tree (in CLUSTAL W notation): (Thylacinus,(Trichosuru,Phalanger)97,((Sarcophilu,Dasyurus)98, (Philander,Bos)65,Echymipera)71); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) *..***** : 981 ****..** : 971 *...**.. : 713 ******.. : 649 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *...**** : 426 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ***.**.. : 347 ***.**.* : 150 *...**.* : 131 *..***.. : 87 *..*..** : 81 *.....** : 72 ****..*. : 55 ***.***. : 37 ****.... : 36 *..***.* : 36 ***..... : 31 *.....*. : 28 *...***. : 27 *......* : 27 *....*.. : 26 *..*.... : 21 **..**** : 16 ***...** : 14 *..*..*. : 13 *..****. : 12 (6 other less frequent bipartitions not shown) MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :---------5 Trichosuru :------9 : :----------6 Phalanger : : :-----------2 Sarcophilu : :-------10 : : :-3 Dasyurus :-----12 : : :--------7 Philander : :----11 : : :-----------8 Bos : : : :------------4 Echymipera : :---------1 Thylacinus branch length S.E. branch length S.E. Thylacinus 1 0.11024 0.03812 9 0.05953 0.03382 Sarcophilu 2 0.13180 0.03734 10 0.08585 0.03452 Dasyurus 3 0.00572 0.01273 11 0.04220 0.02513 Echymipera 4 0.13997 0.04108 12 0.05457 0.02998 Trichosuru 5 0.10654 0.03770 Phalanger 6 0.12258 0.04064 Philander 7 0.08995 0.03428 8 iterations until convergence Bos 8 0.13479 0.04095 log L: -603.37 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.11024,(Trichosuru:0.10654,Phalanger:0.12258)97:0.05953, ((Sarcophilu:0.13180,Dasyurus:0.00572)98:0.08585,(Philander:0.08995, Bos:0.13479)65:0.04220,Echymipera:0.13997)71:0.05457); MAXIMUM LIKELIHOOD BRANCH LENGTHS OF CONSENSUS TREE (WITH CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. Root located at branch: 1 "Thylacinus" (automatic search) If the automatic search misplaces the root please rerun the analysis (rename "outtree" to "intree") and select location of root manually! :---------5 Trichosuru :-----9 : :---------6 Phalanger : : :-----2 Sarcophilu : :------10 : : :-----3 Dasyurus :--12 : : :--------7 Philander : :---11 : : :--------8 Bos : : : :-----------4 Echymipera : :------------1 Thylacinus Tree drawn as unrooted tree for better comparison with non-clock tree! branch length nc/c branch length nc/c (= non-clock/clock) Thylacinus 1 0.14706 0.750 9 0.04504 1.322 Sarcophilu 2 0.06189 2.130 10 0.06663 1.288 Dasyurus 3 0.06189 0.092 11 0.03304 1.277 Echymipera 4 0.12852 1.089 12 0.01851 2.948 Trichosuru 5 0.10199 1.045 Phalanger 6 0.10199 1.202 Philander 7 0.09549 0.942 6 iterations until convergence Bos 8 0.09549 1.412 log L: -610.75 height S.E. of node common to branches 0.10199 0.01922 9 5 6 0.06189 0.01495 10 2 3 0.09549 0.01498 11 7 8 0.12852 0.01108 12 10 11 4 0.14704 0.01235 1 9 12 0.14705 0.02366 of root at branch 1 Rooted consensus tree with clocklike maximum likelihood branch lengths (in CLUSTAL W notation): (Thylacinus:0.14705,((Trichosuru:0.10199,Phalanger:0.10199)97:0.04504 ,((Sarcophilu:0.06189,Dasyurus:0.06189)98:0.06663,(Philander:0.09549, Bos:0.09549)65:0.03304,Echymipera:0.12852)71:0.01851):0.00001); MOLECULAR CLOCK LIKELIHOOD RATIO TEST log L without clock: -603.37 (independent branch parameters: 12) log L with clock: -610.75 (independent branch parameters: 6) Likelihood ratio test statistic delta: 14.77 Degress of freedom of chi-square distribution: 6 Critical significance level: 2.22% The simpler (clocklike) tree is rejected on a significance level of 5%. The log-likelihood of the more complex (no clock) tree is significantly increased. Please take care that the correct root is used! TIME STAMP tree-puzzle-5.2/tests/qp-wag-prot.test0000755000076400001440000001622410073365716013570 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-qp-jtt-prot0000644000076400001440000002057010073365723013702 TREE-PUZZLE Input file name: qp-jtt-prot.prot Type of analysis: tree reconstruction Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: JTT (Jones et al. 1992) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17343 0.93732 0.96340 2.06393 1.74159 2.60857 HBB_HORSE 0.17343 0.00000 0.97297 0.97742 2.03298 1.75271 2.65715 HBA_HUMAN 0.93732 0.97297 0.00000 0.12200 1.93956 1.25126 2.51688 HBA_HORSE 0.96340 0.97742 0.12200 0.00000 1.99570 1.34817 2.47562 MYG_PHYCA 2.06393 2.03298 1.93956 1.99570 0.00000 2.04426 2.69086 GLB5_PETMA 1.74159 1.75271 1.25126 1.34817 2.04426 0.00000 2.23399 LGB2_LUPLU 2.60857 2.65715 2.51688 2.47562 2.69086 2.23399 0.00000 Average distance (over all possible pairs of sequences): 1.69047 minimum : 0.12200, maximum : 2.69086 variance : 0.60537, std.dev. : 0.77805 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate QUARTET STATISTICS (SEQUENCES IN INPUT ORDER) name | resolved | partly resolved | unresolved | sum -------------------------------------------------------------------------- HBB_HUMAN 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBB_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 HBA_HUMAN 19 [ 95.00%] 1 [ 5.00%] 0 [ 0.00%] 20 HBA_HORSE 19 [ 95.00%] 0 [ 0.00%] 1 [ 5.00%] 20 MYG_PHYCA 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 GLB5_PETMA 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 LGB2_LUPLU 16 [ 80.00%] 1 [ 5.00%] 3 [ 15.00%] 20 -------------------------------------------------------------------------- #quartets : 31 [ 88.57%] 1 [ 2.86%] 3 [ 8.57%] 35 The table shows the occurrences of fully resolved, partially, and completely unresolved quartets for each sequence and their percentage relative to the number of times the sequence occurs in the list of quartets (i.e. 20 quartets out of 35 in total). In fully resolved quartet one single topology is supported, while for partially resolved quartets two and for completely unresolved quartets none of the topologies (AB||CD, AC||BD, AD||BC) are favoured. Note: Because 4 sequences are involved in one quartet numbers add up to a four-fold of the existing quartets. Hint: The overall numbers in the last row give information about the phylogenetic content of the dataset. The higher the percentage of partially and unresolved quartets, the lower the content of phylogenetic information. This can be visualized in more detail by likelihood mapping analysis. TREE SEARCH Quartet puzzling is used to choose from the possible tree topologies and to simultaneously infer support values for internal branches. Number of puzzling steps: 1000 Analysed quartets: 35 Fully resolved quartets: 31 (= 88.6%) Partly resolved quartets: 1 (= 2.9%) Unresolved quartets: 3 (= 8.6%) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. QUARTET PUZZLING TREE Support for the internal branches of the unrooted quartet puzzling tree topology is shown in percent. This quartet puzzling tree is not completely resolved! :---MYG_PHYCA : :100:---GLB5_PETMA : : :100: :---LGB2_LUPLU : : : : :---HBA_HUMAN : :100: : :---HBA_HORSE : :-----------HBB_HORSE : :-----------HBB_HUMAN Quartet puzzling tree (in CLUSTAL W notation): (HBB_HUMAN,((MYG_PHYCA,GLB5_PETMA,LGB2_LUPLU)100,(HBA_HUMAN, HBA_HORSE)100)100,HBB_HORSE); BIPARTITIONS The following bipartitions occured at least once in all intermediate trees that have been generated in the 1000 puzzling steps. Bipartitions included in the quartet puzzling tree: (bipartition with sequences in input order : number of times seen) ****... : 1000 **..... : 1000 **..*** : 1000 Congruent bipartitions occurred in 50% or less, not included in the consensus tree: (bipartition with sequences in input order : number of times seen) *****.. : 393 Incongruent bipartitions not included in the consensus tree: (bipartition with sequences in input order : number of times seen) ****.*. : 380 ****..* : 227 MAXIMUM LIKELIHOOD BRANCH LENGTHS ON CONSENSUS TREE (NO CLOCK) Branch lengths are computed using the selected model of substitution and rate heterogeneity. :--------------5 MYG_PHYCA :------8 : :-------6 GLB5_PETMA : : : :------------------7 LGB2_LUPLU :-------10 : : :-3 HBA_HUMAN : :----9 : :-4 HBA_HORSE : :--2 HBB_HORSE : :-1 HBB_HUMAN branch length S.E. branch length S.E. HBB_HUMAN 1 0.04638 0.03177 8 0.42254 0.12722 HBB_HORSE 2 0.12734 0.03889 9 0.25371 0.08572 HBA_HUMAN 3 0.02556 0.02189 10 0.61836 0.11268 HBA_HORSE 4 0.09595 0.03156 MYG_PHYCA 5 1.31230 0.21006 GLB5_PETMA 6 0.68479 0.13678 12 iterations until convergence LGB2_LUPLU 7 1.72936 0.26616 log L: -1707.74 Consensus tree with maximum likelihood branch lengths (in CLUSTAL W notation): (HBB_HUMAN:0.04638,((MYG_PHYCA:1.31230,GLB5_PETMA:0.68479,LGB2_LUPLU:1.72936) 100:0.42254,(HBA_HUMAN:0.02556,HBA_HORSE:0.09595)100:0.25371)100:0.61836, HBB_HORSE:0.12734); TIME STAMP tree-puzzle-5.2/tests/qp-clock.test0000755000076400001440000001622410073365716013123 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/cons-pure-prot.test0000755000076400001440000001622410073365716014307 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/tests/check-lm-pure-prot0000644000076400001440000001265210073365741014046 TREE-PUZZLE Input file name: lm-pure-prot.prot Type of analysis: likelihood mapping Parameter estimation: approximate (faster) Parameter estimation uses: neighbor-joining tree (for substitution process and rate variation) Standard errors (S.E.) are obtained by the curvature method. The upper and lower bounds of an approximate 95% confidence interval for parameter or branch length x are x-1.96*S.E. and x+1.96*S.E. SEQUENCE ALIGNMENT Input data: 7 sequences with 128 amino acid sites Number of constant sites: 7 (= 5.5% of all sites) Number of site patterns: 125 Number of constant site patterns: 5 (= 4.0% of all site patterns) SUBSTITUTION PROCESS Model of substitution: Dayhoff (Dayhoff et al. 1978) Amino acid frequencies (estimated from data set): pi(A) = 12.2% pi(R) = 2.3% pi(N) = 3.0% pi(D) = 4.9% pi(C) = 0.7% pi(Q) = 2.3% pi(E) = 5.4% pi(G) = 6.0% pi(H) = 5.8% pi(I) = 2.7% pi(L) = 12.5% pi(K) = 9.3% pi(M) = 1.3% pi(F) = 4.9% pi(P) = 2.6% pi(S) = 6.7% pi(T) = 4.5% pi(W) = 1.3% pi(Y) = 2.2% pi(V) = 9.4% AMBIGUOUS CHARACTERS IN THE SEQUENCE (SEQUENCES IN INPUT ORDER) gaps wildcards sum % sequence HBB_HUMAN 0 0 0 0.00% HBB_HORSE 0 0 0 0.00% HBA_HUMAN 0 0 0 0.00% HBA_HORSE 0 0 0 0.00% MYG_PHYCA 0 0 0 0.00% GLB5_PETMA 0 0 0 0.00% LGB2_LUPLU 0 0 0 0.00% ------------------------------------------------------- Sum 0 0 0 0.00% The table above shows the amount of gaps ('-') and other 'wildcard' characters ('X', '?', etc.) and their percentage of the 128 columns in the alignment. Sequences with more than 50% ambiguous characters are marked with a '!' and should be checked, whether they have sufficient overlap to other sequences. Sequences with 100% ambiguous characters do not hold any phylogenetic information and had to be discarded from the analysis. SEQUENCE COMPOSITION (SEQUENCES IN INPUT ORDER) 5% chi-square test p-value HBB_HUMAN passed 92.31% HBB_HORSE passed 79.58% HBA_HUMAN passed 93.09% HBA_HORSE passed 81.20% MYG_PHYCA passed 33.23% GLB5_PETMA passed 19.11% LGB2_LUPLU passed 41.67% The chi-square tests compares the amino acid composition of each sequence to the frequency distribution assumed in the maximum likelihood model. WARNING: Result of chi-square test may not be valid because of small maximum likelihood frequencies and short sequence length! IDENTICAL SEQUENCES The sequences in each of the following groups are all identical. To speed up computation please remove all but one of each group from the data set. All sequences are unique. MAXIMUM LIKELIHOOD DISTANCES Maximum likelihood distances are computed using the selected model of substitution and rate heterogeneity. 7 HBB_HUMAN 0.00000 0.17425 0.96068 0.99267 2.12932 1.77231 2.78644 HBB_HORSE 0.17425 0.00000 1.01062 1.02118 2.09456 1.78465 2.86187 HBA_HUMAN 0.96068 1.01062 0.00000 0.12147 1.93540 1.30123 2.54730 HBA_HORSE 0.99267 1.02118 0.12147 0.00000 2.00515 1.39193 2.51172 MYG_PHYCA 2.12932 2.09456 1.93540 2.00515 0.00000 2.12347 2.79386 GLB5_PETMA 1.77231 1.78465 1.30123 1.39193 2.12347 0.00000 2.18272 LGB2_LUPLU 2.78644 2.86187 2.54730 2.51172 2.79386 2.18272 0.00000 Average distance (over all possible pairs of sequences): 1.73823 minimum : 0.12147, maximum : 2.86187 variance : 0.65214, std.dev. : 0.80755 RATE HETEROGENEITY Model of rate heterogeneity: uniform rate LIKELIHOOD MAPPING ANALYSIS Number of quartets: 35 (all possible) Quartet trees are based on approximate maximum likelihood values using the selected model of substitution and rate heterogeneity. Sequences are not grouped in clusters. LIKELIHOOD MAPPING STATISTICS Occupancies of the three areas 1, 2, 3: /\ / \ / \ / 1 \ / \ / \ / \ / \ / \/ \ / 3 : 2 \ / : \ /__________________\ Number of quartets in region 1: 14 (= 40.0%) Number of quartets in region 2: 11 (= 31.4%) Number of quartets in region 3: 10 (= 28.6%) Occupancies of the seven areas 1, 2, 3, 4, 5, 6, 7: /\ / \ / 1 \ / \ / \ / /\ \ / 6 / \ 4 \ / / 7 \ \ / \ /______\ / \ / 3 : 5 : 2 \ /__________________\ Number of quartets in region 1: 12 (= 34.3%) left: 3 right: 9 Number of quartets in region 2: 11 (= 31.4%) bottom: 3 top: 8 Number of quartets in region 3: 9 (= 25.7%) bottom: 4 top: 5 Number of quartets in region 4: 0 (= 0.0%) bottom: 0 top: 0 Number of quartets in region 5: 0 (= 0.0%) left: 0 right: 0 Number of quartets in region 6: 0 (= 0.0%) bottom: 0 top: 0 Number of quartets in region 7: 3 (= 8.6%) TIME STAMP tree-puzzle-5.2/tests/qp-pure-bin.test0000755000076400001440000001622410073365716013551 #! /bin/sh # # template-test # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # fname=`echo $0 | sed 's/.*\///'` GENERATE=0 TESTTYPE="Testing: " if test 0 -ne $# then case "$1" in -g*) GENERATE=1 TESTTYPE="Generating: " ;; *) echo "Usage: $fname [-g] " echo echo " Test a TREE-PUZZLE scenario." echo " With -g no test is performed, but the " echo " template for a future test is created." echo exit 1 ;; esac fi ########################################################################## TEST_PREF=`echo $fname | sed s/\.test//` INUTREE=${TEST_PREF}.trees INCTREE=${TEST_PREF}.ctrees PARAMS=${TEST_PREF}.param # default DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees # # data type # case "$TEST_PREF" in *-nucl) TESTTYPE="${TESTTYPE}nucleotide data" DATA=nucl INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/marswolf.n INUTREESOURCE=../data/marswolf.trees INCTREESOURCE=../data/marswolf.ctrees echo d > $PARAMS case "$TEST_PREF" in *-hky*) TESTTYPE="${TESTTYPE}, HKY" ;; *-tn*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS ;; *-gtr*) TESTTYPE="${TESTTYPE}, TN" echo m >> $PARAMS echo m >> $PARAMS ;; *-sh*) TESTTYPE="${TESTTYPE}, SH" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-prot) TESTTYPE="${TESTTYPE}protein data" DATA=prot INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/globin.a INUTREESOURCE=../data/globin.trees INCTREESOURCE=../data/globin.ctrees echo d > $PARAMS echo d >> $PARAMS case "$TEST_PREF" in *-dayhoff*) TESTTYPE="${TESTTYPE}, Dayhoff" echo m >> $PARAMS ;; *-jtt*) TESTTYPE="${TESTTYPE}, JTT" echo m >> $PARAMS echo m >> $PARAMS ;; *-mtrev*) TESTTYPE="${TESTTYPE}, mtREV" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-blosum*) TESTTYPE="${TESTTYPE}, BLOSUM" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-vt*) TESTTYPE="${TESTTYPE}, VT" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *-wag*) TESTTYPE="${TESTTYPE}, WAG" echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS echo m >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}, default model" esac ;; *-bin) TESTTYPE="${TESTTYPE}binary data" DATA=bin INFILE=${TEST_PREF}.${DATA} INFILESOURCE=../data/primates.b INUTREESOURCE=../data/primates.trees INCTREESOURCE=../data/primates.ctrees echo d > $PARAMS echo d >> $PARAMS echo d >> $PARAMS ;; *) TESTTYPE="${TESTTYPE}default data, default model" ;; esac case "$TEST_PREF" in *-clock*) TESTTYPE="${TESTTYPE}, clock" echo z >> $PARAMS ;; esac case "$TEST_PREF" in *-rhet4*) TESTTYPE="${TESTTYPE}, rate heterogeneity (4 rates)" echo w >> $PARAMS echo c >> $PARAMS echo 4 >> $PARAMS ;; *-rhet*) TESTTYPE="${TESTTYPE}, rate heterogeneity" echo w >> $PARAMS ;; esac CHECK_PREF=check-$INFILE case "$TEST_PREF" in qp-*) TESTTYPE="${TESTTYPE}, quartet puzzling" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; lm-*) TESTTYPE="${TESTTYPE}, likelihood mapping" cp $INFILESOURCE $INFILE RESULT_PREF=$INFILE echo b >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} < $PARAMS > ${INFILE}.out 2>&1 ;; ut-*) TESTTYPE="${TESTTYPE}, user tree evaluation" cp $INFILESOURCE $INFILE cp $INUTREESOURCE $INUTREE RESULT_PREF=$INUTREE echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INUTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; cons-*) TESTTYPE="${TESTTYPE}, consensus construction" cp $INFILESOURCE $INFILE cp $INCTREESOURCE $INCTREE RESULT_PREF=$INCTREE echo k >> $PARAMS echo y >> $PARAMS echo; echo "$TESTTYPE ($TEST_PREF)" ../src/puzzle$EXEEXT -randseed1001 ${INFILE} ${INCTREE} < $PARAMS > ${INFILE}.out 2>&1 ;; *) echo; echo "$TESTTYPE ($TEST_PREF)" echo UNKNOWN analysis type: test ignored exit 77 ;; esac if test $GENERATE == 1; then cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > check-${TEST_PREF} exit 0 else cat ${RESULT_PREF}.puzzle \ | grep -v "^Date and time" \ | grep -v "^Runtime (" \ | sed "s/$VERSION//g" \ > ${RESULT_PREF}.clean diff ${RESULT_PREF}.clean check-${TEST_PREF} result=$? exit $result fi tree-puzzle-5.2/README0000644000076400001440000000302610070674527010220 TREE-PUZZLE 5.2 TREE-PUZZLE is a computer program to reconstruct phylogenetic trees from molecular sequence data by maximum likelihood. It implements a fast tree search algorithm, quartet puzzling, that allows analysis of large data sets and automatically assigns estimations of support to each internal branch. TREE-PUZZLE also computes pairwise maximum likelihood distances as well as branch lengths for user specified trees. Branch lengths can also be calculated under the clock-assumption. In addition, TREE-PUZZLE offers a novel method, likelihood mapping, to investigate the support of a hypothesized internal branch without computing an overall tree and to visualize the phylogenetic content of a sequence alignment. TREE-PUZZLE also conducts a number of statistical tests on the data set (chi-square test for homogeneity of base composition, likelihood ratio to test the clock hypothesis, Kishino-Hasegawa test). The models of substitution provided by TREE-PUZZLE are TN, HKY, F84, SH for nucleotides, Dayhoff, JTT, mtREV24, BLOSUM 62, VT, WAG for amino acids, and F81 for two-state data. Rate heterogeneity is modelled by a discrete Gamma distribution and by allowing invariable sites. The corresponding parameters can be inferred from the data set. INSTALLATION For compile an intall instructions see INSTALL and doc/manual.html In most cases on UNIX machines the following should work (if the prefix is left out configure the executable are installed in /urs/local): sh ./configure --prefix=/usr/local make make install tree-puzzle-5.2/configure0000755000076400001440000047475010075305501011253 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # NLS nuisances. # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi (set +x; test -n "`(LANG=C; export LANG) 2>&1`") && { $as_unset LANG || test "${LANG+set}" != set; } || { LANG=C; export LANG; } (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || { LC_ALL=C; export LC_ALL; } (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || { LC_TIME=C; export LC_TIME; } (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || { LC_CTYPE=C; export LC_CTYPE; } (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || { LANGUAGE=C; export LANGUAGE; } (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || { LC_COLLATE=C; export LC_COLLATE; } (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || { LC_NUMERIC=C; export LC_NUMERIC; } (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || { LC_MESSAGES=C; export LC_MESSAGES; } # Name of the executable. as_me=`(basename "$0") 2>/dev/null || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conftest.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.53. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell meta-characters. ac_configure_args= ac_sep= for ac_arg do case $ac_arg in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n ) continue ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ac_sep=" " ;; esac # Get rid of the leading space. done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version="1.6" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="${MAKE}"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # Define the identity of the package. PACKAGE=tree-puzzle VERSION=5.2 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Add the stamp file to the list of files AC keeps track of, # along with our hook. ac_config_headers="$ac_config_headers src/config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$as_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include $ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CC_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$CC" != xcc; then echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 fi set dummy $CC; ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="${MAKE}"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi if test "$MPICC" != "" ; then # Extract the first word of "$MPICC", so it can be a program name with args. set dummy $MPICC; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC0+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC0 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC0="$MPICC0" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC0="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC0=$ac_cv_path_MPICC0 if test -n "$MPICC0"; then echo "$as_me:$LINENO: result: $MPICC0" >&5 echo "${ECHO_T}$MPICC0" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi # Extract the first word of "mpcc", so it can be a program name with args. set dummy mpcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC1 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC1="$MPICC1" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC1="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC1=$ac_cv_path_MPICC1 if test -n "$MPICC1"; then echo "$as_me:$LINENO: result: $MPICC1" >&5 echo "${ECHO_T}$MPICC1" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "hcc", so it can be a program name with args. set dummy hcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC2 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC2="$MPICC2" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC2="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC2=$ac_cv_path_MPICC2 if test -n "$MPICC2"; then echo "$as_me:$LINENO: result: $MPICC2" >&5 echo "${ECHO_T}$MPICC2" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "mpicc", so it can be a program name with args. set dummy mpicc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC3 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC3="$MPICC3" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC3="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC3=$ac_cv_path_MPICC3 if test -n "$MPICC3"; then echo "$as_me:$LINENO: result: $MPICC3" >&5 echo "${ECHO_T}$MPICC3" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "mpicc_lam", so it can be a program name with args. set dummy mpicc_lam; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC4 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC4="$MPICC4" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC4="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC4=$ac_cv_path_MPICC4 if test -n "$MPICC4"; then echo "$as_me:$LINENO: result: $MPICC4" >&5 echo "${ECHO_T}$MPICC4" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "mpicc_mpich", so it can be a program name with args. set dummy mpicc_mpich; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC5 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC5="$MPICC5" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC5="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC5=$ac_cv_path_MPICC5 if test -n "$MPICC5"; then echo "$as_me:$LINENO: result: $MPICC5" >&5 echo "${ECHO_T}$MPICC5" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MPICC6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MPICC6 in [\\/]* | ?:[\\/]*) ac_cv_path_MPICC6="$MPICC6" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MPICC6="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MPICC6=$ac_cv_path_MPICC6 if test -n "$MPICC6"; then echo "$as_me:$LINENO: result: $MPICC6" >&5 echo "${ECHO_T}$MPICC6" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$MPICC0" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC0 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi if test "$MPICC1" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC1 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi if test "$MPICC2" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC2 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi if test "$MPICC3" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC3 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi if test "$MPICC4" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC4 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi if test "$MPICC5" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC5 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi if test "$MPICC6" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$MPICC6 if test "$MPICC" != "" ; then echo "$as_me:$LINENO: checking whether $MPICC works as MPI compiler" >&5 echo $ECHO_N "checking whether $MPICC works as MPI compiler... $ECHO_C" >&6 $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking whether $MPICC needs -lmpi" >&5 echo $ECHO_N "checking whether $MPICC needs -lmpi... $ECHO_C" >&6 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi ac_cv_prog_MPICC=$MPICC if test "$MPICC" != "" ; then cat > conftest.c < int main (int argc, char **argv) { printf ("%s-%s", PACKAGE, VERSION); exit(0); } EOF CCQ=$MPICC if test "$CCQ" != "" ; then echo "$as_me:$LINENO: checking whether $CCQ handles quotes correctly" >&5 echo $ECHO_N "checking whether $CCQ handles quotes correctly... $ECHO_C" >&6 $CCQ -DPACKAGE=\"$PACKAGE\" -DVERSION=\"$VERSION\" conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then DUMMY=`./conftest` if test "$DUMMY" = "$PACKAGE-$VERSION" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi mv conftest.c `basename $CCQ`.conftest.c rm -f *.conftest* fi if test "$CC" != "" ; then cat > conftest.c < int main (int argc, char **argv) { printf ("%s-%s", PACKAGE, VERSION); exit(0); } EOF CCQ=$CC if test "$CCQ" != "" ; then echo "$as_me:$LINENO: checking whether $CCQ handles quotes correctly" >&5 echo $ECHO_N "checking whether $CCQ handles quotes correctly... $ECHO_C" >&6 $CCQ -DPACKAGE=\"$PACKAGE\" -DVERSION=\"$VERSION\" conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then DUMMY=`./conftest` if test "$DUMMY" = "$PACKAGE-$VERSION" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi mv conftest.c `basename $CCQ`.conftest.c rm -f *.conftest* fi echo "$as_me:$LINENO: checking for main in -lm" >&5 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_m_main=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include #include #include #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in limits.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi ac_config_files="$ac_config_files Makefile src/Makefile src/sprng/Makefile doc/Makefile data/Makefile tests/Makefile" test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # NLS nuisances. # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi (set +x; test -n "`(LANG=C; export LANG) 2>&1`") && { $as_unset LANG || test "${LANG+set}" != set; } || { LANG=C; export LANG; } (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || { LC_ALL=C; export LC_ALL; } (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || { LC_TIME=C; export LC_TIME; } (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || { LC_CTYPE=C; export LC_CTYPE; } (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || { LANGUAGE=C; export LANGUAGE; } (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || { LC_COLLATE=C; export LC_COLLATE; } (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || { LC_NUMERIC=C; export LC_NUMERIC; } (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || { LC_MESSAGES=C; export LC_MESSAGES; } # Name of the executable. as_me=`(basename "$0") 2>/dev/null || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conftest.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.53. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.53, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` shift set dummy "$ac_option" "$ac_optarg" ${1+"$@"} shift ;; -*);; *) # This is not an option, so the user has probably given explicit # arguments. ac_need_defaults=false;; esac case $1 in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) shift CONFIG_FILES="$CONFIG_FILES $1" ac_need_defaults=false;; --header | --heade | --head | --hea ) shift CONFIG_HEADERS="$CONFIG_HEADERS $1" ac_need_defaults=false;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/sprng/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/sprng/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "data/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. : ${TMPDIR=/tmp} { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/cs$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@MPICC0@,$MPICC0,;t t s,@MPICC1@,$MPICC1,;t t s,@MPICC2@,$MPICC2,;t t s,@MPICC3@,$MPICC3,;t t s,@MPICC4@,$MPICC4,;t t s,@MPICC5@,$MPICC5,;t t s,@MPICC6@,$MPICC6,;t t s,@MPICC@,$MPICC,;t t s,@MPILIBS@,$MPILIBS,;t t s,@MPIDEFS@,$MPIDEFS,;t t s,@MPICFLAGS@,$MPICFLAGS,;t t s,@PPUZZLE@,$PPUZZLE,;t t s,@CPP@,$CPP,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy="$ac_dir" for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" || { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; } ;; esac done; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # egrep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy="$ac_dir" for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" || { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; } ;; esac done; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Run the commands associated with the file. case $ac_file in src/config.h ) # update the timestamp echo 'timestamp for src/config.h' >"src/stamp-h1" ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { case $dirpart/$fdir in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy=$dirpart/$fdir for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" || { { echo "$as_me:$LINENO: error: cannot create $dirpart/$fdir" >&5 echo "$as_me: error: cannot create $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; } ;; esac done; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: exec 5>/dev/null $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi tree-puzzle-5.2/configure.ac0000644000076400001440000000732310075305474011627 dnl $Id$ dnl Disable caching. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl dnl Process this file with autoconf to produce a configure script. AC_INIT AC_CANONICAL_BUILD AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(tree-puzzle, 5.2) AM_CONFIG_HEADER(src/config.h) dnl Gets build and target system type. dnl Checks for programs. AC_PROG_CC AC_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_MAKE_SET dnl --------------------------------------------------------------------- dnl Test function to test whether mpicc works correctly dnl --------------------------------------------------------------------- AC_DEFUN(AC_TEST_MPICC,[dnl if test "$1" != "" ; then if test "$MPICCSET" = "" ; then cat > conftest.c < int main (int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Finalize(); exit(0); } EOF MPICC=$1 dnl if test "$MPICC" != "$CC" ; then dnl fi if test "$MPICC" != "" ; then AC_MSG_CHECKING(whether $MPICC works as MPI compiler) $MPICC conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then AC_MSG_RESULT(yes) #MPICC=$MPICC MPILIBS= MPICCSET=$MPICC PPUZZLE=ppuzzle else AC_MSG_RESULT(no) AC_MSG_CHECKING(whether $MPICC needs -lmpi) $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1 if test $? = 0 ; then AC_MSG_RESULT(yes) #MPICC=$PCC MPILIBS=-lmpi MPICCSET=$MPICC PPUZZLE=ppuzzle else AC_MSG_RESULT(no) MPICC= MPILIBS= MPICCSET= PPUZZLE= fi fi fi rm -f *.conftest* fi fi ]) if test "$MPICC" != "" ; then AC_PATH_PROG(MPICC0, $MPICC) fi AC_PATH_PROG(MPICC1, mpcc) AC_PATH_PROG(MPICC2, hcc) AC_PATH_PROG(MPICC3, mpicc) AC_PATH_PROG(MPICC4, mpicc_lam) AC_PATH_PROG(MPICC5, mpicc_mpich) AC_PATH_PROG(MPICC6, cc) AC_TEST_MPICC($MPICC0) AC_TEST_MPICC($MPICC1) AC_TEST_MPICC($MPICC2) AC_TEST_MPICC($MPICC3) AC_TEST_MPICC($MPICC4) AC_TEST_MPICC($MPICC5) AC_TEST_MPICC($MPICC6) ac_cv_prog_MPICC=$MPICC dnl --------------------------------------------------------------------- dnl Test function to test whether the compiler handles quotes correctly dnl --------------------------------------------------------------------- AC_DEFUN(AC_TEST_CCQUOTES,[dnl if test "$1" != "" ; then cat > conftest.c < int main (int argc, char **argv) { printf ("%s-%s", PACKAGE, VERSION); exit(0); } EOF CCQ=$1 if test "$CCQ" != "" ; then AC_MSG_CHECKING(whether $CCQ handles quotes correctly) $CCQ -DPACKAGE=\"$PACKAGE\" -DVERSION=\"$VERSION\" conftest.c -o conftest > /dev/null 2>&1 if test $? = 0 ; then DUMMY=`./conftest` if test "$DUMMY" = "$PACKAGE-$VERSION" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi fi mv conftest.c `basename $CCQ`.conftest.c rm -f *.conftest* fi ]) AC_TEST_CCQUOTES($MPICC) AC_TEST_CCQUOTES($CC) AC_SUBST(MPICC) AC_SUBST(MPILIBS) AC_SUBST(MPIDEFS) AC_SUBST(MPICFLAGS) AC_SUBST(PPUZZLE) dnl Checks for libraries. dnl Replace `main' with a function in -lm: AC_CHECK_LIB(m, main) dnl AC_CHECK_LIB(mpi, main) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(limits.h) dnl AC_CHECK_HEADERS([mpi.h]) dnl AC_CHECK_HEADERS([rpc/xdr.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T dnl Checks for library functions. dnl AC_CHECK_FUNCS(xdr_u_char) dnl AC_CHECK_FUNCS(xdr_double) dnl AC_CHECK_FUNCS(xdrstdio_create) dnl AC_CHECK_FUNCS(xdr_destroy) dnl AC_CHECK_FUNCS(xdr_inline) AC_CONFIG_FILES([Makefile src/Makefile src/sprng/Makefile doc/Makefile data/Makefile tests/Makefile]) AC_OUTPUT tree-puzzle-5.2/config.guess0000755000076400001440000011302007410242741011645 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-08-21' # This file 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; sparc*:NetBSD:*) echo `uname -p`-unknown-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF eval $set_cc_for_build (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in big) echo mips-unknown-linux-gnu && exit 0 ;; little) echo mipsel-unknown-linux-gnu && exit 0 ;; esac ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-pc-linux-gnu\n", argv[1]); # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: tree-puzzle-5.2/install-sh0000755000076400001440000001267107470534437011357 #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 tree-puzzle-5.2/config.sub0000755000076400001440000006700507410242741011323 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-08-13' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dsp16xx \ | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el | mips64vr4300 \ | mips64vr4300el | mips64vr5000 | mips64vr5000el \ | mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[34] | sh[34]eb | shbe | shle \ | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 \ | we32k \ | x86 | xscale \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alphapca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armv*-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c54x-* \ | clipper-* | cray2-* | cydra-* \ | d10v-* | d30v-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \ | mipsle-* | mipstx39-* | mipstx39el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: tree-puzzle-5.2/missing0000755000076400001440000002405007470534437010744 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar ${1+"$@"} && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar ${1+"$@"} && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 tree-puzzle-5.2/mkinstalldirs0000755000076400001440000000350407470534437012154 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here tree-puzzle-5.2/Makefile.am0000644000076400001440000000101110073365667011371 # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # EXTRA_DIST = SUBDIRS = src doc data tests tree-puzzle-5.2/Makefile.in0000644000076400001440000003151010075305500011367 # Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am # # # Part of TREE-PUZZLE 5.2 (July 2004) # # (c) 2003-2004 by Heiko A. Schmidt, Korbinian Strimmer, and Arndt von Haeseler # (c) 1999-2003 by Heiko A. Schmidt, Korbinian Strimmer, # M. Vingron, and Arndt von Haeseler # (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler # # All parts of the source except where indicated are distributed under # the GNU public licence. See http://www.opensource.org for details. # # ($Id$) # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MPICC = @MPICC@ MPICC0 = @MPICC0@ MPICC1 = @MPICC1@ MPICC2 = @MPICC2@ MPICC3 = @MPICC3@ MPICC4 = @MPICC4@ MPICC5 = @MPICC5@ MPICC6 = @MPICC6@ MPICFLAGS = @MPICFLAGS@ MPIDEFS = @MPIDEFS@ MPILIBS = @MPILIBS@ PACKAGE = @PACKAGE@ PPUZZLE = @PPUZZLE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ EXTRA_DIST = SUBDIRS = src doc data tests subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ uninstall-info-recursive all-recursive install-data-recursive \ install-exec-recursive installdirs-recursive install-recursive \ uninstall-recursive check-recursive installcheck-recursive DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ configure.ac depcomp install-sh missing mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): configure.ac cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ find $$dc_install_base -type f -print ; \ exit 1; } >&2 ) \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f config.status config.cache config.log distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ clean-generic clean-recursive dist dist-all dist-gzip distcheck \ distclean distclean-generic distclean-recursive distclean-tags \ distcleancheck distdir dvi dvi-am dvi-recursive info info-am \ info-recursive install install-am install-data install-data-am \ install-data-recursive install-exec install-exec-am \ install-exec-recursive install-info install-info-am \ install-info-recursive install-man install-recursive \ install-strip installcheck installcheck-am installdirs \ installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ mostlyclean-generic mostlyclean-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tree-puzzle-5.2/AUTHORS0000644000076400001440000000204707523345256010415 since 1999 by Heiko A. Schmidt, Korbinian Strimmer, Martin Vingron, Arndt von Haeseler 1995-1999 by Korbinian Strimmer and Arndt von Haeseler ($Id$) Heiko A. Schmidt MPI for Molecular Genetics Computational Molecular Biology Ihnestrasse 73 D-14195 Berlin Germany email: hschmidt@molgen.mpg.de, http://cmb.molgen.mpg.de Korbinian Strimmer Department of Statistics University of Munich Ludwigstrasse 33 D-80539 Munich Germany email: strimmer@stat.uni-muenchen.de http://www.stat.uni-muenchen.de/~strimmer/ Martin Vingron MPI for Molecular Genetics Computational Molecular Biology Ihnestrasse 73 D-14195 Berlin Germany email: vingron@molgen.mpg.de, http://cmb.molgen.mpg.de Arndt von Haeseler HHU Duesseldorf Mathematisches Institut Abteilung fuer Informatik Universitaetsstr. 1 D-40225 Duesseldorf Germany email: haeseler@cs.uni-duesseldorf.de http://www.cs.uni-duesseldorf.de/~haeseler/ and John-von-Neumann Institut fuer Computing Forschungsgruppe Bioinformatik FZ-Juelich D-52425 Juelich Germany tree-puzzle-5.2/INSTALL0000644000076400001440000002230607470534437010400 Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for variables by setting them in the environment. You can do that on the command line like this: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it cannot guess the host type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the host platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. In this case, you should also specify the build platform with `--build=TYPE', because, in this case, it may not be possible to guess the build platform (it sometimes involves compiling and running simple test programs, and this can't be done if the compiler is a cross compiler). Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. tree-puzzle-5.2/ChangeLog0000644000076400001440000007332010075305236011107 ChangeLog ($Id$) Version date what has been changed TODO: missing quartet handling missing quartet counting in parallel case DONE: 5.2 14.07.2004 - Version 5.2 !!! NEW RELEASE =========== 5.2.rc17 14.07.2004 - Manual sources moved out of the package - numerous changes in the manual 5.2.rc16 12.07.2004 - Makefile.am: double distclean rule removed - fflush added before mygets() - because of Windows - manual spell-checked - '-consmrel' fixed - usage message extended 5.2.rc15 09.07.2004 - many changes to the manual 5.2.rc14 01.07.2004 - test suite checked, notice about results added 5.2.rc13 01.07.2004 - a number of small fixes (alloc and dealloc in epe) - convergence output for user branches fixed - G-T rate output precision fixed - tests checked and fixed 5.2.rc12 30.06.2004 - branch length convergence output corrected for user set branch lengths (i.e. no estimate) - avergedist updated: output of min/max/var/std.dev. - tstvratio and yrtsratio - no output for GTR - some future cmdline flags added to help - -prefix, -sub50, -randseed moved to usage output - -randseed=# added - release date changed in code 5.2.rc11 18.06.2004 - flags to set epsilon values added for debugging (dependent on USE_ADJUSTABLE_EPS compiler switch) 19.06.2004 - quartet percent computation fixed: quartet sums moved qinfomatr[0] -> qinfomatr[8] qinfomatr[0]=missing qs. (release 5.2.rc9) - character state output added to R/Q matrix output - average computation of dist-matrix changed: mean=average, variance, std deviation TODO: proper output / use Korbis S.E. method 25.06.2004 - GTR model ready, menu order HKY, TN, GTR, (SH), HKY 29.06.2004 - many changes to the manual 5.2.rc10 11.06.2004 - fixed no quartets in parameter estimtion for <4 seqs 15.06.2004 - computation of Bayesian weights moved into subroutine loglkl2weight. - use subroutine loglkl2weight in parallel code -> fixing division by zero bug 5.2.rc9 11.06.2004 - sequence number check for <4 and >257 added <4 - no quartet methods available >257 - no quartet puzzling available - counting for missing quartets added for parallel message checking (TODO: handling and checking) - output of root branch name added for clock analysis (sequence name or "internal branch") 5.2.rc8 04.05.2004 - tree tests move to treetest.c/treetest.h - comments added - typo corrected (suset -> subset) 08.06.2004 - ELW: continue counting p, when significantly worse - 1sKH/2sKH: restrict tests to 3 digits (0.00) (test behaviour: seems not to use some trees (KH), see above - used, but too low variance) 5.2.rc7 12.02.2004 - corrected typos in usage/README 20.02.2004 - cmdline: prefix flag fixed 22.02.2004 - '-wsr/-wsl' flags fixed: output file and file name output 5.2.rc6 25.11.2003 - 'FPRINTF...' changed to 'fprintf(STDOUT,' - strcpy added in openfile-routines 5.2.rc5 25.11.2003 - filename length chack added - typo FILENAMELENTH corrected 5.2.rc4 19.11.2003 - minor corrections: int/uli comparisons - SPRNG added to src/sprng - src/sprng autoconf/automake setup - Parallel Parameter Estimation (JPDC, Ekki 1) 5.2.rc3 07.11.2003 - WAG Matrix code/docu corrected (Goldman) TODO: remove additional output for printrmat TODO: make PEPS* smaller to have better accuracy in parameter estimation. 5.2.rc2 01.09.2003 - bug from 5.1.pl29 found and eliminated alloc size wrong: worked if Maxsubset<=Maxspc TODO: remove out-commented debug messages 5.2.rc1 20.08.2003 - first release candidate for tree-puzzle 5.2 CODE FREEZE =========== 5.1.pl30 20.08.2003 - naming convention changed for manual name input to use FILENAME.puzzle, ... 5.1.pl29 23.07.2003 - new compiler warnings fixed - index error naming fixed - debugging of matrix based permutation (not finished) 5.1.pl28 01.07.2003 - cmdline flags to switch off ml branch lengths (-notreelh), tree tests (-notreetest) 5.1.pl27 24.06.2003 - output quartet support for incorporated split in report file 5.1.pl26 06.06.2003 - menu order of tree reconstruction methods altered to QP, user tree, consensus, dist (no tree) (last two switched) 5.1.pl25 05.06.2003 - small changes to fix compiler warnings 5.1.pl24 04.06.2003 - changes from benchmark-branch merged: debug output removed - checktime fixed: sumtodo <-> done for quartets 5.1.pl23 26.05.2003 - puzzle.c: CONSENSUS -> QUARTPUZ, allocated unnecessary memory - additional malloc-checks added (if buffer == NULL) 01.06.2003 - mlmode conditions with readable constants (ml2.c,ml.h) - garbage collection in tree2bipart/subtree2bipart 5.1.pl22 16.05.2003 - fixing Array Bound Read in fputid (bug had no effect, but was read before check) - garbage collection completed in p-step algorithms and node-label (free_tree/internalnode), trueIDtmp (allpstep), - small fix in test script and rebuild of check-files 5.1.pl21 14.05.2003 - fixing free of all allocations in puzzling step (mrca, recur, split, orig) 5.1.pl20 05.05.2003 - small fix in recursive Alg. (recur.c) - debug output removed - cross check removed from (recur.c,mrca.c) 5.1.pl19 27.04.2003 - recursive Alg. (recur.c) fixed: edge cluster has not to be reconstructed after adding new leaves only updated. - debug output removed from recur.c, split.c - MRCA-based (mrca.c) finished 5.1.pl18 26.04.2003 - recursive (recur.c) finished TODO: remove debug output - MRCA (mrca.c) startet 5.1.pl17 25.04.2003 - split-based (split.c) finished TODO: remove debug output - recursive (recur.c) startet 5.1.pl16 22.04.2003 - orig pstep alg: updating of edgemap outsourced to updateedgemap_orig - writeOTU_orig, writetree_orig, resetedgeinfo_orig, minimumedgeinfo_orig: _orig removed, since independent of algorithm type - onepstep: _orig added (onepstep_orig) - time check/status output moved to checktime routine. added to ml step of parallel version - split.c temporarily added to release 5.1.pl15 18.04.2003 - trueID dependent procedures 'de-trueID-ed' trueID saved in the tips of the tree. 5.1.pl14 10.04.2003 - consensus stuff moved to consensus.h/.c - unique tree sorting moved to treesort.h/.c - changes to pstep-split.h/.c - changed names of procedures using trueID to *_trueID 5.1.pl13 07.04.2003 - subsetmatr.[hc] added to process missing data analyses. (old version, functions in puzzle2) - deglobalized: guessdatatype, readsequencefile, getsizesites, initid, getseqs removed obsolete: getdataset - moved: output of taxa after input - computation of Maxbrnch moved from readsequencefile to inputandinit - readsubsetfile, permutetaxa_ss added, '-rssm' works - empty quartets fixed in checkquartet missing data -> OK, HALT error otherwise 5.1.pl12 04.04.2003 - tests: check-qp-clock regenerated, changes in Makefile.am and template-test - obsolete stuff removed: global trueID_orig + alloc, inittree_orig/freetree_orig from PP_SendDoPermutBlock PP_slave_do_puzzling (ppuzzle), global _orig variables (pstep), makenewsplitentries (old), kh_test (old) - column variable in tree output routines deglobalized - copyright headers added to pstep.[hc] - pstep copied to pstep-{split | mrca | recursive} - implementation of pstep-split.[ch] started (done: structure/init, todo: remove _orig stuff) 5.1.pl11 03.04.2003 - tests/Makefile.am: 'build-puzzle failed' fixed - some changes in test script template - cleanup: removed obsolete routines - puzzle module: makenewsplitentriesnew - ppuzzle module: PP_do_puzzling, PP_SendPermut, PP_RecvPermut, PP_SendSplits, PP_RecvSplits - deglobalized: makenewsplitentries, makepart, computebiparts, copysplit - parallel puzzling step based on allpstep, onepstep - time check/status output added to parallel version (inaccurate since current slave progress not known) - TIMECHECK_INTERVAL for setting time interval of status output in ML/puzzling step - Header when printing 1 PAM rate matrix (-printrmat) - final pstep copied to pstep-{split | mrca | recursive} 5.1.pl10 02.04.2003 - tests/Makefile.am fixed (TODO: build-puzzle.test) - Dates/Version adjusted: April 2003/TREE-PUZZLE 5.2 - Dates/Version fixed in doc/*.html, doc/*.tex - number added to outgroup(menu)/sequence(start) output - Time measurement only done after each completed intermediate tree to reduce the the number from O(Numtrial*n^4) to O(Numtrial) -> less overhead, but 15min met less accurate. - quartet support output for splits added in writeoutputfile for later use (TODO: '#if0'ed) - (sequential) puzzling step moved from puzzle1.c to pstep.c: allpstep, onepstep TODO: parallel puzzling step in ppuzzle.c (works but with old PP_slave_do_puzzling) 5.1.pl9 31.03.2003 - consensus construction added to menu - support value computation fixed for phylip tree, wrong divisor used in consensus - test directory/Makefile.am/tests created (make check) 5.1.pl8 30.03.2003 - puzzling step proc's: most variables 'deglobalized' 5.1.pl7 26.03.2003 - original puzzling step out-sourced to pstep-orig.c and pstep-orig.h pstep.c, pstep.h (and above) added to Makefile.am 5.1.pl6 25.03.2003 - '-usebranch' option added fr later use - 'SONJA' added for external parameter estimation 5.1.pl5 24.03.2003 - ml branch length estimation added to consensus option (todo: plausibility check - is tree file available) - output for reportfile fixed - output of likelihood to clocklike tree in treefile added/fixed 5.1.pl4 21.03.2003 - consensus option added to compute usertree consensus (only consensus is computed and printed to stdin) - usertreefile PREFIX fixed 5.1.pl3 20.03.2003 - TP_MAX_EXP_DIFF=b-a>0 introduced, such that (1.0+exp(a-b) == 1.0) to avoid the computation as well as possible FPE, when a-b gets very small. - flag '-prefix=XXX' added: use 'XXX' as filename prefix instead of 'Infilename' 5.1.pl2 05.12.2002 - PP_Finalized before exit in parallel programs. 5.1.pl1 05.12.2002 - FPE in Brent's algorithm fixed: ()/0, when x=w=v. 5.1 05.11.2002 - Version 5.1 !!! NEW RELEASE =========== 5.1.rc9 02.11.2002 - CPBI datasets (EF.phy, EF.3trees) added to data - manual updates (statistics, Acknowledgments) - latex2html added to Makefile.am - Date changed from September to November 2002 5.1.rc8 24.10.2002 - manual updated: quartet statistics, gap/ambiguous character statistics, 1sKH, 2sKH, SH test, ELW. - fixes in manual (not finished: XXX) 5.1.rc7 24.10.2002 - printversion: ALPHA compiler warning fixed - HHH only for unimplemented stuff 5.1.rc6 15.09.2002 - small fixes: compiler warnings fixed - debug output removed - 2sKH moved to the end of test output (1sKH, SH, ELW, 2sHK) - save site rates ('-wsr') added 5.1.rc5 15.09.2002 - small fixes: printf -> PRINTF 5.1.rc4 10.09.2002 - site likelihoods output to file added (PHYLIP-like) TODO: binary - in preparation:-wslb, -wparam, -usebranch, -rssm, -consensus 5.1.rc3 10.09.2002 - SH test, ELW test added. - one sided KH test, based on pairwise SH added - fflush added to utree output. 5.1.rc2 06.09.2002 - likelihood mapping: simplex labels moved to upper triangle, removed at lower right triangle 5.1.rc1 02.09.2002 - first release candidate for tree-puzzle 5.1 - Changes to the LaTeX manual. CODE FREEZE =========== 5.0.pl30 02.09.2002 - usertree CR bug changed, now accepts trees also in Mac and DOS format (CR or CR+LF). - Q-Support not used in this release (set to FALSE) 5.0.pl29 01.09.2002 - comment added, obsolete/unused functions removed 5.0.pl28 30.08.2002 - Version-no./Copyright changed in the file headers 5.0.pl27 29.08.2002 - Quartet support for inner edges added. Q-Support is computed and added to consensus tree. [todo: Q-Support output in final tree (fputphylogeny)] 5.0.pl26 15.08.2002 - Changes for CodeWarrior added (thanx to Andrew) 5.0.pl25 05.08.2002 - Ambiguous Characters Statistics changed: sum added 5.0.pl24 17.05.2002 - Quartet statistics changed; badqs and badtaxon removed 5.0.pl23 17.05.2002 - find all congruent splits below 50% - output congruent splits below 50% to puzzle file 5.0.pl22 16.05.2002 - cmdline flag '-sub50' added: computation of consensus with splits below 50%, until incongruence or ambiguity 5.0.pl21 13.05.2002 - badtaxon moved from ml.h to puzzle.h and ... - quartet statistics extended from to unresoved (bad) quartets to also fully and partly resolved quartets. - TODO: remove badqs and badtaxon from sources obsolete by fullresqs, partresqs, unresqs, qinfomatr 5.0.pl20 07.05.2002 - a few comments added - '\0' delimited species name array Namestr added for better access. Copied from undelimited Identif after read in. - check for name match while reading in quartets added. exit if mismatch. 5.0.pl19 07.05.2002 - gaps and ambiguous characters added to puzzle report - abort when ambiguous characters = 100% - warning removed from translatedataset, because it ambiguity depends on datatype - might change in menu 5.0.pl18 03.04.2002 - src/test* removed from configure.ac and source tree 5.0.pl17 26.03.2002 - fflush added to evaluatetree after printing tree to treefile 5.0.pl16 20.03.2002 - files adapted for CVS (Id tag added to files) - manual converted from HTML to LaTeX, pdflatex added to Makefile.am 5.0.pl15 19.03.2002 - parameters added (translatedatas,getseqs,getdataset) - all malloc substituted by calloc. 5.0.pl14 15.03.2002 - counting gaps and ambiguous characters in sequence. print warning if > 50 percent. 5.0.pl13 29.02.2002 - exchange O(n^2) chooser by one using O(n) - ml3.c renamed to mlparam.c to collect routines for parameter estimation. - estimateparametersnotree, estimateparameterstree moved to mlparam.c/ml.h - optimseqevolparamsq/optimseqevolparamst renamed to optimseqevolparamsquart/optimseqevolparamstree 5.0.pl12 20.12.2001 - migration to automake 1.5/autoconf 2.52-minor changes - configure changed to use src/config.h - $(srcdir) added to allow build in other directories 5.0.pl11 19.12.2001 - alignment input fixed to accept also Mac format (CR) - removed debug message from 5.0.pl10 - dependencies on Makefile added 5.0.pl10 18.12.2001 - root root search bug, the kept root fixed after first root search. Was introduced in 5.0.pl5. 5.0.pl9 18.12.2001 - possible number of charcters per node in tree strings enlarged from 23/2 to 50. CHAR_PER_TREENODE introduced - typo basian, fixed to Bayesian 5.0.pl8 18.12.2001 - added parameter -achim - fixed doubly opened treefile - adopted to new autoconf/automake (e.g. EXEEXT added) 5.0.pl7 14.11.2001 - computation of rate categories moved to appropriate place in workflow. in some cases categories were computed without likelihoods from tree ready. consequently the output RATE HETEROGENEITY parameter had to move further to the end. - comments added to code - cc added to MPICC (CRAY MPI compiler) 5.0.pl6 20.08.2001 - inputfile name output in the puzzle report for interactive case corrected. was: infile 5.0.pl5 18.08.2001 - minor clock bug corrected, that set the location of the clocked root to first sequence. 5.0.pl4 19.07.2001 - VT matrix corrected, printratematrix added - minor compile time warnings fixed 5.0.pl3 05.07.2001 - radixsort renamed to tp_radixsort to avoid name clashes on Mac OS X - manual replaced by corrected version 5.0.pl2 09.01.2001 - LIBS moved to the end of the linker statement in the Makefile 5.0.pl1 15.11.2000 - Maxspc casted to double for log10 - 200% bug fixed by adding fabs(), log-likelihood differences should not become negative 5.0 26.08.2000 - changes to manual, Makefile.in - cpREV hidden by -DCPREV flag - chi2test, quartio included into source code files - generic scr/Makefile.generic - src/makefile.com for VAX - AUTHORS, README, ChangeLog updated - INSTALL checked 27.08.2000 - test code excluded - '-randseed#' added for debugging purposes - ./data added to autoconf/automake - warning output if cmdline parameter unknown 11.10.2000 - fixed output of rate categories of sites before computing them - check whether rate categories were computed by 1st user tree or NJ tree fixed in the output 12.10.2000 - invariant site model normalization fixed CODE FREEZE =========== 5.0.a33 15.08.2000 - changes for autoconf/automake 5.0.a32 01.08.2000 - a FPE error fixed (badq == 0) - small error in -bestq fixed - fflush's added at several places 5.0.a31 01.08.2000 - comments added to tree structure sorting puzzle2.c - changes in configure.in, Makefile.in 5.0.a30 23.07.2000 - some debugging in checkquart - changed to autoconf 5.0.a29 13.07.2000 - some debugging in checkquart 5.0.a28 13.07.2000 - use best quartet topology option (-bestq) implemented 5.0.a27 13.07.2000 - further developement to checkquart - ascii/binary quartet values (-wqla/-wqlb) - typo correction 5.0.a26 11.07.2000 - fflush at all checktimer - further developement at checkquart - possibility to write quartet values to file (-wqlh) 5.0.a25 06.07.2000 - fflush at checktimer 5.0.a24 02.07.2000 - further debugging of checkquart 5.0.a23 02.07.2000 - further developement to checkquart 5.0.a22 29.06.2000 - checkquart added to makefile - bad quartet stats added after reading in *.allquarts 5.0.a21 27.06.2000 - site pattern statistics implemented and added to SEQUENCE ALIGNMENT section in puzzle report 5.0.a20 26.06.2000 - cpREV45 implemented 5.0.a19 26.06.2000 - for debugging purposes: typo "MPE" changed to "FPE" - fflush(stdout) added in chi2test 5.0.a18 20.06.2000 - checkquart implemented 5.0.a17 19.06.2000 - FPRINTF(STDOUTFILE and STDOUT definition changed and moved; fputid/fputid10 writes to STDOUT instead of stdout - ppuzzle checks slaves enough slave-processes - numquarts, num2quart, quart2num moved from ppuzzle.c to puzzle1.c - read/writeallquart implemented (undocumented feature) to be used by -wqf/-rqf at comandline -wqf = write quartet file (infilename.allquart) after quartet evaluation -rqf = read quartet file (infilename.allquart), no quartet evaluation, unless -wqf is used as well, then quartets are written and read in - '-h' option at comandline -> printusage 5.0.a16 31.05.2000 - chi2test bug fixed - WAG matrix added, model choice adopted 13.06.2000 - date set to June 2000 - author order changed to Schmidt, Strimmer, Vingron, v.Haeseler - CPU time output stopped, due to overflow errors 16.06.2000 - sequence composition chi2test moved before parameter output. - output of chi2test and bad quartet statistics split, to do the chi2test output earlier. 5.0.a15 02.05.2000 - Names changed back from TREE-PUZZLE to PUZZLE 09.05.2000 - and to TREE-PUZZLE again ;-) 5.0.a14 13.03.2000 - Changes to the manual. - Executable names changed to (p)treepuzzle. (changes in the makefiles) 15.03.2000 - Output of parameters after estimation added. 5.0.a13 18.02.2000 - ALPHA version number removed from the code 5.0.a12 18.02.2000 - CPU time measurement problems fixed for case where clock_t is an unsigned type. 5.0.a11 17.02.2000 - time measure problems (CPU/wallclock) fixed not all features in addtimes are used at the moment. - unnecessary and unused routines removed fron source code. 5.0.a10 20.01.2000 - Name changes from PUZZLE to TREE-PUZZLE - Chi2-fit model guessing for VT model added - little model printing bug fixed 5.0.a9 22.12.1999 - VT Model incorporated (Mueller, Vingron (2000) JCB, to appear). - TODO: Chi2-fit model guessing for VT model 5.0.a8 21.12.1999 - 'sys/times.h' and 'sys/types.h' removed from puzzle.h. They were neither ANSI conform nor necessary, but occured in the SUN man pages. - Definition and call of writetimesstat eliminated from the sequention version by compiler switched, and not just the function body as before. - '-O4' canged to '-O' to be more generic. 5.0.a7 21.12.1999 - Macro constants introduced for data_optn (NUCLEOTIDE, AMINOACID, BINARY) - round robbing of datatype and AA model option changed in menu to make adjustment of the model possible by a determined sequence of letters: 'd': Auto -> Nucleotides -> Amino acids -> Binary states -> Auto ('m' && data_optn == AMINOACID): Auto -> Dayhoff -> JTT -> mtREV24 -> BLOSUM62 -> Auto - manual.html adjusted 5.0.a6 20.12.1999 - new manual.html added 5.0.a5 07.12.1999 - output bug fixed (bestrates were written before they were computed) 5.0.a4 02.12.1999 - header file inclusion ajusted: added: #include changed from: #include "ppuzzle.h" to: #ifdef PARALLEL # include "ppuzzle.h" #endif 5.0.a3 27.11.1999 - '-h' comandline option removed, because of problems with MPICH under LINUX - new memory leaks of 5.0.a2 closed in PP_Finalize 5.0.a2 27.11.1999 - Cleanup of the source code - Measurement of CPU time added - Parallel load statistics added (quartets, trees, time) to puzzle report. - Cleanup debug messages - Comments "[...]" are removed from usertrees now. - single quotes will only be printed arount species names if -DUSEQUOTES is set at compiletime. - tree likelihood is printed infront of a tree as a comment, [ lh=-xx.xxxxx ](...); 5.0.a1 26.11.1999 - Cleanup of the directories - Copyright changes - Version changes VERSION CHANGE ============== 4.1.a26 25.11.1999 - Makefile made universal for pauzzle and ppuzzle - lines not needed removed from puzzle.h 4.1.a25 19.11.1999 - Output file prefixes for distances, trees, and puzzlereport changed in user trees analysis case to user tree file name - Temporary output of likelihood to treefile added 4.1.a24 11.11.1999 - Output of puzzling step trees changed ptorder: [ orderno # % ID #UniqTopos #Steps ]PHYLIP pstep: chunk #InChunk sum ID #UniqTopos #Steps - preliminary leap frog RNG implemented, i.e. uses the rand4 in the usual way in the sequential case. If run in parallel all rand4 are initialized with the same seed and started with PP_Myid-th random number. after that each process uses the every PP_NumProcs-th random number to make sure that these unique. 4.1.a23 08.11.1999 - output of sequential and parallel version to *.pstep made identical 4.1.a22 05.11.1999 - two different puzzle step tree outputs intruduced and added to the menu ("[ 1. 35 ](...);": - ordered unique tree list -> *.ptorder Format: "[ 1. 35 ]" (Ordernumber, Amount) - chronological tree list -> *.pstep Format: "[ 1. 35 ]" (Chunknumber, Amount in chunk) (the last is a problem in parallel, because the come in chunks, as scheduled) - debugged the output 4.1.a21 04.11.1999 - Makefile adjustments for other Plattforms - pstep tree output changed. unique treestructures printed to *.pstep file with a leading comment containing an order number and the ammount padded with blanks (e.g. "[ 1. 356 ]('mouse'..."). output is done right before writing the puzzle file. - controlled MPI finish to the Quit menu option added 4.1.a20 03.11.1999 - some garbage collection (free) added - makefile adjusted, OFLAGS for optimization added (ppuzzle/MPICH has problems with -O, so the ppuzzle is created without optimization) Some minor changes in the makefiles - still to do: garbage collection from 'internalnode' in master process 4.1.a19 13.10.1999 - adding the output of standardized (i.e. sorted) puzzling step trees. Those are printed to the standard output at the moment. (Routines to sort and print the trees implemented) 14.10.1999 - routines for printing the sorted trees to a string. needed to send them between Master and Worker, and to have a unique key to sort and count the trees. 21.10.1999 - counting of sorted trees implemented by doubly linked list, sort routine, print to stdout 25.10.1999 - change place of writing distances to file right after distances have been computed. - output of puzzling step trees now with true name, not numbers 02.11.1999 - parallel counting and sending of puzzling step trees - some parallel sending bugs fixed 4.1.a18 14.09.1999 - adding possibility to specify input file at command line, this specifies also the output filenames (puzzle output: *.puzzle; treefile: *.tree; distances: *.dist; Triangel EPS: *.eps; unresolved: *.qlist; puzzling step trees: *.pstep) If an unexisting name is given, one has to reenter the right name, but the wrong one is used as prefix. 15.09.1999 - sending back of bad quartets from slaves added - bug in quart2num fixed (not used before; was shifted by 1) - first version of a README added ;-) 4.1.a17 03.08.1999 - Recv-Error in receiving DoPuzzleBlock fixed - double freeing of same MPI_Datatype fixed - changing of scheduling algorithm to smaller chunks in gss -> sgss 13.09.1999 - bug fixed in optimization routine in ml2.c: boundary check added 4.1.a16 12.07.1999 - slight changes in verbosity levels - changed all printf to FPRINTF(STDOUTFILE to change easily from stdout to a file. 4.1.a15 08.07.1999 - scheduler for both parallel parts - several small changes 4.1.a14 25.06.1999 - computation of tree parallel, scheduler dependent, sending all biparts in one message instead of one by one - several small changes since a13 in sched.c, et al. 4.1.a13 10.06.1999 - computation of tree parallel (chunk = #trees/#slaves) - scheduling schemes implemented for minimum chunk sizes 4.1.a12 07.06.1999 - computation of quartets properly parallel - scheduling implemented - counting of quartets by slave ajusted - TODO: sending of bad quartets (array + list) - distinction between '1st user tree' and 'NJ tree' in result output removed again 4.1.a11 28.05.1999 - PP_SendDoQuartBlock, PP_RecvDoQuartBlock, PP_SendQuartBlock, PP_RecvQuartBlock - mallocquartets() changed from global to local variables to be more flexible - Quartet computation moved to slave (badquartet handling missing: output, badquartet vector); - distinction between '1st user tree' and 'NJ tree' added in result output (puzzle1.c around l.1756) 4.1.a10 20.05.1999 - num2quart, numquarts, quart2num introduced - parallel init/finalize, quartets computed on master and slave, compared -> equal -> all necessary parameter exported 4.1.a9 19.05.1999 - 'dvector forg' removed from onepamratematrix cmdline, because it's not used in the function. 4.1.a8 18.05.1999 - add _GAMMA_ (not necessary) to gamma.h and _PUZZLE_ to puzzle.h to avoid dublicate includes, possible due to ppuzzle.h - ppuzzle added to makefile and to check - 1st parallel version but no slave computations only sending parameters and done signals. 4.1.a7 18.05.1999 - export reevaluation of tree and evaluation of usertrees to evaluatetree. 4.1.a6 17.05.1999 - -DNEWFORLOOP added to fixed.src, because the changed for loop structure changes the sequence of randomized quartets during likelihood mapping - change 'int main()' to 'int main(argc, argv)' - export more functionalities from main: memcleanup(), inputandinit(&argc, &argv) - grouping if's (excluding eachother) together in switch() - split treereavaluation and 1st usertree, evaluate all usertrees together (TODO: both, treereavaluation and usertrees in one loop) - MAKE CHECK added to ./makefile 4.1.a5 16.05.1999 - adding dvector Brnlength to lslength cmdline to reduce globality of Brnlength. (Later better to *Tree) 4.1.a4 11.05.1999 - structure of for loops changed in computeallquartets and recon_tree, so that the quarted addresses are in one contigous sequence (for a Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. , 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 Library General Public License instead of this License.