Skip to content

Commit

Permalink
including BEAGLE citation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyBaele committed May 15, 2024
1 parent 263b967 commit 1f89a86
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
89 changes: 89 additions & 0 deletions src/dr/app/beast/BeagleVersion.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* BeastVersion.java
*
* Copyright (c) 2002-2015 Alexei Drummond, Andrew Rambaut and Marc Suchard
*
* This file is part of BEAST.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership and licensing.
*
* BEAST is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* BEAST is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with BEAST; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

package dr.app.beast;

import beagle.BeagleInfo;
import dr.util.Author;
import dr.util.Citable;
import dr.util.Citation;

import java.util.Arrays;
import java.util.List;

/**
* This class provides a mechanism for returning the version number and
* citation of the BEAGLE high-performance computational library.
*
* @author Guy Baele
*
* $Id$
*/

public class BeagleVersion implements Citable {

public static final BeagleVersion INSTANCE = new BeagleVersion();

public String getVersion() {
return BeagleInfo.getVersion();
}

@Override
public Citation.Category getCategory() {
return Citation.Category.COMPUTATIONAL_LIBRARY;
}

@Override
public String getDescription() {
return "BEAGLE citation";
}

@Override
public List<Citation> getCitations() {
return Arrays.asList(CITATIONS);
}

public static Citation[] CITATIONS = new Citation[] {
new Citation(
new Author[]{
new Author("DL", "Ayres"),
new Author("MP", "Cummings"),
new Author("G", "Baele"),
new Author("AE", "Darling"),
new Author("PO", "Lewis"),
new Author("DL", "Swofford"),
new Author("JP", "Huelsenbeck"),
new Author("P", "Lemey"),
new Author("A", "Rambaut"),
new Author("MA", "Suchard")
},
"BEAGLE 3: Improved performance, scaling, and usability for a high-performance computing library for statistical phylogenetics",
2019,
"Systematic Biology",
68, 1052, 1061,
"10.1093/sysbio/syz020")
};

}
1 change: 1 addition & 0 deletions src/dr/app/beast/BeastMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ public static void main(String[] args) throws java.io.IOException {
new Arguments.Option("force_resume", "Force resuming from a saved state"),

new Arguments.StringOption("citations_file", "FILENAME", "Specify a filename to write a citation list to"),
//new Arguments.Option("citations_off", "Turn off writing citations to file"),
new Arguments.StringOption("plugins_dir", "FILENAME", "Specify a directory to load plugins from, multiple can be separated with ':' "),

new Arguments.Option("version", "Print the version and credits and stop"),
Expand Down
4 changes: 4 additions & 0 deletions src/dr/app/beast/BeastParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

package dr.app.beast;

import beagle.BeagleInfo;
import dr.util.Citation;
import dr.util.Pair;
import dr.util.Version;
Expand Down Expand Up @@ -57,7 +58,10 @@ public class BeastParser extends XMLParser {
public BeastParser(String[] args, List<String> additionalParsers, boolean verbose, boolean parserWarnings, boolean strictXML, Version version) {
super(verbose, parserWarnings, strictXML, version);

//add BEAST citation
addCitable(BeastVersion.INSTANCE);
//add BEAGLE citation
addCitable(BeagleVersion.INSTANCE);

setup(args);

Expand Down
1 change: 1 addition & 0 deletions src/dr/util/Citation.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ public String getText() {

public enum Category {
FRAMEWORK("Framework"),
COMPUTATIONAL_LIBRARY("Computational library"),
SUBSTITUTION_MODELS("Substitution Models"),
PRIOR_MODELS("Prior Models"),
TRAIT_MODELS("Trait Models"),
Expand Down

0 comments on commit 1f89a86

Please sign in to comment.