Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
img
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

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.

About

Shell scripts (bash) for plotting MCMC output (e.g., from MrBayes v.3, BEAST, etc) using gnuplot

Resources

License

Releases

No releases published

Packages

No packages published