aspartik.b3.config

class MCMCConfig:

@dataclass(slots=True)
class MCMCConfig:
    msa: MSA

    _: KW_ONLY

    heights: Optional[Sequence[float]] = None
    tree_sim_pop_size: float = 100.0

    tree_prior: Literal["yule", "constant", "exponential"]
    param_priors: dict[str, Continuous] = field(default_factory=dict)
    substitution_model: Literal["JC", "K80", "HKY", "GTR"]
    clock_rate: Optional[float] = None

    calculator: Literal["cpu", "cuda"] = "cpu"
    operator_mix: Literal["scalable", "beauti1_classic", "beauti1_default"] = "scalable"

    overwrite: bool = True

    print_every: Optional[int] = 10_000

    trace_path: Optional[str] = None
    trace_every: int = 1_000

    # for BEAST
    trees_path: Optional[str] = None

    state_path: Optional[str] = None
    state_every: int = 100_000

    timer: bool = False

    length: Optional[int] = None

    seed: int = 4

    def b3_mcmc(self) -> MCMC:
        return _b3_config(self)

    def b3_run(self, mcmc: MCMC):
        mcmc = self.b3_mcmc()
        assert self.length is not None
        mcmc.run(self.length)

    def b3_make_and_run(self):
        self.b3_run(self.b3_mcmc())

    def beast1_config(self) -> str:
        return _beast1_config(self)

    def beast1_run(self, config: str):
        assert self.length is not None
        _beast1_run(self, config)

    def beast1_make_and_run(self):
        self.beast1_run(self.beast1_config())
#

msa: aspartik.data.msa.MSA

#

heights: typing.Union

#

tree_sim_pop_size: float

#

tree_prior: typing.Literal

#

param_priors: dict

#

substitution_model: typing.Literal

#

clock_rate: typing.Union

#

calculator: typing.Literal

#

operator_mix: typing.Literal

#

overwrite: bool

#

print_every: typing.Union

#

trace_path: typing.Union

#

trace_every: int

#

trees_path: typing.Union

#

state_path: typing.Union

#

state_every: int

#

timer: bool

#

length: typing.Union

#

seed: int

#

def b3_mcmc(self) -> aspartik.b3.MCMC

    def b3_mcmc(self) -> MCMC:
        return _b3_config(self)
#

def b3_run(self, mcmc: aspartik.b3.MCMC)

    def b3_run(self, mcmc: MCMC):
        mcmc = self.b3_mcmc()
        assert self.length is not None
        mcmc.run(self.length)
#

def b3_make_and_run(self)

    def b3_make_and_run(self):
        self.b3_run(self.b3_mcmc())
#

def beast1_config(self) -> str

    def beast1_config(self) -> str:
        return _beast1_config(self)
#

def beast1_run(self, config: str)

    def beast1_run(self, config: str):
        assert self.length is not None
        _beast1_run(self, config)
#

def beast1_make_and_run(self)

    def beast1_make_and_run(self):
        self.beast1_run(self.beast1_config())
#