@nfdi4plants/arctrl 2.0.0-alpha.3 → 2.0.0-alpha.5

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 (122) hide show
  1. package/ARC.js +178 -21
  2. package/Contract/ARC.js +9 -1
  3. package/Contract/Contract.js +3 -0
  4. package/Contract/Datamap.js +180 -0
  5. package/Contract/Git.js +3 -0
  6. package/Core/ArcTypes.js +189 -120
  7. package/Core/Conversion.js +177 -106
  8. package/Core/Data.js +119 -0
  9. package/Core/{Process/DataFile.js → DataFile.js} +3 -3
  10. package/Core/Helper/Identifier.js +40 -0
  11. package/Core/Helper/Regex.js +13 -0
  12. package/Core/OntologyAnnotation.js +28 -6
  13. package/Core/Process/ColumnIndex.js +13 -3
  14. package/Core/Process/ProcessInput.js +5 -5
  15. package/Core/Process/ProcessOutput.js +5 -5
  16. package/Core/Process/Value.js +1 -1
  17. package/Core/Table/ArcTable.js +24 -2
  18. package/Core/Table/ArcTableAux.js +56 -5
  19. package/Core/Table/ArcTables.js +1 -1
  20. package/Core/Table/CompositeCell.js +67 -10
  21. package/Core/Table/CompositeColumn.js +9 -0
  22. package/Core/Table/CompositeHeader.js +108 -94
  23. package/Core/Table/DataMap.js +166 -0
  24. package/FileSystem/DefaultGitattributes.js +3 -0
  25. package/FileSystem/FileSystemTree.js +18 -4
  26. package/Json/Assay.js +4 -4
  27. package/Json/Process/Data.js +56 -18
  28. package/Json/Process/DataFile.js +5 -5
  29. package/Json/Process/PropertyValue.js +124 -4
  30. package/Json/Study.js +4 -4
  31. package/Json/Table/CompositeCell.js +7 -6
  32. package/Json/Table/CompositeHeader.js +4 -3
  33. package/Spreadsheet/AnnotationTable/ArcTable.js +10 -13
  34. package/Spreadsheet/AnnotationTable/CompositeCell.js +32 -50
  35. package/Spreadsheet/AnnotationTable/CompositeColumn.js +16 -10
  36. package/Spreadsheet/AnnotationTable/CompositeHeader.js +290 -135
  37. package/Spreadsheet/ArcAssay.js +2 -2
  38. package/Spreadsheet/ArcInvestigation.js +2 -2
  39. package/Spreadsheet/ArcStudy.js +2 -2
  40. package/Spreadsheet/DataMap.js +31 -0
  41. package/Spreadsheet/DataMapTable/DataMapColumn.js +36 -0
  42. package/Spreadsheet/DataMapTable/DataMapHeader.js +417 -0
  43. package/Spreadsheet/DataMapTable/DataMapTable.js +98 -0
  44. package/Spreadsheet/Metadata/Assays.js +2 -2
  45. package/Spreadsheet/Metadata/SparseTable.js +7 -7
  46. package/Spreadsheet/Metadata/Study.js +1 -1
  47. package/Spreadsheet/Template.js +2 -2
  48. package/Xlsx.js +29 -6
  49. package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsSpreadsheet.fableproj +9 -3
  50. package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs +1 -0
  51. package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +23 -0
  52. package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +21 -0
  53. package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +23 -0
  54. package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +19 -0
  55. package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs +24 -0
  56. package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs.js +15 -0
  57. package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs +70 -0
  58. package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs.js +48 -0
  59. package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +20 -0
  60. package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +21 -0
  61. package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +49 -0
  62. package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +44 -0
  63. package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  64. package/fable_modules/project_cracked.json +1 -1
  65. package/package.json +1 -1
  66. package/Core/Process/Data.js +0 -55
  67. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs +0 -0
  68. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs.js +0 -0
  69. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs +0 -0
  70. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs.js +0 -0
  71. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs +0 -0
  72. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs.js +0 -0
  73. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs +0 -0
  74. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs.js +0 -0
  75. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs +0 -0
  76. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs.js +0 -0
  77. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs +0 -0
  78. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs.js +0 -0
  79. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs +0 -0
  80. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs.js +0 -0
  81. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs +0 -0
  82. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs.js +0 -0
  83. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs +0 -0
  84. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs.js +0 -0
  85. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs +0 -0
  86. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs.js +0 -0
  87. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs +0 -0
  88. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs.js +0 -0
  89. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs +0 -0
  90. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs.js +0 -0
  91. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs +0 -0
  92. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs.js +0 -0
  93. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs +0 -0
  94. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs.js +0 -0
  95. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs +0 -0
  96. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs.js +0 -0
  97. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs +0 -0
  98. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs.js +0 -0
  99. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs +0 -0
  100. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs.js +0 -0
  101. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs.js +0 -0
  102. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs +0 -0
  103. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs.js +0 -0
  104. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs +0 -0
  105. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs.js +0 -0
  106. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs +0 -0
  107. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs.js +0 -0
  108. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs +0 -0
  109. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs.js +0 -0
  110. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs +0 -0
  111. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs.js +0 -0
  112. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs +0 -0
  113. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs.js +0 -0
  114. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs +0 -0
  115. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs.js +0 -0
  116. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs +0 -0
  117. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs.js +0 -0
  118. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs +0 -0
  119. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs.js +0 -0
  120. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  121. /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  122. /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_$007CComment$007C_$007C, 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,135 +58,220 @@ 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
