Skip to content

Commit

Permalink
psf String
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed May 17, 2024
2 parents 4705187 + 9013e1f commit 31e0ba0
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 107 deletions.
25 changes: 3 additions & 22 deletions src/dr/app/beast/BeagleVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
import dr.util.Author;
import dr.util.Citable;
import dr.util.Citation;
import dr.util.CommonCitations;

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

/**
Expand Down Expand Up @@ -62,28 +64,7 @@ public String getDescription() {

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

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")
};

}
2 changes: 1 addition & 1 deletion src/dr/app/beast/BeastMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class BeastMain {
public static final double DEFAULT_DELTA = 1.0;
public static final int DEFAULT_SWAP_CHAIN_EVERY = 100;

private static final String CITATION_FILE_SUFFIX = "_citations.txt";
private static final String CITATION_FILE_SUFFIX = ".citations.txt";

static class BeastConsoleApp extends jam.console.ConsoleApplication {
XMLParser parser = null;
Expand Down
37 changes: 36 additions & 1 deletion src/dr/evomodel/branchratemodel/BranchSpecificFixedEffects.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface BranchSpecificFixedEffects {

int getDimension();

abstract class Base extends AbstractModel implements BranchSpecificFixedEffects {
abstract class Base extends AbstractModel implements BranchSpecificFixedEffects, Citable {

public Base(String name) {
super(name);
Expand All @@ -42,6 +42,40 @@ public double[] getDifferential(double rate, final Tree tree, final NodeRef node
}
return result;
}

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

@Override
public String getDescription() {
return "Mixed effects clock model";
}

@Override
public List<Citation> getCitations() {
Citation citation = new Citation(
new Author[]{
new Author("M", "Bletsa"),
new Author("MA", "Suchard"),
new Author("X", "Ji"),
new Author("S", "Gryseels"),
new Author("B", "Vrancken"),
new Author("G", "Baele"),
new Author("M", "Worobey"),
new Author("P", "Lemey")
},
"Divergence dating using mixed effects clock modelling: an application to HIV-1",
2019,
"Virus Evolution",
5,
"vez036",
"10.1093/ve/vez036"
);
return Collections.singletonList(citation);
}

}

class None extends Base implements BranchSpecificFixedEffects {
Expand Down Expand Up @@ -98,6 +132,7 @@ public Parameter getFixedEffectsParameter() {
public int getDimension() {
return 1;
}

}

class Transformed extends Base implements BranchSpecificFixedEffects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import static dr.evomodel.treedatalikelihood.BeagleFunctionality.*;

@Deprecated
public class BeagleMatrixExponentiationDelegate extends AbstractModel implements Citable {
public class BeagleMatrixExponentiationDelegate extends AbstractModel {

// This property is a comma-delimited list of resource numbers (0 == CPU) to
// allocate each BEAGLE instance to. If less than the number of instances then
Expand Down Expand Up @@ -339,25 +339,6 @@ public void restoreState() {
protected void acceptState() {
}

// **************************************************************
// INSTANCE CITABLE
// **************************************************************

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

@Override
public String getDescription() {
return "Using BEAGLE likelihood calculation library";
}

@Override
public List<Citation> getCitations() {
return Collections.singletonList(CommonCitations.AYRES_2019_BEAGLE);
}

// **************************************************************
// INSTANCE VARIABLES
// **************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* @version $Id$
*/

