[med-svn] [paml] 01/03: New upstream version 4.9c+dfsg

Andreas Tille tille at debian.org
Thu Oct 6 03:57:23 UTC 2016


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

tille pushed a commit to branch master
in repository paml.

commit 4fa6da4d3c23618274e179b8cdb5bd074a41c31e
Author: Andreas Tille <tille at debian.org>
Date:   Thu Oct 6 05:51:53 2016 +0200

    New upstream version 4.9c+dfsg
---
 3s.trees                                           |   0
 4s.trees                                           |   0
 5s.trees                                           |   0
 6s.trees                                           |   0
 GeneticCode.txt                                    |   0
 MCaa.dat                                           |   0
 MCbase.dat                                         |   0
 MCbaseRandomTree.dat                               |   0
 MCcodon.dat                                        |   0
 README.txt                                         |   0
 Technical/Pt/testPMat.c                            |   0
 Technical/Simulation/Codon/MCcodonNSbranches.dat   |   0
 .../Simulation/Codon/MCcodonNSbranchsites.dat      |   0
 Technical/Simulation/Codon/MCcodonNSclade.dat      |   0
 Technical/Simulation/Codon/MCcodonNSsites.dat      |   0
 Technical/Simulation/Codon/PositiveSites.c         |   0
 Technical/Simulation/Codon/README.txt              |   0
 Technical/Simulation/Codon/codeml.ctl              |   0
 Technical/Simulation/multiruns.c                   |   0
 Technical/Simulation/multiruns.txt                 |   0
 aaml.ctl                                           |   0
 baseml.ctl                                         |   0
 brown.nuc                                          |   0
 brown.rooted.trees                                 |   0
 brown.trees                                        |   0
 codeml.ctl                                         |   0
 codonml.ctl                                        |   0
 dat/MtZoa.dat                                      |   0
 dat/cpREV10.dat                                    |   0
 dat/cpREV64.dat                                    |   0
 dat/dayhoff-dcmut.dat                              |   0
 dat/dayhoff.dat                                    |   0
 dat/g1974a.dat                                     |   0
 dat/g1974c.dat                                     |   0
 dat/g1974p.dat                                     |   0
 dat/g1974v.dat                                     |   0
 dat/grantham.dat                                   |   0
 dat/jones-dcmut.dat                                |   0
 dat/jones.dat                                      |   0
 dat/lg.dat                                         |   0
 dat/miyata.dat                                     |   0
 dat/mtArt.dat                                      |   0
 dat/mtREV24.dat                                    |   0
 dat/mtmam.dat                                      |   0
 dat/wag.dat                                        |   0
 doc/pamlHistory.txt                                |  14 +++
 examples/9s.trees                                  |   0
 examples/CladeModelCD/ECP_EDN_15.nuc               |   0
 examples/CladeModelCD/codeml.CladeC.ctl            |   0
 examples/CladeModelCD/codeml.CladeD.ctl            |   0
 examples/CladeModelCD/tree.txt                     |   0
 examples/DatingSoftBound/FixedDsClock23.txt        |   0
 examples/DatingSoftBound/README.txt                |   0
 .../DatingSoftBound/mcmctree.Infinitesites.ctl     |   0
 examples/DatingSoftBound/mcmctree.ctl              |   0
 examples/DatingSoftBound/mtCDNApri.trees           |   0
 examples/DatingSoftBound/mtCDNApri123.txt          |   0
 examples/HIVNSsites/HIVenvSweden.trees             |   0
 examples/HIVNSsites/HIVenvSweden.txt               |   0
 examples/HIVNSsites/HIVenvSweden4s.trees           |   0
 examples/HIVNSsites/HIVenvSweden4s.txt             |   0
 examples/HIVNSsites/README.txt                     |   0
 examples/HIVNSsites/codeml.ctl                     |   0
 examples/MHC.Swanson2002MBE/README.txt             |   0
 examples/MHC.Swanson2002MBE/bigmhc.phy             |   0
 examples/MHC.Swanson2002MBE/bigmhc.trees           |   0
 examples/MHC.Swanson2002MBE/codeml.ctl             |   0
 examples/MouseLemurs/MouseLemurs.aa                |   0
 examples/MouseLemurs/MouseLemurs.nuc               |   0
 examples/MouseLemurs/MouseLemurs.trees             |   0
 examples/MouseLemurs/MouseLemurs123.nuc            |   0
 examples/MouseLemurs/README.txt                    |   0
 examples/MouseLemurs/README2.txt                   |   0
 examples/MouseLemurs/aaml.ctl                      |   0
 examples/MouseLemurs/aaml2.ctl                     |   0
 examples/MouseLemurs/baseml.ctl                    |   0
 examples/MouseLemurs/baseml2.ctl                   |   0
 examples/MouseLemurs/codeml.ctl                    |   0
 examples/MouseLemurs/codonml.ctl                   |   0
 examples/MouseLemurs/codonml2.ctl                  |   0
 examples/MouseLemurs/mtmam.dat                     |   0
 examples/README.txt                                |   0
 examples/TipDate.FluH1/H1.Beast.Nulldata.xml       |   0
 examples/TipDate.FluH1/H1.Beast.xml                |   0
 examples/TipDate.FluH1/H1.NodeNumbers.tre          |   0
 examples/TipDate.FluH1/H1.nexus                    |   0
 examples/TipDate.FluH1/H1.tre                      |   0
 examples/TipDate.FluH1/H1.txt                      |   0
 examples/TipDate.FluH1/baseml.ctl                  |   0
 examples/TipDate.FluH1/commands.txt                |   0
 examples/TipDate.FluH1/in.BV.HKYG5                 |   0
 examples/TipDate.FluH1/mcmctreeClock1.ctl          |   0
 examples/TipDate.FluH1/mcmctreeClock2.ctl          |   0
 examples/TipDate.FluH1/mcmctreeClock3.ctl          |   0
 examples/TipDate.HIV2/HIV2ge.tre                   |   0
 examples/TipDate.HIV2/HIV2ge.txt                   |   0
 examples/TipDate.HIV2/README.txt                   |   0
 examples/TipDate.HIV2/baseml.ctl                   |   0
 examples/TipDate.HIV2/in.BV.HKYG5                  |   0
 examples/TipDate.HIV2/mcmctree.ExactlnL.ctl        |   0
 examples/TipDate.HIV2/mcmctree.ctl                 |   0
 examples/YN00abglobin.result                       |   0
 examples/abglobin.aa                               |   0
 examples/abglobin.nuc                              |   0
 examples/abglobin.trees                            |   0
 examples/dNdSGene1.nuc                             |   0
 examples/horai.nuc                                 |   0
 examples/horai.trees                               |   0
 examples/lysin/README.txt                          |   0
 examples/lysin/RasMol.txt                          |   0
 examples/lysin/SiteNumbering.txt                   |   0
 examples/lysin/codeml.ctl                          |   0
 examples/lysin/codemlYangSwanson2002.ctl           |   0
 examples/lysin/lysin.nuc                           |   0
 examples/lysin/lysin.trees                         |   0
 examples/lysin/lysinYangSwanson2002.nuc            |   0
 examples/lysozyme/README.txt                       |   0
 examples/lysozyme/codeml.ctl                       |   4 +-
 examples/lysozyme/lysozymeLarge.ctl                |   0
 examples/lysozyme/lysozymeLarge.nuc                |   0
 examples/lysozyme/lysozymeLarge.trees              |   0
 examples/lysozyme/lysozymeSmall.ctl                |   0
 examples/lysozyme/lysozymeSmall.nuc                |   0
 examples/lysozyme/lysozymeSmall.trees              |   0
 examples/lysozyme/lysozymeSmall.txt                |   0
 examples/mtCDNA/README.txt                         |   0
 examples/mtCDNA/codeml.ctl                         |   0
 examples/mtCDNA/miyata.dat                         |   0
 examples/mtCDNA/mtCDNAmam.nuc                      |   0
 examples/mtCDNA/mtCDNAmam.trees                    |   0
 examples/mtCDNA/mtCDNApri.aa                       |   0
 examples/mtCDNA/mtCDNApri.nuc                      |   0
 examples/mtCDNA/mtCDNApri.trees                    |   0
 examples/mtCDNAape/2s.trees                        |   0
 examples/mtCDNAape/OmegaAA.dat                     |   0
 examples/mtCDNAape/README.txt                      |   0
 examples/mtCDNAape/codeml.HC.ctl                   |   0
 examples/mtCDNAape/codeml.ctl                      |   2 +-
 examples/mtCDNAape/mtCDNA.HC.txt                   |   0
 examples/mtCDNAape/mtCDNAape.trees                 |   0
 examples/mtCDNAape/mtCDNAape.txt                   |   0
 examples/mtprim9.nuc                               |   0
 mcmctree.ctl                                       |   0
 pamp.ctl                                           |   0
 paupblock                                          |   0
 paupend                                            |   0
 paupstart                                          |   0
 src/Makefile                                       |   0
 src/Makefile.MSVC                                  |   0
 src/README.txt                                     |  11 +-
 src/TreeTimeJeff.c                                 |   0
 src/baseml.c                                       |   0
 src/basemlg.c                                      |   0
 src/chi2.c                                         |   0
 src/codeml.c                                       |  25 ++---
 src/ds.c                                           |   0
 src/evolver.c                                      |   0
 src/mcmctree.c                                     |   0
 src/paml.h                                         |   5 +-
 src/pamp.c                                         |   0
 src/tools.c                                        | 117 ++++++++++++---------
 src/treespace.c                                    |   0
 src/treesub.c                                      | 111 ++++++++++++-------
 src/yn00.c                                         |   0
 stewart.aa                                         |   0
 stewart.trees                                      |   0
 yn00.ctl                                           |   0
 167 files changed, 180 insertions(+), 109 deletions(-)

