@nfdi4plants/arctrl 1.0.0-alpha8 → 1.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 (84) hide show
  1. package/ARC.js +5 -6
  2. package/ISA/ISA/ArcTypes/ArcTable.js +141 -37
  3. package/ISA/ISA/ArcTypes/ArcTableAux.js +13 -14
  4. package/ISA/ISA/ArcTypes/ArcTables.js +380 -277
  5. package/ISA/ISA/ArcTypes/ArcTypes.js +128 -318
  6. package/ISA/ISA/ArcTypes/CompositeColumn.js +7 -1
  7. package/ISA/ISA/ArcTypes/CompositeHeader.js +311 -1
  8. package/ISA/ISA/Helper.js +15 -3
  9. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +17 -15
  10. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +2 -2
  11. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +4 -4
  12. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +6 -6
  13. package/ISA/ISA.Spreadsheet/ArcAssay.js +6 -9
  14. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +4 -4
  15. package/ISA/ISA.Spreadsheet/ArcStudy.js +5 -5
  16. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +9 -9
  17. package/README.md +3 -0
  18. package/Templates/Template.Json.js +7 -3
  19. package/Templates/Template.Spreadsheet.js +23 -7
  20. package/Templates/Template.Web.js +1 -1
  21. package/Templates/Templates.js +82 -0
  22. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCell.fs +85 -36
  23. package/fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js +272 -0
  24. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/CellBuilder.fs +1 -0
  25. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/CellBuilder.fs.js +18 -18
  26. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Transform.fs +1 -1
  27. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Transform.fs.js +2 -1
  28. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Types.fs +1 -1
  29. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Types.fs.js +4 -4
  30. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsColumn.fs +3 -1
  31. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsRow.fs +2 -0
  32. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorksheet.fs +10 -1
  33. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorksheet.fs.js +5 -0
  34. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/SheetBuilder.fs +4 -4
  35. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/SheetBuilder.fs.js +3 -3
  36. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTable.fs +20 -4
  37. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTable.fs.js +26 -6
  38. package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  39. package/fable_modules/project_cracked.json +1 -1
  40. package/index.js +1 -0
  41. package/package.json +1 -1
  42. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +0 -240
  43. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCellsCollection.fs +0 -0
  44. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCellsCollection.fs.js +0 -0
  45. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/ColumnBuilder.fs +0 -0
  46. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/ColumnBuilder.fs.js +0 -0
  47. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/DSL.fs +0 -0
  48. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/DSL.fs.js +0 -0
  49. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Expression.fs +0 -0
  50. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Expression.fs.js +0 -0
  51. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Operators.fs +0 -0
  52. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Operators.fs.js +0 -0
  53. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/RowBuilder.fs +0 -0
  54. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/RowBuilder.fs.js +0 -0
  55. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/SheetBuilder.fs +0 -0
  56. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/SheetBuilder.fs.js +0 -0
  57. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/TableBuilder.fs +0 -0
  58. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/TableBuilder.fs.js +0 -0
  59. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/WorkbookBuilder.fs +0 -0
  60. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/WorkbookBuilder.fs.js +0 -0
  61. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsAddress.fs +0 -0
  62. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsAddress.fs.js +0 -0
  63. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsColumn.fs.js +0 -0
  64. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsRow.fs.js +0 -0
  65. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsSpreadsheet.fableproj +0 -0
  66. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorkbook.fs +0 -0
  67. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorkbook.fs.js +0 -0
  68. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRange.fs +0 -0
  69. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRange.fs.js +0 -0
  70. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeAddress.fs +0 -0
  71. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeAddress.fs.js +0 -0
  72. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeBase.fs +0 -0
  73. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeBase.fs.js +0 -0
  74. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeColumn.fs +0 -0
  75. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeColumn.fs.js +0 -0
  76. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeRow.fs +0 -0
  77. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeRow.fs.js +0 -0
  78. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableField.fs +0 -0
  79. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableField.fs.js +0 -0
  80. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableRow.fs +0 -0
  81. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableRow.fs.js +0 -0
  82. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  83. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  84. /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
