[med-svn] [seq-gen] 01/06: New upstream version 1.3.3+git4a8cc9d.ds

Alex Mestiashvili malex-guest at moszumanska.debian.org
Mon Sep 11 14:26:58 UTC 2017


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

malex-guest pushed a commit to branch master
in repository seq-gen.

commit 8cfb759000dbe96d0d5f53b224a16a7c96221341
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Mon Sep 11 15:56:04 2017 +0200

    New upstream version 1.3.3+git4a8cc9d.ds
---
 source/aamodels.c  | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 source/aamodels.h  | 12 ++++----
 source/eigen.c     | 12 ++++----
 source/eigen.h     | 10 +++----
 source/evolve.c    | 47 +++++++++++++++++++++++++----
 source/evolve.h    | 13 ++++----
 source/gamma.c     | 10 +++----
 source/gamma.h     | 10 +++----
 source/global.c    | 10 +++----
 source/global.h    | 10 +++----
 source/model.c     | 14 +++++----
 source/model.h     | 12 ++++----
 source/nucmodels.c | 10 +++----
 source/nucmodels.h | 10 +++----
 source/progress.c  | 10 +++----
 source/progress.h  | 10 +++----
 source/seq-gen.c   | 20 +++++++------
 source/tree.h      | 10 +++----
 source/treefile.c  | 17 ++++++-----
 source/treefile.h  | 10 +++----
 source/twister.c   | 12 ++++----
 source/twister.h   | 12 ++++----
 22 files changed, 246 insertions(+), 123 deletions(-)

diff --git a/source/aamodels.c b/source/aamodels.c
index a924c44..3337ff4 100755
--- a/source/aamodels.c
+++ b/source/aamodels.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
  
 #include <stdio.h>
