@esmirnov.ai/sperm-lab 0.0.0-stage → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +188 -2
- package/dist/core/constants.d.ts +2 -0
- package/dist/core/constants.js +2 -0
- package/dist/core/defects.d.ts +214 -0
- package/dist/core/defects.js +57 -0
- package/dist/core/factors.d.ts +192 -0
- package/dist/core/factors.js +115 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +3 -0
- package/dist/core/simulation.d.ts +19 -0
- package/dist/core/simulation.js +382 -0
- package/dist/core/types.d.ts +116 -0
- package/dist/core/types.js +1 -0
- package/dist/react/geometry.d.ts +26 -0
- package/dist/react/geometry.js +98 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +2 -0
- package/dist/react/renderer.d.ts +16 -0
- package/dist/react/renderer.js +165 -0
- package/dist/react/sperm-lab.d.ts +17 -0
- package/dist/react/sperm-lab.js +524 -0
- package/dist/styles.css +211 -0
- package/docs/API.md +234 -0
- package/docs/DEPLOY.md +76 -0
- package/docs/MODEL.md +164 -0
- package/package.json +84 -4
package/docs/MODEL.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Model and evidence
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Sperm Lab explains cell movement, anatomy, and damage pathways.
|
|
6
|
+
The lab uses synthetic cells and fictional counts.
|
|
7
|
+
It does not analyze semen or predict fertility.
|
|
8
|
+
|
|
9
|
+
The lab has one live sample.
|
|
10
|
+
All 12 factor controls act on the same synthetic population.
|
|
11
|
+
A factor change prepares a new population from the same random seed.
|
|
12
|
+
The sample illustrates possible development pathways.
|
|
13
|
+
It does not change an existing sperm head after one exposure.
|
|
14
|
+
|
|
15
|
+
## Separate biological properties
|
|
16
|
+
|
|
17
|
+
Movement describes whether a cell moves.
|
|
18
|
+
Progressive movement describes forward travel.
|
|
19
|
+
Vitality describes whether a cell is alive.
|
|
20
|
+
Shape describes the head and tail outline in this simplified drawing.
|
|
21
|
+
Examples include small, large, tapered, and round heads, plus double heads.
|
|
22
|
+
Tail examples include bent, coiled, short, absent, double, and triple tails.
|
|
23
|
+
|
|
24
|
+
Bent and thick midpiece outlines form separate structural examples.
|
|
25
|
+
Midpiece injury is a separate trait.
|
|
26
|
+
It does not necessarily change the midpiece outline.
|
|
27
|
+
The `typical` count covers head and tail outlines only.
|
|
28
|
+
It is not a WHO strict morphology score.
|
|
29
|
+
DNA damage is a separate property.
|
|
30
|
+
|
|
31
|
+
An immotile cell can be alive.
|
|
32
|
+
A cell with typical shape can have DNA damage.
|
|
33
|
+
A moving cell can also have DNA damage.
|
|
34
|
+
These properties do not form a single fertility score.
|
|
35
|
+
|
|
36
|
+
The head contains compact DNA.
|
|
37
|
+
The midpiece contains mitochondria.
|
|
38
|
+
Sperm get ATP through mitochondrial metabolism and glycolysis.
|
|
39
|
+
ATP supports the molecular motors that bend the tail.
|
|
40
|
+
The drawing does not resolve molecular motors or actual ATP concentrations.
|
|
41
|
+
[Read the study of human sperm metabolism and movement](https://pmc.ncbi.nlm.nih.gov/articles/PMC3501448/).
|
|
42
|
+
|
|
43
|
+
## Evidence labels
|
|
44
|
+
|
|
45
|
+
An established mechanism does not establish a personal effect size.
|
|
46
|
+
A human association does not prove that one factor caused a particular result.
|
|
47
|
+
Mixed evidence means that studies differ or have important limits.
|
|
48
|
+
The lab identifies uncertain scenarios as possible-pathway examples.
|
|
49
|
+
|
|
50
|
+
Every numerical parameter in a scenario is an authored teaching value.
|
|
51
|
+
The parameters do not fit clinical data.
|
|
52
|
+
Factor strength does not represent drinks, cigarettes, kilometers, degrees, or chemical concentration.
|
|
53
|
+
The core progress option does not represent a clinical recovery period.
|
|
54
|
+
The React component applies the current factor settings at progress 1.
|
|
55
|
+
|
|
56
|
+
The combined sample uses authored rules for shared development and damage pathways.
|
|
57
|
+
It does not estimate the independent risk of each factor or their combined clinical effect.
|
|
58
|
+
The model bounds those rules to keep the sample stable.
|
|
59
|
+
A beneficial exercise setting does not cancel chemical exposure or repair existing damage.
|
|
60
|
+
|
|
61
|
+
The teaching catalog contains 18 selected morphology, injury, and movement examples.
|
|
62
|
+
The React component keeps a matching example for each category by default.
|
|
63
|
+
The raw core includes them only when `teachingPopulation` is `true`.
|
|
64
|
+
A teaching population keeps at least 18 cells.
|
|
65
|
+
Factor controls still affect the sample through illustrative channels.
|
|
66
|
+
The required catalog trait stays available while other traits can change.
|
|
67
|
+
|
|
68
|
+
The catalog does not contain every clinical phenotype.
|
|
69
|
+
Its structural examples do not establish a lifestyle cause.
|
|
70
|
+
The examples do not show their frequency in people.
|
|
71
|
+
|
|
72
|
+
WHO guidance describes the assessment of sperm heads, midpieces, and tails, including multiple heads and tails.
|
|
73
|
+
[Read the WHO laboratory manual](https://www.who.int/publications/i/item/9789240030787).
|
|
74
|
+
[Read the study of head, midpiece, and tail defect categories](https://doi.org/10.1093/humrep/dev251).
|
|
75
|
+
The lab uses original schematic drawings.
|
|
76
|
+
It does not copy the manual's figures or present the drawings as diagnostic images.
|
|
77
|
+
|
|
78
|
+
## Factor scope
|
|
79
|
+
|
|
80
|
+
| Factor | Explanation and limit |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| Regular exercise | Physical activity can relate to better semen parameters. Benefits depend on the population and conditions. |
|
|
83
|
+
| High-volume running | Endurance studies report inconsistent results. Load, energy availability, and recovery need separate consideration. |
|
|
84
|
+
| Long cycling sessions | Results vary between studies. Cycling does not have one established effect on every rider. |
|
|
85
|
+
| Smoking | Human studies associate smoking with poorer sperm parameters. Smoke-related compounds and oxidative stress can damage cells. |
|
|
86
|
+
| Heavy alcohol use | Heavy consumption differs from moderate consumption. A universal dose-response rule is not established. |
|
|
87
|
+
| Chronic psychological stress | Studies report associations with semen quality. Confounding and reverse causation limit causal claims. |
|
|
88
|
+
| Disrupted sleep | Observational studies examine sleep and semen quality. The lab does not promise improvement from a sleep schedule. |
|
|
89
|
+
| Prolonged heat exposure | Increased testicular temperature can affect development and function. A relative control does not represent a safe temperature. |
|
|
90
|
+
| Fever | Studies report delayed changes after febrile illness. Effects and recovery vary between people. |
|
|
91
|
+
| Obesity and metabolic health | Hormone and metabolic changes can relate to sperm production. Body size alone does not determine fertility. |
|
|
92
|
+
| Testosterone and anabolic steroids | External androgens can suppress gonadotropins and sperm production. The lab does not give medication instructions. |
|
|
93
|
+
| Certain pesticides | Effects depend on the substance and exposure. The lab does not treat all pesticides as one chemical. |
|
|
94
|
+
|
|
95
|
+
EAU guidance describes physical activity, smoking, alcohol, obesity, heat, and androgen-related concerns.
|
|
96
|
+
It also distinguishes semen parameters from fertility outcomes.
|
|
97
|
+
[Read the EAU guideline](https://uroweb.org/guidelines/sexual-and-reproductive-health/chapter/male-infertility).
|
|
98
|
+
|
|
99
|
+
ASRM describes the limits of male alcohol and smoking evidence.
|
|
100
|
+
[Read the ASRM opinion](https://www.asrm.org/practice-guidance/practice-committee-documents/optimizing-natural-fertility-a-committee-opinion-2021/).
|
|
101
|
+
|
|
102
|
+
Endurance evidence remains inconsistent.
|
|
103
|
+
[Read the endurance review](https://pubmed.ncbi.nlm.nih.gov/38861008/).
|
|
104
|
+
|
|
105
|
+
A longitudinal study describes delayed changes after fever.
|
|
106
|
+
[Read the fever study](https://pubmed.ncbi.nlm.nih.gov/14507826/).
|
|
107
|
+
|
|
108
|
+
Observational studies examine psychological stress and sleep.
|
|
109
|
+
[Read the stress study](https://pmc.ncbi.nlm.nih.gov/articles/PMC4382866/).
|
|
110
|
+
[Read the sleep study](https://pubmed.ncbi.nlm.nih.gov/41330355/).
|
|
111
|
+
|
|
112
|
+
WHO guidance includes environmental chemicals in the assessment of male infertility.
|
|
113
|
+
[Read the WHO diagnostic guidance](https://www.ncbi.nlm.nih.gov/books/NBK620433/figure/ch5.fig3/).
|
|
114
|
+
|
|
115
|
+
## Display proportions
|
|
116
|
+
|
|
117
|
+
A human sperm study reports typical head lengths of 4–6 µm, midpiece lengths of 5–7 µm, and tail lengths of 50–60 µm.
|
|
118
|
+
[Read the study of human sperm proportions and longitudinal rolling](https://pmc.ncbi.nlm.nih.gov/articles/PMC9790903/).
|
|
119
|
+
|
|
120
|
+
Those dimensions guide the anatomical arrangement.
|
|
121
|
+
The renderer enlarges heads and injury marks to make live traits visible.
|
|
122
|
+
The display does not use a calibrated microscope scale or fixed anatomical pixel ratios.
|
|
123
|
+
Typical heads remain compact ovals, with a short, thin midpiece and a longer tail.
|
|
124
|
+
The catalog changes the outlines only for the selected structural examples.
|
|
125
|
+
The anatomy inspector enlarges parts for explanation.
|
|
126
|
+
|
|
127
|
+
The head drawing contains a compact nucleus rather than a loose DNA helix.
|
|
128
|
+
Red DNA fragments appear inside the compact nucleus.
|
|
129
|
+
The red fragments form a symbolic teaching overlay.
|
|
130
|
+
Their piece count does not measure molecular breaks or laboratory assay results.
|
|
131
|
+
They do not show molecular detail or resolved DNA breaks in ordinary microscopy.
|
|
132
|
+
The overlay does not replace a laboratory assay for DNA damage.
|
|
133
|
+
|
|
134
|
+
## Concentration in the model
|
|
135
|
+
|
|
136
|
+
Concentration means the current cell count in one model field.
|
|
137
|
+
The readout uses `Metrics.total` and displays `cells / model field`.
|
|
138
|
+
Factor changes can change that count when they prepare a new population.
|
|
139
|
+
The teaching mode keeps at least 18 cells for catalog coverage.
|
|
140
|
+
|
|
141
|
+
The field has no calibrated fluid volume.
|
|
142
|
+
The readout does not use cells per milliliter or clinical reference thresholds.
|
|
143
|
+
It does not measure semen concentration or predict fertility.
|
|
144
|
+
|
|
145
|
+
## Motion and inspection
|
|
146
|
+
|
|
147
|
+
Each cell has a position, direction, beat phase, and short movement trail.
|
|
148
|
+
A bounded motion rule produces forward travel, circling, weak movement, or immobility.
|
|
149
|
+
A sinusoidal tail drawing makes the beat visible.
|
|
150
|
+
The mouse adds a local current.
|
|
151
|
+
The current moves cells without changing their biological properties.
|
|
152
|
+
A current can move an immotile cell without active propulsion.
|
|
153
|
+
|
|
154
|
+
The model omits fluid interactions, three-dimensional motion, capacitation, chemotaxis, fertilization, and interactions with reproductive tissues.
|
|
155
|
+
The DNA view is an educational overlay.
|
|
156
|
+
It is not a microscopy technique or a diagnostic assay.
|
|
157
|
+
|
|
158
|
+
The live field shows head, tail, midpiece, and DNA traits directly.
|
|
159
|
+
Pointer selection uses the rendered cell geometry, including tails and midpieces.
|
|
160
|
+
A nonmodal detail popup tracks the selected cell during motion.
|
|
161
|
+
Its enlarged anatomy remains a schematic teaching view.
|
|
162
|
+
|
|
163
|
+
Discovery challenges use prepared samples with known targets.
|
|
164
|
+
Those samples teach a distinction and do not represent population frequencies.
|
package/package.json
CHANGED
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esmirnov.ai/sperm-lab",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "An interactive sperm education lab with 12 factors, a headless TypeScript simulation, and an embeddable React component.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Eduard Smirnov",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/eduard-s/sperm-lab.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://esmirnov.ai/sperm-lab/",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/eduard-s/sperm-lab/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"sperm",
|
|
18
|
+
"biology",
|
|
19
|
+
"education",
|
|
20
|
+
"motility",
|
|
21
|
+
"simulation",
|
|
22
|
+
"react",
|
|
23
|
+
"typescript",
|
|
24
|
+
"canvas"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"**/*.css"
|
|
31
|
+
],
|
|
32
|
+
"main": "./dist/react/index.js",
|
|
33
|
+
"types": "./dist/react/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/react/index.d.ts",
|
|
37
|
+
"import": "./dist/react/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./react": {
|
|
40
|
+
"types": "./dist/react/index.d.ts",
|
|
41
|
+
"import": "./dist/react/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./core": {
|
|
44
|
+
"types": "./dist/core/index.d.ts",
|
|
45
|
+
"import": "./dist/core/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./styles.css": "./dist/styles.css",
|
|
48
|
+
"./package.json": "./package.json"
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"dist",
|
|
52
|
+
"LICENSE",
|
|
53
|
+
"README.md",
|
|
54
|
+
"docs"
|
|
55
|
+
],
|
|
56
|
+
"scripts": {
|
|
57
|
+
"dev": "vite --host 127.0.0.1 --port 4177",
|
|
58
|
+
"build": "tsc -p tsconfig.build.json && node scripts/copy-css.mjs",
|
|
59
|
+
"build:demo": "vite build",
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"test": "npm run build && node --test tests/*.test.mjs",
|
|
62
|
+
"test:package": "npm run build && node scripts/smoke-package.mjs",
|
|
63
|
+
"prepack": "npm run build",
|
|
64
|
+
"preview": "vite preview --host 127.0.0.1 --port 4177"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"react": ">=18.2.0 <20"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"react": {
|
|
71
|
+
"optional": true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@types/node": "^24.10.1",
|
|
76
|
+
"@types/react": "^19.2.7",
|
|
77
|
+
"@types/react-dom": "^19.2.3",
|
|
78
|
+
"react": "19.2.6",
|
|
79
|
+
"react-dom": "19.2.6",
|
|
80
|
+
"typescript": "^5.9.3",
|
|
81
|
+
"vite": "8.3.6"
|
|
82
|
+
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=22.12"
|
|
85
|
+
}
|
|
86
|
+
}
|