only_ever_generator 1.0.8 → 2.0.0

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/src/index.ts CHANGED
@@ -3,5 +3,957 @@ import { LocalConsolidation } from "./embedding_generation/consolidation/local_c
3
3
  import { embeddingsResp } from "./typology-parsed-response";
4
4
  import { GlobalConsolidation } from "./embedding_generation/consolidation/global_consolidation";
5
5
  import { ParseEmbeddingResponse } from "./embedding_generation/parse_embedding_response";
6
+ import { OpenAIHelper } from "./helper/openai_helper";
7
+ import { GenerateTypology } from "./typology_gen/generate_typology";
8
+ import { OpenAiService } from "./services/open_ai_service";
9
+ import { GenerateConceptFacts } from "./typology_gen/generate_concept_facts";
10
+ import { BaseParamType } from "./types/base_param_type";
6
11
 
7
12
  export { OnlyEverGenerator };
13
+
14
+ // // (async () => {
15
+ // // const openAIKey =
16
+ // // "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";
17
+ // // const openAIHelper = new OpenAIHelper(
18
+ // // openAIKey,
19
+ // // "o4-mini",
20
+ // // "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594",
21
+ // // "13"
22
+ // // );
23
+ // // const content = `{
24
+ // // "title":"C19orf47",
25
+ // // "headings": [
26
+ // // "Gene",
27
+ // // "mRNA",
28
+ // // "Protein",
29
+ // // "Homology",
30
+ // // "Clinical Significance",
31
+ // // "References"
32
+ // // ],
33
+ // // "content": "content": [
34
+ // // {
35
+ // // "block_type": "paragraph",
36
+ // // "content": "**[[Chromosome|Chromosome|0|wiki]] 19 open reading frame 47** is a [[Protein|protein|1|wiki]] that in humans is encoded by the C19orf47 [[Gene|gene|2|wiki]]. Aliases include Chromosome 19 Open Reading Frame 47, FLJ36888, DKZp686P05129, and LOCI26526."
37
+ // // },
38
+ // // {
39
+ // // "block_type": "heading",
40
+ // // "content": "Gene",
41
+ // // "heading_level": 1,
42
+ // // "children": [
43
+ // // {
44
+ // // "block_type": "paragraph",
45
+ // // "content": "*Homo sapiens* C19orf47 is located in cytogenetic band 19q13.2. It covers 28.98 kilobases from 40,854,420 to 40,825,543 on the minus strand. The gene has 8 exons in the isoform 1 precursor, the last of which is the longest and comprises over half of the mRNA transcript."
46
+ // // }
47
+ // // ]
48
+ // // },
49
+ // // {
50
+ // // "block_type": "heading",
51
+ // // "content": "mRNA",
52
+ // // "heading_level": 1,
53
+ // // "children": [
54
+ // // {
55
+ // // "block_type": "image",
56
+ // // "img_src": "https://wikipedia.org/wiki/Special:Redirect/file/Conceptual_translation_of_C19orf47.png",
57
+ // // "img_caption": "Conceptual translation of C19orf47 using SIXFRAME. Exon-exon boundaries are in blue, start codon is in green, and stop codon is red. PolyA signal sequence is shown in dark orange, polyA sites are shown in orange. Base pair and amino acid numbering is shown. Conserved amino acids in close orthologs are shown bolded."
58
+ // // },
59
+ // // {
60
+ // // "block_type": "paragraph",
61
+ // // "content": "Transcription of *Homo sapiens* C19orf47 produces 13 different mRNAs, with 12 alternatively spliced variants and 1 unspliced form. Isoforms and the proteins encoded by them are shown in the table below. *Homo sapiens* C19orf47 has broad expression in heart, testes, and other tissues."
62
+ // // },
63
+ // // {
64
+ // // "block_type": "paragraph",
65
+ // // "content": "*Isoforms of C19orf47.*"
66
+ // // },
67
+ // // {
68
+ // // "block_type": "table",
69
+ // // "rows": [
70
+ // // {
71
+ // // "block_type": "row",
72
+ // // "values": [
73
+ // // "Isoform number",
74
+ // // "Nucleotide Accession",
75
+ // // "mRNA length (bp)",
76
+ // // "Protein Accession",
77
+ // // "Protein Length (aa)"
78
+ // // ],
79
+ // // "is_heading": true
80
+ // // },
81
+ // // {
82
+ // // "block_type": "row",
83
+ // // "values": [
84
+ // // "NM1",
85
+ // // "NM_001256440.1",
86
+ // // "2104",
87
+ // // "NP_001243369.1",
88
+ // // "422"
89
+ // // ],
90
+ // // "is_heading": false
91
+ // // },
92
+ // // {
93
+ // // "block_type": "row",
94
+ // // "values": [
95
+ // // "NM2",
96
+ // // "NM_001256441.2",
97
+ // // "3611",
98
+ // // "NP_001243370.1",
99
+ // // "385"
100
+ // // ],
101
+ // // "is_heading": false
102
+ // // },
103
+ // // {
104
+ // // "block_type": "row",
105
+ // // "values": [
106
+ // // "X1",
107
+ // // "XM_017026291.2",
108
+ // // "3608",
109
+ // // "XP_016881780.1",
110
+ // // "384"
111
+ // // ],
112
+ // // "is_heading": false
113
+ // // },
114
+ // // {
115
+ // // "block_type": "row",
116
+ // // "values": [
117
+ // // "X2",
118
+ // // "XM_005258520.3",
119
+ // // "3625",
120
+ // // "XP_005258577.1",
121
+ // // "421"
122
+ // // ],
123
+ // // "is_heading": false
124
+ // // },
125
+ // // {
126
+ // // "block_type": "row",
127
+ // // "values": [
128
+ // // "X3",
129
+ // // "XM_017026292.3",
130
+ // // "1407",
131
+ // // "XP_016881781.1",
132
+ // // "366"
133
+ // // ],
134
+ // // "is_heading": false
135
+ // // },
136
+ // // {
137
+ // // "block_type": "row",
138
+ // // "values": [
139
+ // // "X4",
140
+ // // "XM_017026293.3",
141
+ // // "1404",
142
+ // // "XP_016881782.1",
143
+ // // "365"
144
+ // // ],
145
+ // // "is_heading": false
146
+ // // },
147
+ // // {
148
+ // // "block_type": "row",
149
+ // // "values": [
150
+ // // "X5",
151
+ // // "XM_047438175.1",
152
+ // // "1421",
153
+ // // "XP_047294131.1",
154
+ // // "402"
155
+ // // ],
156
+ // // "is_heading": false
157
+ // // },
158
+ // // {
159
+ // // "block_type": "row",
160
+ // // "values": [
161
+ // // "X6",
162
+ // // "XM_024451364.2",
163
+ // // "3507",
164
+ // // "XP_024307132.1",
165
+ // // "344"
166
+ // // ],
167
+ // // "is_heading": false
168
+ // // },
169
+ // // {
170
+ // // "block_type": "row",
171
+ // // "values": [
172
+ // // "X7",
173
+ // // "XM_047438176.1",
174
+ // // "3504",
175
+ // // "XP_047294132.1",
176
+ // // "343"
177
+ // // ],
178
+ // // "is_heading": false
179
+ // // },
180
+ // // {
181
+ // // "block_type": "row",
182
+ // // "values": [
183
+ // // "X8",
184
+ // // "XM_024451365.2",
185
+ // // "4638",
186
+ // // "XP_024307133.1",
187
+ // // "385"
188
+ // // ],
189
+ // // "is_heading": false
190
+ // // },
191
+ // // {
192
+ // // "block_type": "row",
193
+ // // "values": [
194
+ // // "X8",
195
+ // // "XM_047438177.1",
196
+ // // "4671",
197
+ // // "XP_047294133.1",
198
+ // // "385"
199
+ // // ],
200
+ // // "is_heading": false
201
+ // // },
202
+ // // {
203
+ // // "block_type": "row",
204
+ // // "values": [
205
+ // // "X9",
206
+ // // "XM_011526460.3",
207
+ // // "3524",
208
+ // // "XP_011524762.1",
209
+ // // "381"
210
+ // // ],
211
+ // // "is_heading": false
212
+ // // },
213
+ // // {
214
+ // // "block_type": "row",
215
+ // // "values": [
216
+ // // "X10",
217
+ // // "XM_047438178.1",
218
+ // // "3668",
219
+ // // "XP_047294134.1",
220
+ // // "355"
221
+ // // ],
222
+ // // "is_heading": false
223
+ // // },
224
+ // // {
225
+ // // "block_type": "row",
226
+ // // "values": [
227
+ // // "X11",
228
+ // // "XM_047438179.1",
229
+ // // "3241",
230
+ // // "XP_047294135.1",
231
+ // // "281"
232
+ // // ],
233
+ // // "is_heading": false
234
+ // // }
235
+ // // ]
236
+ // // }
237
+ // // ]
238
+ // // },
239
+ // // {
240
+ // // "block_type": "heading",
241
+ // // "content": "Protein",
242
+ // // "heading_level": 1,
243
+ // // "children": [
244
+ // // {
245
+ // // "block_type": "image",
246
+ // // "img_src": "https://wikipedia.org/wiki/Special:Redirect/file/Protein_cartoon_of_human_C19orf47.png",
247
+ // // "img_caption": "SAM domain is shown in red and nuclear localization site shown in yellow. Amidation site shown with yellow circle, N-glycosylation site shown with blue circle, cAMP- and cGMP-dependent protein kinase phosphorylation sites shown with purple rhombus, Casein kinase II phosphorylation is shown with light blue triangles, N-myristoylation sites shown with green squares, and protein kinase C phosphorylation sites shown with light purple diamonds."
248
+ // // },
249
+ // // {
250
+ // // "block_type": "image",
251
+ // // "img_src": "https://wikipedia.org/wiki/Special:Redirect/file/C19orf47_tertiary_structure_from_iCn3D.png",
252
+ // // "img_caption": "C19orf47 tertiary structure from iCn3D"
253
+ // // },
254
+ // // {
255
+ // // "block_type": "paragraph",
256
+ // // "content": "The C19orf47 gene isoform 1 precursor encodes for a 422 amino acid protein. The protein is located in the nucleoplasm and nucleus of the cell."
257
+ // // },
258
+ // // {
259
+ // // "block_type": "heading",
260
+ // // "content": "Interacting Proteins",
261
+ // // "heading_level": 2,
262
+ // // "children": [
263
+ // // {
264
+ // // "block_type": "paragraph",
265
+ // // "content": "The following proteins have predicted interactions with C19orf47. ''Interacting proteins with C19orf47 in humans. Notes with important information are shown.''"
266
+ // // },
267
+ // // {
268
+ // // "block_type": "table",
269
+ // // "rows": [
270
+ // // {
271
+ // // "block_type": "row",
272
+ // // "values": [
273
+ // // "Abbreviated Name",
274
+ // // "Full Name",
275
+ // // "Additional Notes"
276
+ // // ],
277
+ // // "is_heading": true
278
+ // // },
279
+ // // {
280
+ // // "block_type": "row",
281
+ // // "values": [
282
+ // // "PARK2",
283
+ // // "Parkin RBR E3 Ubiquitin Protein Ligase",
284
+ // // "Component of multiprotein E3 ubiquitin ligase complex. Mutations are known to cause Parkinson’s disease."
285
+ // // ],
286
+ // // "is_heading": false
287
+ // // },
288
+ // // {
289
+ // // "block_type": "row",
290
+ // // "values": [
291
+ // // "NSP3",
292
+ // // "Non-structural protein 3",
293
+ // // "SARS-CoV-2 protein"
294
+ // // ],
295
+ // // "is_heading": false
296
+ // // },
297
+ // // {
298
+ // // "block_type": "row",
299
+ // // "values": [
300
+ // // "ORF14",
301
+ // // "Open reading frame 14",
302
+ // // "SARS-CoV-2 protein"
303
+ // // ],
304
+ // // "is_heading": false
305
+ // // },
306
+ // // {
307
+ // // "block_type": "row",
308
+ // // "values": [
309
+ // // "MYC",
310
+ // // "V-Myc Avian Myelocytomatosis Viral Oncogene Homolog 2 3",
311
+ // // "Proto-oncogene, forms a heterodimer with related transcription factor for MAX."
312
+ // // ],
313
+ // // "is_heading": false
314
+ // // },
315
+ // // {
316
+ // // "block_type": "row",
317
+ // // "values": [
318
+ // // "DDX39B",
319
+ // // "DExD-Box Helicase 39B",
320
+ // // "RNA-dependent ATPase that mediates ATP hydrolysis during mRNA splicing."
321
+ // // ],
322
+ // // "is_heading": false
323
+ // // },
324
+ // // {
325
+ // // "block_type": "row",
326
+ // // "values": [
327
+ // // "C17orf85",
328
+ // // "Nuclear Cap-Binding Protein Subunit 3",
329
+ // // "Associates with NCBP1/CBP80 to form an alternative cap-binding complex (CBC) which plays a key role in mRNA export."
330
+ // // ],
331
+ // // "is_heading": false
332
+ // // },
333
+ // // {
334
+ // // "block_type": "row",
335
+ // // "values": [
336
+ // // "NXF1",
337
+ // // "Nuclear RNA Export Factor 1",
338
+ // // "Member of a family of nuclear RNA export factor genes."
339
+ // // ],
340
+ // // "is_heading": false
341
+ // // },
342
+ // // {
343
+ // // "block_type": "row",
344
+ // // "values": [
345
+ // // "THOC2",
346
+ // // "THO Complex 2",
347
+ // // "Multiprotein complex binds specifically to spliced mRNAs to facilitate mRNA export."
348
+ // // ],
349
+ // // "is_heading": false
350
+ // // },
351
+ // // {
352
+ // // "block_type": "row",
353
+ // // "values": [
354
+ // // "YWHAQ",
355
+ // // "Tyrosine 3-Monooxygenase/Tryptophan 5-Monooxygenase Activation Protein, Theta Polypeptide",
356
+ // // "Mediates signal transduction by binding to phosphoserine-containing proteins."
357
+ // // ],
358
+ // // "is_heading": false
359
+ // // }
360
+ // // ]
361
+ // // }
362
+ // // ]
363
+ // // }
364
+ // // ]
365
+ // // },
366
+ // // {
367
+ // // "block_type": "heading",
368
+ // // "content": "Homology",
369
+ // // "heading_level": 1,
370
+ // // "children": [
371
+ // // {
372
+ // // "block_type": "paragraph",
373
+ // // "content": "C19orf47 is found in organisms including mammals, reptiles, amphibian, fish, insects, and plant."
374
+ // // },
375
+ // // {
376
+ // // "block_type": "paragraph",
377
+ // // "content": "''Current orthologs of human C19orf47. Sequence identity and similarity are shown.''"
378
+ // // },
379
+ // // {
380
+ // // "block_type": "table",
381
+ // // "rows": [
382
+ // // {
383
+ // // "block_type": "row",
384
+ // // "values": [
385
+ // // "col1",
386
+ // // "col2",
387
+ // // "col3",
388
+ // // "col4",
389
+ // // "col5",
390
+ // // "col6",
391
+ // // "col7",
392
+ // // "col8",
393
+ // // "col9"
394
+ // // ],
395
+ // // "is_heading": true
396
+ // // },
397
+ // // {
398
+ // // "block_type": "row",
399
+ // // "values": [
400
+ // // "C19orf47",
401
+ // // "Genus, Species",
402
+ // // "Common Name",
403
+ // // "Taxonomic Group",
404
+ // // "Date of Divergence (MYA)",
405
+ // // "Accession Number",
406
+ // // "Sequence Length (aa)",
407
+ // // "Identity",
408
+ // // "Similarity"
409
+ // // ],
410
+ // // "is_heading": false
411
+ // // },
412
+ // // {
413
+ // // "block_type": "row",
414
+ // // "values": [
415
+ // // "Mammalia",
416
+ // // "Homo sapiens",
417
+ // // "Human",
418
+ // // "Primates",
419
+ // // "0",
420
+ // // "NP_001243369.1",
421
+ // // "422",
422
+ // // "100.0%",
423
+ // // "100.0%"
424
+ // // ],
425
+ // // "is_heading": false
426
+ // // },
427
+ // // {
428
+ // // "block_type": "row",
429
+ // // "values": [
430
+ // // "Mammalia",
431
+ // // "Mus musculus",
432
+ // // "Mouse",
433
+ // // "Rodentia",
434
+ // // "87",
435
+ // // "XP_036009244.1",
436
+ // // "397",
437
+ // // "75.5%",
438
+ // // "80.2%"
439
+ // // ],
440
+ // // "is_heading": false
441
+ // // },
442
+ // // {
443
+ // // "block_type": "row",
444
+ // // "values": [
445
+ // // "Mammalia",
446
+ // // "Castor canadensis",
447
+ // // "American Beaver",
448
+ // // "Rodentia",
449
+ // // "87",
450
+ // // "XP_020022531.1",
451
+ // // "382",
452
+ // // "71.3%",
453
+ // // "74.7%"
454
+ // // ],
455
+ // // "is_heading": false
456
+ // // },
457
+ // // {
458
+ // // "block_type": "row",
459
+ // // "values": [
460
+ // // "Reptilia",
461
+ // // "Gopherus flavomarginatus",
462
+ // // "Bolson Tortoise",
463
+ // // "Testudines",
464
+ // // "319",
465
+ // // "XP_050784538.1",
466
+ // // "386",
467
+ // // "63.3%",
468
+ // // "72.9%"
469
+ // // ],
470
+ // // "is_heading": false
471
+ // // },
472
+ // // {
473
+ // // "block_type": "row",
474
+ // // "values": [
475
+ // // "Reptilia",
476
+ // // "Dermochelys coriacea",
477
+ // // "Leatherback Sea Turtle",
478
+ // // "Testudines",
479
+ // // "319",
480
+ // // "XP_038238045.2",
481
+ // // "449",
482
+ // // "62.3%",
483
+ // // "72.0%"
484
+ // // ],
485
+ // // "is_heading": false
486
+ // // },
487
+ // // {
488
+ // // "block_type": "row",
489
+ // // "values": [
490
+ // // "Reptilia",
491
+ // // "Varanus komodoensis",
492
+ // // "Komodo Dragon",
493
+ // // "Squamata",
494
+ // // "319",
495
+ // // "XP_044281356.1",
496
+ // // "395",
497
+ // // "60.2%",
498
+ // // "69.2%"
499
+ // // ],
500
+ // // "is_heading": false
501
+ // // },
502
+ // // {
503
+ // // "block_type": "row",
504
+ // // "values": [
505
+ // // "Reptilia",
506
+ // // "Alligator sinensis",
507
+ // // "Chinese Alligator",
508
+ // // "Crocodylia",
509
+ // // "319",
510
+ // // "XP_025068843.1",
511
+ // // "388",
512
+ // // "54.7%",
513
+ // // "63.3%"
514
+ // // ],
515
+ // // "is_heading": false
516
+ // // },
517
+ // // {
518
+ // // "block_type": "row",
519
+ // // "values": [
520
+ // // "Aves",
521
+ // // "Haliaeetus leucocephalus",
522
+ // // "Bald Eagle",
523
+ // // "Falconiformes",
524
+ // // "319",
525
+ // // "XP_010564700.1",
526
+ // // "380",
527
+ // // "60.2%",
528
+ // // "69.1%"
529
+ // // ],
530
+ // // "is_heading": false
531
+ // // },
532
+ // // {
533
+ // // "block_type": "row",
534
+ // // "values": [
535
+ // // "Aves",
536
+ // // "Phalacrocorax carbo",
537
+ // // "Great Cormorant",
538
+ // // "Suliformes",
539
+ // // "319",
540
+ // // "XP_009501755.1",
541
+ // // "381",
542
+ // // "58.5%",
543
+ // // "67.3%"
544
+ // // ],
545
+ // // "is_heading": false
546
+ // // },
547
+ // // {
548
+ // // "block_type": "row",
549
+ // // "values": [
550
+ // // "Aves",
551
+ // // "Gallus gallus",
552
+ // // "Chicken",
553
+ // // "Galliformes",
554
+ // // "319",
555
+ // // "XP_015129410.4",
556
+ // // "374",
557
+ // // "36.6%",
558
+ // // "45.5%"
559
+ // // ],
560
+ // // "is_heading": false
561
+ // // },
562
+ // // {
563
+ // // "block_type": "row",
564
+ // // "values": [
565
+ // // "Amphibia",
566
+ // // "Xenopus tropicalis",
567
+ // // "Frog",
568
+ // // "Anura",
569
+ // // "352",
570
+ // // "NP_001005016.1",
571
+ // // "398",
572
+ // // "54.2%",
573
+ // // "64.5%"
574
+ // // ],
575
+ // // "is_heading": false
576
+ // // },
577
+ // // {
578
+ // // "block_type": "row",
579
+ // // "values": [
580
+ // // "Fish",
581
+ // // "Protopterus annectens",
582
+ // // "West African Lungfish",
583
+ // // "Lepidosireniformes",
584
+ // // "408",
585
+ // // "XP_043937251.1",
586
+ // // "393",
587
+ // // "46.4%",
588
+ // // "57.0%"
589
+ // // ],
590
+ // // "is_heading": false
591
+ // // },
592
+ // // {
593
+ // // "block_type": "row",
594
+ // // "values": [
595
+ // // "Fish",
596
+ // // "Latimeria chalumnae",
597
+ // // "West Indian Ocean Coelacanth",
598
+ // // "Coelacanthiformes",
599
+ // // "415",
600
+ // // "XP_014348608.1",
601
+ // // "381",
602
+ // // "58.2%",
603
+ // // "69.7%"
604
+ // // ],
605
+ // // "is_heading": false
606
+ // // },
607
+ // // {
608
+ // // "block_type": "row",
609
+ // // "values": [
610
+ // // "Fish",
611
+ // // "Danio rerio",
612
+ // // "Zebrafish",
613
+ // // "Cypriniformes",
614
+ // // "429",
615
+ // // "NP_001038706.1",
616
+ // // "392",
617
+ // // "48.6%",
618
+ // // "59.5%"
619
+ // // ],
620
+ // // "is_heading": false
621
+ // // },
622
+ // // {
623
+ // // "block_type": "row",
624
+ // // "values": [
625
+ // // "Fish",
626
+ // // "Leucoraja erinacea",
627
+ // // "Little Skate",
628
+ // // "Rajiformes",
629
+ // // "462",
630
+ // // "XP_055519598.1",
631
+ // // "395",
632
+ // // "53.0%",
633
+ // // "64.2%"
634
+ // // ],
635
+ // // "is_heading": false
636
+ // // },
637
+ // // {
638
+ // // "block_type": "row",
639
+ // // "values": [
640
+ // // "Fish",
641
+ // // "Petromyzon marinus",
642
+ // // "Sea Lamprey",
643
+ // // "Petromyzontiformes",
644
+ // // "563",
645
+ // // "XP_032803651.1",
646
+ // // "452",
647
+ // // "41.6%",
648
+ // // "52.4%"
649
+ // // ],
650
+ // // "is_heading": false
651
+ // // },
652
+ // // {
653
+ // // "block_type": "row",
654
+ // // "values": [
655
+ // // "Arthropods",
656
+ // // "Rhipicephalus sanguineus",
657
+ // // "Brown Dog Tick",
658
+ // // "Ixodida",
659
+ // // "686",
660
+ // // "XP_037499932.1",
661
+ // // "428",
662
+ // // "29.3%",
663
+ // // "39.9%"
664
+ // // ],
665
+ // // "is_heading": false
666
+ // // },
667
+ // // {
668
+ // // "block_type": "row",
669
+ // // "values": [
670
+ // // "Arthropods",
671
+ // // "Biomphalaria glabrata",
672
+ // // "Bloodfluke Planorb",
673
+ // // "Planorbidae",
674
+ // // "686",
675
+ // // "XP_055879100.1",
676
+ // // "370",
677
+ // // "26.6%",
678
+ // // "36.0%"
679
+ // // ],
680
+ // // "is_heading": false
681
+ // // },
682
+ // // {
683
+ // // "block_type": "row",
684
+ // // "values": [
685
+ // // "Arthropods",
686
+ // // "Polistes fuscatus",
687
+ // // "Northern Paper Wasp",
688
+ // // "Hymenoptera",
689
+ // // "686",
690
+ // // "XP_043494673.1",
691
+ // // "409",
692
+ // // "24.1%",
693
+ // // "39.3%"
694
+ // // ],
695
+ // // "is_heading": false
696
+ // // },
697
+ // // {
698
+ // // "block_type": "row",
699
+ // // "values": [
700
+ // // "Plants",
701
+ // // "Gossypium anomalum",
702
+ // // "Wild Cotton",
703
+ // // "Malvales",
704
+ // // "1530",
705
+ // // "KAG8495680.1",
706
+ // // "266",
707
+ // // "11.5%",
708
+ // // "20.6%"
709
+ // // ],
710
+ // // "is_heading": false
711
+ // // }
712
+ // // ]
713
+ // // }
714
+ // // ]
715
+ // // },
716
+ // // {
717
+ // // "block_type": "heading",
718
+ // // "content": "Clinical Significance",
719
+ // // "heading_level": 1,
720
+ // // "children": [
721
+ // // {
722
+ // // "block_type": "paragraph",
723
+ // // "content": "One study discusses the identification of four novel mutations in the TUBB4A gene associated with [[Laryngeal_dystonia|laryngeal|3|wiki]] and [[Cervical_dystonia|cervical dystonia|4|wiki]], a rare neurological disorder. These mutations were found in several affected families, and the study highlights the complexity of this genetic condition, with evidence of [[Incomplete_penetrance|incomplete penetrance|5|wiki]] in some cases. [[Laryngeal_dystonia|Laryngeal dystonia|6|wiki]], often the initial symptom, is a prominent feature of the disease. Of note, there was presence of a variant in the C19orf47 gene in one family. It was shown that the variant in the gene TUBB4A was more likely to be the source of the phenotype, as C19orf47 has low expression in the brain."
724
+ // // }
725
+ // // ]
726
+ // // },
727
+ // // {
728
+ // // "block_type": "heading",
729
+ // // "content": "References",
730
+ // // "heading_level": 1,
731
+ // // "children": []
732
+ // // }
733
+ // // ],
734
+
735
+ // // }`;
736
+ // // const fields = [
737
+ // // "Sciences",
738
+ // // "Technology & Engineering",
739
+ // // "Humanities & Cultural Studies",
740
+ // // "Social Sciences & Global Studies",
741
+ // // "Business & Management",
742
+ // // "Health & Medicine",
743
+ // // "Environmental Studies & Earth Sciences",
744
+ // // "Education, Learning & Personal Development",
745
+ // // "Creative & Performing Arts",
746
+ // // "Law, Governance & Ethics",
747
+ // // "Recreation, Lifestyle & Practical Skills",
748
+ // // "Technology & Media Literacy",
749
+ // // "Philosophy & Critical Thinking",
750
+ // // "Space & Astronomical Sciences",
751
+ // // "Agriculture & Food Sciences",
752
+ // // "Trades & Craftsmanship",
753
+ // // "Reference & Indexing",
754
+ // // "Other",
755
+ // // ];
756
+ // // const generateTypology = new GenerateConceptFacts(
757
+ // // new OpenAiService(openAIKey, "o4-mini"),
758
+ // // content
759
+ // // );
760
+ // // console.log(await generateTypology.generate());
761
+ // // })();
762
+ // (async () => {
763
+ // const content = {
764
+ // source_id: "123",
765
+ // title: "C19orf47",
766
+ // type: "wiki",
767
+ // headings: [
768
+ // "Gene",
769
+ // "mRNA",
770
+ // "Protein",
771
+ // "Homology",
772
+ // "Clinical Significance",
773
+ // "References",
774
+ // ],
775
+ // content: [
776
+ // {
777
+ // block_type: "paragraph",
778
+ // content:
779
+ // "**Siv Gun Elisabeth Andersson** (born 1959) is a Swedish [[Evolutionary_biologist|evolutionary biologist|0|wiki]], professor of [[Molecular_evolution|molecular evolution|1|wiki]] at [[Uppsala_University|Uppsala University|2|wiki]]. She is member of both the [[Royal_Swedish_Academy_of_Sciences|Royal Swedish Academy of Sciences|3|wiki]] and of [[Royal_Swedish_Academy_of_Engineering_Sciences|Engineering|4|wiki]]. She is also Head of basic research at the [[Knut_and_Alice_Wallenberg_Foundation|Knut and Alice Wallenberg Foundation|5|wiki]] and has been co-director of the Swedish national center for large-scale research [[Science_for_Life_Laboratory|Science for Life Laboratory|6|wiki]] between 2017 and 2021. Her research focuses on the evolution of [[Bacteria|bacteria|7|wiki]], mainly on intracellular parasites.",
780
+ // },
781
+ // {
782
+ // block_type: "heading",
783
+ // content: "Education and career",
784
+ // heading_level: 1,
785
+ // children: [
786
+ // {
787
+ // block_type: "paragraph",
788
+ // content:
789
+ // "Andersson grew up in [[Horndal|Horndal|8|wiki]], [[Dalarna|Dalarna|9|wiki]]. Her mother was home care assistant and her father was employed in the wood industry. She studied Biology at [[Uppsala_University|Uppsala University|10|wiki]], since the programme was the only one that had a course about [[DNA|DNA|11|wiki]]. She defended her PhD in molecular biology in 1990, under the supervision of [[Charles_Kurland|Charles Kurland|12|wiki]]. She applied for a postdoctoral stipend from [[European_Molecular_Biology_Organization|EMBO|13|wiki]] to continue her research in the United States, but ended up obtaining a research position at the MRC Laboratory of Molecular Biology in [[Cambridge|Cambridge|14|wiki]]. She became professor of molecular evolution in 2000, at the Uppsala University's Evolutionary Biology Center. She was elected at the [[Royal_Swedish_Academy_of_Sciences|Royal Swedish Academy of Sciences|15|wiki]] in 2005.",
790
+ // },
791
+ // {
792
+ // block_type: "paragraph",
793
+ // content:
794
+ // "Andersson has been very active in developing the Swedish national center for large-scale research [[Science_for_Life_Laboratory|Science for Life Laboratory|16|wiki]], especially its [[DNA_sequencing|DNA sequencing|17|wiki]] and [[Bioinformatics|bioinformatics|18|wiki]] platforms. She served as Co-director for the center between 2017 and 2021.",
795
+ // },
796
+ // {
797
+ // block_type: "paragraph",
798
+ // content:
799
+ // "During the 2020 [[COVID-19_pandemic|COVID-19 pandemic|19|wiki]], she contributed, together with Lars Engstrand and with the financial support of the [[Knut_and_Alice_Wallenberg_Foundation|Knut and Alice Wallenberg Foundation|20|wiki]], to establish the first large-scale testing facility in Sweden",
800
+ // },
801
+ // ],
802
+ // },
803
+ // {
804
+ // block_type: "heading",
805
+ // content: "Research",
806
+ // heading_level: 1,
807
+ // children: [
808
+ // {
809
+ // block_type: "paragraph",
810
+ // content:
811
+ // "Andersson's research first focused around the role of codon usage in shaping bacterial genomes. After her postdoctoral fellowship, she contributed to sequence one of the first genome of an obligate intracellular parasite, *[[Rickettsia_prowazekii|Rickettsia prowazekii|21|wiki]]*, the causative agent of epidemic typhus.",
812
+ // },
813
+ // {
814
+ // block_type: "paragraph",
815
+ // content:
816
+ // "In her later career, her research continued to explore bacteria and their relationships with their different hosts. In particular, she is interested in the genomic consequences of long-term associations of intracellular bacteria. She explored the evolution of *[[Bartonella|Bartonella|22|wiki]]*, *[[Wolbachia|Wolbachia|23|wiki]]*, and [[Planctomycetota|Planctomycetota|24|wiki]], among others.",
817
+ // },
818
+ // {
819
+ // block_type: "paragraph",
820
+ // content:
821
+ // "Andersson has published over 200 peer-reviewed articles, and has an [[H-index|h-index|25|wiki]] of 61, as of 2022.",
822
+ // },
823
+ // ],
824
+ // },
825
+ // {
826
+ // block_type: "heading",
827
+ // content: "Notable awards and honors",
828
+ // heading_level: 1,
829
+ // children: [
830
+ // {
831
+ // block_type: "paragraph",
832
+ // content: "",
833
+ // },
834
+ // {
835
+ // block_type: "list",
836
+ // content: [
837
+ // {
838
+ // block_type: "list_item",
839
+ // list_type: "ordered",
840
+ // marker: "1.",
841
+ // content:
842
+ // "2000 - Member of the [[Royal_Swedish_Academy_of_Engineering_Sciences|Royal Swedish Academy of Engineering Sciences|26|wiki]].",
843
+ // },
844
+ // {
845
+ // block_type: "list_item",
846
+ // list_type: "ordered",
847
+ // marker: "2.",
848
+ // content:
849
+ // '2002 - Letterstedtska prize for very significant investigation, among others for "an article in Nature (1998), which reports the whole genome sequence of the intracellular parasite Rickettsia prowazekii".',
850
+ // },
851
+ // {
852
+ // block_type: "list_item",
853
+ // list_type: "ordered",
854
+ // marker: "3.",
855
+ // content:
856
+ // "2004 - Member of [[European_Molecular_Biology_Organization|EMBO|27|wiki]].",
857
+ // },
858
+ // {
859
+ // block_type: "list_item",
860
+ // list_type: "ordered",
861
+ // marker: "4.",
862
+ // content:
863
+ // "2005 - Member of the [[Royal_Swedish_Academy_of_Sciences|Royal Swedish Academy of Sciences|28|wiki]], number 1514, in the class Biological Sciences.",
864
+ // },
865
+ // {
866
+ // block_type: "list_item",
867
+ // list_type: "ordered",
868
+ // marker: "5.",
869
+ // content:
870
+ // "2005 - [[Göran_Gustafsson_Prize|Göran Gustafsson Prize|29|wiki]] in molecular biology.",
871
+ // },
872
+ // {
873
+ // block_type: "list_item",
874
+ // list_type: "ordered",
875
+ // marker: "6.",
876
+ // content:
877
+ // '2005 - Grant for "excellent research" from the [[Swedish_Research_Council|Swedish Research Council|30|wiki]] of SEK 44 millions (together with Hans Ellegren).',
878
+ // },
879
+ // {
880
+ // block_type: "list_item",
881
+ // list_type: "ordered",
882
+ // marker: "7.",
883
+ // content:
884
+ // "2009 - President of the [[European_Society_for_Evolutionary_Biology|European Society for Evolutionary Biology|31|wiki]] (2009-2011).",
885
+ // },
886
+ // {
887
+ // block_type: "list_item",
888
+ // list_type: "ordered",
889
+ // marker: "8.",
890
+ // content:
891
+ // "2011 - [[Knut_and_Alice_Wallenberg_Foundation|Wallenberg Scholar|32|wiki]].",
892
+ // },
893
+ // {
894
+ // block_type: "list_item",
895
+ // list_type: "ordered",
896
+ // marker: "9.",
897
+ // content:
898
+ // "2017 - Extension of [[Knut_and_Alice_Wallenberg_Foundation|Knut and Alice Wallenberg Foundation|33|wiki]] of SEK 75 millions (together with [[Gunnar_von_Heijne|Gunnar von Heijne|34|wiki]]).",
899
+ // },
900
+ // ],
901
+ // },
902
+ // ],
903
+ // },
904
+ // {
905
+ // block_type: "heading",
906
+ // content: "References",
907
+ // heading_level: 1,
908
+ // children: [],
909
+ // },
910
+ // ],
911
+ // };
912
+
913
+ // const openAIKey =
914
+ // "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";
915
+ // const promptForSummary = {
916
+ // promptId: "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594",
917
+ // version: "13",
918
+ // };
919
+ // const promptForConceptFacts = {
920
+ // promptId: "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8",
921
+ // version: "6",
922
+ // };
923
+
924
+ // const generationContent: BaseParamType = {
925
+ // prompt: {
926
+ // typology: "", // This will be set in the constructor
927
+ // card_generation: "", // This will be set in the constructor
928
+ // },
929
+ // content: {
930
+ // source_id: "6753b14f7bb31d8ccf48ba0a",
931
+ // title: "Siv G. E. Andersson",
932
+ // type: "text",
933
+ // headings: [
934
+ // "Education and career",
935
+ // "Research",
936
+ // "Notable awards and honors",
937
+ // "References",
938
+ // ],
939
+
940
+ // content: content.content,
941
+ // fields: [
942
+ // "Sciences",
943
+ // "Technology & Engineering",
944
+ // "Humanities & Cultural Studies",
945
+ // "Social Sciences & Global Studies",
946
+ // "Business & Management",
947
+ // ],
948
+ // },
949
+ // };
950
+
951
+ // const onlyEverGenerator = new OnlyEverGenerator(
952
+ // process.env.OPEN_AI_KEY as string,
953
+ // "o4-mini",
954
+ // generationContent,
955
+ // promptForSummary,
956
+ // promptForConceptFacts
957
+ // );
958
+ // const response = await onlyEverGenerator.generate(true, false);
959
+ // })();