Pruning posterior distributions

A standard application of Jambe using the command java Jambe leads to various output files. Of main interest for the pruning option is file resultsAllTopos.out. This file contains all the topology strings written out during the MCMC simulations, for various window positions.

The probabilistic divergence measures can be computed from resultsAllTopos.out with class JambeAnalyseTopos; just give the command java JambeAnalyseTopos. If you want to apply the simple pruning option described here , all you need to do is create a file called prune.in with a single integer number. This number specifies the total number of different topologies to which the original posterior distribution is pruned down. Next, give the command java JambeAnalyseTopos, as usual.

The package contains two further classes for pruning options, which are described below.

Pruning taxa

If you want to discard certain taxa, proceed as follows. First, create a file called prune_taxum.in with a single integer number: the number of the taxum to be removed. Next, copy or move your file resultsAllTopos.out to file resultsAllTopos.bak. Finally, give the command java PruneTaxum > resultsAllTopos.out. File resultsAllTopos.out no longer contains the taxum specified in prune_taxum.in. However, as a consequence of string manipulations performed by the program, different topology strings may actually encode the same topology. In order to rectify this shortcoming, an invocation of PruneInput is required, which merges topology strings that encode the same topology. An example of a full application is given below.

Pruning inputs

Java class PruneInput has various applications.

Questions you have to ask yourself:

Examples

You want to remove a specified taxum from the alignment without re-running the MCMC simulations. The results from a previous application of Jambe are saved in file resultsAllTopos.out. Proceed as follows. First, create file prune_taxum.in, whose single integer number defines the taxum to be removed. Unless you are running into memory problems, you may want to create a file called prune_taxum_format.in with a single integer number "0"; this keeps the topology strings rather than replace them by integers. Next, give the following commands:

mv resultsAllTopos.out resultsAllTopos.bak
java PruneTaxum > resultsAllTopos.out
java PruneInput > xxx
mv xxx resultsAllTopos.out
java JambeAnalyseTopos

Warning

Always make sure that the parameters in the input files prune_taxum.in, prune_input_format.in and prune_input_thresh.in are set correctly. Typical mistakes are:
  1. You forget to create a file, in which case you won't get any error message: the program will use default parameters, which are not necessarily those that you intended to use.
  2. An input file exists in your working directory, but you are not aware of it. In this case the program will use the parameters read in from file, while you might be oblivious to this fact, erroneously assuming that you were using default parameters.

Bug

All operations are based on a computation of the Robinson-Foulds distance. To this end, a function from the PAL library is invoked. The results you get from this function, however, are occasionally wrong.

Back to my homepage