diff --git a/3s.trees b/3s.trees
old mode 100755
new mode 100644
diff --git a/4s.trees b/4s.trees
old mode 100755
new mode 100644
diff --git a/5s.trees b/5s.trees
old mode 100755
new mode 100644
diff --git a/6s.trees b/6s.trees
old mode 100755
new mode 100644
diff --git a/GeneticCode.txt b/GeneticCode.txt
old mode 100755
new mode 100644
diff --git a/MCaa.dat b/MCaa.dat
old mode 100755
new mode 100644
diff --git a/MCbase.dat b/MCbase.dat
old mode 100755
new mode 100644
diff --git a/MCbaseRandomTree.dat b/MCbaseRandomTree.dat
old mode 100755
new mode 100644
diff --git a/MCcodon.dat b/MCcodon.dat
old mode 100755
new mode 100644
diff --git a/README.txt b/README.txt
old mode 100755
new mode 100644
diff --git a/Technical/Pt/testPMat.c b/Technical/Pt/testPMat.c
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/MCcodonNSbranches.dat b/Technical/Simulation/Codon/MCcodonNSbranches.dat
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/MCcodonNSbranchsites.dat b/Technical/Simulation/Codon/MCcodonNSbranchsites.dat
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/MCcodonNSclade.dat b/Technical/Simulation/Codon/MCcodonNSclade.dat
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/MCcodonNSsites.dat b/Technical/Simulation/Codon/MCcodonNSsites.dat
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/PositiveSites.c b/Technical/Simulation/Codon/PositiveSites.c
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/README.txt b/Technical/Simulation/Codon/README.txt
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/Codon/codeml.ctl b/Technical/Simulation/Codon/codeml.ctl
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/multiruns.c b/Technical/Simulation/multiruns.c
old mode 100755
new mode 100644
diff --git a/Technical/Simulation/multiruns.txt b/Technical/Simulation/multiruns.txt
old mode 100755
new mode 100644
diff --git a/aaml.ctl b/aaml.ctl
old mode 100755
new mode 100644
diff --git a/baseml.ctl b/baseml.ctl
old mode 100755
new mode 100644
diff --git a/brown.nuc b/brown.nuc
old mode 100755
new mode 100644
diff --git a/brown.rooted.trees b/brown.rooted.trees
old mode 100755
new mode 100644
diff --git a/brown.trees b/brown.trees
old mode 100755
new mode 100644
diff --git a/codeml.ctl b/codeml.ctl
old mode 100755
new mode 100644
diff --git a/codonml.ctl b/codonml.ctl
old mode 100755
new mode 100644
diff --git a/dat/MtZoa.dat b/dat/MtZoa.dat
old mode 100755
new mode 100644
diff --git a/dat/cpREV10.dat b/dat/cpREV10.dat
old mode 100755
new mode 100644
diff --git a/dat/cpREV64.dat b/dat/cpREV64.dat
old mode 100755
new mode 100644
diff --git a/dat/dayhoff-dcmut.dat b/dat/dayhoff-dcmut.dat
old mode 100755
new mode 100644
diff --git a/dat/dayhoff.dat b/dat/dayhoff.dat
old mode 100755
new mode 100644
diff --git a/dat/g1974a.dat b/dat/g1974a.dat
old mode 100755
new mode 100644
diff --git a/dat/g1974c.dat b/dat/g1974c.dat
old mode 100755
new mode 100644
diff --git a/dat/g1974p.dat b/dat/g1974p.dat
old mode 100755
new mode 100644
diff --git a/dat/g1974v.dat b/dat/g1974v.dat
old mode 100755
new mode 100644
diff --git a/dat/grantham.dat b/dat/grantham.dat
old mode 100755
new mode 100644
diff --git a/dat/jones-dcmut.dat b/dat/jones-dcmut.dat
old mode 100755
new mode 100644
diff --git a/dat/jones.dat b/dat/jones.dat
old mode 100755
new mode 100644
diff --git a/dat/lg.dat b/dat/lg.dat
old mode 100755
new mode 100644
diff --git a/dat/miyata.dat b/dat/miyata.dat
old mode 100755
new mode 100644
diff --git a/dat/mtArt.dat b/dat/mtArt.dat
old mode 100755
new mode 100644
diff --git a/dat/mtREV24.dat b/dat/mtREV24.dat
old mode 100755
new mode 100644
diff --git a/dat/mtmam.dat b/dat/mtmam.dat
old mode 100755
new mode 100644
diff --git a/dat/wag.dat b/dat/wag.dat
old mode 100755
new mode 100644
diff --git a/doc/pamlHistory.txt b/doc/pamlHistory.txt
index e2a9e82..87fb1c2 100644
--- a/doc/pamlHistory.txt
+++ b/doc/pamlHistory.txt
@@ -9,6 +9,20 @@ https://groups.google.com/forum/#!forum/pamlsoftware.
 
 
 
