@nfdi4plants/arctrl 3.0.0-alpha.4 → 3.0.0-beta.2
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/README.md +16 -8
- package/dist/ts/cjs/ts/ARC.js +31 -20
- package/dist/ts/cjs/ts/Conversion.js +122 -76
- package/dist/ts/cjs/ts/Core/ArcTypes.js +1 -1
- package/dist/ts/cjs/ts/Core/Conversion.js +110 -43
- package/dist/ts/cjs/ts/Core/Data.js +4 -2
- package/dist/ts/cjs/ts/Core/Helper/Collections.js +69 -1
- package/dist/ts/cjs/ts/Core/OntologyAnnotation.js +27 -23
- package/dist/ts/cjs/ts/Core/Table/ArcTable.js +234 -217
- package/dist/ts/cjs/ts/Core/Table/ArcTableAux.js +904 -255
- package/dist/ts/cjs/ts/Core/Table/ArcTables.js +12 -19
- package/dist/ts/cjs/ts/Core/Table/CompositeColumn.js +4 -2
- package/dist/ts/cjs/ts/FileSystem/DefaultGitattributes.js +1 -1
- package/dist/ts/cjs/ts/Json/Decode.js +105 -0
- package/dist/ts/cjs/ts/Json/Encode.js +42 -0
- package/dist/ts/cjs/ts/Json/Table/ArcTable.js +100 -113
- package/dist/ts/cjs/ts/Json.js +46 -1
- package/dist/ts/cjs/ts/ROCrateIO.js +12 -1
- package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/ArcTable.js +15 -4
- package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +77 -6
- package/dist/ts/cjs/ts/Spreadsheet/ArcInvestigation.js +31 -15
- package/dist/ts/cjs/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
- package/dist/ts/cjs/ts/Spreadsheet/Metadata/SparseTable.js +2 -5
- package/dist/ts/esm/ts/ARC.js +34 -23
- package/dist/ts/esm/ts/Conversion.js +128 -82
- package/dist/ts/esm/ts/Core/ArcTypes.js +1 -1
- package/dist/ts/esm/ts/Core/Conversion.js +112 -45
- package/dist/ts/esm/ts/Core/Data.js +7 -5
- package/dist/ts/esm/ts/Core/Helper/Collections.js +61 -1
- package/dist/ts/esm/ts/Core/OntologyAnnotation.js +29 -25
- package/dist/ts/esm/ts/Core/Table/ArcTable.js +243 -226
- package/dist/ts/esm/ts/Core/Table/ArcTableAux.js +897 -264
- package/dist/ts/esm/ts/Core/Table/ArcTables.js +15 -22
- package/dist/ts/esm/ts/Core/Table/CompositeColumn.js +5 -3
- package/dist/ts/esm/ts/FileSystem/DefaultGitattributes.js +1 -1
- package/dist/ts/esm/ts/Json/Decode.js +105 -3
- package/dist/ts/esm/ts/Json/Encode.js +42 -2
- package/dist/ts/esm/ts/Json/Table/ArcTable.js +108 -121
- package/dist/ts/esm/ts/Json.js +39 -0
- package/dist/ts/esm/ts/ROCrateIO.js +14 -3
- package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/ArcTable.js +17 -7
- package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +78 -9
- package/dist/ts/esm/ts/Spreadsheet/ArcInvestigation.js +33 -17
- package/dist/ts/esm/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
- package/dist/ts/esm/ts/Spreadsheet/Metadata/SparseTable.js +3 -6
- package/dist/ts/types/ts/ARC.d.ts +2 -2
- package/dist/ts/types/ts/ARC.d.ts.map +1 -1
- package/dist/ts/types/ts/Conversion.d.ts +15 -16
- package/dist/ts/types/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/ArcTypes.d.ts +2 -0
- package/dist/ts/types/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Conversion.d.ts +14 -15
- package/dist/ts/types/ts/Core/Conversion.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Data.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Helper/Collections.d.ts +8 -0
- package/dist/ts/types/ts/Core/Helper/Collections.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts +9 -0
- package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTable.d.ts +35 -28
- package/dist/ts/types/ts/Core/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts +83 -35
- package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTables.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts +1 -1
- package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Decode.d.ts +6 -0
- package/dist/ts/types/ts/Json/Decode.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Encode.d.ts +2 -0
- package/dist/ts/types/ts/Json/Encode.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Table/ArcTable.d.ts +4 -3
- package/dist/ts/types/ts/Json/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Json.d.ts +17 -0
- package/dist/ts/types/ts/Json.d.ts.map +1 -1
- package/dist/ts/types/ts/ROCrateIO.d.ts +1 -1
- package/dist/ts/types/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +5 -0
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +7 -0
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toFail, printf, toText } from "@fable-org/fable-library-js/String.js";
|
|
2
2
|
import { Comment$ } from "./Comment.js";
|
|
3
3
|
import { zip as zip_1, fold, empty as empty_1, singleton as singleton_1, append, delay, map as map_1, filter, toList, indexed, tryPick, choose } from "@fable-org/fable-library-js/Seq.js";
|
|
4
4
|
import { unwrap, value as value_10, map, defaultArg } from "@fable-org/fable-library-js/Option.js";
|
|
5
|
-
import { Option_fromValueWithDefault, ResizeArray_filter } from "./Helper/Collections.js";
|
|
5
|
+
import { ResizeArray_singleton, Option_fromValueWithDefault, ResizeArray_filter } from "./Helper/Collections.js";
|
|
6
6
|
import { OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
7
7
|
import { Value_Name, Value as Value_2, Value_Ontology } from "./Value.js";
|
|
8
8
|
import { CompositeCell_FreeText, CompositeCell_Unitized, CompositeCell_Term } from "./Table/CompositeCell.js";
|
|
@@ -20,7 +20,8 @@ import { ProcessOutput_getFactorValues_Z42C11600, ProcessOutput__isMaterial, Pro
|
|
|
20
20
|
import { safeHash, equals, disposeSafe, getEnumerator, comparePrimitives, arrayHash, equalArrays, stringHash, int32ToString } from "@fable-org/fable-library-js/Util.js";
|
|
21
21
|
import { ActivePatterns_$007CRegex$007C_$007C } from "./Helper/Regex.js";
|
|
22
22
|
import { ARCtrl_Process_Component__Component_TryGetColumnIndex, ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex, tryGetFactorColumnIndex, tryGetCharacteristicColumnIndex, tryGetComponentIndex, tryGetParameterColumnIndex, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static, ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4 } from "./Process/ColumnIndex.js";
|
|
23
|
-
import {
|
|
23
|
+
import { Unchecked_alignByHeaders, getEmptyCellForHeader, Unchecked_tryGetCellAt } from "./Table/ArcTableAux.js";
|
|
24
|
+
import { ArcTable } from "./Table/ArcTable.js";
|
|
24
25
|
import { initialize, zip, append as append_1, sortBy, head, tryPick as tryPick_1, collect, mapIndexed, item, map as map_2, empty, length, ofArray, isEmpty, singleton, choose as choose_1 } from "@fable-org/fable-library-js/List.js";
|
|
25
26
|
import { Source_create_Z5CA08497 } from "./Process/Source.js";
|
|
26
27
|
import { Sample_create_62424AD2 } from "./Process/Sample.js";
|
|
@@ -29,10 +30,7 @@ import { Protocol_create_Z414665E7, Protocol_addComponent, Protocol_addParameter
|
|
|
29
30
|
import { List_distinct, List_groupBy } from "@fable-org/fable-library-js/Seq2.js";
|
|
30
31
|
import { createMissingIdentifier } from "./Helper/Identifier.js";
|
|
31
32
|
import { boxHashSeq, boxHashOption } from "./Helper/HashCodes.js";
|
|
32
|
-
import { ArcTable } from "./Table/ArcTable.js";
|
|
33
|
-
import { singleton as singleton_2 } from "@fable-org/fable-library-js/Array.js";
|
|
34
33
|
import { rangeDouble } from "@fable-org/fable-library-js/Range.js";
|
|
35
|
-
import { Unchecked_alignByHeaders } from "./Table/ArcTableAux.js";
|
|
36
34
|
import { ArcTables } from "./Table/ArcTables.js";
|
|
37
35
|
export const Person_orcidKey = "ORCID";
|
|
38
36
|
export const Person_AssayIdentifierPrefix = "performer (ARC:00000168)";
|
|
@@ -433,7 +431,11 @@ export function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader)
|
|
|
433
431
|
const oa = valueHeader.fields[0];
|
|
434
432
|
const newOA = oa.Copy();
|
|
435
433
|
ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(newOA, valueI);
|
|
436
|
-
|
|
434
|
+
const cat = CompositeHeader_Component(newOA);
|
|
435
|
+
return (table) => ((i) => {
|
|
436
|
+
let matchValue;
|
|
437
|
+
return JsonTypes_composeComponent(cat, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(cat, undefined) : value_10(matchValue)));
|
|
438
|
+
});
|
|
437
439
|
}
|
|
438
440
|
else {
|
|
439
441
|
return undefined;
|
|
@@ -445,7 +447,10 @@ export function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader)
|
|
|
445
447
|
export function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader) {
|
|
446
448
|
if (valueHeader.tag === /* Parameter */ 3) {
|
|
447
449
|
const cat = CompositeHeader_Parameter(ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(valueI, valueHeader.fields[0]));
|
|
448
|
-
return (
|
|
450
|
+
return (table) => ((i_1) => {
|
|
451
|
+
let matchValue;
|
|
452
|
+
return JsonTypes_composeParameterValue(cat, (matchValue = Unchecked_tryGetCellAt(generalI, i_1, table.Values), (matchValue == null) ? getEmptyCellForHeader(cat, undefined) : value_10(matchValue)));
|
|
453
|
+
});
|
|
449
454
|
}
|
|
450
455
|
else {
|
|
451
456
|
return undefined;
|
|
@@ -457,7 +462,10 @@ export function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader)
|
|
|
457
462
|
export function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
458
463
|
if (valueHeader.tag === /* Factor */ 2) {
|
|
459
464
|
const cat = CompositeHeader_Factor(ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(valueI, valueHeader.fields[0]));
|
|
460
|
-
return (
|
|
465
|
+
return (table) => ((i_1) => {
|
|
466
|
+
let matchValue;
|
|
467
|
+
return JsonTypes_composeFactorValue(cat, (matchValue = Unchecked_tryGetCellAt(generalI, i_1, table.Values), (matchValue == null) ? getEmptyCellForHeader(cat, undefined) : value_10(matchValue)));
|
|
468
|
+
});
|
|
461
469
|
}
|
|
462
470
|
else {
|
|
463
471
|
return undefined;
|
|
@@ -469,7 +477,10 @@ export function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
|
469
477
|
export function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHeader) {
|
|
470
478
|
if (valueHeader.tag === /* Characteristic */ 1) {
|
|
471
479
|
const cat = CompositeHeader_Characteristic(ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(valueI, valueHeader.fields[0]));
|
|
472
|
-
return (
|
|
480
|
+
return (table) => ((i_1) => {
|
|
481
|
+
let matchValue;
|
|
482
|
+
return JsonTypes_composeCharacteristicValue(cat, (matchValue = Unchecked_tryGetCellAt(generalI, i_1, table.Values), (matchValue == null) ? getEmptyCellForHeader(cat, undefined) : value_10(matchValue)));
|
|
483
|
+
});
|
|
473
484
|
}
|
|
474
485
|
else {
|
|
475
486
|
return undefined;
|
|
@@ -480,7 +491,16 @@ export function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHe
|
|
|
480
491
|
*/
|
|
481
492
|
export function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
|
|
482
493
|
if (header.tag === /* ProtocolType */ 4) {
|
|
483
|
-
return (
|
|
494
|
+
return (table) => ((i) => {
|
|
495
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
496
|
+
if (matchValue == null) {
|
|
497
|
+
return new OntologyAnnotation();
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
const cell = value_10(matchValue);
|
|
501
|
+
return cell.AsTerm;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
484
504
|
}
|
|
485
505
|
else {
|
|
486
506
|
return undefined;
|
|
@@ -491,7 +511,16 @@ export function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
|
|
|
491
511
|
*/
|
|
492
512
|
export function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
|
|
493
513
|
if (header.tag === /* ProtocolREF */ 8) {
|
|
494
|
-
return (
|
|
514
|
+
return (table) => ((i) => {
|
|
515
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
516
|
+
if (matchValue == null) {
|
|
517
|
+
return "";
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
const cell = value_10(matchValue);
|
|
521
|
+
return cell.AsFreeText;
|
|
522
|
+
}
|
|
523
|
+
});
|
|
495
524
|
}
|
|
496
525
|
else {
|
|
497
526
|
return undefined;
|
|
@@ -502,7 +531,16 @@ export function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
|
|
|
502
531
|
*/
|
|
503
532
|
export function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header) {
|
|
504
533
|
if (header.tag === /* ProtocolDescription */ 5) {
|
|
505
|
-
return (
|
|
534
|
+
return (table) => ((i) => {
|
|
535
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
536
|
+
if (matchValue == null) {
|
|
537
|
+
return "";
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
const cell = value_10(matchValue);
|
|
541
|
+
return cell.AsFreeText;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
506
544
|
}
|
|
507
545
|
else {
|
|
508
546
|
return undefined;
|
|
@@ -513,7 +551,16 @@ export function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header)
|
|
|
513
551
|
*/
|
|
514
552
|
export function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
|
|
515
553
|
if (header.tag === /* ProtocolUri */ 6) {
|
|
516
|
-
return (
|
|
554
|
+
return (table) => ((i) => {
|
|
555
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
556
|
+
if (matchValue == null) {
|
|
557
|
+
return "";
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
const cell = value_10(matchValue);
|
|
561
|
+
return cell.AsFreeText;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
517
564
|
}
|
|
518
565
|
else {
|
|
519
566
|
return undefined;
|
|
@@ -524,7 +571,16 @@ export function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
|
|
|
524
571
|
*/
|
|
525
572
|
export function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
|
|
526
573
|
if (header.tag === /* ProtocolVersion */ 7) {
|
|
527
|
-
return (
|
|
574
|
+
return (table) => ((i) => {
|
|
575
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
576
|
+
if (matchValue == null) {
|
|
577
|
+
return "";
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
const cell = value_10(matchValue);
|
|
581
|
+
return cell.AsFreeText;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
528
584
|
}
|
|
529
585
|
else {
|
|
530
586
|
return undefined;
|
|
@@ -536,7 +592,10 @@ export function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
|
|
|
536
592
|
export function ProcessParsing_tryGetInputGetter(generalI, header) {
|
|
537
593
|
if (header.tag === /* Input */ 11) {
|
|
538
594
|
const io = header.fields[0];
|
|
539
|
-
return (
|
|
595
|
+
return (table) => ((i) => {
|
|
596
|
+
let matchValue;
|
|
597
|
+
return JsonTypes_composeProcessInput(header, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(header, undefined) : value_10(matchValue)));
|
|
598
|
+
});
|
|
540
599
|
}
|
|
541
600
|
else {
|
|
542
601
|
return undefined;
|
|
@@ -548,7 +607,10 @@ export function ProcessParsing_tryGetInputGetter(generalI, header) {
|
|
|
548
607
|
export function ProcessParsing_tryGetOutputGetter(generalI, header) {
|
|
549
608
|
if (header.tag === /* Output */ 12) {
|
|
550
609
|
const io = header.fields[0];
|
|
551
|
-
return (
|
|
610
|
+
return (table) => ((i) => {
|
|
611
|
+
let matchValue;
|
|
612
|
+
return JsonTypes_composeProcessOutput(header, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(header, undefined) : value_10(matchValue)));
|
|
613
|
+
});
|
|
552
614
|
}
|
|
553
615
|
else {
|
|
554
616
|
return undefined;
|
|
@@ -560,7 +622,16 @@ export function ProcessParsing_tryGetOutputGetter(generalI, header) {
|
|
|
560
622
|
export function ProcessParsing_tryGetCommentGetter(generalI, header) {
|
|
561
623
|
if (header.tag === /* Comment */ 14) {
|
|
562
624
|
const c = header.fields[0];
|
|
563
|
-
return (
|
|
625
|
+
return (table) => ((i) => {
|
|
626
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
627
|
+
if (matchValue == null) {
|
|
628
|
+
return new Comment$(c);
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
const cell = value_10(matchValue);
|
|
632
|
+
return new Comment$(c, cell.AsFreeText);
|
|
633
|
+
}
|
|
634
|
+
});
|
|
564
635
|
}
|
|
565
636
|
else {
|
|
566
637
|
return undefined;
|
|
@@ -597,36 +668,36 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
597
668
|
let inputGetter_1;
|
|
598
669
|
const matchValue = tryPick((tupledArg_10) => ProcessParsing_tryGetInputGetter(tupledArg_10[0], tupledArg_10[1]), headers_1);
|
|
599
670
|
if (matchValue == null) {
|
|
600
|
-
inputGetter_1 = ((
|
|
671
|
+
inputGetter_1 = ((table_1) => ((i_1) => singleton(ProcessInput_Source(Source_create_Z5CA08497(undefined, `${processNameRoot}_Input_${i_1}`, toList(map_1((f_1) => f_1(table_1)(i_1), charGetters)))))));
|
|
601
672
|
}
|
|
602
673
|
else {
|
|
603
674
|
const inputGetter = value_10(matchValue);
|
|
604
|
-
inputGetter_1 = ((
|
|
605
|
-
const chars = toList(map_1((f) => f(
|
|
606
|
-
const input = inputGetter(
|
|
675
|
+
inputGetter_1 = ((table) => ((i) => {
|
|
676
|
+
const chars = toList(map_1((f) => f(table)(i), charGetters));
|
|
677
|
+
const input = inputGetter(table)(i);
|
|
607
678
|
return (!(ProcessInput__isSample(input) ? true : ProcessInput__isSource(input)) && !isEmpty(chars)) ? ofArray([input, ProcessInput_createSample_Z598187B7(ProcessInput__get_Name(input), chars)]) : singleton((length(chars) > 0) ? ProcessInput_setCharacteristicValues(chars, input) : input);
|
|
608
679
|
}));
|
|
609
680
|
}
|
|
610
681
|
let outputGetter_1;
|
|
611
682
|
const matchValue_1 = tryPick((tupledArg_11) => ProcessParsing_tryGetOutputGetter(tupledArg_11[0], tupledArg_11[1]), headers_1);
|
|
612
683
|
if (matchValue_1 == null) {
|
|
613
|
-
outputGetter_1 = ((
|
|
684
|
+
outputGetter_1 = ((table_3) => ((i_3) => singleton(ProcessOutput_Sample(Sample_create_62424AD2(undefined, `${processNameRoot}_Output_${i_3}`, undefined, toList(map_1((f_3) => f_3(table_3)(i_3), factorValueGetters)))))));
|
|
614
685
|
}
|
|
615
686
|
else {
|
|
616
687
|
const outputGetter = value_10(matchValue_1);
|
|
617
|
-
outputGetter_1 = ((
|
|
618
|
-
const factors = toList(map_1((f_2) => f_2(
|
|
619
|
-
const output = outputGetter(
|
|
688
|
+
outputGetter_1 = ((table_2) => ((i_2) => {
|
|
689
|
+
const factors = toList(map_1((f_2) => f_2(table_2)(i_2), factorValueGetters));
|
|
690
|
+
const output = outputGetter(table_2)(i_2);
|
|
620
691
|
return (!ProcessOutput__isSample(output) && !isEmpty(factors)) ? ofArray([output, ProcessOutput_createSample_Z598187B7(ProcessOutput__get_Name(output), undefined, factors)]) : singleton((length(factors) > 0) ? ProcessOutput_setFactorValues(factors, output) : output);
|
|
621
692
|
}));
|
|
622
693
|
}
|
|
623
|
-
return (
|
|
694
|
+
return (table_4) => ((i_4) => {
|
|
624
695
|
const pn = map((p) => Process_composeName(p, i_4), Option_fromValueWithDefault("", processNameRoot));
|
|
625
|
-
const paramvalues = Option_fromValueWithDefault(empty(), map_2((f_4) => f_4(
|
|
696
|
+
const paramvalues = Option_fromValueWithDefault(empty(), map_2((f_4) => f_4(table_4)(i_4), parameterValueGetters));
|
|
626
697
|
const parameters = map((list_5) => map_2((pv) => value_10(pv.Category), list_5), paramvalues);
|
|
627
|
-
const comments = Option_fromValueWithDefault(empty(), map_2((f_5) => f_5(
|
|
698
|
+
const comments = Option_fromValueWithDefault(empty(), map_2((f_5) => f_5(table_4)(i_4), commentGetters));
|
|
628
699
|
let protocol;
|
|
629
|
-
const p_1 = Protocol_make(undefined, map((f_6) => f_6(
|
|
700
|
+
const p_1 = Protocol_make(undefined, map((f_6) => f_6(table_4)(i_4), protocolREFGetter), map((f_7) => f_7(table_4)(i_4), protocolTypeGetter), map((f_8) => f_8(table_4)(i_4), protocolDescriptionGetter), map((f_9) => f_9(table_4)(i_4), protocolURIGetter), map((f_10) => f_10(table_4)(i_4), protocolVersionGetter), parameters, Option_fromValueWithDefault(empty(), map_2((f_11) => f_11(table_4)(i_4), componentGetters)), undefined);
|
|
630
701
|
let matchResult;
|
|
631
702
|
if (p_1.Name == null) {
|
|
632
703
|
if (p_1.ProtocolType == null) {
|
|
@@ -668,8 +739,8 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
668
739
|
protocol = p_1;
|
|
669
740
|
}
|
|
670
741
|
let patternInput;
|
|
671
|
-
const inputs = inputGetter_1(
|
|
672
|
-
const outputs = outputGetter_1(
|
|
742
|
+
const inputs = inputGetter_1(table_4)(i_4);
|
|
743
|
+
const outputs = outputGetter_1(table_4)(i_4);
|
|
673
744
|
patternInput = (((length(inputs) === 1) && (length(outputs) === 2)) ? [ofArray([item(0, inputs), item(0, inputs)]), outputs] : (((length(inputs) === 2) && (length(outputs) === 1)) ? [inputs, ofArray([item(0, outputs), item(0, outputs)])] : [inputs, outputs]));
|
|
674
745
|
return Process_make(undefined, pn, protocol, paramvalues, undefined, undefined, undefined, undefined, patternInput[0], patternInput[1], comments);
|
|
675
746
|
});
|
|
@@ -689,10 +760,6 @@ export function ProcessParsing_groupProcesses(ps) {
|
|
|
689
760
|
else if ((x.ExecutesProtocol != null) && (value_10(x.ExecutesProtocol).Name != null)) {
|
|
690
761
|
return value_10(value_10(x.ExecutesProtocol).Name);
|
|
691
762
|
}
|
|
692
|
-
else if ((x.Name != null) && (value_10(x.Name).indexOf("_") >= 0)) {
|
|
693
|
-
const lastUnderScoreIndex = value_10(x.Name).lastIndexOf("_") | 0;
|
|
694
|
-
return remove(value_10(x.Name), lastUnderScoreIndex);
|
|
695
|
-
}
|
|
696
763
|
else if (x.Name != null) {
|
|
697
764
|
return value_10(x.Name);
|
|
698
765
|
}
|
|
@@ -963,7 +1030,7 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p) {
|
|
|
963
1030
|
try {
|
|
964
1031
|
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
965
1032
|
const c = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
966
|
-
const v_1 = map((arg) =>
|
|
1033
|
+
const v_1 = map((arg) => ResizeArray_singleton(ARCtrl_CompositeCell__CompositeCell_fromValue_Static_Z6986DF18(arg, unwrap(c.ComponentUnit))), c.ComponentValue);
|
|
967
1034
|
t.AddColumn(CompositeHeader_Parameter(value_10(c.ComponentType)), unwrap(v_1), unwrap(ARCtrl_Process_Component__Component_TryGetColumnIndex(c)));
|
|
968
1035
|
}
|
|
969
1036
|
}
|
|
@@ -971,19 +1038,19 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p) {
|
|
|
971
1038
|
disposeSafe(enumerator_1);
|
|
972
1039
|
}
|
|
973
1040
|
map((d) => {
|
|
974
|
-
t.AddProtocolDescriptionColumn(
|
|
1041
|
+
t.AddProtocolDescriptionColumn(ResizeArray_singleton(d));
|
|
975
1042
|
}, p.Description);
|
|
976
1043
|
map((d_1) => {
|
|
977
|
-
t.AddProtocolVersionColumn(
|
|
1044
|
+
t.AddProtocolVersionColumn(ResizeArray_singleton(d_1));
|
|
978
1045
|
}, p.Version);
|
|
979
1046
|
map((d_2) => {
|
|
980
|
-
t.AddProtocolTypeColumn(
|
|
1047
|
+
t.AddProtocolTypeColumn(ResizeArray_singleton(d_2));
|
|
981
1048
|
}, p.ProtocolType);
|
|
982
1049
|
map((d_3) => {
|
|
983
|
-
t.AddProtocolUriColumn(
|
|
1050
|
+
t.AddProtocolUriColumn(ResizeArray_singleton(d_3));
|
|
984
1051
|
}, p.Uri);
|
|
985
1052
|
map((d_4) => {
|
|
986
|
-
t.AddProtocolNameColumn(
|
|
1053
|
+
t.AddProtocolNameColumn(ResizeArray_singleton(d_4));
|
|
987
1054
|
}, p.Name);
|
|
988
1055
|
return t;
|
|
989
1056
|
}
|
|
@@ -1042,7 +1109,7 @@ export function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
|
|
|
1042
1109
|
const clo_1 = clo(arg);
|
|
1043
1110
|
return clo_1;
|
|
1044
1111
|
});
|
|
1045
|
-
return ProcessParsing_mergeIdenticalProcesses(toList(delay(() => map_1((i) => getter(this
|
|
1112
|
+
return ProcessParsing_mergeIdenticalProcesses(toList(delay(() => map_1((i) => getter(this$)(i), rangeDouble(0, 1, this$.RowCount - 1)))));
|
|
1046
1113
|
}
|
|
1047
1114
|
}
|
|
1048
1115
|
/**
|
|
@@ -1054,7 +1121,7 @@ export function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
|
|
|
1054
1121
|
*/
|
|
1055
1122
|
export function ARCtrl_ArcTable__ArcTable_fromProcesses_Static(name, ps) {
|
|
1056
1123
|
const tupledArg = Unchecked_alignByHeaders(true, collect(ProcessParsing_processToRows, ps));
|
|
1057
|
-
return ArcTable.
|
|
1124
|
+
return ArcTable.fromArcTableValues(name, tupledArg[0], tupledArg[1]);
|
|
1058
1125
|
}
|
|
1059
1126
|
/**
|
|
1060
1127
|
* Return a list of all the processes in all the tables.
|
|
@@ -1073,6 +1140,6 @@ export function ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(ps) {
|
|
|
1073
1140
|
let collection;
|
|
1074
1141
|
return new ArcTables((collection = map_2((tupledArg) => {
|
|
1075
1142
|
const tupledArg_1 = Unchecked_alignByHeaders(true, collect(ProcessParsing_processToRows, tupledArg[1]));
|
|
1076
|
-
return ArcTable.
|
|
1143
|
+
return ArcTable.fromArcTableValues(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
|
|
1077
1144
|
}, ProcessParsing_groupProcesses(ps)), Array.from(collection)));
|
|
1078
1145
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { trimStart, trim, printf, toText } from "@fable-org/fable-library-js/String.js";
|
|
1
|
+
import { substring, trimStart as trimStart_1, trim, printf, toText } from "@fable-org/fable-library-js/String.js";
|
|
2
2
|
import { item } from "@fable-org/fable-library-js/Array.js";
|
|
3
3
|
import { defaultArg, value as value_1, unwrap } from "@fable-org/fable-library-js/Option.js";
|
|
4
4
|
import { DataFile__get_AsString } from "./DataFile.js";
|
|
@@ -132,19 +132,21 @@ export class Data {
|
|
|
132
132
|
throw new Error("Data does not have a file path");
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
let p_3;
|
|
136
|
+
const s = trimStart_1(value_1(matchValue), "/");
|
|
137
|
+
p_3 = (s.startsWith("./") ? substring(s, "./".length) : s);
|
|
138
|
+
return ((checkExistenceFromRoot_1(p_3) ? true : ((p = p_3, ((p.startsWith("assays/") ? true : p.startsWith("studies/")) ? true : p.startsWith("workflows/")) ? true : p.startsWith("runs/")))) ? true : ((p_1 = p_3, p_1.startsWith("http:") ? true : p_1.startsWith("https:")))) ? p_3 : f(p_3);
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
GetAbsolutePathForAssay(assayIdentifier, checkExistenceFromRoot) {
|
|
140
142
|
const this$ = this;
|
|
141
143
|
const folderPath = `assays/${assayIdentifier}/dataset/`;
|
|
142
|
-
return this$.GetAbsolutePathBy((p) => (folderPath +
|
|
144
|
+
return this$.GetAbsolutePathBy((p) => (folderPath + trimStart_1(p, "/")), unwrap(checkExistenceFromRoot));
|
|
143
145
|
}
|
|
144
146
|
GetAbsolutePathForStudy(studyIdentifier, checkExistenceFromRoot) {
|
|
145
147
|
const this$ = this;
|
|
146
148
|
const folderPath = `studies/${studyIdentifier}/resources/`;
|
|
147
|
-
return this$.GetAbsolutePathBy((p) => (folderPath +
|
|
149
|
+
return this$.GetAbsolutePathBy((p) => (folderPath + trimStart_1(p, "/")), unwrap(checkExistenceFromRoot));
|
|
148
150
|
}
|
|
149
151
|
Copy() {
|
|
150
152
|
const this$ = this;
|
|
@@ -5,9 +5,10 @@ import { empty, singleton, append, head, tail, isEmpty as isEmpty_1 } from "@fab
|
|
|
5
5
|
import { tryGetValue, addToDict } from "@fable-org/fable-library-js/MapUtil.js";
|
|
6
6
|
import { Dictionary } from "@fable-org/fable-library-js/MutableMap.js";
|
|
7
7
|
import { FSharpRef } from "@fable-org/fable-library-js/Types.js";
|
|
8
|
+
import { min } from "@fable-org/fable-library-js/Double.js";
|
|
8
9
|
import { contains } from "@fable-org/fable-library-js/Array.js";
|
|
10
|
+
import { rangeDouble } from "@fable-org/fable-library-js/Range.js";
|
|
9
11
|
import { groupBy } from "@fable-org/fable-library-js/Seq2.js";
|
|
10
|
-
import { min } from "@fable-org/fable-library-js/Double.js";
|
|
11
12
|
/**
|
|
12
13
|
* If the value matches the default, a None is returned, else a Some is returned
|
|
13
14
|
*/
|
|
@@ -135,6 +136,9 @@ export function Dictionary_items(dict) {
|
|
|
135
136
|
export function StringDictionary_ofSeq(s) {
|
|
136
137
|
return new Map(s);
|
|
137
138
|
}
|
|
139
|
+
export function IntDictionary_ofSeq(s) {
|
|
140
|
+
return new Map(s);
|
|
141
|
+
}
|
|
138
142
|
export function ResizeArray_create(i, v) {
|
|
139
143
|
const a = [];
|
|
140
144
|
if (i > 0) {
|
|
@@ -163,6 +167,21 @@ export function ResizeArray_map(f, a) {
|
|
|
163
167
|
}
|
|
164
168
|
return b;
|
|
165
169
|
}
|
|
170
|
+
export function ResizeArray_mapi(f, a) {
|
|
171
|
+
const b = [];
|
|
172
|
+
for (let i = 0; i <= (a.length - 1); i++) {
|
|
173
|
+
void (b.push(f(i, a[i])));
|
|
174
|
+
}
|
|
175
|
+
return b;
|
|
176
|
+
}
|
|
177
|
+
export function ResizeArray_map2(f, a, b) {
|
|
178
|
+
const c = [];
|
|
179
|
+
const n = min(a.length, b.length) | 0;
|
|
180
|
+
for (let i = 0; i <= (n - 1); i++) {
|
|
181
|
+
void (c.push(f(a[i], b[i])));
|
|
182
|
+
}
|
|
183
|
+
return c;
|
|
184
|
+
}
|
|
166
185
|
export function ResizeArray_choose(f, a) {
|
|
167
186
|
const b = [];
|
|
168
187
|
let enumerator = getEnumerator(a);
|
|
@@ -237,6 +256,18 @@ export function ResizeArray_iter(f, a) {
|
|
|
237
256
|
disposeSafe(enumerator);
|
|
238
257
|
}
|
|
239
258
|
}
|
|
259
|
+
export function ResizeArray_iteri(f, a) {
|
|
260
|
+
for (let i = 0; i <= (a.length - 1); i++) {
|
|
261
|
+
f(i, a[i]);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
export function ResizeArray_init(n, f) {
|
|
265
|
+
const a = [];
|
|
266
|
+
for (let i = 0; i <= (n - 1); i++) {
|
|
267
|
+
void (a.push(f(i)));
|
|
268
|
+
}
|
|
269
|
+
return a;
|
|
270
|
+
}
|
|
240
271
|
export function ResizeArray_reduce(f, a) {
|
|
241
272
|
switch (a.length) {
|
|
242
273
|
case 0:
|
|
@@ -342,6 +373,35 @@ export function ResizeArray_appendSingleton(b, a) {
|
|
|
342
373
|
void (c.push(b));
|
|
343
374
|
return c;
|
|
344
375
|
}
|
|
376
|
+
export function ResizeArray_indexed(a) {
|
|
377
|
+
const b = [];
|
|
378
|
+
for (let i = 0; i <= (a.length - 1); i++) {
|
|
379
|
+
void (b.push([i, a[i]]));
|
|
380
|
+
}
|
|
381
|
+
return b;
|
|
382
|
+
}
|
|
383
|
+
export function ResizeArray_rev(a) {
|
|
384
|
+
const b = [];
|
|
385
|
+
const enumerator = getEnumerator(rangeDouble(a.length - 1, -1, 0));
|
|
386
|
+
try {
|
|
387
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
388
|
+
const i = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]() | 0;
|
|
389
|
+
void (b.push(a[i]));
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
finally {
|
|
393
|
+
disposeSafe(enumerator);
|
|
394
|
+
}
|
|
395
|
+
return b;
|
|
396
|
+
}
|
|
397
|
+
export function ResizeArray_take(n, a) {
|
|
398
|
+
const b = [];
|
|
399
|
+
const n_1 = min(n, a.length) | 0;
|
|
400
|
+
for (let i = 0; i <= (n_1 - 1); i++) {
|
|
401
|
+
void (b.push(a[i]));
|
|
402
|
+
}
|
|
403
|
+
return b;
|
|
404
|
+
}
|
|
345
405
|
export function ResizeArray_groupBy(f, a) {
|
|
346
406
|
const collection = map((tupledArg) => [tupledArg[0], Array.from(tupledArg[1])], groupBy(f, a, {
|
|
347
407
|
Equals: equals,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { value as value_4, defaultArg, unwrap } from "@fable-org/fable-library-js/Option.js";
|
|
2
|
-
import { Pattern_TermAnnotationShortPattern, ActivePatterns_$007CRegex$007C_$007C, tryParseTermAnnotation } from "./Helper/Regex.js";
|
|
3
2
|
import { createOAUri } from "./Helper/Url.js";
|
|
3
|
+
import { Pattern_TermAnnotationShortPattern, ActivePatterns_$007CRegex$007C_$007C, tryParseTermAnnotation } from "./Helper/Regex.js";
|
|
4
4
|
import { StringBuilder__Append_Z721C83C5, StringBuilder_$ctor } from "@fable-org/fable-library-js/System.Text.js";
|
|
5
5
|
import { printf, toText, join } from "@fable-org/fable-library-js/String.js";
|
|
6
|
-
import {
|
|
6
|
+
import { empty, singleton, append, delay, toList } from "@fable-org/fable-library-js/Seq.js";
|
|
7
7
|
import { toString } from "@fable-org/fable-library-js/Types.js";
|
|
8
|
-
import { hash as hash_1,
|
|
8
|
+
import { hash as hash_1, mergeHashes } from "./Helper/HashCodes.js";
|
|
9
|
+
import { safeHash, stringHash } from "@fable-org/fable-library-js/Util.js";
|
|
9
10
|
import { ResizeArray_map } from "./Helper/Collections.js";
|
|
10
|
-
import { safeHash } from "@fable-org/fable-library-js/Util.js";
|
|
11
11
|
import { class_type } from "@fable-org/fable-library-js/Reflection.js";
|
|
12
12
|
export class OntologyAnnotation {
|
|
13
13
|
constructor(name, tsr, tan, comments) {
|
|
@@ -15,6 +15,7 @@ export class OntologyAnnotation {
|
|
|
15
15
|
this._termSourceREF = ((tsr == null) ? undefined : ((value_4(tsr) === "") ? undefined : tsr));
|
|
16
16
|
this._termAccessionNumber = ((tan == null) ? undefined : ((value_4(tan) === "") ? undefined : ((value_4(tan) === ":") ? undefined : tan)));
|
|
17
17
|
this._comments = defaultArg(comments, []);
|
|
18
|
+
this._tanInfo = OntologyAnnotation.computeTanInfo(unwrap(this._termAccessionNumber), unwrap(this._termSourceREF));
|
|
18
19
|
}
|
|
19
20
|
get Name() {
|
|
20
21
|
const this$ = this;
|
|
@@ -31,6 +32,7 @@ export class OntologyAnnotation {
|
|
|
31
32
|
set TermSourceREF(tsr) {
|
|
32
33
|
const this$ = this;
|
|
33
34
|
this$._termSourceREF = tsr;
|
|
35
|
+
this$.recomputeTanInfo();
|
|
34
36
|
}
|
|
35
37
|
get TermAccessionNumber() {
|
|
36
38
|
const this$ = this;
|
|
@@ -39,6 +41,7 @@ export class OntologyAnnotation {
|
|
|
39
41
|
set TermAccessionNumber(tan) {
|
|
40
42
|
const this$ = this;
|
|
41
43
|
this$._termAccessionNumber = tan;
|
|
44
|
+
this$.recomputeTanInfo();
|
|
42
45
|
}
|
|
43
46
|
get Comments() {
|
|
44
47
|
const this$ = this;
|
|
@@ -56,12 +59,8 @@ export class OntologyAnnotation {
|
|
|
56
59
|
return OntologyAnnotation.make(name, tsr, tan, comments_1);
|
|
57
60
|
}
|
|
58
61
|
get TANInfo() {
|
|
59
|
-
let matchValue, tan, matchValue_1, matchValue_2, tsr;
|
|
60
62
|
const this$ = this;
|
|
61
|
-
return unwrap(
|
|
62
|
-
IDSpace: tsr,
|
|
63
|
-
LocalID: tan,
|
|
64
|
-
}))))) : value_4(matchValue_1))))));
|
|
63
|
+
return unwrap(this$._tanInfo);
|
|
65
64
|
}
|
|
66
65
|
get NameText() {
|
|
67
66
|
const this$ = this;
|
|
@@ -150,23 +149,9 @@ export class OntologyAnnotation {
|
|
|
150
149
|
return (((this$.Name == null) && (this$.TermSourceREF == null)) && (this$.TermAccessionNumber == null)) && (this$.Comments.length === 0);
|
|
151
150
|
}
|
|
152
151
|
GetHashCode() {
|
|
152
|
+
let matchValue, matchValue_1, matchValue_2, tsr_1, matchValue_4, tan, taninfo_1, tsr, taninfo;
|
|
153
153
|
const this$ = this;
|
|
154
|
-
return
|
|
155
|
-
let tsr_1, taninfo_1, tsr;
|
|
156
|
-
const matchValue = this$.TermSourceREF;
|
|
157
|
-
const matchValue_1 = this$.TANInfo;
|
|
158
|
-
if (matchValue != null) {
|
|
159
|
-
return (matchValue_1 == null) ? ((tsr_1 = value_4(matchValue), singleton(boxHashArray([tsr_1, defaultArg(this$.TermAccessionNumber, "")])))) : ((taninfo_1 = value_4(matchValue_1), (tsr = value_4(matchValue), singleton(boxHashArray([tsr, (taninfo_1.IDSpace + ":") + taninfo_1.LocalID])))));
|
|
160
|
-
}
|
|
161
|
-
else if (matchValue_1 == null) {
|
|
162
|
-
const tan_1 = defaultArg(this$.TermAccessionNumber, "");
|
|
163
|
-
return singleton(boxHashArray([defaultArg(this$.TermAccessionNumber, ""), tan_1]));
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
const taninfo = value_4(matchValue_1);
|
|
167
|
-
return singleton(boxHashArray([taninfo.IDSpace, (taninfo.IDSpace + ":") + taninfo.LocalID]));
|
|
168
|
-
}
|
|
169
|
-
}))))) | 0;
|
|
154
|
+
return mergeHashes((matchValue = this$.Name, (matchValue == null) ? 0 : stringHash(value_4(matchValue))), (matchValue_1 = this$.TermSourceREF, (matchValue_2 = this$.TANInfo, (matchValue_1 != null) ? ((matchValue_2 == null) ? ((tsr_1 = value_4(matchValue_1), (matchValue_4 = this$.TermAccessionNumber, (matchValue_4 == null) ? stringHash(tsr_1) : ((tan = value_4(matchValue_4), mergeHashes(stringHash(tsr_1), stringHash(tan))))))) : ((taninfo_1 = value_4(matchValue_2), (tsr = value_4(matchValue_1), mergeHashes(stringHash(tsr), stringHash(taninfo_1.LocalID)))))) : ((matchValue_2 == null) ? 0 : ((taninfo = value_4(matchValue_2), mergeHashes(stringHash(taninfo.IDSpace), stringHash(taninfo.LocalID)))))))) | 0;
|
|
170
155
|
}
|
|
171
156
|
Equals(obj) {
|
|
172
157
|
const this$ = this;
|
|
@@ -180,6 +165,20 @@ export class OntologyAnnotation {
|
|
|
180
165
|
const tan = this$.TermAccessionNumber;
|
|
181
166
|
return OntologyAnnotation.make(name, tsr, tan, nextComments);
|
|
182
167
|
}
|
|
168
|
+
static computeTanInfo(tan, tsr) {
|
|
169
|
+
let tsr_1;
|
|
170
|
+
if (tan == null) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
const tan_1 = value_4(tan);
|
|
175
|
+
const matchValue = tryParseTermAnnotation(tan_1);
|
|
176
|
+
return (matchValue == null) ? ((tsr == null) ? undefined : ((value_4(tsr) === "") ? undefined : ((tsr_1 = value_4(tsr), {
|
|
177
|
+
IDSpace: tsr_1,
|
|
178
|
+
LocalID: tan_1,
|
|
179
|
+
})))) : value_4(matchValue);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
183
182
|
Print() {
|
|
184
183
|
const this$ = this;
|
|
185
184
|
return toString(this$);
|
|
@@ -200,6 +199,11 @@ export class OntologyAnnotation {
|
|
|
200
199
|
return 1;
|
|
201
200
|
}
|
|
202
201
|
}
|
|
202
|
+
recomputeTanInfo() {
|
|
203
|
+
const this$ = this;
|
|
204
|
+
const newTanInfo = OntologyAnnotation.computeTanInfo(unwrap(this$._termAccessionNumber), unwrap(this$._termSourceREF));
|
|
205
|
+
this$._tanInfo = newTanInfo;
|
|
206
|
+
}
|
|
203
207
|
}
|
|
204
208
|
export function OntologyAnnotation_$reflection() {
|
|
205
209
|
return class_type("ARCtrl.OntologyAnnotation", undefined, OntologyAnnotation);
|