@nfdi4plants/arctrl 3.0.0-alpha.3 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +17 -9
  2. package/dist/ts/cjs/ts/ARC.js +25 -17
  3. package/dist/ts/cjs/ts/Conversion.js +133 -86
  4. package/dist/ts/cjs/ts/Core/ArcTypes.js +1 -1
  5. package/dist/ts/cjs/ts/Core/Conversion.js +110 -43
  6. package/dist/ts/cjs/ts/Core/Helper/Collections.js +84 -1
  7. package/dist/ts/cjs/ts/Core/OntologyAnnotation.js +27 -23
  8. package/dist/ts/cjs/ts/Core/Table/ArcTable.js +234 -217
  9. package/dist/ts/cjs/ts/Core/Table/ArcTableAux.js +915 -235
  10. package/dist/ts/cjs/ts/Core/Table/ArcTables.js +12 -19
  11. package/dist/ts/cjs/ts/Core/Table/CompositeColumn.js +4 -2
  12. package/dist/ts/cjs/ts/FileSystem/DefaultGitattributes.js +1 -1
  13. package/dist/ts/cjs/ts/Json/Decode.js +105 -0
  14. package/dist/ts/cjs/ts/Json/Encode.js +42 -0
  15. package/dist/ts/cjs/ts/Json/StringTable.js +9 -2
  16. package/dist/ts/cjs/ts/Json/Table/ArcTable.js +100 -113
  17. package/dist/ts/cjs/ts/Json/Table/CellTable.js +2 -2
  18. package/dist/ts/cjs/ts/Json/Table/OATable.js +2 -2
  19. package/dist/ts/cjs/ts/JsonIO/Table/Compression.js +4 -11
  20. package/dist/ts/cjs/ts/ROCrate/Generic/LabProcess.js +1 -1
  21. package/dist/ts/cjs/ts/ROCrate/LDContext.js +92 -54
  22. package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/ArcTable.js +15 -4
  23. package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +77 -6
  24. package/dist/ts/cjs/ts/Spreadsheet/ArcInvestigation.js +31 -15
  25. package/dist/ts/cjs/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
  26. package/dist/ts/cjs/ts/Spreadsheet/Metadata/SparseTable.js +2 -5
  27. package/dist/ts/esm/ts/ARC.js +28 -20
  28. package/dist/ts/esm/ts/Conversion.js +137 -90
  29. package/dist/ts/esm/ts/Core/ArcTypes.js +1 -1
  30. package/dist/ts/esm/ts/Core/Conversion.js +112 -45
  31. package/dist/ts/esm/ts/Core/Helper/Collections.js +73 -1
  32. package/dist/ts/esm/ts/Core/OntologyAnnotation.js +29 -25
  33. package/dist/ts/esm/ts/Core/Table/ArcTable.js +243 -226
  34. package/dist/ts/esm/ts/Core/Table/ArcTableAux.js +907 -246
  35. package/dist/ts/esm/ts/Core/Table/ArcTables.js +15 -22
  36. package/dist/ts/esm/ts/Core/Table/CompositeColumn.js +5 -3
  37. package/dist/ts/esm/ts/FileSystem/DefaultGitattributes.js +1 -1
  38. package/dist/ts/esm/ts/Json/Decode.js +105 -3
  39. package/dist/ts/esm/ts/Json/Encode.js +42 -2
  40. package/dist/ts/esm/ts/Json/StringTable.js +10 -3
  41. package/dist/ts/esm/ts/Json/Table/ArcTable.js +108 -121
  42. package/dist/ts/esm/ts/Json/Table/CellTable.js +2 -2
  43. package/dist/ts/esm/ts/Json/Table/OATable.js +2 -2
  44. package/dist/ts/esm/ts/JsonIO/Table/Compression.js +4 -11
  45. package/dist/ts/esm/ts/ROCrate/Generic/LabProcess.js +1 -1
  46. package/dist/ts/esm/ts/ROCrate/LDContext.js +106 -66
  47. package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/ArcTable.js +17 -7
  48. package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +78 -9
  49. package/dist/ts/esm/ts/Spreadsheet/ArcInvestigation.js +33 -17
  50. package/dist/ts/esm/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
  51. package/dist/ts/esm/ts/Spreadsheet/Metadata/SparseTable.js +3 -6
  52. package/dist/ts/types/ts/ARC.d.ts +2 -2
  53. package/dist/ts/types/ts/ARC.d.ts.map +1 -1
  54. package/dist/ts/types/ts/Conversion.d.ts +17 -18
  55. package/dist/ts/types/ts/Conversion.d.ts.map +1 -1
  56. package/dist/ts/types/ts/Core/ArcTypes.d.ts +2 -0
  57. package/dist/ts/types/ts/Core/ArcTypes.d.ts.map +1 -1
  58. package/dist/ts/types/ts/Core/Conversion.d.ts +14 -15
  59. package/dist/ts/types/ts/Core/Conversion.d.ts.map +1 -1
  60. package/dist/ts/types/ts/Core/Helper/Collections.d.ts +11 -0
  61. package/dist/ts/types/ts/Core/Helper/Collections.d.ts.map +1 -1
  62. package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts +9 -0
  63. package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts.map +1 -1
  64. package/dist/ts/types/ts/Core/Table/ArcTable.d.ts +35 -28
  65. package/dist/ts/types/ts/Core/Table/ArcTable.d.ts.map +1 -1
  66. package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts +84 -33
  67. package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
  68. package/dist/ts/types/ts/Core/Table/ArcTables.d.ts.map +1 -1
  69. package/dist/ts/types/ts/Core/Table/CompositeColumn.d.ts.map +1 -1
  70. package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts +1 -1
  71. package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts.map +1 -1
  72. package/dist/ts/types/ts/Json/Decode.d.ts +6 -0
  73. package/dist/ts/types/ts/Json/Decode.d.ts.map +1 -1
  74. package/dist/ts/types/ts/Json/Encode.d.ts +2 -0
  75. package/dist/ts/types/ts/Json/Encode.d.ts.map +1 -1
  76. package/dist/ts/types/ts/Json/StringTable.d.ts.map +1 -1
  77. package/dist/ts/types/ts/Json/Table/ArcTable.d.ts +4 -3
  78. package/dist/ts/types/ts/Json/Table/ArcTable.d.ts.map +1 -1
  79. package/dist/ts/types/ts/Json/Table/CellTable.d.ts.map +1 -1
  80. package/dist/ts/types/ts/Json/Table/OATable.d.ts.map +1 -1
  81. package/dist/ts/types/ts/JsonIO/Table/Compression.d.ts.map +1 -1
  82. package/dist/ts/types/ts/ROCrate/LDContext.d.ts +3 -5
  83. package/dist/ts/types/ts/ROCrate/LDContext.d.ts.map +1 -1
  84. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +5 -0
  85. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  86. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +7 -0
  87. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  88. package/dist/ts/types/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  89. package/dist/ts/types/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  90. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- 