+Version 4.9c, September 2016
+
+(*) Added GPL license statement in various places.
+
+(*) codeml.  When two or more trees are in the tree file and the
+specified model is the branch model, the program counts the number of
+parameters correctly only for the first tree.  For the second or later
+trees, it overcounts the parameters in the model.  The lnL and
+parameter estimates are still correct, but the printed values for the
+extra parameters are more or less random numbers and vary among
+different runs of the same analysis.  The bug was introduced in
+version 4.7a and affects the versions since then until 4.9b.  It is
+now fixed.  Thanks to Casey Bergman.
+
 
 
 Version 4.9b, March 2016
diff --git a/examples/9s.trees b/examples/9s.trees
old mode 100755
new mode 100644
diff --git a/examples/CladeModelCD/ECP_EDN_15.nuc b/examples/CladeModelCD/ECP_EDN_15.nuc
old mode 100755
new mode 100644
diff --git a/examples/CladeModelCD/codeml.CladeC.ctl b/examples/CladeModelCD/codeml.CladeC.ctl
old mode 100755
new mode 100644
diff --git a/examples/CladeModelCD/codeml.CladeD.ctl b/examples/CladeModelCD/codeml.CladeD.ctl
old mode 100755
new mode 100644
diff --git a/examples/CladeModelCD/tree.txt b/examples/CladeModelCD/tree.txt
old mode 100755
new mode 100644
diff --git a/examples/DatingSoftBound/FixedDsClock23.txt b/examples/DatingSoftBound/FixedDsClock23.txt
old mode 100755
new mode 100644
diff --git a/examples/DatingSoftBound/README.txt b/examples/DatingSoftBound/README.txt
old mode 100755
new mode 100644
diff --git a/examples/DatingSoftBound/mcmctree.Infinitesites.ctl b/examples/DatingSoftBound/mcmctree.Infinitesites.ctl
old mode 100755
new mode 100644
diff --git a/examples/DatingSoftBound/mcmctree.ctl b/examples/DatingSoftBound/mcmctree.ctl
old mode 100755
new mode 100644
diff --git a/examples/DatingSoftBound/mtCDNApri.trees b/examples/DatingSoftBound/mtCDNApri.trees
old mode 100755
new mode 100644
diff --git a/examples/DatingSoftBound/mtCDNApri123.txt b/examples/DatingSoftBound/mtCDNApri123.txt
old mode 100755
new mode 100644
diff --git a/examples/HIVNSsites/HIVenvSweden.trees b/examples/HIVNSsites/HIVenvSweden.trees
old mode 100755
new mode 100644
diff --git a/examples/HIVNSsites/HIVenvSweden.txt b/examples/HIVNSsites/HIVenvSweden.txt
old mode 100755
new mode 100644
diff --git a/examples/HIVNSsites/HIVenvSweden4s.trees b/examples/HIVNSsites/HIVenvSweden4s.trees
old mode 100755
new mode 100644
diff --git a/examples/HIVNSsites/HIVenvSweden4s.txt b/examples/HIVNSsites/HIVenvSweden4s.txt
old mode 100755
new mode 100644
diff --git a/examples/HIVNSsites/README.txt b/examples/HIVNSsites/README.txt
old mode 100755
new mode 100644
diff --git a/examples/HIVNSsites/codeml.ctl b/examples/HIVNSsites/codeml.ctl
old mode 100755
new mode 100644
diff --git a/examples/MHC.Swanson2002MBE/README.txt b/examples/MHC.Swanson2002MBE/README.txt
old mode 100755
new mode 100644
diff --git a/examples/MHC.Swanson2002MBE/bigmhc.phy b/examples/MHC.Swanson2002MBE/bigmhc.phy
old mode 100755
new mode 100644
diff --git a/examples/MHC.Swanson2002MBE/bigmhc.trees b/examples/MHC.Swanson2002MBE/bigmhc.trees
old mode 100755
new mode 100644
diff --git a/examples/MHC.Swanson2002MBE/codeml.ctl b/examples/MHC.Swanson2002MBE/codeml.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/MouseLemurs.aa b/examples/MouseLemurs/MouseLemurs.aa
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/MouseLemurs.nuc b/examples/MouseLemurs/MouseLemurs.nuc
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/MouseLemurs.trees b/examples/MouseLemurs/MouseLemurs.trees
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/MouseLemurs123.nuc b/examples/MouseLemurs/MouseLemurs123.nuc
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/README.txt b/examples/MouseLemurs/README.txt
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/README2.txt b/examples/MouseLemurs/README2.txt
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/aaml.ctl b/examples/MouseLemurs/aaml.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/aaml2.ctl b/examples/MouseLemurs/aaml2.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/baseml.ctl b/examples/MouseLemurs/baseml.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/baseml2.ctl b/examples/MouseLemurs/baseml2.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/codeml.ctl b/examples/MouseLemurs/codeml.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/codonml.ctl b/examples/MouseLemurs/codonml.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/codonml2.ctl b/examples/MouseLemurs/codonml2.ctl
old mode 100755
new mode 100644
diff --git a/examples/MouseLemurs/mtmam.dat b/examples/MouseLemurs/mtmam.dat
old mode 100755
new mode 100644
diff --git a/examples/README.txt b/examples/README.txt
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/H1.Beast.Nulldata.xml b/examples/TipDate.FluH1/H1.Beast.Nulldata.xml
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/H1.Beast.xml b/examples/TipDate.FluH1/H1.Beast.xml
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/H1.NodeNumbers.tre b/examples/TipDate.FluH1/H1.NodeNumbers.tre
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/H1.nexus b/examples/TipDate.FluH1/H1.nexus
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/H1.tre b/examples/TipDate.FluH1/H1.tre
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/H1.txt b/examples/TipDate.FluH1/H1.txt
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/baseml.ctl b/examples/TipDate.FluH1/baseml.ctl
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/commands.txt b/examples/TipDate.FluH1/commands.txt
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/in.BV.HKYG5 b/examples/TipDate.FluH1/in.BV.HKYG5
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/mcmctreeClock1.ctl b/examples/TipDate.FluH1/mcmctreeClock1.ctl
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/mcmctreeClock2.ctl b/examples/TipDate.FluH1/mcmctreeClock2.ctl
old mode 100755
new mode 100644
diff --git a/examples/TipDate.FluH1/mcmctreeClock3.ctl b/examples/TipDate.FluH1/mcmctreeClock3.ctl
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/HIV2ge.tre b/examples/TipDate.HIV2/HIV2ge.tre
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/HIV2ge.txt b/examples/TipDate.HIV2/HIV2ge.txt
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/README.txt b/examples/TipDate.HIV2/README.txt
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/baseml.ctl b/examples/TipDate.HIV2/baseml.ctl
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/in.BV.HKYG5 b/examples/TipDate.HIV2/in.BV.HKYG5
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/mcmctree.ExactlnL.ctl b/examples/TipDate.HIV2/mcmctree.ExactlnL.ctl
old mode 100755
new mode 100644
diff --git a/examples/TipDate.HIV2/mcmctree.ctl b/examples/TipDate.HIV2/mcmctree.ctl
old mode 100755
new mode 100644
diff --git a/examples/YN00abglobin.result b/examples/YN00abglobin.result
old mode 100755
new mode 100644
diff --git a/examples/abglobin.aa b/examples/abglobin.aa
old mode 100755
new mode 100644
diff --git a/examples/abglobin.nuc b/examples/abglobin.nuc
old mode 100755
new mode 100644
diff --git a/examples/abglobin.trees b/examples/abglobin.trees
old mode 100755
new mode 100644
diff --git a/examples/dNdSGene1.nuc b/examples/dNdSGene1.nuc
old mode 100755
new mode 100644
diff --git a/examples/horai.nuc b/examples/horai.nuc
old mode 100755
new mode 100644
diff --git a/examples/horai.trees b/examples/horai.trees
old mode 100755
new mode 100644
diff --git a/examples/lysin/README.txt b/examples/lysin/README.txt
old mode 100755
new mode 100644
diff --git a/examples/lysin/RasMol.txt b/examples/lysin/RasMol.txt
old mode 100755
new mode 100644
diff --git a/examples/lysin/SiteNumbering.txt b/examples/lysin/SiteNumbering.txt
old mode 100755
new mode 100644
diff --git a/examples/lysin/codeml.ctl b/examples/lysin/codeml.ctl
old mode 100755
new mode 100644
diff --git a/examples/lysin/codemlYangSwanson2002.ctl b/examples/lysin/codemlYangSwanson2002.ctl
old mode 100755
new mode 100644
diff --git a/examples/lysin/lysin.nuc b/examples/lysin/lysin.nuc
old mode 100755
new mode 100644
diff --git a/examples/lysin/lysin.trees b/examples/lysin/lysin.trees
old mode 100755
new mode 100644
diff --git a/examples/lysin/lysinYangSwanson2002.nuc b/examples/lysin/lysinYangSwanson2002.nuc
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/README.txt b/examples/lysozyme/README.txt
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/codeml.ctl b/examples/lysozyme/codeml.ctl
old mode 100755
new mode 100644
index 8addf68..80ed608
--- a/examples/lysozyme/codeml.ctl
+++ b/examples/lysozyme/codeml.ctl
@@ -10,7 +10,7 @@
       seqtype = 1   * 1:codons; 2:AAs; 3:codons-->AAs
     CodonFreq = 2   * 0:1/61 each, 1:F1X4, 2:F3X4, 3:codon table
         clock = 0   * 0: no clock, unrooted tree, 1: clock, rooted tree
