Search in sources :

Example 1 with BeastGenerator

use of dr.app.beauti.generator.BeastGenerator in project beast-mcmc by beast-dev.

the class BeautiTesterConfig method createOptions.

public BeautiOptions createOptions() {
    BeautiOptions beautiOptions = new BeautiOptions();
    beautiOptions.fileNameStem = "";
    beautiOptions.treeFileName.clear();
    beautiOptions.substTreeLog = false;
    beautiOptions.substTreeFileName.clear();
    // MCMC options
    beautiOptions.chainLength = 100;
    beautiOptions.logEvery = 100;
    beautiOptions.echoEvery = 100;
    beautiOptions.burnIn = 10;
    beautiOptions.fileName = null;
    beautiOptions.autoOptimize = true;
    // Data options
    beautiOptions.taxonList = null;
    beautiOptions.datesUnits = DateUnitsType.YEARS;
    beautiOptions.datesDirection = DateUnitsType.FORWARDS;
    //        beautiOptions.startingTreeType = StartingTreeType.RANDOM;
    //        beautiOptions.fixedTree = false;
    beautiOptions.performTraceAnalysis = false;
    // until beuati button
    beautiOptions.generateCSV = true;
    beautiOptions.units = Units.Type.SUBSTITUTIONS;
    beautiOptions.maximumTipHeight = 0.0;
    //        beautiOptions.meanSubstitutionRate = 1.0;
    //        beautiOptions.fixedSubstitutionRate = true;
    generator = new BeastGenerator(beautiOptions, null);
    return beautiOptions;
}
Also used : BeautiOptions(dr.app.beauti.options.BeautiOptions) BeastGenerator(dr.app.beauti.generator.BeastGenerator)

Example 2 with BeastGenerator

use of dr.app.beauti.generator.BeastGenerator in project beast-mcmc by beast-dev.

the class BeautiFrame method readFromFile.

protected boolean readFromFile(File file) throws IOException {
    FileInputStream fileIn = new FileInputStream(file);
    try {
        ObjectInputStream in = new ObjectInputStream(fileIn);
        options = (BeautiOptions) in.readObject();
        in.close();
    } catch (IOException ioe) {
        JOptionPane.showMessageDialog(this, "Unable to read BEAUti file. BEAUti can only read files\n" + "created by 'Saving' within BEAUti. It cannot read BEAST\n" + "XML files. To read data within BEAST XML files, use\n" + "the 'Import' option.", "Unable to read file", JOptionPane.ERROR_MESSAGE);
    } catch (ClassNotFoundException cnfe) {
        JOptionPane.showMessageDialog(this, "Unable to read BEAUti file: " + cnfe.getMessage(), "Unable to read file", JOptionPane.ERROR_MESSAGE);
        //To change body of catch statement use File | Settings | File Templates.
        cnfe.printStackTrace();
        return false;
    }
    fileIn.close();
    options.registerComponents(components);
    generator = new BeastGenerator(options, components);
    return true;
}
Also used : BeastGenerator(dr.app.beauti.generator.BeastGenerator)

Aggregations

BeastGenerator (dr.app.beauti.generator.BeastGenerator)2 BeautiOptions (dr.app.beauti.options.BeautiOptions)1