1
+
2
2
  ![logo](logos/ARCtrl_horizontal.png)
3
3
 
4
4
  # ARCtrl
@@ -90,11 +90,19 @@ Measured on 13th Gen Intel(R) Core(TM) i7-13800H
90
90
 
91
91
  | Name | Description | FSharp Time (ms) | JavaScript Time (ms) | Python Time (ms) |
92
92
  | --- | --- | --- | --- | --- |
93
- | Table_GetHashCode | From a table with 1 column and 10000 rows, retrieve the Hash Code | 5 | 21 | 226 |
94
- | Table_AddRows | Add 10000 rows to a table with 4 columns. | 15 | 22 | 289 |
95
- | Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. | 49 | 108 | 4813 |
96
- | Table_ToJson | Serialize a table with 5 columns and 10000 rows to json. | 1099 | 481 | 6833 |
97
- | Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json. | 261 | 2266 | 717334 |
98
- | Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json | 915 | 2459 | 28799 |
99
- | Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy | 97 | 87 | 1249 |
100
- | Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook | 621 | 379 | 9974 |
93
+ | Table_GetHashCode | From a table with 1 column and 10000 rows, retrieve the Hash Code | 0 ± 0 | 0 ± 1 | 91 ± 12 |
94
+ | Table_AddDistinctRows | Add 10000 distinct rows to a table with 4 columns. | 13 ± 2 | 14 ± 4 | 119 ± 12 |
95
+ | Table_AddIdenticalRows | Add 10000 identical rows to a table with 4 columns. | 6 ± 2 | 6 ± 1 | 104 ± 6 |
96
+ | Table_AddColumnsWithDistinctValues | Add 4 columns with 10000 distinct values each. | 8 ± 3 | 10 ± 1 | 53 ± 1 |
97
+ | Table_AddColumnsWithIdenticalValues | Add 4 columns with 10000 identical values each. | 5 ± 1 | 4 ± 0 | 47 ± 1 |
98
+ | Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. | 0 ± 0 | 2 ± 1 | 6 ± 4 |
99
+ | Table_ToJson | Serialize a table with 5 columns and 10000 rows to json, with 3 fixed and 2 variable columns. | 227 ± 64 | 68 ± 18 | 7851 ± 1411 |
100
+ | Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json, with 3 fixed and 2 variable columns. | 147 ± 15 | 2878 ± 135 | 6303 ± 1798 |
101
+ | Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json, with 3 fixed and 3 variable columns. | 330 ± 36 | 88 ± 9 | 12644 ± 550 |
102
+ | Assay_fromJson | Parse an assay with one table with 10000 rows and 6 columns from json, with 3 fixed and 3 variable columns. | 355 ± 66 | 61 ± 6 | 6499 ± 1068 |
103
+ | Assay_toISAJson | Parse an assay with one table with 10000 rows and 6 columns to json, with 3 fixed and 3 variable columns | 487 ± 36 | 959 ± 36 | 15618 ± 482 |
104
+ | Assay_fromISAJson | Parse an assay with one table with 10000 rows and 6 columns from json, with 3 fixed and 3 variable columns | 359 ± 29 | 706 ± 46 | 9587 ± 621 |
105
+ | Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy | 29 ± 14 | 62 ± 5 | 818 ± 36 |
106
+ | Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook | 240 ± 31 | 284 ± 24 | 3657 ± 199 |
107
+ | Investigation_FromWorkbook_ManyStudies | Parse a workbook with 1500 studies to an ArcInvestigation | 127 ± 20 | 498 ± 21 | 9469 ± 412 |
108
+ | ARC_ToROCrate | Parse an ARC with one assay with 10000 rows and 6 columns to a RO-Crate metadata file. | 1431 ± 99 | 3526 ± 264 | 61224 ± 728 |
@@ -33,6 +33,7 @@ const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
33
33
  const String_js_1 = require("@fable-org/fable-library-js/String.js");
34
34
  const Identifier_js_1 = require("./Core/Helper/Identifier.js");
35
35
  const Set_js_1 = require("@fable-org/fable-library-js/Set.js");
36
+ const Collections_js_1 = require("./Core/Helper/Collections.js");
36
37
  const DataMap_js_1 = require("./Core/DataMap.js");
37
38
  const FileSystemTree_js_1 = require("./FileSystem/FileSystemTree.js");
38
39
  const ARC_js_1 = require("./Contract/ARC.js");
@@ -50,7 +51,6 @@ const Datamap_js_1 = require("./Contract/Datamap.js");
50
51
  const ArcWorkflow_js_2 = require("./Contract/ArcWorkflow.js");
51
52
  const ArcRun_js_2 = require("./Contract/ArcRun.js");
52
53
  const Git_js_1 = require("./Contract/Git.js");
53
- const Collections_js_1 = require("./Core/Helper/Collections.js");
54
54
  const Map_js_1 = require("@fable-org/fable-library-js/Map.js");
55
55
  const Decode_fs_js_1 = require("./fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js");
56
56
  const ROCrateIO_js_1 = require("./ROCrateIO.js");
@@ -69,7 +69,7 @@ class ARC extends ArcTypes_js_1.ArcInvestigation {
69
69
  this._fs = ((fs_1 = (0, Option_js_1.defaultArg)(fs, FileSystem_js_1.FileSystem.create({
70
70
  tree: (0, FileSystemTree_js_1.FileSystemTree_Folder)("", []),
71
71
  })), ARCAux_updateFSByISA(this$.contents, fs_1)));
72
- this["init@89"] = 1;
72
+ this["init@90"] = 1;
73
73
  }