public class BeagleDataLikelihoodDelegate extends AbstractModel implements DataLikelihoodDelegate, Citable {
public class BeagleDataLikelihoodDelegate extends AbstractModel implements DataLikelihoodDelegate {

private static final boolean COUNT_CALCULATIONS = true; // keep a cumulative total of number of computations

Expand Down Expand Up @@ -1097,25 +1097,6 @@ public long getTotalCalculationCount() {
return totalPartialsUpdateCount;
}

// **************************************************************
// INSTANCE CITABLE
// **************************************************************

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

@Override
public String getDescription() {
return "BEAGLE likelihood calculation library";
}

@Override
public List<Citation> getCitations() {
return Collections.singletonList(CommonCitations.AYRES_2019_BEAGLE);
}

private void releaseBeagle() throws Throwable {
if (beagle != null && releaseSingleton) {
beagle.finalize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
* @version $Id$
*/

public class MultiPartitionDataLikelihoodDelegate extends AbstractModel implements DataLikelihoodDelegate, Citable {
public class MultiPartitionDataLikelihoodDelegate extends AbstractModel implements DataLikelihoodDelegate {

private static final boolean COUNT_CALCULATIONS = true; // keep a cumulative total of number of computations

Expand Down Expand Up @@ -1321,25 +1321,6 @@ public long getTotalCalculationCount() {
return totalPartialsUpdateCount;
}

// **************************************************************
// INSTANCE CITABLE
// **************************************************************

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

@Override
public String getDescription() {
return "BEAGLE likelihood calculation library";
}

@Override
public List<Citation> getCitations() {
return Collections.singletonList(CommonCitations.AYRES_2019_BEAGLE);
}

// **************************************************************
// INSTANCE VARIABLES
// **************************************************************
Expand Down
16 changes: 1 addition & 15 deletions src/dr/evomodel/treelikelihood/BeagleTreeLikelihood.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

@SuppressWarnings("serial")
@Deprecated // Switching to TreeDataLikelihood
public class BeagleTreeLikelihood extends AbstractSinglePartitionTreeLikelihood implements ThreadAwareLikelihood, Citable {
public class BeagleTreeLikelihood extends AbstractSinglePartitionTreeLikelihood implements ThreadAwareLikelihood {

// This property is a comma-delimited list of resource numbers (0 == CPU) to
// allocate each BEAGLE instance to. If less than the number of instances then
Expand Down Expand Up @@ -1534,18 +1534,4 @@ public double[] getSiteLogLikelihoods() {
return siteLogLikelihoods;
}

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

@Override
public String getDescription() {
return "Using BEAGLE likelihood calculation library";
}

public List<Citation> getCitations() {
return Collections.singletonList(CommonCitations.AYRES_2019_BEAGLE);
}

}//END: class
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import dr.inference.markovjumps.MarkovJumpsType;
import dr.inference.model.Parameter;
import dr.inference.model.Variable;
import dr.util.Citable;
import dr.util.Citation;
import dr.util.CommonCitations;

Expand All @@ -62,7 +63,7 @@
* Journal of Mathematical Biology, 56, 391-412.
*/
public class MarkovJumpsBeagleTreeLikelihood extends AncestralStateBeagleTreeLikelihood
implements MarkovJumpsRegisterAcceptor, MarkovJumpsTraitProvider {
implements MarkovJumpsRegisterAcceptor, MarkovJumpsTraitProvider, Citable {

public MarkovJumpsBeagleTreeLikelihood(PatternList patternList, MutableTreeModel treeModel,
BranchModel branchModel,
Expand Down Expand Up @@ -672,15 +673,18 @@ private double getExpectedTreeLength() {
}
}

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

@Override
public String getDescription() {
return super.getDescription() + " (first citation) with MarkovJumps inference techniques (second citation)";
return "MarkovJumps inference techniques";
}

public List<Citation> getCitations() {
List<Citation> citationList = new ArrayList<Citation>(super.getCitations());
citationList.add(CommonCitations.MININ_2008_COUNTING);
return citationList;
return Collections.singletonList(CommonCitations.MININ_2008_COUNTING);
}

public static final String ALL_HISTORY = "history_all";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ public XMLSyntaxRule[] getSyntaxRules() {

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

@Override
Expand Down
5 changes: 3 additions & 2 deletions src/dr/util/Citation.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ public Citation(Author[] authors, String title, int year, String journal, String
this(authors, title, year, journal, -1, location, null);
}

public Citation(Author[] authors, String title, int year, String journal, int volumn, String location,
public Citation(Author[] authors, String title, int year, String journal, int volume, String location,
String DOI) {
this.authors = authors;
this.title = title;
this.year = year;
this.journal = journal;
this.location = location;
this.volume = volumn;
this.volume = volume;
this.startpage = -1;
this.endpage = -1;
this.DOI = DOI;
Expand Down Expand Up @@ -244,6 +244,7 @@ public String getText() {
public enum Category {
FRAMEWORK("Framework"),
COMPUTATIONAL_LIBRARY("High-Performance Computing"),
ADVANCED_ESTIMATION_METHODS("Advanced Estimation Methods"),
SUBSTITUTION_MODELS("Substitution Models"),
PRIOR_MODELS("Prior Models"),
TRAIT_MODELS("Trait Models"),
Expand Down

0 comments on commit 31e0ba0

Please sign in to comment.