@nfdi4plants/arctrl 1.0.0-alpha7 → 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.
- package/{ARCtrl.js → ARC.js} +7 -2
- package/ISA/ISA/ArcTypes/ArcTable.js +141 -37
- package/ISA/ISA/ArcTypes/ArcTableAux.js +13 -14
- package/ISA/ISA/ArcTypes/ArcTables.js +114 -15
- package/ISA/ISA/ArcTypes/ArcTypes.js +276 -13
- package/ISA/ISA/ArcTypes/CompositeColumn.js +7 -1
- package/ISA/ISA/ArcTypes/CompositeHeader.js +311 -1
- package/ISA/ISA/Helper.js +15 -3
- package/ISA/ISA/Regex.js +1 -1
- package/ISA/ISA.Json/Assay.js +7 -7
- package/ISA/ISA.Json/Comment.js +7 -7
- package/ISA/ISA.Json/Data.js +10 -10
- package/ISA/ISA.Json/Decode.js +3 -3
- package/ISA/ISA.Json/Factor.js +10 -10
- package/ISA/ISA.Json/Investigation.js +7 -7
- package/ISA/ISA.Json/Material.js +10 -10
- package/ISA/ISA.Json/Ontology.js +7 -7
- package/ISA/ISA.Json/Person.js +7 -7
- package/ISA/ISA.Json/Process.js +16 -16
- package/ISA/ISA.Json/Protocol.js +9 -9
- package/ISA/ISA.Json/Publication.js +7 -7
- package/ISA/ISA.Json/Study.js +7 -7
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +2 -2
- package/Templates/Template.Json.js +7 -6
- package/Templates/Template.Web.js +16 -2
- package/Templates/Templates.js +82 -0
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +13 -0
- package/package.json +4 -2
package/ISA/ISA.Json/Material.js
CHANGED
|
@@ -10,7 +10,7 @@ import { empty, singleton, append, delay, toList } from "../../fable_modules/fab
|
|
|
10
10
|
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
11
11
|
import { tryInclude } from "./GEncode.js";
|
|
12
12
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
|
-
import { hasUnknownFields,
|
|
13
|
+
import { hasUnknownFields, fromJsonString, uri } from "./Decode.js";
|
|
14
14
|
import { MaterialAttribute } from "../ISA/JsonTypes/MaterialAttribute.js";
|
|
15
15
|
import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
16
16
|
import { MaterialAttributeValue } from "../ISA/JsonTypes/MaterialAttributeValue.js";
|
|
@@ -89,11 +89,11 @@ export function MaterialAttribute_decoder(options) {
|
|
|
89
89
|
}, path, v));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
export function
|
|
93
|
-
return
|
|
92
|
+
export function MaterialAttribute_fromJsonString(s) {
|
|
93
|
+
return fromJsonString(uncurry2(MaterialAttribute_decoder(ConverterOptions_$ctor())), s);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export function
|
|
96
|
+
export function MaterialAttribute_toJsonString(m) {
|
|
97
97
|
return toString(2, MaterialAttribute_encoder(ConverterOptions_$ctor(), m));
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -144,11 +144,11 @@ export function MaterialAttributeValue_decoder(options) {
|
|
|
144
144
|
}, path, v));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
export function
|
|
148
|
-
return
|
|
147
|
+
export function MaterialAttributeValue_fromJsonString(s) {
|
|
148
|
+
return fromJsonString(uncurry2(MaterialAttributeValue_decoder(ConverterOptions_$ctor())), s);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
export function
|
|
151
|
+
export function MaterialAttributeValue_toJsonString(m) {
|
|
152
152
|
return toString(2, MaterialAttributeValue_encoder(ConverterOptions_$ctor(), m));
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -214,12 +214,12 @@ export function Material_decoder(options, s, json) {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
export function
|
|
217
|
+
export function Material_fromJsonString(s) {
|
|
218
218
|
let options;
|
|
219
|
-
return
|
|
219
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Material_decoder(options, s_1, json)))), s);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
export function
|
|
222
|
+
export function Material_toJsonString(m) {
|
|
223
223
|
return toString(2, Material_encoder(ConverterOptions_$ctor(), m));
|
|
224
224
|
}
|
|
225
225
|
|
package/ISA/ISA.Json/Ontology.js
CHANGED
|
@@ -9,7 +9,7 @@ import { empty, singleton, append, delay, toList } from "../../fable_modules/fab
|
|
|
9
9
|
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
10
10
|
import { tryInclude } from "./GEncode.js";
|
|
11
11
|
import { decoder as decoder_1, encoder } from "./Comment.js";
|
|
12
|
-
import {
|
|
12
|
+
import { fromJsonString, uri } from "./Decode.js";
|
|
13
13
|
import { OntologySourceReference } from "../ISA/JsonTypes/OntologySourceReference.js";
|
|
14
14
|
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
15
15
|
import { OntologyAnnotation } from "../ISA/JsonTypes/OntologyAnnotation.js";
|
|
@@ -111,11 +111,11 @@ export function OntologySourceReference_decoder(options) {
|
|
|
111
111
|
}, path_4, v));
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
export function
|
|
115
|
-
return
|
|
114
|
+
export function OntologySourceReference_fromJsonString(s) {
|
|
115
|
+
return fromJsonString(uncurry2(OntologySourceReference_decoder(ConverterOptions_$ctor())), s);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export function
|
|
118
|
+
export function OntologySourceReference_toJsonString(oa) {
|
|
119
119
|
return toString(2, OntologySourceReference_encoder(ConverterOptions_$ctor(), oa));
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -186,11 +186,11 @@ export function OntologyAnnotation_decoder(options) {
|
|
|
186
186
|
}, path_3, v));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
export function
|
|
190
|
-
return
|
|
189
|
+
export function OntologyAnnotation_fromJsonString(s) {
|
|
190
|
+
return fromJsonString(uncurry2(OntologyAnnotation_decoder(ConverterOptions_$ctor())), s);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
export function
|
|
193
|
+
export function OntologyAnnotation_toJsonString(oa) {
|
|
194
194
|
return toString(2, OntologyAnnotation_encoder(ConverterOptions_$ctor(), oa));
|
|
195
195
|
}
|
|
196
196
|
|
package/ISA/ISA.Json/Person.js
CHANGED
|
@@ -2,7 +2,7 @@ import { tryPick } from "../../fable_modules/fable-library.4.1.4/Array.js";
|
|
|
2
2
|
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
3
3
|
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
4
4
|
import { Person } from "../ISA/JsonTypes/Person.js";
|
|
5
|
-
import { toString
|
|
5
|
+
import { toString, nil, object as object_22 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
6
6
|
import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
7
7
|
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
8
8
|
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
@@ -11,7 +11,7 @@ import { tryInclude } from "./GEncode.js";
|
|
|
11
11
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
12
12
|
import { decoder as decoder_3, encoder as encoder_1 } from "./Comment.js";
|
|
13
13
|
import { array as array_1, string, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
14
|
-
import {
|
|
14
|
+
import { fromJsonString as fromJsonString_1, uri } from "./Decode.js";
|
|
15
15
|
|
|
16
16
|
export function genID(p) {
|
|
17
17
|
const matchValue = p.ID;
|
|
@@ -186,12 +186,12 @@ export function decoder(options) {
|
|
|
186
186
|
}, path_10, v));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
export function
|
|
190
|
-
return
|
|
189
|
+
export function fromJsonString(s) {
|
|
190
|
+
return fromJsonString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
export function
|
|
194
|
-
return
|
|
193
|
+
export function toJsonString(p) {
|
|
194
|
+
return toString(2, encoder(ConverterOptions_$ctor(), p));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/**
|
|
@@ -199,6 +199,6 @@ export function toString(p) {
|
|
|
199
199
|
*/
|
|
200
200
|
export function toStringLD(p) {
|
|
201
201
|
let returnVal;
|
|
202
|
-
return
|
|
202
|
+
return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
203
203
|
}
|
|
204
204
|
|
package/ISA/ISA.Json/Process.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
|
12
12
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
13
|
import { list as list_1, string, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
14
14
|
import { ProcessParameterValue } from "../ISA/JsonTypes/ProcessParameterValue.js";
|
|
15
|
-
import { uri,
|
|
15
|
+
import { uri, fromJsonString } from "./Decode.js";
|
|
16
16
|
import { ProcessInput } from "../ISA/JsonTypes/ProcessInput.js";
|
|
17
17
|
import { Data_decoder, Sample_decoder, Source_decoder, Source_encoder, Data_encoder, Sample_encoder } from "./Data.js";
|
|
18
18
|
import { Material_decoder, Material_encoder } from "./Material.js";
|
|
@@ -72,11 +72,11 @@ export function ProcessParameterValue_decoder(options) {
|
|
|
72
72
|
}, path, v));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export function
|
|
76
|
-
return
|
|
75
|
+
export function ProcessParameterValue_fromJsonString(s) {
|
|
76
|
+
return fromJsonString(uncurry2(ProcessParameterValue_decoder(ConverterOptions_$ctor())), s);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export function
|
|
79
|
+
export function ProcessParameterValue_toJsonString(p) {
|
|
80
80
|
return toString(2, ProcessParameterValue_encoder(ConverterOptions_$ctor(), p));
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -136,12 +136,12 @@ export function ProcessInput_decoder(options, s, json) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
export function
|
|
139
|
+
export function ProcessInput_fromJsonString(s) {
|
|
140
140
|
let options;
|
|
141
|
-
return
|
|
141
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessInput_decoder(options, s_1, json)))), s);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export function
|
|
144
|
+
export function ProcessInput_toJsonString(m) {
|
|
145
145
|
return toString(2, ProcessInput_encoder(ConverterOptions_$ctor(), m));
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -189,12 +189,12 @@ export function ProcessOutput_decoder(options, s, json) {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
export function
|
|
192
|
+
export function ProcessOutput_fromJsonString(s) {
|
|
193
193
|
let options;
|
|
194
|
-
return
|
|
194
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessOutput_decoder(options, s_1, json)))), s);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
export function
|
|
197
|
+
export function ProcessOutput_toJsonString(m) {
|
|
198
198
|
return toString(2, ProcessOutput_encoder(ConverterOptions_$ctor(), m));
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -255,11 +255,11 @@ export function Process_decoder(options) {
|
|
|
255
255
|
}, path_7, v));
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
export function
|
|
259
|
-
return
|
|
258
|
+
export function Process_fromJsonString(s) {
|
|
259
|
+
return fromJsonString(uncurry2(Process_decoder(ConverterOptions_$ctor())), s);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
export function
|
|
262
|
+
export function Process_toJsonString(p) {
|
|
263
263
|
return toString(2, Process_encoder(ConverterOptions_$ctor(), p));
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -271,12 +271,12 @@ export function Process_toStringLD(p) {
|
|
|
271
271
|
return toString(2, Process_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
export function
|
|
274
|
+
export function ProcessSequence_fromJsonString(s) {
|
|
275
275
|
let decoder;
|
|
276
|
-
return
|
|
276
|
+
return fromJsonString(uncurry2((decoder = Process_decoder(ConverterOptions_$ctor()), (path) => ((value) => list_1(uncurry2(decoder), path, value)))), s);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
export function
|
|
279
|
+
export function ProcessSequence_toJsonString(p) {
|
|
280
280
|
let options;
|
|
281
281
|
return toString(2, list_2(map((options = ConverterOptions_$ctor(), (oa) => Process_encoder(options, oa)), p)));
|
|
282
282
|
}
|
package/ISA/ISA.Json/Protocol.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetI
|
|
|
8
8
|
import { tryInclude } from "./GEncode.js";
|
|
9
9
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
10
10
|
import { list as list_1, string, object as object_19 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
11
|
-
import {
|
|
11
|
+
import { fromJsonString, uri } from "./Decode.js";
|
|
12
12
|
import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
|
|
13
13
|
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
14
14
|
import { Result_Map } from "../../fable_modules/fable-library.4.1.4/Choice.js";
|
|
@@ -74,8 +74,8 @@ export function ProtocolParameter_decoder(options) {
|
|
|
74
74
|
}, path, v));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export function
|
|
78
|
-
return
|
|
77
|
+
export function ProtocolParameter_fromJsonString(s) {
|
|
78
|
+
return fromJsonString(uncurry2(ProtocolParameter_decoder(ConverterOptions_$ctor())), s);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export function ProtocolParameter_toString(p) {
|
|
@@ -140,12 +140,12 @@ export function Component_decoder(options, s, json) {
|
|
|
140
140
|
}, s, json));
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
export function
|
|
143
|
+
export function Component_fromJsonString(s) {
|
|
144
144
|
let options;
|
|
145
|
-
return
|
|
145
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Component_decoder(options, s_1, json)))), s);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
export function
|
|
148
|
+
export function Component_toJsonString(p) {
|
|
149
149
|
return toString(2, Component_encoder(ConverterOptions_$ctor(), p));
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -224,11 +224,11 @@ export function Protocol_decoder(options) {
|
|
|
224
224
|
}, path_6, v));
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
export function
|
|
228
|
-
return
|
|
227
|
+
export function Protocol_fromJsonString(s) {
|
|
228
|
+
return fromJsonString(uncurry2(Protocol_decoder(ConverterOptions_$ctor())), s);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
export function
|
|
231
|
+
export function Protocol_toJsonString(p) {
|
|
232
232
|
return toString(2, Protocol_encoder(ConverterOptions_$ctor(), p));
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
2
|
-
import { toString
|
|
2
|
+
import { toString, nil, object as object_12 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
3
3
|
import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
4
4
|
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
5
5
|
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
@@ -8,7 +8,7 @@ import { tryInclude } from "./GEncode.js";
|
|
|
8
8
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
9
9
|
import { decoder as decoder_2, encoder as encoder_1 } from "./Comment.js";
|
|
10
10
|
import { array, string, object as object_13 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
11
|
-
import {
|
|
11
|
+
import { fromJsonString as fromJsonString_1, uri } from "./Decode.js";
|
|
12
12
|
import { Publication } from "../ISA/JsonTypes/Publication.js";
|
|
13
13
|
|
|
14
14
|
export function genID(p) {
|
|
@@ -74,12 +74,12 @@ export function decoder(options) {
|
|
|
74
74
|
}, path_4, v));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export function
|
|
78
|
-
return
|
|
77
|
+
export function fromJsonString(s) {
|
|
78
|
+
return fromJsonString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export function
|
|
82
|
-
return
|
|
81
|
+
export function toJsonString(p) {
|
|
82
|
+
return toString(2, encoder(ConverterOptions_$ctor(), p));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -87,6 +87,6 @@ export function toString(p) {
|
|
|
87
87
|
*/
|
|
88
88
|
export function toStringLD(p) {
|
|
89
89
|
let returnVal;
|
|
90
|
-
return
|
|
90
|
+
return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
91
91
|
}
|
|
92
92
|
|
package/ISA/ISA.Json/Study.js
CHANGED
|
@@ -18,7 +18,7 @@ import { Process_decoder, Process_encoder } from "./Process.js";
|
|
|
18
18
|
import { Assay_decoder, Assay_encoder } from "./Assay.js";
|
|
19
19
|
import { Factor_decoder, Factor_encoder } from "./Factor.js";
|
|
20
20
|
import { decoder as decoder_12, encoder as encoder_2 } from "./Comment.js";
|
|
21
|
-
import {
|
|
21
|
+
import { fromJsonString, uri } from "./Decode.js";
|
|
22
22
|
import { Study } from "../ISA/JsonTypes/Study.js";
|
|
23
23
|
import { ArcStudy } from "../ISA/ArcTypes/ArcTypes.js";
|
|
24
24
|
|
|
@@ -195,11 +195,11 @@ export function Study_decoder(options) {
|
|
|
195
195
|
}, path_16, v));
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
export function
|
|
199
|
-
return
|
|
198
|
+
export function Study_fromJsonString(s) {
|
|
199
|
+
return fromJsonString(uncurry2(Study_decoder(ConverterOptions_$ctor())), s);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
export function
|
|
202
|
+
export function Study_toJsonString(p) {
|
|
203
203
|
return toString(2, Study_encoder(ConverterOptions_$ctor(), p));
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -211,12 +211,12 @@ export function Study_toStringLD(s) {
|
|
|
211
211
|
return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
export function
|
|
215
|
-
const arg =
|
|
214
|
+
export function ArcStudy_fromJsonString(s) {
|
|
215
|
+
const arg = fromJsonString(uncurry2(Study_decoder(ConverterOptions_$ctor())), s);
|
|
216
216
|
return ArcStudy.fromStudy(arg);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
export function
|
|
219
|
+
export function ArcStudy_toJsonString(a, assays) {
|
|
220
220
|
return toString(2, Study_encoder(ConverterOptions_$ctor(), a.ToStudy(assays)));
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -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;
|
|
@@ -40,7 +41,7 @@ export const Template_decode = (() => {
|
|
|
40
41
|
}, path_10, v));
|
|
41
42
|
})();
|
|
42
43
|
|
|
43
|
-
export function
|
|
44
|
+
export function Template_fromJsonString(jsonString) {
|
|
44
45
|
const matchValue = fromString(uncurry2(Template_decode), jsonString);
|
|
45
46
|
if (matchValue.tag === 1) {
|
|
46
47
|
return toFail(printf("Error. Given json string cannot be parsed to Template: %A"))(matchValue.fields[0]);
|
|
@@ -50,7 +51,7 @@ export function Template_decodeFromString(jsonString) {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
export function
|
|
54
|
+
export function Template_toJsonString(spaces, template) {
|
|
54
55
|
return toString_1(spaces, Template_encode(template));
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -63,22 +64,22 @@ export const Templates_decode = (() => {
|
|
|
63
64
|
return (value) => fromString(uncurry2(d), value);
|
|
64
65
|
})();
|
|
65
66
|
|
|
66
|
-
export function
|
|
67
|
+
export function Templates_fromJsonString(jsonString) {
|
|
67
68
|
const matchValue = Templates_decode(jsonString);
|
|
68
69
|
if (matchValue.tag === 1) {
|
|
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
|
|
|
76
|
-
export function
|
|
77
|
+
export function Templates_toJsonString(spaces, templateList) {
|
|
77
78
|
return toString_1(spaces, Templates_encode(templateList));
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
export function ARCtrl_Template_Template__Template_ToJson_71136F3F(this$, spaces) {
|
|
81
82
|
const spaces_1 = defaultArg(spaces, 0) | 0;
|
|
82
|
-
return (template) =>
|
|
83
|
+
return (template) => Template_toJsonString(spaces_1, template);
|
|
83
84
|
}
|
|
84
85
|
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { defaultArg } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
2
2
|
import { singleton } from "../fable_modules/fable-library.4.1.4/AsyncBuilder.js";
|
|
3
3
|
import { downloadFile } from "../WebRequest/WebRequest.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Templates_fromJsonString } from "./Template.Json.js";
|
|
5
|
+
import { startAsPromise } from "../fable_modules/fable-library.4.1.4/Async.js";
|
|
6
|
+
import { class_type } from "../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
5
7
|
|
|
6
8
|
export function getTemplates(url) {
|
|
7
9
|
const url_1 = defaultArg(url, "https://github.com/nfdi4plants/Swate-templates/releases/download/latest/templates.json");
|
|
8
10
|
return singleton.Delay(() => singleton.Bind(downloadFile(url_1), (_arg) => {
|
|
9
|
-
const mapResult =
|
|
11
|
+
const mapResult = Templates_fromJsonString(_arg);
|
|
10
12
|
return singleton.Return(mapResult);
|
|
11
13
|
}));
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
export class JsWeb {
|
|
17
|
+
constructor() {
|
|
18
|
+
}
|
|
19
|
+
static getTemplates(url) {
|
|
20
|
+
return startAsPromise(singleton.Delay(() => singleton.Bind(getTemplates(url), (_arg) => singleton.Return(_arg))));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function JsWeb_$reflection() {
|
|
25
|
+
return class_type("ARCtrl.Template.Web.JsWeb", void 0, JsWeb);
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defaultArg } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
2
|
+
import { append, addRangeInPlace, collect, contains as contains_1 } from "../fable_modules/fable-library.4.1.4/Array.js";
|
|
3
|
+
import { uncurry2, safeHash, equals } from "../fable_modules/fable-library.4.1.4/Util.js";
|
|
4
|
+
import { Array_distinct } from "../fable_modules/fable-library.4.1.4/Seq2.js";
|
|
5
|
+
import { class_type } from "../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
6
|
+
|
|
7
|
+
export function TemplatesAux_getComparer(matchAll) {
|
|
8
|
+
if (defaultArg(matchAll, false)) {
|
|
9
|
+
return (e) => ((e_1) => (e && e_1));
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return (e_2) => ((e_3) => (e_2 || e_3));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function TemplatesAux_filterOnTags(tagGetter, queryTags, comparer, templates) {
|
|
17
|
+
return templates.filter((t) => {
|
|
18
|
+
const templateTags = tagGetter(t);
|
|
19
|
+
let isValid = void 0;
|
|
20
|
+
for (let idx = 0; idx <= (queryTags.length - 1); idx++) {
|
|
21
|
+
const contains = contains_1(queryTags[idx], templateTags, {
|
|
22
|
+
Equals: equals,
|
|
23
|
+
GetHashCode: safeHash,
|
|
24
|
+
});
|
|
25
|
+
const isValid_1 = isValid;
|
|
26
|
+
if (isValid_1 != null) {
|
|
27
|
+
const maybe = isValid_1;
|
|
28
|
+
isValid = comparer(maybe, contains);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
isValid = contains;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return defaultArg(isValid, false);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class Templates {
|
|
39
|
+
constructor() {
|
|
40
|
+
}
|
|
41
|
+
static getDistinctTags(templates) {
|
|
42
|
+
return Array_distinct(collect((t) => t.Tags, templates), {
|
|
43
|
+
Equals: equals,
|
|
44
|
+
GetHashCode: safeHash,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
static getDistinctEndpointRepositories(templates) {
|
|
48
|
+
return Array_distinct(collect((t) => t.EndpointRepositories, templates), {
|
|
49
|
+
Equals: equals,
|
|
50
|
+
GetHashCode: safeHash,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
static getDistinctOntologyAnnotations(templates) {
|
|
54
|
+
const oas = [];
|
|
55
|
+
for (let idx = 0; idx <= (templates.length - 1); idx++) {
|
|
56
|
+
const t = templates[idx];
|
|
57
|
+
addRangeInPlace(t.Tags, oas);
|
|
58
|
+
addRangeInPlace(t.EndpointRepositories, oas);
|
|
59
|
+
}
|
|
60
|
+
return Array_distinct(Array.from(oas), {
|
|
61
|
+
Equals: equals,
|
|
62
|
+
GetHashCode: safeHash,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
static filterByTags(queryTags, matchAll) {
|
|
66
|
+
return (templates) => TemplatesAux_filterOnTags((t) => t.Tags, queryTags, uncurry2(TemplatesAux_getComparer(matchAll)), templates);
|
|
67
|
+
}
|
|
68
|
+
static filterByEndpointRepositories(queryTags, matchAll) {
|
|
69
|
+
return (templates) => TemplatesAux_filterOnTags((t) => t.EndpointRepositories, queryTags, uncurry2(TemplatesAux_getComparer(matchAll)), templates);
|
|
70
|
+
}
|
|
71
|
+
static filterByOntologyAnnotation(queryTags, matchAll) {
|
|
72
|
+
return (templates) => TemplatesAux_filterOnTags((t) => append(t.Tags, t.EndpointRepositories), queryTags, uncurry2(TemplatesAux_getComparer(matchAll)), templates);
|
|
73
|
+
}
|
|
74
|
+
static filterByDataPLANT(templates) {
|
|
75
|
+
return templates.filter((t) => t.Organisation.IsOfficial());
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function Templates_$reflection() {
|
|
80
|
+
return class_type("ARCtrl.Template.Templates", void 0, Templates);
|
|
81
|
+
}
|
|
82
|
+
|