esteinig / critter Goto Github PK
View Code? Open in Web Editor NEWBEAST models for pathogen transmission dynamics in Python
License: Apache License 2.0
BEAST models for pathogen transmission dynamics in Python
License: Apache License 2.0
I figured out a pattern for inheritance on the Distribution
class in critter.blocks.distributions
that load RealParameter
instances on initiation. This way both Distribution
and RealParameter
identifiers can be set by users (for @
in the BEAST XMLs) while conforming to pydantic.BaseModel
inheritance from the Distribution
class.
Aim:
Production grade library for pathogen phylodynamics
Ideas:
CaveDive
) [collaboration]BDSky
and MTBD
) [based on our papers]SARS-CoV-2
models for variants and national / subnational configs [collaboration SSI]Features:
pydantic
model orientedDeployment:
FastAPI
server + Vue
Implement basic XML blocks based on BEAST 2.5
:
RealParameter
--> <parameter/>
Distribution
base class --> <Gamma/>
Priors
--> <prior/>
Operator
--> <operator/>
Travis is nice for pytest
deployment on merges into main
but for releases ideally we should test a series of model configs and generated XMLs across BEST versions (using the validate
option for example)
Probably need Docker container for it and maybe some GitHub actions or something? Haven't tried them yet.
Reimplemented YAML
model configuration with pydantic
- which really is more suitable for this than the base block [#2] implementations. It seems that the pydantic
config classes and base blocks should be merged, so that the critter.config.CritterConfig
class is not required to translate between them.
Model configs from YAML
are great for sharing tempates of specific model configurations - e.g. a sliced sampling proportion birth death skyline model. Itm ight also provide a way forward to implement dynamic configuration of the parameters from the CLI.
Omg @Wytamma I cannot believe it there exists a project called BEASTling
wrapping linguistic model XMLs - that is so funny, guess it's been around long enough to have a explored a significant portion of the BEAST
namespace ^^
https://beastling.readthedocs.io/en/latest/overview.html#what-does-beastling-actually-do
Gotta rethink a name, that's also available on readthedocs.io
All those green unit test look great! I'll add some integration tests for critter (partly to learn how it works).
Include some of the useful blocks from feast
Unique identifier in distributions and parameters (using critter.utils.get_uuid
) is instantiated at import, so that using the same import results in assignment of the same (replicated) identifiers.
Created a readthedocs
hook, need to figure out a good structure. Do you have a template @Wytamma?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.