272
  }
169
- else {
170
- matchResult_1 = 1;
171
- }
172
- }
173
- else {
174
- matchResult_1 = 1;
175
273
  }
176
274
  }
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
- }
188
275
  }
189
276
  }
190
277
  }
@@ -235,18 +322,48 @@ 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;
329
+ matchResult = 0;
330
+ cols = tail(cellValues);
331
+ ioType = activePatternResult;
332
+ }
333
+ else {
334
+ matchResult = 1;
335
+ }
336
+ }
337
+ else {
338
+ matchResult = 1;
339
+ }
340
+ switch (matchResult) {
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)];
245
347
  }
246
348
  else {
247
- matchResult = 1;
349
+ return [new CompositeHeader(11, [matchValue]), freeTextFromFsCells];
248
350
  }
249
351
  }
352
+ default:
353
+ return void 0;
354
+ }
355
+ }
356
+
357
+ export function ActivePattern_$007COutput$007C_$007C(cells) {
358
+ const cellValues = map((c) => c.ValueAsString(), cells);
359
+ let matchResult, cols, ioType;
360
+ if (!isEmpty(cellValues)) {
361
+ const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(head(cellValues));
362
+ if (activePatternResult != null) {
363
+ matchResult = 0;
364
+ cols = tail(cellValues);
365
+ ioType = activePatternResult;
366
+ }
250
367
  else {
251
368
  matchResult = 1;
252
369
  }
@@ -255,22 +372,31 @@ export function ActivePattern_$007CInput$007C_$007C(cells) {
255
372
  matchResult = 1;
256
373
  }
257
374
  switch (matchResult) {
258
- case 0:
259
- return new CompositeHeader(11, [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
+ }
260
386
  default:
261
387
  return void 0;
262
388
  }
263
389
  }
264
390
 
265
- export function ActivePattern_$007COutput$007C_$007C(cells) {
391
+ export function ActivePattern_$007CComment$007C_$007C(cells) {
266
392
  const cellValues = map((c) => c.ValueAsString(), cells);
267
- let matchResult, ioType;
393
+ let matchResult, key;
268
394
  if (!isEmpty(cellValues)) {
269
- const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(head(cellValues));
395
+ const activePatternResult = ActivePatterns_$007CComment$007C_$007C(head(cellValues));
270
396
  if (activePatternResult != null) {
271
397
  if (isEmpty(tail(cellValues))) {
272
398
  matchResult = 0;
273
- ioType = activePatternResult;
399
+ key = activePatternResult;
274
400
  }
275
401
  else {
276
402
  matchResult = 1;
@@ -285,97 +411,109 @@ export function ActivePattern_$007COutput$007C_$007C(cells) {
285
411
  }
286
412
  switch (matchResult) {
287
413
  case 0:
288
- return new CompositeHeader(12, [IOType.ofString(ioType)]);
414
+ return [new CompositeHeader(14, [key]), freeTextFromFsCells];
289
415
  default:
290
416
  return void 0;
291
417
  }
292
418
  }
293
419
 
420
+ export function ActivePattern_$007CProtocolType$007C_$007C(cells) {
421
+ const activePatternResult = ActivePattern_$007CTerm$007C_$007C((s) => {
422
+ if (s === "Protocol Type") {
423
+ return s;
424
+ }
425
+ else {
426
+ return void 0;
427
+ }
428
+ }, (_arg) => (new CompositeHeader(4, [])), cells);
429
+ if (activePatternResult != null) {
430
+ const r = activePatternResult;
431
+ return r;
432
+ }
433
+ else {
434
+ return void 0;
435
+ }
436
+ }
437
+
294
438
  export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
295
439
  const cellValues = map((c) => c.ValueAsString(), cells);
296
440
  let matchResult;
297
441
  if (!isEmpty(cellValues)) {
298
442
  switch (head(cellValues)) {
299
- case "Protocol Type": {
300
- matchResult = 0;
301
- break;
302
- }
303
443
  case "Protocol REF": {
304
444
  if (isEmpty(tail(cellValues))) {
305
- matchResult = 1;
445
+ matchResult = 0;
306
446
  }
307
447
  else {
308
- matchResult = 7;
448
+ matchResult = 6;
309
449
  }
310
450
  break;
311
451
  }
312
452
  case "Protocol Description": {
313
453
  if (isEmpty(tail(cellValues))) {
314
- matchResult = 2;
454
+ matchResult = 1;
315
455
  }
316
456
  else {
317
- matchResult = 7;
457
+ matchResult = 6;
318
458
  }
319
459
  break;
320
460
  }
321
461
  case "Protocol Uri": {
322
462
  if (isEmpty(tail(cellValues))) {
323
- matchResult = 3;
463
+ matchResult = 2;
324
464
  }
325
465
  else {
326
- matchResult = 7;
466
+ matchResult = 6;
327
467
  }
328
468
  break;
329
469
  }
330
470
  case "Protocol Version": {
331
471
  if (isEmpty(tail(cellValues))) {
332
- matchResult = 4;
472
+ matchResult = 3;
333
473
  }
334
474
  else {
335
- matchResult = 7;
475
+ matchResult = 6;
336
476
  }
337
477
  break;
338
478
  }
339
479
  case "Performer": {
340
480
  if (isEmpty(tail(cellValues))) {
341
- matchResult = 5;
481
+ matchResult = 4;
342
482
  }
343
483
  else {
344
- matchResult = 7;
484
+ matchResult = 6;
345
485
  }
346
486
  break;
347
487
  }
348
488
  case "Date": {
349
489
  if (isEmpty(tail(cellValues))) {
350
- matchResult = 6;
490
+ matchResult = 5;
351
491
  }
352
492
  else {
353
- matchResult = 7;
493
+ matchResult = 6;
354
494
  }
355
495
  break;
356
496
  }
357
497
  default:
358
- matchResult = 7;
498
+ matchResult = 6;
359
499
  }
360
500
  }
361
501
  else {
362
- matchResult = 7;
502
+ matchResult = 6;
363
503
  }
364
504
  switch (matchResult) {
365
505
  case 0:
366
- return new CompositeHeader(4, []);
506
+ return [new CompositeHeader(8, []), freeTextFromFsCells];
367
507
  case 1:
368
- return new CompositeHeader(8, []);
508
+ return [new CompositeHeader(5, []), freeTextFromFsCells];
369
509
  case 2:
370
- return new CompositeHeader(5, []);
510
+ return [new CompositeHeader(6, []), freeTextFromFsCells];
371
511
  case 3:
372
- return new CompositeHeader(6, []);
512
+ return [new CompositeHeader(7, []), freeTextFromFsCells];
373
513
  case 4:
374
- return new CompositeHeader(7, []);
514
+ return [new CompositeHeader(9, []), freeTextFromFsCells];
375
515
  case 5:
376
- return new CompositeHeader(9, []);
377
- case 6:
378
- return new CompositeHeader(10, []);
516
+ return [new CompositeHeader(10, []), freeTextFromFsCells];
379
517
  default:
380
518
  return void 0;
381
519
  }
@@ -398,7 +536,7 @@ export function ActivePattern_$007CFreeText$007C_$007C(cells) {
398
536
  }
399
537
  switch (matchResult) {
400
538
  case 0:
401
- return new CompositeHeader(13, [text]);
539
+ return [new CompositeHeader(13, [text]), freeTextFromFsCells];
402
540
  default:
403
541
  return void 0;
404
542
  }
@@ -441,19 +579,33 @@ export function fromFsCells(cells) {
441
579
  return o;
442
580
  }
443
581
  else {
444
- const activePatternResult_6 = ActivePattern_$007CProtocolHeader$007C_$007C(cells);
582
+ const activePatternResult_6 = ActivePattern_$007CProtocolType$007C_$007C(cells);
445
583
  if (activePatternResult_6 != null) {
446
- const ph = activePatternResult_6;
447
- return ph;
584
+ const pt = activePatternResult_6;
585
+ return pt;
448
586
  }
449
587
  else {
450
- const activePatternResult_7 = ActivePattern_$007CFreeText$007C_$007C(cells);
588
+ const activePatternResult_7 = ActivePattern_$007CProtocolHeader$007C_$007C(cells);
451
589
  if (activePatternResult_7 != null) {
452
- const ft = activePatternResult_7;
453
- return ft;
590
+ const ph = activePatternResult_7;
591
+ return ph;
454
592
  }
455
593
  else {
456
- return toFail(printf("Could not parse header group %O"))(cells);
594
+ const activePatternResult_8 = ActivePattern_$007CComment$007C_$007C(cells);
595
+ if (activePatternResult_8 != null) {
596
+ const c_2 = activePatternResult_8;
597
+ return c_2;
598
+ }
599
+ else {
600
+ const activePatternResult_9 = ActivePattern_$007CFreeText$007C_$007C(cells);
601
+ if (activePatternResult_9 != null) {
602
+ const ft = activePatternResult_9;
603
+ return ft;
604
+ }
605
+ else {
606
+ return toFail(printf("Could not parse header group %O"))(cells);
607
+ }
608
+ }
457
609
  }
458
610
  }
459
611
  }
@@ -465,7 +617,10 @@ export function fromFsCells(cells) {
465
617
  }
466
618
 
467
619
  export function toFsCells(hasUnit, header) {
468
- if (header.IsSingleColumn) {
620
+ if (header.IsDataColumn) {
621
+ return ofArray([new FsCell(toString(header)), new FsCell("Data Format"), new FsCell("Data Selector Format")]);
622
+ }
623
+ else if (header.IsSingleColumn) {
469
624
  return singleton(new FsCell(toString(header)));
470
625
  }
471
626
  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) {