Shell scripts (bash) for plotting MCMC output (e.g., from MrBayes v.3, BEAST, etc) using gnuplot
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
.gitignore
README.md
plotMCMCoutput.sh
plotstddev
plotstddev_term.sh
run1.p
run2.p
runs.1.2.mcmc

README.md

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

  1. Plot trace of log Likelihood in MrBayes .p files

     $ plotMCMCoutput.sh *.p
    

gnuplot output

  1. Plot trace of log Likelihood with burnin = 50

     $ plotMCMCoutput.sh -b 50 *.p
    

gnuplot output

  1. Plot trace of log Likelihood in terminal (no graphics)

     $ plotMCMCoutput.sh -t *.p
    

gnuplot output

  1. Plot trace of log Likelihood to file (PNG)

     $ plotMCMCoutput.sh -o out.png *.p
    
  2. Plot trace of log Likelihood from a growing ("live") file

     $ plotMCMCoutput.sh -l *.p
    

gnuplot output

    $ plotMCMCoutput.sh -t -l *.p

gnuplot output

  1. 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)
    
  2. Plot selected columns

     $ plotMCMCoutput.sh -c 3 *.p
    

gnuplot output

    $ plotMCMCoutput.sh -t -c 3 *.p

gnuplot output

    $ plotMCMCoutput.sh -x 4 -y 7 *.p

gnuplot output

    $ plotMCMCoutput.sh -t -x 4 -y 7 *.p

gnuplot output

  1. Plot average standard deviation of split frequencies, specifying 0.03 as the treshold

     $ plotstddev runs.1.2.mcmc 0.03
    

gnuplot output

    $ plotstddev_term.sh -t runs.1.2.mcmc 0.03

gnuplot output

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.