-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LPhy 1.5.*, LPhyBEAST 1.1.*, LPhyBeastExt 0.3.* #7
- Loading branch information
Showing
130 changed files
with
2,022 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions
7
...s/birth-death/simpleBirthDeathSerial.lphy → ...s/birth-death/simpleBirthDeathSerial.lphy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
model { | ||
data { | ||
λ = 1; | ||
deathRate = 0.5; | ||
tmrca = 10; | ||
ψ ~ BirthDeathSerialSampling(lambda=λ, mu=deathRate, rho=0.1, psi=1.0, rootAge=tmrca, ages=[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]); | ||
ages = [0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]; | ||
} | ||
model { | ||
ψ ~ BirthDeathSerialSampling(lambda=λ, mu=deathRate, rho=0.1, psi=1.0, rootAge=tmrca, ages=ages); | ||
TL = ψ.treeLength(); | ||
rootAge = ψ.rootAge(); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data { | ||
table = readDelim(file="data/bears_taxa.tsv", sep="\t"); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
10 changes: 7 additions & 3 deletions
10
...ent/simpleMultispeciesCoalescentTaxa.lphy → ...ent/simpleMultispeciesCoalescentTaxa.lphy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions
46
beast2.7/lphy-studio-1.5/examples/data-clamping/covidDPG.lphy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
data { | ||
// extract dates | ||
options={ageDirection="forward", ageRegex=".*\|(\d+\.\d+)$"}; | ||
D = readFasta(file="data/bluff-wedding-cluster.fasta", options=options); | ||
|
||
// Bayesian Skyline | ||
numGroups = 20; | ||
taxa = D.taxa(); | ||
w = taxa.length()-1; | ||
// i starts from 0 | ||
D_trait = extractTrait(taxa=taxa, sep="|", i=1); | ||
K = D_trait.stateCount(); | ||
dim = K*(K-1)/2; | ||
dataType = D_trait.dataType(); | ||
} | ||
model { | ||
κ ~ LogNormal(meanlog=1.0, sdlog=1.25); | ||
π ~ Dirichlet(conc=[1.0,1.0,1.0,1.0]); | ||
|
||
firstValue ~ LogNormal(meanlog=0.0, sdlog=2.0); | ||
Θ ~ ExpMarkovChain(firstValue=firstValue, n=numGroups); | ||
groupSizes ~ RandomComposition(n=w, k=numGroups); | ||
ψ ~ SkylineCoalescent(theta=Θ, taxa=taxa, groupSizes=groupSizes); | ||
|
||
// "7.87e-05" "9.12e-04" "1.06e-02" | ||
clockRate ~ LogNormal(meanlog=-7.0, sdlog=1.25); | ||
|
||
D ~ PhyloCTMC(L=D.nchar(), Q=hky(kappa=κ, freq=π), mu=clockRate, tree=ψ); | ||
|
||
π_trait ~ Dirichlet(conc=rep(element=3.0, times=K)); | ||
// symmetric, rates dimension = n * (n-1) / 2 | ||
R_trait ~ Dirichlet(conc=rep(element=1.0, times=dim)); | ||
|
||
// trait indicators | ||
I ~ Bernoulli(p=0.5, replicates=dim, minSuccesses=dim-2); | ||
// S ~ Poisson(lambda=2, min=K, max=dim); | ||
// I ~ RandomBooleanArray(length=dim, hammingWeight=S); | ||
|
||
//μ_trait ~ Gamma(shape=0.001, scale=1000.0); | ||
μ_trait ~ LogNormal(meanlog=2.0, sdlog=2.0); | ||
|
||
// construct the GTR instantaneous rate matrix | ||
Q_trait = generalTimeReversible(freq=π_trait, rates=select(x=R_trait, indicator=I)); | ||
// use the data type of trait alignment extracted from taxa names | ||
D_trait ~ PhyloCTMC(L=1, Q=Q_trait, mu=μ_trait, tree=ψ, dataType=dataType); | ||
} |
File renamed without changes.
162 changes: 162 additions & 0 deletions
162
beast2.7/lphy-studio-1.5/examples/data-clamping/data/bluff-wedding-cluster.fasta
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
beast2.7/lphy-studio-1.5/examples/data-clamping/readDelim.lphy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
data { | ||
table = readDelim(file="data/bears_taxa.tsv", sep="\t"); | ||
colNames = table.getColumnNames(); | ||
taxonNames = table.getColumn(0); | ||
// cast doubles | ||
minAges = toDouble(table.getColumn(1)); | ||
// otherwise it will be string | ||
maxAges = table.getColumn(2); | ||
// ages must be a double array | ||
taxa = taxa(names = taxonNames, ages = minAges); | ||
} |
7 changes: 7 additions & 0 deletions
7
beast2.7/lphy-studio-1.5/examples/data-clamping/simpleDataClamping.lphy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
data { | ||
L = [22,11,33]; | ||
n = length(L); | ||
} | ||
model { | ||
L ~ Poisson(lambda=1.0, replicates=n); | ||
} |
File renamed without changes.
Oops, something went wrong.