74
74
  get FileSystem() {
75
75
  const this$ = this;
@@ -303,12 +303,12 @@ class ARC extends ArcTypes_js_1.ArcInvestigation {
303
303
  }
304
304
  switch (matchResult) {
305
305
  case 0: {
306
- col_2.Cells.forEach((c) => {
306
+ (0, Collections_js_1.ResizeArray_iter)((c) => {
307
307
  if (c.AsData.FilePath != null) {
308
308
  const newFilePath = dataNameFunction(c.AsData);
309
309
  c.AsData.FilePath = newFilePath;
310
310
  }
311
- });
311
+ }, col_2.Cells);
312
312
  break;
313
313
  }
314
314
  case 1: {
@@ -329,19 +329,19 @@ class ARC extends ArcTypes_js_1.ArcInvestigation {
329
329
  }, (0, DataMap_js_1.DataMap__get_DataContexts)(dm));
330
330
  };
331
331
  (0, Seq_js_1.iterate)((s) => {
332
- const f = (d) => d.GetAbsolutePathForStudy(s.Identifier, checkExistenceFromRoot);
332
+ const f_1 = (d) => d.GetAbsolutePathForStudy(s.Identifier, checkExistenceFromRoot);
333
333
  const source_1 = s.Tables;
334
- (0, Seq_js_1.iterate)((0, Util_js_1.curry2)(updateTable)(f), source_1);
334
+ (0, Seq_js_1.iterate)((0, Util_js_1.curry2)(updateTable)(f_1), source_1);
335
335
  if (s.DataMap != null) {
336
- updateDataMap(f, (0, Option_js_1.value)(s.DataMap));
336
+ updateDataMap(f_1, (0, Option_js_1.value)(s.DataMap));
337
337
  }
338
338
  }, this$.Studies);
339
- (0, Seq_js_1.iterate)((a) => {
340
- const f_1 = (d_1) => d_1.GetAbsolutePathForAssay(a.Identifier, checkExistenceFromRoot);
341
- const source_3 = a.Tables;
342
- (0, Seq_js_1.iterate)((0, Util_js_1.curry2)(updateTable)(f_1), source_3);
343
- if (a.DataMap != null) {
344
- updateDataMap(f_1, (0, Option_js_1.value)(a.DataMap));
339
+ (0, Seq_js_1.iterate)((a_1) => {
340
+ const f_2 = (d_1) => d_1.GetAbsolutePathForAssay(a_1.Identifier, checkExistenceFromRoot);
341
+ const source_3 = a_1.Tables;
342
+ (0, Seq_js_1.iterate)((0, Util_js_1.curry2)(updateTable)(f_2), source_3);
343
+ if (a_1.DataMap != null) {
344
+ updateDataMap(f_2, (0, Option_js_1.value)(a_1.DataMap));
345
345
  }
346
346
  }, this$.Assays);
347
347
  }
@@ -397,7 +397,7 @@ class ARC extends ArcTypes_js_1.ArcInvestigation {
397
397
  const registeredStudy = (0, Option_js_1.value)(registeredStudyOpt);
398
398
  registeredStudy.UpdateReferenceByStudyFile(study, true);
399
399
  }
400
- const datamap = ARCAux_getAssayDataMapFromContracts(study.Identifier, contracts);
400
+ const datamap = ARCAux_getStudyDataMapFromContracts(study.Identifier, contracts);
401
401
  if (study.DataMap == null) {
402
402
  study.DataMap = datamap;
403
403
  }
@@ -679,9 +679,10 @@ class ARC extends ArcTypes_js_1.ArcInvestigation {
679
679
  }));
680
680
  }
681
681
  }
