Skip to content

Commit

Permalink
Changed multinomial distribution to Dirichlet multinomial distrbution…
Browse files Browse the repository at this point in the history
… for readcount model #56
  • Loading branch information
zjzxiaohei committed Jul 4, 2024
1 parent 0a67d7c commit 9371d14
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 306 deletions.
4 changes: 2 additions & 2 deletions phylonco-lphy/examples/gt16CoalErrModel.lphy
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Θ ~ LogNormal(meanlog=-2.0, sdlog=1.0);
ψ ~ Coalescent(n=16, theta=Θ);
ψ ~ Coalescent(n=4, theta=Θ);
π ~ Dirichlet(conc=[3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0]);
rates ~ Dirichlet(conc=[1.0, 2.0, 1.0, 1.0, 2.0, 1.0]);
Q = gt16(freq=π, rates=rates); // construct the GT16 instantaneous rate matrix
A ~ PhyloCTMC(L=200, Q=Q, tree=ψ, dataType=phasedGenotype());
A ~ PhyloCTMC(L=5, Q=Q, tree=ψ, dataType=phasedGenotype());
epsilon ~ Beta(alpha=2, beta=18);
delta ~ Beta(alpha=1.5, beta=4.5);
E ~ GT16ErrorModel(delta=delta, epsilon=epsilon, alignment=A);
5 changes: 3 additions & 2 deletions phylonco-lphy/examples/gt16ReadCountModel.lphy
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Q = gt16(freq=π, rates=rates); // construct the GT16 instantaneous rate matrix
A ~ PhyloCTMC(L=l, Q=Q, tree=ψ, dataType=phasedGenotype());
//epsilon ~ Beta(alpha=2, beta=18);
//delta ~ Beta(alpha=1.5, beta=4.5);
epsilon = 0.01;
epsilon = 0.1;
delta = 0.24;
// cov = [rep(1, 5), rep(2, 5), rep(3, 5), rep(4, 5)];
meanT = 2.3; // average coverage = lognormal(meanT, sdT)
Expand All @@ -24,5 +24,6 @@ s ~ LogNormal(meanlog= meanS, sdlog= sdS, replicates=n);
alpha ~ Ploidy(l= l, n= n, delta= delta);
cov ~ CoverageModel(alpha= alpha, t= t, v= v, s= s);

w1 = 100.0;

r ~ ReadCountModel(D=A, epsilon=epsilon, alpha=alpha, coverage=cov);
r1 ~ ReadCountModel(D=A, epsilon=epsilon, alpha=alpha, coverage=cov, w=w1);
Loading

0 comments on commit 9371d14

Please sign in to comment.