@nfdi4plants/arctrl 2.0.0-alpha.2 → 2.0.0-alpha.4
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 +110 -15
- package/Contract/ARC.js +9 -1
- package/Contract/Datamap.js +180 -0
- package/Core/ArcTypes.js +148 -121
- package/Core/Conversion.js +99 -67
- package/Core/Data.js +119 -0
- package/Core/{Process/DataFile.js → DataFile.js} +3 -3
- package/Core/Helper/Identifier.js +40 -0
- package/Core/OntologyAnnotation.js +14 -4
- package/Core/Process/ColumnIndex.js +13 -3
- package/Core/Process/ProcessInput.js +5 -5
- package/Core/Process/ProcessOutput.js +5 -5
- package/Core/Process/Value.js +1 -1
- package/Core/Table/ArcTableAux.js +14 -3
- package/Core/Table/CompositeCell.js +67 -10
- package/Core/Table/CompositeColumn.js +9 -0
- package/Core/Table/CompositeHeader.js +58 -68
- package/Core/Table/DataMap.js +166 -0
- package/FileSystem/FileSystemTree.js +18 -4
- package/Json/Assay.js +4 -4
- package/Json/Process/Data.js +56 -18
- package/Json/Process/DataFile.js +5 -5
- package/Json/Process/PropertyValue.js +126 -5
- package/Json/Study.js +6 -6
- package/Json/Table/CompositeCell.js +7 -6
- package/Spreadsheet/AnnotationTable/ArcTable.js +9 -13
- package/Spreadsheet/AnnotationTable/CompositeCell.js +32 -50
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +16 -10
- package/Spreadsheet/AnnotationTable/CompositeHeader.js +262 -143
- package/Spreadsheet/ArcAssay.js +2 -2
- package/Spreadsheet/ArcInvestigation.js +2 -2
- package/Spreadsheet/ArcStudy.js +2 -2
- package/Spreadsheet/DataMap.js +31 -0
- package/Spreadsheet/DataMapTable/DataMapColumn.js +36 -0
- package/Spreadsheet/DataMapTable/DataMapHeader.js +417 -0
- package/Spreadsheet/DataMapTable/DataMapTable.js +98 -0
- package/Spreadsheet/Metadata/Assays.js +2 -2
- package/Spreadsheet/Metadata/SparseTable.js +7 -7
- package/Spreadsheet/Metadata/Study.js +1 -1
- package/Spreadsheet/Template.js +2 -2
- package/Xlsx.js +29 -6
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsSpreadsheet.fableproj +9 -3
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs +1 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +23 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +21 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +23 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +19 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs +24 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs.js +15 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs +70 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs.js +48 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +20 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +21 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +49 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +44 -0
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/Core/Process/Data.js +0 -55
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/ARC.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { concat, fold, map, exactlyOne, choose } from "./fable_modules/fable-library-js.4.16.0/Array.js";
|
|
1
|
+
import { concat, fold, map, exactlyOne, tryPick, choose } from "./fable_modules/fable-library-js.4.16.0/Array.js";
|
|
2
2
|
import { ARCtrl_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contract/ArcAssay.js";
|
|
3
|
+
import { ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static } from "./Contract/Datamap.js";
|
|
3
4
|
import { ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F } from "./Contract/ArcStudy.js";
|
|
4
5
|
import { ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49, ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F } from "./Contract/ArcInvestigation.js";
|
|
5
6
|
import { collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, toList, toArray } from "./fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
@@ -11,14 +12,16 @@ import { Contract } from "./Contract/Contract.js";
|
|
|
11
12
|
import { ofArray } from "./fable_modules/fable-library-js.4.16.0/List.js";
|
|
12
13
|
import { tryISAReadContractFromPath } from "./Contract/ARC.js";
|
|
13
14
|
import { ArcTables } from "./Core/Table/ArcTables.js";
|
|
14
|
-
import { comparePrimitives, safeHash } from "./fable_modules/fable-library-js.4.16.0/Util.js";
|
|
15
15
|
import { addToDict } from "./fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
16
16
|
import { toFsWorkbook, toLightFsWorkbook } from "./Spreadsheet/ArcInvestigation.js";
|
|
17
17
|
import { ArcInvestigation } from "./Core/ArcTypes.js";
|
|
18
|
-
import { Assay_fileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
|
|
18
|
+
import { Assay_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
|
|
19
19
|
import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7 } from "./Spreadsheet/ArcStudy.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
20
|
+
import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4 } from "./Core/Table/DataMap.js";
|
|
21
|
+
import { comparePrimitives, safeHash } from "./fable_modules/fable-library-js.4.16.0/Util.js";
|
|
22
|
+
import { toFsWorkbook as toFsWorkbook_1 } from "./Spreadsheet/DataMap.js";
|
|
23
|
+
import { toFsWorkbook as toFsWorkbook_2 } from "./Spreadsheet/ArcAssay.js";
|
|
24
|
+
import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.1.2/Cells/FsCellsCollection.fs.js";
|
|
22
25
|
import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, Init_createInitContract_6DFDD678 } from "./Contract/Git.js";
|
|
23
26
|
import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library-js.4.16.0/Set.js";
|
|
24
27
|
import { ofSeq as ofSeq_1 } from "./fable_modules/fable-library-js.4.16.0/Map.js";
|
|
@@ -33,10 +36,18 @@ export function ARCAux_getArcAssaysFromContracts(contracts) {
|
|
|
33
36
|
return choose(ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F, contracts);
|
|
34
37
|
}
|
|
35
38
|
|
|
39
|
+
export function ARCAux_getAssayDataMapFromContracts(assayIdentifier, contracts) {
|
|
40
|
+
return tryPick((c) => ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static(assayIdentifier, c), contracts);
|
|
41
|
+
}
|
|
42
|
+
|
|
36
43
|
export function ARCAux_getArcStudiesFromContracts(contracts) {
|
|
37
44
|
return choose(ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, contracts);
|
|
38
45
|
}
|
|
39
46
|
|
|
47
|
+
export function ARCAux_getStudyDataMapFromContracts(studyIdentifier, contracts) {
|
|
48
|
+
return tryPick((c) => ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static(studyIdentifier, c), contracts);
|
|
49
|
+
}
|
|
50
|
+
|
|
40
51
|
export function ARCAux_getArcInvestigationFromContracts(contracts) {
|
|
41
52
|
return exactlyOne(choose(ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, contracts));
|
|
42
53
|
}
|
|
@@ -48,13 +59,17 @@ export function ARCAux_updateFSByISA(isa, fs) {
|
|
|
48
59
|
}
|
|
49
60
|
else {
|
|
50
61
|
const inv = isa;
|
|
51
|
-
patternInput = [toArray(inv.
|
|
62
|
+
patternInput = [toArray(inv.Studies), toArray(inv.Assays)];
|
|
52
63
|
}
|
|
53
|
-
|
|
54
|
-
const
|
|
64
|
+
let assaysFolder;
|
|
65
|
+
const assays_1 = map((a) => FileSystemTree.createAssayFolder(a.Identifier, a.DataMap != null), patternInput[1]);
|
|
66
|
+
assaysFolder = FileSystemTree.createAssaysFolder(assays_1);
|
|
67
|
+
let studiesFolder;
|
|
68
|
+
const studies_1 = map((s) => FileSystemTree.createStudyFolder(s.Identifier, s.DataMap != null), patternInput[0]);
|
|
69
|
+
studiesFolder = FileSystemTree.createStudiesFolder(studies_1);
|
|
55
70
|
const investigation = FileSystemTree.createInvestigationFile();
|
|
56
71
|
let tree_1;
|
|
57
|
-
const tree = FileSystemTree.createRootFolder([investigation,
|
|
72
|
+
const tree = FileSystemTree.createRootFolder([investigation, assaysFolder, studiesFolder]);
|
|
58
73
|
tree_1 = FileSystem.create({
|
|
59
74
|
tree: tree,
|
|
60
75
|
});
|
|
@@ -178,6 +193,8 @@ export class ARC {
|
|
|
178
193
|
const registeredStudy = registeredStudyOpt;
|
|
179
194
|
registeredStudy.UpdateReferenceByStudyFile(study, true);
|
|
180
195
|
}
|
|
196
|
+
const datamap = ARCAux_getAssayDataMapFromContracts(study.Identifier, contracts);
|
|
197
|
+
study.DataMap = datamap;
|
|
181
198
|
study.StaticHash = (study.GetLightHashCode() | 0);
|
|
182
199
|
});
|
|
183
200
|
assays.forEach((assay) => {
|
|
@@ -193,10 +210,12 @@ export class ARC {
|
|
|
193
210
|
let updatedTables;
|
|
194
211
|
const array_6 = assay_1.StudiesRegisteredIn;
|
|
195
212
|
updatedTables = fold((tables, study_1) => ArcTables.updateReferenceTablesBySheets(new ArcTables(study_1.Tables), tables, false), new ArcTables(assay_1.Tables), array_6);
|
|
213
|
+
const datamap_1 = ARCAux_getAssayDataMapFromContracts(assay_1.Identifier, contracts);
|
|
214
|
+
assay_1.DataMap = datamap_1;
|
|
196
215
|
assay_1.Tables = updatedTables.Tables;
|
|
197
216
|
});
|
|
198
217
|
iterate((a_3) => {
|
|
199
|
-
a_3.StaticHash = (
|
|
218
|
+
a_3.StaticHash = (a_3.GetLightHashCode() | 0);
|
|
200
219
|
}, investigation.Assays);
|
|
201
220
|
iterate((s_2) => {
|
|
202
221
|
s_2.StaticHash = (s_2.GetLightHashCode() | 0);
|
|
@@ -226,10 +245,20 @@ export class ARC {
|
|
|
226
245
|
iterate((s) => {
|
|
227
246
|
s.StaticHash = (s.GetLightHashCode() | 0);
|
|
228
247
|
addToDict(workbooks, Study_fileNameFromIdentifier(s.Identifier), ["ISA_Study", ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7(s)]);
|
|
248
|
+
if (s.DataMap != null) {
|
|
249
|
+
const dm = value_2(s.DataMap);
|
|
250
|
+
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
251
|
+
addToDict(workbooks, Study_datamapFileNameFromIdentifier(s.Identifier), ["ISA_Datamap", toFsWorkbook_1(dm)]);
|
|
252
|
+
}
|
|
229
253
|
}, inv.Studies);
|
|
230
254
|
iterate((a) => {
|
|
231
|
-
a.StaticHash = (
|
|
232
|
-
addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay",
|
|
255
|
+
a.StaticHash = (a.GetLightHashCode() | 0);
|
|
256
|
+
addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay", toFsWorkbook_2(a)]);
|
|
257
|
+
if (a.DataMap != null) {
|
|
258
|
+
const dm_1 = value_2(a.DataMap);
|
|
259
|
+
DataMap__set_StaticHash_Z524259A4(dm_1, safeHash(dm_1));
|
|
260
|
+
addToDict(workbooks, Assay_datamapFileNameFromIdentifier(a.Identifier), ["ISA_Datamap", toFsWorkbook_1(dm_1)]);
|
|
261
|
+
}
|
|
233
262
|
}, inv.Assays);
|
|
234
263
|
}
|
|
235
264
|
return map((fp) => {
|
|
@@ -256,14 +285,80 @@ export class ARC {
|
|
|
256
285
|
return append(collect((s) => {
|
|
257
286
|
const hash_1 = s.GetLightHashCode() | 0;
|
|
258
287
|
return append((s.StaticHash === 0) ? ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(s, true) : ((s.StaticHash !== hash_1) ? singleton(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract(s)) : empty()), delay(() => {
|
|
288
|
+
let dm_1;
|
|
259
289
|
s.StaticHash = (hash_1 | 0);
|
|
260
|
-
|
|
290
|
+
const matchValue_1 = s.DataMap;
|
|
291
|
+
let matchResult, dm_2, dm_3;
|
|
292
|
+
if (matchValue_1 != null) {
|
|
293
|
+
if (DataMap__get_StaticHash(matchValue_1) === 0) {
|
|
294
|
+
matchResult = 0;
|
|
295
|
+
dm_2 = matchValue_1;
|
|
296
|
+
}
|
|
297
|
+
else if ((dm_1 = matchValue_1, DataMap__get_StaticHash(dm_1) !== safeHash(dm_1))) {
|
|
298
|
+
matchResult = 1;
|
|
299
|
+
dm_3 = matchValue_1;
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
matchResult = 2;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
matchResult = 2;
|
|
307
|
+
}
|
|
308
|
+
switch (matchResult) {
|
|
309
|
+
case 0:
|
|
310
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5(dm_2, s.Identifier)), delay(() => {
|
|
311
|
+
DataMap__set_StaticHash_Z524259A4(dm_2, safeHash(dm_2));
|
|
312
|
+
return empty();
|
|
313
|
+
}));
|
|
314
|
+
case 1:
|
|
315
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(dm_3, s.Identifier)), delay(() => {
|
|
316
|
+
DataMap__set_StaticHash_Z524259A4(dm_3, safeHash(dm_3));
|
|
317
|
+
return empty();
|
|
318
|
+
}));
|
|
319
|
+
default: {
|
|
320
|
+
return empty();
|
|
321
|
+
}
|
|
322
|
+
}
|
|
261
323
|
}));
|
|
262
324
|
}, inv_2.Studies), delay(() => collect((a) => {
|
|
263
|
-
const hash_2 =
|
|
325
|
+
const hash_2 = a.GetLightHashCode() | 0;
|
|
264
326
|
return append((a.StaticHash === 0) ? ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(a, true) : ((a.StaticHash !== hash_2) ? singleton(ARCtrl_ArcAssay__ArcAssay_ToUpdateContract(a)) : empty()), delay(() => {
|
|
327
|
+
let dm_5;
|
|
265
328
|
a.StaticHash = (hash_2 | 0);
|
|
266
|
-
|
|
329
|
+
const matchValue_2 = a.DataMap;
|
|
330
|
+
let matchResult_1, dm_6, dm_7;
|
|
331
|
+
if (matchValue_2 != null) {
|
|
332
|
+
if (DataMap__get_StaticHash(matchValue_2) === 0) {
|
|
333
|
+
matchResult_1 = 0;
|
|
334
|
+
dm_6 = matchValue_2;
|
|
335
|
+
}
|
|
336
|
+
else if ((dm_5 = matchValue_2, DataMap__get_StaticHash(dm_5) !== safeHash(dm_5))) {
|
|
337
|
+
matchResult_1 = 1;
|
|
338
|
+
dm_7 = matchValue_2;
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
matchResult_1 = 2;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
matchResult_1 = 2;
|
|
346
|
+
}
|
|
347
|
+
switch (matchResult_1) {
|
|
348
|
+
case 0:
|
|
349
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5(dm_6, a.Identifier)), delay(() => {
|
|
350
|
+
DataMap__set_StaticHash_Z524259A4(dm_6, safeHash(dm_6));
|
|
351
|
+
return empty();
|
|
352
|
+
}));
|
|
353
|
+
case 1:
|
|
354
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(dm_7, a.Identifier)), delay(() => {
|
|
355
|
+
DataMap__set_StaticHash_Z524259A4(dm_7, safeHash(dm_7));
|
|
356
|
+
return empty();
|
|
357
|
+
}));
|
|
358
|
+
default: {
|
|
359
|
+
return empty();
|
|
360
|
+
}
|
|
361
|
+
}
|
|
267
362
|
}));
|
|
268
363
|
}, inv_2.Assays)));
|
|
269
364
|
}));
|
package/Contract/ARC.js
CHANGED
|
@@ -3,6 +3,7 @@ import { $007CInvestigationPath$007C_$007C } from "./ArcInvestigation.js";
|
|
|
3
3
|
import { Contract } from "./Contract.js";
|
|
4
4
|
import { $007CAssayPath$007C_$007C } from "./ArcAssay.js";
|
|
5
5
|
import { $007CStudyPath$007C_$007C } from "./ArcStudy.js";
|
|
6
|
+
import { $007CDatamapPath$007C_$007C } from "./Datamap.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Tries to create READ contract with DTOType = ISA_Assay, ISA_Study or ISA_Investigation from given path relative to ARC root.
|
|
@@ -27,7 +28,14 @@ export function tryISAReadContractFromPath(path) {
|
|
|
27
28
|
return Contract.createRead(p_2, "ISA_Study");
|
|
28
29
|
}
|
|
29
30
|
else {
|
|
30
|
-
|
|
31
|
+
const activePatternResult_3 = $007CDatamapPath$007C_$007C(split);
|
|
32
|
+
if (activePatternResult_3 != null) {
|
|
33
|
+
const p_3 = activePatternResult_3;
|
|
34
|
+
return Contract.createRead(p_3, "ISA_Datamap");
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { equalsWith, item } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
2
|
+
import { combineMany } from "../FileSystem/Path.js";
|
|
3
|
+
import { safeHash, defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
4
|
+
import { Study_datamapFileNameFromIdentifier, Assay_datamapFileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
5
|
+
import { Contract } from "./Contract.js";
|
|
6
|
+
import { fromFsWorkbook, toFsWorkbook } from "../Spreadsheet/DataMap.js";
|
|
7
|
+
import { DataMap__set_StaticHash_Z524259A4 } from "../Core/Table/DataMap.js";
|
|
8
|
+
|
|
9
|
+
export function $007CDatamapPath$007C_$007C(input) {
|
|
10
|
+
let matchResult;
|
|
11
|
+
if (!equalsWith((x, y) => (x === y), input, defaultOf()) && (input.length === 3)) {
|
|
12
|
+
if (item(0, input) === "assays") {
|
|
13
|
+
if (item(2, input) === "isa.datamap.xlsx") {
|
|
14
|
+
matchResult = 0;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
matchResult = 2;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else if (item(0, input) === "studies") {
|
|
21
|
+
if (item(2, input) === "isa.datamap.xlsx") {
|
|
22
|
+
matchResult = 1;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
matchResult = 2;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
matchResult = 2;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
matchResult = 2;
|
|
34
|
+
}
|
|
35
|
+
switch (matchResult) {
|
|
36
|
+
case 0: {
|
|
37
|
+
const anyAssayName = item(1, input);
|
|
38
|
+
return combineMany(input);
|
|
39
|
+
}
|
|
40
|
+
case 1: {
|
|
41
|
+
const anyStudyName = item(1, input);
|
|
42
|
+
return combineMany(input);
|
|
43
|
+
}
|
|
44
|
+
default:
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5(this$, assayIdentifier) {
|
|
50
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
51
|
+
return Contract.createCreate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(this$, assayIdentifier) {
|
|
55
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
56
|
+
return Contract.createUpdate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ARCtrl_DataMap__DataMap_ToDeleteContractForAssay_Z721C83C5(this$, assayIdentifier) {
|
|
60
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
61
|
+
return Contract.createDelete(path);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ARCtrl_DataMap__DataMap_toDeleteContractForAssay_Static_Z721C83C5(assayIdentifier) {
|
|
65
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToDeleteContractForAssay_Z721C83C5(dataMap, assayIdentifier);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ARCtrl_DataMap__DataMap_toUpdateContractForAssay_Static_Z721C83C5(assayIdentifier) {
|
|
69
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(dataMap, assayIdentifier);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static(assayIdentifier, c) {
|
|
73
|
+
let fsworkbook;
|
|
74
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
75
|
+
let matchResult, fsworkbook_1, p_1;
|
|
76
|
+
if (c.Operation === "READ") {
|
|
77
|
+
if (c.DTOType != null) {
|
|
78
|
+
if (c.DTOType === "ISA_Datamap") {
|
|
79
|
+
if (c.DTO != null) {
|
|
80
|
+
if ((fsworkbook = c.DTO, c.Path === path)) {
|
|
81
|
+
matchResult = 0;
|
|
82
|
+
fsworkbook_1 = c.DTO;
|
|
83
|
+
p_1 = c.Path;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
matchResult = 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
matchResult = 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
matchResult = 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
matchResult = 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
matchResult = 1;
|
|
103
|
+
}
|
|
104
|
+
switch (matchResult) {
|
|
105
|
+
case 0: {
|
|
106
|
+
const dm = fromFsWorkbook(fsworkbook_1);
|
|
107
|
+
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
108
|
+
return dm;
|
|
109
|
+
}
|
|
110
|
+
default:
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5(this$, studyIdentifier) {
|
|
116
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
117
|
+
return Contract.createCreate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(this$, studyIdentifier) {
|
|
121
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
122
|
+
return Contract.createUpdate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function ARCtrl_DataMap__DataMap_ToDeleteContractForStudy_Z721C83C5(this$, studyIdentifier) {
|
|
126
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
127
|
+
return Contract.createDelete(path);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function ARCtrl_DataMap__DataMap_toDeleteContractForStudy_Static_Z721C83C5(studyIdentifier) {
|
|
131
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToDeleteContractForStudy_Z721C83C5(dataMap, studyIdentifier);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function ARCtrl_DataMap__DataMap_toUpdateContractForStudy_Static_Z721C83C5(studyIdentifier) {
|
|
135
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(dataMap, studyIdentifier);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static(studyIdentifier, c) {
|
|
139
|
+
let fsworkbook;
|
|
140
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
141
|
+
let matchResult, fsworkbook_1, p_1;
|
|
142
|
+
if (c.Operation === "READ") {
|
|
143
|
+
if (c.DTOType != null) {
|
|
144
|
+
if (c.DTOType === "ISA_Datamap") {
|
|
145
|
+
if (c.DTO != null) {
|
|
146
|
+
if ((fsworkbook = c.DTO, c.Path === path)) {
|
|
147
|
+
matchResult = 0;
|
|
148
|
+
fsworkbook_1 = c.DTO;
|
|
149
|
+
p_1 = c.Path;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
matchResult = 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
matchResult = 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
matchResult = 1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
matchResult = 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
matchResult = 1;
|
|
169
|
+
}
|
|
170
|
+
switch (matchResult) {
|
|
171
|
+
case 0: {
|
|
172
|
+
const dm = fromFsWorkbook(fsworkbook_1);
|
|
173
|
+
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
174
|
+
return dm;
|
|
175
|
+
}
|
|
176
|
+
default:
|
|
177
|
+
return void 0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|