682
- GetGitInitContracts(branch, repositoryAddress, defaultGitignore) {
682
+ GetGitInitContracts(branch, repositoryAddress, defaultGitignore, defaultGitattributes) {
683
683
  const defaultGitignore_1 = (0, Option_js_1.defaultArg)(defaultGitignore, false);
684
- return (0, Seq_js_1.toArray)((0, Seq_js_1.delay)(() => (0, Seq_js_1.append)((0, Seq_js_1.singleton)((0, Git_js_1.Init_createInitContract_6DFDD678)((0, Option_js_1.unwrap)(branch))), (0, Seq_js_1.delay)(() => (0, Seq_js_1.append)((0, Seq_js_1.singleton)(Git_js_1.gitattributesContract), (0, Seq_js_1.delay)(() => (0, Seq_js_1.append)(defaultGitignore_1 ? (0, Seq_js_1.singleton)(Git_js_1.gitignoreContract) : (0, Seq_js_1.empty)(), (0, Seq_js_1.delay)(() => ((repositoryAddress != null) ? (0, Seq_js_1.singleton)((0, Git_js_1.Init_createAddRemoteContract_Z721C83C5)((0, Option_js_1.value)(repositoryAddress))) : (0, Seq_js_1.empty)())))))))));
684
+ const defaultGitattributes_1 = (0, Option_js_1.defaultArg)(defaultGitattributes, false);
685
+ return (0, Seq_js_1.toArray)((0, Seq_js_1.delay)(() => (0, Seq_js_1.append)((0, Seq_js_1.singleton)((0, Git_js_1.Init_createInitContract_6DFDD678)((0, Option_js_1.unwrap)(branch))), (0, Seq_js_1.delay)(() => (0, Seq_js_1.append)(defaultGitignore_1 ? (0, Seq_js_1.singleton)(Git_js_1.gitignoreContract) : (0, Seq_js_1.empty)(), (0, Seq_js_1.delay)(() => (0, Seq_js_1.append)(defaultGitattributes_1 ? (0, Seq_js_1.singleton)(Git_js_1.gitattributesContract) : (0, Seq_js_1.empty)(), (0, Seq_js_1.delay)(() => ((repositoryAddress != null) ? (0, Seq_js_1.singleton)((0, Git_js_1.Init_createAddRemoteContract_Z721C83C5)((0, Option_js_1.value)(repositoryAddress))) : (0, Seq_js_1.empty)())))))))));
685
686
  }
686
687
  static getCloneContract(remoteUrl, merge, branch, token, nolfs) {
687
688
  return (0, Git_js_1.Clone_createCloneContract_5000466F)(remoteUrl, (0, Option_js_1.unwrap)(merge), (0, Option_js_1.unwrap)(branch), (0, Option_js_1.unwrap)(token), (0, Option_js_1.unwrap)(nolfs));
@@ -930,7 +931,14 @@ function ARCAux_getRunDataMapFromContracts(runIdentifier, contracts) {
930
931
  return (0, Array_js_1.tryPick)((c) => (0, Datamap_js_1.ARCtrl_DataMap__DataMap_tryFromReadContractForRun_Static)(runIdentifier, c), contracts);
931
932
  }
932
933
  function ARCAux_getArcInvestigationFromContracts(contracts) {
933
- return (0, Array_js_1.exactlyOne)((0, Array_js_1.choose)(ArcInvestigation_js_1.ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, contracts));
934
+ const matchValue = (0, Array_js_1.choose)(ArcInvestigation_js_1.ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, contracts);
935
+ if (!(0, Array_js_1.equalsWith)(Util_js_1.equals, matchValue, (0, Util_js_1.defaultOf)()) && (matchValue.length === 1)) {
936
+ return (0, Array_js_1.item)(0, matchValue);
937
+ }
938
+ else {
939
+ const arg = matchValue.length | 0;
940
+ return (0, String_js_1.toFail)((0, String_js_1.printf)("Could not find investigation in contracts. Expected exactly one investigation, but found %d."))(arg);
941
+ }
934
942
  }
935
943
  function ARCAux_updateFSByISA(isa, fs) {
936
944
  let assaysFolder;
@@ -63,9 +63,9 @@ exports.ProcessConversion_processToRows_Z6839B9E8 = ProcessConversion_processToR
63
63
  exports.CompositeRow_toProtocol = CompositeRow_toProtocol;
64
64
  exports.ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8 = ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8;
65
65
  exports.ARCtrl_ArcTable__ArcTable_GetProtocols = ARCtrl_ArcTable__ArcTable_GetProtocols;
66
- exports.ARCtrl_ArcTable__ArcTable_GetProcesses = ARCtrl_ArcTable__ArcTable_GetProcesses;
66
+ exports.ARCtrl_ArcTable__ArcTable_GetProcesses_40457300 = ARCtrl_ArcTable__ArcTable_GetProcesses_40457300;
67
67
  exports.ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F = ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F;
68
- exports.ARCtrl_ArcTables__ArcTables_GetProcesses = ARCtrl_ArcTables__ArcTables_GetProcesses;
68
+ exports.ARCtrl_ArcTables__ArcTables_GetProcesses_40457300 = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300;
69
69
  exports.ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586 = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586;
70
70
  exports.DatamapConversion_$reflection = DatamapConversion_$reflection;
71
71
  exports.DatamapConversion_composeFragmentDescriptors_Z8923FA3 = DatamapConversion_composeFragmentDescriptors_Z8923FA3;
@@ -135,17 +135,15 @@ const DataContext_js_1 = require("./Core/DataContext.js");
135
135
  const Sample_js_1 = require("./ROCrate/Generic/Sample.js");
136
136
  const Regex_js_1 = require("./Core/Helper/Regex.js");
137
137
  const LabProtocol_js_1 = require("./ROCrate/Generic/LabProtocol.js");
138
- const MapUtil_js_1 = require("@fable-org/fable-library-js/MapUtil.js");
138
+ const ArcTableAux_js_1 = require("./Core/Table/ArcTableAux.js");
139
+ const ArcTable_js_1 = require("./Core/Table/ArcTable.js");
139
140
  const Person_js_1 = require("./ROCrate/Generic/Person.js");
140
141
  const Seq_js_1 = require("@fable-org/fable-library-js/Seq.js");
141
142
  const List_js_1 = require("@fable-org/fable-library-js/List.js");
142
143
  const LabProcess_js_1 = require("./ROCrate/Generic/LabProcess.js");
143
144
  const Seq2_js_1 = require("@fable-org/fable-library-js/Seq2.js");
144
145
  const Identifier_js_1 = require("./Core/Helper/Identifier.js");
145
- const ArcTable_js_1 = require("./Core/Table/ArcTable.js");
146
- const Array_js_1 = require("@fable-org/fable-library-js/Array.js");
147
146
  const Range_js_1 = require("@fable-org/fable-library-js/Range.js");
148
- const ArcTableAux_js_1 = require("./Core/Table/ArcTableAux.js");
149
147
  const ArcTables_js_1 = require("./Core/Table/ArcTables.js");
150
148
  const DataMap_js_1 = require("./Core/DataMap.js");
151
149
  const Organization_js_1 = require("./ROCrate/Generic/Organization.js");
@@ -717,8 +715,9 @@ function ProcessConversion_decomposeProcessName_Z721C83C5(name) {
717
715
  function ProcessConversion_tryComponentGetter(generalI, valueI, valueHeader) {
718
716
  if (valueHeader.tag === /* Component */ 0) {
719
717
  const oa = valueHeader.fields[0];
720
- return (matrix) => ((i) => {
721
- const c = BaseTypes_composeComponent(valueHeader, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]));
718
+ return (table) => ((i) => {
719
+ let matchValue;
720
+ const c = BaseTypes_composeComponent(valueHeader, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(valueHeader, undefined) : (0, Option_js_1.value)(matchValue)));
722
721
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(c, valueI);
723
722
  return c;
724
723
  });
@@ -733,8 +732,9 @@ function ProcessConversion_tryComponentGetter(generalI, valueI, valueHeader) {
733
732
  function ProcessConversion_tryParameterGetter(generalI, valueI, valueHeader) {
734
733
  if (valueHeader.tag === /* Parameter */ 3) {
735
734
  const oa = valueHeader.fields[0];
736
- return (matrix) => ((i) => {
737
- const p = BaseTypes_composeParameterValue(valueHeader, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]));
735
+ return (table) => ((i) => {
736
+ let matchValue;
737
+ const p = BaseTypes_composeParameterValue(valueHeader, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(valueHeader, undefined) : (0, Option_js_1.value)(matchValue)));
738
738
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(p, valueI);
739
739
  return p;
740
740
  });
@@ -749,8 +749,9 @@ function ProcessConversion_tryParameterGetter(generalI, valueI, valueHeader) {
749
749
  function ProcessConversion_tryFactorGetter(generalI, valueI, valueHeader) {
750
750
  if (valueHeader.tag === /* Factor */ 2) {
751
751
  const oa = valueHeader.fields[0];
752
- return (matrix) => ((i) => {
753
- const f = BaseTypes_composeFactorValue(valueHeader, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]));
752
+ return (table) => ((i) => {
753
+ let matchValue;
754
+ const f = BaseTypes_composeFactorValue(valueHeader, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(valueHeader, undefined) : (0, Option_js_1.value)(matchValue)));
754
755
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(f, valueI);
755
756
  return f;
756
757
  });
@@ -765,8 +766,9 @@ function ProcessConversion_tryFactorGetter(generalI, valueI, valueHeader) {
765
766
  function ProcessConversion_tryCharacteristicGetter(generalI, valueI, valueHeader) {
766
767
  if (valueHeader.tag === /* Characteristic */ 1) {
767
768
  const oa = valueHeader.fields[0];
768
- return (matrix) => ((i) => {
769
- const c = BaseTypes_composeCharacteristicValue(valueHeader, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]));
769
+ return (table) => ((i) => {
770
+ let matchValue;
771
+ const c = BaseTypes_composeCharacteristicValue(valueHeader, (matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (0, ArcTableAux_js_1.getEmptyCellForHeader)(valueHeader, undefined) : (0, Option_js_1.value)(matchValue)));
770
772
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(c, valueI);
771
773
  return c;
772
774
  });
@@ -780,7 +782,10 @@ function ProcessConversion_tryCharacteristicGetter(generalI, valueI, valueHeader
780
782
  */
781
783
  function ProcessConversion_tryGetProtocolTypeGetter(generalI, header) {
782
784
  if (header.tag === /* ProtocolType */ 4) {
783
- return (matrix) => ((i) => BaseTypes_composeDefinedTerm_ZDED3A0F((0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsTerm));
785
+ return (table) => ((i) => {
786
+ let matchValue, cell;
787
+ return BaseTypes_composeDefinedTerm_ZDED3A0F((matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (new OntologyAnnotation_js_1.OntologyAnnotation()) : ((cell = (0, Option_js_1.value)(matchValue), cell.AsTerm))));
788
+ });
784
789
  }
785
790
  else {
786
791
  return undefined;
@@ -791,7 +796,16 @@ function ProcessConversion_tryGetProtocolTypeGetter(generalI, header) {
791
796
  */
792
797
  function ProcessConversion_tryGetProtocolREFGetter(generalI, header) {
793
798
  if (header.tag === /* ProtocolREF */ 8) {
794
- return (matrix) => ((i) => (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsFreeText);
799
+ return (table) => ((i) => {
800
+ const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
801
+ if (matchValue == null) {
802
+ return "";
803
+ }
804
+ else {
805
+ const cell = (0, Option_js_1.value)(matchValue);
806
+ return cell.AsFreeText;
807
+ }
808
+ });
795
809
  }
796
810
  else {
797
811
  return undefined;
@@ -802,7 +816,16 @@ function ProcessConversion_tryGetProtocolREFGetter(generalI, header) {
802
816
  */
803
817
  function ProcessConversion_tryGetProtocolDescriptionGetter(generalI, header) {
804
818
  if (header.tag === /* ProtocolDescription */ 5) {
805
- return (matrix) => ((i) => (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsFreeText);
819
+ return (table) => ((i) => {
820
+ const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
821
+ if (matchValue == null) {
822
+ return "";
823
+ }
824
+ else {
825
+ const cell = (0, Option_js_1.value)(matchValue);
826
+ return cell.AsFreeText;
827
+ }
828
+ });
806
829
  }
807
830
  else {
808
831
  return undefined;
@@ -813,7 +836,16 @@ function ProcessConversion_tryGetProtocolDescriptionGetter(generalI, header) {
813
836
  */
814
837
  function ProcessConversion_tryGetProtocolURIGetter(generalI, header) {
815
838
  if (header.tag === /* ProtocolUri */ 6) {
816
- return (matrix) => ((i) => (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsFreeText);
839
+ return (table) => ((i) => {
840
+ const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
841
+ if (matchValue == null) {
842
+ return "";
843
+ }
844
+ else {
845
+ const cell = (0, Option_js_1.value)(matchValue);
846
+ return cell.AsFreeText;
847
+ }
848
+ });
817
849
  }
818
850
  else {
819
851
  return undefined;
@@ -824,7 +856,16 @@ function ProcessConversion_tryGetProtocolURIGetter(generalI, header) {
824
856
  */
825
857
  function ProcessConversion_tryGetProtocolVersionGetter(generalI, header) {
826
858
  if (header.tag === /* ProtocolVersion */ 7) {
827
- return (matrix) => ((i) => (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsFreeText);
859
+ return (table) => ((i) => {
860
+ const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
861
+ if (matchValue == null) {
862
+ return "";
863
+ }
864
+ else {
865
+ const cell = (0, Option_js_1.value)(matchValue);
866
+ return cell.AsFreeText;
867
+ }
868
+ });
828
869
  }
829
870
  else {
830
871
  return undefined;
@@ -836,7 +877,10 @@ function ProcessConversion_tryGetProtocolVersionGetter(generalI, header) {
836
877
  function ProcessConversion_tryGetInputGetter(generalI, header) {
837
878
  if (header.tag === /* Input */ 11) {
838
879
  const io = header.fields[0];
839
- return (matrix) => ((i) => BaseTypes_composeProcessInput(header, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i])));
880
+ return (table) => ((i) => {
881
+ let matchValue;
882
+ return BaseTypes_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)));
883
+ });
840
884
  }
841
885
  else {
842
886
  return undefined;
@@ -848,7 +892,10 @@ function ProcessConversion_tryGetInputGetter(generalI, header) {
848
892
  function ProcessConversion_tryGetOutputGetter(generalI, header) {
849
893
  if (header.tag === /* Output */ 12) {
850
894
  const io = header.fields[0];
851
- return (matrix) => ((i) => BaseTypes_composeProcessOutput(header, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i])));
895
+ return (table) => ((i) => {
896
+ let matchValue;
897
+ return BaseTypes_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)));
898
+ });
852
899
  }
853
900
  else {
854
901
  return undefined;
@@ -860,7 +907,10 @@ function ProcessConversion_tryGetOutputGetter(generalI, header) {
860
907
  function ProcessConversion_tryGetCommentGetter(generalI, header) {
861
908
  if (header.tag === /* Comment */ 14) {
862
909
  const c = header.fields[0];
863
- return (matrix) => ((i) => (0, Types_js_1.toString)(new Comment_js_2.Comment$(c, (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsFreeText)));
910
+ return (table) => ((i) => {
911
+ let matchValue, cell;
912
+ return (0, Types_js_1.toString)((matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values), (matchValue == null) ? (new Comment_js_2.Comment$(c)) : ((cell = (0, Option_js_1.value)(matchValue), new Comment_js_2.Comment$(c, cell.AsFreeText)))));
913
+ });
864
914
  }
865
915
  else {
866
916
  return undefined;
@@ -868,8 +918,16 @@ function ProcessConversion_tryGetCommentGetter(generalI, header) {
868
918
  }
869
919
  function ProcessConversion_tryGetPerformerGetter(generalI, header) {
870
920
  if (header.tag === /* Performer */ 9) {
871
- return (matrix) => ((i) => {
872
- const performer = (0, MapUtil_js_1.getItemFromDict)(matrix, [generalI, i]).AsFreeText;
921
+ return (table) => ((i) => {
922
+ let performer;
923
+ const matchValue = (0, ArcTableAux_js_1.Unchecked_tryGetCellAt)(generalI, i, table.Values);
924
+ if (matchValue == null) {
925
+ performer = "";
926
+ }
927
+ else {
928
+ const cell = (0, Option_js_1.value)(matchValue);
929
+ performer = cell.AsFreeText;
930
+ }
873
931
  return Person_js_1.LDPerson.create(performer);
874
932
  });
875
933
  }
@@ -880,7 +938,7 @@ function ProcessConversion_tryGetPerformerGetter(generalI, header) {
880
938
  /**
881
939
  * Given the header sequence of an ArcTable, returns a function for parsing each row of the table to a process
882
940
  */
883
- function ProcessConversion_getProcessGetter(processNameRoot, headers) {
941
+ function ProcessConversion_getProcessGetter(assayName, studyName, processNameRoot, headers) {
884
942
  const headers_1 = (0, Seq_js_1.indexed)(headers);
885
943
  const valueHeaders = (0, Seq_js_1.toList)((0, Seq_js_1.indexed)((0, Seq_js_1.filter)((arg) => arg[1].IsCvParamColumn, headers_1)));
886
944
  const charGetters = (0, List_js_1.choose)((tupledArg) => {
@@ -909,20 +967,20 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
909
967
  let inputGetter_1;
910
968
  const matchValue = (0, Seq_js_1.tryPick)((tupledArg_11) => ProcessConversion_tryGetInputGetter(tupledArg_11[0], tupledArg_11[1]), headers_1);
911
969
  if (matchValue == null) {
912
- inputGetter_1 = (((0, List_js_1.length)(charGetters) !== 0) ? ((matrix_1) => ((i_1) => {
970
+ inputGetter_1 = (((0, List_js_1.length)(charGetters) !== 0) ? ((table_1) => ((i_1) => {
913
971
  let chars_1;
914
- const collection_1 = (0, Seq_js_1.map)((f_1) => f_1(matrix_1)(i_1), charGetters);
972
+ const collection_1 = (0, Seq_js_1.map)((f_1) => f_1(table_1)(i_1), charGetters);
915
973
  chars_1 = Array.from(collection_1);
916
974
  return (0, Collections_js_1.ResizeArray_singleton)(Sample_js_1.LDSample.createSample(`${processNameRoot}_Input_${i_1}`, undefined, chars_1));
917
- })) : ((matrix_2) => ((i_2) => [])));
975
+ })) : ((table_2) => ((i_2) => [])));
918
976
  }
919
977
  else {
920
978
  const inputGetter = (0, Option_js_1.value)(matchValue);
921
- inputGetter_1 = ((matrix) => ((i) => {
979
+ inputGetter_1 = ((table) => ((i) => {
922
980
  let chars;
923
- const collection = (0, Seq_js_1.map)((f) => f(matrix)(i), charGetters);
981
+ const collection = (0, Seq_js_1.map)((f) => f(table)(i), charGetters);
924
982
  chars = Array.from(collection);
925
- const input = inputGetter(matrix)(i);
983
+ const input = inputGetter(table)(i);
926
984
  if (chars.length > 0) {
927
985
  Sample_js_1.LDSample.setAdditionalProperties(input, chars);
928
986
  }
@@ -932,41 +990,40 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
932
990
  let outputGetter_1;
933
991
  const matchValue_1 = (0, Seq_js_1.tryPick)((tupledArg_12) => ProcessConversion_tryGetOutputGetter(tupledArg_12[0], tupledArg_12[1]), headers_1);
934
992
  if (matchValue_1 == null) {
935
- outputGetter_1 = (((0, List_js_1.length)(factorValueGetters) !== 0) ? ((matrix_4) => ((i_4) => {
993
+ outputGetter_1 = (((0, List_js_1.length)(factorValueGetters) !== 0) ? ((table_4) => ((i_4) => {
936
994
  let factors_1;
937
- const collection_3 = (0, Seq_js_1.map)((f_3) => f_3(matrix_4)(i_4), factorValueGetters);
995
+ const collection_3 = (0, Seq_js_1.map)((f_3) => f_3(table_4)(i_4), factorValueGetters);
938
996
  factors_1 = Array.from(collection_3);
939
997
  return (0, Collections_js_1.ResizeArray_singleton)(Sample_js_1.LDSample.createSample(`${processNameRoot}_Output_${i_4}`, undefined, factors_1));
940
- })) : ((matrix_5) => ((i_5) => [])));
998
+ })) : ((table_5) => ((i_5) => [])));
941
999
  }
942
1000
  else {
943
1001
  const outputGetter = (0, Option_js_1.value)(matchValue_1);
944
- outputGetter_1 = ((matrix_3) => ((i_3) => {
1002
+ outputGetter_1 = ((table_3) => ((i_3) => {
945
1003
  let factors;
946
- const collection_2 = (0, Seq_js_1.map)((f_2) => f_2(matrix_3)(i_3), factorValueGetters);
1004
+ const collection_2 = (0, Seq_js_1.map)((f_2) => f_2(table_3)(i_3), factorValueGetters);
947
1005
  factors = Array.from(collection_2);
948
- const output = outputGetter(matrix_3)(i_3);
1006
+ const output = outputGetter(table_3)(i_3);
949
1007
  if (factors.length > 0) {
950
1008
  Sample_js_1.LDSample.setAdditionalProperties(output, factors);
951
1009
  }
952
1010
  return (0, Collections_js_1.ResizeArray_singleton)(output);
953
1011
  }));
954
1012
  }
955
- return (matrix_6) => ((i_6) => {
956
- const pn = ((1 + (0, Seq_js_1.max)((0, Seq_js_1.map)((tuple_1) => tuple_1[1], matrix_6.keys()), {
957
- Compare: Util_js_1.comparePrimitives,
958
- })) === 1) ? processNameRoot : ProcessConversion_composeProcessName(processNameRoot, i_6);
959
- const paramvalues = (0, Option_js_1.map)((collection_4) => Array.from(collection_4), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_4) => f_4(matrix_6)(i_6), parameterValueGetters)));
960
- const comments = (0, Option_js_1.map)((collection_5) => Array.from(collection_5), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_5) => f_5(matrix_6)(i_6), commentGetters)));
961
- const components = (0, Option_js_1.map)((collection_6) => Array.from(collection_6), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_6) => f_6(matrix_6)(i_6), componentGetters)));
1013
+ return (table_6) => ((i_6) => {
1014
+ const pn = (table_6.RowCount === 1) ? processNameRoot : ProcessConversion_composeProcessName(processNameRoot, i_6);
1015
+ const paramvalues = (0, Option_js_1.map)((collection_4) => Array.from(collection_4), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_4) => f_4(table_6)(i_6), parameterValueGetters)));
1016
+ const comments = (0, Option_js_1.map)((collection_5) => Array.from(collection_5), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_5) => f_5(table_6)(i_6), commentGetters)));
1017
+ const components = (0, Option_js_1.map)((collection_6) => Array.from(collection_6), (0, Collections_js_1.Option_fromValueWithDefault)((0, List_js_1.empty)(), (0, List_js_1.map)((f_6) => f_6(table_6)(i_6), componentGetters)));
1018
+ const id = LabProcess_js_1.LDLabProcess.genId(processNameRoot, (0, Option_js_1.unwrap)(assayName), (0, Option_js_1.unwrap)(studyName)) + (`_${i_6}`);
962
1019
  let protocol;
963
- const name = (0, Option_js_1.map)((f_7) => f_7(matrix_6)(i_6), protocolREFGetter);
1020
+ const name = (0, Option_js_1.map)((f_7) => f_7(table_6)(i_6), protocolREFGetter);
964
1021
  const protocolId = LabProtocol_js_1.LDLabProtocol.genId((0, Option_js_1.unwrap)(name), processNameRoot);
965
- protocol = LabProtocol_js_1.LDLabProtocol.create(protocolId, (0, Option_js_1.unwrap)(name), (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_8) => f_8(matrix_6)(i_6), protocolDescriptionGetter)), (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_9) => f_9(matrix_6)(i_6), protocolTypeGetter)), undefined, undefined, (0, Option_js_1.unwrap)(components), undefined, (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_10) => f_10(matrix_6)(i_6), protocolURIGetter)), (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_11) => f_11(matrix_6)(i_6), protocolVersionGetter)));
966
- const matchValue_2 = inputGetter_1(matrix_6)(i_6);
967
- const matchValue_3 = outputGetter_1(matrix_6)(i_6);
968
- const agent = (0, Option_js_1.map)((f_12) => f_12(matrix_6)(i_6), performerGetter);
969
- return LabProcess_js_1.LDLabProcess.create(pn, matchValue_2, matchValue_3, undefined, (0, Option_js_1.unwrap)(agent), (0, Option_js_1.unwrap)(protocol), (0, Option_js_1.unwrap)(paramvalues), undefined, (0, Option_js_1.unwrap)(comments));
1022
+ protocol = LabProtocol_js_1.LDLabProtocol.create(protocolId, (0, Option_js_1.unwrap)(name), (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_8) => f_8(table_6)(i_6), protocolDescriptionGetter)), (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_9) => f_9(table_6)(i_6), protocolTypeGetter)), undefined, undefined, (0, Option_js_1.unwrap)(components), undefined, (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_10) => f_10(table_6)(i_6), protocolURIGetter)), (0, Option_js_1.unwrap)((0, Option_js_1.map)((f_11) => f_11(table_6)(i_6), protocolVersionGetter)));
1023
+ const matchValue_2 = inputGetter_1(table_6)(i_6);
1024
+ const matchValue_3 = outputGetter_1(table_6)(i_6);
1025
+ const agent = (0, Option_js_1.map)((f_12) => f_12(table_6)(i_6), performerGetter);
1026
+ return LabProcess_js_1.LDLabProcess.create(pn, matchValue_2, matchValue_3, id, (0, Option_js_1.unwrap)(agent), (0, Option_js_1.unwrap)(protocol), (0, Option_js_1.unwrap)(paramvalues), undefined, (0, Option_js_1.unwrap)(comments));
970
1027
  });
971
1028
  }
972
1029
  /**
@@ -978,36 +1035,28 @@ function ProcessConversion_getProcessGetter(processNameRoot, headers) {
978
1035
  */
979
1036
  function ProcessConversion_groupProcesses_Z27F0B586(processes, graph, context) {
980
1037
  return (0, Seq2_js_1.List_groupBy)((p) => {
981
- let protocol, name_1, name_2, protocol_1;
1038
+ let protocol, protocol_1;
982
1039
  const matchValue = LabProcess_js_1.LDLabProcess.tryGetNameAsString(p, (0, Option_js_1.unwrap)(context));
983
1040
  const matchValue_1 = LabProcess_js_1.LDLabProcess.tryGetExecutesLabProtocol(p, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context));
984
- let matchResult, name_3, protocol_2, name_4, name_5, protocol_3;
1041
+ let matchResult, name_1, protocol_2, name_2, protocol_3;
985
1042
  if (matchValue != null) {
986
1043
  if (ProcessConversion_decomposeProcessName_Z721C83C5((0, Option_js_1.value)(matchValue))[1] != null) {
987
1044
  matchResult = 0;
988
- name_3 = (0, Option_js_1.value)(matchValue);
1045
+ name_1 = (0, Option_js_1.value)(matchValue);
989
1046
  }
990
1047
  else if (matchValue_1 != null) {
991
1048
  if ((protocol = (0, Option_js_1.value)(matchValue_1), LabProtocol_js_1.LDLabProtocol.tryGetNameAsString(protocol, (0, Option_js_1.unwrap)(context)) != null)) {
992
1049
  matchResult = 1;
993
1050
  protocol_2 = (0, Option_js_1.value)(matchValue_1);
994
1051
  }
995
- else if ((name_1 = (0, Option_js_1.value)(matchValue), name_1.indexOf("_") >= 0)) {
996
- matchResult = 2;
997
- name_4 = (0, Option_js_1.value)(matchValue);
998
- }
999
1052
  else {
1000
- matchResult = 3;
1001
- name_5 = (0, Option_js_1.value)(matchValue);
1053
+ matchResult = 2;
1054
+ name_2 = (0, Option_js_1.value)(matchValue);
1002
1055
  }
1003
1056
  }
1004
- else if ((name_2 = (0, Option_js_1.value)(matchValue), name_2.indexOf("_") >= 0)) {
1005
- matchResult = 2;
1006
- name_4 = (0, Option_js_1.value)(matchValue);
1007
- }
1008
1057
  else {
1009
- matchResult = 3;
1010
- name_5 = (0, Option_js_1.value)(matchValue);
1058
+ matchResult = 2;
1059
+ name_2 = (0, Option_js_1.value)(matchValue);
1011
1060
  }
1012
1061
  }
1013
1062
  else if (matchValue_1 != null) {
@@ -1016,23 +1065,21 @@ function ProcessConversion_groupProcesses_Z27F0B586(processes, graph, context) {
1016
1065
  protocol_2 = (0, Option_js_1.value)(matchValue_1);
1017
1066
  }
1018
1067
  else {
1019
- matchResult = 4;
1068
+ matchResult = 3;
1020
1069
  protocol_3 = (0, Option_js_1.value)(matchValue_1);
1021
1070
  }
1022
1071
  }
1023
1072
  else {
1024
- matchResult = 5;
1073
+ matchResult = 4;
1025
1074
  }
1026
1075
  switch (matchResult) {
1027
1076
  case 0:
1028
- return ProcessConversion_decomposeProcessName_Z721C83C5(name_3)[0];
1077
+ return ProcessConversion_decomposeProcessName_Z721C83C5(name_1)[0];
1029
1078
  case 1:
1030
1079
  return (0, Option_js_1.defaultArg)(LabProtocol_js_1.LDLabProtocol.tryGetNameAsString(protocol_2, (0, Option_js_1.unwrap)(context)), "");
1031
1080
  case 2:
1032
- return (0, String_js_1.remove)(name_4, name_4.lastIndexOf("_"));
1081
+ return name_2;
1033
1082
  case 3:
1034
- return name_5;
1035
- case 4:
1036
1083
  return protocol_3.Id;
1037
1084
  default:
1038
1085
  return (0, Identifier_js_1.createMissingIdentifier)();
@@ -1239,25 +1286,25 @@ function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8(p, graph, conte
1239
1286
  while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
1240
1287
  const c = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
1241
1288
  const patternInput = BaseTypes_decomposeComponent_Z2F770004(c, (0, Option_js_1.unwrap)(context));
1242
- t.AddColumn(patternInput[0], (0, Array_js_1.singleton)(patternInput[1]), (0, Option_js_1.unwrap)(ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(c)));
1289
+ t.AddColumn(patternInput[0], (0, Collections_js_1.ResizeArray_singleton)(patternInput[1]), (0, Option_js_1.unwrap)(ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(c)));
1243
1290
  }
1244
1291
  }
1245
1292
  finally {
1246
1293
  (0, Util_js_1.disposeSafe)(enumerator);
1247
1294
  }
1248
1295
  (0, Option_js_1.map)((d) => {
1249
- t.AddProtocolDescriptionColumn([d]);
1296
+ t.AddProtocolDescriptionColumn((0, Collections_js_1.ResizeArray_singleton)(d));
1250
1297
  }, LabProtocol_js_1.LDLabProtocol.tryGetDescriptionAsString(p, (0, Option_js_1.unwrap)(context)));
1251
1298
  (0, Option_js_1.map)((d_1) => {
1252
- t.AddProtocolVersionColumn([d_1]);
1299
+ t.AddProtocolVersionColumn((0, Collections_js_1.ResizeArray_singleton)(d_1));
1253
1300
  }, LabProtocol_js_1.LDLabProtocol.tryGetVersionAsString(p, (0, Option_js_1.unwrap)(context)));
1254
1301
  (0, Option_js_1.map)((d_2) => {
1255
- t.AddProtocolTypeColumn([d_2]);
1302
+ t.AddProtocolTypeColumn((0, Collections_js_1.ResizeArray_singleton)(d_2));
1256
1303
  }, ProcessConversion_tryGetProtocolType_Z6839B9E8(p, undefined, (0, Option_js_1.unwrap)(context)));
1257
1304
  (0, Option_js_1.map)((d_3) => {
1258
- t.AddProtocolUriColumn([d_3]);
1305
+ t.AddProtocolUriColumn((0, Collections_js_1.ResizeArray_singleton)(d_3));
1259
1306
  }, LabProtocol_js_1.LDLabProtocol.tryGetUrl(p, (0, Option_js_1.unwrap)(context)));
1260
- t.AddProtocolNameColumn([name]);
1307
+ t.AddProtocolNameColumn((0, Collections_js_1.ResizeArray_singleton)(name));
1261
1308
  return t;
1262
1309
  }
1263
1310
  /**
@@ -1292,13 +1339,13 @@ function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
1292
1339
  /**
1293
1340
  * Returns the list of processes specidified in this ArcTable
1294
1341
  */
1295
- function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
1342
+ function ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(this$, assayName, studyName) {
1296
1343
  if (this$.RowCount === 0) {
1297
1344
  return (0, List_js_1.singleton)(LabProcess_js_1.LDLabProcess.create(this$.Name));
1298
1345
  }
1299
1346
  else {
1300
- const getter = ProcessConversion_getProcessGetter(this$.Name, this$.Headers);
1301
- return (0, Seq_js_1.toList)((0, Seq_js_1.delay)(() => (0, Seq_js_1.map)((i) => getter(this$.Values)(i), (0, Range_js_1.rangeDouble)(0, 1, this$.RowCount - 1))));
1347
+ const getter = ProcessConversion_getProcessGetter(assayName, studyName, this$.Name, this$.Headers);
1348
+ return (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))));
1302
1349
  }
1303
1350
  }
1304
1351
  /**
@@ -1310,13 +1357,13 @@ function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
1310
1357
  */
1311
1358
  function ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F(name, ps, graph, context) {
1312
1359
  const tupledArg = (0, ArcTableAux_js_1.Unchecked_alignByHeaders)(true, (0, List_js_1.collect)((p) => (0, List_js_1.ofSeq)(ProcessConversion_processToRows_Z6839B9E8(p, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context))), ps));
1313
- return ArcTable_js_1.ArcTable.create(name, tupledArg[0], tupledArg[1]);
1360
+ return ArcTable_js_1.ArcTable.fromArcTableValues(name, tupledArg[0], tupledArg[1]);
1314
1361
  }
1315
1362
  /**
1316
1363
  * Return a list of all the processes in all the tables.
1317
1364
  */
1318
- function ARCtrl_ArcTables__ArcTables_GetProcesses(this$) {
1319
- return (0, List_js_1.collect)(ARCtrl_ArcTable__ArcTable_GetProcesses, (0, Seq_js_1.toList)(this$.Tables));
1365
+ function ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(this$, assayName, studyName) {
1366
+ return (0, List_js_1.collect)((t) => ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(t, (0, Option_js_1.unwrap)(assayName), (0, Option_js_1.unwrap)(studyName)), (0, Seq_js_1.toList)(this$.Tables));
1320
1367
  }
1321
1368
  /**
1322
1369
  * Create a collection of tables from a list of processes.
@@ -1329,7 +1376,7 @@ function ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586(ps, graph, c
1329
1376
  let collection;
1330
1377
  return new ArcTables_js_1.ArcTables((collection = (0, List_js_1.map)((tupledArg) => {
1331
1378
  const tupledArg_1 = (0, ArcTableAux_js_1.Unchecked_alignByHeaders)(true, (0, List_js_1.collect)((p) => (0, List_js_1.ofSeq)(ProcessConversion_processToRows_Z6839B9E8(p, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context))), tupledArg[1]));
1332
- return ArcTable_js_1.ArcTable.create(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
1379
+ return ArcTable_js_1.ArcTable.fromArcTableValues(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
1333
1380
  }, ProcessConversion_groupProcesses_Z27F0B586(ps, (0, Option_js_1.unwrap)(graph), (0, Option_js_1.unwrap)(context))), Array.from(collection)));
1334
1381
  }
1335
1382
  class DatamapConversion {
@@ -1570,7 +1617,7 @@ function AssayConversion_composeAssay_1501C0F8(assay) {
1570
1617
  const measurementTechnique = (0, Option_js_1.map)(BaseTypes_composeDefinedTerm_ZDED3A0F, assay.TechnologyPlatform);
1571
1618
  const variableMeasured = (0, Option_js_1.map)(BaseTypes_composePropertyValueFromOA_ZDED3A0F, assay.MeasurementType);
1572
1619
  const creators = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(PersonConversion_composePerson_Z64D846DC, assay.Performers));
1573
- const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses(new ArcTables_js_1.ArcTables(assay.Tables)), Array.from(collection)));
1620
+ const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(new ArcTables_js_1.ArcTables(assay.Tables), assay.Identifier), Array.from(collection)));
1574
1621
  const fragmentDescriptors = (0, Option_js_1.map)(DatamapConversion_composeFragmentDescriptors_Z8923FA3, assay.DataMap);
1575
1622
  const dataFiles = (0, Option_js_1.map)((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, (0, Option_js_1.unwrap)(fragmentDescriptors)), processSequence);
1576
1623
  const variableMeasureds = (variableMeasured == null) ? ((fragmentDescriptors == null) ? undefined : ((fds_1 = (0, Option_js_1.value)(fragmentDescriptors), fds_1))) : ((fragmentDescriptors == null) ? ((vm_1 = (0, Option_js_1.value)(variableMeasured), (0, Collections_js_1.ResizeArray_singleton)(vm_1))) : ((fds = (0, Option_js_1.value)(fragmentDescriptors), (vm = (0, Option_js_1.value)(variableMeasured), (0, Collections_js_1.ResizeArray_appendSingleton)(vm, fds)))));
@@ -1604,7 +1651,7 @@ function StudyConversion_composeStudy_1680536E(study) {
1604
1651
  const dateModified = (0, Date_js_1.now)();
1605
1652
  const publications = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(ScholarlyArticleConversion_composeScholarlyArticle_D324A6D, study.Publications));
1606
1653
  const creators = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(PersonConversion_composePerson_Z64D846DC, study.Contacts));
1607
- const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses(new ArcTables_js_1.ArcTables(study.Tables)), Array.from(collection)));
1654
+ const processSequence = (0, Collections_js_1.Option_fromSeq)((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(new ArcTables_js_1.ArcTables(study.Tables), undefined, study.Identifier), Array.from(collection)));
1608
1655
  const fragmentDescriptors = (0, Option_js_1.map)(DatamapConversion_composeFragmentDescriptors_Z8923FA3, study.DataMap);
1609
1656
  const dataFiles = (0, Option_js_1.map)((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, (0, Option_js_1.unwrap)(fragmentDescriptors)), processSequence);
1610
1657
  const comments = (0, Collections_js_1.Option_fromSeq)((0, Collections_js_1.ResizeArray_map)(BaseTypes_composeComment_Z13201A7E, study.Comments));