@@ -122,6 +122,35 @@ static double wagFrequencies[NUM_AA] = {
 	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,*/
@@ -236,11 +265,50 @@ static double cprevFrequencies[NUM_AA] = {
 	0.076, 0.062, 0.041, 0.037, 0.009, 0.038, 0.049, 0.084, 0.025, 0.081, 0.101, 0.050, 0.022, 0.051, 0.043, 0.062, 0.054, 0.018, 0.031, 0.066
 };
 
+/*
+MtArt model inserted in following
+
+7 Oct 2011 -- Lars Jermiin (lars.jermiin at csiro.au)
+*/
+
+/* MtArt: A New Model of Amino Acid Replacement for Arthropoda */
+/* Abascal, F., Posada, D., and Zardoya, R. 2007. Mol. Biol. Evol. 24:1-5. */
+static double mtartRelativeRates[NUM_AA_REL_RATES] = {
+	0.19, 0.19, 0.59, 253.51, 0.19, 0.19, 199.84, 0.19, 25.69, 3.70, 0.19, 120.64, 13.10, 49.33, 672.97, 243.93, 0.19, 1.18, 339.91,
+	0.19, 4.28, 35.51, 153.97, 0.19, 0.19, 41.30, 1.81, 1.77, 208.60, 5.18, 4.73, 0.19, 2.66, 0.19, 0.19, 3.88, 0.19,
+	500.16, 98.18, 261.79, 183.04, 120.53, 179.54, 21.33, 12.65, 467.34, 78.81, 19.72, 16.54, 398.43, 165.89, 7.73, 251.17, 22.60,
+	10.61, 0.19, 861.83, 12.46, 0.19, 6.60, 1.17, 1.68, 0.19, 0.19, 0.19, 44.35, 0.19, 0.19, 0.19, 0.19,
+	0.19, 0.19, 80.53, 12.37, 63.00, 78.71, 0.19, 312.30, 184.06, 0.19, 664.16, 182.80, 21.61, 71.99, 350.40,
+	261.55, 2.64, 313.50, 10.54, 16.28, 349.28, 67.33, 0.19, 39.30, 52.36, 43.68, 6.68, 86.67, 0.19,
+	43.86, 15.25, 6.81, 1.72, 106.31, 0.19, 0.19, 7.88, 31.50, 43.40, 10.99, 7.74, 13.63,
+	0.19, 2.74, 1.36, 0.19, 55.71, 0.83, 0.19, 226.03, 0.19, 1.88, 8.65, 2.56,
+	0.19, 5.54, 0.19, 0.19, 13.78, 0.79, 10.62, 18.59, 0.19, 191.43, 0.19,
+	514.54, 3.46, 514.78, 117.91, 0.19, 7.15, 203.74, 0.19, 12.33, 1854.52,
+	3.78, 885.50, 262.57, 12.17, 8.17, 47.75, 21.13, 19.76, 84.72,
+	105.61, 10.73, 16.82, 144.22, 69.54, 15.97, 117.09, 26.06,
+	321.61, 5.26, 111.74, 288.57, 70.68, 70.92, 281.29,
+	14.62, 36.05, 13.54, 53.67, 791.56, 51.90,
+	86.50, 46.83, 0.19, 18.39, 31.70,
+	660.39, 2.38, 30.45, 60.59,
+	0.19, 45.98, 544.14,
+	37.72, 0.19,
+	1.59
+};
+
+static double mtartFrequencies[NUM_AA] = {
+	0.054116, 0.018227, 0.039903, 0.020160, 0.009709, 0.018781, 0.024289, 0.068183, 0.024518, 0.092639, 0.148658, 0.021718, 0.061453, 0.088668, 0.041826, 0.091030, 0.049194, 0.029786, 0.039443, 0.057701
+};
+
 /*************************************/
 void SetAAModel(int theAAModel)
 {	
 	aaModel = theAAModel;
 	
+/*
+"AA_MTART" inserted in position 6 of the following switch
+ 
+7 Oct 2011 -- Lars Jermiin (lars.jermiin at csiro.au)
+*/
 	switch (aaModel) {
 		case AA_JTT: SetRelativeRates(jttRelativeRates); break;
 		case AA_WAG: SetRelativeRates(wagRelativeRates); break;
@@ -248,10 +316,18 @@ void SetAAModel(int theAAModel)
 		case AA_BLOSUM62: SetRelativeRates(blosumRelativeRates); break;
 		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;
 	}
+
+/*
+"AA_MTART" inserted in position 6 of the following switch
+ 
+7 Oct 2011 -- Lars Jermiin (lars.jermiin at csiro.au)
+*/
 		
 	if (!aaFreqSet) {
 		switch (aaModel) {
@@ -261,6 +337,8 @@ void SetAAModel(int theAAModel)
 			case AA_BLOSUM62: SetFrequencies(blosumFrequencies); break;
 			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 --git a/source/aamodels.h b/source/aamodels.h
index 99c77b2..815d392 100755
--- a/source/aamodels.h
+++ b/source/aamodels.h
@@ -1,9 +1,9 @@
 /*  Header file for aamodels.c                             */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _AA_MODELS_H_
@@ -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_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 --git a/source/eigen.c b/source/eigen.c
index df51bf4..4525c0f 100755
--- a/source/eigen.c
+++ b/source/eigen.c
@@ -1,16 +1,16 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
+   Sequence Generator - seq-gen, version 1.3.3
    Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
-	
+   Institute of Evolutionary Biology, University of Edinburgh			
+
    The code in this file is taken from Ziheng Yang's PAML package.
    http://abacus.gene.ucl.ac.uk/
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
-
+	
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
diff --git a/source/eigen.h b/source/eigen.h
index 3f8bf41..c23ac5c 100755
--- a/source/eigen.h
+++ b/source/eigen.h
@@ -1,16 +1,16 @@
 /*  Header file for eigen.c                                */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
+   Sequence Generator - seq-gen, version 1.3.3
    Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
-	
+   Institute of Evolutionary Biology, University of Edinburgh			
+
    The code in this file is taken from Ziheng Yang's PAML package.
    http://abacus.gene.ucl.ac.uk/
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _EIGEN_H_
diff --git a/source/evolve.c b/source/evolve.c
index 18b1b60..559bdd5 100755
--- a/source/evolve.c
+++ b/source/evolve.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
@@ -76,6 +76,7 @@ void MutateSequence(char *seq, int inFromSite, int inNumSites, double len);
 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);
 
@@ -145,6 +146,11 @@ void SetCategories()
 	} 
 }
 
+/*
+Changed "j<numStates" to "j<numStates-1" in the following function to prevent array overflow
+
+20 October 2011 -- Michael Ott, CSIRO (michael.ott at csiro.au)
+*/
 
 char SetState(double *P)
 {
@@ -152,7 +158,7 @@ char SetState(double *P)
 	double r;
 	
 	r=rndu();
-	for (j=0; r>(*P) && j<numStates; j++) P++;
+	for (j=0; r>(*P) && j<numStates-1; j++) P++;
 	return j;
 }
 
@@ -424,6 +430,9 @@ void WriteSequences(FILE *fv, int treeNo, int datasetNo, TTree **treeSet, int *p
 		case NEXUSFormat:
 			WriteNexusFormat(fv, treeNo, datasetNo, treeSet, partitionLengths);
 		break;
+		case FASTAFormat:
+			WriteFastaFormat(fv, treeSet, partitionLengths);
+		break;
 	}
 }
 
