@nfdi4plants/arctrl 1.0.0-alpha9 → 1.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/ARC.js +5 -6
- package/ISA/ISA/ArcTypes/ArcTables.js +275 -271
- package/ISA/ISA/ArcTypes/ArcTypes.js +29 -313
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +15 -13
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +2 -2
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +4 -4
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +6 -6
- package/ISA/ISA.Spreadsheet/ArcAssay.js +6 -9
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +4 -4
- package/ISA/ISA.Spreadsheet/ArcStudy.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +9 -9
- package/README.md +3 -0
- package/Templates/Template.Json.js +5 -2
- package/Templates/Template.Spreadsheet.js +23 -7
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCell.fs +85 -36
- package/fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js +272 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/CellBuilder.fs +1 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/CellBuilder.fs.js +18 -18
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Transform.fs +1 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Transform.fs.js +2 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Types.fs +1 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Types.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsColumn.fs +3 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsRow.fs +2 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorksheet.fs +10 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorksheet.fs.js +5 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/SheetBuilder.fs +4 -4
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/SheetBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTable.fs +20 -4
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTable.fs.js +26 -6
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +0 -240
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsSpreadsheet.fableproj +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
|
@@ -3,13 +3,13 @@ import { tryParseReferenceColumnHeader } from "../../ISA/Regex.js";
|
|
|
3
3
|
import { map as map_1, toList, tryFind } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
4
4
|
import { toFsColumns, fixDeprecatedIOHeader, fromFsColumns } from "./CompositeColumn.js";
|
|
5
5
|
import { ArcTable } from "../../ISA/ArcTypes/ArcTable.js";
|
|
6
|
-
import { FsWorksheet } from "../../../fable_modules/FsSpreadsheet.
|
|
6
|
+
import { FsWorksheet } from "../../../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
|
|
7
7
|
import { comparePrimitives } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
8
|
-
import { FsRangeAddress_$ctor_7E77A4A0 } from "../../../fable_modules/FsSpreadsheet.
|
|
9
|
-
import { FsAddress_$ctor_Z37302880 } from "../../../fable_modules/FsSpreadsheet.
|
|
10
|
-
import { Dictionary_tryGet } from "../../../fable_modules/FsSpreadsheet.
|
|
8
|
+
import { FsRangeAddress_$ctor_7E77A4A0 } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeAddress.fs.js";
|
|
9
|
+
import { FsAddress_$ctor_Z37302880 } from "../../../fable_modules/FsSpreadsheet.5.0.0/FsAddress.fs.js";
|
|
10
|
+
import { Dictionary_tryGet } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCellsCollection.fs.js";
|
|
11
11
|
import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
12
|
-
import { FsRangeBase__Cell_Z3407A44B } from "../../../fable_modules/FsSpreadsheet.
|
|
12
|
+
import { FsRangeBase__Cell_Z3407A44B } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeBase.fs.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Iterates over elements of the input list and groups adjacent elements.
|
|
@@ -63,8 +63,9 @@ export function classifyColumnOrder(column) {
|
|
|
63
63
|
|
|
64
64
|
export function groupColumnsByHeader(columns) {
|
|
65
65
|
return Aux_List_groupWhen((c) => {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
const v = c.Item(1).ValueAsString();
|
|
67
|
+
if (tryParseReferenceColumnHeader(v) == null) {
|
|
68
|
+
return !(v.indexOf("Unit") === 0);
|
|
68
69
|
}
|
|
69
70
|
else {
|
|
70
71
|
return false;
|
|
@@ -113,20 +114,21 @@ export function toFsWorksheet(table) {
|
|
|
113
114
|
iterateIndexed((colI, col) => {
|
|
114
115
|
iterateIndexed((rowI, cell) => {
|
|
115
116
|
let value;
|
|
117
|
+
const v = cell.ValueAsString();
|
|
116
118
|
if (rowI === 0) {
|
|
117
|
-
const matchValue = Dictionary_tryGet(
|
|
119
|
+
const matchValue = Dictionary_tryGet(v, stringCount);
|
|
118
120
|
if (matchValue == null) {
|
|
119
|
-
addToDict(stringCount, cell.
|
|
120
|
-
value =
|
|
121
|
+
addToDict(stringCount, cell.ValueAsString(), "");
|
|
122
|
+
value = v;
|
|
121
123
|
}
|
|
122
124
|
else {
|
|
123
125
|
const spaces = matchValue;
|
|
124
|
-
stringCount.set(
|
|
125
|
-
value = ((
|
|
126
|
+
stringCount.set(v, spaces + " ");
|
|
127
|
+
value = ((v + " ") + spaces);
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
else {
|
|
129
|
-
value =
|
|
131
|
+
value = v;
|
|
130
132
|
}
|
|
131
133
|
const address = FsAddress_$ctor_Z37302880(rowI + 1, colI + 1);
|
|
132
134
|
FsRangeBase__Cell_Z3407A44B(fsTable, address, ws.CellCollection).SetValueAs(value);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { singleton, ofArray, head, tail, isEmpty, map } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
2
2
|
import { CompositeCell } from "../../ISA/ArcTypes/CompositeCell.js";
|
|
3
3
|
import { printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
|
|
4
|
-
import { FsCell } from "../../../fable_modules/FsSpreadsheet.
|
|
4
|
+
import { FsCell } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js";
|
|
5
5
|
|
|
6
6
|
export function fromFsCells(cells) {
|
|
7
|
-
const cellValues = map((c) => c.
|
|
7
|
+
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
8
8
|
let matchResult, v, v1, v2, v3, v1_1, v2_1, v3_1, v4;
|
|
9
9
|
if (!isEmpty(cellValues)) {
|
|
10
10
|
if (!isEmpty(tail(cellValues))) {
|
|
@@ -2,9 +2,9 @@ import { CompositeHeader, IOType } from "../../ISA/ArcTypes/CompositeHeader.js";
|
|
|
2
2
|
import { toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
3
3
|
import { toFsCells, fromFsCells } from "./CompositeHeader.js";
|
|
4
4
|
import { singleton as singleton_1, ofArray, item, map } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
5
|
-
import { FsAddress__get_RowNumber } from "../../../fable_modules/FsSpreadsheet.
|
|
6
|
-
import { FsRangeAddress__get_LastAddress } from "../../../fable_modules/FsSpreadsheet.
|
|
7
|
-
import { FsRangeBase__get_RangeAddress } from "../../../fable_modules/FsSpreadsheet.
|
|
5
|
+
import { FsAddress__get_RowNumber } from "../../../fable_modules/FsSpreadsheet.5.0.0/FsAddress.fs.js";
|
|
6
|
+
import { FsRangeAddress__get_LastAddress } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeAddress.fs.js";
|
|
7
|
+
import { FsRangeBase__get_RangeAddress } from "../../../fable_modules/FsSpreadsheet.5.0.0/Ranges/FsRangeBase.fs.js";
|
|
8
8
|
import { singleton, append, toList, exists, map as map_1, delay, toArray } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
9
9
|
import { toFsCells as toFsCells_1, fromFsCells as fromFsCells_1 } from "./CompositeCell.js";
|
|
10
10
|
import { rangeDouble } from "../../../fable_modules/fable-library.4.1.4/Range.js";
|
|
@@ -19,7 +19,7 @@ import { map as map_2 } from "../../../fable_modules/fable-library.4.1.4/Array.j
|
|
|
19
19
|
* A "Source Name" column will now be mapped to the propper "Input [Source Name]", and all other IO types will be mapped to "Output [<IO Type>]".
|
|
20
20
|
*/
|
|
21
21
|
export function fixDeprecatedIOHeader(col) {
|
|
22
|
-
const matchValue = IOType.ofString(col.Item(1).
|
|
22
|
+
const matchValue = IOType.ofString(col.Item(1).ValueAsString());
|
|
23
23
|
switch (matchValue.tag) {
|
|
24
24
|
case 6:
|
|
25
25
|
return col;
|
|
@@ -3,7 +3,7 @@ import { singleton, tail, head, isEmpty, map } from "../../../fable_modules/fabl
|
|
|
3
3
|
import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
|
|
4
4
|
import { ActivePatterns_$007COutputColumnHeader$007C_$007C, ActivePatterns_$007CInputColumnHeader$007C_$007C, tryParseComponentColumnHeader, tryParseCharacteristicColumnHeader, tryParseFactorColumnHeader, tryParseParameterColumnHeader, ActivePatterns_$007CUnitColumnHeader$007C_$007C, ActivePatterns_$007CTANColumnHeader$007C_$007C, ActivePatterns_$007CTSRColumnHeader$007C_$007C } from "../../ISA/Regex.js";
|
|
5
5
|
import { IOType, CompositeHeader } from "../../ISA/ArcTypes/CompositeHeader.js";
|
|
6
|
-
import { FsCell } from "../../../fable_modules/FsSpreadsheet.
|
|
6
|
+
import { FsCell } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js";
|
|
7
7
|
import { toString } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
8
8
|
import { empty, singleton as singleton_1, append, delay, toList } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ export function ActivePattern_mergeIDInfo(idSpace1, localID1, idSpace2, localID2
|
|
|
22
22
|
|
|
23
23
|
export function ActivePattern_$007CTerm$007C_$007C(categoryParser, f, cells) {
|
|
24
24
|
const $007CAC$007C_$007C = categoryParser;
|
|
25
|
-
const cellValues = map((c) => c.
|
|
25
|
+
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
26
26
|
let matchResult, name;
|
|
27
27
|
if (!isEmpty(cellValues)) {
|
|
28
28
|
const activePatternResult = $007CAC$007C_$007C(head(cellValues));
|
|
@@ -234,7 +234,7 @@ export function ActivePattern_$007CComponent$007C_$007C(cells) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
export function ActivePattern_$007CInput$007C_$007C(cells) {
|
|
237
|
-
const cellValues = map((c) => c.
|
|
237
|
+
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
238
238
|
let matchResult, ioType;
|
|
239
239
|
if (!isEmpty(cellValues)) {
|
|
240
240
|
const activePatternResult = ActivePatterns_$007CInputColumnHeader$007C_$007C(head(cellValues));
|
|
@@ -263,7 +263,7 @@ export function ActivePattern_$007CInput$007C_$007C(cells) {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
export function ActivePattern_$007COutput$007C_$007C(cells) {
|
|
266
|
-
const cellValues = map((c) => c.
|
|
266
|
+
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
267
267
|
let matchResult, ioType;
|
|
268
268
|
if (!isEmpty(cellValues)) {
|
|
269
269
|
const activePatternResult = ActivePatterns_$007COutputColumnHeader$007C_$007C(head(cellValues));
|
|
@@ -292,7 +292,7 @@ export function ActivePattern_$007COutput$007C_$007C(cells) {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
|
|
295
|
-
const cellValues = map((c) => c.
|
|
295
|
+
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
296
296
|
let matchResult;
|
|
297
297
|
if (!isEmpty(cellValues)) {
|
|
298
298
|
switch (head(cellValues)) {
|
|
@@ -382,7 +382,7 @@ export function ActivePattern_$007CProtocolHeader$007C_$007C(cells) {
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
export function ActivePattern_$007CFreeText$007C_$007C(cells) {
|
|
385
|
-
const cellValues = map((c) => c.
|
|
385
|
+
const cellValues = map((c) => c.ValueAsString(), cells);
|
|
386
386
|
let matchResult, text;
|
|
387
387
|
if (!isEmpty(cellValues)) {
|
|
388
388
|
if (isEmpty(tail(cellValues))) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.
|
|
1
|
+
import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
|
|
2
2
|
import { iterate, isEmpty as isEmpty_1, choose, tryHead, head, exists, map, singleton, append, delay, iterateIndexed } from "../../fable_modules/fable-library.4.1.4/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";
|
|
@@ -10,7 +10,7 @@ import { createMissingIdentifier } from "../ISA/Identifier.js";
|
|
|
10
10
|
import { defaultArg } from "../../fable_modules/fable-library.4.1.4/Option.js";
|
|
11
11
|
import { printf, toConsole } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
12
12
|
import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
|
|
13
|
-
import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.
|
|
13
|
+
import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorkbook.fs.js";
|
|
14
14
|
|
|
15
15
|
export function toMetadataSheet(assay) {
|
|
16
16
|
let assay_1;
|
|
@@ -127,14 +127,11 @@ export function fromFsWorkbook(doc) {
|
|
|
127
127
|
else {
|
|
128
128
|
assayMetaData = fromMetadataSheet(matchValue);
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
if (isEmpty_1(
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
assayMetaData.Tables = Array.from(sheets);
|
|
136
|
-
return assayMetaData;
|
|
130
|
+
const tables = choose(tryFromFsWorksheet, doc.GetWorksheets());
|
|
131
|
+
if (!isEmpty_1(tables)) {
|
|
132
|
+
assayMetaData.Tables = Array.from(tables);
|
|
137
133
|
}
|
|
134
|
+
return assayMetaData;
|
|
138
135
|
}
|
|
139
136
|
|
|
140
137
|
export function toFsWorkbook(assay) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Record } from "../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
2
|
import { record_type, list_type, string_type } from "../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
3
3
|
import { Remark, Comment$_$reflection } from "../ISA/JsonTypes/Comment.js";
|
|
4
|
-
import { head, tail, isEmpty,
|
|
4
|
+
import { ofSeq, head, tail, isEmpty, concat, unzip, append, toArray, reverse, cons, empty, map, ofArray } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
5
5
|
import { Remark_wrapRemark, Comment_toString, Comment_fromString } from "./Metadata/Comment.js";
|
|
6
6
|
import { SparseRowModule_writeToSheet, SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_tryGetValueAt, SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValueDefault_5BAE6133 } from "./Metadata/SparseTable.js";
|
|
7
7
|
import { addToDict } from "../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
@@ -17,8 +17,8 @@ import { toRows as toRows_4, fromRows as fromRows_4 } from "./Metadata/Study.js"
|
|
|
17
17
|
import { iterateIndexed, map as map_1, toList, collect, singleton, append as append_1, delay } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
18
18
|
import { tryFind, ofList } from "../../fable_modules/fable-library.4.1.4/Map.js";
|
|
19
19
|
import { printf, toFail } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
20
|
-
import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.
|
|
21
|
-
import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.
|
|
20
|
+
import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
|
|
21
|
+
import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorkbook.fs.js";
|
|
22
22
|
|
|
23
23
|
export class InvestigationInfo extends Record {
|
|
24
24
|
constructor(Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Comments) {
|
|
@@ -244,7 +244,7 @@ export function fromRows(rows) {
|
|
|
244
244
|
|
|
245
245
|
export function toRows(investigation) {
|
|
246
246
|
let remarks, rows;
|
|
247
|
-
return (remarks = ofArray(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows_1(ofArray(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z4D87C88C(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofArray(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofArray(investigation.Contacts)), delay(() => collect((study) => append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_4(study, void 0))),
|
|
247
|
+
return (remarks = ofArray(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows_1(ofArray(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z4D87C88C(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofArray(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofArray(investigation.Contacts)), delay(() => collect((study) => append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_4(study, void 0))), investigation.RegisteredStudies)))))))))))))))))), (() => {
|
|
248
248
|
try {
|
|
249
249
|
const rm = ofList(map((arg) => Remark.toTuple(arg), remarks), {
|
|
250
250
|
Compare: comparePrimitives,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.
|
|
1
|
+
import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
|
|
2
2
|
import { iterate, isEmpty, choose, map, append, iterateIndexed } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
3
3
|
import { SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_writeToSheet } from "./Metadata/SparseTable.js";
|
|
4
4
|
import { fromRows as fromRows_1, toRows } from "./Metadata/Study.js";
|
|
@@ -9,8 +9,8 @@ import { createMissingIdentifier } from "../ISA/Identifier.js";
|
|
|
9
9
|
import { empty } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
10
10
|
import { printf, toConsole } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
11
11
|
import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
|
|
12
|
-
import {
|
|
13
|
-
import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.
|
|
12
|
+
import { ArcTables } from "../ISA/ArcTypes/ArcTables.js";
|
|
13
|
+
import { FsWorkbook } from "../../fable_modules/FsSpreadsheet.5.0.0/FsWorkbook.fs.js";
|
|
14
14
|
|
|
15
15
|
export function ArcStudy_toMetadataSheet(study, assays) {
|
|
16
16
|
let source_1;
|
|
@@ -48,8 +48,8 @@ export function ARCtrl_ISA_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D(doc
|
|
|
48
48
|
const studyMetadata = patternInput[0];
|
|
49
49
|
const sheets = choose(tryFromFsWorksheet, doc.GetWorksheets());
|
|
50
50
|
if (!isEmpty(sheets)) {
|
|
51
|
-
const updatedTables =
|
|
52
|
-
studyMetadata.Tables =
|
|
51
|
+
const updatedTables = ArcTables.updateReferenceTablesBySheets(new ArcTables(studyMetadata.Tables), new ArcTables(Array.from(sheets)), true);
|
|
52
|
+
studyMetadata.Tables = updatedTables.Tables;
|
|
53
53
|
}
|
|
54
54
|
return [studyMetadata, patternInput[1]];
|
|
55
55
|
}
|
|
@@ -2,12 +2,12 @@ import { append as append_1, delay, tryItem, length as length_1, isEmpty, iterat
|
|
|
2
2
|
import { defaultArg, map as map_1 } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
3
3
|
import { tryFind, ofSeq } from "../../../fable_modules/fable-library.4.1.4/Map.js";
|
|
4
4
|
import { arrayHash, equalArrays, equals, comparePrimitives } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
5
|
-
import { RowBuilder_get_Empty, RowBuilder__Combine_19F30600, RowBuilder_$ctor } from "../../../fable_modules/FsSpreadsheet.
|
|
6
|
-
import { CellBuilder_$ctor,
|
|
7
|
-
import { Messages_format, SheetEntity$1_some_2B595 } from "../../../fable_modules/FsSpreadsheet.
|
|
8
|
-
import { DataType } from "../../../fable_modules/FsSpreadsheet.
|
|
5
|
+
import { RowBuilder_get_Empty, RowBuilder__Combine_19F30600, RowBuilder_$ctor } from "../../../fable_modules/FsSpreadsheet.5.0.0/DSL/RowBuilder.fs.js";
|
|
6
|
+
import { CellBuilder_$ctor, CellBuilder__AsCellElement_6F87C2ED } from "../../../fable_modules/FsSpreadsheet.5.0.0/DSL/CellBuilder.fs.js";
|
|
7
|
+
import { Messages_format, SheetEntity$1_some_2B595 } from "../../../fable_modules/FsSpreadsheet.5.0.0/DSL/Types.fs.js";
|
|
8
|
+
import { DataType } from "../../../fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js";
|
|
9
9
|
import { map as map_2, toArray, initialize as initialize_1, exists, find, cons, append, empty, singleton } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
10
|
-
import { ColumnIndex, RowElement } from "../../../fable_modules/FsSpreadsheet.
|
|
10
|
+
import { ColumnIndex, RowElement } from "../../../fable_modules/FsSpreadsheet.5.0.0/DSL/Types.fs.js";
|
|
11
11
|
import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
12
12
|
import { record_type, list_type, class_type, tuple_type, int32_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
13
13
|
import { Seq_trySkip, Dictionary_tryGetValue } from "../CollectionAux.js";
|
|
@@ -40,11 +40,11 @@ export function SparseRowModule_getAllValues(i) {
|
|
|
40
40
|
|
|
41
41
|
export function SparseRowModule_fromFsRow(r) {
|
|
42
42
|
return choose((c) => {
|
|
43
|
-
if (c.Value
|
|
43
|
+
if (equals(c.Value, "")) {
|
|
44
44
|
return void 0;
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
return [c.ColumnNumber - 1, c.
|
|
47
|
+
return [c.ColumnNumber - 1, c.ValueAsString()];
|
|
48
48
|
}
|
|
49
49
|
}, r.Cells);
|
|
50
50
|
}
|
|
@@ -67,7 +67,7 @@ export function SparseRowModule_toDSLRow(vs) {
|
|
|
67
67
|
const v = _arg;
|
|
68
68
|
if (v == null) {
|
|
69
69
|
let c_1;
|
|
70
|
-
const this$_5 =
|
|
70
|
+
const this$_5 = CellBuilder__AsCellElement_6F87C2ED(CellBuilder_$ctor(), SheetEntity$1_some_2B595(singleton([new DataType(0, []), ""])));
|
|
71
71
|
let matchResult, errs_1, f_1, ms_2_1;
|
|
72
72
|
switch (this$_5.tag) {
|
|
73
73
|
case 1: {
|
|
@@ -137,7 +137,7 @@ export function SparseRowModule_toDSLRow(vs) {
|
|
|
137
137
|
else {
|
|
138
138
|
const v_1 = v;
|
|
139
139
|
let c;
|
|
140
|
-
const this$_2 =
|
|
140
|
+
const this$_2 = CellBuilder__AsCellElement_6F87C2ED(CellBuilder_$ctor(), SheetEntity$1_some_2B595(singleton([new DataType(0, []), v_1])));
|
|
141
141
|
let matchResult_2, errs, f, ms_2;
|
|
142
142
|
switch (this$_2.tag) {
|
|
143
143
|
case 1: {
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# ARCtrl
|
|
2
2
|
Top level ARC DataModel and API function descriptions.
|
|
3
3
|
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
4
7
|
- [ARCtrl](#arctrl)
|
|
5
8
|
- [Jargon/Nomenclature](#jargonnomenclature)
|
|
6
9
|
- [API Design](#api-design)
|
|
@@ -9,7 +9,7 @@ import { toString as toString_1, datetime, list as list_1, guid, object } from "
|
|
|
9
9
|
import { ofArray, map } from "../fable_modules/fable-library.4.1.4/List.js";
|
|
10
10
|
import { Process_decoder, Process_encoder } from "../ISA/ISA.Json/Process.js";
|
|
11
11
|
import { map as map_1, delay, toList } from "../fable_modules/fable-library.4.1.4/Seq.js";
|
|
12
|
-
import {
|
|
12
|
+
import { ArcTables } from "../ISA/ISA/ArcTypes/ArcTables.js";
|
|
13
13
|
import { printf, toFail } from "../fable_modules/fable-library.4.1.4/String.js";
|
|
14
14
|
import { FSharpMap__get_Values } from "../fable_modules/fable-library.4.1.4/Map.js";
|
|
15
15
|
import { defaultArg } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
@@ -37,7 +37,10 @@ export const Template_decode = (() => {
|
|
|
37
37
|
const oaDecoder = OntologyAnnotation_decoder(ConverterOptions_$ctor());
|
|
38
38
|
return (path_10) => ((v) => object_1((get$) => {
|
|
39
39
|
let objectArg, arg_3, d, decoder, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9;
|
|
40
|
-
return Template.create((objectArg = get$.Required, objectArg.Field("id", guid_1)), (arg_3 = ((d = ((decoder = Process_decoder(ConverterOptions_$ctor()), (path_1) => ((value_1) => list_2(uncurry2(decoder), path_1, value_1)))), (path_2) => ((value_2) => map_2((ps) =>
|
|
40
|
+
return Template.create((objectArg = get$.Required, objectArg.Field("id", guid_1)), (arg_3 = ((d = ((decoder = Process_decoder(ConverterOptions_$ctor()), (path_1) => ((value_1) => list_2(uncurry2(decoder), path_1, value_1)))), (path_2) => ((value_2) => map_2((ps) => {
|
|
41
|
+
const arctbls = ArcTables.fromProcesses(ps);
|
|
42
|
+
return arctbls.Tables[0];
|
|
43
|
+
}, uncurry2(d), path_2, value_2)))), (objectArg_1 = get$.Required, objectArg_1.Field("table", uncurry2(arg_3)))), (objectArg_2 = get$.Required, objectArg_2.Field("name", string)), (objectArg_3 = get$.Required, objectArg_3.Field("description", string)), (objectArg_4 = get$.Required, objectArg_4.Field("organisation", uncurry2(Organisation_decode))), (objectArg_5 = get$.Required, objectArg_5.Field("version", string)), (objectArg_6 = get$.Required, objectArg_6.Field("authors", (path_6, value_6) => array_1(uncurry2(personDecoder), path_6, value_6))), (objectArg_7 = get$.Required, objectArg_7.Field("endpoint_repositories", (path_7, value_7) => array_1(uncurry2(oaDecoder), path_7, value_7))), (objectArg_8 = get$.Required, objectArg_8.Field("tags", (path_8, value_8) => array_1(uncurry2(oaDecoder), path_8, value_8))), (objectArg_9 = get$.Required, objectArg_9.Field("last_updated", datetimeUtc)));
|
|
41
44
|
}, path_10, v));
|
|
42
45
|
})();
|
|
43
46
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { toString, Record, FSharpException } from "../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { record_type, list_type, string_type, class_type } from "../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
1
3
|
import { toArray as toArray_1, append as append_1, reverse, map, empty, ofArray } from "../fable_modules/fable-library.4.1.4/List.js";
|
|
2
4
|
import { toRows, fromRows, toSparseTable, fromSparseTable } from "../ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js";
|
|
3
|
-
import { toString, Record } from "../fable_modules/fable-library.4.1.4/Types.js";
|
|
4
|
-
import { record_type, list_type, string_type } from "../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
5
5
|
import { Comment$_$reflection } from "../ISA/ISA/JsonTypes/Comment.js";
|
|
6
6
|
import { Comment_fromString } from "../ISA/ISA.Spreadsheet/Metadata/Comment.js";
|
|
7
7
|
import { SparseRowModule_fromFsRow, SparseRowModule_writeToSheet, SparseRowModule_fromValues, SparseRowModule_tryGetValueAt, SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValueDefault_5BAE6133 } from "../ISA/ISA.Spreadsheet/Metadata/SparseTable.js";
|
|
@@ -15,11 +15,21 @@ import { toArray } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
|
15
15
|
import { toRows as toRows_1, fromRows as fromRows_1 } from "../ISA/ISA.Spreadsheet/Metadata/Contacts.js";
|
|
16
16
|
import { parse } from "../fable_modules/fable-library.4.1.4/Guid.js";
|
|
17
17
|
import { Template, Organisation } from "./Template.js";
|
|
18
|
-
import { FsWorksheet } from "../fable_modules/FsSpreadsheet.
|
|
19
|
-
import { printf, toFail } from "../fable_modules/fable-library.4.1.4/String.js";
|
|
18
|
+
import { FsWorksheet } from "../fable_modules/FsSpreadsheet.5.0.0/FsWorksheet.fs.js";
|
|
20
19
|
import { toFsWorksheet, tryFromFsWorksheet } from "../ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js";
|
|
21
20
|
import { now } from "../fable_modules/fable-library.4.1.4/Date.js";
|
|
22
|
-
import { FsWorkbook } from "../fable_modules/FsSpreadsheet.
|
|
21
|
+
import { FsWorkbook } from "../fable_modules/FsSpreadsheet.5.0.0/FsWorkbook.fs.js";
|
|
22
|
+
|
|
23
|
+
export class TemplateReadError extends FSharpException {
|
|
24
|
+
constructor(Data0) {
|
|
25
|
+
super();
|
|
26
|
+
this.Data0 = Data0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function TemplateReadError_$reflection() {
|
|
31
|
+
return class_type("ARCtrl.Template.Spreadsheet.TemplateReadError", void 0, TemplateReadError, class_type("System.Exception"));
|
|
32
|
+
}
|
|
23
33
|
|
|
24
34
|
export const Metadata_ER_labels = ofArray(["ER", "ER Term Accession Number", "ER Term Source REF"]);
|
|
25
35
|
|
|
@@ -275,7 +285,7 @@ export function Template_fromMetadataSheet(sheet) {
|
|
|
275
285
|
* Reads an assay from a spreadsheet
|
|
276
286
|
*/
|
|
277
287
|
export function Template_fromFsWorkbook(doc) {
|
|
278
|
-
let matchValue_2, matchValue_4, ws_3, matchValue_5,
|
|
288
|
+
let matchValue_2, matchValue_4, ws_3, matchValue_5, ws_2, matchValue_3;
|
|
279
289
|
let patternInput;
|
|
280
290
|
const matchValue = doc.TryGetWorksheetByName("isa_template");
|
|
281
291
|
if (matchValue == null) {
|
|
@@ -301,7 +311,13 @@ export function Template_fromFsWorkbook(doc) {
|
|
|
301
311
|
else {
|
|
302
312
|
return void 0;
|
|
303
313
|
}
|
|
304
|
-
}, sheets), (matchValue_4 == null) ?
|
|
314
|
+
}, sheets), (matchValue_4 == null) ? (() => {
|
|
315
|
+
throw new TemplateReadError(`No worksheet or table with name \`${templateInfo.Table}\` found`);
|
|
316
|
+
})() : ((ws_3 = matchValue_4, (matchValue_5 = tryFromFsWorksheet(ws_3), (matchValue_5 == null) ? (() => {
|
|
317
|
+
throw new TemplateReadError(`Ws with name \`${ws_3.Name}\` could not be converted to a table`);
|
|
318
|
+
})() : matchValue_5))))) : ((ws_2 = matchValue_2, (matchValue_3 = tryFromFsWorksheet(ws_2), (matchValue_3 == null) ? (() => {
|
|
319
|
+
throw new TemplateReadError(`Ws with name \`${ws_2.Name}\` could not be converted to a table`);
|
|
320
|
+
})() : matchValue_3)))), now());
|
|
305
321
|
}
|
|
306
322
|
|
|
307
323
|
export function Template_toFsWorkbook(template) {
|