McmcCheckPointReader

class McmcCheckPointReader(fName=None, theGlob='*', last=False, verbose=True)[source]

Read in and display mcmc_checkPoint files.

Three options–

To read in a specific checkpoint file, specify the file name by fName=whatever

To read in the most recent (by os.path.getmtime()) checkpoint file, say last=True

If you specify neither of the above, it will read in all the checkPoint files that it finds.

Where it looks is determined by theGlob, which by default is ‘*’, ie everything in the current directory. If you want to look somewhere else, you can specify eg:

theGlob='SomeWhereElse/*'

or, if it is unambiguous, just:

theGlob='S*/*'

So you might say:

cpr = McmcCheckPointReader(theGlob='*_0.*')

to get all the checkpoints from the first run, run 0. Then, you can tell the cpr object to do various things. Eg:

cpr.writeProposalAcceptances()

But perhaps the most powerful thing about it is that it allows easy access to the checkpointed Mcmc objects, in the list mm. Eg to get the first one, ask for:

m = cpr.mm[0]

and m is an Mcmc object, complete with all its records of proposals and acceptances and so on. And the TreePartitions object. No data, tho, of course.

(Sorry! – Lazy documentation. See the source code for more that it can do.)

compareSplits(mNum1, mNum2, verbose=True, minimumProportion=0.1)[source]

Do the TreePartitions.compareSplits() method between two checkpoints

Parameters
  • mNum1 (int) – indices to Mcmc checkpoints in self

  • mNum2 (int) – indices to Mcmc checkpoints in self

Returns

a tuple of asdoss and the maximum difference in split supports

compareSplitsAll(precision=3, linewidth=120)[source]

Do func.compareSplitsBetweenTreePartitions() for all pairs

Output is verbose. Shows - average standard deviation of split frequencies (or supports), like MrBayes - maximum difference between split supports from each pair of checkpoints, like PhyloBayes

Returns

None

dump(extras=False)[source]
read(fName)[source]
writeProposalAcceptances()[source]
writeProposalProbs()[source]
writeSwapMatrices()[source]
writeSwapVectors()[source]