@nfdi4plants/arctrl 3.0.0-alpha.3 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -9
- package/dist/ts/cjs/ts/ARC.js +25 -17
- package/dist/ts/cjs/ts/Conversion.js +133 -86
- package/dist/ts/cjs/ts/Core/ArcTypes.js +1 -1
- package/dist/ts/cjs/ts/Core/Conversion.js +110 -43
- package/dist/ts/cjs/ts/Core/Helper/Collections.js +84 -1
- package/dist/ts/cjs/ts/Core/OntologyAnnotation.js +27 -23
- package/dist/ts/cjs/ts/Core/Table/ArcTable.js +234 -217
- package/dist/ts/cjs/ts/Core/Table/ArcTableAux.js +915 -235
- package/dist/ts/cjs/ts/Core/Table/ArcTables.js +12 -19
- package/dist/ts/cjs/ts/Core/Table/CompositeColumn.js +4 -2
- package/dist/ts/cjs/ts/FileSystem/DefaultGitattributes.js +1 -1
- package/dist/ts/cjs/ts/Json/Decode.js +105 -0
- package/dist/ts/cjs/ts/Json/Encode.js +42 -0
- package/dist/ts/cjs/ts/Json/StringTable.js +9 -2
- package/dist/ts/cjs/ts/Json/Table/ArcTable.js +100 -113
- package/dist/ts/cjs/ts/Json/Table/CellTable.js +2 -2
- package/dist/ts/cjs/ts/Json/Table/OATable.js +2 -2
- package/dist/ts/cjs/ts/JsonIO/Table/Compression.js +4 -11
- package/dist/ts/cjs/ts/ROCrate/Generic/LabProcess.js +1 -1
- package/dist/ts/cjs/ts/ROCrate/LDContext.js +92 -54
- package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/ArcTable.js +15 -4
- package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +77 -6
- package/dist/ts/cjs/ts/Spreadsheet/ArcInvestigation.js +31 -15
- package/dist/ts/cjs/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
- package/dist/ts/cjs/ts/Spreadsheet/Metadata/SparseTable.js +2 -5
- package/dist/ts/esm/ts/ARC.js +28 -20
- package/dist/ts/esm/ts/Conversion.js +137 -90
- package/dist/ts/esm/ts/Core/ArcTypes.js +1 -1
- package/dist/ts/esm/ts/Core/Conversion.js +112 -45
- package/dist/ts/esm/ts/Core/Helper/Collections.js +73 -1
- package/dist/ts/esm/ts/Core/OntologyAnnotation.js +29 -25
- package/dist/ts/esm/ts/Core/Table/ArcTable.js +243 -226
- package/dist/ts/esm/ts/Core/Table/ArcTableAux.js +907 -246
- package/dist/ts/esm/ts/Core/Table/ArcTables.js +15 -22
- package/dist/ts/esm/ts/Core/Table/CompositeColumn.js +5 -3
- package/dist/ts/esm/ts/FileSystem/DefaultGitattributes.js +1 -1
- package/dist/ts/esm/ts/Json/Decode.js +105 -3
- package/dist/ts/esm/ts/Json/Encode.js +42 -2
- package/dist/ts/esm/ts/Json/StringTable.js +10 -3
- package/dist/ts/esm/ts/Json/Table/ArcTable.js +108 -121
- package/dist/ts/esm/ts/Json/Table/CellTable.js +2 -2
- package/dist/ts/esm/ts/Json/Table/OATable.js +2 -2
- package/dist/ts/esm/ts/JsonIO/Table/Compression.js +4 -11
- package/dist/ts/esm/ts/ROCrate/Generic/LabProcess.js +1 -1
- package/dist/ts/esm/ts/ROCrate/LDContext.js +106 -66
- package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/ArcTable.js +17 -7
- package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +78 -9
- package/dist/ts/esm/ts/Spreadsheet/ArcInvestigation.js +33 -17
- package/dist/ts/esm/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
- package/dist/ts/esm/ts/Spreadsheet/Metadata/SparseTable.js +3 -6
- package/dist/ts/types/ts/ARC.d.ts +2 -2
- package/dist/ts/types/ts/ARC.d.ts.map +1 -1
- package/dist/ts/types/ts/Conversion.d.ts +17 -18
- package/dist/ts/types/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/ArcTypes.d.ts +2 -0
- package/dist/ts/types/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Conversion.d.ts +14 -15
- package/dist/ts/types/ts/Core/Conversion.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Helper/Collections.d.ts +11 -0
- package/dist/ts/types/ts/Core/Helper/Collections.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts +9 -0
- package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTable.d.ts +35 -28
- package/dist/ts/types/ts/Core/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts +84 -33
- package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/ArcTables.d.ts.map +1 -1
- package/dist/ts/types/ts/Core/Table/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts +1 -1
- package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Decode.d.ts +6 -0
- package/dist/ts/types/ts/Json/Decode.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Encode.d.ts +2 -0
- package/dist/ts/types/ts/Json/Encode.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/StringTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Table/ArcTable.d.ts +4 -3
- package/dist/ts/types/ts/Json/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Table/CellTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Json/Table/OATable.d.ts.map +1 -1
- package/dist/ts/types/ts/JsonIO/Table/Compression.d.ts.map +1 -1
- package/dist/ts/types/ts/ROCrate/LDContext.d.ts +3 -5
- package/dist/ts/types/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +5 -0
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +7 -0
- package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/types/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ts/esm/ts/ARC.js
CHANGED
|
@@ -8,15 +8,16 @@ import { PromiseBuilder__Delay_62FBFDE1, PromiseBuilder__Run_212F1D4B } from "./
|
|
|
8
8
|
import { promise } from "./fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js";
|
|
9
9
|
import { getAllFilePathsAsync } from "./ContractIO/FileSystemHelper.js";
|
|
10
10
|
import { toList, collect, empty, find, tryFind, iterate, map, singleton, append, delay, contains, toArray } from "@fable-org/fable-library-js/Seq.js";
|
|
11
|
-
import { defaultOf, disposeSafe, getEnumerator, safeHash, curry2, comparePrimitives, stringHash } from "@fable-org/fable-library-js/Util.js";
|
|
11
|
+
import { equals, defaultOf, disposeSafe, getEnumerator, safeHash, curry2, comparePrimitives, stringHash } from "@fable-org/fable-library-js/Util.js";
|
|
12
12
|
import { getStudyFolderPath, getAssayFolderPath } from "./FileSystem/Path.js";
|
|
13
13
|
import { ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F, ARCtrl_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ArcAssay__ArcAssay_ToDeleteContract } from "./Contract/ArcAssay.js";
|
|
14
14
|
import { ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract } from "./Contract/ArcInvestigation.js";
|
|
15
15
|
import { ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_ToUpdateContract } from "./Contract/ArcStudy.js";
|
|
16
|
-
import {
|
|
16
|
+
import { item, equalsWith, tryPick, append as append_1, contains as contains_2, concat, fold, choose, map as map_1 } from "@fable-org/fable-library-js/Array.js";
|
|
17
17
|
import { toText, printf, toFail, join, replace } from "@fable-org/fable-library-js/String.js";
|
|
18
18
|
import { Run_datamapFileNameFromIdentifier, Run_fileNameFromIdentifier, Workflow_datamapFileNameFromIdentifier, Workflow_fileNameFromIdentifier, Assay_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Study_fileNameFromIdentifier, createMissingIdentifier } from "./Core/Helper/Identifier.js";
|
|
19
19
|
import { FSharpSet__Contains, unionMany, contains as contains_1, ofSeq } from "@fable-org/fable-library-js/Set.js";
|
|
20
|
+
import { ResizeArray_map, ResizeArray_iter } from "./Core/Helper/Collections.js";
|
|
20
21
|
import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4, DataMap__get_DataContexts } from "./Core/DataMap.js";
|
|
21
22
|
import { FileSystemTree_Folder, FileSystemTree } from "./FileSystem/FileSystemTree.js";
|
|
22
23
|
import { tryISAReadContractFromPath } from "./Contract/ARC.js";
|
|
@@ -33,8 +34,7 @@ import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.3.1/Cells/FsC
|
|
|
33
34
|
import { ARCtrl_DataMap__DataMap_tryFromReadContractForRun_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForWorkflow_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static, ARCtrl_DataMap__DataMap_ToUpdateContractForRun_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForRun_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForWorkflow_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForWorkflow_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5 } from "./Contract/Datamap.js";
|
|
34
35
|
import { ARCtrl_ArcWorkflow__ArcWorkflow_tryFromReadContract_Static_7570923F, ARCtrl_ArcWorkflow__ArcWorkflow_ToUpdateContract, ARCtrl_ArcWorkflow__ArcWorkflow_ToCreateContract_6FCE9E49 } from "./Contract/ArcWorkflow.js";
|
|
35
36
|
import { ARCtrl_ArcRun__ArcRun_tryFromReadContract_Static_7570923F, ARCtrl_ArcRun__ArcRun_ToUpdateContract, ARCtrl_ArcRun__ArcRun_ToCreateContract_6FCE9E49 } from "./Contract/ArcRun.js";
|
|
36
|
-
import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5,
|
|
37
|
-
import { ResizeArray_map } from "./Core/Helper/Collections.js";
|
|
37
|
+
import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitattributesContract, gitignoreContract, Init_createInitContract_6DFDD678 } from "./Contract/Git.js";
|
|
38
38
|
import { ofSeq as ofSeq_1 } from "@fable-org/fable-library-js/Map.js";
|
|
39
39
|
import { fromString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js";
|
|
40
40
|
import { ROCrate_encoder_8A8D439, ROCrate_get_decoder, ROCrate_get_decoderDeprecated } from "./ROCrateIO.js";
|
|
@@ -53,7 +53,7 @@ export class ARC extends ArcInvestigation {
|
|
|
53
53
|
this._fs = ((fs_1 = defaultArg(fs, FileSystem.create({
|
|
54
54
|
tree: FileSystemTree_Folder("", []),
|
|
55
55
|
})), ARCAux_updateFSByISA(this$.contents, fs_1)));
|
|
56
|
-
this["init@
|
|
56
|
+
this["init@90"] = 1;
|
|
57
57
|
}
|
|
58
58
|
get FileSystem() {
|
|
59
59
|
const this$ = this;
|
|
@@ -287,12 +287,12 @@ export class ARC extends ArcInvestigation {
|
|
|
287
287
|
}
|
|
288
288
|
switch (matchResult) {
|
|
289
289
|
case 0: {
|
|
290
|
-
|
|
290
|
+
ResizeArray_iter((c) => {
|
|
291
291
|
if (c.AsData.FilePath != null) {
|
|
292
292
|
const newFilePath = dataNameFunction(c.AsData);
|
|
293
293
|
c.AsData.FilePath = newFilePath;
|
|
294
294
|
}
|
|
295
|
-
});
|
|
295
|
+
}, col_2.Cells);
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
case 1: {
|
|
@@ -313,19 +313,19 @@ export class ARC extends ArcInvestigation {
|
|
|
313
313
|
}, DataMap__get_DataContexts(dm));
|
|
314
314
|
};
|
|
315
315
|
iterate((s) => {
|
|
316
|
-
const
|
|
316
|
+
const f_1 = (d) => d.GetAbsolutePathForStudy(s.Identifier, checkExistenceFromRoot);
|
|
317
317
|
const source_1 = s.Tables;
|
|
318
|
-
iterate(curry2(updateTable)(
|
|
318
|
+
iterate(curry2(updateTable)(f_1), source_1);
|
|
319
319
|
if (s.DataMap != null) {
|
|
320
|
-
updateDataMap(
|
|
320
|
+
updateDataMap(f_1, value_3(s.DataMap));
|
|
321
321
|
}
|
|
322
322
|
}, this$.Studies);
|
|
323
|
-
iterate((
|
|
324
|
-
const
|
|
325
|
-
const source_3 =
|
|
326
|
-
iterate(curry2(updateTable)(
|
|
327
|
-
if (
|
|
328
|
-
updateDataMap(
|
|
323
|
+
iterate((a_1) => {
|
|
324
|
+
const f_2 = (d_1) => d_1.GetAbsolutePathForAssay(a_1.Identifier, checkExistenceFromRoot);
|
|
325
|
+
const source_3 = a_1.Tables;
|
|
326
|
+
iterate(curry2(updateTable)(f_2), source_3);
|
|
327
|
+
if (a_1.DataMap != null) {
|
|
328
|
+
updateDataMap(f_2, value_3(a_1.DataMap));
|
|
329
329
|
}
|
|
330
330
|
}, this$.Assays);
|
|
331
331
|
}
|
|
@@ -381,7 +381,7 @@ export class ARC extends ArcInvestigation {
|
|
|
381
381
|
const registeredStudy = value_3(registeredStudyOpt);
|
|
382
382
|
registeredStudy.UpdateReferenceByStudyFile(study, true);
|
|
383
383
|
}
|
|
384
|
-
const datamap =
|
|
384
|
+
const datamap = ARCAux_getStudyDataMapFromContracts(study.Identifier, contracts);
|
|
385
385
|
if (study.DataMap == null) {
|
|
386
386
|
study.DataMap = datamap;
|
|
387
387
|
}
|
|
@@ -663,9 +663,10 @@ export class ARC extends ArcInvestigation {
|
|
|
663
663
|
}));
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
GetGitInitContracts(branch, repositoryAddress, defaultGitignore) {
|
|
666
|
+
GetGitInitContracts(branch, repositoryAddress, defaultGitignore, defaultGitattributes) {
|
|
667
667
|
const defaultGitignore_1 = defaultArg(defaultGitignore, false);
|
|
668
|
-
|
|
668
|
+
const defaultGitattributes_1 = defaultArg(defaultGitattributes, false);
|
|
669
|
+
return toArray(delay(() => append(singleton(Init_createInitContract_6DFDD678(unwrap(branch))), delay(() => append(defaultGitignore_1 ? singleton(gitignoreContract) : empty(), delay(() => append(defaultGitattributes_1 ? singleton(gitattributesContract) : empty(), delay(() => ((repositoryAddress != null) ? singleton(Init_createAddRemoteContract_Z721C83C5(value_3(repositoryAddress))) : empty())))))))));
|
|
669
670
|
}
|
|
670
671
|
static getCloneContract(remoteUrl, merge, branch, token, nolfs) {
|
|
671
672
|
return Clone_createCloneContract_5000466F(remoteUrl, unwrap(merge), unwrap(branch), unwrap(token), unwrap(nolfs));
|
|
@@ -913,7 +914,14 @@ export function ARCAux_getRunDataMapFromContracts(runIdentifier, contracts) {
|
|
|
913
914
|
return tryPick((c) => ARCtrl_DataMap__DataMap_tryFromReadContractForRun_Static(runIdentifier, c), contracts);
|
|
914
915
|
}
|
|
915
916
|
export function ARCAux_getArcInvestigationFromContracts(contracts) {
|
|
916
|
-
|
|
917
|
+
const matchValue = choose(ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, contracts);
|
|
918
|
+
if (!equalsWith(equals, matchValue, defaultOf()) && (matchValue.length === 1)) {
|
|
919
|
+
return item(0, matchValue);
|
|
920
|
+
}
|
|
921
|
+
else {
|
|
922
|
+
const arg = matchValue.length | 0;
|
|
923
|
+
return toFail(printf("Could not find investigation in contracts. Expected exactly one investigation, but found %d."))(arg);
|
|
924
|
+
}
|
|
917
925
|
}
|
|
918
926
|
export function ARCAux_updateFSByISA(isa, fs) {
|
|
919
927
|
let assaysFolder;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { fromString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js";
|
|
2
2
|
import { Decode_datetime } from "./Json/Decode.js";
|
|
3
|
-
import { join,
|
|
3
|
+
import { join, toFail, printf, toText } from "@fable-org/fable-library-js/String.js";
|
|
4
4
|
import { bind, defaultArg, map, unwrap, value as value_4 } from "@fable-org/fable-library-js/Option.js";
|
|
5
5
|
import { toString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Encode.fs.js";
|
|
6
6
|
import { dateTime } from "./Json/Encode.js";
|
|
7
7
|
import { parse, tryParse } from "@fable-org/fable-library-js/Int32.js";
|
|
8
8
|
import { toString as toString_1, FSharpRef } from "@fable-org/fable-library-js/Types.js";
|
|
9
9
|
import { LDRef, LDNode } from "./ROCrate/LDObject.js";
|
|
10
|
-
import { safeHash, equals, disposeSafe, getEnumerator,
|
|
10
|
+
import { safeHash, equals, disposeSafe, getEnumerator, comparePrimitives, stringHash, int32ToString } from "@fable-org/fable-library-js/Util.js";
|
|
11
11
|
import { class_type } from "@fable-org/fable-library-js/Reflection.js";
|
|
12
12
|
import { LDComment } from "./ROCrate/Generic/Comment.js";
|
|
13
13
|
import { Comment$ } from "./Core/Comment.js";
|
|
@@ -24,17 +24,15 @@ import { DataContext_$ctor_Z780A8A2A, DataContext__get_Label, DataContext__get_D
|
|
|
24
24
|
import { LDSample } from "./ROCrate/Generic/Sample.js";
|
|
25
25
|
import { ActivePatterns_$007CRegex$007C_$007C } from "./Core/Helper/Regex.js";
|
|
26
26
|
import { LDLabProtocol } from "./ROCrate/Generic/LabProtocol.js";
|
|
27
|
-
import {
|
|
27
|
+
import { Unchecked_alignByHeaders, getEmptyCellForHeader, Unchecked_tryGetCellAt } from "./Core/Table/ArcTableAux.js";
|
|
28
|
+
import { ArcTable } from "./Core/Table/ArcTable.js";
|
|
28
29
|
import { LDPerson } from "./ROCrate/Generic/Person.js";
|
|
29
|
-
import { isEmpty, zip, fold, singleton, empty as empty_1, append, delay,
|
|
30
|
-
import { ofSeq, collect, initialize, singleton as
|
|
30
|
+
import { isEmpty, zip, fold, singleton, empty as empty_1, append, delay, map as map_1, choose as choose_1, tryPick, filter, toList, indexed } from "@fable-org/fable-library-js/Seq.js";
|
|
31
|
+
import { ofSeq, collect, initialize, singleton as singleton_1, sortBy, map as map_2, empty, length, choose } from "@fable-org/fable-library-js/List.js";
|
|
31
32
|
import { LDLabProcess } from "./ROCrate/Generic/LabProcess.js";
|
|
32
33
|
import { List_distinct, List_groupBy } from "@fable-org/fable-library-js/Seq2.js";
|
|
33
34
|
import { createMissingIdentifier } from "./Core/Helper/Identifier.js";
|
|
34
|
-
import { ArcTable } from "./Core/Table/ArcTable.js";
|
|
35
|
-
import { singleton as singleton_1 } from "@fable-org/fable-library-js/Array.js";
|
|
36
35
|
import { rangeDouble } from "@fable-org/fable-library-js/Range.js";
|
|
37
|
-
import { Unchecked_alignByHeaders } from "./Core/Table/ArcTableAux.js";
|
|
38
36
|
import { ArcTables } from "./Core/Table/ArcTables.js";
|
|
39
37
|
import { DataMap_init, DataMap_$ctor_4E3220A7, DataMap__get_DataContexts } from "./Core/DataMap.js";
|
|
40
38
|
import { LDOrganization } from "./ROCrate/Generic/Organization.js";
|
|
@@ -604,8 +602,9 @@ export function ProcessConversion_decomposeProcessName_Z721C83C5(name) {
|
|
|
604
602
|
export function ProcessConversion_tryComponentGetter(generalI, valueI, valueHeader) {
|
|
605
603
|
if (valueHeader.tag === /* Component */ 0) {
|
|
606
604
|
const oa = valueHeader.fields[0];
|
|
607
|
-
return (
|
|
608
|
-
|
|
605
|
+
return (table) => ((i) => {
|
|
606
|
+
let matchValue;
|
|
607
|
+
const c = BaseTypes_composeComponent(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
|
|
609
608
|
ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(c, valueI);
|
|
610
609
|
return c;
|
|
611
610
|
});
|
|
@@ -620,8 +619,9 @@ export function ProcessConversion_tryComponentGetter(generalI, valueI, valueHead
|
|
|
620
619
|
export function ProcessConversion_tryParameterGetter(generalI, valueI, valueHeader) {
|
|
621
620
|
if (valueHeader.tag === /* Parameter */ 3) {
|
|
622
621
|
const oa = valueHeader.fields[0];
|
|
623
|
-
return (
|
|
624
|
-
|
|
622
|
+
return (table) => ((i) => {
|
|
623
|
+
let matchValue;
|
|
624
|
+
const p = BaseTypes_composeParameterValue(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
|
|
625
625
|
ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(p, valueI);
|
|
626
626
|
return p;
|
|
627
627
|
});
|
|
@@ -636,8 +636,9 @@ export function ProcessConversion_tryParameterGetter(generalI, valueI, valueHead
|
|
|
636
636
|
export function ProcessConversion_tryFactorGetter(generalI, valueI, valueHeader) {
|
|
637
637
|
if (valueHeader.tag === /* Factor */ 2) {
|
|
638
638
|
const oa = valueHeader.fields[0];
|
|
639
|
-
return (
|
|
640
|
-
|
|
639
|
+
return (table) => ((i) => {
|
|
640
|
+
let matchValue;
|
|
641
|
+
const f = BaseTypes_composeFactorValue(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
|
|
641
642
|
ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(f, valueI);
|
|
642
643
|
return f;
|
|
643
644
|
});
|
|
@@ -652,8 +653,9 @@ export function ProcessConversion_tryFactorGetter(generalI, valueI, valueHeader)
|
|
|
652
653
|
export function ProcessConversion_tryCharacteristicGetter(generalI, valueI, valueHeader) {
|
|
653
654
|
if (valueHeader.tag === /* Characteristic */ 1) {
|
|
654
655
|
const oa = valueHeader.fields[0];
|
|
655
|
-
return (
|
|
656
|
-
|
|
656
|
+
return (table) => ((i) => {
|
|
657
|
+
let matchValue;
|
|
658
|
+
const c = BaseTypes_composeCharacteristicValue(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
|
|
657
659
|
ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(c, valueI);
|
|
658
660
|
return c;
|
|
659
661
|
});
|
|
@@ -667,7 +669,10 @@ export function ProcessConversion_tryCharacteristicGetter(generalI, valueI, valu
|
|
|
667
669
|
*/
|
|
668
670
|
export function ProcessConversion_tryGetProtocolTypeGetter(generalI, header) {
|
|
669
671
|
if (header.tag === /* ProtocolType */ 4) {
|
|
670
|
-
return (
|
|
672
|
+
return (table) => ((i) => {
|
|
673
|
+
let matchValue, cell;
|
|
674
|
+
return BaseTypes_composeDefinedTerm_ZDED3A0F((matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? (new OntologyAnnotation()) : ((cell = value_4(matchValue), cell.AsTerm))));
|
|
675
|
+
});
|
|
671
676
|
}
|
|
672
677
|
else {
|
|
673
678
|
return undefined;
|
|
@@ -678,7 +683,16 @@ export function ProcessConversion_tryGetProtocolTypeGetter(generalI, header) {
|
|
|
678
683
|
*/
|
|
679
684
|
export function ProcessConversion_tryGetProtocolREFGetter(generalI, header) {
|
|
680
685
|
if (header.tag === /* ProtocolREF */ 8) {
|
|
681
|
-
return (
|
|
686
|
+
return (table) => ((i) => {
|
|
687
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
688
|
+
if (matchValue == null) {
|
|
689
|
+
return "";
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
692
|
+
const cell = value_4(matchValue);
|
|
693
|
+
return cell.AsFreeText;
|
|
694
|
+
}
|
|
695
|
+
});
|
|
682
696
|
}
|
|
683
697
|
else {
|
|
684
698
|
return undefined;
|
|
@@ -689,7 +703,16 @@ export function ProcessConversion_tryGetProtocolREFGetter(generalI, header) {
|
|
|
689
703
|
*/
|
|
690
704
|
export function ProcessConversion_tryGetProtocolDescriptionGetter(generalI, header) {
|
|
691
705
|
if (header.tag === /* ProtocolDescription */ 5) {
|
|
692
|
-
return (
|
|
706
|
+
return (table) => ((i) => {
|
|
707
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
708
|
+
if (matchValue == null) {
|
|
709
|
+
return "";
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
const cell = value_4(matchValue);
|
|
713
|
+
return cell.AsFreeText;
|
|
714
|
+
}
|
|
715
|
+
});
|
|
693
716
|
}
|
|
694
717
|
else {
|
|
695
718
|
return undefined;
|
|
@@ -700,7 +723,16 @@ export function ProcessConversion_tryGetProtocolDescriptionGetter(generalI, head
|
|
|
700
723
|
*/
|
|
701
724
|
export function ProcessConversion_tryGetProtocolURIGetter(generalI, header) {
|
|
702
725
|
if (header.tag === /* ProtocolUri */ 6) {
|
|
703
|
-
return (
|
|
726
|
+
return (table) => ((i) => {
|
|
727
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
728
|
+
if (matchValue == null) {
|
|
729
|
+
return "";
|
|
730
|
+
}
|
|
731
|
+
else {
|
|
732
|
+
const cell = value_4(matchValue);
|
|
733
|
+
return cell.AsFreeText;
|
|
734
|
+
}
|
|
735
|
+
});
|
|
704
736
|
}
|
|
705
737
|
else {
|
|
706
738
|
return undefined;
|
|
@@ -711,7 +743,16 @@ export function ProcessConversion_tryGetProtocolURIGetter(generalI, header) {
|
|
|
711
743
|
*/
|
|
712
744
|
export function ProcessConversion_tryGetProtocolVersionGetter(generalI, header) {
|
|
713
745
|
if (header.tag === /* ProtocolVersion */ 7) {
|
|
714
|
-
return (
|
|
746
|
+
return (table) => ((i) => {
|
|
747
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
748
|
+
if (matchValue == null) {
|
|
749
|
+
return "";
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
const cell = value_4(matchValue);
|
|
753
|
+
return cell.AsFreeText;
|
|
754
|
+
}
|
|
755
|
+
});
|
|
715
756
|
}
|
|
716
757
|
else {
|
|
717
758
|
return undefined;
|
|
@@ -723,7 +764,10 @@ export function ProcessConversion_tryGetProtocolVersionGetter(generalI, header)
|
|
|
723
764
|
export function ProcessConversion_tryGetInputGetter(generalI, header) {
|
|
724
765
|
if (header.tag === /* Input */ 11) {
|
|
725
766
|
const io = header.fields[0];
|
|
726
|
-
return (
|
|
767
|
+
return (table) => ((i) => {
|
|
768
|
+
let matchValue;
|
|
769
|
+
return BaseTypes_composeProcessInput(header, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(header, undefined) : value_4(matchValue)));
|
|
770
|
+
});
|
|
727
771
|
}
|
|
728
772
|
else {
|
|
729
773
|
return undefined;
|
|
@@ -735,7 +779,10 @@ export function ProcessConversion_tryGetInputGetter(generalI, header) {
|
|
|
735
779
|
export function ProcessConversion_tryGetOutputGetter(generalI, header) {
|
|
736
780
|
if (header.tag === /* Output */ 12) {
|
|
737
781
|
const io = header.fields[0];
|
|
738
|
-
return (
|
|
782
|
+
return (table) => ((i) => {
|
|
783
|
+
let matchValue;
|
|
784
|
+
return BaseTypes_composeProcessOutput(header, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(header, undefined) : value_4(matchValue)));
|
|
785
|
+
});
|
|
739
786
|
}
|
|
740
787
|
else {
|
|
741
788
|
return undefined;
|
|
@@ -747,7 +794,10 @@ export function ProcessConversion_tryGetOutputGetter(generalI, header) {
|
|
|
747
794
|
export function ProcessConversion_tryGetCommentGetter(generalI, header) {
|
|
748
795
|
if (header.tag === /* Comment */ 14) {
|
|
749
796
|
const c = header.fields[0];
|
|
750
|
-
return (
|
|
797
|
+
return (table) => ((i) => {
|
|
798
|
+
let matchValue, cell;
|
|
799
|
+
return toString_1((matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? (new Comment$(c)) : ((cell = value_4(matchValue), new Comment$(c, cell.AsFreeText)))));
|
|
800
|
+
});
|
|
751
801
|
}
|
|
752
802
|
else {
|
|
753
803
|
return undefined;
|
|
@@ -755,8 +805,16 @@ export function ProcessConversion_tryGetCommentGetter(generalI, header) {
|
|
|
755
805
|
}
|
|
756
806
|
export function ProcessConversion_tryGetPerformerGetter(generalI, header) {
|
|
757
807
|
if (header.tag === /* Performer */ 9) {
|
|
758
|
-
return (
|
|
759
|
-
|
|
808
|
+
return (table) => ((i) => {
|
|
809
|
+
let performer;
|
|
810
|
+
const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
|
|
811
|
+
if (matchValue == null) {
|
|
812
|
+
performer = "";
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
const cell = value_4(matchValue);
|
|
816
|
+
performer = cell.AsFreeText;
|
|
817
|
+
}
|
|
760
818
|
return LDPerson.create(performer);
|
|
761
819
|
});
|
|
762
820
|
}
|
|
@@ -767,7 +825,7 @@ export function ProcessConversion_tryGetPerformerGetter(generalI, header) {
|
|
|
767
825
|
/**
|
|
768
826
|
* Given the header sequence of an ArcTable, returns a function for parsing each row of the table to a process
|
|
769
827
|
*/
|
|
770
|
-
export function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
828
|
+
export function ProcessConversion_getProcessGetter(assayName, studyName, processNameRoot, headers) {
|
|
771
829
|
const headers_1 = indexed(headers);
|
|
772
830
|
const valueHeaders = toList(indexed(filter((arg) => arg[1].IsCvParamColumn, headers_1)));
|
|
773
831
|
const charGetters = choose((tupledArg) => {
|
|
@@ -796,20 +854,20 @@ export function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
|
796
854
|
let inputGetter_1;
|
|
797
855
|
const matchValue = tryPick((tupledArg_11) => ProcessConversion_tryGetInputGetter(tupledArg_11[0], tupledArg_11[1]), headers_1);
|
|
798
856
|
if (matchValue == null) {
|
|
799
|
-
inputGetter_1 = ((length(charGetters) !== 0) ? ((
|
|
857
|
+
inputGetter_1 = ((length(charGetters) !== 0) ? ((table_1) => ((i_1) => {
|
|
800
858
|
let chars_1;
|
|
801
|
-
const collection_1 = map_1((f_1) => f_1(
|
|
859
|
+
const collection_1 = map_1((f_1) => f_1(table_1)(i_1), charGetters);
|
|
802
860
|
chars_1 = Array.from(collection_1);
|
|
803
861
|
return ResizeArray_singleton(LDSample.createSample(`${processNameRoot}_Input_${i_1}`, undefined, chars_1));
|
|
804
|
-
})) : ((
|
|
862
|
+
})) : ((table_2) => ((i_2) => [])));
|
|
805
863
|
}
|
|
806
864
|
else {
|
|
807
865
|
const inputGetter = value_4(matchValue);
|
|
808
|
-
inputGetter_1 = ((
|
|
866
|
+
inputGetter_1 = ((table) => ((i) => {
|
|
809
867
|
let chars;
|
|
810
|
-
const collection = map_1((f) => f(
|
|
868
|
+
const collection = map_1((f) => f(table)(i), charGetters);
|
|
811
869
|
chars = Array.from(collection);
|
|
812
|
-
const input = inputGetter(
|
|
870
|
+
const input = inputGetter(table)(i);
|
|
813
871
|
if (chars.length > 0) {
|
|
814
872
|
LDSample.setAdditionalProperties(input, chars);
|
|
815
873
|
}
|
|
@@ -819,41 +877,40 @@ export function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
|
819
877
|
let outputGetter_1;
|
|
820
878
|
const matchValue_1 = tryPick((tupledArg_12) => ProcessConversion_tryGetOutputGetter(tupledArg_12[0], tupledArg_12[1]), headers_1);
|
|
821
879
|
if (matchValue_1 == null) {
|
|
822
|
-
outputGetter_1 = ((length(factorValueGetters) !== 0) ? ((
|
|
880
|
+
outputGetter_1 = ((length(factorValueGetters) !== 0) ? ((table_4) => ((i_4) => {
|
|
823
881
|
let factors_1;
|
|
824
|
-
const collection_3 = map_1((f_3) => f_3(
|
|
882
|
+
const collection_3 = map_1((f_3) => f_3(table_4)(i_4), factorValueGetters);
|
|
825
883
|
factors_1 = Array.from(collection_3);
|
|
826
884
|
return ResizeArray_singleton(LDSample.createSample(`${processNameRoot}_Output_${i_4}`, undefined, factors_1));
|
|
827
|
-
})) : ((
|
|
885
|
+
})) : ((table_5) => ((i_5) => [])));
|
|
828
886
|
}
|
|
829
887
|
else {
|
|
830
888
|
const outputGetter = value_4(matchValue_1);
|
|
831
|
-
outputGetter_1 = ((
|
|
889
|
+
outputGetter_1 = ((table_3) => ((i_3) => {
|
|
832
890
|
let factors;
|
|
833
|
-
const collection_2 = map_1((f_2) => f_2(
|
|
891
|
+
const collection_2 = map_1((f_2) => f_2(table_3)(i_3), factorValueGetters);
|
|
834
892
|
factors = Array.from(collection_2);
|
|
835
|
-
const output = outputGetter(
|
|
893
|
+
const output = outputGetter(table_3)(i_3);
|
|
836
894
|
if (factors.length > 0) {
|
|
837
895
|
LDSample.setAdditionalProperties(output, factors);
|
|
838
896
|
}
|
|
839
897
|
return ResizeArray_singleton(output);
|
|
840
898
|
}));
|
|
841
899
|
}
|
|
842
|
-
return (
|
|
843
|
-
const pn = (
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
const
|
|
847
|
-
const
|
|
848
|
-
const components = map((collection_6) => Array.from(collection_6), Option_fromValueWithDefault(empty(), map_2((f_6) => f_6(matrix_6)(i_6), componentGetters)));
|
|
900
|
+
return (table_6) => ((i_6) => {
|
|
901
|
+
const pn = (table_6.RowCount === 1) ? processNameRoot : ProcessConversion_composeProcessName(processNameRoot, i_6);
|
|
902
|
+
const paramvalues = map((collection_4) => Array.from(collection_4), Option_fromValueWithDefault(empty(), map_2((f_4) => f_4(table_6)(i_6), parameterValueGetters)));
|
|
903
|
+
const comments = map((collection_5) => Array.from(collection_5), Option_fromValueWithDefault(empty(), map_2((f_5) => f_5(table_6)(i_6), commentGetters)));
|
|
904
|
+
const components = map((collection_6) => Array.from(collection_6), Option_fromValueWithDefault(empty(), map_2((f_6) => f_6(table_6)(i_6), componentGetters)));
|
|
905
|
+
const id = LDLabProcess.genId(processNameRoot, unwrap(assayName), unwrap(studyName)) + (`_${i_6}`);
|
|
849
906
|
let protocol;
|
|
850
|
-
const name = map((f_7) => f_7(
|
|
907
|
+
const name = map((f_7) => f_7(table_6)(i_6), protocolREFGetter);
|
|
851
908
|
const protocolId = LDLabProtocol.genId(unwrap(name), processNameRoot);
|
|
852
|
-
protocol = LDLabProtocol.create(protocolId, unwrap(name), unwrap(map((f_8) => f_8(
|
|
853
|
-
const matchValue_2 = inputGetter_1(
|
|
854
|
-
const matchValue_3 = outputGetter_1(
|
|
855
|
-
const agent = map((f_12) => f_12(
|
|
856
|
-
return LDLabProcess.create(pn, matchValue_2, matchValue_3,
|
|
909
|
+
protocol = LDLabProtocol.create(protocolId, unwrap(name), unwrap(map((f_8) => f_8(table_6)(i_6), protocolDescriptionGetter)), unwrap(map((f_9) => f_9(table_6)(i_6), protocolTypeGetter)), undefined, undefined, unwrap(components), undefined, unwrap(map((f_10) => f_10(table_6)(i_6), protocolURIGetter)), unwrap(map((f_11) => f_11(table_6)(i_6), protocolVersionGetter)));
|
|
910
|
+
const matchValue_2 = inputGetter_1(table_6)(i_6);
|
|
911
|
+
const matchValue_3 = outputGetter_1(table_6)(i_6);
|
|
912
|
+
const agent = map((f_12) => f_12(table_6)(i_6), performerGetter);
|
|
913
|
+
return LDLabProcess.create(pn, matchValue_2, matchValue_3, id, unwrap(agent), unwrap(protocol), unwrap(paramvalues), undefined, unwrap(comments));
|
|
857
914
|
});
|
|
858
915
|
}
|
|
859
916
|
/**
|
|
@@ -865,36 +922,28 @@ export function ProcessConversion_getProcessGetter(processNameRoot, headers) {
|
|
|
865
922
|
*/
|
|
866
923
|
export function ProcessConversion_groupProcesses_Z27F0B586(processes, graph, context) {
|
|
867
924
|
return List_groupBy((p) => {
|
|
868
|
-
let protocol,
|
|
925
|
+
let protocol, protocol_1;
|
|
869
926
|
const matchValue = LDLabProcess.tryGetNameAsString(p, unwrap(context));
|
|
870
927
|
const matchValue_1 = LDLabProcess.tryGetExecutesLabProtocol(p, unwrap(graph), unwrap(context));
|
|
871
|
-
let matchResult,
|
|
928
|
+
let matchResult, name_1, protocol_2, name_2, protocol_3;
|
|
872
929
|
if (matchValue != null) {
|
|
873
930
|
if (ProcessConversion_decomposeProcessName_Z721C83C5(value_4(matchValue))[1] != null) {
|
|
874
931
|
matchResult = 0;
|
|
875
|
-
|
|
932
|
+
name_1 = value_4(matchValue);
|
|
876
933
|
}
|
|
877
934
|
else if (matchValue_1 != null) {
|
|
878
935
|
if ((protocol = value_4(matchValue_1), LDLabProtocol.tryGetNameAsString(protocol, unwrap(context)) != null)) {
|
|
879
936
|
matchResult = 1;
|
|
880
937
|
protocol_2 = value_4(matchValue_1);
|
|
881
938
|
}
|
|
882
|
-
else if ((name_1 = value_4(matchValue), name_1.indexOf("_") >= 0)) {
|
|
883
|
-
matchResult = 2;
|
|
884
|
-
name_4 = value_4(matchValue);
|
|
885
|
-
}
|
|
886
939
|
else {
|
|
887
|
-
matchResult =
|
|
888
|
-
|
|
940
|
+
matchResult = 2;
|
|
941
|
+
name_2 = value_4(matchValue);
|
|
889
942
|
}
|
|
890
943
|
}
|
|
891
|
-
else if ((name_2 = value_4(matchValue), name_2.indexOf("_") >= 0)) {
|
|
892
|
-
matchResult = 2;
|
|
893
|
-
name_4 = value_4(matchValue);
|
|
894
|
-
}
|
|
895
944
|
else {
|
|
896
|
-
matchResult =
|
|
897
|
-
|
|
945
|
+
matchResult = 2;
|
|
946
|
+
name_2 = value_4(matchValue);
|
|
898
947
|
}
|
|
899
948
|
}
|
|
900
949
|
else if (matchValue_1 != null) {
|
|
@@ -903,23 +952,21 @@ export function ProcessConversion_groupProcesses_Z27F0B586(processes, graph, con
|
|
|
903
952
|
protocol_2 = value_4(matchValue_1);
|
|
904
953
|
}
|
|
905
954
|
else {
|
|
906
|
-
matchResult =
|
|
955
|
+
matchResult = 3;
|
|
907
956
|
protocol_3 = value_4(matchValue_1);
|
|
908
957
|
}
|
|
909
958
|
}
|
|
910
959
|
else {
|
|
911
|
-
matchResult =
|
|
960
|
+
matchResult = 4;
|
|
912
961
|
}
|
|
913
962
|
switch (matchResult) {
|
|
914
963
|
case 0:
|
|
915
|
-
return ProcessConversion_decomposeProcessName_Z721C83C5(
|
|
964
|
+
return ProcessConversion_decomposeProcessName_Z721C83C5(name_1)[0];
|
|
916
965
|
case 1:
|
|
917
966
|
return defaultArg(LDLabProtocol.tryGetNameAsString(protocol_2, unwrap(context)), "");
|
|
918
967
|
case 2:
|
|
919
|
-
return
|
|
968
|
+
return name_2;
|
|
920
969
|
case 3:
|
|
921
|
-
return name_5;
|
|
922
|
-
case 4:
|
|
923
970
|
return protocol_3.Id;
|
|
924
971
|
default:
|
|
925
972
|
return createMissingIdentifier();
|
|
@@ -1126,25 +1173,25 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8(p, graph
|
|
|
1126
1173
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1127
1174
|
const c = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1128
1175
|
const patternInput = BaseTypes_decomposeComponent_Z2F770004(c, unwrap(context));
|
|
1129
|
-
t.AddColumn(patternInput[0],
|
|
1176
|
+
t.AddColumn(patternInput[0], ResizeArray_singleton(patternInput[1]), unwrap(ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(c)));
|
|
1130
1177
|
}
|
|
1131
1178
|
}
|
|
1132
1179
|
finally {
|
|
1133
1180
|
disposeSafe(enumerator);
|
|
1134
1181
|
}
|
|
1135
1182
|
map((d) => {
|
|
1136
|
-
t.AddProtocolDescriptionColumn(
|
|
1183
|
+
t.AddProtocolDescriptionColumn(ResizeArray_singleton(d));
|
|
1137
1184
|
}, LDLabProtocol.tryGetDescriptionAsString(p, unwrap(context)));
|
|
1138
1185
|
map((d_1) => {
|
|
1139
|
-
t.AddProtocolVersionColumn(
|
|
1186
|
+
t.AddProtocolVersionColumn(ResizeArray_singleton(d_1));
|
|
1140
1187
|
}, LDLabProtocol.tryGetVersionAsString(p, unwrap(context)));
|
|
1141
1188
|
map((d_2) => {
|
|
1142
|
-
t.AddProtocolTypeColumn(
|
|
1189
|
+
t.AddProtocolTypeColumn(ResizeArray_singleton(d_2));
|
|
1143
1190
|
}, ProcessConversion_tryGetProtocolType_Z6839B9E8(p, undefined, unwrap(context)));
|
|
1144
1191
|
map((d_3) => {
|
|
1145
|
-
t.AddProtocolUriColumn(
|
|
1192
|
+
t.AddProtocolUriColumn(ResizeArray_singleton(d_3));
|
|
1146
1193
|
}, LDLabProtocol.tryGetUrl(p, unwrap(context)));
|
|
1147
|
-
t.AddProtocolNameColumn(
|
|
1194
|
+
t.AddProtocolNameColumn(ResizeArray_singleton(name));
|
|
1148
1195
|
return t;
|
|
1149
1196
|
}
|
|
1150
1197
|
/**
|
|
@@ -1153,7 +1200,7 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8(p, graph
|
|
|
1153
1200
|
export function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
|
|
1154
1201
|
let source;
|
|
1155
1202
|
if (this$.RowCount === 0) {
|
|
1156
|
-
return
|
|
1203
|
+
return singleton_1((source = this$.Headers, fold((p, h) => {
|
|
1157
1204
|
if (h.tag === /* Component */ 0) {
|
|
1158
1205
|
const oa = h.fields[0];
|
|
1159
1206
|
const matchValue = oa.NameText;
|
|
@@ -1179,13 +1226,13 @@ export function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
|
|
|
1179
1226
|
/**
|
|
1180
1227
|
* Returns the list of processes specidified in this ArcTable
|
|
1181
1228
|
*/
|
|
1182
|
-
export function
|
|
1229
|
+
export function ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(this$, assayName, studyName) {
|
|
1183
1230
|
if (this$.RowCount === 0) {
|
|
1184
|
-
return
|
|
1231
|
+
return singleton_1(LDLabProcess.create(this$.Name));
|
|
1185
1232
|
}
|
|
1186
1233
|
else {
|
|
1187
|
-
const getter = ProcessConversion_getProcessGetter(this$.Name, this$.Headers);
|
|
1188
|
-
return toList(delay(() => map_1((i) => getter(this
|
|
1234
|
+
const getter = ProcessConversion_getProcessGetter(assayName, studyName, this$.Name, this$.Headers);
|
|
1235
|
+
return toList(delay(() => map_1((i) => getter(this$)(i), rangeDouble(0, 1, this$.RowCount - 1))));
|
|
1189
1236
|
}
|
|
1190
1237
|
}
|
|
1191
1238
|
/**
|
|
@@ -1197,13 +1244,13 @@ export function ARCtrl_ArcTable__ArcTable_GetProcesses(this$) {
|
|
|
1197
1244
|
*/
|
|
1198
1245
|
export function ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F(name, ps, graph, context) {
|
|
1199
1246
|
const tupledArg = Unchecked_alignByHeaders(true, collect((p) => ofSeq(ProcessConversion_processToRows_Z6839B9E8(p, unwrap(graph), unwrap(context))), ps));
|
|
1200
|
-
return ArcTable.
|
|
1247
|
+
return ArcTable.fromArcTableValues(name, tupledArg[0], tupledArg[1]);
|
|
1201
1248
|
}
|
|
1202
1249
|
/**
|
|
1203
1250
|
* Return a list of all the processes in all the tables.
|
|
1204
1251
|
*/
|
|
1205
|
-
export function
|
|
1206
|
-
return collect(
|
|
1252
|
+
export function ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(this$, assayName, studyName) {
|
|
1253
|
+
return collect((t) => ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(t, unwrap(assayName), unwrap(studyName)), toList(this$.Tables));
|
|
1207
1254
|
}
|
|
1208
1255
|
/**
|
|
1209
1256
|
* Create a collection of tables from a list of processes.
|
|
@@ -1216,7 +1263,7 @@ export function ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586(ps, g
|
|
|
1216
1263
|
let collection;
|
|
1217
1264
|
return new ArcTables((collection = map_2((tupledArg) => {
|
|
1218
1265
|
const tupledArg_1 = Unchecked_alignByHeaders(true, collect((p) => ofSeq(ProcessConversion_processToRows_Z6839B9E8(p, unwrap(graph), unwrap(context))), tupledArg[1]));
|
|
1219
|
-
return ArcTable.
|
|
1266
|
+
return ArcTable.fromArcTableValues(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
|
|
1220
1267
|
}, ProcessConversion_groupProcesses_Z27F0B586(ps, unwrap(graph), unwrap(context))), Array.from(collection)));
|
|
1221
1268
|
}
|
|
1222
1269
|
export class DatamapConversion {
|
|
@@ -1453,7 +1500,7 @@ export function AssayConversion_composeAssay_1501C0F8(assay) {
|
|
|
1453
1500
|
const measurementTechnique = map(BaseTypes_composeDefinedTerm_ZDED3A0F, assay.TechnologyPlatform);
|
|
1454
1501
|
const variableMeasured = map(BaseTypes_composePropertyValueFromOA_ZDED3A0F, assay.MeasurementType);
|
|
1455
1502
|
const creators = Option_fromSeq(ResizeArray_map(PersonConversion_composePerson_Z64D846DC, assay.Performers));
|
|
1456
|
-
const processSequence = Option_fromSeq((collection =
|
|
1503
|
+
const processSequence = Option_fromSeq((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(new ArcTables(assay.Tables), assay.Identifier), Array.from(collection)));
|
|
1457
1504
|
const fragmentDescriptors = map(DatamapConversion_composeFragmentDescriptors_Z8923FA3, assay.DataMap);
|
|
1458
1505
|
const dataFiles = map((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, unwrap(fragmentDescriptors)), processSequence);
|
|
1459
1506
|
const variableMeasureds = (variableMeasured == null) ? ((fragmentDescriptors == null) ? undefined : ((fds_1 = value_4(fragmentDescriptors), fds_1))) : ((fragmentDescriptors == null) ? ((vm_1 = value_4(variableMeasured), ResizeArray_singleton(vm_1))) : ((fds = value_4(fragmentDescriptors), (vm = value_4(variableMeasured), ResizeArray_appendSingleton(vm, fds)))));
|
|
@@ -1486,7 +1533,7 @@ export function StudyConversion_composeStudy_1680536E(study) {
|
|
|
1486
1533
|
const dateModified = now();
|
|
1487
1534
|
const publications = Option_fromSeq(ResizeArray_map(ScholarlyArticleConversion_composeScholarlyArticle_D324A6D, study.Publications));
|
|
1488
1535
|
const creators = Option_fromSeq(ResizeArray_map(PersonConversion_composePerson_Z64D846DC, study.Contacts));
|
|
1489
|
-
const processSequence = Option_fromSeq((collection =
|
|
1536
|
+
const processSequence = Option_fromSeq((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_40457300(new ArcTables(study.Tables), undefined, study.Identifier), Array.from(collection)));
|
|
1490
1537
|
const fragmentDescriptors = map(DatamapConversion_composeFragmentDescriptors_Z8923FA3, study.DataMap);
|
|
1491
1538
|
const dataFiles = map((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, unwrap(fragmentDescriptors)), processSequence);
|
|
1492
1539
|
const comments = Option_fromSeq(ResizeArray_map(BaseTypes_composeComment_Z13201A7E, study.Comments));
|
|
@@ -1607,7 +1607,7 @@ export class ArcRun extends ArcTables {
|
|
|
1607
1607
|
return newRun;
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
|
-
static
|
|
1610
|
+
static mapTable(name, updateFun) {
|
|
1611
1611
|
return (run) => {
|
|
1612
1612
|
const newRun = run.Copy();
|
|
1613
1613
|
newRun.MapTable(name, updateFun);
|