-        model = 0
+        model = 2
                     * models for codons:
                         * 0:one, 1:b, 2:2 or more dN/dS ratios for branches
 
@@ -28,7 +28,7 @@
         ncatG = 4   * # of categories in the dG or AdG models of rates
 
         getSE = 0   * 0: don't want them, 1: want S.E.s of estimates
- RateAncestor = 1   * (1/0): rates (alpha>0) or ancestral states (alpha=0)
+ RateAncestor = 0   * (1/0): rates (alpha>0) or ancestral states (alpha=0)
 
   fix_blength = 1  * 0: ignore, -1: random, 1: initial, 2: fixed
        method = 0   * 0: simultaneous; 1: one branch at a time
diff --git a/examples/lysozyme/lysozymeLarge.ctl b/examples/lysozyme/lysozymeLarge.ctl
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/lysozymeLarge.nuc b/examples/lysozyme/lysozymeLarge.nuc
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/lysozymeLarge.trees b/examples/lysozyme/lysozymeLarge.trees
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/lysozymeSmall.ctl b/examples/lysozyme/lysozymeSmall.ctl
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/lysozymeSmall.nuc b/examples/lysozyme/lysozymeSmall.nuc
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/lysozymeSmall.trees b/examples/lysozyme/lysozymeSmall.trees
old mode 100755
new mode 100644
diff --git a/examples/lysozyme/lysozymeSmall.txt b/examples/lysozyme/lysozymeSmall.txt
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/README.txt b/examples/mtCDNA/README.txt
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/codeml.ctl b/examples/mtCDNA/codeml.ctl
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/miyata.dat b/examples/mtCDNA/miyata.dat
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/mtCDNAmam.nuc b/examples/mtCDNA/mtCDNAmam.nuc
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/mtCDNAmam.trees b/examples/mtCDNA/mtCDNAmam.trees
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/mtCDNApri.aa b/examples/mtCDNA/mtCDNApri.aa
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/mtCDNApri.nuc b/examples/mtCDNA/mtCDNApri.nuc
old mode 100755
new mode 100644
diff --git a/examples/mtCDNA/mtCDNApri.trees b/examples/mtCDNA/mtCDNApri.trees
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/2s.trees b/examples/mtCDNAape/2s.trees
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/OmegaAA.dat b/examples/mtCDNAape/OmegaAA.dat
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/README.txt b/examples/mtCDNAape/README.txt
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/codeml.HC.ctl b/examples/mtCDNAape/codeml.HC.ctl
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/codeml.ctl b/examples/mtCDNAape/codeml.ctl
old mode 100755
new mode 100644
index c938a1b..23e6892
--- a/examples/mtCDNAape/codeml.ctl
+++ b/examples/mtCDNAape/codeml.ctl
@@ -14,7 +14,7 @@
    aaRatefile = ../../dat/wag.dat * only used for aa seqs with model=empirical(_F)
                    * dayhoff.dat, jones.dat, wag.dat, mtmam.dat, or your own
 
-        model = 0
+        model = 2
                    * models for codons:
                       * 0:one, 1:b, 2:2 or more dN/dS ratios for branches
 
