diff -Nru seq-gen-1.3.3/debian/changelog seq-gen-1.3.4/debian/changelog --- seq-gen-1.3.3/debian/changelog 2012-03-29 11:48:37.000000000 +0000 +++ seq-gen-1.3.4/debian/changelog 2017-10-02 14:35:44.000000000 +0000 @@ -1,7 +1,49 @@ +seq-gen (1.3.4-1) unstable; urgency=medium + + [ Steffen Moeller ] + * debian/upstream/metadata + - Added references to registries + - yamllint cleanliness + + [ Alexandre Mestiashvili ] + * New upstream version 1.3.4 + * Refresh fix_typos.patch + * Set XS-Autobuild to yes to force transition to testing, + bump Standards-Version to 4.1.1 + * Drop lintian override for mangled upstream version + + -- Alexandre Mestiashvili Mon, 02 Oct 2017 16:35:44 +0200 + +seq-gen (1.3.3+git4a8cc9d.ds-1) unstable; urgency=medium + + * New upstream version 1.3.3+git4a8cc9d.ds + * Refresh fix_typos.patch + * Add d/README.source describing changes to the source + * Add d/source/lintian.override, + no need to mangle version in d/watch regularly + + -- Alexandre Mestiashvili Mon, 11 Sep 2017 16:23:47 +0200 + +seq-gen (1.3.3-2) unstable; urgency=medium + + [ Alexandre Mestiashvili ] + * Update d/watch, get source from github, drop d/get-orig-source + * New upstream version 1.3.3 + * Apply cme fix dpkg + * Remove white lines and useles comments from d/rules + * Update d/copyright, remove trailing white spaces, update copyright years + remove Files-Excluded section, change BSD license to BSD-3-clause + * Remove trailing white spaces in d/control + * Update VCS-* fields in d/control to point to the new git repository + * Introduce patch fixing makefile, enable hardening flags in d/rules + * Add patch fixing a typo + + -- Alexandre Mestiashvili Thu, 07 Sep 2017 11:12:31 +0200 + seq-gen (1.3.3-1) unstable; urgency=low [ Alexandre Mestiashvili ] - * New upstream release 1.3.3 + * New upstream release 1.3.3 * debian/control section changed to non-free/science * fixed debian/watch and debian/get-orig-source scripts * debian/seq-gen.1 fixed hyphen-used-as-minus-sign warning @@ -16,7 +58,7 @@ seq-gen (1.3.2-2) unstable; urgency=low [ Alexandre Mestiashvili ] - * fixed syntax-error-in-dep5-copyright warning + * fixed syntax-error-in-dep5-copyright warning [ Andreas Tille ] * Standards-Version: 3.9.2 (no changes needed) @@ -29,6 +71,6 @@ seq-gen (1.3.2-1) unstable; urgency=low - * Initial release (Closes: #617340) + * Initial release (Closes: #617340) -- Alexandre Mestiashvili Thu, 03 Mar 2011 14:58:34 +0000 diff -Nru seq-gen-1.3.3/debian/control seq-gen-1.3.4/debian/control --- seq-gen-1.3.3/debian/control 2012-03-29 11:48:01.000000000 +0000 +++ seq-gen-1.3.4/debian/control 2017-10-02 14:35:44.000000000 +0000 @@ -1,29 +1,29 @@ Source: seq-gen -Section: non-free/science -Priority: optional Maintainer: Debian Med Packaging Team -DM-Upload-Allowed: yes Uploaders: Alexandre Mestiashvili , - Andreas Tille + Andreas Tille +Section: non-free/science +XS-Autobuild: yes +Priority: optional Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.3 -Homepage: http://tree.bio.ed.ac.uk/software/seqgen/ -Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/seq-gen/ -Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/seq-gen/trunk/ +Standards-Version: 4.1.1 +Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/seq-gen.git +Vcs-Git: https://anonscm.debian.org/git/debian-med/seq-gen.git +Homepage: http://tree.bio.ed.ac.uk/software/seqgen/ Package: seq-gen Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, + ${misc:Depends} Description: simulate the evolution of nucleotide or amino acid sequences - Seq-Gen is a program that will simulate the evolution of nucleotide - or amino acid sequences along a phylogeny, using common models of the - substitution process. A range of models of molecular evolution are - implemented including the general reversible model. State frequencies - and other parameters of the model may be given and site-specific rate + Seq-Gen is a program that will simulate the evolution of nucleotide + or amino acid sequences along a phylogeny, using common models of the + substitution process. A range of models of molecular evolution are + implemented including the general reversible model. State frequencies + and other parameters of the model may be given and site-specific rate heterogeneity may also be incorporated in a number of ways. Any number - of trees may be read in and the program will produce any number of data - sets for each tree. Thus large sets of replicate simulations can be + of trees may be read in and the program will produce any number of data + sets for each tree. Thus large sets of replicate simulations can be easily created. It has been designed to be a general purpose simulator - that incorporates most of the commonly used + that incorporates most of the commonly used (and computationally tractable) models of molecular sequence evolution. - diff -Nru seq-gen-1.3.3/debian/copyright seq-gen-1.3.4/debian/copyright --- seq-gen-1.3.3/debian/copyright 2012-03-29 11:26:46.000000000 +0000 +++ seq-gen-1.3.4/debian/copyright 2017-10-02 14:35:44.000000000 +0000 @@ -1,12 +1,12 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: seq-gen -Source: http://tree.bio.ed.ac.uk/software/seqgen/ +Source: https://github.com/rambaut/Seq-Gen Files: * Copyright: © Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh - All rights reserved. -License: BSD + All rights reserved. +License: BSD-3-clause Files: source/eigen.* Copyright: © Copyright (c)1993-2008, Ziheng Yang @@ -19,37 +19,24 @@ Files: source/twister.c Copyright: © Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. -License: BSD +License: BSD-3-clause Files: debian/* -Copyright: 2011 Alex Mestiashvili -License: BSD - Like seq-gen itself - -License: PAML - The software package is provided "as is" without warranty of any kind. In no - event shall the author or his employer be held - responsible for any damage resulting from the use of this software, including - but not limited to the frustration that you may - experience in using the package. The program package, including source codes, - example data sets, executables, and this - documentation, is distributed free of charge for academic use only. Permission - is granted to copy and use programs in the - package provided no fee is charged for it and provided that this copyright - notice is not removed. +Copyright: 2017 Alex Mestiashvili +License: BSD-3-clause -License: BSD +License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - . + . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - . + . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - . + . 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. @@ -66,3 +53,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +License: PAML + The software package is provided "as is" without warranty of any kind. In no + event shall the author or his employer be held + responsible for any damage resulting from the use of this software, including + but not limited to the frustration that you may + experience in using the package. The program package, including source codes, + example data sets, executables, and this + documentation, is distributed free of charge for academic use only. Permission + is granted to copy and use programs in the + package provided no fee is charged for it and provided that this copyright + notice is not removed. diff -Nru seq-gen-1.3.3/debian/get-orig-source seq-gen-1.3.4/debian/get-orig-source --- seq-gen-1.3.3/debian/get-orig-source 2012-03-29 11:26:46.000000000 +0000 +++ seq-gen-1.3.4/debian/get-orig-source 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#!/bin/bash - -#one should run uscan --force-download in order to run get-orig-source. - -#taken from figtree get-orig-source -PKG=`dpkg-parsechangelog | awk '/Source:/ {print $2}'` - -if ! echo $@ | grep -q upstream-version ; then - VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'` -else - VERSION=`echo $@ | sed 's?^.*--upstream-version \([0-9.]\+\) .*download.html.*?\1?'` - if echo "$VERSION" | grep -q "upstream-version" ; then - echo "Unable to parse version number" - exit - fi -fi - -mkdir -p ../tarballs - -DLOADID=`grep "click here to start the downloa" ../download.html | awk -F'");print array[1]}'` -SITE=`awk -F"\/" '/http/{print $1"/"$2"/"$3"/"}' debian/watch` -wget $SITE/$DLOADID -O ../tarballs/${PKG}_${VERSION}.tgz - -rm -f ../download.html - -mkdir ../tarballs/${PKG}-${VERSION} - -#convert to proper name -tar -xvf ../tarballs/${PKG}_${VERSION}.tgz -C ../tarballs/${PKG}-${VERSION}/ --strip-components=1 - -cd ../tarballs -find ${PKG}-${VERSION}/ -type f -name "._*" -exec rm -f '{}' \; -GZIP="--best --no-name" tar -czf "$PKG"_"$VERSION".orig.tar.gz "$PKG"-"$VERSION" -rm -rf "$PKG"-"$VERSION" -rm -f "$PKG"_"$VERSION.tgz" - -echo "${PKG}_${VERSION}.orig.tar.gz is located in ../tarballs" diff -Nru seq-gen-1.3.3/debian/patches/fix_typos.patch seq-gen-1.3.4/debian/patches/fix_typos.patch --- seq-gen-1.3.3/debian/patches/fix_typos.patch 1970-01-01 00:00:00.000000000 +0000 +++ seq-gen-1.3.4/debian/patches/fix_typos.patch 2017-10-02 14:35:44.000000000 +0000 @@ -0,0 +1,13 @@ +From: Alex Mestiashvili +Description: Fix a typo detected by lintian +--- seq-gen.orig/source/seq-gen.c ++++ seq-gen/source/seq-gen.c +@@ -828,7 +828,7 @@ + + if (maxPartitions == 1) { + if (partitionLengths[0] != -1) { +- fprintf(stderr, "\nWARNING: The treefile contained partion lengths but only one partition\n"); ++ fprintf(stderr, "\nWARNING: The treefile contained partition lengths but only one partition\n"); + fprintf(stderr, "was specified.\n"); + } + partitionLengths[0] = numSites; diff -Nru seq-gen-1.3.3/debian/patches/makefile_vars.patch seq-gen-1.3.4/debian/patches/makefile_vars.patch --- seq-gen-1.3.3/debian/patches/makefile_vars.patch 1970-01-01 00:00:00.000000000 +0000 +++ seq-gen-1.3.4/debian/patches/makefile_vars.patch 2017-10-02 14:35:44.000000000 +0000 @@ -0,0 +1,30 @@ +From: Alex Mestiashvili +Description: Introduce LDFLAGS and CPPFLAGS, remove hardcoded values for CFLAGS +--- seq-gen.orig/source/Makefile ++++ seq-gen/source/Makefile +@@ -5,14 +5,12 @@ + + LIBS = $(CLIBS) + +-CFLAGS = -O3 +- + OBJ = seq-gen.o global.o evolve.o model.o nucmodels.o aamodels.o eigen.o treefile.o progress.o gamma.o twister.o + + .SUFFIXES: .o .c .h + + .c.o: +- $(CLINKER) $(CFLAGS) -c $*.c ++ $(CLINKER) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -c $*.c + + dummy: default + +@@ -24,7 +22,7 @@ + all: seq-gen + + seq-gen: $(OBJ) +- $(CLINKER) $(CFLAGS) -o seq-gen $(OBJ) $(LIBS) ++ $(CLINKER) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o seq-gen $(OBJ) $(LIBS) + + %.o: %.c %.h +- $(CLINKER) $(CFLAGS) -c $< ++ $(CLINKER) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -c $< diff -Nru seq-gen-1.3.3/debian/patches/series seq-gen-1.3.4/debian/patches/series --- seq-gen-1.3.3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ seq-gen-1.3.4/debian/patches/series 2017-10-02 14:35:44.000000000 +0000 @@ -0,0 +1,2 @@ +fix_typos.patch +makefile_vars.patch diff -Nru seq-gen-1.3.3/debian/README.source seq-gen-1.3.4/debian/README.source --- seq-gen-1.3.3/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ seq-gen-1.3.4/debian/README.source 2017-10-02 14:35:44.000000000 +0000 @@ -0,0 +1,5 @@ +Import tarball created from commit 4a8cc9d88278dcd18a833f125f3ab13f0c1c2ddf +from github repository. +This helps avoiding confict with version 1.3.3 from pristine-tar +after svn-git conversion. +.ds suffix is added due to deleted .gitignore file. diff -Nru seq-gen-1.3.3/debian/rules seq-gen-1.3.4/debian/rules --- seq-gen-1.3.3/debian/rules 2011-03-08 13:21:42.000000000 +0000 +++ seq-gen-1.3.4/debian/rules 2017-10-02 14:35:44.000000000 +0000 @@ -1,25 +1,20 @@ #!/usr/bin/make -f # -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This has to be exported to make some magic below work. export DH_OPTIONS - +export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --sourcedirectory=source - override_dh_clean: + echo $(CFLAGS) [ ! -f source/seq-gen ] || rm source/seq-gen dh_clean override_dh_installchangelogs: dh_installchangelogs documentation/Version_History - override_dh_fixperms: dh_fixperms chmod 644 debian/seq-gen/usr/share/doc/seq-gen/examples/* File /tmp/tmpWKtlHd/8SnMseuARa/seq-gen-1.3.3/debian/upstream is a regular file while file /tmp/tmpWKtlHd/D_LJTmiMbA/seq-gen-1.3.4/debian/upstream is a directory diff -Nru seq-gen-1.3.3/debian/watch seq-gen-1.3.4/debian/watch --- seq-gen-1.3.3/debian/watch 2011-12-23 12:12:01.000000000 +0000 +++ seq-gen-1.3.4/debian/watch 2017-10-02 14:35:44.000000000 +0000 @@ -1,5 +1,3 @@ -version=3 - -http://tree.bio.ed.ac.uk/software/seqgen \ - /download\.html\?name=seqgen&version=v(.*)&id=.* \ - debian debian/get-orig-source +version=4 +opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/,filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/seq-gen-$1\.tar\.gz/ \ + https://github.com/rambaut/Seq-Gen/tags .*/v?(\d\S*)\.tar\.gz diff -Nru seq-gen-1.3.3/documentation/Seq-Gen.Manual.html seq-gen-1.3.4/documentation/Seq-Gen.Manual.html --- seq-gen-1.3.3/documentation/Seq-Gen.Manual.html 2011-10-27 08:55:36.000000000 +0000 +++ seq-gen-1.3.4/documentation/Seq-Gen.Manual.html 2017-09-17 11:57:33.000000000 +0000 @@ -2,18 +2,19 @@ Seq-Gen: Simulation of molecular sequences +

Seq-Gen

Sequence-Generator: An application for the Monte Carlo simulation of molecular sequence evolution along phylogenetic trees.
- Version 1.3.3

+ Version 1.3.4

-

© Copyright 1996-2011
- Andrew Rambaut and Nick C. Grassly

-

Supported by The Royal Society

+

© Copyright 1996-2017
+ Andrew Rambaut and Nicholas C. Grassly

+

Supported by The Royal Society of London

Institute of Evolutionary Biology,
@@ -23,22 +24,51 @@
King's Buildings,
- Edinburgh EH9 3JT, U.K. + Edinburgh EH9 2FL, U.K.
+
Originally developed at: +
+ Department of Zoology, +
+ University of Oxford, +
+ South Parks Road, +
+ Oxford OX1 3PS, U.K. +
+
-

New Feature in version 1.3.3 - 27 Oct 2011

+

New features and bugs fixed in version 1.3.4 - 16 Sept 2017

  • - MtArt amino acid model added by Lars Jermiin (lars.jermiin@csiro.au). + FASTA format output (thanks to Kevin Murray) +
  • +
  • + Errors now return a non-zero error code. +
  • +
  • + White space at the end of the last sequence no longer prevents the tree from being read. +
  • +
  • + If the tree file was specified as a command line option the program was hanging. +
  • +
  • + Command line options now allows a space for the model (i.e., -m HKY). +
  • +
  • + Long standing error fixed when expanding memory allocated for big trees (thanks Frédéric Lemoine).
-

Bug fixed in version 1.3.3 - 27 Oct 2011

+

New features and bugs fixed in version 1.3.3 - 28 Oct 2011

  • - Memory allocation bugs (thanks to Graham Jones for submitting a fix) + MtArt amino acid model added by Lars Jermiin. +
  • +
  • + Memory allocation bugs (thanks to Graham Jones for submitting a fix)
  • - Rare array overflow causing odd characters in sequence. Thanks to Howard Ross, Jeff Thorne and Michael Ott for independently spotting this error and Michael and Lars Jermiin for submitting a fix. + Rare array overflow causing odd characters in sequence. Thanks to Howard Ross, Jeff Thorne and Michael Ott for independently spotting this error and Michael and Lars Jermiin for submitting a fix.

Bug fixed in version 1.3.2 - 7 Jan 2005

diff -Nru seq-gen-1.3.3/examples/seqs+trees.phy seq-gen-1.3.4/examples/seqs+trees.phy --- seq-gen-1.3.3/examples/seqs+trees.phy 1970-01-01 00:00:00.000000000 +0000 +++ seq-gen-1.3.4/examples/seqs+trees.phy 2017-09-17 11:57:33.000000000 +0000 @@ -0,0 +1,7 @@ + 4 40 +Taxon1 ATCTTTGTAGTCATCGCCGTATTAGCATTCTTAGATCTAA +Taxon2 ATCCTAGTAGTCGCTTGCGCACTAGCCTTCCGAAATCTAG +Taxon3 ACTTCTGTGTTTACTGAGCTACTAGCTTCCCTAAATCTAG +Taxon4 ATTCCTATATTCGCTAATTTCTTAGCTTTCCTGAATCTGG +1 +(((Taxon1:0.2,Taxon2:0.2):0.1,Taxon3:0.3):0.1,Taxon4:0.4); diff -Nru seq-gen-1.3.3/.gitignore seq-gen-1.3.4/.gitignore --- seq-gen-1.3.3/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ seq-gen-1.3.4/.gitignore 2017-09-17 11:57:33.000000000 +0000 @@ -0,0 +1,5 @@ +._* +*.o +*~ +*.swp +source/seq-gen diff -Nru seq-gen-1.3.3/README seq-gen-1.3.4/README --- seq-gen-1.3.3/README 2011-10-25 06:51:08.000000000 +0000 +++ seq-gen-1.3.4/README 2017-09-17 11:57:33.000000000 +0000 @@ -3,7 +3,7 @@ for Windows. For Mac OS X a pre-compiled version is available from the website: -http://tree.bio.ed.ac.uk/software/seqgen/ +http://tree.bio.ed.ac.uk/software/Seq-Gen/ There is a manual in HTML format in the doc/ directory of this package. @@ -17,4 +17,4 @@ Any questions about Seq-Gen should be sent to: - Andrew Rambaut \ No newline at end of file + Andrew Rambaut diff -Nru seq-gen-1.3.3/source/aamodels.c seq-gen-1.3.4/source/aamodels.c --- seq-gen-1.3.3/source/aamodels.c 2011-10-27 08:30:39.000000000 +0000 +++ seq-gen-1.3.4/source/aamodels.c 2017-09-17 11:57:33.000000000 +0000 @@ -1,6 +1,6 @@ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. @@ -122,6 +122,35 @@ 0.0866, 0.0440, 0.0391, 0.0570, 0.0193, 0.0367, 0.0581, 0.0833, 0.0244, 0.0485, 0.0862, 0.0620, 0.0195, 0.0384, 0.0458, 0.0695, 0.0610, 0.0144, 0.0353, 0.0709 }; +/* LG model of amino acid evolution */ +/* Le, S. and Gascuel, O. (2008) An improved Amino Acid Replacement Matrix */ +/* Mol. Biol. Evol. 25(7):1307-1320. */ +static double lgRelativeRates[NUM_AA_REL_RATES] = { + 0.425093, 0.276818, 0.395144, 2.489084, 0.969894, 1.038545, 2.066040, 0.358858, 0.149830, 0.395337, 0.536518, 1.124035, 0.253701, 1.177651, 4.727182, 2.139501, 0.180717, 0.218959, 2.547870, + 0.751878, 0.123954, 0.534551, 2.807908, 0.363970, 0.390192, 2.426601, 0.126991, 0.301848, 6.326067, 0.484133, 0.052722, 0.332533, 0.858151, 0.578987, 0.593607, 0.314440, 0.170887, + 5.076149, 0.528768, 1.695752, 0.541712, 1.437645, 4.509238, 0.191503, 0.068427, 2.145078, 0.371004, 0.089525, 0.161787, 4.008358, 2.000679, 0.045376, 0.612025, 0.083688, + 0.062556, 0.523386, 5.243870, 0.844926, 0.927114, 0.010690, 0.015076, 0.282959, 0.025548, 0.017416, 0.394456, 1.240275, 0.425860, 0.029890, 0.135107, 0.037967, + 0.084808, 0.003499, 0.569265, 0.640543, 0.320627, 0.594007, 0.013266, 0.893680, 1.105251, 0.075382, 2.784478, 1.143480, 0.670128, 1.165532, 1.959291, + 4.128591, 0.267959, 4.813505, 0.072854, 0.582457, 3.234294, 1.672569, 0.035855, 0.624294, 1.223828, 1.080136, 0.236199, 0.257336, 0.210332, + 0.348847, 0.423881, 0.044265, 0.069673, 1.807177, 0.173735, 0.018811, 0.419409, 0.611973, 0.604545, 0.077852, 0.120037, 0.245034, + 0.311484, 0.008705, 0.044261, 0.296636, 0.139538, 0.089586, 0.196961, 1.739990, 0.129836, 0.268491, 0.054679, 0.076701, + 0.108882, 0.366317, 0.697264, 0.442472, 0.682139, 0.508851, 0.990012, 0.584262, 0.597054, 5.306834, 0.119013, + 4.145067, 0.159069, 4.273607, 1.112727, 0.078281, 0.064105, 1.033739, 0.111660, 0.232523, 10.649107, + 0.137500, 6.312358, 2.592692, 0.249060, 0.182287, 0.302936, 0.619632, 0.299648, 1.702745, + 0.656604, 0.023918, 0.390322, 0.748683, 1.136863, 0.049906, 0.131932, 0.185202, + 1.798853, 0.099849, 0.346960, 2.020366, 0.696175, 0.481306, 1.898718, + 0.094464, 0.361819, 0.165001, 2.457121, 7.803902, 0.654683, + 1.338132, 0.571468, 0.095131, 0.089613, 0.296501, + 6.472279, 0.248862, 0.400547, 0.098369, + 0.140825, 0.245841, 2.188158, + 3.151815, 0.189510, + 0.249313 +}; + +static double lgFrequencies[NUM_AA] = { + 0.079066, 0.055941, 0.041977, 0.053052, 0.012937, 0.040767, 0.071586, 0.057337, 0.022355, 0.062157, 0.099081, 0.064600, 0.022951, 0.042302, 0.044040, 0.061197, 0.053287, 0.012066, 0.034155, 0.069147 +}; + /* 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,*/ @@ -288,6 +317,7 @@ case AA_MTREV24: SetRelativeRates(mtrevRelativeRates); break; case AA_CPREV45: SetRelativeRates(cprevRelativeRates); break; case AA_MTART: SetRelativeRates(mtartRelativeRates); break; + case AA_LG: SetRelativeRates(lgRelativeRates); break; case AA_GENERAL: // relative rates set by user break; @@ -308,6 +338,7 @@ case AA_MTREV24: SetFrequencies(mtrevFrequencies); break; case AA_CPREV45: SetFrequencies(cprevFrequencies); break; case AA_MTART: SetFrequencies(mtartFrequencies); break; + case AA_LG: SetFrequencies(lgFrequencies); break; case AA_GENERAL: // frequencies set by user break; diff -Nru seq-gen-1.3.3/source/aamodels.h seq-gen-1.3.4/source/aamodels.h --- seq-gen-1.3.3/source/aamodels.h 2011-10-27 08:57:48.000000000 +0000 +++ seq-gen-1.3.4/source/aamodels.h 2017-09-17 11:57:33.000000000 +0000 @@ -1,8 +1,8 @@ /* Header file for aamodels.c */ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. @@ -49,7 +49,7 @@ #define CUNUM_AA 8000 #define NUM_AA_REL_RATES 190 -enum { AA_NONE = -1, AA_JTT, AA_WAG, AA_DAYHOFF78, AA_BLOSUM62, AA_MTREV24, AA_CPREV45, AA_MTART, AA_GENERAL, numAAModels }; +enum { AA_NONE = -1, AA_JTT, AA_WAG, AA_DAYHOFF78, AA_BLOSUM62, AA_MTREV24, AA_CPREV45, AA_MTART, AA_LG, AA_GENERAL, numAAModels }; extern char *aminoAcids; diff -Nru seq-gen-1.3.3/source/eigen.c seq-gen-1.3.4/source/eigen.c --- seq-gen-1.3.3/source/eigen.c 2011-10-27 08:32:41.000000000 +0000 +++ seq-gen-1.3.4/source/eigen.c 2017-09-17 11:57:33.000000000 +0000 @@ -1,6 +1,6 @@ /* - Sequence Generator - seq-gen, version 1.3.3 - Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh The code in this file is taken from Ziheng Yang's PAML package. diff -Nru seq-gen-1.3.3/source/eigen.h seq-gen-1.3.4/source/eigen.h --- seq-gen-1.3.3/source/eigen.h 2011-10-27 08:33:30.000000000 +0000 +++ seq-gen-1.3.4/source/eigen.h 2017-09-17 11:57:33.000000000 +0000 @@ -1,8 +1,8 @@ /* Header file for eigen.c */ /* - Sequence Generator - seq-gen, version 1.3.3 - Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh The code in this file is taken from Ziheng Yang's PAML package. diff -Nru seq-gen-1.3.3/source/evolve.c seq-gen-1.3.4/source/evolve.c --- seq-gen-1.3.3/source/evolve.c 2011-10-27 08:33:55.000000000 +0000 +++ seq-gen-1.3.4/source/evolve.c 2017-09-17 11:57:33.000000000 +0000 @@ -1,6 +1,6 @@ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. @@ -76,6 +76,7 @@ void SetSiteRates(int inFromSite, int inNumSites, double inScale); void EvolveNode(TNode *anc, TNode *des, int inFromSite, int inNumSites, double scale); +void WriteFastaFormat(FILE *fv, TTree **treeSet, int *partitionLengths); void WritePhylipFormat(FILE *fv, TTree **treeSet, int *partitionLengths); void WriteNexusFormat(FILE *fv, int treeNo, int datasetNo, TTree **treeSet, int *partitionLengths); @@ -429,6 +430,9 @@ case NEXUSFormat: WriteNexusFormat(fv, treeNo, datasetNo, treeSet, partitionLengths); break; + case FASTAFormat: + WriteFastaFormat(fv, treeSet, partitionLengths); + break; } } @@ -466,6 +470,32 @@ } } +void WriteFastaFormat(FILE *fv, TTree **treeSet, int *partitionLengths) +{ + size_t i, j, k; + + for (i=0; i%s\n", treeSet[0]->names[i]); + + for (j = 0; j < numPartitions; j++) { + char *P; + P=treeSet[j]->tips[i]->sequence; + for (k=0; k k) { + modelTwoArgs = 1; } - P=st; - + model=-1; for (j=F84; j= 1.0) { fprintf(stderr, "Bad Proportion of Invariable Sites: %s\n\n", argv[i]); - exit(0); + exit(1); } invariableSites = 1; break; case 'A': if (rateHetero==CodonRates) { fprintf(stderr, "You can only have codon rates or gamma rates not both\n\n"); - exit(0); + exit(1); } if (rateHetero==NoRates) rateHetero=GammaRates; if (GetDoubleParams(argc, argv, &i, P, 1, &gammaShape) || gammaShape<=0.0) { fprintf(stderr, "Bad Gamma Shape: %s\n\n", argv[i]); - exit(0); + exit(1); } break; case 'G': if (rateHetero==CodonRates) { fprintf(stderr, "You can only have codon rates or gamma rates not both\n\n"); - exit(0); + exit(1); } rateHetero=DiscreteGammaRates; if (GetIntParams(argc, argv, &i, P, 1, &numCats) || numCats<2 || numCats>MAX_RATE_CATS) { fprintf(stderr, "Bad number of Gamma Categories: %s\n\n", argv[i]); - exit(0); + exit(1); } break; case 'F': @@ -356,7 +361,7 @@ equalFreqs = 0; if (GetDoubleParams(argc, argv, &i, P, NUM_NUC, nucFreq)) { fprintf(stderr, "Bad Nucleotide Frequencies: %s\n\n", argv[i]); - exit(0); + exit(1); } } } else { @@ -370,7 +375,7 @@ equalFreqs = 0; if (GetDoubleParams(argc, argv, &i, P, NUM_AA, aaFreq)) { fprintf(stderr, "Bad Amino Acid Frequencies: %s\n\n", argv[i]); - exit(0); + exit(1); } } } @@ -378,19 +383,19 @@ case 'T': if (model != HKY && model != F84) { fprintf(stderr, "You can only have a transition/transversion ratio when using HKY or F84 models\n\n"); - exit(0); + exit(1); } equalTstv = 0; if (GetDoubleParams(argc, argv, &i, P, 1, &tstv)) { fprintf(stderr, "Bad Transition-Transversion Ratio: %s\n\n", argv[i]); - exit(0); + exit(1); } break; case 'R': if (model == GTR) { if (GetDoubleParams(argc, argv, &i, P, NUM_NUC_REL_RATES, nucRelativeRates)) { fprintf(stderr, "Bad General Nucleotide Rate Matrix: %s\n\n", argv[i]); - exit(0); + exit(1); } if (nucRelativeRates[NUM_NUC_REL_RATES - 1]!=1.0) { for (j=0; j < NUM_NUC_REL_RATES - 1; j++) @@ -400,46 +405,46 @@ } else if ( model == GENERAL) { if (GetDoubleParams(argc, argv, &i, P, NUM_AA_REL_RATES, aaRelativeRate)) { fprintf(stderr, "Bad General Amino Acid Rate Matrix: %s\n\n", argv[i]); - exit(0); + exit(1); } } else { fprintf(stderr, "You can only have a general rate matrix when using GTR or GENERAL models\n\n"); - exit(0); + exit(1); } break; case 'D': scaleTrees=1; if (GetDoubleParams(argc, argv, &i, P, 1, &treeScale) || treeScale<=0.0) { fprintf(stderr, "Bad Total Tree Scale: %s\n\n", argv[i]); - exit(0); + exit(1); } if (scaleBranches) { fprintf(stderr, "You can't specify both the -d and -s options\n\n"); - exit(0); + exit(1); } break; case 'S': scaleBranches=1; if (GetDoubleParams(argc, argv, &i, P, 1, &branchScale) || branchScale<=0.0) { fprintf(stderr, "Bad Branch Length Scale: %s\n\n", argv[i]); - exit(0); + exit(1); } if (scaleTrees) { fprintf(stderr, "You can't specify both the -d and -s options\n\n"); - exit(0); + exit(1); } break; case 'K': if (GetIntParams(argc, argv, &i, P, 1, &ancestorSeq) || ancestorSeq<1) { fprintf(stderr, "Bad ancestral sequence number: %s\n\n", argv[i]); - exit(0); + exit(1); } break; case 'Z': userSeed = 1; if (GetUnsignedLongParams(argc, argv, &i, P, 1, &randomSeed)) { fprintf(stderr, "Bad random number generator seed: %s\n\n", argv[i]); - exit(0); + exit(1); } break; case 'O': @@ -447,10 +452,11 @@ case 'P': fileFormat=PHYLIPFormat; break; case 'R': fileFormat=RelaxedFormat; break; case 'N': fileFormat=NEXUSFormat; break; + case 'F': fileFormat=FASTAFormat; break; default: fprintf(stderr, "Unknown output format: %s\n\n", argv[i]); PrintUsage(); - exit(0); + exit(1); } break; case 'W': @@ -460,7 +466,7 @@ default: fprintf(stderr, "Unknown write mode: %s\n\n", argv[i]); PrintUsage(); - exit(0); + exit(1); } break; case 'Q': @@ -469,7 +475,7 @@ default: fprintf(stderr, "Illegal command parameter: %s\n\n", argv[i]); PrintUsage(); - exit(0); + exit(1); break; } } @@ -494,6 +500,13 @@ fputc('\n', fv); + if (hasAlignment) { + fprintf(fv, "Alignment read: numSequences = %d, numAlignmentSites = %d\n", numSequences, numAlignmentSites); + if (ancestorSeq > 0) { + fprintf(fv, "Using sequence %d as the ancestral sequence\n", ancestorSeq); + } + fputc('\n', fv); + } if (scaleTrees) { fprintf(fv, "Branch lengths of trees scaled so that tree is %G from root to tip\n\n", treeScale); @@ -560,21 +573,24 @@ hasAlignment=0; - ch=fgetc(stdin); - while (!feof(stdin) && isspace(ch)) - ch=fgetc(stdin); + ch=fgetc(tree_fv); + while (!feof(tree_fv) && isspace(ch)) { + ch=fgetc(tree_fv); + } - ungetc(ch, stdin); + ungetc(ch, tree_fv); if (ch!='(' && isdigit(ch)) { - fgets(st, 255, stdin); + fgets(st, 255, tree_fv); if ( sscanf( st, " %d %d", &numSequences, &numAlignmentSites)!=2 ) { fprintf(stderr, "Unable to read parameters from standard input\n"); - exit(0); + exit(2); } + hasAlignment=1; - } +// fprintf(stderr, "%d sequences, %d sites\n", numSequences, numAlignmentSites); + } } void AllocateMemory() @@ -597,56 +613,64 @@ n=0; do { - ch=fgetc(stdin); - while ( !feof(stdin) && isspace(ch)) - ch=fgetc(stdin); + ch=fgetc(tree_fv); + while ( !feof(tree_fv) && isspace(ch)) { + ch=fgetc(tree_fv); + } - if ( feof(stdin) ) { + if ( feof(tree_fv) ) { fprintf(stderr, "Unexpected end of file on standard input\n"); - exit(0); + exit(2); } - + i=0; - while ( i 1) { fprintf(stderr, "Writing ancestral sequences can only be used for a single partition.\n"); - exit(0); + exit(4); } if (!userSeed) @@ -711,19 +735,22 @@ if (!quiet) PrintTitle(); - if (!treeFile) { + numTrees = OpenTreeFile(); + + /* if (!treeFile) { */ ReadFileParams(); - } - + /*} */ + + if ((ancestorSeq>0 && !hasAlignment) || ancestorSeq>numSequences) { - fprintf(stderr, "Bad ancestral sequence number\n"); - exit(0); + fprintf(stderr, "Bad ancestral sequence number: %d (%d sequences loaded)\n", ancestorSeq, numSequences); + exit(4); } if (textFile) { if ( (text_fv=fopen(textFileName, "rt"))==NULL ) { fprintf(stderr, "Error opening text file for insertion into output: '%s'\n", textFileName); - exit(0); + exit(4); } } @@ -737,8 +764,8 @@ if (ancestorSeq>0) { if (numSites!=numAlignmentSites) { - fprintf(stderr, "Ancestral sequence is of a different length to the simulated sequences\n"); - exit(0); + fprintf(stderr, "Ancestral sequence is of a different length to the simulated sequences (%d)\n", numAlignmentSites); + exit(4); } ancestor=sequences[ancestorSeq-1]; } @@ -753,30 +780,28 @@ treeSet = (TTree **)malloc(sizeof(TTree **) * maxPartitions); if (treeSet==NULL) { fprintf(stderr, "Out of memory\n"); - exit(0); + exit(5); } partitionLengths = (int *)malloc(sizeof(int) * maxPartitions); if (partitionLengths==NULL) { fprintf(stderr, "Out of memory\n"); - exit(0); + exit(5); } partitionRates = (double *)malloc(sizeof(double) * maxPartitions); if (partitionRates==NULL) { fprintf(stderr, "Out of memory\n"); - exit(0); + exit(5); } for (i = 0; i < maxPartitions; i++) { if ((treeSet[i]=NewTree())==NULL) { fprintf(stderr, "Out of memory\n"); - exit(0); + exit(5); } } - - numTrees = OpenTreeFile(); - + CreateRates(); treeNo=0; @@ -798,7 +823,7 @@ } } else if (treeSet[0]->numTips != numTaxa) { fprintf(stderr, "All trees must have the same number of tips.\n"); - exit(0); + exit(4); } if (maxPartitions == 1) { @@ -815,7 +840,7 @@ if (!IsTreeAvail(tree_fv)) { fprintf(stderr, "\nA set of trees number %d had less partition length (%d) than\n", treeNo + 1, sumLength); fprintf(stderr, "was required to make a sequence of length %d.\n", numSites); - exit(0); + exit(4); } ReadTree(tree_fv, treeSet[i], treeNo+1, treeSet[0]->numTips, treeSet[0]->names, @@ -823,7 +848,7 @@ if (treeSet[i]->numTips != numTaxa) { fprintf(stderr, "All trees must have the same number of tips.\n"); - exit(0); + exit(4); } sumLength += partitionLengths[i]; @@ -838,7 +863,7 @@ if (sumLength != numSites) { fprintf(stderr, "The sum of the partition lengths in the treefile does not equal\n"); fprintf(stderr, "the specified number of sites.\n"); - exit(0); + exit(4); } for (i = 0; i < numPartitions; i++) @@ -869,7 +894,7 @@ if (scaleTrees) { if (!treeSet[j]->rooted) { fprintf(stderr, "To scale tree length, they must be rooted and ultrametric.\n"); - exit(0); + exit(4); } scale *= treeScale/treeSet[j]->totalLength; } else if (scaleBranches) diff -Nru seq-gen-1.3.3/source/treefile.c seq-gen-1.3.4/source/treefile.c --- seq-gen-1.3.3/source/treefile.c 2011-10-27 08:44:49.000000000 +0000 +++ seq-gen-1.3.4/source/treefile.c 2017-09-17 11:57:33.000000000 +0000 @@ -1,6 +1,6 @@ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. @@ -314,7 +314,7 @@ } *P='\0'; - CheckCapacity(tree, tree->numTips); + CheckCapacity(tree, tree->numTips+1); if (numNames == 0) { node->tipNo=tree->numTips; @@ -386,7 +386,7 @@ fprintf(stderr, "This tree contains nodes which aren't bifurcations. Resolve the node\n"); fprintf(stderr, "with zero branch lengths to obtain correct results. This can be done\n"); fprintf(stderr, "with a program called TreeEdit: http://evolve.zoo.ox.ac.uk/software/TreeEdit\n"); - exit(0); + exit(4); } if (feof(fv)) { @@ -475,7 +475,7 @@ if (ch == '[') { if (fscanf(fv, "%d", outNumSites)!=1) { sprintf(treeErrorMsg, "Unable to read partition length"); - exit(0); + exit(4); } ch=fgetc(fv); @@ -485,7 +485,7 @@ if (ch == ',') { if (fscanf(fv, "%lf", outRelRate)!=1) { sprintf(treeErrorMsg, "Unable to read partition relative rate"); - exit(0); + exit(4); } ch=fgetc(fv); @@ -496,7 +496,7 @@ if (ch!='(' || (tree->root=ReadNode(fv, tree, numNames, names, 0))==NULL) { fprintf(stderr, "Error reading tree number %d: %s.\n", treeNum, treeErrorMsg); - exit(0); + exit(4); } ch=fgetc(fv); @@ -507,7 +507,7 @@ tree->rooted=0; if ((tree->root->branch0=ReadBranch(fv, tree, numNames, names))==NULL) { fprintf(stderr, "Error reading tree number %d: %s.\n", treeNum, treeErrorMsg); - exit(0); + exit(4); } tree->root->branch0->branch0=tree->root; tree->root->length0=tree->root->branch0->length0; diff -Nru seq-gen-1.3.3/source/treefile.h seq-gen-1.3.4/source/treefile.h --- seq-gen-1.3.3/source/treefile.h 2011-10-27 08:37:46.000000000 +0000 +++ seq-gen-1.3.4/source/treefile.h 2017-09-17 11:57:33.000000000 +0000 @@ -1,8 +1,8 @@ /* Header file for treefile.c */ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. diff -Nru seq-gen-1.3.3/source/tree.h seq-gen-1.3.4/source/tree.h --- seq-gen-1.3.3/source/tree.h 2011-10-27 08:37:24.000000000 +0000 +++ seq-gen-1.3.4/source/tree.h 2017-09-17 11:57:33.000000000 +0000 @@ -1,8 +1,8 @@ /* Header file to define tree and node structures */ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. diff -Nru seq-gen-1.3.3/source/twister.c seq-gen-1.3.4/source/twister.c --- seq-gen-1.3.3/source/twister.c 2011-10-27 08:38:25.000000000 +0000 +++ seq-gen-1.3.4/source/twister.c 2017-09-17 11:57:33.000000000 +0000 @@ -1,6 +1,6 @@ /* - Sequence Generator - seq-gen, version 1.3.3 - 1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh The code in this file is covered by the license and copyright message diff -Nru seq-gen-1.3.3/source/twister.h seq-gen-1.3.4/source/twister.h --- seq-gen-1.3.3/source/twister.h 2011-10-27 08:39:00.000000000 +0000 +++ seq-gen-1.3.4/source/twister.h 2017-09-17 11:57:33.000000000 +0000 @@ -1,8 +1,8 @@ /* Header file for twister.c */ /* - Sequence Generator - seq-gen, version 1.3.3 - Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly + Sequence Generator - seq-gen, version 1.3.4 + Copyright (c)1996-2017, Andrew Rambaut & Nick Grassly Institute of Evolutionary Biology, University of Edinburgh All rights reserved. Binary files /tmp/tmpWKtlHd/8SnMseuARa/seq-gen-1.3.3/Version_History and /tmp/tmpWKtlHd/D_LJTmiMbA/seq-gen-1.3.4/Version_History differ