@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
|
@@ -73,7 +73,8 @@ const ProcessOutput_js_1 = require("./Process/ProcessOutput.js");
|
|
|
73
73
|
const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
|
|
74
74
|
const Regex_js_1 = require("./Helper/Regex.js");
|
|
75
75
|
const ColumnIndex_js_1 = require("./Process/ColumnIndex.js");
|
|
76
|
-
const
|
|
76
|
+
const ArcTableAux_js_1 = require("./Table/ArcTableAux.js");
|
|
77
|
+
const ArcTable_js_1 = require("./Table/ArcTable.js");
|
|
77
78
|
const List_js_1 = require("@fable-org/fable-library-js/List.js");
|
|
78
79
|
const Source_js_1 = require("./Process/Source.js");
|
|
79
80
|
const Sample_js_1 = require("./Process/Sample.js");
|
|
@@ -82,10 +83,7 @@ const Protocol_js_1 = require("./Process/Protocol.js");
|
|
|
82
83
|
const Seq2_js_1 = require("@fable-org/fable-library-js/Seq2.js");
|
|
83
84
|
const Identifier_js_1 = require("./Helper/Identifier.js");
|
|
84
85
|
const HashCodes_js_1 = require("./Helper/HashCodes.js");
|
|
85
|
-
const ArcTable_js_1 = require("./Table/ArcTable.js");
|
|
86
|
-
const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
|
|
87
86
|
const Range_js_1 = require("@fable-org/fable-library-js/Range.js");
|
|
88
|
-
const ArcTableAux_js_1 = require("./Table/ArcTableAux.js");
|
|
89
87
|
const ArcTables_js_1 = require("./Table/ArcTables.js");
|
|
90
88
|
exports.Person_orcidKey = "ORCID";
|
|
91
89
|
exports.Person_AssayIdentifierPrefix = "performer (ARC:00000168)";
|
|
@@ -486,7 +484,11 @@ function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader) {
|
|
|
486
484
|
const oa = valueHeader.fields[0];
|
|
487
485
|
const newOA = oa.Copy();
|
|
488
486
|
(0, ColumnIndex_js_1.ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4)(newOA, valueI);
|
|
489
|
-
|
|
487
|
+
const cat = (0, CompositeHeader_js_1.CompositeHeader_Component)(newOA);
|
|
488
|
+
return (table) => ((i) => {
|
|
489
|
+
let matchValue;
|
|
490
|
+
return JsonTypes_composeComponent(cat, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(cat, undefined) : (0, Option_js_1.value)(matchValue)));
|
|
491
|
+
});
|
|
490
492
|
}
|
|
491
493
|
else {
|
|
492
494
|
return undefined;
|
|
@@ -498,7 +500,10 @@ function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader) {
|
|
|
498
500
|
function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader) {
|
|
499
501
|
if (valueHeader.tag === /* Parameter */ 3) {
|
|
500
502
|
const cat = (0, CompositeHeader_js_1.CompositeHeader_Parameter)((0, ColumnIndex_js_1.ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static)(valueI, valueHeader.fields[0]));
|
|
501
|
-
return (
|
|
503
|
+
return (table) => ((i_1) => {
|
|
504
|
+
let matchValue;
|
|
505
|
+
return JsonTypes_composeParameterValue(cat, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i_1, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(cat, undefined) : (0, Option_js_1.value)(matchValue)));
|
|
506
|
+
});
|
|
502
507
|
}
|
|
503
508
|
else {
|
|
504
509
|
return undefined;
|
|
@@ -510,7 +515,10 @@ function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader) {
|
|
|
510
515
|
function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
511
516
|
if (valueHeader.tag === /* Factor */ 2) {
|
|
512
517
|
const cat = (0, CompositeHeader_js_1.CompositeHeader_Factor)((0, ColumnIndex_js_1.ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static)(valueI, valueHeader.fields[0]));
|
|
513
|
-
return (
|
|
518
|
+
return (table) => ((i_1) => {
|
|
519
|
+
let matchValue;
|
|
520
|
+
return JsonTypes_composeFactorValue(cat, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i_1, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(cat, undefined) : (0, Option_js_1.value)(matchValue)));
|
|
521
|
+
});
|
|
514
522
|
}
|
|
515
523
|
else {
|
|
516
524
|
return undefined;
|
|
@@ -522,7 +530,10 @@ function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
|
522
530
|
function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHeader) {
|
|
523
531
|
if (valueHeader.tag === /* Characteristic */ 1) {
|
|
524
532
|
const cat = (0, CompositeHeader_js_1.CompositeHeader_Characteristic)((0, ColumnIndex_js_1.ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static)(valueI, valueHeader.fields[0]));
|
|
525
|
-
return (
|
|
533
|
+
return (table) => ((i_1) => {
|
|
534
|
+
let matchValue;
|
|
535
|
+
return JsonTypes_composeCharacteristicValue(cat, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i_1, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(cat, undefined) : (0, Option_js_1.value)(matchValue)));
|
|
536
|
+
});
|
|
526
537
|
}
|
|
527
538
|
else {
|
|
528
539
|
return undefined;
|
|
@@ -533,7 +544,16 @@ function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHeader) {
|
|
|
533
544
|
*/
|
|
534
545
|
function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
|
|
535
546
|
if (header.tag === /* ProtocolType */ 4) {
|
|
536
|
-
return (
|
|
547
|
+
return (table) => ((i) => {
|
|
548
|
+
const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
|
|
549
|
+
if (matchValue == null) {
|
|
550
|
+
return new OntologyAnnotation_js_1.OntologyAnnotation();
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
const cell = (0, Option_js_1.value)(matchValue);
|
|
554
|
+
return cell.AsTerm;
|
|
555
|
+
}
|
|
556
|
+
});
|
|
537
557
|
}
|
|
538
558
|
else {
|
|
539
559
|
return undefined;
|
|
@@ -544,7 +564,16 @@ function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
|
|
|
544
564
|
*/
|
|
545
565
|
function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
|
|
546
566
|
if (header.tag === /* ProtocolREF */ 8) {
|
|
547
|
-
return (
|
|
567
|
+
return (table) => ((i) => {
|
|
568
|
+
const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
|
|
569
|
+
if (matchValue == null) {
|
|
570
|
+
return "";
|
|
571
|
+
}
|
|
572
|
+
else {
|
|
573
|
+
const cell = (0, Option_js_1.value)(matchValue);
|
|
574
|
+
return cell.AsFreeText;
|
|
575
|
+
}
|
|
576
|
+
});
|
|
548
577
|
}
|
|
549
578
|
else {
|
|
550
579
|
return undefined;
|
|
@@ -555,7 +584,16 @@ function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
|
|
|
555
584
|
*/
|
|
556
585
|
function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header) {
|
|
557
586
|
if (header.tag === /* ProtocolDescription */ 5) {
|
|
558
|
-
return (
|
|
587
|
+
return (table) => ((i) => {
|
|
588
|
+
const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
|
|
589
|
+
if (matchValue == null) {
|
|
590
|
+
return "";
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
const cell = (0, Option_js_1.value)(matchValue);
|
|
594
|
+
return cell.AsFreeText;
|
|
595
|
+
}
|
|
596
|
+
});
|
|
559
597
|
}
|
|
560
598
|
else {
|
|
561
599
|
return undefined;
|
|
@@ -566,7 +604,16 @@ function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header) {
|
|
|
566
604
|
*/
|
|
567
605
|
function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
|
|
568
606
|
if (header.tag === /* ProtocolUri */ 6) {
|
|
569
|
-
return (
|
|
607
|
+
return (table) => ((i) => {
|
|
608
|
+
const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
|
|
609
|
+
if (matchValue == null) {
|
|
610
|
+
return "";
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
const cell = (0, Option_js_1.value)(matchValue);
|
|
614
|
+
return cell.AsFreeText;
|
|
615
|
+
}
|
|
616
|
+
});
|
|
570
617
|
}
|
|
571
618
|
else {
|
|
572
619
|
return undefined;
|
|
@@ -577,7 +624,16 @@ function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
|
|
|
577
624
|
*/
|
|
578
625
|
function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
|
|
579
626
|
if (header.tag === /* ProtocolVersion */ 7) {
|
|
580
|
-
return (
|
|
627
|
+
return (table) => ((i) => {
|
|
628
|
+
const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
|
|
629
|
+
if (matchValue == null) {
|
|
630
|
+
return "";
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
const cell = (0, Option_js_1.value)(matchValue);
|
|
634
|
+
return cell.AsFreeText;
|
|
635
|
+
}
|
|
636
|
+
});
|
|
581
637
|
}
|
|
582
638
|
else {
|
|
583
639
|
return undefined;
|
|
@@ -589,7 +645,10 @@ function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
|
|
|
589
645
|
function ProcessParsing_tryGetInputGetter(generalI, header) {
|
|
590
646
|
if (header.tag === /* Input */ 11) {
|
|
591
647
|
const io = header.fields[0];
|
|
592
|
-
return (
|
|
648
|
+
return (table) => ((i) => {
|
|
649
|
+
let matchValue;
|
|
650
|
+
return JsonTypes_composeProcessInput(header, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(header, undefined) : (0, Option_js_1.value)(matchValue)));
|
|
651
|
+
});
|
|
593
652
|
}
|
|
594
653
|
else {
|
|
595
654
|
return undefined;
|
|
@@ -601,7 +660,10 @@ function ProcessParsing_tryGetInputGetter(generalI, header) {
|
|
|
601
660
|
function ProcessParsing_tryGetOutputGetter(generalI, header) {
|
|
602
661
|
if (header.tag === /* Output */ 12) {
|
|
603
662
|
const io = header.fields[0];
|
|
604
|
-
return (
|
|
663
|
+
return (table) => ((i) => {
|
|
664
|
+
let matchValue;
|
|
665
|
+
return JsonTypes_composeProcessOutput(header, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(header, undefined) : (0, Option_js_1.value)(matchValue)));
|
|
666
|
+
});
|
|
605
667
|
}
|
|
606
668
|
else {
|
|
607
669
|
return undefined;
|
|
@@ -613,7 +675,16 @@ function ProcessParsing_tryGetOutputGetter(generalI, header) {
|
|
|
613
675
|
function ProcessParsing_tryGetCommentGetter(generalI, header) {
|
|
614
676
|
if (header.tag === /* Comment */ 14) {
|
|
615
677
|
const c = header.fields[0];
|
|
616
|
-
return (
|
|
678
|
+
return (table) => ((i) => {
|
|
679
|
+
const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
|
|
680
|
+
if (matchValue == null) {
|
|
681
|
+
return new Comment_js_1.Comment$(c);
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
const cell = (0, Option_js_1.value)(matchValue);
|
|
685
|
+
return new Comment_js_1.Comment$(c, cell.AsFreeText);
|
|
686
|
+
}
|
|
687
|
+
});
|
|
617
688
|
}
|
|
618
689
|
else {
|
|
619
690
|
return undefined;
|
|
@@ -650,36 +721,36 @@ function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
650
721
|
let inputGetter_1;
|
|
651
722
|
const matchValue = (0, Seq_js_1.tryPick)((tupledArg_10) => ProcessParsing_tryGetInputGetter(tupledArg_10[0], tupledArg_10[1]), headers_1);
|
|
652
723
|
if (matchValue == null) {
|
|
653
|
-
inputGetter_1 = ((
|
|
724
|
+
inputGetter_1 = ((table_1) => ((i_1) => (0, List_js_1.singleton)((0, ProcessInput_js_1.ProcessInput_Source)((0, Source_js_1.Source_create_Z5CA08497)(undefined, `${processNameRoot}_Input_${i_1}`, (0, Seq_js_1.toList)((0, Seq_js_1.map)((f_1) => f_1(table_1)(i_1), charGetters)))))));
|
|
654
725
|
}
|
|
655
726
|
else {
|
|
656
727
|
const inputGetter = (0, Option_js_1.value)(matchValue);
|
|
657
|
-
inputGetter_1 = ((
|
|
658
|
-
const chars = (0, Seq_js_1.toList)((0, Seq_js_1.map)((f) => f(
|
|
659
|
-
const input = inputGetter(
|
|
728
|
+
inputGetter_1 = ((table) => ((i) => {
|
|
729
|
+
const chars = (0, Seq_js_1.toList)((0, Seq_js_1.map)((f) => f(table)(i), charGetters));
|
|
730
|
+
const input = inputGetter(table)(i);
|
|
660
731
|
return (!((0, ProcessInput_js_1.ProcessInput__isSample)(input) ? true : (0, ProcessInput_js_1.ProcessInput__isSource)(input)) && !(0, List_js_1.isEmpty)(chars)) ? (0, List_js_1.ofArray)([input, (0, ProcessInput_js_1.ProcessInput_createSample_Z598187B7)((0, ProcessInput_js_1.ProcessInput__get_Name)(input), chars)]) : (0, List_js_1.singleton)(((0, List_js_1.length)(chars) > 0) ? (0, ProcessInput_js_1.ProcessInput_setCharacteristicValues)(chars, input) : input);
|
|
661
732
|
}));
|
|
662
733
|
}
|
|
663
734
|
let outputGetter_1;
|
|
664
735
|
const matchValue_1 = (0, Seq_js_1.tryPick)((tupledArg_11) => ProcessParsing_tryGetOutputGetter(tupledArg_11[0], tupledArg_11[1]), headers_1);
|
|
665
736
|
if (matchValue_1 == null) {
|
|
666
|
-
outputGetter_1 = ((
|
|
737
|
+
outputGetter_1 = ((table_3) => ((i_3) => (0, List_js_1.singleton)((0, ProcessOutput_js_1.ProcessOutput_Sample)((0, Sample_js_1.Sample_create_62424AD2)(undefined, `${processNameRoot}_Output_${i_3}`, undefined, (0, Seq_js_1.toList)((0, Seq_js_1.map)((f_3) => f_3(table_3)(i_3), factorValueGetters)))))));
|
|
667
738
|
}
|
|
668
739
|
else {
|
|
669
740
|
const outputGetter = (0, Option_js_1.value)(matchValue_1);
|
|
670
|
-
outputGetter_1 = ((
|
|
671
|
-
const factors = (0, Seq_js_1.toList)((0, Seq_js_1.map)((f_2) => f_2(
|
|
672
|
-
const output = outputGetter(
|
|
741
|
+
outputGetter_1 = ((table_2) => ((i_2) => {
|
|
742
|
+
const factors = (0, Seq_js_1.toList)((0, Seq_js_1.map)((f_2) => f_2(table_2)(i_2), factorValueGetters));
|
|
743
|
+
const output = outputGetter(table_2)(i_2);
|
|
673
744
|
return (!(0, ProcessOutput_js_1.ProcessOutput__isSample)(output) && !(0, List_js_1.isEmpty)(factors)) ? (0, List_js_1.ofArray)([output, (0, ProcessOutput_js_1.ProcessOutput_createSample_Z598187B7)((0, ProcessOutput_js_1.ProcessOutput__get_Name)(output), undefined, factors)]) : (0, List_js_1.singleton)(((0, List_js_1.length)(factors) > 0) ? (0, ProcessOutput_js_1.ProcessOutput_setFactorValues)(factors, output) : output);
|
|
674
745
|
}));
|
|
675
746
|
}
|
|
676
|
-
return (
|
|
747
|
+
return (table_4) => ((i_4) => {
|
|
677
748
|
const pn = (0, Option_js_1.map)((p) => (0, Process_js_1.Process_composeName)(p, i_4), (0, Collections_js_1.Option_fromValueWithDefault)("", processNameRoot));
|
|
678
|
-
const paramvalues = (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_4) => f_4(
|
|
749
|
+
const paramvalues = (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_4) => f_4(table_4)(i_4), parameterValueGetters));
|
|
679
750
|
const parameters = (0, Option_js_1.map)((list_5) => (0, List_js_1.map)((pv) => (0, Option_js_1.value)(pv.Category), list_5), paramvalues);
|
|
680
|
-
const comments = (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_5) => f_5(
|
|
751
|
+
const comments = (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_5) => f_5(table_4)(i_4), commentGetters));
|
|
681
752
|
let protocol;
|
|
682
|
-
const p_1 = (0, Protocol_js_1.Protocol_make)(undefined, (0, Option_js_1.map)((f_6) => f_6(
|
|
753
|
+
const p_1 = (0, Protocol_js_1.Protocol_make)(undefined, (0, Option_js_1.map)((f_6) => f_6(table_4)(i_4), protocolREFGetter), (0, Option_js_1.map)((f_7) => f_7(table_4)(i_4), protocolTypeGetter), (0, Option_js_1.map)((f_8) => f_8(table_4)(i_4), protocolDescriptionGetter), (0, Option_js_1.map)((f_9) => f_9(table_4)(i_4), protocolURIGetter), (0, Option_js_1.map)((f_10) => f_10(table_4)(i_4), protocolVersionGetter), parameters, (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_11) => f_11(table_4)(i_4), componentGetters)), undefined);
|
|
683
754
|
let matchResult;
|
|
684
755
|
if (p_1.Name == null) {
|
|
685
756
|
if (p_1.ProtocolType == null) {
|
|
@@ -721,8 +792,8 @@ function ProcessParsing_getProcessGetter(processNameRoot, headers) {
|
|
|
721
792
|
protocol = p_1;
|
|
722
793
|
}
|
|
723
794
|
let patternInput;
|
|
724
|
-
const inputs = inputGetter_1(
|
|
725
|
-
const outputs = outputGetter_1(
|
|
795
|
+
const inputs = inputGetter_1(table_4)(i_4);
|
|
796
|
+
const outputs = outputGetter_1(table_4)(i_4);
|
|
726
797
|
patternInput = ((((0, List_js_1.length)(inputs) === 1) && ((0, List_js_1.length)(outputs) === 2)) ? [(0, List_js_1.ofArray)([(0, List_js_1.item)(0, inputs), (0, List_js_1.item)(0, inputs)]), outputs] : ((((0, List_js_1.length)(inputs) === 2) && ((0, List_js_1.length)(outputs) === 1)) ? [inputs, (0, List_js_1.ofArray)([(0, List_js_1.item)(0, outputs), (0, List_js_1.item)(0, outputs)])] : [inputs, outputs]));
|
|
727
798
|
return (0, Process_js_1.Process_make)(undefined, pn, protocol, paramvalues, undefined, undefined, undefined, undefined, patternInput[0], patternInput[1], comments);
|
|
728
799
|
});
|
|
@@ -742,10 +813,6 @@ function ProcessParsing_groupProcesses(ps) {
|
|
|
742
813
|
else if ((x.ExecutesProtocol != null) && ((0, Option_js_1.value)(x.ExecutesProtocol).Name != null)) {
|
|
743
814
|
return (0, Option_js_1.value)((0, Option_js_1.value)(x.ExecutesProtocol).Name);
|
|
744
815
|
}
|
|
745
|
-
else if ((x.Name != null) && ((0, Option_js_1.value)(x.Name).indexOf("_") >= 0)) {
|
|
746
|
-
const lastUnderScoreIndex = (0, Option_js_1.value)(x.Name).lastIndexOf("_") | 0;
|
|
747
|
-
return (0, String_js_1.remove)((0, Option_js_1.value)(x.Name), lastUnderScoreIndex);
|
|
748
|
-
}
|
|
749
816
|
else if (x.Name != null) {
|
|
750
817
|
return (0, Option_js_1.value)(x.Name);
|
|
751
818
|
}
|
|
@@ -1016,7 +1083,7 @@ function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p) {
|
|
|
1016
1083
|
try {
|
|
1017
1084
|
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1018
1085
|
const c = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1019
|
-
const v_1 = (0, Option_js_1.map)((arg) => (0,
|
|
1086
|
+
const v_1 = (0, Option_js_1.map)((arg) => (0, Collections_js_1.ResizeArray_singleton)(ARCtrl_CompositeCell__CompositeCell_fromValue_Static_Z6986DF18(arg, (0, Option_js_1.unwrap)(c.ComponentUnit))), c.ComponentValue);
|
|
1020
1087
|
t.AddColumn((0, CompositeHeader_js_1.CompositeHeader_Parameter)((0, Option_js_1.value)(c.ComponentType)), (0, Option_js_1.unwrap)(v_1), (0, Option_js_1.unwrap)((0, ColumnIndex_js_1.ARCtrl_Process_Component__Component_TryGetColumnIndex)(c)));
|
|
1021
1088
|
}
|
|
1022
1089
|
}
|
|
@@ -1024,19 +1091,19 @@ function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p) {
|
|
|
1024
1091
|
(0, Util_js_1.disposeSafe)(enumerator_1);
|
|
1025
1092
|
}
|
|
1026
1093
|
(0, Option_js_1.map)((d) => {
|
|
1027
|
-
t.AddProtocolDescriptionColumn(
|
|
1094
|
+
t.AddProtocolDescriptionColumn((0, Collections_js_1.ResizeArray_singleton)(d));
|
|
1028
1095
|
}, p.Description);
|
|
1029
1096
|
(0, Option_js_1.map)((d_1) => {
|
|
1030
|
-
t.AddProtocolVersionColumn(
|
|
1097
|
+
t.AddProtocolVersionColumn((0, Collections_js_1.ResizeArray_singleton)(d_1));
|
|
1031
1098
|
}, p.Version);
|
|
1032
1099
|
(0, Option_js_1.map)((d_2) => {
|
|
1033
|
-
t.AddProtocolTypeColumn(
|
|
1100
|
+
t.AddProtocolTypeColumn((0, Collections_js_1.ResizeArray_singleton)(d_2));
|
|
1034
1101
|
}, p.ProtocolType);
|
|
1035
1102
|
(0, Option_js_1.map)((d_3) => {
|
|
1036
|
-
t.AddProtocolUriColumn(
|
|
1103
|
+
t.AddProtocolUriColumn((0, Collections_js_1.ResizeArray_singleton)(d_3));
|
|
1037
1104
|
}, p.Uri);
|
|
1038
1105
|
(0, Option_js_1.map)((d_4) => {
|
|
1039
|
-
t.AddProtocolNameColumn(
|
|
1106
|
+
t.AddProtocolNameColumn((0, Collections_js_1.ResizeArray_singleton)(d_4));
|
|
1040
1107
|
}, p.Name);
|
|
1041
1108
|
return t;
|
|
1042
1109
|
}
|
|
@@ -1095,7 +1162,7 @@ function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
|
|
|
1095
1162
|
const clo_1 = clo(arg);
|
|
1096
1163
|
return clo_1;
|
|
1097
1164
|
});
|
|
1098
|
-
return ProcessParsing_mergeIdenticalProcesses((0, Seq_js_1.toList)((0, Seq_js_1.delay)(() => (0, Seq_js_1.map)((i) => getter(this
|
|
1165
|
+
return ProcessParsing_mergeIdenticalProcesses((0, Seq_js_1.toList)((0, Seq_js_1.delay)(() => (0, Seq_js_1.map)((i) => getter(this$)(i), (0, Range_js_1.rangeDouble)(0, 1, this$.RowCount - 1)))));
|
|
1099
1166
|
}
|
|
1100
1167
|
}
|
|
1101
1168
|
/**
|
|
@@ -1107,7 +1174,7 @@ function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
|
|
|
1107
1174
|
*/
|
|
1108
1175
|
function ARCtrl_ArcTable__ArcTable_fromProcesses_Static(name, ps) {
|
|
1109
1176
|
const tupledArg = (0, ArcTableAux_js_1.Unchecked_alignByHeaders)(true, (0, List_js_1.collect)(ProcessParsing_processToRows, ps));
|
|
1110
|
-
return ArcTable_js_1.ArcTable.
|
|
1177
|
+
return ArcTable_js_1.ArcTable.fromArcTableValues(name, tupledArg[0], tupledArg[1]);
|
|
1111
1178
|
}
|
|
1112
1179
|
/**
|
|
1113
1180
|
* Return a list of all the processes in all the tables.
|
|
@@ -1126,6 +1193,6 @@ function ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(ps) {
|
|
|
1126
1193
|
let collection;
|
|
1127
1194
|
return new ArcTables_js_1.ArcTables((collection = (0, List_js_1.map)((tupledArg) => {
|
|
1128
1195
|
const tupledArg_1 = (0, ArcTableAux_js_1.Unchecked_alignByHeaders)(true, (0, List_js_1.collect)(ProcessParsing_processToRows, tupledArg[1]));
|
|
1129
|
-
return ArcTable_js_1.ArcTable.
|
|
1196
|
+
return ArcTable_js_1.ArcTable.fromArcTableValues(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
|
|
1130
1197
|
}, ProcessParsing_groupProcesses(ps)), Array.from(collection)));
|
|
1131
1198
|
}
|
|
@@ -139,8 +139,10 @@ class Data {
|
|
|
139
139
|
throw new Error("Data does not have a file path");
|
|
140
140
|
}
|
|
141
141
|
else {
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
let p_3;
|
|
143
|
+
const s = (0, String_js_1.trimStart)((0, Option_js_1.value)(matchValue), "/");
|
|
144
|
+
p_3 = (s.startsWith("./") ? (0, String_js_1.substring)(s, "./".length) : s);
|
|
145
|
+
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);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
GetAbsolutePathForAssay(assayIdentifier, checkExistenceFromRoot) {
|
|
@@ -12,20 +12,28 @@ exports.Dictionary_ofSeqWithMerge = Dictionary_ofSeqWithMerge;
|
|
|
12
12
|
exports.Dictionary_init = Dictionary_init;
|
|
13
13
|
exports.Dictionary_items = Dictionary_items;
|
|
14
14
|
exports.StringDictionary_ofSeq = StringDictionary_ofSeq;
|
|
15
|
+
exports.IntDictionary_ofSeq = IntDictionary_ofSeq;
|
|
15
16
|
exports.ResizeArray_create = ResizeArray_create;
|
|
16
17
|
exports.ResizeArray_singleton = ResizeArray_singleton;
|
|
17
18
|
exports.ResizeArray_map = ResizeArray_map;
|
|
19
|
+
exports.ResizeArray_mapi = ResizeArray_mapi;
|
|
20
|
+
exports.ResizeArray_map2 = ResizeArray_map2;
|
|
18
21
|
exports.ResizeArray_choose = ResizeArray_choose;
|
|
19
22
|
exports.ResizeArray_filter = ResizeArray_filter;
|
|
20
23
|
exports.ResizeArray_fold = ResizeArray_fold;
|
|
21
24
|
exports.ResizeArray_foldBack = ResizeArray_foldBack;
|
|
22
25
|
exports.ResizeArray_iter = ResizeArray_iter;
|
|
26
|
+
exports.ResizeArray_iteri = ResizeArray_iteri;
|
|
27
|
+
exports.ResizeArray_init = ResizeArray_init;
|
|
23
28
|
exports.ResizeArray_reduce = ResizeArray_reduce;
|
|
24
29
|
exports.ResizeArray_collect = ResizeArray_collect;
|
|
25
30
|
exports.ResizeArray_distinct = ResizeArray_distinct;
|
|
26
31
|
exports.ResizeArray_isEmpty = ResizeArray_isEmpty;
|
|
27
32
|
exports.ResizeArray_append = ResizeArray_append;
|
|
28
33
|
exports.ResizeArray_appendSingleton = ResizeArray_appendSingleton;
|
|
34
|
+
exports.ResizeArray_indexed = ResizeArray_indexed;
|
|
35
|
+
exports.ResizeArray_rev = ResizeArray_rev;
|
|
36
|
+
exports.ResizeArray_take = ResizeArray_take;
|
|
29
37
|
exports.ResizeArray_groupBy = ResizeArray_groupBy;
|
|
30
38
|
exports.ResizeArray_tryPick = ResizeArray_tryPick;
|
|
31
39
|
exports.ResizeArray_zip = ResizeArray_zip;
|
|
@@ -37,9 +45,10 @@ const List_js_1 = require("@fable-org/fable-library-js/List.js");
|
|
|
37
45
|
const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
|
|
38
46
|
const MutableMap_js_1 = require("@fable-org/fable-library-js/MutableMap.js");
|
|
39
47
|
const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
|
|
48
|
+
const Double_js_1 = require("@fable-org/fable-library-js/Double.js");
|
|
40
49
|
const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
|
|
50
|
+
const Range_js_1 = require("@fable-org/fable-library-js/Range.js");
|
|
41
51
|
const Seq2_js_1 = require("@fable-org/fable-library-js/Seq2.js");
|
|
42
|
-
const Double_js_1 = require("@fable-org/fable-library-js/Double.js");
|
|
43
52
|
/**
|
|
44
53
|
* If the value matches the default, a None is returned, else a Some is returned
|
|
45
54
|
*/
|
|
@@ -167,6 +176,9 @@ function Dictionary_items(dict) {
|
|
|
167
176
|
function StringDictionary_ofSeq(s) {
|
|
168
177
|
return new Map(s);
|
|
169
178
|
}
|
|
179
|
+
function IntDictionary_ofSeq(s) {
|
|
180
|
+
return new Map(s);
|
|
181
|
+
}
|
|
170
182
|
function ResizeArray_create(i, v) {
|
|
171
183
|
const a = [];
|
|
172
184
|
if (i > 0) {
|
|
@@ -195,6 +207,21 @@ function ResizeArray_map(f, a) {
|
|
|
195
207
|
}
|
|
196
208
|
return b;
|
|
197
209
|
}
|
|
210
|
+
function ResizeArray_mapi(f, a) {
|
|
211
|
+
const b = [];
|
|
212
|
+
for (let i = 0; i <= (a.length - 1); i++) {
|
|
213
|
+
void (b.push(f(i, a[i])));
|
|
214
|
+
}
|
|
215
|
+
return b;
|
|
216
|
+
}
|
|
217
|
+
function ResizeArray_map2(f, a, b) {
|
|
218
|
+
const c = [];
|
|
219
|
+
const n = (0, Double_js_1.min)(a.length, b.length) | 0;
|
|
220
|
+
for (let i = 0; i <= (n - 1); i++) {
|
|
221
|
+
void (c.push(f(a[i], b[i])));
|
|
222
|
+
}
|
|
223
|
+
return c;
|
|
224
|
+
}
|
|
198
225
|
function ResizeArray_choose(f, a) {
|
|
199
226
|
const b = [];
|
|
200
227
|
let enumerator = (0, Util_js_1.getEnumerator)(a);
|
|
@@ -269,6 +296,18 @@ function ResizeArray_iter(f, a) {
|
|
|
269
296
|
(0, Util_js_1.disposeSafe)(enumerator);
|
|
270
297
|
}
|
|
271
298
|
}
|
|
299
|
+
function ResizeArray_iteri(f, a) {
|
|
300
|
+
for (let i = 0; i <= (a.length - 1); i++) {
|
|
301
|
+
f(i, a[i]);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function ResizeArray_init(n, f) {
|
|
305
|
+
const a = [];
|
|
306
|
+
for (let i = 0; i <= (n - 1); i++) {
|
|
307
|
+
void (a.push(f(i)));
|
|
308
|
+
}
|
|
309
|
+
return a;
|
|
310
|
+
}
|
|
272
311
|
function ResizeArray_reduce(f, a) {
|
|
273
312
|
switch (a.length) {
|
|
274
313
|
case 0:
|
|
@@ -374,6 +413,35 @@ function ResizeArray_appendSingleton(b, a) {
|
|
|
374
413
|
void (c.push(b));
|
|
375
414
|
return c;
|
|
376
415
|
}
|
|
416
|
+
function ResizeArray_indexed(a) {
|
|
417
|
+
const b = [];
|
|
418
|
+
for (let i = 0; i <= (a.length - 1); i++) {
|
|
419
|
+
void (b.push([i, a[i]]));
|
|
420
|
+
}
|
|
421
|
+
return b;
|
|
422
|
+
}
|
|
423
|
+
function ResizeArray_rev(a) {
|
|
424
|
+
const b = [];
|
|
425
|
+
const enumerator = (0, Util_js_1.getEnumerator)((0, Range_js_1.rangeDouble)(a.length - 1, -1, 0));
|
|
426
|
+
try {
|
|
427
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
428
|
+
const i = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]() | 0;
|
|
429
|
+
void (b.push(a[i]));
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
finally {
|
|
433
|
+
(0, Util_js_1.disposeSafe)(enumerator);
|
|
434
|
+
}
|
|
435
|
+
return b;
|
|
436
|
+
}
|
|
437
|
+
function ResizeArray_take(n, a) {
|
|
438
|
+
const b = [];
|
|
439
|
+
const n_1 = (0, Double_js_1.min)(n, a.length) | 0;
|
|
440
|
+
for (let i = 0; i <= (n_1 - 1); i++) {
|
|
441
|
+
void (b.push(a[i]));
|
|
442
|
+
}
|
|
443
|
+
return b;
|
|
444
|
+
}
|
|
377
445
|
function ResizeArray_groupBy(f, a) {
|
|
378
446
|
const collection = (0, Seq_js_1.map)((tupledArg) => [tupledArg[0], Array.from(tupledArg[1])], (0, Seq2_js_1.groupBy)(f, a, {
|
|
379
447
|
Equals: Util_js_1.equals,
|
|
@@ -4,15 +4,15 @@ exports.OntologyAnnotation = void 0;
|
|
|
4
4
|
exports.OntologyAnnotation_$reflection = OntologyAnnotation_$reflection;
|
|
5
5
|
exports.OntologyAnnotation_$ctor_Z54349580 = OntologyAnnotation_$ctor_Z54349580;
|
|
6
6
|
const Option_js_1 = require("@fable-org/fable-library-js/Option.js");
|
|
7
|
-
const Regex_js_1 = require("./Helper/Regex.js");
|
|
8
7
|
const Url_js_1 = require("./Helper/Url.js");
|
|
8
|
+
const Regex_js_1 = require("./Helper/Regex.js");
|
|
9
9
|
const System_Text_js_1 = require("@fable-org/fable-library-js/System.Text.js");
|
|
10
10
|
const String_js_1 = require("@fable-org/fable-library-js/String.js");
|
|
11
11
|
const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
|
|
12
12
|
const Types_js_1 = require("@fable-org/fable-library-js/Types.js");
|
|
13
13
|
const HashCodes_js_1 = require("./Helper/HashCodes.js");
|
|
14
|
-
const Collections_js_1 = require("./Helper/Collections.js");
|
|
15
14
|
const Util_js_1 = require("@fable-org/fable-library-js/Util.js");
|
|
15
|
+
const Collections_js_1 = require("./Helper/Collections.js");
|
|
16
16
|
const Reflection_js_1 = require("@fable-org/fable-library-js/Reflection.js");
|
|
17
17
|
class OntologyAnnotation {
|
|
18
18
|
constructor(name, tsr, tan, comments) {
|
|
@@ -20,6 +20,7 @@ class OntologyAnnotation {
|
|
|
20
20
|
this._termSourceREF = ((tsr == null) ? undefined : (((0, Option_js_1.value)(tsr) === "") ? undefined : tsr));
|
|
21
21
|
this._termAccessionNumber = ((tan == null) ? undefined : (((0, Option_js_1.value)(tan) === "") ? undefined : (((0, Option_js_1.value)(tan) === ":") ? undefined : tan)));
|
|
22
22
|
this._comments = (0, Option_js_1.defaultArg)(comments, []);
|
|
23
|
+
this._tanInfo = OntologyAnnotation.computeTanInfo((0, Option_js_1.unwrap)(this._termAccessionNumber), (0, Option_js_1.unwrap)(this._termSourceREF));
|
|
23
24
|
}
|
|
24
25
|
get Name() {
|
|
25
26
|
const this$ = this;
|
|
@@ -36,6 +37,7 @@ class OntologyAnnotation {
|
|
|
36
37
|
set TermSourceREF(tsr) {
|
|
37
38
|
const this$ = this;
|
|
38
39
|
this$._termSourceREF = tsr;
|
|
40
|
+
this$.recomputeTanInfo();
|
|
39
41
|
}
|
|
40
42
|
get TermAccessionNumber() {
|
|
41
43
|
const this$ = this;
|
|
@@ -44,6 +46,7 @@ class OntologyAnnotation {
|
|
|
44
46
|
set TermAccessionNumber(tan) {
|
|
45
47
|
const this$ = this;
|
|
46
48
|
this$._termAccessionNumber = tan;
|
|
49
|
+
this$.recomputeTanInfo();
|
|
47
50
|
}
|
|
48
51
|
get Comments() {
|
|
49
52
|
const this$ = this;
|
|
@@ -61,12 +64,8 @@ class OntologyAnnotation {
|
|
|
61
64
|
return OntologyAnnotation.make(name, tsr, tan, comments_1);
|
|
62
65
|
}
|
|
63
66
|
get TANInfo() {
|
|
64
|
-
let matchValue, tan, matchValue_1, matchValue_2, tsr;
|
|
65
67
|
const this$ = this;
|
|
66
|
-
return (0, Option_js_1.unwrap)(
|
|
67
|
-
IDSpace: tsr,
|
|
68
|
-
LocalID: tan,
|
|
69
|
-
}))))) : (0, Option_js_1.value)(matchValue_1))))));
|
|
68
|
+
return (0, Option_js_1.unwrap)(this$._tanInfo);
|
|
70
69
|
}
|
|
71
70
|
get NameText() {
|
|
72
71
|
const this$ = this;
|
|
@@ -155,23 +154,9 @@ class OntologyAnnotation {
|
|
|
155
154
|
return (((this$.Name == null) && (this$.TermSourceREF == null)) && (this$.TermAccessionNumber == null)) && (this$.Comments.length === 0);
|
|
156
155
|
}
|
|
157
156
|
GetHashCode() {
|
|
157
|
+
let matchValue, matchValue_1, matchValue_2, tsr_1, matchValue_4, tan, taninfo_1, tsr, taninfo;
|
|
158
158
|
const this$ = this;
|
|
159
|
-
return (0, HashCodes_js_1.
|
|
160
|
-
let tsr_1, taninfo_1, tsr;
|
|
161
|
-
const matchValue = this$.TermSourceREF;
|
|
162
|
-
const matchValue_1 = this$.TANInfo;
|
|
163
|
-
if (matchValue != null) {
|
|
164
|
-
return (matchValue_1 == null) ? ((tsr_1 = (0, Option_js_1.value)(matchValue), (0, Seq_js_1.singleton)((0, HashCodes_js_1.boxHashArray)([tsr_1, (0, Option_js_1.defaultArg)(this$.TermAccessionNumber, "")])))) : ((taninfo_1 = (0, Option_js_1.value)(matchValue_1), (tsr = (0, Option_js_1.value)(matchValue), (0, Seq_js_1.singleton)((0, HashCodes_js_1.boxHashArray)([tsr, (taninfo_1.IDSpace + ":") + taninfo_1.LocalID])))));
|
|
165
|
-
}
|
|
166
|
-
else if (matchValue_1 == null) {
|
|
167
|
-
const tan_1 = (0, Option_js_1.defaultArg)(this$.TermAccessionNumber, "");
|
|
168
|
-
return (0, Seq_js_1.singleton)((0, HashCodes_js_1.boxHashArray)([(0, Option_js_1.defaultArg)(this$.TermAccessionNumber, ""), tan_1]));
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
const taninfo = (0, Option_js_1.value)(matchValue_1);
|
|
172
|
-
return (0, Seq_js_1.singleton)((0, HashCodes_js_1.boxHashArray)([taninfo.IDSpace, (taninfo.IDSpace + ":") + taninfo.LocalID]));
|
|
173
|
-
}
|
|
174
|
-
}))))) | 0;
|
|
159
|
+
return (0, HashCodes_js_1.mergeHashes)((matchValue = this$.Name, (matchValue == null) ? 0 : (0, Util_js_1.stringHash)((0, Option_js_1.value)(matchValue))), (matchValue_1 = this$.TermSourceREF, (matchValue_2 = this$.TANInfo, (matchValue_1 != null) ? ((matchValue_2 == null) ? ((tsr_1 = (0, Option_js_1.value)(matchValue_1), (matchValue_4 = this$.TermAccessionNumber, (matchValue_4 == null) ? (0, Util_js_1.stringHash)(tsr_1) : ((tan = (0, Option_js_1.value)(matchValue_4), (0, HashCodes_js_1.mergeHashes)((0, Util_js_1.stringHash)(tsr_1), (0, Util_js_1.stringHash)(tan))))))) : ((taninfo_1 = (0, Option_js_1.value)(matchValue_2), (tsr = (0, Option_js_1.value)(matchValue_1), (0, HashCodes_js_1.mergeHashes)((0, Util_js_1.stringHash)(tsr), (0, Util_js_1.stringHash)(taninfo_1.LocalID)))))) : ((matchValue_2 == null) ? 0 : ((taninfo = (0, Option_js_1.value)(matchValue_2), (0, HashCodes_js_1.mergeHashes)((0, Util_js_1.stringHash)(taninfo.IDSpace), (0, Util_js_1.stringHash)(taninfo.LocalID)))))))) | 0;
|
|
175
160
|
}
|
|
176
161
|
Equals(obj) {
|
|
177
162
|
const this$ = this;
|
|
@@ -185,6 +170,20 @@ class OntologyAnnotation {
|
|
|
185
170
|
const tan = this$.TermAccessionNumber;
|
|
186
171
|
return OntologyAnnotation.make(name, tsr, tan, nextComments);
|
|
187
172
|
}
|
|
173
|
+
static computeTanInfo(tan, tsr) {
|
|
174
|
+
let tsr_1;
|
|
175
|
+
if (tan == null) {
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const tan_1 = (0, Option_js_1.value)(tan);
|
|
180
|
+
const matchValue = (0, Regex_js_1.tryParseTermAnnotation)(tan_1);
|
|
181
|
+
return (matchValue == null) ? ((tsr == null) ? undefined : (((0, Option_js_1.value)(tsr) === "") ? undefined : ((tsr_1 = (0, Option_js_1.value)(tsr), {
|
|
182
|
+
IDSpace: tsr_1,
|
|
183
|
+
LocalID: tan_1,
|
|
184
|
+
})))) : (0, Option_js_1.value)(matchValue);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
188
187
|
Print() {
|
|
189
188
|
const this$ = this;
|
|
190
189
|
return (0, Types_js_1.toString)(this$);
|
|
@@ -205,6 +204,11 @@ class OntologyAnnotation {
|
|
|
205
204
|
return 1;
|
|
206
205
|
}
|
|
207
206
|
}
|
|
207
|
+
recomputeTanInfo() {
|
|
208
|
+
const this$ = this;
|
|
209
|
+
const newTanInfo = OntologyAnnotation.computeTanInfo((0, Option_js_1.unwrap)(this$._termAccessionNumber), (0, Option_js_1.unwrap)(this$._termSourceREF));
|
|
210
|
+
this$._tanInfo = newTanInfo;
|
|
211
|
+
}
|
|
208
212
|
}
|
|
209
213
|
exports.OntologyAnnotation = OntologyAnnotation;
|
|
210
214
|
function OntologyAnnotation_$reflection() {
|