Skip to content

Commit

Permalink
rest of changes fram lab
Browse files Browse the repository at this point in the history
  • Loading branch information
mtholder committed Aug 5, 2010
1 parent ea75f10 commit 0ddec1f
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 25 deletions.
5 changes: 3 additions & 2 deletions documentation/users/manual.bib
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ @article{Nylander:2008p471
Pmid = {1263122639890197121},
Rating = {0},
Read = {Yes},
Title = {AWTY(are we there yet?): a system for graphical exploration of MCMC convergence in Bayesian {\ldots}},
Title = {{AWTY} (are we there yet?): a system for graphical exploration of {MCMC} convergence in {Bayesian} phylogenetics},
Uri = {papers://599A4529-B910-4F83-B5ED-A165D6176425/Paper/p1936},
Url = {http://bioinformatics.oxfordjournals.org/cgi/content/abstract/24/4/581},
Volume = {24},
Year = {2008}}
Year = {2008},
Bdsk-Url-1 = {http://bioinformatics.oxfordjournals.org/cgi/content/abstract/24/4/581}}

@article{XieLewisFanKuoChen2010,
Author = {Wangang Xie and Paul O. Lewis and Yu Fan and Lynn Kuo and Ming-Hui Chen},
Expand Down
27 changes: 9 additions & 18 deletions installer/mac/iterm/makeDMG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,15 @@ then
ditto -rsrc "$PHYCAS_ROOT/LICENSE" "phycasimg/LICENSE" || exit
ditto -rsrc "README" "phycasimg/README" || exit
ditto -rsrc "$PHYCAS_ROOT/documentation/users/manual.pdf" "phycasimg/manual.pdf" || exit
ditto -rsrc "$PHYCAS_ROOT/documentation/users/tutorial/basic.py" "phycasimg/tutorial/basic.py" || exit
ditto -rsrc "$PHYCAS_ROOT/documentation/users/tutorial/summarize.py" "phycasimg/tutorial/summarize.py" || exit
ditto -rsrc "$PHYCAS_ROOT/documentation/users/tutorial/partition.py" "phycasimg/tutorial/partition.py" || exit
ditto -rsrc "$PHYCAS_ROOT/documentation/users/tutorial/steppingstone.py" "phycasimg/tutorial/steppingstone.py" || exit
ditto -rsrc "$PHYCAS_ROOT/documentation/users/tutorial/polytomy.py" "phycasimg/tutorial/polytomy.py" || exit
# mkdir "phycasimg/PhycasTutorial"
# mkdir "phycasimg/PhycasTutorial/scripts"
# for f in $PHYCAS_ROOT/phycas/Examples/Tutorial/PhycasWHExamples/*nex
# do
# ditto -rsrc "$f" "phycasimg/PhycasTutorial" || exit
# done
# for f in $PHYCAS_ROOT/phycas/Examples/Tutorial/PhycasWHExamples/scripts/*py
# do
# ditto -rsrc "$f" "phycasimg/PhycasTutorial/scripts/" || exit
# ditto -rsrc "$f" "phycasimg/PhycasTutorial/" || exit
# done
# ditto -rsrc "$PHYCAS_ROOT/phycas/Examples/Tutorial/phycas_woods_hole_08.pdf" "phycasimg/PhycasTutorial/PhycasTutorial.pdf" || exit

mkdir "phycasimg/tutorial"
mkdir "phycasimg/tutorial/ex1basic"
mkdir "phycasimg/tutorial/ex2steppingstone"
mkdir "phycasimg/tutorial/ex3-4polytomyPriors"
for f in ex1basic/basic.py ex1basic/green.nex ex2steppingstone/murphy29.rag1rag2.nex ex2steppingstone/setUpByCodonPosPartition.py ex2steppingstone/setUpByGeneAndCodonPosPartition.py ex2steppingstone/steppingstone1.py ex2steppingstone/steppingstone2.py ex2steppingstone/steppingstone3.py ex2steppingstone/steppingstoneDoMCMC.py ex2steppingstone/steppingstoneReadData.py ex3-4polytomyPriors/IntExtPrior.py ex3-4polytomyPriors/NoPolytomy.py ex3-4polytomyPriors/Polytomy.py ex3-4polytomyPriors/ShoupLewis.nex
do
ditto -rsrc "$PHYCAS_ROOT/documentation/users/tutorial/$i" "phycasimg/tutorial/$i" || exit
done

hdiutil create -srcfolder phycasimg $MASTER_DMG
else
echo "PHYCAS_ROOT is not defined as a directory"
Expand Down
18 changes: 18 additions & 0 deletions installer/mac/iterm/refill_phycas_gui_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,28 @@ if test -d Frameworks
then
cp -r Frameworks Phycas.app/Contents/Frameworks
fi
if test -z "$TARGETTED_PYTHON_VERSION"
then
echo "TARGETTED_PYTHON_VERSION must be defined to major.minor"
exit 1
fi
cp -r "$PHYCAS_ROOT/phycas" Phycas.app/Contents/Resources/ || exit 2
cp -r ./active_phycas_env.sh Phycas.app/Contents/Resources/ || exit 2
cp -r ./run_phycas.sh Phycas.app/Contents/Resources/ || exit 2

cat run_phycas.sh | sed -e "s/PYTHONINTERPRETER=python/PYTHONINTERPRETER=python${TARGETTED_PYTHON_VERSION}/" > Phycas.app/Contents/Resources/run_phycas.sh || exit 2

cp ./startup.py Phycas.app/Contents/Resources/ || exit 2

if test -z $PY_PACKAGES_TO_BUNDLE
then
echo not bundling python extras because PY_PACKAGES_TO_BUNDLE is not set!
else
cp -r $PY_PACKAGES_TO_BUNDLE/setuptools-0.6c11-py2.5.egg Phycas.app/Contents/Resources/ || exit 1
cp -r $PY_PACKAGES_TO_BUNDLE/IPython Phycas.app/Contents/Resources/ || exit 1
fi


find Phycas.app/Contents/Resources/phycas -name .svn -exec rm -rf {} \;
cat Phycas.app/Contents/Resources/phycas/__init__.py | sed "s/PHYCAS_SVN_REVISION_NUMBER_HERE/$sv/g" > t
mv t Phycas.app/Contents/Resources/phycas/__init__.py
Expand Down
4 changes: 2 additions & 2 deletions phycas/Phycas/MCMCImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,13 +1197,13 @@ def run(self):
# if using working prior with steppingstone sampling, it is now time to
# parameterize the working prior for all updaters so that this working prior
# can be used in the sequel
self.output('\nWorking prior details:')
self.output('\nReference distribution details:')
all_updaters = cold_chain.chain_manager.getAllUpdaters()
for u in all_updaters: # good candidate for moving into C++
if not u.isFixed():
u.setUseWorkingPrior(True)
if u.computesUnivariatePrior() or u.computesMultivariatePrior():
self.output(' Finalizing working prior for %s...' % u.getName())
self.output(' Finalizing reference distribution for %s...' % u.getName())
u.finalizeWorkingPrior()
self.output(' %s --> %s' % (u.getName(), u.getWorkingPriorDescr()))
self.output()
Expand Down
2 changes: 1 addition & 1 deletion phycas/Phycas/Partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def addSubset(self, sites, model_for_sites, name = None):
model.type = 'hky'
hky = model()
partition.addSubset(range(1,100,3), hky, 'first')
partition.addSubset(subset(1,100,3), hky, 'first')
"""
# the index of the new subset is simply the length of self.subset
Expand Down
2 changes: 1 addition & 1 deletion phycas/Phycas/SS.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(self):
("xcycles", 0, "The number of extra cycles (above and beyond mcmc.ncycles) that will be spent exploring the posterior (additional posterior cycles help stepping stone analyses formulate an effective reference distribution).", IntArgValidate(min=0)),
("maxbeta", 1.0, "The first beta value that will be sampled.", FloatArgValidate(min=0.0, max=1.0)),
("minbeta", 0.0, "The last beta value that will be sampled.", FloatArgValidate(min=0.0, max=1.0)),
("minsample", 10, "Minimum sample size needed to create a split-specific edge length working prior.", IntArgValidate(min=0)),
("minsample", 10, "Minimum sample size needed to create a split-specific edge length reference distribution.", IntArgValidate(min=0)),
("shape1", 1.0, "The first shape parameter of the distribution used to determine the beta values to be sampled. This distribution is, confusingly, a Beta distribution. Thus, if both shape1 and shape2 are set to 1, beta values will be chosen at uniform intervals from minbeta to maxbeta.", FloatArgValidate(greaterthan=0.0)),
("shape2", 1.0, "The second shape parameter of the distribution used to determine the beta values to be sampled. This distribution is, confusingly, a Beta distribution. Thus, if both shape1 and shape2 are set to 1, beta values will be chosen at uniform intervals from minbeta to maxbeta.", FloatArgValidate(greaterthan=0.0)),
)
Expand Down
2 changes: 1 addition & 1 deletion phycas/Phycas/SumPImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def handleFile(self, fn):
if headers[1] == 'beta':
try:
self.marginal_likelihood(headers, lines, burnin)
except InvalidNumberOfColumnsError as e:
except InvalidNumberOfColumnsError, e:
print e
else:
self.std_summary(headers, lines, burnin)
Expand Down
2 changes: 2 additions & 0 deletions phycas/Utilities/PhycasCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ def explain(self):
a = [self.cmd_name]
a.extend(PhycasTablePrinter._text_wrapper.wrap(self.cmd_descrip))
o = opts._help_str_list()
o.sort()
h = PhycasTablePrinter.format_help("Attribute", "Explanation")
if len(o) > 0:
a.extend(["\nAvailable input options:", h, d])
Expand All @@ -1103,6 +1104,7 @@ def current(self):
d = PhycasTablePrinter.get_help_divider()
h = PhycasTablePrinter.format_help("Attribute", "Current Value")
o = opts._current_str_list()
o.sort()
if len(o) > 0:
a.extend(["\nCurrent %s input settings:" % self.cmd_name , h, d])
a.extend(o)
Expand Down

0 comments on commit 0ddec1f

Please sign in to comment.