@@ -1,4 +1,5 @@
1
1
  import { defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
2
+ import { empty, singleton, collect, delay, toArray } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
2
3
  import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
3
4
  import { CompositeHeader_$reflection } from "./CompositeHeader.js";
4
5
  import { CompositeCell_$reflection } from "./CompositeCell.js";
@@ -13,7 +14,7 @@ export class CompositeColumn extends Record {
13
14
  static create(header, cells) {
14
15
  return new CompositeColumn(header, defaultArg(cells, []));
15
16
  }
16
- validate(raiseException) {
17
+ Validate(raiseException) {
17
18
  const this$ = this;
18
19
  const raiseExeption = defaultArg(raiseException, false);
19
20
  const header = this$.Header;
@@ -34,6 +35,11 @@ export class CompositeColumn extends Record {
34
35
  return false;
35
36
  }
36
37
  }
38
+ TryGetColumnUnits() {
39
+ const this$ = this;
40
+ const arr = toArray(delay(() => collect((cell) => (cell.isUnitized ? singleton(cell.AsUnitized[1]) : empty()), this$.Cells)));
41
+ return (arr.length === 0) ? void 0 : arr;
42
+ }
37
43
  }
38
44
 
39
45
  export function CompositeColumn_$reflection() {
@@ -2,6 +2,7 @@ import { map } from "../../../fable_modules/fable-library.4.1.4/Array.js";
2
2
  import { union_type, string_type, getUnionCases, name } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
3
3
  import { Union, toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
4
4
  import { ActivePatterns_$007CTermColumn$007C_$007C, Pattern_OutputPattern, Pattern_InputPattern, ActivePatterns_$007CRegex$007C_$007C, tryParseIOTypeHeader } from "../Regex.js";
5
+ import { equals } from "../../../fable_modules/fable-library.4.1.4/Util.js";
5
6
  import { printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
6
7
  import { OntologyAnnotation_$reflection, OntologyAnnotation } from "../JsonTypes/OntologyAnnotation.js";
7
8
  import { ProtocolParameter_create_Z6C54B221 } from "../JsonTypes/ProtocolParameter.js";
@@ -40,6 +41,82 @@ export class IOType extends Union {
40
41
  };
41
42
  return (this$.tag === 6) ? stringCreate(this$.fields[0]) : stringCreate(this$);
42
43
  }
44
+ Merge(other) {
45
+ const this$ = this;
46
+ switch (this$.tag) {
47
+ case 4:
48
+ switch (other.tag) {
49
+ case 0:
50
+ return new IOType(4, []);
51
+ case 2:
52
+ return new IOType(4, []);
53
+ case 3:
54
+ return new IOType(4, []);
55
+ case 4:
56
+ return new IOType(4, []);
57
+ default:
58
+ throw new Error(`ImageFile IO column and ${other} can not be merged`);
59
+ }
60
+ case 3:
61
+ switch (other.tag) {
62
+ case 0:
63
+ return new IOType(3, []);
64
+ case 2:
65
+ return new IOType(3, []);
66
+ case 3:
67
+ return new IOType(3, []);
68
+ case 4:
69
+ return new IOType(4, []);
70
+ default:
71
+ throw new Error(`DerivedDataFile IO column and ${other} can not be merged`);
72
+ }
73
+ case 2:
74
+ switch (other.tag) {
75
+ case 0:
76
+ return new IOType(2, []);
77
+ case 2:
78
+ return new IOType(2, []);
79
+ case 3:
80
+ return new IOType(3, []);
81
+ case 4:
82
+ return new IOType(4, []);
83
+ default:
84
+ throw new Error(`RawDataFile IO column and ${other} can not be merged`);
85
+ }
86
+ case 1:
87
+ switch (other.tag) {
88
+ case 0:
89
+ return new IOType(1, []);
90
+ case 1:
91
+ return new IOType(1, []);
92
+ default:
93
+ throw new Error(`Sample IO column and ${other} can not be merged`);
94
+ }
95
+ case 0:
96
+ return (other.tag === 0) ? (new IOType(0, [])) : other;
97
+ case 5:
98
+ switch (other.tag) {
99
+ case 0:
100
+ return new IOType(5, []);
101
+ case 5:
102
+ return new IOType(5, []);
103
+ default:
104
+ throw new Error(`Material IO column and ${other} can not be merged`);
105
+ }
106
+ default:
107
+ if (other.tag === 6) {
108
+ if (this$.fields[0] === other.fields[0]) {
109
+ return new IOType(6, [this$.fields[0]]);
110
+ }
111
+ else {
112
+ throw new Error(`FreeText IO column names ${this$.fields[0]} and ${other.fields[0]} do differ`);
113
+ }
114
+ }
115
+ else {
116
+ throw new Error(`FreeText IO column and ${other} can not be merged`);
117
+ }
118
+ }
119
+ }
43
120
  toString() {
44
121
  const this$ = this;
45
122
  return (this$.tag === 1) ? "Sample Name" : ((this$.tag === 2) ? "Raw Data File" : ((this$.tag === 3) ? "Derived Data File" : ((this$.tag === 4) ? "Image File" : ((this$.tag === 5) ? "Material" : ((this$.tag === 6) ? this$.fields[0] : "Source Name")))));
@@ -57,6 +134,87 @@ export class IOType extends Union {
57
134
  return IOType.ofString(s);
58
135
  }
59
136
  }
137
+ GetUITooltip() {
138
+ const this$ = this;
139
+ return IOType.getUITooltip(this$);
140
+ }
141
+ static getUITooltip(iotype) {
142
+ let matchResult;
143
+ if (typeof iotype === "string") {
144
+ if (equals(iotype, "Source")) {
145
+ matchResult = 0;
146
+ }
147
+ else if (equals(iotype, "Sample")) {
148
+ matchResult = 1;
149
+ }
150
+ else if (equals(iotype, "RawDataFile")) {
151
+ matchResult = 2;
152
+ }
153
+ else if (equals(iotype, "DerivedDataFile")) {
154
+ matchResult = 3;
155
+ }
156
+ else if (equals(iotype, "ImageFile")) {
157
+ matchResult = 4;
158
+ }
159
+ else if (equals(iotype, "Material")) {
160
+ matchResult = 5;
161
+ }
162
+ else if (equals(iotype, "FreeText")) {
163
+ matchResult = 6;
164
+ }
165
+ else {
166
+ matchResult = 7;
167
+ }
168
+ }
169
+ else {
170
+ switch (iotype.tag) {
171
+ case 1: {
172
+ matchResult = 1;
173
+ break;
174
+ }
175
+ case 2: {
176
+ matchResult = 2;
177
+ break;
178
+ }
179
+ case 3: {
180
+ matchResult = 3;
181
+ break;
182
+ }
183
+ case 4: {
184
+ matchResult = 4;
185
+ break;
186
+ }
187
+ case 5: {
188
+ matchResult = 5;
189
+ break;
190
+ }
191
+ case 6: {
192
+ matchResult = 6;
193
+ break;
194
+ }
195
+ default:
196
+ matchResult = 0;
197
+ }
198
+ }
199
+ switch (matchResult) {
200
+ case 0:
201
+ return "The source value must be a unique identifier for an organism or a sample.";
202
+ case 1:
203
+ return "The Sample Name column describes specifc laboratory samples with a unique identifier.";
204
+ case 2:
205
+ return "The Raw Data File column defines untransformed and unprocessed data files.";
206
+ case 3:
207
+ return "The Derived Data File column defines transformed and/or processed data files.";
208
+ case 4:
209
+ return "Placeholder";
210
+ case 5:
211
+ return "Placeholder";
212
+ case 6:
213
+ return "Placeholder";
214
+ default:
215
+ throw new Error(`Unable to parse combination to existing IOType: \`${iotype}\``);
216
+ }
217
+ }
60
218
  }
61
219
 
62
220
  export function IOType_$reflection() {
@@ -271,7 +429,7 @@ export class CompositeHeader extends Union {
271
429
  }
272
430
  get isOutput() {
273
431
  const this$ = this;
274
- return this$.tag === 11;
432
+ return this$.tag === 12;
275
433
  }
276
434
  get isParameter() {
277
435
  const this$ = this;
@@ -334,6 +492,14 @@ export class CompositeHeader extends Union {
334
492
  const this$ = this;
335
493
  return this$.tag === 13;
336
494
  }
495
+ tryInput() {
496
+ const this$ = this;
497
+ return (this$.tag === 11) ? this$.fields[0] : void 0;
498
+ }
499
+ tryOutput() {
500
+ const this$ = this;
501
+ return (this$.tag === 12) ? this$.fields[0] : void 0;
502
+ }
337
503
  TryParameter() {
338
504
  const this$ = this;
339
505
  return (this$.tag === 3) ? ProtocolParameter_create_Z6C54B221(void 0, this$.fields[0]) : void 0;
@@ -350,6 +516,150 @@ export class CompositeHeader extends Union {
350
516
  const this$ = this;
351
517
  return (this$.tag === 0) ? Component_create_61502994(void 0, void 0, void 0, this$.fields[0]) : void 0;
352
518
  }
519
+ GetUITooltip() {
520
+ const this$ = this;
521
+ return CompositeHeader.getUITooltip(this$);
522
+ }
523
+ static getUITooltip(header) {
524
+ let matchResult;
525
+ if (typeof header === "string") {
526
+ if (equals(header, "Component")) {
527
+ matchResult = 0;
528
+ }
529
+ else if (equals(header, "Characteristic")) {
530
+ matchResult = 1;
531
+ }
532
+ else if (equals(header, "Factor")) {
533
+ matchResult = 2;
534
+ }
535
+ else if (equals(header, "Parameter")) {
536
+ matchResult = 3;
537
+ }
538
+ else if (equals(header, "ProtocolType")) {
539
+ matchResult = 4;
540
+ }
541
+ else if (equals(header, "ProtocolDescription")) {
542
+ matchResult = 5;
543
+ }
544
+ else if (equals(header, "ProtocolUri")) {
545
+ matchResult = 6;
546
+ }
547
+ else if (equals(header, "ProtocolVersion")) {
548
+ matchResult = 7;
549
+ }
550
+ else if (equals(header, "ProtocolREF")) {
551
+ matchResult = 8;
552
+ }
553
+ else if (equals(header, "Performer")) {
554
+ matchResult = 9;
555
+ }
556
+ else if (equals(header, "Date")) {
557
+ matchResult = 10;
558
+ }
559
+ else if (equals(header, "Input")) {
560
+ matchResult = 11;
561
+ }
562
+ else if (equals(header, "Output")) {
563
+ matchResult = 12;
564
+ }
565
+ else if (equals(header, "FreeText")) {
566
+ matchResult = 13;
567
+ }
568
+ else {
569
+ matchResult = 14;
570
+ }
571
+ }
572
+ else {
573
+ switch (header.tag) {
574
+ case 1: {
575
+ matchResult = 1;
576
+ break;
577
+ }
578
+ case 2: {
579
+ matchResult = 2;
580
+ break;
581
+ }
582
+ case 3: {
583
+ matchResult = 3;
584
+ break;
585
+ }
586
+ case 4: {
587
+ matchResult = 4;
588
+ break;
589
+ }
590
+ case 5: {
591
+ matchResult = 5;
592
+ break;
593
+ }
594
+ case 6: {
595
+ matchResult = 6;
596
+ break;
597
+ }
598
+ case 7: {
599
+ matchResult = 7;
600
+ break;
601
+ }
602
+ case 8: {
603
+ matchResult = 8;
604
+ break;
605
+ }
606
+ case 9: {
607
+ matchResult = 9;
608
+ break;
609
+ }
610
+ case 10: {
611
+ matchResult = 10;
612
+ break;
613
+ }
614
+ case 11: {
615
+ matchResult = 11;
616
+ break;
617
+ }
618
+ case 12: {
619
+ matchResult = 12;
620
+ break;
621
+ }
622
+ case 13: {
623
+ matchResult = 13;
624
+ break;
625
+ }
626
+ default:
627
+ matchResult = 0;
628
+ }
629
+ }
630
+ switch (matchResult) {
631
+ case 0:
632
+ return "Component columns are used to describe physical components of a experiment, e.g. instrument names, software names, and reagents names.";
633
+ case 1:
634
+ return "Characteristic columns are used for study descriptions and describe inherent properties of the source material, e.g. a certain strain or organism part.";
635
+ case 2:
636
+ return "Use Factor columns to describe independent variables that result in a specific output of your experiment, e.g. the light intensity under which an organism was grown.";
637
+ case 3:
638
+ return "Parameter columns describe steps in your experimental workflow, e.g. the centrifugation time or the temperature used for your assay.";
639
+ case 4:
640
+ return "Defines the protocol type according to your preferred endpoint repository.";
641
+ case 5:
642
+ return "Describe the protocol in free text.";
643
+ case 6:
644
+ return "Web or local address where the in-depth protocol is stored.";
645
+ case 7:
646
+ return "Defines the protocol version.";
647
+ case 8:
648
+ return "Defines the protocol name.";
649
+ case 9:
650
+ return "Defines the protocol performer.";
651
+ case 10:
652
+ return "Defines the date the protocol was performed.";
653
+ case 11:
654
+ return "Only one input column per table. E.g. experimental samples or files.";
655
+ case 12:
656
+ return "Only one output column per table. E.g. experimental samples or files.";
657
+ case 13:
658
+ return "Placeholder";
659
+ default:
660
+ throw new Error(`Unable to parse combination to existing CompositeHeader: \`${header}\``);
661
+ }
662
+ }
353
663
  }
354
664
 
355
665
  export function CompositeHeader_$reflection() {
package/ISA/ISA/Helper.js CHANGED
@@ -1,5 +1,6 @@
1
- import { isIterable, defaultOf, structuralHash, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
2
- import { value as value_1, some } from "../../fable_modules/fable-library.4.1.4/Option.js";
1
+ import { some, value as value_1 } from "../../fable_modules/fable-library.4.1.4/Option.js";
2
+ import { isIterable, defaultOf, structuralHash, equals, numberHash, identityHash } from "../../fable_modules/fable-library.4.1.4/Util.js";
3
+ import { exactlyOne, partition, fold } from "../../fable_modules/fable-library.4.1.4/Array.js";
3
4
  import { empty, singleton, append, head, tail, isEmpty } from "../../fable_modules/fable-library.4.1.4/List.js";
4
5
  import { Dictionary } from "../../fable_modules/fable-library.4.1.4/MutableMap.js";
5
6
  import { isEmpty as isEmpty_1, iterate } from "../../fable_modules/fable-library.4.1.4/Seq.js";
@@ -7,7 +8,18 @@ import { tryGetValue, addToDict } from "../../fable_modules/fable-library.4.1.4/
7
8
  import { Union, toString, FSharpRef } from "../../fable_modules/fable-library.4.1.4/Types.js";
8
9
  import { append_generic, distinct_generic, isList_generic, isMap_generic } from "./Fable.js";
9
10
  import { union_type, makeUnion, option_type, makeGenericType, getUnionCases, name, obj_type } from "../../fable_modules/fable-library.4.1.4/Reflection.js";
10
- import { exactlyOne, partition } from "../../fable_modules/fable-library.4.1.4/Array.js";
11
+
12
+ export function HashCodes_boxHashOption(a) {
13
+ let copyOfStruct, copyOfStruct_1;
14
+ return (a != null) ? ((copyOfStruct = value_1(a), identityHash(copyOfStruct))) : ((copyOfStruct_1 = 0, numberHash(copyOfStruct_1)));
15
+ }
16
+
17
+ export function HashCodes_boxHashArray(a) {
18
+ return fold((acc, o) => {
19
+ let copyOfStruct;
20
+ return ((-1640531527 + ((copyOfStruct = o, identityHash(copyOfStruct)))) + (acc << 6)) + (acc >> 2);
21
+ }, 0, a);
22
+ }
11
23
 
12
24
  /**
13
25
  * If the value matches the default, a None is returned, else a Some is returned
@@ -1,15 +1,15 @@
1
- import { iterateIndexed, length, sortBy, collect, toArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../../fable_modules/fable-library.4.1.4/List.js";
1
+ import { iterateIndexed, length, ofArray, sortBy, collect, toArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
2
  import { tryParseReferenceColumnHeader } from "../../ISA/Regex.js";
3
3
  import { map as map_1, toList, tryFind } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
4
4
  import { toFsColumns, fixDeprecatedIOHeader, fromFsColumns } from "./CompositeColumn.js";
5
5
  import { ArcTable } from "../../ISA/ArcTypes/ArcTable.js";
6
- import { FsWorksheet } from "../../../fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js";
6
+ import { FsWorksheet } from "../../../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
7
7
  import { comparePrimitives } from "../../../fable_modules/fable-library.4.1.4/Util.js";
8
- import { FsRangeAddress_$ctor_7E77A4A0 } from "../../../fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js";
9
- import { FsAddress_$ctor_Z37302880 } from "../../../fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js";
10
- import { Dictionary_tryGet } from "../../../fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js";
8
+ import { FsRangeAddress_$ctor_7E77A4A0 } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeAddress.fs.js";
9
+ import { FsAddress_$ctor_Z37302880 } from "../../../fable_modules/FsSpreadsheet.5.0.0/FsAddress.fs.js";
10
+ import { Dictionary_tryGet } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCellsCollection.fs.js";
11
11
  import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
12
- import { FsRangeBase__Cell_Z3407A44B } from "../../../fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js";
12
+ import { FsRangeBase__Cell_Z3407A44B } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeBase.fs.js";
13
13
 
14
14
  /**
15
15
  * Iterates over elements of the input list and groups adjacent elements.
@@ -63,8 +63,9 @@ export function classifyColumnOrder(column) {
63
63
 
64
64
  export function groupColumnsByHeader(columns) {
65
65
  return Aux_List_groupWhen((c) => {
66
- if (tryParseReferenceColumnHeader(c.Item(1).Value) == null) {
67
- return !(c.Item(1).Value.indexOf("Unit") === 0);
66
+ const v = c.Item(1).ValueAsString();
67
+ if (tryParseReferenceColumnHeader(v) == null) {
68
+ return !(v.indexOf("Unit") === 0);
68
69
  }
69
70
  else {
70
71
  return false;
@@ -104,7 +105,7 @@ export function tryFromFsWorksheet(sheet) {
104
105
  export function toFsWorksheet(table) {
105
106
  const stringCount = new Map([]);
106
107
  const ws = new FsWorksheet(table.Name);
107
- const columns = collect(toFsColumns, sortBy(classifyColumnOrder, table.Columns, {
108
+ const columns = collect(toFsColumns, sortBy(classifyColumnOrder, ofArray(table.Columns), {
108
109
  Compare: comparePrimitives,
109
110
  }));
110
111
  const maxRow = length(head(columns)) | 0;
@@ -113,20 +114,21 @@ export function toFsWorksheet(table) {
113
114
  iterateIndexed((colI, col) => {
114
115
  iterateIndexed((rowI, cell) => {
115
116
  let value;
117
+ const v = cell.ValueAsString();
116
118
  if (rowI === 0) {
117
- const matchValue = Dictionary_tryGet(cell.Value, stringCount);
119
+ const matchValue = Dictionary_tryGet(v, stringCount);
118
120
  if (matchValue == null) {
119
- addToDict(stringCount, cell.Value, "");
120
- value = cell.Value;
121
+ addToDict(stringCount, cell.ValueAsString(), "");
122
+ value = v;
121
123
  }
122
124
  else {
123
125
  const spaces = matchValue;
124
- stringCount.set(cell.Value, spaces + " ");
125
- value = ((cell.Value + " ") + spaces);
126
+ stringCount.set(v, spaces + " ");
127
+ value = ((v + " ") + spaces);
126
128
  }
127
129
  }
128
130
  else {
129
- value = cell.Value;
131
+ value = v;
130
132
  }
131
133
  const address = FsAddress_$ctor_Z37302880(rowI + 1, colI + 1);
132
134
  FsRangeBase__Cell_Z3407A44B(fsTable, address, ws.CellCollection).SetValueAs(value);
@@ -1,10 +1,10 @@
1
1
  import { singleton, ofArray, head, tail, isEmpty, map } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
2
  import { CompositeCell } from "../../ISA/ArcTypes/CompositeCell.js";
3
3
  import { printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
4
- import { FsCell } from "../../../fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js";
4
+ import { FsCell } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js";
5
5
 
6
6
  export function fromFsCells(cells) {
7
- const cellValues = map((c) => c.Value, cells);
7
+ const cellValues = map((c) => c.ValueAsString(), cells);
8
8
  let matchResult, v, v1, v2, v3, v1_1, v2_1, v3_1, v4;
9
9
  if (!isEmpty(cellValues)) {
10
10
  if (!isEmpty(tail(cellValues))) {
@@ -2,9 +2,9 @@ import { CompositeHeader, IOType } from "../../ISA/ArcTypes/CompositeHeader.js";
2
2
  import { toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
3
3
  import { toFsCells, fromFsCells } from "./CompositeHeader.js";
4
4
  import { singleton as singleton_1, ofArray, item, map } from "../../../fable_modules/fable-library.4.1.4/List.js";
5
- import { FsAddress__get_RowNumber } from "../../../fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js";
6
- import { FsRangeAddress__get_LastAddress } from "../../../fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js";
7
- import { FsRangeBase__get_RangeAddress } from "../../../fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js";
5
+ import { FsAddress__get_RowNumber } from "../../../fable_modules/FsSpreadsheet.5.0.0/FsAddress.fs.js";
6
+ import { FsRangeAddress__get_LastAddress } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeAddress.fs.js";
7
+ import { FsRangeBase__get_RangeAddress } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeBase.fs.js";
8
8
  import { singleton, append, toList, exists, map as map_1, delay, toArray } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
9
9
  import { toFsCells as toFsCells_1, fromFsCells as fromFsCells_1 } from "./CompositeCell.js";
10
10
  import { rangeDouble } from "../../../fable_modules/fable-library.4.1.4/Range.js";
@@ -19,7 +19,7 @@ import { map as map_2 } from "../../../fable_modules/fable-library.4.1.4/Array.j
19
19
  * A "Source Name" column will now be mapped to the propper "Input [Source Name]", and all other IO types will be mapped to "Output [<IO Type>]".
20
20
  */
21
21
  export function fixDeprecatedIOHeader(col) {
22
- const matchValue = IOType.ofString(col.Item(1).Value);
22
+ const matchValue = IOType.ofString(col.Item(1).ValueAsString());
23
23
  switch (matchValue.tag) {
24
24
  case 6:
25
25
  return col;
@@ -3,7 +3,7 @@ import { singleton, tail, head, isEmpty, map } from "../../../fable_modules/fabl
3
3
  import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
4
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 "../../ISA/Regex.js";
5
5
  import { IOType, CompositeHeader } from "../../ISA/ArcTypes/CompositeHeader.js";
6
- import { FsCell } from "../../../fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js";
6
+ import { FsCell } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js";
7
7
  import { toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
8
8
  import { empty, singleton as singleton_1, append, delay, toList } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
9
9
 
@@ -22,7 +22,7 @@ export function ActivePattern_mergeIDInfo(idSpace1, localID1, idSpace2, localID2
22
22
 
23
23
  export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
24
24
  const $007CAC$007C_$007C = categoryParser;
25
- const cellValues = map((c) => c.Value, cells);
25
+ const cellValues = map((c) => c.ValueAsString(), cells);
26
26
  let matchResult, name;
27
27
  if (!isEmpty(cellValues)) {
28
28
  const activePatternResult = $007CAC$007C_$007C(head(cellValues));
@@ -234,7 +234,7 @@ export function ActivePattern_$007CComponent$007C_$007C(cells) {
234
234
  }
235
235
 
236
236
  export function ActivePattern_$007CInput$007C_$007C(cells) {
237
- const cellValues = map((c) => c.Value, cells);
237
+ const cellValues = map((c) => c.ValueAsString(), cells);
238
238
  let matchResult, ioType;
239
239
  if (!isEmpty(cellValues)) {
240
240
  const activePatternResult = ActivePatterns_$007CInputColumnHeader$007C_$007C(head(cellValues));
@@ -263,7 +263,7 @@ export function ActivePattern_$007CInput$007C_$007C(cells) {
263
263
  }
264
264
 
265
265
  export function ActivePattern_$007COutput$007C_$007C(cells) {
266
- const cellValues = map((c) => c.Value, cells);
266
+ const cellValues = map((c) => c.ValueAsString(), cells);
267
267
  let matchResult, ioType;
268
268
  if (!isEmpty(cellValues)) {
269
269
  const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(head(cellValues));
@@ -292,7 +292,7 @@ export function ActivePattern_$007COutput$007C_$007C(cells) {
292
292
  }
293
293
 
294
294
  export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
295
- const cellValues = map((c) => c.Value, cells);
295
+ const cellValues = map((c) => c.ValueAsString(), cells);
296
296
  let matchResult;
297
297
  if (!isEmpty(cellValues)) {
298
298
  switch (head(cellValues)) {
@@ -382,7 +382,7 @@ export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
382
382
  }
383
383
 
384
384
  export function ActivePattern_$007CFreeText$007C_$007C(cells) {
385
- const cellValues = map((c) => c.Value, cells);
385
+ const cellValues = map((c) => c.ValueAsString(), cells);
386
386
  let matchResult, text;
387
387
  if (!isEmpty(cellValues)) {
388
388
  if (isEmpty(tail(cellValues))) {
@@ -1,4 +1,4 @@
1
- import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js";
1
+ import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.5.0.0/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.4.1.4/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 { createMissingIdentifier } from "../ISA/Identifier.js";
10
10
  import { defaultArg } from "../../fable_modules/fable-library.4.1.4/Option.js";
11
11
  import { printf, toConsole } from "../../fable_modules/fable-library.4.1.4/String.js";
12
12
  import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
13
- import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js";
13
+ import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorkbook.fs.js";
14
14
 
15
15
  export function toMetadataSheet(assay) {
16
16
  let assay_1;
@@ -127,14 +127,11 @@ export function fromFsWorkbook(doc) {
127
127
  else {
128
128
  assayMetaData = fromMetadataSheet(matchValue);
129
129
  }
130
- const sheets = choose(tryFromFsWorksheet, doc.GetWorksheets());
131
- if (isEmpty_1(sheets)) {
132
- return assayMetaData;
133
- }
134
- else {
135
- assayMetaData.Tables = Array.from(sheets);
136
- return assayMetaData;
130
+ const tables = choose(tryFromFsWorksheet, doc.GetWorksheets());
131
+ if (!isEmpty_1(tables)) {
132
+ assayMetaData.Tables = Array.from(tables);
137
133
  }
134
+ return assayMetaData;
138
135
  }
139
136
 
140
137
  export function toFsWorkbook(assay) {
@@ -1,7 +1,7 @@
1
1
  import { Record } from "../../fable_modules/fable-library.4.1.4/Types.js";
2
2
  import { record_type, list_type, string_type } from "../../fable_modules/fable-library.4.1.4/Reflection.js";
3
3
  import { Remark, Comment$_$reflection } from "../ISA/JsonTypes/Comment.js";
4
- import { head, tail, isEmpty, ofSeq, concat, unzip, append, toArray, reverse, cons, empty, map, ofArray } from "../../fable_modules/fable-library.4.1.4/List.js";
4
+ import { ofSeq, head, tail, isEmpty, concat, unzip, append, toArray, reverse, cons, empty, map, ofArray } from "../../fable_modules/fable-library.4.1.4/List.js";
5
5
  import { Remark_wrapRemark, Comment_toString, Comment_fromString } from "./Metadata/Comment.js";
6
6
  import { SparseRowModule_writeToSheet, SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_tryGetValueAt, SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValueDefault_5BAE6133 } from "./Metadata/SparseTable.js";
7
7
  import { addToDict } from "../../fable_modules/fable-library.4.1.4/MapUtil.js";
@@ -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, collect, singleton, append as append_1, delay } from "../../fable_modules/fable-library.4.1.4/Seq.js";
18
18
  import { tryFind, ofList } from "../../fable_modules/fable-library.4.1.4/Map.js";
19
19
  import { printf, toFail } from "../../fable_modules/fable-library.4.1.4/String.js";
20
- import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js";
21
- import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js";
20
+ import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
21
+ import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorkbook.fs.js";
22
22
 
23
23
  export class InvestigationInfo extends Record {
24
24
  constructor(Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Comments) {
@@ -244,7 +244,7 @@ export function fromRows(rows) {
244
244
 
245
245
  export function toRows(investigation) {
246
246
  let remarks, rows;
247
- return (remarks = ofArray(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows_1(ofArray(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z4D87C88C(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofArray(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofArray(investigation.Contacts)), delay(() => collect((study) => append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_4(study, void 0))), ofSeq(investigation.Studies))))))))))))))))))), (() => {
247
+ return (remarks = ofArray(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows_1(ofArray(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z4D87C88C(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofArray(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofArray(investigation.Contacts)), delay(() => collect((study) => append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_4(study, void 0))), investigation.RegisteredStudies)))))))))))))))))), (() => {
248
248
  try {
249
249
  const rm = ofList(map((arg) => Remark.toTuple(arg), remarks), {
250
250
  Compare: comparePrimitives,