aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/code/pangemma.md47
1 files changed, 46 insertions, 1 deletions
diff --git a/doc/code/pangemma.md b/doc/code/pangemma.md
index c4ac75d..3c9e6d4 100644
--- a/doc/code/pangemma.md
+++ b/doc/code/pangemma.md
@@ -6,7 +6,7 @@ This is not the first attempt, in fact quite a few efforts have started, but non
We want to keep the tool heart beating while upgrading the environment taking inspiration from fetal heart development: The human heart is one of the first organs to form and function during embryogenesis. By the end of gestational week 3, passive oxygen diffusion becomes insufficient to support metabolism of the developing embryo, and thus the fetal heart becomes vital for oxygen and nutrient distribution. The initiation of the first heart beat via the *primitive heart tube* begins at gestational day 22, followed by active fetal blood circulation by the end of week 4. The start of early heart development involves several types of progenitor cells that are derived from the mesoderm, proepicardium, and neural crest. This eventually leads to the formation of the 4-chambered heart by gestational week 7 via heart looping and complex cellular interactions in utero (e.g., [Tan and Lewandowski](https://doi.org/10.1159/000501906)).
-What we will do is create components and wire them together, allowing for sharing RAM between components. Each component may have multiple implementations. We will introduce a DSL for orchestration and we may introduce a propagated network to run components in parallel and test them for correctness. At the same time, the core functionality of GEMMA will keep going while we swap components in and out.
+What we will do is create components and wire them together, allowing for sharing RAM between components. Each component may have multiple implementations. We will introduce a DSL for orchestration and we may introduce a propagator network to run components in parallel and test them for correctness. At the same time, the core functionality of GEMMA will keep going while we swap components in and out. See also [propagators](https://groups.csail.mit.edu/mac/users/gjs/propagators/) and [examples](https://github.com/namin/propagators/blob/master/examples/multiple-dwelling.scm).
We want PanGEMMA to be able to run on high peformance computing (HPC) architectures, including GPU targets. This implies the core project can have few dependencies and should easily compile from C.
@@ -21,3 +21,48 @@ We want PanGEMMA to be able to run on high peformance computing (HPC) architectu
The original gemma source base is considered stable and will be maintained - mostly to prevent bit rot. See https://github.com/genetics-statistics/GEMMA. To move forward we forked pangemma to be able to break with the past.
Even so, pangemma is supposed to be able to run the same steps as the original gemma. And hopefully improve things.
+
+# A simple propagator network
+
+We will create cells that hold basic computations. We won't do a full propagator setup, though we may do a full implementation later.
+For now we use a network of cells - essentially a dependency graph of computation. Cells can tell other cells that they require them and that allows for alternate paths. E.g. to create a kinship matrix:
+
+```
+(define-cell genotypes)
+(define-cell kinship-matrix (e:kinship genotypes)
+(run)
+(content kinship-matrix)
+```
+
+essentially e:kinship gets run when genotypes are available. It is kinda reversed programming. Now say we want to add an input and a filter:
+
+
+```
+(define-cell bimbam-genofile)
+(define-cell input-genotypes (e:read-bimbam bimbam-genofile))
+(define-cell genotypes (e:freq-filter input-genotypes))
+```
+
+now you can see some logic building up to get from file to genotypes. Next we can add a different file format:
+
+```
+(define-cell plink-genofile)
+(define-cell input-genotypes (e:read-plink plink-genofile))
+```
+
+and we have created another 'route' to get to the kinship matrix.
+
+```
+(add-content bimbam-genofile "test.bimbam")
+(run)
+```
+
+runs one path and
+
+```
+(add-content plink-genofile "test.plink")
+(add-content bimbam-genofile "test.bimbam")
+(run)
+```
+
+will run both.