@nfdi4plants/arctrl 2.0.0-beta.2 → 2.0.0
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/ARC.js +55 -18
- package/Contract/ArcAssay.js +4 -4
- package/Contract/ArcInvestigation.js +4 -4
- package/Contract/ArcStudy.js +3 -3
- package/Contract/Datamap.js +1 -1
- package/Contract/ValidationPackagesConfig.js +96 -0
- package/Core/ArcTypes.js +93 -90
- package/Core/Conversion.js +13 -13
- package/Core/DataContext.js +53 -6
- package/Core/{Table/DataMap.js → DataMap.js} +34 -22
- package/Core/Process/Component.js +15 -5
- package/Core/Process/FactorValue.js +14 -5
- package/Core/Process/MaterialAttributeValue.js +14 -5
- package/Core/Process/ProcessParameterValue.js +11 -2
- package/Core/Table/ArcTable.js +99 -11
- package/Core/Table/CompositeCell.js +38 -23
- package/Core/Table/CompositeColumn.js +7 -30
- package/Core/Table/CompositeHeader.js +5 -215
- package/Core/{Process/Value.js → Value.js} +9 -9
- package/Json/Assay.js +10 -9
- package/Json/{Process/Data.js → Data.js} +17 -17
- package/Json/{Process/DataFile.js → DataFile.js} +9 -9
- package/Json/DataMap/DataContext.js +30 -0
- package/Json/DataMap/DataMap.js +25 -0
- package/Json/Encode.js +10 -1
- package/Json/Process/Component.js +1 -1
- package/Json/Process/FactorValue.js +1 -1
- package/Json/Process/MaterialAttributeValue.js +1 -1
- package/Json/Process/ProcessInput.js +1 -1
- package/Json/Process/ProcessOutput.js +1 -1
- package/Json/Process/ProcessParameterValue.js +2 -2
- package/Json/Process/Value.js +3 -3
- package/Json/{Process/PropertyValue.js → PropertyValue.js} +30 -21
- package/Json/Study.js +9 -8
- package/Json/Table/CompositeCell.js +1 -1
- package/Json/context/rocrate/isa_data_context.js +1 -1
- package/Json/context/rocrate/isa_investigation_context.js +1 -1
- package/Json/context/rocrate/property_value_context.js +1 -1
- package/Spreadsheet/AnnotationTable/ArcTable.js +3 -2
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +9 -7
- package/Spreadsheet/ArcAssay.js +62 -26
- package/Spreadsheet/ArcInvestigation.js +59 -38
- package/Spreadsheet/ArcStudy.js +51 -20
- package/Spreadsheet/DataMap.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapTable.js +3 -3
- package/Spreadsheet/Template.js +1 -1
- package/ValidationPackages/ValidationPackage.js +61 -0
- package/ValidationPackages/ValidationPackagesConfig.js +88 -0
- package/Xlsx.js +9 -9
- package/Yaml/Encode.js +8 -0
- package/Yaml/ValidationPackage.js +47 -0
- package/Yaml/ValidationPackagesConfig.js +48 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs +374 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs.js +1684 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs +148 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs.js +74 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs +14 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs.js +11 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/PyInterop.fs +9 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs +138 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs.js +7 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs +86 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs.js +49 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs +59 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs.js +102 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs +295 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs.js +530 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs +108 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs.js +19 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs +166 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs.js +225 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs +84 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs.js +161 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLicious.fableproj +39 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs +82 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js +130 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Json } from "
|
|
2
|
-
import { unwrap, map } from "
|
|
3
|
-
import { ofArray, choose } from "
|
|
4
|
-
import { equals } from "
|
|
5
|
-
import { tryInclude } from "
|
|
6
|
-
import { context_jsonvalue } from "
|
|
7
|
-
import { string, object } from "
|
|
8
|
-
import { OntologyAnnotation } from "
|
|
9
|
-
import { AnnotationValue_decoder } from "
|
|
10
|
-
import { Value } from "
|
|
1
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
+
import { unwrap, map } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
|
+
import { ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
|
+
import { tryInclude } from "./Encode.js";
|
|
6
|
+
import { context_jsonvalue } from "./context/rocrate/property_value_context.js";
|
|
7
|
+
import { string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
|
+
import { OntologyAnnotation } from "../Core/OntologyAnnotation.js";
|
|
9
|
+
import { AnnotationValue_decoder } from "./OntologyAnnotation.js";
|
|
10
|
+
import { Value } from "../Core/Value.js";
|
|
11
11
|
|
|
12
12
|
export function genID(p) {
|
|
13
13
|
const matchValue = p.GetCategory();
|
|
@@ -97,19 +97,28 @@ export function encoder(pv) {
|
|
|
97
97
|
else {
|
|
98
98
|
return [tupledArg[0], v_1];
|
|
99
99
|
}
|
|
100
|
-
}, ofArray([["@id", new Json(0, [genID(pv)])], ["@type", new Json(0, ["PropertyValue"])], ["additionalType", new Json(0, [pv.GetAdditionalType()])], tryInclude("
|
|
100
|
+
}, ofArray([["@id", new Json(0, [genID(pv)])], ["@type", new Json(0, ["PropertyValue"])], ["additionalType", new Json(0, [pv.GetAdditionalType()])], tryInclude("alternateName", (value_11) => (new Json(0, [value_11])), pv.AlternateName()), tryInclude("measurementMethod", (value_13) => (new Json(0, [value_13])), pv.MeasurementMethod()), tryInclude("description", (value_15) => (new Json(0, [value_15])), pv.Description()), tryInclude("category", (value_17) => (new Json(0, [value_17])), patternInput[0]), tryInclude("categoryCode", (value_19) => (new Json(0, [value_19])), patternInput[1]), tryInclude("value", (x) => x, patternInput_1[0]), tryInclude("valueCode", (x_1) => x_1, patternInput_1[1]), tryInclude("unit", (value_21) => (new Json(0, [value_21])), patternInput_2[0]), tryInclude("unitCode", (value_23) => (new Json(0, [value_23])), patternInput_2[1]), ["@context", context_jsonvalue]]))]);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export function decoder(create) {
|
|
104
104
|
return object((get$) => {
|
|
105
|
-
let value,
|
|
105
|
+
let value, objectArg_7, code_4, objectArg_8;
|
|
106
|
+
let alternateName;
|
|
107
|
+
const objectArg = get$.Optional;
|
|
108
|
+
alternateName = objectArg.Field("alternateName", string);
|
|
109
|
+
let measurementMethod;
|
|
110
|
+
const objectArg_1 = get$.Optional;
|
|
111
|
+
measurementMethod = objectArg_1.Field("measurementMethod", string);
|
|
112
|
+
let description;
|
|
113
|
+
const objectArg_2 = get$.Optional;
|
|
114
|
+
description = objectArg_2.Field("description", string);
|
|
106
115
|
let category;
|
|
107
116
|
let name;
|
|
108
|
-
const
|
|
109
|
-
name =
|
|
117
|
+
const objectArg_3 = get$.Optional;
|
|
118
|
+
name = objectArg_3.Field("category", string);
|
|
110
119
|
let code;
|
|
111
|
-
const
|
|
112
|
-
code =
|
|
120
|
+
const objectArg_4 = get$.Optional;
|
|
121
|
+
code = objectArg_4.Field("categoryCode", string);
|
|
113
122
|
let matchResult, code_1;
|
|
114
123
|
if (name == null) {
|
|
115
124
|
if (code != null) {
|
|
@@ -161,11 +170,11 @@ export function decoder(create) {
|
|
|
161
170
|
}
|
|
162
171
|
let unit;
|
|
163
172
|
let name_1;
|
|
164
|
-
const
|
|
165
|
-
name_1 =
|
|
173
|
+
const objectArg_5 = get$.Optional;
|
|
174
|
+
name_1 = objectArg_5.Field("unit", string);
|
|
166
175
|
let code_2;
|
|
167
|
-
const
|
|
168
|
-
code_2 =
|
|
176
|
+
const objectArg_6 = get$.Optional;
|
|
177
|
+
code_2 = objectArg_6.Field("unitCode", string);
|
|
169
178
|
let matchResult_1, code_3;
|
|
170
179
|
if (name_1 == null) {
|
|
171
180
|
if (code_2 != null) {
|
|
@@ -215,7 +224,7 @@ export function decoder(create) {
|
|
|
215
224
|
throw new Error(`Error while decoding unit (name:${name_1}, code:${code_3}): ${err_3}`);
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
|
-
return create(category, (value = ((
|
|
227
|
+
return create(alternateName, measurementMethod, description, category, (value = ((objectArg_7 = get$.Optional, objectArg_7.Field("value", AnnotationValue_decoder))), (code_4 = ((objectArg_8 = get$.Optional, objectArg_8.Field("valueCode", string))), ((value == null) && (code_4 == null)) ? void 0 : (() => {
|
|
219
228
|
try {
|
|
220
229
|
return Value.fromOptions(value, void 0, code_4);
|
|
221
230
|
}
|
package/Json/Study.js
CHANGED
|
@@ -9,6 +9,7 @@ import { Publication_ISAJson_decoder, Publication_ISAJson_encoder, Publication_R
|
|
|
9
9
|
import { Person_ISAJson_decoder, Person_ISAJson_encoder, Person_ROCrate_decoder, Person_ROCrate_encoder, Person_decoder, Person_encoder } from "./Person.js";
|
|
10
10
|
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_decoderDefinedTerm, OntologyAnnotation_ROCrate_encoderDefinedTerm, OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./OntologyAnnotation.js";
|
|
11
11
|
import { ArcTable_decoderCompressed, ArcTable_encoderCompressed, ArcTable_decoder, ArcTable_encoder } from "./Table/ArcTable.js";
|
|
12
|
+
import { decoderCompressed, encoderCompressed, decoder as decoder_1, encoder as encoder_4 } from "./DataMap/DataMap.js";
|
|
12
13
|
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "./Comment.js";
|
|
13
14
|
import { list as list_2, string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
14
15
|
import { Decode_objectNoAdditionalProperties, Decode_resizeArray } from "./Decode.js";
|
|
@@ -22,7 +23,7 @@ import { context_jsonvalue } from "./context/rocrate/isa_study_context.js";
|
|
|
22
23
|
import { getProtocols, getCharacteristics, getFactors, getUnits } from "../Core/Process/ProcessSequence.js";
|
|
23
24
|
import { Factor_ISAJson_encoder } from "./Process/Factor.js";
|
|
24
25
|
import { MaterialAttribute_ISAJson_encoder } from "./Process/MaterialAttribute.js";
|
|
25
|
-
import { encoder as
|
|
26
|
+
import { encoder as encoder_5 } from "./Process/StudyMaterials.js";
|
|
26
27
|
import { Protocol_ISAJson_encoder } from "./Process/Protocol.js";
|
|
27
28
|
import { encode } from "./IDTable.js";
|
|
28
29
|
import { isEmpty } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
@@ -51,12 +52,12 @@ export function Study_encoder(study) {
|
|
|
51
52
|
else {
|
|
52
53
|
return [tupledArg[0], v];
|
|
53
54
|
}
|
|
54
|
-
}, ofArray([["Identifier", new Json(0, [study.Identifier])], tryInclude("Title", (value_1) => (new Json(0, [value_1])), study.Title), tryInclude("Description", (value_3) => (new Json(0, [value_3])), study.Description), tryInclude("SubmissionDate", (value_5) => (new Json(0, [value_5])), study.SubmissionDate), tryInclude("PublicReleaseDate", (value_7) => (new Json(0, [value_7])), study.PublicReleaseDate), tryIncludeSeq("Publications", Publication_encoder, study.Publications), tryIncludeSeq("Contacts", Person_encoder, study.Contacts), tryIncludeSeq("StudyDesignDescriptors", OntologyAnnotation_encoder, study.StudyDesignDescriptors), tryIncludeSeq("Tables", ArcTable_encoder, study.Tables), tryIncludeSeq("RegisteredAssayIdentifiers", (value_9) => (new Json(0, [value_9])), study.RegisteredAssayIdentifiers), tryIncludeSeq("Comments", Comment_encoder, study.Comments)]))]);
|
|
55
|
+
}, ofArray([["Identifier", new Json(0, [study.Identifier])], tryInclude("Title", (value_1) => (new Json(0, [value_1])), study.Title), tryInclude("Description", (value_3) => (new Json(0, [value_3])), study.Description), tryInclude("SubmissionDate", (value_5) => (new Json(0, [value_5])), study.SubmissionDate), tryInclude("PublicReleaseDate", (value_7) => (new Json(0, [value_7])), study.PublicReleaseDate), tryIncludeSeq("Publications", Publication_encoder, study.Publications), tryIncludeSeq("Contacts", Person_encoder, study.Contacts), tryIncludeSeq("StudyDesignDescriptors", OntologyAnnotation_encoder, study.StudyDesignDescriptors), tryIncludeSeq("Tables", ArcTable_encoder, study.Tables), tryInclude("DataMap", encoder_4, study.DataMap), tryIncludeSeq("RegisteredAssayIdentifiers", (value_9) => (new Json(0, [value_9])), study.RegisteredAssayIdentifiers), tryIncludeSeq("Comments", Comment_encoder, study.Comments)]))]);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
export const Study_decoder = object((get$) => {
|
|
58
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8,
|
|
59
|
-
return new ArcStudy((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("Title", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("Description", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("SubmissionDate", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("PublicReleaseDate", string))), unwrap((arg_11 = Decode_resizeArray(Publication_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Publications", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Contacts", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("StudyDesignDescriptors", arg_15)))), unwrap((arg_17 = Decode_resizeArray(ArcTable_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("Tables", arg_17)))),
|
|
59
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, objectArg_9, arg_21, objectArg_10, arg_23, objectArg_11;
|
|
60
|
+
return new ArcStudy((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("Title", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("Description", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("SubmissionDate", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("PublicReleaseDate", string))), unwrap((arg_11 = Decode_resizeArray(Publication_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Publications", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Contacts", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("StudyDesignDescriptors", arg_15)))), unwrap((arg_17 = Decode_resizeArray(ArcTable_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("Tables", arg_17)))), unwrap((objectArg_9 = get$.Optional, objectArg_9.Field("DataMap", decoder_1))), unwrap((arg_21 = Decode_resizeArray(string), (objectArg_10 = get$.Optional, objectArg_10.Field("RegisteredAssayIdentifiers", arg_21)))), unwrap((arg_23 = Decode_resizeArray(Comment_decoder), (objectArg_11 = get$.Optional, objectArg_11.Field("Comments", arg_23)))));
|
|
60
61
|
});
|
|
61
62
|
|
|
62
63
|
export function Study_encoderCompressed(stringTable, oaTable, cellTable, study) {
|
|
@@ -68,13 +69,13 @@ export function Study_encoderCompressed(stringTable, oaTable, cellTable, study)
|
|
|
68
69
|
else {
|
|
69
70
|
return [tupledArg[0], v];
|
|
70
71
|
}
|
|
71
|
-
}, ofArray([["Identifier", new Json(0, [study.Identifier])], tryInclude("Title", (value_1) => (new Json(0, [value_1])), study.Title), tryInclude("Description", (value_3) => (new Json(0, [value_3])), study.Description), tryInclude("SubmissionDate", (value_5) => (new Json(0, [value_5])), study.SubmissionDate), tryInclude("PublicReleaseDate", (value_7) => (new Json(0, [value_7])), study.PublicReleaseDate), tryIncludeSeq("Publications", Publication_encoder, study.Publications), tryIncludeSeq("Contacts", Person_encoder, study.Contacts), tryIncludeSeq("StudyDesignDescriptors", OntologyAnnotation_encoder, study.StudyDesignDescriptors), tryIncludeSeq("Tables", (table) => ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table), study.Tables), tryIncludeSeq("RegisteredAssayIdentifiers", (value_9) => (new Json(0, [value_9])), study.RegisteredAssayIdentifiers), tryIncludeSeq("Comments", Comment_encoder, study.Comments)]))]);
|
|
72
|
+
}, ofArray([["Identifier", new Json(0, [study.Identifier])], tryInclude("Title", (value_1) => (new Json(0, [value_1])), study.Title), tryInclude("Description", (value_3) => (new Json(0, [value_3])), study.Description), tryInclude("SubmissionDate", (value_5) => (new Json(0, [value_5])), study.SubmissionDate), tryInclude("PublicReleaseDate", (value_7) => (new Json(0, [value_7])), study.PublicReleaseDate), tryIncludeSeq("Publications", Publication_encoder, study.Publications), tryIncludeSeq("Contacts", Person_encoder, study.Contacts), tryIncludeSeq("StudyDesignDescriptors", OntologyAnnotation_encoder, study.StudyDesignDescriptors), tryIncludeSeq("Tables", (table) => ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table), study.Tables), tryInclude("DataMap", (dm) => encoderCompressed(stringTable, oaTable, cellTable, dm), study.DataMap), tryIncludeSeq("RegisteredAssayIdentifiers", (value_9) => (new Json(0, [value_9])), study.RegisteredAssayIdentifiers), tryIncludeSeq("Comments", Comment_encoder, study.Comments)]))]);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
export function Study_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
75
76
|
return object((get$) => {
|
|
76
|
-
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10;
|
|
77
|
-
return new ArcStudy((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("Title", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("Description", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("SubmissionDate", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("PublicReleaseDate", string))), unwrap((arg_11 = Decode_resizeArray(Publication_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Publications", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Contacts", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("StudyDesignDescriptors", arg_15)))), unwrap((arg_17 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_8 = get$.Optional, objectArg_8.Field("Tables", arg_17)))),
|
|
77
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, arg_19, objectArg_9, arg_21, objectArg_10, arg_23, objectArg_11;
|
|
78
|
+
return new ArcStudy((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("Title", string))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("Description", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("SubmissionDate", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("PublicReleaseDate", string))), unwrap((arg_11 = Decode_resizeArray(Publication_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Publications", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Contacts", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("StudyDesignDescriptors", arg_15)))), unwrap((arg_17 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_8 = get$.Optional, objectArg_8.Field("Tables", arg_17)))), unwrap((arg_19 = decoderCompressed(stringTable, oaTable, cellTable), (objectArg_9 = get$.Optional, objectArg_9.Field("DataMap", arg_19)))), unwrap((arg_21 = Decode_resizeArray(string), (objectArg_10 = get$.Optional, objectArg_10.Field("RegisteredAssayIdentifiers", arg_21)))), unwrap((arg_23 = Decode_resizeArray(Comment_decoder), (objectArg_11 = get$.Optional, objectArg_11.Field("Comments", arg_23)))));
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
81
|
|
|
@@ -156,7 +157,7 @@ export function Study_ISAJson_encoder(idMap, assays, s) {
|
|
|
156
157
|
const encodedUnits = tryIncludeList("unitCategories", (oa) => OntologyAnnotation_ISAJson_encoder(idMap, oa), getUnits(processes));
|
|
157
158
|
const encodedFactors = tryIncludeList("factors", (value_1) => Factor_ISAJson_encoder(idMap, value_1), getFactors(processes));
|
|
158
159
|
const encodedCharacteristics = tryIncludeList("characteristicCategories", (value_3) => MaterialAttribute_ISAJson_encoder(idMap, value_3), getCharacteristics(processes));
|
|
159
|
-
const encodedMaterials = tryInclude("materials", (ps) =>
|
|
160
|
+
const encodedMaterials = tryInclude("materials", (ps) => encoder_5(idMap, ps), Option_fromValueWithDefault(empty(), processes));
|
|
160
161
|
let encodedProtocols;
|
|
161
162
|
const value_5 = getProtocols(processes);
|
|
162
163
|
encodedProtocols = tryIncludeList("protocols", (studyName = s_1.Identifier, (oa_1) => Protocol_ISAJson_encoder(studyName, void 0, void 0, idMap, oa_1)), value_5);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../OntologyAnnotation.js";
|
|
2
2
|
import { ofArray, singleton } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
3
3
|
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
-
import { Data_compressedDecoder, Data_compressedEncoder, Data_decoder, Data_encoder } from "../
|
|
4
|
+
import { Data_compressedDecoder, Data_compressedEncoder, Data_decoder, Data_encoder } from "../Data.js";
|
|
5
5
|
import { list } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
6
6
|
import { index, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
7
7
|
import { CompositeCell } from "../../Core/Table/CompositeCell.js";
|
|
@@ -19,7 +19,7 @@ export function IContext_$reflection() {
|
|
|
19
19
|
return record_type("ARCtrl.Json.ROCrateContext.Data.IContext", [], IContext, () => [["sdo", string_type], ["arc", string_type], ["Data", string_type], ["ArcData", string_type], ["type", string_type], ["name", string_type], ["comments", string_type]]);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export const context_jsonvalue = new Json(5, [[["sdo", new Json(0, ["http://schema.org/"])], ["Data", new Json(0, ["sdo:MediaObject"])], ["type", new Json(0, ["sdo:disambiguatingDescription"])], ["name", new Json(0, ["sdo:name"])], ["comments", new Json(0, ["sdo:comment"])]]]);
|
|
22
|
+
export const context_jsonvalue = new Json(5, [[["sdo", new Json(0, ["http://schema.org/"])], ["Data", new Json(0, ["sdo:MediaObject"])], ["type", new Json(0, ["sdo:disambiguatingDescription"])], ["encodingFormat", new Json(0, ["sdo:encodingFormat"])], ["usageInfo", new Json(0, ["sdo:usageInfo"])], ["name", new Json(0, ["sdo:name"])], ["comments", new Json(0, ["sdo:comment"])]]]);
|
|
23
23
|
|
|
24
24
|
export const context_str = "\r\n{\r\n \"@context\": {\r\n \"sdo\": \"http://schema.org/\",\r\n \"arc\": \"http://purl.org/nfdi4plants/ontology/\",\r\n\r\n \"Data\": \"sdo:MediaObject\",\r\n \"ArcData\": \"arc:ARC#ARC_00000076\",\r\n\r\n \"type\": \"arc:ARC#ARC_00000107\",\r\n\r\n \"name\": \"sdo:name\",\r\n \"comments\": \"sdo:disambiguatingDescription\"\r\n }\r\n}\r\n ";
|
|
25
25
|
|
|
@@ -29,5 +29,5 @@ export function IContext_$reflection() {
|
|
|
29
29
|
|
|
30
30
|
export const context_jsonvalue = new Json(5, [[["sdo", new Json(0, ["http://schema.org/"])], ["Investigation", new Json(0, ["sdo:Dataset"])], ["identifier", new Json(0, ["sdo:identifier"])], ["title", new Json(0, ["sdo:headline"])], ["additionalType", new Json(0, ["sdo:additionalType"])], ["description", new Json(0, ["sdo:description"])], ["submissionDate", new Json(0, ["sdo:dateCreated"])], ["publicReleaseDate", new Json(0, ["sdo:datePublished"])], ["publications", new Json(0, ["sdo:citation"])], ["people", new Json(0, ["sdo:creator"])], ["studies", new Json(0, ["sdo:hasPart"])], ["ontologySourceReferences", new Json(0, ["sdo:mentions"])], ["comments", new Json(0, ["sdo:comment"])], ["filename", new Json(0, ["sdo:alternateName"])]]]);
|
|
31
31
|
|
|
32
|
-
export const context_str = "\r\n{\r\n \"@context\": {\r\n \"sdo\": \"http://schema.org/\",\r\n \"arc\": \"http://purl.org/nfdi4plants/ontology/\",\r\n\r\n \"Investigation\": \"sdo:Dataset\",\r\n\r\n \"identifier\" : \"sdo:identifier\",\r\n \"title\": \"sdo:headline\",\r\n \"description\": \"sdo:description\",\r\n \"submissionDate\": \"sdo:dateCreated\",\r\n \"publicReleaseDate\": \"sdo:datePublished\",\r\n \"publications\": \"sdo:citation\",\r\n \"people\": \"sdo:creator\",\r\n \"studies\": \"sdo:hasPart\",\r\n \"ontologySourceReferences\": \"sdo:mentions\",\r\n \"comments\": \"sdo:disambiguatingDescription\",\r\n\r\n \"publications?\": \"sdo:
|
|
32
|
+
export const context_str = "\r\n{\r\n \"@context\": {\r\n \"sdo\": \"http://schema.org/\",\r\n \"arc\": \"http://purl.org/nfdi4plants/ontology/\",\r\n\r\n \"Investigation\": \"sdo:Dataset\",\r\n\r\n \"identifier\" : \"sdo:identifier\",\r\n \"title\": \"sdo:headline\",\r\n \"description\": \"sdo:description\",\r\n \"submissionDate\": \"sdo:dateCreated\",\r\n \"publicReleaseDate\": \"sdo:datePublished\",\r\n \"publications\": \"sdo:citation\",\r\n \"people\": \"sdo:creator\",\r\n \"studies\": \"sdo:hasPart\",\r\n \"ontologySourceReferences\": \"sdo:mentions\",\r\n \"comments\": \"sdo:disambiguatingDescription\",\r\n\r\n \"publications?\": \"sdo:SubjectOf?\",\r\n \"filename\": \"sdo:alternateName\"\r\n }\r\n}\r\n ";
|
|
33
33
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
2
|
|
|
3
|
-
export const context_jsonvalue = new Json(5, [[["sdo", new Json(0, ["http://schema.org/"])], ["additionalType", new Json(0, ["sdo:additionalType"])], ["category", new Json(0, ["sdo:name"])], ["categoryCode", new Json(0, ["sdo:propertyID"])], ["value", new Json(0, ["sdo:value"])], ["valueCode", new Json(0, ["sdo:valueReference"])], ["unit", new Json(0, ["sdo:unitText"])], ["unitCode", new Json(0, ["sdo:unitCode"])], ["comments", new Json(0, ["sdo:disambiguatingDescription"])]]]);
|
|
3
|
+
export const context_jsonvalue = new Json(5, [[["sdo", new Json(0, ["http://schema.org/"])], ["additionalType", new Json(0, ["sdo:additionalType"])], ["alternateName", new Json(0, ["sdo:alternateName"])], ["measurementMethod", new Json(0, ["sdo:measurementMethod"])], ["description", new Json(0, ["sdo:description"])], ["category", new Json(0, ["sdo:name"])], ["categoryCode", new Json(0, ["sdo:propertyID"])], ["value", new Json(0, ["sdo:value"])], ["valueCode", new Json(0, ["sdo:valueReference"])], ["unit", new Json(0, ["sdo:unitText"])], ["unitCode", new Json(0, ["sdo:unitCode"])], ["comments", new Json(0, ["sdo:disambiguatingDescription"])]]]);
|
|
4
4
|
|
|
@@ -118,7 +118,7 @@ export function tryFromFsWorksheet(sheet) {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
export function toFsWorksheet(table) {
|
|
121
|
+
export function toFsWorksheet(index, table) {
|
|
122
122
|
const stringCount = new Map([]);
|
|
123
123
|
const ws = new FsWorksheet(table.Name);
|
|
124
124
|
if (table.Columns.length === 0) {
|
|
@@ -130,7 +130,8 @@ export function toFsWorksheet(table) {
|
|
|
130
130
|
}));
|
|
131
131
|
const maxRow = length(head(columns)) | 0;
|
|
132
132
|
const maxCol = length(columns) | 0;
|
|
133
|
-
const
|
|
133
|
+
const name = (index == null) ? "annotationTable" : (`${"annotationTable"}${index}`);
|
|
134
|
+
const fsTable = ws.Table(name, FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(maxRow, maxCol)));
|
|
134
135
|
iterateIndexed((colI, col) => {
|
|
135
136
|
iterateIndexed((rowI, stringCell) => {
|
|
136
137
|
let value;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { map, setItem, item, skip } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
1
|
+
import { tryItem, map, setItem, item, skip } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
2
2
|
import { CompositeHeader, IOType } from "../../Core/Table/CompositeHeader.js";
|
|
3
3
|
import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
4
4
|
import { toStringCells, fromStringCells } from "./CompositeHeader.js";
|
|
@@ -6,6 +6,7 @@ import { empty, singleton, append, toList, exists, map as map_1, delay, toArray
|
|
|
6
6
|
import { rangeDouble } from "../../fable_modules/fable-library-js.4.16.0/Range.js";
|
|
7
7
|
import { CompositeColumn } from "../../Core/Table/CompositeColumn.js";
|
|
8
8
|
import { toStringCells as toStringCells_1 } from "./CompositeCell.js";
|
|
9
|
+
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
9
10
|
import { map as map_2, singleton as singleton_1, ofArray } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
10
11
|
import { FsCell } from "../../fable_modules/FsSpreadsheet.6.2.0/Cells/FsCell.fs.js";
|
|
11
12
|
|
|
@@ -53,19 +54,20 @@ export function fromFsColumns(columns) {
|
|
|
53
54
|
export function toStringCellColumns(column) {
|
|
54
55
|
const hasUnit = exists((c) => c.isUnitized, column.Cells);
|
|
55
56
|
const isTerm = column.Header.IsTermColumn;
|
|
56
|
-
const isData = column.Header.IsDataColumn;
|
|
57
|
+
const isData = column.Header.IsDataColumn && exists((c_1) => c_1.isData, column.Cells);
|
|
57
58
|
const header = toStringCells(hasUnit, column.Header);
|
|
58
59
|
const cells = map((cell) => toStringCells_1(isTerm, hasUnit, cell), column.Cells);
|
|
60
|
+
const getCellOrDefault = (ri, ci, cells_1) => defaultArg(tryItem(ci, item(ri, cells_1)), "");
|
|
59
61
|
if (hasUnit) {
|
|
60
|
-
return ofArray([toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i) =>
|
|
62
|
+
return ofArray([toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i) => getCellOrDefault(i, 0, cells), rangeDouble(0, 1, column.Cells.length - 1)))))), toList(delay(() => append(singleton(item(1, header)), delay(() => map_1((i_1) => getCellOrDefault(i_1, 1, cells), rangeDouble(0, 1, column.Cells.length - 1)))))), toList(delay(() => append(singleton(item(2, header)), delay(() => map_1((i_2) => getCellOrDefault(i_2, 2, cells), rangeDouble(0, 1, column.Cells.length - 1)))))), toList(delay(() => append(singleton(item(3, header)), delay(() => map_1((i_3) => getCellOrDefault(i_3, 3, cells), rangeDouble(0, 1, column.Cells.length - 1))))))]);
|
|
61
63
|
}
|
|
62
64
|
else if (isTerm) {
|
|
63
|
-
return ofArray([toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i_4) =>
|
|
65
|
+
return ofArray([toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i_4) => getCellOrDefault(i_4, 0, cells), rangeDouble(0, 1, column.Cells.length - 1)))))), toList(delay(() => append(singleton(item(1, header)), delay(() => map_1((i_5) => getCellOrDefault(i_5, 1, cells), rangeDouble(0, 1, column.Cells.length - 1)))))), toList(delay(() => append(singleton(item(2, header)), delay(() => map_1((i_6) => getCellOrDefault(i_6, 2, cells), rangeDouble(0, 1, column.Cells.length - 1))))))]);
|
|
64
66
|
}
|
|
65
67
|
else if (isData) {
|
|
66
|
-
const hasFormat = exists((
|
|
67
|
-
const hasSelectorFormat = exists((
|
|
68
|
-
return toList(delay(() => append(singleton(toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i_7) =>
|
|
68
|
+
const hasFormat = exists((c_2) => (c_2.ToDataCell().AsData.Format != null), column.Cells);
|
|
69
|
+
const hasSelectorFormat = exists((c_3) => (c_3.ToDataCell().AsData.SelectorFormat != null), column.Cells);
|
|
70
|
+
return toList(delay(() => append(singleton(toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i_7) => getCellOrDefault(i_7, 0, cells), rangeDouble(0, 1, column.Cells.length - 1))))))), delay(() => append(hasFormat ? singleton(toList(delay(() => append(singleton(item(1, header)), delay(() => map_1((i_8) => getCellOrDefault(i_8, 1, cells), rangeDouble(0, 1, column.Cells.length - 1))))))) : empty(), delay(() => (hasSelectorFormat ? singleton(toList(delay(() => append(singleton(item(2, header)), delay(() => map_1((i_9) => getCellOrDefault(i_9, 2, cells), rangeDouble(0, 1, column.Cells.length - 1))))))) : empty())))))));
|
|
69
71
|
}
|
|
70
72
|
else {
|
|
71
73
|
return singleton_1(toList(delay(() => append(singleton(item(0, header)), delay(() => map_1((i_10) => item(0, item(i_10, cells)), rangeDouble(0, 1, column.Cells.length - 1)))))));
|
package/Spreadsheet/ArcAssay.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorksheet.fs.js";
|
|
2
|
-
import { iterate, isEmpty as isEmpty_1, choose, tryHead, head, exists, map, singleton, append, delay, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
2
|
+
import { iterate, isEmpty as isEmpty_1, tryPick, choose, tryFind, tryHead, head, exists, map, singleton, append, delay, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
3
3
|
import { SparseRowModule_tryGetValueAt, SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_writeToSheet } from "./Metadata/SparseTable.js";
|
|
4
4
|
import { fromRows as fromRows_1, toRows as toRows_1 } from "./Metadata/Assays.js";
|
|
5
5
|
import { empty, isEmpty, ofSeq, singleton as singleton_1 } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
@@ -8,11 +8,12 @@ import { toConsole, printf, toFail } from "../fable_modules/fable-library-js.4.1
|
|
|
8
8
|
import { getEnumerator } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
9
9
|
import { ArcAssay } from "../Core/ArcTypes.js";
|
|
10
10
|
import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
|
|
11
|
-
import { defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
12
|
-
import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
|
|
11
|
+
import { unwrap, toArray, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
12
|
+
import { toFsWorksheet as toFsWorksheet_1, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
|
|
13
|
+
import { toFsWorksheet, tryFromFsWorksheet as tryFromFsWorksheet_1 } from "./DataMapTable/DataMapTable.js";
|
|
13
14
|
import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorkbook.fs.js";
|
|
14
15
|
|
|
15
|
-
export function
|
|
16
|
+
export function ArcAssay_toMetadataSheet(assay) {
|
|
16
17
|
let assay_1;
|
|
17
18
|
const sheet = new FsWorksheet("isa_assay");
|
|
18
19
|
iterateIndexed((rowI, r) => {
|
|
@@ -21,7 +22,7 @@ export function toMetadataSheet(assay) {
|
|
|
21
22
|
return sheet;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
export function
|
|
25
|
+
export function ArcAssay_fromMetadataSheet(sheet) {
|
|
25
26
|
try {
|
|
26
27
|
const rows_1 = map(SparseRowModule_fromFsRow, sheet.Rows);
|
|
27
28
|
const patternInput = exists((row) => {
|
|
@@ -114,31 +115,45 @@ export function fromMetadataSheet(sheet) {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
|
|
118
|
+
export function ArcAssay_isMetadataSheetName(name) {
|
|
119
|
+
if (name === "isa_assay") {
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return name === "Assay";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function ArcAssay_isMetadataSheet(sheet) {
|
|
128
|
+
return ArcAssay_isMetadataSheetName(sheet.Name);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function ArcAssay_tryGetMetadataSheet(doc) {
|
|
132
|
+
return tryFind(ArcAssay_isMetadataSheet, doc.GetWorksheets());
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
/**
|
|
118
136
|
* Reads an assay from a spreadsheet
|
|
119
137
|
*/
|
|
120
|
-
export function
|
|
138
|
+
export function ARCtrl_ArcAssay__ArcAssay_fromFsWorkbook_Static_32154C9D(doc) {
|
|
121
139
|
try {
|
|
122
|
-
let
|
|
123
|
-
const matchValue = doc
|
|
140
|
+
let assayMetadata;
|
|
141
|
+
const matchValue = ArcAssay_tryGetMetadataSheet(doc);
|
|
124
142
|
if (matchValue == null) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
toConsole(printf("Cannot retrieve metadata: Assay file does not contain \"%s\" or \"%s\" sheet."))("isa_assay")("Assay");
|
|
128
|
-
assayMetaData = ArcAssay.create(createMissingIdentifier());
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
assayMetaData = fromMetadataSheet(matchValue_1);
|
|
132
|
-
}
|
|
143
|
+
toConsole(printf("Cannot retrieve metadata: Assay file does not contain \"%s\" or \"%s\" sheet."))("isa_assay")("Assay");
|
|
144
|
+
assayMetadata = ArcAssay.create(createMissingIdentifier());
|
|
133
145
|
}
|
|
134
146
|
else {
|
|
135
|
-
|
|
147
|
+
assayMetadata = ArcAssay_fromMetadataSheet(matchValue);
|
|
136
148
|
}
|
|
137
|
-
const
|
|
149
|
+
const sheets = doc.GetWorksheets();
|
|
150
|
+
const annotationTables = choose(tryFromFsWorksheet, sheets);
|
|
151
|
+
const datamapSheet = tryPick(tryFromFsWorksheet_1, sheets);
|
|
138
152
|
if (!isEmpty_1(annotationTables)) {
|
|
139
|
-
|
|
153
|
+
assayMetadata.Tables = Array.from(annotationTables);
|
|
140
154
|
}
|
|
141
|
-
|
|
155
|
+
assayMetadata.DataMap = datamapSheet;
|
|
156
|
+
return assayMetadata;
|
|
142
157
|
}
|
|
143
158
|
catch (err) {
|
|
144
159
|
const arg_2 = err.message;
|
|
@@ -146,14 +161,35 @@ export function fromFsWorkbook(doc) {
|
|
|
146
161
|
}
|
|
147
162
|
}
|
|
148
163
|
|
|
149
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Write an assay to a spreadsheet
|
|
166
|
+
*
|
|
167
|
+
* If datamapSheet is true, the datamap will be written to a worksheet inside assay workbook.
|
|
168
|
+
*/
|
|
169
|
+
export function ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F(assay, datamapSheet) {
|
|
170
|
+
const datamapSheet_1 = defaultArg(datamapSheet, true);
|
|
150
171
|
const doc = new FsWorkbook();
|
|
151
|
-
const
|
|
152
|
-
doc.AddWorksheet(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
172
|
+
const metadataSheet = ArcAssay_toMetadataSheet(assay);
|
|
173
|
+
doc.AddWorksheet(metadataSheet);
|
|
174
|
+
if (datamapSheet_1) {
|
|
175
|
+
iterate((arg) => {
|
|
176
|
+
const sheet = toFsWorksheet(arg);
|
|
177
|
+
doc.AddWorksheet(sheet);
|
|
178
|
+
}, toArray(assay.DataMap));
|
|
179
|
+
}
|
|
180
|
+
iterateIndexed((i, arg_1) => {
|
|
181
|
+
const sheet_1 = toFsWorksheet_1(i, arg_1);
|
|
182
|
+
doc.AddWorksheet(sheet_1);
|
|
156
183
|
}, assay.Tables);
|
|
157
184
|
return doc;
|
|
158
185
|
}
|
|
159
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Write an assay to a spreadsheet
|
|
189
|
+
*
|
|
190
|
+
* If datamapSheet is true, the datamap will be written to a worksheet inside assay workbook.
|
|
191
|
+
*/
|
|
192
|
+
export function ARCtrl_ArcAssay__ArcAssay_ToFsWorkbook_6FCE9E49(this$, datamapSheet) {
|
|
193
|
+
return ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F(this$, unwrap(datamapSheet));
|
|
194
|
+
}
|
|
195
|
+
|