diff --git a/examples/mtCDNAape/mtCDNA.HC.txt b/examples/mtCDNAape/mtCDNA.HC.txt
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/mtCDNAape.trees b/examples/mtCDNAape/mtCDNAape.trees
old mode 100755
new mode 100644
diff --git a/examples/mtCDNAape/mtCDNAape.txt b/examples/mtCDNAape/mtCDNAape.txt
old mode 100755
new mode 100644
diff --git a/examples/mtprim9.nuc b/examples/mtprim9.nuc
old mode 100755
new mode 100644
diff --git a/mcmctree.ctl b/mcmctree.ctl
old mode 100755
new mode 100644
diff --git a/pamp.ctl b/pamp.ctl
old mode 100755
new mode 100644
diff --git a/paupblock b/paupblock
old mode 100755
new mode 100644
diff --git a/paupend b/paupend
old mode 100755
new mode 100644
diff --git a/paupstart b/paupstart
old mode 100755
new mode 100644
diff --git a/src/Makefile b/src/Makefile
old mode 100755
new mode 100644
diff --git a/src/Makefile.MSVC b/src/Makefile.MSVC
old mode 100755
new mode 100644
diff --git a/src/README.txt b/src/README.txt
old mode 100755
new mode 100644
index a2bff32..2452855
--- a/src/README.txt
+++ b/src/README.txt
@@ -3,6 +3,16 @@ Notes for compiling PAML on UNIX systems, including MAC OS X
 Ziheng Yang (z.yang at ucl.ac.uk)
 Last updated, 10 December 2003
 
+Copyright notice and disclaimer
+
+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 maintained by Ziheng
+Yang and distributed under the GNU GPL v3.
+
 
 Instructions for compiling 
 ==========================
@@ -77,4 +87,3 @@ scp  baseml basemlg codeml pamp mcmctree evolver yn00 chi2   /usr/local/bin/
 
 
 // End of file
-
diff --git a/src/TreeTimeJeff.c b/src/TreeTimeJeff.c
old mode 100755
new mode 100644
diff --git a/src/baseml.c b/src/baseml.c
old mode 100755
new mode 100644
diff --git a/src/basemlg.c b/src/basemlg.c
old mode 100755
new mode 100644
diff --git a/src/chi2.c b/src/chi2.c
old mode 100755
new mode 100644
diff --git a/src/codeml.c b/src/codeml.c
old mode 100755
new mode 100644
index e9cfb88..186466f
--- a/src/codeml.c
+++ b/src/codeml.c
@@ -1813,7 +1813,6 @@ int SetxBound (int np, double xb[][2])
    k = com.ntime+com.nrgene+com.nkappa; 
 
    /* codon frequency parameters */