@@ -461,6 +470,32 @@ void WritePhylipFormat(FILE *fv, TTree **treeSet, int *partitionLengths)
 	}
 }
 
+void WriteFastaFormat(FILE *fv, TTree **treeSet, int *partitionLengths)
+{
+	size_t i, j, k;
+
+	for (i=0; i<numTaxa; i++) {
+		size_t printedSites = 0;
+
+		fprintf(fv, ">%s\n", treeSet[0]->names[i]);
+
+		for (j = 0; j < numPartitions; j++) {
+			char *P;
+			P=treeSet[j]->tips[i]->sequence;
+			for (k=0; k<partitionLengths[j]; k++) {
+				fputc(stateCharacters[(int)*P], fv);
+				P++;
+				if (++printedSites % 72 == 0) {
+					fputc('\n', fv);
+				}
+			}
+		}
+		if (printedSites % 72 != 0) {
+			fputc('\n', fv);
+		}
+	}
+}
+
 void WriteNexusFormat(FILE *fv, int treeNo, int datasetNo, TTree **treeSet, int *partitionLengths)
 {
 	int i, j, k, len, maxLen;
diff --git a/source/evolve.h b/source/evolve.h
index 18e503c..7f71fb5 100755
--- a/source/evolve.h
+++ b/source/evolve.h
@@ -1,9 +1,9 @@
 /*  Header file for evolve.c                               */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 
@@ -63,7 +63,8 @@ enum {
 enum {
 	PHYLIPFormat,
 	RelaxedFormat,
-	NEXUSFormat
+	NEXUSFormat,
+	FASTAFormat
 };
 
 /* prototypes */
diff --git a/source/gamma.c b/source/gamma.c
index 2fe40bb..7d5f36e 100755
--- a/source/gamma.c
+++ b/source/gamma.c
@@ -1,14 +1,14 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
+   Sequence Generator - seq-gen, version 1.3.3
    Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
-	
+   Institute of Evolutionary Biology, University of Edinburgh			
+
    The code in this file is taken from Ziheng Yang's PAML package.
    http://abacus.gene.ucl.ac.uk/
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <math.h>
diff --git a/source/gamma.h b/source/gamma.h
index 93de839..a98bf60 100755
--- a/source/gamma.h
+++ b/source/gamma.h
@@ -1,16 +1,16 @@
 /*  Header file for gamma.c                                */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
+   Sequence Generator - seq-gen, version 1.3.3
    Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
-	
+   Institute of Evolutionary Biology, University of Edinburgh			
+
    The code in this file is taken from Ziheng Yang's PAML package.
    http://abacus.gene.ucl.ac.uk/
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _GAMMA_H_
diff --git a/source/global.c b/source/global.c
index b931538..3739d44 100755
--- a/source/global.c
+++ b/source/global.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
diff --git a/source/global.h b/source/global.h
index 5a72881..16bdef2 100755
--- a/source/global.h
+++ b/source/global.h
@@ -1,9 +1,9 @@
 /*  Header file for global.c                               */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _GLOBAL_H_
diff --git a/source/model.c b/source/model.c
index 3accbec..c148114 100755
--- a/source/model.c
+++ b/source/model.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
@@ -56,6 +56,8 @@ char *modelNames[numModels]={
 	"BLOSUM",
 	"MTREV",
 	"CPREV",
+	"MTART",
+	"LG",
 	"GENERAL"
 };
 
@@ -69,6 +71,8 @@ char *modelTitles[numModels]={
 	"BLOSUM62: Henikoff & Henikoff (1992) PNAS USA 89:10915-10919",
 	"MTREV24: Adachi & Hasegawa (1996) J Mol Evol 42:459-468",
 	"CPREV45: Adachi et al. (2000) J Mol Evol 50:348-358",
+	"MTART: Abascal et al. (2007) Mol Biol Evol 24:1-5",
+	"LG: Le & Gascuel (2008) Mol Biol Evol 25:1307-1320",
 	"GENERAL: General time reversible (amino acids)"
 };
 
diff --git a/source/model.h b/source/model.h
index 0927766..e3a755a 100755
--- a/source/model.h
+++ b/source/model.h
@@ -1,9 +1,9 @@
 /*  Header file for model.c                                */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _MODEL_H_
@@ -44,7 +44,7 @@
 
 extern char *stateCharacters;
 
-enum { NONE=-1, F84, HKY, GTR, JTT, WAG, PAM, BLOSUM, MTREV, CPREV, GENERAL, numModels };
+enum { NONE=-1, F84, HKY, GTR, JTT, WAG, PAM, BLOSUM, MTREV, CPREV, MTART, LG, GENERAL, numModels };
 
 extern char *modelNames[numModels];
 extern char *modelTitles[numModels];
diff --git a/source/nucmodels.c b/source/nucmodels.c
index 0bdec6b..7345b2b 100755
--- a/source/nucmodels.c
+++ b/source/nucmodels.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
diff --git a/source/nucmodels.h b/source/nucmodels.h
index e83af33..21d5568 100755
--- a/source/nucmodels.h
+++ b/source/nucmodels.h
@@ -1,9 +1,9 @@
 /*  Header file for nucmodels.c                            */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _NUC_MODELS_H_
diff --git a/source/progress.c b/source/progress.c
index 38b06a7..e484294 100755
--- a/source/progress.c
+++ b/source/progress.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
diff --git a/source/progress.h b/source/progress.h
index af5f14d..b97d0ae 100755
--- a/source/progress.h
+++ b/source/progress.h
@@ -1,9 +1,9 @@
 /*  Header file for progress.c                             */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
  
 #ifndef _PROGRESS_H_
diff --git a/source/seq-gen.c b/source/seq-gen.c
index 70c8480..4372408 100755
--- a/source/seq-gen.c
+++ b/source/seq-gen.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
@@ -54,7 +54,7 @@
 #include "twister.h"
 
 #define PROGRAM_NAME "seq-gen"
-#define VERSION_NUMBER "Version 1.3.2"
+#define VERSION_NUMBER "Version 1.3.2x"
 
 int treeFile, textFile, numDatasets, numTrees;
 int scaleTrees, scaleBranches, ancestorSeq, writeAncestors, writeRates;
@@ -95,7 +95,7 @@ static void PrintTitle()
 static void PrintUsage()
 { 
 	fprintf(stderr, "Usage: seq-gen [-m MODEL] [-l #] [-n #] [-p #] [-s # | -d #] [-k #]\n");
-	fprintf(stderr, "               [-c #1 #2 #3 | -a # [-g #]] [-f e | #] [-t # | -r #]\n");
+	fprintf(stderr, "               [-c #1 #2 #3 | -a # [-g #]] [-i #] [-f e | #] [-t # | -r #]\n");
 	fprintf(stderr, "               [-z #] [-o[p][r][n]] [-w[a][r]] [-x NAME] [-q] [-h] [treefile]\n");
 	fprintf(stderr, "  -l: # = sequence length [default = 1000].\n");
 	fprintf(stderr, "  -n: # = simulated datasets per tree [default = 1].\n");
@@ -105,13 +105,13 @@ static void PrintUsage()
 	fprintf(stderr, "  -k: # = use sequence k as ancestral (needs alignment) [default = random].\n");
 
 	fprintf(stderr, "\n Substitution model options:\n");
-	fprintf(stderr, "  -m: MODEL = HKY, F84, GTR, JTT, WAG, PAM, BLOSUM, MTREV, GENERAL\n");
+	fprintf(stderr, "  -m: MODEL = HKY, F84, GTR, JTT, WAG, PAM, BLOSUM, MTREV, CPREV45, MTART, LG, GENERAL\n");
 	fprintf(stderr, "      HKY, F84 & GTR are for nucleotides the rest are for amino acids\n");
 	fprintf(stderr, "  -a: # = shape (alpha) for gamma rate heterogeneity [default = none].\n");
 	fprintf(stderr, "  -g: # = number of gamma rate categories [default = continuous].\n");
 	fprintf(stderr, "  -i: # = proportion of invariable sites [default = 0.0].\n");
 
-	fprintf(stderr, "\n Nucleotid model specific options:\n");
+	fprintf(stderr, "\n Nucleotide model specific options:\n");
 	fprintf(stderr, "  -c: #1 #2 #3 = rates for codon position heterogeneity [default = none].\n");
 	fprintf(stderr, "  -t: # = transition-transversion ratio [default = equal rate].\n");
 	fprintf(stderr, "  -r: #1 #2 #3 #4 #5 #6= general rate matrix [default = all 1.0].\n");
@@ -128,6 +128,7 @@ static void PrintUsage()
 	fprintf(stderr, "    p PHYLIP format\n");
 	fprintf(stderr, "    r relaxed PHYLIP format\n");
 	fprintf(stderr, "    n NEXUS format\n");
+	fprintf(stderr, "    f FASTA format\n");
 	fprintf(stderr, "  -w: Write additional information [default = none]\n");
 	fprintf(stderr, "    a Write ancestral sequences for each node\n");
 	fprintf(stderr, "    r Write rate for each site\n");
@@ -447,6 +448,7 @@ void ReadParams(int argc, char **argv)
 						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();
diff --git a/source/tree.h b/source/tree.h
index 2d0113b..e1c564e 100755
--- a/source/tree.h
+++ b/source/tree.h
@@ -1,9 +1,9 @@
 /*  Header file to define tree and node structures         */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
  
 #ifndef _TREE_H_
diff --git a/source/treefile.c b/source/treefile.c
index 90b46da..e42b597 100755
--- a/source/treefile.c
+++ b/source/treefile.c
@@ -1,7 +1,7 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #include <stdio.h>
@@ -127,6 +127,7 @@ TTree *NewTree()
 		strcpy(treeErrorMsg, "Out of memory creating tree.");
 		return NULL;
 	}
+	memset(tree, 0, sizeof(TTree)); /* grj */
 	tree->capacity=0;
 	CheckCapacity(tree, 1000);
 	
@@ -161,8 +162,8 @@ void CheckCapacity(TTree *tree, int required)
 		newTips[i] = NULL;
 	}
 	
-	free(tree->names);
-	free(tree->tips);
+	if (tree->names) { free(tree->names); tree->names=0; } /* grj */
+	if (tree->tips) { free(tree->tips); tree->tips = 0; } /* grj */
 	
 	tree->names = newNames;
 	tree->tips = newTips;
@@ -313,7 +314,7 @@ TNode *ReadTip(FILE *fv, char ch, TTree *tree, int numNames, char **names)
 	}
 	*P='\0';
 
