@nfdi4plants/arctrl 1.0.0-alpha8 → 1.0.0-alpha9

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.
@@ -1,8 +1,8 @@
1
1
  import { map as map_1, defaultArg, unwrap } from "../../../fable_modules/fable-library.4.1.4/Option.js";
2
- import { ArcTables_updateReferenceTablesBySheets_Z2EE88E97, ArcTables_fromProcesses_134EBDED, ArcTables__get_Tables, ArcTables__GetProcesses, ArcTables__GetRow_Z18115A39, ArcTables__GetRowAt_Z37302880, ArcTables__UpdateRow_1BFE2CFB, ArcTables__UpdateRowAt_1CF7B5DC, ArcTables__RemoveRow_Z18115A39, ArcTables__RemoveRowAt_Z37302880, ArcTables__AddRow_Z16315DE5, ArcTables__AddRowAt_Z12CDB784, ArcTables__GetColumn_Z18115A39, ArcTables__GetColumnAt_Z37302880, ArcTables__UpdateColumn_Z6083042A, ArcTables__UpdateColumnAt_21300791, ArcTables__RemoveColumn_Z18115A39, ArcTables__RemoveColumnAt_Z37302880, ArcTables__AddColumn_1FF50D3C, ArcTables__AddColumnAt_6A9784DB, ArcTables__RenameTable_Z384F8060, ArcTables__RenameTableAt_Z176EF219, ArcTables__MapTable_27DD7B1B, ArcTables__MapTableAt_8FC095C, ArcTables__RemoveTable_Z721C83C5, ArcTables__RemoveTableAt_Z524259A4, ArcTables__SetTable_51766571, ArcTables__SetTableAt_7E571736, ArcTables__UpdateTable_51766571, ArcTables__UpdateTableAt_7E571736, ArcTables__GetTable_Z721C83C5, ArcTables__GetTableAt_Z524259A4, ArcTables__InitTables_7B28792B, ArcTables__InitTable_3B406CA4, ArcTables__AddTables_Z2D453886, ArcTables__AddTable_EC12B15, ArcTables__get_TableNames, ArcTables_$ctor_Z18C2F36D, ArcTables__get_Count } from "./ArcTables.js";
3
- import { concat, tryFind, removeAt, tryFindIndex, item, map as map_2, delay, toList, fold, length, forAll, contains, filter, toArray } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
2
+ import { ArcTablesAux_applyIOMap, ArcTablesAux_getIOMap, ArcTables_updateReferenceTablesBySheets_Z2EE88E97, ArcTables_fromProcesses_134EBDED, ArcTables__get_Tables, ArcTables__GetProcesses, ArcTables__GetRow_Z18115A39, ArcTables__GetRowAt_Z37302880, ArcTables__UpdateRow_1BFE2CFB, ArcTables__UpdateRowAt_1CF7B5DC, ArcTables__RemoveRow_Z18115A39, ArcTables__RemoveRowAt_Z37302880, ArcTables__AddRow_Z16315DE5, ArcTables__AddRowAt_Z12CDB784, ArcTables__GetColumn_Z18115A39, ArcTables__GetColumnAt_Z37302880, ArcTables__UpdateColumn_Z6083042A, ArcTables__UpdateColumnAt_21300791, ArcTables__RemoveColumn_Z18115A39, ArcTables__RemoveColumnAt_Z37302880, ArcTables__AddColumn_1FF50D3C, ArcTables__AddColumnAt_6A9784DB, ArcTables__RenameTable_Z384F8060, ArcTables__RenameTableAt_Z176EF219, ArcTables__MapTable_27DD7B1B, ArcTables__MapTableAt_8FC095C, ArcTables__RemoveTable_Z721C83C5, ArcTables__RemoveTableAt_Z524259A4, ArcTables__SetTable_51766571, ArcTables__SetTableAt_7E571736, ArcTables__UpdateTable_51766571, ArcTables__UpdateTableAt_7E571736, ArcTables__GetTable_Z721C83C5, ArcTables__GetTableAt_Z524259A4, ArcTables__InitTables_7B28792B, ArcTables__InitTable_3B406CA4, ArcTables__AddTables_Z2D453886, ArcTables__AddTable_EC12B15, ArcTables__get_TableNames, ArcTables_$ctor_Z18C2F36D, ArcTables__get_Count } from "./ArcTables.js";
3
+ import { concat, collect, append as append_4, tryFind, removeAt, tryFindIndex, item, map as map_2, delay, toList, fold, length, forAll, contains, filter, toArray } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
4
4
  import { defaultOf, safeHash, equals, disposeSafe, getEnumerator, stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
5
- import { tryFind as tryFind_1, removeInPlace, equalsWith, append as append_3, contains as contains_1, map } from "../../../fable_modules/fable-library.4.1.4/Array.js";
5
+ import { addRangeInPlace, tryFind as tryFind_1, removeInPlace, equalsWith, append as append_3, contains as contains_1, map } from "../../../fable_modules/fable-library.4.1.4/Array.js";
6
6
  import { distinctBy, Array_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
7
7
  import { printf, toText } from "../../../fable_modules/fable-library.4.1.4/String.js";
8
8
  import { create, match } from "../../../fable_modules/fable-library.4.1.4/RegExp.js";
@@ -10,7 +10,7 @@ import { OntologyAnnotation } from "../JsonTypes/OntologyAnnotation.js";
10
10
  import { Value_fromString_Z721C83C5, Value__get_Text } from "../JsonTypes/Value.js";
11
11
  import { AnnotationValue } from "../JsonTypes/AnnotationValue.js";
12
12
  import { AssayMaterials_get_empty, AssayMaterials_create_Z253F0553 } from "../JsonTypes/AssayMaterials.js";
13
- import { Option_fromValueWithDefault } from "../Helper.js";
13
+ import { HashCodes_boxHashOption, HashCodes_boxHashArray, Option_fromValueWithDefault } from "../Helper.js";
14
14
  import { unzip, ofSeq, map as map_3, toArray as toArray_1, ofArray, empty } from "../../../fable_modules/fable-library.4.1.4/List.js";
15
15
  import { getSources, getProtocols, getUnits, getCharacteristics, getData, getMaterials, getSamples } from "../JsonTypes/ProcessSequence.js";
16
16
  import { Assay_create_3D372A24 } from "../JsonTypes/Assay.js";
@@ -502,7 +502,11 @@ export class ArcAssay {
502
502
  }
503
503
  const nextComments = map((c) => c.Copy(), this$.Comments);
504
504
  const nextPerformers = map((c_1) => c_1.Copy(), this$.Performers);
505
- return new ArcAssay(this$.Identifier, unwrap(this$.MeasurementType), unwrap(this$.TechnologyType), unwrap(this$.TechnologyPlatform), nextTables, nextPerformers, nextComments);
505
+ const arg = this$.Identifier;
506
+ const arg_1 = this$.MeasurementType;
507
+ const arg_2 = this$.TechnologyType;
508
+ const arg_3 = this$.TechnologyPlatform;
509
+ return ArcAssay.make(arg, arg_1, arg_2, arg_3, nextTables, nextPerformers, nextComments);
506
510
  }
507
511
  UpdateBy(assay, onlyReplaceExisting, appendSequences) {
508
512
  const this$ = this;
@@ -673,6 +677,10 @@ export class ArcAssay {
673
677
  const this$ = this;
674
678
  return (other instanceof ArcAssay) && ((assay = other, this$.StructurallyEquals(assay)));
675
679
  }
680
+ GetHashCode() {
681
+ const this$ = this;
682
+ return HashCodes_boxHashArray([this$.Identifier, HashCodes_boxHashOption(this$.MeasurementType), HashCodes_boxHashOption(this$.TechnologyType), HashCodes_boxHashOption(this$.TechnologyPlatform), HashCodes_boxHashArray(Array.from(this$.Tables)), HashCodes_boxHashArray(this$.Performers), HashCodes_boxHashArray(this$.Comments)]) | 0;
683
+ }
676
684
  }
677
685
 
678
686
  export function ArcAssay_$reflection() {
@@ -692,7 +700,7 @@ export class ArcStudy {
692
700
  const registeredAssayIdentifiers_1 = defaultArg(registeredAssayIdentifiers, []);
693
701
  const factors_1 = defaultArg(factors, []);
694
702
  const comments_1 = defaultArg(comments, []);
695
- this["identifier@641"] = identifier;
703
+ this["identifier@653"] = identifier;
696
704
  this.investigation = void 0;
697
705
  this["Title@"] = title;
698
706
  this["Description@"] = description;
@@ -708,11 +716,11 @@ export class ArcStudy {
708
716
  }
709
717
  get Identifier() {
710
718
  const this$ = this;
711
- return this$["identifier@641"];
719
+ return this$["identifier@653"];
712
720
  }
713
721
  set Identifier(i) {
714
722
  const this$ = this;
715
- this$["identifier@641"] = i;
723
+ this$["identifier@653"] = i;
716
724
  }
717
725
  get Investigation() {
718
726
  const this$ = this;
@@ -1350,7 +1358,12 @@ export class ArcStudy {
1350
1358
  const nextContacts = map((c_2) => c_2.Copy(), this$.Contacts);
1351
1359
  const nextPublications = map((c_3) => c_3.Copy(), this$.Publications);
1352
1360
  const nextStudyDesignDescriptors = map((c_4) => c_4.Copy(), this$.StudyDesignDescriptors);
1353
- return new ArcStudy(this$.Identifier, unwrap(this$.Title), unwrap(this$.Description), unwrap(this$.SubmissionDate), unwrap(this$.PublicReleaseDate), nextPublications, nextContacts, nextStudyDesignDescriptors, nextTables, nextAssayIdentifiers, nextFactors, nextComments);
1361
+ const arg = this$.Identifier;
1362
+ const arg_1 = this$.Title;
1363
+ const arg_2 = this$.Description;
1364
+ const arg_3 = this$.SubmissionDate;
1365
+ const arg_4 = this$.PublicReleaseDate;
1366
+ return ArcStudy.make(arg, arg_1, arg_2, arg_3, arg_4, nextPublications, nextContacts, nextStudyDesignDescriptors, nextTables, nextAssayIdentifiers, nextFactors, nextComments);
1354
1367
  }
1355
1368
  UpdateReferenceByStudyFile(study, onlyReplaceExisting, keepUnusedRefTables) {
1356
1369
  const this$ = this;
@@ -1478,6 +1491,10 @@ export class ArcStudy {
1478
1491
  const this$ = this;
1479
1492
  return (other instanceof ArcStudy) && ((s = other, this$.StructurallyEquals(s)));
1480
1493
  }
1494
+ GetHashCode() {
1495
+ const this$ = this;
1496
+ return HashCodes_boxHashArray([this$.Identifier, HashCodes_boxHashOption(this$.Title), HashCodes_boxHashOption(this$.Description), HashCodes_boxHashOption(this$.SubmissionDate), HashCodes_boxHashOption(this$.PublicReleaseDate), HashCodes_boxHashArray(this$.Publications), HashCodes_boxHashArray(this$.Contacts), HashCodes_boxHashArray(this$.StudyDesignDescriptors), HashCodes_boxHashArray(Array.from(this$.Tables)), HashCodes_boxHashArray(Array.from(this$.RegisteredAssayIdentifiers)), HashCodes_boxHashArray(this$.Factors), HashCodes_boxHashArray(this$.Comments)]) | 0;
1497
+ }
1481
1498
  }
1482
1499
 
1483
1500
  export function ArcStudy_$reflection() {
@@ -1524,7 +1541,7 @@ export class ArcInvestigation {
1524
1541
  const registeredStudyIdentifiers_1 = defaultArg(registeredStudyIdentifiers, []);
1525
1542
  const comments_1 = defaultArg(comments, []);
1526
1543
  const remarks_1 = defaultArg(remarks, []);
1527
- this["identifier@1292"] = identifier;
1544
+ this["identifier@1321"] = identifier;
1528
1545
  this["Title@"] = title;
1529
1546
  this["Description@"] = description;
1530
1547
  this["SubmissionDate@"] = submissionDate;
@@ -1537,15 +1554,15 @@ export class ArcInvestigation {
1537
1554
  this["RegisteredStudyIdentifiers@"] = registeredStudyIdentifiers_1;
1538
1555
  this["Comments@"] = comments_1;
1539
1556
  this["Remarks@"] = remarks_1;
1540
- this["init@1273"] = 1;
1557
+ this["init@1302"] = 1;
1541
1558
  }
1542
1559
  get Identifier() {
1543
1560
  const this$ = this;
1544
- return this$["identifier@1292"];
1561
+ return this$["identifier@1321"];
1545
1562
  }
1546
1563
  set Identifier(i) {
1547
1564
  const this$ = this;
1548
- this$["identifier@1292"] = i;
1565
+ this$["identifier@1321"] = i;
1549
1566
  }
1550
1567
  get Title() {
1551
1568
  const __ = this;
@@ -2012,6 +2029,54 @@ export class ArcInvestigation {
2012
2029
  return copy;
2013
2030
  };
2014
2031
  }
2032
+ GetAllPersons() {
2033
+ const this$ = this;
2034
+ const persons = [];
2035
+ let enumerator = getEnumerator(this$.Assays);
2036
+ try {
2037
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
2038
+ const a = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
2039
+ addRangeInPlace(a.Performers, persons);
2040
+ }
2041
+ }
2042
+ finally {
2043
+ disposeSafe(enumerator);
2044
+ }
2045
+ let enumerator_1 = getEnumerator(this$.Studies);
2046
+ try {
2047
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
2048
+ const s = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
2049
+ addRangeInPlace(s.Contacts, persons);
2050
+ }
2051
+ }
2052
+ finally {
2053
+ disposeSafe(enumerator_1);
2054
+ }
2055
+ addRangeInPlace(this$.Contacts, persons);
2056
+ return Array_distinct(Array.from(persons), {
2057
+ Equals: equals,
2058
+ GetHashCode: safeHash,
2059
+ });
2060
+ }
2061
+ GetAllPublications() {
2062
+ const this$ = this;
2063
+ const pubs = [];
2064
+ let enumerator = getEnumerator(this$.Studies);
2065
+ try {
2066
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
2067
+ const s = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
2068
+ addRangeInPlace(s.Publications, pubs);
2069
+ }
2070
+ }
2071
+ finally {
2072
+ disposeSafe(enumerator);
2073
+ }
2074
+ addRangeInPlace(this$.Publications, pubs);
2075
+ return Array_distinct(Array.from(pubs), {
2076
+ Equals: equals,
2077
+ GetHashCode: safeHash,
2078
+ });
2079
+ }
2015
2080
  DeregisterMissingAssays() {
2016
2081
  const this$ = this;
2017
2082
  const inv = this$;
@@ -2048,6 +2113,31 @@ export class ArcInvestigation {
2048
2113
  return copy;
2049
2114
  };
2050
2115
  }
2116
+ UpdateIOTypeByEntityID() {
2117
+ let arg;
2118
+ const this$ = this;
2119
+ const ioMap = ArcTablesAux_getIOMap((arg = toList(delay(() => append_4(collect((study) => study.Tables, this$.Studies), delay(() => collect((assay) => assay.Tables, this$.Assays))))), Array.from(arg)));
2120
+ let enumerator = getEnumerator(this$.Studies);
2121
+ try {
2122
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
2123
+ const study_1 = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
2124
+ ArcTablesAux_applyIOMap(ioMap, study_1.Tables);
2125
+ }
2126
+ }
2127
+ finally {
2128
+ disposeSafe(enumerator);
2129
+ }
2130
+ let enumerator_1 = getEnumerator(this$.Assays);
2131
+ try {
2132
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
2133
+ const assay_1 = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
2134
+ ArcTablesAux_applyIOMap(ioMap, assay_1.Tables);
2135
+ }
2136
+ }
2137
+ finally {
2138
+ disposeSafe(enumerator_1);
2139
+ }
2140
+ }
2051
2141
  Copy() {
2052
2142
  const this$ = this;
2053
2143
  const nextAssays = [];
@@ -2175,6 +2265,10 @@ export class ArcInvestigation {
2175
2265
  const this$ = this;
2176
2266
  return (other instanceof ArcInvestigation) && ((i = other, this$.StructurallyEquals(i)));
2177
2267
  }
2268
+ GetHashCode() {
2269
+ const this$ = this;
2270
+ return HashCodes_boxHashArray([this$.Identifier, HashCodes_boxHashOption(this$.Title), HashCodes_boxHashOption(this$.Description), HashCodes_boxHashOption(this$.SubmissionDate), HashCodes_boxHashOption(this$.PublicReleaseDate), HashCodes_boxHashArray(this$.Publications), HashCodes_boxHashArray(this$.Contacts), HashCodes_boxHashArray(this$.OntologySourceReferences), HashCodes_boxHashArray(Array.from(this$.Assays)), HashCodes_boxHashArray(Array.from(this$.Studies)), HashCodes_boxHashArray(Array.from(this$.RegisteredStudyIdentifiers)), HashCodes_boxHashArray(this$.Comments), HashCodes_boxHashArray(this$.Remarks)]) | 0;
2271
+ }
2178
2272
  }
2179
2273
 
2180
2274
  export function ArcInvestigation_$reflection() {
@@ -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,4 +1,4 @@
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";
@@ -104,7 +104,7 @@ export function tryFromFsWorksheet(sheet) {
104
104
  export function toFsWorksheet(table) {
105
105
  const stringCount = new Map([]);
106
106
  const ws = new FsWorksheet(table.Name);
107
- const columns = collect(toFsColumns, sortBy(classifyColumnOrder, table.Columns, {
107
+ const columns = collect(toFsColumns, sortBy(classifyColumnOrder, ofArray(table.Columns), {
108
108
  Compare: comparePrimitives,
109
109
  }));
110
110
  const maxRow = length(head(columns)) | 0;
@@ -11,6 +11,7 @@ import { Process_decoder, Process_encoder } from "../ISA/ISA.Json/Process.js";
11
11
  import { map as map_1, delay, toList } from "../fable_modules/fable-library.4.1.4/Seq.js";
12
12
  import { ArcTables_fromProcesses_134EBDED, ArcTables__get_Item_Z524259A4 } from "../ISA/ISA/ArcTypes/ArcTables.js";
13
13
  import { printf, toFail } from "../fable_modules/fable-library.4.1.4/String.js";
14
+ import { FSharpMap__get_Values } from "../fable_modules/fable-library.4.1.4/Map.js";
14
15
  import { defaultArg } from "../fable_modules/fable-library.4.1.4/Option.js";
15
16
 
16
17
  export const Organisation_encode = toString;
@@ -69,7 +70,7 @@ export function Templates_fromJsonString(jsonString) {
69
70
  return toFail(printf("Error. Given json string cannot be parsed to Templates map: %A"))(matchValue.fields[0]);
70
71
  }
71
72
  else {
72
- return matchValue.fields[0];
73
+ return Array.from(FSharpMap__get_Values(matchValue.fields[0]));
73
74
  }
74
75
  }
75
76
 
@@ -17,7 +17,7 @@ export class JsWeb {
17
17
  constructor() {
18
18
  }
19
19
  static getTemplates(url) {
20
- return startAsPromise(singleton.Delay(() => singleton.Bind(getTemplates(url), (_arg) => singleton.Return(new Map(_arg)))));
20
+ return startAsPromise(singleton.Delay(() => singleton.Bind(getTemplates(url), (_arg) => singleton.Return(_arg))));
21
21
  }
22
22
  }
23
23