-   
    k += j = (com.seqtype==CODONseq && com.codonf>=FMutSel0 ? 3 : 0);
    if(com.seqtype==CODONseq && com.npi>3 
       && (com.codonf==Fcodon || com.codonf==FMutSel0 ||com.codonf==FMutSel)) {
@@ -1982,11 +1981,13 @@ int GetInitialsCodon (double x[])
    int k=com.ntime+com.nrgene, i,j, K=com.ncatG, nsyncodon[20];
    double mr=0;
 
+   com.nrate = com.nkappa = (com.hkyREV ? 5 : !com.fix_kappa);
+   com.nrate += com.npi;
    if(com.nrate) { /* either kappa, omega, or both for each gene */
       if(com.Mgene<=2) {
          if(com.hkyREV) {
-            x[k++]=.5+rndu(); 
-            for(i=0; i<4; i++) x[k++]=.1+rndu(); 
+            x[k++] = .5 + rndu(); 
+            for(i=0; i<4; i++) x[k++] = .1 + rndu(); 
          }
          else if (!com.fix_kappa) 
             x[k++] = com.kappa;
@@ -2062,14 +2063,6 @@ int GetInitialsCodon (double x[])
             com.nrate += (com.model==NSbranchB ? tree.nbranch : com.nOmega-1+!com.fix_omega);
          else if(com.aaDist==0)
             com.nrate += !com.fix_omega + com.nbtype - 1;
-/*
-         if(com.aaDist==0)
-            com.nrate = com.nkappa+!com.fix_omega+com.nbtype-1;
-         else if (com.aaDist==AAClasses) 
-            com.nrate = com.nkappa + com.nOmegaType*com.nbtype;
-         else if (com.model==NSbranchB || com.model==NSbranch2)
-            com.nrate += (com.model==NSbranchB ? tree.nbranch : com.nOmega-1+!com.fix_omega);
-*/
          k = com.ntime+com.nrgene;
          for(i=0; i<com.nrate; i++)
             x[k++] = com.omega * (0.8+0.4*rndu());
@@ -6667,7 +6660,7 @@ int lfunNSsites_ACD (FILE* frst, double x[], int np)
    /* # of site classes under model and index for site class */
    int nclassM = (modelACD==mA?4:3), iclassM, *iw, i;
    double para[4+NBTYPE][40]={{0}}, postpara[4+NBTYPE][40];  /* paras on grid : n1d<=40 */
-   double fh, fX, *lnfXs,S1,S2, *pclassM, *postSite, *postp0p1;
+   double fh, fX, *lnfXs, S1, S2, *pclassM, *postSite, *postp0p1;
    double fhk[4], t, cutoff=0.5;
    char timestr[32], paras[4+NBTYPE][4]={"p0","p1","w0","w2","w3","w4","w5","w6","w7"}, *sig, aa;
 
@@ -6709,7 +6702,7 @@ int lfunNSsites_ACD (FILE* frst, double x[], int np)
    get_pclassM_iw_ACD(iw, pclassM, para, n1d);
 
    /* calculate the marginal likelihood f(X), and postpara[].  S2 is scale. */
-   printf("%s\n", printtime(timestr));
+   printf("Time: %s\n", printtime(timestr));
    printf("Calculating the marginal likelihood f(X).\n");
    fX=1;  S2=-1e300;
    for(j=0; j<dim; j++)  /* postpara[0-1] for p0p1 ignored */
@@ -6765,8 +6758,8 @@ int lfunNSsites_ACD (FILE* frst, double x[], int np)
    for(k=0; k<n1d*n1d; k++) 
       postp0p1[k] /=fX;
 
-   fX = log(fX)+S2;
-   printf("\tlog(fX) = %12.6f  S = %12.6f %12.6f\n", fX+S1, S1, S2);
+   fX = log(fX) + S2;
+   printf("\tlog(fX) = %12.6f  S = %12.6f %12.6f\n", fX+S1-dim*log((double)n1d), S1, S2);
 
    /* calculate posterior prob for site classes at each site.  S1 is scale factor */
    printf("Calculating f(w_k|X), posterior for site classes for each site.  Slow!\n");
@@ -6777,7 +6770,7 @@ int lfunNSsites_ACD (FILE* frst, double x[], int np)
          for(j=dim-1,it=igrid; j>=0; j--) { ip[j]=it%n1d; it/=n1d; }
          for(k=0,fh=0; k<nclassM; k++) /* duplicated calculation */
             fh += fhk[k] = pclassM[igrid*nclassM+k]*com.fhK[iw[igrid*nclassM+k]*com.npatt+h];
-         for(k=0; k<nclassM; k++) {
+         for(k=0; k<nclassM; k++) {    /* log & exp in this loop is expensive  */
             t = log(fhk[k]/fh) + lnfXs[igrid] - fX;
             if(t>-300) postSite[k*com.npatt+h] += exp(t);
          }
diff --git a/src/ds.c b/src/ds.c
old mode 100755
new mode 100644
diff --git a/src/evolver.c b/src/evolver.c
old mode 100755
new mode 100644
diff --git a/src/mcmctree.c b/src/mcmctree.c
old mode 100755
new mode 100644
diff --git a/src/paml.h b/src/paml.h
old mode 100755
new mode 100644
index 049b986..ce94274
--- a/src/paml.h
+++ b/src/paml.h
@@ -53,7 +53,7 @@ double rnduM0V1 (void);
 double rndNormal(void);
 double rndBox(void);
 double rndAirplane(void);
-double rndParabola(void);
+double rndStrawhat(void);
 double rndBactrian(void);
 double rndBactrianTriangle(void);
 double rndBactrianLaplace(void);
@@ -388,8 +388,7 @@ enum {PrBranch=1, PrNodeNum=2, PrLabel=4, PrNodeStr=8, PrAge=16, PrOmega=32} Out
 #define aBox 0.5
 #define bBox (sqrt(12 - 3*aBox*aBox) - aBox) / 2
 #define aAirplane 1.0
-#define aParab 1.0
-
+#define aStrawhat 1.0
 
 #define MAXNFIELDS 320000
 
diff --git a/src/pamp.c b/src/pamp.c
old mode 100755
new mode 100644
diff --git a/src/tools.c b/src/tools.c
old mode 100755
new mode 100644
index a4eed01..8d30165
--- a/src/tools.c
+++ b/src/tools.c
@@ -1156,16 +1156,20 @@ FILE *gfopen(char *filename, char *mode)
 
 int appendfile(FILE*fout, char*filename)
 {
-   FILE *fin=fopen(filename,"r");
-   int ch;
+   FILE *fin = fopen(filename, "r");
+   int ch, status = 0;
 
-   if(fin) {
-      while((ch=fgetc(fin))!=EOF) 
-         fputc(ch,fout);
+   if (fin == NULL) {
+      printf("file %s not found!", filename);
+      status = -1;
+   }
+   else {
+      while ((ch = fgetc(fin)) != EOF)
+         fputc(ch, fout);
       fclose(fin);
       fflush(fout);
    }
-   return(0);
+   return(status);
 }
 
 
@@ -1569,67 +1573,82 @@ double rndBox(void)
     return z;
 }
 
-double getRoot(double (*f)(double), double (*df)(double), double initVal) {
-    double x, newx = initVal;
-    int nIter = 0;
-    do {
-        x = newx;
-        newx = x - (*f)(x) / (*df)(x);
-        nIter++;
-    } while((fabs(x-newx) > 1e-10) && nIter < 100);
+double getRoot(double (*f)(double), double (*df)(double), double initVal)
+{
+   double x, newx = initVal;
+   int nIter = 0;
+   do {
+      x = newx;
+      newx = x - (*f)(x) / (*df)(x);
+      nIter++;
+   } while((fabs(x-newx) > 1e-10) && nIter < 100);
     
-    if(fabs(x-newx) > 1e-10) {
-        error2("root finder didn't converge");
-    }
-    return(newx);
+   if(fabs(x-newx) > 1e-10) {
+      error2("root finder didn't converge");
+   }
+   return(newx);
 }
 
-double BAirplane(double b) {
-    return 4*b*b*b - 12*b + 6*aAirplane - aAirplane * aAirplane * aAirplane;
+double BAirplane(double b) 
+{
+   return 4*b*b*b - 12*b + 6*aAirplane - aAirplane * aAirplane * aAirplane;
 }
 
 double dBAirplane(double b) {
     return 12*b*b - 12;
 }
 
-double rndAirplane() {
-    double z, bAirplane = getRoot(&BAirplane, &dBAirplane, 2.5);
+double rndAirplane() 
+{
+   static int firsttime=1;
+   static double bAirplane;
+   double z;
 
-    if(rndu() < aAirplane/(2*bAirplane -aAirplane)) {
-        /* sample from linear part */
-        z = sqrt(aAirplane*aAirplane*rndu());
-    }
-    else {
-       /* sample from box part */
-       z = rndu() * (bAirplane - aAirplane) + aAirplane;
-    }
-    return (rndu() < 0.5 ? -z : z);
+   if(firsttime) {
+      bAirplane = getRoot(&BAirplane, &dBAirplane, 2.5);
+      firsttime = 0;
+   }
+   if(rndu() < aAirplane/(2*bAirplane -aAirplane)) {
+      /* sample from linear part */
+      z = sqrt(aAirplane*aAirplane*rndu());
+   }
+   else {
+      /* sample from box part */
+      z = rndu() * (bAirplane - aAirplane) + aAirplane;
+   }
+   return (rndu() < 0.5 ? -z : z);
 }
 
-double BParabola(double b) {
-    return 5*b*b*b - 15*b + 10*aParab - 2*aParab*aParab*aParab;
+double BStrawhat(double b) { 
+   return 5*b*b*b - 15*b + 10*aStrawhat - 2*aStrawhat*aStrawhat*aStrawhat;
 }
 
-double dBParabola(double b) {
-    return 15*b*b - 15;
+double dBStrawhat(double b) {
+   return 15*b*b - 15;
 }
 
-double rndParabola() {
-    double z, bParab = getRoot(&BParabola, &dBParabola, 2.0);
+double rndStrawhat()
+{
+   static int firsttime=1;
+   static double bStrawhat;
+   double z;
 
-    if(rndu() < aParab/((3*bParab-2*aParab))) {
-        /* sample from parabola part */
-        z = aParab * pow(rndu(), 1.0/3.0);
-    }
-    else {
-        /* sample from the box part */
-        z = rndu() * (bParab - aParab) + aParab;
-    }
-    return (rndu() < 0.5 ? -z : z);
+   if(firsttime) {
+      bStrawhat = getRoot(&BStrawhat, &dBStrawhat, 2.0);
+      firsttime = 0;
+   }
+   if(rndu() < aStrawhat/((3*bStrawhat-2*aStrawhat))) {
+      /* sample from Strawhat part */
+      z = aStrawhat * pow(rndu(), 1.0/3.0);
+   }
+   else {
+      /* sample from the box part */
+      z = rndu() * (bStrawhat - aStrawhat) + aStrawhat;
+   }
+   return (rndu() < 0.5 ? -z : z);
 }
 
 
-
 double rndloglogistic (double loc, double s)
 {
    double t = rndlogistic(), logt=1E300;
@@ -5602,7 +5621,9 @@ int DescriptiveStatistics (FILE *fout, char infile[], int nbin, int propternary,
    fprintf(fout,"\n97.5%%   "); for(j=SkipColumns;j<p;j++) fprintf(fout,fmt,x975[j]);
    fprintf(fout,"\n2.5%%HPD "); for(j=SkipColumns;j<p;j++) fprintf(fout,fmt,xHPD025[j]);
    fprintf(fout,"\n97.5%%HPD"); for(j=SkipColumns;j<p;j++) fprintf(fout,fmt,xHPD975[j]);
-   fprintf(fout,"\nESS     ");  for(j=SkipColumns;j<p;j++) fprintf(fout,fmt1,n/Tint[j]);
+   fprintf(fout,"\nESS*    ");  for(j=SkipColumns;j<p;j++) fprintf(fout,fmt1,n/Tint[j]);
+   fprintf(fout,"\nEff*    ");  for(j=SkipColumns;j<p;j++) fprintf(fout,fmt, 1/Tint[j]);
+
    FPN(F0);  FPN(fout); 
    fflush(fout);
 
diff --git a/src/treespace.c b/src/treespace.c
old mode 100755
new mode 100644
diff --git a/src/treesub.c b/src/treesub.c
old mode 100755
new mode 100644
index a05c0f4..901aaa8
--- a/src/treesub.c
+++ b/src/treesub.c
@@ -68,7 +68,8 @@ int PatternWeightSimple(void)
     int n31 = 1;
     int lpatt = com.ns*n31 + 1;   /* extra 0 used for easy debugging, can be avoided */
     int *p2s;  /* point patterns to sites in zt */
-    char *zt, *p;
+    char *zt;
+    unsigned char *p;
     double nc = (com.seqtype == 1 ? 64 : com.ncode) + !com.cleandata + 1;
     int debug = 0;
     char DS[] = "DS";
@@ -270,20 +271,19 @@ int hasbase (char *str)
 }
 
 
-int GetSeqFileType(FILE *fseq, int *paupseq);
+int GetSeqFileType(FILE *fseq, int *NEXUSseq);
 int IdenticalSeqs(void);
 void RemoveEmptySequences(void);
 
 int GetSeqFileType(FILE *fseq, int *format)
 {
-    /* paupstart="begin data" and paupend="matrix" identify nexus file format.
+    /* NEXUSstart="begin data" and NEXUSdata="matrix" identify nexus file format.
      Modify if necessary.
      format: 0: alignment; 1: fasta; 2: nexus.
-     
      */
     int  lline=1000, ch, aligned;
     char fastastarter='>';
-    char line[1000], *paupstart="begin data",*paupend="matrix", *p;
+    char line[1000], *NEXUSstart="begin data", *NEXUSdata="matrix", *p;
     char *ntax="ntax",*nchar="nchar";
     
     while (isspace(ch=fgetc(fseq)))
@@ -306,7 +306,7 @@ int GetSeqFileType(FILE *fseq, int *format)
     for ( ; ; ) {
         if(fgets(line,lline,fseq)==NULL) error2("seq err1: EOF");
         strcase(line,0);
-        if(strstr(line,paupstart)) break;
+        if(strstr(line,NEXUSstart)) break;
     }
     for ( ; ; ) {
         if(fgets(line,lline,fseq)==NULL) error2("seq err2: EOF");
@@ -324,12 +324,12 @@ int GetSeqFileType(FILE *fseq, int *format)
     for ( ; ; ) {
         if(fgets(line,lline,fseq)==NULL) error2("seq err1: EOF");
         strcase(line,0);
-        if (strstr(line,paupend)) break;
+        if (strstr(line, NEXUSdata)) break;
     }
     return(0);
 }
 
-int PopupComment(FILE *fseq)
+int PopupNEXUSComment(FILE *fseq)
 {
     int ch, comment1=']';
     for( ; ; ) {
@@ -410,7 +410,7 @@ int ReadSeq (FILE *fout, FILE *fseq, int cleandata, int locus)
      data are clean or are cleaned, and com.cleandata=0 is the data are unclean.
      */
     char *p,*p1, eq='.', comment0='[', *line;
-    int format=0;  /* 0: paml/phylip, 1: fasta; 2: paup/nexus */
+    int format=0;  /* 0: paml/phylip, 1: fasta; 2: NEXUS/nexus */
     int i,j,k, ch, noptline=0, lspname=LSPNAME, miss=0, nb;
     int lline=10000, lt[NS], igroup, Sequential=1,basecoding=0;
     int n31=(com.seqtype==CODONseq||com.seqtype==CODON2AAseq?3:1);
@@ -418,7 +418,9 @@ int ReadSeq (FILE *fout, FILE *fseq, int cleandata, int locus)
     int h,b[3]={0};
     char *pch=((com.seqtype<=1||com.seqtype==CODON2AAseq) ? BASEs : (com.seqtype==2 ? AAs: (com.seqtype==5 ? BASEs5 : BINs)));
     char str[4]="   ";
+    char *NEXUSend="end;";
     double lst;
+
 #if(MCMCTREE)
     data.datatype[locus] = com.seqtype;
 #endif
@@ -517,7 +519,7 @@ int ReadSeq (FILE *fout, FILE *fseq, int cleandata, int locus)
         for(ch=0; ; ) {
             ch = (char)fgetc(fseq);
             if(ch == comment0)
-                PopupComment(fseq);
+                PopupNEXUSComment(fseq);
             if(isalnum(ch)) break;
         }
         
@@ -712,8 +714,37 @@ readseq:
             
         }               /* for (igroup) */
     }
+    if(format==2) {  /* NEXUS format: pop up extra lines until "end;"  */
+       for ( ; ; ) {
+           if(fgets(line,lline,fseq)==NULL) error2("seq err1: EOF");
+           strcase(line,0);
+           if (strstr(line, NEXUSend)) break;
+       }
+    }
     free(line);
-    
+
+/*** delete empty sequences ******************/
+#if(0)
+{ int ns1 = com.ns, del[100] = { 0 };
+    for (i = 0; i < com.ns; i++) {
+       for (h = 0; h < com.ls; h++)   if (com.z[i][h] != '?') break;
+       if (h == com.ls) {
+          del[i] = 1;
+          ns1--;
+       }
+    }
+    fprintf(fnew, "\n\n%4d %6d\n", ns1, com.ls);
+    for (i = 0; i < com.ns; i++) {
+       if (!del[i]) {
+          fprintf(fnew, "\n%-40s  ", com.spname[i]);
+          for (h = 0; h < com.ls; h++) fprintf(fnew, "%c", com.z[i][h]);
+       }
+    }
+    fflush(fnew);
+}
+#endif
+
+
 #ifdef CODEML
     /* mask stop codons as ???.  */
     if(com.seqtype==1 && MarkStopCodons())
@@ -772,22 +803,24 @@ readseq:
 #if (defined CODEML)
     /* list sites with 2 types of serine codons: TC? and TCY.  19 March 2014, Ziheng. */
     if(com.seqtype==1) {
-        char codon[4]="";
-        int nbox0, nbox1;
-        for(h=0; h<com.ls; h++) {
-            for(i=0,nbox0=nbox1=0; i<com.ns; i++) {
-                codon[0]=com.z[i][h*3+0];
-                codon[1]=com.z[i][h*3+1];
-                codon[2]=com.z[i][h*3+2];
-                if(codon[0]=='T' && codon[1]=='C') nbox0++;
-                else if(codon[0]=='A' && codon[1]=='G' && (codon[2]=='T' || codon[2]=='C')) nbox1++;
-            }
-            if(nbox0 && nbox1 && nbox0+nbox1==com.ns) {
-                printf("\ncodon %7d: ", h+1);
-                for(i=0; i<com.ns; i++)
-                    printf("%c%c%c ", com.z[i][h*3+0], com.z[i][h*3+1], com.z[i][h*3+2]);
-            }
-        }
+       char codon[4]="";
+       int nbox0, nbox1, present=0;
+       for(h=0; h<com.ls; h++) {
+          for(i=0,nbox0=nbox1=0; i<com.ns; i++) {
+             codon[0]=com.z[i][h*3+0];
+             codon[1]=com.z[i][h*3+1];
+             codon[2]=com.z[i][h*3+2];
+             if(codon[0]=='T' && codon[1]=='C') nbox0++;
+             else if(codon[0]=='A' && codon[1]=='G' && (codon[2]=='T' || codon[2]=='C')) nbox1++;
+          }
+          if(nbox0 && nbox1 && nbox0+nbox1==com.ns) {
+             present=1;
+             printf("\ncodon site %6d: ", h+1);
+             for(i=0; i<com.ns; i++)
+                printf("%c%c%c ", com.z[i][h*3+0], com.z[i][h*3+1], com.z[i][h*3+2]);
+          }
+       }
+       if(present) printf("\nAbove are 'synonymous' sites with 2 types of serine codons: TC? and TCY.\n");
     }
 #endif
     
@@ -1700,7 +1733,7 @@ int print1seq (FILE*fout, unsigned char *z, int ls, int pose[])
 
 void printSeqs (FILE *fout, int *pose, char keep[], int format)
 {
-/* Print sequences into fout, using paml (format=0 or 1) or paup (format=2)
+/* Print sequences into fout, using paml (format=0 or 1) or NEXUS (format=2)
    formats.
    Use pose=NULL if called before site patterns are collapsed.
    keep[] marks the sequences to be printed.  Use NULL for keep if all sequences
@@ -1711,8 +1744,8 @@ void printSeqs (FILE *fout, int *pose, char keep[], int format)
    See notes in print1seq()
      
    format = 0,1: PAML sites or patterns
-   2: PAUP Nexus format.
-   3: PAUP Nexus JC69 format
+   2: NEXUS Nexus format.
+   3: NEXUS Nexus JC69 format
      
    This is used by evolver.  Check and merge with printsma().
 */
@@ -1734,7 +1767,7 @@ void printSeqs (FILE *fout, int *pose, char keep[], int format)
    for(j=0; j<com.ns; j++,FPN(fout)) {
       if(keep && !keep[j]) continue;
       fprintf(fout,"%s%-*s  ", (format==2 || format==3 ? "      " : ""), wname, com.spname[j]);
-      if(format==3) {     /* PAUP Nexus JC69 format */
+      if(format==3) {     /* NEXUS Nexus JC69 format */
          for(h=0,ls1=0; h<com.npatt; h++)
             for(i=0; i<(int)com.fpatt[h]; i++) {
                fprintf(fout, "%c", pch[com.z[j][h]]);
@@ -3084,11 +3117,13 @@ int OutSubTreeN (FILE *fout, int inode, int spnames, int printopt)
     if((printopt & PrNodeNum) && nodes[inode].nson)
         fprintf(fout," %d ", inode+1);
     if((printopt & PrLabel) && nodes[inode].label>0)
-        fprintf(fout, " #%.6f", nodes[inode].label);
+       fprintf(fout, " #%.6f", nodes[inode].label);
+       /* fprintf(fout, " [&label=%.6f]", nodes[inode].label); */
+
     if((printopt & PrAge) && nodes[inode].age)
         fprintf(fout, " @%.6f", nodes[inode].age);
     
-    /*  Add branch labels to be read by Rod Page's TreeView. */
+    /*  Add branch labels to be read by Rod Page's TreeView.  */
 #if (defined CODEML)
     if((printopt & PrOmega) && inode != tree.root)
         fprintf(fout, " #%.6g ", nodes[inode].omega);
@@ -3337,7 +3372,7 @@ void PointconPnodes (void)
      This routine updates internal nodes com.conP only.
      End nodes (com.conP0) are updated in InitConditionalPNode().
      */
-    int nintern=0, i;
+    size_t nintern=0, i;
     
     for(i=0; i<tree.nbranch+1; i++)
         if(nodes[i].nson>0)  /* more thinking */
@@ -6627,7 +6662,7 @@ int AncestralJointPPSG2000 (FILE *fout, double x[])
         if((com.space=(double*)realloc(com.space,com.sspace))==NULL) error2("oom space");
     }
     for(i=0; i<NBESTANC; i++) {
-        lnPanc[i]= com.conP+i*nintern*com.npatt*n;
+        lnPanc[i]= com.conP + (size_t)i*nintern*com.npatt*n;
         icharNode[i] = (int*)com.space+i*nintern*com.npatt*n;
         charNode[i] = (char*)((int*)com.space+NBESTANC*nintern*com.npatt*n) + i*nintern*com.npatt*n;
         ancState1site = charNode[0]+NBESTANC*nintern*com.npatt*n;
@@ -6679,7 +6714,7 @@ int AncestralJointPPSG2000 (FILE *fout, double x[])
     free(PMatTips);
     free(combScore);
     com.sconP = sconPold;
-    if((com.conP=(double*)realloc(com.conP,com.sconP))==NULL)
+    if((com.conP=(double*)realloc(com.conP, com.sconP))==NULL)
         error2("conP");
     PointconPnodes();
     return (0);
@@ -7329,7 +7364,7 @@ int fx_r (double x[], int np)
                 if(com.NnodeScale)
                     com.nodeScaleF += (size_t)com.npatt*com.NnodeScale;
                 for(i=com.ns; i<tree.nnode; i++)
-                    nodes[i].conP += (tree.nnode-com.ns)*com.ncode*(size_t)com.npatt;
+                    nodes[i].conP += (size_t)(tree.nnode-com.ns)*com.ncode*com.npatt;
             }
             SetPSiteClass(ir,x);
             ConditionalPNode(tree.root,ig, x);
@@ -7362,7 +7397,7 @@ int fx_r (double x[], int np)
             if(com.NnodeScale)
                 com.nodeScaleF -= (com.ncatG-1)*com.NnodeScale*(size_t)com.npatt;
             for(i=com.ns; i<tree.nnode; i++)
-                nodes[i].conP -= (com.ncatG-1)*(tree.nnode-com.ns)*com.ncode*(size_t)com.npatt;
+                nodes[i].conP -= (size_t)(com.ncatG-1)*(tree.nnode-com.ns)*com.ncode*com.npatt;
         }
     }  /* for(ig) */
     return(0);
diff --git a/src/yn00.c b/src/yn00.c
old mode 100755
new mode 100644
diff --git a/stewart.aa b/stewart.aa
old mode 100755
new mode 100644
diff --git a/stewart.trees b/stewart.trees
old mode 100755
new mode 100644
diff --git a/yn00.ctl b/yn00.ctl
old mode 100755
new mode 100644

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



More information about the debian-med-commit mailing list