Skip to content

Review lphy datatype naming, error message: Unphased genotype not supported for error model. #98

@EvaLiyt

Description

@EvaLiyt

When we pass in unphased genotype for GT16 error model, it would give us the error that Error model cannot handle data type nucleotideDiploid10 while running lphybeast.

Here's the lphy script:

data {
   // alignment
    A = readFasta(file = "alignment_r0.fasta", sequenceType=unphasedGenotype());
    L = A.nchar();
}
model{
    lambda ~ LogNormal(meanlog = -0.6, sdlog = 0.1);
    mu ~ LogNormal(meanlog = -5.8, sdlog=0.1);
    tree ~ Yule(lambda=lambda, n=40);

    // gt16 model
    π ~ 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);

    D ~ PhyloCTMC(L=L, Q=Q, tree=tree, dataType=phasedGenotype(), mu=mu);
    U = unphase(D);

    epsilon ~ Beta(alpha=2, beta=18);
    delta ~ Beta(alpha=1.5, beta=4.5);
    A ~ GT16ErrorModel(delta=delta, epsilon=epsilon, alignment=U);
}

Here is the fasta file: (change the extension before use it)

alignment_r0.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions