Skip to content

Cannot get tree with lengths as ENS for a rate heterogeneous model #1925

@GavinHuttley

Description

@GavinHuttley
gn = get_model("GN", distribution="gamma", with_rate=True)
tree = make_tree(tip_names=aln.names)
lf = gn.make_likelihood_function(tree, bins=4)
lf.set_param_rule("bprobs", is_constant=True)
lf.set_alignment(aln)
lf.get_ens_tree()

generates

File ~/miniconda3/envs/c312/lib/python3.12/site-packages/cogent3/recalculation/scope.py:223, in _Defn._getPosnForScope(self, *args, **scope)
221 raise InvalidScopeError(f"no value for {self.name} at {scope}")
222 if len(posns) > 1:
--> 223 raise IncompleteScopeError(
224 f"{len(posns)} distinct values of {self.namel within {scope}"
225
226 return the_one_item_in(posns)
IncompleteScopeError: "4 distinct values of psubs within {'edge': 'Human', 'bin': None, 'locus': None}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions