@nfdi4plants/arctrl 2.0.0-alpha.2 → 2.0.0-alpha.4

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 (115) hide show
  1. package/ARC.js +110 -15
  2. package/Contract/ARC.js +9 -1
  3. package/Contract/Datamap.js +180 -0
  4. package/Core/ArcTypes.js +148 -121
  5. package/Core/Conversion.js +99 -67
  6. package/Core/Data.js +119 -0
  7. package/Core/{Process/DataFile.js → DataFile.js} +3 -3
  8. package/Core/Helper/Identifier.js +40 -0
  9. package/Core/OntologyAnnotation.js +14 -4
  10. package/Core/Process/ColumnIndex.js +13 -3
  11. package/Core/Process/ProcessInput.js +5 -5
  12. package/Core/Process/ProcessOutput.js +5 -5
  13. package/Core/Process/Value.js +1 -1
  14. package/Core/Table/ArcTableAux.js +14 -3
  15. package/Core/Table/CompositeCell.js +67 -10
  16. package/Core/Table/CompositeColumn.js +9 -0
  17. package/Core/Table/CompositeHeader.js +58 -68
  18. package/Core/Table/DataMap.js +166 -0
  19. package/FileSystem/FileSystemTree.js +18 -4
  20. package/Json/Assay.js +4 -4
  21. package/Json/Process/Data.js +56 -18
  22. package/Json/Process/DataFile.js +5 -5
  23. package/Json/Process/PropertyValue.js +126 -5
  24. package/Json/Study.js +6 -6
  25. package/Json/Table/CompositeCell.js +7 -6
  26. package/Spreadsheet/AnnotationTable/ArcTable.js +9 -13
  27. package/Spreadsheet/AnnotationTable/CompositeCell.js +32 -50
  28. package/Spreadsheet/AnnotationTable/CompositeColumn.js +16 -10
  29. package/Spreadsheet/AnnotationTable/CompositeHeader.js +262 -143
  30. package/Spreadsheet/ArcAssay.js +2 -2
  31. package/Spreadsheet/ArcInvestigation.js +2 -2
  32. package/Spreadsheet/ArcStudy.js +2 -2
  33. package/Spreadsheet/DataMap.js +31 -0
  34. package/Spreadsheet/DataMapTable/DataMapColumn.js +36 -0
  35. package/Spreadsheet/DataMapTable/DataMapHeader.js +417 -0
  36. package/Spreadsheet/DataMapTable/DataMapTable.js +98 -0
  37. package/Spreadsheet/Metadata/Assays.js +2 -2
  38. package/Spreadsheet/Metadata/SparseTable.js +7 -7
  39. package/Spreadsheet/Metadata/Study.js +1 -1
  40. package/Spreadsheet/Template.js +2 -2
  41. package/Xlsx.js +29 -6
  42. package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsSpreadsheet.fableproj +9 -3
  43. package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs +1 -0
  44. package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +23 -0
  45. package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +21 -0
  46. package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +23 -0
  47. package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +19 -0
  48. package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs +24 -0
  49. package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs.js +15 -0
  50. package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs +70 -0
  51. package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs.js +48 -0
  52. package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +20 -0
  53. package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +21 -0
  54. package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +49 -0
  55. package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +44 -0
  56. package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  57. package/fable_modules/project_cracked.json +1 -1
  58. package/package.json +1 -1
  59. package/Core/Process/Data.js +0 -55
  60. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs +0 -0
  61. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs.js +0 -0
  62. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs +0 -0
  63. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs.js +0 -0
  64. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs +0 -0
  65. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs.js +0 -0
  66. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs +0 -0
  67. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs.js +0 -0
  68. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs +0 -0
  69. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs.js +0 -0
  70. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs +0 -0
  71. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs.js +0 -0
  72. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs +0 -0
  73. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs.js +0 -0
  74. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs +0 -0
  75. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs.js +0 -0
  76. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs +0 -0
  77. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs.js +0 -0
  78. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs +0 -0
  79. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs.js +0 -0
  80. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs +0 -0
  81. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs.js +0 -0
  82. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs +0 -0
  83. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs.js +0 -0
  84. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs +0 -0
  85. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs.js +0 -0
  86. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs +0 -0
  87. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs.js +0 -0
  88. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs +0 -0
  89. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs.js +0 -0
  90. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs +0 -0
  91. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs.js +0 -0
  92. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs +0 -0
  93. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs.js +0 -0
  94. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs.js +0 -0
  95. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs +0 -0
  96. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs.js +0 -0
  97. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs +0 -0
  98. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs.js +0 -0
  99. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs +0 -0
  100. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs.js +0 -0
  101. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs +0 -0
  102. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs.js +0 -0
  103. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs +0 -0
  104. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs.js +0 -0
  105. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs +0 -0
  106. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs.js +0 -0
  107. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs +0 -0
  108. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs.js +0 -0
  109. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs +0 -0
  110. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs.js +0 -0
  111. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs +0 -0
  112. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs.js +0 -0
  113. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  114. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  115. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
@@ -1,9 +1,11 @@
1
1
  import { printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
2
- import { singleton, tail, head, isEmpty, map } from "../../fable_modules/fable-library-js.4.16.0/List.js";
2
+ import { singleton, ofArray, tryFindIndex, tail, head, isEmpty, map } from "../../fable_modules/fable-library-js.4.16.0/List.js";
3
3
  import { OntologyAnnotation } from "../../Core/OntologyAnnotation.js";
4
- import { ActivePatterns_$007COutputColumnHeader$007C_$007C, ActivePatterns_$007CInputColumnHeader$007C_$007C, tryParseComponentColumnHeader, tryParseCharacteristicColumnHeader, tryParseFactorColumnHeader, tryParseParameterColumnHeader, ActivePatterns_$007CUnitColumnHeader$007C_$007C, ActivePatterns_$007CTANColumnHeader$007C_$007C, ActivePatterns_$007CTSRColumnHeader$007C_$007C } from "../../Core/Helper/Regex.js";
4
+ import { freeTextFromFsCells, dataFromFsCells, unitizedFromFsCells, termFromFsCells } from "./CompositeCell.js";
5
+ import { ActivePatterns_$007COutputColumnHeader$007C_$007C, ActivePatterns_$007CInputColumnHeader$007C_$007C, tryParseComponentColumnHeader, tryParseCharacteristicColumnHeader, tryParseFactorColumnHeader, tryParseParameterColumnHeader, ActivePatterns_$007CTSRColumnHeader$007C_$007C, ActivePatterns_$007CTANColumnHeader$007C_$007C, ActivePatterns_$007CUnitColumnHeader$007C_$007C } from "../../Core/Helper/Regex.js";
5
6
  import { IOType, CompositeHeader } from "../../Core/Table/CompositeHeader.js";
6
- import { FsCell } from "../../fable_modules/FsSpreadsheet.5.1.3/Cells/FsCell.fs.js";
7
+ import { map as map_1 } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
8
+ import { FsCell } from "../../fable_modules/FsSpreadsheet.6.1.2/Cells/FsCell.fs.js";
7
9
  import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
8
10
  import { empty, singleton as singleton_1, append, delay, toList } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
9
11
 
@@ -44,7 +46,7 @@ export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
44
46
  }
45
47
  switch (matchResult) {
46
48
  case 0:
47
- return f(OntologyAnnotation.create(name));
49
+ return [f(OntologyAnnotation.create(name)), (cells_1) => termFromFsCells(void 0, void 0, cells_1)];
48
50
  default: {
49
51
  let matchResult_1, name_1, term1, term2;
50
52
  if (!isEmpty(cellValues)) {
@@ -56,134 +58,219 @@ export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
56
58
  if (!isEmpty(tail(tail(cellValues)))) {
57
59
  const activePatternResult_3 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(cellValues))));
58
60
  if (activePatternResult_3 != null) {
59
- if (!isEmpty(tail(tail(tail(cellValues))))) {
60
- const activePatternResult_4 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(tail(cellValues)))));
61
- if (activePatternResult_4 != null) {
62
- if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
63
- const activePatternResult_5 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(cellValues))));
64
- if (activePatternResult_5 != null) {
65
- if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(head(tail(cellValues))) != null) {
66
- matchResult_1 = 0;
67
- name_1 = activePatternResult_1;
68
- term1 = activePatternResult_5;
69
- term2 = activePatternResult_4;
70
- }
71
- else {
72
- matchResult_1 = 1;
73
- }
74
- }
75
- else {
76
- matchResult_1 = 1;
77
- }
61
+ if (isEmpty(tail(tail(tail(cellValues))))) {
62
+ matchResult_1 = 0;
63
+ name_1 = activePatternResult_1;
64
+ term1 = activePatternResult_2;
65
+ term2 = activePatternResult_3;
66
+ }
67
+ else {
68
+ matchResult_1 = 1;
69
+ }
70
+ }
71
+ else {
72
+ matchResult_1 = 1;
73
+ }
74
+ }
75
+ else {
76
+ matchResult_1 = 1;
77
+ }
78
+ }
79
+ else {
80
+ matchResult_1 = 1;
81
+ }
82
+ }
83
+ else {
84
+ matchResult_1 = 1;
85
+ }
86
+ }
87
+ else {
88
+ matchResult_1 = 1;
89
+ }
90
+ }
91
+ else {
92
+ matchResult_1 = 1;
93
+ }
94
+ switch (matchResult_1) {
95
+ case 0: {
96
+ const term = ActivePattern_mergeIDInfo(term1.IDSpace, term1.LocalID, term2.IDSpace, term2.LocalID);
97
+ return [f(OntologyAnnotation.create(name_1, term.TermSourceRef, term.TermAccessionNumber)), (cells_2) => termFromFsCells(1, 2, cells_2)];
98
+ }
99
+ default: {
100
+ let matchResult_2, name_2, term1_1, term2_1;
101
+ if (!isEmpty(cellValues)) {
102
+ const activePatternResult_4 = $007CAC$007C_$007C(head(cellValues));
103
+ if (activePatternResult_4 != null) {
104
+ if (!isEmpty(tail(cellValues))) {
105
+ const activePatternResult_5 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(cellValues)));
106
+ if (activePatternResult_5 != null) {
107
+ if (!isEmpty(tail(tail(cellValues)))) {
108
+ const activePatternResult_6 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(cellValues))));
109
+ if (activePatternResult_6 != null) {
110
+ if (isEmpty(tail(tail(tail(cellValues))))) {
111
+ matchResult_2 = 0;
112
+ name_2 = activePatternResult_4;
113
+ term1_1 = activePatternResult_6;
114
+ term2_1 = activePatternResult_5;
78
115
  }
79
116
  else {
80
- matchResult_1 = 1;
117
+ matchResult_2 = 1;
81
118
  }
82
119
  }
83
120
  else {
84
- matchResult_1 = 1;
121
+ matchResult_2 = 1;
85
122
  }
86
123
  }
87
124
  else {
88
- matchResult_1 = 0;
89
- name_1 = activePatternResult_1;
90
- term1 = activePatternResult_2;
91
- term2 = activePatternResult_3;
125
+ matchResult_2 = 1;
92
126
  }
93
127
  }
94
128
  else {
95
- const activePatternResult_7 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(cellValues))));
96
- if (activePatternResult_7 != null) {
97
- if (!isEmpty(tail(tail(tail(cellValues))))) {
98
- const activePatternResult_8 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(tail(cellValues)))));
99
- if (activePatternResult_8 != null) {
100
- if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
101
- if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(head(tail(cellValues))) != null) {
102
- matchResult_1 = 0;
103
- name_1 = activePatternResult_1;
104
- term1 = activePatternResult_7;
105
- term2 = activePatternResult_8;
129
+ matchResult_2 = 1;
130
+ }
131
+ }
132
+ else {
133
+ matchResult_2 = 1;
134
+ }
135
+ }
136
+ else {
137
+ matchResult_2 = 1;
138
+ }
139
+ }
140
+ else {
141
+ matchResult_2 = 1;
142
+ }
143
+ switch (matchResult_2) {
144
+ case 0: {
145
+ const term_1 = ActivePattern_mergeIDInfo(term1_1.IDSpace, term1_1.LocalID, term2_1.IDSpace, term2_1.LocalID);
146
+ return [f(OntologyAnnotation.create(name_2, term_1.TermSourceRef, term_1.TermAccessionNumber)), (cells_3) => termFromFsCells(2, 1, cells_3)];
147
+ }
148
+ default: {
149
+ let matchResult_3, name_3, term1_2, term2_2;
150
+ if (!isEmpty(cellValues)) {
151
+ const activePatternResult_7 = $007CAC$007C_$007C(head(cellValues));
152
+ if (activePatternResult_7 != null) {
153
+ if (!isEmpty(tail(cellValues))) {
154
+ if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(head(tail(cellValues))) != null) {
155
+ if (!isEmpty(tail(tail(cellValues)))) {
156
+ const activePatternResult_9 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(cellValues))));
157
+ if (activePatternResult_9 != null) {
158
+ if (!isEmpty(tail(tail(tail(cellValues))))) {
159
+ const activePatternResult_10 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(tail(cellValues)))));
160
+ if (activePatternResult_10 != null) {
161
+ if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
162
+ matchResult_3 = 0;
163
+ name_3 = activePatternResult_7;
164
+ term1_2 = activePatternResult_9;
165
+ term2_2 = activePatternResult_10;
166
+ }
167
+ else {
168
+ matchResult_3 = 1;
169
+ }
170
+ }
171
+ else {
172
+ matchResult_3 = 1;
173
+ }
106
174
  }
107
175
  else {
108
- matchResult_1 = 1;
176
+ matchResult_3 = 1;
109
177
  }
110
178
  }
111
179
  else {
112
- matchResult_1 = 1;
180
+ matchResult_3 = 1;
113
181
  }
114
182
  }
115
183
  else {
116
- matchResult_1 = 1;
184
+ matchResult_3 = 1;
117
185
  }
118
186
  }
119
187
  else {
120
- matchResult_1 = 1;
188
+ matchResult_3 = 1;
121
189
  }
122
190
  }
123
191
  else {
124
- matchResult_1 = 1;
192
+ matchResult_3 = 1;
125
193
  }
126
194
  }
195
+ else {
196
+ matchResult_3 = 1;
197
+ }
127
198
  }
128
199
  else {
129
- matchResult_1 = 1;
200
+ matchResult_3 = 1;
130
201
  }
131
- }
132
- else if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(head(tail(cellValues))) != null) {
133
- if (!isEmpty(tail(tail(cellValues)))) {
134
- const activePatternResult_11 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(cellValues))));
135
- if (activePatternResult_11 != null) {
136
- if (!isEmpty(tail(tail(tail(cellValues))))) {
137
- const activePatternResult_12 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(tail(cellValues)))));
138
- if (activePatternResult_12 != null) {
139
- if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
140
- matchResult_1 = 0;
141
- name_1 = activePatternResult_1;
142
- term1 = activePatternResult_11;
143
- term2 = activePatternResult_12;
202
+ switch (matchResult_3) {
203
+ case 0: {
204
+ const term_2 = ActivePattern_mergeIDInfo(term1_2.IDSpace, term1_2.LocalID, term2_2.IDSpace, term2_2.LocalID);
205
+ return [f(OntologyAnnotation.create(name_3, term_2.TermSourceRef, term_2.TermAccessionNumber)), (cells_4) => unitizedFromFsCells(1, 2, 3, cells_4)];
206
+ }
207
+ default: {
208
+ let matchResult_4, name_4, term1_3, term2_3;
209
+ if (!isEmpty(cellValues)) {
210
+ const activePatternResult_11 = $007CAC$007C_$007C(head(cellValues));
211
+ if (activePatternResult_11 != null) {
212
+ if (!isEmpty(tail(cellValues))) {
213
+ if (ActivePatterns_$007CUnitColumnHeader$007C_$007C(head(tail(cellValues))) != null) {
214
+ if (!isEmpty(tail(tail(cellValues)))) {
215
+ const activePatternResult_13 = ActivePatterns_$007CTANColumnHeader$007C_$007C(head(tail(tail(cellValues))));
216
+ if (activePatternResult_13 != null) {
217
+ if (!isEmpty(tail(tail(tail(cellValues))))) {
218
+ const activePatternResult_14 = ActivePatterns_$007CTSRColumnHeader$007C_$007C(head(tail(tail(tail(cellValues)))));
219
+ if (activePatternResult_14 != null) {
220
+ if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
221
+ matchResult_4 = 0;
222
+ name_4 = activePatternResult_11;
223
+ term1_3 = activePatternResult_14;
224
+ term2_3 = activePatternResult_13;
225
+ }
226
+ else {
227
+ matchResult_4 = 1;
228
+ }
229
+ }
230
+ else {
231
+ matchResult_4 = 1;
232
+ }
233
+ }
234
+ else {
235
+ matchResult_4 = 1;
236
+ }
237
+ }
238
+ else {
239
+ matchResult_4 = 1;
240
+ }
241
+ }
242
+ else {
243
+ matchResult_4 = 1;
244
+ }
245
+ }
246
+ else {
247
+ matchResult_4 = 1;
248
+ }
144
249
  }
145
250
  else {
146
- matchResult_1 = 1;
251
+ matchResult_4 = 1;
147
252
  }
148
253
  }
149
254
  else {
150
- matchResult_1 = 1;
255
+ matchResult_4 = 1;
151
256
  }
152
257
  }
153
258
  else {
154
- matchResult_1 = 1;
259
+ matchResult_4 = 1;
260
+ }
261
+ switch (matchResult_4) {
262
+ case 0: {
263
+ const term_3 = ActivePattern_mergeIDInfo(term1_3.IDSpace, term1_3.LocalID, term2_3.IDSpace, term2_3.LocalID);
264
+ return [f(OntologyAnnotation.create(name_4, term_3.TermSourceRef, term_3.TermAccessionNumber)), (cells_5) => unitizedFromFsCells(1, 3, 2, cells_5)];
265
+ }
266
+ default:
267
+ return void 0;
155
268
  }
156
269
  }
157
- else {
158
- matchResult_1 = 1;
159
- }
160
- }
161
- else {
162
- matchResult_1 = 1;
163
270
  }
164
271
  }
165
- else {
166
- matchResult_1 = 1;
167
- }
168
- }
169
- else {
170
- matchResult_1 = 1;
171
272
  }
172
273
  }
173
- else {
174
- matchResult_1 = 1;
175
- }
176
- }
177
- else {
178
- matchResult_1 = 1;
179
- }
180
- switch (matchResult_1) {
181
- case 0: {
182
- const term = ActivePattern_mergeIDInfo(term1.IDSpace, term1.LocalID, term2.IDSpace, term2.LocalID);
183
- return f(OntologyAnnotation.create(name_1, term.TermSourceRef, term.TermAccessionNumber));
184
- }
185
- default:
186
- return void 0;
187
274
  }
188
275
  }
189
276
  }
@@ -235,17 +322,13 @@ export function ActivePattern_$007CComponent$007C_$007C(cells) {
235
322
 
236
323
  export function ActivePattern_$007CInput$007C_$007C(cells) {
237
324
  const cellValues = map((c) => c.ValueAsString(), cells);
238
- let matchResult, ioType;
325
+ let matchResult, cols, ioType;
239
326
  if (!isEmpty(cellValues)) {
240
327
  const activePatternResult = ActivePatterns_$007CInputColumnHeader$007C_$007C(head(cellValues));
241
328
  if (activePatternResult != null) {
242
- if (isEmpty(tail(cellValues))) {
243
- matchResult = 0;
244
- ioType = activePatternResult;
245
- }
246
- else {
247
- matchResult = 1;
248
- }
329
+ matchResult = 0;
330
+ cols = tail(cellValues);
331
+ ioType = activePatternResult;
249
332
  }
250
333
  else {
251
334
  matchResult = 1;
@@ -255,8 +338,17 @@ export function ActivePattern_$007CInput$007C_$007C(cells) {
255
338
  matchResult = 1;
256
339
  }
257
340
  switch (matchResult) {
258
- case 0:
259
- return new CompositeHeader(11, [IOType.ofString(ioType)]);
341
+ case 0: {
342
+ const matchValue = IOType.ofString(ioType);
343
+ if (matchValue.tag === 2) {
344
+ const format = map_1((y) => (1 + y), tryFindIndex((s) => (s.indexOf("Data Format") === 0), cols));
345
+ const selectorFormat = map_1((y_1) => (1 + y_1), tryFindIndex((s_1) => (s_1.indexOf("Data Selector Format") === 0), cols));
346
+ return [new CompositeHeader(11, [new IOType(2, [])]), (cells_1) => dataFromFsCells(format, selectorFormat, cells_1)];
347
+ }
348
+ else {
349
+ return [new CompositeHeader(11, [matchValue]), freeTextFromFsCells];
350
+ }
351
+ }
260
352
  default:
261
353
  return void 0;
262
354
  }
@@ -264,17 +356,13 @@ export function ActivePattern_$007CInput$007C_$007C(cells) {
264
356
 
265
357
  export function ActivePattern_$007COutput$007C_$007C(cells) {
266
358
  const cellValues = map((c) => c.ValueAsString(), cells);
267
- let matchResult, ioType;
359
+ let matchResult, cols, ioType;
268
360
  if (!isEmpty(cellValues)) {
269
361
  const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(head(cellValues));
270
362
  if (activePatternResult != null) {
271
- if (isEmpty(tail(cellValues))) {
272
- matchResult = 0;
273
- ioType = activePatternResult;
274
- }
275
- else {
276
- matchResult = 1;
277
- }
363
+ matchResult = 0;
364
+ cols = tail(cellValues);
365
+ ioType = activePatternResult;
278
366
  }
279
367
  else {
280
368
  matchResult = 1;
@@ -284,98 +372,119 @@ export function ActivePattern_$007COutput$007C_$007C(cells) {
284
372
  matchResult = 1;
285
373
  }
286
374
  switch (matchResult) {
287
- case 0:
288
- return new CompositeHeader(12, [IOType.ofString(ioType)]);
375
+ case 0: {
376
+ const matchValue = IOType.ofString(ioType);
377
+ if (matchValue.tag === 2) {
378
+ const format = map_1((y) => (1 + y), tryFindIndex((s) => (s.indexOf("Data Format") === 0), cols));
379
+ const selectorFormat = map_1((y_1) => (1 + y_1), tryFindIndex((s_1) => (s_1.indexOf("Data Selector Format") === 0), cols));
380
+ return [new CompositeHeader(12, [new IOType(2, [])]), (cells_1) => dataFromFsCells(format, selectorFormat, cells_1)];
381
+ }
382
+ else {
383
+ return [new CompositeHeader(12, [matchValue]), freeTextFromFsCells];
384
+ }
385
+ }
289
386
  default:
290
387
  return void 0;
291
388
  }
292
389
  }
293
390
 
391
+ export function ActivePattern_$007CProtocolType$007C_$007C(cells) {
392
+ const activePatternResult = ActivePattern_$007CTerm$007C_$007C((s) => {
393
+ if (s === "Protocol Type") {
394
+ return s;
395
+ }
396
+ else {
397
+ return void 0;
398
+ }
399
+ }, (_arg) => (new CompositeHeader(4, [])), cells);
400
+ if (activePatternResult != null) {
401
+ const r = activePatternResult;
402
+ return r;
403
+ }
404
+ else {
405
+ return void 0;
406
+ }
407
+ }
408
+
294
409
  export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
295
410
  const cellValues = map((c) => c.ValueAsString(), cells);
296
411
  let matchResult;
297
412
  if (!isEmpty(cellValues)) {
298
413
  switch (head(cellValues)) {
299
- case "Protocol Type": {
300
- matchResult = 0;
301
- break;
302
- }
303
414
  case "Protocol REF": {
304
415
  if (isEmpty(tail(cellValues))) {
305
- matchResult = 1;
416
+ matchResult = 0;
306
417
  }
307
418
  else {
308
- matchResult = 7;
419
+ matchResult = 6;
309
420
  }
310
421
  break;
311
422
  }
312
423
  case "Protocol Description": {
313
424
  if (isEmpty(tail(cellValues))) {
314
- matchResult = 2;
425
+ matchResult = 1;
315
426
  }
316
427
  else {
317
- matchResult = 7;
428
+ matchResult = 6;
318
429
  }
319
430
  break;
320
431
  }
321
432
  case "Protocol Uri": {
322
433
  if (isEmpty(tail(cellValues))) {
323
- matchResult = 3;
434
+ matchResult = 2;
324
435
  }
325
436
  else {
326
- matchResult = 7;
437
+ matchResult = 6;
327
438
  }
328
439
  break;
329
440
  }
330
441
  case "Protocol Version": {
331
442
  if (isEmpty(tail(cellValues))) {
332
- matchResult = 4;
443
+ matchResult = 3;
333
444
  }
334
445
  else {
335
- matchResult = 7;
446
+ matchResult = 6;
336
447
  }
337
448
  break;
338
449
  }
339
450
  case "Performer": {
340
451
  if (isEmpty(tail(cellValues))) {
341
- matchResult = 5;
452
+ matchResult = 4;
342
453
  }
343
454
  else {
344
- matchResult = 7;
455
+ matchResult = 6;
345
456
  }
346
457
  break;
347
458
  }
348
459
  case "Date": {
349
460
  if (isEmpty(tail(cellValues))) {
350
- matchResult = 6;
461
+ matchResult = 5;
351
462
  }
352
463
  else {
353
- matchResult = 7;
464
+ matchResult = 6;
354
465
  }
355
466
  break;
356
467
  }
357
468
  default:
358
- matchResult = 7;
469
+ matchResult = 6;
359
470
  }
360
471
  }
361
472
  else {
362
- matchResult = 7;
473
+ matchResult = 6;
363
474
  }
364
475
  switch (matchResult) {
365
476
  case 0:
366
- return new CompositeHeader(4, []);
477
+ return [new CompositeHeader(8, []), freeTextFromFsCells];
367
478
  case 1:
368
- return new CompositeHeader(8, []);
479
+ return [new CompositeHeader(5, []), freeTextFromFsCells];
369
480
  case 2:
370
- return new CompositeHeader(5, []);
481
+ return [new CompositeHeader(6, []), freeTextFromFsCells];
371
482
  case 3:
372
- return new CompositeHeader(6, []);
483
+ return [new CompositeHeader(7, []), freeTextFromFsCells];
373
484
  case 4:
374
- return new CompositeHeader(7, []);
485
+ return [new CompositeHeader(9, []), freeTextFromFsCells];
375
486
  case 5:
376
- return new CompositeHeader(9, []);
377
- case 6:
378
- return new CompositeHeader(10, []);
487
+ return [new CompositeHeader(10, []), freeTextFromFsCells];
379
488
  default:
380
489
  return void 0;
381
490
  }
@@ -398,7 +507,7 @@ export function ActivePattern_$007CFreeText$007C_$007C(cells) {
398
507
  }
399
508
  switch (matchResult) {
400
509
  case 0:
401
- return new CompositeHeader(13, [text]);
510
+ return [new CompositeHeader(13, [text]), freeTextFromFsCells];
402
511
  default:
403
512
  return void 0;
404
513
  }
@@ -441,19 +550,26 @@ export function fromFsCells(cells) {
441
550
  return o;
442
551
  }
443
552
  else {
444
- const activePatternResult_6 = ActivePattern_$007CProtocolHeader$007C_$007C(cells);
553
+ const activePatternResult_6 = ActivePattern_$007CProtocolType$007C_$007C(cells);
445
554
  if (activePatternResult_6 != null) {
446
- const ph = activePatternResult_6;
447
- return ph;
555
+ const pt = activePatternResult_6;
556
+ return pt;
448
557
  }
449
558
  else {
450
- const activePatternResult_7 = ActivePattern_$007CFreeText$007C_$007C(cells);
559
+ const activePatternResult_7 = ActivePattern_$007CProtocolHeader$007C_$007C(cells);
451
560
  if (activePatternResult_7 != null) {
452
- const ft = activePatternResult_7;
453
- return ft;
561
+ const ph = activePatternResult_7;
562
+ return ph;
454
563
  }
455
564
  else {
456
- return toFail(printf("Could not parse header group %O"))(cells);
565
+ const activePatternResult_8 = ActivePattern_$007CFreeText$007C_$007C(cells);
566
+ if (activePatternResult_8 != null) {
567
+ const ft = activePatternResult_8;
568
+ return ft;
569
+ }
570
+ else {
571
+ return toFail(printf("Could not parse header group %O"))(cells);
572
+ }
457
573
  }
458
574
  }
459
575
  }
@@ -465,7 +581,10 @@ export function fromFsCells(cells) {
465
581
  }
466
582
 
467
583
  export function toFsCells(hasUnit, header) {
468
- if (header.IsSingleColumn) {
584
+ if (header.IsDataColumn) {
585
+ return ofArray([new FsCell(toString(header)), new FsCell("Data Format"), new FsCell("Data Selector Format")]);
586
+ }
587
+ else if (header.IsSingleColumn) {
469
588
  return singleton(new FsCell(toString(header)));
470
589
  }
471
590
  else if (header.IsTermColumn) {
@@ -1,4 +1,4 @@
1
- import { FsWorksheet } from "../fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js";
1
+ import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.1.2/FsWorksheet.fs.js";
2
2
  import { iterate, isEmpty as isEmpty_1, choose, tryHead, head, exists, map, singleton, append, delay, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
3
3
  import { SparseRowModule_tryGetValueAt, SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_writeToSheet } from "./Metadata/SparseTable.js";
4
4
  import { fromRows as fromRows_1, toRows as toRows_1 } from "./Metadata/Assays.js";
@@ -10,7 +10,7 @@ import { ArcAssay } from "../Core/ArcTypes.js";
10
10
  import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
11
11
  import { defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
12
12
  import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
13
- import { FsWorkbook } from "../fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js";
13
+ import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.1.2/FsWorkbook.fs.js";
14
14
 
15
15
  export function toMetadataSheet(assay) {
16
16
  let assay_1;
@@ -17,8 +17,8 @@ import { toRows as toRows_4, fromRows as fromRows_4 } from "./Metadata/Study.js"
17
17
  import { iterateIndexed, map as map_1, toList, empty as empty_1, collect, singleton, append as append_1, delay } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
18
18
  import { tryFind, ofList } from "../fable_modules/fable-library-js.4.16.0/Map.js";
19
19
  import { printf, toFail } from "../fable_modules/fable-library-js.4.16.0/String.js";
20
- import { FsWorksheet } from "../fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js";
21
- import { FsWorkbook } from "../fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js";
20
+ import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.1.2/FsWorksheet.fs.js";
21
+ import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.1.2/FsWorkbook.fs.js";
22
22
 
23
23
  export class InvestigationInfo extends Record {
24
24
  constructor(Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Comments) {
@@ -1,4 +1,4 @@
1
- import { FsWorksheet } from "../fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js";
1
+ import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.1.2/FsWorksheet.fs.js";
2
2
  import { map, append, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
3
3
  import { SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_writeToSheet } from "./Metadata/SparseTable.js";
4
4
  import { fromRows as fromRows_1, toRows } from "./Metadata/Study.js";
@@ -10,7 +10,7 @@ import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
10
10
  import { empty } from "../fable_modules/fable-library-js.4.16.0/List.js";
11
11
  import { ResizeArray_iter, ResizeArray_isEmpty, ResizeArray_choose } from "../Core/Helper/Collections.js";
12
12
  import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
13
- import { FsWorkbook } from "../fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js";
13
+ import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.1.2/FsWorkbook.fs.js";
14
14
 
15
15
  export function ArcStudy_toMetadataSheet(study, assays) {
16
16
  let source_1;