-	CheckCapacity(tree, tree->numTips);
+	CheckCapacity(tree, tree->numTips+1);
 	
 	if (numNames == 0) {
 		node->tipNo=tree->numTips;
diff --git a/source/treefile.h b/source/treefile.h
index 275d2ed..1e02fa4 100755
--- a/source/treefile.h
+++ b/source/treefile.h
@@ -1,9 +1,9 @@
 /*  Header file for treefile.c                             */
 
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _TREEFILE_H_
diff --git a/source/twister.c b/source/twister.c
index 860bc4d..07e90ca 100755
--- a/source/twister.c
+++ b/source/twister.c
@@ -1,14 +1,14 @@
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
 	
    The code in this file is covered by the license and copyright message
    given below.
-   
+
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 /* 
diff --git a/source/twister.h b/source/twister.h
index 6d378c0..1e544b4 100755
--- a/source/twister.h
+++ b/source/twister.h
@@ -1,7 +1,9 @@
+/*  Header file for twister.c                             */
+
 /*  
-   Sequence Generator - seq-gen, version 1.3.2
-   Copyright (c)1996-2004, Andrew Rambaut & Nick Grassly
-   Department of Zoology, University of Oxford			
+   Sequence Generator - seq-gen, version 1.3.3
+   Copyright (c)1996-2011, Andrew Rambaut & Nick Grassly
+   Institute of Evolutionary Biology, University of Edinburgh			
    All rights reserved.                          
 
    Redistribution and use in source and binary forms, with or without
@@ -33,8 +35,8 @@
 
 
    Any feedback is very welcome.
-   http://evolve.zoo.ox.ac.uk/software/Seq-Gen/
-   email: andrew.rambaut at zoo.ox.ac.uk
+   http://tree.bio.ed.ac.uk/software/seqgen/
+   email: a.rambaut at ed.ac.uk
 */
 
 #ifndef _TWISTER_H_

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



More information about the debian-med-commit mailing list