plotMCMCoutput
Shell scripts (bash) for plotting MCMC output (e.g., from MrBayes v.3, BEAST, etc) using gnuplot.
Usage
$ plotMCMCoutput.sh [-b burnin] [-o file | -l, -t] [[-c column] | [-x column][-y column]] file(s)
Examples
-
Plot trace of log Likelihood in MrBayes .p files
$ plotMCMCoutput.sh *.p
-
Plot trace of log Likelihood with burnin = 50
$ plotMCMCoutput.sh -b 50 *.p
-
Plot trace of log Likelihood in terminal (no graphics)
$ plotMCMCoutput.sh -t *.p
-
Plot trace of log Likelihood to file (PNG)
$ plotMCMCoutput.sh -o out.png *.p
-
Plot trace of log Likelihood from a growing ("live") file
$ plotMCMCoutput.sh -l *.p
$ plotMCMCoutput.sh -t -l *.p
-
Find out what parameters you have in the p file:
$ grep '^Gen' run1.p | tr '\t' '\n' | nl 1 Gen 2 LnL 3 TL 4 pi(A) 5 pi(C) 6 pi(G) 7 pi(T)
-
Plot selected columns
$ plotMCMCoutput.sh -c 3 *.p
$ plotMCMCoutput.sh -t -c 3 *.p
$ plotMCMCoutput.sh -x 4 -y 7 *.p
$ plotMCMCoutput.sh -t -x 4 -y 7 *.p
-
Plot average standard deviation of split frequencies, specifying 0.03 as the treshold
$ plotstddev runs.1.2.mcmc 0.03
$ plotstddev_term.sh -t runs.1.2.mcmc 0.03
Files
-
plotMCMCoutput.sh -- General script for quickly plotting column data.
-
plotstddev -- Plot the standard deviation of split frequencies in a MrBayes .mcmc file.
-
plotstddev_term.sh -- Plot the standard deviation of split frequencies in a MrBayes .mcmc file, but plot in terminal window instead of device.
-
run1.p -- Example parameter file from MrBayes v.3
-
run2.p -- Example parameter file from MrBayes v.3
-
runs.1.2.mcmc -- Example .mcmc file from MrBayes v.3
Dependencies
All scripts are dependent on the gnuplot software.
Licence and Copyright
Copyright (c) 2010-2020 Johan Nylander
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.